public/lookbook-assets/js/index.js in lookbook-2.0.0.beta.8 vs public/lookbook-assets/js/index.js in lookbook-2.0.0.beta.9

- old
+ new

@@ -7813,11 +7813,11 @@ return $1.toUpperCase().replace("-", "").replace("_", ""); }); } -var $52abf2efa3492135$exports = {}; +var $d9c79682b7f8e136$exports = {}; var $cbd28b10fa9798c7$exports = {}; $parcel$defineInteropFlag($cbd28b10fa9798c7$exports); $parcel$export($cbd28b10fa9798c7$exports, "default", () => $cbd28b10fa9798c7$export$2e2bcd8739ae039); @@ -11354,10 +11354,43 @@ function $99486586f6691564$export$2e2bcd8739ae039() { return {}; } +var $e398acaded942bbe$exports = {}; + +$parcel$defineInteropFlag($e398acaded942bbe$exports); + +$parcel$export($e398acaded942bbe$exports, "default", () => $e398acaded942bbe$export$2e2bcd8739ae039); + +function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) { + return { + width: 0, + height: 0, + resizing: false, + target: null, + init () { + this.target = document.querySelector(targetSelector); + if (this.target) { + this.width = Math.round(this.target.clientWidth); + this.height = Math.round(this.target.clientHeight); + this.createObserver(); + } + }, + createObserver () { + if (this.target) this.observer = (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.target, ({ width: width , height: height })=>{ + this.width = width; + this.height = height; + }); + }, + tearDown () { + if (this.observer) this.observer.disconnect(); + } + }; +} + + var $47a1c62621be0c54$exports = {}; $parcel$defineInteropFlag($47a1c62621be0c54$exports); $parcel$export($47a1c62621be0c54$exports, "default", () => $47a1c62621be0c54$export$2e2bcd8739ae039); @@ -11410,43 +11443,10 @@ } }; } -var $e398acaded942bbe$exports = {}; - -$parcel$defineInteropFlag($e398acaded942bbe$exports); - -$parcel$export($e398acaded942bbe$exports, "default", () => $e398acaded942bbe$export$2e2bcd8739ae039); - -function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) { - return { - width: 0, - height: 0, - resizing: false, - target: null, - init () { - this.target = document.querySelector(targetSelector); - if (this.target) { - this.width = Math.round(this.target.clientWidth); - this.height = Math.round(this.target.clientHeight); - this.createObserver(); - } - }, - createObserver () { - if (this.target) this.observer = (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.target, ({ width: width , height: height })=>{ - this.width = width; - this.height = height; - }); - }, - tearDown () { - if (this.observer) this.observer.disconnect(); - } - }; -} - - var $216ef7001f59f21d$exports = {}; $parcel$defineInteropFlag($216ef7001f59f21d$exports); $parcel$export($216ef7001f59f21d$exports, "default", () => $216ef7001f59f21d$export$2e2bcd8739ae039); @@ -12114,103 +12114,10 @@ } }; } -var $0db07828cadc68e0$exports = {}; - -$parcel$defineInteropFlag($0db07828cadc68e0$exports); - -$parcel$export($0db07828cadc68e0$exports, "default", () => $0db07828cadc68e0$export$2e2bcd8739ae039); - - - - -function $0db07828cadc68e0$export$2e2bcd8739ae039(store) { - const initial = store ? store.activeTab : null; - let dropdown = null; - return { - visibleTabsCount: 0, - triggerLeft: 0, - get store () { - return store || this; - }, - get tabs () { - return this.$refs.tabs ? Array.from(this.$refs.tabs.children) : []; - }, - get dropdownTabs () { - return Array.from(this.$refs.tabsDropdown ? this.$refs.tabsDropdown.children : []); - }, - get tabWidths () { - return this.tabs.map((tab)=>(0, $490552754c23ef6f$export$bdf7e699b242f476)(tab, { - includeMargins: true - }).width); - }, - init () { - this.$nextTick(()=>{ - if (this.$root.parentElement.offsetWidth === this.$root.offsetWidth) this.visibleTabsCount = this.tabs.length; - dropdown = (0, $789b7d27a7c715a6$export$2e2bcd8739ae039)(this.$refs.dropdownTrigger, { - content: this.$refs.tabsDropdown, - theme: "menu", - interactive: true, - trigger: "click", - placement: "bottom", - appendTo: this.$root - }); - const initialTab = initial ? this.tabs.find((t)=>this._getRef(t) === initial) : this.tabs[0]; - this.selectTab(initialTab || this.tabs[0], true); - this.parentObserver = (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$root.parentElement, (0, $c5d017602d25d050$export$61fc7d43ac8f84b0)(10, this.handleResize.bind(this))); - this.$watch("visibleTabsCount", (value)=>{ - this.debug(`'#${this.$root.id}' visible tabs count:`, value); - }); - }); - }, - handleResize ({ width: width }) { - if (width === this._lastMeasuredWidth) return; - if (width === this.$root.offsetWidth) { - this.visibleTabsCount = this.tabs.length; - return; - } - let sumTabWidths = 60; - let triggerLeft = 20; - let visibleTabsCount = 0; - this.tabWidths.forEach((tabWidth)=>{ - sumTabWidths += tabWidth; - if (sumTabWidths < width) { - triggerLeft += tabWidth; - visibleTabsCount++; - } - }); - this.visibleTabsCount = visibleTabsCount; - this.triggerLeft = triggerLeft; - this._lastMeasuredWidth = width; - }, - selectTab (el, initial = false) { - this.store.activeTab = this._getRef(el); - dropdown.hide(); - if (!initial) this.$dispatch("tabs:change", { - tabs: this - }); - }, - isSelected (el) { - return this.store.activeTab === this._getRef(el); - }, - isDisabled (el) { - return el.getAttribute("data-disabled") == "true"; - }, - hasHiddenTabs () { - return this.visibleTabsCount < this.tabs.length; - }, - // protected - _lastMeasuredWidth: 0, - _getRef (el) { - return el ? el.getAttribute("x-ref").replace("dropdown-", "") : null; - } - }; -} - - var $6d64716f0b34fdf4$exports = {}; $parcel$defineInteropFlag($6d64716f0b34fdf4$exports); $parcel$export($6d64716f0b34fdf4$exports, "default", () => $6d64716f0b34fdf4$export$2e2bcd8739ae039); @@ -12334,26 +12241,119 @@ } }; } -$52abf2efa3492135$exports = { +var $0db07828cadc68e0$exports = {}; + +$parcel$defineInteropFlag($0db07828cadc68e0$exports); + +$parcel$export($0db07828cadc68e0$exports, "default", () => $0db07828cadc68e0$export$2e2bcd8739ae039); + + + + +function $0db07828cadc68e0$export$2e2bcd8739ae039(store) { + const initial = store ? store.activeTab : null; + let dropdown = null; + return { + visibleTabsCount: 0, + triggerLeft: 0, + get store () { + return store || this; + }, + get tabs () { + return this.$refs.tabs ? Array.from(this.$refs.tabs.children) : []; + }, + get dropdownTabs () { + return Array.from(this.$refs.tabsDropdown ? this.$refs.tabsDropdown.children : []); + }, + get tabWidths () { + return this.tabs.map((tab)=>(0, $490552754c23ef6f$export$bdf7e699b242f476)(tab, { + includeMargins: true + }).width); + }, + init () { + this.$nextTick(()=>{ + if (this.$root.parentElement.offsetWidth === this.$root.offsetWidth) this.visibleTabsCount = this.tabs.length; + dropdown = (0, $789b7d27a7c715a6$export$2e2bcd8739ae039)(this.$refs.dropdownTrigger, { + content: this.$refs.tabsDropdown, + theme: "menu", + interactive: true, + trigger: "click", + placement: "bottom", + appendTo: this.$root + }); + const initialTab = initial ? this.tabs.find((t)=>this._getRef(t) === initial) : this.tabs[0]; + this.selectTab(initialTab || this.tabs[0], true); + this.parentObserver = (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$root.parentElement, (0, $c5d017602d25d050$export$61fc7d43ac8f84b0)(10, this.handleResize.bind(this))); + this.$watch("visibleTabsCount", (value)=>{ + this.debug(`'#${this.$root.id}' visible tabs count:`, value); + }); + }); + }, + handleResize ({ width: width }) { + if (width === this._lastMeasuredWidth) return; + if (width === this.$root.offsetWidth) { + this.visibleTabsCount = this.tabs.length; + return; + } + let sumTabWidths = 60; + let triggerLeft = 20; + let visibleTabsCount = 0; + this.tabWidths.forEach((tabWidth)=>{ + sumTabWidths += tabWidth; + if (sumTabWidths < width) { + triggerLeft += tabWidth; + visibleTabsCount++; + } + }); + this.visibleTabsCount = visibleTabsCount; + this.triggerLeft = triggerLeft; + this._lastMeasuredWidth = width; + }, + selectTab (el, initial = false) { + this.store.activeTab = this._getRef(el); + dropdown.hide(); + if (!initial) this.$dispatch("tabs:change", { + tabs: this + }); + }, + isSelected (el) { + return this.store.activeTab === this._getRef(el); + }, + isDisabled (el) { + return el.getAttribute("data-disabled") == "true"; + }, + hasHiddenTabs () { + return this.visibleTabsCount < this.tabs.length; + }, + // protected + _lastMeasuredWidth: 0, + _getRef (el) { + return el ? el.getAttribute("x-ref").replace("dropdown-", "") : null; + } + }; +} + + +$d9c79682b7f8e136$exports = { "button": $cbd28b10fa9798c7$exports, "code": $99486586f6691564$exports, - "copy_button": $47a1c62621be0c54$exports, "dimensions_display": $e398acaded942bbe$exports, + "copy_button": $47a1c62621be0c54$exports, "embed_code_dropdown": $216ef7001f59f21d$exports, "filter": $e9904a14dabf652d$exports, "nav": $d92d9d5253f84566$exports, "split_layout": $506dabb2bf255b38$exports, "tab_panels": $a87dacf5139b5e2f$exports, - "tabs": $0db07828cadc68e0$exports, - "viewport": $6d64716f0b34fdf4$exports + "viewport": $6d64716f0b34fdf4$exports, + "tabs": $0db07828cadc68e0$exports }; -var $234342a379d83f20$exports = {}; +var $f3e1e32f4a1bd6da$exports = {}; var $6a9b69d9cc7f810f$exports = {}; $parcel$defineInteropFlag($6a9b69d9cc7f810f$exports); $parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039); @@ -13350,42 +13350,10 @@ } }; } -var $1a7a7298eec5b755$exports = {}; - -$parcel$defineInteropFlag($1a7a7298eec5b755$exports); - -$parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039); - -function $1a7a7298eec5b755$export$2e2bcd8739ae039() { - return { - narrow: false, - init () { - (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{ - this.narrow = width < 500; - }); - } - }; -} - - -var $e773f8ef556b41ff$exports = {}; - -$parcel$defineInteropFlag($e773f8ef556b41ff$exports); - -$parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039); -function $e773f8ef556b41ff$export$2e2bcd8739ae039() { - return { - get isNarrowLayout () { - return this.narrow || false; - } - }; -} - - var $9b24cbeb3a465447$exports = {}; $parcel$defineInteropFlag($9b24cbeb3a465447$exports); $parcel$export($9b24cbeb3a465447$exports, "default", () => $9b24cbeb3a465447$export$2e2bcd8739ae039); @@ -13439,23 +13407,55 @@ } }; } -$234342a379d83f20$exports = { +var $1a7a7298eec5b755$exports = {}; + +$parcel$defineInteropFlag($1a7a7298eec5b755$exports); + +$parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039); + +function $1a7a7298eec5b755$export$2e2bcd8739ae039() { + return { + narrow: false, + init () { + (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{ + this.narrow = width < 500; + }); + } + }; +} + + +var $e773f8ef556b41ff$exports = {}; + +$parcel$defineInteropFlag($e773f8ef556b41ff$exports); + +$parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039); +function $e773f8ef556b41ff$export$2e2bcd8739ae039() { + return { + get isNarrowLayout () { + return this.narrow || false; + } + }; +} + + +$f3e1e32f4a1bd6da$exports = { "display_options": { "field": $6a9b69d9cc7f810f$exports }, "embed": { "inspector": $c299e36fa9e271bc$exports }, + "nav": { + "item": $9b24cbeb3a465447$exports + }, "params": { "editor": $1a7a7298eec5b755$exports, "field": $e773f8ef556b41ff$exports - }, - "nav": { - "item": $9b24cbeb3a465447$exports } }; var $338da9a25bc5c332$exports = {}; @@ -13519,11 +13519,11 @@ prefix: $22969b543678f572$var$prefix })); // Components (0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $5792afa4170ed552$export$2e2bcd8739ae039)); [ - $52abf2efa3492135$exports, - $234342a379d83f20$exports, + $d9c79682b7f8e136$exports, + $f3e1e32f4a1bd6da$exports, $338da9a25bc5c332$exports ].forEach((scripts)=>{ const components = (0, $12b7aa006b8a97e1$export$4e811121b221213b)(scripts); Object.keys(components).forEach((name)=>{ (0, $caa9439642c6336c$export$2e2bcd8739ae039).data(`${name}Component`, components[name]);