public/lookbook-assets/js/index.js in lookbook-2.0.0.beta.9 vs public/lookbook-assets/js/index.js in lookbook-2.0.0.rc.1
- old
+ new
@@ -7813,11 +7813,11 @@
return $1.toUpperCase().replace("-", "").replace("_", "");
});
}
-var $d9c79682b7f8e136$exports = {};
+var $52abf2efa3492135$exports = {};
var $cbd28b10fa9798c7$exports = {};
$parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
$parcel$export($cbd28b10fa9798c7$exports, "default", () => $cbd28b10fa9798c7$export$2e2bcd8739ae039);
@@ -11354,43 +11354,10 @@
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);
@@ -11443,10 +11410,43 @@
}
};
}
+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,10 +12114,103 @@
}
};
}
+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);
@@ -12241,119 +12334,26 @@
}
};
}
-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 = {
+$52abf2efa3492135$exports = {
"button": $cbd28b10fa9798c7$exports,
"code": $99486586f6691564$exports,
- "dimensions_display": $e398acaded942bbe$exports,
"copy_button": $47a1c62621be0c54$exports,
+ "dimensions_display": $e398acaded942bbe$exports,
"embed_code_dropdown": $216ef7001f59f21d$exports,
"filter": $e9904a14dabf652d$exports,
"nav": $d92d9d5253f84566$exports,
"split_layout": $506dabb2bf255b38$exports,
"tab_panels": $a87dacf5139b5e2f$exports,
- "viewport": $6d64716f0b34fdf4$exports,
- "tabs": $0db07828cadc68e0$exports
+ "tabs": $0db07828cadc68e0$exports,
+ "viewport": $6d64716f0b34fdf4$exports
};
-var $f3e1e32f4a1bd6da$exports = {};
+var $3b154185c6273749$exports = {};
var $6a9b69d9cc7f810f$exports = {};
$parcel$defineInteropFlag($6a9b69d9cc7f810f$exports);
$parcel$export($6a9b69d9cc7f810f$exports, "default", () => $6a9b69d9cc7f810f$export$2e2bcd8739ae039);
@@ -13407,10 +13407,24 @@
}
};
}
+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 $1a7a7298eec5b755$exports = {};
$parcel$defineInteropFlag($1a7a7298eec5b755$exports);
$parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039);
@@ -13425,37 +13439,23 @@
}
};
}
-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 = {
+$3b154185c6273749$exports = {
"display_options": {
"field": $6a9b69d9cc7f810f$exports
},
"embed": {
"inspector": $c299e36fa9e271bc$exports
},
"nav": {
"item": $9b24cbeb3a465447$exports
},
"params": {
- "editor": $1a7a7298eec5b755$exports,
- "field": $e773f8ef556b41ff$exports
+ "field": $e773f8ef556b41ff$exports,
+ "editor": $1a7a7298eec5b755$exports
}
};
var $338da9a25bc5c332$exports = {};
@@ -13519,11 +13519,11 @@
prefix: $22969b543678f572$var$prefix
}));
// Components
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $5792afa4170ed552$export$2e2bcd8739ae039));
[
- $d9c79682b7f8e136$exports,
- $f3e1e32f4a1bd6da$exports,
+ $52abf2efa3492135$exports,
+ $3b154185c6273749$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]);