lookbook 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -7815,7 +7815,7 @@ function $12b7aa006b8a97e1$var$toCamel(s) {
7815
7815
  }
7816
7816
 
7817
7817
 
7818
- var $27875b8c7b5f0522$exports = {};
7818
+ var $db546f7a367d8ec7$exports = {};
7819
7819
  var $cbd28b10fa9798c7$exports = {};
7820
7820
 
7821
7821
  $parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
@@ -11346,6 +11346,16 @@ function $cbd28b10fa9798c7$export$2e2bcd8739ae039() {
11346
11346
  }
11347
11347
 
11348
11348
 
11349
+ var $99486586f6691564$exports = {};
11350
+
11351
+ $parcel$defineInteropFlag($99486586f6691564$exports);
11352
+
11353
+ $parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
11354
+ function $99486586f6691564$export$2e2bcd8739ae039() {
11355
+ return {};
11356
+ }
11357
+
11358
+
11349
11359
  var $47a1c62621be0c54$exports = {};
11350
11360
 
11351
11361
  $parcel$defineInteropFlag($47a1c62621be0c54$exports);
@@ -11440,32 +11450,7 @@ var $216ef7001f59f21d$exports = {};
11440
11450
  $parcel$defineInteropFlag($216ef7001f59f21d$exports);
11441
11451
 
11442
11452
  $parcel$export($216ef7001f59f21d$exports, "default", () => $216ef7001f59f21d$export$2e2bcd8739ae039);
11443
-
11444
11453
  function $216ef7001f59f21d$export$2e2bcd8739ae039() {
11445
- let copyTimeout = null;
11446
- return {
11447
- copied: false,
11448
- copyEmbedCode () {
11449
- this.$nextTick(async ()=>{
11450
- const content = (0, $fb8f79f7dd40b68f$export$6cb344a21ca18aec)(this.$refs.copyTarget.innerHTML.trim());
11451
- await window.navigator.clipboard.writeText(content);
11452
- this.copied = true;
11453
- if (copyTimeout) clearTimeout(copyTimeout);
11454
- copyTimeout = setTimeout(()=>{
11455
- this.copied = false;
11456
- }, 2000);
11457
- });
11458
- }
11459
- };
11460
- }
11461
-
11462
-
11463
- var $99486586f6691564$exports = {};
11464
-
11465
- $parcel$defineInteropFlag($99486586f6691564$exports);
11466
-
11467
- $parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
11468
- function $99486586f6691564$export$2e2bcd8739ae039() {
11469
11454
  return {};
11470
11455
  }
11471
11456
 
@@ -11539,6 +11524,126 @@ function $d92d9d5253f84566$export$2e2bcd8739ae039(store) {
11539
11524
  }
11540
11525
 
11541
11526
 
