@pisell/private-materials 3.3.86 → 3.3.88

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 (291) 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/Resource/index.js +2 -2
  13. package/es/components/Sales/Resource/serve.d.ts +0 -7
  14. package/es/components/Sales/Resource/serve.js +0 -10
  15. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  16. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  17. package/es/components/appointmentBooking/components/Services/index.js +27 -23
  18. package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
  19. package/es/components/appointmentBooking/index.js +0 -14
  20. package/es/components/appointmentBooking/index.less +1 -1
  21. package/es/components/appointmentBooking/locales.d.ts +3 -0
  22. package/es/components/appointmentBooking/locales.js +3 -0
  23. package/es/components/booking/addons/model.d.ts +1 -10
  24. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  25. package/es/components/booking/components/browserSelect/index.js +1 -1
  26. package/es/components/booking/components/footer/utils.d.ts +0 -1
  27. package/es/components/booking/components/footer/utils.js +5 -6
  28. package/es/components/booking/components/voucher/index.js +2 -2
  29. package/es/components/booking/forms/model.d.ts +1 -10
  30. package/es/components/booking/forms/model.js +5 -5
  31. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  32. package/es/components/booking/info/model.d.ts +1 -10
  33. package/es/components/booking/info/service/addService/index.js +3 -3
  34. package/es/components/booking/info/service/like/index.js +1 -1
  35. package/es/components/booking/info/service2/utils.js +2 -3
  36. package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
  37. package/es/components/booking/info2/service/addService/utils.js +13 -44
  38. package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
  39. package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
  40. package/es/components/booking/info2/utilsByBooking.js +0 -9
  41. package/es/components/booking/locales.d.ts +0 -3
  42. package/es/components/booking/locales.js +0 -3
  43. package/es/components/booking/materiels/startTime/index.js +1 -1
  44. package/es/components/booking/model.d.ts +1 -9
  45. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  46. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  47. package/es/components/booking/notes/model.d.ts +1 -10
  48. package/es/components/booking/notes/model.js +5 -5
  49. package/es/components/booking/payments/model.d.ts +1 -10
  50. package/es/components/booking/payments/model.js +5 -5
  51. package/es/components/eftposPay/const.d.ts +1 -4
  52. package/es/components/eftposPay/const.js +1 -3
  53. package/es/components/eftposPay/hooks.d.ts +1 -1
  54. package/es/components/eftposPay/hooks.js +1 -3
  55. package/es/components/eftposPay/index.js +1 -1
  56. package/es/components/eftposPay/manufacturer.d.ts +0 -1
  57. package/es/components/eftposPay/manufacturer.js +0 -4
  58. package/es/components/eftposPay/pay.d.ts +1 -1
  59. package/es/components/eftposPay/pay.js +2 -6
  60. package/es/components/eftposPay/store/index.d.ts +1 -1
  61. package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
  62. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
  63. package/es/components/eventBooking/index.js +7 -21
  64. package/es/components/eventBooking/locales.js +3 -3
  65. package/es/components/index.d.ts +1 -3
  66. package/es/components/index.js +1 -3
  67. package/es/components/listComponent/index.js +5 -5
  68. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  69. package/es/components/pay/toC/model.d.ts +1 -9
  70. package/es/components/productExtension/card/index.js +3 -3
  71. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  72. package/es/components/productExtension/fields/Forms/index.js +12 -12
  73. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  74. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  75. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  76. package/es/components/productExtension/server.js +2 -2
  77. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  78. package/es/components/schedules/calendar/index.js +4 -4
  79. package/es/components/schedules/calendar/serve.js +2 -2
  80. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  81. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  82. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  83. package/es/components/schedules/components/ResourceList/index.js +1 -1
  84. package/es/components/schedules/components/Search/index.js +5 -5
  85. package/es/components/schedules/model.d.ts +1 -9
  86. package/es/components/schedules/model.js +5 -5
  87. package/es/components/schedules/openHours/index.js +1 -1
  88. package/es/components/schedules/openHours/serve.js +2 -2
  89. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  90. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  91. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  92. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  93. package/es/components/schedules/products/serve.js +2 -2
  94. package/es/components/schedules/products/utils.js +5 -5
  95. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  96. package/es/components/schedules/resources/detail/index.js +10 -10
  97. package/es/components/schedules/resources/list/index.js +2 -2
  98. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  99. package/es/components/schedules/resources/serve.js +2 -2
  100. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  101. package/es/components/schedules/utils.d.ts +1 -1
  102. package/es/components/schedules/utils.js +4 -4
  103. package/es/components/selectModal/index.js +2 -2
  104. package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -5
  105. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  106. package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
  107. package/es/components/ticketBooking/locales.d.ts +146 -164
  108. package/es/components/ticketBooking/locales.js +147 -195
  109. package/es/components/wallet/Detail/model.d.ts +1 -13
  110. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  111. package/es/components/wallet/PointCard/model.d.ts +1 -13
  112. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  113. package/es/components/wallet/Voucher/model.d.ts +1 -13
  114. package/es/components/wallet/model.d.ts +1 -9
  115. package/es/hooks/useComponents.js +1 -1
  116. package/es/index.d.ts +0 -2
  117. package/es/index.js +1 -3
  118. package/es/utils/index.d.ts +1 -1
  119. package/lib/businessModel/SalesModel/Sales/index.js +8 -22
  120. package/lib/components/Sales/Resource/index.js +1 -1
  121. package/lib/components/Sales/Resource/serve.d.ts +0 -7
  122. package/lib/components/Sales/Resource/serve.js +2 -9
  123. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  124. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  125. package/lib/components/appointmentBooking/components/Services/index.js +11 -6
  126. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
  127. package/lib/components/appointmentBooking/index.js +0 -11
  128. package/lib/components/appointmentBooking/index.less +1 -1
  129. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  130. package/lib/components/appointmentBooking/locales.js +3 -0
  131. package/lib/components/booking/addons/model.d.ts +1 -10
  132. package/lib/components/booking/components/footer/utils.d.ts +0 -1
  133. package/lib/components/booking/components/footer/utils.js +2 -7
  134. package/lib/components/booking/components/voucher/index.js +23 -11
  135. package/lib/components/booking/forms/model.d.ts +1 -10
  136. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  137. package/lib/components/booking/info/model.d.ts +1 -10
  138. package/lib/components/booking/info/service/addService/index.js +1 -1
  139. package/lib/components/booking/info/service2/utils.js +2 -2
  140. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
  141. package/lib/components/booking/info2/service/addService/utils.js +4 -27
  142. package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
  143. package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
  144. package/lib/components/booking/info2/utilsByBooking.js +0 -6
  145. package/lib/components/booking/locales.d.ts +0 -3
  146. package/lib/components/booking/locales.js +0 -3
  147. package/lib/components/booking/model.d.ts +1 -9
  148. package/lib/components/booking/notes/model.d.ts +1 -10
  149. package/lib/components/booking/payments/model.d.ts +1 -10
  150. package/lib/components/eftposPay/const.d.ts +1 -4
  151. package/lib/components/eftposPay/const.js +0 -2
  152. package/lib/components/eftposPay/hooks.d.ts +1 -1
  153. package/lib/components/eftposPay/hooks.js +4 -11
  154. package/lib/components/eftposPay/index.js +1 -1
  155. package/lib/components/eftposPay/manufacturer.d.ts +0 -1
  156. package/lib/components/eftposPay/manufacturer.js +0 -6
  157. package/lib/components/eftposPay/pay.d.ts +1 -1
  158. package/lib/components/eftposPay/pay.js +2 -13
  159. package/lib/components/eftposPay/store/index.d.ts +1 -1
  160. package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
  161. package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
  162. package/lib/components/eventBooking/index.js +7 -11
  163. package/lib/components/eventBooking/locales.js +3 -3
  164. package/lib/components/index.d.ts +1 -3
  165. package/lib/components/index.js +0 -6
  166. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  167. package/lib/components/pay/toC/model.d.ts +1 -9
  168. package/lib/components/schedules/model.d.ts +1 -9
  169. package/lib/components/schedules/utils.d.ts +1 -1
  170. package/lib/components/schedules/utils.js +1 -1
  171. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +6 -4
  172. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  173. package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
  174. package/lib/components/ticketBooking/locales.d.ts +146 -164
  175. package/lib/components/ticketBooking/locales.js +4 -22
  176. package/lib/components/wallet/Detail/model.d.ts +1 -13
  177. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  178. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  179. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  180. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  181. package/lib/components/wallet/model.d.ts +1 -9
  182. package/lib/index.d.ts +0 -2
  183. package/lib/index.js +0 -6
  184. package/lib/utils/index.d.ts +1 -1
  185. package/package.json +4 -4
  186. package/es/components/booking/editBookingModal/index.d.ts +0 -5
  187. package/es/components/booking/editBookingModal/index.js +0 -386
  188. package/es/components/booking/editBookingModal/index.less +0 -8
  189. package/es/components/booking/editBookingModal/locales.d.ts +0 -21
  190. package/es/components/booking/editBookingModal/locales.js +0 -20
  191. package/es/components/booking/editBookingModal/mock.d.ts +0 -807
  192. package/es/components/booking/editBookingModal/mock.js +0 -2993
  193. package/es/components/booking/editBookingModal/serve.d.ts +0 -51
  194. package/es/components/booking/editBookingModal/serve.js +0 -288
  195. package/es/components/booking/editBookingModal/type.d.ts +0 -12
  196. package/es/components/booking/editBookingModal/type.js +0 -1
  197. package/es/components/booking/editBookingModal/utils.d.ts +0 -12
  198. package/es/components/booking/editBookingModal/utils.js +0 -157
  199. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
  200. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
  201. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
  202. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
  203. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
  204. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  205. package/es/components/eftposPay/linkly/const.js +0 -82
  206. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  207. package/es/components/eftposPay/linkly/hooks/index.js +0 -2
  208. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  209. package/es/components/eftposPay/linkly/hooks/normal.js +0 -318
  210. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  211. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
  212. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  213. package/es/components/eftposPay/linkly/index.js +0 -197
  214. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  215. package/es/components/eftposPay/linkly/service.js +0 -73
  216. package/es/components/stepController/components/Content/index.d.ts +0 -7
  217. package/es/components/stepController/components/Content/index.js +0 -9
  218. package/es/components/stepController/components/Content/index.less +0 -8
  219. package/es/components/stepController/components/Footer/index.d.ts +0 -8
  220. package/es/components/stepController/components/Footer/index.js +0 -15
  221. package/es/components/stepController/components/Footer/index.less +0 -39
  222. package/es/components/stepController/components/Header/index.d.ts +0 -20
  223. package/es/components/stepController/components/Header/index.js +0 -97
  224. package/es/components/stepController/components/Header/index.less +0 -21
  225. package/es/components/stepController/index.d.ts +0 -5
  226. package/es/components/stepController/index.js +0 -64
  227. package/es/components/stepController/index.less +0 -11
  228. package/es/components/stepController/locales.d.ts +0 -27
  229. package/es/components/stepController/locales.js +0 -32
  230. package/es/components/stepController/types.d.ts +0 -23
  231. package/es/components/stepController/types.js +0 -1
  232. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  233. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
  234. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  235. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  236. package/es/hooks/useWindowSize.d.ts +0 -5
  237. package/es/hooks/useWindowSize.js +0 -26
  238. package/lib/components/booking/editBookingModal/index.d.ts +0 -5
  239. package/lib/components/booking/editBookingModal/index.js +0 -363
  240. package/lib/components/booking/editBookingModal/index.less +0 -8
  241. package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
  242. package/lib/components/booking/editBookingModal/locales.js +0 -44
  243. package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
  244. package/lib/components/booking/editBookingModal/mock.js +0 -3314
  245. package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
  246. package/lib/components/booking/editBookingModal/serve.js +0 -178
  247. package/lib/components/booking/editBookingModal/type.d.ts +0 -12
  248. package/lib/components/booking/editBookingModal/type.js +0 -17
  249. package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
  250. package/lib/components/booking/editBookingModal/utils.js +0 -158
  251. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
  252. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
  253. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
  254. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
  255. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
  256. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  257. package/lib/components/eftposPay/linkly/const.js +0 -102
  258. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  259. package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
  260. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  261. package/lib/components/eftposPay/linkly/hooks/normal.js +0 -239
  262. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  263. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
  264. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  265. package/lib/components/eftposPay/linkly/index.js +0 -208
  266. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  267. package/lib/components/eftposPay/linkly/service.js +0 -55
  268. package/lib/components/stepController/components/Content/index.d.ts +0 -7
  269. package/lib/components/stepController/components/Content/index.js +0 -40
  270. package/lib/components/stepController/components/Content/index.less +0 -8
  271. package/lib/components/stepController/components/Footer/index.d.ts +0 -8
  272. package/lib/components/stepController/components/Footer/index.js +0 -49
  273. package/lib/components/stepController/components/Footer/index.less +0 -39
  274. package/lib/components/stepController/components/Header/index.d.ts +0 -20
  275. package/lib/components/stepController/components/Header/index.js +0 -104
  276. package/lib/components/stepController/components/Header/index.less +0 -21
  277. package/lib/components/stepController/index.d.ts +0 -5
  278. package/lib/components/stepController/index.js +0 -89
  279. package/lib/components/stepController/index.less +0 -11
  280. package/lib/components/stepController/locales.d.ts +0 -27
  281. package/lib/components/stepController/locales.js +0 -50
  282. package/lib/components/stepController/types.d.ts +0 -23
  283. package/lib/components/stepController/types.js +0 -17
  284. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  285. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
  286. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  287. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
  288. package/lib/hooks/useWindowSize.d.ts +0 -5
  289. package/lib/hooks/useWindowSize.js +0 -51
  290. package/lowcode/edit-booking-modal/meta.ts +0 -53
  291. package/lowcode/step-controller/meta.ts +0 -88
