@pisell/private-materials 3.0.12 → 3.0.14

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 (427) 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 +12 -12
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +12 -12
  11. package/es/components/booking/components/TabProduct/index.js +8 -10
  12. package/es/components/booking/components/TabProduct/index.less +8 -8
  13. package/es/components/booking/components/TabProduct/tabs/index.js +10 -9
  14. package/es/components/booking/components/TabProduct/tabs/index.less +15 -13
  15. package/es/components/booking/components/addButton/index.d.ts +8 -8
  16. package/es/components/booking/components/addButton/index.js +1 -1
  17. package/es/components/booking/components/customSelect/index.js +1 -1
  18. package/es/components/booking/components/drawer/index.d.ts +2 -1
  19. package/es/components/booking/components/drawer/index.js +5 -2
  20. package/es/components/booking/components/drawer/index.less +6 -0
  21. package/es/components/booking/components/footer/FooterMenus/index.js +1 -1
  22. package/es/components/booking/components/footer/index.js +23 -21
  23. package/es/components/booking/components/footer/utils.js +4 -3
  24. package/es/components/booking/forms/forms.js +2 -1
  25. package/es/components/booking/info/client/index.js +0 -1
  26. package/es/components/booking/info/date/index.less +1 -1
  27. package/es/components/booking/info/index.js +10 -4
  28. package/es/components/booking/info/pet/index.js +5 -7
  29. package/es/components/booking/info/service/addService/index.js +27 -11
  30. package/es/components/booking/info/service/editService/index.js +8 -7
  31. package/es/components/booking/info/service/index.js +1 -1
  32. package/es/components/booking/info/service/index.less +3 -0
  33. package/es/components/booking/locales.d.ts +3 -0
  34. package/es/components/booking/locales.js +3 -0
  35. package/es/components/booking/model.d.ts +11 -0
  36. package/es/components/booking/utils.js +2 -1
  37. package/es/components/index.d.ts +3 -1
  38. package/es/components/index.js +3 -1
  39. package/es/components/productExtension/card/index.d.ts +10 -0
  40. package/es/components/productExtension/card/index.js +20 -0
  41. package/es/components/productExtension/card/index.less +34 -0
  42. package/es/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
  43. package/es/components/productExtension/fields/Actor/Container/index.js +34 -0
  44. package/es/components/productExtension/fields/Actor/Container/index.less +19 -0
  45. package/es/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
  46. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +94 -0
  47. package/es/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
  48. package/es/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
  49. package/es/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
  50. package/es/components/productExtension/fields/Actor/index.d.ts +5 -0
  51. package/es/components/productExtension/fields/Actor/index.js +23 -0
  52. package/es/components/productExtension/fields/Forms/index.d.ts +10 -0
  53. package/es/components/productExtension/fields/Forms/index.js +184 -0
  54. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
  55. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +30 -0
  56. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
  57. package/es/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
  58. package/es/components/productExtension/fields/SelectProducts/index.js +91 -0
  59. package/es/components/productExtension/fields/SelectProducts/index.less +30 -0
  60. package/es/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
  61. package/es/components/productExtension/fields/SelectProducts/mock.js +0 -0
  62. package/es/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
  63. package/es/components/productExtension/fields/SelectProducts/server.js +29 -0
  64. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
  65. package/es/components/productExtension/fields/SelectResourcesTable/index.js +198 -0
  66. package/es/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
  67. package/es/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
  68. package/es/components/productExtension/fields/SelectResourcesTable/mock.js +5072 -0
  69. package/es/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
  70. package/es/components/productExtension/fields/SelectResourcesTable/server.js +49 -0
  71. package/es/components/productExtension/fields/index.d.ts +1 -0
  72. package/es/components/productExtension/fields/index.js +33 -0
  73. package/es/components/productExtension/index.d.ts +7 -0
  74. package/es/components/productExtension/index.js +77 -0
  75. package/es/components/productExtension/index.less +0 -0
  76. package/es/components/productExtension/locales.d.ts +48 -0
  77. package/es/components/productExtension/locales.js +47 -0
  78. package/es/components/productExtension/server.d.ts +1 -0
  79. package/es/components/productExtension/server.js +29 -0
  80. package/es/components/schedules/calendar/calendarItem.d.ts +11 -0
  81. package/es/components/schedules/calendar/calendarItem.js +64 -0
  82. package/es/components/schedules/calendar/index.d.ts +4 -0
  83. package/es/components/schedules/calendar/index.js +176 -0
  84. package/es/components/schedules/calendar/index.less +167 -0
  85. package/es/components/schedules/calendar/serve.d.ts +12 -0
  86. package/es/components/schedules/calendar/serve.js +24 -0
  87. package/es/components/schedules/calendar/utils.d.ts +7 -0
  88. package/es/components/schedules/calendar/utils.js +25 -0
  89. package/es/components/schedules/components/Card/index.d.ts +6 -0
  90. package/es/components/schedules/components/Card/index.js +10 -0
  91. package/es/components/schedules/components/Card/index.less +5 -0
  92. package/es/components/schedules/components/CurrentDay/index.d.ts +8 -0
  93. package/es/components/schedules/components/CurrentDay/index.js +52 -0
  94. package/es/components/schedules/components/CurrentDay/index.less +37 -0
  95. package/es/components/schedules/components/CurrentDay/serve.d.ts +1 -0
  96. package/es/components/schedules/components/CurrentDay/serve.js +26 -0
  97. package/es/components/schedules/components/CurrentDay/utils.d.ts +1 -0
  98. package/es/components/schedules/components/CurrentDay/utils.js +6 -0
  99. package/es/components/schedules/components/DropdownSort/index.d.ts +3 -0
  100. package/es/components/schedules/components/DropdownSort/index.js +43 -0
  101. package/es/components/schedules/components/ResourceList/index.d.ts +14 -0
  102. package/es/components/schedules/components/ResourceList/index.js +32 -0
  103. package/es/components/schedules/components/ResourceList/index.less +21 -0
  104. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +16 -0
  105. package/es/components/schedules/components/ScheduleDetailList/index.js +87 -0
  106. package/es/components/schedules/components/ScheduleDetailList/index.less +40 -0
  107. package/es/components/schedules/components/ScheduleList/index.d.ts +20 -0
  108. package/es/components/schedules/components/ScheduleList/index.js +69 -0
  109. package/es/components/schedules/components/ScheduleList/index.less +38 -0
  110. package/es/components/schedules/components/Search/index.d.ts +8 -0
  111. package/es/components/schedules/components/Search/index.js +33 -0
  112. package/es/components/schedules/constants.d.ts +1 -0
  113. package/es/components/schedules/constants.js +1 -0
  114. package/es/components/schedules/hooks/useSchedulesDataSource.d.ts +10 -0
  115. package/es/components/schedules/hooks/useSchedulesDataSource.js +41 -0
  116. package/es/components/schedules/index.d.ts +3 -0
  117. package/es/components/schedules/index.js +168 -0
  118. package/es/components/schedules/index.less +50 -0
  119. package/es/components/schedules/locales.d.ts +84 -0
  120. package/es/components/schedules/locales.js +83 -0
  121. package/es/components/schedules/model.d.ts +78 -0
  122. package/es/components/schedules/model.js +72 -0
  123. package/es/components/schedules/openHours/index.d.ts +4 -0
  124. package/es/components/schedules/openHours/index.js +40 -0
  125. package/es/components/schedules/openHours/index.less +6 -0
  126. package/es/components/schedules/openHours/serve.d.ts +1 -0
  127. package/es/components/schedules/openHours/serve.js +24 -0
  128. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +11 -0
  129. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +36 -0
  130. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.less +3 -0
  131. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +5 -0
  132. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +50 -0
  133. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.less +0 -0
  134. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +4 -0
  135. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +85 -0
  136. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.less +6 -0
  137. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +14 -0
  138. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +124 -0
  139. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.less +3 -0
  140. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +7 -0
  141. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.js +39 -0
  142. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.less +18 -0
  143. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +4 -0
  144. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.js +8 -0
  145. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.less +0 -0
  146. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +4 -0
  147. package/es/components/schedules/products/ProductDetailDrawer/index.js +248 -0
  148. package/es/components/schedules/products/ProductDetailDrawer/index.less +3 -0
  149. package/es/components/schedules/products/index.d.ts +4 -0
  150. package/es/components/schedules/products/index.js +77 -0
  151. package/es/components/schedules/products/index.less +21 -0
  152. package/es/components/schedules/products/list/ProductItem/index.d.ts +10 -0
  153. package/es/components/schedules/products/list/ProductItem/index.js +37 -0
  154. package/es/components/schedules/products/list/ProductItem/index.less +59 -0
  155. package/es/components/schedules/products/list/index.d.ts +8 -0
  156. package/es/components/schedules/products/list/index.js +120 -0
  157. package/es/components/schedules/products/list/index.less +7 -0
  158. package/es/components/schedules/products/serve.d.ts +22 -0
  159. package/es/components/schedules/products/serve.js +145 -0
  160. package/es/components/schedules/products/utils.d.ts +103 -0
  161. package/es/components/schedules/products/utils.js +346 -0
  162. package/es/components/schedules/resources/add/index.d.ts +3 -0
  163. package/es/components/schedules/resources/add/index.js +61 -0
  164. package/es/components/schedules/resources/detail/detailContent.d.ts +4 -0
  165. package/es/components/schedules/resources/detail/detailContent.js +113 -0
  166. package/es/components/schedules/resources/detail/index.d.ts +4 -0
  167. package/es/components/schedules/resources/detail/index.js +158 -0
  168. package/es/components/schedules/resources/detail/index.less +126 -0
  169. package/es/components/schedules/resources/index.d.ts +4 -0
  170. package/es/components/schedules/resources/index.js +213 -0
  171. package/es/components/schedules/resources/index.less +52 -0
  172. package/es/components/schedules/resources/list/index.d.ts +9 -0
  173. package/es/components/schedules/resources/list/index.js +30 -0
  174. package/es/components/schedules/resources/list/index.less +26 -0
  175. package/es/components/schedules/resources/relationProduct/index.d.ts +7 -0
  176. package/es/components/schedules/resources/relationProduct/index.js +30 -0
  177. package/es/components/schedules/resources/relationProduct/index.less +0 -0
  178. package/es/components/schedules/resources/serve.d.ts +5 -0
  179. package/es/components/schedules/resources/serve.js +106 -0
  180. package/es/components/schedules/schedules/AllSchedules/index.d.ts +15 -0
  181. package/es/components/schedules/schedules/AllSchedules/index.js +56 -0
  182. package/es/components/schedules/schedules/AllSchedules/index.less +17 -0
  183. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +20 -0
  184. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +183 -0
  185. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.less +43 -0
  186. package/es/components/schedules/schedules/Schedules.d.ts +30 -0
  187. package/es/components/schedules/schedules/Schedules.js +56 -0
  188. package/es/components/schedules/schedules/SchedulesForDay/index.d.ts +19 -0
  189. package/es/components/schedules/schedules/SchedulesForDay/index.js +31 -0
  190. package/es/components/schedules/schedules/index.d.ts +3 -0
  191. package/es/components/schedules/schedules/index.js +206 -0
  192. package/es/components/schedules/schedules/index.less +4 -0
  193. package/es/components/schedules/schedules/serve.d.ts +9 -0
  194. package/es/components/schedules/schedules/serve.js +43 -0
  195. package/es/components/schedules/schedules/utils.d.ts +50 -0
  196. package/es/components/schedules/schedules/utils.js +658 -0
  197. package/es/components/schedules/type.d.ts +150 -0
  198. package/es/components/schedules/type.js +1 -0
  199. package/es/components/schedules/utils.d.ts +22 -0
  200. package/es/components/schedules/utils.js +56 -0
  201. package/es/components/selectModal/index.d.ts +24 -0
  202. package/es/components/selectModal/index.js +108 -0
  203. package/es/components/selectModal/index.less +0 -0
  204. package/es/components/tabProduct/card/index.d.ts +7 -0
  205. package/es/components/tabProduct/card/index.js +11 -0
  206. package/es/components/tabProduct/card/index.less +16 -0
  207. package/es/components/tabProduct/index.d.ts +15 -0
  208. package/es/components/tabProduct/index.js +141 -0
  209. package/es/components/tabProduct/index.less +48 -0
  210. package/es/components/tabProduct/tabs/index.d.ts +21 -0
  211. package/es/components/tabProduct/tabs/index.js +218 -0
  212. package/es/components/tabProduct/tabs/index.less +125 -0
  213. package/es/hooks/useComponents.js +4 -2
  214. package/es/index.d.ts +2 -0
  215. package/es/index.js +3 -1
  216. package/es/utils/index.d.ts +22 -0
  217. package/es/utils/index.js +56 -0
  218. package/lib/components/booking/components/TabProduct/index.js +24 -17
  219. package/lib/components/booking/components/TabProduct/index.less +8 -8
  220. package/lib/components/booking/components/TabProduct/tabs/index.js +19 -9
  221. package/lib/components/booking/components/TabProduct/tabs/index.less +15 -13
  222. package/lib/components/booking/components/addButton/index.d.ts +8 -8
  223. package/lib/components/booking/components/addButton/index.js +1 -1
  224. package/lib/components/booking/components/customSelect/index.js +1 -1
  225. package/lib/components/booking/components/drawer/index.d.ts +2 -1
  226. package/lib/components/booking/components/drawer/index.js +11 -2
  227. package/lib/components/booking/components/drawer/index.less +6 -0
  228. package/lib/components/booking/components/footer/FooterMenus/index.js +1 -1
  229. package/lib/components/booking/components/footer/index.js +3 -1
  230. package/lib/components/booking/components/footer/utils.js +4 -2
  231. package/lib/components/booking/forms/forms.js +1 -1
  232. package/lib/components/booking/info/client/index.js +0 -1
  233. package/lib/components/booking/info/date/index.less +1 -1
  234. package/lib/components/booking/info/index.js +7 -1
  235. package/lib/components/booking/info/pet/index.js +5 -7
  236. package/lib/components/booking/info/service/addService/index.js +25 -10
  237. package/lib/components/booking/info/service/editService/index.js +7 -5
  238. package/lib/components/booking/info/service/index.js +1 -1
  239. package/lib/components/booking/info/service/index.less +3 -0
  240. package/lib/components/booking/locales.d.ts +3 -0
  241. package/lib/components/booking/locales.js +3 -0
  242. package/lib/components/booking/model.d.ts +11 -0
  243. package/lib/components/booking/utils.js +2 -1
  244. package/lib/components/index.d.ts +3 -1
  245. package/lib/components/index.js +8 -2
  246. package/lib/components/productExtension/card/index.d.ts +10 -0
  247. package/lib/components/productExtension/card/index.js +57 -0
  248. package/lib/components/productExtension/card/index.less +34 -0
  249. package/lib/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
  250. package/lib/components/productExtension/fields/Actor/Container/index.js +64 -0
  251. package/lib/components/productExtension/fields/Actor/Container/index.less +19 -0
  252. package/lib/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
  253. package/lib/components/productExtension/fields/Actor/CutOffTime/index.js +128 -0
  254. package/lib/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
  255. package/lib/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
  256. package/lib/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
  257. package/lib/components/productExtension/fields/Actor/index.d.ts +5 -0
  258. package/lib/components/productExtension/fields/Actor/index.js +56 -0
  259. package/lib/components/productExtension/fields/Forms/index.d.ts +10 -0
  260. package/lib/components/productExtension/fields/Forms/index.js +108 -0
  261. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
  262. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +65 -0
  263. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
  264. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
  265. package/lib/components/productExtension/fields/SelectProducts/index.js +111 -0
  266. package/lib/components/productExtension/fields/SelectProducts/index.less +30 -0
  267. package/lib/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
  268. package/lib/components/productExtension/fields/SelectProducts/mock.js +0 -0
  269. package/lib/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
  270. package/lib/components/productExtension/fields/SelectProducts/server.js +33 -0
  271. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
  272. package/lib/components/productExtension/fields/SelectResourcesTable/index.js +179 -0
  273. package/lib/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
  274. package/lib/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
  275. package/lib/components/productExtension/fields/SelectResourcesTable/mock.js +12723 -0
  276. package/lib/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
  277. package/lib/components/productExtension/fields/SelectResourcesTable/server.js +39 -0
  278. package/lib/components/productExtension/fields/index.d.ts +1 -0
  279. package/lib/components/productExtension/fields/index.js +69 -0
  280. package/lib/components/productExtension/index.d.ts +7 -0
  281. package/lib/components/productExtension/index.js +108 -0
  282. package/lib/components/productExtension/index.less +0 -0
  283. package/lib/components/productExtension/locales.d.ts +48 -0
  284. package/lib/components/productExtension/locales.js +71 -0
  285. package/lib/components/productExtension/server.d.ts +1 -0
  286. package/lib/components/productExtension/server.js +33 -0
  287. package/lib/components/schedules/calendar/calendarItem.d.ts +11 -0
  288. package/lib/components/schedules/calendar/calendarItem.js +91 -0
  289. package/lib/components/schedules/calendar/index.d.ts +4 -0
  290. package/lib/components/schedules/calendar/index.js +179 -0
  291. package/lib/components/schedules/calendar/index.less +167 -0
  292. package/lib/components/schedules/calendar/serve.d.ts +12 -0
  293. package/lib/components/schedules/calendar/serve.js +30 -0
  294. package/lib/components/schedules/calendar/utils.d.ts +7 -0
  295. package/lib/components/schedules/calendar/utils.js +51 -0
  296. package/lib/components/schedules/components/Card/index.d.ts +6 -0
  297. package/lib/components/schedules/components/Card/index.js +41 -0
  298. package/lib/components/schedules/components/Card/index.less +5 -0
  299. package/lib/components/schedules/components/CurrentDay/index.d.ts +8 -0
  300. package/lib/components/schedules/components/CurrentDay/index.js +80 -0
  301. package/lib/components/schedules/components/CurrentDay/index.less +37 -0
  302. package/lib/components/schedules/components/CurrentDay/serve.d.ts +1 -0
  303. package/lib/components/schedules/components/CurrentDay/serve.js +30 -0
  304. package/lib/components/schedules/components/CurrentDay/utils.d.ts +1 -0
  305. package/lib/components/schedules/components/CurrentDay/utils.js +44 -0
  306. package/lib/components/schedules/components/DropdownSort/index.d.ts +3 -0
  307. package/lib/components/schedules/components/DropdownSort/index.js +74 -0
  308. package/lib/components/schedules/components/ResourceList/index.d.ts +14 -0
  309. package/lib/components/schedules/components/ResourceList/index.js +66 -0
  310. package/lib/components/schedules/components/ResourceList/index.less +21 -0
  311. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +16 -0
  312. package/lib/components/schedules/components/ScheduleDetailList/index.js +90 -0
  313. package/lib/components/schedules/components/ScheduleDetailList/index.less +40 -0
  314. package/lib/components/schedules/components/ScheduleList/index.d.ts +20 -0
  315. package/lib/components/schedules/components/ScheduleList/index.js +97 -0
  316. package/lib/components/schedules/components/ScheduleList/index.less +38 -0
  317. package/lib/components/schedules/components/Search/index.d.ts +8 -0
  318. package/lib/components/schedules/components/Search/index.js +56 -0
  319. package/lib/components/schedules/constants.d.ts +1 -0
  320. package/lib/components/schedules/constants.js +36 -0
  321. package/lib/components/schedules/hooks/useSchedulesDataSource.d.ts +10 -0
  322. package/lib/components/schedules/hooks/useSchedulesDataSource.js +48 -0
  323. package/lib/components/schedules/index.d.ts +3 -0
  324. package/lib/components/schedules/index.js +148 -0
  325. package/lib/components/schedules/index.less +50 -0
  326. package/lib/components/schedules/locales.d.ts +84 -0
  327. package/lib/components/schedules/locales.js +107 -0
  328. package/lib/components/schedules/model.d.ts +78 -0
  329. package/lib/components/schedules/model.js +85 -0
  330. package/lib/components/schedules/openHours/index.d.ts +4 -0
  331. package/lib/components/schedules/openHours/index.js +74 -0
  332. package/lib/components/schedules/openHours/index.less +6 -0
  333. package/lib/components/schedules/openHours/serve.d.ts +1 -0
  334. package/lib/components/schedules/openHours/serve.js +30 -0
  335. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +11 -0
  336. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +62 -0
  337. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.less +3 -0
  338. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +5 -0
  339. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +73 -0
  340. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.less +0 -0
  341. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +4 -0
  342. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +108 -0
  343. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.less +6 -0
  344. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +14 -0
  345. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +145 -0
  346. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.less +3 -0
  347. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +7 -0
  348. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.js +66 -0
  349. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.less +18 -0
  350. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +4 -0
  351. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.js +40 -0
  352. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.less +0 -0
  353. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +4 -0
  354. package/lib/components/schedules/products/ProductDetailDrawer/index.js +218 -0
  355. package/lib/components/schedules/products/ProductDetailDrawer/index.less +3 -0
  356. package/lib/components/schedules/products/index.d.ts +4 -0
  357. package/lib/components/schedules/products/index.js +105 -0
  358. package/lib/components/schedules/products/index.less +21 -0
  359. package/lib/components/schedules/products/list/ProductItem/index.d.ts +10 -0
  360. package/lib/components/schedules/products/list/ProductItem/index.js +73 -0
  361. package/lib/components/schedules/products/list/ProductItem/index.less +59 -0
  362. package/lib/components/schedules/products/list/index.d.ts +8 -0
  363. package/lib/components/schedules/products/list/index.js +139 -0
  364. package/lib/components/schedules/products/list/index.less +7 -0
  365. package/lib/components/schedules/products/serve.d.ts +22 -0
  366. package/lib/components/schedules/products/serve.js +64 -0
  367. package/lib/components/schedules/products/utils.d.ts +103 -0
  368. package/lib/components/schedules/products/utils.js +263 -0
  369. package/lib/components/schedules/resources/add/index.d.ts +3 -0
  370. package/lib/components/schedules/resources/add/index.js +87 -0
  371. package/lib/components/schedules/resources/detail/detailContent.d.ts +4 -0
  372. package/lib/components/schedules/resources/detail/detailContent.js +127 -0
  373. package/lib/components/schedules/resources/detail/index.d.ts +4 -0
  374. package/lib/components/schedules/resources/detail/index.js +150 -0
  375. package/lib/components/schedules/resources/detail/index.less +126 -0
  376. package/lib/components/schedules/resources/index.d.ts +4 -0
  377. package/lib/components/schedules/resources/index.js +209 -0
  378. package/lib/components/schedules/resources/index.less +52 -0
  379. package/lib/components/schedules/resources/list/index.d.ts +9 -0
  380. package/lib/components/schedules/resources/list/index.js +68 -0
  381. package/lib/components/schedules/resources/list/index.less +26 -0
  382. package/lib/components/schedules/resources/relationProduct/index.d.ts +7 -0
  383. package/lib/components/schedules/resources/relationProduct/index.js +56 -0
  384. package/lib/components/schedules/resources/relationProduct/index.less +0 -0
  385. package/lib/components/schedules/resources/serve.d.ts +5 -0
  386. package/lib/components/schedules/resources/serve.js +42 -0
  387. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +15 -0
  388. package/lib/components/schedules/schedules/AllSchedules/index.js +68 -0
  389. package/lib/components/schedules/schedules/AllSchedules/index.less +17 -0
  390. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +20 -0
  391. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.js +168 -0
  392. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.less +43 -0
  393. package/lib/components/schedules/schedules/Schedules.d.ts +30 -0
  394. package/lib/components/schedules/schedules/Schedules.js +101 -0
  395. package/lib/components/schedules/schedules/SchedulesForDay/index.d.ts +19 -0
  396. package/lib/components/schedules/schedules/SchedulesForDay/index.js +64 -0
  397. package/lib/components/schedules/schedules/index.d.ts +3 -0
  398. package/lib/components/schedules/schedules/index.js +226 -0
  399. package/lib/components/schedules/schedules/index.less +4 -0
  400. package/lib/components/schedules/schedules/serve.d.ts +9 -0
  401. package/lib/components/schedules/schedules/serve.js +33 -0
  402. package/lib/components/schedules/schedules/utils.d.ts +50 -0
  403. package/lib/components/schedules/schedules/utils.js +556 -0
  404. package/lib/components/schedules/type.d.ts +150 -0
  405. package/lib/components/schedules/type.js +17 -0
  406. package/lib/components/schedules/utils.d.ts +22 -0
  407. package/lib/components/schedules/utils.js +59 -0
  408. package/lib/components/selectModal/index.d.ts +24 -0
  409. package/lib/components/selectModal/index.js +133 -0
  410. package/lib/components/selectModal/index.less +0 -0
  411. package/lib/components/tabProduct/card/index.d.ts +7 -0
  412. package/lib/components/tabProduct/card/index.js +53 -0
  413. package/lib/components/tabProduct/card/index.less +16 -0
  414. package/lib/components/tabProduct/index.d.ts +15 -0
  415. package/lib/components/tabProduct/index.js +141 -0
  416. package/lib/components/tabProduct/index.less +48 -0
  417. package/lib/components/tabProduct/tabs/index.d.ts +21 -0
  418. package/lib/components/tabProduct/tabs/index.js +177 -0
  419. package/lib/components/tabProduct/tabs/index.less +125 -0
  420. package/lib/hooks/useComponents.js +3 -2
  421. package/lib/index.d.ts +2 -0
  422. package/lib/index.js +8 -2
  423. package/lib/utils/index.d.ts +22 -0
  424. package/lib/utils/index.js +59 -0
  425. package/lowcode/product-extension/meta.ts +120 -0
  426. package/lowcode/schedules/meta.ts +83 -0
  427. package/package.json +3 -3
