@pisell/private-materials 6.4.77 → 6.4.79

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 (192) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/Sales/Summary/utils.d.ts +1 -1
  12. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/index.d.ts +0 -1
  14. package/es/components/booking/addons/index.js +8 -3
  15. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  16. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  17. package/es/components/booking/components/footer/amount.d.ts +1 -0
  18. package/es/components/booking/components/footer/amount.js +521 -79
  19. package/es/components/booking/components/footer/utils.d.ts +13 -0
  20. package/es/components/booking/components/footer/utils.js +88 -40
  21. package/es/components/booking/deposit/index.d.ts +0 -1
  22. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  23. package/es/components/booking/forms/single/index.d.ts +0 -1
  24. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  25. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  26. package/es/components/booking/info/index.d.ts +0 -1
  27. package/es/components/booking/info/notes/index.d.ts +0 -1
  28. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  29. package/es/components/booking/info/service2/utils.d.ts +1 -1
  30. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  31. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
  32. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  33. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  34. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  35. package/es/components/checkout/PaymentPlugin.d.ts +0 -1
  36. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  37. package/es/components/eftposPay/amount.d.ts +1 -1
  38. package/es/components/eftposPay/device.d.ts +1 -1
  39. package/es/components/eftposPay/hooks.d.ts +1 -1
  40. package/es/components/eftposPay/store/index.d.ts +4 -4
  41. package/es/components/index.d.ts +2 -1
  42. package/es/components/index.js +2 -1
  43. package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -1
  44. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  45. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
  46. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  47. package/es/components/pay/toC/index.js +2 -1
  48. package/es/components/pay/toC/locales.d.ts +3 -0
  49. package/es/components/pay/toC/locales.js +6 -3
  50. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  51. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  52. package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
  53. package/es/components/subTotal/index.js +1 -1
  54. package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  55. package/es/components/systemSettings/registry/components/GroupModal.js +160 -0
  56. package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  57. package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
  58. package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  59. package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
  60. package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  61. package/es/components/systemSettings/registry/components/SectionList.js +174 -0
  62. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  63. package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
  64. package/es/components/systemSettings/registry/components/index.d.ts +4 -0
  65. package/es/components/systemSettings/registry/components/index.js +4 -0
  66. package/es/components/systemSettings/registry/index.d.ts +5 -0
  67. package/es/components/systemSettings/registry/index.js +1059 -0
  68. package/es/components/systemSettings/registry/index.less +410 -0
  69. package/es/components/systemSettings/registry/locales.d.ts +272 -0
  70. package/es/components/systemSettings/registry/locales.js +300 -0
  71. package/es/components/systemSettings/registry/services.d.ts +77 -0
  72. package/es/components/systemSettings/registry/services.js +472 -0
  73. package/es/components/systemSettings/registry/types.d.ts +126 -0
  74. package/es/components/systemSettings/registry/types.js +1 -0
  75. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  76. package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
  77. package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
  78. package/es/components/systemSettings/registry/utils/validators.js +44 -0
  79. package/es/index.d.ts +2 -0
  80. package/es/index.js +3 -1
  81. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
  82. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
  83. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
  84. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
  85. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
  86. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
  87. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  88. package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -1
  89. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  90. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  91. package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +0 -1
  92. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  93. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  94. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -1
  95. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  96. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  97. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  98. package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
  99. package/es/plus/saasLogin/utils.d.ts +5 -5
  100. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
  101. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  102. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  103. package/lib/components/appointmentBooking/index.d.ts +0 -1
  104. package/lib/components/booking/addons/index.js +6 -1
  105. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  106. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  107. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  108. package/lib/components/booking/components/footer/amount.js +271 -38
  109. package/lib/components/booking/components/footer/utils.d.ts +13 -0
  110. package/lib/components/booking/components/footer/utils.js +45 -7
  111. package/lib/components/booking/deposit/index.d.ts +0 -1
  112. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  113. package/lib/components/booking/forms/single/index.d.ts +0 -1
  114. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  115. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  116. package/lib/components/booking/info/index.d.ts +0 -1
  117. package/lib/components/booking/info/notes/index.d.ts +0 -1
  118. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  119. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  120. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  121. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
  122. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  123. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  124. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  125. package/lib/components/checkout/PaymentPlugin.d.ts +0 -1
  126. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  127. package/lib/components/eftposPay/amount.d.ts +1 -1
  128. package/lib/components/eftposPay/device.d.ts +1 -1
  129. package/lib/components/eftposPay/hooks.d.ts +1 -1
  130. package/lib/components/eftposPay/store/index.d.ts +4 -4
  131. package/lib/components/index.d.ts +2 -1
  132. package/lib/components/index.js +3 -0
  133. package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -1
  134. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  135. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  136. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  137. package/lib/components/pay/toC/index.js +1 -0
  138. package/lib/components/pay/toC/locales.d.ts +3 -0
  139. package/lib/components/pay/toC/locales.js +6 -3
  140. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  141. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  142. package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
  143. package/lib/components/subTotal/index.js +1 -1
  144. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  145. package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
  146. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  147. package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
  148. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  149. package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
  150. package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  151. package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
  152. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  153. package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
  154. package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
  155. package/lib/components/systemSettings/registry/components/index.js +48 -0
  156. package/lib/components/systemSettings/registry/index.d.ts +5 -0
  157. package/lib/components/systemSettings/registry/index.js +529 -0
  158. package/lib/components/systemSettings/registry/index.less +410 -0
  159. package/lib/components/systemSettings/registry/locales.d.ts +272 -0
  160. package/lib/components/systemSettings/registry/locales.js +324 -0
  161. package/lib/components/systemSettings/registry/services.d.ts +77 -0
  162. package/lib/components/systemSettings/registry/services.js +290 -0
  163. package/lib/components/systemSettings/registry/types.d.ts +126 -0
  164. package/lib/components/systemSettings/registry/types.js +17 -0
  165. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  166. package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
  167. package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
  168. package/lib/components/systemSettings/registry/utils/validators.js +54 -0
  169. package/lib/index.d.ts +2 -0
  170. package/lib/index.js +6 -0
  171. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
  172. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
  173. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
  174. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
  175. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
  176. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
  177. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  178. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -1
  179. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  180. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  181. package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +0 -1
  182. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  183. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  184. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -1
  185. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  186. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  187. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  188. package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
  189. package/lib/plus/saasLogin/utils.d.ts +5 -5
  190. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
  191. package/lowcode/settings-registry/meta.ts +29 -0
  192. package/package.json +3 -3
