@pisell/private-materials 3.3.66 → 3.3.67
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.js +7 -7
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +1 -120
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/components/walletList/index.js +7 -55
- package/es/components/walletList/serve.d.ts +0 -8
- package/es/components/walletList/serve.js +0 -38
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -120
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/components/walletList/index.js +14 -42
- package/lib/components/walletList/serve.d.ts +0 -8
- package/lib/components/walletList/serve.js +2 -15
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -1
- package/package.json +3 -3
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -53
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/es/components/walletList/locales.d.ts +0 -18
- package/es/components/walletList/locales.js +0 -17
- package/es/components/walletList/status.d.ts +0 -38
- package/es/components/walletList/status.js +0 -47
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -76
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
- package/lib/components/walletList/locales.d.ts +0 -18
- package/lib/components/walletList/locales.js +0 -41
- package/lib/components/walletList/status.d.ts +0 -38
- package/lib/components/walletList/status.js +0 -66
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "page" | "success" | "
|
|
12
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "page" | "success" | "
|
|
14
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -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;
|
|
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, _b;
|
|
87
87
|
const waitAmount = (payGroup == null ? void 0 : payGroup.wait_amount) || 0;
|
|
88
|
-
const cards = (
|
|
88
|
+
const cards = (_b = (_a2 = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a2.cards) == null ? void 0 : _b.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,11 +115,10 @@ 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);
|
|
119
118
|
(0, import_react.useEffect)(() => {
|
|
120
|
-
var _a2,
|
|
121
|
-
console.log("paymentResult isAppEnv", (
|
|
122
|
-
if ((_d = (
|
|
119
|
+
var _a2, _b, _c, _d;
|
|
120
|
+
console.log("paymentResult isAppEnv", (_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2));
|
|
121
|
+
if ((_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.isAppEnv) == null ? void 0 : _d.call(_c)) {
|
|
123
122
|
interaction.utils.mountFunction("global", "paymentResult", (strResult) => {
|
|
124
123
|
console.log("paymentResult", strResult);
|
|
125
124
|
if (!(0, import_utils2.isJson)(strResult)) return;
|
|
@@ -135,18 +134,18 @@ var PaymentMethods = (props, ref) => {
|
|
|
135
134
|
}
|
|
136
135
|
}, []);
|
|
137
136
|
const onPayByType = async ({ type, payGroup }) => {
|
|
138
|
-
var _a2,
|
|
137
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
139
138
|
console.log(type, payGroup);
|
|
140
139
|
if (type === "mw.apple") {
|
|
141
140
|
await ((_a2 = ApplePayRef2.current) == null ? void 0 : _a2.init({ payGroup }));
|
|
142
141
|
return;
|
|
143
142
|
}
|
|
144
143
|
if (type === "mw.google") {
|
|
145
|
-
await ((
|
|
144
|
+
await ((_b = GooglePayRef2.current) == null ? void 0 : _b.init({ payGroup }));
|
|
146
145
|
return;
|
|
147
146
|
}
|
|
148
147
|
if (type === "mw.credit_card") {
|
|
149
|
-
(
|
|
148
|
+
(_c = MWCreditCardRef2.current) == null ? void 0 : _c.init({ payGroup });
|
|
150
149
|
return;
|
|
151
150
|
}
|
|
152
151
|
if (type === "superpay.alipay.h5") {
|
|
@@ -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").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
20
|
+
update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
|
|
21
21
|
}>;
|
|
22
22
|
export { modal };
|
|
@@ -45,25 +45,12 @@ var import_utils2 = require("../../utils");
|
|
|
45
45
|
var import_addServiceVariant = __toESM(require("../addServiceVariant"));
|
|
46
46
|
var import_timeBar = __toESM(require("../timeBar"));
|
|
47
47
|
var import_index = require("./index.less");
|
|
48
|
-
var import_utils3 = require("../../../booking/info/service2/utils");
|
|
49
|
-
var import_amount = require("../../../booking/components/footer/amount");
|
|
50
|
-
var import_formatProductMessage = __toESM(require("../../utils/formatProductMessage"));
|
|
51
48
|
var TicketBooking = () => {
|
|
52
49
|
var _a;
|
|
53
50
|
const [state, setState] = (0, import_miniRedux.useStore)();
|
|
54
51
|
const engineContext = (0, import_useEngineContext.default)();
|
|
55
52
|
const { props: engineProps } = engineContext.engine;
|
|
56
|
-
const {
|
|
57
|
-
action,
|
|
58
|
-
isTerminal,
|
|
59
|
-
lowcodeRef,
|
|
60
|
-
interaction,
|
|
61
|
-
store,
|
|
62
|
-
storage,
|
|
63
|
-
Toast,
|
|
64
|
-
getSymbolic,
|
|
65
|
-
translation
|
|
66
|
-
} = (_a = engineContext.appHelper) == null ? void 0 : _a.utils;
|
|
53
|
+
const { action, isTerminal, lowcodeRef, interaction, store, storage, Toast } = (_a = engineContext.appHelper) == null ? void 0 : _a.utils;
|
|
67
54
|
const _persistentRef = (0, import_react.useRef)(false);
|
|
68
55
|
const _initStateRef = (0, import_react.useRef)({});
|
|
69
56
|
const _listTimerRef = (0, import_react.useRef)();
|
|
@@ -150,112 +137,6 @@ var TicketBooking = () => {
|
|
|
150
137
|
intervalSetTime: isInterval
|
|
151
138
|
});
|
|
152
139
|
};
|
|
153
|
-
(0, import_react.useEffect)(() => {
|
|
154
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
155
|
-
const cartItems = (_b = (_a2 = state == null ? void 0 : state.modalState) == null ? void 0 : _a2.service) == null ? void 0 : _b.value;
|
|
156
|
-
if (!Array.isArray(cartItems) || cartItems.length === 0) {
|
|
157
|
-
(_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
|
|
158
|
-
module: "cds",
|
|
159
|
-
key: "cartUpdate",
|
|
160
|
-
data: {
|
|
161
|
-
currency_symbol: getSymbolic(),
|
|
162
|
-
total: "0",
|
|
163
|
-
// 小计
|
|
164
|
-
products: [],
|
|
165
|
-
fees: []
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
const total = (0, import_amount.getSumTotal)(state.modalState, true);
|
|
170
|
-
let formatedProducts = [];
|
|
171
|
-
try {
|
|
172
|
-
formatedProducts = (0, import_utils3.formatProducts)(
|
|
173
|
-
cartItems,
|
|
174
|
-
state.modalState,
|
|
175
|
-
false,
|
|
176
|
-
true,
|
|
177
|
-
true
|
|
178
|
-
);
|
|
179
|
-
} catch (error) {
|
|
180
|
-
console.error(error);
|
|
181
|
-
}
|
|
182
|
-
console.log("formatedProducts", total, formatedProducts);
|
|
183
|
-
let fees = [];
|
|
184
|
-
let products = [];
|
|
185
|
-
for (const item of formatedProducts) {
|
|
186
|
-
const { id, name, image, origin_total, total: total2, num, note, _origin } = item;
|
|
187
|
-
(_e = _origin == null ? void 0 : _origin.discount_list) == null ? void 0 : _e.forEach((dl) => {
|
|
188
|
-
fees.push({
|
|
189
|
-
isReduce: dl.type === "good_pass",
|
|
190
|
-
title: translation(dl == null ? void 0 : dl.discount.title),
|
|
191
|
-
price: dl.amount,
|
|
192
|
-
type: dl.type
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
let msg = "";
|
|
196
|
-
try {
|
|
197
|
-
msg = (0, import_formatProductMessage.default)(
|
|
198
|
-
{
|
|
199
|
-
...item,
|
|
200
|
-
currency_symbol: getSymbolic()
|
|
201
|
-
},
|
|
202
|
-
(_f = engineContext.appHelper) == null ? void 0 : _f.utils
|
|
203
|
-
);
|
|
204
|
-
} catch (error) {
|
|
205
|
-
console.error(error);
|
|
206
|
-
}
|
|
207
|
-
let _item = {
|
|
208
|
-
productID: id,
|
|
209
|
-
title: name,
|
|
210
|
-
cover: image,
|
|
211
|
-
// 封面图
|
|
212
|
-
price: total2,
|
|
213
|
-
// 售价
|
|
214
|
-
buyCount: num,
|
|
215
|
-
// 购买数量
|
|
216
|
-
productFormatMessage: msg,
|
|
217
|
-
note
|
|
218
|
-
};
|
|
219
|
-
if (origin_total !== total2) _item.modifyPrice = origin_total;
|
|
220
|
-
products.push(_item);
|
|
221
|
-
}
|
|
222
|
-
console.log(
|
|
223
|
-
"formatedProducts",
|
|
224
|
-
(_g = import_utils.locales.getText("pisell2.product.card.cart-items")) == null ? void 0 : _g(products.length)
|
|
225
|
-
);
|
|
226
|
-
if (products.length > 0) {
|
|
227
|
-
fees.unshift({
|
|
228
|
-
title: import_utils.locales.getText("pisell2.product.card.subtotal"),
|
|
229
|
-
price: total.productAmount,
|
|
230
|
-
type: "subtotal",
|
|
231
|
-
message: (_h = import_utils.locales.getText("pisell2.product.card.cart-items")) == null ? void 0 : _h(
|
|
232
|
-
products.length
|
|
233
|
-
)
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
console.log("start post message, config:", {
|
|
237
|
-
module: "cds",
|
|
238
|
-
key: "cartUpdate",
|
|
239
|
-
data: {
|
|
240
|
-
currency_symbol: getSymbolic(),
|
|
241
|
-
total: total.productAmount,
|
|
242
|
-
// 小计
|
|
243
|
-
products,
|
|
244
|
-
fees
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
(_j = (_i = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _i.postMessageToApp) == null ? void 0 : _j.call(_i, {
|
|
248
|
-
module: "cds",
|
|
249
|
-
key: "cartUpdate",
|
|
250
|
-
data: {
|
|
251
|
-
currency_symbol: getSymbolic(),
|
|
252
|
-
total: total.expectAmount,
|
|
253
|
-
// 小计
|
|
254
|
-
products,
|
|
255
|
-
fees
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
}, [state.modalState]);
|
|
259
140
|
const _setModalState = (props) => {
|
|
260
141
|
var _a2, _b;
|
|
261
142
|
console.log("同步state到外层", props);
|