@pisell/private-materials 3.0.197 → 3.0.199
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 +7 -7
- 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 +11 -11
- package/es/components/booking/components/customSelect/index.d.ts +0 -1
- package/es/components/booking/components/customSelect/index.js +2 -6
- package/es/components/booking/components/footer/amount.js +22 -45
- package/es/components/booking/components/footer/index.js +40 -84
- package/es/components/booking/components/footer/utils.js +32 -218
- package/es/components/booking/info/addServiceVariant/index.js +1 -8
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
- package/es/components/booking/info/clientVariant/vertical/index.js +4 -33
- package/es/components/booking/info/main.js +8 -20
- package/es/components/booking/info/model.js +0 -3
- package/es/components/booking/info/pet/index.js +5 -54
- package/es/components/booking/info/service/addService/index.js +20 -127
- package/es/components/booking/info/service/addService/index.less +3 -13
- package/es/components/booking/info/service/addService/utils.d.ts +2 -11
- package/es/components/booking/info/service/addService/utils.js +24 -49
- package/es/components/booking/info/service/editService/index.js +41 -232
- package/es/components/booking/info/service/editService/index.less +13 -18
- package/es/components/booking/info/utils.d.ts +0 -9
- package/es/components/booking/info/utils.js +0 -13
- package/es/components/booking/locales.d.ts +0 -60
- package/es/components/booking/locales.js +3 -75
- package/es/components/booking/model.d.ts +1 -4
- package/es/components/booking/model.js +2 -4
- package/es/components/booking/utils.d.ts +3 -12
- package/es/components/booking/utils.js +22 -126
- package/es/components/eftpos/form/index.js +12 -6
- package/es/components/eftpos/group/index.d.ts +1 -2
- package/es/components/eftpos/group/index.js +1 -2
- package/es/components/eftpos/index.js +2 -2
- package/es/components/eftpos/receipt/index.d.ts +24 -0
- package/es/components/eftpos/receipt/index.js +96 -0
- package/es/components/eftposPay/helper.d.ts +1 -0
- package/es/components/eftposPay/helper.js +14 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/tyro/index.js +51 -20
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/lib/components/booking/components/customSelect/index.d.ts +0 -1
- package/lib/components/booking/components/customSelect/index.js +2 -6
- package/lib/components/booking/components/footer/amount.js +8 -26
- package/lib/components/booking/components/footer/index.js +4 -25
- package/lib/components/booking/components/footer/utils.js +31 -144
- package/lib/components/booking/info/addServiceVariant/index.js +0 -5
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
- package/lib/components/booking/info/clientVariant/vertical/index.js +10 -36
- package/lib/components/booking/info/main.js +4 -11
- package/lib/components/booking/info/model.js +0 -3
- package/lib/components/booking/info/pet/index.js +25 -61
- package/lib/components/booking/info/service/addService/index.js +28 -95
- package/lib/components/booking/info/service/addService/index.less +3 -13
- package/lib/components/booking/info/service/addService/utils.d.ts +2 -11
- package/lib/components/booking/info/service/addService/utils.js +10 -31
- package/lib/components/booking/info/service/editService/index.js +122 -271
- package/lib/components/booking/info/service/editService/index.less +13 -18
- package/lib/components/booking/info/utils.d.ts +0 -9
- package/lib/components/booking/info/utils.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -60
- package/lib/components/booking/locales.js +3 -63
- package/lib/components/booking/model.d.ts +1 -4
- package/lib/components/booking/model.js +2 -4
- package/lib/components/booking/utils.d.ts +3 -12
- package/lib/components/booking/utils.js +15 -79
- package/lib/components/eftpos/form/index.js +12 -6
- package/lib/components/eftpos/group/index.d.ts +1 -2
- package/lib/components/eftpos/group/index.js +0 -1
- package/lib/components/eftpos/index.js +2 -2
- package/lib/components/eftpos/receipt/index.d.ts +24 -0
- package/lib/components/eftpos/receipt/index.js +88 -0
- package/lib/components/eftposPay/helper.d.ts +1 -0
- package/lib/components/eftposPay/helper.js +21 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/tyro/index.js +36 -7
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/package.json +3 -3
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -37
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -5
- package/es/components/booking/info/dateRange/index.js +0 -98
- package/es/components/booking/info/dateRange/index.less +0 -21
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/es/components/booking/info/pet/ChangePetModal/index.js +0 -118
- package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/es/components/booking/info/service2/Lists.d.ts +0 -3
- package/es/components/booking/info/service2/Lists.js +0 -158
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
- package/es/components/booking/info/service2/index.d.ts +0 -3
- package/es/components/booking/info/service2/index.js +0 -58
- package/es/components/booking/info/service2/status.d.ts +0 -31
- package/es/components/booking/info/service2/status.js +0 -78
- package/es/components/booking/info/service2/utils.d.ts +0 -145
- package/es/components/booking/info/service2/utils.js +0 -436
- package/es/components/booking/materiels/holder/index.d.ts +0 -7
- package/es/components/booking/materiels/holder/index.js +0 -51
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/Provider.js +0 -86
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/Product.js +0 -96
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/index.js +0 -72
- package/es/components/shoppingCart/components/Cart/index.less +0 -68
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Empty/index.js +0 -14
- package/es/components/shoppingCart/components/Empty/index.less +0 -19
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Render/index.js +0 -68
- package/es/components/shoppingCart/components/Render/index.less +0 -2
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useAddService.js +0 -23
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useClearCart.js +0 -54
- package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useContext.js +0 -5
- package/es/components/shoppingCart/index.d.ts +0 -4
- package/es/components/shoppingCart/index.js +0 -24
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/locales.js +0 -38
- package/es/components/shoppingCart/mock.d.ts +0 -40
- package/es/components/shoppingCart/mock.js +0 -40
- package/es/components/shoppingCart/status.d.ts +0 -2
- package/es/components/shoppingCart/status.js +0 -22
- package/es/components/shoppingCart/type.d.ts +0 -39
- package/es/components/shoppingCart/type.js +0 -1
- package/es/components/shoppingCart/utils.d.ts +0 -63
- package/es/components/shoppingCart/utils.js +0 -119
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -59
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -5
- package/lib/components/booking/info/dateRange/index.js +0 -111
- package/lib/components/booking/info/dateRange/index.less +0 -21
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -110
- package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/lib/components/booking/info/service2/Lists.d.ts +0 -3
- package/lib/components/booking/info/service2/Lists.js +0 -113
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
- package/lib/components/booking/info/service2/index.d.ts +0 -3
- package/lib/components/booking/info/service2/index.js +0 -75
- package/lib/components/booking/info/service2/status.d.ts +0 -31
- package/lib/components/booking/info/service2/status.js +0 -81
- package/lib/components/booking/info/service2/utils.d.ts +0 -145
- package/lib/components/booking/info/service2/utils.js +0 -320
- package/lib/components/booking/materiels/holder/index.d.ts +0 -7
- package/lib/components/booking/materiels/holder/index.js +0 -65
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/Provider.js +0 -110
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/Product.js +0 -89
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/index.js +0 -77
- package/lib/components/shoppingCart/components/Cart/index.less +0 -68
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Empty/index.js +0 -43
- package/lib/components/shoppingCart/components/Empty/index.less +0 -19
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Render/index.js +0 -79
- package/lib/components/shoppingCart/components/Render/index.less +0 -2
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -116
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useClearCart.js +0 -71
- package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useContext.js +0 -31
- package/lib/components/shoppingCart/index.d.ts +0 -4
- package/lib/components/shoppingCart/index.js +0 -60
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/locales.js +0 -56
- package/lib/components/shoppingCart/mock.d.ts +0 -40
- package/lib/components/shoppingCart/mock.js +0 -76
- package/lib/components/shoppingCart/status.d.ts +0 -2
- package/lib/components/shoppingCart/status.js +0 -60
- package/lib/components/shoppingCart/type.d.ts +0 -39
- package/lib/components/shoppingCart/type.js +0 -17
- package/lib/components/shoppingCart/utils.d.ts +0 -63
- package/lib/components/shoppingCart/utils.js +0 -92
- package/lowcode/shopping-cart/meta.ts +0 -98
|
@@ -1,320 +0,0 @@
|
|
|
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/booking/info/service2/utils.ts
|
|
30
|
-
var utils_exports = {};
|
|
31
|
-
__export(utils_exports, {
|
|
32
|
-
disabledDate: () => disabledDate,
|
|
33
|
-
formatActiveKey: () => formatActiveKey,
|
|
34
|
-
formatDateTime: () => formatDateTime,
|
|
35
|
-
formatDayDate: () => formatDayDate,
|
|
36
|
-
formatDayTime: () => formatDayTime,
|
|
37
|
-
formatHolderLists: () => formatHolderLists,
|
|
38
|
-
formatProducts: () => formatProducts,
|
|
39
|
-
getDayProducts: () => getDayProducts,
|
|
40
|
-
getErrorMessage: () => getErrorMessage,
|
|
41
|
-
getResourceItem: () => getResourceItem,
|
|
42
|
-
holderId: () => holderId,
|
|
43
|
-
initDate: () => initDate,
|
|
44
|
-
isAppointment: () => isAppointment,
|
|
45
|
-
isDayBooking: () => isDayBooking,
|
|
46
|
-
isHasDayAppointmentProduct: () => isHasDayAppointmentProduct,
|
|
47
|
-
isOpenDeletePet: () => isOpenDeletePet,
|
|
48
|
-
isTerminalDayBooking: () => isTerminalDayBooking
|
|
49
|
-
});
|
|
50
|
-
module.exports = __toCommonJS(utils_exports);
|
|
51
|
-
var import_mock = require("../../mock");
|
|
52
|
-
var import_utils = require("../../utils");
|
|
53
|
-
var import_utils2 = require("@pisell/utils");
|
|
54
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
55
|
-
var import_status = require("./status");
|
|
56
|
-
var import_locales = __toESM(require("../../locales"));
|
|
57
|
-
import_utils2.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
58
|
-
var formatActiveKey = (lists, platform) => {
|
|
59
|
-
var _a;
|
|
60
|
-
if (!(lists == null ? void 0 : lists.length))
|
|
61
|
-
return [];
|
|
62
|
-
if (platform === "shop") {
|
|
63
|
-
return [(_a = lists[lists.length - 1]) == null ? void 0 : _a.key];
|
|
64
|
-
}
|
|
65
|
-
return lists == null ? void 0 : lists.map((cart) => cart == null ? void 0 : cart.key);
|
|
66
|
-
};
|
|
67
|
-
var getResourceItem = (id, state) => {
|
|
68
|
-
var _a;
|
|
69
|
-
if (id === 0) {
|
|
70
|
-
return (0, import_mock.getNoResource)();
|
|
71
|
-
}
|
|
72
|
-
return (_a = state.service.resources) == null ? void 0 : _a.find((d) => d.form_record_id === id);
|
|
73
|
-
};
|
|
74
|
-
var errorTypes = {
|
|
75
|
-
product: import_utils2.locales.getText("pisell2.text.status.service-error-1"),
|
|
76
|
-
time: import_utils2.locales.getText("pisell2.text.status.service-error-2"),
|
|
77
|
-
maxLimit: import_utils2.locales.getText("pisell2.text.status.service-error-3"),
|
|
78
|
-
limit: import_utils2.locales.getText("pisell2.text.status.service-error-3")
|
|
79
|
-
};
|
|
80
|
-
var getErrorMessage = (service, resourceItem, isDay) => {
|
|
81
|
-
const errorList = (0, import_utils.getErrorList)(resourceItem, service, isDay);
|
|
82
|
-
let errorMessage = "";
|
|
83
|
-
if (!service.id) {
|
|
84
|
-
return errorList[0].label;
|
|
85
|
-
}
|
|
86
|
-
if (errorList.length) {
|
|
87
|
-
if (errorList.length > 1) {
|
|
88
|
-
errorMessage = `${errorList.length} ${import_utils2.locales.getText(
|
|
89
|
-
"pisell2.text.warnings"
|
|
90
|
-
)}`;
|
|
91
|
-
} else {
|
|
92
|
-
errorMessage = (resourceItem == null ? void 0 : resourceItem.labelText) + " " + errorTypes[errorList[0].type];
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return errorMessage;
|
|
96
|
-
};
|
|
97
|
-
var formatHolderLists = (lists) => {
|
|
98
|
-
const isOpenGroup = true;
|
|
99
|
-
const _lists = lists == null ? void 0 : lists.map((item) => {
|
|
100
|
-
return {
|
|
101
|
-
...item,
|
|
102
|
-
id: (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id),
|
|
103
|
-
key: (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id),
|
|
104
|
-
label: import_utils2.locales.getText("pisell2.text.cart.of")(item == null ? void 0 : item.main_field)
|
|
105
|
-
};
|
|
106
|
-
});
|
|
107
|
-
if (isOpenGroup) {
|
|
108
|
-
const defaults = [
|
|
109
|
-
{
|
|
110
|
-
key: 0,
|
|
111
|
-
id: 0,
|
|
112
|
-
label: import_utils2.locales.getText("pisell2.text.open.items"),
|
|
113
|
-
main_field: import_utils2.locales.getText("pisell2.text.open.items")
|
|
114
|
-
}
|
|
115
|
-
];
|
|
116
|
-
return defaults.concat(_lists);
|
|
117
|
-
}
|
|
118
|
-
return _lists;
|
|
119
|
-
};
|
|
120
|
-
var getHolderLists = (state) => {
|
|
121
|
-
var _a, _b, _c, _d, _e, _f;
|
|
122
|
-
const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
|
|
123
|
-
const petLists = ((_f = (_e = state == null ? void 0 : state.pet) == null ? void 0 : _e.value) == null ? void 0 : _f[form_id]) || [];
|
|
124
|
-
const _lists = formatHolderLists(petLists);
|
|
125
|
-
return _lists;
|
|
126
|
-
};
|
|
127
|
-
var getHolderName = (state, id) => {
|
|
128
|
-
const holderLists = getHolderLists(state);
|
|
129
|
-
if (!holderLists.length || !id)
|
|
130
|
-
return "";
|
|
131
|
-
const resource = holderLists.find((d) => (d == null ? void 0 : d.id) === id);
|
|
132
|
-
return resource == null ? void 0 : resource.main_field;
|
|
133
|
-
};
|
|
134
|
-
var isAppointment = (item, state) => {
|
|
135
|
-
return import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) && isDayBooking(state);
|
|
136
|
-
};
|
|
137
|
-
var formatProducts = (lists, state) => {
|
|
138
|
-
if (!(lists == null ? void 0 : lists.length))
|
|
139
|
-
return [];
|
|
140
|
-
try {
|
|
141
|
-
return lists.map((item) => {
|
|
142
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
143
|
-
const _isAppointment = isAppointment(item, state);
|
|
144
|
-
const clientTitle = getHolderName(state, (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.holder_id);
|
|
145
|
-
let resourceItem = {};
|
|
146
|
-
let errorMessage = "";
|
|
147
|
-
if (_isAppointment) {
|
|
148
|
-
resourceItem = getResourceItem((_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.resource, state);
|
|
149
|
-
errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
|
|
150
|
-
}
|
|
151
|
-
return {
|
|
152
|
-
...item,
|
|
153
|
-
note: (item == null ? void 0 : item.note) || "",
|
|
154
|
-
locale: state.locale,
|
|
155
|
-
symbol: state.amountSymbol,
|
|
156
|
-
total: item == null ? void 0 : item._extend.total,
|
|
157
|
-
price: item == null ? void 0 : item._extend.price,
|
|
158
|
-
origin_total: item == null ? void 0 : item._extend.origin_total,
|
|
159
|
-
num: item == null ? void 0 : item._extend.quantity,
|
|
160
|
-
bundle: (_d = (_c = item == null ? void 0 : item._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.bundle,
|
|
161
|
-
options: (_f = (_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.option,
|
|
162
|
-
_showAction: false,
|
|
163
|
-
_actionText: import_utils2.locales.getText("page.booking.text.add-time"),
|
|
164
|
-
_errorMessage: errorMessage,
|
|
165
|
-
_extend: {
|
|
166
|
-
...(item == null ? void 0 : item._extend) || {},
|
|
167
|
-
date: !_isAppointment ? null : state == null ? void 0 : state.date,
|
|
168
|
-
relation_form_name: !_isAppointment ? "" : (resourceItem == null ? void 0 : resourceItem.labelText) || item.relation_form_name,
|
|
169
|
-
holder_title: clientTitle,
|
|
170
|
-
resource: !_isAppointment ? null : (_g = item == null ? void 0 : item._extend) == null ? void 0 : _g.resource,
|
|
171
|
-
relation_details: []
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
});
|
|
175
|
-
} catch (error) {
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
var disabledDate = (current, position, currentDate) => {
|
|
179
|
-
if (!(0, import_dayjs.default)(currentDate).isValid())
|
|
180
|
-
return;
|
|
181
|
-
if (position === "start") {
|
|
182
|
-
return false;
|
|
183
|
-
}
|
|
184
|
-
if (position === "end" && current.endOf("day") && currentDate) {
|
|
185
|
-
console.log(currentDate, current, position, "currentDate");
|
|
186
|
-
const endDisabled = currentDate.add(8, "months").format("YYYY-MM-DD");
|
|
187
|
-
return (0, import_dayjs.default)(endDisabled) < current.startOf("day") || current.startOf("day") <= currentDate;
|
|
188
|
-
}
|
|
189
|
-
return current && current <= currentDate;
|
|
190
|
-
};
|
|
191
|
-
var isDayBooking = (state) => {
|
|
192
|
-
return (state == null ? void 0 : state.renderType) === "dayBooking";
|
|
193
|
-
};
|
|
194
|
-
var isTerminalDayBooking = (state) => {
|
|
195
|
-
return state.isTerminalDayBookingPage;
|
|
196
|
-
};
|
|
197
|
-
var formatDayDate = (_extend) => {
|
|
198
|
-
let startDate = (0, import_dayjs.default)(_extend == null ? void 0 : _extend.start_date).startOf("day");
|
|
199
|
-
let endDate = (0, import_dayjs.default)(_extend == null ? void 0 : _extend.end_date).startOf("day");
|
|
200
|
-
return {
|
|
201
|
-
..._extend,
|
|
202
|
-
start_date: startDate,
|
|
203
|
-
end_date: endDate
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
var formatDayTime = ({ startDate, endDate }) => {
|
|
207
|
-
const shopOpeningTime = localStorage.getItem("shopOpeningHours") || "00:00";
|
|
208
|
-
let start_date = (0, import_dayjs.default)(startDate).format("YYYY-MM-DD");
|
|
209
|
-
let end_date = (0, import_dayjs.default)(endDate).format("YYYY-MM-DD");
|
|
210
|
-
const result = {
|
|
211
|
-
startDateTime: (0, import_dayjs.default)(`${start_date}T${shopOpeningTime}:00`),
|
|
212
|
-
// 结束日期根据营业日时间减去一分钟
|
|
213
|
-
endDateTime: (0, import_dayjs.default)(`${end_date}T${shopOpeningTime}:00`).subtract(1, "minute")
|
|
214
|
-
};
|
|
215
|
-
return result;
|
|
216
|
-
};
|
|
217
|
-
var formatDateTime = (start_date, end_date) => {
|
|
218
|
-
const _openingTime = (0, import_status.openingTime)();
|
|
219
|
-
const startDate = `${start_date} ${_openingTime}`;
|
|
220
|
-
let endDate = `${end_date} ${_openingTime}`;
|
|
221
|
-
const date = {
|
|
222
|
-
value: (0, import_dayjs.default)(startDate),
|
|
223
|
-
end_date: (0, import_dayjs.default)(endDate).subtract(1, "minute")
|
|
224
|
-
};
|
|
225
|
-
return date;
|
|
226
|
-
};
|
|
227
|
-
var initDate = () => {
|
|
228
|
-
const startDate = (0, import_dayjs.default)().format("YYYY-MM-DD");
|
|
229
|
-
let endDate = (0, import_dayjs.default)().add(1, "days").format("YYYY-MM-DD");
|
|
230
|
-
const date = formatDateTime(startDate, endDate);
|
|
231
|
-
return date;
|
|
232
|
-
};
|
|
233
|
-
var isHasDayAppointmentProduct = (state) => {
|
|
234
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
235
|
-
const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
|
|
236
|
-
const services = ((_e = state.service) == null ? void 0 : _e.value) || [];
|
|
237
|
-
const pets = ((_g = (_f = state.pet) == null ? void 0 : _f.value) == null ? void 0 : _g[form_id]) || [];
|
|
238
|
-
const appointmentServices = services.filter((d) => import_status.appointmentTypes.includes(d.extension_type));
|
|
239
|
-
if (!appointmentServices.length)
|
|
240
|
-
return true;
|
|
241
|
-
let _pets = pets == null ? void 0 : pets.map((d) => {
|
|
242
|
-
const holderProducts = services.filter((d2) => {
|
|
243
|
-
var _a2;
|
|
244
|
-
return ((_a2 = d2._extend) == null ? void 0 : _a2.holder_id) == d2.form_record_id;
|
|
245
|
-
});
|
|
246
|
-
return {
|
|
247
|
-
...d,
|
|
248
|
-
// 如果该购物车中没选择任何商品,则不需要验证,所以直接用1来填充
|
|
249
|
-
// services: !holderProducts?.length ? [1] : holderProducts?.filter((d: any) => appointmentTypes.includes(d.extension_type))
|
|
250
|
-
services: services.filter((item) => {
|
|
251
|
-
var _a2;
|
|
252
|
-
return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) == d.form_record_id && import_status.appointmentTypes.includes(item.extension_type);
|
|
253
|
-
})
|
|
254
|
-
};
|
|
255
|
-
});
|
|
256
|
-
_pets = _pets.filter((d) => !d.services.length);
|
|
257
|
-
return _pets.length > 0;
|
|
258
|
-
};
|
|
259
|
-
var getDayProducts = (holderId2, lists, isTerminal) => {
|
|
260
|
-
let _lists = lists || [];
|
|
261
|
-
if (!holderId2 && !isTerminal) {
|
|
262
|
-
_lists = _lists.filter((item) => !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type));
|
|
263
|
-
} else {
|
|
264
|
-
_lists = _lists.filter((item) => {
|
|
265
|
-
var _a;
|
|
266
|
-
return !import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) || import_status.appointmentTypes.includes(item == null ? void 0 : item.extension_type) && ((_a = item.duration) == null ? void 0 : _a.type) === "days";
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
return _lists;
|
|
270
|
-
};
|
|
271
|
-
var isOpenDeletePet = (state, newVal) => {
|
|
272
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
273
|
-
const form_id = ((_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
|
|
274
|
-
const oldPets = ((_f = (_e = state == null ? void 0 : state.pet) == null ? void 0 : _e.value) == null ? void 0 : _f[form_id]) || [];
|
|
275
|
-
const newPets = (newVal == null ? void 0 : newVal[form_id]) || [];
|
|
276
|
-
const deletePets = oldPets.filter((item) => !newPets.some((newItem) => newItem.form_record_id === item.form_record_id));
|
|
277
|
-
const servicePets = deletePets.map((item) => {
|
|
278
|
-
var _a2, _b2;
|
|
279
|
-
return {
|
|
280
|
-
...item,
|
|
281
|
-
services: (_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.filter((d) => {
|
|
282
|
-
var _a3;
|
|
283
|
-
return ((_a3 = d._extend) == null ? void 0 : _a3.holder_id) == item.form_record_id;
|
|
284
|
-
})
|
|
285
|
-
};
|
|
286
|
-
});
|
|
287
|
-
const lists = servicePets.filter((item) => {
|
|
288
|
-
var _a2;
|
|
289
|
-
return ((_a2 = item.services) == null ? void 0 : _a2.length) > 0;
|
|
290
|
-
});
|
|
291
|
-
console.log(deletePets, (_g = state.service) == null ? void 0 : _g.value, lists, "wh98888888");
|
|
292
|
-
return {
|
|
293
|
-
ids: lists.map((item) => item.form_record_id),
|
|
294
|
-
lists
|
|
295
|
-
};
|
|
296
|
-
};
|
|
297
|
-
var holderId = (state) => {
|
|
298
|
-
var _a;
|
|
299
|
-
return Number(((_a = state == null ? void 0 : state.activeCartId) == null ? void 0 : _a[0]) || 0);
|
|
300
|
-
};
|
|
301
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
302
|
-
0 && (module.exports = {
|
|
303
|
-
disabledDate,
|
|
304
|
-
formatActiveKey,
|
|
305
|
-
formatDateTime,
|
|
306
|
-
formatDayDate,
|
|
307
|
-
formatDayTime,
|
|
308
|
-
formatHolderLists,
|
|
309
|
-
formatProducts,
|
|
310
|
-
getDayProducts,
|
|
311
|
-
getErrorMessage,
|
|
312
|
-
getResourceItem,
|
|
313
|
-
holderId,
|
|
314
|
-
initDate,
|
|
315
|
-
isAppointment,
|
|
316
|
-
isDayBooking,
|
|
317
|
-
isHasDayAppointmentProduct,
|
|
318
|
-
isOpenDeletePet,
|
|
319
|
-
isTerminalDayBooking
|
|
320
|
-
});
|
|
@@ -1,65 +0,0 @@
|
|
|
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/booking/materiels/holder/index.tsx
|
|
30
|
-
var holder_exports = {};
|
|
31
|
-
__export(holder_exports, {
|
|
32
|
-
default: () => holder_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(holder_exports);
|
|
35
|
-
var import_antd = require("antd");
|
|
36
|
-
var import_model = require("../../info/model");
|
|
37
|
-
var import_react = __toESM(require("react"));
|
|
38
|
-
var import_useSelectPet = __toESM(require("../../info/service2/hooks/useSelectPet"));
|
|
39
|
-
var Holder = (props) => {
|
|
40
|
-
var _a;
|
|
41
|
-
const { selectProps, ...resetProps } = props;
|
|
42
|
-
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
43
|
-
const { holderLists } = (0, import_useSelectPet.default)(state);
|
|
44
|
-
const holders = (0, import_react.useMemo)(() => {
|
|
45
|
-
const lists = holderLists == null ? void 0 : holderLists.filter((d) => (d == null ? void 0 : d.id) > 0);
|
|
46
|
-
if (!(lists == null ? void 0 : lists.length))
|
|
47
|
-
return [];
|
|
48
|
-
return lists.map((d) => {
|
|
49
|
-
return {
|
|
50
|
-
value: d == null ? void 0 : d.id,
|
|
51
|
-
label: d == null ? void 0 : d.main_field
|
|
52
|
-
};
|
|
53
|
-
});
|
|
54
|
-
}, [(_a = state == null ? void 0 : state.pet) == null ? void 0 : _a.value]);
|
|
55
|
-
const renderOptions = (0, import_react.useCallback)(
|
|
56
|
-
(array, value = "value", label = "label") => {
|
|
57
|
-
return array.map((d) => {
|
|
58
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Select.Option, { value: d[value], key: d[value], disabled: d.disabled }, d[label]);
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
[]
|
|
62
|
-
);
|
|
63
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Select, { ...selectProps, ...resetProps }, renderOptions(holders));
|
|
64
|
-
};
|
|
65
|
-
var holder_default = Holder;
|
|
@@ -1,110 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
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;
|