@pisell/private-materials 6.4.41 → 6.4.43
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/Sales/Summary/utils.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +10 -1
- 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 +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- 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 +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- 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 +3 -2
- 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 +5 -5
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- 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/hooks/pisellos/useCustomer.js +7 -7
- package/es/components/ticketBooking/utils/index.js +2 -1
- 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/model.d.ts +9 -1
- 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/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- 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 +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- 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 +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/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 +3 -2
- 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 +5 -5
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- 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/hooks/pisellos/useCustomer.js +7 -7
- 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 +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/model.d.ts +9 -1
- 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 +3 -3
@@ -0,0 +1,97 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface RightItemsStyleProps {
|
3
|
+
buttonBackgroundColor?: string;
|
4
|
+
textColor?: string;
|
5
|
+
resetButtonBackgroundColor?: string;
|
6
|
+
resetButtonTextColor?: string;
|
7
|
+
isDoneButtonFollowTheme?: boolean;
|
8
|
+
doneButtonBackgroundColor?: string;
|
9
|
+
doneButtonTextColor?: string;
|
10
|
+
}
|
11
|
+
export declare type ItemValue = string | number;
|
12
|
+
export interface Item {
|
13
|
+
value: ItemValue;
|
14
|
+
label: React.ReactNode;
|
15
|
+
disabled: boolean;
|
16
|
+
type: 'text' | 'primary';
|
17
|
+
style?: React.CSSProperties;
|
18
|
+
size?: number;
|
19
|
+
}
|
20
|
+
export interface KeyboardProps {
|
21
|
+
className?: string;
|
22
|
+
style?: React.CSSProperties;
|
23
|
+
onChange?: (value?: ItemValue) => void;
|
24
|
+
items?: Item[];
|
25
|
+
rightItems?: Item[];
|
26
|
+
keydown?: boolean;
|
27
|
+
}
|
28
|
+
export interface TitleAreaConfig {
|
29
|
+
visible?: boolean;
|
30
|
+
title?: {
|
31
|
+
visible?: boolean;
|
32
|
+
text?: string;
|
33
|
+
fontSize?: string | number;
|
34
|
+
color?: string;
|
35
|
+
fontWeight?: string | number;
|
36
|
+
};
|
37
|
+
subtitle?: {
|
38
|
+
visible?: boolean;
|
39
|
+
text?: string;
|
40
|
+
fontSize?: string | number;
|
41
|
+
color?: string;
|
42
|
+
fontWeight?: string | number;
|
43
|
+
};
|
44
|
+
alignment?: 'left' | 'right' | 'center' | 'space-between';
|
45
|
+
spacing?: string | number;
|
46
|
+
}
|
47
|
+
export interface DisplayFieldConfig {
|
48
|
+
cashReceived?: {
|
49
|
+
visible?: boolean;
|
50
|
+
};
|
51
|
+
balanceDue?: {
|
52
|
+
visible?: boolean;
|
53
|
+
};
|
54
|
+
changeDue?: {
|
55
|
+
visible?: boolean;
|
56
|
+
};
|
57
|
+
gridRatio?: number[];
|
58
|
+
}
|
59
|
+
export interface CashKeyboardBaseProps {
|
60
|
+
amountSymbol?: string;
|
61
|
+
value?: string;
|
62
|
+
/** 默认值,非受控模式 */
|
63
|
+
defaultValue?: string;
|
64
|
+
/** 原始值,多用于重置, 当前对应 Balance Due */
|
65
|
+
originalValue?: string;
|
66
|
+
placeholder?: string;
|
67
|
+
max?: number;
|
68
|
+
min?: number;
|
69
|
+
disabled?: boolean;
|
70
|
+
doneText?: string;
|
71
|
+
resetText?: string;
|
72
|
+
presets?: any;
|
73
|
+
hiddenChangeDue?: boolean;
|
74
|
+
onChange?: (val: string) => void;
|
75
|
+
onEnter?: (val: string) => void;
|
76
|
+
onReset?: () => void;
|
77
|
+
onPay?: () => void;
|
78
|
+
rightItemsStyle?: RightItemsStyleProps;
|
79
|
+
titleArea?: TitleAreaConfig;
|
80
|
+
displayField?: DisplayFieldConfig;
|
81
|
+
keyboardProps?: KeyboardProps;
|
82
|
+
style?: React.CSSProperties;
|
83
|
+
selectType?: 'light' | 'dark';
|
84
|
+
backgroundColor?: string;
|
85
|
+
containerBackgroundColor?: string;
|
86
|
+
buttonBackgroundColor?: string;
|
87
|
+
textColor?: string;
|
88
|
+
resetButtonBackgroundColor?: string;
|
89
|
+
resetButtonTextColor?: string;
|
90
|
+
isDoneButtonFollowTheme?: boolean;
|
91
|
+
doneButtonBackgroundColor?: string;
|
92
|
+
doneButtonTextColor?: string;
|
93
|
+
keyboardBackgroundColor?: string;
|
94
|
+
keyboardButtonBackgroundColor?: string;
|
95
|
+
keyboardButtonTextColor?: string;
|
96
|
+
keyboardButtonHoverColor?: string;
|
97
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
7
|
+
for (let key of __getOwnPropNames(from))
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
10
|
+
}
|
11
|
+
return to;
|
12
|
+
};
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
14
|
+
|
15
|
+
// src/pro/priceKeyboard/components/cashKeyboard/types.ts
|
16
|
+
var types_exports = {};
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { DiscountKeyboardBaseProps } from './types';
|
3
|
+
import './index.less';
|
4
|
+
export interface DiscountKeyboardProps extends DiscountKeyboardBaseProps {
|
5
|
+
containerProps?: {
|
6
|
+
renderType: 'modal' | 'popover';
|
7
|
+
open?: boolean;
|
8
|
+
[key: string]: any;
|
9
|
+
};
|
10
|
+
children?: React.ReactNode;
|
11
|
+
}
|
12
|
+
declare const DiscountKeyboard: {
|
13
|
+
(props: DiscountKeyboardProps): JSX.Element | null;
|
14
|
+
InputNumber: (props: DiscountKeyboardInputNumberProps) => JSX.Element;
|
15
|
+
};
|
16
|
+
interface DiscountKeyboardInputNumberProps {
|
17
|
+
value?: number;
|
18
|
+
onChange?: (val: number) => void;
|
19
|
+
keyboardProps?: DiscountKeyboardProps;
|
20
|
+
[key: string]: any;
|
21
|
+
}
|
22
|
+
export default DiscountKeyboard;
|
@@ -0,0 +1,485 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
+
mod
|
26
|
+
));
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
|
29
|
+
// src/pro/priceKeyboard/components/discountKeyboard/index.tsx
|
30
|
+
var discountKeyboard_exports = {};
|
31
|
+
__export(discountKeyboard_exports, {
|
32
|
+
default: () => discountKeyboard_default
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(discountKeyboard_exports);
|
35
|
+
var import_react = __toESM(require("react"));
|
36
|
+
var import_antd = require("antd");
|
37
|
+
var import_decimal = __toESM(require("decimal.js"));
|
38
|
+
var import_utils = require("@pisell/utils");
|
39
|
+
var import_materials = require("@pisell/materials");
|
40
|
+
var import_ahooks = require("ahooks");
|
41
|
+
var import_rightItems = __toESM(require("../../hooks/rightItems"));
|
42
|
+
var import_keyActions = __toESM(require("../../hooks/keyActions"));
|
43
|
+
var import_utils2 = require("../../utils");
|
44
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
45
|
+
var import_locales = __toESM(require("./locales"));
|
46
|
+
var import_index = require("./index.less");
|
47
|
+
var DiscountKeyboardBase = (props) => {
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
49
|
+
const {
|
50
|
+
defaultValue,
|
51
|
+
originalValue,
|
52
|
+
selectType = "light",
|
53
|
+
resetText,
|
54
|
+
doneText,
|
55
|
+
onEnter,
|
56
|
+
onReset,
|
57
|
+
enableExceedMaxAmount = false
|
58
|
+
} = props;
|
59
|
+
const context = (0, import_useEngineContext.default)();
|
60
|
+
const [isFirstInput, setIsFirstInput] = (0, import_react.useState)(true);
|
61
|
+
import_utils.locales.init(
|
62
|
+
import_locales.default,
|
63
|
+
((_e = (_d = (_c = (_b = (_a = context.appHelper.utils) == null ? void 0 : _a.getApp) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.locales) == null ? void 0 : _d.getLocale) == null ? void 0 : _e.call(_d)) || ((_g = (_f = context.appHelper.utils) == null ? void 0 : _f.storage) == null ? void 0 : _g.get("umi_locale")) || "en"
|
64
|
+
);
|
65
|
+
const { getData } = context.appHelper.utils;
|
66
|
+
const amountSymbol = props.amountSymbol || (getData == null ? void 0 : getData("shop_symbol")) || "$";
|
67
|
+
const uniqueId = (0, import_react.useId)();
|
68
|
+
const uniqueKeyboardId = `virtual-keyboard-${uniqueId.replace(/:/g, "-")}`;
|
69
|
+
const [updateMode, setUpdateMode] = (0, import_react.useState)(
|
70
|
+
"priceOverride"
|
71
|
+
);
|
72
|
+
const [discountMode, setDiscountMode] = (0, import_react.useState)(
|
73
|
+
"amount"
|
74
|
+
);
|
75
|
+
const [internalValue, setInternalValue] = (0, import_react.useState)(
|
76
|
+
defaultValue ? String(defaultValue) : ""
|
77
|
+
);
|
78
|
+
const [discountValue, setDiscountValue] = (0, import_react.useState)("");
|
79
|
+
(0, import_react.useEffect)(() => {
|
80
|
+
document.body.id = "body";
|
81
|
+
}, []);
|
82
|
+
(0, import_react.useEffect)(() => {
|
83
|
+
(0, import_utils2.setKeyboardTheme)(selectType);
|
84
|
+
}, [selectType]);
|
85
|
+
const _onReset = (0, import_react.useCallback)(() => {
|
86
|
+
if (updateMode === "priceOverride") {
|
87
|
+
setInternalValue(originalValue ? String(originalValue) : "");
|
88
|
+
setIsFirstInput(true);
|
89
|
+
} else {
|
90
|
+
setDiscountValue("");
|
91
|
+
}
|
92
|
+
onReset == null ? void 0 : onReset();
|
93
|
+
}, [originalValue, onReset, updateMode]);
|
94
|
+
const _handleChange = (0, import_react.useCallback)(
|
95
|
+
(val) => {
|
96
|
+
if (updateMode === "priceOverride") {
|
97
|
+
setIsFirstInput(false);
|
98
|
+
setInternalValue(val);
|
99
|
+
} else {
|
100
|
+
setDiscountValue(val);
|
101
|
+
}
|
102
|
+
},
|
103
|
+
[updateMode]
|
104
|
+
);
|
105
|
+
const discountAmount = (0, import_react.useMemo)(() => {
|
106
|
+
const originalPrice = new import_decimal.default(originalValue || 0);
|
107
|
+
let discountAmount2 = new import_decimal.default(0);
|
108
|
+
if (updateMode === "priceOverride") {
|
109
|
+
discountAmount2 = originalPrice.minus(new import_decimal.default(internalValue || 0));
|
110
|
+
} else {
|
111
|
+
if (discountMode === "amount") {
|
112
|
+
discountAmount2 = new import_decimal.default(discountValue || 0);
|
113
|
+
} else {
|
114
|
+
const percentage = new import_decimal.default(discountValue || 0);
|
115
|
+
discountAmount2 = originalPrice.times(percentage.dividedBy(100));
|
116
|
+
}
|
117
|
+
}
|
118
|
+
return discountAmount2.toNumber();
|
119
|
+
}, [updateMode, discountMode, internalValue, discountValue, originalValue]);
|
120
|
+
const isDiscountError = (0, import_react.useMemo)(() => {
|
121
|
+
const _discountAmount = new import_decimal.default(discountAmount || 0);
|
122
|
+
return _discountAmount.lessThan(0) || _discountAmount.greaterThan(new import_decimal.default(originalValue || 0));
|
123
|
+
}, [discountAmount, originalValue]);
|
124
|
+
const payableAmount = (0, import_react.useMemo)(() => {
|
125
|
+
return new import_decimal.default(originalValue || 0).minus(discountAmount).toNumber();
|
126
|
+
}, [originalValue, discountAmount]);
|
127
|
+
const handleEnter = () => {
|
128
|
+
if (updateMode === "priceOverride" && enableExceedMaxAmount) {
|
129
|
+
onEnter == null ? void 0 : onEnter(String(discountAmount));
|
130
|
+
return;
|
131
|
+
}
|
132
|
+
if (isDiscountError) {
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
onEnter == null ? void 0 : onEnter(String(discountAmount));
|
136
|
+
};
|
137
|
+
const _max = (0, import_react.useMemo)(() => {
|
138
|
+
return updateMode === "discount" && discountMode === "percentage" ? 100 : void 0;
|
139
|
+
}, [updateMode, discountMode]);
|
140
|
+
const { handleChange } = (0, import_keyActions.default)({
|
141
|
+
onEnter: handleEnter,
|
142
|
+
onReset: _onReset,
|
143
|
+
onChange: _handleChange,
|
144
|
+
value: updateMode === "priceOverride" ? internalValue : discountValue,
|
145
|
+
max: _max,
|
146
|
+
mode: isFirstInput && updateMode === "priceOverride" ? "replace" : "append",
|
147
|
+
scale: 2
|
148
|
+
});
|
149
|
+
const rightItems = (0, import_rightItems.default)({
|
150
|
+
rightItemsStyle: {
|
151
|
+
doneButtonStyle: {
|
152
|
+
boxShadow: "0px 0px 1px #898A8D"
|
153
|
+
}
|
154
|
+
},
|
155
|
+
doneText: doneText || import_utils.locales.getText("discount-keyboard-done"),
|
156
|
+
resetText: resetText || import_utils.locales.getText("discount-keyboard-reset")
|
157
|
+
});
|
158
|
+
const formattedVal = (0, import_react.useMemo)(() => {
|
159
|
+
if (updateMode === "priceOverride") {
|
160
|
+
return internalValue ? `${amountSymbol}${internalValue}` : "";
|
161
|
+
}
|
162
|
+
if (discountMode === "amount") {
|
163
|
+
return discountValue ? `${amountSymbol}${discountValue}` : "";
|
164
|
+
} else {
|
165
|
+
return discountValue ? `${discountValue}%` : "";
|
166
|
+
}
|
167
|
+
}, [updateMode, discountMode, internalValue, discountValue, amountSymbol]);
|
168
|
+
const placeholder = (0, import_react.useMemo)(() => {
|
169
|
+
if (updateMode === "priceOverride") {
|
170
|
+
return `${amountSymbol}0`;
|
171
|
+
} else {
|
172
|
+
if (discountMode === "amount") {
|
173
|
+
return "0";
|
174
|
+
}
|
175
|
+
return "%";
|
176
|
+
}
|
177
|
+
}, [amountSymbol, updateMode, discountMode]);
|
178
|
+
const renderBottomContent = () => {
|
179
|
+
const style = {
|
180
|
+
color: isDiscountError ? "#D92D20" : "#079455"
|
181
|
+
};
|
182
|
+
const sign = new import_decimal.default(discountAmount).greaterThan(0) ? "+" : new import_decimal.default(discountAmount).lessThan(0) ? "-" : "";
|
183
|
+
const _maxDiscount = /* @__PURE__ */ import_react.default.createElement(
|
184
|
+
"div",
|
185
|
+
{
|
186
|
+
style: isDiscountError && !isFirstInput ? style : {},
|
187
|
+
className: "ellipsis"
|
188
|
+
},
|
189
|
+
import_utils.locales.getText("discount-keyboard-max-discount"),
|
190
|
+
":",
|
191
|
+
" ",
|
192
|
+
/* @__PURE__ */ import_react.default.createElement(
|
193
|
+
import_materials.PisellText.Amount,
|
194
|
+
{
|
195
|
+
hideDecimalForWholeNumbers: false,
|
196
|
+
precision: 2,
|
197
|
+
value: originalValue
|
198
|
+
}
|
199
|
+
)
|
200
|
+
);
|
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
|
+
};
|
221
|
+
const customDisplay = () => {
|
222
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
223
|
+
"div",
|
224
|
+
{
|
225
|
+
style: {
|
226
|
+
display: "flex",
|
227
|
+
gap: 8
|
228
|
+
}
|
229
|
+
},
|
230
|
+
/* @__PURE__ */ import_react.default.createElement(
|
231
|
+
import_materials.VirtualInput,
|
232
|
+
{
|
233
|
+
focused: true,
|
234
|
+
value: formattedVal,
|
235
|
+
wrapperStyle: {
|
236
|
+
padding: "12px 20px",
|
237
|
+
borderRadius: "8px",
|
238
|
+
backgroundColor: "white",
|
239
|
+
boxShadow: "0px 1px 2px rgba(16, 24, 40, 0.06)",
|
240
|
+
flex: "2",
|
241
|
+
overflow: "hidden"
|
242
|
+
},
|
243
|
+
placeholder,
|
244
|
+
bottomContent: renderBottomContent()
|
245
|
+
}
|
246
|
+
),
|
247
|
+
/* @__PURE__ */ import_react.default.createElement(
|
248
|
+
"div",
|
249
|
+
{
|
250
|
+
style: {
|
251
|
+
flex: "1",
|
252
|
+
display: "flex",
|
253
|
+
flexDirection: "column",
|
254
|
+
borderRadius: "8px",
|
255
|
+
backgroundColor: "#ffffff",
|
256
|
+
padding: 8,
|
257
|
+
boxShadow: "0px 1px 2px rgba(16, 24, 40, 0.06)",
|
258
|
+
overflow: "hidden"
|
259
|
+
}
|
260
|
+
},
|
261
|
+
/* @__PURE__ */ import_react.default.createElement(
|
262
|
+
"div",
|
263
|
+
{
|
264
|
+
style: {
|
265
|
+
flex: 1
|
266
|
+
}
|
267
|
+
},
|
268
|
+
/* @__PURE__ */ import_react.default.createElement(
|
269
|
+
"div",
|
270
|
+
{
|
271
|
+
style: {
|
272
|
+
color: "#667085",
|
273
|
+
fontSize: 12,
|
274
|
+
fontWeight: 500,
|
275
|
+
wordWrap: "break-word"
|
276
|
+
}
|
277
|
+
},
|
278
|
+
import_utils.locales.getText("discount-keyboard-total")
|
279
|
+
),
|
280
|
+
/* @__PURE__ */ import_react.default.createElement(
|
281
|
+
"div",
|
282
|
+
{
|
283
|
+
style: {
|
284
|
+
color: "#475467",
|
285
|
+
fontSize: 14,
|
286
|
+
fontWeight: 700,
|
287
|
+
wordWrap: "break-word"
|
288
|
+
}
|
289
|
+
},
|
290
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: originalValue })
|
291
|
+
)
|
292
|
+
),
|
293
|
+
/* @__PURE__ */ import_react.default.createElement(
|
294
|
+
"div",
|
295
|
+
{
|
296
|
+
style: {
|
297
|
+
flex: 1
|
298
|
+
}
|
299
|
+
},
|
300
|
+
/* @__PURE__ */ import_react.default.createElement(
|
301
|
+
"div",
|
302
|
+
{
|
303
|
+
style: {
|
304
|
+
color: "#667085",
|
305
|
+
fontSize: 12,
|
306
|
+
fontWeight: 500,
|
307
|
+
wordWrap: "break-word"
|
308
|
+
}
|
309
|
+
},
|
310
|
+
import_utils.locales.getText("discount-keyboard-payable")
|
311
|
+
),
|
312
|
+
/* @__PURE__ */ import_react.default.createElement(
|
313
|
+
"div",
|
314
|
+
{
|
315
|
+
style: {
|
316
|
+
color: isDiscountError ? "#f56565" : "#475467",
|
317
|
+
fontSize: 14,
|
318
|
+
fontWeight: 700,
|
319
|
+
wordWrap: "break-word"
|
320
|
+
}
|
321
|
+
},
|
322
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: payableAmount })
|
323
|
+
)
|
324
|
+
)
|
325
|
+
)
|
326
|
+
);
|
327
|
+
};
|
328
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-pro-price-keyboard-discount" }, /* @__PURE__ */ import_react.default.createElement(
|
329
|
+
import_antd.Segmented,
|
330
|
+
{
|
331
|
+
size: "large",
|
332
|
+
style: {
|
333
|
+
padding: 6
|
334
|
+
},
|
335
|
+
options: [
|
336
|
+
{
|
337
|
+
label: import_utils.locales.getText("discount-keyboard-price-override"),
|
338
|
+
value: "priceOverride"
|
339
|
+
},
|
340
|
+
{
|
341
|
+
label: import_utils.locales.getText("discount-keyboard-discount"),
|
342
|
+
value: "discount"
|
343
|
+
}
|
344
|
+
],
|
345
|
+
value: updateMode,
|
346
|
+
onChange: (val) => setUpdateMode(val),
|
347
|
+
block: true
|
348
|
+
}
|
349
|
+
), updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement(
|
350
|
+
import_antd.Segmented,
|
351
|
+
{
|
352
|
+
size: "large",
|
353
|
+
style: {
|
354
|
+
padding: 6
|
355
|
+
},
|
356
|
+
options: [
|
357
|
+
{
|
358
|
+
label: import_utils.locales.getText("discount-keyboard-amount") + ` (${amountSymbol})`,
|
359
|
+
value: "amount"
|
360
|
+
},
|
361
|
+
{
|
362
|
+
label: import_utils.locales.getText("discount-keyboard-percentage") + " (%)",
|
363
|
+
value: "percentage"
|
364
|
+
}
|
365
|
+
],
|
366
|
+
value: discountMode,
|
367
|
+
onChange: (val) => {
|
368
|
+
setDiscountMode(val);
|
369
|
+
setDiscountValue("");
|
370
|
+
},
|
371
|
+
block: true
|
372
|
+
}
|
373
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-pro-price-keyboard-content" }, customDisplay(), /* @__PURE__ */ import_react.default.createElement(
|
374
|
+
import_materials.Keyboard,
|
375
|
+
{
|
376
|
+
rightItems,
|
377
|
+
onChange: handleChange,
|
378
|
+
id: uniqueKeyboardId
|
379
|
+
}
|
380
|
+
)));
|
381
|
+
};
|
382
|
+
var DiscountKeyboard = (props) => {
|
383
|
+
const { containerProps, children, ...keyboardProps } = props;
|
384
|
+
if (!containerProps) {
|
385
|
+
return /* @__PURE__ */ import_react.default.createElement(DiscountKeyboardBase, { ...keyboardProps });
|
386
|
+
}
|
387
|
+
const { renderType, open, ...restProps } = containerProps || {};
|
388
|
+
if (renderType === "popover") {
|
389
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
390
|
+
import_antd.Popover,
|
391
|
+
{
|
392
|
+
key: `${open}`,
|
393
|
+
open,
|
394
|
+
trigger: "click",
|
395
|
+
className: "pisell-discount-keyboard-popover",
|
396
|
+
...restProps,
|
397
|
+
content: /* @__PURE__ */ import_react.default.createElement(DiscountKeyboardBase, { ...keyboardProps })
|
398
|
+
},
|
399
|
+
children
|
400
|
+
);
|
401
|
+
}
|
402
|
+
if (renderType === "modal") {
|
403
|
+
return open ? /* @__PURE__ */ import_react.default.createElement(
|
404
|
+
import_materials.PisellModal,
|
405
|
+
{
|
406
|
+
platform: "pc",
|
407
|
+
open: true,
|
408
|
+
width: "unset",
|
409
|
+
header: null,
|
410
|
+
footer: false,
|
411
|
+
mask: false,
|
412
|
+
maskClosable: true,
|
413
|
+
bodyStyle: { padding: "0px", backgroundColor: "transparent" },
|
414
|
+
closeIcon: null,
|
415
|
+
className: "pisell-discount-keyboard-modal",
|
416
|
+
destroyOnHidden: true,
|
417
|
+
...restProps
|
418
|
+
},
|
419
|
+
/* @__PURE__ */ import_react.default.createElement(DiscountKeyboardBase, { ...keyboardProps })
|
420
|
+
) : null;
|
421
|
+
}
|
422
|
+
return /* @__PURE__ */ import_react.default.createElement(DiscountKeyboardBase, { ...keyboardProps });
|
423
|
+
};
|
424
|
+
var DiscountKeyboardInputNumber = (props) => {
|
425
|
+
var _a;
|
426
|
+
const { originalValue, value, onChange, keyboardProps, ...rest } = props;
|
427
|
+
const [internalValue, setInternalValue] = (0, import_ahooks.useControllableValue)(props);
|
428
|
+
const [isOpen, setIsOpen] = (0, import_react.useState)(false);
|
429
|
+
const renderType = ((_a = keyboardProps == null ? void 0 : keyboardProps.containerProps) == null ? void 0 : _a.renderType) || "popover";
|
430
|
+
if (renderType === "modal") {
|
431
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
432
|
+
import_antd.InputNumber,
|
433
|
+
{
|
434
|
+
value,
|
435
|
+
readOnly: true,
|
436
|
+
...rest,
|
437
|
+
onClick: () => setIsOpen(true)
|
438
|
+
}
|
439
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
440
|
+
DiscountKeyboard,
|
441
|
+
{
|
442
|
+
...keyboardProps || {},
|
443
|
+
containerProps: {
|
444
|
+
...keyboardProps == null ? void 0 : keyboardProps.containerProps,
|
445
|
+
open: isOpen,
|
446
|
+
onCancel: () => setIsOpen(false),
|
447
|
+
renderType: "modal"
|
448
|
+
},
|
449
|
+
enableExceedMaxAmount: true,
|
450
|
+
defaultValue: internalValue,
|
451
|
+
onEnter: (val) => {
|
452
|
+
setInternalValue(
|
453
|
+
new import_decimal.default(originalValue).minus(Number(val)).toNumber()
|
454
|
+
);
|
455
|
+
setIsOpen(false);
|
456
|
+
},
|
457
|
+
originalValue
|
458
|
+
}
|
459
|
+
));
|
460
|
+
}
|
461
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
462
|
+
DiscountKeyboard,
|
463
|
+
{
|
464
|
+
...keyboardProps || {},
|
465
|
+
containerProps: {
|
466
|
+
...keyboardProps == null ? void 0 : keyboardProps.containerProps,
|
467
|
+
open: isOpen,
|
468
|
+
onOpenChange: (val) => setIsOpen(val),
|
469
|
+
renderType: "popover"
|
470
|
+
},
|
471
|
+
enableExceedMaxAmount: true,
|
472
|
+
defaultValue: internalValue,
|
473
|
+
onEnter: (val) => {
|
474
|
+
setInternalValue(
|
475
|
+
new import_decimal.default(originalValue).minus(Number(val)).toNumber()
|
476
|
+
);
|
477
|
+
setIsOpen(false);
|
478
|
+
},
|
479
|
+
originalValue
|
480
|
+
},
|
481
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, { value, readOnly: true, ...rest })
|
482
|
+
);
|
483
|
+
};
|
484
|
+
DiscountKeyboard.InputNumber = DiscountKeyboardInputNumber;
|
485
|
+
var discountKeyboard_default = DiscountKeyboard;
|
@@ -0,0 +1,47 @@
|
|
1
|
+
.pisell-pro-price-keyboard-discount {
|
2
|
+
width: 360px;
|
3
|
+
border-radius: 10px;
|
4
|
+
padding: 10px;
|
5
|
+
display: flex;
|
6
|
+
flex-direction: column;
|
7
|
+
gap: 10px;
|
8
|
+
background-color: var(--pisell-pro-price-keyboard-bg-color, #ffffff);
|
9
|
+
|
10
|
+
.ellipsis {
|
11
|
+
overflow: hidden;
|
12
|
+
text-overflow: ellipsis;
|
13
|
+
white-space: nowrap;
|
14
|
+
}
|
15
|
+
|
16
|
+
// 复写Segmented样式
|
17
|
+
.pisell-lowcode-segmented {
|
18
|
+
background-color: var(
|
19
|
+
--pisell-pro-price-keyboard-bg-color-gray-200,
|
20
|
+
#eaecf0
|
21
|
+
);
|
22
|
+
color: var(--pisell-pro-price-keyboard-text-gray-500, #667085);
|
23
|
+
}
|
24
|
+
|
25
|
+
.pisell-pro-price-keyboard-content {
|
26
|
+
width: 100%;
|
27
|
+
padding: 10px;
|
28
|
+
border-radius: 10px;
|
29
|
+
display: flex;
|
30
|
+
flex-direction: column;
|
31
|
+
gap: 8px;
|
32
|
+
background-color: var(
|
33
|
+
--pisell-pro-price-keyboard-bg-color-gray-300,
|
34
|
+
#d0d5dd
|
35
|
+
);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
.pisell-discount-keyboard-modal {
|
40
|
+
.pisell-lowcode-modal-content {
|
41
|
+
background-color: transparent;
|
42
|
+
}
|
43
|
+
|
44
|
+
.pisell-lowcode-modal-close {
|
45
|
+
display: none;
|
46
|
+
}
|
47
|
+
}
|