@covet-pics/covet-pics-widget 0.122.3 → 0.122.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
8
8
  const index = require('./index-46d475ad.js');
9
9
  const utils$1 = require('./utils-83d39bda.js');
10
10
  const _commonjsHelpers = require('./_commonjsHelpers-0cd0785e.js');
11
+ const getters = require('./getters-c3c47af0.js');
11
12
  const a11y = require('./a11y-8e3f25c1.js');
12
13
  const slider = require('./slider-f13bbce4.js');
13
14
  require('./redux-toolkit.esm-ed0a74c1.js');
@@ -3530,7 +3531,7 @@ const CovetPicsGalleryGrid = class {
3530
3531
  this.appStore.subscribe(() => {
3531
3532
  this.appState = this.appStore.getState();
3532
3533
  this.isDesktopScreen = this.appState.size.isDesktopScreen;
3533
- this.isGridDisabled = this.appState.modals.uploadOpen || this.appState.modals.popupOpen;
3534
+ this.isGridDisabled = getters.isWidgetDisabled(this.appState);
3534
3535
  });
3535
3536
  }
3536
3537
  checkAndOpenPopup() {
@@ -3584,7 +3585,7 @@ const CovetPicsGalleryGrid = class {
3584
3585
  !this.isLoading &&
3585
3586
  this.loader.totalPages > this.loader.page &&
3586
3587
  this.items.length > 0) {
3587
- return (index.h("div", { class: 'load-more', style: this.setLoadMoreButtonVariables(), onClick: this.loadMoreClickedHandler }, index.h("button", { class: "btn-load-more " + this.loadMoreStyle, "aria-label": "load more", disabled: this.isGridDisabled, type: "button" }, index.h("span", { class: "text" }, this.loadMoreLabel), index.h("span", { class: "icon", "aria-hidden": "true" }, this.renderLoadMoreIcon()))));
3588
+ return (index.h("div", { class: 'load-more', style: this.setLoadMoreButtonVariables(), onClick: this.loadMoreClickedHandler }, index.h("button", { class: "btn-load-more " + this.loadMoreStyle, "aria-label": "load more", disabled: this.isGridDisabled, "aria-hidden": `${this.isGridDisabled}`, type: "button" }, index.h("span", { class: "text" }, this.loadMoreLabel), index.h("span", { class: "icon", "aria-hidden": "true" }, this.renderLoadMoreIcon()))));
3588
3589
  }
3589
3590
  }
3590
3591
  renderLoadingAnimation() {
@@ -3624,7 +3625,7 @@ const CovetPicsGalleryGrid = class {
3624
3625
  };
3625
3626
  }
3626
3627
  renderFilters() {
3627
- return (index.h("div", { class: "filters", style: this.getFilterCSSVariables() }, index.h("button", { tabindex: "0", class: "btn-filter", "data-reset-filters": "true", onClick: this.filterResetHandler, "aria-label": "reset filters", disabled: this.isGridDisabled, type: "reset" }, this.filtersResetLabel), Object.keys(this.filters).map((filter) => index.h("button", { tabindex: "0", "data-filter": filter, class: `btn-filter ${this.filters[filter] ? "selected" : ""}`, onClick: this.filterChangedHandler, "aria-label": `filter ${filter}`, disabled: this.isGridDisabled, type: "button" }, filter))));
3628
+ return (index.h("div", { class: "filters", style: this.getFilterCSSVariables(), "aria-hidden": `${this.isGridDisabled}` }, index.h("button", { tabindex: "0", class: "btn-filter", "data-reset-filters": "true", onClick: this.filterResetHandler, "aria-label": "reset filters", disabled: this.isGridDisabled, type: "reset" }, this.filtersResetLabel), Object.keys(this.filters).map((filter) => index.h("button", { tabindex: "0", "data-filter": filter, class: `btn-filter ${this.filters[filter] ? "selected" : ""}`, onClick: this.filterChangedHandler, "aria-label": `filter ${filter}`, disabled: this.isGridDisabled, type: "button" }, filter))));
3628
3629
  }
3629
3630
  itemImgAltTag(caption, idx, itemsLength, createdTime, layout) {
3630
3631
  return caption && caption.length > 0
@@ -4159,7 +4160,7 @@ const CovetPicsGallerySlider = class {
4159
4160
  this.appState = this.appStore.getState();
4160
4161
  this.isDesktopScreen = this.appState.size.isDesktopScreen;
4161
4162
  // use native tabindex instead of @state to prevent rerender component
4162
- this.setEnableControls(this.appState.modals.uploadOpen || this.appState.modals.popupOpen);
4163
+ this.setEnableControls(getters.isWidgetDisabled(this.appState));
4163
4164
  });
4164
4165
  }
4165
4166
  setEnableControls(disabled) {