@pisell/private-materials 3.3.43 → 3.3.44

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 (222) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +5 -5
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +5 -5
  9. package/es/businessModel/SalesModel/index.d.ts +0 -1
  10. package/es/components/Sales/Summary/utils.d.ts +1 -1
  11. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +4 -25
  12. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Cart/Item/index.js +31 -16
  14. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  15. package/es/components/appointmentBooking/components/Content/index.js +39 -20
  16. package/es/components/appointmentBooking/components/Date/index.js +2 -13
  17. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  18. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  19. package/es/components/appointmentBooking/components/Form/index.js +76 -167
  20. package/es/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  21. package/es/components/appointmentBooking/components/Form/utils.js +36 -0
  22. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  23. package/es/components/appointmentBooking/components/Header/index.js +78 -46
  24. package/es/components/appointmentBooking/components/Resource/index.js +92 -115
  25. package/es/components/appointmentBooking/components/Services/index.js +19 -4
  26. package/es/components/appointmentBooking/components/TimeSlicing/index.js +20 -27
  27. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  28. package/es/components/appointmentBooking/context.js +50 -3
  29. package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
  30. package/es/components/appointmentBooking/hooks.d.ts +1 -2
  31. package/es/components/appointmentBooking/hooks.js +377 -269
  32. package/es/components/appointmentBooking/utils.d.ts +91 -2
  33. package/es/components/appointmentBooking/utils.js +350 -61
  34. package/es/components/booking/components/footer/amount.d.ts +24 -0
  35. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  36. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  37. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  38. package/es/components/booking/info/service/Lists.d.ts +0 -1
  39. package/es/components/booking/info/service/addService/index.d.ts +11 -0
  40. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  41. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  42. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  43. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  44. package/es/components/booking/info/service2/utils.d.ts +244 -0
  45. package/es/components/booking/info/utils.d.ts +50 -0
  46. package/es/components/booking/info2/service/addService/index.d.ts +12 -0
  47. package/es/components/booking/info2/service/editService/index.d.ts +7 -0
  48. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  49. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  50. package/es/components/booking/utils.d.ts +172 -0
  51. package/es/components/eftposPay/amount.d.ts +1 -1
  52. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  53. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  54. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  55. package/es/components/eftposPay/device.d.ts +1 -1
  56. package/es/components/eftposPay/hooks.d.ts +1 -1
  57. package/es/components/eftposPay/index.d.ts +1 -0
  58. package/es/components/eftposPay/pay.d.ts +1 -0
  59. package/es/components/eftposPay/store/index.d.ts +2 -2
  60. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  61. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  62. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  63. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  64. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  65. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  66. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  67. package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  68. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  69. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  70. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  72. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  73. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  74. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  75. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  76. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  77. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  78. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  79. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  80. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  81. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  82. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
  83. package/es/components/eventBooking/index.d.ts +0 -1
  84. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  85. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  86. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  87. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  88. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  89. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  90. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  91. package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
  92. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  93. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  94. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  95. package/es/components/productExtension/index.d.ts +0 -1
  96. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
  97. package/es/components/productSelect/components/productGroup/index.d.ts +11 -7
  98. package/es/components/productSelect/components/productGroup/index.js +32 -19
  99. package/es/components/productSelect/components/productGroup/index.less +17 -3
  100. package/es/components/productSelect/index.d.ts +3 -2
  101. package/es/components/productSelect/index.js +20 -6
  102. package/es/components/productSelect/index.less +7 -0
  103. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  104. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  105. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  106. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  107. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  108. package/es/components/shoppingCart/index.d.ts +0 -1
  109. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  110. package/es/components/ticketBooking/components/addServiceVariant/addService.js +11 -3
  111. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  112. package/es/components/ticketBooking/utils/index.d.ts +14 -0
  113. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
  114. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  115. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  116. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  117. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +0 -5
  118. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  119. package/lib/components/appointmentBooking/components/Cart/Item/index.js +35 -16
  120. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  121. package/lib/components/appointmentBooking/components/Content/index.js +37 -21
  122. package/lib/components/appointmentBooking/components/Date/index.js +0 -6
  123. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  124. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  125. package/lib/components/appointmentBooking/components/Form/index.js +56 -108
  126. package/lib/components/appointmentBooking/components/Form/utils.d.ts +8 -0
  127. package/lib/components/appointmentBooking/components/Form/utils.js +49 -0
  128. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  129. package/lib/components/appointmentBooking/components/Header/index.js +49 -19
  130. package/lib/components/appointmentBooking/components/Resource/index.js +51 -69
  131. package/lib/components/appointmentBooking/components/Services/index.js +16 -3
  132. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +1 -7
  133. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  134. package/lib/components/appointmentBooking/context.js +52 -4
  135. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
  136. package/lib/components/appointmentBooking/hooks.d.ts +1 -2
  137. package/lib/components/appointmentBooking/hooks.js +153 -57
  138. package/lib/components/appointmentBooking/utils.d.ts +91 -2
  139. package/lib/components/appointmentBooking/utils.js +210 -50
  140. package/lib/components/booking/components/footer/amount.d.ts +24 -0
  141. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  142. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  143. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  144. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  145. package/lib/components/booking/info/service/addService/index.d.ts +11 -0
  146. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  147. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  148. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  149. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  150. package/lib/components/booking/info/service2/utils.d.ts +244 -0
  151. package/lib/components/booking/info/utils.d.ts +50 -0
  152. package/lib/components/booking/info2/service/addService/index.d.ts +12 -0
  153. package/lib/components/booking/info2/service/editService/index.d.ts +7 -0
  154. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  155. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  156. package/lib/components/booking/utils.d.ts +172 -0
  157. package/lib/components/eftposPay/amount.d.ts +1 -1
  158. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  159. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  160. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  161. package/lib/components/eftposPay/device.d.ts +1 -1
  162. package/lib/components/eftposPay/hooks.d.ts +1 -1
  163. package/lib/components/eftposPay/index.d.ts +1 -0
  164. package/lib/components/eftposPay/pay.d.ts +1 -0
  165. package/lib/components/eftposPay/store/index.d.ts +2 -2
  166. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  167. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  168. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  169. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  170. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  171. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  172. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  173. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  174. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  175. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  176. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  177. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  178. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  179. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  180. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  181. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  182. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  183. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  184. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  185. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  186. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  187. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  188. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
  189. package/lib/components/eventBooking/index.d.ts +0 -1
  190. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  191. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  192. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  193. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  194. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  195. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  196. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  197. package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
  198. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  199. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  200. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  201. package/lib/components/productExtension/index.d.ts +0 -1
  202. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
  203. package/lib/components/productSelect/components/productGroup/index.d.ts +11 -7
  204. package/lib/components/productSelect/components/productGroup/index.js +12 -10
  205. package/lib/components/productSelect/components/productGroup/index.less +17 -3
  206. package/lib/components/productSelect/index.d.ts +3 -2
  207. package/lib/components/productSelect/index.js +17 -3
  208. package/lib/components/productSelect/index.less +7 -0
  209. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  210. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  211. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  212. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  213. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  214. package/lib/components/shoppingCart/index.d.ts +0 -1
  215. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  216. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +9 -1
  217. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  218. package/lib/components/ticketBooking/utils/index.d.ts +14 -0
  219. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
  220. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  221. package/lowcode/product-select/meta.ts +18 -34
  222. package/package.json +2 -2
