@crystaldesign/widget-library 25.5.0-rc.8 → 25.5.0
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.
package/build/esm/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import classNames from 'classnames';
|
|
|
12
12
|
import { useLayer, Arrow } from 'react-laag';
|
|
13
13
|
import QRCode from 'react-qr-code';
|
|
14
14
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
15
|
-
import
|
|
15
|
+
import { flatten } from 'flat';
|
|
16
16
|
|
|
17
17
|
(function() {
|
|
18
18
|
const env = {"STAGE":"production"};
|
|
@@ -276,7 +276,7 @@ function useMedia(_ref) {
|
|
|
276
276
|
|
|
277
277
|
// Add product index to each media item
|
|
278
278
|
if (filteredMedia.length > 0) {
|
|
279
|
-
hasAddedMediaForProduct =
|
|
279
|
+
if (!hasAddedMediaForProduct) hasAddedMediaForProduct = functionType === 'ART';
|
|
280
280
|
newMedias = [].concat(_toConsumableArray(newMedias), _toConsumableArray(filteredMedia.map(function (media) {
|
|
281
281
|
return _objectSpread$3(_objectSpread$3({}, media), {}, {
|
|
282
282
|
productIndex: productIndex
|
|
@@ -290,7 +290,7 @@ function useMedia(_ref) {
|
|
|
290
290
|
|
|
291
291
|
// Add 3D image as fallback only if no media at all exists for this product
|
|
292
292
|
if (add3DImageAsFallback && product.image && !hasAddedMediaForProduct) {
|
|
293
|
-
newMedias.
|
|
293
|
+
newMedias.unshift({
|
|
294
294
|
url: product.image,
|
|
295
295
|
productIndex: productIndex
|
|
296
296
|
});
|
|
@@ -715,13 +715,14 @@ var Gallery = function Gallery(props) {
|
|
|
715
715
|
className: "gallery-thumb"
|
|
716
716
|
}, props.config.thumbSliderProp), {}, {
|
|
717
717
|
children: medias.map(function (media, i) {
|
|
718
|
+
var _media$url;
|
|
718
719
|
return /*#__PURE__*/jsx(SwiperSlide, {
|
|
719
720
|
id: 'thumb media index ' + i,
|
|
720
721
|
children: /*#__PURE__*/jsx(Thumb, {
|
|
721
722
|
media: media,
|
|
722
723
|
medias: medias
|
|
723
|
-
}, i)
|
|
724
|
-
}, media.
|
|
724
|
+
}, ((_media$url = media.url) !== null && _media$url !== void 0 ? _media$url : '') + i)
|
|
725
|
+
}, media.url + 't');
|
|
725
726
|
})
|
|
726
727
|
}))]
|
|
727
728
|
});
|
|
@@ -921,7 +922,6 @@ function recursiveReplaceActions(content, productVariants, product, language, op
|
|
|
921
922
|
var currentProduct = (_productVariants$find = productVariants.find(function (variant) {
|
|
922
923
|
return variant._id === productId;
|
|
923
924
|
})) !== null && _productVariants$find !== void 0 ? _productVariants$find : product;
|
|
924
|
-
flatten$1(currentProduct);
|
|
925
925
|
if (openComponent) {
|
|
926
926
|
var translatedOpenComponent = replaceTemplatesInObject(openComponent, currentProduct, language);
|
|
927
927
|
openComponentFunction(translatedOpenComponent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Gallery/index.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Gallery/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AASvC,cAAc,SAAS,CAAC;AAKxB,eAAO,MAAM,OAAO,UAAW,YAAY,sBA+C1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/widget-library",
|
|
3
|
-
"version": "25.5.0
|
|
3
|
+
"version": "25.5.0",
|
|
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": "
|
|
39
|
+
"gitHead": "48cafbf7819746a17b5ce71149cdcd1b9c6df2e7"
|
|
40
40
|
}
|