11527
+ var $a87dacf5139b5e2f$exports = {};
11528
+
11529
+ $parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
11530
+
11531
+ $parcel$export($a87dacf5139b5e2f$exports, "default", () => $a87dacf5139b5e2f$export$2e2bcd8739ae039);
11532
+ function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
11533
+ return {
11534
+ get store () {
11535
+ return store || this;
11536
+ },
11537
+ get id () {
11538
+ return this.$root.id;
11539
+ },
11540
+ get panels () {
11541
+ return Array.from(this.$refs.panels.children);
11542
+ },
11543
+ isActive (el) {
11544
+ return this.store.activeTab === this._getRef(el);
11545
+ },
11546
+ // protected
11547
+ _getRef (el) {
11548
+ return el.getAttribute("x-ref");
11549
+ }
11550
+ };
11551
+ }
11552
+
11553
+
11554
+ var $0db07828cadc68e0$exports = {};
11555
+
11556
+ $parcel$defineInteropFlag($0db07828cadc68e0$exports);
11557
+
11558
+ $parcel$export($0db07828cadc68e0$exports, "default", () => $0db07828cadc68e0$export$2e2bcd8739ae039);
11559
+
11560
+
11561
+
11562
+
11563
+ function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
11564
+ const initial = store ? store.activeTab : null;
11565
+ let dropdown = null;
11566
+ return {
11567
+ visibleTabsCount: 0,
11568
+ triggerLeft: 0,
11569
+ get store () {
11570
+ return store || this;
11571
+ },
11572
+ get tabs () {
11573
+ return this.$refs.tabs ? Array.from(this.$refs.tabs.children) : [];
11574
+ },
11575
+ get dropdownTabs () {
11576
+ return Array.from(this.$refs.tabsDropdown ? this.$refs.tabsDropdown.children : []);
11577
+ },
11578
+ get tabWidths () {
11579
+ return this.tabs.map((tab)=>(0, $490552754c23ef6f$export$bdf7e699b242f476)(tab, {
11580
+ includeMargins: true
11581
+ }).width);
11582
+ },
11583
+ init () {
11584
+ this.$nextTick(()=>{
11585
+ if (this.$root.parentElement.offsetWidth === this.$root.offsetWidth) this.visibleTabsCount = this.tabs.length;
11586
+ dropdown = (0, $789b7d27a7c715a6$export$2e2bcd8739ae039)(this.$refs.dropdownTrigger, {
11587
+ content: this.$refs.tabsDropdown,
11588
+ theme: "menu",
11589
+ interactive: true,
11590
+ trigger: "click",
11591
+ placement: "bottom",
11592
+ appendTo: this.$root
11593
+ });
11594
+ const initialTab = initial ? this.tabs.find((t)=>this._getRef(t) === initial) : this.tabs[0];
11595
+ this.selectTab(initialTab || this.tabs[0], true);
11596
+ this.parentObserver = (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$root.parentElement, (0, $c5d017602d25d050$export$61fc7d43ac8f84b0)(10, this.handleResize.bind(this)));
11597
+ this.$watch("visibleTabsCount", (value)=>{
11598
+ this.debug(`'#${this.$root.id}' visible tabs count:`, value);
11599
+ });
11600
+ });
11601
+ },
11602
+ handleResize ({ width: width }) {
11603
+ if (width === this._lastMeasuredWidth) return;
11604
+ if (width === this.$root.offsetWidth) {
11605
+ this.visibleTabsCount = this.tabs.length;
11606
+ return;
11607
+ }
11608
+ let sumTabWidths = 60;
11609
+ let triggerLeft = 20;
11610
+ let visibleTabsCount = 0;
11611
+ this.tabWidths.forEach((tabWidth)=>{
11612
+ sumTabWidths += tabWidth;
11613
+ if (sumTabWidths < width) {
11614
+ triggerLeft += tabWidth;
11615
+ visibleTabsCount++;
11616
+ }
11617
+ });
11618
+ this.visibleTabsCount = visibleTabsCount;
11619
+ this.triggerLeft = triggerLeft;
11620
+ this._lastMeasuredWidth = width;
11621
+ },
11622
+ selectTab (el, initial = false) {
11623
+ this.store.activeTab = this._getRef(el);
11624
+ dropdown.hide();
11625
+ if (!initial) this.$dispatch("tabs:change", {
11626
+ tabs: this
11627
+ });
11628
+ },
11629
+ isSelected (el) {
11630
+ return this.store.activeTab === this._getRef(el);
11631
+ },
11632
+ isDisabled (el) {
11633
+ return el.getAttribute("data-disabled") == "true";
11634
+ },
11635
+ hasHiddenTabs () {
11636
+ return this.visibleTabsCount < this.tabs.length;
11637
+ },
11638
+ // protected
11639
+ _lastMeasuredWidth: 0,
11640
+ _getRef (el) {
11641
+ return el ? el.getAttribute("x-ref").replace("dropdown-", "") : null;
11642
+ }
11643
+ };
11644
+ }
11645
+
11646
+
11542
11647
  var $506dabb2bf255b38$exports = {};
11543
11648
 
11544
11649
  $parcel$defineInteropFlag($506dabb2bf255b38$exports);
