@pisell/private-materials 3.0.203 → 3.0.205

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 (292) 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 +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +27 -12
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +33 -18
  11. package/es/components/booking/components/customSelect/index.d.ts +0 -1
  12. package/es/components/booking/components/customSelect/index.js +2 -6
  13. package/es/components/booking/components/footer/amount.js +22 -46
  14. package/es/components/booking/components/footer/index.js +40 -84
  15. package/es/components/booking/components/footer/utils.js +35 -266
  16. package/es/components/booking/forms/model.d.ts +1 -1
  17. package/es/components/booking/info/addServiceVariant/index.js +1 -8
  18. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  19. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
  20. package/es/components/booking/info/clientVariant/vertical/index.js +9 -124
  21. package/es/components/booking/info/main.js +15 -28
  22. package/es/components/booking/info/model.js +0 -3
  23. package/es/components/booking/info/pet/index.js +5 -54
  24. package/es/components/booking/info/service/addService/index.js +96 -187
  25. package/es/components/booking/info/service/addService/index.less +3 -13
  26. package/es/components/booking/info/service/addService/utils.d.ts +2 -12
  27. package/es/components/booking/info/service/addService/utils.js +26 -103
  28. package/es/components/booking/info/service/editService/index.js +132 -435
  29. package/es/components/booking/info/service/editService/index.less +13 -18
  30. package/es/components/booking/info/service/serve.d.ts +0 -10
  31. package/es/components/booking/info/service/serve.js +0 -28
  32. package/es/components/booking/info/utils.d.ts +0 -20
  33. package/es/components/booking/info/utils.js +0 -37
  34. package/es/components/booking/locales.d.ts +0 -66
  35. package/es/components/booking/locales.js +3 -81
  36. package/es/components/booking/model.d.ts +1 -5
  37. package/es/components/booking/model.js +2 -4
  38. package/es/components/booking/notes/index.d.ts +1 -1
  39. package/es/components/booking/notes/model.d.ts +1 -1
  40. package/es/components/booking/payments/model.d.ts +1 -1
  41. package/es/components/booking/utils.d.ts +3 -12
  42. package/es/components/booking/utils.js +26 -143
  43. package/es/components/eftpos/form/index.js +12 -6
  44. package/es/components/eftpos/group/index.d.ts +1 -2
  45. package/es/components/eftpos/group/index.js +1 -2
  46. package/es/components/eftpos/hooks.d.ts +4 -4
  47. package/es/components/eftpos/index.js +2 -2
  48. package/es/components/eftpos/receipt/index.d.ts +24 -0
  49. package/es/components/eftpos/receipt/index.js +96 -0
  50. package/es/components/eftposPay/app.d.ts +11 -0
  51. package/es/components/eftposPay/app.js +173 -0
  52. package/es/components/eftposPay/component/fail/failCustom.js +1 -0
  53. package/es/components/eftposPay/component/fail/index.js +1 -0
  54. package/es/components/eftposPay/component/manual/index.js +4 -1
  55. package/es/components/eftposPay/component/step/index.d.ts +6 -6
  56. package/es/components/eftposPay/component/step/step.d.ts +4 -4
  57. package/es/components/eftposPay/const.d.ts +27 -1
  58. package/es/components/eftposPay/const.js +22 -0
  59. package/es/components/eftposPay/device.d.ts +1 -1
  60. package/es/components/eftposPay/device.js +2 -2
  61. package/es/components/eftposPay/helper.d.ts +6 -0
  62. package/es/components/eftposPay/helper.js +24 -4
  63. package/es/components/eftposPay/hooks.d.ts +2 -1
  64. package/es/components/eftposPay/hooks.js +22 -16
  65. package/es/components/eftposPay/index.d.ts +1 -1
  66. package/es/components/eftposPay/index.js +130 -179
  67. package/es/components/eftposPay/locales.d.ts +15 -0
  68. package/es/components/eftposPay/locales.js +15 -0
  69. package/es/components/eftposPay/payo/config.js +20 -8
  70. package/es/components/eftposPay/store/index.d.ts +1 -1
  71. package/es/components/eftposPay/tip.d.ts +10 -0
  72. package/es/components/eftposPay/tip.js +177 -0
  73. package/es/components/eftposPay/tip.less +9 -0
  74. package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
  75. package/es/components/eftposPay/tyro/index.js +55 -22
  76. package/es/components/eftposPay/windcave/helper.d.ts +1 -1
  77. package/es/components/eftposPay/windcave/windcave.js +17 -6
  78. package/es/components/schedules/index.d.ts +1 -1
  79. package/es/components/schedules/model.d.ts +1 -1
  80. package/es/index.d.ts +0 -1
  81. package/es/index.js +1 -2
  82. package/lib/components/booking/components/customSelect/index.d.ts +0 -1
  83. package/lib/components/booking/components/customSelect/index.js +2 -6
  84. package/lib/components/booking/components/footer/amount.js +8 -27
  85. package/lib/components/booking/components/footer/index.js +4 -25
  86. package/lib/components/booking/components/footer/utils.js +35 -161
  87. package/lib/components/booking/forms/model.d.ts +1 -1
  88. package/lib/components/booking/info/addServiceVariant/index.js +0 -5
  89. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  90. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
  91. package/lib/components/booking/info/clientVariant/vertical/index.js +11 -87
  92. package/lib/components/booking/info/main.js +9 -17
  93. package/lib/components/booking/info/model.js +0 -3
  94. package/lib/components/booking/info/pet/index.js +25 -61
  95. package/lib/components/booking/info/service/addService/index.js +84 -115
  96. package/lib/components/booking/info/service/addService/index.less +3 -13
  97. package/lib/components/booking/info/service/addService/utils.d.ts +2 -12
  98. package/lib/components/booking/info/service/addService/utils.js +10 -58
  99. package/lib/components/booking/info/service/editService/index.js +182 -425
  100. package/lib/components/booking/info/service/editService/index.less +13 -18
  101. package/lib/components/booking/info/service/serve.d.ts +0 -10
  102. package/lib/components/booking/info/service/serve.js +2 -7
  103. package/lib/components/booking/info/utils.d.ts +0 -20
  104. package/lib/components/booking/info/utils.js +0 -41
  105. package/lib/components/booking/locales.d.ts +0 -66
  106. package/lib/components/booking/locales.js +3 -69
  107. package/lib/components/booking/model.d.ts +1 -5
  108. package/lib/components/booking/model.js +2 -4
  109. package/lib/components/booking/notes/index.d.ts +1 -1
  110. package/lib/components/booking/notes/model.d.ts +1 -1
  111. package/lib/components/booking/payments/model.d.ts +1 -1
  112. package/lib/components/booking/utils.d.ts +3 -12
  113. package/lib/components/booking/utils.js +18 -89
  114. package/lib/components/eftpos/form/index.js +12 -6
  115. package/lib/components/eftpos/group/index.d.ts +1 -2
  116. package/lib/components/eftpos/group/index.js +0 -1
  117. package/lib/components/eftpos/hooks.d.ts +4 -4
  118. package/lib/components/eftpos/index.js +2 -2
  119. package/lib/components/eftpos/receipt/index.d.ts +24 -0
  120. package/lib/components/eftpos/receipt/index.js +88 -0
  121. package/lib/components/eftposPay/app.d.ts +11 -0
  122. package/lib/components/eftposPay/app.js +166 -0
  123. package/lib/components/eftposPay/component/fail/failCustom.js +1 -1
  124. package/lib/components/eftposPay/component/fail/index.js +1 -1
  125. package/lib/components/eftposPay/component/manual/index.js +19 -5
  126. package/lib/components/eftposPay/component/step/index.d.ts +6 -6
  127. package/lib/components/eftposPay/component/step/step.d.ts +4 -4
  128. package/lib/components/eftposPay/const.d.ts +27 -1
  129. package/lib/components/eftposPay/const.js +18 -0
  130. package/lib/components/eftposPay/device.d.ts +1 -1
  131. package/lib/components/eftposPay/device.js +2 -2
  132. package/lib/components/eftposPay/helper.d.ts +6 -0
  133. package/lib/components/eftposPay/helper.js +29 -4
  134. package/lib/components/eftposPay/hooks.d.ts +2 -1
  135. package/lib/components/eftposPay/hooks.js +8 -2
  136. package/lib/components/eftposPay/index.d.ts +1 -1
  137. package/lib/components/eftposPay/index.js +106 -144
  138. package/lib/components/eftposPay/locales.d.ts +15 -0
  139. package/lib/components/eftposPay/locales.js +15 -0
  140. package/lib/components/eftposPay/payo/config.js +33 -9
  141. package/lib/components/eftposPay/store/index.d.ts +1 -1
  142. package/lib/components/eftposPay/tip.d.ts +10 -0
  143. package/lib/components/eftposPay/tip.js +159 -0
  144. package/lib/components/eftposPay/tip.less +9 -0
  145. package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
  146. package/lib/components/eftposPay/tyro/index.js +40 -9
  147. package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
  148. package/lib/components/eftposPay/windcave/windcave.js +29 -6
  149. package/lib/components/schedules/index.d.ts +1 -1
  150. package/lib/components/schedules/model.d.ts +1 -1
  151. package/lib/index.d.ts +0 -1
  152. package/lib/index.js +0 -3
  153. package/package.json +5 -5
  154. package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  155. package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -38
  156. package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  157. package/es/components/booking/info/Provider.d.ts +0 -0
  158. package/es/components/booking/info/Provider.js +0 -54
  159. package/es/components/booking/info/dateRange/index.d.ts +0 -5
  160. package/es/components/booking/info/dateRange/index.js +0 -98
  161. package/es/components/booking/info/dateRange/index.less +0 -21
  162. package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  163. package/es/components/booking/info/pet/ChangePetModal/index.js +0 -134
  164. package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
  165. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
  166. package/es/components/booking/info/service/editService/BookingList/index.js +0 -39
  167. package/es/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
  168. package/es/components/booking/info/service/editService/EditTabs/index.js +0 -35
  169. package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
  170. package/es/components/booking/info/service/serviceManager/distributeDiscount.js +0 -55
  171. package/es/components/booking/info/service/serviceManager/index.d.ts +0 -20
  172. package/es/components/booking/info/service/serviceManager/index.js +0 -277
  173. package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
  174. package/es/components/booking/info/service/serviceManager/utils.js +0 -0
  175. package/es/components/booking/info/service2/Group/utils.d.ts +0 -14
  176. package/es/components/booking/info/service2/Group/utils.js +0 -146
  177. package/es/components/booking/info/service2/Lists.d.ts +0 -3
  178. package/es/components/booking/info/service2/Lists.js +0 -152
  179. package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  180. package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
  181. package/es/components/booking/info/service2/index.d.ts +0 -6
  182. package/es/components/booking/info/service2/index.js +0 -57
  183. package/es/components/booking/info/service2/status.d.ts +0 -31
  184. package/es/components/booking/info/service2/status.js +0 -78
  185. package/es/components/booking/info/service2/utils.d.ts +0 -237
  186. package/es/components/booking/info/service2/utils.js +0 -1064
  187. package/es/components/booking/materiels/holder/index.d.ts +0 -7
  188. package/es/components/booking/materiels/holder/index.js +0 -51
  189. package/es/components/shoppingCart/Provider.d.ts +0 -3
  190. package/es/components/shoppingCart/Provider.js +0 -86
  191. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  192. package/es/components/shoppingCart/components/Cart/Product.js +0 -68
  193. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
  194. package/es/components/shoppingCart/components/Cart/index.js +0 -72
  195. package/es/components/shoppingCart/components/Cart/index.less +0 -68
  196. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
  197. package/es/components/shoppingCart/components/Empty/index.js +0 -14
  198. package/es/components/shoppingCart/components/Empty/index.less +0 -19
  199. package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
  200. package/es/components/shoppingCart/components/Render/index.js +0 -69
  201. package/es/components/shoppingCart/components/Render/index.less +0 -2
  202. package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  203. package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -132
  204. package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  205. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  206. package/es/components/shoppingCart/hooks/useAddService.js +0 -23
  207. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  208. package/es/components/shoppingCart/hooks/useClearCart.js +0 -59
  209. package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
  210. package/es/components/shoppingCart/hooks/useContext.js +0 -5
  211. package/es/components/shoppingCart/index.d.ts +0 -4
  212. package/es/components/shoppingCart/index.js +0 -24
  213. package/es/components/shoppingCart/locales.d.ts +0 -33
  214. package/es/components/shoppingCart/locales.js +0 -38
  215. package/es/components/shoppingCart/mock.d.ts +0 -40
  216. package/es/components/shoppingCart/mock.js +0 -40
  217. package/es/components/shoppingCart/status.d.ts +0 -2
  218. package/es/components/shoppingCart/status.js +0 -22
  219. package/es/components/shoppingCart/type.d.ts +0 -39
  220. package/es/components/shoppingCart/type.js +0 -1
  221. package/es/components/shoppingCart/utils.d.ts +0 -63
  222. package/es/components/shoppingCart/utils.js +0 -116
  223. package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  224. package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -60
  225. package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  226. package/lib/components/booking/info/Provider.d.ts +0 -0
  227. package/lib/components/booking/info/Provider.js +0 -0
  228. package/lib/components/booking/info/dateRange/index.d.ts +0 -5
  229. package/lib/components/booking/info/dateRange/index.js +0 -111
  230. package/lib/components/booking/info/dateRange/index.less +0 -21
  231. package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  232. package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -121
  233. package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
  234. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
  235. package/lib/components/booking/info/service/editService/BookingList/index.js +0 -55
  236. package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
  237. package/lib/components/booking/info/service/editService/EditTabs/index.js +0 -75
  238. package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
  239. package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +0 -70
  240. package/lib/components/booking/info/service/serviceManager/index.d.ts +0 -20
  241. package/lib/components/booking/info/service/serviceManager/index.js +0 -207
  242. package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
  243. package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
  244. package/lib/components/booking/info/service2/Group/utils.d.ts +0 -14
  245. package/lib/components/booking/info/service2/Group/utils.js +0 -142
  246. package/lib/components/booking/info/service2/Lists.d.ts +0 -3
  247. package/lib/components/booking/info/service2/Lists.js +0 -115
  248. package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  249. package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
  250. package/lib/components/booking/info/service2/index.d.ts +0 -6
  251. package/lib/components/booking/info/service2/index.js +0 -75
  252. package/lib/components/booking/info/service2/status.d.ts +0 -31
  253. package/lib/components/booking/info/service2/status.js +0 -81
  254. package/lib/components/booking/info/service2/utils.d.ts +0 -237
  255. package/lib/components/booking/info/service2/utils.js +0 -678
  256. package/lib/components/booking/materiels/holder/index.d.ts +0 -7
  257. package/lib/components/booking/materiels/holder/index.js +0 -65
  258. package/lib/components/shoppingCart/Provider.d.ts +0 -3
  259. package/lib/components/shoppingCart/Provider.js +0 -110
  260. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  261. package/lib/components/shoppingCart/components/Cart/Product.js +0 -73
  262. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
  263. package/lib/components/shoppingCart/components/Cart/index.js +0 -77
  264. package/lib/components/shoppingCart/components/Cart/index.less +0 -68
  265. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
  266. package/lib/components/shoppingCart/components/Empty/index.js +0 -43
  267. package/lib/components/shoppingCart/components/Empty/index.less +0 -19
  268. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
  269. package/lib/components/shoppingCart/components/Render/index.js +0 -75
  270. package/lib/components/shoppingCart/components/Render/index.less +0 -2
  271. package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  272. package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
  273. package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  274. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  275. package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
  276. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  277. package/lib/components/shoppingCart/hooks/useClearCart.js +0 -66
  278. package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
  279. package/lib/components/shoppingCart/hooks/useContext.js +0 -31
  280. package/lib/components/shoppingCart/index.d.ts +0 -4
  281. package/lib/components/shoppingCart/index.js +0 -60
  282. package/lib/components/shoppingCart/locales.d.ts +0 -33
  283. package/lib/components/shoppingCart/locales.js +0 -56
  284. package/lib/components/shoppingCart/mock.d.ts +0 -40
  285. package/lib/components/shoppingCart/mock.js +0 -76
  286. package/lib/components/shoppingCart/status.d.ts +0 -2
  287. package/lib/components/shoppingCart/status.js +0 -60
  288. package/lib/components/shoppingCart/type.d.ts +0 -39
  289. package/lib/components/shoppingCart/type.js +0 -17
  290. package/lib/components/shoppingCart/utils.d.ts +0 -63
  291. package/lib/components/shoppingCart/utils.js +0 -86
  292. package/lowcode/shopping-cart/meta.ts +0 -98
