@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,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/booking/info/pet/ChangePetModal/index.tsx
|
|
30
|
-
var ChangePetModal_exports = {};
|
|
31
|
-
__export(ChangePetModal_exports, {
|
|
32
|
-
default: () => ChangePetModal_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(ChangePetModal_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_utils = require("@pisell/utils");
|
|
37
|
-
var import_materials = require("@pisell/materials");
|
|
38
|
-
var import_status = require("../../service2/status");
|
|
39
|
-
var import_index = require("./index.less");
|
|
40
|
-
var ChangePetModal = (props, ref) => {
|
|
41
|
-
const [open, setOpen] = (0, import_react.useState)(false);
|
|
42
|
-
const [params, setParams] = (0, import_react.useState)({});
|
|
43
|
-
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
44
|
-
open: (e) => {
|
|
45
|
-
setParams(e);
|
|
46
|
-
setOpen(true);
|
|
47
|
-
}
|
|
48
|
-
}));
|
|
49
|
-
const handleProduct = (type) => {
|
|
50
|
-
const { ids, service, dispatch, setGlobalState, state } = params;
|
|
51
|
-
let _service = [...service || []];
|
|
52
|
-
if (type === "ok") {
|
|
53
|
-
_service = _service == null ? void 0 : _service.map((item) => {
|
|
54
|
-
if (ids == null ? void 0 : ids.includes(item._extend.holder_id)) {
|
|
55
|
-
return {
|
|
56
|
-
...item,
|
|
57
|
-
_extend: {
|
|
58
|
-
...item._extend || {},
|
|
59
|
-
holder_id: 0
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return item;
|
|
64
|
-
});
|
|
65
|
-
_service = _service.filter(
|
|
66
|
-
(item) => {
|
|
67
|
-
var _a;
|
|
68
|
-
return !(((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.holder_id) === 0 && import_status.appointmentTypes.includes(item.extension_type));
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
} else {
|
|
72
|
-
_service = _service.filter(
|
|
73
|
-
(item) => !ids.includes(item._extend.holder_id)
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
if (dispatch) {
|
|
77
|
-
dispatch({
|
|
78
|
-
type: "setService",
|
|
79
|
-
payload: {
|
|
80
|
-
value: [..._service],
|
|
81
|
-
edit: true
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
} else {
|
|
85
|
-
setGlobalState({
|
|
86
|
-
service: {
|
|
87
|
-
...state.service,
|
|
88
|
-
edit: true,
|
|
89
|
-
value: [..._service]
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
setOpen(false);
|
|
94
|
-
};
|
|
95
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
96
|
-
import_materials.PisellModal.Information,
|
|
97
|
-
{
|
|
98
|
-
open,
|
|
99
|
-
width: 432,
|
|
100
|
-
title: import_utils.locales.getText("pisell2.text.change.pet.title"),
|
|
101
|
-
describe: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-change-pet-modal-content" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.text.change.pet.content")), /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.text.change.pet.content1"))),
|
|
102
|
-
cancelText: import_utils.locales.getText("pisell2.text.change.pet.cancel"),
|
|
103
|
-
okText: import_utils.locales.getText("pisell2.text.change.pet.confirm"),
|
|
104
|
-
closable: true,
|
|
105
|
-
onOk: () => handleProduct("ok"),
|
|
106
|
-
onCancel: () => handleProduct("cancel")
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
};
|
|
110
|
-
var ChangePetModal_default = (0, import_react.forwardRef)(ChangePetModal);
|
|
@@ -1,113 +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/Lists.tsx
|
|
30
|
-
var Lists_exports = {};
|
|
31
|
-
__export(Lists_exports, {
|
|
32
|
-
default: () => Lists_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(Lists_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_Provider = require("../../../shoppingCart/Provider");
|
|
37
|
-
var import_shoppingCart = __toESM(require("../../../shoppingCart"));
|
|
38
|
-
var import_model = require("../model");
|
|
39
|
-
var import_utils = require("./utils");
|
|
40
|
-
var import_useSelectPet = __toESM(require("./hooks/useSelectPet"));
|
|
41
|
-
var import_status = require("./status");
|
|
42
|
-
var Lists = ({ onEdit, onChange }) => {
|
|
43
|
-
var _a;
|
|
44
|
-
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
45
|
-
const [params, setParams] = (0, import_react.useState)(import_status.defaultData);
|
|
46
|
-
const { holderLists } = (0, import_useSelectPet.default)(state);
|
|
47
|
-
(0, import_react.useEffect)(() => {
|
|
48
|
-
const keys = (0, import_utils.formatActiveKey)(holderLists, params == null ? void 0 : params.platform);
|
|
49
|
-
onChange({ activeCartId: keys }, "setActiveCartId");
|
|
50
|
-
setParams({
|
|
51
|
-
...params,
|
|
52
|
-
activeKey: keys
|
|
53
|
-
});
|
|
54
|
-
}, [holderLists, params == null ? void 0 : params.platform]);
|
|
55
|
-
const handleCard = (item) => {
|
|
56
|
-
if (state.disabledEdit || state.disableEventBookingEdit) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
onChange({ editModal: true, cacheItem: { ...item, new: 0 } });
|
|
60
|
-
onEdit == null ? void 0 : onEdit({ ...item, new: 0 });
|
|
61
|
-
};
|
|
62
|
-
const handleChange = (newState) => {
|
|
63
|
-
if (state.disabledEdit || state.disableEventBookingEdit || state.channelDisabledEdit) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const params2 = {
|
|
67
|
-
editModal: false,
|
|
68
|
-
value: newState,
|
|
69
|
-
edit: true,
|
|
70
|
-
cacheItem: null
|
|
71
|
-
};
|
|
72
|
-
onChange(params2);
|
|
73
|
-
};
|
|
74
|
-
const handleActiveKey = (key) => {
|
|
75
|
-
onChange({ activeCartId: key }, "setActiveCartId");
|
|
76
|
-
setParams({
|
|
77
|
-
...params,
|
|
78
|
-
activeKey: key
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
const CollapseParams = (0, import_react.useMemo)(() => {
|
|
82
|
-
const _params = {
|
|
83
|
-
activeKey: params == null ? void 0 : params.activeKey,
|
|
84
|
-
bordered: false
|
|
85
|
-
};
|
|
86
|
-
return _params;
|
|
87
|
-
}, [params == null ? void 0 : params.activeKey]);
|
|
88
|
-
const productParams = (0, import_react.useMemo)(() => {
|
|
89
|
-
return {
|
|
90
|
-
hideAddBtn: state.isTerminalDayBookingPage,
|
|
91
|
-
isShowNote: true,
|
|
92
|
-
isShowPackageNote: false,
|
|
93
|
-
holders: holderLists,
|
|
94
|
-
isEdit: !!(state == null ? void 0 : state.bookingId),
|
|
95
|
-
disabledEdit: state == null ? void 0 : state.disabledEdit
|
|
96
|
-
};
|
|
97
|
-
}, [holderLists, state == null ? void 0 : state.bookingId]);
|
|
98
|
-
return /* @__PURE__ */ import_react.default.createElement(import_Provider.CartContext.Provider, { value: { state } }, /* @__PURE__ */ import_react.default.createElement(
|
|
99
|
-
import_shoppingCart.default,
|
|
100
|
-
{
|
|
101
|
-
onCard: handleCard,
|
|
102
|
-
onChange: (e) => handleChange(e),
|
|
103
|
-
onAddProduct: () => onChange({ addModal: true }),
|
|
104
|
-
onActiveKey: handleActiveKey,
|
|
105
|
-
collapseParams: CollapseParams,
|
|
106
|
-
productParams: {
|
|
107
|
-
...productParams,
|
|
108
|
-
products: (0, import_utils.formatProducts)((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value, state)
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
));
|
|
112
|
-
};
|
|
113
|
-
var Lists_default = Lists;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/components/booking/info/service2/hooks/useSelectPet.tsx
|
|
20
|
-
var useSelectPet_exports = {};
|
|
21
|
-
__export(useSelectPet_exports, {
|
|
22
|
-
default: () => useSelectPet_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useSelectPet_exports);
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var import_utils = require("../utils");
|
|
27
|
-
var useSelectPet = (state) => {
|
|
28
|
-
var _a;
|
|
29
|
-
const petLists = (0, import_react.useMemo)(() => {
|
|
30
|
-
var _a2, _b, _c, _d, _e, _f;
|
|
31
|
-
const form_id = ((_d = (_c = (_b = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id) || 0;
|
|
32
|
-
return ((_f = (_e = state == null ? void 0 : state.pet) == null ? void 0 : _e.value) == null ? void 0 : _f[form_id]) || [];
|
|
33
|
-
}, [(_a = state == null ? void 0 : state.pet) == null ? void 0 : _a.value]);
|
|
34
|
-
const holderLists = (0, import_react.useMemo)(() => {
|
|
35
|
-
const _lists = (0, import_utils.formatHolderLists)(petLists);
|
|
36
|
-
return _lists;
|
|
37
|
-
}, [petLists]);
|
|
38
|
-
const getHolderName = (id) => {
|
|
39
|
-
if (!holderLists.length)
|
|
40
|
-
return "";
|
|
41
|
-
const resource = holderLists.find((d) => d.id === id);
|
|
42
|
-
return resource == null ? void 0 : resource.main_field;
|
|
43
|
-
};
|
|
44
|
-
return {
|
|
45
|
-
petLists,
|
|
46
|
-
holderLists,
|
|
47
|
-
getHolderName
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
var useSelectPet_default = useSelectPet;
|
|
@@ -1,75 +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/index.tsx
|
|
30
|
-
var service2_exports = {};
|
|
31
|
-
__export(service2_exports, {
|
|
32
|
-
Service2Cart: () => Service2Cart,
|
|
33
|
-
Service2Context: () => Service2Context
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(service2_exports);
|
|
36
|
-
var import_react = __toESM(require("react"));
|
|
37
|
-
var import_addService = __toESM(require("../service/addService"));
|
|
38
|
-
var import_editService = __toESM(require("../service/editService"));
|
|
39
|
-
var import_model = require("../model");
|
|
40
|
-
var import_Lists = __toESM(require("./Lists"));
|
|
41
|
-
var Service2Context = (0, import_react.createContext)({});
|
|
42
|
-
var Service2Cart = () => {
|
|
43
|
-
const detailRef = (0, import_react.useRef)();
|
|
44
|
-
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
45
|
-
(0, import_react.useEffect)(() => {
|
|
46
|
-
document.body.id = "body";
|
|
47
|
-
}, []);
|
|
48
|
-
(0, import_react.useEffect)(() => {
|
|
49
|
-
console.log(state, "wh_state33");
|
|
50
|
-
}, [state]);
|
|
51
|
-
const dispatchService = (type, payload) => {
|
|
52
|
-
dispatch({
|
|
53
|
-
type,
|
|
54
|
-
payload: { ...payload }
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
const handleEdit = (cacheItem) => {
|
|
58
|
-
setTimeout(() => {
|
|
59
|
-
var _a, _b;
|
|
60
|
-
(_b = (_a = detailRef.current) == null ? void 0 : _a.init) == null ? void 0 : _b.call(_a, cacheItem);
|
|
61
|
-
}, 100);
|
|
62
|
-
};
|
|
63
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
64
|
-
import_Lists.default,
|
|
65
|
-
{
|
|
66
|
-
onEdit: handleEdit,
|
|
67
|
-
onChange: (e, type) => dispatchService(type || "setService", e)
|
|
68
|
-
}
|
|
69
|
-
), /* @__PURE__ */ import_react.default.createElement(import_addService.default, { onEdit: handleEdit })), /* @__PURE__ */ import_react.default.createElement(import_editService.default, { ref: detailRef }));
|
|
70
|
-
};
|
|
71
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
-
0 && (module.exports = {
|
|
73
|
-
Service2Cart,
|
|
74
|
-
Service2Context
|
|
75
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { shoppingCartProps } from '../../../shoppingCart/type';
|
|
2
|
-
export declare const defaultData: shoppingCartProps;
|
|
3
|
-
/**
|
|
4
|
-
* @title: 根据是否是跨日预约和是否是terminal打开的,返回日期和输入框占据的列数
|
|
5
|
-
* @description:
|
|
6
|
-
* @param {boolean} isDayBooking
|
|
7
|
-
* @param {boolean} isTerminal
|
|
8
|
-
* @return {*}
|
|
9
|
-
* @Author: WangHan
|
|
10
|
-
* @Date: 2024-12-06 10:29
|
|
11
|
-
*/
|
|
12
|
-
export declare const inputDateCol: (isDayBooking: boolean, isTerminal?: boolean) => {
|
|
13
|
-
date: {};
|
|
14
|
-
input: {};
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* @title: 预约商品扩展类型
|
|
18
|
-
* @description:
|
|
19
|
-
* @return {*}
|
|
20
|
-
* @Author: WangHan
|
|
21
|
-
* @Date: 2024-12-06 14:59
|
|
22
|
-
*/
|
|
23
|
-
export declare const appointmentTypes: string[];
|
|
24
|
-
/**
|
|
25
|
-
* @title: 营业日时间
|
|
26
|
-
* @description:
|
|
27
|
-
* @return {*}
|
|
28
|
-
* @Author: WangHan
|
|
29
|
-
* @Date: 2024-12-06 17:23
|
|
30
|
-
*/
|
|
31
|
-
export declare const openingTime: () => string;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/components/booking/info/service2/status.ts
|
|
20
|
-
var status_exports = {};
|
|
21
|
-
__export(status_exports, {
|
|
22
|
-
appointmentTypes: () => appointmentTypes,
|
|
23
|
-
defaultData: () => defaultData,
|
|
24
|
-
inputDateCol: () => inputDateCol,
|
|
25
|
-
openingTime: () => openingTime
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(status_exports);
|
|
28
|
-
var import_utils = require("@pisell/utils");
|
|
29
|
-
var defaultData = {
|
|
30
|
-
isOpenGroup: true,
|
|
31
|
-
carts: [],
|
|
32
|
-
platform: "shop",
|
|
33
|
-
emptyText: import_utils.locales.getText("pisell2.text.no.selected"),
|
|
34
|
-
activeKey: [],
|
|
35
|
-
defaultActiveKey: [],
|
|
36
|
-
className: ""
|
|
37
|
-
};
|
|
38
|
-
var inputDateCol = (isDayBooking, isTerminal) => {
|
|
39
|
-
const params = {
|
|
40
|
-
date: {},
|
|
41
|
-
input: {}
|
|
42
|
-
};
|
|
43
|
-
if (!isDayBooking) {
|
|
44
|
-
params.input = {
|
|
45
|
-
span: 24
|
|
46
|
-
};
|
|
47
|
-
return params;
|
|
48
|
-
}
|
|
49
|
-
if (isTerminal) {
|
|
50
|
-
params.date = {
|
|
51
|
-
sm: 24,
|
|
52
|
-
lg: 24,
|
|
53
|
-
xl: 12
|
|
54
|
-
};
|
|
55
|
-
params.input = {
|
|
56
|
-
sm: 24,
|
|
57
|
-
lg: 24,
|
|
58
|
-
xl: 12
|
|
59
|
-
};
|
|
60
|
-
} else {
|
|
61
|
-
params.date = {
|
|
62
|
-
span: 12
|
|
63
|
-
};
|
|
64
|
-
params.input = {
|
|
65
|
-
span: 12
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return params;
|
|
69
|
-
};
|
|
70
|
-
var appointmentTypes = ["product_appointment", "product_add_time"];
|
|
71
|
-
var openingTime = () => {
|
|
72
|
-
const openingTime2 = localStorage.getItem("shopOpeningHours");
|
|
73
|
-
return openingTime2 || "00:00";
|
|
74
|
-
};
|
|
75
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
-
0 && (module.exports = {
|
|
77
|
-
appointmentTypes,
|
|
78
|
-
defaultData,
|
|
79
|
-
inputDateCol,
|
|
80
|
-
openingTime
|
|
81
|
-
});
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
export declare const formatActiveKey: (lists: any[], platform: string) => any[];
|
|
3
|
-
/**
|
|
4
|
-
* @title: 获取资源名称
|
|
5
|
-
* @description:
|
|
6
|
-
* @param {any} id
|
|
7
|
-
* @param {any} state
|
|
8
|
-
* @return {*}
|
|
9
|
-
* @Author: WangHan
|
|
10
|
-
* @Date: 2024-11-29 18:02
|
|
11
|
-
*/
|
|
12
|
-
export declare const getResourceItem: (id: any, state: any) => any;
|
|
13
|
-
/**
|
|
14
|
-
* @title: 错误提示
|
|
15
|
-
* @description:
|
|
16
|
-
* @param {any} service
|
|
17
|
-
* @param {any} resourceItem
|
|
18
|
-
* @return {*}
|
|
19
|
-
* @Author: WangHan
|
|
20
|
-
* @Date: 2024-11-29 18:41
|
|
21
|
-
*/
|
|
22
|
-
export declare const getErrorMessage: (service: any, resourceItem: any, isDay?: boolean) => any;
|
|
23
|
-
/**
|
|
24
|
-
* @title: 格式化主体列表
|
|
25
|
-
* @description:
|
|
26
|
-
* @param {any} lists
|
|
27
|
-
* @param {boolean} isOpenGroup
|
|
28
|
-
* @return {*}
|
|
29
|
-
* @Author: WangHan
|
|
30
|
-
* @Date: 2024-12-04 11:27
|
|
31
|
-
*/
|
|
32
|
-
export declare const formatHolderLists: (lists: any) => any;
|
|
33
|
-
/**
|
|
34
|
-
* @title: 是否是预约商品
|
|
35
|
-
* @description:
|
|
36
|
-
* @return {*}
|
|
37
|
-
* @Author: WangHan
|
|
38
|
-
* @Date: 2024-12-06 11:24
|
|
39
|
-
*/
|
|
40
|
-
export declare const isAppointment: (item: any, state: any) => boolean;
|
|
41
|
-
/**
|
|
42
|
-
* @title: 格式化商品数据
|
|
43
|
-
* @description:
|
|
44
|
-
* @param {any} lists
|
|
45
|
-
* @return {*}
|
|
46
|
-
* @Author: WangHan
|
|
47
|
-
* @Date: 2024-11-29 17:36
|
|
48
|
-
*/
|
|
49
|
-
export declare const formatProducts: (lists: any[], state: any) => any[] | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* @title: 禁用日期
|
|
52
|
-
* @description:
|
|
53
|
-
* @param {any} current
|
|
54
|
-
* @param {string} position
|
|
55
|
-
* @param {any} startDate
|
|
56
|
-
* @return {*}
|
|
57
|
-
* @Author: WangHan
|
|
58
|
-
* @Date: 2024-12-03 17:51
|
|
59
|
-
*/
|
|
60
|
-
export declare const disabledDate: (current: any, position: string, currentDate: any) => any;
|
|
61
|
-
/**
|
|
62
|
-
* @title: 是否是跨日预约
|
|
63
|
-
* @description:
|
|
64
|
-
* @param {any} state
|
|
65
|
-
* @return {*}
|
|
66
|
-
* @Author: WangHan
|
|
67
|
-
* @Date: 2024-12-04 09:49
|
|
68
|
-
*/
|
|
69
|
-
export declare const isDayBooking: (state: any) => boolean;
|
|
70
|
-
/**
|
|
71
|
-
* @title: 是否是terminal上的跨日预约
|
|
72
|
-
* @description:
|
|
73
|
-
* @param {any} state
|
|
74
|
-
* @return {*}
|
|
75
|
-
* @Author: WangHan
|
|
76
|
-
* @Date: 2024-12-04 15:31
|
|
77
|
-
*/
|
|
78
|
-
export declare const isTerminalDayBooking: (state: any) => any;
|
|
79
|
-
export declare const formatDayDate: (_extend: any) => any;
|
|
80
|
-
/**
|
|
81
|
-
* @title: 根据营业日时间格式化时间
|
|
82
|
-
* @description:
|
|
83
|
-
* @param {any} state
|
|
84
|
-
* @return {*}
|
|
85
|
-
* @Author: WangHan
|
|
86
|
-
* @Date: 2024-12-04 12:07
|
|
87
|
-
*/
|
|
88
|
-
export declare const formatDayTime: ({ startDate, endDate }: any) => {
|
|
89
|
-
startDateTime: dayjs.Dayjs;
|
|
90
|
-
endDateTime: dayjs.Dayjs;
|
|
91
|
-
};
|
|
92
|
-
export declare const formatDateTime: (start_date: any, end_date: any) => {
|
|
93
|
-
value: dayjs.Dayjs;
|
|
94
|
-
end_date: dayjs.Dayjs;
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* @title: 初始化日期
|
|
98
|
-
* @description:
|
|
99
|
-
* @return {*}
|
|
100
|
-
* @Author: WangHan
|
|
101
|
-
* @Date: 2024-12-06 17:24
|
|
102
|
-
*/
|
|
103
|
-
export declare const initDate: () => {
|
|
104
|
-
value: dayjs.Dayjs;
|
|
105
|
-
end_date: dayjs.Dayjs;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* @title: 是否有预约商品
|
|
109
|
-
* @description:
|
|
110
|
-
* @return {*}
|
|
111
|
-
* @Author: WangHan
|
|
112
|
-
* @Date: 2024-12-12 15:47
|
|
113
|
-
*/
|
|
114
|
-
export declare const isHasDayAppointmentProduct: (state: any) => boolean;
|
|
115
|
-
/**
|
|
116
|
-
* @title: 过滤出如果是预约商品,则只获取跨日的预约商品
|
|
117
|
-
* @description:
|
|
118
|
-
* @param {any} lists
|
|
119
|
-
* @return {*}
|
|
120
|
-
* @Author: WangHan
|
|
121
|
-
* @Date: 2024-12-13 16:44
|
|
122
|
-
*/
|
|
123
|
-
export declare const getDayProducts: (holderId: number, lists: any, isTerminal?: boolean) => any;
|
|
124
|
-
/**
|
|
125
|
-
* @title: 判断是否打开删除宠物弹窗
|
|
126
|
-
* @description:
|
|
127
|
-
* @param {any} state
|
|
128
|
-
* @param {any} newVal
|
|
129
|
-
* @return {*}
|
|
130
|
-
* @Author: WangHan
|
|
131
|
-
* @Date: 2024-12-16 16:12
|
|
132
|
-
*/
|
|
133
|
-
export declare const isOpenDeletePet: (state: any, newVal: any) => {
|
|
134
|
-
ids: any;
|
|
135
|
-
lists: any;
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* @title: 当前选中的表单id
|
|
139
|
-
* @description:
|
|
140
|
-
* @param {any} state
|
|
141
|
-
* @return {*}
|
|
142
|
-
* @Author: WangHan
|
|
143
|
-
* @Date: 2024-12-17 14:40
|
|
144
|
-
*/
|
|
145
|
-
export declare const holderId: (state: any) => number;
|