@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,11 @@
|
|
1
|
+
import { CashKeyboardBaseProps } from './types';
|
2
|
+
export interface CashKeyboardProps extends CashKeyboardBaseProps {
|
3
|
+
containerProps?: {
|
4
|
+
renderType: 'modal' | 'popover';
|
5
|
+
open: boolean;
|
6
|
+
[key: string]: any;
|
7
|
+
};
|
8
|
+
variant?: 'intact' | 'simple';
|
9
|
+
}
|
10
|
+
declare const CashKeyboard: (props: CashKeyboardProps) => JSX.Element;
|
11
|
+
export default CashKeyboard;
|
@@ -0,0 +1,49 @@
|
|
1
|
+
var _excluded = ["variant", "value", "onChange"];
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
|
+
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."); }
|
5
|
+
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); }
|
6
|
+
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; }
|
7
|
+
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; } }
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
11
|
+
import React from 'react';
|
12
|
+
import { useControllableValue } from 'ahooks';
|
13
|
+
//@ts-ignore
|
14
|
+
import { locales } from '@pisell/utils';
|
15
|
+
import CashKeyboardSimple from "./CashKeyboardSimple";
|
16
|
+
import CashKeyboardIntact from "./CashKeyboardIntact";
|
17
|
+
import localeTexts from "./locales";
|
18
|
+
import useEngineContext from "../../../../hooks/useEngineContext";
|
19
|
+
var CashKeyboard = function CashKeyboard(props) {
|
20
|
+
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4;
|
21
|
+
var context = useEngineContext();
|
22
|
+
locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getApp) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.locales) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut2.getLocale) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2)) || ((_context$appHelper$ut4 = context.appHelper.utils) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.storage) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.get('umi_locale')) || 'en');
|
23
|
+
var getData = context.appHelper.utils.getData;
|
24
|
+
var amountSymbol = props.amountSymbol || (getData === null || getData === void 0 ? void 0 : getData('shop_symbol')) || '$';
|
25
|
+
var _props$variant = props.variant,
|
26
|
+
variant = _props$variant === void 0 ? 'intact' : _props$variant,
|
27
|
+
value = props.value,
|
28
|
+
onChange = props.onChange,
|
29
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
30
|
+
var _useControllableValue = useControllableValue(props),
|
31
|
+
_useControllableValue2 = _slicedToArray(_useControllableValue, 2),
|
32
|
+
internalValue = _useControllableValue2[0],
|
33
|
+
setInternalValue = _useControllableValue2[1];
|
34
|
+
if (variant === 'intact') {
|
35
|
+
return /*#__PURE__*/React.createElement(CashKeyboardIntact, _extends({}, otherProps, {
|
36
|
+
amountSymbol: amountSymbol,
|
37
|
+
value: internalValue,
|
38
|
+
placeholder: "".concat(amountSymbol, "0"),
|
39
|
+
onChange: setInternalValue
|
40
|
+
}));
|
41
|
+
}
|
42
|
+
return /*#__PURE__*/React.createElement(CashKeyboardSimple, _extends({}, otherProps, {
|
43
|
+
amountSymbol: amountSymbol,
|
44
|
+
placeholder: "".concat(amountSymbol, "0"),
|
45
|
+
value: internalValue,
|
46
|
+
onChange: setInternalValue
|
47
|
+
}));
|
48
|
+
};
|
49
|
+
export default CashKeyboard;
|
@@ -0,0 +1,103 @@
|
|
1
|
+
.pisell-cash-keyboard {
|
2
|
+
&-title {
|
3
|
+
font-size: 16px;
|
4
|
+
font-weight: 600;
|
5
|
+
line-height: 24px;
|
6
|
+
}
|
7
|
+
&-subtitle {
|
8
|
+
font-size: 14px;
|
9
|
+
font-weight: 400;
|
10
|
+
line-height: 20px;
|
11
|
+
}
|
12
|
+
|
13
|
+
&-intact {
|
14
|
+
width: 402px;
|
15
|
+
background-color: #fcfcfd;
|
16
|
+
display: flex;
|
17
|
+
flex-direction: column;
|
18
|
+
gap: 8px;
|
19
|
+
|
20
|
+
.pisell-cash-keyboard-title {
|
21
|
+
color: '#101828';
|
22
|
+
}
|
23
|
+
|
24
|
+
.pisell-cash-keyboard-subtitle {
|
25
|
+
color: '#101828';
|
26
|
+
}
|
27
|
+
|
28
|
+
&.disabled {
|
29
|
+
.pisell-cash-keyboard-intact-container {
|
30
|
+
border: 1px solid #d0d5dd !important;
|
31
|
+
}
|
32
|
+
.pisell-virtual-input-wrapper {
|
33
|
+
background-color: #eaecf0 !important;
|
34
|
+
border: 0 !important;
|
35
|
+
box-shadow: none !important;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
.pisell-cash-keyboard-intact-container {
|
40
|
+
width: unset;
|
41
|
+
border: 1px solid #7f56da;
|
42
|
+
border-radius: 8px;
|
43
|
+
padding: 8px;
|
44
|
+
display: flex;
|
45
|
+
flex-direction: column;
|
46
|
+
gap: 4px;
|
47
|
+
|
48
|
+
.pisell-cash-keyboard-intact-container-top {
|
49
|
+
display: flex;
|
50
|
+
flex-direction: column;
|
51
|
+
justify-content: center;
|
52
|
+
gap: 4px;
|
53
|
+
padding-top: 4px;
|
54
|
+
|
55
|
+
.pisell-cash-keyboard-intact-container-top-label {
|
56
|
+
font-size: 14px;
|
57
|
+
color: #667085;
|
58
|
+
}
|
59
|
+
|
60
|
+
.pisell-cash-keyboard-intact-container-top-value {
|
61
|
+
font-size: 18px;
|
62
|
+
font-weight: bold;
|
63
|
+
color: #475467;
|
64
|
+
flex: 1;
|
65
|
+
overflow: hidden;
|
66
|
+
display: -webkit-box;
|
67
|
+
-webkit-line-clamp: 2;
|
68
|
+
-webkit-box-orient: vertical;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
&-simple {
|
75
|
+
padding: 10px;
|
76
|
+
width: 360px;
|
77
|
+
border-radius: 10px;
|
78
|
+
display: flex;
|
79
|
+
flex-direction: column;
|
80
|
+
gap: 8px;
|
81
|
+
background-color: var(
|
82
|
+
--pisell-pro-price-keyboard-wrapper-bg-color,
|
83
|
+
#eaecf0
|
84
|
+
);
|
85
|
+
|
86
|
+
.pisell-cash-keyboard-title {
|
87
|
+
color: var(--pisell-pro-price-keyboard-title-color, #101828);
|
88
|
+
}
|
89
|
+
.pisell-cash-keyboard-subtitle {
|
90
|
+
color: var(--pisell-pro-price-keyboard-subtitle-color, #667085);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
.pisell-case-keyboard-simple-modal {
|
96
|
+
.pisell-lowcode-modal-content {
|
97
|
+
background-color: transparent;
|
98
|
+
}
|
99
|
+
|
100
|
+
.pisell-lowcode-modal-close {
|
101
|
+
display: none;
|
102
|
+
}
|
103
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
en: {
|
3
|
+
'cash-keyboard-title': string;
|
4
|
+
'cash-keyboard-balance-due': string;
|
5
|
+
'cash-keyboard-cash-received': string;
|
6
|
+
'cash-keyboard-change-due': string;
|
7
|
+
'cash-keyboard-rounding': string;
|
8
|
+
'cash-keyboard-other': string;
|
9
|
+
'cash-keyboard-reset': string;
|
10
|
+
'cash-keyboard-done': string;
|
11
|
+
'cash-keyboard-pay': string;
|
12
|
+
'cash-keyboard-amount-cannot-be-zero': string;
|
13
|
+
};
|
14
|
+
'zh-CN': {
|
15
|
+
'cash-keyboard-title': string;
|
16
|
+
'cash-keyboard-balance-due': string;
|
17
|
+
'cash-keyboard-cash-received': string;
|
18
|
+
'cash-keyboard-change-due': string;
|
19
|
+
'cash-keyboard-rounding': string;
|
20
|
+
'cash-keyboard-other': string;
|
21
|
+
'cash-keyboard-reset': string;
|
22
|
+
'cash-keyboard-done': string;
|
23
|
+
'cash-keyboard-pay': string;
|
24
|
+
'cash-keyboard-amount-cannot-be-zero': string;
|
25
|
+
};
|
26
|
+
'zh-HK': {
|
27
|
+
'cash-keyboard-title': string;
|
28
|
+
'cash-keyboard-balance-due': string;
|
29
|
+
'cash-keyboard-cash-received': string;
|
30
|
+
'cash-keyboard-change-due': string;
|
31
|
+
'cash-keyboard-rounding': string;
|
32
|
+
'cash-keyboard-other': string;
|
33
|
+
'cash-keyboard-reset': string;
|
34
|
+
'cash-keyboard-done': string;
|
35
|
+
'cash-keyboard-pay': string;
|
36
|
+
'cash-keyboard-amount-cannot-be-zero': string;
|
37
|
+
};
|
38
|
+
};
|
39
|
+
export default _default;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
export default {
|
2
|
+
en: {
|
3
|
+
// Cash Payment Module
|
4
|
+
'cash-keyboard-title': 'Cash Payment',
|
5
|
+
'cash-keyboard-balance-due': 'Balance Due',
|
6
|
+
'cash-keyboard-cash-received': 'Cash Received',
|
7
|
+
'cash-keyboard-change-due': 'Change Due',
|
8
|
+
'cash-keyboard-rounding': 'Rounding',
|
9
|
+
'cash-keyboard-other': 'Other',
|
10
|
+
'cash-keyboard-reset': 'Reset',
|
11
|
+
'cash-keyboard-done': 'Done',
|
12
|
+
'cash-keyboard-pay': 'Pay',
|
13
|
+
'cash-keyboard-amount-cannot-be-zero': 'The amount cannot be 0'
|
14
|
+
},
|
15
|
+
'zh-CN': {
|
16
|
+
// 现金支付模块
|
17
|
+
'cash-keyboard-title': '现金支付',
|
18
|
+
'cash-keyboard-balance-due': '待支付金额',
|
19
|
+
'cash-keyboard-cash-received': '实收金额',
|
20
|
+
'cash-keyboard-change-due': '找零',
|
21
|
+
'cash-keyboard-rounding': '抹零',
|
22
|
+
'cash-keyboard-other': '其他金额',
|
23
|
+
'cash-keyboard-reset': '重置',
|
24
|
+
'cash-keyboard-done': '确认',
|
25
|
+
'cash-keyboard-pay': '支付',
|
26
|
+
'cash-keyboard-amount-cannot-be-zero': '金额不能为0'
|
27
|
+
},
|
28
|
+
'zh-HK': {
|
29
|
+
// 現金支付模組
|
30
|
+
'cash-keyboard-title': '現金支付',
|
31
|
+
'cash-keyboard-balance-due': '待支付金額',
|
32
|
+
'cash-keyboard-cash-received': '實收金額',
|
33
|
+
'cash-keyboard-change-due': '找零',
|
34
|
+
'cash-keyboard-rounding': '抹零',
|
35
|
+
'cash-keyboard-other': '其他金額',
|
36
|
+
'cash-keyboard-reset': '重置',
|
37
|
+
'cash-keyboard-done': '確認',
|
38
|
+
'cash-keyboard-pay': '支付',
|
39
|
+
'cash-keyboard-amount-cannot-be-zero': '金額不能為0'
|
40
|
+
}
|
41
|
+
};
|
@@ -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 @@
|
|
1
|
+
export {};
|
@@ -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;
|