@crystaldesign/product-detail-page 24.14.2 → 24.14.3
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 +160 -57
- package/build/types/product-detail-page/src/components/UiElement/index.d.ts.map +1 -1
- package/build/types/product-detail-page/src/components/mainComponents/Gallery/useGallery.d.ts +1 -1
- package/build/types/product-detail-page/src/components/mainComponents/Gallery/useGallery.d.ts.map +1 -1
- package/build/types/product-detail-page/src/components/mainComponents/Tabs/index.d.ts +12 -0
- package/build/types/product-detail-page/src/components/mainComponents/Tabs/index.d.ts.map +1 -0
- package/build/types/product-detail-page/src/components/mainComponents/Variants/Group/index.d.ts +1 -1
- package/build/types/product-detail-page/src/components/mainComponents/Variants/Group/index.d.ts.map +1 -1
- package/build/types/product-detail-page/src/components/mainComponents/Variants/useVariants.d.ts +3 -1
- package/build/types/product-detail-page/src/components/mainComponents/Variants/useVariants.d.ts.map +1 -1
- package/build/types/product-detail-page/src/stories/boho/lueck-pdp.stories.d.ts +8 -0
- package/build/types/product-detail-page/src/stories/boho/lueck-pdp.stories.d.ts.map +1 -0
- package/build/types/product-detail-page/src/types/index.d.ts +29 -12
- package/build/types/product-detail-page/src/types/index.d.ts.map +1 -1
- package/build/types/product-detail-page/src/utils/filterContent.d.ts +4 -1
- package/build/types/product-detail-page/src/utils/filterContent.d.ts.map +1 -1
- package/build/umd/product-detail-page.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +2 -2
package/build/esm/index.js
CHANGED
|
@@ -107,7 +107,8 @@ function useGallery (_ref) {
|
|
|
107
107
|
var product = _ref.product,
|
|
108
108
|
_ref$config = _ref.config,
|
|
109
109
|
functionTypes = _ref$config.functionTypes,
|
|
110
|
-
add2DImage = _ref$config.add2DImage
|
|
110
|
+
add2DImage = _ref$config.add2DImage,
|
|
111
|
+
add3DImageAsFallback = _ref$config.add3DImageAsFallback;
|
|
111
112
|
var _useState = useState([]),
|
|
112
113
|
_useState2 = _slicedToArray(_useState, 2),
|
|
113
114
|
medias = _useState2[0],
|
|
@@ -119,17 +120,23 @@ function useGallery (_ref) {
|
|
|
119
120
|
var _useDivaCore = useDivaCore(),
|
|
120
121
|
baseSirvUrls = _useDivaCore.state.apiConfig.baseSirvUrls;
|
|
121
122
|
useEffect(function () {
|
|
123
|
+
var _product$media;
|
|
122
124
|
var newMedias = [];
|
|
123
125
|
var _loop = function _loop() {
|
|
124
|
-
var _product$media$filter, _product$
|
|
126
|
+
var _product$media$filter, _product$media2;
|
|
125
127
|
var functionType = functionTypes[i];
|
|
126
|
-
newMedias = [].concat(_toConsumableArray(newMedias), _toConsumableArray((_product$media$filter = (_product$
|
|
128
|
+
newMedias = [].concat(_toConsumableArray(newMedias), _toConsumableArray((_product$media$filter = (_product$media2 = product.media) === null || _product$media2 === void 0 ? void 0 : _product$media2.filter(function (m, i) {
|
|
127
129
|
return m.functionType === functionType;
|
|
128
130
|
})) !== null && _product$media$filter !== void 0 ? _product$media$filter : []));
|
|
129
131
|
};
|
|
130
132
|
for (var i = 0; i < functionTypes.length; i++) {
|
|
131
133
|
_loop();
|
|
132
134
|
}
|
|
135
|
+
if (add3DImageAsFallback && product.image && !((_product$media = product.media) !== null && _product$media !== void 0 && _product$media.find(function (m) {
|
|
136
|
+
return m.functionType == 'ART' || m.functionType == 'PROD';
|
|
137
|
+
}))) newMedias.push({
|
|
138
|
+
url: product.image
|
|
139
|
+
});
|
|
133
140
|
if (add2DImage && product.image2D) newMedias.push({
|
|
134
141
|
url: product.image2D
|
|
135
142
|
});
|
|
@@ -437,7 +444,7 @@ var Text = function Text(_ref) {
|
|
|
437
444
|
return /*#__PURE__*/jsx("div", {
|
|
438
445
|
className: 'diva-pdp-text ' + ((_config$className = config.className) !== null && _config$className !== void 0 ? _config$className : ''),
|
|
439
446
|
dangerouslySetInnerHTML: {
|
|
440
|
-
__html: config.text
|
|
447
|
+
__html: config.text.replaceAll('\n', '<br/>')
|
|
441
448
|
}
|
|
442
449
|
});
|
|
443
450
|
};
|
|
@@ -575,7 +582,7 @@ var compareCodexes = function compareCodexes(codex1, codex2) {
|
|
|
575
582
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
576
583
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
577
584
|
var Group = function Group(_ref) {
|
|
578
|
-
var _config$classificatio;
|
|
585
|
+
var _config$classificatio, _config$classificatio2, _group$, _classificationConfig;
|
|
579
586
|
var onChange = _ref.onChange,
|
|
580
587
|
groups = _ref.groups,
|
|
581
588
|
product = _ref.product,
|
|
@@ -590,13 +597,14 @@ var Group = function Group(_ref) {
|
|
|
590
597
|
setSwiperRef = _useState2[1];
|
|
591
598
|
var selectedIdx = useRef(0);
|
|
592
599
|
if (!selectedClassification) return /*#__PURE__*/jsx(Fragment, {});
|
|
593
|
-
var classificationConfig = (_config$classificatio = config.classificationConfig) === null || _config$
|
|
594
|
-
var classificationText = classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.text;
|
|
600
|
+
var classificationConfig = (_config$classificatio = (_config$classificatio2 = config.classificationConfig) === null || _config$classificatio2 === void 0 ? void 0 : _config$classificatio2[groupKey]) !== null && _config$classificatio !== void 0 ? _config$classificatio : config.defaultConfig;
|
|
595
601
|
var group = groups[groupKey];
|
|
602
|
+
var classificationText = (classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.text) === 'OPTION_TEXT' ? (_group$ = group[0]) === null || _group$ === void 0 ? void 0 : _group$.optName : classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.text;
|
|
603
|
+
var uiType = (_classificationConfig = classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.uiType) !== null && _classificationConfig !== void 0 ? _classificationConfig : 'IMAGE';
|
|
596
604
|
var _onClick = function onClick(e, variant) {
|
|
597
|
-
var _ref2, _ref2$onClick,
|
|
605
|
+
var _ref2, _ref2$onClick, _classificationConfig2;
|
|
598
606
|
if (!config.dontTriggerLocalStateUpdateOnClick) onChange(variant._id);
|
|
599
|
-
(_ref2 = (
|
|
607
|
+
(_ref2 = (_classificationConfig2 = classificationConfig === null || classificationConfig === void 0 ? void 0 : classificationConfig.action) !== null && _classificationConfig2 !== void 0 ? _classificationConfig2 : config.defaultVariantAction) === null || _ref2 === void 0 || (_ref2$onClick = _ref2.onClick) === null || _ref2$onClick === void 0 || _ref2$onClick.call(_ref2, e, variant._id);
|
|
600
608
|
};
|
|
601
609
|
var elements = group.map(function (item, index) {
|
|
602
610
|
var _item$image, _item$variant$media;
|
|
@@ -606,6 +614,23 @@ var Group = function Group(_ref) {
|
|
|
606
614
|
var sel = (selectedClassification === null || selectedClassification === void 0 ? void 0 : selectedClassification.opv) === item.codex || (selectedClassification === null || selectedClassification === void 0 ? void 0 : selectedClassification.value) === item.codex;
|
|
607
615
|
if (sel) selectedIdx.current = index;
|
|
608
616
|
var variant = getVariantFromCodex(product, products, groups, groupKey, item.codex);
|
|
617
|
+
if (uiType == 'IMAGE_AND_TEXT' && image) {
|
|
618
|
+
return /*#__PURE__*/jsxs("div", {
|
|
619
|
+
onClick: function onClick(e) {
|
|
620
|
+
return _onClick(e, variant);
|
|
621
|
+
},
|
|
622
|
+
className: classnames('variant-item-image', sel ? 'sel' : undefined),
|
|
623
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
624
|
+
className: "variant-item-image-wrapper",
|
|
625
|
+
children: /*#__PURE__*/jsx("img", {
|
|
626
|
+
src: image + '?w=' + 64
|
|
627
|
+
})
|
|
628
|
+
}), /*#__PURE__*/jsx("div", {
|
|
629
|
+
className: "variant-item-image-text",
|
|
630
|
+
children: item.name
|
|
631
|
+
})]
|
|
632
|
+
}, index);
|
|
633
|
+
}
|
|
609
634
|
if (item.link) {
|
|
610
635
|
return /*#__PURE__*/jsx("a", {
|
|
611
636
|
href: item.link,
|
|
@@ -616,7 +641,8 @@ var Group = function Group(_ref) {
|
|
|
616
641
|
className: classnames('variant-item-image', sel ? 'sel' : undefined)
|
|
617
642
|
}, index)
|
|
618
643
|
});
|
|
619
|
-
}
|
|
644
|
+
}
|
|
645
|
+
if (image) {
|
|
620
646
|
return /*#__PURE__*/jsx("div", {
|
|
621
647
|
onClick: function onClick(e) {
|
|
622
648
|
return _onClick(e, variant);
|
|
@@ -802,6 +828,43 @@ var ActionIcon = function ActionIcon(_ref) {
|
|
|
802
828
|
});
|
|
803
829
|
};
|
|
804
830
|
|
|
831
|
+
var Tabs = function Tabs(_ref) {
|
|
832
|
+
var _ref$config = _ref.config,
|
|
833
|
+
tabs = _ref$config.tabs,
|
|
834
|
+
className = _ref$config.className,
|
|
835
|
+
defaultActiveIndex = _ref$config.defaultActiveIndex,
|
|
836
|
+
product = _ref.product,
|
|
837
|
+
productVariants = _ref.productVariants,
|
|
838
|
+
selectProduct = _ref.selectProduct;
|
|
839
|
+
var _useState = useState(defaultActiveIndex !== null && defaultActiveIndex !== void 0 ? defaultActiveIndex : 0),
|
|
840
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
841
|
+
index = _useState2[0],
|
|
842
|
+
setIndex = _useState2[1];
|
|
843
|
+
return /*#__PURE__*/jsxs("div", {
|
|
844
|
+
className: 'diva-pdp-tabs ' + (className !== null && className !== void 0 ? className : ''),
|
|
845
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
846
|
+
className: "diva-pdp-tabs-header",
|
|
847
|
+
children: tabs.map(function (t, i) {
|
|
848
|
+
return /*#__PURE__*/jsx("div", {
|
|
849
|
+
className: 'diva-pdp-tabs-header-item' + (i == index ? ' sel' : ''),
|
|
850
|
+
onClick: function onClick() {
|
|
851
|
+
return setIndex(i);
|
|
852
|
+
},
|
|
853
|
+
children: t.header
|
|
854
|
+
}, i);
|
|
855
|
+
})
|
|
856
|
+
}), /*#__PURE__*/jsx("div", {
|
|
857
|
+
className: "diva-pdp-tabs-body",
|
|
858
|
+
children: /*#__PURE__*/jsx(_UiElemet, {
|
|
859
|
+
content: tabs[index].content,
|
|
860
|
+
product: product,
|
|
861
|
+
productVariants: productVariants,
|
|
862
|
+
selectProduct: selectProduct
|
|
863
|
+
})
|
|
864
|
+
})]
|
|
865
|
+
});
|
|
866
|
+
};
|
|
867
|
+
|
|
805
868
|
var _UiElemet = function UiElemet(_ref) {
|
|
806
869
|
var _content$containers;
|
|
807
870
|
var content = _ref.content,
|
|
@@ -843,6 +906,13 @@ var _UiElemet = function UiElemet(_ref) {
|
|
|
843
906
|
return /*#__PURE__*/jsx(ActionIcon, {
|
|
844
907
|
config: content
|
|
845
908
|
});
|
|
909
|
+
case 'TABS':
|
|
910
|
+
return /*#__PURE__*/jsx(Tabs, {
|
|
911
|
+
config: content,
|
|
912
|
+
product: product,
|
|
913
|
+
productVariants: productVariants,
|
|
914
|
+
selectProduct: selectProduct
|
|
915
|
+
});
|
|
846
916
|
default:
|
|
847
917
|
return /*#__PURE__*/jsx("div", {
|
|
848
918
|
id: content.id,
|
|
@@ -859,52 +929,6 @@ var _UiElemet = function UiElemet(_ref) {
|
|
|
859
929
|
}
|
|
860
930
|
};
|
|
861
931
|
|
|
862
|
-
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
863
|
-
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
864
|
-
/**
|
|
865
|
-
* Filters the content based on the current settings
|
|
866
|
-
*
|
|
867
|
-
* @param content the content to filter
|
|
868
|
-
* @param isMobile if the device is mobile
|
|
869
|
-
* @param isPortrait if the device is in portrait mode
|
|
870
|
-
*/
|
|
871
|
-
function filterContent(content, isMobile, isPortrait) {
|
|
872
|
-
if (typeof content !== 'string' && 'containers' in content) {
|
|
873
|
-
var filteredContainer = [];
|
|
874
|
-
for (var i = 0; content.containers && i < content.containers.length; i++) {
|
|
875
|
-
var innerContent = filterContent(content.containers[i], isMobile, isPortrait);
|
|
876
|
-
if (innerContent) filteredContainer.push(innerContent);
|
|
877
|
-
}
|
|
878
|
-
if (filteredContainer.length === 0) return null;
|
|
879
|
-
return _objectSpread$3(_objectSpread$3({}, content), {}, {
|
|
880
|
-
containers: filteredContainer
|
|
881
|
-
});
|
|
882
|
-
}
|
|
883
|
-
if (isVisible(content, isMobile, isPortrait)) {
|
|
884
|
-
return content;
|
|
885
|
-
}
|
|
886
|
-
return null;
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
/**
|
|
890
|
-
* Checks if an element should be filtered out, based on the current settings
|
|
891
|
-
*
|
|
892
|
-
* @param content the content to check
|
|
893
|
-
* @param isMobile if the device is mobile
|
|
894
|
-
* @param isPortrait if the device is in portrait mode
|
|
895
|
-
*/
|
|
896
|
-
function isVisible(content, isMobile, isPortrait) {
|
|
897
|
-
var _content$onlyFor, _content$onlyFor2, _content$onlyFor3, _content$onlyFor4;
|
|
898
|
-
if (typeof content == 'string') {
|
|
899
|
-
return true;
|
|
900
|
-
}
|
|
901
|
-
if ((_content$onlyFor = content.onlyFor) !== null && _content$onlyFor !== void 0 && _content$onlyFor.includes('DESKTOP') && isMobile) return false;
|
|
902
|
-
if ((_content$onlyFor2 = content.onlyFor) !== null && _content$onlyFor2 !== void 0 && _content$onlyFor2.includes('LANDSCAPE') && (!isMobile || !isPortrait)) return false;
|
|
903
|
-
if ((_content$onlyFor3 = content.onlyFor) !== null && _content$onlyFor3 !== void 0 && _content$onlyFor3.includes('MOBILE') && !isMobile) return false;
|
|
904
|
-
if ((_content$onlyFor4 = content.onlyFor) !== null && _content$onlyFor4 !== void 0 && _content$onlyFor4.includes('PORTRAIT') && !isPortrait) return false;
|
|
905
|
-
return true;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
932
|
/**
|
|
909
933
|
* Replaces the template strings in the content with the actual product data
|
|
910
934
|
*
|
|
@@ -987,6 +1011,85 @@ function checkForTemplateStrings(input) {
|
|
|
987
1011
|
return matches;
|
|
988
1012
|
}
|
|
989
1013
|
|
|
1014
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1015
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Filters the content based on the current settings
|
|
1019
|
+
*
|
|
1020
|
+
* @param content the content to filter
|
|
1021
|
+
* @param isMobile if the device is mobile
|
|
1022
|
+
* @param isPortrait if the device is in portrait mode
|
|
1023
|
+
* @param product Productdata
|
|
1024
|
+
* @param language current language
|
|
1025
|
+
*/
|
|
1026
|
+
function filterContent (content, isMobile, isPortrait, product, language) {
|
|
1027
|
+
if (typeof content == 'string') return content;
|
|
1028
|
+
var flatProduct = flatten$1(product);
|
|
1029
|
+
return filterContent$1(content, isMobile, isPortrait, flatProduct, language);
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* Filters the content based on the current settings
|
|
1034
|
+
*
|
|
1035
|
+
* @param content the content to filter
|
|
1036
|
+
* @param isMobile if the device is mobile
|
|
1037
|
+
* @param isPortrait if the device is in portrait mode
|
|
1038
|
+
* @param product flattened Product
|
|
1039
|
+
* @param language current language
|
|
1040
|
+
*/
|
|
1041
|
+
function filterContent$1(content, isMobile, isPortrait, product, language) {
|
|
1042
|
+
if (typeof content !== 'string' && ('containers' in content || 'tabs' in content)) {
|
|
1043
|
+
var _containers, _tabs;
|
|
1044
|
+
var key = 'containers' in content ? 'containers' : 'tabs';
|
|
1045
|
+
var filteredContainer = [];
|
|
1046
|
+
var children = [].concat(_toConsumableArray((_containers = content.containers) !== null && _containers !== void 0 ? _containers : []), _toConsumableArray((_tabs = content.tabs) !== null && _tabs !== void 0 ? _tabs : []));
|
|
1047
|
+
for (var i = 0; i < children.length; i++) {
|
|
1048
|
+
var innerContent = filterContent$1(children[i], isMobile, isPortrait, product, language);
|
|
1049
|
+
if (innerContent) filteredContainer.push(innerContent);
|
|
1050
|
+
}
|
|
1051
|
+
if (filteredContainer.length === 0) return null;
|
|
1052
|
+
return _objectSpread$3(_objectSpread$3({}, content), {}, _defineProperty({}, key, filteredContainer));
|
|
1053
|
+
}
|
|
1054
|
+
if (isVisible(content, isMobile, isPortrait, product, language)) {
|
|
1055
|
+
return content;
|
|
1056
|
+
}
|
|
1057
|
+
return null;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Checks if an element should be filtered out, based on the current settings
|
|
1062
|
+
*
|
|
1063
|
+
* @param content the content to check
|
|
1064
|
+
* @param isMobile if the device is mobile
|
|
1065
|
+
* @param isPortrait if the device is in portrait mode
|
|
1066
|
+
* @param product flattened Product
|
|
1067
|
+
* @param language current language
|
|
1068
|
+
*/
|
|
1069
|
+
function isVisible(content, isMobile, isPortrait, product, language) {
|
|
1070
|
+
var _content$rule, _content$rule2;
|
|
1071
|
+
if (typeof content == 'string') {
|
|
1072
|
+
return true;
|
|
1073
|
+
}
|
|
1074
|
+
var rule = recursiveReplaceTemplates((_content$rule = content.rule) !== null && _content$rule !== void 0 ? _content$rule : {}, product, language);
|
|
1075
|
+
var visibleForDevices = content.onlyFor || ((_content$rule2 = content.rule) === null || _content$rule2 === void 0 ? void 0 : _content$rule2.visibleForDevices);
|
|
1076
|
+
if (visibleForDevices !== null && visibleForDevices !== void 0 && visibleForDevices.includes('DESKTOP') && isMobile) return false;
|
|
1077
|
+
if (visibleForDevices !== null && visibleForDevices !== void 0 && visibleForDevices.includes('LANDSCAPE') && (!isMobile || !isPortrait)) return false;
|
|
1078
|
+
if (visibleForDevices !== null && visibleForDevices !== void 0 && visibleForDevices.includes('MOBILE') && !isMobile) return false;
|
|
1079
|
+
if (visibleForDevices !== null && visibleForDevices !== void 0 && visibleForDevices.includes('PORTRAIT') && !isPortrait) return false;
|
|
1080
|
+
if ((rule === null || rule === void 0 ? void 0 : rule.hiddenIfEmpty) !== undefined) {
|
|
1081
|
+
if (rule.hiddenIfEmpty === '') return false;
|
|
1082
|
+
}
|
|
1083
|
+
if (rule !== null && rule !== void 0 && rule.hiddenIfRule) {
|
|
1084
|
+
try {
|
|
1085
|
+
return !eval(rule === null || rule === void 0 ? void 0 : rule.hiddenIfRule);
|
|
1086
|
+
} catch (e) {
|
|
1087
|
+
return true;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
return true;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
990
1093
|
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
991
1094
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
992
1095
|
/**
|
|
@@ -1355,7 +1458,7 @@ function parseContent(isMobile, isPortrait, productVariants, product, language,
|
|
|
1355
1458
|
if (content) {
|
|
1356
1459
|
var clonedContent = cloneDeep(content);
|
|
1357
1460
|
var pureContent = resolveReferences(clonedContent, content);
|
|
1358
|
-
var filteredContent = filterContent(pureContent, isMobile, isPortrait);
|
|
1461
|
+
var filteredContent = filterContent(pureContent, isMobile, isPortrait, product, language);
|
|
1359
1462
|
if (!filteredContent) return null;
|
|
1360
1463
|
var withActionsContent = replaceActions(filteredContent, productVariants, product, language, selectProduct, openComponentFunction, onEventFunction, openSideMenuFunction);
|
|
1361
1464
|
finalContent = replaceTemplateStrings(withActionsContent, product, language);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/UiElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/UiElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAOL,SAAS,EAGV,MAAM,aAAa,CAAC;AAQrB,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,SAAS,CAAC;IACnB,eAAe,EAAE,WAAW,EAAE,CAAC;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,QAAA,MAAM,QAAQ,yDAA0D,cAAc,sBA4BrF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/build/types/product-detail-page/src/components/mainComponents/Gallery/useGallery.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
product: ProductData;
|
|
5
5
|
config: GalleryConfig;
|
|
6
6
|
}
|
|
7
|
-
export default function ({ product, config: { functionTypes, add2DImage } }: Props): {
|
|
7
|
+
export default function ({ product, config: { functionTypes, add2DImage, add3DImageAsFallback } }: Props): {
|
|
8
8
|
medias: Media[];
|
|
9
9
|
sirvLoaded: boolean;
|
|
10
10
|
};
|
package/build/types/product-detail-page/src/components/mainComponents/Gallery/useGallery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGallery.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/mainComponents/Gallery/useGallery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAe,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,UAAU,KAAK;IACb,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,EAAE,EAAE,KAAK;;;
|
|
1
|
+
{"version":3,"file":"useGallery.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/mainComponents/Gallery/useGallery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAe,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,UAAU,KAAK;IACb,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,EAAE,KAAK;;;EAgDvG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ProductData } from '@crystaldesign/diva-core';
|
|
2
|
+
import { TabsConfig } from '../../../types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
type Props = {
|
|
5
|
+
config: TabsConfig;
|
|
6
|
+
productVariants: ProductData[];
|
|
7
|
+
product: ProductData;
|
|
8
|
+
selectProduct: (productId: string) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const Tabs: ({ config: { tabs, className, defaultActiveIndex }, product, productVariants, selectProduct }: Props) => React.JSX.Element;
|
|
11
|
+
export default Tabs;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/mainComponents/Tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,UAAU,CAAC;IACnB,eAAe,EAAE,WAAW,EAAE,CAAC;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,QAAA,MAAM,IAAI,iGAAkG,KAAK,sBAgBhH,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/build/types/product-detail-page/src/components/mainComponents/Variants/Group/index.d.ts
CHANGED
|
@@ -11,6 +11,6 @@ type Props = {
|
|
|
11
11
|
config: VariantsConfig;
|
|
12
12
|
selectedClassification: any;
|
|
13
13
|
};
|
|
14
|
-
declare const Group: ({ onChange, groups, product, groupKey, config, products, selectedClassification
|
|
14
|
+
declare const Group: ({ onChange, groups, product, groupKey, config, products, selectedClassification }: Props) => React.JSX.Element;
|
|
15
15
|
export default Group;
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
package/build/types/product-detail-page/src/components/mainComponents/Variants/Group/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/mainComponents/Variants/Group/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAe,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,sBAAsB,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/mainComponents/Variants/Group/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAe,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,sBAAsB,EAAE,GAAG,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,KAAK,sFAAoH,KAAK,sBAyFnI,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/build/types/product-detail-page/src/components/mainComponents/Variants/useVariants.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import { ProductData } from '@crystaldesign/diva-core';
|
|
|
2
2
|
import { ClassificationConfig } from '../../../types/index';
|
|
3
3
|
interface Props {
|
|
4
4
|
products: ProductData[];
|
|
5
|
-
classificationConfig?:
|
|
5
|
+
classificationConfig?: {
|
|
6
|
+
[classCodex: string]: ClassificationConfig;
|
|
7
|
+
};
|
|
6
8
|
}
|
|
7
9
|
export interface Groups {
|
|
8
10
|
[key: string]: Group[];
|
package/build/types/product-detail-page/src/components/mainComponents/Variants/useVariants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/mainComponents/Variants/useVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,UAAU,KAAK;IACb,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/mainComponents/Variants/useVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,UAAU,KAAK;IACb,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,oBAAoB,CAAC,EAAE;QAAE,CAAC,UAAU,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAC;CACvE;AACD,MAAM,WAAW,MAAM;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,QAAQ,EAAE,oBAAoB,EAAE,EAAE,KAAK;;EA2EjE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Props } from '../../components';
|
|
3
|
+
import { WithDivaMock } from '@crystaldesign/diva-core';
|
|
4
|
+
declare const meta: Meta<WithDivaMock<Props>>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<WithDivaMock<Props>>;
|
|
7
|
+
export declare const LückPDP: Story;
|
|
8
|
+
//# sourceMappingURL=lueck-pdp.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lueck-pdp.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/boho/lueck-pdp.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAkB,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAqB,MAAM,0BAA0B,CAAC;AAY3E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAmBnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;AA4K3C,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -8,7 +8,7 @@ export interface Configuration {
|
|
|
8
8
|
export type Text = string | {
|
|
9
9
|
[lang: string]: string;
|
|
10
10
|
};
|
|
11
|
-
export type Components = GalleryConfig | TextConfig | PriceConfig | InfoConfig | ActionGroupConfig | VariantsConfig | ActionIconConfig;
|
|
11
|
+
export type Components = GalleryConfig | TextConfig | PriceConfig | InfoConfig | ActionGroupConfig | VariantsConfig | ActionIconConfig | TabsConfig;
|
|
12
12
|
export type ConfigUiElement = ConfigContainer | Components | string;
|
|
13
13
|
export type UiElement = Container | Components;
|
|
14
14
|
export interface ConfigContainer extends BaseConfig {
|
|
@@ -22,6 +22,11 @@ export interface Container extends BaseConfig {
|
|
|
22
22
|
export interface BaseConfig {
|
|
23
23
|
className?: string;
|
|
24
24
|
onlyFor?: ('DESKTOP' | 'MOBILE' | 'PORTRAIT' | 'LANDSCAPE')[];
|
|
25
|
+
rule?: {
|
|
26
|
+
visibleForDevices?: ('DESKTOP' | 'MOBILE' | 'PORTRAIT' | 'LANDSCAPE')[];
|
|
27
|
+
hiddenIfEmpty?: string;
|
|
28
|
+
hiddenIfRule?: string;
|
|
29
|
+
};
|
|
25
30
|
}
|
|
26
31
|
export interface GalleryConfig extends BaseConfig {
|
|
27
32
|
id: 'GALLERY';
|
|
@@ -38,6 +43,7 @@ export interface GalleryConfig extends BaseConfig {
|
|
|
38
43
|
};
|
|
39
44
|
functionTypes: string[];
|
|
40
45
|
add2DImage?: boolean;
|
|
46
|
+
add3DImageAsFallback?: boolean;
|
|
41
47
|
showPageNumber?: boolean;
|
|
42
48
|
arProps?: ArProps;
|
|
43
49
|
arIconProps?: ArActionIconConfig;
|
|
@@ -66,23 +72,24 @@ export interface TabInfoConfig<TEXT_TYPE = string> extends BaseConfig {
|
|
|
66
72
|
}[];
|
|
67
73
|
}
|
|
68
74
|
export interface ClassificationConfig {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
maxCount?: number;
|
|
78
|
-
};
|
|
75
|
+
text: string | {
|
|
76
|
+
de?: string;
|
|
77
|
+
en?: string;
|
|
78
|
+
it?: string;
|
|
79
|
+
} | 'OPTION_TEXT';
|
|
80
|
+
uiType: 'IMAGE' | 'TEXT' | 'IMAGE_AND_TEXT';
|
|
81
|
+
action?: PdpActionConfig;
|
|
82
|
+
maxCount?: number;
|
|
79
83
|
}
|
|
80
84
|
export interface VariantsConfig extends BaseConfig {
|
|
81
85
|
id: 'VARIANTS';
|
|
82
86
|
classificationDefaultOrder?: string[];
|
|
83
87
|
dontTriggerLocalStateUpdateOnClick?: boolean;
|
|
84
88
|
defaultVariantAction?: PdpActionConfig;
|
|
85
|
-
classificationConfig?:
|
|
89
|
+
classificationConfig?: {
|
|
90
|
+
[classCodex: string]: ClassificationConfig;
|
|
91
|
+
};
|
|
92
|
+
defaultConfig?: ClassificationConfig;
|
|
86
93
|
moreIcon?: PdpActionConfig;
|
|
87
94
|
sliderProp?: SwiperProps;
|
|
88
95
|
}
|
|
@@ -112,6 +119,16 @@ export interface ActionIconConfig extends BaseConfig {
|
|
|
112
119
|
id: 'ACTIONICON';
|
|
113
120
|
action?: PdpActionConfig;
|
|
114
121
|
}
|
|
122
|
+
export interface TabsConfig extends BaseConfig {
|
|
123
|
+
id: 'TABS';
|
|
124
|
+
defaultActiveIndex: number;
|
|
125
|
+
tabs: Tab[];
|
|
126
|
+
}
|
|
127
|
+
export interface Tab extends BaseConfig {
|
|
128
|
+
id: string;
|
|
129
|
+
header: string;
|
|
130
|
+
content: UiElement;
|
|
131
|
+
}
|
|
115
132
|
export interface ActionGroupConfig extends BaseConfig {
|
|
116
133
|
id: 'ACTIONS';
|
|
117
134
|
actions: PdpActionConfig[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,eAAe,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAKvD,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,iBAAiB,GAAG,cAAc,GAAG,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,eAAe,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAKvD,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG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AY,CAAC;IACjB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,GAAG,EAAE,CAAC;CACb;AAED,MAAM,WAAW,GAAI,SAAQ,UAAU;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,EAAE,EAAE,SAAS,CAAC;IACd,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,EAAE,EAAE,cAAc,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProductData } from '@crystaldesign/diva-core';
|
|
1
2
|
import { ConfigUiElement } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Filters the content based on the current settings
|
|
@@ -5,6 +6,8 @@ import { ConfigUiElement } from '../types';
|
|
|
5
6
|
* @param content the content to filter
|
|
6
7
|
* @param isMobile if the device is mobile
|
|
7
8
|
* @param isPortrait if the device is in portrait mode
|
|
9
|
+
* @param product Productdata
|
|
10
|
+
* @param language current language
|
|
8
11
|
*/
|
|
9
|
-
export default function
|
|
12
|
+
export default function (content: ConfigUiElement, isMobile: boolean, isPortrait: boolean, product: ProductData, language: string): ConfigUiElement | null;
|
|
10
13
|
//# sourceMappingURL=filterContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterContent.d.ts","sourceRoot":"","sources":["../../../../../src/utils/filterContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"filterContent.d.ts","sourceRoot":"","sources":["../../../../../src/utils/filterContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAmB,eAAe,EAAc,MAAM,UAAU,CAAC;AAIxE;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,WACZ,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,GACf,eAAe,GAAG,IAAI,CAIxB"}
|