@pisell/private-materials 6.3.123 → 6.3.124

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.
Files changed (63) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/preview.js +4 -4
  3. package/build/lowcode/render/default/view.js +4 -4
  4. package/build/lowcode/view.js +4 -4
  5. package/es/components/booking/addons/model.d.ts +10 -1
  6. package/es/components/booking/forms/model.d.ts +10 -1
  7. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  8. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  9. package/es/components/booking/info/model.d.ts +10 -1
  10. package/es/components/booking/model.d.ts +9 -1
  11. package/es/components/booking/notes/model.d.ts +10 -1
  12. package/es/components/booking/payments/model.d.ts +10 -1
  13. package/es/components/eftpos/hooks.d.ts +1 -0
  14. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  15. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  16. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  17. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  18. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  19. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  20. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  21. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +142 -165
  22. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  23. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  24. package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
  25. package/es/components/pay/toC/index.js +31 -65
  26. package/es/components/pay/toC/model.d.ts +9 -2
  27. package/es/components/pay/toC/serve.d.ts +0 -18
  28. package/es/components/pay/toC/serve.js +15 -42
  29. package/es/components/pay/toC/utils.d.ts +2 -2
  30. package/es/components/pay/toC/utils.js +0 -4
  31. package/es/components/schedules/model.d.ts +9 -1
  32. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  33. package/es/pro/Login2.0/components/phoneValidation.js +65 -58
  34. package/lib/components/booking/addons/model.d.ts +10 -1
  35. package/lib/components/booking/forms/model.d.ts +10 -1
  36. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  37. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  38. package/lib/components/booking/info/model.d.ts +10 -1
  39. package/lib/components/booking/model.d.ts +9 -1
  40. package/lib/components/booking/notes/model.d.ts +10 -1
  41. package/lib/components/booking/payments/model.d.ts +10 -1
  42. package/lib/components/eftpos/hooks.d.ts +1 -0
  43. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  44. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  45. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  46. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  47. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  48. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  49. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  50. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +100 -90
  51. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  52. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  53. package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
  54. package/lib/components/pay/toC/index.js +19 -52
  55. package/lib/components/pay/toC/model.d.ts +9 -2
  56. package/lib/components/pay/toC/serve.d.ts +0 -18
  57. package/lib/components/pay/toC/serve.js +0 -6
  58. package/lib/components/pay/toC/utils.d.ts +2 -2
  59. package/lib/components/pay/toC/utils.js +2 -6
  60. package/lib/components/schedules/model.d.ts +9 -1
  61. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  62. package/lib/pro/Login2.0/components/phoneValidation.js +4 -2
  63. package/package.json +2 -2
@@ -12,7 +12,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
12
12
  */