@@ -0,0 +1,284 @@
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
+ /**
3
+ * 类型验证工具函数
4
+ * 用于验证默认值是否符合指定的字段类型
5
+ */
6
+
7
+ /**
8
+ * 验证字符串类型
9
+ */
10
+ var validateString = function validateString(value) {
11
+ if (value === null || value === undefined || value === '') {
12
+ return {
13
+ isValid: true
14
+ };
15
+ }
16
+ if (typeof value === 'string') {
17
+ return {
18
+ isValid: true
19
+ };
20
+ }
21
+ return {
22
+ isValid: false,
23
+ error: '默认值必须是字符串类型'
24
+ };
25
+ };
26
+
27
+ /**
28
+ * 验证整数类型
29
+ */
30
+ var validateInteger = function validateInteger(value) {
31
+ if (value === null || value === undefined || value === '') {
32
+ return {
33
+ isValid: true
34
+ };
35
+ }
36
+
37
+ // 如果是数字,检查是否为整数
38
+ if (typeof value === 'number') {
39
+ if (!Number.isInteger(value)) {
40
+ return {
41
+ isValid: false,
42
+ error: '默认值必须是整数'
43
+ };
44
+ }
45
+ return {
46
+ isValid: true
47
+ };
48
+ }
49
+
50
+ // 如果是字符串,尝试转换
51
+ if (typeof value === 'string') {
52
+ var trimmed = value.trim();
53
+ if (trimmed === '') {
54
+ return {
55
+ isValid: true
56
+ };
57
+ }
58
+ var num = Number(trimmed);
59
+ if (isNaN(num) || !Number.isInteger(num)) {
60
+ return {
61
+ isValid: false,
62
+ error: '默认值必须是有效的整数'
63
+ };
64
+ }
65
+ return {
66
+ isValid: true
67
+ };
68
+ }
69
+ return {
70
+ isValid: false,
71
+ error: '默认值必须是有效的整数'
72
+ };
73
+ };
74
+
75
+ /**
76
+ * 验证浮点数类型
77
+ */
78
+ var validateFloat = function validateFloat(value) {
79
+ if (value === null || value === undefined || value === '') {
80
+ return {
81
+ isValid: true
82
+ };
83
+ }
84
+
85
+ // 如果是数字,检查是否有效
86
+ if (typeof value === 'number') {
87
+ if (!isFinite(value)) {
88
+ return {
89
+ isValid: false,
90
+ error: '默认值必须是有效的数字'
91
+ };
92
+ }
93
+ return {
94
+ isValid: true
95
+ };
96
+ }
97
+
98
+ // 如果是字符串,尝试转换
99
+ if (typeof value === 'string') {
100
+ var trimmed = value.trim();
101
+ if (trimmed === '') {
102
+ return {
103
+ isValid: true
104
+ };
105
+ }
106
+ var num = Number(trimmed);
107
+ if (isNaN(num) || !isFinite(num)) {
108
+ return {
109
+ isValid: false,
110
+ error: '默认值必须是有效的数字'
111
+ };
112
+ }
113
+ return {
114
+ isValid: true
115
+ };
116
+ }
117
+ return {
118
+ isValid: false,
119
+ error: '默认值必须是有效的数字'
120
+ };
121
+ };
122
+
123
+ /**
124
+ * 验证布尔类型
125
+ */
126
+ var validateBoolean = function validateBoolean(value) {
127
+ if (value === null || value === undefined || value === '') {
128
+ return {
129
+ isValid: true
130
+ };
131
+ }
132
+
133
+ // 如果是字符串,只接受 'true' 或 'false'
134
+ if (typeof value === 'string') {
135
+ var trimmed = value.trim().toLowerCase();
136
+ if (trimmed === '') {
137
+ return {
138
+ isValid: true
139
+ };
140
+ }
141
+ if (trimmed !== 'true' && trimmed !== 'false') {
142
+ return {
143
+ isValid: false,
144
+ error: '默认值必须是 true 或 false'
145
+ };
146
+ }
147
+ return {
148
+ isValid: true
149
+ };
150
+ }
151
+
152
+ // 如果是布尔类型
153
+ if (typeof value === 'boolean') {
154
+ return {
155
+ isValid: true
156
+ };
157
+ }
158
+ return {
159
+ isValid: false,
160
+ error: '默认值必须是 true 或 false'
161
+ };
162
+ };
163
+
164
+ /**
165
+ * 验证数组类型(JSON对象/数组)
166
+ */
167
+ var validateArray = function validateArray(value) {
168
+ if (value === null || value === undefined || value === '') {
169
+ return {
170
+ isValid: true
171
+ };
172
+ }
173
+
174
+ // 如果是字符串,尝试解析为JSON
175
+ if (typeof value === 'string') {
176
+ var trimmed = value.trim();
177
+ if (trimmed === '') {
178
+ return {
179
+ isValid: true
180
+ };
181
+ }
182
+ try {
183
+ var parsed = JSON.parse(trimmed);
184
+ // 检查解析后的值是否为对象或数组
185
+ if (_typeof(parsed) !== 'object' || parsed === null) {
186
+ return {
187
+ isValid: false,
188
+ error: '默认值必须是有效的JSON对象或数组'
189
+ };
190
+ }
191
+ return {
192
+ isValid: true
193
+ };
194
+ } catch (error) {
195
+ return {
196
+ isValid: false,
197
+ error: '默认值必须是有效的JSON对象或数组'
198
+ };
199
+ }
200
+ }
201
+
202
+ // 如果是对象或数组
203
+ if (_typeof(value) === 'object' && value !== null) {
204
+ return {
205
+ isValid: true
206
+ };
207
+ }
208
+ return {
209
+ isValid: false,
210
+ error: '默认值必须是有效的JSON对象或数组'
211
+ };
212
+ };
213
+
214
+ /**
215
+ * 根据字段类型验证默认值
216
+ */
217
+ export var validateDefaultValue = function validateDefaultValue(fieldType, defaultValue) {
218
+ if (!fieldType) {
219
+ return {
220
+ isValid: false,
221
+ error: '字段类型不能为空'
222
+ };
223
+ }
224
+ switch (fieldType.toLowerCase()) {
225
+ case 'string':
226
+ return validateString(defaultValue);
227
+ case 'integer':
228
+ return validateInteger(defaultValue);
229
+ case 'float':
230
+ return validateFloat(defaultValue);
231
+ case 'boolean':
232
+ return validateBoolean(defaultValue);
233
+ case 'array':
234
+ return validateArray(defaultValue);
235
+ default:
236
+ return {
237
+ isValid: false,
238
+ error: "\u4E0D\u652F\u6301\u7684\u5B57\u6BB5\u7C7B\u578B: ".concat(fieldType)
239
+ };
240
+ }
241
+ };
242
+
243
+ /**
244
+ * 解析默认值为对应的类型
245
+ */
246
+ export var parseDefaultValue = function parseDefaultValue(fieldType, defaultValue) {
247
+ if (defaultValue === null || defaultValue === undefined || defaultValue === '') {
248
+ return null;
249
+ }
250
+ switch (fieldType.toLowerCase()) {
251
+ case 'string':
252
+ return String(defaultValue);
253
+ case 'integer':
254
+ if (typeof defaultValue === 'string') {
255
+ var trimmed = defaultValue.trim();
256
+ if (trimmed === '') return null;
257
+ return parseInt(trimmed, 10);
258
+ }
259
+ return defaultValue;
260
+ case 'float':
261
+ if (typeof defaultValue === 'string') {
262
+ var _trimmed = defaultValue.trim();
263
+ if (_trimmed === '') return null;
264
+ return parseFloat(_trimmed);
265
+ }
266
+ return defaultValue;
267
+ case 'boolean':
268
+ if (typeof defaultValue === 'string') {
269
+ var _trimmed2 = defaultValue.trim().toLowerCase();
270
+ if (_trimmed2 === '') return null;
271
+ return _trimmed2 === 'true';
272
+ }
273
+ return Boolean(defaultValue);
274
+ case 'array':
275
+ if (typeof defaultValue === 'string') {
276
+ var _trimmed3 = defaultValue.trim();
277
+ if (_trimmed3 === '') return null;
278
+ return JSON.parse(_trimmed3);
279
+ }
280
+ return defaultValue;
281
+ default:
282
+ return defaultValue;
283
+ }
284
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 验证器工具函数
3
+ */
4
+ /**
5
+ * 创建带前缀的应用标识符验证器
6
+ * 用于验证设置项的键格式
7
+ */
8
+ export declare const createPrefixedAppIdentifierValidator: (sectionCode: string) => (_: any, value: string) => Promise<void>;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * 验证器工具函数
3
+ */
4
+
5
+ /**
6
+ * 创建带前缀的应用标识符验证器
7
+ * 用于验证设置项的键格式
8
+ */
9
+ export var createPrefixedAppIdentifierValidator = function createPrefixedAppIdentifierValidator(sectionCode) {
10
+ return function (_, value) {
11
+ if (!value) {
12
+ return Promise.resolve();
13
+ }
14
+
15
+ // 检查是否以section code开头
16
+ var expectedPrefix = "".concat(sectionCode, ".");
17
+ if (!value.startsWith(expectedPrefix)) {
18
+ return Promise.reject(new Error("\u952E\u5FC5\u987B\u4EE5 \"".concat(expectedPrefix, "\" \u5F00\u5934")));
19
+ }
20
+
21
+ // 检查剩余部分的格式
22
+ var remainingPart = value.substring(expectedPrefix.length);
23
+ if (!remainingPart) {
24
+ return Promise.reject(new Error('键不能只包含前缀'));
25
+ }
26
+
27
+ // 验证格式:只能包含小写字母、数字、点、下划线
28
+ var validPattern = /^[a-z0-9._]+$/;
29
+ if (!validPattern.test(remainingPart)) {
30
+ return Promise.reject(new Error('键只能包含小写字母、数字、点、下划线'));
31
+ }
32
+
33
+ // 不能以点或下划线开头或结尾
34
+ if (remainingPart.startsWith('.') || remainingPart.startsWith('_') || remainingPart.endsWith('.') || remainingPart.endsWith('_')) {
35
+ return Promise.reject(new Error('键不能以点或下划线开头或结尾'));
36
+ }
37
+
38
+ // 不能包含连续的点或下划线
39
+ if (remainingPart.includes('..') || remainingPart.includes('__') || remainingPart.includes('._') || remainingPart.includes('_.')) {
40
+ return Promise.reject(new Error('键不能包含连续的点或下划线'));
41
+ }
42
+ return Promise.resolve();
43
+ };
44
+ };
package/es/index.d.ts CHANGED
@@ -23,6 +23,7 @@ export { default as EftposPay } from './components/eftposPay';
23
23
  export { default as ToCPay } from './components/pay/toC';
24
24
  export { default as ToBPay } from './components/pay/toB';
25
25
  export { default as Eftpos } from './components/eftpos';
26
+ export { default as Wallet } from './components/wallet';
26
27
  export { default as WalletList } from './components/walletList';
27
28
  export { default as BookingDashboard } from './components/booking/dashboard';
28
29
  export { default as PisellSelectCustomerModal } from './components/pisellSelectCustomerModal';
@@ -70,3 +71,4 @@ export { Login2, Register2, AuthModal } from './pro/Login2.0';
70
71
  export { default as WalletEditor } from './plus/walletEditor';
71
72
  export { default as WalletPassGallery } from './plus/walletPassGallery';
72
73
  export { default as WalletPassDetail } from './plus/walletPassGallery/components/passDetail';
74
+ export { default as SettingsRegistry } from './components/systemSettings/registry';
package/es/index.js CHANGED
@@ -27,6 +27,7 @@ export { default as EftposPay } from "./components/eftposPay";
27
27
  export { default as ToCPay } from "./components/pay/toC";
28
28
  export { default as ToBPay } from "./components/pay/toB";
29
29
  export { default as Eftpos } from "./components/eftpos";
30
+ export { default as Wallet } from "./components/wallet";
30
31
  export { default as WalletList } from "./components/walletList";
31
32
  export { default as BookingDashboard } from "./components/booking/dashboard";
32
33
  export { default as PisellSelectCustomerModal } from "./components/pisellSelectCustomerModal";
@@ -72,4 +73,5 @@ export { default as ContactInfoModal } from "./plus/contactInfoModal";
72
73
  export { Login2, Register2, AuthModal } from "./pro/Login2.0";
73
74
  export { default as WalletEditor } from "./plus/walletEditor";
74
75
  export { default as WalletPassGallery } from "./plus/walletPassGallery";
75
- export { default as WalletPassDetail } from "./plus/walletPassGallery/components/passDetail";
76
+ export { default as WalletPassDetail } from "./plus/walletPassGallery/components/passDetail";
77
+ export { default as SettingsRegistry } from "./components/systemSettings/registry";
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PhoneField: ({ value, onChange }: any) => JSX.Element;
3
2
  export default PhoneField;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SkuCardA1: (props: any) => JSX.Element;
4
3
  export default SkuCardA1;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SkuCardA2: (props: any) => JSX.Element;
4
3
  export default SkuCardA2;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SkuCardA5: (props: any) => JSX.Element;
4
3
  export default SkuCardA5;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SkuCardA9: (props: any) => JSX.Element;
4
3
  export default SkuCardA9;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SkuCardCustom: (props: any) => JSX.Element;
4
3
  export default SkuCardCustom;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { ProductCardConfig } from '../../type';
3
3
  declare const Capacity: ({ props }: {
4
4
  props: ProductCardConfig;
5
- }) => string | number | true | React.ReactFragment | JSX.Element | null;
5
+ }) => string | number | true | JSX.Element | React.ReactFragment | null;
6
6
  export default Capacity;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProductCardConfig } from '../../type';
