lookbook 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2985b373024d4f48a503252274dc0606cfbb062ea2d229163c62980f9ff492b7
4
- data.tar.gz: 60352ee8d3599fe86b8fe7dc068f391913ed4727bf2b500f605fe8b49ad7dbc0
3
+ metadata.gz: 7ae06feed05c93167f7523cb9c1fdbb92c64798dc157dbf09ccb0ade667b046c
4
+ data.tar.gz: c75a7391326d4683213b092436d4d60f2e48f6bcedd887c8e35ccba734662e1c
5
5
  SHA512:
6
- metadata.gz: f962058591eba3fd20629d4cff57515f4931b754091af6112ddcca16a911945640dbc556031edcfb34b780aa7f0690c40d32a811077ff0bb91c3f42f143ff8e2
7
- data.tar.gz: b5d4d2d49675b4389bc1bb4814559eaf01e4445e0c2623a796a8a82d27ccdfeacd742837e3022c027fd2d5b22bb02a99b0720a321f6b9151145fd3f16266cbd4
6
+ metadata.gz: 5aba929ec53db1f610de4c4d0cac1efa5c5e1461e164ae84eb28b93aad3aefaef7b3c5266757e82f92abf3e345a3653f078d42392b3fdb5660cfb62ee77116d8
7
+ data.tar.gz: 42ca7a2a131ec4c4fec4d17ffb9bcccf5ca840684e238531c0629985ad7dc1e2b093d77ac2601b308f21e09b2ad6a4ad92a1acd8dfd2b142c76b3ed320c2f6d1
@@ -155,7 +155,7 @@ module Lookbook
155
155
  def websocket
156
156
  config = Lookbook.config
157
157
  return @websocket unless @websocket.nil?
158
- return unless config.auto_refresh == true && !Rails.env.test?
158
+ return unless config.auto_refresh == true && config.listen == true && !Rails.env.test?
159
159
  Lookbook.logger.info "Initializing websocket"
160
160
 
161
161
  cable = ActionCable::Server::Configuration.new
@@ -1,3 +1,3 @@
1
1
  module Lookbook
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
@@ -7755,7 +7755,7 @@ function $5439cede634b2921$var$toCamel(s) {
7755
7755
  }
7756
7756
 
7757
7757
 
7758
- var $4dba57edf150b96d$exports = {};
7758
+ var $1c9a2bdb939ee07b$exports = {};
7759
7759
  var $cbd28b10fa9798c7$exports = {};
7760
7760
 
7761
7761
  $parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
@@ -13018,98 +13018,6 @@ function $506dabb2bf255b38$var$sizeSplits(sizes) {
13018
13018
  }
13019
13019
 
13020
13020
 
