@gem-sdk/components 2.0.0-dev.294 → 2.0.0-dev.303
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/common/index.js +2 -2
- package/dist/cjs/article/components/ArticleAuthor.js +1 -1
- package/dist/cjs/article/components/ArticleTitle.js +3 -1
- package/dist/cjs/article/components/ArticleTitle.liquid.js +5 -2
- package/dist/cjs/article/setting/ArticleList.js +0 -30
- package/dist/cjs/article/setting/configs/ArticleAuthor/presets.js +0 -9
- package/dist/cjs/article/setting/configs/ArticleAuthor/settings.js +9 -5
- package/dist/cjs/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
- package/dist/cjs/article/setting/configs/ArticleCategory/presets.js +0 -9
- package/dist/cjs/article/setting/configs/ArticleCategory/settings.js +9 -5
- package/dist/cjs/article/setting/configs/ArticleDate/presets.js +0 -9
- package/dist/cjs/article/setting/configs/ArticleDate/settings.js +9 -5
- package/dist/cjs/article/setting/configs/ArticleImage/settings.js +22 -1
- package/dist/cjs/article/setting/configs/ArticleTitle/settings.js +36 -7
- package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +47 -2
- package/dist/cjs/builder.js +6 -2
- package/dist/cjs/button/components/Button.js +1 -1
- package/dist/cjs/button/components/Button.liquid.js +1 -1
- package/dist/cjs/button/components/ButtonIcon.liquid.js +3 -1
- package/dist/cjs/button/components/ButtonLabel.liquid.js +3 -1
- package/dist/cjs/button/components/common/attributes.js +2 -2
- package/dist/cjs/button/components/common/classes.js +2 -1
- package/dist/cjs/button/components/common/styles.js +9 -11
- package/dist/cjs/button/setting/configs/settings.js +7 -8
- package/dist/cjs/button/setting/configs/uiV2.js +4 -50
- package/dist/cjs/dialog/components/Dialog.js +109 -394
- package/dist/cjs/dialog/components/Dialog.liquid.js +129 -153
- package/dist/cjs/dialog/components/common/common.js +130 -0
- package/dist/cjs/dialog/components/common/getAttr.js +27 -0
- package/dist/cjs/dialog/components/common/getClasses.js +88 -0
- package/dist/cjs/dialog/components/common/getStyle.js +107 -0
- package/dist/cjs/dialog/components/hooks/useDialog.js +233 -0
- package/dist/cjs/dialog/setting/configs/settings.js +1 -1
- package/dist/cjs/dialog/setting/configs/uiV2.js +35 -25
- package/dist/cjs/form/components/form-checkbox/FormCheckbox.js +0 -4
- package/dist/cjs/form/components/textinput/TextInput.js +58 -0
- package/dist/cjs/form/components/textinput/TextInput.liquid.js +60 -0
- package/dist/cjs/form/components/textinput/common/composeClasses.js +33 -0
- package/dist/cjs/form/components/textinput/common/composeStyles.js +70 -0
- package/dist/cjs/form/next.js +5 -1
- package/dist/cjs/form/setting/index.js +3 -1
- package/dist/cjs/form/setting/newsletter/configs/settings.js +4 -2
- package/dist/cjs/form/setting/newsletter/configs/uiV2.js +2 -0
- package/dist/cjs/form/setting/text-input/TextInput.js +53 -0
- package/dist/cjs/form/setting/text-input/configs/settings.js +307 -0
- package/dist/cjs/form/setting/text-input/configs/uiV1.js +106 -0
- package/dist/cjs/form/setting/text-input/configs/uiV2.js +303 -0
- package/dist/cjs/grid/row/setting/configs/settings.js +6 -3
- package/dist/cjs/helpers.js +8 -0
- package/dist/cjs/icon-list/common/attrs.js +10 -0
- package/dist/cjs/icon-list/common/classes.js +9 -0
- package/dist/cjs/icon-list/common/styles.js +29 -0
- package/dist/cjs/icon-list/components/IconList.js +19 -30
- package/dist/cjs/icon-list/components/IconList.liquid.js +21 -24
- package/dist/cjs/icon-list/components/IconListItem.js +13 -7
- package/dist/cjs/icon-list/components/IconListItem.liquid.js +13 -7
- package/dist/cjs/icon-list-hoz/components/IconListHoz.js +37 -25
- package/dist/cjs/icon-list-hoz/components/IconListHoz.liquid.js +31 -25
- package/dist/cjs/icon-list-hoz/components/IconListHozItem.js +12 -6
- package/dist/cjs/icon-list-hoz/components/IconListIHozItem.liquid.js +26 -0
- package/dist/cjs/icon-list-hoz/components/common/getAttr.js +9 -0
- package/dist/cjs/icon-list-hoz/components/common/getClasses.js +24 -0
- package/dist/cjs/icon-list-hoz/components/common/getStyle.js +30 -0
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/index.liquid.js +7 -3
- package/dist/cjs/line/common/classes.js +66 -0
- package/dist/cjs/line/common/index.js +16 -0
- package/dist/cjs/line/common/styles.js +120 -0
- package/dist/cjs/line/components/Divider.js +26 -0
- package/dist/cjs/line/components/Divider.liquid.js +22 -0
- package/dist/cjs/line/components/Line.js +98 -0
- package/dist/cjs/line/components/Line.liquid.js +86 -0
- package/dist/cjs/line/next.js +1 -1
- package/dist/cjs/post-purchase/line/setting/configs/uiV2.js +1 -1
- package/dist/cjs/post-purchase/link/setting/configs/settings.js +2 -1
- package/dist/cjs/post-purchase/link/setting/configs/uiV2.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
- package/dist/cjs/product/components/FileUpload/components/config/setting.js +24 -26
- package/dist/cjs/product/components/FileUpload/components/config/uiV2.js +12 -179
- package/dist/cjs/product/components/ProductList.js +1 -1
- package/dist/cjs/product/components/ProductVariants/index.js +2 -2
- package/dist/cjs/product/components/ProductVariants/index.liquid.js +2 -2
- package/dist/cjs/product/components/ProductVariants/variants/Dropdown.js +8 -3
- package/dist/cjs/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
- package/dist/cjs/product/setting/ProductVariants.js +8 -1374
- package/dist/cjs/product/setting/product-list/configs/uiV2.js +0 -3
- package/dist/cjs/product/setting/product-variant/configs/presets.js +168 -0
- package/dist/cjs/product/setting/product-variant/configs/settings.js +732 -0
- package/dist/cjs/product/setting/product-variant/configs/uiV1.js +509 -0
- package/dist/cjs/product/setting/product-variant/configs/uiV2.js +347 -0
- package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.js +33 -0
- package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +12 -0
- package/dist/cjs/third-party/configs/EcoboostifyShoppableReelUgc.js +12 -0
- package/dist/cjs/third-party/next.js +5 -0
- package/dist/cjs/third-party/setting/EcoboostifyShoppableReelUgc.js +142 -0
- package/dist/cjs/third-party/setting/index.js +3 -1
- package/dist/esm/accordion/components/common/index.js +2 -2
- package/dist/esm/article/components/ArticleAuthor.js +1 -1
- package/dist/esm/article/components/ArticleTitle.js +3 -1
- package/dist/esm/article/components/ArticleTitle.liquid.js +5 -2
- package/dist/esm/article/setting/ArticleList.js +0 -30
- package/dist/esm/article/setting/configs/ArticleAuthor/presets.js +0 -9
- package/dist/esm/article/setting/configs/ArticleAuthor/settings.js +9 -5
- package/dist/esm/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
- package/dist/esm/article/setting/configs/ArticleCategory/presets.js +0 -9
- package/dist/esm/article/setting/configs/ArticleCategory/settings.js +9 -5
- package/dist/esm/article/setting/configs/ArticleDate/presets.js +0 -9
- package/dist/esm/article/setting/configs/ArticleDate/settings.js +9 -5
- package/dist/esm/article/setting/configs/ArticleImage/settings.js +22 -1
- package/dist/esm/article/setting/configs/ArticleTitle/settings.js +36 -7
- package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +47 -2
- package/dist/esm/builder.js +6 -2
- package/dist/esm/button/components/Button.js +1 -1
- package/dist/esm/button/components/Button.liquid.js +1 -1
- package/dist/esm/button/components/ButtonIcon.liquid.js +3 -1
- package/dist/esm/button/components/ButtonLabel.liquid.js +3 -1
- package/dist/esm/button/components/common/attributes.js +2 -2
- package/dist/esm/button/components/common/classes.js +3 -2
- package/dist/esm/button/components/common/styles.js +10 -12
- package/dist/esm/button/setting/configs/settings.js +7 -8
- package/dist/esm/button/setting/configs/uiV2.js +4 -50
- package/dist/esm/dialog/components/Dialog.js +110 -395
- package/dist/esm/dialog/components/Dialog.liquid.js +130 -154
- package/dist/esm/dialog/components/common/common.js +117 -0
- package/dist/esm/dialog/components/common/getAttr.js +22 -0
- package/dist/esm/dialog/components/common/getClasses.js +79 -0
- package/dist/esm/dialog/components/common/getStyle.js +98 -0
- package/dist/esm/dialog/components/hooks/useDialog.js +231 -0
- package/dist/esm/dialog/setting/configs/settings.js +1 -1
- package/dist/esm/dialog/setting/configs/uiV2.js +35 -25
- package/dist/esm/form/components/form-checkbox/FormCheckbox.js +0 -4
- package/dist/esm/form/components/textinput/TextInput.js +54 -0
- package/dist/esm/form/components/textinput/TextInput.liquid.js +56 -0
- package/dist/esm/form/components/textinput/common/composeClasses.js +29 -0
- package/dist/esm/form/components/textinput/common/composeStyles.js +67 -0
- package/dist/esm/form/next.js +5 -1
- package/dist/esm/form/setting/index.js +3 -1
- package/dist/esm/form/setting/newsletter/configs/settings.js +4 -2
- package/dist/esm/form/setting/newsletter/configs/uiV2.js +2 -0
- package/dist/esm/form/setting/text-input/TextInput.js +49 -0
- package/dist/esm/form/setting/text-input/configs/settings.js +305 -0
- package/dist/esm/form/setting/text-input/configs/uiV1.js +104 -0
- package/dist/esm/form/setting/text-input/configs/uiV2.js +301 -0
- package/dist/esm/grid/row/setting/configs/settings.js +6 -3
- package/dist/esm/helpers.js +8 -1
- package/dist/esm/icon-list/common/attrs.js +8 -0
- package/dist/esm/icon-list/common/classes.js +6 -0
- package/dist/esm/icon-list/common/styles.js +25 -0
- package/dist/esm/icon-list/components/IconList.js +21 -32
- package/dist/esm/icon-list/components/IconList.liquid.js +21 -24
- package/dist/esm/icon-list/components/IconListItem.js +13 -7
- package/dist/esm/icon-list/components/IconListItem.liquid.js +14 -8
- package/dist/esm/icon-list-hoz/components/IconListHoz.js +38 -26
- package/dist/esm/icon-list-hoz/components/IconListHoz.liquid.js +32 -26
- package/dist/esm/icon-list-hoz/components/IconListHozItem.js +12 -6
- package/dist/esm/icon-list-hoz/components/IconListIHozItem.liquid.js +22 -0
- package/dist/esm/icon-list-hoz/components/common/getAttr.js +7 -0
- package/dist/esm/icon-list-hoz/components/common/getClasses.js +21 -0
- package/dist/esm/icon-list-hoz/components/common/getStyle.js +27 -0
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.liquid.js +4 -2
- package/dist/esm/line/common/classes.js +59 -0
- package/dist/esm/line/common/index.js +14 -0
- package/dist/esm/line/common/styles.js +114 -0
- package/dist/esm/line/components/Divider.js +22 -0
- package/dist/esm/line/components/Divider.liquid.js +18 -0
- package/dist/esm/line/components/Line.js +94 -0
- package/dist/esm/line/components/Line.liquid.js +82 -0
- package/dist/esm/line/next.js +1 -1
- package/dist/esm/post-purchase/line/setting/configs/uiV2.js +1 -1
- package/dist/esm/post-purchase/link/setting/configs/settings.js +2 -1
- package/dist/esm/post-purchase/link/setting/configs/uiV2.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
- package/dist/esm/product/components/FileUpload/components/config/setting.js +24 -26
- package/dist/esm/product/components/FileUpload/components/config/uiV2.js +12 -179
- package/dist/esm/product/components/ProductList.js +1 -1
- package/dist/esm/product/components/ProductVariants/index.js +2 -2
- package/dist/esm/product/components/ProductVariants/index.liquid.js +2 -2
- package/dist/esm/product/components/ProductVariants/variants/Dropdown.js +8 -3
- package/dist/esm/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
- package/dist/esm/product/setting/ProductVariants.js +8 -1374
- package/dist/esm/product/setting/product-list/configs/uiV2.js +0 -3
- package/dist/esm/product/setting/product-variant/configs/presets.js +166 -0
- package/dist/esm/product/setting/product-variant/configs/settings.js +730 -0
- package/dist/esm/product/setting/product-variant/configs/uiV1.js +507 -0
- package/dist/esm/product/setting/product-variant/configs/uiV2.js +345 -0
- package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.js +29 -0
- package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +8 -0
- package/dist/esm/third-party/configs/EcoboostifyShoppableReelUgc.js +8 -0
- package/dist/esm/third-party/next.js +5 -0
- package/dist/esm/third-party/setting/EcoboostifyShoppableReelUgc.js +138 -0
- package/dist/esm/third-party/setting/index.js +3 -1
- package/dist/types/index.d.ts +184 -166
- package/package.json +2 -2
- package/dist/cjs/dialog/helpers/common.js +0 -55
- package/dist/cjs/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -23
- package/dist/cjs/line/Divider.js +0 -35
- package/dist/cjs/line/Divider.liquid.js +0 -35
- package/dist/cjs/line/Line.js +0 -167
- package/dist/cjs/line/Line.liquid.js +0 -163
- package/dist/esm/dialog/helpers/common.js +0 -47
- package/dist/esm/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -19
- package/dist/esm/line/Divider.js +0 -31
- package/dist/esm/line/Divider.liquid.js +0 -31
- package/dist/esm/line/Line.js +0 -163
- package/dist/esm/line/Line.liquid.js +0 -159
- /package/dist/cjs/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/rectangle-list.js +0 -0
- /package/dist/esm/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/rectangle-list.js +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { useModalStore, useInteraction, globalEvent } from '@gem-sdk/core';
|
|
2
|
+
import { useRef, useState, useCallback, useMemo, useEffect } from 'react';
|
|
3
|
+
import { useScrollPercentage } from './useScrollPercentage.js';
|
|
4
|
+
import { createDialogKey, isShowModal, isMobile, parseNumber } from '../common/common.js';
|
|
5
|
+
|
|
6
|
+
const useDialog = (setting, builderProps, isEditor)=>{
|
|
7
|
+
const setModalActive = useModalStore((s)=>s.setModalActive);
|
|
8
|
+
const clearModal = useModalStore((s)=>s.clearModal);
|
|
9
|
+
const timeoutRef = useRef();
|
|
10
|
+
const triggerScroll = useRef(false);
|
|
11
|
+
const opened = useRef(false);
|
|
12
|
+
const overlay = useRef(null);
|
|
13
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
14
|
+
const percent = useScrollPercentage();
|
|
15
|
+
const activeId = useModalStore((s)=>s.activeId);
|
|
16
|
+
const forceOpen = activeId === builderProps?.uid;
|
|
17
|
+
const open = isEditor ? forceOpen : isOpen;
|
|
18
|
+
const dialogId = setting?.dialogId ?? builderProps?.uid;
|
|
19
|
+
const { trigger, triggerTime, mobileTrigger, mobileTriggerTime, closeOnClickOutside, frequency = 3, triggerPercentage = 0, frequencyMode = 'once' } = setting ?? {};
|
|
20
|
+
const { onListener, trigger: triggerInteraction, ref } = useInteraction();
|
|
21
|
+
const interactionListenerLoaded = useCallback((callback)=>{
|
|
22
|
+
//@ts-ignore
|
|
23
|
+
if (window.interactionLoaded) {
|
|
24
|
+
callback();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
window.addEventListener('gp:flow-actions-loaded', ()=>{
|
|
28
|
+
callback();
|
|
29
|
+
});
|
|
30
|
+
}, []);
|
|
31
|
+
const dialogInfo = useMemo(()=>createDialogKey(dialogId ?? builderProps?.uid, trigger), [
|
|
32
|
+
builderProps?.uid,
|
|
33
|
+
dialogId,
|
|
34
|
+
trigger
|
|
35
|
+
]);
|
|
36
|
+
const dispatchInteractionOpenPopup = useCallback(()=>{
|
|
37
|
+
interactionListenerLoaded(()=>{
|
|
38
|
+
triggerInteraction({
|
|
39
|
+
event: 'gp:popup-open',
|
|
40
|
+
selector: `[data-id="${builderProps?.uid}"`
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}, [
|
|
44
|
+
interactionListenerLoaded,
|
|
45
|
+
triggerInteraction,
|
|
46
|
+
builderProps?.uid
|
|
47
|
+
]);
|
|
48
|
+
const dispatchInteractionClosePopup = useCallback(()=>{
|
|
49
|
+
interactionListenerLoaded(()=>{
|
|
50
|
+
triggerInteraction({
|
|
51
|
+
event: 'gp:popup-close',
|
|
52
|
+
selector: `[data-id="${builderProps?.uid}"`
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}, [
|
|
56
|
+
triggerInteraction,
|
|
57
|
+
builderProps?.uid,
|
|
58
|
+
interactionListenerLoaded
|
|
59
|
+
]);
|
|
60
|
+
const openModal = useCallback(()=>{
|
|
61
|
+
localStorage.setItem(dialogInfo.time, `${Date.now()}`);
|
|
62
|
+
opened.current = true;
|
|
63
|
+
setIsOpen(true);
|
|
64
|
+
dispatchInteractionOpenPopup();
|
|
65
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
66
|
+
}, [
|
|
67
|
+
dialogInfo.time
|
|
68
|
+
]);
|
|
69
|
+
useEffect(()=>{
|
|
70
|
+
const triggerEventOpenDialog = (data)=>{
|
|
71
|
+
if (data?.popupUId == `#${builderProps?.uid}`) {
|
|
72
|
+
openModal();
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
globalEvent.subscribe('onOpenDialog', triggerEventOpenDialog);
|
|
76
|
+
return ()=>{
|
|
77
|
+
globalEvent.remove('onOpenDialog', triggerEventOpenDialog);
|
|
78
|
+
};
|
|
79
|
+
}, [
|
|
80
|
+
builderProps?.uid,
|
|
81
|
+
openModal
|
|
82
|
+
]);
|
|
83
|
+
const closeModal = useCallback(()=>{
|
|
84
|
+
setIsOpen(false);
|
|
85
|
+
setModalActive();
|
|
86
|
+
clearModal();
|
|
87
|
+
dispatchInteractionClosePopup();
|
|
88
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
89
|
+
}, [
|
|
90
|
+
setModalActive,
|
|
91
|
+
clearModal
|
|
92
|
+
]);
|
|
93
|
+
const handleShowModal = useCallback(()=>{
|
|
94
|
+
const currentFrequency = localStorage.getItem(dialogInfo.time);
|
|
95
|
+
if (!currentFrequency) {
|
|
96
|
+
openModal();
|
|
97
|
+
} else {
|
|
98
|
+
switch(frequencyMode){
|
|
99
|
+
case 'once':
|
|
100
|
+
break;
|
|
101
|
+
case 'after-period-time':
|
|
102
|
+
{
|
|
103
|
+
const diff = isShowModal(currentFrequency, frequency);
|
|
104
|
+
if (diff) {
|
|
105
|
+
openModal();
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
case 'every':
|
|
110
|
+
{
|
|
111
|
+
openModal();
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, [
|
|
117
|
+
dialogInfo.time,
|
|
118
|
+
frequency,
|
|
119
|
+
openModal,
|
|
120
|
+
frequencyMode
|
|
121
|
+
]);
|
|
122
|
+
const onMouseLeave = useCallback(()=>{
|
|
123
|
+
if (opened.current || isEditor || trigger !== 'show-when-about-exit') return;
|
|
124
|
+
handleShowModal();
|
|
125
|
+
}, [
|
|
126
|
+
handleShowModal,
|
|
127
|
+
isEditor,
|
|
128
|
+
trigger
|
|
129
|
+
]);
|
|
130
|
+
useEffect(()=>{
|
|
131
|
+
const selector = `[data-id="${builderProps?.uid}"]`;
|
|
132
|
+
if (!onListener) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
onListener({
|
|
136
|
+
event: 'gp:toggle-popup-open',
|
|
137
|
+
selector
|
|
138
|
+
}, ()=>{
|
|
139
|
+
openModal();
|
|
140
|
+
});
|
|
141
|
+
onListener({
|
|
142
|
+
event: 'gp:toggle-popup-close',
|
|
143
|
+
selector
|
|
144
|
+
}, ()=>{
|
|
145
|
+
closeModal();
|
|
146
|
+
});
|
|
147
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
148
|
+
}, [
|
|
149
|
+
onListener
|
|
150
|
+
]);
|
|
151
|
+
useEffect(()=>{
|
|
152
|
+
document.addEventListener('mouseleave', onMouseLeave);
|
|
153
|
+
return ()=>{
|
|
154
|
+
document.removeEventListener('mouseleave', onMouseLeave);
|
|
155
|
+
};
|
|
156
|
+
}, [
|
|
157
|
+
onMouseLeave
|
|
158
|
+
]);
|
|
159
|
+
useEffect(()=>{
|
|
160
|
+
if (opened.current) return;
|
|
161
|
+
if (isMobile(navigator.userAgent) && trigger === 'show-when-about-exit' && mobileTrigger === 'timer') {
|
|
162
|
+
timeoutRef.current = setTimeout(()=>{
|
|
163
|
+
handleShowModal();
|
|
164
|
+
}, (mobileTriggerTime ?? 0) * 1000);
|
|
165
|
+
return ()=>{
|
|
166
|
+
clearTimeout(timeoutRef.current);
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
}, [
|
|
170
|
+
mobileTrigger,
|
|
171
|
+
mobileTriggerTime,
|
|
172
|
+
handleShowModal,
|
|
173
|
+
trigger
|
|
174
|
+
]);
|
|
175
|
+
useEffect(()=>{
|
|
176
|
+
if (triggerScroll.current) return;
|
|
177
|
+
if (trigger === 'show-after-scroll') {
|
|
178
|
+
if (percent >= triggerPercentage) {
|
|
179
|
+
triggerScroll.current = true;
|
|
180
|
+
handleShowModal();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}, [
|
|
184
|
+
percent,
|
|
185
|
+
triggerPercentage,
|
|
186
|
+
handleShowModal,
|
|
187
|
+
trigger
|
|
188
|
+
]);
|
|
189
|
+
const handleClickOverlay = useCallback((e)=>{
|
|
190
|
+
const isClickOutside = e.target === overlay.current;
|
|
191
|
+
if (closeOnClickOutside && isClickOutside) {
|
|
192
|
+
closeModal();
|
|
193
|
+
}
|
|
194
|
+
}, [
|
|
195
|
+
closeModal,
|
|
196
|
+
closeOnClickOutside
|
|
197
|
+
]);
|
|
198
|
+
useEffect(()=>{
|
|
199
|
+
switch(trigger){
|
|
200
|
+
case 'show-on-page-load':
|
|
201
|
+
handleShowModal();
|
|
202
|
+
break;
|
|
203
|
+
case 'show-after-time':
|
|
204
|
+
{
|
|
205
|
+
timeoutRef.current = setTimeout(()=>{
|
|
206
|
+
handleShowModal();
|
|
207
|
+
}, parseNumber(triggerTime) * 1000);
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return ()=>{
|
|
212
|
+
clearTimeout(timeoutRef.current);
|
|
213
|
+
};
|
|
214
|
+
}, [
|
|
215
|
+
handleShowModal,
|
|
216
|
+
trigger,
|
|
217
|
+
triggerTime
|
|
218
|
+
]);
|
|
219
|
+
return {
|
|
220
|
+
ref,
|
|
221
|
+
isOpen,
|
|
222
|
+
overlay,
|
|
223
|
+
handleClickOverlay,
|
|
224
|
+
closeModal,
|
|
225
|
+
activeId,
|
|
226
|
+
open,
|
|
227
|
+
dialogId
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
export { useDialog };
|
|
@@ -19,6 +19,22 @@ const SettingUIV2 = [
|
|
|
19
19
|
en: 'Button close'
|
|
20
20
|
},
|
|
21
21
|
controls: [
|
|
22
|
+
{
|
|
23
|
+
label: {
|
|
24
|
+
en: 'Icon size'
|
|
25
|
+
},
|
|
26
|
+
setting: {
|
|
27
|
+
id: 'iconSize'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: {
|
|
32
|
+
en: 'Icon color'
|
|
33
|
+
},
|
|
34
|
+
setting: {
|
|
35
|
+
id: 'btnColor'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
22
38
|
{
|
|
23
39
|
label: {
|
|
24
40
|
en: 'Button size'
|
|
@@ -46,14 +62,6 @@ const SettingUIV2 = [
|
|
|
46
62
|
en: 'Position'
|
|
47
63
|
}
|
|
48
64
|
},
|
|
49
|
-
{
|
|
50
|
-
label: {
|
|
51
|
-
en: 'Color'
|
|
52
|
-
},
|
|
53
|
-
setting: {
|
|
54
|
-
id: 'btnColor'
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
65
|
{
|
|
58
66
|
label: {
|
|
59
67
|
en: 'Corner'
|
|
@@ -68,19 +76,6 @@ const SettingUIV2 = [
|
|
|
68
76
|
{
|
|
69
77
|
controls: [
|
|
70
78
|
{
|
|
71
|
-
label: {
|
|
72
|
-
en: 'Overlay'
|
|
73
|
-
},
|
|
74
|
-
setting: {
|
|
75
|
-
id: 'isOverlay'
|
|
76
|
-
},
|
|
77
|
-
options: {
|
|
78
|
-
labelVariant: 'primary',
|
|
79
|
-
toggleStyle: 'switch'
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
conditionDisplay: `isOverlay === true`,
|
|
84
79
|
label: {
|
|
85
80
|
en: 'Color'
|
|
86
81
|
},
|
|
@@ -89,7 +84,6 @@ const SettingUIV2 = [
|
|
|
89
84
|
}
|
|
90
85
|
},
|
|
91
86
|
{
|
|
92
|
-
conditionDisplay: `isOverlay === true`,
|
|
93
87
|
label: {
|
|
94
88
|
en: 'Click to close'
|
|
95
89
|
},
|
|
@@ -98,7 +92,6 @@ const SettingUIV2 = [
|
|
|
98
92
|
}
|
|
99
93
|
},
|
|
100
94
|
{
|
|
101
|
-
conditionDisplay: `isOverlay === true`,
|
|
102
95
|
label: {
|
|
103
96
|
en: 'Opacity'
|
|
104
97
|
},
|
|
@@ -171,7 +164,7 @@ const SettingUIV2 = [
|
|
|
171
164
|
controls: [
|
|
172
165
|
{
|
|
173
166
|
label: {
|
|
174
|
-
en: '
|
|
167
|
+
en: 'Position'
|
|
175
168
|
},
|
|
176
169
|
setting: {
|
|
177
170
|
id: 'position'
|
|
@@ -187,7 +180,7 @@ const SettingUIV2 = [
|
|
|
187
180
|
},
|
|
188
181
|
{
|
|
189
182
|
label: {
|
|
190
|
-
en: 'Display'
|
|
183
|
+
en: 'Display condition'
|
|
191
184
|
},
|
|
192
185
|
controls: [
|
|
193
186
|
{
|
|
@@ -233,6 +226,23 @@ const SettingUIV2 = [
|
|
|
233
226
|
setting: {
|
|
234
227
|
id: 'mobileTriggerTime'
|
|
235
228
|
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
label: {
|
|
232
|
+
en: 'Frequency'
|
|
233
|
+
},
|
|
234
|
+
setting: {
|
|
235
|
+
id: 'frequencyMode'
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
conditionDisplay: `frequencyMode === 'after-period-time'`,
|
|
240
|
+
label: {
|
|
241
|
+
en: 'Display time'
|
|
242
|
+
},
|
|
243
|
+
setting: {
|
|
244
|
+
id: 'frequency'
|
|
245
|
+
}
|
|
236
246
|
}
|
|
237
247
|
]
|
|
238
248
|
},
|
|
@@ -12,10 +12,6 @@ const FormCheckbox = ({ builderProps, setting, advanced, styles })=>{
|
|
|
12
12
|
const composedContainerClasses = createClass(composeContainerClasses(setting, advanced, builderProps));
|
|
13
13
|
const composedFormCheckboxInputClasses = createClass(composeFormCheckboxInputClasses());
|
|
14
14
|
const composedFormCheckboxLabelClasses = createClass(composeFormCheckboxLabelClasses());
|
|
15
|
-
console.log({
|
|
16
|
-
setting,
|
|
17
|
-
styles
|
|
18
|
-
});
|
|
19
15
|
return /*#__PURE__*/ jsx("div", {
|
|
20
16
|
"data-id": builderProps?.uid,
|
|
21
17
|
style: composedContainerStyles,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { createStyle, createClass, If } from '@gem-sdk/system';
|
|
4
|
+
import { composeContainerStyles, composeTextareaStyles } from './common/composeStyles.js';
|
|
5
|
+
import { composeContainerClasses, composeTextFieldClasses, composeTextAreaClasses } from './common/composeClasses.js';
|
|
6
|
+
|
|
7
|
+
const TextInput = ({ setting, builderProps, className, builderAttrs, advanced, children, styles })=>{
|
|
8
|
+
const { text, name, placeholder, required, formType } = setting ?? {};
|
|
9
|
+
const defaultName = name?.[formType ?? 'text'] === '' || name === undefined ? 'contact[first_name]' : name?.[formType ?? 'text'];
|
|
10
|
+
const composedContainerStyles = createStyle(composeContainerStyles(advanced, setting));
|
|
11
|
+
const composedContainerClasses = createClass(composeContainerClasses(advanced, builderProps));
|
|
12
|
+
const composedTextFieldClasses = createClass(composeTextFieldClasses(setting, builderProps, className ?? ''));
|
|
13
|
+
const composedTextFieldStyles = createStyle(composeTextareaStyles(advanced, setting, styles));
|
|
14
|
+
const composedTextAreaClasses = createClass({
|
|
15
|
+
composedTextFieldClasses: true,
|
|
16
|
+
...composeTextAreaClasses()
|
|
17
|
+
});
|
|
18
|
+
const isTextArea = formType === 'textarea';
|
|
19
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
20
|
+
...builderAttrs,
|
|
21
|
+
"data-id": builderProps?.uid,
|
|
22
|
+
className: composedContainerClasses,
|
|
23
|
+
style: composedContainerStyles,
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ jsx("span", {
|
|
26
|
+
className: "gp-text-16 gp-text-[#121212]",
|
|
27
|
+
children: placeholder
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ jsxs("div", {
|
|
30
|
+
children: [
|
|
31
|
+
If(!isTextArea, /*#__PURE__*/ jsx("input", {
|
|
32
|
+
type: formType,
|
|
33
|
+
className: composedTextFieldClasses,
|
|
34
|
+
style: composedTextFieldStyles,
|
|
35
|
+
placeholder: placeholder,
|
|
36
|
+
required: required,
|
|
37
|
+
name: defaultName,
|
|
38
|
+
value: text
|
|
39
|
+
}), /*#__PURE__*/ jsx("textarea", {
|
|
40
|
+
className: composedTextAreaClasses,
|
|
41
|
+
placeholder: placeholder,
|
|
42
|
+
style: composedTextFieldStyles,
|
|
43
|
+
required: required,
|
|
44
|
+
name: defaultName,
|
|
45
|
+
value: text
|
|
46
|
+
})),
|
|
47
|
+
children
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { TextInput as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { template } from '@gem-sdk/core';
|
|
2
|
+
import { getDynamicSourceLocales } from '../../../helpers.js';
|
|
3
|
+
import { createStyle, createClass, If } from '@gem-sdk/system';
|
|
4
|
+
import { composeContainerStyles, composeTextareaStyles } from './common/composeStyles.js';
|
|
5
|
+
import { composeContainerClasses, composeTextFieldClasses, composeTextAreaClasses } from './common/composeClasses.js';
|
|
6
|
+
|
|
7
|
+
const TextInput = ({ setting, builderProps, className, builderAttrs, advanced, pageContext, styles })=>{
|
|
8
|
+
const { text, name, placeholder, required, translate, formType } = setting ?? {};
|
|
9
|
+
const defaultName = name?.[formType ?? 'text'] === '' || name === undefined ? 'contact[first_name]' : name?.[formType ?? 'text'];
|
|
10
|
+
const placeholderVal = getDynamicSourceLocales({
|
|
11
|
+
val: placeholder,
|
|
12
|
+
uid: builderProps?.uid,
|
|
13
|
+
settingId: 'placeholder',
|
|
14
|
+
pageContext,
|
|
15
|
+
translate
|
|
16
|
+
});
|
|
17
|
+
const composedContainerStyles = createStyle(composeContainerStyles(advanced, setting));
|
|
18
|
+
const composedContainerClasses = createClass(composeContainerClasses(advanced, builderProps));
|
|
19
|
+
const composedTextFieldClasses = createClass(composeTextFieldClasses(setting, builderProps, className ?? ''));
|
|
20
|
+
const composedTextFieldStyles = createStyle(composeTextareaStyles(advanced, setting, styles));
|
|
21
|
+
const composedTextAreaClasses = createClass({
|
|
22
|
+
composedTextFieldClasses: true,
|
|
23
|
+
...composeTextAreaClasses()
|
|
24
|
+
});
|
|
25
|
+
const isTextArea = formType === 'textarea';
|
|
26
|
+
return template`
|
|
27
|
+
<div
|
|
28
|
+
${builderAttrs}
|
|
29
|
+
data-id="${builderProps?.uid}"
|
|
30
|
+
class="${composedContainerClasses}"
|
|
31
|
+
style="${composedContainerStyles}"
|
|
32
|
+
>
|
|
33
|
+
<span class="gp-text-16 gp-text-[#121212]">${placeholder}</span>
|
|
34
|
+
<div>
|
|
35
|
+
${If(!isTextArea, template`<input
|
|
36
|
+
type="text"
|
|
37
|
+
class="${composedTextFieldClasses}"
|
|
38
|
+
style="${composedTextFieldStyles}"
|
|
39
|
+
placeholder="${placeholderVal}"
|
|
40
|
+
${If(required, 'required')}
|
|
41
|
+
name="${defaultName}"
|
|
42
|
+
value="${text}"
|
|
43
|
+
></input>`, template`<textarea
|
|
44
|
+
class="${composedTextAreaClasses}"
|
|
45
|
+
style="${composedTextFieldStyles}"
|
|
46
|
+
placeholder="${placeholderVal}"
|
|
47
|
+
${If(required, 'required')}
|
|
48
|
+
name="${defaultName}"
|
|
49
|
+
value="${text}"
|
|
50
|
+
></textarea>`)}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
`;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export { TextInput as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { filterTruthy } from '../../../helpers/common.js';
|
|
2
|
+
import { composeTypographyClassName, getGlobalColorClass } from '@gem-sdk/core';
|
|
3
|
+
|
|
4
|
+
const composeClasses = (styles)=>filterTruthy(styles);
|
|
5
|
+
const composeContainerClasses = (advanced, builderProps)=>{
|
|
6
|
+
return composeClasses({
|
|
7
|
+
[builderProps?.uid]: !!builderProps?.uid,
|
|
8
|
+
[advanced?.cssClass]: !!advanced?.cssClass
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
const composeTextFieldClasses = (setting, builderProps, className)=>{
|
|
12
|
+
const { typography } = setting ?? {};
|
|
13
|
+
const appendTypoClass = composeTypographyClassName(setting?.typo, typography);
|
|
14
|
+
const globalColorClass = getGlobalColorClass('text', setting?.color);
|
|
15
|
+
return composeClasses({
|
|
16
|
+
[className]: !!className,
|
|
17
|
+
[builderProps?.uid]: !!builderProps?.uid,
|
|
18
|
+
[appendTypoClass]: !!appendTypoClass,
|
|
19
|
+
[globalColorClass]: !!globalColorClass,
|
|
20
|
+
'gp-form-item !gp-outline-none focus:!gp-shadow-none hover:!gp-shadow-none !gp-bg-none !gp-border-box': true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const composeTextAreaClasses = ()=>{
|
|
24
|
+
return composeClasses({
|
|
25
|
+
'gp-min-h-[150px]': true
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { composeContainerClasses, composeTextAreaClasses, composeTextFieldClasses };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { filterTruthy } from '../../../helpers/common.js';
|
|
2
|
+
import { composeAdvanceStyle, makeStyleResponsive, makeGlobalSize, composeTypographyStyle, getGlobalColorStyle, makeStyle, getSingleColorVariable, getBorderStyle, getBorderRadiusStyle, getStyleShadow } from '@gem-sdk/core';
|
|
3
|
+
|
|
4
|
+
const composeStyles = (styles)=>filterTruthy(styles);
|
|
5
|
+
const composeContainerStyles = (advanced, setting)=>{
|
|
6
|
+
const { pos, d, op, right, top, left, bottom, z, padding, margin } = advanced ?? {};
|
|
7
|
+
const spacingSetting = advanced?.['spacing-setting'];
|
|
8
|
+
const wrapStyle = composeAdvanceStyle({
|
|
9
|
+
pos,
|
|
10
|
+
d,
|
|
11
|
+
op,
|
|
12
|
+
right,
|
|
13
|
+
top,
|
|
14
|
+
left,
|
|
15
|
+
bottom,
|
|
16
|
+
z,
|
|
17
|
+
padding,
|
|
18
|
+
margin,
|
|
19
|
+
'spacing-setting': spacingSetting
|
|
20
|
+
});
|
|
21
|
+
return composeStyles({
|
|
22
|
+
...wrapStyle,
|
|
23
|
+
...makeStyleResponsive('ta', setting?.align)
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const composeTextareaStyles = (advanced, setting, styles)=>{
|
|
27
|
+
const { wrapperBorder, borderRadius, shadow, globalSize } = styles ?? {};
|
|
28
|
+
const { border, rounded, hasBoxShadow, boxShadow } = advanced ?? {};
|
|
29
|
+
const { typography } = setting ?? {};
|
|
30
|
+
console.log(123, globalSize);
|
|
31
|
+
const composeGlobalSize = makeGlobalSize(globalSize);
|
|
32
|
+
console.log(composeGlobalSize);
|
|
33
|
+
const appendTypoStyle = composeTypographyStyle(setting?.typo, typography);
|
|
34
|
+
const inputStyle = composeAdvanceStyle({
|
|
35
|
+
border,
|
|
36
|
+
rounded,
|
|
37
|
+
hasBoxShadow,
|
|
38
|
+
boxShadow
|
|
39
|
+
});
|
|
40
|
+
return composeStyles({
|
|
41
|
+
...composeGlobalSize?.width?.['--w'] ? composeGlobalSize.width : {
|
|
42
|
+
'--w': '100%'
|
|
43
|
+
},
|
|
44
|
+
...composeGlobalSize?.height?.['--h'] ? composeGlobalSize.height : {
|
|
45
|
+
'--h': 'auto'
|
|
46
|
+
},
|
|
47
|
+
...composeGlobalSize.padding,
|
|
48
|
+
...getGlobalColorStyle(setting?.color),
|
|
49
|
+
...makeStyle({
|
|
50
|
+
tt: setting?.transform
|
|
51
|
+
}),
|
|
52
|
+
...appendTypoStyle,
|
|
53
|
+
...inputStyle,
|
|
54
|
+
...makeStyle({
|
|
55
|
+
bc: getSingleColorVariable(border?.color)
|
|
56
|
+
}),
|
|
57
|
+
...getBorderStyle(wrapperBorder),
|
|
58
|
+
...getBorderRadiusStyle(borderRadius),
|
|
59
|
+
...getStyleShadow({
|
|
60
|
+
value: shadow,
|
|
61
|
+
styleAppliedFor: 'box-shadow',
|
|
62
|
+
isEnableShadow: shadow?.type !== 'none'
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { composeContainerStyles, composeTextareaStyles };
|
package/dist/esm/form/next.js
CHANGED
|
@@ -34,6 +34,9 @@ const FormDropdown = dynamic(()=>import('./components/form-dropdown/FormDropdown
|
|
|
34
34
|
const FormCheckbox = dynamic(()=>import('./components/form-checkbox/FormCheckbox.js'), {
|
|
35
35
|
loading: Loading
|
|
36
36
|
});
|
|
37
|
+
const TextInput = dynamic(()=>import('./components/textinput/TextInput.js'), {
|
|
38
|
+
loading: Loading
|
|
39
|
+
});
|
|
37
40
|
var form = {
|
|
38
41
|
Newsletter,
|
|
39
42
|
FormEmail,
|
|
@@ -44,7 +47,8 @@ var form = {
|
|
|
44
47
|
FormTextarea,
|
|
45
48
|
FormTextArea,
|
|
46
49
|
FormDropdown,
|
|
47
|
-
FormCheckbox
|
|
50
|
+
FormCheckbox,
|
|
51
|
+
TextInput
|
|
48
52
|
};
|
|
49
53
|
|
|
50
54
|
export { form as default };
|
|
@@ -6,6 +6,7 @@ import config$4 from './text-field/TextField.js';
|
|
|
6
6
|
import config$5 from './form-textarea/Textarea.js';
|
|
7
7
|
import config$6 from './form-dropdown/FormDropdown.js';
|
|
8
8
|
import config$7 from './form-checkbox/FormCheckbox.js';
|
|
9
|
+
import config$8 from './text-input/TextInput.js';
|
|
9
10
|
|
|
10
11
|
var contactFormSetting = {
|
|
11
12
|
Newsletter: config,
|
|
@@ -15,7 +16,8 @@ var contactFormSetting = {
|
|
|
15
16
|
TextField: config$4,
|
|
16
17
|
FormTextarea: config$5,
|
|
17
18
|
FormDropdown: config$6,
|
|
18
|
-
FormCheckbox: config$7
|
|
19
|
+
FormCheckbox: config$7,
|
|
20
|
+
TextInput: config$8
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export { contactFormSetting as default };
|
|
@@ -42,14 +42,16 @@ const NewsletterSettings = [
|
|
|
42
42
|
type: 'textarea',
|
|
43
43
|
label: 'Success Message',
|
|
44
44
|
default: "Thanks for contacting us. We'll get back to you as soon as possible.",
|
|
45
|
-
autoHeight: true
|
|
45
|
+
autoHeight: true,
|
|
46
|
+
minHeight: 58
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
id: 'errorMessage',
|
|
49
50
|
type: 'textarea',
|
|
50
51
|
label: 'Error Message',
|
|
51
52
|
default: 'Can’t send email. Please try again later.',
|
|
52
|
-
autoHeight: true
|
|
53
|
+
autoHeight: true,
|
|
54
|
+
minHeight: 58
|
|
53
55
|
},
|
|
54
56
|
{
|
|
55
57
|
id: 'translate',
|
|
@@ -12,6 +12,7 @@ const SettingUIV2 = [
|
|
|
12
12
|
iconName: 'polaris-text-block',
|
|
13
13
|
getValueFromSettingID: 'successMessage',
|
|
14
14
|
isHideClear: true,
|
|
15
|
+
disableScrollbar: true,
|
|
15
16
|
popoverLabel: {
|
|
16
17
|
en: 'Success message'
|
|
17
18
|
},
|
|
@@ -32,6 +33,7 @@ const SettingUIV2 = [
|
|
|
32
33
|
iconName: 'polaris-text-block',
|
|
33
34
|
getValueFromSettingID: 'errorMessage',
|
|
34
35
|
isHideClear: true,
|
|
36
|
+
disableScrollbar: true,
|
|
35
37
|
popoverLabel: {
|
|
36
38
|
en: 'Error message'
|
|
37
39
|
},
|