3
2
  import './index.less';
4
3
  declare const CardCom: ({ props, className }: {
@@ -3,5 +3,5 @@ import { SkuStatusOverlayConfig } from '../../type';
3
3
  import './index.less';
4
4
  declare const CardMask: ({ props }: {
5
5
  props: SkuStatusOverlayConfig;
6
- }) => string | number | true | React.ReactFragment | JSX.Element | null;
6
+ }) => string | number | true | JSX.Element | React.ReactFragment | null;
7
7
  export default CardMask;
@@ -3,5 +3,5 @@ import { ProductCardConfig } from '../../type';
3
3
  import './index.less';
4
4
  declare const Countdown: ({ props }: {
5
5
  props: ProductCardConfig;
6
- }) => string | number | true | React.ReactFragment | JSX.Element | null;
6
+ }) => string | number | true | JSX.Element | React.ReactFragment | null;
7
7
  export default Countdown;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProductCardConfig } from '../../type';
3
2
  import './index.less';
4
3
  declare const Cover: ({ props }: {
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { ProductCardConfig } from '../../type';
3
3
  declare const Duration: ({ props }: {
4
4
  props: ProductCardConfig;
5
- }) => string | number | true | React.ReactFragment | JSX.Element | null;
5
+ }) => string | number | true | JSX.Element | React.ReactFragment | null;
6
6
  export default Duration;
