@crystaldesign/widget-library 25.10.0-beta.8 → 25.10.0-rc.1

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.
@@ -5,7 +5,7 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
5
  import _regeneratorRuntime from '@babel/runtime/regenerator';
6
6
  import DivaUtils from '@crystaldesign/diva-utils';
7
7
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
8
- import { Navigation, Thumbs, Pagination } from 'swiper/modules';
8
+ import { Navigation, Thumbs, Pagination, Autoplay } from 'swiper/modules';
9
9
  import { Swiper, SwiperSlide } from 'swiper/react';
10
10
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
11
11
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -630,23 +630,55 @@ function useProductData(_ref) {
630
630
  }));
631
631
  return _getProductByDivaNrAndVariantId.apply(this, arguments);
632
632
  }
633
+ function getSimpleProductListByIds(_x9) {
634
+ return _getSimpleProductListByIds.apply(this, arguments);
635
+ }
636
+ function _getSimpleProductListByIds() {
637
+ _getSimpleProductListByIds = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(productIds) {
638
+ var products;
639
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
640
+ while (1) switch (_context8.prev = _context8.next) {
641
+ case 0:
642
+ _context8.next = 2;
643
+ return getOrFetch('simpleProductListByIds' + productIds.join(','), function () {
644
+ return handler.productHandler.apiGetProductByQuery([{
645
+ id: '_id',
646
+ op: 'in',
647
+ value: productIds.join(',').replaceAll('"', '')
648
+ }, {
649
+ id: 'baseProduct',
650
+ op: 'eq',
651
+ value: false
652
+ }], 1000, false);
653
+ });
654
+ case 2:
655
+ products = _context8.sent;
656
+ return _context8.abrupt("return", products);
657
+ case 4:
658
+ case "end":
659
+ return _context8.stop();
660
+ }
661
+ }, _callee8);
662
+ }));
663
+ return _getSimpleProductListByIds.apply(this, arguments);
664
+ }
633
665
  function setProductCache(key, data) {
634
666
  setCache(key, {
635
667
  data: data,
636
668
  timestamp: Date.now()
637
669
  });
638
670
  }
639
- function logSelectedProduct(_x9, _x10, _x11, _x12, _x13, _x14) {
671
+ function logSelectedProduct(_x10, _x11, _x12, _x13, _x14, _x15) {
640
672
  return _logSelectedProduct.apply(this, arguments);
641
673
  }
642
674
  function _logSelectedProduct() {
643
- _logSelectedProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(productId, widgetType, variantId, catalogName, catalogCodex, supplierId) {
675
+ _logSelectedProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(productId, widgetType, variantId, catalogName, catalogCodex, supplierId) {
644
676
  var event,
645
- _args8 = arguments;
646
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
647
- while (1) switch (_context8.prev = _context8.next) {
677
+ _args9 = arguments;
678
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
679
+ while (1) switch (_context9.prev = _context9.next) {
648
680
  case 0:
649
- event = _args8.length > 6 && _args8[6] !== undefined ? _args8[6] : 'onWidgetProductSelected';
681
+ event = _args9.length > 6 && _args9[6] !== undefined ? _args9[6] : 'onWidgetProductSelected';
650
682
  LOG.businessEvent(event, 'DivaWidget', "Product ".concat(productId, " selected in widget ").concat(widgetType), {
651
683
  productId: productId,
652
684
  variantId: variantId,
@@ -657,9 +689,9 @@ function useProductData(_ref) {
657
689
  });
658
690
  case 2:
659
691
  case "end":
660
- return _context8.stop();
692
+ return _context9.stop();
661
693
  }
662
- }, _callee8);
694
+ }, _callee9);
663
695
  }));
664
696
  return _logSelectedProduct.apply(this, arguments);
665
697
  }
@@ -671,7 +703,8 @@ function useProductData(_ref) {
671
703
  getProductByDivaNrAndVariantId: getProductByDivaNrAndVariantId,
672
704
  selectedProduct: selectedProduct,
673
705
  setSelectedProductId: setSelectedProductId,
674
- setProductCache: setProductCache
706
+ setProductCache: setProductCache,
707
+ getSimpleProductListByIds: getSimpleProductListByIds
675
708
  };
676
709
  }
677
710
 
