@pisell/private-materials 3.4.76 → 3.4.78
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/hooks/useTranslationOriginal.d.ts +1 -0
- package/es/hooks/useTranslationOriginal.js +10 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +3 -0
- package/es/plus/clientCard/index.d.ts +7 -0
- package/es/plus/clientCard/index.js +462 -0
- package/es/plus/clientCard/index.less +515 -0
- package/es/plus/clientCard/line/index.d.ts +9 -0
- package/es/plus/clientCard/line/index.js +157 -0
- package/es/plus/clientCard/line/index.less +142 -0
- package/es/plus/clientCard/locales.d.ts +18 -0
- package/es/plus/clientCard/locales.js +17 -0
- package/es/plus/clientCard/types.d.ts +135 -0
- package/es/plus/clientCard/types.js +1 -0
- package/es/plus/clientCard/utils.d.ts +8 -0
- package/es/plus/clientCard/utils.js +59 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
- package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
- package/es/plus/clinetSearch/Add/index.d.ts +18 -0
- package/es/plus/clinetSearch/Add/index.js +213 -0
- package/es/plus/clinetSearch/Add/index.less +30 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
- package/es/plus/clinetSearch/index.d.ts +18 -0
- package/es/plus/clinetSearch/index.js +234 -0
- package/es/plus/clinetSearch/index.less +95 -0
- package/es/plus/clinetSearch/locales.d.ts +108 -0
- package/es/plus/clinetSearch/locales.js +107 -0
- package/es/plus/clinetSearch/serve.d.ts +1 -0
- package/es/plus/clinetSearch/serve.js +31 -0
- package/es/plus/clinetSearch/types.d.ts +70 -0
- package/es/plus/clinetSearch/types.js +1 -0
- package/es/plus/saasAttendance/locales.d.ts +63 -0
- package/es/plus/saasAttendance/locales.js +71 -2
- package/es/plus/saasAttendance/settings/PermissonTab.d.ts +5 -0
- package/es/plus/saasAttendance/settings/PermissonTab.js +79 -0
- package/es/plus/saasAttendance/settings/ShiftScheduleTab.js +9 -3
- package/es/plus/saasAttendance/settings/components/MapField.js +69 -33
- package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.d.ts +7 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.js +149 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.less +119 -0
- package/es/plus/saasAttendance/settings/index.js +7 -0
- package/es/plus/saasAttendance/settings/index.less +15 -0
- package/es/plus/saasAttendance/settings/types.d.ts +6 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +104 -39
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.js +19 -2
- package/es/plus/walletPassGallery/index.d.ts +4 -0
- package/es/plus/walletPassGallery/index.js +121 -42
- package/es/plus/walletPassGallery/serve.d.ts +3 -1
- package/es/plus/walletPassGallery/serve.js +13 -13
- package/es/pro/pisellPhoneKeyboard/index.d.ts +13 -0
- package/es/pro/pisellPhoneKeyboard/index.js +210 -0
- package/es/pro/pisellPhoneKeyboard/index.less +157 -0
- package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
- package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/hooks/useTranslationOriginal.d.ts +1 -0
- package/lib/hooks/useTranslationOriginal.js +42 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/lib/plus/clientCard/index.d.ts +7 -0
- package/lib/plus/clientCard/index.js +457 -0
- package/lib/plus/clientCard/index.less +515 -0
- package/lib/plus/clientCard/line/index.d.ts +9 -0
- package/lib/plus/clientCard/line/index.js +153 -0
- package/lib/plus/clientCard/line/index.less +142 -0
- package/lib/plus/clientCard/locales.d.ts +18 -0
- package/lib/plus/clientCard/locales.js +41 -0
- package/lib/plus/clientCard/types.d.ts +135 -0
- package/lib/plus/clientCard/types.js +17 -0
- package/lib/plus/clientCard/utils.d.ts +8 -0
- package/lib/plus/clientCard/utils.js +75 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
- package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
- package/lib/plus/clinetSearch/Add/index.js +244 -0
- package/lib/plus/clinetSearch/Add/index.less +30 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
- package/lib/plus/clinetSearch/index.d.ts +18 -0
- package/lib/plus/clinetSearch/index.js +237 -0
- package/lib/plus/clinetSearch/index.less +95 -0
- package/lib/plus/clinetSearch/locales.d.ts +108 -0
- package/lib/plus/clinetSearch/locales.js +131 -0
- package/lib/plus/clinetSearch/serve.d.ts +1 -0
- package/lib/plus/clinetSearch/serve.js +33 -0
- package/lib/plus/clinetSearch/types.d.ts +70 -0
- package/lib/plus/clinetSearch/types.js +17 -0
- package/lib/plus/saasAttendance/locales.d.ts +63 -0
- package/lib/plus/saasAttendance/locales.js +65 -2
- package/lib/plus/saasAttendance/settings/PermissonTab.d.ts +5 -0
- package/lib/plus/saasAttendance/settings/PermissonTab.js +128 -0
- package/lib/plus/saasAttendance/settings/ShiftScheduleTab.js +2 -1
- package/lib/plus/saasAttendance/settings/components/MapField.js +50 -11
- package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.d.ts +7 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.js +150 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.less +119 -0
- package/lib/plus/saasAttendance/settings/index.js +12 -0
- package/lib/plus/saasAttendance/settings/index.less +15 -0
- package/lib/plus/saasAttendance/settings/types.d.ts +6 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +57 -5
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +17 -2
- package/lib/plus/walletPassGallery/index.d.ts +4 -0
- package/lib/plus/walletPassGallery/index.js +141 -42
- package/lib/plus/walletPassGallery/serve.d.ts +3 -1
- package/lib/plus/walletPassGallery/serve.js +2 -2
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +13 -0
- package/lib/pro/pisellPhoneKeyboard/index.js +219 -0
- package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
- package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
- package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
- package/lowcode/client-card/fragments/cardStyle.ts +63 -0
- package/lowcode/client-card/fragments/nameStyle.ts +34 -0
- package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
- package/lowcode/client-card/fragments/tagConfig.ts +88 -0
- package/lowcode/client-card/meta.ts +343 -0
- package/lowcode/client-search/meta.ts +316 -0
- package/lowcode/eco-cup-list/meta.ts +1 -1
- package/lowcode/eco-customer-list/meta.ts +1 -1
- package/lowcode/wallet-pass-gallery/meta.ts +66 -1
- package/package.json +4 -4
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
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."); }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
import React, { useState, useMemo, useEffect } from 'react';
|
|
15
|
+
import { VirtualKeyboard } from '@pisell/materials';
|
|
16
|
+
import { Popover, Input } from 'antd';
|
|
17
|
+
import "./index.less";
|
|
18
|
+
import Delete from '@pisell/icon/es/Delete';
|
|
19
|
+
import { locales } from '@pisell/utils';
|
|
20
|
+
import localeTexts from "./locales";
|
|
21
|
+
import { getLocale } from "../../utils/locales";
|
|
22
|
+
var PisellPhoneKeyboard = function PisellPhoneKeyboard(props) {
|
|
23
|
+
// 初始化多语言
|
|
24
|
+
locales.init(localeTexts, getLocale());
|
|
25
|
+
var _onChange = props.onChange,
|
|
26
|
+
value = props.value,
|
|
27
|
+
popoverProps = props.popoverProps,
|
|
28
|
+
virtualKeyboardProps = props.virtualKeyboardProps,
|
|
29
|
+
keyboardProps = props.keyboardProps,
|
|
30
|
+
virtualKeyInputProps = props.virtualKeyInputProps;
|
|
31
|
+
|
|
32
|
+
// 是否打开弹层
|
|
33
|
+
var _useState = useState(false),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
open = _useState2[0],
|
|
36
|
+
setOpen = _useState2[1];
|
|
37
|
+
var items = [{
|
|
38
|
+
value: 1,
|
|
39
|
+
label: '1',
|
|
40
|
+
disabled: false,
|
|
41
|
+
type: 'text'
|
|
42
|
+
}, {
|
|
43
|
+
value: 2,
|
|
44
|
+
label: '2',
|
|
45
|
+
disabled: false,
|
|
46
|
+
type: 'text'
|
|
47
|
+
}, {
|
|
48
|
+
value: 3,
|
|
49
|
+
label: '3',
|
|
50
|
+
disabled: false,
|
|
51
|
+
type: 'text'
|
|
52
|
+
}, {
|
|
53
|
+
value: 4,
|
|
54
|
+
label: '4',
|
|
55
|
+
disabled: false,
|
|
56
|
+
type: 'text'
|
|
57
|
+
}, {
|
|
58
|
+
value: 5,
|
|
59
|
+
label: '5',
|
|
60
|
+
disabled: false,
|
|
61
|
+
type: 'text'
|
|
62
|
+
}, {
|
|
63
|
+
value: 6,
|
|
64
|
+
label: '6',
|
|
65
|
+
disabled: false,
|
|
66
|
+
type: 'text'
|
|
67
|
+
}, {
|
|
68
|
+
value: 7,
|
|
69
|
+
label: '7',
|
|
70
|
+
disabled: false,
|
|
71
|
+
type: 'text'
|
|
72
|
+
}, {
|
|
73
|
+
value: 8,
|
|
74
|
+
label: '8',
|
|
75
|
+
disabled: false,
|
|
76
|
+
type: 'text'
|
|
77
|
+
}, {
|
|
78
|
+
value: 9,
|
|
79
|
+
label: '9',
|
|
80
|
+
disabled: false,
|
|
81
|
+
type: 'text'
|
|
82
|
+
}, {
|
|
83
|
+
value: 'delete',
|
|
84
|
+
label: /*#__PURE__*/React.createElement(Delete, {
|
|
85
|
+
className: "virtual-keyboard-input-delete-icon"
|
|
86
|
+
}),
|
|
87
|
+
disabled: false,
|
|
88
|
+
type: 'text'
|
|
89
|
+
}, {
|
|
90
|
+
value: '0',
|
|
91
|
+
label: '0',
|
|
92
|
+
disabled: false,
|
|
93
|
+
type: 'text'
|
|
94
|
+
}, {
|
|
95
|
+
value: 'ok',
|
|
96
|
+
label: locales.getText('pisell2.text.confirm'),
|
|
97
|
+
disabled: false,
|
|
98
|
+
type: 'primary'
|
|
99
|
+
}];
|
|
100
|
+
/**
|
|
101
|
+
* @title: 返回逻辑
|
|
102
|
+
* @description:
|
|
103
|
+
* @param {any} e
|
|
104
|
+
* @return {*}
|
|
105
|
+
* @Author: zhiwei.Wang
|
|
106
|
+
* @Date: 2024-11-02 09:30
|
|
107
|
+
*/
|
|
108
|
+
var onOk = function onOk(e) {
|
|
109
|
+
_onChange === null || _onChange === void 0 || _onChange(e);
|
|
110
|
+
setOpen(false);
|
|
111
|
+
};
|
|
112
|
+
var onOpenChange = function onOpenChange(e) {
|
|
113
|
+
setOpen(e);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// 防止页面过小时出现滚动条 造成页面滚动
|
|
117
|
+
useEffect(function () {
|
|
118
|
+
if (open) {
|
|
119
|
+
document.body.classList.add('hide-scroll');
|
|
120
|
+
} else {
|
|
121
|
+
setTimeout(function () {
|
|
122
|
+
document.body.classList.remove('hide-scroll');
|
|
123
|
+
}, 150);
|
|
124
|
+
}
|
|
125
|
+
}, [open]);
|
|
126
|
+
useEffect(function () {
|
|
127
|
+
document.body.id = 'body';
|
|
128
|
+
}, []);
|
|
129
|
+
|
|
130
|
+
// 动态计算input的字体大小
|
|
131
|
+
var adjustFontSize = useMemo(function () {
|
|
132
|
+
// 没有内容固定位30px, 因为placeholder的字体大小是30px 太大会展示不全
|
|
133
|
+
if (!value) {
|
|
134
|
+
return 30;
|
|
135
|
+
}
|
|
136
|
+
var maxFontSize = 60; // 最大字体大小
|
|
137
|
+
var minFontSize = 10; // 最小字体大小
|
|
138
|
+
var defaultFontSize = maxFontSize;
|
|
139
|
+
|
|
140
|
+
// 获取输入框的宽度
|
|
141
|
+
var inputWidth = 248;
|
|
142
|
+
|
|
143
|
+
// 创建一个临时span元素用于测量内容宽度
|
|
144
|
+
var span = document.createElement('span');
|
|
145
|
+
span.style.position = 'absolute';
|
|
146
|
+
span.style.whiteSpace = 'nowrap';
|
|
147
|
+
span.style.visibility = 'hidden';
|
|
148
|
+
span.style.fontSize = "".concat(defaultFontSize, "px");
|
|
149
|
+
span.textContent = value;
|
|
150
|
+
document.body.appendChild(span);
|
|
151
|
+
var fontSize = maxFontSize;
|
|
152
|
+
|
|
153
|
+
// 动态调整字体大小直到内容宽度小于或等于输入框宽度
|
|
154
|
+
while (span.offsetWidth > inputWidth && fontSize > minFontSize) {
|
|
155
|
+
fontSize -= 0.5;
|
|
156
|
+
span.style.fontSize = "".concat(fontSize, "px");
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// 移除临时span元素
|
|
160
|
+
document.body.removeChild(span);
|
|
161
|
+
return fontSize;
|
|
162
|
+
}, [value]);
|
|
163
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popover, _extends({
|
|
164
|
+
content: /*#__PURE__*/React.createElement(VirtualKeyboard
|
|
165
|
+
// style={{ zoom: 0.8 }}
|
|
166
|
+
, _extends({
|
|
167
|
+
keyboardProps: _objectSpread({
|
|
168
|
+
keydown: false,
|
|
169
|
+
items: items,
|
|
170
|
+
onChange: function onChange(e) {
|
|
171
|
+
if (e === 'reset') {
|
|
172
|
+
_onChange('');
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (e === 'ok') {
|
|
176
|
+
onOk(value || '');
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (e === 'delete') {
|
|
180
|
+
_onChange((value === null || value === void 0 ? void 0 : value.slice(0, -1)) || '');
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
_onChange(value + String(e));
|
|
184
|
+
}
|
|
185
|
+
}, keyboardProps),
|
|
186
|
+
virtualKeyInputProps: _objectSpread({
|
|
187
|
+
value: value,
|
|
188
|
+
onChange: function onChange(e) {
|
|
189
|
+
_onChange(e.target.value);
|
|
190
|
+
},
|
|
191
|
+
style: {
|
|
192
|
+
textAlign: 'left',
|
|
193
|
+
fontSize: adjustFontSize
|
|
194
|
+
}
|
|
195
|
+
}, virtualKeyInputProps)
|
|
196
|
+
}, virtualKeyboardProps)),
|
|
197
|
+
open: open,
|
|
198
|
+
arrow: false,
|
|
199
|
+
onOpenChange: onOpenChange,
|
|
200
|
+
trigger: ['click']
|
|
201
|
+
}, popoverProps), /*#__PURE__*/React.createElement(Input, {
|
|
202
|
+
readOnly: true,
|
|
203
|
+
value: value,
|
|
204
|
+
style: {
|
|
205
|
+
width: '100%'
|
|
206
|
+
},
|
|
207
|
+
size: "large"
|
|
208
|
+
})));
|
|
209
|
+
};
|
|
210
|
+
export default PisellPhoneKeyboard;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
.pisell-number-selector {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
background: #F9FAFB;
|
|
5
|
+
border-radius: 24px;
|
|
6
|
+
padding: 4px;
|
|
7
|
+
user-select: none;
|
|
8
|
+
gap: 0;
|
|
9
|
+
|
|
10
|
+
&-btn {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
background: #F9FAFB;
|
|
15
|
+
border: none;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
transition: all 0.2s ease;
|
|
19
|
+
outline: none;
|
|
20
|
+
padding: 0;
|
|
21
|
+
color: #666;
|
|
22
|
+
|
|
23
|
+
&:hover:not(:disabled) {
|
|
24
|
+
background: #E5E7EB;
|
|
25
|
+
color: #333;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:disabled {
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
background: #F9FAFB !important;
|
|
34
|
+
color: #666 !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-minus,
|
|
40
|
+
&-plus {
|
|
41
|
+
// 圆形按钮,通过尺寸类控制大小
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-number {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
background: transparent;
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
color: #000;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
flex: 1;
|
|
53
|
+
text-align: center;
|
|
54
|
+
border: none;
|
|
55
|
+
outline: none;
|
|
56
|
+
font-family: inherit;
|
|
57
|
+
|
|
58
|
+
&-clickable {
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
transition: all 0.2s ease;
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
color: #333;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:disabled {
|
|
67
|
+
opacity: 0.6;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
|
|
70
|
+
&:hover {
|
|
71
|
+
color: #000 !important;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 不同尺寸
|
|
78
|
+
&-small {
|
|
79
|
+
padding: 2px;
|
|
80
|
+
border-radius: 18px;
|
|
81
|
+
|
|
82
|
+
.pisell-number-selector-btn {
|
|
83
|
+
width: 24px;
|
|
84
|
+
height: 24px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.pisell-number-selector-number {
|
|
88
|
+
padding: 0 8px;
|
|
89
|
+
font-size: 12px;
|
|
90
|
+
min-width: 28px;
|
|
91
|
+
height: 24px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&-middle {
|
|
96
|
+
padding: 4px;
|
|
97
|
+
border-radius: 24px;
|
|
98
|
+
|
|
99
|
+
.pisell-number-selector-btn {
|
|
100
|
+
width: 32px;
|
|
101
|
+
height: 32px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.pisell-number-selector-number {
|
|
105
|
+
padding: 0 16px;
|
|
106
|
+
font-size: 16px;
|
|
107
|
+
min-width: 48px;
|
|
108
|
+
height: 32px;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-large {
|
|
113
|
+
padding: 6px;
|
|
114
|
+
border-radius: 28px;
|
|
115
|
+
|
|
116
|
+
.pisell-number-selector-btn {
|
|
117
|
+
width: 40px;
|
|
118
|
+
height: 40px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.pisell-number-selector-number {
|
|
122
|
+
padding: 0 20px;
|
|
123
|
+
font-size: 18px;
|
|
124
|
+
min-width: 64px;
|
|
125
|
+
height: 40px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// 禁用状态
|
|
130
|
+
&-disabled {
|
|
131
|
+
opacity: 0.6;
|
|
132
|
+
cursor: not-allowed;
|
|
133
|
+
|
|
134
|
+
.pisell-number-selector-number {
|
|
135
|
+
&-clickable {
|
|
136
|
+
cursor: not-allowed;
|
|
137
|
+
|
|
138
|
+
&:hover {
|
|
139
|
+
color: #000 !important;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Popover 相关样式
|
|
147
|
+
.pisell-number-selector-popover {
|
|
148
|
+
.ant-popover-inner {
|
|
149
|
+
border-radius: 8px;
|
|
150
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.virtual-keyboard-input-delete-icon {
|
|
154
|
+
font-size: 16px;
|
|
155
|
+
color: #666;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormState } from '../model';
|
|
3
1
|
export declare const walkInData: {
|
|
4
2
|
id: number;
|
|
5
3
|
nickname: string;
|
|
6
4
|
};
|
|
7
|
-
export declare const Provider:
|
|
8
|
-
state: FormState;
|
|
9
|
-
} & {
|
|
10
|
-
dispatch: (params: {
|
|
11
|
-
type: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
}) => void;
|
|
14
|
-
}>;
|
|
5
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -109,11 +108,4 @@ export declare const walkInData: {
|
|
|
109
108
|
id: number;
|
|
110
109
|
nickname: string;
|
|
111
110
|
};
|
|
112
|
-
export declare const Provider:
|
|
113
|
-
state: FormState;
|
|
114
|
-
} & {
|
|
115
|
-
dispatch: (params: {
|
|
116
|
-
type: string;
|
|
117
|
-
payload: any;
|
|
118
|
-
}) => void;
|
|
119
|
-
}>;
|
|
111
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -166,10 +166,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
166
166
|
export declare const getDuration: (duration: number | {
|
|
167
167
|
type: string;
|
|
168
168
|
value: number;
|
|
169
|
-
}) => number |
|
|
169
|
+
}) => number | {
|
|
170
170
|
type: string;
|
|
171
171
|
value: number;
|
|
172
|
-
};
|
|
172
|
+
} | "flexible";
|
|
173
173
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
174
174
|
export declare const getIsEdit: (state: any) => boolean;
|
|
175
175
|
export {};
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "success" | "page" | "
|
|
12
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "success" | "page" | "
|
|
14
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -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<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -295,9 +295,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
298
|
+
mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -30,11 +29,4 @@ export interface PayGroup {
|
|
|
30
29
|
_order: any;
|
|
31
30
|
front_order_uuid?: string;
|
|
32
31
|
}
|
|
33
|
-
export declare const Provider:
|
|
34
|
-
state: FormState;
|
|
35
|
-
} & {
|
|
36
|
-
dispatch: (params: {
|
|
37
|
-
type: string;
|
|
38
|
-
payload: any;
|
|
39
|
-
}) => void;
|
|
40
|
-
}>;
|
|
32
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider:
|
|
73
|
-
state: FormState;
|
|
74
|
-
} & {
|
|
75
|
-
dispatch: (params: {
|
|
76
|
-
type: string;
|
|
77
|
-
payload: any;
|
|
78
|
-
}) => void;
|
|
79
|
-
}>;
|
|
71
|
+
export declare const Provider: any, Context: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useTranslationOriginal(): any;
|