@@ -1,84 +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/ticketBooking/utils/formatProductMessage.ts
20
- var formatProductMessage_exports = {};
21
- __export(formatProductMessage_exports, {
22
- default: () => formatProductMessage_default
23
- });
24
- module.exports = __toCommonJS(formatProductMessage_exports);
25
- var import_utils = require("@pisell/utils");
26
- var import_formatTime = require("./formatTime");
27
- var formatProductMessage = (product, utils) => {
28
- const {
29
- product_option_string,
30
- options,
31
- bundle,
32
- currency_symbol,
33
- start_date,
34
- end_date,
35
- holder_id,
36
- holders,
37
- multiResources
38
- } = product;
39
- let str = "";
40
- if (start_date && end_date) {
41
- str += `${(0, import_formatTime.getServiceTime)(product, start_date, utils)}
42
- `;
43
- }
44
- if (holder_id && Array.isArray(holders)) {
45
- const targetHolder = holders.find((holder) => holder.id === holder_id);
46
- if (targetHolder == null ? void 0 : targetHolder.label) {
47
- str += `${targetHolder.label}
48
- `;
49
- }
50
- }
51
- if (Array.isArray(multiResources) && multiResources.length > 0) {
52
- multiResources.forEach((resource) => {
53
- const { id: ids, lists } = resource;
54
- if (Array.isArray(ids)) {
55
- ids.forEach((id) => {
56
- const targetRes = lists.find((l) => l.id === id);
57
- if (targetRes == null ? void 0 : targetRes.label) str += `${targetRes == null ? void 0 : targetRes.label}
58
- `;
59
- });
60
- } else {
61
- const targetRes = lists.find((l) => l.id === ids);
62
- if (targetRes == null ? void 0 : targetRes.label) str += `${targetRes == null ? void 0 : targetRes.label}
63
- `;
64
- }
65
- });
66
- }
67
- if (product_option_string) str += `${product_option_string}
68
- `;
69
- if (Array.isArray(options) && options.length) {
70
- options.forEach((opt) => {
71
- str += `${opt.name} ${(0, import_utils.formatAmount)(opt == null ? void 0 : opt.price, 2, currency_symbol)} x ${opt.num}
72
- `;
73
- });
74
- }
75
- if (Array.isArray(bundle) && bundle.length) {
76
- bundle.forEach((item) => {
77
- str += `${item.title}
78
- `;
79
- str += `${(0, import_utils.formatAmount)(item.price, 2, currency_symbol)} x ${item.num}`;
80
- });
81
- }
82
- return str;
83
- };
84
- var formatProductMessage_default = formatProductMessage;
@@ -1,31 +0,0 @@
1
- import 'dayjs/locale/zh-cn';
2
- import 'dayjs/locale/en';
3
- import 'dayjs/locale/zh-tw';
4
- /**
5
- * @title: 是否英文
6
- * @description:
7
- * @param {any} item
8
- * @return {*}
9
- * @Author: WangHan
10
- * @Date: 2024-12-28 22:49
11
- */
12
- export declare const isEn: (item: any) => boolean;
13
- /**
14
- * @title: 跨日预约时间
15
- * @description:
16
- * @param {any} item
17
- * @return {*}
18
- * @Author: WangHan
19
- * @Date: 2024-12-28 22:50
20
- */
21
- export declare const formatMultiDayDate: (item: any) => string;
22
- /**
23
- * @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
24
- * @description:
25
- * @param {any} item
26
- * @param {any} currentDate
27
- * @return {*}
28
- * @Author: zhiwei.Wang
29
- * @Date: 2024-04-26 14:04
30
- */
31
- export declare const getServiceTime: (item: any, currentDate: any, utils: any) => string;
@@ -1,139 +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/ticketBooking/utils/formatTime.ts
30
- var formatTime_exports = {};
31
- __export(formatTime_exports, {
32
- formatMultiDayDate: () => formatMultiDayDate,
33
- getServiceTime: () => getServiceTime,
34
- isEn: () => isEn
35
- });
36
- module.exports = __toCommonJS(formatTime_exports);
37
- var import_dayjs = __toESM(require("dayjs"));
38
- var import_utils = require("@pisell/utils");
39
- var import_zh_cn = require("dayjs/locale/zh-cn");
40
- var import_en = require("dayjs/locale/en");
41
- var import_zh_tw = require("dayjs/locale/zh-tw");
42
- var isEn = (item) => {
43
- const locale = (item == null ? void 0 : item.locale) || "en-US";
44
- const _isEn = locale === "en-US" || locale === "en";
45
- const localeTypes = {
46
- "en-US": "en",
47
- "zh-CN": "zh-cn",
48
- "zh-HK": "zh-tw"
49
- };
50
- import_dayjs.default.locale(localeTypes[locale]);
51
- return _isEn;
52
- };
53
- var formatMultiDayDate = (item) => {
54
- const _isEn = isEn(item);
55
- const startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
56
- const endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
57
- const _format = _isEn ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
58
- const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
59
- return date;
60
- };
61
- var getServiceTime = (item, currentDate, utils) => {
62
- var _a, _b, _c, _d;
63
- if (!(0, import_dayjs.default)(currentDate).isValid()) return "";
64
- const locale = (item == null ? void 0 : item.locale) || ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
65
- const isEn2 = locale === "en-US" || locale === "en";
66
- const localeTypes = {
67
- "en-US": "en",
68
- "zh-CN": "zh-cn",
69
- "zh-HK": "zh-tw"
70
- };
71
- import_dayjs.default.locale(localeTypes[locale]);
72
- let startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
73
- let endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
74
- let diffInDays = (item == null ? void 0 : item.custom_day_count) || endDate.diff(startDate, "day");
75
- if (item == null ? void 0 : item.duration_type) {
76
- const sameDay = startDate.isSame(endDate, "day");
77
- const dateFormat = isEn2 ? "DD/MM/YYYY" : "YYYY-MM-DD";
78
- const timeFormat = "HH:mm";
79
- const startTime = (item == null ? void 0 : item.start_time) || startDate.format(timeFormat);
80
- const endTime = (item == null ? void 0 : item.end_time) || endDate.format(timeFormat);
81
- let dateTime = "";
82
- if (sameDay) {
83
- if (isEn2) {
84
- dateTime = `${startTime} ~ ${endTime} ${startDate.format(dateFormat)}`;
85
- } else {
86
- dateTime = `${startDate.format(dateFormat)} ${startTime} ~ ${endTime}`;
87
- }
88
- } else {
89
- if (isEn2) {
90
- dateTime = `${startTime} ${startDate.format(dateFormat)} ~ ${endTime} ${endDate.format(dateFormat)}`;
91
- } else {
92
- dateTime = `${startDate.format(dateFormat)} ${startTime} ~ ${endDate.format(dateFormat)} ${endTime}`;
93
- }
94
- }
95
- const startDateTime = `${startDate.format("YYYY-MM-DD")} ${startTime}`;
96
- const endDateTime = `${endDate.format("YYYY-MM-DD")} ${endTime}`;
97
- let _duration = (0, import_dayjs.default)(endDateTime).diff((0, import_dayjs.default)(startDateTime), item == null ? void 0 : item.duration_type);
98
- let durationText = "";
99
- if ((item == null ? void 0 : item.duration_type) === "minutes") {
100
- const hours = Math.floor(_duration / 60);
101
- const minutes = _duration % 60;
102
- durationText = import_utils.locales.getText("pisell2.product.card.hour.minute")(hours, minutes);
103
- } else if ((item == null ? void 0 : item.duration_type) === "days") {
104
- durationText = import_utils.locales.getText("pisell2.product.card.day")(_duration);
105
- } else {
106
- durationText = `${_duration}`;
107
- }
108
- return `${dateTime} (${durationText})`;
109
- }
110
- let _format = isEn2 ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
111
- if ((item == null ? void 0 : item.hasOwnProperty("format")) && ((_b = item == null ? void 0 : item.format) == null ? void 0 : _b.length) > 0) {
112
- _format = isEn2 ? (_c = item == null ? void 0 : item.format) == null ? void 0 : _c[0] : (_d = item == null ? void 0 : item.format) == null ? void 0 : _d[1];
113
- }
114
- if (item == null ? void 0 : item.show_time) {
115
- startDate = (0, import_dayjs.default)((item == null ? void 0 : item.start_time) ? `${item == null ? void 0 : item.start_date} ${item == null ? void 0 : item.start_time}` : startDate.format("YYYY-MM-DD HH:mm"));
116
- endDate = (0, import_dayjs.default)((item == null ? void 0 : item.end_time) ? `${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}` : endDate.format("YYYY-MM-DD HH:mm"));
117
- }
118
- if ((item == null ? void 0 : item.duration_type) === "minutes") {
119
- diffInDays = endDate.diff(startDate, "minute");
120
- }
121
- const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
122
- let text = import_utils.locales.getText("pisell2.product.card.day")(diffInDays);
123
- if (item == null ? void 0 : item.custom_day_count) {
124
- text = import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays);
125
- }
126
- const textTypes = {
127
- "minutes": import_utils.locales.getText("pisell2.product.card.minute")(diffInDays),
128
- "event": import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays)
129
- };
130
- text = (textTypes == null ? void 0 : textTypes[item == null ? void 0 : item.duration_type]) || text;
131
- let duration = `${diffInDays}${text}`;
132
- return `${date} (${duration})`;
133
- };
134
- // Annotate the CommonJS export names for ESM import in node:
135
- 0 && (module.exports = {
136
- formatMultiDayDate,
137
- getServiceTime,
138
- isEn
139
- });
@@ -1,5 +0,0 @@
1
- interface UseWindowSizeOptions {
2
- debounceMs?: number;
3
- }
4
- export declare const useWindowSize: (options?: UseWindowSizeOptions) => void;
5
- export {};
@@ -1,51 +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/hooks/useWindowSize.ts
20
- var useWindowSize_exports = {};
21
- __export(useWindowSize_exports, {
22
- useWindowSize: () => useWindowSize
23
- });
24
- module.exports = __toCommonJS(useWindowSize_exports);
25
- var import_react = require("react");
26
- var useWindowSize = (options = {}) => {
27
- const {
28
- debounceMs = 100
29
- } = options;
30
- (0, import_react.useEffect)(() => {
31
- let timeoutId;
32
- const setRealVH = () => {
33
- const vh = window.innerHeight * 0.01;
34
- document.documentElement.style.setProperty("--vh", `${vh}px`);
35
- };
36
- const debouncedHandleResize = () => {
37
- clearTimeout(timeoutId);
38
- timeoutId = setTimeout(setRealVH, debounceMs);
39
- };
40
- debouncedHandleResize();
41
- window.addEventListener("resize", debouncedHandleResize);
42
- return () => {
43
- window.removeEventListener("resize", debouncedHandleResize);
44
- clearTimeout(timeoutId);
45
- };
46
- }, [debounceMs]);
47
- };
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- useWindowSize
51
- });
@@ -1,53 +0,0 @@
1
- import {
2
- IPublicTypeComponentMetadata,
3
- IPublicTypeSnippet,
4
- } from '@alilc/lowcode-types';
5
-
6
- const EditBookingModalMeta: IPublicTypeComponentMetadata = {
7
- componentName: 'EditBookingModal',
8
- title: 'EditBookingModal',
9
- docUrl: '',
10
- screenshot: '',
11
- devMode: 'proCode',
12
- npm: {
13
- package: '@pisell/private-materials',
14
- version: '1.0.4',
15
- exportName: 'EditBookingModal',
16
- main: 'src/index.ts',
17
- destructuring: true,
18
- subName: '',
19
- },
20
- configure: {
21
- props: [],
22
- supports: {
23
- events: [
24
- {
25
- name: 'onOk',
26
- template:
27
- "onOk(event,${extParams}){\n// 点击按钮时的回调\nconsole.log('onOk', event);}",
28
- },
29
- {
30
- name: 'onCancel',
31
- template:
32
- "onCancel(event,${extParams}){\n// 点击按钮时的回调\nconsole.log('onCancel', event);}",
33
- },
34
- ],
35
- },
36
- component: {},
37
- },
38
- };
39
- const snippets: IPublicTypeSnippet[] = [
40
- {
41
- title: 'EditBookingModal',
42
- screenshot: '',
43
- schema: {
44
- componentName: 'EditBookingModal',
45
- props: {},
46
- },
47
- },
48
- ];
49
-
50
- export default {
51
- ...EditBookingModalMeta,
52
- snippets,
53
- };
@@ -1,88 +0,0 @@
1
-
2
- import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
3
-
4
- const StepControllerMeta: ComponentMetadata = {
5
- "componentName": "StepController",
6
- "title": "StepController",
7
- "docUrl": "",
8
- "screenshot": "",
9
- "devMode": "proCode",
10
- "npm": {
11
- "package": "@pisell/private-materials",
12
- "version": "1.0.4",
13
- "exportName": "StepController",
14
- "main": "src/index.ts",
15
- "destructuring": true,
16
- "subName": ""
17
- },
18
- "configure": {
19
- props: [
20
- {
21
- name: 'steps',
22
- title: { label: '步骤列表', tip: 'steps | 步骤列表' },
23
- setter: 'JsonSetter',
24
- defaultValue: [],
25
- },
26
- {
27
- name: 'currentStep',
28
- title: { label: '当前步骤', tip: 'currentStep | 当前步骤' },
29
- setter: 'StringSetter',
30
- },
31
- {
32
- name: 'children',
33
- title: { label: '内容', tip: 'leftChildren | 内容' },
34
- setter: 'SlotSetter',
35
- },
36
- {
37
- name: 'confirmCloseProps',
38
- title: { label: '关闭流程确认弹窗内容', tip: 'confirmCloseProps | 关闭流程确认弹窗内容' },
39
- setter: 'JsonSetter',
40
- },
41
- {
42
- name: 'showFooter',
43
- title: { label: '是否显示底部', tip: 'showFooter | 是否显示底部' },
44
- setter: 'BoolSetter',
45
- },
46
- {
47
- name: 'footerContent',
48
- title: { label: '底部内容', tip: 'footerContent | 底部内容' },
49
- setter: 'SlotSetter',
50
- condition(target) {
51
- return !!target.getProps().getPropValue("showFooter");
52
- },
53
- },
54
- ],
55
- "supports": {
56
- style: true,
57
- events: [
58
- {
59
- name: "onBack",
60
- template:
61
- "onBack(key){\n//console.log('返回上一步',key);}",
62
- },
63
- {
64
- name: "onClose",
65
- template:
66
- "onClose(){\n//console.log('关闭流程');}",
67
- },
68
- ],
69
- },
70
- "component": {}
71
- }
72
- };
73
- const snippets: Snippet[] = [
74
- {
75
- "title": "StepController",
76
- "screenshot": "",
77
- "schema": {
78
- "componentName": "StepController",
79
- "props": {
80
- }
81
- }
82
- }
83
- ];
84
-
85
- export default {
86
- ...StepControllerMeta,
87
- snippets
88
- };