@@ -12089,126 +12194,6 @@ function $506dabb2bf255b38$var$sizeSplits(sizes) {
12089
12194
  }
12090
12195
 
12091
12196
 
12092
- var $a87dacf5139b5e2f$exports = {};
12093
-
12094
- $parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
12095
-
12096
- $parcel$export($a87dacf5139b5e2f$exports, "default", () => $a87dacf5139b5e2f$export$2e2bcd8739ae039);
12097
- function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
12098
- return {
12099
- get store () {
12100
- return store || this;
12101
- },
12102
- get id () {
12103
- return this.$root.id;
12104
- },
12105
- get panels () {
12106
- return Array.from(this.$refs.panels.children);
12107
- },
12108
- isActive (el) {
12109
- return this.store.activeTab === this._getRef(el);
12110
- },
12111
- // protected
12112
- _getRef (el) {
12113
- return el.getAttribute("x-ref");
12114
- }
12115
- };
12116
- }
12117
-
12118
-
12119
- var $0db07828cadc68e0$exports = {};
12120
-
12121
- $parcel$defineInteropFlag($0db07828cadc68e0$exports);
12122
-
12123
- $parcel$export($0db07828cadc68e0$exports, "default", () => $0db07828cadc68e0$export$2e2bcd8739ae039);
12124
-
12125
-
12126
-
12127
-
12128
- function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
12129
- const initial = store ? store.activeTab : null;
12130
- let dropdown = null;
12131
- return {
12132
- visibleTabsCount: 0,
12133
- triggerLeft: 0,
12134
- get store () {
12135
- return store || this;
12136
- },
12137
- get tabs () {
12138
- return this.$refs.tabs ? Array.from(this.$refs.tabs.children) : [];
12139
- },
12140
- get dropdownTabs () {
12141
- return Array.from(this.$refs.tabsDropdown ? this.$refs.tabsDropdown.children : []);
12142
- },
12143
- get tabWidths () {
12144
- return this.tabs.map((tab)=>(0, $490552754c23ef6f$export$bdf7e699b242f476)(tab, {
12145
- includeMargins: true
12146
- }).width);
12147
- },
12148
- init () {
12149
- this.$nextTick(()=>{
12150
- if (this.$root.parentElement.offsetWidth === this.$root.offsetWidth) this.visibleTabsCount = this.tabs.length;
12151
- dropdown = (0, $789b7d27a7c715a6$export$2e2bcd8739ae039)(this.$refs.dropdownTrigger, {
12152
- content: this.$refs.tabsDropdown,
12153
- theme: "menu",
12154
- interactive: true,
12155
- trigger: "click",
12156
- placement: "bottom",
12157
- appendTo: this.$root
12158
- });
12159
- const initialTab = initial ? this.tabs.find((t)=>this._getRef(t) === initial) : this.tabs[0];
12160
- this.selectTab(initialTab || this.tabs[0], true);
12161
- this.parentObserver = (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$root.parentElement, (0, $c5d017602d25d050$export$61fc7d43ac8f84b0)(10, this.handleResize.bind(this)));
12162
- this.$watch("visibleTabsCount", (value)=>{
12163
- this.debug(`'#${this.$root.id}' visible tabs count:`, value);
12164
- });
12165
- });
12166
- },
12167
- handleResize ({ width: width }) {
12168
- if (width === this._lastMeasuredWidth) return;
12169
- if (width === this.$root.offsetWidth) {
12170
- this.visibleTabsCount = this.tabs.length;
12171
- return;
12172
- }
12173
- let sumTabWidths = 60;
12174
- let triggerLeft = 20;
12175
- let visibleTabsCount = 0;
12176
- this.tabWidths.forEach((tabWidth)=>{
12177
- sumTabWidths += tabWidth;
12178
- if (sumTabWidths < width) {
12179
- triggerLeft += tabWidth;
12180
- visibleTabsCount++;
12181
- }
12182
- });
12183
- this.visibleTabsCount = visibleTabsCount;
12184
- this.triggerLeft = triggerLeft;
12185
- this._lastMeasuredWidth = width;
12186
- },
12187
- selectTab (el, initial = false) {
12188
- this.store.activeTab = this._getRef(el);
12189
- dropdown.hide();
12190
- if (!initial) this.$dispatch("tabs:change", {
12191
- tabs: this
12192
- });
12193
- },
12194
- isSelected (el) {
12195
- return this.store.activeTab === this._getRef(el);
12196
- },
12197
- isDisabled (el) {
12198
- return el.getAttribute("data-disabled") == "true";
12199
- },
12200
- hasHiddenTabs () {
12201
- return this.visibleTabsCount < this.tabs.length;
12202
- },
12203
- // protected
12204
- _lastMeasuredWidth: 0,
12205
- _getRef (el) {
12206
- return el ? el.getAttribute("x-ref").replace("dropdown-", "") : null;
12207
- }
12208
- };
12209
- }
12210
-
12211
-
12212
12197
  var $6d64716f0b34fdf4$exports = {};
