@pisell/private-materials 6.4.42 → 6.4.44
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 +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/actionButtons/index.js +37 -42
- package/es/components/booking/components/actionButtons/index.less +0 -28
- package/es/components/booking/components/footer/amount.d.ts +3 -3
- package/es/components/booking/components/footer/amount.js +13 -2
- package/es/components/booking/components/footer/index.js +168 -68
- package/es/components/booking/components/footer/utils.js +62 -33
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/addService/index.js +2 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/index.js +42 -2
- package/es/components/booking/info2/service/addService/index.js +2 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +12 -4
- 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.d.ts +2 -0
- package/es/components/checkout/PaymentModal.js +395 -240
- package/es/components/checkout/components/AdditionalModule/index.less +1 -1
- package/es/components/checkout/components/AmountSummary/index.js +161 -54
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +114 -137
- package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +210 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
- package/es/components/checkout/components/PaymentOptionsModule/index.less +29 -0
- package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
- package/es/components/checkout/components/WalletPassModule/index.js +4 -3
- package/es/components/checkout/components/WalletPassModule/utils.js +6 -1
- package/es/components/checkout/hooks/useWalletPass.js +2 -0
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +33 -0
- package/es/components/checkout/locales.js +39 -3
- package/es/components/checkout/types.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/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +6 -6
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/Product.js +143 -71
- package/es/components/shoppingCart/components/Cart/index.js +1 -1
- package/es/components/shoppingCart/components/Cart/index.less +31 -0
- package/es/components/shoppingCart/locales.d.ts +3 -0
- package/es/components/shoppingCart/locales.js +12 -3
- package/es/components/ticketBooking/utils/index.js +2 -1
- 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/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +310 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +442 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
- package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
- package/es/pro/priceKeyboard/index.d.ts +3 -0
- package/es/pro/priceKeyboard/index.js +3 -0
- package/es/pro/priceKeyboard/index.less +215 -0
- package/es/pro/priceKeyboard/utils.d.ts +31 -0
- package/es/pro/priceKeyboard/utils.js +51 -0
- package/es/pro/skuDetailModal/index.js +19 -16
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/actionButtons/index.js +31 -28
- package/lib/components/booking/components/actionButtons/index.less +0 -28
- package/lib/components/booking/components/footer/amount.d.ts +3 -3
- package/lib/components/booking/components/footer/amount.js +10 -4
- package/lib/components/booking/components/footer/index.js +107 -40
- package/lib/components/booking/components/footer/utils.js +35 -7
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/service/addService/index.js +2 -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/index.js +18 -1
- package/lib/components/booking/info2/service/addService/index.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +12 -4
- 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.d.ts +2 -0
- package/lib/components/checkout/PaymentModal.js +152 -73
- package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
- package/lib/components/checkout/components/AmountSummary/index.js +114 -40
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +103 -140
- package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +172 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +29 -0
- package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
- package/lib/components/checkout/components/WalletPassModule/index.js +4 -3
- package/lib/components/checkout/components/WalletPassModule/utils.js +4 -1
- package/lib/components/checkout/hooks/useWalletPass.js +2 -0
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +33 -0
- package/lib/components/checkout/locales.js +39 -3
- package/lib/components/checkout/types.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/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
- package/lib/components/shoppingCart/components/Cart/index.js +1 -1
- package/lib/components/shoppingCart/components/Cart/index.less +31 -0
- package/lib/components/shoppingCart/locales.d.ts +3 -0
- package/lib/components/shoppingCart/locales.js +6 -3
- package/lib/components/ticketBooking/index.js +5 -1
- package/lib/components/ticketBooking/utils/index.js +2 -1
- 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/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +332 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +485 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
- package/lib/pro/priceKeyboard/index.d.ts +3 -0
- package/lib/pro/priceKeyboard/index.js +45 -0
- package/lib/pro/priceKeyboard/index.less +215 -0
- package/lib/pro/priceKeyboard/utils.d.ts +31 -0
- package/lib/pro/priceKeyboard/utils.js +75 -0
- package/lib/pro/skuDetailModal/index.js +18 -22
- package/package.json +2 -2
@@ -9,7 +9,10 @@ export default {
|
|
9
9
|
'pisell2.text.shopping-cart.no.selected': 'No items selected',
|
10
10
|
'pisell2.text.shopping-cart.confirm': 'Confirm',
|
11
11
|
'pisell2.text.shopping-cart.cancel': 'Cancel',
|
12
|
-
'pisell2.text.shopping-cart.select.holder.modal.title': 'Item Assignment'
|
12
|
+
'pisell2.text.shopping-cart.select.holder.modal.title': 'Item Assignment',
|
13
|
+
'pisell2.text.shopping-cart.save.items': function pisell2TextShoppingCartSaveItems(num) {
|
14
|
+
return "".concat(num, " save ").concat(num > 1 ? 'items' : 'item');
|
15
|
+
}
|
13
16
|
},
|
14
17
|
'zh-CN': {
|
15
18
|
'pisell2.text.shopping-cart.item': function pisell2TextShoppingCartItem(num) {
|
@@ -21,7 +24,10 @@ export default {
|
|
21
24
|
'pisell2.text.shopping-cart.no.selected': '未选择任何项目',
|
22
25
|
'pisell2.text.shopping-cart.confirm': '确定',
|
23
26
|
'pisell2.text.shopping-cart.cancel': '取消',
|
24
|
-
'pisell2.text.shopping-cart.select.holder.modal.title': '商品分配'
|
27
|
+
'pisell2.text.shopping-cart.select.holder.modal.title': '商品分配',
|
28
|
+
'pisell2.text.shopping-cart.save.items': function pisell2TextShoppingCartSaveItems(num) {
|
29
|
+
return "".concat(num, " \u4E2A\u4FDD\u5B58\u5546\u54C1");
|
30
|
+
}
|
25
31
|
},
|
26
32
|
'zh-HK': {
|
27
33
|
'pisell2.text.shopping-cart.item': function pisell2TextShoppingCartItem(num) {
|
@@ -33,6 +39,9 @@ export default {
|
|
33
39
|
'pisell2.text.shopping-cart.no.selected': '未選擇任何項目',
|
34
40
|
'pisell2.text.shopping-cart.confirm': '確定',
|
35
41
|
'pisell2.text.shopping-cart.cancel': '取消',
|
36
|
-
'pisell2.text.shopping-cart.select.holder.modal.title': '商品分配'
|
42
|
+
'pisell2.text.shopping-cart.select.holder.modal.title': '商品分配',
|
43
|
+
'pisell2.text.shopping-cart.save.items': function pisell2TextShoppingCartSaveItems(num) {
|
44
|
+
return "".concat(num, " \u500B\u4FDD\u5B58\u5546\u54C1");
|
45
|
+
}
|
37
46
|
}
|
38
47
|
};
|
@@ -150,7 +150,8 @@ export var addService = function addService(list, addItem, state) {
|
|
150
150
|
var isGoodPassDiscountProduct = (item.discount_list || []).some(function (item) {
|
151
151
|
return item.type === 'good_pass';
|
152
152
|
});
|
153
|
-
|
153
|
+
var isEdit = item === null || item === void 0 ? void 0 : item.edit;
|
154
|
+
if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct && !isEdit) {
|
154
155
|
var _item$_extend, _addItem$_extend, _item$_extend2;
|
155
156
|
isNotSame = false;
|
156
157
|
var quantity = ((item === null || item === void 0 || (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.quantity) || 1) + ((addItem === null || addItem === void 0 || (_addItem$_extend = addItem._extend) === null || _addItem$_extend === void 0 ? void 0 : _addItem$_extend.quantity) || 1);
|
@@ -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;
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
7
|
import React, { useState, useImperativeHandle, forwardRef } from 'react';
|
8
8
|
import { Popover } from 'antd';
|
9
|
-
import
|
9
|
+
import PisellPriceKeyboard from '@pisell/materials/src/components/pisellAdjustPrice/index';
|
10
10
|
import { locales } from '@pisell/utils';
|
11
11
|
import "./PisellPriceKeyboardPopover.less";
|
12
12
|
var PisellPriceKeyboardPopover = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './PisellPriceKeyboardPopover.less';
|
3
|
+
import { PisellPriceKeyboardPopoverProps, PisellPriceKeyboardPopoverRef } from './types';
|
4
|
+
declare const PisellPriceKeyboardPopover: React.ForwardRefExoticComponent<PisellPriceKeyboardPopoverProps & React.RefAttributes<PisellPriceKeyboardPopoverRef>>;
|
5
|
+
export default PisellPriceKeyboardPopover;
|
@@ -0,0 +1,148 @@
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
7
|
+
import React, { useState, useImperativeHandle, forwardRef } from 'react';
|
8
|
+
import { Popover } from 'antd';
|
9
|
+
import { PisellPriceKeyboard } from '@pisell/materials';
|
10
|
+
import { locales } from '@pisell/utils';
|
11
|
+
import "./PisellPriceKeyboardPopover.less";
|
12
|
+
var PisellPriceKeyboardPopover = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
13
|
+
var children = _ref.children,
|
14
|
+
_ref$value = _ref.value,
|
15
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
16
|
+
onChange = _ref.onChange,
|
17
|
+
onConfirm = _ref.onConfirm,
|
18
|
+
onCancel = _ref.onCancel,
|
19
|
+
_ref$showCurrencySymb = _ref.showCurrencySymbol,
|
20
|
+
showCurrencySymbol = _ref$showCurrencySymb === void 0 ? true : _ref$showCurrencySymb,
|
21
|
+
_ref$useThousandsSepa = _ref.useThousandsSeparator,
|
22
|
+
useThousandsSeparator = _ref$useThousandsSepa === void 0 ? false : _ref$useThousandsSepa,
|
23
|
+
_ref$selectType = _ref.selectType,
|
24
|
+
selectType = _ref$selectType === void 0 ? 'dark' : _ref$selectType,
|
25
|
+
_ref$disabled = _ref.disabled,
|
26
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
27
|
+
_ref$overlayClassName = _ref.overlayClassName,
|
28
|
+
overlayClassName = _ref$overlayClassName === void 0 ? '' : _ref$overlayClassName,
|
29
|
+
style = _ref.style;
|
30
|
+
var _useState = useState(false),
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
32
|
+
open = _useState2[0],
|
33
|
+
setOpen = _useState2[1];
|
34
|
+
var _useState3 = useState(''),
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
36
|
+
tempValue = _useState4[0],
|
37
|
+
setTempValue = _useState4[1];
|
38
|
+
var _useState5 = useState(true),
|
39
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
40
|
+
isFirstInput = _useState6[0],
|
41
|
+
setIsFirstInput = _useState6[1]; // 标记是否是首次输入
|
42
|
+
|
43
|
+
// 暴露给父组件的方法
|
44
|
+
useImperativeHandle(ref, function () {
|
45
|
+
return {
|
46
|
+
open: function open() {
|
47
|
+
setOpen(true);
|
48
|
+
setTempValue(value);
|
49
|
+
setIsFirstInput(true);
|
50
|
+
},
|
51
|
+
close: function close() {
|
52
|
+
return setOpen(false);
|
53
|
+
},
|
54
|
+
isOpen: function isOpen() {
|
55
|
+
return open;
|
56
|
+
}
|
57
|
+
};
|
58
|
+
});
|
59
|
+
var handleOpenChange = function handleOpenChange(visible) {
|
60
|
+
if (disabled) return;
|
61
|
+
setOpen(visible);
|
62
|
+
if (visible) {
|
63
|
+
// 打开时初始化临时值,并重置首次输入标记
|
64
|
+
setTempValue(value);
|
65
|
+
setIsFirstInput(true);
|
66
|
+
} else {
|
67
|
+
// 关闭时调用取消回调
|
68
|
+
onCancel === null || onCancel === void 0 || onCancel();
|
69
|
+
}
|
70
|
+
};
|
71
|
+
|
72
|
+
// 处理价格变化(合并了 onChange 和 onEnter)
|
73
|
+
var handlePriceChange = function handlePriceChange(val) {
|
74
|
+
// 如果用户点击了清除按钮(值变为空或0),重置首次输入标记
|
75
|
+
if ((val === '' || val === 0 || val === '0') && !isFirstInput) {
|
76
|
+
setIsFirstInput(true);
|
77
|
+
setTempValue(val);
|
78
|
+
onChange === null || onChange === void 0 || onChange(val);
|
79
|
+
return;
|
80
|
+
}
|
81
|
+
if (isFirstInput && val !== '' && val !== 0 && val !== '0') {
|
82
|
+
setIsFirstInput(false);
|
83
|
+
var currentValueStr = String(tempValue || '').replace(/[^\d.]/g, ''); // 去除非数字字符
|
84
|
+
var newValueStr = String(val).replace(/[^\d.]/g, '');
|
85
|
+
|
86
|
+
// 如果当前有值且新值是在当前值基础上追加的,说明用户输入了新数字
|
87
|
+
if (currentValueStr && currentValueStr !== '0' && newValueStr.length > currentValueStr.length && newValueStr.startsWith(currentValueStr)) {
|
88
|
+
// 提取用户真正输入的新数字
|
89
|
+
var newInput = newValueStr.slice(currentValueStr.length);
|
90
|
+
if (newInput) {
|
91
|
+
// 直接使用用户输入的新数字,覆盖原值
|
92
|
+
setTempValue(newInput);
|
93
|
+
onChange === null || onChange === void 0 || onChange(newInput);
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
// 后续输入或其他情况正常处理
|
100
|
+
setTempValue(val);
|
101
|
+
onChange === null || onChange === void 0 || onChange(val);
|
102
|
+
};
|
103
|
+
|
104
|
+
// 处理确认(点击完成按钮)
|
105
|
+
var handleConfirm = function handleConfirm(val) {
|
106
|
+
onConfirm === null || onConfirm === void 0 || onConfirm(val);
|
107
|
+
setOpen(false);
|
108
|
+
};
|
109
|
+
|
110
|
+
// 处理取消
|
111
|
+
var handleCancel = function handleCancel() {
|
112
|
+
setOpen(false);
|
113
|
+
onCancel === null || onCancel === void 0 || onCancel();
|
114
|
+
};
|
115
|
+
var keyboardContent = /*#__PURE__*/React.createElement("div", {
|
116
|
+
className: "pisell-price-keyboard-popover-content"
|
117
|
+
}, /*#__PURE__*/React.createElement(PisellPriceKeyboard, {
|
118
|
+
value: tempValue,
|
119
|
+
onChange: handlePriceChange,
|
120
|
+
onEnter: handleConfirm,
|
121
|
+
doneText: locales.getText('pisell2.customise-item.save'),
|
122
|
+
resetText: locales.getText('pisell2.booking.info.text.clear'),
|
123
|
+
amountProps: {
|
124
|
+
showCurrencySymbol: showCurrencySymbol,
|
125
|
+
useThousandsSeparator: useThousandsSeparator
|
126
|
+
},
|
127
|
+
selectType: selectType,
|
128
|
+
backgroundColor: "transparent"
|
129
|
+
}));
|
130
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
131
|
+
open: open,
|
132
|
+
content: keyboardContent,
|
133
|
+
trigger: disabled ? [] : ['click'],
|
134
|
+
overlayInnerStyle: {
|
135
|
+
padding: 0
|
136
|
+
},
|
137
|
+
destroyTooltipOnHide: true,
|
138
|
+
arrow: false,
|
139
|
+
align: {
|
140
|
+
offset: [0, 0]
|
141
|
+
},
|
142
|
+
overlayClassName: "pisell-price-keyboard-popover ".concat(overlayClassName),
|
143
|
+
onOpenChange: handleOpenChange,
|
144
|
+
overlayStyle: style
|
145
|
+
}, children);
|
146
|
+
});
|
147
|
+
PisellPriceKeyboardPopover.displayName = 'PisellPriceKeyboardPopover';
|
148
|
+
export default PisellPriceKeyboardPopover;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
.pisell-price-keyboard-popover {
|
2
|
+
&.ant-popover {
|
3
|
+
z-index: 1050;
|
4
|
+
|
5
|
+
.ant-popover-inner {
|
6
|
+
border-radius: 12px;
|
7
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
|
8
|
+
background: transparent;
|
9
|
+
}
|
10
|
+
|
11
|
+
.ant-popover-inner-content {
|
12
|
+
padding: 0;
|
13
|
+
background: transparent;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
.pisell-price-keyboard-popover-content {
|
18
|
+
background: rgba(29, 41, 57, 0.8) !important;
|
19
|
+
border-radius: 10px;
|
20
|
+
overflow: hidden;
|
21
|
+
padding: 10px;
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from "./PisellPriceKeyboardPopover";
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface PisellPriceKeyboardPopoverProps {
|
3
|
+
/** 触发元素 */
|
4
|
+
children: React.ReactNode;
|
5
|
+
/** 当前价格值 */
|
6
|
+
value?: string | number;
|
7
|
+
/** 价格变化回调(合并了 onChange 和 onEnter) */
|
8
|
+
onChange?: (value: string | number) => void;
|
9
|
+
/** 确认回调 */
|
10
|
+
onConfirm?: (value: string | number) => void;
|
11
|
+
/** 取消回调 */
|
12
|
+
onCancel?: () => void;
|
13
|
+
/** 货币符号显示 */
|
14
|
+
showCurrencySymbol?: boolean;
|
15
|
+
/** 是否使用千分位分隔符 */
|
16
|
+
useThousandsSeparator?: boolean;
|
17
|
+
/** 键盘主题 */
|
18
|
+
selectType?: 'light' | 'dark';
|
19
|
+
/** 是否禁用 */
|
20
|
+
disabled?: boolean;
|
21
|
+
/** Popover 额外的类名 */
|
22
|
+
overlayClassName?: string;
|
23
|
+
/** 自定义样式 */
|
24
|
+
style?: React.CSSProperties;
|
25
|
+
}
|
26
|
+
export interface PisellPriceKeyboardPopoverRef {
|
27
|
+
/** 打开键盘 */
|
28
|
+
open: () => void;
|
29
|
+
/** 关闭键盘 */
|
30
|
+
close: () => void;
|
31
|
+
/** 获取当前是否打开 */
|
32
|
+
isOpen: () => boolean;
|
33
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|