@gem-sdk/components 2.0.0-dev.277 → 2.0.0-dev.288
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/dist/cjs/accordion/components/Accordion.js +60 -179
- package/dist/cjs/accordion/components/Accordion.liquid.js +77 -101
- package/dist/cjs/accordion/components/AccordionItem.js +126 -280
- package/dist/cjs/accordion/components/AccordionItem.liquid.js +77 -215
- package/dist/cjs/accordion/components/common/classes.js +55 -0
- package/dist/cjs/accordion/components/common/index.js +146 -0
- package/dist/cjs/accordion/components/common/styles.js +131 -0
- package/dist/cjs/accordion/hooks/useAccordion.js +145 -0
- package/dist/cjs/accordion/hooks/useAccordionItem.js +119 -0
- package/dist/cjs/article/components/ArticleImage.js +0 -1
- package/dist/cjs/article/components/ArticlePagination.js +1 -1
- package/dist/cjs/article/components/ArticlePagination.liquid.js +3 -3
- package/dist/cjs/article/setting/configs/ArticleImage/settings.js +5 -5
- package/dist/cjs/banner/components/HeroBannerItem.js +0 -6
- package/dist/cjs/banner/components/HeroBannerItem.liquid.js +3 -0
- package/dist/cjs/banner/setting/setting.js +28 -3
- package/dist/cjs/banner/setting/uiV2.js +10 -97
- package/dist/cjs/builder.js +18 -20
- package/dist/cjs/cart/components/CartLineImage.js +0 -2
- package/dist/cjs/code/common/classes.js +11 -0
- package/dist/cjs/code/common/styles.js +15 -0
- package/dist/cjs/code/components/CSSCode.js +9 -99
- package/dist/cjs/code/components/CSSCode.liquid.js +11 -11
- package/dist/cjs/code/hooks/useCSSCode.js +102 -0
- package/dist/cjs/code/setting/CSSCode.js +7 -121
- package/dist/cjs/code/setting/config/setting.js +77 -0
- package/dist/cjs/code/setting/config/uiV1.js +52 -0
- package/dist/cjs/code/setting/config/uiV2.js +58 -0
- package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +4 -1
- package/dist/cjs/form/components/contact/Contact.js +6 -2
- package/dist/cjs/form/components/contact/common/composeStyles.js +21 -0
- package/dist/cjs/form/components/form-checkbox/FormCheckbox.js +6 -4
- package/dist/cjs/form/components/form-checkbox/FormCheckbox.liquid.js +2 -4
- package/dist/cjs/form/components/form-checkbox/common/composeClasses.js +2 -2
- package/dist/cjs/form/components/form-checkbox/common/composeStyles.js +23 -10
- package/dist/cjs/form/components/form-dropdown/common/composeClasses.js +1 -1
- package/dist/cjs/form/components/form-email/FormEmail.js +18 -10
- package/dist/cjs/form/components/form-email/common/composeClasses.js +2 -1
- package/dist/cjs/form/components/newsletter/Newsletter.js +7 -2
- package/dist/cjs/form/components/newsletter/Newsletter.liquid.js +1 -1
- package/dist/cjs/form/components/newsletter/common/composeStyles.js +4 -2
- package/dist/cjs/form/components/textarea/TextArea.js +16 -8
- package/dist/cjs/form/components/textarea/common/composeClasses.js +1 -1
- package/dist/cjs/form/components/textfield/TextField.js +17 -9
- package/dist/cjs/form/components/textfield/common/composeClasses.js +2 -2
- package/dist/cjs/form/setting/contact/Contact.js +5 -1
- package/dist/cjs/form/setting/form-checkbox/configs/settings.js +153 -6
- package/dist/cjs/form/setting/form-checkbox/configs/uiV2.js +137 -0
- package/dist/cjs/form/setting/form-dropdown/configs/settings.js +147 -0
- package/dist/cjs/form/setting/form-dropdown/configs/uiV2.js +156 -4
- package/dist/cjs/form/setting/newsletter/configs/settings.js +132 -3
- package/dist/cjs/form/setting/newsletter/configs/uiV2.js +93 -0
- package/dist/cjs/form/setting/submit-button/configs/settings.js +37 -0
- package/dist/cjs/form/setting/submit-button/configs/uiV2.js +13 -0
- package/dist/cjs/grid/row/commons/getInnerRadius.js +11 -10
- package/dist/cjs/grid/row/setting/configs/uiV2.js +1 -1
- package/dist/cjs/header/components/kind/basic/index.js +1 -0
- package/dist/cjs/header/components/kind/modern/index.js +1 -1
- package/dist/cjs/helpers.js +53 -0
- package/dist/cjs/icon-list/setting/configs/uiV2.js +1 -1
- package/dist/cjs/icon-list-v2/setting/configs/settings.js +5 -5
- package/dist/cjs/image/components/AdaptiveImage.js +63 -49
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +56 -44
- package/dist/cjs/image/components/Image.js +65 -154
- package/dist/cjs/image/components/Image.liquid.js +68 -103
- package/dist/cjs/image/components/Modal3d.liquid.js +54 -21
- package/dist/cjs/image/components/NextImage.js +26 -59
- package/dist/cjs/image/components/NextImage.liquid.js +27 -115
- package/dist/cjs/image/components/Video.liquid.js +38 -13
- package/dist/cjs/image/components/common/attributes.js +115 -0
- package/dist/cjs/image/components/common/classes.js +57 -0
- package/dist/cjs/image/components/common/constants.js +15 -0
- package/dist/cjs/image/components/common/data.js +24 -0
- package/dist/cjs/image/components/common/helpers.js +75 -0
- package/dist/cjs/image/components/common/styles.js +88 -0
- package/dist/cjs/image/components/helpers/getNextImageLiquidAttrs.js +80 -0
- package/dist/cjs/image/components/helpers/getNextImageReactAttrs.js +40 -0
- package/dist/cjs/image/components/hooks/useCheckNoImage.js +25 -0
- package/dist/cjs/image/helpers/getSrcSet.js +0 -2
- package/dist/cjs/image/next.js +1 -5
- package/dist/cjs/image/setting/configs/settings.js +14 -8
- package/dist/cjs/image/setting/configs/uiV2.js +61 -15
- package/dist/cjs/image/setting/index.js +1 -3
- package/dist/cjs/image-comparison/components/CompareImage.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +1 -1
- package/dist/cjs/index.js +91 -91
- package/dist/cjs/index.liquid.js +8 -8
- package/dist/cjs/post-purchase/callout-banner/setting/config/callout-box/setting.js +4 -10
- package/dist/cjs/post-purchase/countdown-timer/components/PostPurchaseCountdownTimer.js +9 -23
- package/dist/cjs/post-purchase/countdown-timer/components/TextCountdown.js +12 -26
- package/dist/cjs/post-purchase/countdown-timer/components/common/getClasses.js +24 -0
- package/dist/cjs/post-purchase/countdown-timer/components/common/getStyles.js +21 -0
- package/dist/cjs/post-purchase/countdown-timer/hooks/useCountdownTimer.js +18 -1
- package/dist/cjs/post-purchase/countdown-timer/hooks/useGetTimeExpired.js +18 -0
- package/dist/cjs/post-purchase/countdown-timer/settings/CountdownTimer.js +9 -358
- package/dist/cjs/post-purchase/countdown-timer/settings/config/preset.js +26 -0
- package/dist/cjs/post-purchase/countdown-timer/settings/config/setting.js +243 -0
- package/dist/cjs/post-purchase/countdown-timer/settings/config/uiV1.js +125 -0
- package/dist/cjs/post-purchase/countdown-timer/settings/config/uiV2.js +185 -0
- package/dist/cjs/post-purchase/image/common/getClasses.js +1 -1
- package/dist/cjs/post-purchase/image/setting/setting-v2.js +5 -5
- package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +24 -26
- package/dist/cjs/post-purchase/product/hooks/product-image/useListCarousel.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +4 -1
- package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +20 -7
- package/dist/cjs/post-purchase/product/settings/product-image/uiV2.js +3 -1
- package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/settings.js +2 -2
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/utils/constants.js +1 -1
- package/dist/cjs/product/components/FileUpload/components/common/index.js +3 -0
- package/dist/cjs/product/components/ProductBundle/common/classes.js +25 -0
- package/dist/cjs/product/components/ProductBundle/common/index.js +5 -0
- package/dist/cjs/product/components/ProductBundle/common/styles.js +89 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscount.js +82 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscount.liquid.js +74 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +69 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +46 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountItem.js +23 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountItem.liquid.js +14 -0
- package/dist/cjs/product/components/{ProductBundleDiscount.js → ProductBundle/hooks/useProductBundleDataState.js} +20 -215
- package/dist/cjs/product/components/ProductBundle/hooks/useProductBundleDiscountState.js +56 -0
- package/dist/cjs/product/{setting → components/ProductBundle/setting}/ProductBundleDiscount.js +7 -7
- package/dist/cjs/product/{setting → components/ProductBundle/setting}/ProductBundleDiscountItem.js +3 -0
- package/dist/cjs/product/components/ProductButton.js +2 -2
- package/dist/cjs/product/components/ProductButton.liquid.js +2 -2
- package/dist/cjs/product/components/ProductPrice/common/getAttr.js +23 -0
- package/dist/cjs/product/components/ProductPrice/common/getClasses.js +19 -0
- package/dist/cjs/product/components/ProductPrice/common/getTextData.js +40 -0
- package/dist/cjs/product/components/ProductPrice/hooks/useGpPrice.js +126 -0
- package/dist/cjs/product/components/ProductPrice/index.js +54 -0
- package/dist/cjs/product/components/ProductPrice/index.liquid.js +43 -0
- package/dist/cjs/product/components/ProductQuickView/ProductQuickView.js +5 -5
- package/dist/cjs/product/next.js +3 -3
- package/dist/cjs/product/setting/index.js +2 -2
- package/dist/cjs/product/setting/product/configs/presets.js +1 -0
- package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/ProductFeatureImage.js +6 -7
- package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/ProductGalleryImage.js +11 -12
- package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/index.js +6 -5
- package/dist/cjs/product/setting/product-list/configs/settingsV2.js +10 -8
- package/dist/cjs/setting.js +5 -2
- package/dist/esm/accordion/components/Accordion.js +61 -180
- package/dist/esm/accordion/components/Accordion.liquid.js +78 -102
- package/dist/esm/accordion/components/AccordionItem.js +129 -281
- package/dist/esm/accordion/components/AccordionItem.liquid.js +76 -214
- package/dist/esm/accordion/components/common/classes.js +44 -0
- package/dist/esm/accordion/components/common/index.js +136 -0
- package/dist/esm/accordion/components/common/styles.js +122 -0
- package/dist/esm/accordion/hooks/useAccordion.js +141 -0
- package/dist/esm/accordion/hooks/useAccordionItem.js +115 -0
- package/dist/esm/article/components/ArticleImage.js +0 -1
- package/dist/esm/article/components/ArticlePagination.js +1 -1
- package/dist/esm/article/components/ArticlePagination.liquid.js +3 -3
- package/dist/esm/article/setting/configs/ArticleImage/settings.js +5 -5
- package/dist/esm/banner/components/HeroBannerItem.js +0 -6
- package/dist/esm/banner/components/HeroBannerItem.liquid.js +3 -0
- package/dist/esm/banner/setting/setting.js +28 -3
- package/dist/esm/banner/setting/uiV2.js +10 -97
- package/dist/esm/builder.js +3 -5
- package/dist/esm/cart/components/CartLineImage.js +0 -2
- package/dist/esm/code/common/classes.js +9 -0
- package/dist/esm/code/common/styles.js +13 -0
- package/dist/esm/code/components/CSSCode.js +9 -99
- package/dist/esm/code/components/CSSCode.liquid.js +12 -12
- package/dist/esm/code/hooks/useCSSCode.js +98 -0
- package/dist/esm/code/setting/CSSCode.js +7 -121
- package/dist/esm/code/setting/config/setting.js +75 -0
- package/dist/esm/code/setting/config/uiV1.js +50 -0
- package/dist/esm/code/setting/config/uiV2.js +56 -0
- package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +4 -1
- package/dist/esm/form/components/contact/Contact.js +7 -3
- package/dist/esm/form/components/contact/common/composeStyles.js +19 -0
- package/dist/esm/form/components/form-checkbox/FormCheckbox.js +7 -5
- package/dist/esm/form/components/form-checkbox/FormCheckbox.liquid.js +3 -5
- package/dist/esm/form/components/form-checkbox/common/composeClasses.js +2 -2
- package/dist/esm/form/components/form-checkbox/common/composeStyles.js +25 -11
- package/dist/esm/form/components/form-dropdown/common/composeClasses.js +1 -1
- package/dist/esm/form/components/form-email/FormEmail.js +18 -10
- package/dist/esm/form/components/form-email/common/composeClasses.js +2 -1
- package/dist/esm/form/components/newsletter/Newsletter.js +8 -3
- package/dist/esm/form/components/newsletter/Newsletter.liquid.js +1 -1
- package/dist/esm/form/components/newsletter/common/composeStyles.js +4 -2
- package/dist/esm/form/components/textarea/TextArea.js +16 -8
- package/dist/esm/form/components/textarea/common/composeClasses.js +1 -1
- package/dist/esm/form/components/textfield/TextField.js +17 -9
- package/dist/esm/form/components/textfield/common/composeClasses.js +2 -2
- package/dist/esm/form/setting/contact/Contact.js +5 -1
- package/dist/esm/form/setting/form-checkbox/configs/settings.js +153 -6
- package/dist/esm/form/setting/form-checkbox/configs/uiV2.js +137 -0
- package/dist/esm/form/setting/form-dropdown/configs/settings.js +147 -0
- package/dist/esm/form/setting/form-dropdown/configs/uiV2.js +156 -4
- package/dist/esm/form/setting/newsletter/configs/settings.js +132 -3
- package/dist/esm/form/setting/newsletter/configs/uiV2.js +93 -0
- package/dist/esm/form/setting/submit-button/configs/settings.js +37 -0
- package/dist/esm/form/setting/submit-button/configs/uiV2.js +13 -0
- package/dist/esm/grid/row/commons/getInnerRadius.js +11 -10
- package/dist/esm/grid/row/setting/configs/uiV2.js +1 -1
- package/dist/esm/header/components/kind/basic/index.js +1 -0
- package/dist/esm/header/components/kind/modern/index.js +1 -1
- package/dist/esm/helpers.js +52 -1
- package/dist/esm/icon-list/setting/configs/uiV2.js +1 -1
- package/dist/esm/icon-list-v2/setting/configs/settings.js +5 -5
- package/dist/esm/image/components/AdaptiveImage.js +64 -50
- package/dist/esm/image/components/AdaptiveImage.liquid.js +57 -45
- package/dist/esm/image/components/Image.js +66 -155
- package/dist/esm/image/components/Image.liquid.js +69 -104
- package/dist/esm/image/components/Modal3d.liquid.js +55 -22
- package/dist/esm/image/components/NextImage.js +26 -59
- package/dist/esm/image/components/NextImage.liquid.js +28 -116
- package/dist/esm/image/components/Video.liquid.js +38 -13
- package/dist/esm/image/components/common/attributes.js +108 -0
- package/dist/esm/image/components/common/classes.js +51 -0
- package/dist/esm/image/components/common/constants.js +11 -0
- package/dist/esm/image/components/common/data.js +22 -0
- package/dist/esm/image/components/common/helpers.js +69 -0
- package/dist/esm/image/components/common/styles.js +80 -0
- package/dist/esm/image/components/helpers/getNextImageLiquidAttrs.js +78 -0
- package/dist/esm/image/components/helpers/getNextImageReactAttrs.js +38 -0
- package/dist/esm/image/components/hooks/useCheckNoImage.js +23 -0
- package/dist/esm/image/helpers/getSrcSet.js +1 -2
- package/dist/esm/image/next.js +1 -5
- package/dist/esm/image/setting/configs/settings.js +14 -8
- package/dist/esm/image/setting/configs/uiV2.js +61 -15
- package/dist/esm/image/setting/index.js +1 -3
- package/dist/esm/image-comparison/components/CompareImage.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +1 -1
- package/dist/esm/index.js +4 -5
- package/dist/esm/index.liquid.js +3 -3
- package/dist/esm/post-purchase/callout-banner/setting/config/callout-box/setting.js +4 -10
- package/dist/esm/post-purchase/countdown-timer/components/PostPurchaseCountdownTimer.js +9 -23
- package/dist/esm/post-purchase/countdown-timer/components/TextCountdown.js +13 -27
- package/dist/esm/post-purchase/countdown-timer/components/common/getClasses.js +21 -0
- package/dist/esm/post-purchase/countdown-timer/components/common/getStyles.js +19 -0
- package/dist/esm/post-purchase/countdown-timer/hooks/useCountdownTimer.js +19 -3
- package/dist/esm/post-purchase/countdown-timer/hooks/useGetTimeExpired.js +16 -0
- package/dist/esm/post-purchase/countdown-timer/settings/CountdownTimer.js +9 -358
- package/dist/esm/post-purchase/countdown-timer/settings/config/preset.js +24 -0
- package/dist/esm/post-purchase/countdown-timer/settings/config/setting.js +241 -0
- package/dist/esm/post-purchase/countdown-timer/settings/config/uiV1.js +123 -0
- package/dist/esm/post-purchase/countdown-timer/settings/config/uiV2.js +183 -0
- package/dist/esm/post-purchase/image/common/getClasses.js +1 -1
- package/dist/esm/post-purchase/image/setting/setting-v2.js +5 -5
- package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +25 -27
- package/dist/esm/post-purchase/product/hooks/product-image/useListCarousel.js +1 -1
- package/dist/esm/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +4 -1
- package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +20 -7
- package/dist/esm/post-purchase/product/settings/product-image/uiV2.js +3 -1
- package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/settings.js +2 -2
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/post-purchase/utils/constants.js +1 -1
- package/dist/esm/product/components/FileUpload/components/common/index.js +3 -0
- package/dist/esm/product/components/ProductBundle/common/classes.js +19 -0
- package/dist/esm/product/components/ProductBundle/common/index.js +3 -0
- package/dist/esm/product/components/ProductBundle/common/styles.js +80 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscount.js +78 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscount.liquid.js +70 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +65 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +42 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountItem.js +19 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountItem.liquid.js +10 -0
- package/dist/esm/product/components/{ProductBundleDiscount.js → ProductBundle/hooks/useProductBundleDataState.js} +21 -216
- package/dist/esm/product/components/ProductBundle/hooks/useProductBundleDiscountState.js +52 -0
- package/dist/esm/product/{setting → components/ProductBundle/setting}/ProductBundleDiscount.js +7 -7
- package/dist/esm/product/{setting → components/ProductBundle/setting}/ProductBundleDiscountItem.js +3 -0
- package/dist/esm/product/components/ProductButton.js +1 -1
- package/dist/esm/product/components/ProductButton.liquid.js +1 -1
- package/dist/esm/product/components/ProductPrice/common/getAttr.js +21 -0
- package/dist/esm/product/components/ProductPrice/common/getClasses.js +17 -0
- package/dist/esm/product/components/ProductPrice/common/getTextData.js +38 -0
- package/dist/esm/product/components/ProductPrice/hooks/useGpPrice.js +124 -0
- package/dist/esm/product/components/ProductPrice/index.js +50 -0
- package/dist/esm/product/components/ProductPrice/index.liquid.js +38 -0
- package/dist/esm/product/components/ProductQuickView/ProductQuickView.js +1 -1
- package/dist/esm/product/next.js +3 -3
- package/dist/esm/product/setting/index.js +2 -2
- package/dist/esm/product/setting/product/configs/presets.js +1 -0
- package/dist/esm/product/setting/product-image-v2/configs/setting-v2/ProductFeatureImage.js +6 -7
- package/dist/esm/product/setting/product-image-v2/configs/setting-v2/ProductGalleryImage.js +11 -12
- package/dist/esm/product/setting/product-image-v2/configs/setting-v2/index.js +6 -5
- package/dist/esm/product/setting/product-list/configs/settingsV2.js +10 -8
- package/dist/esm/setting.js +5 -2
- package/dist/types/index.d.ts +173 -256
- package/package.json +2 -2
- package/dist/cjs/image/components/BackgroundImage.js +0 -102
- package/dist/cjs/image/components/Img.js +0 -28
- package/dist/cjs/image/components/helpers.js +0 -12
- package/dist/cjs/image/setting/BackgroundImage.js +0 -364
- package/dist/cjs/product/components/ProductBundleDiscount.liquid.js +0 -81
- package/dist/cjs/product/components/ProductBundleDiscountItem.js +0 -42
- package/dist/cjs/product/components/ProductBundleDiscountItem.liquid.js +0 -103
- package/dist/cjs/product/components/ProductPrice.js +0 -209
- package/dist/cjs/product/components/ProductPrice.liquid.js +0 -88
- package/dist/esm/image/components/BackgroundImage.js +0 -98
- package/dist/esm/image/components/Img.js +0 -24
- package/dist/esm/image/components/helpers.js +0 -9
- package/dist/esm/image/setting/BackgroundImage.js +0 -360
- package/dist/esm/product/components/ProductBundleDiscount.liquid.js +0 -77
- package/dist/esm/product/components/ProductBundleDiscountItem.js +0 -36
- package/dist/esm/product/components/ProductBundleDiscountItem.liquid.js +0 -99
- package/dist/esm/product/components/ProductPrice.js +0 -205
- package/dist/esm/product/components/ProductPrice.liquid.js +0 -83
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@gem-sdk/core');
|
|
6
|
+
var helpers = require('../../../helpers.js');
|
|
7
|
+
var Text_liquid = require('../../../text/components/Text.liquid.js');
|
|
8
|
+
var system = require('@gem-sdk/system');
|
|
9
|
+
var getClasses = require('./common/getClasses.js');
|
|
10
|
+
var getAttr = require('./common/getAttr.js');
|
|
11
|
+
var getTextData = require('./common/getTextData.js');
|
|
12
|
+
|
|
13
|
+
const ProductPrice = (props)=>{
|
|
14
|
+
const { style, setting, styles, builderProps } = props;
|
|
15
|
+
const wrapperClasses = system.createClass(getClasses.getWrapperClasses(props));
|
|
16
|
+
const wrapperAttrs = system.createAttr(getAttr.getAttrs(props));
|
|
17
|
+
const textProps = getTextData.getTextProps(props);
|
|
18
|
+
const stateData = system.createStateOrContext({
|
|
19
|
+
priceType: styles?.priceType,
|
|
20
|
+
uid: builderProps?.uid,
|
|
21
|
+
locale: `{{shop.locale}}`,
|
|
22
|
+
currency: `{{shop.currency}}`,
|
|
23
|
+
moneyFormat: `{{ ${setting?.moneyWithCurrentFormat ? 'shop.money_with_currency_format' : 'shop.money_format'} | replace: '"', '\\"' | escape }}`
|
|
24
|
+
});
|
|
25
|
+
const renderScript = ()=>{
|
|
26
|
+
const jsURL = core.isLocalEnv ? `{{ 'gp-product-price.js' | asset_url }}` : `${core.baseAssetURL}/assets-v2/gp-product-price.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;
|
|
27
|
+
return `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${jsURL}" defer="defer"></script>`;
|
|
28
|
+
};
|
|
29
|
+
return system.Liquid(core.template /*liquid*/ `
|
|
30
|
+
<gp-product-price
|
|
31
|
+
${wrapperAttrs}
|
|
32
|
+
class="${wrapperClasses}"
|
|
33
|
+
style="${style}"
|
|
34
|
+
gp-data='${core.dataStringify(stateData)}'
|
|
35
|
+
>
|
|
36
|
+
${Text_liquid.default(textProps)}
|
|
37
|
+
</gp-product-price>
|
|
38
|
+
${renderScript()}
|
|
39
|
+
`);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.ProductPrice = ProductPrice;
|
|
43
|
+
exports.default = ProductPrice;
|
|
@@ -11,9 +11,9 @@ require('../../../modal/components/confirm.js');
|
|
|
11
11
|
var Modal = require('../../../modal/components/Modal.js');
|
|
12
12
|
var core = require('@gem-sdk/core');
|
|
13
13
|
var ProductButton = require('../ProductButton.js');
|
|
14
|
-
var
|
|
14
|
+
var index$1 = require('../ProductPrice/index.js');
|
|
15
15
|
var ProductQuantity = require('../ProductQuantity.js');
|
|
16
|
-
var index$
|
|
16
|
+
var index$2 = require('../ProductVariants/index.js');
|
|
17
17
|
var ProductImages = require('../ProductImages.js');
|
|
18
18
|
var index = require('../ProductTitle/index.js');
|
|
19
19
|
|
|
@@ -96,7 +96,7 @@ const ModalContent = ()=>{
|
|
|
96
96
|
},
|
|
97
97
|
children: [
|
|
98
98
|
/*#__PURE__*/ jsxRuntime.jsx(Col.default, {
|
|
99
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(
|
|
99
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(index$1.default, {
|
|
100
100
|
styles: {
|
|
101
101
|
priceType: 'regular',
|
|
102
102
|
typography: {
|
|
@@ -106,7 +106,7 @@ const ModalContent = ()=>{
|
|
|
106
106
|
})
|
|
107
107
|
}),
|
|
108
108
|
/*#__PURE__*/ jsxRuntime.jsx(Col.default, {
|
|
109
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(
|
|
109
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(index$1.default, {
|
|
110
110
|
styles: {
|
|
111
111
|
typography: {
|
|
112
112
|
type: 'paragraph-2'
|
|
@@ -117,7 +117,7 @@ const ModalContent = ()=>{
|
|
|
117
117
|
})
|
|
118
118
|
]
|
|
119
119
|
}),
|
|
120
|
-
/*#__PURE__*/ jsxRuntime.jsx(index$
|
|
120
|
+
/*#__PURE__*/ jsxRuntime.jsx(index$2.default, {}),
|
|
121
121
|
/*#__PURE__*/ jsxRuntime.jsx(ProductQuantity.default, {}),
|
|
122
122
|
/*#__PURE__*/ jsxRuntime.jsx(ProductButton.default, {})
|
|
123
123
|
]
|
package/dist/cjs/product/next.js
CHANGED
|
@@ -20,7 +20,7 @@ const ProductQuantity = dynamic(()=>Promise.resolve().then(function () { return
|
|
|
20
20
|
const ProductDescription = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductDescription/index.js'); }), {
|
|
21
21
|
loading: Loading.default
|
|
22
22
|
});
|
|
23
|
-
const ProductPrice = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductPrice.js'); }), {
|
|
23
|
+
const ProductPrice = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductPrice/index.js'); }), {
|
|
24
24
|
loading: Loading.default
|
|
25
25
|
});
|
|
26
26
|
const ProductButton = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductButton.js'); }), {
|
|
@@ -62,10 +62,10 @@ const ProductViewMore = dynamic(()=>Promise.resolve().then(function () { return
|
|
|
62
62
|
const ProductBadge = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductBadge/index.js'); }), {
|
|
63
63
|
loading: Loading.default
|
|
64
64
|
});
|
|
65
|
-
const ProductBundleDiscount = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductBundleDiscount.js'); }), {
|
|
65
|
+
const ProductBundleDiscount = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductBundle/components/ProductBundleDiscount.js'); }), {
|
|
66
66
|
loading: Loading.default
|
|
67
67
|
});
|
|
68
|
-
const ProductBundleDiscountItem = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductBundleDiscountItem.js'); }), {
|
|
68
|
+
const ProductBundleDiscountItem = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductBundle/components/ProductBundleDiscountItem.js'); }), {
|
|
69
69
|
loading: Loading.default
|
|
70
70
|
});
|
|
71
71
|
const FileUpload = dynamic(()=>Promise.resolve().then(function () { return require('./components/FileUpload/components/UploadFile.js'); }), {
|
|
@@ -17,8 +17,8 @@ var ProductList = require('./ProductList.js');
|
|
|
17
17
|
var DynamicCheckout = require('./DynamicCheckout.js');
|
|
18
18
|
var Vendor = require('./Vendor.js');
|
|
19
19
|
var Sku = require('./Sku.js');
|
|
20
|
-
var ProductBundleDiscountItem = require('
|
|
21
|
-
var ProductBundleDiscount = require('
|
|
20
|
+
var ProductBundleDiscountItem = require('../components/ProductBundle/setting/ProductBundleDiscountItem.js');
|
|
21
|
+
var ProductBundleDiscount = require('../components/ProductBundle/setting/ProductBundleDiscount.js');
|
|
22
22
|
var ProductViewMore = require('./ProductViewMore.js');
|
|
23
23
|
var ProductBadge = require('./ProductBadge.js');
|
|
24
24
|
var index = require('../components/FileUpload/components/setting/index.js');
|
|
@@ -131,26 +131,25 @@ const productFeatureImageSetting = [
|
|
|
131
131
|
{
|
|
132
132
|
id: 'ftNavigationPosition',
|
|
133
133
|
label: 'Navigation',
|
|
134
|
-
type: '
|
|
135
|
-
iconViewBox: '0 0 78 48',
|
|
136
|
-
enableItemBackground: true,
|
|
134
|
+
type: 'option:illustration',
|
|
137
135
|
enableTooltip: true,
|
|
138
136
|
options: [
|
|
139
137
|
{
|
|
140
138
|
label: 'No navigation',
|
|
141
139
|
value: 'none',
|
|
142
|
-
type: 'slide-control'
|
|
143
|
-
isTextIcon: true
|
|
140
|
+
type: 'slide-control'
|
|
144
141
|
},
|
|
145
142
|
{
|
|
146
143
|
label: 'Display inside navigation',
|
|
147
144
|
value: 'inside',
|
|
148
|
-
type: 'slide-control'
|
|
145
|
+
type: 'slide-control',
|
|
146
|
+
svgName: 'gp-slide-control-inside'
|
|
149
147
|
},
|
|
150
148
|
{
|
|
151
149
|
label: 'Display outside navigation',
|
|
152
150
|
value: 'outside',
|
|
153
|
-
type: 'slide-control'
|
|
151
|
+
type: 'slide-control',
|
|
152
|
+
svgName: 'gp-slide-control-inside'
|
|
154
153
|
}
|
|
155
154
|
],
|
|
156
155
|
devices: getDefaultResponsive('none')
|
|
@@ -124,26 +124,25 @@ const productGalleryImageSetting = [
|
|
|
124
124
|
{
|
|
125
125
|
id: 'navigationPosition',
|
|
126
126
|
label: 'Navigation',
|
|
127
|
-
type: '
|
|
128
|
-
iconViewBox: '0 0 78 48',
|
|
129
|
-
enableItemBackground: true,
|
|
127
|
+
type: 'option:illustration',
|
|
130
128
|
enableTooltip: true,
|
|
131
129
|
options: [
|
|
132
130
|
{
|
|
133
131
|
label: 'No navigation',
|
|
134
132
|
value: 'none',
|
|
135
|
-
type: 'slide-control'
|
|
136
|
-
isTextIcon: true
|
|
133
|
+
type: 'slide-control'
|
|
137
134
|
},
|
|
138
135
|
{
|
|
139
136
|
label: 'Display inside navigation',
|
|
140
137
|
value: 'inside',
|
|
141
|
-
type: 'slide-control'
|
|
138
|
+
type: 'slide-control',
|
|
139
|
+
svgName: 'gp-slide-control-inside'
|
|
142
140
|
},
|
|
143
141
|
{
|
|
144
142
|
label: 'Display outside navigation',
|
|
145
143
|
value: 'outside',
|
|
146
|
-
type: 'slide-control'
|
|
144
|
+
type: 'slide-control',
|
|
145
|
+
svgName: 'gp-slide-control-inside'
|
|
147
146
|
}
|
|
148
147
|
],
|
|
149
148
|
devices: getDefaultResponsive('inside')
|
|
@@ -471,21 +470,21 @@ const productGalleryImageStyle = [
|
|
|
471
470
|
},
|
|
472
471
|
{
|
|
473
472
|
id: 'layout',
|
|
474
|
-
type: '
|
|
475
|
-
iconViewBox: '0 0 66 48',
|
|
476
|
-
enableItemBackground: true,
|
|
473
|
+
type: 'option:illustration',
|
|
477
474
|
enableTooltip: true,
|
|
478
475
|
label: 'Image scale',
|
|
479
476
|
options: [
|
|
480
477
|
{
|
|
481
478
|
label: 'Fill image',
|
|
482
479
|
value: 'cover',
|
|
483
|
-
type: 'image'
|
|
480
|
+
type: 'image',
|
|
481
|
+
svgName: 'gp-image-cover'
|
|
484
482
|
},
|
|
485
483
|
{
|
|
486
484
|
label: 'Fit image',
|
|
487
485
|
value: 'contain',
|
|
488
|
-
type: 'image'
|
|
486
|
+
type: 'image',
|
|
487
|
+
svgName: 'gp-image-contain'
|
|
489
488
|
}
|
|
490
489
|
],
|
|
491
490
|
devices: getDefaultResponsive('cover')
|
|
@@ -97,7 +97,7 @@ const ProductImageSettingsV2 = [
|
|
|
97
97
|
{
|
|
98
98
|
id: 'ftDotStyle',
|
|
99
99
|
label: 'Dot style',
|
|
100
|
-
type: '
|
|
100
|
+
type: 'option:illustration',
|
|
101
101
|
iconViewBox: '0 0 77 48',
|
|
102
102
|
enableItemBackground: true,
|
|
103
103
|
enableTooltip: true,
|
|
@@ -105,18 +105,19 @@ const ProductImageSettingsV2 = [
|
|
|
105
105
|
{
|
|
106
106
|
label: 'None',
|
|
107
107
|
value: 'none',
|
|
108
|
-
type: 'carousel-dot'
|
|
109
|
-
isTextIcon: true
|
|
108
|
+
type: 'carousel-dot'
|
|
110
109
|
},
|
|
111
110
|
{
|
|
112
111
|
label: 'Inside',
|
|
113
112
|
value: 'inside',
|
|
114
|
-
type: 'carousel-dot'
|
|
113
|
+
type: 'carousel-dot',
|
|
114
|
+
svgName: 'gp-carousel-dot-inside'
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
117
|
label: 'Outside',
|
|
118
118
|
value: 'outside',
|
|
119
|
-
type: 'carousel-dot'
|
|
119
|
+
type: 'carousel-dot',
|
|
120
|
+
svgName: 'gp-carousel-dot-outside'
|
|
120
121
|
}
|
|
121
122
|
],
|
|
122
123
|
devices: {
|
|
@@ -64,7 +64,7 @@ const ProductListSettingsV2 = [
|
|
|
64
64
|
{
|
|
65
65
|
id: 'dotStyle',
|
|
66
66
|
label: 'Dot style',
|
|
67
|
-
type: '
|
|
67
|
+
type: 'option:illustration',
|
|
68
68
|
iconViewBox: '0 0 77 48',
|
|
69
69
|
enableItemBackground: true,
|
|
70
70
|
enableTooltip: true,
|
|
@@ -72,12 +72,14 @@ const ProductListSettingsV2 = [
|
|
|
72
72
|
{
|
|
73
73
|
label: 'Inside',
|
|
74
74
|
value: 'inside',
|
|
75
|
-
type: 'carousel-dot'
|
|
75
|
+
type: 'carousel-dot',
|
|
76
|
+
svgName: 'gp-carousel-dot-inside'
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
label: 'Outside',
|
|
79
80
|
value: 'outside',
|
|
80
|
-
type: 'carousel-dot'
|
|
81
|
+
type: 'carousel-dot',
|
|
82
|
+
svgName: 'gp-carousel-dot-outside'
|
|
81
83
|
}
|
|
82
84
|
],
|
|
83
85
|
devices: {
|
|
@@ -162,20 +164,20 @@ const ProductListSettingsV2 = [
|
|
|
162
164
|
default: false
|
|
163
165
|
}
|
|
164
166
|
},
|
|
165
|
-
type: '
|
|
166
|
-
iconViewBox: '0 0 78 48',
|
|
167
|
-
enableItemBackground: true,
|
|
167
|
+
type: 'option:illustration',
|
|
168
168
|
enableTooltip: true,
|
|
169
169
|
options: [
|
|
170
170
|
{
|
|
171
171
|
label: 'Display inside navigation',
|
|
172
172
|
value: true,
|
|
173
|
-
iconName: 'slide-control-inside'
|
|
173
|
+
iconName: 'slide-control-inside',
|
|
174
|
+
svgName: 'gp-slide-control-inside'
|
|
174
175
|
},
|
|
175
176
|
{
|
|
176
177
|
label: 'Display outside navigation',
|
|
177
178
|
value: false,
|
|
178
|
-
iconName: 'slide-control-outside'
|
|
179
|
+
iconName: 'slide-control-outside',
|
|
180
|
+
svgName: 'gp-slide-control-outside'
|
|
179
181
|
}
|
|
180
182
|
]
|
|
181
183
|
},
|
package/dist/cjs/setting.js
CHANGED
|
@@ -6,11 +6,12 @@ var index = require('./accordion/setting/index.js');
|
|
|
6
6
|
require('react/jsx-runtime');
|
|
7
7
|
require('react');
|
|
8
8
|
require('@gem-sdk/core');
|
|
9
|
-
var index$m = require('./text/setting/index.js');
|
|
10
9
|
require('@gem-sdk/system');
|
|
11
|
-
|
|
10
|
+
require('./accordion/components/common/classes.js');
|
|
11
|
+
var index$m = require('./text/setting/index.js');
|
|
12
12
|
var index$f = require('./link/setting/index.js');
|
|
13
13
|
require('next/link');
|
|
14
|
+
var index$1 = require('./breadcrumb/setting/index.js');
|
|
14
15
|
var index$2 = require('./button/setting/index.js');
|
|
15
16
|
var index$3 = require('./coupon/setting/index.js');
|
|
16
17
|
var index$4 = require('./carousel/setting/index.js');
|
|
@@ -45,6 +46,8 @@ require('./notification/components/Notice.js');
|
|
|
45
46
|
require('./product/components/ProductQuickView/index.js');
|
|
46
47
|
require('./product/components/constants/product-bundle.js');
|
|
47
48
|
require('./product/components/ProductList.js');
|
|
49
|
+
require('./product/components/ProductBundle/common/styles.js');
|
|
50
|
+
require('./product/components/ProductBundle/common/classes.js');
|
|
48
51
|
require('./product/components/ProductBadge/constants.js');
|
|
49
52
|
require('./product/components/ProductBadge/utils/shape.js');
|
|
50
53
|
require('./product/components/ProductBadge/types.js');
|
|
@@ -1,192 +1,73 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useMemo, Children, isValidElement, cloneElement } from 'react';
|
|
4
|
+
import { makeStyleResponsive } from '@gem-sdk/core';
|
|
5
|
+
import { createStyle, createClass, createAttr } from '@gem-sdk/system';
|
|
6
|
+
import { getContainerStyles } from './common/styles.js';
|
|
7
|
+
import useAccordion from '../hooks/useAccordion.js';
|
|
8
|
+
import { getContainerClasses } from './common/classes.js';
|
|
5
9
|
|
|
6
|
-
const Accordion = ({ builderProps, builderAttrs, style, children, setting, styles })=>{
|
|
10
|
+
const Accordion = ({ builderProps, builderAttrs, style, children, setting, styles, advanced })=>{
|
|
7
11
|
const { align } = styles ?? {};
|
|
8
|
-
const
|
|
9
|
-
const {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
currentAccordions.current = composeActiveKeys;
|
|
49
|
-
}
|
|
50
|
-
}, [
|
|
51
|
-
activeKey,
|
|
52
|
-
expandItem
|
|
53
|
-
]);
|
|
54
|
-
useEffect(()=>{
|
|
55
|
-
if (!expandItem) {
|
|
56
|
-
setAccordions([]);
|
|
57
|
-
currentAccordions.current = [];
|
|
58
|
-
}
|
|
59
|
-
if (activeKey?.toString()?.toLowerCase() === 'all' && expandItem) {
|
|
60
|
-
const list = Array.from(Children?.map(children, (_, index)=>index.toString()));
|
|
61
|
-
setAccordions(list);
|
|
62
|
-
currentAccordions.current = list;
|
|
63
|
-
}
|
|
64
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
|
-
}, [
|
|
66
|
-
activeKey,
|
|
67
|
-
expandItem
|
|
68
|
-
]);
|
|
69
|
-
const setActive = (id)=>{
|
|
70
|
-
if (accordions.includes(id)) {
|
|
71
|
-
setAccordions([]);
|
|
72
|
-
currentAccordions.current = [];
|
|
73
|
-
} else {
|
|
74
|
-
setAccordions([
|
|
75
|
-
id
|
|
76
|
-
]);
|
|
77
|
-
currentAccordions.current = [
|
|
78
|
-
id
|
|
79
|
-
];
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const setToggle = (id)=>{
|
|
83
|
-
let newActive = [];
|
|
84
|
-
if (accordions.includes(id)) {
|
|
85
|
-
newActive = accordions.filter((accordion)=>accordion !== id);
|
|
86
|
-
} else {
|
|
87
|
-
newActive = [
|
|
88
|
-
...accordions,
|
|
89
|
-
id
|
|
90
|
-
];
|
|
91
|
-
}
|
|
92
|
-
setAccordions(newActive);
|
|
93
|
-
currentAccordions.current = newActive;
|
|
94
|
-
};
|
|
95
|
-
const handleDropdown = (id)=>{
|
|
96
|
-
expanded ? setToggle(id.toString()) : setActive(id.toString());
|
|
97
|
-
};
|
|
98
|
-
const filterStyles = useMemo(()=>{
|
|
99
|
-
const delList = [
|
|
100
|
-
'--mb',
|
|
101
|
-
'--mb-mobile',
|
|
102
|
-
'--mb-tablet',
|
|
103
|
-
'--d',
|
|
104
|
-
'--d-mobile',
|
|
105
|
-
'--d-tablet'
|
|
106
|
-
];
|
|
107
|
-
delList.forEach((element)=>{
|
|
108
|
-
delete style?.[element];
|
|
109
|
-
});
|
|
110
|
-
return style;
|
|
111
|
-
}, [
|
|
112
|
-
style
|
|
113
|
-
]);
|
|
114
|
-
useEffect(()=>{
|
|
115
|
-
const selector = `[data-id="${builderProps?.uid}"]`;
|
|
116
|
-
onListener({
|
|
117
|
-
event: 'gp:change-expanded-item-original',
|
|
118
|
-
selector
|
|
119
|
-
}, (params)=>{
|
|
120
|
-
const element = findElementIncludingSelf(ref.current || document, selector);
|
|
121
|
-
const { data, isRollback, key } = params || {};
|
|
122
|
-
if (data === undefined && isRollback) return;
|
|
123
|
-
if (isRollback) {
|
|
124
|
-
setAccordions(data);
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
let interactionAccordion = [
|
|
128
|
-
...currentAccordions.current
|
|
129
|
-
];
|
|
130
|
-
saveToElementInteractionData(element, key, JSON.stringify({
|
|
131
|
-
data: interactionAccordion
|
|
132
|
-
}));
|
|
133
|
-
const id = data.toString();
|
|
134
|
-
if (expanded) {
|
|
135
|
-
interactionAccordion = [
|
|
136
|
-
...interactionAccordion.filter((accordion)=>accordion !== id),
|
|
137
|
-
id
|
|
138
|
-
];
|
|
139
|
-
} else {
|
|
140
|
-
interactionAccordion = [
|
|
141
|
-
id
|
|
142
|
-
];
|
|
143
|
-
}
|
|
144
|
-
setAccordions(interactionAccordion);
|
|
12
|
+
const { childItem } = setting ?? {};
|
|
13
|
+
const { ref, mode, accordions, handleDropdown, activeKey } = useAccordion({
|
|
14
|
+
setting,
|
|
15
|
+
children,
|
|
16
|
+
builderProps
|
|
17
|
+
});
|
|
18
|
+
const createContainerStyles = createStyle({
|
|
19
|
+
...getContainerStyles(style, styles)
|
|
20
|
+
});
|
|
21
|
+
const createContainerClasses = createClass(getContainerClasses(advanced?.cssClass, mode));
|
|
22
|
+
const createContainerAttr = createAttr({
|
|
23
|
+
...builderAttrs,
|
|
24
|
+
'data-id': builderProps?.uid ?? ''
|
|
25
|
+
});
|
|
26
|
+
const createChildrenContainerStyles = createStyle({
|
|
27
|
+
...makeStyleResponsive('jc', align)
|
|
28
|
+
});
|
|
29
|
+
const createChildrenContainerClasses = createClass({
|
|
30
|
+
'gp-flex': true
|
|
31
|
+
});
|
|
32
|
+
const composeChildren = useMemo(()=>{
|
|
33
|
+
return Children.map(children, (child, index)=>{
|
|
34
|
+
if (!/*#__PURE__*/ isValidElement(child)) return child;
|
|
35
|
+
const childProps = {
|
|
36
|
+
...child.props,
|
|
37
|
+
index,
|
|
38
|
+
title: childItem?.[index],
|
|
39
|
+
accordions,
|
|
40
|
+
handleDropDown: handleDropdown,
|
|
41
|
+
parentSetting: setting,
|
|
42
|
+
parentStyle: styles,
|
|
43
|
+
activeKey,
|
|
44
|
+
childrenIcon: setting?.childConfig?.[index],
|
|
45
|
+
parentUid: builderProps?.uid
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/ jsx("div", {
|
|
48
|
+
className: createChildrenContainerClasses,
|
|
49
|
+
style: createChildrenContainerStyles,
|
|
50
|
+
children: /*#__PURE__*/ cloneElement(child, childProps)
|
|
51
|
+
});
|
|
145
52
|
});
|
|
146
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
147
|
-
}, []);
|
|
148
|
-
useEffect(()=>{
|
|
149
|
-
currentAccordions.current = accordions;
|
|
150
53
|
}, [
|
|
151
|
-
accordions
|
|
54
|
+
accordions,
|
|
55
|
+
activeKey,
|
|
56
|
+
builderProps?.uid,
|
|
57
|
+
childItem,
|
|
58
|
+
children,
|
|
59
|
+
createChildrenContainerClasses,
|
|
60
|
+
createChildrenContainerStyles,
|
|
61
|
+
handleDropdown,
|
|
62
|
+
setting,
|
|
63
|
+
styles
|
|
152
64
|
]);
|
|
153
65
|
return /*#__PURE__*/ jsx("div", {
|
|
154
|
-
...
|
|
66
|
+
...createContainerAttr,
|
|
155
67
|
ref: ref,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}),
|
|
160
|
-
style: {
|
|
161
|
-
...filterStyles,
|
|
162
|
-
...contentSizePaddingSize.gap,
|
|
163
|
-
...getStyleBackgroundByDevice(style?.backgroundContent),
|
|
164
|
-
borderRadius: 'inherit',
|
|
165
|
-
overflow: 'hidden'
|
|
166
|
-
},
|
|
167
|
-
children: Children.map(children, (child, index)=>{
|
|
168
|
-
if (/*#__PURE__*/ isValidElement(child)) {
|
|
169
|
-
return /*#__PURE__*/ jsx("div", {
|
|
170
|
-
className: "gp-flex",
|
|
171
|
-
style: {
|
|
172
|
-
...makeStyleResponsive('jc', align)
|
|
173
|
-
},
|
|
174
|
-
children: /*#__PURE__*/ jsx(child.type, {
|
|
175
|
-
...child.props,
|
|
176
|
-
index: index,
|
|
177
|
-
title: childItem?.[index],
|
|
178
|
-
accordions: accordions,
|
|
179
|
-
handleDropDown: handleDropdown,
|
|
180
|
-
parentSetting: setting,
|
|
181
|
-
parentStyle: styles,
|
|
182
|
-
activeKey: activeKey,
|
|
183
|
-
childrenIcon: setting?.childConfig?.[index],
|
|
184
|
-
parentUid: builderProps?.uid
|
|
185
|
-
})
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
return child;
|
|
189
|
-
})
|
|
68
|
+
className: createContainerClasses,
|
|
69
|
+
style: createContainerStyles,
|
|
70
|
+
children: composeChildren
|
|
190
71
|
});
|
|
191
72
|
};
|
|
192
73
|
|