@gem-sdk/components 2.0.0-dev.454 → 2.0.0-dev.457
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/code/components/CSSCode.js +1 -0
- package/dist/cjs/code/setting/config/setting.js +38 -2
- package/dist/cjs/code/setting/config/uiV2.js +30 -8
- package/dist/cjs/form/components/contact/Contact.js +10 -2
- package/dist/cjs/form/components/contact/common/composeStyles.js +3 -2
- package/dist/cjs/form/components/newsletter/Newsletter.js +16 -3
- package/dist/cjs/form/setting/contact/configs/settings.js +6 -1
- package/dist/cjs/form/setting/contact/configs/uiV2.js +10 -0
- package/dist/cjs/form/setting/form-checkbox/configs/settings.js +0 -1
- package/dist/cjs/form/setting/newsletter/configs/settings.js +10 -3
- package/dist/cjs/form/setting/newsletter/configs/uiV2.js +10 -0
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js +11 -2
- package/dist/cjs/product/setting/product-price/configs/uiV2.js +1 -1
- package/dist/esm/code/components/CSSCode.js +1 -0
- package/dist/esm/code/setting/config/setting.js +38 -2
- package/dist/esm/code/setting/config/uiV2.js +30 -8
- package/dist/esm/form/components/contact/Contact.js +11 -3
- package/dist/esm/form/components/contact/common/composeStyles.js +3 -2
- package/dist/esm/form/components/newsletter/Newsletter.js +17 -5
- package/dist/esm/form/setting/contact/configs/settings.js +6 -1
- package/dist/esm/form/setting/contact/configs/uiV2.js +10 -0
- package/dist/esm/form/setting/form-checkbox/configs/settings.js +0 -1
- package/dist/esm/form/setting/newsletter/configs/settings.js +10 -3
- package/dist/esm/form/setting/newsletter/configs/uiV2.js +10 -0
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js +11 -2
- package/dist/esm/product/setting/product-price/configs/uiV2.js +1 -1
- package/dist/types/index.d.ts +9 -5
- package/package.json +2 -2
|
@@ -4,14 +4,29 @@ const SettingCode = [
|
|
|
4
4
|
{
|
|
5
5
|
id: 'setting',
|
|
6
6
|
controls: [
|
|
7
|
+
{
|
|
8
|
+
id: 'contentBanner',
|
|
9
|
+
type: 'banner',
|
|
10
|
+
message: `You can insert HTML, CSS, JavaScript or Liquid code <a class="no-underline text-primary-250" target="_blank" href="https://help.gempages.net/articles/custom-code-element?utm_source=element-setting-tips#custom-code">Learn more</a>`,
|
|
11
|
+
closable: true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: 'name',
|
|
15
|
+
type: 'input',
|
|
16
|
+
default: 'Custom code'
|
|
17
|
+
},
|
|
7
18
|
{
|
|
8
19
|
id: 'editorData',
|
|
9
20
|
type: 'customCodeEditor'
|
|
10
21
|
},
|
|
22
|
+
{
|
|
23
|
+
id: 'speedParallax',
|
|
24
|
+
type: 'customCodeEditor'
|
|
25
|
+
},
|
|
11
26
|
{
|
|
12
27
|
id: 'background',
|
|
13
|
-
type: 'background',
|
|
14
|
-
|
|
28
|
+
type: 'background-media',
|
|
29
|
+
ignoreReRender: true,
|
|
15
30
|
devices: {
|
|
16
31
|
desktop: {
|
|
17
32
|
default: {
|
|
@@ -31,6 +46,27 @@ const SettingCode = [
|
|
|
31
46
|
attachment: 'scroll'
|
|
32
47
|
}
|
|
33
48
|
}
|
|
49
|
+
},
|
|
50
|
+
compoDefaultValue: {
|
|
51
|
+
desktop: {
|
|
52
|
+
default: {
|
|
53
|
+
type: 'color',
|
|
54
|
+
color: '#DDDDDD',
|
|
55
|
+
image: {
|
|
56
|
+
src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
|
|
57
|
+
width: 1200,
|
|
58
|
+
height: 480
|
|
59
|
+
},
|
|
60
|
+
size: 'cover',
|
|
61
|
+
position: {
|
|
62
|
+
x: 50,
|
|
63
|
+
y: 50
|
|
64
|
+
},
|
|
65
|
+
repeat: 'no-repeat',
|
|
66
|
+
attachment: 'scroll',
|
|
67
|
+
preload: false
|
|
68
|
+
}
|
|
69
|
+
}
|
|
34
70
|
}
|
|
35
71
|
},
|
|
36
72
|
{
|
|
@@ -2,21 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
const SettingUIV2 = [
|
|
4
4
|
{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
controls: [
|
|
6
|
+
{
|
|
7
|
+
setting: {
|
|
8
|
+
id: 'contentBanner'
|
|
9
|
+
},
|
|
10
|
+
layout: 'vertical'
|
|
11
11
|
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: {
|
|
16
|
+
en: 'Custom code'
|
|
12
17
|
},
|
|
13
18
|
controls: [
|
|
14
19
|
{
|
|
15
|
-
type: 'control',
|
|
16
20
|
setting: {
|
|
17
21
|
id: 'editorData'
|
|
18
22
|
},
|
|
19
|
-
|
|
23
|
+
label: {
|
|
24
|
+
en: 'Code'
|
|
25
|
+
}
|
|
20
26
|
}
|
|
21
27
|
]
|
|
22
28
|
},
|
|
@@ -44,6 +50,22 @@ const SettingUIV2 = [
|
|
|
44
50
|
}
|
|
45
51
|
]
|
|
46
52
|
},
|
|
53
|
+
{
|
|
54
|
+
label: {
|
|
55
|
+
en: 'Configuration'
|
|
56
|
+
},
|
|
57
|
+
controls: [
|
|
58
|
+
{
|
|
59
|
+
type: 'control',
|
|
60
|
+
setting: {
|
|
61
|
+
id: 'name'
|
|
62
|
+
},
|
|
63
|
+
label: {
|
|
64
|
+
en: 'Name'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
47
69
|
{
|
|
48
70
|
controls: [
|
|
49
71
|
{
|
|
@@ -8,10 +8,18 @@ var core = require('@gem-sdk/core');
|
|
|
8
8
|
var ChildrenDroppable = require('../../../grid/components/ChildrenDroppable.js');
|
|
9
9
|
var composeStyles = require('./common/composeStyles.js');
|
|
10
10
|
var system = require('@gem-sdk/system');
|
|
11
|
+
var composeAttrs = require('../newsletter/common/composeAttrs.js');
|
|
11
12
|
|
|
12
|
-
const ContactForm = ({ children, styles, setting })=>{
|
|
13
|
-
const containerStyle = system.createStyle(composeStyles.composeContainerStyles(setting, styles));
|
|
13
|
+
const ContactForm = ({ children, styles, setting, style, builderAttrs, builderProps })=>{
|
|
14
|
+
const containerStyle = system.createStyle(composeStyles.composeContainerStyles(setting, styles, style));
|
|
15
|
+
const attrs = system.createAttr({
|
|
16
|
+
...composeAttrs.composeContainerAttrs({
|
|
17
|
+
uid: builderProps?.uid || ''
|
|
18
|
+
}, setting)
|
|
19
|
+
});
|
|
14
20
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
21
|
+
...attrs,
|
|
22
|
+
...builderAttrs,
|
|
15
23
|
style: containerStyle,
|
|
16
24
|
children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : children
|
|
17
25
|
});
|
|
@@ -4,7 +4,7 @@ var common = require('../../../helpers/common.js');
|
|
|
4
4
|
var core = require('@gem-sdk/core');
|
|
5
5
|
|
|
6
6
|
const composeStyles = (styles)=>common.filterTruthy(styles);
|
|
7
|
-
const composeContainerStyles = (setting, styles)=>{
|
|
7
|
+
const composeContainerStyles = (setting, styles, style)=>{
|
|
8
8
|
const { background } = setting ?? {};
|
|
9
9
|
const { globalSize } = styles ?? {};
|
|
10
10
|
const composeGlobalSize = core.makeGlobalSize(globalSize);
|
|
@@ -16,7 +16,8 @@ const composeContainerStyles = (setting, styles)=>{
|
|
|
16
16
|
...core.composeBorderResponsive(styles?.border),
|
|
17
17
|
...core.composeRadiusResponsive(styles?.rounded),
|
|
18
18
|
...core.getStyleBackgroundByDevice(background),
|
|
19
|
-
...core.getGradientBgrStyleByDevice(background)
|
|
19
|
+
...core.getGradientBgrStyleByDevice(background),
|
|
20
|
+
...style
|
|
20
21
|
});
|
|
21
22
|
};
|
|
22
23
|
|
|
@@ -8,14 +8,27 @@ var core = require('@gem-sdk/core');
|
|
|
8
8
|
var ChildrenDroppable = require('../../../grid/components/ChildrenDroppable.js');
|
|
9
9
|
var system = require('@gem-sdk/system');
|
|
10
10
|
var composeStyles = require('../contact/common/composeStyles.js');
|
|
11
|
+
var composeAttrs = require('./common/composeAttrs.js');
|
|
11
12
|
|
|
12
|
-
const
|
|
13
|
-
|
|
13
|
+
const getAttr = ({ uid })=>{
|
|
14
|
+
return {
|
|
15
|
+
'data-id': uid
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
const Newsletter = ({ children, setting, styles, style, builderAttrs, builderProps })=>{
|
|
19
|
+
const containerStyle = system.createStyle(composeStyles.composeContainerStyles(setting, styles, style));
|
|
20
|
+
const attrs = system.createAttr({
|
|
21
|
+
...composeAttrs.composeContainerAttrs({
|
|
22
|
+
uid: builderProps?.uid || ''
|
|
23
|
+
}, setting)
|
|
24
|
+
});
|
|
14
25
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
15
|
-
|
|
26
|
+
...attrs,
|
|
27
|
+
...builderAttrs,
|
|
16
28
|
style: containerStyle,
|
|
17
29
|
children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : children
|
|
18
30
|
});
|
|
19
31
|
};
|
|
20
32
|
|
|
21
33
|
exports.default = Newsletter;
|
|
34
|
+
exports.getAttr = getAttr;
|
|
@@ -5,8 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const ContactSettings = [
|
|
6
6
|
{
|
|
7
7
|
id: 'setting',
|
|
8
|
-
note: `This element sends submissions to <a class="no-underline text-primary-250" target="_blank" href="https://help.shopify.com/en/manual/customers/manage-customers#email-customers">the sender email address</a>`,
|
|
9
8
|
controls: [
|
|
9
|
+
{
|
|
10
|
+
id: 'contentBanner',
|
|
11
|
+
type: 'banner',
|
|
12
|
+
message: `This element sends submissions to <a class="no-underline text-primary-250" target="_blank" href="https://help.shopify.com/en/manual/customers/manage-customers#email-customers">the sender email address</a>`,
|
|
13
|
+
closable: true
|
|
14
|
+
},
|
|
10
15
|
{
|
|
11
16
|
id: 'callbackURL',
|
|
12
17
|
type: 'pick-link',
|
|
@@ -5,8 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const NewsletterSettings = [
|
|
6
6
|
{
|
|
7
7
|
id: 'setting',
|
|
8
|
-
note: `This element sends submissions to <a class="no-underline text-primary-250" target="_blank" href="https://help.shopify.com/en/manual/customers/manage-customers#email-customers">the sender email address</a>`,
|
|
9
8
|
controls: [
|
|
9
|
+
{
|
|
10
|
+
id: 'contentBanner',
|
|
11
|
+
type: 'banner',
|
|
12
|
+
message: `You can manage collected email in <a class="no-underline text-primary-250" target="_blank" href="https://admin.shopify.com/customers">Customers</a>`,
|
|
13
|
+
closable: true
|
|
14
|
+
},
|
|
10
15
|
{
|
|
11
16
|
id: 'afterSubmitAction',
|
|
12
17
|
type: 'select',
|
|
@@ -47,7 +52,8 @@ const NewsletterSettings = [
|
|
|
47
52
|
id: 'successColor',
|
|
48
53
|
type: 'color-picker-v2',
|
|
49
54
|
label: 'Color',
|
|
50
|
-
default: '#00A042'
|
|
55
|
+
default: '#00A042',
|
|
56
|
+
compoDefaultValue: '#00A042'
|
|
51
57
|
},
|
|
52
58
|
{
|
|
53
59
|
id: 'errorMessage',
|
|
@@ -61,7 +67,8 @@ const NewsletterSettings = [
|
|
|
61
67
|
id: 'errorColor',
|
|
62
68
|
type: 'color-picker-v2',
|
|
63
69
|
label: 'Color',
|
|
64
|
-
default: '#F44336'
|
|
70
|
+
default: '#F44336',
|
|
71
|
+
compoDefaultValue: '#F44336'
|
|
65
72
|
},
|
|
66
73
|
{
|
|
67
74
|
id: 'translate',
|
package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOfferItem.js
CHANGED
|
@@ -13,7 +13,13 @@ var classes = require('../common/classes.js');
|
|
|
13
13
|
const ProductOfferItem = (props)=>{
|
|
14
14
|
const { product, setting, builderProps, children, index, totalProduct, builderAttrs, styles } = props;
|
|
15
15
|
const mode = core.useEditorMode();
|
|
16
|
-
const { variantSelected, ...rowSetting } = setting ?? {};
|
|
16
|
+
const { variantSelected, productOfferLayout, layout, ...rowSetting } = setting ?? {};
|
|
17
|
+
Object.keys(layout || {}).forEach((device)=>{
|
|
18
|
+
const key = device;
|
|
19
|
+
if (productOfferLayout?.[key] === '2col' && layout?.[key]) {
|
|
20
|
+
layout[key].display = 'fill';
|
|
21
|
+
}
|
|
22
|
+
});
|
|
17
23
|
const variantId = variantSelected?.[product?.baseID ?? '']?.variantId;
|
|
18
24
|
const attrs$1 = system.createAttr({
|
|
19
25
|
...attrs.getProductOfferAttrs(product, builderProps?.uid)
|
|
@@ -33,7 +39,10 @@ const ProductOfferItem = (props)=>{
|
|
|
33
39
|
} : {},
|
|
34
40
|
children: /*#__PURE__*/ jsxRuntime.jsx(Row.default, {
|
|
35
41
|
builderAttrs: builderAttrs,
|
|
36
|
-
setting:
|
|
42
|
+
setting: {
|
|
43
|
+
...rowSetting,
|
|
44
|
+
layout
|
|
45
|
+
},
|
|
37
46
|
styles: styles,
|
|
38
47
|
children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : children
|
|
39
48
|
})
|
|
@@ -2,14 +2,29 @@ const SettingCode = [
|
|
|
2
2
|
{
|
|
3
3
|
id: 'setting',
|
|
4
4
|
controls: [
|
|
5
|
+
{
|
|
6
|
+
id: 'contentBanner',
|
|
7
|
+
type: 'banner',
|
|
8
|
+
message: `You can insert HTML, CSS, JavaScript or Liquid code <a class="no-underline text-primary-250" target="_blank" href="https://help.gempages.net/articles/custom-code-element?utm_source=element-setting-tips#custom-code">Learn more</a>`,
|
|
9
|
+
closable: true
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: 'name',
|
|
13
|
+
type: 'input',
|
|
14
|
+
default: 'Custom code'
|
|
15
|
+
},
|
|
5
16
|
{
|
|
6
17
|
id: 'editorData',
|
|
7
18
|
type: 'customCodeEditor'
|
|
8
19
|
},
|
|
20
|
+
{
|
|
21
|
+
id: 'speedParallax',
|
|
22
|
+
type: 'customCodeEditor'
|
|
23
|
+
},
|
|
9
24
|
{
|
|
10
25
|
id: 'background',
|
|
11
|
-
type: 'background',
|
|
12
|
-
|
|
26
|
+
type: 'background-media',
|
|
27
|
+
ignoreReRender: true,
|
|
13
28
|
devices: {
|
|
14
29
|
desktop: {
|
|
15
30
|
default: {
|
|
@@ -29,6 +44,27 @@ const SettingCode = [
|
|
|
29
44
|
attachment: 'scroll'
|
|
30
45
|
}
|
|
31
46
|
}
|
|
47
|
+
},
|
|
48
|
+
compoDefaultValue: {
|
|
49
|
+
desktop: {
|
|
50
|
+
default: {
|
|
51
|
+
type: 'color',
|
|
52
|
+
color: '#DDDDDD',
|
|
53
|
+
image: {
|
|
54
|
+
src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
|
|
55
|
+
width: 1200,
|
|
56
|
+
height: 480
|
|
57
|
+
},
|
|
58
|
+
size: 'cover',
|
|
59
|
+
position: {
|
|
60
|
+
x: 50,
|
|
61
|
+
y: 50
|
|
62
|
+
},
|
|
63
|
+
repeat: 'no-repeat',
|
|
64
|
+
attachment: 'scroll',
|
|
65
|
+
preload: false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
32
68
|
}
|
|
33
69
|
},
|
|
34
70
|
{
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
const SettingUIV2 = [
|
|
2
2
|
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
controls: [
|
|
4
|
+
{
|
|
5
|
+
setting: {
|
|
6
|
+
id: 'contentBanner'
|
|
7
|
+
},
|
|
8
|
+
layout: 'vertical'
|
|
9
9
|
}
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: {
|
|
14
|
+
en: 'Custom code'
|
|
10
15
|
},
|
|
11
16
|
controls: [
|
|
12
17
|
{
|
|
13
|
-
type: 'control',
|
|
14
18
|
setting: {
|
|
15
19
|
id: 'editorData'
|
|
16
20
|
},
|
|
17
|
-
|
|
21
|
+
label: {
|
|
22
|
+
en: 'Code'
|
|
23
|
+
}
|
|
18
24
|
}
|
|
19
25
|
]
|
|
20
26
|
},
|
|
@@ -42,6 +48,22 @@ const SettingUIV2 = [
|
|
|
42
48
|
}
|
|
43
49
|
]
|
|
44
50
|
},
|
|
51
|
+
{
|
|
52
|
+
label: {
|
|
53
|
+
en: 'Configuration'
|
|
54
|
+
},
|
|
55
|
+
controls: [
|
|
56
|
+
{
|
|
57
|
+
type: 'control',
|
|
58
|
+
setting: {
|
|
59
|
+
id: 'name'
|
|
60
|
+
},
|
|
61
|
+
label: {
|
|
62
|
+
en: 'Name'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
45
67
|
{
|
|
46
68
|
controls: [
|
|
47
69
|
{
|
|
@@ -3,11 +3,19 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { isEmptyChildren } from '@gem-sdk/core';
|
|
4
4
|
import ChildrenDroppable from '../../../grid/components/ChildrenDroppable.js';
|
|
5
5
|
import { composeContainerStyles } from './common/composeStyles.js';
|
|
6
|
-
import { createStyle } from '@gem-sdk/system';
|
|
6
|
+
import { createStyle, createAttr } from '@gem-sdk/system';
|
|
7
|
+
import { composeContainerAttrs } from '../newsletter/common/composeAttrs.js';
|
|
7
8
|
|
|
8
|
-
const ContactForm = ({ children, styles, setting })=>{
|
|
9
|
-
const containerStyle = createStyle(composeContainerStyles(setting, styles));
|
|
9
|
+
const ContactForm = ({ children, styles, setting, style, builderAttrs, builderProps })=>{
|
|
10
|
+
const containerStyle = createStyle(composeContainerStyles(setting, styles, style));
|
|
11
|
+
const attrs = createAttr({
|
|
12
|
+
...composeContainerAttrs({
|
|
13
|
+
uid: builderProps?.uid || ''
|
|
14
|
+
}, setting)
|
|
15
|
+
});
|
|
10
16
|
return /*#__PURE__*/ jsx("div", {
|
|
17
|
+
...attrs,
|
|
18
|
+
...builderAttrs,
|
|
11
19
|
style: containerStyle,
|
|
12
20
|
children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : children
|
|
13
21
|
});
|
|
@@ -2,7 +2,7 @@ import { filterTruthy } from '../../../helpers/common.js';
|
|
|
2
2
|
import { makeGlobalSize, composeBorderResponsive, composeRadiusResponsive, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
|
|
3
3
|
|
|
4
4
|
const composeStyles = (styles)=>filterTruthy(styles);
|
|
5
|
-
const composeContainerStyles = (setting, styles)=>{
|
|
5
|
+
const composeContainerStyles = (setting, styles, style)=>{
|
|
6
6
|
const { background } = setting ?? {};
|
|
7
7
|
const { globalSize } = styles ?? {};
|
|
8
8
|
const composeGlobalSize = makeGlobalSize(globalSize);
|
|
@@ -14,7 +14,8 @@ const composeContainerStyles = (setting, styles)=>{
|
|
|
14
14
|
...composeBorderResponsive(styles?.border),
|
|
15
15
|
...composeRadiusResponsive(styles?.rounded),
|
|
16
16
|
...getStyleBackgroundByDevice(background),
|
|
17
|
-
...getGradientBgrStyleByDevice(background)
|
|
17
|
+
...getGradientBgrStyleByDevice(background),
|
|
18
|
+
...style
|
|
18
19
|
});
|
|
19
20
|
};
|
|
20
21
|
|
|
@@ -2,16 +2,28 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { isEmptyChildren } from '@gem-sdk/core';
|
|
4
4
|
import ChildrenDroppable from '../../../grid/components/ChildrenDroppable.js';
|
|
5
|
-
import { createStyle } from '@gem-sdk/system';
|
|
5
|
+
import { createStyle, createAttr } from '@gem-sdk/system';
|
|
6
6
|
import { composeContainerStyles } from '../contact/common/composeStyles.js';
|
|
7
|
+
import { composeContainerAttrs } from './common/composeAttrs.js';
|
|
7
8
|
|
|
8
|
-
const
|
|
9
|
-
|
|
9
|
+
const getAttr = ({ uid })=>{
|
|
10
|
+
return {
|
|
11
|
+
'data-id': uid
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const Newsletter = ({ children, setting, styles, style, builderAttrs, builderProps })=>{
|
|
15
|
+
const containerStyle = createStyle(composeContainerStyles(setting, styles, style));
|
|
16
|
+
const attrs = createAttr({
|
|
17
|
+
...composeContainerAttrs({
|
|
18
|
+
uid: builderProps?.uid || ''
|
|
19
|
+
}, setting)
|
|
20
|
+
});
|
|
10
21
|
return /*#__PURE__*/ jsx("div", {
|
|
11
|
-
|
|
22
|
+
...attrs,
|
|
23
|
+
...builderAttrs,
|
|
12
24
|
style: containerStyle,
|
|
13
25
|
children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : children
|
|
14
26
|
});
|
|
15
27
|
};
|
|
16
28
|
|
|
17
|
-
export { Newsletter as default };
|
|
29
|
+
export { Newsletter as default, getAttr };
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
const ContactSettings = [
|
|
2
2
|
{
|
|
3
3
|
id: 'setting',
|
|
4
|
-
note: `This element sends submissions to <a class="no-underline text-primary-250" target="_blank" href="https://help.shopify.com/en/manual/customers/manage-customers#email-customers">the sender email address</a>`,
|
|
5
4
|
controls: [
|
|
5
|
+
{
|
|
6
|
+
id: 'contentBanner',
|
|
7
|
+
type: 'banner',
|
|
8
|
+
message: `This element sends submissions to <a class="no-underline text-primary-250" target="_blank" href="https://help.shopify.com/en/manual/customers/manage-customers#email-customers">the sender email address</a>`,
|
|
9
|
+
closable: true
|
|
10
|
+
},
|
|
6
11
|
{
|
|
7
12
|
id: 'callbackURL',
|
|
8
13
|
type: 'pick-link',
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
const NewsletterSettings = [
|
|
2
2
|
{
|
|
3
3
|
id: 'setting',
|
|
4
|
-
note: `This element sends submissions to <a class="no-underline text-primary-250" target="_blank" href="https://help.shopify.com/en/manual/customers/manage-customers#email-customers">the sender email address</a>`,
|
|
5
4
|
controls: [
|
|
5
|
+
{
|
|
6
|
+
id: 'contentBanner',
|
|
7
|
+
type: 'banner',
|
|
8
|
+
message: `You can manage collected email in <a class="no-underline text-primary-250" target="_blank" href="https://admin.shopify.com/customers">Customers</a>`,
|
|
9
|
+
closable: true
|
|
10
|
+
},
|
|
6
11
|
{
|
|
7
12
|
id: 'afterSubmitAction',
|
|
8
13
|
type: 'select',
|
|
@@ -43,7 +48,8 @@ const NewsletterSettings = [
|
|
|
43
48
|
id: 'successColor',
|
|
44
49
|
type: 'color-picker-v2',
|
|
45
50
|
label: 'Color',
|
|
46
|
-
default: '#00A042'
|
|
51
|
+
default: '#00A042',
|
|
52
|
+
compoDefaultValue: '#00A042'
|
|
47
53
|
},
|
|
48
54
|
{
|
|
49
55
|
id: 'errorMessage',
|
|
@@ -57,7 +63,8 @@ const NewsletterSettings = [
|
|
|
57
63
|
id: 'errorColor',
|
|
58
64
|
type: 'color-picker-v2',
|
|
59
65
|
label: 'Color',
|
|
60
|
-
default: '#F44336'
|
|
66
|
+
default: '#F44336',
|
|
67
|
+
compoDefaultValue: '#F44336'
|
|
61
68
|
},
|
|
62
69
|
{
|
|
63
70
|
id: 'translate',
|
package/dist/esm/post-purchase/product/components/product-offer/components/ProductOfferItem.js
CHANGED
|
@@ -11,7 +11,13 @@ import { getProductOfferItemClasses } from '../common/classes.js';
|
|
|
11
11
|
const ProductOfferItem = (props)=>{
|
|
12
12
|
const { product, setting, builderProps, children, index, totalProduct, builderAttrs, styles } = props;
|
|
13
13
|
const mode = useEditorMode();
|
|
14
|
-
const { variantSelected, ...rowSetting } = setting ?? {};
|
|
14
|
+
const { variantSelected, productOfferLayout, layout, ...rowSetting } = setting ?? {};
|
|
15
|
+
Object.keys(layout || {}).forEach((device)=>{
|
|
16
|
+
const key = device;
|
|
17
|
+
if (productOfferLayout?.[key] === '2col' && layout?.[key]) {
|
|
18
|
+
layout[key].display = 'fill';
|
|
19
|
+
}
|
|
20
|
+
});
|
|
15
21
|
const variantId = variantSelected?.[product?.baseID ?? '']?.variantId;
|
|
16
22
|
const attrs = createAttr({
|
|
17
23
|
...getProductOfferAttrs(product, builderProps?.uid)
|
|
@@ -31,7 +37,10 @@ const ProductOfferItem = (props)=>{
|
|
|
31
37
|
} : {},
|
|
32
38
|
children: /*#__PURE__*/ jsx(Row, {
|
|
33
39
|
builderAttrs: builderAttrs,
|
|
34
|
-
setting:
|
|
40
|
+
setting: {
|
|
41
|
+
...rowSetting,
|
|
42
|
+
layout
|
|
43
|
+
},
|
|
35
44
|
styles: styles,
|
|
36
45
|
children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : children
|
|
37
46
|
})
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1201,9 +1201,12 @@ type CSSCodeProps = BasePropsWrap<{
|
|
|
1201
1201
|
javascript?: string;
|
|
1202
1202
|
cssPlaceholder?: string;
|
|
1203
1203
|
};
|
|
1204
|
-
background?: ObjectDevices$1<
|
|
1204
|
+
background?: ObjectDevices$1<BackgroundMedia>;
|
|
1205
1205
|
preloadBgImage?: boolean;
|
|
1206
1206
|
align?: ObjectDevices$1<AlignProp>;
|
|
1207
|
+
name?: string;
|
|
1208
|
+
speedParallax?: any;
|
|
1209
|
+
contentBanner?: string;
|
|
1207
1210
|
}> & {
|
|
1208
1211
|
advanced?: any;
|
|
1209
1212
|
children?: React.ReactNode;
|
|
@@ -1607,6 +1610,7 @@ type NewsLetterSetting = {
|
|
|
1607
1610
|
size?: SizeSetting;
|
|
1608
1611
|
width?: ObjectDevices$1<string | number | undefined>;
|
|
1609
1612
|
afterSubmitActionToggle?: ObjectDevices$1<boolean>;
|
|
1613
|
+
contentBanner?: string;
|
|
1610
1614
|
};
|
|
1611
1615
|
type NewsLetterStyle = {
|
|
1612
1616
|
globalSize?: ObjectDevices$1<SizeSettingGlobal>;
|
|
@@ -1698,9 +1702,9 @@ type TextInputStyle = {
|
|
|
1698
1702
|
};
|
|
1699
1703
|
type TextInputProps = BasePropsWrap<TextInputSetting, TextInputStyle, Advanced> & Omit<React.ComponentPropsWithoutRef<'input'>, ''>;
|
|
1700
1704
|
|
|
1701
|
-
declare const Newsletter$1: ({ children, setting, styles }: NewsletterProps) => React.JSX.Element;
|
|
1705
|
+
declare const Newsletter$1: ({ children, setting, styles, style, builderAttrs, builderProps, }: NewsletterProps) => React.JSX.Element;
|
|
1702
1706
|
|
|
1703
|
-
declare const ContactForm$1: ({ children, styles, setting }: NewsletterProps) => React.JSX.Element;
|
|
1707
|
+
declare const ContactForm$1: ({ children, styles, setting, style, builderAttrs, builderProps, }: NewsletterProps) => React.JSX.Element;
|
|
1704
1708
|
|
|
1705
1709
|
declare const FormEmail$1: ({ builderProps, builderAttrs, setting, advanced, children, styles, }: FormEmailProps) => React.JSX.Element;
|
|
1706
1710
|
|
|
@@ -7257,8 +7261,8 @@ declare const _default$1: {
|
|
|
7257
7261
|
Coupon: React.FC<CouponProps>;
|
|
7258
7262
|
Dialog: (props: DialogProps) => React.JSX.Element;
|
|
7259
7263
|
EstimateDate: React.FC<EstimateDateProps>;
|
|
7260
|
-
Newsletter: ({ children, setting, styles }: NewsletterProps) => React.JSX.Element;
|
|
7261
|
-
ContactForm: ({ children, styles, setting }: NewsletterProps) => React.JSX.Element;
|
|
7264
|
+
Newsletter: ({ children, setting, styles, style, builderAttrs, builderProps, }: NewsletterProps) => React.JSX.Element;
|
|
7265
|
+
ContactForm: ({ children, styles, setting, style, builderAttrs, builderProps, }: NewsletterProps) => React.JSX.Element;
|
|
7262
7266
|
FormEmail: ({ builderProps, builderAttrs, setting, advanced, children, styles, }: FormEmailProps) => React.JSX.Element;
|
|
7263
7267
|
SubmitButton: ({ setting, builderProps, builderAttrs, style, styles, advanced, children, }: SubmitButtonProps) => React.JSX.Element;
|
|
7264
7268
|
TextField: React.FC<TextFieldProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.457",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
26
|
+
"@gem-sdk/core": "2.0.0-dev.455",
|
|
27
27
|
"@gem-sdk/styles": "2.0.0-dev.381",
|
|
28
28
|
"@gem-sdk/system": "2.0.0-dev.451",
|
|
29
29
|
"@types/react-transition-group": "^4.4.5"
|