@pisell/private-materials 3.3.89 → 3.3.91

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 (263) 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 +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/businessModel/SalesModel/Sales/index.js +4 -37
  12. package/es/components/Sales/Cart/index.js +1 -5
  13. package/es/components/Sales/Cart/utils.d.ts +0 -40
  14. package/es/components/Sales/Cart/utils.js +0 -167
  15. package/es/components/Sales/Checkout/index.d.ts +0 -4
  16. package/es/components/Sales/Checkout/index.js +8 -52
  17. package/es/components/Sales/Checkout/serve.d.ts +0 -13
  18. package/es/components/Sales/Checkout/serve.js +2 -16
  19. package/es/components/Sales/Checkout/utils.js +1 -7
  20. package/es/components/Sales/Resource/index.js +2 -2
  21. package/es/components/Sales/Resource/serve.d.ts +0 -7
  22. package/es/components/Sales/Resource/serve.js +0 -10
  23. package/es/components/Sales/Summary/index.d.ts +0 -10
  24. package/es/components/Sales/Summary/index.js +2 -17
  25. package/es/components/Sales/Summary/serve.d.ts +0 -1
  26. package/es/components/Sales/Summary/serve.js +0 -6
  27. package/es/components/Sales/Summary/utils.d.ts +1 -16
  28. package/es/components/Sales/Summary/utils.js +1 -43
  29. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  30. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  31. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
  32. package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
  33. package/es/components/appointmentBooking/components/Services/index.js +27 -23
  34. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
  35. package/es/components/appointmentBooking/deposit/index.js +2 -4
  36. package/es/components/appointmentBooking/index.js +0 -14
  37. package/es/components/appointmentBooking/index.less +1 -1
  38. package/es/components/booking/components/footer/utils.d.ts +0 -1
  39. package/es/components/booking/components/footer/utils.js +1 -1
  40. package/es/components/booking/components/voucher/index.js +2 -2
  41. package/es/components/booking/info/service2/utils.d.ts +1 -1
  42. package/es/components/booking/info/service2/utils.js +2 -3
  43. package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
  44. package/es/components/booking/info2/service/addService/utils.js +13 -44
  45. package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
  46. package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
  47. package/es/components/booking/info2/utilsByBooking.js +0 -9
  48. package/es/components/booking/locales.d.ts +0 -3
  49. package/es/components/booking/locales.js +0 -3
  50. package/es/components/eftposPay/amount.d.ts +1 -1
  51. package/es/components/eftposPay/const.d.ts +1 -4
  52. package/es/components/eftposPay/const.js +1 -3
  53. package/es/components/eftposPay/device.d.ts +1 -1
  54. package/es/components/eftposPay/hooks.d.ts +2 -2
  55. package/es/components/eftposPay/hooks.js +1 -3
  56. package/es/components/eftposPay/index.js +1 -1
  57. package/es/components/eftposPay/manufacturer.d.ts +0 -1
  58. package/es/components/eftposPay/manufacturer.js +0 -4
  59. package/es/components/eftposPay/pay.d.ts +1 -1
  60. package/es/components/eftposPay/pay.js +2 -6
  61. package/es/components/eftposPay/store/index.d.ts +4 -4
  62. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -29
  63. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
  64. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  65. package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
  66. package/es/components/eventBooking/components/bookingDetailModal/index.js +4 -22
  67. package/es/components/eventBooking/index.js +7 -21
  68. package/es/components/eventBooking/locales.d.ts +0 -24
  69. package/es/components/eventBooking/locales.js +6 -30
  70. package/es/components/index.d.ts +1 -3
  71. package/es/components/index.js +1 -3
  72. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  73. package/es/components/schedules/utils.d.ts +1 -1
  74. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  75. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  76. package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
  77. package/es/components/ticketBooking/locales.d.ts +146 -164
  78. package/es/components/ticketBooking/locales.js +147 -195
  79. package/es/index.d.ts +0 -2
  80. package/es/index.js +1 -3
  81. package/es/utils/index.d.ts +1 -1
  82. package/lib/businessModel/SalesModel/Sales/index.js +8 -22
  83. package/lib/components/Sales/Cart/index.js +0 -1
  84. package/lib/components/Sales/Cart/utils.d.ts +0 -40
  85. package/lib/components/Sales/Cart/utils.js +0 -117
  86. package/lib/components/Sales/Checkout/index.d.ts +0 -4
  87. package/lib/components/Sales/Checkout/index.js +7 -39
  88. package/lib/components/Sales/Checkout/serve.d.ts +0 -13
  89. package/lib/components/Sales/Checkout/serve.js +2 -7
  90. package/lib/components/Sales/Checkout/utils.js +0 -2
  91. package/lib/components/Sales/Resource/index.js +1 -1
  92. package/lib/components/Sales/Resource/serve.d.ts +0 -7
  93. package/lib/components/Sales/Resource/serve.js +2 -9
  94. package/lib/components/Sales/Summary/index.d.ts +0 -10
  95. package/lib/components/Sales/Summary/index.js +1 -7
  96. package/lib/components/Sales/Summary/serve.d.ts +0 -1
  97. package/lib/components/Sales/Summary/serve.js +0 -32
  98. package/lib/components/Sales/Summary/utils.d.ts +1 -16
  99. package/lib/components/Sales/Summary/utils.js +1 -30
  100. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  101. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  102. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
  103. package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
  104. package/lib/components/appointmentBooking/components/Services/index.js +11 -6
  105. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
  106. package/lib/components/appointmentBooking/deposit/index.js +2 -4
  107. package/lib/components/appointmentBooking/index.js +0 -11
  108. package/lib/components/appointmentBooking/index.less +1 -1
  109. package/lib/components/booking/components/footer/utils.d.ts +0 -1
  110. package/lib/components/booking/components/footer/utils.js +0 -2
  111. package/lib/components/booking/components/voucher/index.js +2 -2
  112. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  113. package/lib/components/booking/info/service2/utils.js +2 -2
  114. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
  115. package/lib/components/booking/info2/service/addService/utils.js +4 -27
  116. package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
  117. package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
  118. package/lib/components/booking/info2/utilsByBooking.js +0 -6
  119. package/lib/components/booking/locales.d.ts +0 -3
  120. package/lib/components/booking/locales.js +0 -3
  121. package/lib/components/eftposPay/amount.d.ts +1 -1
  122. package/lib/components/eftposPay/const.d.ts +1 -4
  123. package/lib/components/eftposPay/const.js +0 -2
  124. package/lib/components/eftposPay/device.d.ts +1 -1
  125. package/lib/components/eftposPay/hooks.d.ts +2 -2
  126. package/lib/components/eftposPay/hooks.js +4 -11
  127. package/lib/components/eftposPay/index.js +1 -1
  128. package/lib/components/eftposPay/manufacturer.d.ts +0 -1
  129. package/lib/components/eftposPay/manufacturer.js +0 -6
  130. package/lib/components/eftposPay/pay.d.ts +1 -1
  131. package/lib/components/eftposPay/pay.js +2 -13
  132. package/lib/components/eftposPay/store/index.d.ts +4 -4
  133. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +3 -16
  134. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
  135. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  136. package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
  137. package/lib/components/eventBooking/components/bookingDetailModal/index.js +4 -10
  138. package/lib/components/eventBooking/index.js +7 -11
  139. package/lib/components/eventBooking/locales.d.ts +0 -24
  140. package/lib/components/eventBooking/locales.js +6 -30
  141. package/lib/components/index.d.ts +1 -3
  142. package/lib/components/index.js +0 -6
  143. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  144. package/lib/components/schedules/utils.d.ts +1 -1
  145. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  146. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  147. package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
  148. package/lib/components/ticketBooking/locales.d.ts +146 -164
  149. package/lib/components/ticketBooking/locales.js +4 -22
  150. package/lib/index.d.ts +0 -2
  151. package/lib/index.js +0 -6
  152. package/lib/utils/index.d.ts +1 -1
  153. package/package.json +3 -3
  154. package/es/components/booking/editBookingModal/index.d.ts +0 -5
  155. package/es/components/booking/editBookingModal/index.js +0 -386
  156. package/es/components/booking/editBookingModal/index.less +0 -8
  157. package/es/components/booking/editBookingModal/locales.d.ts +0 -21
  158. package/es/components/booking/editBookingModal/locales.js +0 -20
  159. package/es/components/booking/editBookingModal/mock.d.ts +0 -807
  160. package/es/components/booking/editBookingModal/mock.js +0 -2993
  161. package/es/components/booking/editBookingModal/serve.d.ts +0 -51
  162. package/es/components/booking/editBookingModal/serve.js +0 -288
  163. package/es/components/booking/editBookingModal/type.d.ts +0 -12
  164. package/es/components/booking/editBookingModal/type.js +0 -1
  165. package/es/components/booking/editBookingModal/utils.d.ts +0 -12
  166. package/es/components/booking/editBookingModal/utils.js +0 -157
  167. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
  168. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
  169. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
  170. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
  171. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
  172. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  173. package/es/components/eftposPay/linkly/const.js +0 -82
  174. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  175. package/es/components/eftposPay/linkly/hooks/index.js +0 -2
  176. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  177. package/es/components/eftposPay/linkly/hooks/normal.js +0 -318
  178. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  179. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
  180. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  181. package/es/components/eftposPay/linkly/index.js +0 -197
  182. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  183. package/es/components/eftposPay/linkly/service.js +0 -73
  184. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  185. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
  186. package/es/components/stepController/components/Content/index.d.ts +0 -7
  187. package/es/components/stepController/components/Content/index.js +0 -9
  188. package/es/components/stepController/components/Content/index.less +0 -8
  189. package/es/components/stepController/components/Footer/index.d.ts +0 -8
  190. package/es/components/stepController/components/Footer/index.js +0 -15
  191. package/es/components/stepController/components/Footer/index.less +0 -39
  192. package/es/components/stepController/components/Header/index.d.ts +0 -20
  193. package/es/components/stepController/components/Header/index.js +0 -97
  194. package/es/components/stepController/components/Header/index.less +0 -21
  195. package/es/components/stepController/index.d.ts +0 -5
  196. package/es/components/stepController/index.js +0 -64
  197. package/es/components/stepController/index.less +0 -11
  198. package/es/components/stepController/locales.d.ts +0 -27
  199. package/es/components/stepController/locales.js +0 -32
  200. package/es/components/stepController/types.d.ts +0 -23
  201. package/es/components/stepController/types.js +0 -1
  202. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  203. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
  204. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  205. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  206. package/es/hooks/useWindowSize.d.ts +0 -5
  207. package/es/hooks/useWindowSize.js +0 -26
  208. package/lib/components/booking/editBookingModal/index.d.ts +0 -5
  209. package/lib/components/booking/editBookingModal/index.js +0 -363
  210. package/lib/components/booking/editBookingModal/index.less +0 -8
  211. package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
  212. package/lib/components/booking/editBookingModal/locales.js +0 -44
  213. package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
  214. package/lib/components/booking/editBookingModal/mock.js +0 -3314
  215. package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
  216. package/lib/components/booking/editBookingModal/serve.js +0 -178
  217. package/lib/components/booking/editBookingModal/type.d.ts +0 -12
  218. package/lib/components/booking/editBookingModal/type.js +0 -17
  219. package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
  220. package/lib/components/booking/editBookingModal/utils.js +0 -158
  221. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
  222. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
  223. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
  224. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
  225. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
  226. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  227. package/lib/components/eftposPay/linkly/const.js +0 -102
  228. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  229. package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
  230. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  231. package/lib/components/eftposPay/linkly/hooks/normal.js +0 -239
  232. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  233. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
  234. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  235. package/lib/components/eftposPay/linkly/index.js +0 -208
  236. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  237. package/lib/components/eftposPay/linkly/service.js +0 -55
  238. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  239. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
  240. package/lib/components/stepController/components/Content/index.d.ts +0 -7
  241. package/lib/components/stepController/components/Content/index.js +0 -40
  242. package/lib/components/stepController/components/Content/index.less +0 -8
  243. package/lib/components/stepController/components/Footer/index.d.ts +0 -8
  244. package/lib/components/stepController/components/Footer/index.js +0 -49
  245. package/lib/components/stepController/components/Footer/index.less +0 -39
  246. package/lib/components/stepController/components/Header/index.d.ts +0 -20
  247. package/lib/components/stepController/components/Header/index.js +0 -104
  248. package/lib/components/stepController/components/Header/index.less +0 -21
  249. package/lib/components/stepController/index.d.ts +0 -5
  250. package/lib/components/stepController/index.js +0 -89
  251. package/lib/components/stepController/index.less +0 -11
  252. package/lib/components/stepController/locales.d.ts +0 -27
  253. package/lib/components/stepController/locales.js +0 -50
  254. package/lib/components/stepController/types.d.ts +0 -23
  255. package/lib/components/stepController/types.js +0 -17
  256. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  257. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
  258. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  259. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
  260. package/lib/hooks/useWindowSize.d.ts +0 -5
  261. package/lib/hooks/useWindowSize.js +0 -51
  262. package/lowcode/edit-booking-modal/meta.ts +0 -53
  263. package/lowcode/step-controller/meta.ts +0 -88
