@pisell/private-materials 3.3.81 → 3.3.83
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/businessModel/SalesModel/Sales/index.js +4 -37
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +0 -7
- package/es/components/Sales/Resource/serve.js +0 -10
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Header/index.js +14 -8
- package/es/components/appointmentBooking/components/Services/index.js +36 -38
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +3 -0
- package/es/components/booking/components/footer/utils.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/info/service2/utils.js +2 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/es/components/booking/info2/service/addService/utils.js +13 -43
- package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
- package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/es/components/booking/info2/utilsByBooking.js +0 -9
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +0 -3
- package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
- package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
- package/es/components/eventBooking/index.js +7 -21
- package/es/components/eventBooking/locales.js +3 -3
- package/es/components/index.d.ts +1 -3
- package/es/components/index.js +1 -3
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/lib/businessModel/SalesModel/Sales/index.js +8 -22
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +0 -7
- package/lib/components/Sales/Resource/serve.js +2 -9
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Header/index.js +3 -2
- package/lib/components/appointmentBooking/components/Services/index.js +18 -19
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +3 -0
- package/lib/components/booking/components/footer/utils.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +0 -2
- package/lib/components/booking/components/voucher/index.js +23 -11
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/lib/components/booking/info2/service/addService/utils.js +4 -26
- package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
- package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/lib/components/booking/info2/utilsByBooking.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +0 -3
- package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
- package/lib/components/eventBooking/index.js +7 -11
- package/lib/components/eventBooking/locales.js +3 -3
- package/lib/components/index.d.ts +1 -3
- package/lib/components/index.js +0 -6
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/package.json +4 -4
- package/es/components/booking/editBookingModal/index.d.ts +0 -5
- package/es/components/booking/editBookingModal/index.js +0 -386
- package/es/components/booking/editBookingModal/index.less +0 -8
- package/es/components/booking/editBookingModal/locales.d.ts +0 -21
- package/es/components/booking/editBookingModal/locales.js +0 -20
- package/es/components/booking/editBookingModal/mock.d.ts +0 -807
- package/es/components/booking/editBookingModal/mock.js +0 -2993
- package/es/components/booking/editBookingModal/serve.d.ts +0 -51
- package/es/components/booking/editBookingModal/serve.js +0 -288
- package/es/components/booking/editBookingModal/type.d.ts +0 -12
- package/es/components/booking/editBookingModal/type.js +0 -1
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/editBookingModal/utils.js +0 -157
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/es/components/stepController/components/Content/index.d.ts +0 -7
- package/es/components/stepController/components/Content/index.js +0 -9
- package/es/components/stepController/components/Content/index.less +0 -8
- package/es/components/stepController/components/Footer/index.d.ts +0 -8
- package/es/components/stepController/components/Footer/index.js +0 -15
- package/es/components/stepController/components/Footer/index.less +0 -39
- package/es/components/stepController/components/Header/index.d.ts +0 -20
- package/es/components/stepController/components/Header/index.js +0 -97
- package/es/components/stepController/components/Header/index.less +0 -21
- package/es/components/stepController/index.d.ts +0 -5
- package/es/components/stepController/index.js +0 -64
- package/es/components/stepController/index.less +0 -11
- package/es/components/stepController/locales.d.ts +0 -27
- package/es/components/stepController/locales.js +0 -32
- package/es/components/stepController/types.d.ts +0 -23
- package/es/components/stepController/types.js +0 -1
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/hooks/useWindowSize.js +0 -26
- package/lib/components/booking/editBookingModal/index.d.ts +0 -5
- package/lib/components/booking/editBookingModal/index.js +0 -363
- package/lib/components/booking/editBookingModal/index.less +0 -8
- package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
- package/lib/components/booking/editBookingModal/locales.js +0 -44
- package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
- package/lib/components/booking/editBookingModal/mock.js +0 -3314
- package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
- package/lib/components/booking/editBookingModal/serve.js +0 -178
- package/lib/components/booking/editBookingModal/type.d.ts +0 -12
- package/lib/components/booking/editBookingModal/type.js +0 -17
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/editBookingModal/utils.js +0 -158
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/lib/components/stepController/components/Content/index.d.ts +0 -7
- package/lib/components/stepController/components/Content/index.js +0 -40
- package/lib/components/stepController/components/Content/index.less +0 -8
- package/lib/components/stepController/components/Footer/index.d.ts +0 -8
- package/lib/components/stepController/components/Footer/index.js +0 -49
- package/lib/components/stepController/components/Footer/index.less +0 -39
- package/lib/components/stepController/components/Header/index.d.ts +0 -20
- package/lib/components/stepController/components/Header/index.js +0 -104
- package/lib/components/stepController/components/Header/index.less +0 -21
- package/lib/components/stepController/index.d.ts +0 -5
- package/lib/components/stepController/index.js +0 -89
- package/lib/components/stepController/index.less +0 -11
- package/lib/components/stepController/locales.d.ts +0 -27
- package/lib/components/stepController/locales.js +0 -50
- package/lib/components/stepController/types.d.ts +0 -23
- package/lib/components/stepController/types.js +0 -17
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/hooks/useWindowSize.js +0 -51
- package/lowcode/edit-booking-modal/meta.ts +0 -53
- package/lowcode/step-controller/meta.ts +0 -88
|
@@ -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/stepController/index.tsx
|
|
30
|
-
var stepController_exports = {};
|
|
31
|
-
__export(stepController_exports, {
|
|
32
|
-
default: () => stepController_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(stepController_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_classnames = __toESM(require("classnames"));
|
|
37
|
-
var import_utils = require("@pisell/utils");
|
|
38
|
-
var import_materials = require("@pisell/materials");
|
|
39
|
-
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
40
|
-
var import_useWindowSize = require("../../hooks/useWindowSize");
|
|
41
|
-
var import_Header = __toESM(require("./components/Header"));
|
|
42
|
-
var import_Footer = __toESM(require("./components/Footer"));
|
|
43
|
-
var import_Content = __toESM(require("./components/Content"));
|
|
44
|
-
var import_locales = __toESM(require("./locales"));
|
|
45
|
-
var import_index = require("./index.less");
|
|
46
|
-
var StepController = ({
|
|
47
|
-
steps,
|
|
48
|
-
currentStep,
|
|
49
|
-
children,
|
|
50
|
-
onBack,
|
|
51
|
-
confirmCloseProps,
|
|
52
|
-
showFooter,
|
|
53
|
-
footerContent,
|
|
54
|
-
onClose
|
|
55
|
-
}) => {
|
|
56
|
-
var _a, _b;
|
|
57
|
-
const context = (0, import_useEngineContext.default)();
|
|
58
|
-
import_utils.locales.init(import_locales.default, ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en");
|
|
59
|
-
(0, import_useWindowSize.useWindowSize)({ debounceMs: 200 });
|
|
60
|
-
const isMobile = (0, import_react.useMemo)(() => {
|
|
61
|
-
const config = (0, import_materials.usePisellConfig)();
|
|
62
|
-
const platform = (config == null ? void 0 : config.platform) || "h5";
|
|
63
|
-
return platform === "h5";
|
|
64
|
-
}, []);
|
|
65
|
-
const currentStepIndex = (0, import_react.useMemo)(() => {
|
|
66
|
-
return (steps == null ? void 0 : steps.findIndex((step) => step.key === currentStep)) || 0;
|
|
67
|
-
}, [steps, currentStep]);
|
|
68
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
69
|
-
"div",
|
|
70
|
-
{
|
|
71
|
-
className: (0, import_classnames.default)("pisell-step-controller", {
|
|
72
|
-
"pisell-step-controller-mobile": isMobile
|
|
73
|
-
})
|
|
74
|
-
},
|
|
75
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
76
|
-
import_Header.default,
|
|
77
|
-
{
|
|
78
|
-
steps,
|
|
79
|
-
currentStepIndex,
|
|
80
|
-
confirmCloseProps,
|
|
81
|
-
onBack,
|
|
82
|
-
onClose
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
/* @__PURE__ */ import_react.default.createElement(import_Content.default, { children }),
|
|
86
|
-
showFooter && footerContent ? /* @__PURE__ */ import_react.default.createElement(import_Footer.default, { children: footerContent, isMobile }) : null
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
var stepController_default = StepController;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
en: {
|
|
3
|
-
'pisell2.step.controller.step': (step: number) => string;
|
|
4
|
-
'pisell2.step.controller.sendEmail': string;
|
|
5
|
-
'pisell2.step.controller.copy': string;
|
|
6
|
-
'pisell2.step.controller.download': string;
|
|
7
|
-
'pisell2.step.controller.preview': string;
|
|
8
|
-
'pisell2.step.controller.continue': string;
|
|
9
|
-
};
|
|
10
|
-
'zh-CN': {
|
|
11
|
-
'pisell2.step.controller.step': (step: number) => string;
|
|
12
|
-
'pisell2.step.controller.sendEmail': string;
|
|
13
|
-
'pisell2.step.controller.copy': string;
|
|
14
|
-
'pisell2.step.controller.download': string;
|
|
15
|
-
'pisell2.step.controller.preview': string;
|
|
16
|
-
'pisell2.step.controller.continue': string;
|
|
17
|
-
};
|
|
18
|
-
'zh-HK': {
|
|
19
|
-
'pisell2.step.controller.step': (step: number) => string;
|
|
20
|
-
'pisell2.step.controller.sendEmail': string;
|
|
21
|
-
'pisell2.step.controller.copy': string;
|
|
22
|
-
'pisell2.step.controller.download': string;
|
|
23
|
-
'pisell2.step.controller.preview': string;
|
|
24
|
-
'pisell2.step.controller.continue': string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export default _default;
|
|
@@ -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/stepController/locales.ts
|
|
20
|
-
var locales_exports = {};
|
|
21
|
-
__export(locales_exports, {
|
|
22
|
-
default: () => locales_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(locales_exports);
|
|
25
|
-
var locales_default = {
|
|
26
|
-
en: {
|
|
27
|
-
"pisell2.step.controller.step": (step) => `Step ${step || 1}`,
|
|
28
|
-
"pisell2.step.controller.sendEmail": "Send Email",
|
|
29
|
-
"pisell2.step.controller.copy": "Copy",
|
|
30
|
-
"pisell2.step.controller.download": "Download",
|
|
31
|
-
"pisell2.step.controller.preview": "Preview",
|
|
32
|
-
"pisell2.step.controller.continue": "Continue"
|
|
33
|
-
},
|
|
34
|
-
"zh-CN": {
|
|
35
|
-
"pisell2.step.controller.step": (step) => `步骤 ${step || 1}`,
|
|
36
|
-
"pisell2.step.controller.sendEmail": "发送邮件",
|
|
37
|
-
"pisell2.step.controller.copy": "复制",
|
|
38
|
-
"pisell2.step.controller.download": "下载",
|
|
39
|
-
"pisell2.step.controller.preview": "预览",
|
|
40
|
-
"pisell2.step.controller.continue": "继续"
|
|
41
|
-
},
|
|
42
|
-
"zh-HK": {
|
|
43
|
-
"pisell2.step.controller.step": (step) => `步驟 ${step || 1}`,
|
|
44
|
-
"pisell2.step.controller.sendEmail": "發送郵件",
|
|
45
|
-
"pisell2.step.controller.copy": "複製",
|
|
46
|
-
"pisell2.step.controller.download": "下載",
|
|
47
|
-
"pisell2.step.controller.preview": "預覽",
|
|
48
|
-
"pisell2.step.controller.continue": "繼續"
|
|
49
|
-
}
|
|
50
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface Step {
|
|
3
|
-
key: string;
|
|
4
|
-
description: string;
|
|
5
|
-
}
|
|
6
|
-
export interface StepControllerProps extends Step {
|
|
7
|
-
steps: Step[];
|
|
8
|
-
currentStep: string;
|
|
9
|
-
isLastStep?: boolean;
|
|
10
|
-
isMobile?: boolean;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
onBack?: (key: string) => void;
|
|
13
|
-
onClose?: () => void;
|
|
14
|
-
confirmCloseProps?: {
|
|
15
|
-
isConfirmClose?: boolean;
|
|
16
|
-
title?: string;
|
|
17
|
-
content?: string;
|
|
18
|
-
okText?: string;
|
|
19
|
-
cancelText?: string;
|
|
20
|
-
};
|
|
21
|
-
showFooter?: boolean;
|
|
22
|
-
footerContent?: React.ReactNode;
|
|
23
|
-
}
|
|
@@ -1,17 +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 __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
|
|
15
|
-
// src/components/stepController/types.ts
|
|
16
|
-
var types_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(types_exports);
|
|
@@ -1,84 +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/ticketBooking/utils/formatProductMessage.ts
|
|
20
|
-
var formatProductMessage_exports = {};
|
|
21
|
-
__export(formatProductMessage_exports, {
|
|
22
|
-
default: () => formatProductMessage_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(formatProductMessage_exports);
|
|
25
|
-
var import_utils = require("@pisell/utils");
|
|
26
|
-
var import_formatTime = require("./formatTime");
|
|
27
|
-
var formatProductMessage = (product, utils) => {
|
|
28
|
-
const {
|
|
29
|
-
product_option_string,
|
|
30
|
-
options,
|
|
31
|
-
bundle,
|
|
32
|
-
currency_symbol,
|
|
33
|
-
start_date,
|
|
34
|
-
end_date,
|
|
35
|
-
holder_id,
|
|
36
|
-
holders,
|
|
37
|
-
multiResources
|
|
38
|
-
} = product;
|
|
39
|
-
let str = "";
|
|
40
|
-
if (start_date && end_date) {
|
|
41
|
-
str += `${(0, import_formatTime.getServiceTime)(product, start_date, utils)}
|
|
42
|
-
`;
|
|
43
|
-
}
|
|
44
|
-
if (holder_id && Array.isArray(holders)) {
|
|
45
|
-
const targetHolder = holders.find((holder) => holder.id === holder_id);
|
|
46
|
-
if (targetHolder == null ? void 0 : targetHolder.label) {
|
|
47
|
-
str += `${targetHolder.label}
|
|
48
|
-
`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (Array.isArray(multiResources) && multiResources.length > 0) {
|
|
52
|
-
multiResources.forEach((resource) => {
|
|
53
|
-
const { id: ids, lists } = resource;
|
|
54
|
-
if (Array.isArray(ids)) {
|
|
55
|
-
ids.forEach((id) => {
|
|
56
|
-
const targetRes = lists.find((l) => l.id === id);
|
|
57
|
-
if (targetRes == null ? void 0 : targetRes.label) str += `${targetRes == null ? void 0 : targetRes.label}
|
|
58
|
-
`;
|
|
59
|
-
});
|
|
60
|
-
} else {
|
|
61
|
-
const targetRes = lists.find((l) => l.id === ids);
|
|
62
|
-
if (targetRes == null ? void 0 : targetRes.label) str += `${targetRes == null ? void 0 : targetRes.label}
|
|
63
|
-
`;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
if (product_option_string) str += `${product_option_string}
|
|
68
|
-
`;
|
|
69
|
-
if (Array.isArray(options) && options.length) {
|
|
70
|
-
options.forEach((opt) => {
|
|
71
|
-
str += `${opt.name} ${(0, import_utils.formatAmount)(opt == null ? void 0 : opt.price, 2, currency_symbol)} x ${opt.num}
|
|
72
|
-
`;
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
if (Array.isArray(bundle) && bundle.length) {
|
|
76
|
-
bundle.forEach((item) => {
|
|
77
|
-
str += `${item.title}
|
|
78
|
-
`;
|
|
79
|
-
str += `${(0, import_utils.formatAmount)(item.price, 2, currency_symbol)} x ${item.num}`;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
return str;
|
|
83
|
-
};
|
|
84
|
-
var formatProductMessage_default = formatProductMessage;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import 'dayjs/locale/zh-cn';
|
|
2
|
-
import 'dayjs/locale/en';
|
|
3
|
-
import 'dayjs/locale/zh-tw';
|
|
4
|
-
/**
|
|
5
|
-
* @title: 是否英文
|
|
6
|
-
* @description:
|
|
7
|
-
* @param {any} item
|
|
8
|
-
* @return {*}
|
|
9
|
-
* @Author: WangHan
|
|
10
|
-
* @Date: 2024-12-28 22:49
|
|
11
|
-
*/
|
|
12
|
-
export declare const isEn: (item: any) => boolean;
|
|
13
|
-
/**
|
|
14
|
-
* @title: 跨日预约时间
|
|
15
|
-
* @description:
|
|
16
|
-
* @param {any} item
|
|
17
|
-
* @return {*}
|
|
18
|
-
* @Author: WangHan
|
|
19
|
-
* @Date: 2024-12-28 22:50
|
|
20
|
-
*/
|
|
21
|
-
export declare const formatMultiDayDate: (item: any) => string;
|
|
22
|
-
/**
|
|
23
|
-
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
24
|
-
* @description:
|
|
25
|
-
* @param {any} item
|
|
26
|
-
* @param {any} currentDate
|
|
27
|
-
* @return {*}
|
|
28
|
-
* @Author: zhiwei.Wang
|
|
29
|
-
* @Date: 2024-04-26 14:04
|
|
30
|
-
*/
|
|
31
|
-
export declare const getServiceTime: (item: any, currentDate: any, utils: any) => string;
|
|
@@ -1,139 +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/ticketBooking/utils/formatTime.ts
|
|
30
|
-
var formatTime_exports = {};
|
|
31
|
-
__export(formatTime_exports, {
|
|
32
|
-
formatMultiDayDate: () => formatMultiDayDate,
|
|
33
|
-
getServiceTime: () => getServiceTime,
|
|
34
|
-
isEn: () => isEn
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(formatTime_exports);
|
|
37
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
38
|
-
var import_utils = require("@pisell/utils");
|
|
39
|
-
var import_zh_cn = require("dayjs/locale/zh-cn");
|
|
40
|
-
var import_en = require("dayjs/locale/en");
|
|
41
|
-
var import_zh_tw = require("dayjs/locale/zh-tw");
|
|
42
|
-
var isEn = (item) => {
|
|
43
|
-
const locale = (item == null ? void 0 : item.locale) || "en-US";
|
|
44
|
-
const _isEn = locale === "en-US" || locale === "en";
|
|
45
|
-
const localeTypes = {
|
|
46
|
-
"en-US": "en",
|
|
47
|
-
"zh-CN": "zh-cn",
|
|
48
|
-
"zh-HK": "zh-tw"
|
|
49
|
-
};
|
|
50
|
-
import_dayjs.default.locale(localeTypes[locale]);
|
|
51
|
-
return _isEn;
|
|
52
|
-
};
|
|
53
|
-
var formatMultiDayDate = (item) => {
|
|
54
|
-
const _isEn = isEn(item);
|
|
55
|
-
const startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
|
|
56
|
-
const endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
|
|
57
|
-
const _format = _isEn ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
|
|
58
|
-
const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
|
|
59
|
-
return date;
|
|
60
|
-
};
|
|
61
|
-
var getServiceTime = (item, currentDate, utils) => {
|
|
62
|
-
var _a, _b, _c, _d;
|
|
63
|
-
if (!(0, import_dayjs.default)(currentDate).isValid()) return "";
|
|
64
|
-
const locale = (item == null ? void 0 : item.locale) || ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
|
|
65
|
-
const isEn2 = locale === "en-US" || locale === "en";
|
|
66
|
-
const localeTypes = {
|
|
67
|
-
"en-US": "en",
|
|
68
|
-
"zh-CN": "zh-cn",
|
|
69
|
-
"zh-HK": "zh-tw"
|
|
70
|
-
};
|
|
71
|
-
import_dayjs.default.locale(localeTypes[locale]);
|
|
72
|
-
let startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
|
|
73
|
-
let endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
|
|
74
|
-
let diffInDays = (item == null ? void 0 : item.custom_day_count) || endDate.diff(startDate, "day");
|
|
75
|
-
if (item == null ? void 0 : item.duration_type) {
|
|
76
|
-
const sameDay = startDate.isSame(endDate, "day");
|
|
77
|
-
const dateFormat = isEn2 ? "DD/MM/YYYY" : "YYYY-MM-DD";
|
|
78
|
-
const timeFormat = "HH:mm";
|
|
79
|
-
const startTime = (item == null ? void 0 : item.start_time) || startDate.format(timeFormat);
|
|
80
|
-
const endTime = (item == null ? void 0 : item.end_time) || endDate.format(timeFormat);
|
|
81
|
-
let dateTime = "";
|
|
82
|
-
if (sameDay) {
|
|
83
|
-
if (isEn2) {
|
|
84
|
-
dateTime = `${startTime} ~ ${endTime} ${startDate.format(dateFormat)}`;
|
|
85
|
-
} else {
|
|
86
|
-
dateTime = `${startDate.format(dateFormat)} ${startTime} ~ ${endTime}`;
|
|
87
|
-
}
|
|
88
|
-
} else {
|
|
89
|
-
if (isEn2) {
|
|
90
|
-
dateTime = `${startTime} ${startDate.format(dateFormat)} ~ ${endTime} ${endDate.format(dateFormat)}`;
|
|
91
|
-
} else {
|
|
92
|
-
dateTime = `${startDate.format(dateFormat)} ${startTime} ~ ${endDate.format(dateFormat)} ${endTime}`;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
const startDateTime = `${startDate.format("YYYY-MM-DD")} ${startTime}`;
|
|
96
|
-
const endDateTime = `${endDate.format("YYYY-MM-DD")} ${endTime}`;
|
|
97
|
-
let _duration = (0, import_dayjs.default)(endDateTime).diff((0, import_dayjs.default)(startDateTime), item == null ? void 0 : item.duration_type);
|
|
98
|
-
let durationText = "";
|
|
99
|
-
if ((item == null ? void 0 : item.duration_type) === "minutes") {
|
|
100
|
-
const hours = Math.floor(_duration / 60);
|
|
101
|
-
const minutes = _duration % 60;
|
|
102
|
-
durationText = import_utils.locales.getText("pisell2.product.card.hour.minute")(hours, minutes);
|
|
103
|
-
} else if ((item == null ? void 0 : item.duration_type) === "days") {
|
|
104
|
-
durationText = import_utils.locales.getText("pisell2.product.card.day")(_duration);
|
|
105
|
-
} else {
|
|
106
|
-
durationText = `${_duration}`;
|
|
107
|
-
}
|
|
108
|
-
return `${dateTime} (${durationText})`;
|
|
109
|
-
}
|
|
110
|
-
let _format = isEn2 ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
|
|
111
|
-
if ((item == null ? void 0 : item.hasOwnProperty("format")) && ((_b = item == null ? void 0 : item.format) == null ? void 0 : _b.length) > 0) {
|
|
112
|
-
_format = isEn2 ? (_c = item == null ? void 0 : item.format) == null ? void 0 : _c[0] : (_d = item == null ? void 0 : item.format) == null ? void 0 : _d[1];
|
|
113
|
-
}
|
|
114
|
-
if (item == null ? void 0 : item.show_time) {
|
|
115
|
-
startDate = (0, import_dayjs.default)((item == null ? void 0 : item.start_time) ? `${item == null ? void 0 : item.start_date} ${item == null ? void 0 : item.start_time}` : startDate.format("YYYY-MM-DD HH:mm"));
|
|
116
|
-
endDate = (0, import_dayjs.default)((item == null ? void 0 : item.end_time) ? `${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}` : endDate.format("YYYY-MM-DD HH:mm"));
|
|
117
|
-
}
|
|
118
|
-
if ((item == null ? void 0 : item.duration_type) === "minutes") {
|
|
119
|
-
diffInDays = endDate.diff(startDate, "minute");
|
|
120
|
-
}
|
|
121
|
-
const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
|
|
122
|
-
let text = import_utils.locales.getText("pisell2.product.card.day")(diffInDays);
|
|
123
|
-
if (item == null ? void 0 : item.custom_day_count) {
|
|
124
|
-
text = import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays);
|
|
125
|
-
}
|
|
126
|
-
const textTypes = {
|
|
127
|
-
"minutes": import_utils.locales.getText("pisell2.product.card.minute")(diffInDays),
|
|
128
|
-
"event": import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays)
|
|
129
|
-
};
|
|
130
|
-
text = (textTypes == null ? void 0 : textTypes[item == null ? void 0 : item.duration_type]) || text;
|
|
131
|
-
let duration = `${diffInDays}${text}`;
|
|
132
|
-
return `${date} (${duration})`;
|
|
133
|
-
};
|
|
134
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
135
|
-
0 && (module.exports = {
|
|
136
|
-
formatMultiDayDate,
|
|
137
|
-
getServiceTime,
|
|
138
|
-
isEn
|
|
139
|
-
});
|
|
@@ -1,51 +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/hooks/useWindowSize.ts
|
|
20
|
-
var useWindowSize_exports = {};
|
|
21
|
-
__export(useWindowSize_exports, {
|
|
22
|
-
useWindowSize: () => useWindowSize
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useWindowSize_exports);
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var useWindowSize = (options = {}) => {
|
|
27
|
-
const {
|
|
28
|
-
debounceMs = 100
|
|
29
|
-
} = options;
|
|
30
|
-
(0, import_react.useEffect)(() => {
|
|
31
|
-
let timeoutId;
|
|
32
|
-
const setRealVH = () => {
|
|
33
|
-
const vh = window.innerHeight * 0.01;
|
|
34
|
-
document.documentElement.style.setProperty("--vh", `${vh}px`);
|
|
35
|
-
};
|
|
36
|
-
const debouncedHandleResize = () => {
|
|
37
|
-
clearTimeout(timeoutId);
|
|
38
|
-
timeoutId = setTimeout(setRealVH, debounceMs);
|
|
39
|
-
};
|
|
40
|
-
debouncedHandleResize();
|
|
41
|
-
window.addEventListener("resize", debouncedHandleResize);
|
|
42
|
-
return () => {
|
|
43
|
-
window.removeEventListener("resize", debouncedHandleResize);
|
|
44
|
-
clearTimeout(timeoutId);
|
|
45
|
-
};
|
|
46
|
-
}, [debounceMs]);
|
|
47
|
-
};
|
|
48
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
-
0 && (module.exports = {
|
|
50
|
-
useWindowSize
|
|
51
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IPublicTypeComponentMetadata,
|
|
3
|
-
IPublicTypeSnippet,
|
|
4
|
-
} from '@alilc/lowcode-types';
|
|
5
|
-
|
|
6
|
-
const EditBookingModalMeta: IPublicTypeComponentMetadata = {
|
|
7
|
-
componentName: 'EditBookingModal',
|
|
8
|
-
title: 'EditBookingModal',
|
|
9
|
-
docUrl: '',
|
|
10
|
-
screenshot: '',
|
|
11
|
-
devMode: 'proCode',
|
|
12
|
-
npm: {
|
|
13
|
-
package: '@pisell/private-materials',
|
|
14
|
-
version: '1.0.4',
|
|
15
|
-
exportName: 'EditBookingModal',
|
|
16
|
-
main: 'src/index.ts',
|
|
17
|
-
destructuring: true,
|
|
18
|
-
subName: '',
|
|
19
|
-
},
|
|
20
|
-
configure: {
|
|
21
|
-
props: [],
|
|
22
|
-
supports: {
|
|
23
|
-
events: [
|
|
24
|
-
{
|
|
25
|
-
name: 'onOk',
|
|
26
|
-
template:
|
|
27
|
-
"onOk(event,${extParams}){\n// 点击按钮时的回调\nconsole.log('onOk', event);}",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'onCancel',
|
|
31
|
-
template:
|
|
32
|
-
"onCancel(event,${extParams}){\n// 点击按钮时的回调\nconsole.log('onCancel', event);}",
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
component: {},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
const snippets: IPublicTypeSnippet[] = [
|
|
40
|
-
{
|
|
41
|
-
title: 'EditBookingModal',
|
|
42
|
-
screenshot: '',
|
|
43
|
-
schema: {
|
|
44
|
-
componentName: 'EditBookingModal',
|
|
45
|
-
props: {},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
];
|
|
49
|
-
|
|
50
|
-
export default {
|
|
51
|
-
...EditBookingModalMeta,
|
|
52
|
-
snippets,
|
|
53
|
-
};
|