@@ -0,0 +1,84 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.text.schedules.all-day': string;
4
+ 'pisell2.text.schedules.save': string;
5
+ 'pisell2.text.schedules.delete-schedules-text1': string;
6
+ 'pisell2.text.schedules.delete-schedules-text2': string;
7
+ 'pisell2.text.schedules.delete-schedules-text3': string;
8
+ 'pisell2.text.schedules.add': string;
9
+ 'pisell2.text.schedules.edit-schedule': string;
10
+ 'pisell2.text.schedules.products-title': string;
11
+ 'pisell2.text.schedules.schedules-title': string;
12
+ 'pisell2.text.schedules.resources-title': string;
13
+ 'pisell2.text.schedules.open-hours-title': string;
14
+ 'pisell2.text.schedules.cancel': string;
15
+ 'pisell2.text.products.no-current-schedule': string;
16
+ 'pisell2.text.schedules.save-success': string;
17
+ 'pisell2.text.schedules.no-schedules': string;
18
+ 'pisell2.text.schedules.assign-schedule': string;
19
+ 'pisell2.text.schedules.max-participants': string;
20
+ 'pisell2.text.products.edit-resource-message': string;
21
+ 'pisell2.text.products.no-products': string;
22
+ 'pisell2.text.products.no-resources': string;
23
+ 'pisell2.text.products.unsaved-title': string;
24
+ 'pisell2.text.products.unsaved-content': string;
25
+ 'pisell2.text.products.unsaved-back': string;
26
+ 'pisell2.text.products.unsaved-yes': string;
27
+ 'pisell2.text.products.max-participants-error': string;
28
+ };
29
+ 'zh-CN': {
30
+ 'pisell2.text.schedules.all-day': string;
31
+ 'pisell2.text.schedules.save': string;
32
+ 'pisell2.text.schedules.delete-schedules-text1': string;
33
+ 'pisell2.text.schedules.delete-schedules-text2': string;
34
+ 'pisell2.text.schedules.delete-schedules-text3': string;
35
+ 'pisell2.text.schedules.add': string;
36
+ 'pisell2.text.schedules.edit-schedule': string;
37
+ 'pisell2.text.schedules.products-title': string;
38
+ 'pisell2.text.schedules.schedules-title': string;
39
+ 'pisell2.text.schedules.resources-title': string;
40
+ 'pisell2.text.schedules.open-hours-title': string;
41
+ 'pisell2.text.schedules.cancel': string;
42
+ 'pisell2.text.products.no-current-schedule': string;
43
+ 'pisell2.text.schedules.save-success': string;
44
+ 'pisell2.text.schedules.no-schedules': string;
45
+ 'pisell2.text.schedules.assign-schedule': string;
46
+ 'pisell2.text.schedules.max-participants': string;
47
+ 'pisell2.text.products.edit-resource-message': string;
48
+ 'pisell2.text.products.no-products': string;
49
+ 'pisell2.text.products.no-resources': string;
50
+ 'pisell2.text.products.unsaved-title': string;
51
+ 'pisell2.text.products.unsaved-content': string;
52
+ 'pisell2.text.products.unsaved-back': string;
53
+ 'pisell2.text.products.unsaved-yes': string;
54
+ 'pisell2.text.products.max-participants-error': string;
55
+ };
56
+ 'zh-HK': {
57
+ 'pisell2.text.schedules.all-day': string;
58
+ 'pisell2.text.schedules.save': string;
59
+ 'pisell2.text.schedules.delete-schedules-text1': string;
60
+ 'pisell2.text.schedules.delete-schedules-text2': string;
61
+ 'pisell2.text.schedules.delete-schedules-text3': string;
62
+ 'pisell2.text.schedules.add': string;
63
+ 'pisell2.text.schedules.edit-schedule': string;
64
+ 'pisell2.text.schedules.products-title': string;
65
+ 'pisell2.text.schedules.schedules-title': string;
66
+ 'pisell2.text.schedules.resources-title': string;
67
+ 'pisell2.text.schedules.open-hours-title': string;
68
+ 'pisell2.text.schedules.cancel': string;
69
+ 'pisell2.text.products.no-current-schedule': string;
70
+ 'pisell2.text.schedules.save-success': string;
71
+ 'pisell2.text.schedules.no-schedules': string;
72
+ 'pisell2.text.schedules.assign-schedule': string;
73
+ 'pisell2.text.schedules.max-participants': string;
74
+ 'pisell2.text.products.edit-resource-message': string;
75
+ 'pisell2.text.products.no-products': string;
76
+ 'pisell2.text.products.no-resources': string;
77
+ 'pisell2.text.products.unsaved-title': string;
78
+ 'pisell2.text.products.unsaved-content': string;
79
+ 'pisell2.text.products.unsaved-back': string;
80
+ 'pisell2.text.products.unsaved-yes': string;
81
+ 'pisell2.text.products.max-participants-error': string;
82
+ };
83
+ };
84
+ export default _default;
@@ -0,0 +1,83 @@
1
+ export default {
2
+ "en": {
3
+ 'pisell2.text.schedules.all-day': "All day",
4
+ 'pisell2.text.schedules.save': "Save",
5
+ 'pisell2.text.schedules.delete-schedules-text1': "Are you sure?",
6
+ 'pisell2.text.schedules.delete-schedules-text2': "This schedule has been associated with items, but there is no order yert. Deleting the schedule will disassociate the items.",
7
+ 'pisell2.text.schedules.delete-schedules-text3': "Orders already exist for the items associated with this schedule. Deleting the schedule will disassociate the items, but will not affect existing orders.",
8
+ 'pisell2.text.schedules.add': "Add",
9
+ 'pisell2.text.schedules.edit-schedule': "Edit Schedule",
10
+ 'pisell2.text.schedules.products-title': "Products",
11
+ 'pisell2.text.schedules.schedules-title': "Schedules",
12
+ 'pisell2.text.schedules.resources-title': "Resources",
13
+ 'pisell2.text.schedules.open-hours-title': "Open Hours",
14
+ 'pisell2.text.schedules.cancel': "Cancel",
15
+ 'pisell2.text.products.no-current-schedule': "No current schedule",
16
+ 'pisell2.text.schedules.save-success': "Save successfully",
17
+ 'pisell2.text.schedules.no-schedules': 'No Schedules',
18
+ 'pisell2.text.schedules.assign-schedule': 'Assign Schedule',
19
+ 'pisell2.text.schedules.max-participants': 'Max Participants',
20
+ 'pisell2.text.products.edit-resource-message': 'If you want to modify the resources associated with this product, please click here to jump',
21
+ 'pisell2.text.products.no-products': "No products",
22
+ 'pisell2.text.products.no-resources': "No resources",
23
+ 'pisell2.text.products.unsaved-title': "You has unsaved changes",
24
+ 'pisell2.text.products.unsaved-content': "Navigating away without saving will discard your changes. Are you sure you want to proceed?",
25
+ 'pisell2.text.products.unsaved-back': "Go back",
26
+ 'pisell2.text.products.unsaved-yes': "Yes, discard",
27
+ 'pisell2.text.products.max-participants-error': "Please set max participants"
28
+ },
29
+ 'zh-CN': {
30
+ 'pisell2.text.schedules.all-day': "全天",
31
+ 'pisell2.text.schedules.save': "保存",
32
+ 'pisell2.text.schedules.delete-schedules-text1': "确定删除吗?",
33
+ 'pisell2.text.schedules.delete-schedules-text2': "该日程计划已经关联了项目,但暂无订单。删除日程计划将会解除与项目的关联。",
34
+ 'pisell2.text.schedules.delete-schedules-text3': "该日程计划关联的项目已存在订单。删除日程计划将会解除与项目的关联,但不会影响已存在的订单。",
35
+ 'pisell2.text.schedules.add': "添加",
36
+ 'pisell2.text.schedules.edit-schedule': "编辑日程",
37
+ 'pisell2.text.schedules.products-title': "商品",
38
+ 'pisell2.text.schedules.schedules-title': "日程",
39
+ 'pisell2.text.schedules.resources-title': "资源",
40
+ 'pisell2.text.schedules.open-hours-title': "营业时间",
41
+ 'pisell2.text.schedules.cancel': "取消",
42
+ 'pisell2.text.products.no-current-schedule': "当前没有可用的日程",
43
+ 'pisell2.text.schedules.save-success': "保存成功",
44
+ 'pisell2.text.schedules.no-schedules': '没有日程',
45
+ 'pisell2.text.schedules.assign-schedule': '关联日程',
46
+ 'pisell2.text.schedules.max-participants': '最大参与人数',
47
+ 'pisell2.text.products.edit-resource-message': '如果要修改此商品关联的资源,请点击此处跳转',
48
+ 'pisell2.text.products.no-products': "暂无商品",
49
+ 'pisell2.text.products.no-resources': "暂无资源",
50
+ 'pisell2.text.products.unsaved-title': "有未保存的更改",
51
+ 'pisell2.text.products.unsaved-content': "若不保存即离开,您所做的修改将会丢失。确定要继续吗?",
52
+ 'pisell2.text.products.unsaved-back': "返回",
53
+ 'pisell2.text.products.unsaved-yes': "是的,退出",
54
+ 'pisell2.text.products.max-participants-error': "请设置最大参与人数"
55
+ },
56
+ 'zh-HK': {
57
+ 'pisell2.text.schedules.all-day': "全天",
58
+ 'pisell2.text.schedules.save': "保存",
59
+ 'pisell2.text.schedules.delete-schedules-text1': "確定刪除嗎 ?",
60
+ 'pisell2.text.schedules.delete-schedules-text2': "該日程計劃已經關聯了項目,但暫無訂單。刪除日程計劃將會解除與項目的關聯。",
61
+ 'pisell2.text.schedules.delete-schedules-text3': "該日程計劃關聯的項目已存在訂單。刪除日程計劃將會解除與項目的關聯,但不會影響已存在的訂單。",
62
+ 'pisell2.text.schedules.add': "添加",
63
+ 'pisell2.text.schedules.edit-schedule': "編輯日程",
64
+ 'pisell2.text.schedules.products-title': "商品",
65
+ 'pisell2.text.schedules.schedules-title': "日程",
66
+ 'pisell2.text.schedules.resources-title': "資源",
67
+ 'pisell2.text.schedules.open-hours-title': "營業時間",
68
+ 'pisell2.text.schedules.cancel': "取消",
69
+ 'pisell2.text.products.no-current-schedule': "當前沒有可用的日程",
70
+ 'pisell2.text.schedules.save-success': "保存成功",
71
+ 'pisell2.text.schedules.no-schedules': '沒有日程',
72
+ 'pisell2.text.schedules.assign-schedule': '關聯日程',
73
+ 'pisell2.text.schedules.max-participants': '最大參與人數',
74
+ 'pisell2.text.products.edit-resource-message': '如果要修改此商品關聯的資源, 請點擊此處跳轉',
75
+ 'pisell2.text.products.no-products': "暫無商品",
76
+ 'pisell2.text.products.no-resources': "暫無資源",
77
+ 'pisell2.text.products.unsaved-title': "有未保存的更改",
78
+ 'pisell2.text.products.unsaved-content': "若不保即離開,您做的修改將會丟失。確定要繼續嗎?",
79
+ 'pisell2.text.products.unsaved-back': "返回",
80
+ 'pisell2.text.products.unsaved-yes': "是的,退出",
81
+ 'pisell2.text.products.max-participants-error': "請設置最大參與人數"
82
+ }
83
+ };
@@ -0,0 +1,78 @@
1
+ import { CalendarDataItem, ScheduleItem } from "./type";
2
+ import dayjs from "dayjs";
3
+ export interface FormState {
4
+ data: {};
5
+ schedulesDetail: {
6
+ id?: number;
7
+ show: boolean;
8
+ type?: "standard" | "time-slots" | "designation";
9
+ fromTabKey?: "products" | "schedules" | "resources" | "openHours";
10
+ callback?: (data: ScheduleItem | {
11
+ id: number;
12
+ isRemove: boolean;
13
+ }) => void;
14
+ };
15
+ schedules: {
16
+ list: ScheduleItem[];
17
+ scheduleMap: Record<string, {
18
+ minTime: dayjs.Dayjs | null;
19
+ maxTime: dayjs.Dayjs | null;
20
+ minTimeStr: string | null;
21
+ maxTimeStr: string | null;
22
+ dateRange: {
23
+ start: string;
24
+ end: string;
25
+ }[];
26
+ dateRangeFormat: {
27
+ start: string;
28
+ end: string;
29
+ }[];
30
+ }>;
31
+ scheduleAllMap: Record<string, {
32
+ minTime: dayjs.Dayjs | null;
33
+ maxTime: dayjs.Dayjs | null;
34
+ minTimeStr: string | null;
35
+ maxTimeStr: string | null;
36
+ dateRange: {
37
+ start: string;
38
+ end: string;
39
+ }[];
40
+ dateRangeFormat: {
41
+ start: string;
42
+ end: string;
43
+ }[];
44
+ }>;
45
+ };
46
+ tabKey: "products" | "schedules" | "resources" | "openHours";
47
+ /** 当前日历选择天详情 */
48
+ currentSelectDayDetail?: {
49
+ scheduleIds: [];
50
+ date: "";
51
+ timeStr: string;
52
+ } | null;
53
+ /** 日历数据 */
54
+ calendar: {
55
+ isEdit: boolean;
56
+ allData: CalendarDataItem[];
57
+ editData?: CalendarDataItem[];
58
+ };
59
+ products: {
60
+ list: any[];
61
+ search: string;
62
+ currentProduct: null | any;
63
+ openProductDetailDrawer: boolean;
64
+ openAddSchedulesDrawer: boolean;
65
+ };
66
+ resources: {
67
+ cacheResource: null | any;
68
+ };
69
+ setGlobalState: Function | null;
70
+ }
71
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
72
+ state: FormState;
73
+ } & {
74
+ dispatch: (params: {
75
+ type: string;
76
+ payload: any;
77
+ }) => void;
78
+ }>;
@@ -0,0 +1,72 @@
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 { miniRedux } from "@pisell/utils";
8
+ var defaultState = {
9
+ data: {},
10
+ schedulesDetail: {
11
+ id: undefined,
12
+ show: false
13
+ },
14
+ currentSelectDayDetail: null,
15
+ tabKey: "products",
16
+ calendar: {
17
+ isEdit: false,
18
+ allData: [],
19
+ editData: []
20
+ },
21
+ schedules: {
22
+ list: [],
23
+ scheduleMap: {},
24
+ scheduleAllMap: {}
25
+ },
26
+ products: {
27
+ list: [],
28
+ search: "",
29
+ currentProduct: null,
30
+ openProductDetailDrawer: false,
31
+ openAddSchedulesDrawer: false
32
+ },
33
+ resources: {
34
+ cacheResource: null
35
+ },
36
+ setGlobalState: null
37
+ };
38
+ var _miniRedux = miniRedux({
39
+ namespace: "state",
40
+ state: defaultState,
41
+ reducers: {
42
+ setState: function setState(state, payload) {
43
+ return _objectSpread(_objectSpread({}, state), payload);
44
+ },
45
+ setGlobalState: function setGlobalState(state, payload) {
46
+ return _objectSpread(_objectSpread({}, state), payload);
47
+ },
48
+ setProducts: function setProducts(state, payload) {
49
+ return _objectSpread(_objectSpread({}, state), {}, {
50
+ products: _objectSpread(_objectSpread({}, state.products), payload)
51
+ });
52
+ },
53
+ setCalendar: function setCalendar(state, payload) {
54
+ return _objectSpread(_objectSpread({}, state), {}, {
55
+ calendar: _objectSpread(_objectSpread({}, state.calendar), payload)
56
+ });
57
+ },
58
+ setSchedules: function setSchedules(state, payload) {
59
+ return _objectSpread(_objectSpread({}, state), {}, {
60
+ schedules: _objectSpread(_objectSpread({}, state.schedules), payload)
61
+ });
62
+ },
63
+ setResources: function setResources(state, payload) {
64
+ return _objectSpread(_objectSpread({}, state), {}, {
65
+ resources: _objectSpread(_objectSpread({}, state.resources), payload)
66
+ });
67
+ }
68
+ }
69
+ }),
70
+ Provider = _miniRedux.Provider,
71
+ Context = _miniRedux.Context;
72
+ export { Provider, Context };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ declare const OpenHours: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
+ export default OpenHours;
@@ -0,0 +1,40 @@
1
+ import { useRequest } from "ahooks";
2
+ import React, { useEffect, useRef, useContext, useImperativeHandle } from "react";
3
+ import DetailContent from "../resources/detail/detailContent";
4
+ import { Context } from "../model";
5
+ import { getOpenHoursSchedule } from "./serve";
6
+ import "./index.less";
7
+ var OpenHours = /*#__PURE__*/React.forwardRef(function (props, ref) {
8
+ var _useContext = useContext(Context),
9
+ state = _useContext.state;
10
+ var tabKey = state === null || state === void 0 ? void 0 : state.tabKey;
11
+ var detailContentRef = useRef(null);
12
+ var _getOpenHoursSchedule = useRequest(getOpenHoursSchedule, {
13
+ manual: true,
14
+ onSuccess: function onSuccess(result) {
15
+ var _detailContentRef$cur, _detailContentRef$cur2;
16
+ var data = (result === null || result === void 0 ? void 0 : result.data) || {};
17
+ detailContentRef === null || detailContentRef === void 0 ? void 0 : (_detailContentRef$cur = detailContentRef.current) === null || _detailContentRef$cur === void 0 ? void 0 : (_detailContentRef$cur2 = _detailContentRef$cur.setFieldsValue) === null || _detailContentRef$cur2 === void 0 ? void 0 : _detailContentRef$cur2.call(_detailContentRef$cur, data);
18
+ }
19
+ });
20
+ useImperativeHandle(ref, function () {
21
+ return {
22
+ getIsEdit: function getIsEdit() {
23
+ return detailContentRef.current.getIsEdit();
24
+ }
25
+ };
26
+ });
27
+ useEffect(function () {
28
+ _getOpenHoursSchedule.run();
29
+ }, []);
30
+ return /*#__PURE__*/React.createElement("div", {
31
+ className: "pisell-lowcode__schedules-component-openHours"
32
+ }, /*#__PURE__*/React.createElement(DetailContent, {
33
+ isAutoSetCalendarData: tabKey === "openHours",
34
+ tabKey: tabKey,
35
+ ref: detailContentRef,
36
+ loading: _getOpenHoursSchedule.loading,
37
+ drawerContainer: document.querySelector(".pisell-lowcode__schedules-component-openHours")
38
+ }));
39
+ });
40
+ export default OpenHours;
@@ -0,0 +1,6 @@
1
+ .pisell-lowcode__schedules-component-openHours {
2
+ padding: 16px 24px;
3
+ padding-bottom: 48px;
4
+ height: 100%;
5
+ overflow-y: auto;
6
+ }
@@ -0,0 +1 @@
1
+ export declare const getOpenHoursSchedule: () => Promise<any>;
@@ -0,0 +1,24 @@
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ import { request } from "../utils";
6
+ export var getOpenHoursSchedule = /*#__PURE__*/function () {
7
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9
+ while (1) switch (_context.prev = _context.next) {
10
+ case 0:
11
+ _context.next = 2;
12
+ return request.getRequest().get("/shop/schedule/open-hours");
13
+ case 2:
14
+ return _context.abrupt("return", _context.sent);
15
+ case 3:
16
+ case "end":
17
+ return _context.stop();
18
+ }
19
+ }, _callee);
20
+ }));
21
+ return function getOpenHoursSchedule() {
22
+ return _ref.apply(this, arguments);
23
+ };
24
+ }();
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ declare const MaxParticipantsModule: ({ form, value, onChange, useSchedule, isAutoChange, onData, }: {
4
+ form: any;
5
+ value?: any;
6
+ onChange?: any;
7
+ useSchedule?: any;
8
+ onData?: any;
9
+ isAutoChange: boolean;
10
+ }) => React.JSX.Element;
11
+ export default MaxParticipantsModule;
@@ -0,0 +1,36 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React from "react";
8
+ import useComponents from "../../../../../../hooks/useComponents";
9
+ import "./index.less";
10
+ import { locales } from "@pisell/utils";
11
+ var MaxParticipantsModule = function MaxParticipantsModule(_ref) {
12
+ var form = _ref.form,
13
+ value = _ref.value,
14
+ onChange = _ref.onChange,
15
+ useSchedule = _ref.useSchedule,
16
+ isAutoChange = _ref.isAutoChange,
17
+ onData = _ref.onData;
18
+ var _useComponents = useComponents({
19
+ components: ["MaxParticipantsCom"]
20
+ }),
21
+ _useComponents2 = _slicedToArray(_useComponents, 1),
22
+ MaxParticipantsCom = _useComponents2[0];
23
+ return /*#__PURE__*/React.createElement("div", {
24
+ className: "product-detail-card-module"
25
+ }, /*#__PURE__*/React.createElement("div", {
26
+ className: "product-detail-card-title"
27
+ }, locales.getText("pisell2.text.schedules.max-participants")), MaxParticipantsCom && /*#__PURE__*/React.createElement(MaxParticipantsCom, {
28
+ scheduleIds: useSchedule || [],
29
+ value: value,
30
+ onChange: onChange,
31
+ componentType: "v1",
32
+ onData: onData,
33
+ isAutoChange: isAutoChange
34
+ }));
35
+ };
36
+ export default MaxParticipantsModule;
@@ -0,0 +1,3 @@
1
+ .product-detail-card-title {
2
+ margin-bottom: 16px;
3
+ }
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ declare const ResourcesModule: ({ product }: {
3
+ product: any;
4
+ }) => React.JSX.Element;
5
+ export default ResourcesModule;
@@ -0,0 +1,50 @@
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, { useContext, useEffect } from "react";
8
+ import ResourceList from "../../../../components/ResourceList";
9
+ import { getResourcesByProductId } from "../../../serve";
10
+ import { useRequest } from "ahooks";
11
+ import { Context } from "../../../../model";
12
+ import { locales } from "@pisell/utils";
13
+ var ResourcesModule = function ResourcesModule(_ref) {
14
+ var product = _ref.product;
15
+ var _useContext = useContext(Context),
16
+ state = _useContext.state,
17
+ dispatch = _useContext.dispatch;
18
+ var _getResourcesByProductId = useRequest(getResourcesByProductId, {
19
+ manual: true
20
+ });
21
+ useEffect(function () {
22
+ if (product) {
23
+ console.log("product", product);
24
+ _getResourcesByProductId.run({
25
+ id: product.id
26
+ });
27
+ }
28
+ }, [product]);
29
+ var goResource = function goResource(item) {
30
+ dispatch({
31
+ type: "setState",
32
+ payload: {
33
+ tabKey: "resources",
34
+ resources: _objectSpread(_objectSpread({}, state.resources), {}, {
35
+ cacheResource: item
36
+ })
37
+ }
38
+ });
39
+ };
40
+ return /*#__PURE__*/React.createElement("div", {
41
+ className: "product-detail-card-module"
42
+ }, /*#__PURE__*/React.createElement("div", {
43
+ className: "product-detail-card-title"
44
+ }, locales.getText("pisell2.text.schedules.resources-title")), /*#__PURE__*/React.createElement(ResourceList, {
45
+ dataSource: _getResourcesByProductId.data || [],
46
+ loading: _getResourcesByProductId.loading,
47
+ onClick: goResource
48
+ }));
49
+ };
50
+ export default ResourcesModule;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ declare const AddSchedules: ({ value, onChange, drawerContainer, isSelf }: any) => React.JSX.Element;
4
+ export default AddSchedules;
@@ -0,0 +1,85 @@
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 { locales } from "@pisell/utils";
8
+ import { useRequest } from "ahooks";
9
+ import { Button } from "antd";
10
+ import React, { useContext, useRef } from "react";
11
+ import CustomSelect from "../../../../../../booking/components/customSelect";
12
+ import { Context } from "../../../../../model";
13
+ import { getSchedules } from "../../../../serve";
14
+ import "./index.less";
15
+ var AddSchedules = function AddSchedules(_ref) {
16
+ var _state$schedules;
17
+ var value = _ref.value,
18
+ onChange = _ref.onChange,
19
+ drawerContainer = _ref.drawerContainer,
20
+ isSelf = _ref.isSelf;
21
+ var modalRef = useRef(null);
22
+ var _useContext = useContext(Context),
23
+ state = _useContext.state;
24
+ var _getScheduleList = useRequest(getSchedules, {
25
+ manual: true,
26
+ onSuccess: function onSuccess(res) {}
27
+ });
28
+ var onFinish = function onFinish(e) {
29
+ onChange(e);
30
+ };
31
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
32
+ ghost: true,
33
+ type: "primary",
34
+ className: "product-detail-card-module-add-button",
35
+ onClick: function onClick() {
36
+ var _modalRef$current;
37
+ (_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.open();
38
+ if (isSelf) {
39
+ _getScheduleList.run({
40
+ num: 999,
41
+ skip: 1
42
+ });
43
+ }
44
+ }
45
+ }, locales.getText("pisell2.text.schedules.assign-schedule")), /*#__PURE__*/React.createElement(CustomSelect, {
46
+ ref: modalRef,
47
+ rowKey: "id",
48
+ options: isSelf ? _getScheduleList.data || [] : (state === null || state === void 0 ? void 0 : (_state$schedules = state.schedules) === null || _state$schedules === void 0 ? void 0 : _state$schedules.list) || [],
49
+ loading: _getScheduleList.loading,
50
+ value: value,
51
+ onValueChange: onFinish,
52
+ isPreview: false,
53
+ drawerProps: _objectSpread({
54
+ title: locales.getText("pisell2.text.schedules.assign-schedule"),
55
+ destroyOnClose: true,
56
+ width: 500,
57
+ getContainer: drawerContainer || document.querySelector(".pisell-lowcode__schedules-component-products") || document.body,
58
+ rootStyle: {
59
+ position: "absolute"
60
+ },
61
+ contentWrapperStyle: {
62
+ boxShadow: "none"
63
+ },
64
+ titleNoWrap: true
65
+ }, isSelf ? {
66
+ zIndex: 1000
67
+ } : {}),
68
+ mode: "multiple",
69
+ optionRender: function optionRender(item) {
70
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
71
+ className: "pisell-lowcode__add-schedule-list-item-color",
72
+ style: {
73
+ backgroundColor: item.color
74
+ }
75
+ }), item.name);
76
+ }
77
+ // onVirtualListScroll={onScroll}
78
+ // loadMore={loadMore}
79
+ ,
80
+ filterItem: function filterItem(d, search) {
81
+ return d.name.toLowerCase().indexOf(search.toLowerCase()) !== -1;
82
+ }
83
+ }));
84
+ };
85
+ export default AddSchedules;