@pisell/private-materials 6.12.160 → 6.12.162
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.js +18 -18
- package/build/lowcode/view.js +18 -18
- package/es/components/bigSale/components/ProductList/index.js +30 -19
- package/es/components/bigSale/index.js +3 -3
- package/es/plus/saleDetail/components/CartItems/Editable/index.js +1 -0
- package/es/plus/salesSdk/context/SalesSdkCartContext.js +25 -12
- package/es/plus/salesSdk/context/SalesSdkProvider.js +9 -5
- package/es/plus/salesSdk/hosts/BookingEditHostRenderer.js +12 -7
- package/es/plus/salesSdk/utils/resolvePreviousService.js +28 -0
- package/es/plus/salesSdk/utils/runAddProductFlow.js +8 -4
- package/es/plus/skuOptionsSelection/components/NormalCard/index.js +18 -12
- package/es/plus/skuOptionsSelection/docs/skuOptionsSelection.$tab-dev.md +66 -2
- package/es/plus/skuOptionsSelection/types.d.ts +50 -1
- package/es/plus/skuOptionsSelection/utils/normalizers.js +17 -0
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.js +17 -7
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +89 -15
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +31 -19
- package/es/pro/Selector/Selector.js +11 -6
- package/es/pro/Selector/hooks/useSelectionController.js +54 -61
- package/es/pro/Selector/locales.js +10 -0
- package/es/pro/Selector/types.d.ts +5 -0
- package/es/pro/skuDetailModal/index.js +4 -4
- package/es/pro/skuDetailModal/types.d.ts +1 -0
- package/lib/components/bigSale/components/ProductList/index.js +30 -19
- package/lib/components/bigSale/index.js +3 -3
- package/lib/plus/saleDetail/components/CartItems/Editable/index.js +1 -0
- package/lib/plus/salesSdk/context/SalesSdkCartContext.js +25 -12
- package/lib/plus/salesSdk/context/SalesSdkProvider.js +9 -5
- package/lib/plus/salesSdk/hosts/BookingEditHostRenderer.js +12 -7
- package/lib/plus/salesSdk/utils/resolvePreviousService.js +30 -0
- package/lib/plus/salesSdk/utils/runAddProductFlow.js +8 -4
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.js +18 -12
- package/lib/plus/skuOptionsSelection/docs/skuOptionsSelection.$tab-dev.md +66 -2
- package/lib/plus/skuOptionsSelection/types.d.ts +50 -1
- package/lib/plus/skuOptionsSelection/utils/normalizers.js +19 -0
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.js +17 -7
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +89 -15
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +31 -19
- package/lib/pro/Selector/Selector.js +11 -6
- package/lib/pro/Selector/hooks/useSelectionController.js +54 -61
- package/lib/pro/Selector/locales.js +10 -0
- package/lib/pro/Selector/types.d.ts +5 -0
- package/lib/pro/skuDetailModal/index.js +4 -4
- package/lib/pro/skuDetailModal/types.d.ts +1 -0
- package/package.json +3 -3
|
@@ -8,6 +8,8 @@ var locales_default = {
|
|
|
8
8
|
"pisell2.pro.selector.required-tag": "Required",
|
|
9
9
|
"pisell2.pro.selector.validate.min-selection": (min, label) => `Select at least ${min}${label ? " " + label : ""}`,
|
|
10
10
|
"pisell2.pro.selector.validate.max-selection": (max, label) => `Select at most ${max}${label ? " " + label : ""}`,
|
|
11
|
+
"pisell2.pro.selector.validate.min-types": (min) => `Select at least ${min} option types`,
|
|
12
|
+
"pisell2.pro.selector.validate.max-types": (max) => `Select at most ${max} option types`,
|
|
11
13
|
"pisell2.pro.selector.tip.require-one-option": "Choose 1",
|
|
12
14
|
"pisell2.pro.selector.tip.min-max-selection": (min, max) => {
|
|
13
15
|
if (min === max && min > 0) return `Choose ${min}`;
|
|
@@ -25,6 +27,8 @@ var locales_default = {
|
|
|
25
27
|
"pisell2.pro.selector.required-tag": "必选",
|
|
26
28
|
"pisell2.pro.selector.validate.min-selection": (min, label) => `至少选 ${min} 个${label ? " " + label : ""}`,
|
|
27
29
|
"pisell2.pro.selector.validate.max-selection": (max, label) => `最多选 ${max} 个${label ? " " + label : ""}`,
|
|
30
|
+
"pisell2.pro.selector.validate.min-types": (min) => `至少选择 ${min} 种选项`,
|
|
31
|
+
"pisell2.pro.selector.validate.max-types": (max) => `最多选择 ${max} 种选项`,
|
|
28
32
|
"pisell2.pro.selector.tip.require-one-option": "需选 1 项",
|
|
29
33
|
"pisell2.pro.selector.tip.min-max-selection": (min, max) => {
|
|
30
34
|
if (min === max && min > 0) return `需选 ${min} 个`;
|
|
@@ -42,6 +46,8 @@ var locales_default = {
|
|
|
42
46
|
"pisell2.pro.selector.required-tag": "必選",
|
|
43
47
|
"pisell2.pro.selector.validate.min-selection": (min, label) => `至少選 ${min} 個${label ? " " + label : ""}`,
|
|
44
48
|
"pisell2.pro.selector.validate.max-selection": (max, label) => `最多選 ${max} 個${label ? " " + label : ""}`,
|
|
49
|
+
"pisell2.pro.selector.validate.min-types": (min) => `至少選擇 ${min} 種選項`,
|
|
50
|
+
"pisell2.pro.selector.validate.max-types": (max) => `最多選擇 ${max} 種選項`,
|
|
45
51
|
"pisell2.pro.selector.tip.require-one-option": "需選 1 項",
|
|
46
52
|
"pisell2.pro.selector.tip.min-max-selection": (min, max) => {
|
|
47
53
|
if (min === max && min > 0) return `需選 ${min} 個`;
|
|
@@ -59,6 +65,8 @@ var locales_default = {
|
|
|
59
65
|
"pisell2.pro.selector.required-tag": "必須",
|
|
60
66
|
"pisell2.pro.selector.validate.min-selection": (min, label) => `少なくとも${min}${label ? " " + label : ""}を選択`,
|
|
61
67
|
"pisell2.pro.selector.validate.max-selection": (max, label) => `最大${max}${label ? " " + label : ""}を選択`,
|
|
68
|
+
"pisell2.pro.selector.validate.min-types": (min) => `少なくとも${min}種類のオプションを選択してください`,
|
|
69
|
+
"pisell2.pro.selector.validate.max-types": (max) => `選択できるオプションは最大${max}種類です`,
|
|
62
70
|
"pisell2.pro.selector.tip.require-one-option": "1つ選択",
|
|
63
71
|
"pisell2.pro.selector.tip.min-max-selection": (min, max) => {
|
|
64
72
|
if (min === max && min > 0) return `${min}つ選択`;
|
|
@@ -76,6 +84,8 @@ var locales_default = {
|
|
|
76
84
|
"pisell2.pro.selector.required-tag": "Obrigatório",
|
|
77
85
|
"pisell2.pro.selector.validate.min-selection": (min, label) => `Selecione pelo menos ${min}${label ? " " + label : ""}`,
|
|
78
86
|
"pisell2.pro.selector.validate.max-selection": (max, label) => `Selecione no máximo ${max}${label ? " " + label : ""}`,
|
|
87
|
+
"pisell2.pro.selector.validate.min-types": (min) => `Selecione pelo menos ${min} tipos de opção`,
|
|
88
|
+
"pisell2.pro.selector.validate.max-types": (max) => `Selecione no máximo ${max} tipos de opção`,
|
|
79
89
|
"pisell2.pro.selector.tip.require-one-option": "Escolha 1",
|
|
80
90
|
"pisell2.pro.selector.tip.min-max-selection": (min, max) => {
|
|
81
91
|
if (min === max && min > 0) return `Escolha ${min}`;
|
|
@@ -8,6 +8,8 @@ interface RuleConfig {
|
|
|
8
8
|
required?: 0 | 1;
|
|
9
9
|
min?: number;
|
|
10
10
|
max?: number;
|
|
11
|
+
minTypes?: number;
|
|
12
|
+
maxTypes?: number;
|
|
11
13
|
mutex?: Array<Array<OptionKey>>;
|
|
12
14
|
customValidator?: (value: SelectionValue) => Promise<void>;
|
|
13
15
|
}
|
|
@@ -63,6 +65,9 @@ type RenderItemProps = {
|
|
|
63
65
|
maxReached: boolean;
|
|
64
66
|
remainingCount: number;
|
|
65
67
|
selectedCount: number;
|
|
68
|
+
selectedTypeCount: number;
|
|
69
|
+
typeMaxReached: boolean;
|
|
70
|
+
remainingTypeCount: number;
|
|
66
71
|
};
|
|
67
72
|
};
|
|
68
73
|
type ItemProps = {
|
|
@@ -1679,7 +1679,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1679
1679
|
}, isMobile && (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProductSummary) ? showProductDetailsCollapsible ? /* @__PURE__ */ react.default.createElement(require_index$5.default, {
|
|
1680
1680
|
key: `details-${selectionFlowInstanceKey}`,
|
|
1681
1681
|
title: _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.section.details"),
|
|
1682
|
-
defaultExpanded:
|
|
1682
|
+
defaultExpanded: isKioskPlatform
|
|
1683
1683
|
}, renderProductDetails()) : renderProductSummary() : null, shouldRenderMobileWeighing ? /* @__PURE__ */ react.default.createElement("div", { className: "sku-detail-mobile-weighing" }, renderWeighingSection()) : null, /* @__PURE__ */ react.default.createElement(_pisell_materials.PisellSelectionFlow, {
|
|
1684
1684
|
key: selectionFlowInstanceKey,
|
|
1685
1685
|
ref: selectionFlowRef,
|
|
@@ -1764,7 +1764,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1764
1764
|
key: `details-${selectionFlowInstanceKey}`,
|
|
1765
1765
|
className: "sku-detail-collapsible-section--product-details",
|
|
1766
1766
|
title: _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.section.details"),
|
|
1767
|
-
defaultExpanded:
|
|
1767
|
+
defaultExpanded: isKioskPlatform
|
|
1768
1768
|
}, renderProductDetails()) : mobileProductDetails, shouldRenderMobileWeighing ? /* @__PURE__ */ react.default.createElement("div", { className: "sku-detail-mobile-weighing" }, renderWeighingSection()) : null, shouldRenderSkuSelection ? /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement(require_index$4.default, {
|
|
1769
1769
|
ref: skuOptionsSelectionRef,
|
|
1770
1770
|
dataSource: productData,
|
|
@@ -1827,8 +1827,8 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1827
1827
|
footer: variant === "phone" ? leftContent({ showTop: false }) : null,
|
|
1828
1828
|
closable: false,
|
|
1829
1829
|
destroyOnClose: true,
|
|
1830
|
-
style: { maxHeight: variant === "phone" ? "99dvh" : void 0 },
|
|
1831
|
-
height: variant === "phone" ? "auto" : void 0,
|
|
1830
|
+
style: { maxHeight: isKioskPlatform ? "100%" : variant === "phone" ? "99dvh" : void 0 },
|
|
1831
|
+
height: isKioskPlatform ? "100%" : variant === "phone" ? "auto" : void 0,
|
|
1832
1832
|
styles: isKioskPlatform ? { content: { height: "100%" } } : void 0,
|
|
1833
1833
|
width: variant === "phone" ? "100%" : "80%",
|
|
1834
1834
|
className: (0, classnames.default)({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.162",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"use-sync-external-store": "^1.6.0",
|
|
72
72
|
"@pisell/pi-payment-sdk": "0.0.3",
|
|
73
73
|
"@pisell/utils": "3.0.4",
|
|
74
|
+
"@pisell/materials": "6.12.47",
|
|
74
75
|
"@pisell/icon": "0.0.11",
|
|
75
|
-
"@pisell/date-picker": "3.0.10"
|
|
76
|
-
"@pisell/materials": "6.12.45"
|
|
76
|
+
"@pisell/date-picker": "3.0.10"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "^18.0.0",
|