@gem-sdk/core 1.46.0-staging.25 → 1.46.0-staging.29
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/components/ComponentToolbarPreview.js +41 -7
- package/dist/cjs/components/RenderPreview.js +1 -0
- package/dist/cjs/components/constant.js +2 -1
- package/dist/cjs/helpers/align.js +19 -0
- package/dist/cjs/helpers/colors.js +1 -1
- package/dist/cjs/helpers/shadow.js +1 -1
- package/dist/cjs/hooks/useFormatMoney.js +61 -60
- package/dist/cjs/index.js +3 -0
- package/dist/esm/components/ComponentToolbarPreview.js +41 -7
- package/dist/esm/components/RenderPreview.js +1 -0
- package/dist/esm/components/constant.js +2 -1
- package/dist/esm/helpers/align.js +17 -0
- package/dist/esm/helpers/colors.js +1 -1
- package/dist/esm/helpers/shadow.js +1 -1
- package/dist/esm/hooks/useFormatMoney.js +61 -61
- package/dist/esm/index.js +2 -1
- package/dist/types/index.d.ts +88 -3
- package/package.json +2 -2
|
@@ -47,6 +47,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
47
47
|
const [deleteTooltipPosition, setDeleteTooltipPosition] = react.useState('top');
|
|
48
48
|
const [isDisableDelete, setIsUnableDelete] = react.useState(false);
|
|
49
49
|
const [parentProductUid, setParentProductUid] = react.useState('');
|
|
50
|
+
const [articleUid, setArticleUid] = react.useState('');
|
|
50
51
|
const [tooltipText, setTooltipText] = react.useState({
|
|
51
52
|
width: '',
|
|
52
53
|
text: ''
|
|
@@ -59,8 +60,19 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
59
60
|
const editProductElementList = [
|
|
60
61
|
'Product Title',
|
|
61
62
|
'Product Description',
|
|
62
|
-
'Product Price'
|
|
63
|
-
|
|
63
|
+
'Product Price'
|
|
64
|
+
];
|
|
65
|
+
const editArticleElementList = [
|
|
66
|
+
'Article Title',
|
|
67
|
+
'Article Content',
|
|
68
|
+
'Article Image',
|
|
69
|
+
'Article Author',
|
|
70
|
+
'Article Category',
|
|
71
|
+
'Article Date'
|
|
72
|
+
];
|
|
73
|
+
const editAbleElementList = [
|
|
74
|
+
...editProductElementList,
|
|
75
|
+
...editArticleElementList
|
|
64
76
|
];
|
|
65
77
|
const isOverToolbarPosition = (el, parent)=>{
|
|
66
78
|
const parentLength = parents.length;
|
|
@@ -107,15 +119,29 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
107
119
|
}, [
|
|
108
120
|
storefrontUrl
|
|
109
121
|
]);
|
|
110
|
-
const
|
|
111
|
-
return
|
|
122
|
+
const linkShopDefault = react.useMemo(()=>{
|
|
123
|
+
return `https://admin.shopify.com/store/${shopName}`;
|
|
112
124
|
}, [
|
|
113
|
-
productId,
|
|
114
125
|
shopName
|
|
115
126
|
]);
|
|
127
|
+
const linkEditProduct = react.useMemo(()=>{
|
|
128
|
+
return productId ? `${linkShopDefault}/products/${productId}` : '';
|
|
129
|
+
}, [
|
|
130
|
+
linkShopDefault,
|
|
131
|
+
productId
|
|
132
|
+
]);
|
|
133
|
+
const linkEditArticle = react.useMemo(()=>{
|
|
134
|
+
return articleUid ? `${linkShopDefault}/articles/${articleUid}` : '';
|
|
135
|
+
}, [
|
|
136
|
+
articleUid,
|
|
137
|
+
linkShopDefault
|
|
138
|
+
]);
|
|
116
139
|
// Get parents
|
|
117
140
|
const onActiveComponent = react.useCallback((e)=>{
|
|
118
141
|
const detail = e.detail;
|
|
142
|
+
if (detail?.articleId) {
|
|
143
|
+
setArticleUid(detail.articleId);
|
|
144
|
+
}
|
|
119
145
|
if (detail?.componentUid == props.uid) {
|
|
120
146
|
getDeleteTooltipPosition();
|
|
121
147
|
if (isSaleFunnelPage) {
|
|
@@ -207,7 +233,15 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
207
233
|
window.dispatchEvent(event);
|
|
208
234
|
};
|
|
209
235
|
const goToShopifyEditLink = ()=>{
|
|
210
|
-
|
|
236
|
+
if (editArticleElementList.includes(toolbarName() ?? '')) {
|
|
237
|
+
window.open(linkEditArticle, '_blank');
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (editProductElementList.includes(toolbarName() ?? '')) {
|
|
241
|
+
window.open(linkEditProduct, '_blank');
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
window.open(linkShopDefault, '_blank');
|
|
211
245
|
};
|
|
212
246
|
const onDelete = (e)=>{
|
|
213
247
|
e.preventDefault();
|
|
@@ -486,7 +520,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
486
520
|
})
|
|
487
521
|
})
|
|
488
522
|
}),
|
|
489
|
-
|
|
523
|
+
editAbleElementList.includes(toolbarName() ?? '') && /*#__PURE__*/ jsxRuntime.jsx(Tooltip.default, {
|
|
490
524
|
"data-toolbar-title": true,
|
|
491
525
|
enable: true,
|
|
492
526
|
"data-toolbar-disable": false,
|
|
@@ -45,6 +45,7 @@ const RenderPreview = ({ uid, ...passProps })=>{
|
|
|
45
45
|
setting: item.settings,
|
|
46
46
|
...passProps,
|
|
47
47
|
children: item.childrens.map((id)=>/*#__PURE__*/ jsxRuntime.jsx(RenderPreviewMemo, {
|
|
48
|
+
bundleItem: passProps?.bundleItem,
|
|
48
49
|
uid: id
|
|
49
50
|
}, id))
|
|
50
51
|
}) : /*#__PURE__*/ jsxRuntime.jsx(Component, {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const convertTextAlignToJustify = (align)=>{
|
|
4
|
+
const devices = [
|
|
5
|
+
'desktop',
|
|
6
|
+
'tablet',
|
|
7
|
+
'mobile'
|
|
8
|
+
];
|
|
9
|
+
const result = {};
|
|
10
|
+
devices.forEach((device)=>{
|
|
11
|
+
const deviceType = device === 'desktop' ? '' : `${device}:`;
|
|
12
|
+
result[`${deviceType}gp-justify-start`] = align?.[device] === 'left';
|
|
13
|
+
result[`${deviceType}gp-justify-center`] = align?.[device] === 'center';
|
|
14
|
+
result[`${deviceType}gp-justify-end`] = align?.[device] === 'right';
|
|
15
|
+
});
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.convertTextAlignToJustify = convertTextAlignToJustify;
|
|
@@ -119,7 +119,7 @@ const getGlobalColorStateStyle = (type, data)=>{
|
|
|
119
119
|
return Object.fromEntries(Object.entries(data).map(([state, value])=>{
|
|
120
120
|
if (state === 'active') return [];
|
|
121
121
|
return [
|
|
122
|
-
`-${constant.stateMapping?.[state]}-${type}`,
|
|
122
|
+
`-${constant.stateMapping?.[state] || ''}-${type}`,
|
|
123
123
|
getSingleColorVariable(value)
|
|
124
124
|
];
|
|
125
125
|
}).filter(isDefined.isDefined));
|
|
@@ -27,7 +27,7 @@ const getStyleShadow = (shadowStyle, isActiveState = false)=>{
|
|
|
27
27
|
if (typeof value.distance == 'undefined') return {};
|
|
28
28
|
const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
|
|
29
29
|
return {
|
|
30
|
-
[`-${!isActiveState ? constant.stateMapping?.[state] : ''}-${getShortname.getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${colors.getSingleColorVariable(value?.color)}` : 'none'
|
|
30
|
+
[`-${!isActiveState ? constant.stateMapping?.[state] || '' : ''}-${getShortname.getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${colors.getSingleColorVariable(value?.color)}` : 'none'
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
|
|
@@ -5,70 +5,71 @@ var shop = require('./shop.js');
|
|
|
5
5
|
const shopifyPriceRounding = (amount, precision)=>{
|
|
6
6
|
return parseFloat(`${amount}`).toFixed(Number(precision) + 1).slice(0, -1);
|
|
7
7
|
};
|
|
8
|
+
const formatMoney = function(cents, format) {
|
|
9
|
+
let value = '';
|
|
10
|
+
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
11
|
+
const formatString = format || '${{amount}}';
|
|
12
|
+
/**
|
|
13
|
+
* check default
|
|
14
|
+
* @param opt opt
|
|
15
|
+
* @param def def
|
|
16
|
+
* @returns any
|
|
17
|
+
*/ function defaultOption(opt, def) {
|
|
18
|
+
return typeof opt == 'undefined' ? def : opt;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* formatWithDelimiters
|
|
22
|
+
* @param number number
|
|
23
|
+
* @param precision precision
|
|
24
|
+
* @param thousands thousands
|
|
25
|
+
* @param decimal decimal
|
|
26
|
+
* @returns any
|
|
27
|
+
*/ // eslint-disable-next-line max-params
|
|
28
|
+
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
29
|
+
precision = defaultOption(precision, 2);
|
|
30
|
+
thousands = defaultOption(thousands, ',');
|
|
31
|
+
decimal = defaultOption(decimal, '.');
|
|
32
|
+
if (isNaN(number) || number == null) {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
36
|
+
number = shopifyPriceRounding(number, Number(precision));
|
|
37
|
+
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
38
|
+
return dollars + cents;
|
|
39
|
+
}
|
|
40
|
+
switch(formatString.match(placeholderRegex)[1]){
|
|
41
|
+
case 'amount':
|
|
42
|
+
value = formatWithDelimiters(cents, 2);
|
|
43
|
+
break;
|
|
44
|
+
case 'amount_no_decimals':
|
|
45
|
+
value = formatWithDelimiters(cents, 0);
|
|
46
|
+
break;
|
|
47
|
+
case 'amount_with_comma_separator':
|
|
48
|
+
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
49
|
+
break;
|
|
50
|
+
case 'amount_no_decimals_with_comma_separator':
|
|
51
|
+
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
52
|
+
break;
|
|
53
|
+
case 'amount_with_apostrophe_separator':
|
|
54
|
+
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
55
|
+
break;
|
|
56
|
+
case 'amount_no_decimals_with_space_separator':
|
|
57
|
+
value = formatWithDelimiters(cents, 0, ' ');
|
|
58
|
+
break;
|
|
59
|
+
case 'amount_with_space_separator':
|
|
60
|
+
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
61
|
+
break;
|
|
62
|
+
case 'amount_with_period_and_space_separator':
|
|
63
|
+
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
return formatString.replace(placeholderRegex, value);
|
|
67
|
+
};
|
|
8
68
|
const useFormatMoney = (amount, withCurrency)=>{
|
|
9
69
|
const { moneyFormat, moneyWithCurrencyFormat } = shop.useMoneyFormat();
|
|
10
|
-
const formatMoney = function(cents, format) {
|
|
11
|
-
let value = '';
|
|
12
|
-
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
13
|
-
const formatString = format || '${{amount}}';
|
|
14
|
-
/**
|
|
15
|
-
* check default
|
|
16
|
-
* @param opt opt
|
|
17
|
-
* @param def def
|
|
18
|
-
* @returns any
|
|
19
|
-
*/ function defaultOption(opt, def) {
|
|
20
|
-
return typeof opt == 'undefined' ? def : opt;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* formatWithDelimiters
|
|
24
|
-
* @param number number
|
|
25
|
-
* @param precision precision
|
|
26
|
-
* @param thousands thousands
|
|
27
|
-
* @param decimal decimal
|
|
28
|
-
* @returns any
|
|
29
|
-
*/ // eslint-disable-next-line max-params
|
|
30
|
-
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
31
|
-
precision = defaultOption(precision, 2);
|
|
32
|
-
thousands = defaultOption(thousands, ',');
|
|
33
|
-
decimal = defaultOption(decimal, '.');
|
|
34
|
-
if (isNaN(number) || number == null) {
|
|
35
|
-
return 0;
|
|
36
|
-
}
|
|
37
|
-
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
38
|
-
number = shopifyPriceRounding(number, Number(precision));
|
|
39
|
-
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
40
|
-
return dollars + cents;
|
|
41
|
-
}
|
|
42
|
-
switch(formatString.match(placeholderRegex)[1]){
|
|
43
|
-
case 'amount':
|
|
44
|
-
value = formatWithDelimiters(cents, 2);
|
|
45
|
-
break;
|
|
46
|
-
case 'amount_no_decimals':
|
|
47
|
-
value = formatWithDelimiters(cents, 0);
|
|
48
|
-
break;
|
|
49
|
-
case 'amount_with_comma_separator':
|
|
50
|
-
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
51
|
-
break;
|
|
52
|
-
case 'amount_no_decimals_with_comma_separator':
|
|
53
|
-
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
54
|
-
break;
|
|
55
|
-
case 'amount_with_apostrophe_separator':
|
|
56
|
-
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
57
|
-
break;
|
|
58
|
-
case 'amount_no_decimals_with_space_separator':
|
|
59
|
-
value = formatWithDelimiters(cents, 0, ' ');
|
|
60
|
-
break;
|
|
61
|
-
case 'amount_with_space_separator':
|
|
62
|
-
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
63
|
-
break;
|
|
64
|
-
case 'amount_with_period_and_space_separator':
|
|
65
|
-
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
return formatString.replace(placeholderRegex, value);
|
|
69
|
-
};
|
|
70
70
|
return withCurrency ? formatMoney(`${amount}`, moneyWithCurrencyFormat || moneyFormat) : formatMoney(`${amount}`, moneyFormat);
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
exports.formatMoney = formatMoney;
|
|
73
74
|
exports.shopifyPriceRounding = shopifyPriceRounding;
|
|
74
75
|
exports.useFormatMoney = useFormatMoney;
|
package/dist/cjs/index.js
CHANGED
|
@@ -60,6 +60,7 @@ var iconList = require('./helpers/icon-list.js');
|
|
|
60
60
|
var isDefined = require('./helpers/is-defined.js');
|
|
61
61
|
var layout = require('./helpers/layout.js');
|
|
62
62
|
var makeStyle = require('./helpers/make-style.js');
|
|
63
|
+
var align = require('./helpers/align.js');
|
|
63
64
|
var product = require('./helpers/product.js');
|
|
64
65
|
var query = require('./helpers/query.js');
|
|
65
66
|
var radius = require('./helpers/radius.js');
|
|
@@ -243,6 +244,7 @@ exports.makeStyleResponsiveState = makeStyle.makeStyleResponsiveState;
|
|
|
243
244
|
exports.makeStyleState = makeStyle.makeStyleState;
|
|
244
245
|
exports.makeWidth = makeStyle.makeWidth;
|
|
245
246
|
exports.removeNullUndefined = makeStyle.removeNullUndefined;
|
|
247
|
+
exports.convertTextAlignToJustify = align.convertTextAlignToJustify;
|
|
246
248
|
exports.checkAvailableVariantInStock = product.checkAvailableVariantInStock;
|
|
247
249
|
exports.getSelectedVariant = product.getSelectedVariant;
|
|
248
250
|
exports.parseSelectedOption = product.parseSelectedOption;
|
|
@@ -317,6 +319,7 @@ exports.useProductQuery = useProductQuery.useProductQuery;
|
|
|
317
319
|
exports.useProductsQuery = useProductsQuery.useProductsQuery;
|
|
318
320
|
exports.useProductsQueryAll = useProductsQuery.useProductsQueryAll;
|
|
319
321
|
exports.useCurrentDevice = useCurrentDevice.useCurrentDevice;
|
|
322
|
+
exports.formatMoney = useFormatMoney.formatMoney;
|
|
320
323
|
exports.shopifyPriceRounding = useFormatMoney.shopifyPriceRounding;
|
|
321
324
|
exports.useFormatMoney = useFormatMoney.useFormatMoney;
|
|
322
325
|
exports.useLazyVideo = useLazyVideo.useLazyVideo;
|
|
@@ -43,6 +43,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
43
43
|
const [deleteTooltipPosition, setDeleteTooltipPosition] = useState('top');
|
|
44
44
|
const [isDisableDelete, setIsUnableDelete] = useState(false);
|
|
45
45
|
const [parentProductUid, setParentProductUid] = useState('');
|
|
46
|
+
const [articleUid, setArticleUid] = useState('');
|
|
46
47
|
const [tooltipText, setTooltipText] = useState({
|
|
47
48
|
width: '',
|
|
48
49
|
text: ''
|
|
@@ -55,8 +56,19 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
55
56
|
const editProductElementList = [
|
|
56
57
|
'Product Title',
|
|
57
58
|
'Product Description',
|
|
58
|
-
'Product Price'
|
|
59
|
-
|
|
59
|
+
'Product Price'
|
|
60
|
+
];
|
|
61
|
+
const editArticleElementList = [
|
|
62
|
+
'Article Title',
|
|
63
|
+
'Article Content',
|
|
64
|
+
'Article Image',
|
|
65
|
+
'Article Author',
|
|
66
|
+
'Article Category',
|
|
67
|
+
'Article Date'
|
|
68
|
+
];
|
|
69
|
+
const editAbleElementList = [
|
|
70
|
+
...editProductElementList,
|
|
71
|
+
...editArticleElementList
|
|
60
72
|
];
|
|
61
73
|
const isOverToolbarPosition = (el, parent)=>{
|
|
62
74
|
const parentLength = parents.length;
|
|
@@ -103,15 +115,29 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
103
115
|
}, [
|
|
104
116
|
storefrontUrl
|
|
105
117
|
]);
|
|
106
|
-
const
|
|
107
|
-
return
|
|
118
|
+
const linkShopDefault = useMemo(()=>{
|
|
119
|
+
return `https://admin.shopify.com/store/${shopName}`;
|
|
108
120
|
}, [
|
|
109
|
-
productId,
|
|
110
121
|
shopName
|
|
111
122
|
]);
|
|
123
|
+
const linkEditProduct = useMemo(()=>{
|
|
124
|
+
return productId ? `${linkShopDefault}/products/${productId}` : '';
|
|
125
|
+
}, [
|
|
126
|
+
linkShopDefault,
|
|
127
|
+
productId
|
|
128
|
+
]);
|
|
129
|
+
const linkEditArticle = useMemo(()=>{
|
|
130
|
+
return articleUid ? `${linkShopDefault}/articles/${articleUid}` : '';
|
|
131
|
+
}, [
|
|
132
|
+
articleUid,
|
|
133
|
+
linkShopDefault
|
|
134
|
+
]);
|
|
112
135
|
// Get parents
|
|
113
136
|
const onActiveComponent = useCallback((e)=>{
|
|
114
137
|
const detail = e.detail;
|
|
138
|
+
if (detail?.articleId) {
|
|
139
|
+
setArticleUid(detail.articleId);
|
|
140
|
+
}
|
|
115
141
|
if (detail?.componentUid == props.uid) {
|
|
116
142
|
getDeleteTooltipPosition();
|
|
117
143
|
if (isSaleFunnelPage) {
|
|
@@ -203,7 +229,15 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
203
229
|
window.dispatchEvent(event);
|
|
204
230
|
};
|
|
205
231
|
const goToShopifyEditLink = ()=>{
|
|
206
|
-
|
|
232
|
+
if (editArticleElementList.includes(toolbarName() ?? '')) {
|
|
233
|
+
window.open(linkEditArticle, '_blank');
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
if (editProductElementList.includes(toolbarName() ?? '')) {
|
|
237
|
+
window.open(linkEditProduct, '_blank');
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
window.open(linkShopDefault, '_blank');
|
|
207
241
|
};
|
|
208
242
|
const onDelete = (e)=>{
|
|
209
243
|
e.preventDefault();
|
|
@@ -482,7 +516,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
482
516
|
})
|
|
483
517
|
})
|
|
484
518
|
}),
|
|
485
|
-
|
|
519
|
+
editAbleElementList.includes(toolbarName() ?? '') && /*#__PURE__*/ jsx(Tooltip, {
|
|
486
520
|
"data-toolbar-title": true,
|
|
487
521
|
enable: true,
|
|
488
522
|
"data-toolbar-disable": false,
|
|
@@ -41,6 +41,7 @@ const RenderPreview = ({ uid, ...passProps })=>{
|
|
|
41
41
|
setting: item.settings,
|
|
42
42
|
...passProps,
|
|
43
43
|
children: item.childrens.map((id)=>/*#__PURE__*/ jsx(RenderPreviewMemo, {
|
|
44
|
+
bundleItem: passProps?.bundleItem,
|
|
44
45
|
uid: id
|
|
45
46
|
}, id))
|
|
46
47
|
}) : /*#__PURE__*/ jsx(Component, {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const convertTextAlignToJustify = (align)=>{
|
|
2
|
+
const devices = [
|
|
3
|
+
'desktop',
|
|
4
|
+
'tablet',
|
|
5
|
+
'mobile'
|
|
6
|
+
];
|
|
7
|
+
const result = {};
|
|
8
|
+
devices.forEach((device)=>{
|
|
9
|
+
const deviceType = device === 'desktop' ? '' : `${device}:`;
|
|
10
|
+
result[`${deviceType}gp-justify-start`] = align?.[device] === 'left';
|
|
11
|
+
result[`${deviceType}gp-justify-center`] = align?.[device] === 'center';
|
|
12
|
+
result[`${deviceType}gp-justify-end`] = align?.[device] === 'right';
|
|
13
|
+
});
|
|
14
|
+
return result;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { convertTextAlignToJustify };
|
|
@@ -117,7 +117,7 @@ const getGlobalColorStateStyle = (type, data)=>{
|
|
|
117
117
|
return Object.fromEntries(Object.entries(data).map(([state, value])=>{
|
|
118
118
|
if (state === 'active') return [];
|
|
119
119
|
return [
|
|
120
|
-
`-${stateMapping?.[state]}-${type}`,
|
|
120
|
+
`-${stateMapping?.[state] || ''}-${type}`,
|
|
121
121
|
getSingleColorVariable(value)
|
|
122
122
|
];
|
|
123
123
|
}).filter(isDefined));
|
|
@@ -25,7 +25,7 @@ const getStyleShadow = (shadowStyle, isActiveState = false)=>{
|
|
|
25
25
|
if (typeof value.distance == 'undefined') return {};
|
|
26
26
|
const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
|
|
27
27
|
return {
|
|
28
|
-
[`-${!isActiveState ? stateMapping?.[state] : ''}-${getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${getSingleColorVariable(value?.color)}` : 'none'
|
|
28
|
+
[`-${!isActiveState ? stateMapping?.[state] || '' : ''}-${getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${getSingleColorVariable(value?.color)}` : 'none'
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
|
|
@@ -3,69 +3,69 @@ import { useMoneyFormat } from './shop.js';
|
|
|
3
3
|
const shopifyPriceRounding = (amount, precision)=>{
|
|
4
4
|
return parseFloat(`${amount}`).toFixed(Number(precision) + 1).slice(0, -1);
|
|
5
5
|
};
|
|
6
|
+
const formatMoney = function(cents, format) {
|
|
7
|
+
let value = '';
|
|
8
|
+
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
9
|
+
const formatString = format || '${{amount}}';
|
|
10
|
+
/**
|
|
11
|
+
* check default
|
|
12
|
+
* @param opt opt
|
|
13
|
+
* @param def def
|
|
14
|
+
* @returns any
|
|
15
|
+
*/ function defaultOption(opt, def) {
|
|
16
|
+
return typeof opt == 'undefined' ? def : opt;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* formatWithDelimiters
|
|
20
|
+
* @param number number
|
|
21
|
+
* @param precision precision
|
|
22
|
+
* @param thousands thousands
|
|
23
|
+
* @param decimal decimal
|
|
24
|
+
* @returns any
|
|
25
|
+
*/ // eslint-disable-next-line max-params
|
|
26
|
+
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
27
|
+
precision = defaultOption(precision, 2);
|
|
28
|
+
thousands = defaultOption(thousands, ',');
|
|
29
|
+
decimal = defaultOption(decimal, '.');
|
|
30
|
+
if (isNaN(number) || number == null) {
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
34
|
+
number = shopifyPriceRounding(number, Number(precision));
|
|
35
|
+
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
36
|
+
return dollars + cents;
|
|
37
|
+
}
|
|
38
|
+
switch(formatString.match(placeholderRegex)[1]){
|
|
39
|
+
case 'amount':
|
|
40
|
+
value = formatWithDelimiters(cents, 2);
|
|
41
|
+
break;
|
|
42
|
+
case 'amount_no_decimals':
|
|
43
|
+
value = formatWithDelimiters(cents, 0);
|
|
44
|
+
break;
|
|
45
|
+
case 'amount_with_comma_separator':
|
|
46
|
+
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
47
|
+
break;
|
|
48
|
+
case 'amount_no_decimals_with_comma_separator':
|
|
49
|
+
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
50
|
+
break;
|
|
51
|
+
case 'amount_with_apostrophe_separator':
|
|
52
|
+
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
53
|
+
break;
|
|
54
|
+
case 'amount_no_decimals_with_space_separator':
|
|
55
|
+
value = formatWithDelimiters(cents, 0, ' ');
|
|
56
|
+
break;
|
|
57
|
+
case 'amount_with_space_separator':
|
|
58
|
+
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
59
|
+
break;
|
|
60
|
+
case 'amount_with_period_and_space_separator':
|
|
61
|
+
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
return formatString.replace(placeholderRegex, value);
|
|
65
|
+
};
|
|
6
66
|
const useFormatMoney = (amount, withCurrency)=>{
|
|
7
67
|
const { moneyFormat, moneyWithCurrencyFormat } = useMoneyFormat();
|
|
8
|
-
const formatMoney = function(cents, format) {
|
|
9
|
-
let value = '';
|
|
10
|
-
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
11
|
-
const formatString = format || '${{amount}}';
|
|
12
|
-
/**
|
|
13
|
-
* check default
|
|
14
|
-
* @param opt opt
|
|
15
|
-
* @param def def
|
|
16
|
-
* @returns any
|
|
17
|
-
*/ function defaultOption(opt, def) {
|
|
18
|
-
return typeof opt == 'undefined' ? def : opt;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* formatWithDelimiters
|
|
22
|
-
* @param number number
|
|
23
|
-
* @param precision precision
|
|
24
|
-
* @param thousands thousands
|
|
25
|
-
* @param decimal decimal
|
|
26
|
-
* @returns any
|
|
27
|
-
*/ // eslint-disable-next-line max-params
|
|
28
|
-
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
29
|
-
precision = defaultOption(precision, 2);
|
|
30
|
-
thousands = defaultOption(thousands, ',');
|
|
31
|
-
decimal = defaultOption(decimal, '.');
|
|
32
|
-
if (isNaN(number) || number == null) {
|
|
33
|
-
return 0;
|
|
34
|
-
}
|
|
35
|
-
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
36
|
-
number = shopifyPriceRounding(number, Number(precision));
|
|
37
|
-
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
38
|
-
return dollars + cents;
|
|
39
|
-
}
|
|
40
|
-
switch(formatString.match(placeholderRegex)[1]){
|
|
41
|
-
case 'amount':
|
|
42
|
-
value = formatWithDelimiters(cents, 2);
|
|
43
|
-
break;
|
|
44
|
-
case 'amount_no_decimals':
|
|
45
|
-
value = formatWithDelimiters(cents, 0);
|
|
46
|
-
break;
|
|
47
|
-
case 'amount_with_comma_separator':
|
|
48
|
-
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
49
|
-
break;
|
|
50
|
-
case 'amount_no_decimals_with_comma_separator':
|
|
51
|
-
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
52
|
-
break;
|
|
53
|
-
case 'amount_with_apostrophe_separator':
|
|
54
|
-
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
55
|
-
break;
|
|
56
|
-
case 'amount_no_decimals_with_space_separator':
|
|
57
|
-
value = formatWithDelimiters(cents, 0, ' ');
|
|
58
|
-
break;
|
|
59
|
-
case 'amount_with_space_separator':
|
|
60
|
-
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
61
|
-
break;
|
|
62
|
-
case 'amount_with_period_and_space_separator':
|
|
63
|
-
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
return formatString.replace(placeholderRegex, value);
|
|
67
|
-
};
|
|
68
68
|
return withCurrency ? formatMoney(`${amount}`, moneyWithCurrencyFormat || moneyFormat) : formatMoney(`${amount}`, moneyFormat);
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
export { shopifyPriceRounding, useFormatMoney };
|
|
71
|
+
export { formatMoney, shopifyPriceRounding, useFormatMoney };
|
package/dist/esm/index.js
CHANGED
|
@@ -61,6 +61,7 @@ export { composePositionLineHeight, composePostionIconList } from './helpers/ico
|
|
|
61
61
|
export { isDefined } from './helpers/is-defined.js';
|
|
62
62
|
export { composeGridLayout, convertOldLayout, gridToArrayRegex, optionLayoutStyle } from './helpers/layout.js';
|
|
63
63
|
export { makeAspectRatio, makeGlobalSizeHeightResponsive, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeWidth, removeNullUndefined } from './helpers/make-style.js';
|
|
64
|
+
export { convertTextAlignToJustify } from './helpers/align.js';
|
|
64
65
|
export { checkAvailableVariantInStock, getSelectedVariant, parseSelectedOption } from './helpers/product.js';
|
|
65
66
|
export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey } from './helpers/query.js';
|
|
66
67
|
export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
|
|
@@ -81,7 +82,7 @@ export { useCollectionsQuery } from './hooks/shop/use-collections-query.js';
|
|
|
81
82
|
export { useProductQuery } from './hooks/shop/use-product-query.js';
|
|
82
83
|
export { useProductsQuery, useProductsQueryAll } from './hooks/shop/use-products-query.js';
|
|
83
84
|
export { useCurrentDevice } from './hooks/use-current-device.js';
|
|
84
|
-
export { shopifyPriceRounding, useFormatMoney } from './hooks/useFormatMoney.js';
|
|
85
|
+
export { formatMoney, shopifyPriceRounding, useFormatMoney } from './hooks/useFormatMoney.js';
|
|
85
86
|
export { useLazyVideo } from './hooks/use-lazy-video.js';
|
|
86
87
|
export { default as useCartId } from './hooks/useCartId.js';
|
|
87
88
|
export { default as useCartLine } from './hooks/useCartLine.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6832,6 +6832,7 @@ type ImageShape$1 = {
|
|
|
6832
6832
|
type SizeSettingGlobal = {
|
|
6833
6833
|
shape?: 'square' | 'vertical' | 'horizontal' | 'custom' | 'original';
|
|
6834
6834
|
shapeLinked?: boolean;
|
|
6835
|
+
disableShapeLinked?: boolean;
|
|
6835
6836
|
shapeValue?: string;
|
|
6836
6837
|
widthHeightLinked?: boolean;
|
|
6837
6838
|
padding?: {
|
|
@@ -7227,6 +7228,7 @@ type PositionControlType<T> = SharedControlType<T> & {
|
|
|
7227
7228
|
|
|
7228
7229
|
type PositionSquareControlType<T> = SharedControlType<T> & {
|
|
7229
7230
|
type: 'position:square';
|
|
7231
|
+
ignoreValue?: string[];
|
|
7230
7232
|
};
|
|
7231
7233
|
|
|
7232
7234
|
type RadioGroupControlType = {
|
|
@@ -7382,6 +7384,8 @@ type TextareaControlType<T> = SharedControlType<T> & {
|
|
|
7382
7384
|
minHeight?: number;
|
|
7383
7385
|
maxWidth?: number;
|
|
7384
7386
|
autoHeight?: boolean;
|
|
7387
|
+
defaultRows?: number;
|
|
7388
|
+
showPlusBtn?: boolean;
|
|
7385
7389
|
suggestContents?: {
|
|
7386
7390
|
message: string;
|
|
7387
7391
|
eg?: string;
|
|
@@ -7433,6 +7437,7 @@ type BehaviorStateControlType<T> = {
|
|
|
7433
7437
|
type BoxShadowControlType<T> = SharedControlType<T> & {
|
|
7434
7438
|
id?: string;
|
|
7435
7439
|
type: 'boxShadow';
|
|
7440
|
+
hideOptions?: string[];
|
|
7436
7441
|
popup?: boolean;
|
|
7437
7442
|
};
|
|
7438
7443
|
|
|
@@ -7818,6 +7823,8 @@ type SizeSetting$1<T> = SharedControlType<T> & {
|
|
|
7818
7823
|
hiddenShowMore?: boolean;
|
|
7819
7824
|
sizePaddingInput?: 'normal' | 'small';
|
|
7820
7825
|
lockShapeValue?: boolean;
|
|
7826
|
+
isShowResponsive?: boolean;
|
|
7827
|
+
disableShapeLinkedTooltip?: string;
|
|
7821
7828
|
};
|
|
7822
7829
|
|
|
7823
7830
|
type ChildIconType<T> = SharedControlType<T> & {
|
|
@@ -7858,6 +7865,7 @@ type ParallaxScrollingType<T> = SharedControlType<T> & {
|
|
|
7858
7865
|
|
|
7859
7866
|
type BackgroundColorPickerType<T> = SharedControlType<T> & {
|
|
7860
7867
|
type: 'background-color-picker';
|
|
7868
|
+
mode?: 'both' | 'solid' | 'gradient';
|
|
7861
7869
|
popup?: boolean;
|
|
7862
7870
|
readonly?: boolean;
|
|
7863
7871
|
};
|
|
@@ -8013,7 +8021,35 @@ type ButtonLayoutType<T> = SharedControlType<T> & {
|
|
|
8013
8021
|
}[];
|
|
8014
8022
|
};
|
|
8015
8023
|
|
|
8016
|
-
type
|
|
8024
|
+
type ShapeSelectorControlType<T> = SharedControlType<T> & {
|
|
8025
|
+
type: 'shape-selector';
|
|
8026
|
+
};
|
|
8027
|
+
|
|
8028
|
+
type CustomPositionControlType<T> = SharedControlType<T> & {
|
|
8029
|
+
type: 'custom-position';
|
|
8030
|
+
ignoreValue?: string[];
|
|
8031
|
+
topGap?: string;
|
|
8032
|
+
leftGap?: string;
|
|
8033
|
+
rightGap?: string;
|
|
8034
|
+
bottomGap?: string;
|
|
8035
|
+
};
|
|
8036
|
+
|
|
8037
|
+
type DealControlType<T> = SharedControlType<T> & {
|
|
8038
|
+
type: 'bundleItem';
|
|
8039
|
+
readonly?: boolean;
|
|
8040
|
+
};
|
|
8041
|
+
|
|
8042
|
+
type ProductBundleChildControlType<T> = SharedControlType<T> & {
|
|
8043
|
+
type: 'product-bundle-child-item';
|
|
8044
|
+
[key: string]: any;
|
|
8045
|
+
};
|
|
8046
|
+
type SelectProductBundleControlType<T> = SharedControlType<T> & {
|
|
8047
|
+
type: 'select-product-bundle';
|
|
8048
|
+
label?: string;
|
|
8049
|
+
hide?: boolean;
|
|
8050
|
+
};
|
|
8051
|
+
|
|
8052
|
+
type ControlProp<T> = ProductBundleChildControlType<T> | SelectProductBundleControlType<T> | AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | OpenLinkControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | VariantSwatchesOnlyDefaultVariantControlType<T> | ProductListControlType<T> | ArticleListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | BackgroundColorPickerType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | SneakPeakControlType<T> | ProductInputCurrencyUnitControlType<T> | TypographyPostPurchaseControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T> | PostPurchaseTextareaControlType<T> | NotesControlType<T> | ButtonLayoutType<T> | ShapeSelectorControlType<T> | CustomPositionControlType<T> | SneakPeakControlType<T> | PostPurchaseTextareaControlType<T> | DealControlType<T>;
|
|
8017
8053
|
type ControlTriggerAction = {
|
|
8018
8054
|
controlId: string;
|
|
8019
8055
|
newValue?: any;
|
|
@@ -8069,6 +8105,7 @@ type ComponentSetting<P extends BaseProps> = {
|
|
|
8069
8105
|
flowPage?: string;
|
|
8070
8106
|
notAppendTags?: string[];
|
|
8071
8107
|
notAppendLeftRight?: boolean;
|
|
8108
|
+
allowAppendTags?: string[];
|
|
8072
8109
|
};
|
|
8073
8110
|
sideBar?: {
|
|
8074
8111
|
hide?: boolean;
|
|
@@ -8105,7 +8142,7 @@ type ControlUI = {
|
|
|
8105
8142
|
labelPosition?: 'start' | 'end';
|
|
8106
8143
|
justifyContent?: 'start' | 'end' | 'between' | 'around';
|
|
8107
8144
|
label?: 'medium' | 'large';
|
|
8108
|
-
info?: 'near' | 'far';
|
|
8145
|
+
info?: 'near' | 'far' | 'bottom';
|
|
8109
8146
|
labelSpacing?: 'small' | 'medium' | 'large';
|
|
8110
8147
|
removeSpacing?: boolean;
|
|
8111
8148
|
noGap?: boolean;
|
|
@@ -30127,6 +30164,15 @@ declare const filterAttrInStyle: (style?: React.CSSProperties, filterKeys?: stri
|
|
|
30127
30164
|
'--z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
30128
30165
|
'--hvr-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
30129
30166
|
'--focus-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
30167
|
+
'--wm'?: csstype.Property.WritingMode | undefined;
|
|
30168
|
+
'--hvr-wm'?: csstype.Property.WritingMode | undefined;
|
|
30169
|
+
'--focus-wm'?: csstype.Property.WritingMode | undefined;
|
|
30170
|
+
'--wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
30171
|
+
'--hvr-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
30172
|
+
'--focus-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
30173
|
+
'--wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
30174
|
+
'--hvr-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
30175
|
+
'--focus-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
30130
30176
|
accentColor?: csstype.Property.AccentColor | undefined;
|
|
30131
30177
|
alignContent?: csstype.Property.AlignContent | undefined;
|
|
30132
30178
|
alignItems?: csstype.Property.AlignItems | undefined;
|
|
@@ -31622,6 +31668,15 @@ declare const removeAttrInStyle: (style?: React.CSSProperties, filterKeys?: stri
|
|
|
31622
31668
|
'--z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
31623
31669
|
'--hvr-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
31624
31670
|
'--focus-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
31671
|
+
'--wm'?: csstype.Property.WritingMode | undefined;
|
|
31672
|
+
'--hvr-wm'?: csstype.Property.WritingMode | undefined;
|
|
31673
|
+
'--focus-wm'?: csstype.Property.WritingMode | undefined;
|
|
31674
|
+
'--wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
31675
|
+
'--hvr-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
31676
|
+
'--focus-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
31677
|
+
'--wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
31678
|
+
'--hvr-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
31679
|
+
'--focus-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
31625
31680
|
accentColor?: csstype.Property.AccentColor | undefined;
|
|
31626
31681
|
alignContent?: csstype.Property.AlignContent | undefined;
|
|
31627
31682
|
alignItems?: csstype.Property.AlignItems | undefined;
|
|
@@ -33117,6 +33172,15 @@ declare const filterCornerInStyle: (style?: React.CSSProperties) => {
|
|
|
33117
33172
|
'--z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
33118
33173
|
'--hvr-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
33119
33174
|
'--focus-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
33175
|
+
'--wm'?: csstype.Property.WritingMode | undefined;
|
|
33176
|
+
'--hvr-wm'?: csstype.Property.WritingMode | undefined;
|
|
33177
|
+
'--focus-wm'?: csstype.Property.WritingMode | undefined;
|
|
33178
|
+
'--wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
33179
|
+
'--hvr-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
33180
|
+
'--focus-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
33181
|
+
'--wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
33182
|
+
'--hvr-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
33183
|
+
'--focus-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
33120
33184
|
accentColor?: csstype.Property.AccentColor | undefined;
|
|
33121
33185
|
alignContent?: csstype.Property.AlignContent | undefined;
|
|
33122
33186
|
alignItems?: csstype.Property.AlignItems | undefined;
|
|
@@ -34612,6 +34676,15 @@ declare const removePaddingYInStyle: (style?: React.CSSProperties) => {
|
|
|
34612
34676
|
'--z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
34613
34677
|
'--hvr-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
34614
34678
|
'--focus-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
34679
|
+
'--wm'?: csstype.Property.WritingMode | undefined;
|
|
34680
|
+
'--hvr-wm'?: csstype.Property.WritingMode | undefined;
|
|
34681
|
+
'--focus-wm'?: csstype.Property.WritingMode | undefined;
|
|
34682
|
+
'--wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
34683
|
+
'--hvr-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
34684
|
+
'--focus-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
34685
|
+
'--wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
34686
|
+
'--hvr-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
34687
|
+
'--focus-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
34615
34688
|
accentColor?: csstype.Property.AccentColor | undefined;
|
|
34616
34689
|
alignContent?: csstype.Property.AlignContent | undefined;
|
|
34617
34690
|
alignItems?: csstype.Property.AlignItems | undefined;
|
|
@@ -35447,6 +35520,8 @@ declare const optionLayoutStyle: (column?: ObjectDevices<string | number>) => Re
|
|
|
35447
35520
|
declare const composeGridLayout: (layout?: ObjectDevices<ObjectLayoutValue>) => React.CSSProperties;
|
|
35448
35521
|
declare const convertOldLayout: (layout?: ObjectDevices<string>) => ObjectDevices<ObjectLayoutValue>;
|
|
35449
35522
|
|
|
35523
|
+
declare const convertTextAlignToJustify: (align: Partial<Record<NameDevices$1, AlignProp>> | undefined) => Record<string, boolean>;
|
|
35524
|
+
|
|
35450
35525
|
declare function getSelectedVariant(variants?: Maybe$1<VariantSelectFragment>[], choices?: Record<string, string>, variantId?: string | null): Maybe$1<VariantSelectFragment>;
|
|
35451
35526
|
declare function parseSelectedOption(options: SelectedOption$1[]): SelectedOption$1 | undefined;
|
|
35452
35527
|
declare function checkAvailableVariantInStock(variants: Maybe$1<VariantSelectFragment>[] | undefined, optionId: string, optionValue: string): boolean;
|
|
@@ -36245,6 +36320,15 @@ declare const composeTypographyStyle: (typo?: TypographySettingV2, typography?:
|
|
|
36245
36320
|
'--z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
36246
36321
|
'--hvr-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
36247
36322
|
'--focus-z-mobile'?: csstype.Property.ZIndex | undefined;
|
|
36323
|
+
'--wm'?: csstype.Property.WritingMode | undefined;
|
|
36324
|
+
'--hvr-wm'?: csstype.Property.WritingMode | undefined;
|
|
36325
|
+
'--focus-wm'?: csstype.Property.WritingMode | undefined;
|
|
36326
|
+
'--wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
36327
|
+
'--hvr-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
36328
|
+
'--focus-wm-tablet'?: csstype.Property.WritingMode | undefined;
|
|
36329
|
+
'--wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
36330
|
+
'--hvr-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
36331
|
+
'--focus-wm-mobile'?: csstype.Property.WritingMode | undefined;
|
|
36248
36332
|
accentColor?: csstype.Property.AccentColor | undefined;
|
|
36249
36333
|
alignContent?: csstype.Property.AlignContent | undefined;
|
|
36250
36334
|
alignItems?: csstype.Property.AlignItems | undefined;
|
|
@@ -37143,6 +37227,7 @@ declare const useProductsQueryAll: (variable?: VariableRelatedStyles | undefined
|
|
|
37143
37227
|
declare const useCurrentDevice: () => NameDevices$1;
|
|
37144
37228
|
|
|
37145
37229
|
declare const shopifyPriceRounding: (amount: number | string, precision?: number) => string;
|
|
37230
|
+
declare const formatMoney: (cents: string, format: any) => string;
|
|
37146
37231
|
declare const useFormatMoney: (amount: number, withCurrency: boolean) => string;
|
|
37147
37232
|
|
|
37148
37233
|
declare const useLazyVideo: () => void;
|
|
@@ -37377,4 +37462,4 @@ declare const getAppBlocks: (section: PublishedPageSection$1 & {
|
|
|
37377
37462
|
|
|
37378
37463
|
declare const addAppBlockId: (component: Component) => Component;
|
|
37379
37464
|
|
|
37380
|
-
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSectionStatus$1 as ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAppBlocks, getAspectRatioGlobalSize, getBgImageByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBgColor, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
|
37465
|
+
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSectionStatus$1 as ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, convertTextAlignToJustify, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAppBlocks, getAspectRatioGlobalSize, getBgImageByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBgColor, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.46.0-staging.
|
|
3
|
+
"version": "1.46.0-staging.29",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@gem-sdk/adapter-shopify": "1.45.0",
|
|
31
|
-
"@gem-sdk/styles": "1.46.0-staging.
|
|
31
|
+
"@gem-sdk/styles": "1.46.0-staging.28",
|
|
32
32
|
"@types/classnames": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|