@@ -1,311 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/components/booking/info2/service/editService/ResourcesV2/index.tsx
30
- var ResourcesV2_exports = {};
31
- __export(ResourcesV2_exports, {
32
- default: () => ResourcesV2_default
33
- });
34
- module.exports = __toCommonJS(ResourcesV2_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_classnames = __toESM(require("classnames"));
37
- var import_antd = require("antd");
38
- var import_materials = require("@pisell/materials");
39
- var import_MaxLengthSelect = __toESM(require("./MaxLengthSelect"));
40
- var import_like = __toESM(require("../../../../info/service/like"));
41
- var import_index = require("./index.less");
42
- var import_utils = require("@pisell/utils");
43
- var import_utilsByBooking = require("../../../utilsByBooking");
44
- var import_lodash = require("lodash");
45
- var import_utils2 = require("../utils");
46
- var import_ahooks = require("ahooks");
47
- var import_icons = require("@ant-design/icons");
48
- var Resources = ({
49
- state,
50
- cacheItem,
51
- originCacheItem,
52
- getCurrentCacheItem,
53
- onChange,
54
- value,
55
- originValue,
56
- config = {
57
- // 是否显示自动分配
58
- autoAllocation: true,
59
- // 是否显示资源错误图标
60
- resourceErrorIcon: true,
61
- disabled: false,
62
- size: "large"
63
- }
64
- }, ref) => {
65
- var _a, _b, _c;
66
- const [showError, setShowError] = (0, import_react.useState)(false);
67
- const update = (0, import_ahooks.useUpdate)();
68
- const data = (0, import_react.useMemo)(() => {
69
- var _a2;
70
- return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resources) || [];
71
- }, [(_a = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a.resources]);
72
- const originData = (0, import_react.useMemo)(() => {
73
- var _a2;
74
- return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resources) || [];
75
- }, [(_b = originCacheItem == null ? void 0 : originCacheItem._data) == null ? void 0 : _b.resource]);
76
- const resourceMaps = (0, import_react.useMemo)(() => {
77
- var _a2;
78
- return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resourceMaps) || [];
79
- }, [(_c = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _c.resourceMaps]);
80
- const defaultValue = (0, import_react.useMemo)(() => {
81
- return data.reduce((pre, cur2) => {
82
- pre[cur2.form_id] = [];
83
- return pre;
84
- }, {});
85
- }, [data]);
86
- const _value = (0, import_react.useMemo)(() => {
87
- return value || defaultValue;
88
- }, [value, defaultValue]);
89
- const handleCheckAutoAllocation = (id, checked) => {
90
- (0, import_utils2.setAutoAllocationStorage)({ [id]: checked });
91
- update();
92
- };
93
- const _onChange = (val, form_id, key) => {
94
- let _val = { ..._value };
95
- let maps = _val[form_id] ? _val[form_id].reduce((pre, cur2) => {
96
- pre[cur2.relation_id] = cur2;
97
- return pre;
98
- }, {}) : {};
99
- _val[form_id] = val.map((d) => {
100
- var _a2, _b2, _c2, _d2, _e, _f, _g, _h;
101
- let _d = maps[d];
102
- if (_d) {
103
- if (key === "like_status") {
104
- d[key].like_status = val;
105
- }
106
- }
107
- const currentForm = (resourceMaps == null ? void 0 : resourceMaps[form_id]) || {};
108
- return (
109
- // maps[d] 为真时, 说明是之前已选择, 否则为新增的值,补充数据
110
- maps[d] || {
111
- relation_type: ((_b2 = (_a2 = currentForm.renderListMaps[d]) == null ? void 0 : _a2.usable) == null ? void 0 : _b2.relation_type) || "form",
112
- form_id,
113
- relation_id: d,
114
- like_status: "common",
115
- children: (_d2 = (_c2 = currentForm.renderListMaps) == null ? void 0 : _c2[d]) == null ? void 0 : _d2.children,
116
- // 新添加的数据补充错误信息
117
- errors: (0, import_utilsByBooking.getErrorList)(
118
- (_e = currentForm.renderListMaps) == null ? void 0 : _e[d],
119
- getCurrentCacheItem()
120
- ),
121
- metadata: {
122
- ...(_g = (_f = currentForm.renderListMaps) == null ? void 0 : _f[d]) == null ? void 0 : _g.metadata,
123
- form_name: currentForm.title,
124
- resource_name: (_h = currentForm.renderListMaps[d]) == null ? void 0 : _h.main_field
125
- }
126
- }
127
- );
128
- });
129
- setShowError(false);
130
- onChange == null ? void 0 : onChange(_val);
131
- };
132
- const setLikeStatus = (val, form_id, key) => {
133
- var _a2;
134
- let _val = { ..._value };
135
- if ((_a2 = _val == null ? void 0 : _val[form_id]) == null ? void 0 : _a2[0]) {
136
- _val[form_id][0][key] = val;
137
- onChange == null ? void 0 : onChange(_val);
138
- }
139
- };
140
- const renderOptions = (0, import_react.useCallback)(
141
- (array, value2 = "value", label = "label", type) => {
142
- return array.map((d) => {
143
- let props = {};
144
- if (type === "resource") {
145
- props.labelText = d.labelText;
146
- }
147
- return /* @__PURE__ */ import_react.default.createElement(
148
- import_antd.Select.Option,
149
- {
150
- value: d[value2],
151
- key: d[value2],
152
- ...props,
153
- relation_type: d.relation_type
154
- },
155
- d[label]
156
- );
157
- });
158
- },
159
- [config == null ? void 0 : config.resourceErrorIcon]
160
- );
161
- const check = () => {
162
- var _a2;
163
- for (let item of data) {
164
- let _length = (_a2 = _value[item.form_id]) == null ? void 0 : _a2.length;
165
- if (item.select_type.min > _length) {
166
- setShowError(true);
167
- return false;
168
- }
169
- }
170
- return true;
171
- };
172
- (0, import_react.useImperativeHandle)(ref, () => {
173
- return {
174
- check
175
- };
176
- });
177
- const getIsAutoAllocation = (id) => {
178
- return (0, import_utils2.getAutoAllocationStorage)(id);
179
- };
180
- const renderItem = (item, isOrigin) => {
181
- var _a2;
182
- if (!item) return null;
183
- const disabled = isOrigin || (config == null ? void 0 : config.disabled);
184
- const cur2 = isOrigin ? originValue[item.form_id] : _value[item.form_id];
185
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { flex: "1 0" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-v2 resource-col" }, item.select_type.type === "multiple" ? null : /* @__PURE__ */ import_react.default.createElement(
186
- import_antd.Button,
187
- {
188
- className: (0, import_classnames.default)(
189
- "resource-col-like-wrap",
190
- {
191
- "resource-col-like-wrap-disabled": disabled
192
- },
193
- (config == null ? void 0 : config.size) || "large"
194
- ),
195
- size: config == null ? void 0 : config.size,
196
- onClick: () => {
197
- var _a3;
198
- if (disabled) {
199
- return;
200
- }
201
- setLikeStatus(
202
- ((_a3 = cur2 == null ? void 0 : cur2[0]) == null ? void 0 : _a3.like_status) === "like" ? "common" : "like",
203
- item.form_id,
204
- "like_status"
205
- );
206
- }
207
- },
208
- /* @__PURE__ */ import_react.default.createElement(
209
- import_like.default,
210
- {
211
- status: (_a2 = cur2 == null ? void 0 : cur2[0]) == null ? void 0 : _a2.like_status,
212
- className: `${disabled ? "like-icon-disabled" : ""}`
213
- }
214
- )
215
- ), /* @__PURE__ */ import_react.default.createElement(
216
- import_MaxLengthSelect.default,
217
- {
218
- className: "resource-col-select",
219
- size: (config == null ? void 0 : config.size) || "large",
220
- maxLength: item.select_type.max,
221
- mode: item.select_type.type === "multiple" ? "multiple" : void 0,
222
- onChange: (e) => {
223
- let val = e;
224
- if (!(0, import_lodash.isArray)(e)) {
225
- if (e || e === 0) {
226
- val = [e];
227
- }
228
- }
229
- _onChange(val, item.form_id, "value");
230
- },
231
- value: cur2 == null ? void 0 : cur2.map((d) => d.relation_id),
232
- showSearch: true,
233
- filterOption: (str, option) => {
234
- return ((option == null ? void 0 : option.labelText) || "").toLowerCase().includes((str || "").toLowerCase());
235
- },
236
- disabled
237
- },
238
- renderOptions(
239
- item.renderList,
240
- "id",
241
- (config == null ? void 0 : config.resourceErrorIcon) ? "label" : "labelText",
242
- "resource"
243
- )
244
- ), (config == null ? void 0 : config.autoAllocation) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
245
- import_antd.Checkbox,
246
- {
247
- checked: getIsAutoAllocation(item.form_id),
248
- onChange: (e) => {
249
- handleCheckAutoAllocation(item.form_id, e.target.checked);
250
- }
251
- }
252
- ), /* @__PURE__ */ import_react.default.createElement(
253
- import_antd.Tooltip,
254
- {
255
- title: import_utils.locales.getText(
256
- "page.booking.text.resource.check-auto-allocation-tip"
257
- )
258
- },
259
- /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, null)
260
- )) : null)));
261
- };
262
- const renderErrors = (item) => {
263
- const cur2 = _value[item.form_id];
264
- const errors = (cur2 || []).reduce((pre, d) => {
265
- return pre.concat((d == null ? void 0 : d.errors) || []);
266
- }, []);
267
- return state.renderType !== "eventBooking" && (errors || []).map((d) => {
268
- return /* @__PURE__ */ import_react.default.createElement(
269
- import_antd.Alert,
270
- {
271
- key: d.type,
272
- message: d.label,
273
- type: "warning",
274
- showIcon: true,
275
- style: { marginBottom: 12 }
276
- }
277
- );
278
- });
279
- };
280
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.map((item) => {
281
- const originItem = originData == null ? void 0 : originData.find(
282
- (originDataItem) => originDataItem.form_id === item.form_id
283
- );
284
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, { key: item.form_id }, /* @__PURE__ */ import_react.default.createElement(
285
- import_antd.Form.Item,
286
- {
287
- label: item.title,
288
- required: true,
289
- labelCol: config == null ? void 0 : config.labelCol,
290
- extra: showError && item.select_type.min > (cur == null ? void 0 : cur.length) ? /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#ff4d4f" } }, import_utils.locales.getText(
291
- "page.booking.text.resource.min-length-error"
292
- )(item.select_type.min, item.title)) : void 0
293
- },
294
- /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { gutter: [16, 16], wrap: false }, renderItem(originItem, true), !!originItem ? /* @__PURE__ */ import_react.default.createElement(
295
- import_antd.Col,
296
- {
297
- flex: "none",
298
- style: { display: "flex", alignItems: "center" }
299
- },
300
- /* @__PURE__ */ import_react.default.createElement(
301
- import_materials.Iconfont,
302
- {
303
- type: "pisell2-arrow-block-right",
304
- style: { fontSize: 24, color: "#1b1b1b" }
305
- }
306
- )
307
- ) : null, renderItem(item, false))
308
- ), renderErrors(item));
309
- }));
310
- };
311
- var ResourcesV2_default = (0, import_react.forwardRef)(Resources);
@@ -1,44 +0,0 @@
1
- .resource-col.resource-v2 {
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
- gap: 10px;
6
- width: 100%;
7
- overflow: hidden;
8
-
9
- .resource-col-like-wrap {
10
- width: 32px;
11
- height: 32px;
12
-
13
- &.large {
14
- width: 40px;
15
- height: 40px;
16
- }
17
-
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
- padding: 0;
22
- flex-shrink: 0;
23
-
24
- .like-resource {
25
- }
26
- }
27
-
28
- .resource-col-like-wrap-disabled,
29
- .like-icon-disabled {
30
- opacity: 0.5;
31
- cursor: not-allowed;
32
- }
33
-
34
- .resource-col-select {
35
- flex: 1;
36
- overflow: hidden;
37
-
38
- .resource-option-label-text {
39
- display: inline-block;
40
- overflow: hidden;
41
- text-overflow: ellipsis;
42
- }
43
- }
44
- }
@@ -1,23 +0,0 @@
1
- import { State } from '../store';
2
- import { ModeEnum } from '../const';
3
- export declare const getStep: (mode?: ModeEnum) => State['steps'];
4
- declare const _default: (params: any) => State;
5
- export default _default;
6
- export declare enum EVisibleButtonType {
7
- /** 取消按钮 */
8
- CancelButton = "CancelButton",
9
- /** 等待按钮 */
10
- WaitButton = "WaitButton"
11
- }
12
- export declare enum LinklyActionStatus {
13
- /** 空 */
14
- Empty = "Empty",
15
- /** 取消 */
16
- Cancel = "Cancel",
17
- /** 取消中 */
18
- CancelWaiting = "CancelWaiting",
19
- /** 签名 */
20
- Signature = "Signature",
21
- /** 签名等待中 */
22
- SignatureWaiting = "SignatureWaiting"
23
- }
@@ -1,102 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/components/eftposPay/linkly/const.ts
20
- var const_exports = {};
21
- __export(const_exports, {
22
- EVisibleButtonType: () => EVisibleButtonType,
23
- LinklyActionStatus: () => LinklyActionStatus,
24
- default: () => const_default,
25
- getStep: () => getStep
26
- });
27
- module.exports = __toCommonJS(const_exports);
28
- var import_utils = require("@pisell/utils");
29
- var import_const = require("../const");
30
- var getStep = (mode = import_const.ModeEnum.Pay) => [
31
- {
32
- key: Date.now(),
33
- title: import_utils.locales.getText("page.eftpos-pay.text.loading")(mode),
34
- // 'Payment in process...',
35
- text: import_utils.locales.getText("page.eftpos-pay.text.waiting.processing"),
36
- // 'Waiting for the processing...',
37
- warn: "",
38
- tip: import_utils.locales.getText("page.eftpos-pay.text.processing"),
39
- // 'processing...',
40
- status: import_const.StatusEnum.Loading
41
- }
42
- ];
43
- var const_default = (params) => {
44
- const {
45
- order_id,
46
- name,
47
- symbol,
48
- amount,
49
- mode,
50
- number,
51
- pay,
52
- device,
53
- net,
54
- client,
55
- ...other
56
- } = params || {
57
- mode: import_const.ModeEnum.Pay
58
- };
59
- console.log("params =>>>>>> ", params);
60
- return {
61
- order_id,
62
- name,
63
- symbol,
64
- amount,
65
- mode,
66
- eftpos: import_const.EftposEnum.Linkly,
67
- key: Date.now(),
68
- step: 0,
69
- type: import_const.PayRouteEnum.Step,
70
- title: import_utils.locales.getText("page.eftpos-pay.text.loading")(mode),
71
- component: "",
72
- status: import_const.StatusEnum.Loading,
73
- steps: getStep(mode),
74
- render: true,
75
- client: client !== "undefined" ? client : import_const.ClientEnum.Merchant,
76
- warn: "",
77
- custom: other || {},
78
- ...typeof net !== "undefined" ? { net } : {},
79
- ...typeof number !== "undefined" ? { number } : {},
80
- ...typeof pay !== "undefined" ? { pay } : {},
81
- ...typeof device !== "undefined" ? { device } : {}
82
- };
83
- };
84
- var EVisibleButtonType = /* @__PURE__ */ ((EVisibleButtonType2) => {
85
- EVisibleButtonType2["CancelButton"] = "CancelButton";
86
- EVisibleButtonType2["WaitButton"] = "WaitButton";
87
- return EVisibleButtonType2;
88
- })(EVisibleButtonType || {});
89
- var LinklyActionStatus = /* @__PURE__ */ ((LinklyActionStatus2) => {
90
- LinklyActionStatus2["Empty"] = "Empty";
91
- LinklyActionStatus2["Cancel"] = "Cancel";
92
- LinklyActionStatus2["CancelWaiting"] = "CancelWaiting";
93
- LinklyActionStatus2["Signature"] = "Signature";
94
- LinklyActionStatus2["SignatureWaiting"] = "SignatureWaiting";
95
- return LinklyActionStatus2;
96
- })(LinklyActionStatus || {});
97
- // Annotate the CommonJS export names for ESM import in node:
98
- 0 && (module.exports = {
99
- EVisibleButtonType,
100
- LinklyActionStatus,
101
- getStep
102
- });
@@ -1,2 +0,0 @@
1
- export * from './normal';
2
- export * from './useTimeQuery';
@@ -1,25 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/components/eftposPay/linkly/hooks/index.ts
17
- var hooks_exports = {};
18
- module.exports = __toCommonJS(hooks_exports);
19
- __reExport(hooks_exports, require("./normal"), module.exports);
20
- __reExport(hooks_exports, require("./useTimeQuery"), module.exports);
21
- // Annotate the CommonJS export names for ESM import in node:
22
- 0 && (module.exports = {
23
- ...require("./normal"),
24
- ...require("./useTimeQuery")
25
- });
@@ -1,30 +0,0 @@
1
- /**
2
- * 支付或退款
3
- * @param failAction 失败回调
4
- */
5
- export declare const useLinklyPayOrRefund: (handleCheck: () => boolean) => {
6
- action: {
7
- pay: import("ahooks/lib/useRequest/src/types").Result<any, [data: any]>;
8
- };
9
- payOrRefund: (resultQuery: any, handleLinklySuccess: any) => void;
10
- };
11
- /**
12
- * @title: 取消支付或退款
13
- * @description: 取消支付或退款调用接口后不管成功还是失败都需要调用支付查询接口
14
- */
15
- export declare const useLinklyCancel: (handleCheck: () => boolean) => {
16
- action: {
17
- cancel: import("ahooks/lib/useRequest/src/types").Result<any, [param: any]>;
18
- };
19
- linklyCancel: (resultQuery: any) => void;
20
- };
21
- /**
22
- * @title: 支付或退款签名
23
- * @description: 支付或退款签名调用接口后不管成功还是失败都需要调用支付查询接口
24
- */
25
- export declare const useLinklySignature: (handleCheck: () => boolean) => {
26
- action: {
27
- signature: import("ahooks/lib/useRequest/src/types").Result<any, [param: any]>;
28
- };
29
- linklySignature: (status: number, resultQuery: any) => void;
30
- };