@pisell/private-materials 3.0.199 → 3.0.201
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/booking/addons/model.d.ts +1 -1
- package/es/components/booking/components/customSelect/index.d.ts +1 -0
- package/es/components/booking/components/customSelect/index.js +6 -2
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +38 -0
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/components/footer/amount.js +45 -22
- package/es/components/booking/components/footer/index.js +84 -40
- package/es/components/booking/components/footer/utils.js +243 -32
- package/es/components/booking/info/addServiceVariant/index.js +8 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +14 -13
- package/es/components/booking/info/clientVariant/vertical/index.js +33 -4
- package/es/components/booking/info/dateRange/index.d.ts +5 -0
- package/es/components/booking/info/dateRange/index.js +98 -0
- package/es/components/booking/info/dateRange/index.less +21 -0
- package/es/components/booking/info/main.js +20 -8
- package/es/components/booking/info/model.js +3 -0
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
- package/es/components/booking/info/pet/ChangePetModal/index.js +119 -0
- package/es/components/booking/info/pet/ChangePetModal/index.less +4 -0
- package/es/components/booking/info/pet/index.js +54 -5
- package/es/components/booking/info/service/addService/index.js +142 -22
- package/es/components/booking/info/service/addService/index.less +13 -3
- package/es/components/booking/info/service/addService/utils.d.ts +11 -2
- package/es/components/booking/info/service/addService/utils.js +49 -24
- package/es/components/booking/info/service/editService/index.js +255 -44
- package/es/components/booking/info/service/editService/index.less +18 -13
- package/es/components/booking/info/service2/Lists.d.ts +3 -0
- package/es/components/booking/info/service2/Lists.js +158 -0
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
- package/es/components/booking/info/service2/hooks/useSelectPet.js +54 -0
- package/es/components/booking/info/service2/index.d.ts +3 -0
- package/es/components/booking/info/service2/index.js +58 -0
- package/es/components/booking/info/service2/status.d.ts +31 -0
- package/es/components/booking/info/service2/status.js +78 -0
- package/es/components/booking/info/service2/utils.d.ts +145 -0
- package/es/components/booking/info/service2/utils.js +438 -0
- package/es/components/booking/info/utils.d.ts +9 -0
- package/es/components/booking/info/utils.js +13 -0
- package/es/components/booking/locales.d.ts +60 -0
- package/es/components/booking/locales.js +75 -3
- package/es/components/booking/materiels/holder/index.d.ts +7 -0
- package/es/components/booking/materiels/holder/index.js +51 -0
- package/es/components/booking/model.d.ts +4 -1
- package/es/components/booking/model.js +4 -2
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/utils.d.ts +12 -3
- package/es/components/booking/utils.js +139 -23
- package/es/components/eftpos/form/index.js +6 -12
- package/es/components/eftpos/group/index.d.ts +2 -1
- package/es/components/eftpos/group/index.js +2 -1
- package/es/components/eftpos/index.js +2 -2
- package/es/components/eftposPay/helper.d.ts +0 -1
- package/es/components/eftposPay/helper.js +0 -14
- package/es/components/eftposPay/tyro/index.js +20 -51
- package/es/components/shoppingCart/Provider.d.ts +3 -0
- package/es/components/shoppingCart/Provider.js +86 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +4 -0
- package/es/components/shoppingCart/components/Cart/Product.js +96 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +4 -0
- package/es/components/shoppingCart/components/Cart/index.js +72 -0
- package/es/components/shoppingCart/components/Cart/index.less +68 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +4 -0
- package/es/components/shoppingCart/components/Empty/index.js +14 -0
- package/es/components/shoppingCart/components/Empty/index.less +19 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +4 -0
- package/es/components/shoppingCart/components/Render/index.js +68 -0
- package/es/components/shoppingCart/components/Render/index.less +2 -0
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +124 -0
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +3 -0
- package/es/components/shoppingCart/hooks/useAddService.js +23 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +3 -0
- package/es/components/shoppingCart/hooks/useClearCart.js +54 -0
- package/es/components/shoppingCart/hooks/useContext.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useContext.js +5 -0
- package/es/components/shoppingCart/index.d.ts +4 -0
- package/es/components/shoppingCart/index.js +24 -0
- package/es/components/shoppingCart/locales.d.ts +33 -0
- package/es/components/shoppingCart/locales.js +38 -0
- package/es/components/shoppingCart/mock.d.ts +40 -0
- package/es/components/shoppingCart/mock.js +40 -0
- package/es/components/shoppingCart/status.d.ts +2 -0
- package/es/components/shoppingCart/status.js +22 -0
- package/es/components/shoppingCart/type.d.ts +39 -0
- package/es/components/shoppingCart/type.js +1 -0
- package/es/components/shoppingCart/utils.d.ts +63 -0
- package/es/components/shoppingCart/utils.js +119 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/lib/components/booking/addons/model.d.ts +1 -1
- package/lib/components/booking/components/customSelect/index.d.ts +1 -0
- package/lib/components/booking/components/customSelect/index.js +6 -2
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +3 -0
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +60 -0
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/components/footer/amount.js +26 -8
- package/lib/components/booking/components/footer/index.js +25 -4
- package/lib/components/booking/components/footer/utils.js +157 -31
- package/lib/components/booking/info/addServiceVariant/index.js +5 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +8 -7
- package/lib/components/booking/info/clientVariant/vertical/index.js +36 -10
- package/lib/components/booking/info/dateRange/index.d.ts +5 -0
- package/lib/components/booking/info/dateRange/index.js +111 -0
- package/lib/components/booking/info/dateRange/index.less +21 -0
- package/lib/components/booking/info/main.js +11 -4
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +4 -0
- package/lib/components/booking/info/pet/ChangePetModal/index.js +111 -0
- package/lib/components/booking/info/pet/ChangePetModal/index.less +4 -0
- package/lib/components/booking/info/pet/index.js +61 -25
- package/lib/components/booking/info/service/addService/index.js +107 -34
- package/lib/components/booking/info/service/addService/index.less +13 -3
- package/lib/components/booking/info/service/addService/utils.d.ts +11 -2
- package/lib/components/booking/info/service/addService/utils.js +31 -10
- package/lib/components/booking/info/service/editService/index.js +293 -125
- package/lib/components/booking/info/service/editService/index.less +18 -13
- package/lib/components/booking/info/service2/Lists.d.ts +3 -0
- package/lib/components/booking/info/service2/Lists.js +113 -0
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +6 -0
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +50 -0
- package/lib/components/booking/info/service2/index.d.ts +3 -0
- package/lib/components/booking/info/service2/index.js +75 -0
- package/lib/components/booking/info/service2/status.d.ts +31 -0
- package/lib/components/booking/info/service2/status.js +81 -0
- package/lib/components/booking/info/service2/utils.d.ts +145 -0
- package/lib/components/booking/info/service2/utils.js +322 -0
- package/lib/components/booking/info/utils.d.ts +9 -0
- package/lib/components/booking/info/utils.js +6 -0
- package/lib/components/booking/locales.d.ts +60 -0
- package/lib/components/booking/locales.js +63 -3
- package/lib/components/booking/materiels/holder/index.d.ts +7 -0
- package/lib/components/booking/materiels/holder/index.js +65 -0
- package/lib/components/booking/model.d.ts +4 -1
- package/lib/components/booking/model.js +4 -2
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +12 -3
- package/lib/components/booking/utils.js +87 -15
- package/lib/components/eftpos/form/index.js +6 -12
- package/lib/components/eftpos/group/index.d.ts +2 -1
- package/lib/components/eftpos/group/index.js +1 -0
- package/lib/components/eftpos/index.js +2 -2
- package/lib/components/eftposPay/helper.d.ts +0 -1
- package/lib/components/eftposPay/helper.js +0 -21
- package/lib/components/eftposPay/tyro/index.js +7 -36
- package/lib/components/shoppingCart/Provider.d.ts +3 -0
- package/lib/components/shoppingCart/Provider.js +110 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +4 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +89 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/Cart/index.js +77 -0
- package/lib/components/shoppingCart/components/Cart/index.less +68 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/Empty/index.js +43 -0
- package/lib/components/shoppingCart/components/Empty/index.less +19 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/Render/index.js +79 -0
- package/lib/components/shoppingCart/components/Render/index.less +2 -0
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +4 -0
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +116 -0
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +32 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +3 -0
- package/lib/components/shoppingCart/hooks/useAddService.js +55 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +3 -0
- package/lib/components/shoppingCart/hooks/useClearCart.js +71 -0
- package/lib/components/shoppingCart/hooks/useContext.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useContext.js +31 -0
- package/lib/components/shoppingCart/index.d.ts +4 -0
- package/lib/components/shoppingCart/index.js +60 -0
- package/lib/components/shoppingCart/locales.d.ts +33 -0
- package/lib/components/shoppingCart/locales.js +56 -0
- package/lib/components/shoppingCart/mock.d.ts +40 -0
- package/lib/components/shoppingCart/mock.js +76 -0
- package/lib/components/shoppingCart/status.d.ts +2 -0
- package/lib/components/shoppingCart/status.js +60 -0
- package/lib/components/shoppingCart/type.d.ts +39 -0
- package/lib/components/shoppingCart/type.js +17 -0
- package/lib/components/shoppingCart/utils.d.ts +63 -0
- package/lib/components/shoppingCart/utils.js +92 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lowcode/shopping-cart/meta.ts +98 -0
- package/package.json +4 -4
- package/es/components/eftpos/receipt/index.d.ts +0 -24
- package/es/components/eftpos/receipt/index.js +0 -96
- package/lib/components/eftpos/receipt/index.d.ts +0 -24
- package/lib/components/eftpos/receipt/index.js +0 -88
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/shoppingCart/Provider.tsx
|
|
30
|
+
var Provider_exports = {};
|
|
31
|
+
__export(Provider_exports, {
|
|
32
|
+
CartContext: () => CartContext,
|
|
33
|
+
CartProvider: () => CartProvider
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(Provider_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_status = require("./status");
|
|
38
|
+
var import_utils = require("./utils");
|
|
39
|
+
var CartContext = (0, import_react.createContext)({});
|
|
40
|
+
var CartProvider = ({
|
|
41
|
+
children,
|
|
42
|
+
props,
|
|
43
|
+
onCard,
|
|
44
|
+
onChange,
|
|
45
|
+
onAddProduct,
|
|
46
|
+
onActiveKey
|
|
47
|
+
}) => {
|
|
48
|
+
const defaultState = { ...import_status.defaultData, ...props };
|
|
49
|
+
const [state, setState] = (0, import_react.useState)(defaultState);
|
|
50
|
+
const updateState = (newState) => {
|
|
51
|
+
console.log(newState, "wh_new");
|
|
52
|
+
setState((prevState) => {
|
|
53
|
+
return {
|
|
54
|
+
...prevState,
|
|
55
|
+
...newState
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
(0, import_react.useEffect)(() => {
|
|
60
|
+
const _isOpenGroup = props == null ? void 0 : props.hasOwnProperty("isOpenGroup");
|
|
61
|
+
let newState = {};
|
|
62
|
+
if (props == null ? void 0 : props.platform) {
|
|
63
|
+
newState["platform"] = props == null ? void 0 : props.platform;
|
|
64
|
+
}
|
|
65
|
+
if (_isOpenGroup) {
|
|
66
|
+
newState["isOpenGroup"] = props == null ? void 0 : props.isOpenGroup;
|
|
67
|
+
}
|
|
68
|
+
if (props == null ? void 0 : props.emptyText) {
|
|
69
|
+
newState["emptyText"] = props == null ? void 0 : props.emptyText;
|
|
70
|
+
}
|
|
71
|
+
if (props == null ? void 0 : props.productParams) {
|
|
72
|
+
newState = {
|
|
73
|
+
...newState,
|
|
74
|
+
...props == null ? void 0 : props.productParams
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
if (props == null ? void 0 : props.collapseParams) {
|
|
78
|
+
newState["collapseParams"] = props == null ? void 0 : props.collapseParams;
|
|
79
|
+
}
|
|
80
|
+
const params = { ...defaultState, ...newState };
|
|
81
|
+
const result = { ...params, ...(0, import_utils.formatState)(params) };
|
|
82
|
+
console.log(result, params, "result");
|
|
83
|
+
setState(result);
|
|
84
|
+
}, [
|
|
85
|
+
props == null ? void 0 : props.platform,
|
|
86
|
+
props == null ? void 0 : props.isOpenGroup,
|
|
87
|
+
props == null ? void 0 : props.emptyText,
|
|
88
|
+
props == null ? void 0 : props.productParams,
|
|
89
|
+
props == null ? void 0 : props.collapseParams
|
|
90
|
+
]);
|
|
91
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
92
|
+
CartContext.Provider,
|
|
93
|
+
{
|
|
94
|
+
value: {
|
|
95
|
+
state,
|
|
96
|
+
updateState,
|
|
97
|
+
onCard,
|
|
98
|
+
onChange,
|
|
99
|
+
onAddProduct,
|
|
100
|
+
onActiveKey
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
children
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
107
|
+
0 && (module.exports = {
|
|
108
|
+
CartContext,
|
|
109
|
+
CartProvider
|
|
110
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/shoppingCart/components/Cart/Product.tsx
|
|
30
|
+
var Product_exports = {};
|
|
31
|
+
__export(Product_exports, {
|
|
32
|
+
default: () => Product_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Product_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_useClearCart = __toESM(require("../../hooks/useClearCart"));
|
|
38
|
+
var import_utils = require("../../utils");
|
|
39
|
+
var import_useContext = require("../../hooks/useContext");
|
|
40
|
+
var import_useAddService = __toESM(require("../../hooks/useAddService"));
|
|
41
|
+
var Product = (props) => {
|
|
42
|
+
const { id, lists } = props;
|
|
43
|
+
const { state, updateState, onAction, onChange, onCard } = (0, import_useContext.useContext)();
|
|
44
|
+
const { disabledEdit, isShowPackageNote, isShowNote, hideAddBtn } = state;
|
|
45
|
+
const clearCart = (0, import_useClearCart.default)(id);
|
|
46
|
+
const handleChange = (item, type) => {
|
|
47
|
+
if (disabledEdit)
|
|
48
|
+
return;
|
|
49
|
+
let products = [...state.products];
|
|
50
|
+
if (type === "delete") {
|
|
51
|
+
products = products.filter((product) => product._id !== item._id);
|
|
52
|
+
} else {
|
|
53
|
+
products = products.map((product) => {
|
|
54
|
+
if (product._id === item._id) {
|
|
55
|
+
return {
|
|
56
|
+
...product,
|
|
57
|
+
...item
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return product;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
updateState((0, import_utils.updateProduct)(state, products));
|
|
64
|
+
onChange == null ? void 0 : onChange(products);
|
|
65
|
+
};
|
|
66
|
+
const productParams = (0, import_react.useMemo)(() => {
|
|
67
|
+
return {
|
|
68
|
+
isShowNote,
|
|
69
|
+
isShowPackageNote,
|
|
70
|
+
disabledEdit
|
|
71
|
+
};
|
|
72
|
+
}, [isShowNote, isShowPackageNote, disabledEdit]);
|
|
73
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__shopping-cart-content" }, clearCart, lists == null ? void 0 : lists.map((item) => {
|
|
74
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
import_materials.ProductCard,
|
|
76
|
+
{
|
|
77
|
+
key: item._id,
|
|
78
|
+
dataSource: item,
|
|
79
|
+
onAction: (e) => onAction == null ? void 0 : onAction(e),
|
|
80
|
+
onDelete: (e) => handleChange(e, "delete"),
|
|
81
|
+
onNote: (e) => handleChange(e),
|
|
82
|
+
onLike: (e) => handleChange(e),
|
|
83
|
+
onCard: (e) => onCard == null ? void 0 : onCard(e),
|
|
84
|
+
...productParams
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}), !hideAddBtn ? (0, import_useAddService.default)(id, "more") : null);
|
|
88
|
+
};
|
|
89
|
+
var Product_default = Product;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/shoppingCart/components/Cart/index.tsx
|
|
30
|
+
var Cart_exports = {};
|
|
31
|
+
__export(Cart_exports, {
|
|
32
|
+
default: () => Cart_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Cart_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_materials = require("@pisell/materials");
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_Empty = __toESM(require("../Empty"));
|
|
40
|
+
var import_locales = __toESM(require("../../locales"));
|
|
41
|
+
var import_useContext = require("../../hooks/useContext");
|
|
42
|
+
var import_Product = __toESM(require("./Product"));
|
|
43
|
+
var import_index = require("./index.less");
|
|
44
|
+
import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
45
|
+
var Cart = () => {
|
|
46
|
+
const { state, updateState, onActiveKey } = (0, import_useContext.useContext)();
|
|
47
|
+
const { platform, carts, isProductList, collapseParams } = state;
|
|
48
|
+
const cartsMap = (0, import_react.useMemo)(() => {
|
|
49
|
+
return carts == null ? void 0 : carts.map((item) => {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
return {
|
|
52
|
+
...item,
|
|
53
|
+
label: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__shopping-cart-label" }, `${item == null ? void 0 : item.label} ${import_utils.locales.getText(
|
|
54
|
+
"pisell2.text.shopping-cart.item"
|
|
55
|
+
)((_a = item == null ? void 0 : item.products) == null ? void 0 : _a.length)}`),
|
|
56
|
+
children: ((_b = item == null ? void 0 : item.products) == null ? void 0 : _b.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_Product.default, { id: item == null ? void 0 : item.key, lists: item == null ? void 0 : item.products }) : /* @__PURE__ */ import_react.default.createElement(import_Empty.default, { id: item == null ? void 0 : item.key }),
|
|
57
|
+
showArrow: platform === "shop"
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
}, [carts, platform]);
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-lowcode__shopping-cart") }, isProductList ? /* @__PURE__ */ import_react.default.createElement(import_Product.default, { id: void 0, lists: state == null ? void 0 : state.products }) : /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
import_materials.Collapse,
|
|
63
|
+
{
|
|
64
|
+
items: cartsMap,
|
|
65
|
+
showHeader: true,
|
|
66
|
+
panelBackground: "#ffffff",
|
|
67
|
+
collapsible: platform !== "shop" ? "disabled" : "-",
|
|
68
|
+
accordion: platform === "shop",
|
|
69
|
+
onChange: (key) => {
|
|
70
|
+
updateState({ activeKey: key });
|
|
71
|
+
onActiveKey(key);
|
|
72
|
+
},
|
|
73
|
+
...collapseParams
|
|
74
|
+
}
|
|
75
|
+
));
|
|
76
|
+
};
|
|
77
|
+
var Cart_default = Cart;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.pisell-lowcode__shopping-cart {
|
|
2
|
+
.pisell-lowcode-collapse-content-box {
|
|
3
|
+
padding: 0 0 16px !important;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.pisell-lowcode-collapse-item {
|
|
7
|
+
.pisell-lowcode-collapse-header {
|
|
8
|
+
padding: 20px 0 !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&:first-child {
|
|
12
|
+
.pisell-lowcode-collapse-header {
|
|
13
|
+
padding: 0 0 20px !important;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pisell-lowcode__shopping-cart-content {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 16px;
|
|
22
|
+
|
|
23
|
+
.pisell-lowcode-product-card {
|
|
24
|
+
margin-bottom: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pisell-lowcode__shopping-cart-label {
|
|
29
|
+
color: var(--Base-Black, #000);
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 24px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.pisell-lowcode__shopping-cart-clear-btn {
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
color: var(--Blue-700, #175cd3);
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
line-height: 24px; /* 150% */
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
.anticon {
|
|
44
|
+
font-size: 18px;
|
|
45
|
+
margin-right: 6px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.pisell-lowcode__shopping-cart-clear-btn-empty {
|
|
50
|
+
margin-top: 12px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.pisell-lowcode__shopping-cart-add-service {
|
|
54
|
+
color: var(--Blue-700, #175cd3);
|
|
55
|
+
font-size: 16px;
|
|
56
|
+
font-style: normal;
|
|
57
|
+
font-weight: 400;
|
|
58
|
+
line-height: 24px;
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 8px;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.pisell-lowcode__shopping-cart-add-service-products {
|
|
66
|
+
align-items: start;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/shoppingCart/components/Empty/index.tsx
|
|
30
|
+
var Empty_exports = {};
|
|
31
|
+
__export(Empty_exports, {
|
|
32
|
+
default: () => Empty_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Empty_exports);
|
|
35
|
+
var import_useContext = require("../../hooks/useContext");
|
|
36
|
+
var import_useAddService = __toESM(require("../../hooks/useAddService"));
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var Empty = (props) => {
|
|
39
|
+
const { state } = (0, import_useContext.useContext)();
|
|
40
|
+
const { emptyText, holders, hideAddBtn } = state;
|
|
41
|
+
return /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__shopping-cart-empty" }, emptyText, !hideAddBtn ? (0, import_useAddService.default)(props == null ? void 0 : props.id) : null);
|
|
42
|
+
};
|
|
43
|
+
var Empty_default = Empty;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.pisell-lowcode__shopping-cart-empty {
|
|
2
|
+
color: var(--Gray-500, #667085);
|
|
3
|
+
font-size: 16px;
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
line-height: 24px;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
// height: 380px;
|
|
12
|
+
height: 40px;
|
|
13
|
+
margin: 16px 20px 20px;
|
|
14
|
+
gap: 10px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pisell-lowcode__shopping-cart-empty-multiple {
|
|
18
|
+
height: 40px;
|
|
19
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/shoppingCart/components/Render/index.tsx
|
|
30
|
+
var Render_exports = {};
|
|
31
|
+
__export(Render_exports, {
|
|
32
|
+
default: () => Render_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Render_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_useContext = require("../../hooks/useContext");
|
|
38
|
+
var import_Empty = __toESM(require("../Empty"));
|
|
39
|
+
var import_utils = require("../../utils");
|
|
40
|
+
var import_SelectHolderModal = __toESM(require("../SelectHolderModal"));
|
|
41
|
+
var import_Cart = __toESM(require("../Cart"));
|
|
42
|
+
var import_index = require("./index.less");
|
|
43
|
+
var Content = () => {
|
|
44
|
+
const { state, onChange } = (0, import_useContext.useContext)();
|
|
45
|
+
const selectPetRef = (0, import_react.useRef)();
|
|
46
|
+
const [pet, setPet] = (0, import_react.useState)([]);
|
|
47
|
+
const { isEmpty, className, holders, products, isEdit } = state;
|
|
48
|
+
(0, import_react.useEffect)(() => {
|
|
49
|
+
var _a, _b, _c;
|
|
50
|
+
let _holders = holders == null ? void 0 : holders.filter((item) => (item == null ? void 0 : item.key) > 0);
|
|
51
|
+
console.log(isEdit, products, _holders, pet, "wh_holder");
|
|
52
|
+
if ((_holders == null ? void 0 : _holders.length) && !(pet == null ? void 0 : pet.length) && (products == null ? void 0 : products.length) && !isEdit) {
|
|
53
|
+
if (_holders.length === 1) {
|
|
54
|
+
const _products = (0, import_utils.formatService)(products, (_a = _holders[0]) == null ? void 0 : _a.key);
|
|
55
|
+
onChange(_products);
|
|
56
|
+
} else {
|
|
57
|
+
(_c = (_b = selectPetRef.current) == null ? void 0 : _b.open) == null ? void 0 : _c.call(_b, {
|
|
58
|
+
products,
|
|
59
|
+
holders
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
setPet(_holders);
|
|
64
|
+
}, [holders]);
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: (0, import_classnames.default)("pisell-lowcode__shopping-cart-wrap", className)
|
|
69
|
+
},
|
|
70
|
+
isEmpty ? /* @__PURE__ */ import_react.default.createElement(import_Empty.default, null) : /* @__PURE__ */ import_react.default.createElement(import_Cart.default, null)
|
|
71
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
72
|
+
import_SelectHolderModal.default,
|
|
73
|
+
{
|
|
74
|
+
ref: selectPetRef,
|
|
75
|
+
onChange: (e) => onChange(e)
|
|
76
|
+
}
|
|
77
|
+
));
|
|
78
|
+
};
|
|
79
|
+
var Render_default = Content;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/shoppingCart/components/SelectHolderModal/index.tsx
|
|
30
|
+
var SelectHolderModal_exports = {};
|
|
31
|
+
__export(SelectHolderModal_exports, {
|
|
32
|
+
default: () => SelectHolderModal_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(SelectHolderModal_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_utils2 = require("../../utils");
|
|
39
|
+
var import_antd = require("antd");
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var SelectPetModal = ({ onChange }, ref) => {
|
|
42
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
43
|
+
const [params, setParams] = (0, import_react.useState)(null);
|
|
44
|
+
(0, import_react.useImperativeHandle)(ref, () => {
|
|
45
|
+
return {
|
|
46
|
+
open: ({ products, holders }) => {
|
|
47
|
+
var _a;
|
|
48
|
+
const _holders = holders == null ? void 0 : holders.filter((item) => item.key > 0);
|
|
49
|
+
const service = (0, import_utils2.formatService)(products, (_a = _holders == null ? void 0 : _holders[0]) == null ? void 0 : _a.key);
|
|
50
|
+
setParams({ service, holders: _holders });
|
|
51
|
+
setOpen(true);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
const handleChange = (e, index) => {
|
|
56
|
+
const _lists = [...params == null ? void 0 : params.service];
|
|
57
|
+
_lists[index]._extend.holder_id = e;
|
|
58
|
+
console.log(e, index, _lists, "wh79876");
|
|
59
|
+
setParams({ ...params, service: _lists });
|
|
60
|
+
};
|
|
61
|
+
const content = (0, import_react.useMemo)(() => {
|
|
62
|
+
var _a;
|
|
63
|
+
const services = (params == null ? void 0 : params.service) || [];
|
|
64
|
+
const options = (_a = params == null ? void 0 : params.holders) == null ? void 0 : _a.map((item) => {
|
|
65
|
+
return {
|
|
66
|
+
value: item.key,
|
|
67
|
+
label: item.main_field
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-select-pet-content" }, services == null ? void 0 : services.map((item, index) => {
|
|
71
|
+
var _a2;
|
|
72
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: "pisell-lowcode__booking-select-pet-item",
|
|
76
|
+
key: item._id
|
|
77
|
+
},
|
|
78
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, " ", item.title),
|
|
79
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
80
|
+
import_antd.Select,
|
|
81
|
+
{
|
|
82
|
+
defaultValue: (_a2 = options[0]) == null ? void 0 : _a2.value,
|
|
83
|
+
onChange: (e) => handleChange(e, index),
|
|
84
|
+
options
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
}));
|
|
89
|
+
}, [params == null ? void 0 : params.service, params == null ? void 0 : params.pets]);
|
|
90
|
+
const handleCancel = () => {
|
|
91
|
+
setOpen(false);
|
|
92
|
+
};
|
|
93
|
+
const handleOk = () => {
|
|
94
|
+
onChange(params == null ? void 0 : params.service);
|
|
95
|
+
handleCancel();
|
|
96
|
+
};
|
|
97
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
98
|
+
import_materials.PisellModal,
|
|
99
|
+
{
|
|
100
|
+
platform: "pc",
|
|
101
|
+
open,
|
|
102
|
+
bodyStyle: { padding: 0 },
|
|
103
|
+
title: import_utils.locales.getText(
|
|
104
|
+
"pisell2.text.shopping-cart.select.holder.modal.title"
|
|
105
|
+
),
|
|
106
|
+
okText: import_utils.locales.getText("pisell2.text.shopping-cart.confirm"),
|
|
107
|
+
cancelText: import_utils.locales.getText("pisell2.text.shopping-cart.cancel"),
|
|
108
|
+
onCancel: handleCancel,
|
|
109
|
+
onOk: handleOk,
|
|
110
|
+
destroyOnClose: true,
|
|
111
|
+
className: "pisell-lowcode__booking-select-pet-modal-wrap"
|
|
112
|
+
},
|
|
113
|
+
content
|
|
114
|
+
));
|
|
115
|
+
};
|
|
116
|
+
var SelectHolderModal_default = (0, import_react.forwardRef)(SelectPetModal);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.pisell-lowcode__booking-select-pet-modal-wrap {
|
|
2
|
+
.pisell-lowcode-modal-body {
|
|
3
|
+
padding: 24px !important;
|
|
4
|
+
overflow-y: auto !important;
|
|
5
|
+
max-height: 80vh;
|
|
6
|
+
|
|
7
|
+
.pisell-lowcode__booking-select-pet-content {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 20px;
|
|
11
|
+
|
|
12
|
+
.pisell-lowcode__booking-select-pet-item {
|
|
13
|
+
display: flex;
|
|
14
|
+
padding: 8px 16px;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
align-self: stretch;
|
|
18
|
+
border-radius: 12px;
|
|
19
|
+
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
20
|
+
|
|
21
|
+
.pisell-lowcode-select-selector {
|
|
22
|
+
display: flex;
|
|
23
|
+
padding: 6px 16px;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
border-radius: 20px;
|
|
27
|
+
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|