13
13
  export var validatePhoneNumber = /*#__PURE__*/function () {
14
14
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value, getText) {
15
- var phone, countryCode, match;
15
+ var phone, countryCode, match, usCanadaReg, auReg;
16
16
  return _regeneratorRuntime().wrap(function _callee$(_context) {
17
17
  while (1) switch (_context.prev = _context.next) {
18
18
  case 0:
@@ -55,7 +55,7 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
55
55
  throw new Error(getText('pisell-phone-validation-required'));
56
56
  case 16:
57
57
  _context.t0 = countryCode;
58
- _context.next = _context.t0 === '86' ? 19 : _context.t0 === '852' ? 22 : _context.t0 === '853' ? 25 : _context.t0 === '886' ? 28 : _context.t0 === '1' ? 31 : _context.t0 === '44' ? 34 : _context.t0 === '61' ? 37 : _context.t0 === '81' ? 40 : _context.t0 === '82' ? 43 : _context.t0 === '65' ? 46 : _context.t0 === '60' ? 49 : _context.t0 === '66' ? 52 : _context.t0 === '84' ? 55 : _context.t0 === '63' ? 58 : _context.t0 === '62' ? 61 : _context.t0 === '91' ? 64 : 67;
58
+ _context.next = _context.t0 === '86' ? 19 : _context.t0 === '852' ? 22 : _context.t0 === '853' ? 25 : _context.t0 === '886' ? 28 : _context.t0 === '1' ? 31 : _context.t0 === '44' ? 35 : _context.t0 === '61' ? 38 : _context.t0 === '81' ? 42 : _context.t0 === '82' ? 45 : _context.t0 === '65' ? 48 : _context.t0 === '60' ? 51 : _context.t0 === '66' ? 54 : _context.t0 === '84' ? 57 : _context.t0 === '63' ? 60 : _context.t0 === '62' ? 63 : _context.t0 === '91' ? 66 : 69;
59
59
  break;
60
60
  case 19:
61
61
  if (/^1[3-9]\d{9}$/.test(phone)) {
@@ -64,7 +64,7 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
64
64
  }
65
65
  throw new Error(getText('pisell-phone-validation-china'));
66
66
  case 21:
67
- return _context.abrupt("break", 70);
67
+ return _context.abrupt("break", 72);
68
68
  case 22:
69
69
  if (/^[5-9]\d{7}$/.test(phone)) {
70
70
  _context.next = 24;
@@ -72,7 +72,7 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
72
72
  }
73
73
  throw new Error(getText('pisell-phone-validation-hongkong'));
74
74
  case 24:
75
- return _context.abrupt("break", 70);
75
+ return _context.abrupt("break", 72);
76
76
  case 25:
77
77
  if (/^6\d{7}$/.test(phone)) {
78
78
  _context.next = 27;
@@ -80,7 +80,7 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
80
80
  }
81
81
  throw new Error(getText('pisell-phone-validation-macau'));
82
82
  case 27:
83
- return _context.abrupt("break", 70);
83
+ return _context.abrupt("break", 72);
84
84
  case 28:
85
85
  if (/^9\d{8}$/.test(phone)) {
86
86
  _context.next = 30;
@@ -88,112 +88,119 @@ export var validatePhoneNumber = /*#__PURE__*/function () {
88
88
  }
89
89
  throw new Error(getText('pisell-phone-validation-taiwan'));
90
90
  case 30:
91
- return _context.abrupt("break", 70);
91
+ return _context.abrupt("break", 72);
92
92
  case 31:
93
- if (/^\d{10}$/.test(phone)) {
94
- _context.next = 33;
93
+ // 美国/加拿大
94
+ // NANP 标准 10 位格式:3位区号[2-9] + 3位局号[2-9] + 4位
95
+ usCanadaReg = /^[2-9]\d{2}[2-9]\d{6}$/;
96
+ if (usCanadaReg.test(phone)) {
97
+ _context.next = 34;
95
98
  break;
96
99
  }
97
100
  throw new Error(getText('pisell-phone-validation-us-canada'));
98
- case 33:
99
- return _context.abrupt("break", 70);
100
101
  case 34:
102
+ return _context.abrupt("break", 72);
103
+ case 35:
101
104
  if (/^7\d{9}$/.test(phone)) {
102
- _context.next = 36;
105
+ _context.next = 37;
103
106
  break;
104
107
  }
105
108
  throw new Error(getText('pisell-phone-validation-uk'));
106
- case 36:
107
- return _context.abrupt("break", 70);
108
109
  case 37:
109
- if (/^(\+?0)?4\d{8}$/.test(phone)) {
110
- _context.next = 39;
110
+ return _context.abrupt("break", 72);
111
+ case 38:
112
+ // 澳大利亚
113
+ // const reg = /^(\+?0)?4\d{8}$/;
114
+ // 固话前缀 02/03/07/08, 手机前缀 04/05, 首位 0 可选
115
+ auReg = /^0?[2-578]\d{8}$/;
116
+ if (auReg.test(phone)) {
117
+ _context.next = 41;
111
118
  break;
112
119
  }
113
120
  throw new Error(getText('pisell-phone-validation-australia'));
114
- case 39:
115
- return _context.abrupt("break", 70);
116
- case 40:
121
+ case 41:
122
+ return _context.abrupt("break", 72);
123
+ case 42:
117
124
  if (/^[789]0\d{8}$/.test(phone)) {
118
- _context.next = 42;
125
+ _context.next = 44;
119
126
  break;
120
127
  }
121
128
  throw new Error(getText('pisell-phone-validation-japan'));
122
- case 42:
123
- return _context.abrupt("break", 70);
124
- case 43:
129
+ case 44:
130
+ return _context.abrupt("break", 72);
131
+ case 45:
125
132
  if (/^1[0-9]\d{7,8}$/.test(phone)) {
126
- _context.next = 45;
133
+ _context.next = 47;
127
134
  break;
128
135
  }
129
136
  throw new Error(getText('pisell-phone-validation-korea'));
130
- case 45:
131
- return _context.abrupt("break", 70);
132
- case 46:
137
+ case 47:
138
+ return _context.abrupt("break", 72);
139
+ case 48:
133
140
  if (/^[89]\d{7}$/.test(phone)) {
134
- _context.next = 48;
141
+ _context.next = 50;
135
142
  break;
136
143
  }
137
144
  throw new Error(getText('pisell-phone-validation-singapore'));
138
- case 48:
139
- return _context.abrupt("break", 70);
140
- case 49:
145
+ case 50:
146
+ return _context.abrupt("break", 72);
147
+ case 51:
141
148
  if (/^1[0-9]\d{7,8}$/.test(phone)) {
142
- _context.next = 51;
149
+ _context.next = 53;
143
150
  break;
144
151
  }
145
152
  throw new Error(getText('pisell-phone-validation-malaysia'));
146
- case 51:
147
- return _context.abrupt("break", 70);
148
- case 52:
153
+ case 53:
154
+ return _context.abrupt("break", 72);
155
+ case 54:
149
156
  if (/^[689]\d{8}$/.test(phone)) {
150
- _context.next = 54;
157
+ _context.next = 56;
151
158
  break;
152
159
  }
153
160
  throw new Error(getText('pisell-phone-validation-thailand'));
154
- case 54:
155
- return _context.abrupt("break", 70);
156
- case 55:
161
+ case 56:
162
+ return _context.abrupt("break", 72);
163
+ case 57:
157
164
  if (/^[3579]\d{8}$/.test(phone)) {
158
- _context.next = 57;
165
+ _context.next = 59;
159
166
  break;
160
167
  }
161
168
  throw new Error(getText('pisell-phone-validation-vietnam'));
162
- case 57:
163
- return _context.abrupt("break", 70);
164
- case 58:
169
+ case 59:
170
+ return _context.abrupt("break", 72);
171
+ case 60:
165
172
  if (/^9\d{9}$/.test(phone)) {
166
- _context.next = 60;
173
+ _context.next = 62;
167
174
  break;
168
175
  }
169
176
  throw new Error(getText('pisell-phone-validation-philippines'));
170
- case 60:
171
- return _context.abrupt("break", 70);
172
- case 61:
177
+ case 62:
178
+ return _context.abrupt("break", 72);
179
+ case 63:
173
180
  if (/^8\d{8,11}$/.test(phone)) {
174
- _context.next = 63;
181
+ _context.next = 65;
175
182
  break;
176
183
  }
177
184
  throw new Error(getText('pisell-phone-validation-indonesia'));
178
- case 63:
179
- return _context.abrupt("break", 70);
180
- case 64:
185
+ case 65:
186
+ return _context.abrupt("break", 72);
187
+ case 66:
181
188
  if (/^[6-9]\d{9}$/.test(phone)) {
182
- _context.next = 66;
189
+ _context.next = 68;
183
190
  break;
184
191
  }
185
192
  throw new Error(getText('pisell-phone-validation-india'));
186
- case 66:
187
- return _context.abrupt("break", 70);
188
- case 67:
193
+ case 68:
194
+ return _context.abrupt("break", 72);
195
+ case 69:
189
196
  if (/^\d{6,15}$/.test(phone)) {
190
- _context.next = 69;
197
+ _context.next = 71;
191
198
  break;
192
199
  }
193
200
  throw new Error(getText('pisell-phone-validation-invalid'));
194
- case 69:
195
- return _context.abrupt("break", 70);
196
- case 70:
201
+ case 71:
202
+ return _context.abrupt("break", 72);
203
+ case 72:
197
204
  case "end":
198
205
  return _context.stop();
199
206
  }
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
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 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SendModalValues } from './index';
3
2
  declare const useSendModal: (bookingId?: number) => {
4
3
  open: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -109,4 +110,11 @@ export declare const walkInData: {
109
110
  id: number;
110
111
  nickname: string;
111
112
  };
112
- export declare const Provider: any, Context: any;
113
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
114
+ state: FormState;
115
+ } & {
116
+ dispatch: (params: {
117
+ type: string;
118
+ payload: any;
119
+ }) => void;
120
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
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 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Eftpos } from './const';
2
3
  /**
3
4
  * @title: tyro 设备连接
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ErrorTip: ({ text }: any) => import("react").JSX.Element;
4
3
  export default ErrorTip;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type CallToBookProps = {
3
2
  show: boolean;
4
3
  type: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const WeekItem: (props: any) => import("react").JSX.Element;
4
3
  export default WeekItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare type CalenDateWeekProps = {
4
3
  currentDate: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const StripePayment: () => import("react").JSX.Element;
3
2
  export default StripePayment;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PageLoading: () => import("react").JSX.Element;
3
2
  export default PageLoading;
@@ -15,16 +15,11 @@ export interface WalletPassProps {
15
15
  walletPass: {
16
16
  cards: WalletPassDataType[];
17
17
  amount: number;
18
- recommended?: WalletPassDataType[];
19
- transformList?: WalletPassDataType[];
20
- noApplicableVoucher?: WalletPassDataType[];
21
18
  };
22
19
  walletSetting: {
23
20
  name: string;
24
21
  popup_status: 0 | 1;
25
22
  };
26
- orderDetail: any;
27
- total_amount: number;
28
23
  }
29
24
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<WalletPassProps & React.RefAttributes<WalletPassRef>>>;
30
25
  export default _default;