@@ -3,5 +3,5 @@ import { ProductCardConfig } from '../../type';
3
3
  import './index.less';
4
4
  declare const MemberPrice: ({ props }: {
5
5
  props: ProductCardConfig;
6
- }) => string | number | true | React.ReactFragment | JSX.Element | null;
6
+ }) => string | number | true | JSX.Element | React.ReactFragment | null;
7
7
  export default MemberPrice;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProductCardConfig } from '../../type';
3
2
  import './index.less';
4
3
  declare const Price: ({ props }: {
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { ProductCardConfig } from '../../type';
3
3
  declare const Resource: ({ props }: {
4
4
  props: ProductCardConfig;
5
- }) => string | number | true | React.ReactFragment | JSX.Element | null;
5
+ }) => string | number | true | JSX.Element | React.ReactFragment | null;
6
6
  export default Resource;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { ProductCardConfig } from '../../type';
3
3
  declare const Stock: ({ props }: {
4
4
  props: ProductCardConfig;
5
- }) => string | number | true | React.ReactFragment | JSX.Element | null;
5
+ }) => string | number | true | JSX.Element | React.ReactFragment | null;
6
6
  export default Stock;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { ProductCardConfig } from '../../type';
3
3
  declare const Time: ({ props }: {
4
4
  props: ProductCardConfig;
5
- }) => string | number | true | React.ReactFragment | JSX.Element | null;
5
+ }) => string | number | true | JSX.Element | React.ReactFragment | null;
6
6
  export default Time;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const SkuCard: {
3
2
  (props: any): JSX.Element | null;
4
3
  A1: (props: any) => JSX.Element;
@@ -5,13 +5,13 @@ export declare const mergeData: (locales: any, props: SaasLoginProps) => {
5
5
  width?: number | undefined;
6
6
  height?: number | undefined;
7
7
  };
8
- logoPosition: "center" | "right" | "left";
8
+ logoPosition: "center" | "left" | "right";
9
9
  welcomeMessage: any;
10
- welcomeMessageAlign: "center" | "right" | "left";
10
+ welcomeMessageAlign: "center" | "left" | "right";
11
11
  title: any;
12
- titleAlign: "center" | "right" | "left";
12
+ titleAlign: "center" | "left" | "right";
13
13
  subtitle: any;
14
- subtitleAlign: "center" | "right" | "left";
14
+ subtitleAlign: "center" | "left" | "right";
15
15
  emailLabel: any;
16
16
  emailPlaceholder: any;
17
17
  passwordLabel: any;
@@ -19,7 +19,7 @@ export declare const mergeData: (locales: any, props: SaasLoginProps) => {
19
19
  buttonText: any;
20
20
  registerText: any;
21
21
  registerLinkText: any;
22
- registerAlign: "center" | "right" | "left";
22
+ registerAlign: "center" | "left" | "right";
23
23
  showLogo?: boolean | undefined;
24
24
  showWelcomeMessage?: boolean | undefined;
25
25
  showTitle?: boolean | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CashKeyboardBaseProps } from './types';
3
2
  export interface CashKeyboardProps extends CashKeyboardBaseProps {
4
3
  containerProps?: {
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Header: () => JSX.Element;
4
3
  export default Header;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AppointmentBooking: () => JSX.Element;
4
3
  export default AppointmentBooking;
@@ -70,7 +70,12 @@ var formatProducts = (values) => {
70
70
  bundle_edit: (_c = item._extend) == null ? void 0 : _c.bundle_edit,
71
71
  product_bundle: (0, import_utils.formatProductBundle)((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
72
72
  "product_option_item": (0, import_utils.formatProductOption)((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
73
- "product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0
73
+ "product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0,
74
+ "source_product_price": (0, import_utils.getSourceProductPrice)(item),
75
+ "main_product_selling_price": item._extend.main_product_selling_price ?? (0, import_utils.formatProductPrice)(item),
76
+ "calculated_original_price": (0, import_utils.formatOriginalPrice)(item),
77
+ "calculated_selling_price": (0, import_utils.formatSellingPrice)(item),
78
+ "tax_fee": item._extend.tax_fee
74
79
  };
75
80
  });
76
81
  return arr;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -33,4 +33,5 @@ export declare const getSumTotal: (state: any, options: {
33
33
  dueAmount: number;
34
34
  roundingAmount: number;
35
35
  originExpectAmount: number;
36
+ originExpectAmountWithoutDiscount: number;
36
37
  };