@pisell/private-materials 3.3.49 → 3.3.51
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 +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/assets/resource.svg +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Resource/index.js +44 -5
- package/es/components/appointmentBooking/hooks.js +218 -177
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.js +14 -2
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- 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/components/drawer/index.js +4 -2
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +25 -17
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/client/index.js +2 -1
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/pet/index.js +3 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +27 -27
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +3 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +3 -3
- package/es/components/booking/info2/service/addService/utils.js +48 -52
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/index.js +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +9 -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.d.ts +10 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +23 -4
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- 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/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
- 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/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/TabProduct/index.js +28 -10
- package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
- package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
- package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
- package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/es/components/productSelect/components/pisellPriceText/index.js +43 -0
- package/es/components/productSelect/components/productGroup/index.js +20 -7
- package/es/components/productSelect/components/productGroup/index.less +14 -1
- package/es/components/productSelect/index.less +1 -2
- package/es/components/ruleSetting/index.d.ts +1 -0
- 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.d.ts +9 -1
- 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.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +16 -10
- package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/es/components/ticketBooking/index.js +2 -1
- package/es/components/ticketBooking/locales.d.ts +3 -0
- package/es/components/ticketBooking/locales.js +12 -3
- package/es/components/ticketBooking/utils/index.d.ts +5 -1
- package/es/components/ticketBooking/utils/index.js +35 -3
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/model.d.ts +9 -1
- package/es/hooks/useComponents.js +1 -1
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/assets/resource.svg +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Resource/index.js +44 -5
- package/lib/components/appointmentBooking/hooks.js +12 -3
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +3 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
- package/lib/components/booking/components/drawer/index.js +2 -2
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +31 -27
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/client/index.js +2 -1
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/pet/index.js +3 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info/utils.js +37 -1
- package/lib/components/booking/info2/index.js +7 -4
- package/lib/components/booking/info2/service/addService/utils.d.ts +3 -3
- package/lib/components/booking/info2/service/addService/utils.js +20 -13
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/index.js +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +18 -8
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.js +19 -6
- package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
- package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
- package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
- package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/lib/components/productSelect/components/pisellPriceText/index.js +72 -0
- package/lib/components/productSelect/components/productGroup/index.js +24 -4
- package/lib/components/productSelect/components/productGroup/index.less +14 -1
- package/lib/components/productSelect/index.less +1 -2
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +28 -15
- package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/lib/components/ticketBooking/index.js +2 -1
- package/lib/components/ticketBooking/locales.d.ts +3 -0
- package/lib/components/ticketBooking/locales.js +6 -3
- package/lib/components/ticketBooking/utils/index.d.ts +5 -1
- package/lib/components/ticketBooking/utils/index.js +35 -3
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/model.d.ts +9 -1
- package/package.json +2 -2
|
@@ -35,7 +35,6 @@ module.exports = __toCommonJS(addService_exports);
|
|
|
35
35
|
var import_utils = require("@pisell/utils");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_ahooks = require("ahooks");
|
|
38
|
-
var import_materials = require("@pisell/materials");
|
|
39
38
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
40
39
|
var import_utils2 = require("../../../booking/utils");
|
|
41
40
|
var import_utils3 = require("../../../booking/info2/service/addService/utils");
|
|
@@ -49,13 +48,14 @@ var import_index = require("./index.less");
|
|
|
49
48
|
var import_utils6 = require("../../utils");
|
|
50
49
|
var import_notAvailable = __toESM(require("../notAvailable"));
|
|
51
50
|
var AddSerivce = (props) => {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
53
52
|
const { onEdit, state, dispatch, renderMode = "current" } = props;
|
|
54
|
-
const [loading, setLoading] = (0, import_react.useState)(
|
|
53
|
+
const [loading, setLoading] = (0, import_react.useState)(true);
|
|
55
54
|
const context = (0, import_useEngineContext.default)();
|
|
56
55
|
const notAvailableRef = (0, import_react.useRef)(null);
|
|
57
56
|
const isLoadedServiceRef = (0, import_react.useRef)(false);
|
|
58
57
|
import_utils2.request.setRequest(context.appHelper.utils.request);
|
|
58
|
+
const Toast = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.Toast;
|
|
59
59
|
const { createBookingData, createBooking } = (0, import_serviceManager.useService)({
|
|
60
60
|
renderMode,
|
|
61
61
|
onEdit,
|
|
@@ -63,18 +63,18 @@ var AddSerivce = (props) => {
|
|
|
63
63
|
dispatch
|
|
64
64
|
});
|
|
65
65
|
const isBooking4 = (0, import_utils5.isBooking4Shop)(
|
|
66
|
-
(
|
|
66
|
+
(_g = (_f = (_e = (_d = (_c = context.appHelper.utils.store) == null ? void 0 : _c.getState) == null ? void 0 : _d.call(_c)) == null ? void 0 : _e.global) == null ? void 0 : _f.globalConfig) == null ? void 0 : _g.id,
|
|
67
67
|
state == null ? void 0 : state.renderType
|
|
68
68
|
);
|
|
69
69
|
const [currentProduct, setCurrentProduct] = (0, import_react.useState)(null);
|
|
70
70
|
const menuList = (0, import_react.useMemo)(() => {
|
|
71
71
|
var _a2, _b2, _c2;
|
|
72
72
|
return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.menu_list_tab) == null ? void 0 : _c2.menu_list) || [];
|
|
73
|
-
}, [(
|
|
73
|
+
}, [(_h = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _h.config]);
|
|
74
74
|
const customerId = (0, import_react.useMemo)(() => {
|
|
75
75
|
var _a2, _b2;
|
|
76
76
|
return ((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id) || void 0;
|
|
77
|
-
}, [(
|
|
77
|
+
}, [(_j = (_i = state.client) == null ? void 0 : _i.value) == null ? void 0 : _j.id]);
|
|
78
78
|
const setDefaultService = async (list) => {
|
|
79
79
|
if (state.renderType !== "eventBooking") {
|
|
80
80
|
return;
|
|
@@ -130,7 +130,9 @@ var AddSerivce = (props) => {
|
|
|
130
130
|
acc[cur.id] = cur;
|
|
131
131
|
return acc;
|
|
132
132
|
}, {});
|
|
133
|
-
const newValue = (((_c2 = state.service) == null ? void 0 : _c2.value) || []).filter(
|
|
133
|
+
const newValue = (((_c2 = state.service) == null ? void 0 : _c2.value) || []).filter(
|
|
134
|
+
(item) => listMap[item.product_id]
|
|
135
|
+
);
|
|
134
136
|
dispatch({
|
|
135
137
|
type: "setService",
|
|
136
138
|
payload: {
|
|
@@ -227,7 +229,7 @@ var AddSerivce = (props) => {
|
|
|
227
229
|
setCurrentProduct(null);
|
|
228
230
|
},
|
|
229
231
|
callback: async (e, extension_type, detail) => {
|
|
230
|
-
var _a2;
|
|
232
|
+
var _a2, _b2;
|
|
231
233
|
setCurrentProduct(null);
|
|
232
234
|
if (lock) {
|
|
233
235
|
return;
|
|
@@ -271,16 +273,27 @@ var AddSerivce = (props) => {
|
|
|
271
273
|
if (renderMode === "current") {
|
|
272
274
|
cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
|
|
273
275
|
}
|
|
274
|
-
cacheItem = (0, import_utils3.getProductExtend)({
|
|
276
|
+
cacheItem = (0, import_utils3.getProductExtend)({
|
|
277
|
+
cacheItem,
|
|
278
|
+
state,
|
|
279
|
+
isDisabledTime: true
|
|
280
|
+
});
|
|
275
281
|
if (state.renderType === "eventBooking") {
|
|
276
282
|
cacheItem.autoClose = false;
|
|
277
283
|
}
|
|
278
284
|
if (cacheItem.autoClose) {
|
|
279
285
|
cacheItem.autoClose = false;
|
|
280
|
-
let _list = (0, import_utils6.addService)(
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
286
|
+
let { list: _list, quantity } = (0, import_utils6.addService)(
|
|
287
|
+
state.service.value,
|
|
288
|
+
cacheItem
|
|
289
|
+
);
|
|
290
|
+
(_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
|
|
291
|
+
Toast,
|
|
292
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
|
|
293
|
+
quantity || 1
|
|
294
|
+
)))
|
|
295
|
+
);
|
|
296
|
+
(0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
|
|
284
297
|
dispatch({
|
|
285
298
|
type: "setService",
|
|
286
299
|
payload: {
|
|
@@ -317,7 +330,7 @@ var AddSerivce = (props) => {
|
|
|
317
330
|
}
|
|
318
331
|
}
|
|
319
332
|
return _list;
|
|
320
|
-
}, [(
|
|
333
|
+
}, [(_k = state.service) == null ? void 0 : _k.services, state == null ? void 0 : state.activeCartId]);
|
|
321
334
|
const currentDate = (0, import_react.useMemo)(() => {
|
|
322
335
|
return state.date.value.format("YYYY-MM-DD");
|
|
323
336
|
}, [state.date.value]);
|
|
@@ -360,7 +373,7 @@ var AddSerivce = (props) => {
|
|
|
360
373
|
}
|
|
361
374
|
return null;
|
|
362
375
|
}, [
|
|
363
|
-
(
|
|
376
|
+
(_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m.autoClose,
|
|
364
377
|
state.service.addModal,
|
|
365
378
|
import_utils.locales,
|
|
366
379
|
renderList,
|
|
@@ -277,6 +277,7 @@ var TicketBooking = () => {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
+
_modalState.service.value = [];
|
|
280
281
|
_modalState.service.cacheItem = null;
|
|
281
282
|
_modalState.service.addTimeModal = false;
|
|
282
283
|
_modalState.service.changeService = false;
|
|
@@ -761,7 +762,8 @@ var TicketBooking = () => {
|
|
|
761
762
|
locale: engineProps.locale,
|
|
762
763
|
refreshData: _refreshData,
|
|
763
764
|
setActiveTab: _setActiveTab,
|
|
764
|
-
clearAllValue: _clearAllValue
|
|
765
|
+
clearAllValue: _clearAllValue,
|
|
766
|
+
drawerMask: true
|
|
765
767
|
},
|
|
766
768
|
setGlobalState: _setModalState,
|
|
767
769
|
setState,
|
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_miniRedux = require("./miniRedux");
|
|
37
37
|
var import_utils = require("@pisell/utils");
|
|
38
38
|
var import_dayjs = __toESM(require("dayjs"));
|
|
39
|
+
var import_lodash = require("lodash");
|
|
39
40
|
var import_ticketBooking = __toESM(require("./components/ticketBooking/index"));
|
|
40
41
|
var import_utils2 = require("../../utils");
|
|
41
42
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
@@ -186,7 +187,7 @@ var ticketBooking_default = (props) => {
|
|
|
186
187
|
import_utils2.request.setRequest(context.appHelper.utils.request);
|
|
187
188
|
}, []);
|
|
188
189
|
(0, import_react.useMemo)(() => {
|
|
189
|
-
const store = (0, import_miniRedux.createStore)({ ...initialState, bookingConfigParams, productExtensionType });
|
|
190
|
+
const store = (0, import_miniRedux.createStore)({ ...(0, import_lodash.cloneDeep)(initialState), bookingConfigParams, productExtensionType });
|
|
190
191
|
storeRef.current = store;
|
|
191
192
|
}, []);
|
|
192
193
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-ticket-booking-wrapper" }, /* @__PURE__ */ import_react.default.createElement(import_menuBar.default, null), /* @__PURE__ */ import_react.default.createElement(import_miniRedux.Provider, { store: storeRef.current }, /* @__PURE__ */ import_react.default.createElement(import_ticketBooking.default, null)));
|
|
@@ -47,6 +47,7 @@ declare const _default: {
|
|
|
47
47
|
"pisell2.ticket-booking.add-to-cart": string;
|
|
48
48
|
"pisell2.ticket-booking.not-available-title": string;
|
|
49
49
|
"pisell2.ticket-booking.not-available-ok": string;
|
|
50
|
+
"pisell2.ticket-booking.in-cart": (number: number) => string;
|
|
50
51
|
};
|
|
51
52
|
"zh-CN": {
|
|
52
53
|
"pisell2.ticket-booking.info": string;
|
|
@@ -96,6 +97,7 @@ declare const _default: {
|
|
|
96
97
|
"pisell2.ticket-booking.add-to-cart": string;
|
|
97
98
|
"pisell2.ticket-booking.not-available-title": string;
|
|
98
99
|
"pisell2.ticket-booking.not-available-ok": string;
|
|
100
|
+
"pisell2.ticket-booking.in-cart": (number: number) => string;
|
|
99
101
|
};
|
|
100
102
|
"zh-HK": {
|
|
101
103
|
"pisell2.ticket-booking.info": string;
|
|
@@ -145,6 +147,7 @@ declare const _default: {
|
|
|
145
147
|
"pisell2.ticket-booking.add-to-cart": string;
|
|
146
148
|
"pisell2.ticket-booking.not-available-title": string;
|
|
147
149
|
"pisell2.ticket-booking.not-available-ok": string;
|
|
150
|
+
"pisell2.ticket-booking.in-cart": (number: number) => string;
|
|
148
151
|
};
|
|
149
152
|
};
|
|
150
153
|
export default _default;
|
|
@@ -70,7 +70,8 @@ var locales_default = {
|
|
|
70
70
|
"pisell2.ticket-booking.create-new": "Create new",
|
|
71
71
|
"pisell2.ticket-booking.add-to-cart": "Added to Cart",
|
|
72
72
|
"pisell2.ticket-booking.not-available-title": "Sorry, Not available at current time.",
|
|
73
|
-
"pisell2.ticket-booking.not-available-ok": "OK"
|
|
73
|
+
"pisell2.ticket-booking.not-available-ok": "OK",
|
|
74
|
+
"pisell2.ticket-booking.in-cart": (number) => `${number} in cart`
|
|
74
75
|
},
|
|
75
76
|
"zh-CN": {
|
|
76
77
|
"pisell2.ticket-booking.info": "信息",
|
|
@@ -119,7 +120,8 @@ var locales_default = {
|
|
|
119
120
|
"pisell2.ticket-booking.create-new": "新建",
|
|
120
121
|
"pisell2.ticket-booking.add-to-cart": "已加入购物车",
|
|
121
122
|
"pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售时间。",
|
|
122
|
-
"pisell2.ticket-booking.not-available-ok": "好的"
|
|
123
|
+
"pisell2.ticket-booking.not-available-ok": "好的",
|
|
124
|
+
"pisell2.ticket-booking.in-cart": (number) => `已有${number}件`
|
|
123
125
|
},
|
|
124
126
|
"zh-HK": {
|
|
125
127
|
"pisell2.ticket-booking.info": "資訊",
|
|
@@ -168,6 +170,7 @@ var locales_default = {
|
|
|
168
170
|
"pisell2.ticket-booking.create-new": "新建",
|
|
169
171
|
"pisell2.ticket-booking.add-to-cart": "已加入购物车",
|
|
170
172
|
"pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售時間。",
|
|
171
|
-
"pisell2.ticket-booking.not-available-ok": "好的"
|
|
173
|
+
"pisell2.ticket-booking.not-available-ok": "好的",
|
|
174
|
+
"pisell2.ticket-booking.in-cart": (number) => `已有${number}件`
|
|
172
175
|
}
|
|
173
176
|
};
|
|
@@ -12,4 +12,8 @@ export declare const restoreProductOtherData: (data: any) => {
|
|
|
12
12
|
product_variant_id: number;
|
|
13
13
|
quantity: number;
|
|
14
14
|
} | undefined;
|
|
15
|
-
export declare const addService: (list: any[], addItem: any) =>
|
|
15
|
+
export declare const addService: (list: any[], addItem: any) => {
|
|
16
|
+
list: any[];
|
|
17
|
+
quantity: any;
|
|
18
|
+
};
|
|
19
|
+
export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
|
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var utils_exports = {};
|
|
31
31
|
__export(utils_exports, {
|
|
32
32
|
addService: () => addService,
|
|
33
|
+
addServiceScroll: () => addServiceScroll,
|
|
33
34
|
formatBookingList: () => formatBookingList,
|
|
34
35
|
formatDateToStr: () => formatDateToStr,
|
|
35
36
|
getDefaultStartParam: () => getDefaultStartParam,
|
|
@@ -128,19 +129,27 @@ var isSameProduct = (a, b) => {
|
|
|
128
129
|
};
|
|
129
130
|
var addService = (list, addItem) => {
|
|
130
131
|
let value = list;
|
|
132
|
+
let count;
|
|
131
133
|
if (!(0, import_utils.isNormalProductByDurationSchedule)(addItem)) {
|
|
132
134
|
value.push(addItem);
|
|
135
|
+
count = addItem._extend.quantity;
|
|
133
136
|
} else {
|
|
134
137
|
let isNotSame = true;
|
|
135
138
|
value = list.map((item) => {
|
|
136
|
-
var _a, _b;
|
|
139
|
+
var _a, _b, _c;
|
|
137
140
|
if (isSameProduct(item, addItem)) {
|
|
138
141
|
isNotSame = false;
|
|
142
|
+
const quantity = (((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.quantity) || 1) + (((_b = addItem == null ? void 0 : addItem._extend) == null ? void 0 : _b.quantity) || 1);
|
|
143
|
+
count = quantity;
|
|
139
144
|
return {
|
|
140
145
|
...item,
|
|
141
146
|
_extend: {
|
|
142
147
|
...item._extend,
|
|
143
|
-
quantity
|
|
148
|
+
quantity,
|
|
149
|
+
other: {
|
|
150
|
+
...((_c = item._extend) == null ? void 0 : _c.other) || {},
|
|
151
|
+
quantity
|
|
152
|
+
}
|
|
144
153
|
}
|
|
145
154
|
};
|
|
146
155
|
}
|
|
@@ -148,13 +157,36 @@ var addService = (list, addItem) => {
|
|
|
148
157
|
});
|
|
149
158
|
if (isNotSame) {
|
|
150
159
|
value.push(addItem);
|
|
160
|
+
count = addItem._extend.quantity;
|
|
151
161
|
}
|
|
152
162
|
}
|
|
153
|
-
return value;
|
|
163
|
+
return { list: value, quantity: count };
|
|
164
|
+
};
|
|
165
|
+
var addServiceScroll = (rowKey, cacheItem) => {
|
|
166
|
+
const list = document.querySelectorAll(`#rowKey-${rowKey}`);
|
|
167
|
+
setTimeout(() => {
|
|
168
|
+
if (list.length && (0, import_utils.isNormalProductByDurationSchedule)(cacheItem)) {
|
|
169
|
+
list[list.length - 1].scrollIntoView({
|
|
170
|
+
behavior: "smooth",
|
|
171
|
+
block: "center"
|
|
172
|
+
});
|
|
173
|
+
} else {
|
|
174
|
+
setTimeout(() => {
|
|
175
|
+
const bookingWrap = document.querySelectorAll(`.booking-info-warp`);
|
|
176
|
+
if (bookingWrap.length) {
|
|
177
|
+
bookingWrap[0].scrollTo({
|
|
178
|
+
top: 99999,
|
|
179
|
+
behavior: "smooth"
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}, 100);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
154
185
|
};
|
|
155
186
|
// Annotate the CommonJS export names for ESM import in node:
|
|
156
187
|
0 && (module.exports = {
|
|
157
188
|
addService,
|
|
189
|
+
addServiceScroll,
|
|
158
190
|
formatBookingList,
|
|
159
191
|
formatDateToStr,
|
|
160
192
|
getDefaultStartParam,
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
addWalletCard: any;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
walletDetailState: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
+
state: RechargeState;
|
|
8
|
+
} & {
|
|
9
|
+
dispatch: (params: {
|
|
10
|
+
type: string;
|
|
11
|
+
payload: any;
|
|
12
|
+
}) => void;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
selectedGiftOptionId: string | null;
|
|
4
|
+
cardList: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
price: number;
|
|
8
|
+
}>;
|
|
9
|
+
selectedItem: {
|
|
10
|
+
id?: string;
|
|
11
|
+
gift_price?: number;
|
|
12
|
+
price?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
variant_id?: string;
|
|
15
|
+
};
|
|
16
|
+
productId?: string;
|
|
17
|
+
detailId?: string;
|
|
18
|
+
total: string | number;
|
|
19
|
+
rechargeModalOpen: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
+
state: RechargeState;
|
|
23
|
+
} & {
|
|
24
|
+
dispatch: (params: {
|
|
25
|
+
type: string;
|
|
26
|
+
payload: any;
|
|
27
|
+
}) => void;
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: 0;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IWalletListItemProps } from './serve';
|
|
2
3
|
export interface WalletCardItemProps {
|
|
3
4
|
id: string;
|
|
@@ -26,4 +27,11 @@ export interface WalletListProps {
|
|
|
26
27
|
currentSearchListItemCode?: string;
|
|
27
28
|
[key: string]: any;
|
|
28
29
|
}
|
|
29
|
-
export declare const Provider: any, Context:
|
|
30
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
31
|
+
global_wallet: WalletListProps;
|
|
32
|
+
} & {
|
|
33
|
+
dispatch: (params: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.51",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
62
|
"@pisell/utils": "1.0.42",
|
|
63
63
|
"@pisell/icon": "0.0.11",
|
|
64
|
-
"@pisell/materials": "3.3.
|
|
64
|
+
"@pisell/materials": "3.3.19",
|
|
65
65
|
"@pisell/date-picker": "3.0.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|