@@ -780,7 +813,8 @@ function useGallery(_ref) {
780
813
  add2DImage = _ref$config.add2DImage,
781
814
  add3DImageAsFallback = _ref$config.add3DImageAsFallback,
782
815
  currentProductId = _ref.currentProductId,
783
- setCurrentProductId = _ref.setCurrentProductId;
816
+ setCurrentProductId = _ref.setCurrentProductId,
817
+ disableAnimation = _ref.disableAnimation;
784
818
  var _useDivaCore = useDivaCore(),
785
819
  baseSirvUrls = _useDivaCore.state.apiConfig.baseSirvUrls;
786
820
  var _useState = useState(null),
@@ -810,21 +844,33 @@ function useGallery(_ref) {
810
844
  useEffect(function () {
811
845
  var _medias$currentMediaI;
812
846
  if (currentProductId !== undefined && ((_medias$currentMediaI = medias[currentMediaIndex]) === null || _medias$currentMediaI === void 0 ? void 0 : _medias$currentMediaI.productId) !== currentProductId) {
813
- // Find the first media index that corresponds to this product index
814
847
  var mediaIndex = medias.findIndex(function (media) {
815
848
  return media.productId === currentProductId;
816
849
  });
817
- if (mediaIndex !== -1 && mediaIndex !== currentMediaIndex) {
818
- var _swiper$params;
850
+ if (mediaIndex !== -1 && mediaIndex !== currentMediaIndex && swiper) {
819
851
  setCurrentMediaIndex(mediaIndex);
820
- if (swiper !== null && swiper !== void 0 && (_swiper$params = swiper.params) !== null && _swiper$params !== void 0 && _swiper$params.loop) {
821
- swiper === null || swiper === void 0 || swiper.slideToLoop(mediaIndex, 0);
822
- } else {
823
- swiper === null || swiper === void 0 || swiper.slideTo(mediaIndex, 0);
852
+ if (swiper.realIndex !== mediaIndex) {
853
+ var _swiper$params;
854
+ if ((_swiper$params = swiper.params) !== null && _swiper$params !== void 0 && _swiper$params.loop) {
855
+ swiper.slideToLoop(mediaIndex, 0);
856
+ } else {
857
+ swiper.slideTo(mediaIndex, 0);
858
+ }
824
859
  }
825
860
  }
826
861
  }
827
- }, [currentProductId]);
862
+ }, [currentProductId, swiper]);
863
+ useEffect(function () {
864
+ if (!swiper || !swiper.params.autoplay) {
865
+ return;
866
+ }
867
+ if (swiper.autoplay.running && disableAnimation) {
868
+ swiper.autoplay.pause();
869
+ }
870
+ if (swiper.autoplay.paused && !disableAnimation) {
871
+ swiper.autoplay.start();
872
+ }
873
+ }, [swiper, disableAnimation]);
828
874
  var hasSirvMedia = useMemo(function () {
829
875
  var _loop = function _loop(i) {
830
876
  if (medias.find(function (m) {
@@ -848,22 +894,19 @@ function useGallery(_ref) {
848
894
  sirvLoaded = _useSirv.sirvLoaded;
849
895
  var onSlideChange = function onSlideChange(swiper) {
850
896
  if (swiper.el.classList.contains('gallery-main-nested-swiper')) return;
851
-
852
- // Ensure the onSlideChange logic is not executed during the initial setup of the Swiper instance.
897
+ var newMediaIndex = swiper.realIndex;
898
+ var media = medias[newMediaIndex];
853
899
  if (!swiperIsInitialized) {
854
900
  setSwiperIsInitialized(true);
855
901
  return;
856
902
  }
857
- var newMediaIndex = swiper.realIndex;
858
- var media = medias[newMediaIndex];
859
- setCurrentMediaIndex(newMediaIndex);
860
- if (setCurrentProductId && media) {
861
- setCurrentProductId(media.productId);
903
+ if (newMediaIndex !== currentMediaIndex) {
904
+ setCurrentMediaIndex(newMediaIndex);
905
+ if (setCurrentProductId && (media === null || media === void 0 ? void 0 : media.productId) !== currentProductId) {
906
+ setCurrentProductId(media.productId);
907
+ }
862
908
  }
863
909
  };
864
-
865
- // Get the current product index based on the current media index
866
- medias[currentMediaIndex];
867
910
  return {
868
911
  medias: medias,
869
912
  sirvLoaded: sirvLoaded,
@@ -930,8 +973,8 @@ function styleInject(css, ref) {
930
973
  }
931
974
 
932
975
  var divaAr = "diva-ar-NDv-7";
933
- var css_248z$2 = "/* This keeps child nodes hidden while the element loads */\n.diva-ar-NDv-7 :not(:defined) > * {\n display: none;\n}\n\nmodel-viewer.diva-ar-NDv-7 {\n overflow-x: hidden;\n}\n\n@keyframes circle-j3-4E {\n from {\n transform: translateX(-50%) rotate(0deg) translateX(50px) rotate(0deg);\n }\n to {\n transform: translateX(-50%) rotate(360deg) translateX(50px) rotate(-360deg);\n }\n}\n\n@keyframes elongate-eNbHO {\n from {\n transform: translateX(100px);\n }\n to {\n transform: translateX(-100px);\n }\n}\n\nmodel-viewer.diva-ar-NDv-7 > #ar-prompt {\n position: absolute;\n left: 50%;\n bottom: 175px;\n animation: elongate-eNbHO 2s infinite ease-in-out alternate;\n display: none;\n}\n\nmodel-viewer.diva-ar-NDv-7[ar-status='session-started'] > #ar-prompt {\n display: block;\n}\n\nmodel-viewer.diva-ar-NDv-7 > #ar-prompt > img {\n animation: circle-j3-4E 4s linear infinite;\n}\n\nmodel-viewer.diva-ar-NDv-7 > #ar-failure {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n bottom: 175px;\n display: none;\n}\n\nmodel-viewer.diva-ar-NDv-7[ar-tracking='not-tracking'] > #ar-failure {\n display: block;\n}\n";
934
- styleInject(css_248z$2);
976
+ var css_248z$3 = "/* This keeps child nodes hidden while the element loads */\n.diva-ar-NDv-7 :not(:defined) > * {\n display: none;\n}\n\nmodel-viewer.diva-ar-NDv-7 {\n overflow-x: hidden;\n}\n\n@keyframes circle-j3-4E {\n from {\n transform: translateX(-50%) rotate(0deg) translateX(50px) rotate(0deg);\n }\n to {\n transform: translateX(-50%) rotate(360deg) translateX(50px) rotate(-360deg);\n }\n}\n\n@keyframes elongate-eNbHO {\n from {\n transform: translateX(100px);\n }\n to {\n transform: translateX(-100px);\n }\n}\n\nmodel-viewer.diva-ar-NDv-7 > #ar-prompt {\n position: absolute;\n left: 50%;\n bottom: 175px;\n animation: elongate-eNbHO 2s infinite ease-in-out alternate;\n display: none;\n}\n\nmodel-viewer.diva-ar-NDv-7[ar-status='session-started'] > #ar-prompt {\n display: block;\n}\n\nmodel-viewer.diva-ar-NDv-7 > #ar-prompt > img {\n animation: circle-j3-4E 4s linear infinite;\n}\n\nmodel-viewer.diva-ar-NDv-7 > #ar-failure {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n bottom: 175px;\n display: none;\n}\n\nmodel-viewer.diva-ar-NDv-7[ar-tracking='not-tracking'] > #ar-failure {\n display: block;\n}\n";
977
+ styleInject(css_248z$3);
935
978
 
936
979
  var ArViewer = /*#__PURE__*/forwardRef(function (_ref, ref) {
937
980
  var media = _ref.media;
@@ -974,11 +1017,18 @@ var ArViewer = /*#__PURE__*/forwardRef(function (_ref, ref) {
974
1017
  });
975
1018
  });
976
1019
 
1020
+ var divaWidgetMediaitemContainer = "divaWidgetMediaitemContainer-K-Tal";
1021
+ var divaWidgetMediaitem = "divaWidgetMediaitem-Mt-0w";
1022
+ var divaWidgetMediaitemOverlay = "divaWidgetMediaitemOverlay-X6zee";
1023
+ var css_248z$2 = ".divaWidgetMediaitemContainer-K-Tal {\n position: relative;\n display: inline-block;\n cursor: pointer;\n}\n\n.divaWidgetMediaitem-Mt-0w {\n display: block;\n width: 100%;\n height: auto;\n}\n\n.divaWidgetMediaitemOverlay-X6zee {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(128, 128, 128, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.3s ease;\n pointer-events: none;\n}\n";
1024
+ styleInject(css_248z$2);
1025
+
977
1026
  var ImageItem = function ImageItem(_ref) {
978
1027
  var url = _ref.url,
979
- onClick = _ref.onClick,
1028
+ sirvProps = _ref.sirvProps,
1029
+ overlay = _ref.overlay,
980
1030
  className = _ref.className,
981
- sirvProps = _ref.sirvProps;
1031
+ onClick = _ref.onClick;
982
1032
  var _useState = useState(''),
983
1033
  _useState2 = _slicedToArray(_useState, 2),
984
1034
  loadedMediaUrl = _useState2[0],
@@ -1062,17 +1112,30 @@ var ImageItem = function ImageItem(_ref) {
1062
1112
 
1063
1113
  // Only render the image if we have a loaded URL
1064
1114
  if (loadedMediaUrl) {
1065
- return /*#__PURE__*/jsx("img", {
1066
- className: classNames('diva-widget-mediaitem', className),
1067
- src: loadedMediaUrl,
1068
- style: {
1069
- cursor: onClick ? 'pointer' : 'default'
1115
+ return /*#__PURE__*/jsxs("div", {
1116
+ className: classNames(divaWidgetMediaitemContainer, 'diva-widget-mediaitem-container'),
1117
+ onMouseEnter: function onMouseEnter(e) {
1118
+ if (overlay) {
1119
+ var overlayElement = e.currentTarget.querySelector('.diva-widget-mediaitem-overlay');
1120
+ if (overlayElement) overlayElement.style.opacity = '1';
1121
+ }
1070
1122
  },
1071
- onClick: onClick
1123
+ onMouseLeave: function onMouseLeave(e) {
1124
+ if (overlay) {
1125
+ var overlayElement = e.currentTarget.querySelector('.diva-widget-mediaitem-overlay');
1126
+ if (overlayElement) overlayElement.style.opacity = '0';
1127
+ }
1128
+ },
1129
+ children: [/*#__PURE__*/jsx("img", {
1130
+ className: classNames(divaWidgetMediaitem, 'diva-widget-mediaitem', className),
1131
+ src: loadedMediaUrl,
1132
+ onClick: !overlay ? onClick : undefined
1133
+ }), overlay && /*#__PURE__*/jsx("div", {
1134
+ className: classNames(divaWidgetMediaitemOverlay, 'diva-widget-mediaitem-overlay'),
1135
+ children: overlay
1136
+ })]
1072
1137
  });
1073
1138
  }
1074
-
1075
- // Fallback: render nothing if we don't have a loaded image
1076
1139
  return null;
1077
1140
  };
1078
1141
 
@@ -1084,7 +1147,8 @@ var MediaItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
1084
1147
  config = _ref.config,
1085
1148
  isCurrentlyVisible = _ref.isCurrentlyVisible,
1086
1149
  onClick = _ref.onClick,
1087
- className = _ref.className;
1150
+ className = _ref.className,
1151
+ overlay = _ref.overlay;
1088
1152
  var useSirv = false;
1089
1153
  var _useDivaCore = useDivaCore(),
1090
1154
  baseSirvUrls = _useDivaCore.state.apiConfig.baseSirvUrls;
@@ -1157,7 +1221,8 @@ var MediaItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
1157
1221
  url: url,
1158
1222
  onClick: onClick,
1159
1223
  className: classNames('diva-widget-mediaitem', className),
1160
- sirvProps: config.sirvProps
1224
+ sirvProps: config.sirvProps,
1225
+ overlay: overlay
1161
1226
  });
1162
1227
  });
1163
1228
 
@@ -1337,7 +1402,7 @@ var Gallery = function Gallery(props) {
1337
1402
  thumbs: {
1338
1403
  swiper: thumbsSwiper && !thumbsSwiper.destroyed ? thumbsSwiper : null
1339
1404
  },
1340
- modules: [Navigation, Thumbs, Pagination],
1405
+ modules: [Navigation, Thumbs, Pagination, Autoplay],
1341
1406
  className: classNames('gallery-main', props.nestedSwiper ? 'gallery-main-popup-swiper' : ''),
1342
1407
  speed: props.disableAnimation ? 0 : 500
1343
1408
  }, props.config.sliderProp), {}, {
@@ -11,6 +11,7 @@ export interface GalleryConfig extends BaseElementConfig, MediaItemConfig {
11
11
  thumbSliderProp?: SwiperProps;
12
12
  arIconProps?: ArActionIconConfig;
13
13
  videoAutoplay?: boolean;
14
+ showOnlyReadyForSlider?: boolean;
14
15
  }
15
16
  export interface ArActionIconConfig extends BaseElementConfig {
16
17
  text?: string | boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Gallery/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,aAAc,SAAQ,iBAAiB,EAAE,eAAe;IACvE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,qBAAsB,SAAQ,KAAK;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Gallery/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,aAAc,SAAQ,iBAAiB,EAAE,eAAe;IACvE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,qBAAsB,SAAQ,KAAK;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -1,6 +1,6 @@
1
1
  import { GalleryProps, MediaWithProductIndex } from './types';
2
2
  import { SwiperClass } from 'swiper/react';
3
- export default function useGallery({ products, config: { functionTypes, add2DImage, add3DImageAsFallback }, currentProductId, setCurrentProductId, }: GalleryProps): {
3
+ export default function useGallery({ products, config: { functionTypes, add2DImage, add3DImageAsFallback }, currentProductId, setCurrentProductId, disableAnimation, }: GalleryProps): {
4
4
  medias: MediaWithProductIndex[];
5
5
  sirvLoaded: boolean;
6
6
  thumbsSwiper: SwiperClass | null;
@@ -1 +1 @@
1
- {"version":3,"file":"useGallery.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Gallery/useGallery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAI9D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,EACR,MAAM,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAC3D,gBAAgB,EAChB,mBAAmB,GACpB,EAAE,YAAY;;;;;;;;4BAoCkB,WAAW;EAgC3C"}
1
+ {"version":3,"file":"useGallery.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Gallery/useGallery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAI9D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,EACR,MAAM,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAC3D,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,GACjB,EAAE,YAAY;;;;;;;;4BAoDkB,WAAW;EA6B3C"}
@@ -6,7 +6,8 @@ type Props = {
6
6
  sirvProps?: {
7
7
  [data: string]: string;
8
8
  };
9
+ overlay?: React.ReactNode;
9
10
  };
10
- declare const ImageItem: ({ url, onClick, className, sirvProps }: Props) => React.JSX.Element | null;
11
+ declare const ImageItem: ({ url, sirvProps, overlay, className, onClick }: Props) => React.JSX.Element | null;
11
12
  export default ImageItem;
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/MediaItem/ImageItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,KAAK,KAAK,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAE/G,QAAA,MAAM,SAAS,2CAA4C,KAAK,6BA6D/D,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/MediaItem/ImageItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,KAAK,KAAK,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC;AAE1I,QAAA,MAAM,SAAS,oDAAqD,KAAK,6BA4ExE,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -10,6 +10,7 @@ type Props = {
10
10
  videoAutoplay?: boolean;
11
11
  onClick?: () => void;
12
12
  className?: string;
13
+ overlay?: React.ReactNode;
13
14
  };
14
15
  export declare const MediaItem: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLArViewerElement>>;
15
16
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/MediaItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAiB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIzD,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,eAAe,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,SAAS,mFA4ErB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/MediaItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAiB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIzD,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,eAAe,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,SAAS,mFAoFrB,CAAC"}
@@ -21,5 +21,6 @@ export declare function useProductData({ productIds, variants, widgetType, noGlo
21
21
  selectedProduct: ProductData | undefined;
22
22
  setSelectedProductId: (productId: string) => Promise<void>;
23
23
  setProductCache: (key: string, data: any) => void;
24
+ getSimpleProductListByIds: (productIds: string[]) => Promise<any>;
24
25
  };
25
26
  //# sourceMappingURL=useProductData.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useProductData.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useProductData.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,WAAW,EAA0B,MAAM,0BAA0B,CAAC;AAQ1F,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAKD,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,mBAAmB;;;;oCAyLxD,MAAM,EAAE,KAAG,OAAO,CAAC,GAAG,CAAC;6CAyBd,MAAM,cAAc,MAAM,KAAG,OAAO,CAAC,GAAG,CAAC;;sCAxF3E,MAAM;2BAmHI,MAAM,QAAQ,GAAG;EAoChD"}
1
+ {"version":3,"file":"useProductData.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useProductData.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,WAAW,EAA0B,MAAM,0BAA0B,CAAC;AAQ1F,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAKD,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,mBAAmB;;;;oCAyLxD,MAAM,EAAE,KAAG,OAAO,CAAC,GAAG,CAAC;6CAyBd,MAAM,cAAc,MAAM,KAAG,OAAO,CAAC,GAAG,CAAC;;sCAxF3E,MAAM;2BAiII,MAAM,QAAQ,GAAG;4CAdM,MAAM,EAAE,KAAG,OAAO,CAAC,GAAG,CAAC;EAmD7E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/widget-library",
3
- "version": "25.10.0-beta.8",
3
+ "version": "25.10.0-rc.1",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "storybook": "storybook dev -p 6006",
@@ -36,5 +36,5 @@
36
36
  "suiteName": "widget-library",
37
37
  "outputDirectory": "./test-reports"
38
38
  },
39
- "gitHead": "8b9e52b4159458ce3bcfd8551c67453f2500e94a"
39
+ "gitHead": "060a60c95f8de3f8893ab3e1865ffdd11a04d414"
40
40
  }