12213
12198
 
12214
12199
  $parcel$defineInteropFlag($6d64716f0b34fdf4$exports);
@@ -12336,22 +12321,22 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
12336
12321
  }
12337
12322
 
12338
12323
 
12339
- $27875b8c7b5f0522$exports = {
12324
+ $db546f7a367d8ec7$exports = {
12340
12325
  "button": $cbd28b10fa9798c7$exports,
12326
+ "code": $99486586f6691564$exports,
12341
12327
  "copy_button": $47a1c62621be0c54$exports,
12342
12328
  "dimensions_display": $e398acaded942bbe$exports,
12343
12329
  "embed_code_dropdown": $216ef7001f59f21d$exports,
12344
- "code": $99486586f6691564$exports,
12345
12330
  "filter": $e9904a14dabf652d$exports,
12346
12331
  "nav": $d92d9d5253f84566$exports,
12347
- "split_layout": $506dabb2bf255b38$exports,
12348
12332
  "tab_panels": $a87dacf5139b5e2f$exports,
12349
12333
  "tabs": $0db07828cadc68e0$exports,
12334
+ "split_layout": $506dabb2bf255b38$exports,
12350
12335
  "viewport": $6d64716f0b34fdf4$exports
12351
12336
  };
12352
12337
 
12353
12338
 
12354
- var $f3e1e32f4a1bd6da$exports = {};
12339
+ var $234342a379d83f20$exports = {};
12355
12340
  var $6a9b69d9cc7f810f$exports = {};
12356
12341
 
12357
12342
  $parcel$defineInteropFlag($6a9b69d9cc7f810f$exports);
@@ -13343,7 +13328,17 @@ function $c299e36fa9e271bc$export$2e2bcd8739ae039(id, embedStore) {
13343
13328
  this.navigateTo(`${newTargetPath}${window.location.search}`);
13344
13329
  },
13345
13330
  onResized ({ height: height }) {
13346
- if (height) this.viewportHeight = height;
13331
+ if (height) {
13332
+ this.viewportHeight = height;
13333
+ // Notify parent window of height resize so the parent window can implement
13334
+ // its own iframe resize strategy if not using the Lookbook JS script.
13335
+ // Uses Embedly-compatible postMessage format: https://docs.embed.ly/reference/provider-height-resizing
13336
+ window.parent.postMessage(JSON.stringify({
13337
+ src: window.location.toString(),
13338
+ context: "iframe.resize",
13339
+ height: height
13340
+ }), "*");
13341
+ }
13347
13342
  },
13348
13343
  resizeIframe () {
13349
13344
  this.iframe.iFrameResizer.resize();
@@ -13352,6 +13347,38 @@ function $c299e36fa9e271bc$export$2e2bcd8739ae039(id, embedStore) {
13352
13347
  }
13353
13348
 
13354
13349
 
13350
+ var $1a7a7298eec5b755$exports = {};
13351
+
13352
+ $parcel$defineInteropFlag($1a7a7298eec5b755$exports);
13353
+
13354
+ $parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039);
13355
+
13356
+ function $1a7a7298eec5b755$export$2e2bcd8739ae039() {
13357
+ return {
13358
+ narrow: false,
13359
+ init () {
13360
+ (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{
13361
+ this.narrow = width < 500;
13362
+ });
13363
+ }
13364
+ };
13365
+ }
13366
+
13367
+
13368
+ var $e773f8ef556b41ff$exports = {};
13369
+
13370
+ $parcel$defineInteropFlag($e773f8ef556b41ff$exports);
13371
+
13372
+ $parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039);
13373
+ function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
13374
+ return {
13375
+ get isNarrowLayout () {
13376
+ return this.narrow || false;
13377
+ }
13378
+ };
13379
+ }
13380
+
13381
+
13355
13382
  var $9b24cbeb3a465447$exports = {};
