@pisell/private-materials 3.3.73 → 3.3.75
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 +13 -13
- 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 +7 -7
- package/es/businessModel/SalesModel/Sales/index.js +37 -4
- 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/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Header/index.js +8 -14
- package/es/components/appointmentBooking/components/Services/index.js +24 -15
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
- package/es/components/eventBooking/components/bookingDetailModal/index.js +19 -3
- package/es/components/eventBooking/index.js +21 -7
- package/es/components/eventBooking/locales.js +3 -3
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/listComponent/index.js +5 -5
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- 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/hooks/useComponents.js +1 -1
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/hooks/useWindowSize.js +26 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/Sales/index.js +22 -8
- 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/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Header/index.js +2 -3
- package/lib/components/appointmentBooking/components/Services/index.js +16 -7
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +9 -3
- package/lib/components/eventBooking/index.js +11 -7
- package/lib/components/eventBooking/locales.js +3 -3
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- 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/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.js +51 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/step-controller/meta.ts +88 -0
- package/package.json +3 -3
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "
|
|
177
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "
|
|
311
|
+
status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|
|
@@ -48,6 +48,7 @@ var Event = () => {
|
|
|
48
48
|
const { onOpenEventDetail, open } = (0, import_Sales.useEventDetail)();
|
|
49
49
|
const [lists, setLists] = (0, import_react.useState)();
|
|
50
50
|
const customer = (0, import_useLoginUser.default)();
|
|
51
|
+
const { appUtils } = (0, import_Sales.useCustomer)();
|
|
51
52
|
(0, import_react.useEffect)(() => {
|
|
52
53
|
var _a2;
|
|
53
54
|
const eventList = (eventData == null ? void 0 : eventData.eventList) || [];
|
|
@@ -59,16 +60,22 @@ var Event = () => {
|
|
|
59
60
|
}
|
|
60
61
|
}, [eventData == null ? void 0 : eventData.eventList]);
|
|
61
62
|
(0, import_react.useEffect)(() => {
|
|
62
|
-
var _a2, _b2;
|
|
63
|
+
var _a2, _b2, _c, _d, _e;
|
|
63
64
|
const id = (_b2 = (_a2 = data == null ? void 0 : data.resourceData) == null ? void 0 : _a2.currentResourceItem) == null ? void 0 : _b2.id;
|
|
64
65
|
if (!id) return;
|
|
65
|
-
|
|
66
|
+
const history = ((_c = appUtils == null ? void 0 : appUtils.getHistory) == null ? void 0 : _c.call(appUtils)) || {};
|
|
67
|
+
const query = (_d = history == null ? void 0 : history.location) == null ? void 0 : _d.query;
|
|
68
|
+
const params = {
|
|
66
69
|
event_item_resource_id: id,
|
|
67
70
|
skip: 1,
|
|
68
71
|
num: 100,
|
|
69
72
|
customer_id: customer == null ? void 0 : customer.id,
|
|
70
73
|
open_quotation: 1
|
|
71
|
-
}
|
|
74
|
+
};
|
|
75
|
+
if (query == null ? void 0 : query.ids) {
|
|
76
|
+
params.ids = (_e = query == null ? void 0 : query.ids) == null ? void 0 : _e.split(",");
|
|
77
|
+
}
|
|
78
|
+
getEventList.run(params);
|
|
72
79
|
}, [(_b = (_a = data == null ? void 0 : data.resourceData) == null ? void 0 : _a.currentResourceItem) == null ? void 0 : _b.id, customer == null ? void 0 : customer.id]);
|
|
73
80
|
const handleClick = (item) => {
|
|
74
81
|
selectEvent(item);
|
|
@@ -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;
|
|
@@ -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
|
{
|
|
@@ -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",
|
|
@@ -124,7 +124,7 @@ var locales_default = {
|
|
|
124
124
|
"pisell2.event.campus": "校区",
|
|
125
125
|
"pisell2.event.resource": "资源",
|
|
126
126
|
"pisell2.event.booking.options": "预约选项",
|
|
127
|
-
"pisell2.event.add.to.cart": "
|
|
127
|
+
"pisell2.event.add.to.cart": "加入购物车",
|
|
128
128
|
"pisell2.event.description": "描述",
|
|
129
129
|
"pisell2.event.view.more": "查看更多",
|
|
130
130
|
"pisell2.event.view.less": "收起",
|
|
@@ -197,7 +197,7 @@ var locales_default = {
|
|
|
197
197
|
"pisell2.event.campus": "校區",
|
|
198
198
|
"pisell2.event.resource": "資源",
|
|
199
199
|
"pisell2.event.booking.options": "預約選項",
|
|
200
|
-
"pisell2.event.add.to.cart": "
|
|
200
|
+
"pisell2.event.add.to.cart": "加入購物車",
|
|
201
201
|
"pisell2.event.description": "描述",
|
|
202
202
|
"pisell2.event.view.more": "查看更多",
|
|
203
203
|
"pisell2.event.view.less": "收起",
|
|
@@ -15,4 +15,5 @@ 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
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, StepController, };
|
package/lib/components/index.js
CHANGED
|
@@ -39,6 +39,7 @@ __export(components_exports, {
|
|
|
39
39
|
ProductExtension: () => import_productExtension.default,
|
|
40
40
|
RuleSetting: () => import_ruleSetting.default,
|
|
41
41
|
Schedules: () => import_schedules.default,
|
|
42
|
+
StepController: () => import_stepController.default,
|
|
42
43
|
SubTotal: () => import_subTotal.default,
|
|
43
44
|
TaxSelect: () => import_taxSelect.default,
|
|
44
45
|
ToCPay: () => import_toC.default,
|
|
@@ -65,6 +66,7 @@ var import_workSpaceListDetail = __toESM(require("./workSpaceListDetail/"));
|
|
|
65
66
|
var import_workSpaceList = __toESM(require("./workSpaceList"));
|
|
66
67
|
var import_pisellSelectCustomerModal = __toESM(require("./pisellSelectCustomerModal"));
|
|
67
68
|
var import_subTotal = __toESM(require("./subTotal"));
|
|
69
|
+
var import_stepController = __toESM(require("./stepController"));
|
|
68
70
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
71
|
0 && (module.exports = {
|
|
70
72
|
Booking,
|
|
@@ -77,6 +79,7 @@ var import_subTotal = __toESM(require("./subTotal"));
|
|
|
77
79
|
ProductExtension,
|
|
78
80
|
RuleSetting,
|
|
79
81
|
Schedules,
|
|
82
|
+
StepController,
|
|
80
83
|
SubTotal,
|
|
81
84
|
TaxSelect,
|
|
82
85
|
ToCPay,
|
|
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
|
|
|
17
17
|
export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
|
|
18
18
|
export declare const saveConfirm: () => Promise<{
|
|
19
19
|
destroy: () => void;
|
|
20
|
-
update: (configUpdate: import("antd
|
|
20
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
21
21
|
}>;
|
|
22
22
|
export { modal };
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/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;
|