@pisell/private-materials 6.6.59 → 6.6.61
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 +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/components/footer/utils.js +79 -75
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/pisellCashCounting/PisellCashCounting.d.ts +5 -0
- package/es/components/pisellCashCounting/PisellCashCounting.js +121 -0
- package/es/components/pisellCashCounting/PisellCashCounting.less +263 -0
- package/es/components/pisellCashCounting/components/CashCountingModal/index.d.ts +20 -0
- package/es/components/pisellCashCounting/components/CashCountingModal/index.js +250 -0
- package/es/components/pisellCashCounting/components/CashCountingModal/index.less +279 -0
- package/es/components/pisellCashCounting/hooks.d.ts +21 -0
- package/es/components/pisellCashCounting/hooks.js +193 -0
- package/es/components/pisellCashCounting/index.d.ts +2 -0
- package/es/components/pisellCashCounting/index.js +1 -0
- package/es/components/pisellCashCounting/locales.d.ts +118 -0
- package/es/components/pisellCashCounting/locales.js +117 -0
- package/es/components/pisellCashCounting/types.d.ts +85 -0
- package/es/components/pisellCashCounting/types.js +1 -0
- package/es/components/pisellCashCounting/utils.d.ts +10 -0
- package/es/components/pisellCashCounting/utils.js +40 -0
- package/es/hooks/useResponsive.d.ts +8 -0
- package/es/hooks/useResponsive.js +43 -0
- package/es/hooks/useThemeTokens.d.ts +7 -0
- package/es/hooks/useThemeTokens.js +20 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/pro/NumericStepper/index.d.ts +75 -0
- package/es/pro/NumericStepper/index.js +301 -0
- package/es/pro/NumericStepper/index.less +364 -0
- package/es/pro/keyboards/index.d.ts +2 -0
- package/es/pro/keyboards/index.js +1 -0
- package/es/pro/keyboards/locales.d.ts +38 -0
- package/es/pro/keyboards/locales.js +57 -0
- package/es/pro/keyboards/numberKeyboard/index.d.ts +16 -0
- package/es/pro/keyboards/numberKeyboard/index.js +523 -0
- package/es/pro/keyboards/numberKeyboard/index.less +59 -0
- package/es/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/es/pro/keyboards/numberKeyboard/types.js +1 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +3 -1
- package/es/pro/pisellPriceKeyboardModal/types.d.ts +2 -0
- package/lib/components/booking/components/footer/utils.js +6 -3
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/pisellCashCounting/PisellCashCounting.d.ts +5 -0
- package/lib/components/pisellCashCounting/PisellCashCounting.js +168 -0
- package/lib/components/pisellCashCounting/PisellCashCounting.less +263 -0
- package/lib/components/pisellCashCounting/components/CashCountingModal/index.d.ts +20 -0
- package/lib/components/pisellCashCounting/components/CashCountingModal/index.js +171 -0
- package/lib/components/pisellCashCounting/components/CashCountingModal/index.less +279 -0
- package/lib/components/pisellCashCounting/hooks.d.ts +21 -0
- package/lib/components/pisellCashCounting/hooks.js +189 -0
- package/lib/components/pisellCashCounting/index.d.ts +2 -0
- package/lib/components/pisellCashCounting/index.js +35 -0
- package/lib/components/pisellCashCounting/locales.d.ts +118 -0
- package/lib/components/pisellCashCounting/locales.js +141 -0
- package/lib/components/pisellCashCounting/types.d.ts +85 -0
- package/lib/components/pisellCashCounting/types.js +17 -0
- package/lib/components/pisellCashCounting/utils.d.ts +10 -0
- package/lib/components/pisellCashCounting/utils.js +59 -0
- package/lib/hooks/useResponsive.d.ts +8 -0
- package/lib/hooks/useResponsive.js +48 -0
- package/lib/hooks/useThemeTokens.d.ts +7 -0
- package/lib/hooks/useThemeTokens.js +40 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/pro/NumericStepper/index.d.ts +75 -0
- package/lib/pro/NumericStepper/index.js +338 -0
- package/lib/pro/NumericStepper/index.less +364 -0
- package/lib/pro/keyboards/index.d.ts +2 -0
- package/lib/pro/keyboards/index.js +39 -0
- package/lib/pro/keyboards/locales.d.ts +38 -0
- package/lib/pro/keyboards/locales.js +61 -0
- package/lib/pro/keyboards/numberKeyboard/index.d.ts +16 -0
- package/lib/pro/keyboards/numberKeyboard/index.js +400 -0
- package/lib/pro/keyboards/numberKeyboard/index.less +59 -0
- package/lib/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/lib/pro/keyboards/numberKeyboard/types.js +17 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +3 -1
- package/lib/pro/pisellPriceKeyboardModal/types.d.ts +2 -0
- package/lowcode/pisell-cash-counting/meta.ts +167 -0
- package/lowcode/pisell-cash-counting/snippets.ts +13 -0
- package/package.json +4 -4
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type NumberKeyboardMode = 'integer' | 'decimal';
|
|
3
|
+
export interface NumberKeyboardBaseProps {
|
|
4
|
+
/** 模式:整数 or 小数 */
|
|
5
|
+
mode?: NumberKeyboardMode;
|
|
6
|
+
/** 当前值(受控) */
|
|
7
|
+
value?: string;
|
|
8
|
+
/** 默认值(非受控) */
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
/** 原始值,用于重置 */
|
|
11
|
+
originalValue?: string;
|
|
12
|
+
/** 占位符 */
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/** 最大值 */
|
|
15
|
+
max?: number;
|
|
16
|
+
/** 最小值 */
|
|
17
|
+
min?: number;
|
|
18
|
+
/** 最大长度 */
|
|
19
|
+
maxLength?: number;
|
|
20
|
+
/** 小数位数,默认 2 */
|
|
21
|
+
precision?: number;
|
|
22
|
+
/** 是否禁用 */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** 确认按钮文本 */
|
|
25
|
+
doneText?: string;
|
|
26
|
+
/** 重置按钮文本 */
|
|
27
|
+
resetText?: string;
|
|
28
|
+
/** 清空按钮文本 */
|
|
29
|
+
clearText?: string;
|
|
30
|
+
/** 标签文本(显示在输入框上方) */
|
|
31
|
+
label?: string;
|
|
32
|
+
/** 超出范围时的提示文本 */
|
|
33
|
+
errorText?: string;
|
|
34
|
+
/** 值变化回调 */
|
|
35
|
+
onChange?: (value: string) => void;
|
|
36
|
+
/** 确认按钮点击回调 */
|
|
37
|
+
onEnter?: (value: string) => void;
|
|
38
|
+
/** 重置按钮点击回调 */
|
|
39
|
+
onReset?: () => void;
|
|
40
|
+
/** 外层样式 */
|
|
41
|
+
style?: React.CSSProperties;
|
|
42
|
+
/** 自定义类名 */
|
|
43
|
+
className?: string;
|
|
44
|
+
/** 键盘是否监听物理键盘 */
|
|
45
|
+
keydown?: boolean;
|
|
46
|
+
/** 输入框样式 */
|
|
47
|
+
inputStyle?: React.CSSProperties;
|
|
48
|
+
/** 输入框包裹样式 */
|
|
49
|
+
inputWrapperStyle?: React.CSSProperties;
|
|
50
|
+
}
|
|
51
|
+
export interface NumberKeyboardProps extends NumberKeyboardBaseProps {
|
|
52
|
+
/** 容器配置,用于控制键盘以 popover 或 modal 形态展示 */
|
|
53
|
+
containerProps?: {
|
|
54
|
+
/** 渲染类型:popover 或 modal */
|
|
55
|
+
renderType: 'modal' | 'popover';
|
|
56
|
+
/** 是否打开(受控模式) */
|
|
57
|
+
open?: boolean;
|
|
58
|
+
/** 其他传递给 Popover 或 Modal 的属性 */
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
};
|
|
61
|
+
/** 子元素,用于 popover 模式的触发器 */
|
|
62
|
+
children?: React.ReactNode;
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -27,6 +27,7 @@ var PisellPriceKeyboardModal = function PisellPriceKeyboardModal(_ref) {
|
|
|
27
27
|
showCurrencySymbol = _ref$showCurrencySymb === void 0 ? true : _ref$showCurrencySymb,
|
|
28
28
|
_ref$useThousandsSepa = _ref.useThousandsSeparator,
|
|
29
29
|
useThousandsSeparator = _ref$useThousandsSepa === void 0 ? false : _ref$useThousandsSepa,
|
|
30
|
+
symbol = _ref.symbol,
|
|
30
31
|
className = _ref.className,
|
|
31
32
|
style = _ref.style;
|
|
32
33
|
var _useState = useState({
|
|
@@ -149,7 +150,8 @@ var PisellPriceKeyboardModal = function PisellPriceKeyboardModal(_ref) {
|
|
|
149
150
|
resetText: locales.getText('pisell2.booking.info.text.clear'),
|
|
150
151
|
amountProps: {
|
|
151
152
|
showCurrencySymbol: showCurrencySymbol,
|
|
152
|
-
useThousandsSeparator: useThousandsSeparator
|
|
153
|
+
useThousandsSeparator: useThousandsSeparator,
|
|
154
|
+
symbol: symbol
|
|
153
155
|
},
|
|
154
156
|
selectType: "dark",
|
|
155
157
|
backgroundColor: "transparent"
|
|
@@ -253,10 +253,13 @@ var formatHolders = (state, item, values) => {
|
|
|
253
253
|
return obj;
|
|
254
254
|
};
|
|
255
255
|
var formatProductPrice = (item) => {
|
|
256
|
-
var _a, _b, _c, _d;
|
|
256
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
257
257
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
258
258
|
let price = Number((item == null ? void 0 : item.price) ?? ((_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.price));
|
|
259
|
-
if ((
|
|
259
|
+
if ((0, import_utils5.isString)((_c = item._extend) == null ? void 0 : _c.priceOverride) || (0, import_utils5.isNumber)((_d = item._extend) == null ? void 0 : _d.priceOverride)) {
|
|
260
|
+
price = Number((_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.price);
|
|
261
|
+
}
|
|
262
|
+
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_f = item == null ? void 0 : item.variant) == null ? void 0 : _f.length) > 0) {
|
|
260
263
|
const variant = item.variant.find(
|
|
261
264
|
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
262
265
|
);
|
|
@@ -265,7 +268,7 @@ var formatProductPrice = (item) => {
|
|
|
265
268
|
}
|
|
266
269
|
}
|
|
267
270
|
if (other == null ? void 0 : other.option) {
|
|
268
|
-
price = (
|
|
271
|
+
price = (_g = other == null ? void 0 : other.option) == null ? void 0 : _g.reduce((pre, cur) => {
|
|
269
272
|
return pre + Number(cur.price) * Number(cur.num);
|
|
270
273
|
}, price);
|
|
271
274
|
}
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly" | "huifu">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -301,8 +301,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
301
301
|
amount?: string | number | undefined;
|
|
302
302
|
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
303
303
|
order_id?: string | number | undefined;
|
|
304
|
-
eftpos?: "stripe" | "
|
|
305
|
-
action?: "
|
|
304
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | "huifu" | undefined;
|
|
305
|
+
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
306
306
|
key?: number | undefined;
|
|
307
307
|
step?: number | undefined;
|
|
308
308
|
title?: string | undefined;
|
|
@@ -20,4 +20,5 @@ import PinModal from './pinModal';
|
|
|
20
20
|
import PinVerifyModal from './pinVerifyModal';
|
|
21
21
|
import { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from './authentication/admin';
|
|
22
22
|
import Registry from './systemSettings/registry';
|
|
23
|
-
|
|
23
|
+
import PisellCashCounting from './pisellCashCounting';
|
|
24
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, Registry, PisellCashCounting, };
|
package/lib/components/index.js
CHANGED
|
@@ -45,6 +45,7 @@ __export(components_exports, {
|
|
|
45
45
|
POSOperatorAuth: () => import_admin.POSOperatorAuth,
|
|
46
46
|
PinModal: () => import_pinModal.default,
|
|
47
47
|
PinVerifyModal: () => import_pinVerifyModal.default,
|
|
48
|
+
PisellCashCounting: () => import_pisellCashCounting.default,
|
|
48
49
|
PisellSelectCustomerModal: () => import_pisellSelectCustomerModal.default,
|
|
49
50
|
ProductExtension: () => import_productExtension.default,
|
|
50
51
|
Registry: () => import_registry.default,
|
|
@@ -83,6 +84,7 @@ var import_pinModal = __toESM(require("./pinModal"));
|
|
|
83
84
|
var import_pinVerifyModal = __toESM(require("./pinVerifyModal"));
|
|
84
85
|
var import_admin = require("./authentication/admin");
|
|
85
86
|
var import_registry = __toESM(require("./systemSettings/registry"));
|
|
87
|
+
var import_pisellCashCounting = __toESM(require("./pisellCashCounting"));
|
|
86
88
|
// Annotate the CommonJS export names for ESM import in node:
|
|
87
89
|
0 && (module.exports = {
|
|
88
90
|
Booking,
|
|
@@ -101,6 +103,7 @@ var import_registry = __toESM(require("./systemSettings/registry"));
|
|
|
101
103
|
POSOperatorAuth,
|
|
102
104
|
PinModal,
|
|
103
105
|
PinVerifyModal,
|
|
106
|
+
PisellCashCounting,
|
|
104
107
|
PisellSelectCustomerModal,
|
|
105
108
|
ProductExtension,
|
|
106
109
|
Registry,
|
|
@@ -0,0 +1,168 @@
|
|
|
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/components/pisellCashCounting/PisellCashCounting.tsx
|
|
30
|
+
var PisellCashCounting_exports = {};
|
|
31
|
+
__export(PisellCashCounting_exports, {
|
|
32
|
+
default: () => PisellCashCounting_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(PisellCashCounting_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_pisellPriceKeyboardModal = __toESM(require("../../pro/pisellPriceKeyboardModal"));
|
|
40
|
+
var import_locales = __toESM(require("./locales"));
|
|
41
|
+
var import_materials = require("@pisell/materials");
|
|
42
|
+
var import_CashCountingModal = __toESM(require("./components/CashCountingModal/index"));
|
|
43
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
44
|
+
var import_hooks = require("./hooks");
|
|
45
|
+
var import_PisellCashCounting = require("./PisellCashCounting.less");
|
|
46
|
+
var PREFIX = "pisell-private-cash-counting";
|
|
47
|
+
var PisellCashCounting = (props) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
const context = (0, import_useEngineContext.default)();
|
|
50
|
+
import_utils.locales.init(import_locales.default, ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en");
|
|
51
|
+
const {
|
|
52
|
+
disabled = false,
|
|
53
|
+
countDisabled = false,
|
|
54
|
+
placeholder,
|
|
55
|
+
layout = "vertical",
|
|
56
|
+
countCashButtonText,
|
|
57
|
+
showCurrencySymbol = true,
|
|
58
|
+
useThousandsSeparator = false,
|
|
59
|
+
inputNumberProps,
|
|
60
|
+
buttonProps,
|
|
61
|
+
className,
|
|
62
|
+
style,
|
|
63
|
+
modalWidth
|
|
64
|
+
} = props;
|
|
65
|
+
const {
|
|
66
|
+
modalRef,
|
|
67
|
+
triggerRef,
|
|
68
|
+
keyboardOpen,
|
|
69
|
+
setKeyboardOpen,
|
|
70
|
+
currencyDenominations,
|
|
71
|
+
decimalPlaces,
|
|
72
|
+
symbol,
|
|
73
|
+
currencyCode,
|
|
74
|
+
currentValue,
|
|
75
|
+
handleAmountChange,
|
|
76
|
+
handleKeyboardClose,
|
|
77
|
+
openCountModal,
|
|
78
|
+
handleCountCancel,
|
|
79
|
+
handleCountConfirm,
|
|
80
|
+
manualCountMismatchOpen,
|
|
81
|
+
confirmUseCountedTotal,
|
|
82
|
+
confirmKeepManualAmount
|
|
83
|
+
} = (0, import_hooks.usePisellCashCounting)(props);
|
|
84
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(PREFIX, className), style }, /* @__PURE__ */ import_react.default.createElement(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: (0, import_classnames.default)(`${PREFIX}__field`, {
|
|
88
|
+
[`${PREFIX}__field--horizontal`]: layout === "horizontal"
|
|
89
|
+
}),
|
|
90
|
+
ref: triggerRef
|
|
91
|
+
},
|
|
92
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
93
|
+
import_antd.InputNumber,
|
|
94
|
+
{
|
|
95
|
+
...inputNumberProps,
|
|
96
|
+
controls: false,
|
|
97
|
+
disabled,
|
|
98
|
+
precision: decimalPlaces,
|
|
99
|
+
value: currentValue,
|
|
100
|
+
placeholder: placeholder ?? import_utils.locales.getText("pisell-cash-counting.placeholder"),
|
|
101
|
+
className: (0, import_classnames.default)(`${PREFIX}__input`, inputNumberProps == null ? void 0 : inputNumberProps.className),
|
|
102
|
+
readOnly: true,
|
|
103
|
+
addonBefore: symbol,
|
|
104
|
+
size: "large",
|
|
105
|
+
style: { width: "100%" },
|
|
106
|
+
onClick: () => {
|
|
107
|
+
if (!disabled) {
|
|
108
|
+
setKeyboardOpen(true);
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
onChange: handleAmountChange
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
115
|
+
import_antd.Button,
|
|
116
|
+
{
|
|
117
|
+
...buttonProps,
|
|
118
|
+
type: "primary",
|
|
119
|
+
disabled: disabled || countDisabled || (buttonProps == null ? void 0 : buttonProps.disabled),
|
|
120
|
+
className: (0, import_classnames.default)(`${PREFIX}__button`, buttonProps == null ? void 0 : buttonProps.className),
|
|
121
|
+
onClick: (event) => {
|
|
122
|
+
var _a2;
|
|
123
|
+
(_a2 = buttonProps == null ? void 0 : buttonProps.onClick) == null ? void 0 : _a2.call(buttonProps, event);
|
|
124
|
+
openCountModal();
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
countCashButtonText ?? import_utils.locales.getText("pisell-cash-counting.countCash")
|
|
128
|
+
)
|
|
129
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
130
|
+
import_pisellPriceKeyboardModal.default,
|
|
131
|
+
{
|
|
132
|
+
symbol,
|
|
133
|
+
visible: keyboardOpen,
|
|
134
|
+
value: currentValue,
|
|
135
|
+
triggerRef,
|
|
136
|
+
showCurrencySymbol,
|
|
137
|
+
useThousandsSeparator,
|
|
138
|
+
onChange: handleAmountChange,
|
|
139
|
+
onClose: handleKeyboardClose
|
|
140
|
+
}
|
|
141
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
142
|
+
import_materials.PisellModal.Information,
|
|
143
|
+
{
|
|
144
|
+
open: manualCountMismatchOpen,
|
|
145
|
+
closable: false,
|
|
146
|
+
maskClosable: false,
|
|
147
|
+
title: import_utils.locales.getText("pisell-cash-counting.manual-vs-count-message-title"),
|
|
148
|
+
describe: import_utils.locales.getText("pisell-cash-counting.manual-vs-count-message"),
|
|
149
|
+
okText: import_utils.locales.getText("pisell-cash-counting.keep-manual-amount"),
|
|
150
|
+
cancelText: import_utils.locales.getText("pisell-cash-counting.use-count-total"),
|
|
151
|
+
onOk: confirmKeepManualAmount,
|
|
152
|
+
onCancel: confirmUseCountedTotal
|
|
153
|
+
}
|
|
154
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
155
|
+
import_CashCountingModal.default,
|
|
156
|
+
{
|
|
157
|
+
ref: modalRef,
|
|
158
|
+
modalWidth,
|
|
159
|
+
currencyCode,
|
|
160
|
+
currencyDenominations,
|
|
161
|
+
decimalPlaces,
|
|
162
|
+
symbol,
|
|
163
|
+
onCancel: handleCountCancel,
|
|
164
|
+
onConfirm: handleCountConfirm
|
|
165
|
+
}
|
|
166
|
+
));
|
|
167
|
+
};
|
|
168
|
+
var PisellCashCounting_default = PisellCashCounting;
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
.pisell-private-cash-counting {
|
|
2
|
+
&__field {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 10px;
|
|
6
|
+
|
|
7
|
+
&--horizontal {
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
align-items: center;
|
|
10
|
+
flex-wrap: nowrap;
|
|
11
|
+
|
|
12
|
+
.pisell-private-cash-counting__input {
|
|
13
|
+
flex: 1;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pisell-private-cash-counting__button {
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pisell-lowcode-input-number-wrapper{
|
|
24
|
+
width: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__input {
|
|
28
|
+
input {
|
|
29
|
+
width: 100%;
|
|
30
|
+
min-width: none;
|
|
31
|
+
max-width: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__button {
|
|
36
|
+
width: max-content;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__modal {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
height: min(720px, calc(90vh - 72px));
|
|
43
|
+
min-height: 520px;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&__modal-intro {
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
padding: 16px 24px 12px;
|
|
50
|
+
border-bottom: 1px solid #eaecf0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__subtitle {
|
|
54
|
+
color: #667085;
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
line-height: 20px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&__currency {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
min-height: 28px;
|
|
63
|
+
margin-top: 12px;
|
|
64
|
+
padding: 4px 10px;
|
|
65
|
+
border-radius: 999px;
|
|
66
|
+
background: #f2f4f7;
|
|
67
|
+
color: #344054;
|
|
68
|
+
font-size: 13px;
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__scroll {
|
|
73
|
+
flex: 1;
|
|
74
|
+
min-height: 0;
|
|
75
|
+
overflow-y: auto;
|
|
76
|
+
padding: 20px 24px 24px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__empty {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
min-height: 220px;
|
|
84
|
+
color: #98a2b3;
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__section+&__section {
|
|
89
|
+
margin-top: 24px;
|
|
90
|
+
padding-top: 24px;
|
|
91
|
+
border-top: 1px solid #f2f4f7;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__section-header {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: space-between;
|
|
98
|
+
gap: 16px;
|
|
99
|
+
margin-bottom: 12px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&__section-title {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
gap: 8px;
|
|
106
|
+
color: #667085;
|
|
107
|
+
font-size: 14px;
|
|
108
|
+
font-weight: 700;
|
|
109
|
+
letter-spacing: 0.04em;
|
|
110
|
+
text-transform: uppercase;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&__dot {
|
|
114
|
+
width: 8px;
|
|
115
|
+
height: 8px;
|
|
116
|
+
border-radius: 50%;
|
|
117
|
+
background: #635bff;
|
|
118
|
+
|
|
119
|
+
&--coin {
|
|
120
|
+
background: #f59e0b;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&__section-subtotal {
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
gap: 10px;
|
|
128
|
+
color: #667085;
|
|
129
|
+
font-size: 14px;
|
|
130
|
+
|
|
131
|
+
strong {
|
|
132
|
+
color: #101828;
|
|
133
|
+
font-size: 15px;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&__denomination-list {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
gap: 12px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&__denomination-row {
|
|
144
|
+
display: grid;
|
|
145
|
+
grid-template-columns: 92px minmax(150px, 220px) minmax(92px, 1fr);
|
|
146
|
+
align-items: center;
|
|
147
|
+
gap: 16px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&__denomination-label {
|
|
151
|
+
display: inline-flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
min-width: 78px;
|
|
155
|
+
height: 32px;
|
|
156
|
+
padding: 0 12px;
|
|
157
|
+
border-radius: 6px;
|
|
158
|
+
background: #dbeafe;
|
|
159
|
+
color: #175cd3;
|
|
160
|
+
font-size: 14px;
|
|
161
|
+
font-weight: 700;
|
|
162
|
+
|
|
163
|
+
&--coin {
|
|
164
|
+
background: #fef3c7;
|
|
165
|
+
color: #92400e;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&__stepper {
|
|
170
|
+
&.numeric-stepper {
|
|
171
|
+
gap: 8px;
|
|
172
|
+
grid-template-columns: auto auto auto;
|
|
173
|
+
justify-content: flex-start;
|
|
174
|
+
width: auto;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.numeric-stepper-button {
|
|
178
|
+
width: 32px;
|
|
179
|
+
height: 32px;
|
|
180
|
+
border-radius: 6px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.numeric-stepper-display {
|
|
184
|
+
width: 60px;
|
|
185
|
+
height: 32px;
|
|
186
|
+
max-width: 70px;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&__row-amount {
|
|
191
|
+
justify-self: end;
|
|
192
|
+
color: #98a2b3;
|
|
193
|
+
font-size: 15px;
|
|
194
|
+
font-weight: 700;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&__footer {
|
|
198
|
+
flex-shrink: 0;
|
|
199
|
+
padding: 20px 24px 24px;
|
|
200
|
+
border-top: 1px solid #eaecf0;
|
|
201
|
+
background: #ffffff;
|
|
202
|
+
box-shadow: 0 -8px 20px rgba(16, 24, 40, 0.04);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&__summary {
|
|
206
|
+
padding-bottom: 16px;
|
|
207
|
+
border-bottom: 1px dashed #d0d5dd;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&__summary-row,
|
|
211
|
+
&__total-row {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: space-between;
|
|
215
|
+
gap: 16px;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&__summary-row {
|
|
219
|
+
color: #667085;
|
|
220
|
+
font-size: 15px;
|
|
221
|
+
|
|
222
|
+
+.pisell-private-cash-counting__summary-row {
|
|
223
|
+
margin-top: 10px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
strong {
|
|
227
|
+
color: #101828;
|
|
228
|
+
font-size: 16px;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&__total-row {
|
|
233
|
+
margin-top: 16px;
|
|
234
|
+
color: #101828;
|
|
235
|
+
font-size: 18px;
|
|
236
|
+
font-weight: 700;
|
|
237
|
+
|
|
238
|
+
strong {
|
|
239
|
+
color: #5b4be8;
|
|
240
|
+
font-size: 34px;
|
|
241
|
+
line-height: 40px;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&__actions {
|
|
246
|
+
display: grid;
|
|
247
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
248
|
+
gap: 12px;
|
|
249
|
+
margin-top: 18px;
|
|
250
|
+
|
|
251
|
+
.pisell-lowcode-btn {
|
|
252
|
+
margin: 0;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.pisell-lowcode-modal-root {
|
|
258
|
+
.pisell-private-cash-counting__modal-wrap {
|
|
259
|
+
.pisell-lowcode-modal-body {
|
|
260
|
+
overflow: hidden;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CashCountingConfirmPayload, CurrencyDenominationConfig } from '../../types';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface PisellCashCountingModalRef {
|
|
5
|
+
open: (config: {
|
|
6
|
+
initialQuantities: Record<string, number>;
|
|
7
|
+
}) => void;
|
|
8
|
+
close: () => void;
|
|
9
|
+
}
|
|
10
|
+
interface PisellCashCountingModalProps {
|
|
11
|
+
currencyCode: string;
|
|
12
|
+
currencyDenominations: CurrencyDenominationConfig[];
|
|
13
|
+
decimalPlaces: number;
|
|
14
|
+
symbol: string;
|
|
15
|
+
modalWidth?: number | string;
|
|
16
|
+
onCancel: () => void;
|
|
17
|
+
onConfirm: (payload: CashCountingConfirmPayload) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const CashCountingModal: React.ForwardRefExoticComponent<PisellCashCountingModalProps & React.RefAttributes<PisellCashCountingModalRef>>;
|
|
20
|
+
export default CashCountingModal;
|