@@ -101,7 +101,7 @@ export declare function updateLists<T extends Record<string, any>>(list: T[], ke
101
101
  * @Author: WangHan
102
102
  * @Date: 2025-04-27 17:27
103
103
  */
104
- export declare const updateBookingFormStorage: (bookingForm: any, id: number, newData: any) => any;
104
+ export declare const updateBookingFormStorage: (bookingForm: any, id: number | string, newData: any) => any;
105
105
  export declare const Toast: (text: string) => void;
106
106
  /**
107
107
  * @title: 添加或移除表单步骤
@@ -111,4 +111,93 @@ export declare const Toast: (text: string) => void;
111
111
  * @Author: WangHan
112
112
  * @Date: 2025-05-06 21:51
113
113
  */
114
- export declare const checkHasFormStep: ({ setIsErrorHolder, nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => true | undefined;
114
+ export declare const checkHasFormStep: ({ setIsErrorHolder, nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => void;
115
+ export declare const getCartCurrentResourceData: (cart: any, currentKey: any, resources: any[]) => any;
116
+ /**
117
+ * @title: 获取购物车资源列表
118
+ * @description:
119
+ * @return {*}
120
+ * @Author: WangHan
121
+ * @Date: 2025-05-25 13:56
122
+ */
123
+ export declare const getMultiResources: (cart: any, currentSelectedResource: any, currentKey: string) => any[];
124
+ export declare const getCurrentBoard: (appointmentBooking: any, code: string) => any;
125
+ /**
126
+ * @title:
127
+ * @description: 根据资源code获取资源标题
128
+ * @param {any} appointmentBooking
129
+ * @param {string} code
130
+ * @return {*}
131
+ * @Author: WangHan
132
+ * @Date: 2025-05-24 18:51
133
+ */
134
+ export declare const getResourceTitle: (appointmentBooking: any, code: string, utils: any, originResource: any) => string;
135
+ /**
136
+ * @title: 监测购物车中是否有没有选择资源的
137
+ * @description:
138
+ * @param {any} carts
139
+ * @return {*}
140
+ * @Author: WangHan
141
+ * @Date: 2025-05-24 18:47
142
+ */
143
+ export declare const checkAndMarkCartRenderError: (carts: any, appointmentBooking?: any, utils?: any) => {
144
+ hasError: boolean;
145
+ updatedCartList: any;
146
+ } | {
147
+ hasError?: undefined;
148
+ updatedCartList?: undefined;
149
+ };
150
+ /**
151
+ * @title: 查表表单步骤插入到哪个步骤的后面的key
152
+ * @description:
153
+ * @param {string} currentKey
154
+ * @param {any} stepList
155
+ * @return {*}
156
+ * @Author: WangHan
157
+ * @Date: 2025-05-24 19:05
158
+ */
159
+ export declare const getFormInsertBeforeKey: (currentKey: string, stepList: any[]) => any;
160
+ /**
161
+ * @title: 监测holder数据
162
+ * @description:
163
+ * @param {any} isFormSubject
164
+ * @param {any} checkAccount
165
+ * @param {any} carts
166
+ * @return {*}
167
+ * @Author: WangHan
168
+ * @Date: 2025-05-24 22:46
169
+ */
170
+ export declare const checkAndGoNext: (isFormSubject: any, checkAccount: any, carts: any[]) => {
171
+ hasError: boolean;
172
+ updatedCartList: any[];
173
+ };
174
+ export declare const currentAppointmentBoard: (currentKey: string, resources: any[], appointmentBooking: any) => {
175
+ isRequired: boolean;
176
+ isSystem: boolean;
177
+ isSkip: boolean;
178
+ form_id: number;
179
+ form_code: any;
180
+ cart_id: string;
181
+ resource_form_id: string;
182
+ policy_id: string;
183
+ } | {
184
+ isRequired?: undefined;
185
+ isSystem?: undefined;
186
+ isSkip?: undefined;
187
+ form_id?: undefined;
188
+ form_code?: undefined;
189
+ cart_id?: undefined;
190
+ resource_form_id?: undefined;
191
+ policy_id?: undefined;
192
+ };
193
+ export declare const currentRenderLists: (resources: any[], code: any) => any;
194
+ /**
195
+ * @title: 更新购物车
196
+ * @description:
197
+ * @param {any} carts
198
+ * @param {any} value
199
+ * @return {*}
200
+ * @Author: WangHan
201
+ * @Date: 2025-05-25 23:17
202
+ */
203
+ export declare const updateCartResources: (item: any, value?: any, currentSelectedResources?: any) => any;
@@ -20,7 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  var utils_exports = {};
21
21
  __export(utils_exports, {
22
22
  Toast: () => Toast,
23
+ checkAndGoNext: () => checkAndGoNext,
24
+ checkAndMarkCartRenderError: () => checkAndMarkCartRenderError,
23
25
  checkHasFormStep: () => checkHasFormStep,
26
+ currentAppointmentBoard: () => currentAppointmentBoard,
27
+ currentRenderLists: () => currentRenderLists,
24
28
  formatCarts: () => formatCarts,
25
29
  formatCartsResources: () => formatCartsResources,
26
30
  formatCurrentUser: () => formatCurrentUser,
@@ -28,13 +32,19 @@ __export(utils_exports, {
28
32
  formatForms: () => formatForms,
29
33
  formatGuest: () => formatGuest,
30
34
  formatHolder: () => formatHolder,
35
+ getCartCurrentResourceData: () => getCartCurrentResourceData,
36
+ getCurrentBoard: () => getCurrentBoard,
31
37
  getCustomer: () => getCustomer,
38
+ getFormInsertBeforeKey: () => getFormInsertBeforeKey,
32
39
  getMeAccount: () => getMeAccount,
40
+ getMultiResources: () => getMultiResources,
33
41
  getPunctuationMark: () => getPunctuationMark,
42
+ getResourceTitle: () => getResourceTitle,
34
43
  hasResourceFormId: () => hasResourceFormId,
35
44
  openForm: () => openForm,
36
45
  sortResources: () => sortResources,
37
46
  updateBookingFormStorage: () => updateBookingFormStorage,
47
+ updateCartResources: () => updateCartResources,
38
48
  updateLists: () => updateLists
39
49
  });
40
50
  module.exports = __toCommonJS(utils_exports);
@@ -276,69 +286,213 @@ var Toast = (text) => {
276
286
  var checkHasFormStep = ({ setIsErrorHolder, nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId: hasResourceFormId2, currentStep, stepList, appointmentBooking, locales: locales2, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }) => {
277
287
  var _a, _b, _c;
278
288
  let isNext = false;
279
- if (hasResourceFormId2) {
280
- const index = (currentStep == null ? void 0 : currentStep.index) + 1;
281
- const description = locales2.getText("pisell2.appointment.fill-form");
282
- const isExist = stepList == null ? void 0 : stepList.some((item) => (item == null ? void 0 : item.key) === "select-time");
283
- appointmentBooking.addStep({ index, key: "fill-form", description }, isExist ? "select-time" : void 0);
284
- } else {
285
- appointmentBooking.removeStep("fill-form");
286
- }
287
289
  const stepLists = (_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList;
288
- if ((currentStep == null ? void 0 : currentStep.index) + 2 === (stepLists == null ? void 0 : stepLists.length)) {
289
- const _checkHolder = () => {
290
- const result = checkHolder({
291
- isFormSubject,
292
- checkAccount,
293
- carts
294
- });
295
- if (result) {
296
- setCarts(result);
297
- }
298
- setIsErrorHolder(!!result);
299
- if (!!result) return true;
290
+ };
291
+ var getCartCurrentResourceData = (cart, currentKey, resources) => {
292
+ var _a, _b, _c, _d, _e, _f, _g;
293
+ try {
294
+ const currentFormId = (_b = (_a = currentKey == null ? void 0 : currentKey.split("_@")) == null ? void 0 : _a[1]) == null ? void 0 : _b.split("-");
295
+ const form_id = Number((currentFormId == null ? void 0 : currentFormId[0]) || ((_e = (_d = (_c = resources == null ? void 0 : resources[0]) == null ? void 0 : _c.resources) == null ? void 0 : _d[0]) == null ? void 0 : _e.id));
296
+ if (!form_id || !resources.length) return;
297
+ const cartId = cart._id;
298
+ const cartOriginResources = ((_f = cart._origin) == null ? void 0 : _f.resources) || [];
299
+ const resourceData = resources.find((r) => String(r._id) === String(cartId));
300
+ if (!resourceData) return;
301
+ let resourceItem = (resourceData.resources || []).find((r) => Number(r.id) === form_id);
302
+ if (!resourceItem) return;
303
+ resourceItem = {
304
+ ...resourceItem,
305
+ renderList: ((_g = resourceItem == null ? void 0 : resourceItem.renderList) == null ? void 0 : _g.map((r) => {
306
+ return {
307
+ ...r,
308
+ label: (r == null ? void 0 : r.main_field) || (r == null ? void 0 : r.id)
309
+ };
310
+ })) || []
300
311
  };
301
- if (!isLogin) {
302
- utils.action({
303
- type: "pisell1.login",
304
- data: {
305
- type: "plugin"
306
- },
307
- callback: (status) => {
308
- var _a2;
309
- if (status === "success") {
310
- if (!isFormSubject) {
311
- const user = JSON.parse(((_a2 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a2.get("customer")) || "{}");
312
- const currentUser = formatCustomer(user);
313
- const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
314
- appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
315
- } else {
316
- getHolders();
317
- }
318
- if (isSkip) {
319
- isNext = true;
312
+ const cartResource = cartOriginResources.find((r) => Number(r.form_id) === form_id);
313
+ const renderId = (cartResource == null ? void 0 : cartResource.id) || 0;
314
+ const renderItem = ((resourceItem == null ? void 0 : resourceItem.renderList) || []).find((r) => Number(r == null ? void 0 : r.id) === Number(renderId));
315
+ return {
316
+ cartItem: cart,
317
+ resourceItem: {
318
+ ...resourceItem,
319
+ originRenderLists: resourceData.resources
320
+ },
321
+ renderItem
322
+ };
323
+ } catch (error) {
324
+ return cart;
325
+ }
326
+ };
327
+ var getMultiResources = (cart, currentSelectedResource, currentKey) => {
328
+ var _a;
329
+ const resourceItem = currentSelectedResource == null ? void 0 : currentSelectedResource.resourceItem;
330
+ if (!resourceItem || !cart) return [];
331
+ const isCurrentResourceStep = currentKey.startsWith("select-resource");
332
+ let resources = ((_a = cart == null ? void 0 : cart._origin) == null ? void 0 : _a.resources) || [];
333
+ let selectedResources = isCurrentResourceStep ? resources.filter((r) => (r == null ? void 0 : r.form_id) !== (resourceItem == null ? void 0 : resourceItem.form_id)) : resources;
334
+ selectedResources = selectedResources.map((r) => {
335
+ return {
336
+ ...r,
337
+ name: (r == null ? void 0 : r.main_field) || (r == null ? void 0 : r.id),
338
+ isShowChangeResource: false,
339
+ is_hide_like: true
340
+ };
341
+ });
342
+ let currentResources = resources.find((r) => (r == null ? void 0 : r.form_id) === (resourceItem == null ? void 0 : resourceItem.form_id));
343
+ const errorTip = (currentSelectedResource == null ? void 0 : currentSelectedResource.errorTip) || {};
344
+ let currentResource = isCurrentResourceStep ? [{
345
+ allowClearResource: true,
346
+ lists: (resourceItem == null ? void 0 : resourceItem.renderList) || [],
347
+ is_hide_like: true,
348
+ id: currentResources == null ? void 0 : currentResources.id,
349
+ isErrorResource: (errorTip == null ? void 0 : errorTip.isErrorResource) || false,
350
+ resourceErrorText: (errorTip == null ? void 0 : errorTip.resourceErrorText) || ""
351
+ }] : [];
352
+ return [...selectedResources, ...currentResource];
353
+ };
354
+ var getCurrentBoard = (appointmentBooking, code) => {
355
+ var _a;
356
+ const { appointmentBoard } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
357
+ const resourceConfig = (_a = appointmentBoard == null ? void 0 : appointmentBoard.resource_tab) == null ? void 0 : _a[code];
358
+ return resourceConfig;
359
+ };
360
+ var getResourceTitle = (appointmentBooking, code, utils, originResource) => {
361
+ const resourceConfig = getCurrentBoard(appointmentBooking, code);
362
+ let name = "";
363
+ if (resourceConfig == null ? void 0 : resourceConfig.resource_type_title) {
364
+ name = utils.translation(resourceConfig == null ? void 0 : resourceConfig.resource_type_title);
365
+ } else {
366
+ name = (originResource == null ? void 0 : originResource.title) || "";
367
+ }
368
+ return name;
369
+ };
370
+ var checkAndMarkCartRenderError = (carts, appointmentBooking, utils) => {
371
+ try {
372
+ let hasError = false;
373
+ const updatedCartList = carts == null ? void 0 : carts.map((cart) => {
374
+ const currentResource = cart == null ? void 0 : cart.currentSelectedResource;
375
+ if (!(currentResource == null ? void 0 : currentResource.renderItem)) {
376
+ hasError = true;
377
+ const resourceItem = (currentResource == null ? void 0 : currentResource.resourceItem) || {};
378
+ const name = getResourceTitle(appointmentBooking, resourceItem == null ? void 0 : resourceItem.code, utils, resourceItem);
379
+ return {
380
+ ...cart,
381
+ currentSelectedResource: {
382
+ ...currentResource,
383
+ errorTip: {
384
+ isErrorResource: true,
385
+ resourceErrorText: name
320
386
  }
321
387
  }
322
- }
323
- });
324
- } else {
325
- isNext = true;
326
- }
327
- if (isNext && !_checkHolder()) {
328
- nextStep();
388
+ };
389
+ }
390
+ return cart;
391
+ });
392
+ return {
393
+ hasError,
394
+ updatedCartList
395
+ };
396
+ } catch (error) {
397
+ return {};
398
+ }
399
+ };
400
+ var getFormInsertBeforeKey = (currentKey, stepList) => {
401
+ const isFirstResource = currentKey === "select-resource";
402
+ const timeStep = stepList.find((item) => item.key.startsWith("select-time"));
403
+ if (isFirstResource && timeStep) {
404
+ return timeStep.key;
405
+ } else {
406
+ return currentKey;
407
+ }
408
+ };
409
+ var checkAndGoNext = (isFormSubject, checkAccount, carts) => {
410
+ let hasError = false;
411
+ let updatedCartList = [...carts];
412
+ if (isFormSubject && !checkAccount("holder")) {
413
+ updatedCartList = carts == null ? void 0 : carts.map((item) => {
414
+ if (!(item == null ? void 0 : item.holder_id)) {
415
+ hasError = true;
416
+ return {
417
+ ...item,
418
+ isErrorHolder: true
419
+ };
420
+ }
421
+ return item;
422
+ });
423
+ }
424
+ return {
425
+ hasError,
426
+ updatedCartList
427
+ };
428
+ };
429
+ var currentAppointmentBoard = (currentKey, resources, appointmentBooking) => {
430
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
431
+ try {
432
+ const currentStepKey = (_b = (_a = currentKey == null ? void 0 : currentKey.split("_@")) == null ? void 0 : _a[1]) == null ? void 0 : _b.split("-");
433
+ const form_id = Number((currentStepKey == null ? void 0 : currentStepKey[0]) || ((_e = (_d = (_c = resources == null ? void 0 : resources[0]) == null ? void 0 : _c.resources) == null ? void 0 : _d[0]) == null ? void 0 : _e.id));
434
+ const form_code = (currentStepKey == null ? void 0 : currentStepKey[1]) || ((_h = (_g = (_f = resources == null ? void 0 : resources[0]) == null ? void 0 : _f.resources) == null ? void 0 : _g[0]) == null ? void 0 : _h.code);
435
+ const cart_id = currentStepKey == null ? void 0 : currentStepKey[2];
436
+ const resource_form_id = currentStepKey == null ? void 0 : currentStepKey[3];
437
+ const policy_id = currentStepKey == null ? void 0 : currentStepKey[4];
438
+ const resource_tab = (_j = (_i = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _i.appointmentBoard) == null ? void 0 : _j.resource_tab;
439
+ const config = resource_tab == null ? void 0 : resource_tab[form_code];
440
+ const isRequired = (config == null ? void 0 : config.customer_resource) === "customer_resource_required";
441
+ const isSystem = (config == null ? void 0 : config.customer_resource) === "customer_resource_system";
442
+ const isSkip = (config == null ? void 0 : config.hasOwnProperty("resource_skip_select")) ? !!(config == null ? void 0 : config.resource_skip_select) : true;
443
+ return {
444
+ isRequired,
445
+ isSystem,
446
+ isSkip,
447
+ form_id,
448
+ form_code,
449
+ cart_id,
450
+ resource_form_id,
451
+ policy_id
452
+ };
453
+ } catch (error) {
454
+ return {};
455
+ }
456
+ };
457
+ var currentRenderLists = (resources, code) => {
458
+ var _a;
459
+ if (!(resources == null ? void 0 : resources.length) || !code) return [];
460
+ const _resources = ((_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) || [];
461
+ const currentResource = _resources == null ? void 0 : _resources.find((item) => item.code === code);
462
+ return (currentResource == null ? void 0 : currentResource.renderList) || [];
463
+ };
464
+ var updateCartResources = (item, value, currentSelectedResources) => {
465
+ var _a, _b, _c;
466
+ let newResource = [];
467
+ let resources = ((_a = item == null ? void 0 : item._origin) == null ? void 0 : _a.resources) || [];
468
+ if (value) {
469
+ const currentResourceIndex = resources.findIndex(
470
+ (item2) => item2.form_id === value.form_id
471
+ );
472
+ if (currentResourceIndex > -1) {
473
+ newResource = resources.map(
474
+ (item2) => item2.form_id === value.form_id ? value : item2
475
+ );
329
476
  } else {
330
- return true;
477
+ newResource = [...resources, value];
331
478
  }
332
479
  } else {
333
- if (isSkip) {
334
- nextStep();
335
- }
480
+ const currentResource = currentSelectedResources == null ? void 0 : currentSelectedResources.find(
481
+ (resource) => (resource == null ? void 0 : resource._id) === (item == null ? void 0 : item._id)
482
+ );
483
+ const form_id = (_c = (_b = currentResource == null ? void 0 : currentResource.currentSelectedResource) == null ? void 0 : _b.renderItem) == null ? void 0 : _c.form_id;
484
+ newResource = resources.filter((item2) => item2.form_id !== form_id);
336
485
  }
486
+ return newResource || [];
337
487
  };
338
488
  // Annotate the CommonJS export names for ESM import in node:
339
489
  0 && (module.exports = {
340
490
  Toast,
491
+ checkAndGoNext,
492
+ checkAndMarkCartRenderError,
341
493
  checkHasFormStep,
494
+ currentAppointmentBoard,
495
+ currentRenderLists,
342
496
  formatCarts,
343
497
  formatCartsResources,
344
498
  formatCurrentUser,
@@ -346,12 +500,18 @@ var checkHasFormStep = ({ setIsErrorHolder, nextStep, isSkip, checkHolder, check
346
500
  formatForms,
347
501
  formatGuest,
348
502
  formatHolder,
503
+ getCartCurrentResourceData,
504
+ getCurrentBoard,
349
505
  getCustomer,
506
+ getFormInsertBeforeKey,
350
507
  getMeAccount,
508
+ getMultiResources,
351
509
  getPunctuationMark,
510
+ getResourceTitle,
352
511
  hasResourceFormId,
353
512
  openForm,
354
513
  sortResources,
355
514
  updateBookingFormStorage,
515
+ updateCartResources,
356
516
  updateLists
357
517
  });
@@ -0,0 +1,24 @@
1
+ export declare const getRelationDetailsTotal: (relation_details: any) => number;
2
+ export declare const is_price_include_tax: (state: any) => any;
3
+ /**
4
+ * 总金额
5
+ * @param state
6
+ * @returns
7
+ */
8
+ export declare const getSumTotal: (state: any, isEdit: boolean) => {
9
+ productAmount: number;
10
+ duration: string;
11
+ tax: number;
12
+ shopDiscount: number;
13
+ otherAmount: number;
14
+ sumTotalAmount: number;
15
+ paidAmount: number;
16
+ notPaidAmount: number;
17
+ paySurchargeFee: number;
18
+ expectAmount: number;
19
+ actualPaidAmount: number;
20
+ orderPaidAmount: number;
21
+ totalRefundAmount: number;
22
+ dueAmount: number;
23
+ roundingAmount: number;
24
+ };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SendModalValues } from './index';
3
2
  declare const useSendModal: (bookingId?: number) => {
4
3
  open: boolean;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useClearCart: (state: any, dispatch: any) => false | JSX.Element;
3
2
  export default useClearCart;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
3
2
  export default Lists;
@@ -0,0 +1,11 @@
1
+ import { PisellDrawerProps } from '../../../components/drawer';
2
+ import './index.less';
3
+ interface AddServiceProps {
4
+ onEdit?: any;
5
+ dispatch?: any;
6
+ state?: any;
7
+ drawerProps?: PisellDrawerProps;
8
+ renderMode?: 'current' | 'drawer';
9
+ }
10
+ declare const Info: (props: AddServiceProps) => JSX.Element;
11
+ export default Info;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;