@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
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var core = require('@gem-sdk/core');
|
|
8
8
|
var Image = require('../../image/components/Image.js');
|
|
9
|
-
require('next/image');
|
|
10
|
-
require('react');
|
|
11
9
|
|
|
12
10
|
const CartLineImage = ({ className, style, setting = {}, styles = {}, builderProps })=>{
|
|
13
11
|
const line = core.useCartLine();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@gem-sdk/core');
|
|
4
|
+
|
|
5
|
+
const getCodeClasses = (uid, condition, cssClass)=>{
|
|
6
|
+
return core.composeClasses(core.cls(uid, {
|
|
7
|
+
'gp-sr-only': condition
|
|
8
|
+
}, 'gp-cursor-pointer', cssClass));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
exports.getCodeClasses = getCodeClasses;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@gem-sdk/core');
|
|
4
|
+
|
|
5
|
+
const getCodeStyle = (style, setting, isLiquid)=>{
|
|
6
|
+
return {
|
|
7
|
+
...style,
|
|
8
|
+
...core.makeStyleResponsive('ta', setting?.align),
|
|
9
|
+
...core.getStyleBackgroundByDevice(setting?.background, {
|
|
10
|
+
liquid: isLiquid
|
|
11
|
+
})
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.getCodeStyle = getCodeStyle;
|
|
@@ -4,101 +4,17 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var React = require('react');
|
|
8
|
-
var core = require('@gem-sdk/core');
|
|
9
7
|
var Head = require('next/head');
|
|
8
|
+
var useCSSCode = require('../hooks/useCSSCode.js');
|
|
9
|
+
var system = require('@gem-sdk/system');
|
|
10
|
+
var styles = require('../common/styles.js');
|
|
11
|
+
var classes = require('../common/classes.js');
|
|
10
12
|
|
|
11
|
-
const EMPTY_TAGS = [
|
|
12
|
-
'SCRIPT'
|
|
13
|
-
];
|
|
14
|
-
const ALLOWED_EMPTY_TAG = [
|
|
15
|
-
'EMBED',
|
|
16
|
-
'IMG',
|
|
17
|
-
'INPUT',
|
|
18
|
-
'PICTURE',
|
|
19
|
-
'VIDEO'
|
|
20
|
-
];
|
|
21
13
|
const CSSCode = ({ setting, style, advanced, builderAttrs, builderProps, children })=>{
|
|
22
14
|
const { editorData } = advanced;
|
|
23
|
-
const mode =
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
<span>${editorData?.customLabel || 'Custom Code'}</span>
|
|
27
|
-
${css || javascript || html ? '<span class="gp-text-[#676767] gp-text-12 gp-leading-5">Preview or Publish the page to see the content.</span>' : ``}</p>`;
|
|
28
|
-
}, [
|
|
29
|
-
editorData?.customLabel
|
|
30
|
-
]);
|
|
31
|
-
const getHtmlContent = (html, javascript)=>{
|
|
32
|
-
const $element = document.createElement('div');
|
|
33
|
-
$element.innerHTML = html;
|
|
34
|
-
const childrenRoot = $element.childNodes;
|
|
35
|
-
let hasScript = false;
|
|
36
|
-
let empty = true;
|
|
37
|
-
if (childrenRoot.length > 0) {
|
|
38
|
-
childrenRoot.forEach((child)=>{
|
|
39
|
-
//@ts-expect-error
|
|
40
|
-
if (EMPTY_TAGS.includes(child?.tagName)) {
|
|
41
|
-
hasScript = true;
|
|
42
|
-
child?.remove();
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const children = $element.childNodes;
|
|
46
|
-
children.forEach((child)=>{
|
|
47
|
-
//@ts-expect-error
|
|
48
|
-
if (ALLOWED_EMPTY_TAG.includes(child?.tagName)) {
|
|
49
|
-
empty = false;
|
|
50
|
-
} else if (child?.nodeName !== '#comment') {
|
|
51
|
-
const content = child?.textContent?.trim();
|
|
52
|
-
if (content) {
|
|
53
|
-
empty = false;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
if (empty) {
|
|
59
|
-
empty = !$element?.textContent?.trim();
|
|
60
|
-
}
|
|
61
|
-
if (javascript) {
|
|
62
|
-
hasScript = true;
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
empty,
|
|
66
|
-
hasScript
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
const htmlPlainText = React.useMemo(()=>{
|
|
70
|
-
if (mode === 'edit') {
|
|
71
|
-
const { empty, hasScript } = getHtmlContent(editorData?.html || '', editorData?.javascript || '');
|
|
72
|
-
if (hasScript) {
|
|
73
|
-
return `<p class="gp-text-center gp-text-sm gp-font-[sans-serif] gp-py-4 gp-leading-[21px] gp-text-[#676767] gp-bg-[#eee]">
|
|
74
|
-
Publish the page to see the content.
|
|
75
|
-
</p>`;
|
|
76
|
-
}
|
|
77
|
-
if (empty) {
|
|
78
|
-
return getEmptyContent(editorData?.css || '', editorData?.javascript || '', editorData?.html || '');
|
|
79
|
-
}
|
|
80
|
-
return editorData?.html?.trim();
|
|
81
|
-
}
|
|
82
|
-
return editorData?.html?.trim();
|
|
83
|
-
}, [
|
|
84
|
-
editorData?.css,
|
|
85
|
-
editorData?.html,
|
|
86
|
-
editorData?.javascript,
|
|
87
|
-
mode,
|
|
88
|
-
getEmptyContent
|
|
89
|
-
]);
|
|
90
|
-
const handleDoubleClickCustomCode = (e)=>{
|
|
91
|
-
switch(e.detail){
|
|
92
|
-
case 2:
|
|
93
|
-
{
|
|
94
|
-
const event = new CustomEvent('editor:toolbar:open-custom-code', {
|
|
95
|
-
bubbles: true
|
|
96
|
-
});
|
|
97
|
-
window.dispatchEvent(event);
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
15
|
+
const { handleDoubleClickCustomCode, htmlPlainText, mode } = useCSSCode.default(advanced);
|
|
16
|
+
const composeCodeStyle = system.createStyle(styles.getCodeStyle(style, setting, false));
|
|
17
|
+
const composeCodeClasses = system.createClass(classes.getCodeClasses(builderProps?.uid, mode !== 'edit' && !editorData?.html, advanced?.cssClass));
|
|
102
18
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
103
19
|
children: [
|
|
104
20
|
/*#__PURE__*/ jsxRuntime.jsx(Head, {
|
|
@@ -125,15 +41,9 @@ const CSSCode = ({ setting, style, advanced, builderAttrs, builderProps, childre
|
|
|
125
41
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
126
42
|
onClick: handleDoubleClickCustomCode,
|
|
127
43
|
"aria-hidden": "true",
|
|
128
|
-
style:
|
|
129
|
-
...style,
|
|
130
|
-
...core.makeStyleResponsive('ta', setting?.align),
|
|
131
|
-
...core.getStyleBackgroundByDevice(setting?.background)
|
|
132
|
-
},
|
|
44
|
+
style: composeCodeStyle,
|
|
133
45
|
...builderAttrs,
|
|
134
|
-
className:
|
|
135
|
-
'gp-sr-only': mode !== 'edit' && !editorData?.html
|
|
136
|
-
}, 'gp-cursor-pointer'),
|
|
46
|
+
className: composeCodeClasses,
|
|
137
47
|
children: [
|
|
138
48
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
139
49
|
dangerouslySetInnerHTML: {
|
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var core = require('@gem-sdk/core');
|
|
6
|
+
var styles = require('../common/styles.js');
|
|
7
|
+
var system = require('@gem-sdk/system');
|
|
8
|
+
var classes = require('../common/classes.js');
|
|
6
9
|
|
|
7
10
|
const CSSCode = ({ setting, style, advanced, builderAttrs, builderProps })=>{
|
|
8
11
|
const { background, preloadBgImage } = setting ?? {};
|
|
9
12
|
const editorData = advanced?.editorData;
|
|
10
13
|
const htmlPlainText = editorData?.html?.trim();
|
|
14
|
+
const composeCodeStyle = system.createStyle(styles.getCodeStyle(style, setting, true));
|
|
15
|
+
const composeCodeClasses = system.createClass(classes.getCodeClasses(builderProps?.uid, !editorData?.html && !background, advanced?.cssClass));
|
|
11
16
|
return core.template`
|
|
12
17
|
${core.RenderIf(!!preloadBgImage, `${core.RenderIf(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}${core.RenderIf(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}${core.RenderIf(!!background?.mobile?.image?.src, `<link rel="preload" href="${background?.mobile?.image?.src}" as="image" />`)}`)}
|
|
13
18
|
<div
|
|
14
19
|
${{
|
|
15
20
|
...builderAttrs
|
|
16
21
|
}}
|
|
17
|
-
style="${
|
|
18
|
-
...style,
|
|
19
|
-
...core.getStyleBackgroundByDevice(background, {
|
|
20
|
-
liquid: true
|
|
21
|
-
}),
|
|
22
|
-
...core.makeStyleResponsive('ta', setting?.align)
|
|
23
|
-
}}"
|
|
22
|
+
style="${composeCodeStyle}"
|
|
24
23
|
data-keep-class="true"
|
|
25
|
-
class="${
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
class="${composeCodeClasses}">
|
|
25
|
+
<div>
|
|
26
|
+
${htmlPlainText}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
29
|
`;
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@gem-sdk/core');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
|
|
8
|
+
const EMPTY_TAGS = [
|
|
9
|
+
'SCRIPT'
|
|
10
|
+
];
|
|
11
|
+
const ALLOWED_EMPTY_TAG = [
|
|
12
|
+
'EMBED',
|
|
13
|
+
'IMG',
|
|
14
|
+
'INPUT',
|
|
15
|
+
'PICTURE',
|
|
16
|
+
'VIDEO'
|
|
17
|
+
];
|
|
18
|
+
const useCSSCode = (advanced)=>{
|
|
19
|
+
const mode = core.useEditorMode();
|
|
20
|
+
const { editorData } = advanced;
|
|
21
|
+
const getEmptyContent = React.useCallback((css, javascript, html)=>{
|
|
22
|
+
return `<p class="gp-text-center gp-text-sm gp-py-4 gp-leading-6 gp-text-light-500 gp-flex gp-flex-col gp-gap-[4px]">
|
|
23
|
+
<span>${editorData?.customLabel || 'Custom Code'}</span>
|
|
24
|
+
${css || javascript || html ? '<span class="gp-text-[#676767] gp-text-12 gp-leading-5">Preview or Publish the page to see the content.</span>' : ``}</p>`;
|
|
25
|
+
}, [
|
|
26
|
+
editorData?.customLabel
|
|
27
|
+
]);
|
|
28
|
+
const getHtmlContent = (html, javascript)=>{
|
|
29
|
+
const $element = document.createElement('div');
|
|
30
|
+
$element.innerHTML = html;
|
|
31
|
+
const childrenRoot = $element.childNodes;
|
|
32
|
+
let hasScript = false;
|
|
33
|
+
let empty = true;
|
|
34
|
+
if (childrenRoot.length > 0) {
|
|
35
|
+
childrenRoot.forEach((child)=>{
|
|
36
|
+
//@ts-expect-error
|
|
37
|
+
if (EMPTY_TAGS.includes(child?.tagName)) {
|
|
38
|
+
hasScript = true;
|
|
39
|
+
child?.remove();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const children = $element.childNodes;
|
|
43
|
+
children.forEach((child)=>{
|
|
44
|
+
//@ts-expect-error
|
|
45
|
+
if (ALLOWED_EMPTY_TAG.includes(child?.tagName)) {
|
|
46
|
+
empty = false;
|
|
47
|
+
} else if (child?.nodeName !== '#comment') {
|
|
48
|
+
const content = child?.textContent?.trim();
|
|
49
|
+
if (content) {
|
|
50
|
+
empty = false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (empty) {
|
|
56
|
+
empty = !$element?.textContent?.trim();
|
|
57
|
+
}
|
|
58
|
+
if (javascript) {
|
|
59
|
+
hasScript = true;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
empty,
|
|
63
|
+
hasScript
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
const htmlPlainText = React.useMemo(()=>{
|
|
67
|
+
if (mode === 'edit') {
|
|
68
|
+
const { empty, hasScript } = getHtmlContent(editorData?.html || '', editorData?.javascript || '');
|
|
69
|
+
if (hasScript) {
|
|
70
|
+
return `<p class="gp-text-center gp-text-sm gp-font-[sans-serif] gp-py-4 gp-leading-[21px] gp-text-[#676767] gp-bg-[#eee]">
|
|
71
|
+
Publish the page to see the content.
|
|
72
|
+
</p>`;
|
|
73
|
+
}
|
|
74
|
+
if (empty) {
|
|
75
|
+
return getEmptyContent(editorData?.css || '', editorData?.javascript || '', editorData?.html || '');
|
|
76
|
+
}
|
|
77
|
+
return editorData?.html?.trim();
|
|
78
|
+
}
|
|
79
|
+
return editorData?.html?.trim();
|
|
80
|
+
}, [
|
|
81
|
+
editorData?.css,
|
|
82
|
+
editorData?.html,
|
|
83
|
+
editorData?.javascript,
|
|
84
|
+
mode,
|
|
85
|
+
getEmptyContent
|
|
86
|
+
]);
|
|
87
|
+
const handleDoubleClickCustomCode = (e)=>{
|
|
88
|
+
if (e.detail === 2) {
|
|
89
|
+
const event = new CustomEvent('editor:toolbar:open-custom-code', {
|
|
90
|
+
bubbles: true
|
|
91
|
+
});
|
|
92
|
+
window.dispatchEvent(event);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
return {
|
|
96
|
+
mode,
|
|
97
|
+
htmlPlainText,
|
|
98
|
+
handleDoubleClickCustomCode
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
exports.default = useCSSCode;
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var setting = require('./config/setting.js');
|
|
6
|
+
var uiV1 = require('./config/uiV1.js');
|
|
7
|
+
var uiV2 = require('./config/uiV2.js');
|
|
8
|
+
|
|
5
9
|
const config = {
|
|
6
10
|
tag: 'CSSCode',
|
|
7
11
|
label: 'Custom Code',
|
|
@@ -9,127 +13,9 @@ const config = {
|
|
|
9
13
|
icon: `
|
|
10
14
|
<svg width="40" viewBox="0 0 24 24"><path fill="currentColor" d="m24 12l-5.657 5.657l-1.414-1.414L21.172 12l-4.243-4.243l1.414-1.414L24 12zM2.828 12l4.243 4.243l-1.414 1.414L0 12l5.657-5.657L7.07 7.757L2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"/></svg>
|
|
11
15
|
`,
|
|
12
|
-
settings:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
controls: [
|
|
16
|
-
{
|
|
17
|
-
id: 'editorData',
|
|
18
|
-
type: 'customCodeEditor'
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 'background',
|
|
22
|
-
type: 'background',
|
|
23
|
-
label: 'Background',
|
|
24
|
-
devices: {
|
|
25
|
-
desktop: {
|
|
26
|
-
default: {
|
|
27
|
-
type: 'color',
|
|
28
|
-
color: 'transparent',
|
|
29
|
-
image: {
|
|
30
|
-
src: '',
|
|
31
|
-
width: 0,
|
|
32
|
-
height: 0
|
|
33
|
-
},
|
|
34
|
-
size: 'cover',
|
|
35
|
-
position: {
|
|
36
|
-
x: 50,
|
|
37
|
-
y: 50
|
|
38
|
-
},
|
|
39
|
-
repeat: 'no-repeat',
|
|
40
|
-
attachment: 'scroll'
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: 'align',
|
|
47
|
-
label: 'Alignment',
|
|
48
|
-
type: 'segment',
|
|
49
|
-
options: [
|
|
50
|
-
{
|
|
51
|
-
label: 'Left',
|
|
52
|
-
value: 'left',
|
|
53
|
-
type: 'align'
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: 'Center',
|
|
57
|
-
value: 'center',
|
|
58
|
-
type: 'align'
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: 'Right',
|
|
62
|
-
value: 'right',
|
|
63
|
-
type: 'align'
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
devices: {
|
|
67
|
-
desktop: {
|
|
68
|
-
default: 'left'
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: 'preloadBgImage',
|
|
74
|
-
type: 'toggle',
|
|
75
|
-
label: 'Preload',
|
|
76
|
-
default: false
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
id: 'style',
|
|
82
|
-
controls: []
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
ui: [
|
|
86
|
-
{
|
|
87
|
-
type: 'control',
|
|
88
|
-
setting: {
|
|
89
|
-
id: 'editorData'
|
|
90
|
-
},
|
|
91
|
-
layout: 'vertical'
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
type: 'group',
|
|
95
|
-
controls: [
|
|
96
|
-
{
|
|
97
|
-
type: 'control',
|
|
98
|
-
setting: {
|
|
99
|
-
id: 'background'
|
|
100
|
-
},
|
|
101
|
-
label: {
|
|
102
|
-
en: 'Background'
|
|
103
|
-
},
|
|
104
|
-
layout: 'vertical',
|
|
105
|
-
options: {
|
|
106
|
-
styleLabel: {
|
|
107
|
-
marginBottom: '4px'
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
label: {
|
|
113
|
-
en: 'Preload'
|
|
114
|
-
},
|
|
115
|
-
type: 'control',
|
|
116
|
-
setting: {
|
|
117
|
-
id: 'preloadBgImage'
|
|
118
|
-
},
|
|
119
|
-
condition: 'background.type == "image"'
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
type: 'control',
|
|
125
|
-
label: {
|
|
126
|
-
en: 'Align'
|
|
127
|
-
},
|
|
128
|
-
setting: {
|
|
129
|
-
id: 'align'
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
],
|
|
16
|
+
settings: setting.SettingCode,
|
|
17
|
+
ui: uiV1.SettingUIV1,
|
|
18
|
+
uiV2: uiV2.SettingUIV2,
|
|
133
19
|
editorConfigs: {
|
|
134
20
|
sideBar: {
|
|
135
21
|
tab: {
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const SettingCode = [
|
|
4
|
+
{
|
|
5
|
+
id: 'setting',
|
|
6
|
+
controls: [
|
|
7
|
+
{
|
|
8
|
+
id: 'editorData',
|
|
9
|
+
type: 'customCodeEditor'
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: 'background',
|
|
13
|
+
type: 'background',
|
|
14
|
+
label: 'Background',
|
|
15
|
+
devices: {
|
|
16
|
+
desktop: {
|
|
17
|
+
default: {
|
|
18
|
+
type: 'color',
|
|
19
|
+
color: 'transparent',
|
|
20
|
+
image: {
|
|
21
|
+
src: '',
|
|
22
|
+
width: 0,
|
|
23
|
+
height: 0
|
|
24
|
+
},
|
|
25
|
+
size: 'cover',
|
|
26
|
+
position: {
|
|
27
|
+
x: 50,
|
|
28
|
+
y: 50
|
|
29
|
+
},
|
|
30
|
+
repeat: 'no-repeat',
|
|
31
|
+
attachment: 'scroll'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'align',
|
|
38
|
+
label: 'Alignment',
|
|
39
|
+
type: 'segment',
|
|
40
|
+
options: [
|
|
41
|
+
{
|
|
42
|
+
label: 'Left',
|
|
43
|
+
value: 'left',
|
|
44
|
+
type: 'align'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'Center',
|
|
48
|
+
value: 'center',
|
|
49
|
+
type: 'align'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: 'Right',
|
|
53
|
+
value: 'right',
|
|
54
|
+
type: 'align'
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
devices: {
|
|
58
|
+
desktop: {
|
|
59
|
+
default: 'left'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'preloadBgImage',
|
|
65
|
+
type: 'toggle',
|
|
66
|
+
label: 'Preload',
|
|
67
|
+
default: false
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'style',
|
|
73
|
+
controls: []
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
exports.SettingCode = SettingCode;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const SettingUIV1 = [
|
|
4
|
+
{
|
|
5
|
+
type: 'control',
|
|
6
|
+
setting: {
|
|
7
|
+
id: 'editorData'
|
|
8
|
+
},
|
|
9
|
+
layout: 'vertical'
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
type: 'group',
|
|
13
|
+
controls: [
|
|
14
|
+
{
|
|
15
|
+
type: 'control',
|
|
16
|
+
setting: {
|
|
17
|
+
id: 'background'
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
en: 'Background'
|
|
21
|
+
},
|
|
22
|
+
layout: 'vertical',
|
|
23
|
+
options: {
|
|
24
|
+
styleLabel: {
|
|
25
|
+
marginBottom: '4px'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: {
|
|
31
|
+
en: 'Preload'
|
|
32
|
+
},
|
|
33
|
+
type: 'control',
|
|
34
|
+
setting: {
|
|
35
|
+
id: 'preloadBgImage'
|
|
36
|
+
},
|
|
37
|
+
condition: 'background.type == "image"'
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: 'control',
|
|
43
|
+
label: {
|
|
44
|
+
en: 'Align'
|
|
45
|
+
},
|
|
46
|
+
setting: {
|
|
47
|
+
id: 'align'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
exports.SettingUIV1 = SettingUIV1;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const SettingUIV2 = [
|
|
4
|
+
{
|
|
5
|
+
controls: [
|
|
6
|
+
{
|
|
7
|
+
type: 'control',
|
|
8
|
+
setting: {
|
|
9
|
+
id: 'editorData'
|
|
10
|
+
},
|
|
11
|
+
layout: 'vertical'
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
controls: [
|
|
17
|
+
{
|
|
18
|
+
type: 'control',
|
|
19
|
+
setting: {
|
|
20
|
+
id: 'background'
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
en: 'Background'
|
|
24
|
+
},
|
|
25
|
+
layout: 'vertical'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: {
|
|
29
|
+
en: 'Preload'
|
|
30
|
+
},
|
|
31
|
+
type: 'control',
|
|
32
|
+
setting: {
|
|
33
|
+
id: 'preloadBgImage'
|
|
34
|
+
},
|
|
35
|
+
conditionDisplay: 'background.type == "image"'
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
controls: [
|
|
41
|
+
{
|
|
42
|
+
label: {
|
|
43
|
+
en: 'Align'
|
|
44
|
+
},
|
|
45
|
+
type: 'control',
|
|
46
|
+
setting: {
|
|
47
|
+
id: 'align'
|
|
48
|
+
},
|
|
49
|
+
options: {
|
|
50
|
+
labelVariant: 'primary',
|
|
51
|
+
fullWidth: true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
exports.SettingUIV2 = SettingUIV2;
|
|
@@ -8,13 +8,16 @@ var helpers = require('../../helpers.js');
|
|
|
8
8
|
require('react/jsx-runtime');
|
|
9
9
|
require('react');
|
|
10
10
|
require('next/link');
|
|
11
|
-
require('../../product/components/ProductVariants/variants/index.js');
|
|
12
11
|
var Text_liquid = require('../../text/components/Text.liquid.js');
|
|
12
|
+
require('../../product/components/ProductVariants/variants/index.js');
|
|
13
|
+
require('../../product/components/ProductBundle/common/styles.js');
|
|
14
|
+
require('../../product/components/ProductBundle/common/classes.js');
|
|
13
15
|
require('../../product/components/ProductBadge/constants.js');
|
|
14
16
|
require('../../product/components/constants/product-bundle.js');
|
|
15
17
|
require('../../product/components/ProductBadge/types.js');
|
|
16
18
|
require('../../product/components/ProductBadge/utils/shape.js');
|
|
17
19
|
require('../../accordion/setting/configs/settings.js');
|
|
20
|
+
require('../../accordion/components/common/classes.js');
|
|
18
21
|
require('@gem-sdk/keen-slider/react');
|
|
19
22
|
require('next/head');
|
|
20
23
|
require('next/image');
|
|
@@ -6,9 +6,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var core = require('@gem-sdk/core');
|
|
8
8
|
var ChildrenDroppable = require('../../../grid/components/ChildrenDroppable.js');
|
|
9
|
+
var composeStyles = require('./common/composeStyles.js');
|
|
10
|
+
var system = require('@gem-sdk/system');
|
|
9
11
|
|
|
10
|
-
const ContactForm = ({ children })=>{
|
|
11
|
-
|
|
12
|
+
const ContactForm = ({ children, styles, setting })=>{
|
|
13
|
+
const containerStyle = system.createStyle(composeStyles.composeContainerStyles(setting, styles));
|
|
14
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
15
|
+
style: containerStyle,
|
|
12
16
|
children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : children
|
|
13
17
|
});
|
|
14
18
|
};
|