@pisell/private-materials 3.3.88 → 3.3.89
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 +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/businessModel/SalesModel/Sales/index.js +37 -4
- package/es/components/Sales/Cart/index.js +5 -1
- package/es/components/Sales/Cart/utils.d.ts +40 -0
- package/es/components/Sales/Cart/utils.js +167 -0
- package/es/components/Sales/Checkout/index.d.ts +4 -0
- package/es/components/Sales/Checkout/index.js +52 -8
- package/es/components/Sales/Checkout/serve.d.ts +13 -0
- package/es/components/Sales/Checkout/serve.js +16 -2
- package/es/components/Sales/Checkout/utils.js +7 -1
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +7 -0
- package/es/components/Sales/Resource/serve.js +10 -0
- package/es/components/Sales/Summary/index.d.ts +10 -0
- package/es/components/Sales/Summary/index.js +17 -2
- package/es/components/Sales/Summary/serve.d.ts +1 -0
- package/es/components/Sales/Summary/serve.js +6 -0
- package/es/components/Sales/Summary/utils.d.ts +15 -0
- package/es/components/Sales/Summary/utils.js +43 -1
- 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/Deposit/index.d.ts +6 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
- package/es/components/appointmentBooking/components/Services/index.js +23 -27
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
- package/es/components/appointmentBooking/deposit/index.js +4 -2
- package/es/components/appointmentBooking/index.js +14 -0
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/booking/components/footer/utils.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/editBookingModal/index.d.ts +5 -0
- package/es/components/booking/editBookingModal/index.js +386 -0
- package/es/components/booking/editBookingModal/index.less +8 -0
- package/es/components/booking/editBookingModal/locales.d.ts +21 -0
- package/es/components/booking/editBookingModal/locales.js +20 -0
- package/es/components/booking/editBookingModal/mock.d.ts +807 -0
- package/es/components/booking/editBookingModal/mock.js +2993 -0
- package/es/components/booking/editBookingModal/serve.d.ts +51 -0
- package/es/components/booking/editBookingModal/serve.js +288 -0
- package/es/components/booking/editBookingModal/type.d.ts +12 -0
- package/es/components/booking/editBookingModal/type.js +1 -0
- package/es/components/booking/editBookingModal/utils.d.ts +12 -0
- package/es/components/booking/editBookingModal/utils.js +157 -0
- package/es/components/booking/info/service2/utils.js +3 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +10 -0
- package/es/components/booking/info2/service/addService/utils.js +44 -13
- package/es/components/booking/info2/service/editService/Resources/index.js +22 -8
- package/es/components/booking/info2/service/editService/Resources/index.less +6 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +26 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +308 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
- package/es/components/booking/info2/utilsByBooking.js +9 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +3 -0
- package/es/components/eftposPay/const.d.ts +4 -1
- package/es/components/eftposPay/const.js +3 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/hooks.js +3 -1
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/linkly/const.d.ts +23 -0
- package/es/components/eftposPay/linkly/const.js +82 -0
- package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/hooks/index.js +2 -0
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/es/components/eftposPay/linkly/hooks/normal.js +318 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
- package/es/components/eftposPay/linkly/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/index.js +197 -0
- package/es/components/eftposPay/linkly/service.d.ts +32 -0
- package/es/components/eftposPay/linkly/service.js +73 -0
- package/es/components/eftposPay/manufacturer.d.ts +1 -0
- package/es/components/eftposPay/manufacturer.js +4 -0
- package/es/components/eftposPay/pay.d.ts +1 -1
- package/es/components/eftposPay/pay.js +6 -2
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/windcave/windcave.js +12 -2
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -17
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
- package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
- package/es/components/eventBooking/components/bookingDetailModal/index.js +22 -4
- package/es/components/eventBooking/index.js +21 -7
- package/es/components/eventBooking/locales.d.ts +24 -0
- package/es/components/eventBooking/locales.js +30 -6
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -1
- package/es/components/pay/toC/PaymentMethods/index.js +5 -4
- package/es/components/stepController/components/Content/index.d.ts +7 -0
- package/es/components/stepController/components/Content/index.js +9 -0
- package/es/components/stepController/components/Content/index.less +8 -0
- package/es/components/stepController/components/Footer/index.d.ts +8 -0
- package/es/components/stepController/components/Footer/index.js +15 -0
- package/es/components/stepController/components/Footer/index.less +39 -0
- package/es/components/stepController/components/Header/index.d.ts +20 -0
- package/es/components/stepController/components/Header/index.js +97 -0
- package/es/components/stepController/components/Header/index.less +21 -0
- package/es/components/stepController/index.d.ts +5 -0
- package/es/components/stepController/index.js +64 -0
- package/es/components/stepController/index.less +11 -0
- package/es/components/stepController/locales.d.ts +27 -0
- package/es/components/stepController/locales.js +32 -0
- package/es/components/stepController/types.d.ts +23 -0
- package/es/components/stepController/types.js +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +257 -138
- package/es/components/ticketBooking/locales.d.ts +164 -146
- package/es/components/ticketBooking/locales.js +195 -147
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/es/components/ticketBooking/utils/formatTime.js +144 -0
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/hooks/useWindowSize.js +26 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/businessModel/SalesModel/Sales/index.js +22 -8
- package/lib/components/Sales/Cart/index.js +1 -0
- package/lib/components/Sales/Cart/utils.d.ts +40 -0
- package/lib/components/Sales/Cart/utils.js +117 -0
- package/lib/components/Sales/Checkout/index.d.ts +4 -0
- package/lib/components/Sales/Checkout/index.js +39 -7
- package/lib/components/Sales/Checkout/serve.d.ts +13 -0
- package/lib/components/Sales/Checkout/serve.js +7 -2
- package/lib/components/Sales/Checkout/utils.js +2 -0
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +7 -0
- package/lib/components/Sales/Resource/serve.js +9 -2
- package/lib/components/Sales/Summary/index.d.ts +10 -0
- package/lib/components/Sales/Summary/index.js +7 -1
- package/lib/components/Sales/Summary/serve.d.ts +1 -0
- package/lib/components/Sales/Summary/serve.js +32 -0
- package/lib/components/Sales/Summary/utils.d.ts +15 -0
- package/lib/components/Sales/Summary/utils.js +30 -1
- 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/Deposit/index.d.ts +6 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
- package/lib/components/appointmentBooking/components/Services/index.js +6 -11
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
- package/lib/components/appointmentBooking/deposit/index.js +4 -2
- package/lib/components/appointmentBooking/index.js +11 -0
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/booking/components/footer/utils.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +2 -0
- package/lib/components/booking/components/voucher/index.js +2 -2
- package/lib/components/booking/editBookingModal/index.d.ts +5 -0
- package/lib/components/booking/editBookingModal/index.js +363 -0
- package/lib/components/booking/editBookingModal/index.less +8 -0
- package/lib/components/booking/editBookingModal/locales.d.ts +21 -0
- package/lib/components/booking/editBookingModal/locales.js +44 -0
- package/lib/components/booking/editBookingModal/mock.d.ts +807 -0
- package/lib/components/booking/editBookingModal/mock.js +3314 -0
- package/lib/components/booking/editBookingModal/serve.d.ts +51 -0
- package/lib/components/booking/editBookingModal/serve.js +178 -0
- package/lib/components/booking/editBookingModal/type.d.ts +12 -0
- package/lib/components/booking/editBookingModal/type.js +17 -0
- package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
- package/lib/components/booking/editBookingModal/utils.js +158 -0
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +10 -0
- package/lib/components/booking/info2/service/addService/utils.js +27 -4
- package/lib/components/booking/info2/service/editService/Resources/index.js +54 -10
- package/lib/components/booking/info2/service/editService/Resources/index.less +6 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +53 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +311 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
- package/lib/components/booking/info2/utilsByBooking.js +6 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +3 -0
- package/lib/components/eftposPay/const.d.ts +4 -1
- package/lib/components/eftposPay/const.js +2 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/hooks.js +11 -4
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/linkly/const.d.ts +23 -0
- package/lib/components/eftposPay/linkly/const.js +102 -0
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/normal.js +239 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
- package/lib/components/eftposPay/linkly/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/index.js +208 -0
- package/lib/components/eftposPay/linkly/service.d.ts +32 -0
- package/lib/components/eftposPay/linkly/service.js +55 -0
- package/lib/components/eftposPay/manufacturer.d.ts +1 -0
- package/lib/components/eftposPay/manufacturer.js +6 -0
- package/lib/components/eftposPay/pay.d.ts +1 -1
- package/lib/components/eftposPay/pay.js +13 -2
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/windcave/windcave.js +11 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +16 -3
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +55 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
- package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +10 -4
- package/lib/components/eventBooking/index.js +11 -7
- package/lib/components/eventBooking/locales.d.ts +24 -0
- package/lib/components/eventBooking/locales.js +30 -6
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +6 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
- package/lib/components/stepController/components/Content/index.d.ts +7 -0
- package/lib/components/stepController/components/Content/index.js +40 -0
- package/lib/components/stepController/components/Content/index.less +8 -0
- package/lib/components/stepController/components/Footer/index.d.ts +8 -0
- package/lib/components/stepController/components/Footer/index.js +49 -0
- package/lib/components/stepController/components/Footer/index.less +39 -0
- package/lib/components/stepController/components/Header/index.d.ts +20 -0
- package/lib/components/stepController/components/Header/index.js +104 -0
- package/lib/components/stepController/components/Header/index.less +21 -0
- package/lib/components/stepController/index.d.ts +5 -0
- package/lib/components/stepController/index.js +89 -0
- package/lib/components/stepController/index.less +11 -0
- package/lib/components/stepController/locales.d.ts +27 -0
- package/lib/components/stepController/locales.js +50 -0
- package/lib/components/stepController/types.d.ts +23 -0
- package/lib/components/stepController/types.js +17 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +263 -139
- package/lib/components/ticketBooking/locales.d.ts +164 -146
- package/lib/components/ticketBooking/locales.js +22 -4
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/lib/components/ticketBooking/utils/formatTime.js +139 -0
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.js +51 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/edit-booking-modal/meta.ts +53 -0
- package/lowcode/step-controller/meta.ts +88 -0
- package/package.json +3 -3
|
@@ -44,7 +44,7 @@ var import_OrderProductModal = __toESM(require("../Provider/OrderProductModal/in
|
|
|
44
44
|
var import_index = require("./index.less");
|
|
45
45
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
46
46
|
var BookingDetailModal = (props) => {
|
|
47
|
-
var _a;
|
|
47
|
+
var _a, _b, _c;
|
|
48
48
|
const modalContentRef = (0, import_react.useRef)(null);
|
|
49
49
|
const context = (0, import_useEngineContext.default)();
|
|
50
50
|
const { utils } = context.appHelper || {};
|
|
@@ -58,11 +58,17 @@ var BookingDetailModal = (props) => {
|
|
|
58
58
|
checkBeforeSelectEventDetail
|
|
59
59
|
} = (0, import_Sales.useEventDetail)();
|
|
60
60
|
const { addToCart, checkBeforeAddToCart, checkBeforeAddToCartResquest } = (0, import_Sales.useCart)();
|
|
61
|
+
const { initData } = (0, import_Sales.useInit)();
|
|
61
62
|
const [activeTab, setActiveTab] = (0, import_react.useState)("introduction");
|
|
62
63
|
const [isScrolling, setIsScrolling] = (0, import_react.useState)(false);
|
|
63
64
|
const [openCheckout, setOpenCheckout] = (0, import_react.useState)(false);
|
|
64
65
|
const isUserClickRef = (0, import_react.useRef)(false);
|
|
65
66
|
const scrollTimeoutRef = (0, import_react.useRef)(null);
|
|
67
|
+
const buttonText = (0, import_react.useMemo)(() => {
|
|
68
|
+
var _a2, _b2, _c2;
|
|
69
|
+
const config = ((_b2 = (_a2 = initData == null ? void 0 : initData.boardSetting) == null ? void 0 : _a2.config) == null ? void 0 : _b2.product_display_setting) || {};
|
|
70
|
+
return ((_c2 = utils == null ? void 0 : utils.translation) == null ? void 0 : _c2.call(utils, config == null ? void 0 : config.booking_event_v2_product_detail_button)) || import_utils.locales.getText("pisell2.event.add.to.cart");
|
|
71
|
+
}, [(_b = (_a = initData == null ? void 0 : initData.boardSetting) == null ? void 0 : _a.config) == null ? void 0 : _b.product_display_setting]);
|
|
66
72
|
const anchorOptions = (0, import_react.useMemo)(
|
|
67
73
|
() => [
|
|
68
74
|
{
|
|
@@ -91,7 +97,7 @@ var BookingDetailModal = (props) => {
|
|
|
91
97
|
const images = (0, import_react.useMemo)(() => {
|
|
92
98
|
var _a2;
|
|
93
99
|
return ((_a2 = detail == null ? void 0 : detail.introduction) == null ? void 0 : _a2.images) || [];
|
|
94
|
-
}, [(
|
|
100
|
+
}, [(_c = detail == null ? void 0 : detail.introduction) == null ? void 0 : _c.images]);
|
|
95
101
|
(0, import_react.useEffect)(() => {
|
|
96
102
|
if (!modalContentRef.current) return;
|
|
97
103
|
let isCurrentlyScrolling = false;
|
|
@@ -233,7 +239,7 @@ var BookingDetailModal = (props) => {
|
|
|
233
239
|
utils == null ? void 0 : utils.action({
|
|
234
240
|
type: "pisell1.productDetail",
|
|
235
241
|
data: {
|
|
236
|
-
detail: { ...(bookingOption == null ? void 0 : bookingOption._originData) || {} },
|
|
242
|
+
detail: { ...(bookingOption == null ? void 0 : bookingOption._originData) || {}, open_deposit: 1 },
|
|
237
243
|
isOS: false
|
|
238
244
|
},
|
|
239
245
|
callback: (data) => {
|
|
@@ -283,7 +289,7 @@ var BookingDetailModal = (props) => {
|
|
|
283
289
|
destroyOnClose: true,
|
|
284
290
|
className: "booking-detail-modal",
|
|
285
291
|
onCancel: onCloseEventDetail,
|
|
286
|
-
okText:
|
|
292
|
+
okText: buttonText,
|
|
287
293
|
cancelVisible: false,
|
|
288
294
|
onOk: handleOk,
|
|
289
295
|
width: (0, import_utils.isMobile)() ? "100%" : 600,
|
|
@@ -55,13 +55,17 @@ var Content = () => {
|
|
|
55
55
|
getBoardSetting.run({ item_type: "event_booking_v2" });
|
|
56
56
|
}, []);
|
|
57
57
|
(0, import_react.useEffect)(() => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
58
|
+
var _a2, _b, _c;
|
|
59
|
+
const history = ((_a2 = utils == null ? void 0 : utils.getHistory) == null ? void 0 : _a2.call(utils)) || {};
|
|
60
|
+
const query = (_b = history == null ? void 0 : history.location) == null ? void 0 : _b.query;
|
|
61
|
+
const params = {
|
|
62
|
+
front_end_cache_id: (query == null ? void 0 : query.cacheId) || ""
|
|
63
|
+
};
|
|
64
|
+
if (query == null ? void 0 : query.ids) {
|
|
65
|
+
params.event_item_ids = (_c = query == null ? void 0 : query.ids) == null ? void 0 : _c.split(",");
|
|
66
|
+
}
|
|
67
|
+
getResourceList.run(params);
|
|
68
|
+
}, []);
|
|
65
69
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
70
|
"div",
|
|
67
71
|
{
|
|
@@ -71,6 +71,14 @@ declare const _default: {
|
|
|
71
71
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
72
72
|
'pisell2.event.schedule.item.expand': string;
|
|
73
73
|
'pisell2.event.schedule.item.collapse': string;
|
|
74
|
+
'pisell2.appointment.deposit': string;
|
|
75
|
+
'pisell2.appointment.deposit.agreed': string;
|
|
76
|
+
'pisell2.appointment.deposit.agree.policy': string;
|
|
77
|
+
'pisell2.appointment.deposit.and': string;
|
|
78
|
+
'pisell2.appointment.deposit.amount.tip1': string;
|
|
79
|
+
'pisell2.appointment.deposit.amount.tip2': string;
|
|
80
|
+
'pisell2.appointment.deposit.close': string;
|
|
81
|
+
'pisell2.appointment.booking.empty.data': string;
|
|
74
82
|
};
|
|
75
83
|
'zh-CN': {
|
|
76
84
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -144,6 +152,14 @@ declare const _default: {
|
|
|
144
152
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
145
153
|
'pisell2.event.schedule.item.expand': string;
|
|
146
154
|
'pisell2.event.schedule.item.collapse': string;
|
|
155
|
+
'pisell2.appointment.deposit': string;
|
|
156
|
+
'pisell2.appointment.deposit.agreed': string;
|
|
157
|
+
'pisell2.appointment.deposit.agree.policy': string;
|
|
158
|
+
'pisell2.appointment.deposit.and': string;
|
|
159
|
+
'pisell2.appointment.deposit.amount.tip1': string;
|
|
160
|
+
'pisell2.appointment.deposit.amount.tip2': string;
|
|
161
|
+
'pisell2.appointment.deposit.close': string;
|
|
162
|
+
'pisell2.appointment.booking.empty.data': string;
|
|
147
163
|
};
|
|
148
164
|
'zh-HK': {
|
|
149
165
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -217,6 +233,14 @@ declare const _default: {
|
|
|
217
233
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
218
234
|
'pisell2.event.schedule.item.expand': string;
|
|
219
235
|
'pisell2.event.schedule.item.collapse': string;
|
|
236
|
+
'pisell2.appointment.deposit': string;
|
|
237
|
+
'pisell2.appointment.deposit.agreed': string;
|
|
238
|
+
'pisell2.appointment.deposit.agree.policy': string;
|
|
239
|
+
'pisell2.appointment.deposit.and': string;
|
|
240
|
+
'pisell2.appointment.deposit.amount.tip1': string;
|
|
241
|
+
'pisell2.appointment.deposit.amount.tip2': string;
|
|
242
|
+
'pisell2.appointment.deposit.close': string;
|
|
243
|
+
'pisell2.appointment.booking.empty.data': string;
|
|
220
244
|
};
|
|
221
245
|
};
|
|
222
246
|
export default _default;
|
|
@@ -51,7 +51,7 @@ var locales_default = {
|
|
|
51
51
|
"pisell2.event.campus": "Campus",
|
|
52
52
|
"pisell2.event.resource": "Location",
|
|
53
53
|
"pisell2.event.booking.options": "Booking options",
|
|
54
|
-
"pisell2.event.add.to.cart": "Add to
|
|
54
|
+
"pisell2.event.add.to.cart": "Add to Cart",
|
|
55
55
|
"pisell2.event.description": "Description",
|
|
56
56
|
"pisell2.event.view.more": "View more",
|
|
57
57
|
"pisell2.event.view.less": "View less",
|
|
@@ -94,7 +94,15 @@ var locales_default = {
|
|
|
94
94
|
"pisell2.event.capacity.limit.reached.title": "Capacity limit reached",
|
|
95
95
|
"pisell2.event.capacity.limit.reached.tip": "One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.",
|
|
96
96
|
"pisell2.event.schedule.item.expand": "See more",
|
|
97
|
-
"pisell2.event.schedule.item.collapse": "See less"
|
|
97
|
+
"pisell2.event.schedule.item.collapse": "See less",
|
|
98
|
+
"pisell2.appointment.deposit": "Deposit",
|
|
99
|
+
"pisell2.appointment.deposit.agreed": "I have read and agree to the ",
|
|
100
|
+
"pisell2.appointment.deposit.agree.policy": "You need to agree the policy to proceed",
|
|
101
|
+
"pisell2.appointment.deposit.and": " & ",
|
|
102
|
+
"pisell2.appointment.deposit.amount.tip1": " needs to be paid as deposit.",
|
|
103
|
+
"pisell2.appointment.deposit.amount.tip2": " ",
|
|
104
|
+
"pisell2.appointment.deposit.close": "Close",
|
|
105
|
+
"pisell2.appointment.booking.empty.data": "No data"
|
|
98
106
|
},
|
|
99
107
|
"zh-CN": {
|
|
100
108
|
"pisell2.event.calendar.limit.unavailable": "不可预约",
|
|
@@ -124,7 +132,7 @@ var locales_default = {
|
|
|
124
132
|
"pisell2.event.campus": "校区",
|
|
125
133
|
"pisell2.event.resource": "资源",
|
|
126
134
|
"pisell2.event.booking.options": "预约选项",
|
|
127
|
-
"pisell2.event.add.to.cart": "
|
|
135
|
+
"pisell2.event.add.to.cart": "加入购物车",
|
|
128
136
|
"pisell2.event.description": "描述",
|
|
129
137
|
"pisell2.event.view.more": "查看更多",
|
|
130
138
|
"pisell2.event.view.less": "收起",
|
|
@@ -167,7 +175,15 @@ var locales_default = {
|
|
|
167
175
|
"pisell2.event.capacity.limit.reached.title": "活动名额已满",
|
|
168
176
|
"pisell2.event.capacity.limit.reached.tip": "购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。",
|
|
169
177
|
"pisell2.event.schedule.item.expand": "查看更多",
|
|
170
|
-
"pisell2.event.schedule.item.collapse": "收起"
|
|
178
|
+
"pisell2.event.schedule.item.collapse": "收起",
|
|
179
|
+
"pisell2.appointment.deposit": "定金",
|
|
180
|
+
"pisell2.appointment.deposit.agreed": "我已阅读并同意 ",
|
|
181
|
+
"pisell2.appointment.deposit.agree.policy": "您需要同意协议才能继续",
|
|
182
|
+
"pisell2.appointment.deposit.and": " 和 ",
|
|
183
|
+
"pisell2.appointment.deposit.amount.tip1": "请支付 ",
|
|
184
|
+
"pisell2.appointment.deposit.amount.tip2": " 定金。",
|
|
185
|
+
"pisell2.appointment.deposit.close": "关闭",
|
|
186
|
+
"pisell2.appointment.booking.empty.data": "暂无数据"
|
|
171
187
|
},
|
|
172
188
|
"zh-HK": {
|
|
173
189
|
"pisell2.event.calendar.limit.unavailable": "不可預約",
|
|
@@ -197,7 +213,7 @@ var locales_default = {
|
|
|
197
213
|
"pisell2.event.campus": "校區",
|
|
198
214
|
"pisell2.event.resource": "資源",
|
|
199
215
|
"pisell2.event.booking.options": "預約選項",
|
|
200
|
-
"pisell2.event.add.to.cart": "
|
|
216
|
+
"pisell2.event.add.to.cart": "加入購物車",
|
|
201
217
|
"pisell2.event.description": "描述",
|
|
202
218
|
"pisell2.event.view.more": "查看更多",
|
|
203
219
|
"pisell2.event.view.less": "收起",
|
|
@@ -240,6 +256,14 @@ var locales_default = {
|
|
|
240
256
|
"pisell2.event.capacity.limit.reached.title": "活動名額已滿",
|
|
241
257
|
"pisell2.event.capacity.limit.reached.tip": "購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。",
|
|
242
258
|
"pisell2.event.schedule.item.expand": "查看更多",
|
|
243
|
-
"pisell2.event.schedule.item.collapse": "收起"
|
|
259
|
+
"pisell2.event.schedule.item.collapse": "收起",
|
|
260
|
+
"pisell2.appointment.deposit": "定金",
|
|
261
|
+
"pisell2.appointment.deposit.agreed": "我已閱讀並同意 ",
|
|
262
|
+
"pisell2.appointment.deposit.agree.policy": "您需要同意協議才能繼續",
|
|
263
|
+
"pisell2.appointment.deposit.and": " 和 ",
|
|
264
|
+
"pisell2.appointment.deposit.amount.tip1": "請支付 ",
|
|
265
|
+
"pisell2.appointment.deposit.amount.tip2": " 定金。",
|
|
266
|
+
"pisell2.appointment.deposit.close": "关闭",
|
|
267
|
+
"pisell2.appointment.booking.empty.data": "暫無數據"
|
|
244
268
|
}
|
|
245
269
|
};
|
|
@@ -15,4 +15,6 @@ import WorkspaceListDetail from './workSpaceListDetail/';
|
|
|
15
15
|
import WorkspaceList from './workSpaceList';
|
|
16
16
|
import PisellSelectCustomerModal from './pisellSelectCustomerModal';
|
|
17
17
|
import SubTotal from './subTotal';
|
|
18
|
-
|
|
18
|
+
import StepController from './stepController';
|
|
19
|
+
import EditBookingModal from './booking/editBookingModal';
|
|
20
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, StepController, EditBookingModal };
|
package/lib/components/index.js
CHANGED
|
@@ -34,11 +34,13 @@ __export(components_exports, {
|
|
|
34
34
|
BookingForms: () => import_forms.default,
|
|
35
35
|
BookingInfo: () => import_info.default,
|
|
36
36
|
BookingNotes: () => import_notes.default,
|
|
37
|
+
EditBookingModal: () => import_editBookingModal.default,
|
|
37
38
|
Login: () => import_login.default,
|
|
38
39
|
PisellSelectCustomerModal: () => import_pisellSelectCustomerModal.default,
|
|
39
40
|
ProductExtension: () => import_productExtension.default,
|
|
40
41
|
RuleSetting: () => import_ruleSetting.default,
|
|
41
42
|
Schedules: () => import_schedules.default,
|
|
43
|
+
StepController: () => import_stepController.default,
|
|
42
44
|
SubTotal: () => import_subTotal.default,
|
|
43
45
|
TaxSelect: () => import_taxSelect.default,
|
|
44
46
|
ToCPay: () => import_toC.default,
|
|
@@ -65,6 +67,8 @@ var import_workSpaceListDetail = __toESM(require("./workSpaceListDetail/"));
|
|
|
65
67
|
var import_workSpaceList = __toESM(require("./workSpaceList"));
|
|
66
68
|
var import_pisellSelectCustomerModal = __toESM(require("./pisellSelectCustomerModal"));
|
|
67
69
|
var import_subTotal = __toESM(require("./subTotal"));
|
|
70
|
+
var import_stepController = __toESM(require("./stepController"));
|
|
71
|
+
var import_editBookingModal = __toESM(require("./booking/editBookingModal"));
|
|
68
72
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
73
|
0 && (module.exports = {
|
|
70
74
|
Booking,
|
|
@@ -72,11 +76,13 @@ var import_subTotal = __toESM(require("./subTotal"));
|
|
|
72
76
|
BookingForms,
|
|
73
77
|
BookingInfo,
|
|
74
78
|
BookingNotes,
|
|
79
|
+
EditBookingModal,
|
|
75
80
|
Login,
|
|
76
81
|
PisellSelectCustomerModal,
|
|
77
82
|
ProductExtension,
|
|
78
83
|
RuleSetting,
|
|
79
84
|
Schedules,
|
|
85
|
+
StepController,
|
|
80
86
|
SubTotal,
|
|
81
87
|
TaxSelect,
|
|
82
88
|
ToCPay,
|
|
@@ -65,7 +65,7 @@ var isOfflinePayment = (type) => {
|
|
|
65
65
|
].includes(type);
|
|
66
66
|
};
|
|
67
67
|
var PaymentMethods = (props, ref) => {
|
|
68
|
-
var _a;
|
|
68
|
+
var _a, _b, _c;
|
|
69
69
|
const MWCreditCardRef2 = (0, import_react.useRef)(null);
|
|
70
70
|
const SuperPayAliPayH5Ref2 = (0, import_react.useRef)(null);
|
|
71
71
|
const StripePayRef2 = (0, import_react.useRef)(null);
|
|
@@ -83,9 +83,9 @@ var PaymentMethods = (props, ref) => {
|
|
|
83
83
|
const context = (0, import_useEngineContext.default)();
|
|
84
84
|
const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
85
85
|
const init = async ({ type, payGroup }) => {
|
|
86
|
-
var _a2,
|
|
86
|
+
var _a2, _b2;
|
|
87
87
|
const waitAmount = (payGroup == null ? void 0 : payGroup.wait_amount) || 0;
|
|
88
|
-
const cards = (
|
|
88
|
+
const cards = (_b2 = (_a2 = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a2.cards) == null ? void 0 : _b2.length;
|
|
89
89
|
if (cards && (waitAmount <= 0 || isOfflinePayment(type))) {
|
|
90
90
|
try {
|
|
91
91
|
await (0, import_serve.walletPassPay)((0, import_utils.formatWalletPassParams)(payGroup));
|
|
@@ -115,10 +115,11 @@ var PaymentMethods = (props, ref) => {
|
|
|
115
115
|
}
|
|
116
116
|
await onPayByType({ type, payGroup });
|
|
117
117
|
};
|
|
118
|
+
console.log("paymentResult isAppEnv", (_c = (_b = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _b.isAppEnv) == null ? void 0 : _c.call(_b), interaction, context);
|
|
118
119
|
(0, import_react.useEffect)(() => {
|
|
119
|
-
var _a2,
|
|
120
|
-
console.log("paymentResult isAppEnv", (
|
|
121
|
-
if ((_d = (
|
|
120
|
+
var _a2, _b2, _c2, _d;
|
|
121
|
+
console.log("paymentResult isAppEnv", (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b2.call(_a2));
|
|
122
|
+
if ((_d = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.isAppEnv) == null ? void 0 : _d.call(_c2)) {
|
|
122
123
|
interaction.utils.mountFunction("global", "paymentResult", (strResult) => {
|
|
123
124
|
console.log("paymentResult", strResult);
|
|
124
125
|
if (!(0, import_utils2.isJson)(strResult)) return;
|
|
@@ -134,18 +135,18 @@ var PaymentMethods = (props, ref) => {
|
|
|
134
135
|
}
|
|
135
136
|
}, []);
|
|
136
137
|
const onPayByType = async ({ type, payGroup }) => {
|
|
137
|
-
var _a2,
|
|
138
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
138
139
|
console.log(type, payGroup);
|
|
139
140
|
if (type === "mw.apple") {
|
|
140
141
|
await ((_a2 = ApplePayRef2.current) == null ? void 0 : _a2.init({ payGroup }));
|
|
141
142
|
return;
|
|
142
143
|
}
|
|
143
144
|
if (type === "mw.google") {
|
|
144
|
-
await ((
|
|
145
|
+
await ((_b2 = GooglePayRef2.current) == null ? void 0 : _b2.init({ payGroup }));
|
|
145
146
|
return;
|
|
146
147
|
}
|
|
147
148
|
if (type === "mw.credit_card") {
|
|
148
|
-
(
|
|
149
|
+
(_c2 = MWCreditCardRef2.current) == null ? void 0 : _c2.init({ payGroup });
|
|
149
150
|
return;
|
|
150
151
|
}
|
|
151
152
|
if (type === "superpay.alipay.h5") {
|
|
@@ -0,0 +1,40 @@
|
|
|
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/components/Content/index.tsx
|
|
30
|
+
var Content_exports = {};
|
|
31
|
+
__export(Content_exports, {
|
|
32
|
+
default: () => Content_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Content_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_index = require("./index.less");
|
|
37
|
+
var Content = ({ children }) => {
|
|
38
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-step-controller-content" }, children);
|
|
39
|
+
};
|
|
40
|
+
var Content_default = Content;
|
|
@@ -0,0 +1,49 @@
|
|
|
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/components/Footer/index.tsx
|
|
30
|
+
var Footer_exports = {};
|
|
31
|
+
__export(Footer_exports, {
|
|
32
|
+
default: () => Footer_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Footer_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var Footer = ({ isMobile, children }) => {
|
|
39
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
className: (0, import_classnames.default)("pisell-step-controller-footer-wrap", {
|
|
43
|
+
"pisell-step-controller-footer-wrap-mobile": isMobile
|
|
44
|
+
})
|
|
45
|
+
},
|
|
46
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-step-controller-footer" }, children)
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
var Footer_default = Footer;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.pisell-step-controller-footer-wrap {
|
|
2
|
+
position: sticky;
|
|
3
|
+
left: 0;
|
|
4
|
+
right: 0;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
background: #fff;
|
|
8
|
+
// box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
|
|
9
|
+
padding: 24px;
|
|
10
|
+
z-index: 100;
|
|
11
|
+
border-top: 1px solid var(--Gray-100, #f2f4f7);
|
|
12
|
+
|
|
13
|
+
.pisell-step-controller-footer {
|
|
14
|
+
width: 1000px;
|
|
15
|
+
margin: 0 auto;
|
|
16
|
+
max-width: 100%;
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: 12px;
|
|
19
|
+
justify-content: flex-end;
|
|
20
|
+
|
|
21
|
+
.pisell-section-headers-main {
|
|
22
|
+
color: var(--Gray-900, #101828);
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
font-weight: 400;
|
|
25
|
+
line-height: 20px;
|
|
26
|
+
justify-content: start;
|
|
27
|
+
|
|
28
|
+
.select-text {
|
|
29
|
+
font-size: 18px;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
line-height: 24px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.pisell-step-controller-footer-wrap-mobile {
|
|
38
|
+
border-top: 1px solid #eaecf0;
|
|
39
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Step } from '../../types';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface HeaderProps {
|
|
5
|
+
steps: Step[];
|
|
6
|
+
currentStepIndex: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
onBack?: (key: string) => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
confirmCloseProps?: {
|
|
12
|
+
isConfirmClose?: boolean;
|
|
13
|
+
title?: string;
|
|
14
|
+
content?: string;
|
|
15
|
+
okText?: string;
|
|
16
|
+
cancelText?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
declare const Header: React.FC<HeaderProps>;
|
|
20
|
+
export default Header;
|
|
@@ -0,0 +1,104 @@
|
|
|
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/components/Header/index.tsx
|
|
30
|
+
var Header_exports = {};
|
|
31
|
+
__export(Header_exports, {
|
|
32
|
+
default: () => Header_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Header_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var Header = ({
|
|
40
|
+
steps,
|
|
41
|
+
currentStepIndex,
|
|
42
|
+
style,
|
|
43
|
+
onBack,
|
|
44
|
+
onClose,
|
|
45
|
+
confirmCloseProps
|
|
46
|
+
}) => {
|
|
47
|
+
var _a;
|
|
48
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
49
|
+
const handleClose = () => {
|
|
50
|
+
if (confirmCloseProps == null ? void 0 : confirmCloseProps.isConfirmClose) {
|
|
51
|
+
setOpen(true);
|
|
52
|
+
} else {
|
|
53
|
+
onClose == null ? void 0 : onClose();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const handleOk = () => {
|
|
57
|
+
setOpen(false);
|
|
58
|
+
onClose == null ? void 0 : onClose();
|
|
59
|
+
};
|
|
60
|
+
const handleBack = () => {
|
|
61
|
+
if (!steps) return;
|
|
62
|
+
if (currentStepIndex > 0) {
|
|
63
|
+
const prevKey = steps[currentStepIndex - 1].key;
|
|
64
|
+
onBack == null ? void 0 : onBack(prevKey);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
68
|
+
import_materials.PisellHeaderProgressBar,
|
|
69
|
+
{
|
|
70
|
+
className: "pisell-step-controller-header",
|
|
71
|
+
style,
|
|
72
|
+
stepText: import_utils.locales.getText("pisell2.step.controller.step")(
|
|
73
|
+
currentStepIndex + 1
|
|
74
|
+
),
|
|
75
|
+
title: (_a = steps == null ? void 0 : steps[currentStepIndex]) == null ? void 0 : _a.description,
|
|
76
|
+
showClose: true,
|
|
77
|
+
onBack: handleBack,
|
|
78
|
+
onClose: handleClose,
|
|
79
|
+
enableBorder: true,
|
|
80
|
+
borderColor: "#EAECF0",
|
|
81
|
+
showBack: currentStepIndex > 0 || false
|
|
82
|
+
}
|
|
83
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
84
|
+
import_materials.PisellModal.Information,
|
|
85
|
+
{
|
|
86
|
+
open,
|
|
87
|
+
title: (confirmCloseProps == null ? void 0 : confirmCloseProps.title) || "",
|
|
88
|
+
describe: (confirmCloseProps == null ? void 0 : confirmCloseProps.content) || "",
|
|
89
|
+
okText: (confirmCloseProps == null ? void 0 : confirmCloseProps.okText) || "",
|
|
90
|
+
cancelText: (confirmCloseProps == null ? void 0 : confirmCloseProps.cancelText) || "",
|
|
91
|
+
closable: true,
|
|
92
|
+
okButtonProps: {
|
|
93
|
+
style: {
|
|
94
|
+
backgroundColor: "#D92D20"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
onCancel: () => {
|
|
98
|
+
setOpen(false);
|
|
99
|
+
},
|
|
100
|
+
onOk: () => handleOk()
|
|
101
|
+
}
|
|
102
|
+
));
|
|
103
|
+
};
|
|
104
|
+
var Header_default = Header;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.pisell-step-controller-header {
|
|
2
|
+
.pisell-section-headers-content {
|
|
3
|
+
width: 1000px;
|
|
4
|
+
margin: 0 auto;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
|
|
7
|
+
.pisell-section-headers-main {
|
|
8
|
+
color: var(--Gray-900, #101828);
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
line-height: 20px;
|
|
12
|
+
justify-content: start;
|
|
13
|
+
|
|
14
|
+
.select-text {
|
|
15
|
+
font-size: 18px;
|
|
16
|
+
font-weight: 600;
|
|
17
|
+
line-height: 24px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|