@@ -1,152 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- 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; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
- 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."); }
9
- 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); }
10
- 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; }
11
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useContext, useEffect, useMemo, useState } from 'react';
14
- import { CartContext } from "../../../shoppingCart/Provider";
15
- import ShoppingCart from "../../../shoppingCart";
16
- import { Context } from "../model";
17
- import { formatProducts, formatActiveKey, updateServices } from "./utils";
18
- import useSelectPet from "./hooks/useSelectPet";
19
- import { defaultData } from "./status";
20
- var Lists = function Lists(_ref) {
21
- var _state$service;
22
- var onEdit = _ref.onEdit,
23
- onChange = _ref.onChange;
24
- var _useContext = useContext(Context),
25
- state = _useContext.state;
26
- var _useState = useState(defaultData),
27
- _useState2 = _slicedToArray(_useState, 2),
28
- params = _useState2[0],
29
- setParams = _useState2[1];
30
- var _useSelectPet = useSelectPet(state),
31
- holderLists = _useSelectPet.holderLists;
32
- useEffect(function () {
33
- var keys = formatActiveKey(holderLists, params === null || params === void 0 ? void 0 : params.platform, !!state.bookingId);
34
- onChange({
35
- activeCartId: keys
36
- }, 'setActiveCartId');
37
- setParams(_objectSpread(_objectSpread({}, params), {}, {
38
- activeKey: keys
39
- }));
40
- }, [holderLists, params === null || params === void 0 ? void 0 : params.platform]);
41
-
42
- /**
43
- * @title: 更新商品数据
44
- * @description:
45
- * @param {any} newState
46
- * @return {*}
47
- * @Author: WangHan
48
- * @Date: 2024-11-29 16:35
49
- */
50
- var handleChange = function handleChange(currentItem, type, other) {
51
- if (state.disabledEdit || state.disableEventBookingEdit) {
52
- return;
53
- }
54
- var products = updateServices(state, currentItem, type, other);
55
-
56
- // 查看
57
- if (type === 'view') {
58
- var product = currentItem._origin;
59
- // if (isGroupBooking(currentItem._id)) {
60
- // product = currentItem._origin;
61
- // } else {
62
- // product = products?.find((item: any) => item._id === currentItem._id);
63
- // }
64
- onChange({
65
- editModal: true,
66
- cacheItem: _objectSpread(_objectSpread({}, product), {}, {
67
- new: 0
68
- })
69
- });
70
- return onEdit === null || onEdit === void 0 ? void 0 : onEdit(_objectSpread(_objectSpread({}, product), {}, {
71
- new: 0
72
- }));
73
- }
74
- var params = {
75
- editModal: false,
76
- value: products,
77
- edit: true,
78
- cacheItem: null
79
- };
80
- onChange(params);
81
- };
82
-
83
- /**
84
- * @title: 打开哪个折叠面板的keys
85
- * @description:
86
- * @param {any} key
87
- * @return {*}
88
- * @Author: WangHan
89
- * @Date: 2024-12-09 16:06
90
- */
91
- var handleActiveKey = function handleActiveKey(key) {
92
- onChange({
93
- activeCartId: key
94
- }, 'setActiveCartId');
95
- setParams(_objectSpread(_objectSpread({}, params), {}, {
96
- activeKey: key
97
- }));
98
- };
99
-
100
- /**
101
- * @title: 折叠面板参数
102
- * @description:
103
- * @param {*} useMemo
104
- * @return {*}
105
- * @Author: WangHan
106
- * @Date: 2024-12-05 15:22
107
- */
108
- var CollapseParams = useMemo(function () {
109
- var _params = {
110
- activeKey: params === null || params === void 0 ? void 0 : params.activeKey,
111
- bordered: false
112
- };
113
- return _params;
114
- }, [params === null || params === void 0 ? void 0 : params.activeKey]);
115
-
116
- /**
117
- * @title: 商品信息
118
- * @description:
119
- * @param {*} useMemo
120
- * @return {*}
121
- * @Author: WangHan
122
- * @Date: 2024-12-09 16:07
123
- */
124
- var productParams = useMemo(function () {
125
- return {
126
- hideAddBtn: state.isTerminalDayBookingPage,
127
- isShowNote: false,
128
- isShowPackageNote: false,
129
- holders: holderLists,
130
- isEdit: !!(state !== null && state !== void 0 && state.bookingId),
131
- disabledEdit: state === null || state === void 0 ? void 0 : state.disabledEdit
132
- };
133
- }, [holderLists, state === null || state === void 0 ? void 0 : state.bookingId]);
134
- return /*#__PURE__*/React.createElement(CartContext.Provider, {
135
- value: {
136
- state: state
137
- }
138
- }, /*#__PURE__*/React.createElement(ShoppingCart, {
139
- onChange: handleChange,
140
- onAddProduct: function onAddProduct() {
141
- return onChange({
142
- addModal: true
143
- });
144
- },
145
- onActiveKey: handleActiveKey,
146
- collapseParams: CollapseParams,
147
- productParams: _objectSpread(_objectSpread({}, productParams), {}, {
148
- products: formatProducts(state === null || state === void 0 ? void 0 : (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value, state)
149
- })
150
- }));
151
- };
152
- export default Lists;
@@ -1,6 +0,0 @@
1
- declare const useSelectPet: (state: any) => {
2
- petLists: any;
3
- holderLists: any;
4
- getHolderName: (id: number) => any;
5
- };
6
- export default useSelectPet;
@@ -1,54 +0,0 @@
1
- import { useMemo } from 'react';
2
- import { formatHolderLists } from "../utils";
3
- var useSelectPet = function useSelectPet(state) {
4
- var _state$pet2;
5
- /**
6
- * @title: pets数据
7
- * @description:
8
- * @param {any} state
9
- * @return {*}
10
- * @Author: WangHan
11
- * @Date: 2024-12-03 11:39
12
- */
13
- var petLists = useMemo(function () {
14
- var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2, _state$bookingConfig$3, _state$pet, _state$pet$value;
15
- var form_id = (state === null || state === void 0 ? void 0 : (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : (_state$bookingConfig$3 = _state$bookingConfig$2.appointment_subject) === null || _state$bookingConfig$3 === void 0 ? void 0 : _state$bookingConfig$3.form_id) || 0;
16
- return (state === null || state === void 0 ? void 0 : (_state$pet = state.pet) === null || _state$pet === void 0 ? void 0 : (_state$pet$value = _state$pet.value) === null || _state$pet$value === void 0 ? void 0 : _state$pet$value[form_id]) || [];
17
- }, [state === null || state === void 0 ? void 0 : (_state$pet2 = state.pet) === null || _state$pet2 === void 0 ? void 0 : _state$pet2.value]);
18
-
19
- /**
20
- * @title: pets数据加 open items
21
- * @description:
22
- * @param {any} state
23
- * @return {*}
24
- * @Author: WangHan
25
- * @Date: 2024-12-03 11:40
26
- */
27
- var holderLists = useMemo(function () {
28
- var _lists = formatHolderLists(petLists);
29
- return _lists;
30
- }, [petLists]);
31
-
32
- /**
33
- * @title: 获取pet名称
34
- * @description:
35
- * @param {any} state
36
- * @param {number} id
37
- * @return {*}
38
- * @Author: WangHan
39
- * @Date: 2024-12-03 11:42
40
- */
41
- var getHolderName = function getHolderName(id) {
42
- if (!holderLists.length) return '';
43
- var resource = holderLists.find(function (d) {
44
- return d.id === id;
45
- });
46
- return resource === null || resource === void 0 ? void 0 : resource.main_field;
47
- };
48
- return {
49
- petLists: petLists,
50
- holderLists: holderLists,
51
- getHolderName: getHolderName
52
- };
53
- };
54
- export default useSelectPet;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export declare const Service2Context: React.Context<any>;
3
- export declare const Service2Cart: ({ hideAdd, hideEdit, }: {
4
- hideAdd?: boolean | undefined;
5
- hideEdit?: boolean | undefined;
6
- }) => React.JSX.Element;
@@ -1,57 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- 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; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import React, { createContext, useContext, useEffect, useRef } from 'react';
8
- import AddService from "../service/addService";
9
- import EditService from "../service/editService";
10
- import { Context } from "../model";
11
- import Lists from "./Lists";
12
- export var Service2Context = /*#__PURE__*/createContext({});
13
- export var Service2Cart = function Service2Cart(_ref) {
14
- var hideAdd = _ref.hideAdd,
15
- hideEdit = _ref.hideEdit;
16
- var detailRef = useRef();
17
- var _useContext = useContext(Context),
18
- state = _useContext.state,
19
- dispatch = _useContext.dispatch;
20
- useEffect(function () {
21
- document.body.id = 'body';
22
- }, []);
23
-
24
- /**
25
- * @title: 更新服务
26
- * @description:
27
- * @param {string} type
28
- * @param {any} payload
29
- * @return {*}
30
- * @Author: WangHan
31
- * @Date: 2024-12-09 16:02
32
- */
33
- var dispatchService = function dispatchService(type, payload) {
34
- dispatch({
35
- type: type,
36
- payload: _objectSpread({}, payload)
37
- });
38
- };
39
- var handleEdit = function handleEdit(cacheItem) {
40
- setTimeout(function () {
41
- var _detailRef$current, _detailRef$current$in;
42
- (_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 ? void 0 : (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 ? void 0 : _detailRef$current$in.call(_detailRef$current, cacheItem);
43
- }, 100);
44
- };
45
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
46
- className: "pisell-lowcode__booking-service-wrap"
47
- }, /*#__PURE__*/React.createElement(Lists, {
48
- onEdit: handleEdit,
49
- onChange: function onChange(e, type) {
50
- return dispatchService(type || 'setService', e);
51
- }
52
- }), !hideAdd && /*#__PURE__*/React.createElement(AddService, {
53
- onEdit: handleEdit
54
- })), !hideEdit && /*#__PURE__*/React.createElement(EditService, {
55
- ref: detailRef
56
- }));
57
- };
@@ -1,31 +0,0 @@
1
- import { shoppingCartProps } from '../../../shoppingCart/type';
2
- export declare const defaultData: shoppingCartProps;
3
- /**
4
- * @title: 根据是否是跨日预约和是否是terminal打开的,返回日期和输入框占据的列数
5
- * @description:
6
- * @param {boolean} isDayBooking
7
- * @param {boolean} isTerminal
8
- * @return {*}
9
- * @Author: WangHan
10
- * @Date: 2024-12-06 10:29
11
- */
12
- export declare const inputDateCol: (isDayBooking: boolean, isTerminal?: boolean) => {
13
- date: {};
14
- input: {};
15
- };
16
- /**
17
- * @title: 预约商品扩展类型
18
- * @description:
19
- * @return {*}
20
- * @Author: WangHan
21
- * @Date: 2024-12-06 14:59
22
- */
23
- export declare const appointmentTypes: string[];
24
- /**
25
- * @title: 营业日时间
26
- * @description:
27
- * @return {*}
28
- * @Author: WangHan
29
- * @Date: 2024-12-06 17:23
30
- */
31
- export declare const openingTime: () => string;
@@ -1,78 +0,0 @@
1
- import { locales } from '@pisell/utils';
2
- export var defaultData = {
3
- isOpenGroup: true,
4
- carts: [],
5
- platform: 'shop',
6
- emptyText: locales.getText('pisell2.text.no.selected'),
7
- activeKey: [],
8
- defaultActiveKey: [],
9
- className: ''
10
- };
11
-
12
- /**
13
- * @title: 根据是否是跨日预约和是否是terminal打开的,返回日期和输入框占据的列数
14
- * @description:
15
- * @param {boolean} isDayBooking
16
- * @param {boolean} isTerminal
17
- * @return {*}
18
- * @Author: WangHan
19
- * @Date: 2024-12-06 10:29
20
- */
21
- export var inputDateCol = function inputDateCol(isDayBooking, isTerminal) {
22
- var params = {
23
- date: {},
24
- input: {}
25
- };
26
-
27
- // 不是跨日预约,只有输入框占据一行
28
- if (!isDayBooking) {
29
- params.input = {
30
- span: 24
31
- };
32
- return params;
33
- }
34
-
35
- // 如果是terminal打开的需要根据不同的屏幕宽度调整
36
- if (isTerminal) {
37
- params.date = {
38
- sm: 24,
39
- lg: 24,
40
- xl: 12
41
- };
42
- params.input = {
43
- sm: 24,
44
- lg: 24,
45
- xl: 12
46
- };
47
- } else {
48
- params.date = {
49
- span: 12
50
- };
51
- params.input = {
52
- span: 12
53
- };
54
- }
55
- return params;
56
- };
57
-
58
- /**
59
- * @title: 预约商品扩展类型
60
- * @description:
61
- * @return {*}
62
- * @Author: WangHan
63
- * @Date: 2024-12-06 14:59
64
- */
65
- export var appointmentTypes = ['product_appointment'];
66
-
67
- /**
68
- * @title: 营业日时间
69
- * @description:
70
- * @return {*}
71
- * @Author: WangHan
72
- * @Date: 2024-12-06 17:23
73
- */
74
- export var openingTime = function openingTime() {
75
- // 营业日时间
76
- var openingTime = localStorage.getItem('shopOpeningHours');
77
- return openingTime || '00:00';
78
- };
@@ -1,237 +0,0 @@
1
- import dayjs from 'dayjs';
2
- export declare const formatActiveKey: (lists: any[], platform: string, isEdit: boolean) => any[];
3
- /**
4
- * @title: 获取资源名称
5
- * @description:
6
- * @param {any} id
7
- * @param {any} state
8
- * @return {*}
9
- * @Author: WangHan
10
- * @Date: 2024-11-29 18:02
11
- */
12
- export declare const getResourceItem: (id: any, state: any) => any;
13
- /**
14
- * @title: 错误提示
15
- * @description:
16
- * @param {any} service
17
- * @param {any} resourceItem
18
- * @return {*}
19
- * @Author: WangHan
20
- * @Date: 2024-11-29 18:41
21
- */
22
- export declare const getErrorMessage: (service: any, resourceItem: any, isDay?: boolean) => any;
23
- /**
24
- * @title: 格式化主体列表
25
- * @description:
26
- * @param {any} lists
27
- * @param {boolean} isOpenGroup
28
- * @return {*}
29
- * @Author: WangHan
30
- * @Date: 2024-12-04 11:27
31
- */
32
- export declare const formatHolderLists: (lists: any) => any;
33
- export declare const isBookingProduct: (extension_type: any) => boolean;
34
- /**
35
- * @title: 是否是预约商品
36
- * @description:
37
- * @return {*}
38
- * @Author: WangHan
39
- * @Date: 2024-12-06 11:24
40
- */
41
- export declare const isDayBookingProduct: (item: any, state: any) => boolean;
42
- /**
43
- * @title: 更新商品数据
44
- * @description:
45
- * @param {any} state
46
- * @param {string} type
47
- * @param {any} _id // 商品id
48
- * @param {any} other
49
- * @return {*}
50
- * @Author: WangHan
51
- * @Date: 2025-01-03 15:00
52
- */
53
- export declare const updateServices: (state: any, currentItem: any, type?: string, other?: any) => any;
54
- export declare const formItems: (items: any[]) => any[];
55
- /**
56
- * @title: 格式化商品数据
57
- * @description:
58
- * @param {any} lists
59
- * @return {*}
60
- * @Author: WangHan
61
- * @Date: 2024-11-29 17:36
62
- */
63
- export declare const formatProducts: (lists: any[], state: any, isRenderGroup?: boolean) => {
64
- id: any;
65
- _id: any;
66
- name: any;
67
- price: any;
68
- total: any;
69
- origin_total: any;
70
- num: any;
71
- image: any;
72
- isShowNote: boolean;
73
- note: any;
74
- like_status: any;
75
- bundle: any;
76
- options: any;
77
- errorMessage: string;
78
- product_option_string: any;
79
- discount_reason: any;
80
- resource_id: any;
81
- relation_form_name: any;
82
- holder_title: any;
83
- start_date: any;
84
- end_date: any;
85
- holder_id: any;
86
- isNormalProduct: boolean;
87
- locale: any;
88
- symbol: any;
89
- items: any[];
90
- _origin: any;
91
- }[];
92
- /**
93
- * @title: 禁用日期
94
- * @description:
95
- * @param {any} current
96
- * @param {string} position
97
- * @param {any} startDate
98
- * @return {*}
99
- * @Author: WangHan
100
- * @Date: 2024-12-03 17:51
101
- */
102
- export declare const disabledDate: (current: any, position: string, currentDate: any) => any;
103
- /**
104
- * @title: 是否是跨日预约
105
- * @description:
106
- * @param {any} state
107
- * @return {*}
108
- * @Author: WangHan
109
- * @Date: 2024-12-04 09:49
110
- */
111
- export declare const isDayBooking: (state: any) => boolean;
112
- /**
113
- * @title: 是否是terminal上的跨日预约
114
- * @description:
115
- * @param {any} state
116
- * @return {*}
117
- * @Author: WangHan
118
- * @Date: 2024-12-04 15:31
119
- */
120
- export declare const isTerminalDayBooking: (state: any) => any;
121
- export declare const formatDayDate: (_extend: any) => any;
122
- /**
123
- * @title: 根据营业日时间格式化时间
124
- * @description:
125
- * @param {any} state
126
- * @return {*}
127
- * @Author: WangHan
128
- * @Date: 2024-12-04 12:07
129
- */
130
- export declare const formatDayTime: ({ startDate, endDate }: any) => {
131
- startDateTime: dayjs.Dayjs;
132
- endDateTime: dayjs.Dayjs;
133
- };
134
- export declare const formatDateTime: (start_date: any, end_date: any) => {
135
- value: dayjs.Dayjs;
136
- end_date: dayjs.Dayjs;
137
- };
138
- /**
139
- * @title: 初始化日期
140
- * @description:
141
- * @return {*}
142
- * @Author: WangHan
143
- * @Date: 2024-12-06 17:24
144
- */
145
- export declare const initDate: () => {
146
- value: dayjs.Dayjs;
147
- end_date: dayjs.Dayjs;
148
- };
149
- /**
150
- * @title: 是否有预约商品
151
- * @description:
152
- * @return {*}
153
- * @Author: WangHan
154
- * @Date: 2024-12-12 15:47
155
- */
156
- export declare const isHasDayAppointmentProduct: (state: any) => boolean;
157
- /**
158
- * @title: 过滤出如果是预约商品,则只获取跨日的预约商品
159
- * @description:
160
- * @param {any} lists
161
- * @return {*}
162
- * @Author: WangHan
163
- * @Date: 2024-12-13 16:44
164
- */
165
- export declare const getDayProducts: (holderId: number, lists: any, isTerminal?: boolean) => any;
166
- /**
167
- * @title: 格式化表单数据
168
- * @description:
169
- * @param {any} state
170
- * @return {*}
171
- * @Author: WangHan
172
- * @Date: 2024-12-30 22:19
173
- */
174
- export declare const getPets: (state: any) => any;
175
- /**
176
- * @title: 得出预约商品
177
- * @description:
178
- * @param {any} state
179
- * @return {*}
180
- * @Author: WangHan
181
- * @Date: 2024-12-30 22:26
182
- */
183
- export declare const getAppointmentService: (state: any) => any;
184
- /**
185
- * @title: 判断是否打开删除宠物弹窗
186
- * @description:
187
- * @param {any} state
188
- * @param {any} newVal
189
- * @return {*}
190
- * @Author: WangHan
191
- * @Date: 2024-12-16 16:12
192
- */
193
- export declare const isOpenDeletePet: (state: any, newVal: any) => {
194
- ids: any;
195
- lists: any;
196
- };
197
- /**
198
- * @title: 当前选中的表单id
199
- * @description:
200
- * @param {any} state
201
- * @return {*}
202
- * @Author: WangHan
203
- * @Date: 2024-12-17 14:40
204
- */
205
- export declare const holderId: (state: any) => number;
206
- /**
207
- * @title: 更新套餐的价格
208
- * @description:
209
- * @param {any} currentValue
210
- * @param {any} newBundleData
211
- * @return {*}
212
- * @Author: WangHan
213
- * @Date: 2024-12-31 15:16
214
- */
215
- export declare function updateNormalBundlePrice(currentValue: any, newBundleData: any): any[];
216
- /**
217
- * @title: 更新预约商品报价单
218
- * @description:
219
- * @param {any} state
220
- * @param {any} cacheItem
221
- * @return {*}
222
- * @Author: WangHan
223
- * @Date: 2024-12-25 16:41
224
- */
225
- export declare const updateAppointmentServicePrice: (state: any, { start_date, end_date, product_id }: any) => Promise<{
226
- multiDayPrices: any;
227
- price: number;
228
- }>;
229
- /**
230
- * @title: 更新普通商品报价单价格
231
- * @description:
232
- * @param {any} state
233
- * @return {*}
234
- * @Author: WangHan
235
- * @Date: 2024-12-24 11:32
236
- */
237
- export declare const updateServicePrice: (state: any) => never[] | Promise<any>;