13356
13383
 
13357
13384
  $parcel$defineInteropFlag($9b24cbeb3a465447$exports);
@@ -13409,51 +13436,19 @@ function $9b24cbeb3a465447$export$2e2bcd8739ae039({ id: id , matchers: matchers
13409
13436
  }
13410
13437
 
13411
13438
 
13412
- var $1a7a7298eec5b755$exports = {};
13413
-
13414
- $parcel$defineInteropFlag($1a7a7298eec5b755$exports);
13415
-
13416
- $parcel$export($1a7a7298eec5b755$exports, "default", () => $1a7a7298eec5b755$export$2e2bcd8739ae039);
13417
-
13418
- function $1a7a7298eec5b755$export$2e2bcd8739ae039() {
13419
- return {
13420
- narrow: false,
13421
- init () {
13422
- (0, $7ecd1fc3a6b35e5c$export$a2214cc2adb2dc44)(this.$el, ({ width: width })=>{
13423
- this.narrow = width < 500;
13424
- });
13425
- }
13426
- };
13427
- }
13428
-
13429
-
13430
- var $e773f8ef556b41ff$exports = {};
13431
-
13432
- $parcel$defineInteropFlag($e773f8ef556b41ff$exports);
13433
-
13434
- $parcel$export($e773f8ef556b41ff$exports, "default", () => $e773f8ef556b41ff$export$2e2bcd8739ae039);
13435
- function $e773f8ef556b41ff$export$2e2bcd8739ae039() {
13436
- return {
13437
- get isNarrowLayout () {
13438
- return this.narrow || false;
13439
- }
13440
- };
13441
- }
13442
-
13443
-
13444
- $f3e1e32f4a1bd6da$exports = {
13439
+ $234342a379d83f20$exports = {
13445
13440
  "display_options": {
13446
13441
  "field": $6a9b69d9cc7f810f$exports
13447
13442
  },
13448
13443
  "embed": {
13449
13444
  "inspector": $c299e36fa9e271bc$exports
13450
13445
  },
13451
- "nav": {
13452
- "item": $9b24cbeb3a465447$exports
13453
- },
13454
13446
  "params": {
13455
13447
  "editor": $1a7a7298eec5b755$exports,
13456
13448
  "field": $e773f8ef556b41ff$exports
13449
+ },
13450
+ "nav": {
13451
+ "item": $9b24cbeb3a465447$exports
13457
13452
  }
13458
13453
  };
13459
13454
 
@@ -13521,8 +13516,8 @@ const $22969b543678f572$var$prefix = window.APP_NAME;
13521
13516
  // Components
13522
13517
  (0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $5792afa4170ed552$export$2e2bcd8739ae039));
13523
13518
  [
13524
- $27875b8c7b5f0522$exports,
13525
- $f3e1e32f4a1bd6da$exports,
13519
+ $db546f7a367d8ec7$exports,
13520
+ $234342a379d83f20$exports,
13526
13521
  $338da9a25bc5c332$exports
13527
13522
  ].forEach((scripts)=>{
13528
13523
  const components = (0, $12b7aa006b8a97e1$export$4e811121b221213b)(scripts);