13021
- var $0db07828cadc68e0$exports = {};
13022
-
13023
- $parcel$defineInteropFlag($0db07828cadc68e0$exports);
13024
-
13025
- $parcel$export($0db07828cadc68e0$exports, "default", () => $0db07828cadc68e0$export$2e2bcd8739ae039);
13026
-
13027
-
13028
-
13029
-
13030
- function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
13031
- const initial1 = store ? store.activeTab : null;
13032
- let dropdown = null;
13033
- return {
13034
- visibleTabsCount: 0,
13035
- triggerLeft: 0,
13036
- get store () {
13037
- return store || this;
13038
- },
13039
- get tabs () {
13040
- return this.$refs.tabs ? Array.from(this.$refs.tabs.children) : [];
13041
- },
13042
- get dropdownTabs () {
13043
- return Array.from(this.$refs.tabsDropdown ? this.$refs.tabsDropdown.children : []);
13044
- },
13045
- get tabWidths () {
13046
- return this.tabs.map((tab)=>(0, $e263283f97229955$export$bdf7e699b242f476)(tab, {
13047
- includeMargins: true
13048
- }).width);
13049
- },
13050
- init () {
13051
- this.$nextTick(()=>{
13052
- dropdown = (0, $d6f449055c23f07a$export$2e2bcd8739ae039)(this.$refs.dropdownTrigger, {
13053
- content: this.$refs.tabsDropdown,
13054
- theme: "menu",
13055
- interactive: true,
13056
- trigger: "click",
13057
- placement: "bottom",
13058
- appendTo: this.$root
13059
- });
13060
- const initialTab = initial1 ? this.tabs.find((t)=>this._getRef(t) === initial1) : this.tabs[0];
13061
- this.selectTab(initialTab, true);
13062
- this.parentObserver = (0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.$root.parentElement, (0, $c5d017602d25d050$export$61fc7d43ac8f84b0)(10, this.handleResize.bind(this)));
13063
- this.$watch("visibleTabsCount", (value)=>{
13064
- this.debug(`'#${this.$root.id}' visible tabs count:`, value);
13065
- });
13066
- });
13067
- },
13068
- handleResize ({ width: width }) {
13069
- if (width === this._lastMeasuredWidth) return;
13070
- if (width === this.$root.offsetWidth) {
13071
- this.visibleTabsCount = this.tabs.length;
13072
- return;
13073
- }
13074
- let sumTabWidths = 60;
13075
- let triggerLeft = 20;
13076
- let visibleTabsCount = 0;
13077
- this.tabWidths.forEach((tabWidth)=>{
13078
- sumTabWidths += tabWidth;
13079
- if (sumTabWidths < width) {
13080
- triggerLeft += tabWidth;
13081
- visibleTabsCount++;
13082
- }
13083
- });
13084
- this.visibleTabsCount = visibleTabsCount;
13085
- this.triggerLeft = triggerLeft;
13086
- this._lastMeasuredWidth = width;
13087
- },
13088
- selectTab (el, initial = false) {
13089
- this.store.activeTab = this._getRef(el);
13090
- dropdown.hide();
13091
- if (!initial) this.$dispatch("tabs:change", {
13092
- tabs: this
13093
- });
13094
- },
13095
- isSelected (el) {
13096
- return this.store.activeTab === this._getRef(el);
13097
- },
13098
- isDisabled (el) {
13099
- return el.getAttribute("data-disabled") == "true";
13100
- },
13101
- hasHiddenTabs () {
13102
- return this.visibleTabsCount < this.tabs.length;
13103
- },
13104
- // protected
13105
- _lastMeasuredWidth: 0,
13106
- _getRef (el) {
13107
- return el ? el.getAttribute("x-ref").replace("dropdown-", "") : null;
13108
- }
13109
- };
13110
- }
13111
-
13112
-
13113
13021
  var $a87dacf5139b5e2f$exports = {};
13114
13022
 
13115
13023
  $parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
@@ -13264,7 +13172,99 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
13264
13172
  }
13265
13173
 
13266
13174
 
