@pisell/private-materials 6.4.46 → 6.4.48
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 +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +0 -1
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +22 -13
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/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/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/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +60 -22
- package/es/components/checkout/components/AdditionalModule/index.less +1 -1
- package/es/components/checkout/components/AmountSummary/index.js +18 -14
- package/es/components/checkout/components/AmountSummary/index.less +13 -0
- package/es/components/checkout/components/CashPaymentModule/index.js +4 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +48 -44
- package/es/components/checkout/components/PaymentOptionsModule/index.less +0 -6
- package/es/components/checkout/components/PaymentResultToast/index.js +38 -8
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +2 -0
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/utils.js +6 -5
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +9 -4
- package/es/components/checkout/locales.d.ts +3 -0
- package/es/components/checkout/locales.js +4 -1
- 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 +3 -3
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.js +3 -1
- package/es/components/ticketBooking/components/menuBar/index.less +7 -0
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/plus/saasLogin/utils.d.ts +5 -5
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +39 -15
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +55 -32
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +3 -3
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +0 -1
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +8 -1
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/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/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/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +48 -18
- package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
- package/lib/components/checkout/components/AmountSummary/index.js +7 -11
- package/lib/components/checkout/components/AmountSummary/index.less +13 -0
- package/lib/components/checkout/components/CashPaymentModule/index.js +3 -1
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +47 -56
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +0 -6
- package/lib/components/checkout/components/PaymentResultToast/index.js +26 -1
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +2 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/utils.js +5 -4
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +9 -6
- package/lib/components/checkout/locales.d.ts +3 -0
- package/lib/components/checkout/locales.js +4 -1
- 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 +3 -3
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +1 -1
- package/lib/components/ticketBooking/components/menuBar/index.less +7 -0
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/plus/saasLogin/utils.d.ts +5 -5
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +68 -37
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +51 -32
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +3 -3
- package/package.json +12 -12
@@ -53,6 +53,7 @@ var locales_default = {
|
|
53
53
|
"partial.paid": "Partial Paid",
|
54
54
|
"deposit.partial.paid": "Deposit Paid",
|
55
55
|
"split.payment": "Pay\nPartially",
|
56
|
+
"split.cancel": "Cancel\nPartial",
|
56
57
|
// Cash Payment
|
57
58
|
"cash": "Cash",
|
58
59
|
"rounding": "Rounding",
|
@@ -100,7 +101,7 @@ var locales_default = {
|
|
100
101
|
"wallet-pass-module-applied": (count) => `${count} Applied`,
|
101
102
|
"wallet-pass-module-expired": (count) => `${count} Expired`,
|
102
103
|
"wallet-pass-module-best-saving": "Select Best",
|
103
|
-
"wallet-pass-module-clear-all": "Clear
|
104
|
+
"wallet-pass-module-clear-all": "Clear Selection",
|
104
105
|
"wallet-pass-module-expired-modal-title": (count) => `${count} Expired Vouchers`,
|
105
106
|
"wallet-pass-module-expired-modal-empty": "No expired cards or coupons",
|
106
107
|
"wallet-pass-module-expired-modal-close": "Close",
|
@@ -252,6 +253,7 @@ var locales_default = {
|
|
252
253
|
"partial.paid": "部分支付",
|
253
254
|
"deposit.partial.paid": "定金部分支付",
|
254
255
|
"split.payment": "部分付款",
|
256
|
+
"split.cancel": "取消\n部分支付",
|
255
257
|
// Cash Payment
|
256
258
|
"cash": "现金",
|
257
259
|
"rounding": "舍入",
|
@@ -455,6 +457,7 @@ var locales_default = {
|
|
455
457
|
"partial.paid": "部分支付",
|
456
458
|
"deposit.partial.paid": "定金部分支付",
|
457
459
|
"split.payment": "部分付款",
|
460
|
+
"split.cancel": "取消\n部分支付",
|
458
461
|
// Cash Payment
|
459
462
|
"cash": "現金",
|
460
463
|
"rounding": "捨入",
|
@@ -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: "
|
12
|
+
onChange?: ((status: "page" | "success" | "fail" | "print" | "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, containerStyle, }: {
|
12
12
|
api: PayProps['api'];
|
13
13
|
className?: string | undefined;
|
14
|
-
onChange?: ((status: "
|
14
|
+
onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
15
15
|
[keys: string]: unknown;
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
17
17
|
onClose: () => void;
|
@@ -15,7 +15,7 @@ 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<"loading" | "success" | "
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "success" | "fail" | "warn" | "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>;
|
@@ -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: "loading" | "success" | "
|
177
|
+
status: "loading" | "success" | "fail" | "warn" | "question";
|
178
178
|
};
|
179
179
|
};
|
180
180
|
/**
|
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
295
295
|
name?: string | undefined;
|
296
296
|
symbol?: string | undefined;
|
297
297
|
amount?: string | number | undefined;
|
298
|
-
mode?: "pay" | "
|
298
|
+
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
300
|
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
|
301
301
|
action?: "pay" | "amount" | "deviceList" | 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?: "loading" | "success" | "
|
311
|
+
status?: "loading" | "success" | "fail" | "warn" | "pedding" | "resove" | "reject" | "question" | undefined;
|
312
312
|
warn?: string | undefined;
|
313
313
|
steps?: {
|
314
314
|
/** 用于重置当前步骤 */
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
export interface FormState {
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
4
3
|
order: any;
|
@@ -29,11 +28,4 @@ export interface PayGroup {
|
|
29
28
|
pay_number?: string;
|
30
29
|
_order: any;
|
31
30
|
}
|
32
|
-
export declare const Provider:
|
33
|
-
state: FormState;
|
34
|
-
} & {
|
35
|
-
dispatch: (params: {
|
36
|
-
type: string;
|
37
|
-
payload: any;
|
38
|
-
}) => void;
|
39
|
-
}>;
|
31
|
+
export declare const Provider: any, Context: any;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
3
2
|
import dayjs from "dayjs";
|
4
3
|
export interface FormState {
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
69
68
|
};
|
70
69
|
setGlobalState: Function | null;
|
71
70
|
}
|
72
|
-
export declare const Provider:
|
73
|
-
state: FormState;
|
74
|
-
} & {
|
75
|
-
dispatch: (params: {
|
76
|
-
type: string;
|
77
|
-
payload: any;
|
78
|
-
}) => void;
|
79
|
-
}>;
|
71
|
+
export declare const Provider: any, Context: any;
|
@@ -116,7 +116,7 @@ var index = () => {
|
|
116
116
|
"stroke-linejoin": "round"
|
117
117
|
}
|
118
118
|
)
|
119
|
-
)))), /* @__PURE__ */ import_react.default.createElement("div",
|
119
|
+
)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "menu-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
|
120
120
|
import_materials.ConfigProvider,
|
121
121
|
{
|
122
122
|
theme: {
|
@@ -1,13 +1 @@
|
|
1
|
-
|
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
|
+
export declare const Provider: any, Context: any;
|
@@ -1,14 +1 @@
|
|
1
|
-
|
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
|
+
export declare const Provider: any, Context: any;
|
@@ -1,13 +1 @@
|
|
1
|
-
|
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
|
+
export declare const Provider: any, Context: any;
|
@@ -1,29 +1 @@
|
|
1
|
-
|
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
|
+
export declare const Provider: any, Context: any;
|
@@ -1,13 +1 @@
|
|
1
|
-
|
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
|
+
export declare const Provider: any, Context: any;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { IWalletListItemProps } from './serve';
|
3
2
|
export interface WalletCardItemProps {
|
4
3
|
id: string;
|
@@ -27,11 +26,4 @@ export interface WalletListProps {
|
|
27
26
|
currentSearchListItemCode?: string;
|
28
27
|
[key: string]: any;
|
29
28
|
}
|
30
|
-
export declare const Provider:
|
31
|
-
global_wallet: WalletListProps;
|
32
|
-
} & {
|
33
|
-
dispatch: (params: {
|
34
|
-
type: string;
|
35
|
-
payload: any;
|
36
|
-
}) => void;
|
37
|
-
}>;
|
29
|
+
export declare const Provider: any, Context: any;
|
@@ -5,13 +5,13 @@ export declare const mergeData: (locales: any, props: SaasLoginProps) => {
|
|
5
5
|
width?: number | undefined;
|
6
6
|
height?: number | undefined;
|
7
7
|
};
|
8
|
-
logoPosition: "
|
8
|
+
logoPosition: "left" | "right" | "center";
|
9
9
|
welcomeMessage: any;
|
10
|
-
welcomeMessageAlign: "
|
10
|
+
welcomeMessageAlign: "left" | "right" | "center";
|
11
11
|
title: any;
|
12
|
-
titleAlign: "
|
12
|
+
titleAlign: "left" | "right" | "center";
|
13
13
|
subtitle: any;
|
14
|
-
subtitleAlign: "
|
14
|
+
subtitleAlign: "left" | "right" | "center";
|
15
15
|
emailLabel: any;
|
16
16
|
emailPlaceholder: any;
|
17
17
|
passwordLabel: any;
|
@@ -19,7 +19,7 @@ export declare const mergeData: (locales: any, props: SaasLoginProps) => {
|
|
19
19
|
buttonText: any;
|
20
20
|
registerText: any;
|
21
21
|
registerLinkText: any;
|
22
|
-
registerAlign: "
|
22
|
+
registerAlign: "left" | "right" | "center";
|
23
23
|
showLogo?: boolean | undefined;
|
24
24
|
showWelcomeMessage?: boolean | undefined;
|
25
25
|
showTitle?: boolean | undefined;
|
@@ -42,6 +42,8 @@ var import_CashKeyboardSimple = __toESM(require("./CashKeyboardSimple"));
|
|
42
42
|
var import_utils2 = require("../../utils");
|
43
43
|
var import_index = require("./index.less");
|
44
44
|
var import_decimal = __toESM(require("decimal.js"));
|
45
|
+
var import_materials2 = require("@pisell/materials");
|
46
|
+
var import_utils3 = require("@pisell/utils");
|
45
47
|
var CashKeyboardIntact = (props) => {
|
46
48
|
var _a, _b, _c;
|
47
49
|
const {
|
@@ -232,56 +234,79 @@ var CashKeyboardIntact = (props) => {
|
|
232
234
|
},
|
233
235
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-cash-keyboard-intact-container-top-label" }, mergedDisplayField.balanceDue.label),
|
234
236
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-cash-keyboard-intact-container-top-value" }, /* @__PURE__ */ import_react.default.createElement(
|
235
|
-
|
237
|
+
import_materials2.AutoResizeText,
|
236
238
|
{
|
237
|
-
|
239
|
+
minFontSizePx: 10,
|
240
|
+
maxFontSizePx: 14,
|
241
|
+
fontSizePrecisionPx: 0.5
|
242
|
+
},
|
243
|
+
(0, import_utils3.formatAmountWithOptions)(originalValue || "", amountSymbol, {
|
244
|
+
precision: 2,
|
238
245
|
hideDecimalForWholeNumbers: false,
|
239
|
-
|
240
|
-
}
|
246
|
+
showCurrencySymbol: true
|
247
|
+
})
|
241
248
|
))
|
242
249
|
), ((_b = mergedDisplayField.cashReceived) == null ? void 0 : _b.visible) && /* @__PURE__ */ import_react.default.createElement(
|
243
|
-
|
250
|
+
"div",
|
244
251
|
{
|
245
|
-
|
246
|
-
focused: true,
|
247
|
-
wrapperStyle: {
|
252
|
+
style: {
|
248
253
|
...getGridStyle(1),
|
249
254
|
padding: "6px 16px",
|
250
255
|
borderRadius: "8px",
|
251
256
|
backgroundColor: "white",
|
252
257
|
boxShadow: "0px 1px 2px rgba(16, 24, 40, 0.06)",
|
253
258
|
overflow: "hidden",
|
254
|
-
maxWidth: 188
|
259
|
+
maxWidth: 188,
|
260
|
+
cursor: "pointer"
|
255
261
|
},
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
262
|
+
onClick: () => {
|
263
|
+
setIsShowModal(true);
|
264
|
+
}
|
265
|
+
},
|
266
|
+
/* @__PURE__ */ import_react.default.createElement(
|
267
|
+
import_materials.VirtualInput,
|
268
|
+
{
|
269
|
+
showCursor: false,
|
270
|
+
focused: true,
|
271
|
+
wrapperStyle: {
|
272
|
+
width: "100%"
|
263
273
|
},
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
274
|
+
topContent: /* @__PURE__ */ import_react.default.createElement(
|
275
|
+
"div",
|
276
|
+
{
|
277
|
+
style: {
|
278
|
+
fontSize: "14px",
|
279
|
+
color: "#667085"
|
280
|
+
}
|
281
|
+
},
|
282
|
+
mergedDisplayField.cashReceived.label
|
283
|
+
),
|
284
|
+
value: internalValue ? /* @__PURE__ */ import_react.default.createElement(
|
285
|
+
import_materials2.AutoResizeText,
|
286
|
+
{
|
287
|
+
minFontSizePx: 10,
|
288
|
+
maxFontSizePx: 14,
|
289
|
+
fontSizePrecisionPx: 0.5
|
290
|
+
},
|
291
|
+
(0, import_utils3.formatAmountWithOptions)(internalValue || "", amountSymbol, {
|
292
|
+
value: internalValue,
|
293
|
+
hideDecimalForWholeNumbers: false,
|
294
|
+
precision: 2,
|
295
|
+
showCurrencySymbol: true
|
296
|
+
})
|
297
|
+
) : "",
|
298
|
+
height: 30,
|
299
|
+
fontSize: 20,
|
300
|
+
placeholder,
|
301
|
+
style: {
|
302
|
+
fontSize: "24px",
|
303
|
+
fontWeight: "bold",
|
304
|
+
border: "none",
|
305
|
+
background: "transparent",
|
306
|
+
width: "100%"
|
272
307
|
}
|
273
|
-
) : "",
|
274
|
-
height: 30,
|
275
|
-
fontSize: 20,
|
276
|
-
placeholder,
|
277
|
-
style: {
|
278
|
-
fontSize: "24px",
|
279
|
-
fontWeight: "bold",
|
280
|
-
border: "none",
|
281
|
-
background: "transparent",
|
282
|
-
width: "100%"
|
283
308
|
}
|
284
|
-
|
309
|
+
)
|
285
310
|
), ((_c = mergedDisplayField.changeDue) == null ? void 0 : _c.visible) && /* @__PURE__ */ import_react.default.createElement(
|
286
311
|
"div",
|
287
312
|
{
|
@@ -290,12 +315,18 @@ var CashKeyboardIntact = (props) => {
|
|
290
315
|
},
|
291
316
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-cash-keyboard-intact-container-top-label" }, mergedDisplayField.changeDue.label),
|
292
317
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-cash-keyboard-intact-container-top-value" }, /* @__PURE__ */ import_react.default.createElement(
|
293
|
-
|
318
|
+
import_materials2.AutoResizeText,
|
294
319
|
{
|
320
|
+
minFontSizePx: 10,
|
321
|
+
maxFontSizePx: 14,
|
322
|
+
fontSizePrecisionPx: 0.5
|
323
|
+
},
|
324
|
+
(0, import_utils3.formatAmountWithOptions)(hiddenChangeDue ? 0 : changeDue, amountSymbol, {
|
295
325
|
value: hiddenChangeDue ? 0 : changeDue,
|
326
|
+
showCurrencySymbol: true,
|
296
327
|
hideDecimalForWholeNumbers: false,
|
297
328
|
precision: 2
|
298
|
-
}
|
329
|
+
})
|
299
330
|
))
|
300
331
|
)), /* @__PURE__ */ import_react.default.createElement(
|
301
332
|
import_shortcuts.default,
|
@@ -44,6 +44,11 @@ var import_utils2 = require("../../utils");
|
|
44
44
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
45
45
|
var import_locales = __toESM(require("./locales"));
|
46
46
|
var import_index = require("./index.less");
|
47
|
+
var TIP_COLORS = {
|
48
|
+
positive: "#CA8504",
|
49
|
+
negative: "#1570EF",
|
50
|
+
overflow: "#D92D20"
|
51
|
+
};
|
47
52
|
var DiscountKeyboardBase = (props) => {
|
48
53
|
var _a, _b, _c, _d, _e, _f, _g;
|
49
54
|
const {
|
@@ -117,10 +122,16 @@ var DiscountKeyboardBase = (props) => {
|
|
117
122
|
}
|
118
123
|
return discountAmount2.toNumber();
|
119
124
|
}, [updateMode, discountMode, internalValue, discountValue, originalValue]);
|
120
|
-
const
|
121
|
-
const
|
122
|
-
|
123
|
-
|
125
|
+
const isDiscountOverflow = (0, import_react.useMemo)(() => {
|
126
|
+
const _original = new import_decimal.default(originalValue || 0);
|
127
|
+
if (updateMode === "priceOverride") {
|
128
|
+
return new import_decimal.default(internalValue || 0).greaterThan(_original);
|
129
|
+
}
|
130
|
+
if (discountMode === "amount") {
|
131
|
+
return new import_decimal.default(discountValue || 0).greaterThan(_original);
|
132
|
+
}
|
133
|
+
return false;
|
134
|
+
}, [updateMode, discountMode, internalValue, discountValue, originalValue]);
|
124
135
|
const payableAmount = (0, import_react.useMemo)(() => {
|
125
136
|
return new import_decimal.default(originalValue || 0).minus(discountAmount).toNumber();
|
126
137
|
}, [originalValue, discountAmount]);
|
@@ -129,7 +140,7 @@ var DiscountKeyboardBase = (props) => {
|
|
129
140
|
onEnter == null ? void 0 : onEnter(String(discountAmount));
|
130
141
|
return;
|
131
142
|
}
|
132
|
-
if (
|
143
|
+
if (isDiscountOverflow) {
|
133
144
|
return;
|
134
145
|
}
|
135
146
|
onEnter == null ? void 0 : onEnter(String(discountAmount));
|
@@ -149,7 +160,9 @@ var DiscountKeyboardBase = (props) => {
|
|
149
160
|
const rightItems = (0, import_rightItems.default)({
|
150
161
|
rightItemsStyle: {
|
151
162
|
doneButtonStyle: {
|
152
|
-
boxShadow: "0px 0px 1px #898A8D"
|
163
|
+
boxShadow: "0px 0px 1px #898A8D",
|
164
|
+
cursor: updateMode !== "priceOverride" && isDiscountOverflow ? "not-allowed" : void 0,
|
165
|
+
backgroundColor: updateMode !== "priceOverride" && isDiscountOverflow ? "#D0D5DD" : void 0
|
153
166
|
}
|
154
167
|
},
|
155
168
|
doneText: doneText || import_utils.locales.getText("discount-keyboard-done"),
|
@@ -176,14 +189,35 @@ var DiscountKeyboardBase = (props) => {
|
|
176
189
|
}
|
177
190
|
}, [amountSymbol, updateMode, discountMode]);
|
178
191
|
const renderBottomContent = () => {
|
179
|
-
|
180
|
-
|
181
|
-
}
|
182
|
-
|
183
|
-
|
192
|
+
if (new import_decimal.default(discountAmount).equals(0)) {
|
193
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, " ");
|
194
|
+
}
|
195
|
+
if (updateMode === "priceOverride" || discountMode === "percentage") {
|
196
|
+
let color;
|
197
|
+
let sign = "";
|
198
|
+
if (new import_decimal.default(discountAmount).greaterThan(0)) {
|
199
|
+
color = TIP_COLORS.negative;
|
200
|
+
sign = "-";
|
201
|
+
} else {
|
202
|
+
sign = "+";
|
203
|
+
color = TIP_COLORS.positive;
|
204
|
+
}
|
205
|
+
const style = {
|
206
|
+
color
|
207
|
+
};
|
208
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style, className: "ellipsis" }, /* @__PURE__ */ import_react.default.createElement("span", null, sign, /* @__PURE__ */ import_react.default.createElement(
|
209
|
+
import_materials.PisellText.Amount,
|
210
|
+
{
|
211
|
+
hideDecimalForWholeNumbers: false,
|
212
|
+
precision: 2,
|
213
|
+
value: Math.abs(discountAmount)
|
214
|
+
}
|
215
|
+
)));
|
216
|
+
}
|
217
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
184
218
|
"div",
|
185
219
|
{
|
186
|
-
style:
|
220
|
+
style: { color: isDiscountOverflow ? TIP_COLORS.overflow : "" },
|
187
221
|
className: "ellipsis"
|
188
222
|
},
|
189
223
|
import_utils.locales.getText("discount-keyboard-max-discount"),
|
@@ -198,27 +232,9 @@ var DiscountKeyboardBase = (props) => {
|
|
198
232
|
}
|
199
233
|
)
|
200
234
|
);
|
201
|
-
const _discountText = /* @__PURE__ */ import_react.default.createElement("div", { style, className: "ellipsis" }, import_utils.locales.getText("discount-keyboard-discount-amount"), ":", " ", /* @__PURE__ */ import_react.default.createElement("span", null, sign, /* @__PURE__ */ import_react.default.createElement(
|
202
|
-
import_materials.PisellText.Amount,
|
203
|
-
{
|
204
|
-
hideDecimalForWholeNumbers: false,
|
205
|
-
precision: 2,
|
206
|
-
value: Math.abs(discountAmount)
|
207
|
-
}
|
208
|
-
)));
|
209
|
-
if (updateMode === "priceOverride") {
|
210
|
-
if (isFirstInput) {
|
211
|
-
return _maxDiscount;
|
212
|
-
} else {
|
213
|
-
return _discountText;
|
214
|
-
}
|
215
|
-
}
|
216
|
-
if (updateMode === "discount" && discountMode === "amount") {
|
217
|
-
return _maxDiscount;
|
218
|
-
}
|
219
|
-
return _discountText;
|
220
235
|
};
|
221
236
|
const customDisplay = () => {
|
237
|
+
const _color = updateMode === "discount" && discountMode === "amount" && isDiscountOverflow ? TIP_COLORS.overflow : void 0;
|
222
238
|
return /* @__PURE__ */ import_react.default.createElement(
|
223
239
|
"div",
|
224
240
|
{
|
@@ -240,6 +256,9 @@ var DiscountKeyboardBase = (props) => {
|
|
240
256
|
flex: "2",
|
241
257
|
overflow: "hidden"
|
242
258
|
},
|
259
|
+
style: {
|
260
|
+
color: _color
|
261
|
+
},
|
243
262
|
placeholder,
|
244
263
|
bottomContent: renderBottomContent()
|
245
264
|
}
|
@@ -313,7 +332,7 @@ var DiscountKeyboardBase = (props) => {
|
|
313
332
|
"div",
|
314
333
|
{
|
315
334
|
style: {
|
316
|
-
color:
|
335
|
+
color: "#475467",
|
317
336
|
fontSize: 14,
|
318
337
|
fontWeight: 700,
|
319
338
|
wordWrap: "break-word"
|
@@ -29,7 +29,7 @@ var locales_default = {
|
|
29
29
|
"discount-keyboard-discount": "Discount",
|
30
30
|
"discount-keyboard-amount": "Amount",
|
31
31
|
"discount-keyboard-percentage": "Percentage",
|
32
|
-
"discount-keyboard-max-discount": "Max
|
32
|
+
"discount-keyboard-max-discount": "Max",
|
33
33
|
"discount-keyboard-discount-amount": "Discount Amount",
|
34
34
|
"discount-keyboard-total": "Total",
|
35
35
|
"discount-keyboard-payable": "Payable",
|
@@ -43,7 +43,7 @@ var locales_default = {
|
|
43
43
|
"discount-keyboard-discount": "折扣",
|
44
44
|
"discount-keyboard-amount": "金额",
|
45
45
|
"discount-keyboard-percentage": "百分比",
|
46
|
-
"discount-keyboard-max-discount": "
|
46
|
+
"discount-keyboard-max-discount": "最高",
|
47
47
|
"discount-keyboard-discount-amount": "折扣金额",
|
48
48
|
"discount-keyboard-total": "待支付金额",
|
49
49
|
"discount-keyboard-payable": "需支付金额",
|
@@ -57,7 +57,7 @@ var locales_default = {
|
|
57
57
|
"discount-keyboard-discount": "折扣",
|
58
58
|
"discount-keyboard-amount": "金額",
|
59
59
|
"discount-keyboard-percentage": "百分比",
|
60
|
-
"discount-keyboard-max-discount": "
|
60
|
+
"discount-keyboard-max-discount": "最高",
|
61
61
|
"discount-keyboard-discount-amount": "折扣金額",
|
62
62
|
"discount-keyboard-total": "待支付金額",
|
63
63
|
"discount-keyboard-payable": "需支付金額",
|