13267
- $4dba57edf150b96d$exports = {
13175
+ var $0db07828cadc68e0$exports = {};
13176
+
13177
+ $parcel$defineInteropFlag($0db07828cadc68e0$exports);
13178
+
13179
+ $parcel$export($0db07828cadc68e0$exports, "default", () => $0db07828cadc68e0$export$2e2bcd8739ae039);
13180
+
13181
+
13182
+
13183
+
13184
+ function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
13185
+ const initial1 = store ? store.activeTab : null;
13186
+ let dropdown = null;
13187
+ return {
13188
+ visibleTabsCount: 0,
13189
+ triggerLeft: 0,
13190
+ get store () {
13191
+ return store || this;
13192
+ },
13193
+ get tabs () {
13194
+ return this.$refs.tabs ? Array.from(this.$refs.tabs.children) : [];
13195
+ },
13196
+ get dropdownTabs () {
13197
+ return Array.from(this.$refs.tabsDropdown ? this.$refs.tabsDropdown.children : []);
13198
+ },
13199
+ get tabWidths () {
13200
+ return this.tabs.map((tab)=>(0, $e263283f97229955$export$bdf7e699b242f476)(tab, {
13201
+ includeMargins: true
13202
+ }).width);
13203
+ },
13204
+ init () {
13205
+ this.$nextTick(()=>{
13206
+ dropdown = (0, $d6f449055c23f07a$export$2e2bcd8739ae039)(this.$refs.dropdownTrigger, {
13207
+ content: this.$refs.tabsDropdown,
13208
+ theme: "menu",
13209
+ interactive: true,
13210
+ trigger: "click",
13211
+ placement: "bottom",
13212
+ appendTo: this.$root
13213
+ });
13214
+ const initialTab = initial1 ? this.tabs.find((t)=>this._getRef(t) === initial1) : this.tabs[0];
13215
+ this.selectTab(initialTab, true);
13216
+ this.parentObserver = (0, $9930d46698775b42$export$a2214cc2adb2dc44)(this.$root.parentElement, (0, $c5d017602d25d050$export$61fc7d43ac8f84b0)(10, this.handleResize.bind(this)));
13217
+ this.$watch("visibleTabsCount", (value)=>{
13218
+ this.debug(`'#${this.$root.id}' visible tabs count:`, value);
13219
+ });
13220
+ });
13221
+ },
13222
+ handleResize ({ width: width }) {
13223
+ if (width === this._lastMeasuredWidth) return;
13224
+ if (width === this.$root.offsetWidth) {
13225
+ this.visibleTabsCount = this.tabs.length;
13226
+ return;
13227
+ }
13228
+ let sumTabWidths = 60;
13229
+ let triggerLeft = 20;
13230
+ let visibleTabsCount = 0;
13231
+ this.tabWidths.forEach((tabWidth)=>{
13232
+ sumTabWidths += tabWidth;
13233
+ if (sumTabWidths < width) {
13234
+ triggerLeft += tabWidth;
13235
+ visibleTabsCount++;
13236
+ }
13237
+ });
13238
+ this.visibleTabsCount = visibleTabsCount;
13239
+ this.triggerLeft = triggerLeft;
13240
+ this._lastMeasuredWidth = width;
13241
+ },
13242
+ selectTab (el, initial = false) {
13243
+ this.store.activeTab = this._getRef(el);
13244
+ dropdown.hide();
13245
+ if (!initial) this.$dispatch("tabs:change", {
13246
+ tabs: this
13247
+ });
13248
+ },
13249
+ isSelected (el) {
13250
+ return this.store.activeTab === this._getRef(el);
13251
+ },
13252
+ isDisabled (el) {
13253
+ return el.getAttribute("data-disabled") == "true";
13254
+ },
13255
+ hasHiddenTabs () {
13256
+ return this.visibleTabsCount < this.tabs.length;
13257
+ },
13258
+ // protected
13259
+ _lastMeasuredWidth: 0,
13260
+ _getRef (el) {
13261
+ return el ? el.getAttribute("x-ref").replace("dropdown-", "") : null;
13262
+ }
13263
+ };
13264
+ }
13265
+
13266
+
13267
+ $1c9a2bdb939ee07b$exports = {
13268
13268
  "button": $cbd28b10fa9798c7$exports,
13269
13269
  "code": $99486586f6691564$exports,
13270
13270
  "copy_button": $47a1c62621be0c54$exports,
@@ -13275,9 +13275,9 @@ $4dba57edf150b96d$exports = {
13275
13275
  "nav": $d92d9d5253f84566$exports,
13276
13276
  "params_editor": $b63b9c6d236b3f65$exports,
13277
13277
  "split_layout": $506dabb2bf255b38$exports,
13278
- "tabs": $0db07828cadc68e0$exports,
13279
13278
  "tab_panels": $a87dacf5139b5e2f$exports,
13280
- "viewport": $6d64716f0b34fdf4$exports
13279
+ "viewport": $6d64716f0b34fdf4$exports,
13280
+ "tabs": $0db07828cadc68e0$exports
13281
13281
  };
13282
13282
 
13283
13283
 
@@ -13421,7 +13421,7 @@ const $d73574cc5e9b9e72$var$prefix = window.APP_NAME;
13421
13421
  // Components
13422
13422
  (0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $d709d0f4027033b2$export$2e2bcd8739ae039));
13423
13423
  [
13424
- $4dba57edf150b96d$exports,
13424
+ $1c9a2bdb939ee07b$exports,
13425
13425
  $e4eab7529959b73b$exports,
13426
13426
  $4979d2d897a1c01f$exports
13427
13427
  ].forEach((scripts)=>{