@pisell/private-materials 3.2.38 → 3.3.0
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +245 -114
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +5 -4
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
- package/es/components/appointmentBooking/components/Cart/Item/index.js +98 -17
- package/es/components/appointmentBooking/components/Cart/Item/index.less +21 -12
- package/es/components/appointmentBooking/components/Cart/index.js +2 -7
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
- package/es/components/appointmentBooking/components/Cart/utils.js +408 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +76 -9
- package/es/components/appointmentBooking/components/Content/index.less +21 -0
- package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Date/index.js +131 -38
- package/es/components/appointmentBooking/components/Date/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
- package/es/components/appointmentBooking/components/Deposit/index.less +17 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Footer/index.js +8 -2
- package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Form/index.js +200 -0
- package/es/components/appointmentBooking/components/Form/index.less +3 -0
- package/es/components/appointmentBooking/components/Guest/index.js +1 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +53 -19
- package/es/components/appointmentBooking/components/Resource/index.js +67 -12
- package/es/components/appointmentBooking/components/Services/index.js +213 -75
- package/es/components/appointmentBooking/components/Services/index.less +0 -14
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +10 -5
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
- package/es/components/appointmentBooking/components/Voucher/index.js +19 -6
- package/es/components/appointmentBooking/components/Voucher/index.less +93 -2
- package/es/components/appointmentBooking/context.d.ts +4 -4
- package/es/components/appointmentBooking/context.js +42 -33
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/index.js +101 -0
- package/es/components/appointmentBooking/deposit/index.less +57 -0
- package/es/components/appointmentBooking/hooks.d.ts +29 -1
- package/es/components/appointmentBooking/hooks.js +382 -114
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.js +9 -4
- package/es/components/appointmentBooking/locales.d.ts +51 -3
- package/es/components/appointmentBooking/locales.js +58 -4
- package/es/components/appointmentBooking/utils.d.ts +66 -1
- package/es/components/appointmentBooking/utils.js +226 -33
- package/es/components/booking/addons/index.js +10 -6
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +90 -72
- package/es/components/booking/components/footer/utils.d.ts +11 -0
- package/es/components/booking/components/footer/utils.js +72 -44
- package/es/components/booking/components/voucher/index.js +22 -6
- package/es/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
- package/es/components/booking/info/hooks/useAddHolder.d.ts +2 -0
- package/es/components/booking/info/hooks/useAddHolder.js +70 -0
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +40 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +99 -0
- package/es/components/booking/info/index.js +9 -2
- package/es/components/booking/info/main.js +1 -1
- package/es/components/booking/info/pet/index.js +18 -17
- package/es/components/booking/info/service/Lists.d.ts +2 -0
- package/es/components/booking/info/service/Lists.js +119 -0
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.js +7 -5
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.js +7 -5
- package/es/components/booking/info/service/index.js +2 -2
- package/es/components/booking/info/service/serviceList/index.js +1 -0
- package/es/components/booking/info/service/serviceManager/index.js +12 -7
- package/es/components/booking/info/service2/Group/utils.js +2 -1
- package/es/components/booking/info/service2/hooks/useSelectPet.js +13 -5
- package/es/components/booking/info/service2/utils.d.ts +5 -4
- package/es/components/booking/info/service2/utils.js +356 -88
- package/es/components/booking/info/utils.d.ts +2 -0
- package/es/components/booking/info/utils.js +45 -1
- package/es/components/booking/info2/index.js +9 -6
- package/es/components/booking/info2/serve.d.ts +2 -2
- package/es/components/booking/info2/serve.js +8 -15
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.js +13 -8
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +49 -14
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.js +1 -1
- package/es/components/booking/info2/service/editService/Resources/index.js +6 -5
- package/es/components/booking/info2/service/editService/index.js +4 -3
- package/es/components/booking/info2/service/index.js +18 -37
- package/es/components/booking/info2/utils.d.ts +4 -0
- package/es/components/booking/info2/utils.js +43 -0
- package/es/components/booking/info2/utilsByBooking.js +17 -4
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.js +2 -2
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.js +1 -1
- package/es/components/booking/notes/addNote/index.less +3 -0
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +20 -8
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/es/components/productSelect/components/TabProduct/index.js +176 -0
- package/es/components/productSelect/components/gridLayout/index.d.ts +9 -0
- package/es/components/productSelect/components/gridLayout/index.js +28 -0
- package/es/components/productSelect/components/gridLayout/index.less +6 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +34 -0
- package/es/components/productSelect/components/productGroup/index.js +145 -0
- package/es/components/productSelect/components/productGroup/index.less +208 -0
- package/es/components/productSelect/hooks/useToken.d.ts +18 -0
- package/es/components/productSelect/hooks/useToken.js +35 -0
- package/es/components/productSelect/index.d.ts +23 -0
- package/es/components/productSelect/index.js +93 -0
- package/es/components/productSelect/index.less +69 -0
- package/es/components/productSelect/locales.d.ts +18 -0
- package/es/components/productSelect/locales.js +17 -0
- package/es/components/productSelect/mock.d.ts +134 -0
- package/es/components/productSelect/mock.js +202 -0
- package/es/components/productSelect/theme/token.d.ts +17 -0
- package/es/components/productSelect/theme/token.js +19 -0
- package/es/components/shoppingCart/Provider.d.ts +1 -1
- package/es/components/shoppingCart/Provider.js +3 -1
- package/es/components/shoppingCart/components/Cart/Product.js +15 -3
- package/es/components/shoppingCart/components/Cart/index.less +15 -15
- package/es/components/shoppingCart/components/Render/index.less +15 -0
- package/es/components/shoppingCart/hooks/useAddService.js +7 -1
- package/es/components/shoppingCart/index.d.ts +1 -2
- package/es/components/shoppingCart/index.js +3 -1
- package/es/components/shoppingCart/status.js +4 -1
- package/es/components/shoppingCart/type.d.ts +5 -0
- package/es/components/subTotal/index.d.ts +22 -0
- package/es/components/subTotal/index.js +234 -0
- package/es/components/subTotal/index.less +70 -0
- package/es/components/subTotal/locales.d.ts +42 -0
- package/es/components/subTotal/locales.js +41 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +410 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.js +28 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/es/components/ticketBooking/components/menuBar/index.js +54 -0
- package/es/components/ticketBooking/components/menuBar/index.less +84 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +815 -0
- package/es/components/ticketBooking/components/ticketBooking/index.less +18 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +11 -0
- package/es/components/ticketBooking/components/timeBar/index.js +113 -0
- package/es/components/ticketBooking/components/timeBar/index.less +22 -0
- package/es/components/ticketBooking/data.d.ts +58 -0
- package/es/components/ticketBooking/data.js +58 -58
- package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
- package/es/components/ticketBooking/hooks/useNetworkStatus.js +52 -0
- package/es/components/ticketBooking/index.d.ts +3 -3
- package/es/components/ticketBooking/index.js +139 -5
- package/es/components/ticketBooking/index.less +4 -0
- package/es/components/ticketBooking/locales.d.ts +144 -0
- package/es/components/ticketBooking/locales.js +143 -0
- package/es/components/ticketBooking/miniRedux.d.ts +22 -0
- package/es/components/ticketBooking/miniRedux.js +105 -0
- package/es/components/ticketBooking/serve.d.ts +282 -0
- package/es/components/ticketBooking/serve.js +957 -0
- package/es/components/ticketBooking/utils/index.d.ts +14 -0
- package/es/components/ticketBooking/utils/index.js +102 -0
- package/es/components/wallet/components/WalletCard.js +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +132 -73
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +59 -14
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +21 -12
- package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
- package/lib/components/appointmentBooking/components/Cart/utils.js +273 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +46 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +59 -5
- package/lib/components/appointmentBooking/components/Content/index.less +21 -0
- package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Date/index.js +47 -19
- package/lib/components/appointmentBooking/components/Date/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
- package/lib/components/appointmentBooking/components/Deposit/index.less +17 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Footer/index.js +8 -2
- package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Form/index.js +157 -0
- package/lib/components/appointmentBooking/components/Form/index.less +3 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +1 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +31 -13
- package/lib/components/appointmentBooking/components/Resource/index.js +36 -14
- package/lib/components/appointmentBooking/components/Services/index.js +86 -63
- package/lib/components/appointmentBooking/components/Services/index.less +0 -14
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +13 -5
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
- package/lib/components/appointmentBooking/components/Voucher/index.js +21 -6
- package/lib/components/appointmentBooking/components/Voucher/index.less +93 -2
- package/lib/components/appointmentBooking/context.d.ts +4 -4
- package/lib/components/appointmentBooking/context.js +15 -10
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/index.js +109 -0
- package/lib/components/appointmentBooking/deposit/index.less +57 -0
- package/lib/components/appointmentBooking/hooks.d.ts +29 -1
- package/lib/components/appointmentBooking/hooks.js +148 -22
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.js +6 -4
- package/lib/components/appointmentBooking/locales.d.ts +51 -3
- package/lib/components/appointmentBooking/locales.js +52 -4
- package/lib/components/appointmentBooking/utils.d.ts +66 -1
- package/lib/components/appointmentBooking/utils.js +158 -33
- package/lib/components/booking/addons/index.js +9 -5
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +94 -32
- package/lib/components/booking/components/footer/utils.d.ts +11 -0
- package/lib/components/booking/components/footer/utils.js +38 -14
- package/lib/components/booking/components/voucher/index.js +18 -2
- package/lib/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
- package/lib/components/booking/info/hooks/useAddHolder.d.ts +2 -0
- package/lib/components/booking/info/hooks/useAddHolder.js +73 -0
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +59 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +106 -0
- package/lib/components/booking/info/index.js +5 -1
- package/lib/components/booking/info/main.js +1 -1
- package/lib/components/booking/info/pet/index.js +3 -2
- package/lib/components/booking/info/service/Lists.d.ts +2 -0
- package/lib/components/booking/info/service/Lists.js +106 -0
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.js +6 -4
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.js +5 -3
- package/lib/components/booking/info/service/index.js +1 -1
- package/lib/components/booking/info/service/serviceList/index.js +1 -0
- package/lib/components/booking/info/service/serviceManager/index.js +6 -1
- package/lib/components/booking/info/service2/Group/utils.js +2 -1
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +13 -6
- package/lib/components/booking/info/service2/utils.d.ts +5 -4
- package/lib/components/booking/info/service2/utils.js +304 -30
- package/lib/components/booking/info/utils.d.ts +2 -0
- package/lib/components/booking/info/utils.js +40 -1
- package/lib/components/booking/info2/index.js +6 -1
- package/lib/components/booking/info2/serve.d.ts +2 -2
- package/lib/components/booking/info2/serve.js +3 -10
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.js +11 -6
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +50 -17
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.js +2 -2
- package/lib/components/booking/info2/service/editService/Resources/index.js +5 -3
- package/lib/components/booking/info2/service/editService/index.js +3 -1
- package/lib/components/booking/info2/service/index.js +18 -28
- package/lib/components/booking/info2/utils.d.ts +4 -0
- package/lib/components/booking/info2/utils.js +65 -0
- package/lib/components/booking/info2/utilsByBooking.js +12 -3
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.js +2 -2
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.js +1 -1
- package/lib/components/booking/notes/addNote/index.less +3 -0
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +25 -10
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
- package/lib/components/productSelect/components/TabProduct/index.js +172 -0
- package/lib/components/productSelect/components/gridLayout/index.d.ts +9 -0
- package/lib/components/productSelect/components/gridLayout/index.js +58 -0
- package/lib/components/productSelect/components/gridLayout/index.less +6 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +34 -0
- package/lib/components/productSelect/components/productGroup/index.js +122 -0
- package/lib/components/productSelect/components/productGroup/index.less +208 -0
- package/lib/components/productSelect/hooks/useToken.d.ts +18 -0
- package/lib/components/productSelect/hooks/useToken.js +51 -0
- package/lib/components/productSelect/index.d.ts +23 -0
- package/lib/components/productSelect/index.js +119 -0
- package/lib/components/productSelect/index.less +69 -0
- package/lib/components/productSelect/locales.d.ts +18 -0
- package/lib/components/productSelect/locales.js +41 -0
- package/lib/components/productSelect/mock.d.ts +134 -0
- package/lib/components/productSelect/mock.js +276 -0
- package/lib/components/productSelect/theme/token.d.ts +17 -0
- package/lib/components/productSelect/theme/token.js +47 -0
- package/lib/components/shoppingCart/Provider.d.ts +1 -1
- package/lib/components/shoppingCart/Provider.js +3 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
- package/lib/components/shoppingCart/components/Cart/index.less +15 -15
- package/lib/components/shoppingCart/components/Render/index.less +15 -0
- package/lib/components/shoppingCart/hooks/useAddService.js +1 -2
- package/lib/components/shoppingCart/index.d.ts +1 -2
- package/lib/components/shoppingCart/index.js +2 -0
- package/lib/components/shoppingCart/status.js +4 -1
- package/lib/components/shoppingCart/type.d.ts +5 -0
- package/lib/components/subTotal/index.d.ts +22 -0
- package/lib/components/subTotal/index.js +175 -0
- package/lib/components/subTotal/index.less +70 -0
- package/lib/components/subTotal/locales.d.ts +42 -0
- package/lib/components/subTotal/locales.js +65 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +318 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +56 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +87 -0
- package/lib/components/ticketBooking/components/menuBar/index.less +84 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +769 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.less +18 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +11 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +148 -0
- package/lib/components/ticketBooking/components/timeBar/index.less +22 -0
- package/lib/components/ticketBooking/data.d.ts +58 -0
- package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
- package/lib/components/ticketBooking/hooks/useNetworkStatus.js +80 -0
- package/lib/components/ticketBooking/index.d.ts +3 -3
- package/lib/components/ticketBooking/index.js +159 -3
- package/lib/components/ticketBooking/index.less +4 -0
- package/lib/components/ticketBooking/locales.d.ts +144 -0
- package/lib/components/ticketBooking/locales.js +167 -0
- package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
- package/lib/components/ticketBooking/miniRedux.js +96 -0
- package/lib/components/ticketBooking/serve.d.ts +282 -0
- package/lib/components/ticketBooking/serve.js +214 -0
- package/lib/components/ticketBooking/utils/index.d.ts +14 -0
- package/lib/components/ticketBooking/utils/index.js +131 -0
- package/lib/components/wallet/components/WalletCard.js +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/lowcode/appointment-deposit/meta.ts +58 -0
- package/lowcode/product-select/meta.ts +217 -0
- package/lowcode/sub-total/meta.ts +134 -0
- package/lowcode/ticket-booking/meta.ts +29 -0
- package/package.json +2 -2
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -115
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -109
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
|
@@ -36,7 +36,7 @@ var locales_default = {
|
|
|
36
36
|
"pisell2.event.close.tip": "All entered information will be lost. Are you sure you want to exit?",
|
|
37
37
|
"pisell2.event.close.continue": "Continue",
|
|
38
38
|
"pisell2.event.close.exit": "Exit",
|
|
39
|
-
"pisell2.
|
|
39
|
+
"pisell2.appointment.step": (step) => `Step ${step}`,
|
|
40
40
|
"pisell2.event.select.category": (val) => `Select ${val || "resource"}`,
|
|
41
41
|
"pisell2.event.select.campus": (val) => `Please select ${val || "resource"}`,
|
|
42
42
|
"pisell2.event.select.event": "Select service",
|
|
@@ -94,6 +94,7 @@ var locales_default = {
|
|
|
94
94
|
"pisell2.event.capacity.limit.reached.title": "Capacity limit reached",
|
|
95
95
|
"pisell2.event.capacity.limit.reached.tip": "One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.",
|
|
96
96
|
"pisell2.appointment.booking.empty.service": "No service",
|
|
97
|
+
"pisell2.appointment.booking.empty.data": "No data",
|
|
97
98
|
"pisell2.appointment.booking.empty.time": "No time",
|
|
98
99
|
"pisell2.appointment.service.title": (val) => `${val} ${val > 1 ? "services" : "service"}`,
|
|
99
100
|
"pisell2.appointment.add.guest": "Add guest",
|
|
@@ -109,8 +110,23 @@ var locales_default = {
|
|
|
109
110
|
"pisell2.appointment.friday": "Fri",
|
|
110
111
|
"pisell2.appointment.saturday": "Sat",
|
|
111
112
|
"pisell2.appointment.sunday": "Sun",
|
|
112
|
-
"pisell2.appointment.any.professional": "
|
|
113
|
+
"pisell2.appointment.any.professional": "No preference",
|
|
113
114
|
"pisell2.appointment.for.maximum.availability": "for maximum availability",
|
|
115
|
+
"pisell2.appointment.deposit": "Deposit",
|
|
116
|
+
"pisell2.appointment.deposit.agreed": "I have read and agree to the ",
|
|
117
|
+
"pisell2.appointment.deposit.agree.policy": "You need to agree the policy to proceed",
|
|
118
|
+
"pisell2.appointment.deposit.and": " & ",
|
|
119
|
+
"pisell2.appointment.deposit.amount.tip1": " needs to be paid as deposit.",
|
|
120
|
+
"pisell2.appointment.deposit.amount.tip2": " ",
|
|
121
|
+
"pisell2.appointment.deposit.close": "Close",
|
|
122
|
+
"pisell2.appointment.tips": "Tips",
|
|
123
|
+
"pisell2.appointment.tips.content": `Please carefully review the items in your shopping cart and click the "Checkout" button below to proceed with the payment.`,
|
|
124
|
+
"pisell2.appointment.fill-form": "Enter your details",
|
|
125
|
+
"pisell2.appointment.select.holder": (val) => `Please select ${val}`,
|
|
126
|
+
"pisell2.appointment.select.time": "Select time",
|
|
127
|
+
"pisell2.appointment.unselect.time": "No times available. Go back",
|
|
128
|
+
"pisell2.appointment.unselect.date": "Please select date",
|
|
129
|
+
"pisell2.appointment.add-guests": "Add guests",
|
|
114
130
|
"pisell2.text.apply": "Apply",
|
|
115
131
|
"pisell2.text.goodpass": "GoodPass",
|
|
116
132
|
"pisell2.text.goodpass.product-vouchers": "Product Vouchers",
|
|
@@ -134,7 +150,7 @@ var locales_default = {
|
|
|
134
150
|
"pisell2.event.close.tip": "退出后将丢失所有已填写的信息,确定要退出吗?",
|
|
135
151
|
"pisell2.event.close.continue": "继续",
|
|
136
152
|
"pisell2.event.close.exit": "退出",
|
|
137
|
-
"pisell2.
|
|
153
|
+
"pisell2.appointment.step": (step) => `步骤 ${step}`,
|
|
138
154
|
"pisell2.event.select.category": (val) => `选择${val || "资源"}`,
|
|
139
155
|
"pisell2.event.select.event": "选择服务",
|
|
140
156
|
"pisell2.event.select.campus": (val) => `请选择${val || "资源"}`,
|
|
@@ -192,6 +208,7 @@ var locales_default = {
|
|
|
192
208
|
"pisell2.event.capacity.limit.reached.title": "活动名额已满",
|
|
193
209
|
"pisell2.event.capacity.limit.reached.tip": "购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。",
|
|
194
210
|
"pisell2.appointment.booking.empty.service": "暂无服务",
|
|
211
|
+
"pisell2.appointment.booking.empty.data": "暂无数据",
|
|
195
212
|
"pisell2.appointment.booking.empty.time": "暂无时间",
|
|
196
213
|
"pisell2.appointment.service.title": (val) => `${val}个服务`,
|
|
197
214
|
"pisell2.appointment.add.guest": "添加预约人",
|
|
@@ -209,6 +226,21 @@ var locales_default = {
|
|
|
209
226
|
"pisell2.appointment.sunday": "周日",
|
|
210
227
|
"pisell2.appointment.any.professional": "随机分配",
|
|
211
228
|
"pisell2.appointment.for.maximum.availability": "立即匹配",
|
|
229
|
+
"pisell2.appointment.deposit": "定金",
|
|
230
|
+
"pisell2.appointment.deposit.agreed": "我已阅读并同意 ",
|
|
231
|
+
"pisell2.appointment.deposit.agree.policy": "您需要同意协议才能继续",
|
|
232
|
+
"pisell2.appointment.deposit.and": " 和 ",
|
|
233
|
+
"pisell2.appointment.deposit.amount.tip1": "请支付 ",
|
|
234
|
+
"pisell2.appointment.deposit.amount.tip2": " 定金。",
|
|
235
|
+
"pisell2.appointment.deposit.close": "关闭",
|
|
236
|
+
"pisell2.appointment.tips": "提示",
|
|
237
|
+
"pisell2.appointment.tips.content": `请仔细查看购物车中的商品,然后点击下面的“结算”按钮继续付款。`,
|
|
238
|
+
"pisell2.appointment.fill-form": "填写信息",
|
|
239
|
+
"pisell2.appointment.select.holder": (val) => `请选择${val}`,
|
|
240
|
+
"pisell2.appointment.select.time": "选择时间",
|
|
241
|
+
"pisell2.appointment.unselect.time": "无可用时间,请返回",
|
|
242
|
+
"pisell2.appointment.unselect.date": "请选择日期",
|
|
243
|
+
"pisell2.appointment.add-guests": "添加预约人",
|
|
212
244
|
"pisell2.text.apply": "应用",
|
|
213
245
|
"pisell2.text.goodpass": "商品券",
|
|
214
246
|
"pisell2.text.goodpass.product-vouchers": "商品兑换券",
|
|
@@ -232,7 +264,7 @@ var locales_default = {
|
|
|
232
264
|
"pisell2.event.close.tip": "退出後將丟失所有已填寫的信息,確定要退出嗎?",
|
|
233
265
|
"pisell2.event.close.continue": "繼續",
|
|
234
266
|
"pisell2.event.close.exit": "退出",
|
|
235
|
-
"pisell2.
|
|
267
|
+
"pisell2.appointment.step": (step) => `步驟 ${step}`,
|
|
236
268
|
"pisell2.event.select.category": (val) => `選擇${val || "資源"}`,
|
|
237
269
|
"pisell2.event.select.event": "選擇服務",
|
|
238
270
|
"pisell2.event.select.campus": (val) => `請選擇${val || "資源"}`,
|
|
@@ -290,6 +322,7 @@ var locales_default = {
|
|
|
290
322
|
"pisell2.event.capacity.limit.reached.title": "活動名額已滿",
|
|
291
323
|
"pisell2.event.capacity.limit.reached.tip": "購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。",
|
|
292
324
|
"pisell2.appointment.booking.empty.service": "暫無服務",
|
|
325
|
+
"pisell2.appointment.booking.empty.data": "暫無數據",
|
|
293
326
|
"pisell2.appointment.booking.empty.time": "暫無時間",
|
|
294
327
|
"pisell2.appointment.service.title": (val) => `${val}个服務`,
|
|
295
328
|
"pisell2.appointment.add.guest": "添加預約人",
|
|
@@ -307,6 +340,21 @@ var locales_default = {
|
|
|
307
340
|
"pisell2.appointment.sunday": "周日",
|
|
308
341
|
"pisell2.appointment.any.professional": "隨機分配",
|
|
309
342
|
"pisell2.appointment.for.maximum.availability": "立即匹配",
|
|
343
|
+
"pisell2.appointment.deposit": "定金",
|
|
344
|
+
"pisell2.appointment.deposit.agreed": "我已閱讀並同意 ",
|
|
345
|
+
"pisell2.appointment.deposit.agree.policy": "您需要同意協議才能繼續",
|
|
346
|
+
"pisell2.appointment.deposit.and": " 和 ",
|
|
347
|
+
"pisell2.appointment.deposit.amount.tip1": "請支付 ",
|
|
348
|
+
"pisell2.appointment.deposit.amount.tip2": " 定金。",
|
|
349
|
+
"pisell2.appointment.deposit.close": "关闭",
|
|
350
|
+
"pisell2.appointment.tips": "提示",
|
|
351
|
+
"pisell2.appointment.tips.content": `請仔細查看購物車中的商品,然後點擊下面的"結算"按鈕繼續付款。`,
|
|
352
|
+
"pisell2.appointment.fill-form": "填寫資訊",
|
|
353
|
+
"pisell2.appointment.select.holder": (val) => `請選擇${val}`,
|
|
354
|
+
"pisell2.appointment.select.time": "選擇時間",
|
|
355
|
+
"pisell2.appointment.unselect.time": "無可用時間,請返回",
|
|
356
|
+
"pisell2.appointment.unselect.date": "請選擇日期",
|
|
357
|
+
"pisell2.appointment.add-guests": "添加預約人",
|
|
310
358
|
"pisell2.text.apply": "應用",
|
|
311
359
|
"pisell2.text.goodpass": "商品券",
|
|
312
360
|
"pisell2.text.goodpass.product-vouchers": "商品兌換券",
|
|
@@ -45,7 +45,7 @@ export declare const formatMonthDisplay: (dateString: string) => string;
|
|
|
45
45
|
export declare const resourceTitle: (data: any) => any;
|
|
46
46
|
export declare const formatHolder: (data: any[]) => any[];
|
|
47
47
|
export declare const formatGuest: (data: any[], products: any) => any[];
|
|
48
|
-
export declare const formatCarts: (data: any[], resources: any[]) => any[];
|
|
48
|
+
export declare const formatCarts: (data: any[], resources: any[], accountLists?: any) => any[];
|
|
49
49
|
/**
|
|
50
50
|
* @title: 对资源进行排序
|
|
51
51
|
* @description:
|
|
@@ -57,6 +57,7 @@ export declare const formatCarts: (data: any[], resources: any[]) => any[];
|
|
|
57
57
|
*/
|
|
58
58
|
export declare const sortResources: (resources: any[], resourceSort: any[]) => any[] | undefined;
|
|
59
59
|
export declare const getMeAccount: (val: any[]) => any;
|
|
60
|
+
export declare const getCustomer: () => any;
|
|
60
61
|
export declare const formatCustomer: (val: any) => {
|
|
61
62
|
id: any;
|
|
62
63
|
username: string;
|
|
@@ -84,3 +85,67 @@ export declare const isEmptyGuest: (carts: any[], accounts: any[]) => boolean;
|
|
|
84
85
|
* @Date: 2025-04-15 21:51
|
|
85
86
|
*/
|
|
86
87
|
export declare const isEmptyCartsResourceId: (carts: any[]) => boolean;
|
|
88
|
+
/**
|
|
89
|
+
* @title: 定金合并的标点符号
|
|
90
|
+
* @description:
|
|
91
|
+
* @return {*}
|
|
92
|
+
* @Author: WangHan
|
|
93
|
+
* @Date: 2025-04-21 17:52
|
|
94
|
+
*/
|
|
95
|
+
export declare const getPunctuationMark: (index: number, totalLength: number, isEn: boolean) => any;
|
|
96
|
+
/**
|
|
97
|
+
* @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
|
|
98
|
+
* @description:
|
|
99
|
+
* @param {any} array
|
|
100
|
+
* @param {any} resources
|
|
101
|
+
* @return {*}
|
|
102
|
+
* @Author: WangHan
|
|
103
|
+
* @Date: 2025-04-25 19:05
|
|
104
|
+
*/
|
|
105
|
+
export declare const hasResourceFormId: (array: any[]) => boolean | undefined;
|
|
106
|
+
export declare const formatForms: (array: any[]) => ({
|
|
107
|
+
form_id: any;
|
|
108
|
+
policy_id: any;
|
|
109
|
+
id: any;
|
|
110
|
+
cart_id: any;
|
|
111
|
+
} | null)[];
|
|
112
|
+
/**
|
|
113
|
+
* @title: 打开表单
|
|
114
|
+
* @description:
|
|
115
|
+
* @param {string} title
|
|
116
|
+
* @param {any} callback
|
|
117
|
+
* @return {*}
|
|
118
|
+
* @Author: WangHan
|
|
119
|
+
* @Date: 2025-04-26 15:26
|
|
120
|
+
*/
|
|
121
|
+
export declare const openForm: ({ form_id, title, callback, utils }: any) => void;
|
|
122
|
+
/**
|
|
123
|
+
* @title: 更新数组
|
|
124
|
+
* @description:
|
|
125
|
+
* @return {*}
|
|
126
|
+
* @Author: WangHan
|
|
127
|
+
* @Date: 2025-04-26 18:13
|
|
128
|
+
*/
|
|
129
|
+
export declare function updateLists<T extends Record<string, any>>(list: T[], key: string, value: any, newData: Partial<T>): T[];
|
|
130
|
+
/**
|
|
131
|
+
* @title: 检查表单是否有未完成或错误
|
|
132
|
+
* @description:
|
|
133
|
+
* @param {any} formStatus
|
|
134
|
+
* @param {any} formLists
|
|
135
|
+
* @return {*}
|
|
136
|
+
* @Author: WangHan
|
|
137
|
+
* @Date: 2025-04-26 18:52
|
|
138
|
+
*/
|
|
139
|
+
export declare function hasFormError(formStatus: any[], formLists: any[]): boolean;
|
|
140
|
+
/**
|
|
141
|
+
* @title: 更新表单存储
|
|
142
|
+
* @description:
|
|
143
|
+
* @param {any} bookingForm
|
|
144
|
+
* @param {number} id
|
|
145
|
+
* @param {any} newData
|
|
146
|
+
* @return {*}
|
|
147
|
+
* @Author: WangHan
|
|
148
|
+
* @Date: 2025-04-27 17:27
|
|
149
|
+
*/
|
|
150
|
+
export declare const updateBookingFormStorage: (bookingForm: any, id: number, newData: any) => any;
|
|
151
|
+
export declare const Toast: (text: string) => void;
|
|
@@ -29,24 +29,34 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/appointmentBooking/utils.ts
|
|
30
30
|
var utils_exports = {};
|
|
31
31
|
__export(utils_exports, {
|
|
32
|
+
Toast: () => Toast,
|
|
32
33
|
formatBackgroundColors: () => formatBackgroundColors,
|
|
33
34
|
formatCarts: () => formatCarts,
|
|
34
35
|
formatCurrentUser: () => formatCurrentUser,
|
|
35
36
|
formatCustomer: () => formatCustomer,
|
|
37
|
+
formatForms: () => formatForms,
|
|
36
38
|
formatGuest: () => formatGuest,
|
|
37
39
|
formatHolder: () => formatHolder,
|
|
38
40
|
formatMonthDisplay: () => formatMonthDisplay,
|
|
41
|
+
getCustomer: () => getCustomer,
|
|
39
42
|
getMeAccount: () => getMeAccount,
|
|
43
|
+
getPunctuationMark: () => getPunctuationMark,
|
|
40
44
|
getScheduleColors: () => getScheduleColors,
|
|
41
45
|
getUsableSchedules: () => getUsableSchedules,
|
|
46
|
+
hasFormError: () => hasFormError,
|
|
47
|
+
hasResourceFormId: () => hasResourceFormId,
|
|
42
48
|
isEmptyCartsResourceId: () => isEmptyCartsResourceId,
|
|
43
49
|
isEmptyGuest: () => isEmptyGuest,
|
|
50
|
+
openForm: () => openForm,
|
|
44
51
|
resourceTitle: () => resourceTitle,
|
|
45
|
-
sortResources: () => sortResources
|
|
52
|
+
sortResources: () => sortResources,
|
|
53
|
+
updateBookingFormStorage: () => updateBookingFormStorage,
|
|
54
|
+
updateLists: () => updateLists
|
|
46
55
|
});
|
|
47
56
|
module.exports = __toCommonJS(utils_exports);
|
|
48
57
|
var import_dayjs = __toESM(require("dayjs"));
|
|
49
58
|
var import_utils = require("@pisell/utils");
|
|
59
|
+
var import_materials = require("@pisell/materials");
|
|
50
60
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
51
61
|
var formatBackgroundColors = (colors) => {
|
|
52
62
|
let _colors = Array.from(new Set(colors.map((color) => color == null ? void 0 : color.toLocaleLowerCase()) || [])).filter((d) => !!d);
|
|
@@ -115,35 +125,42 @@ var formatGuest = (data, products) => {
|
|
|
115
125
|
};
|
|
116
126
|
});
|
|
117
127
|
};
|
|
118
|
-
var formatCarts = (data, resources) => {
|
|
128
|
+
var formatCarts = (data, resources, accountLists) => {
|
|
119
129
|
var _a;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
try {
|
|
131
|
+
const context = (0, import_useEngineContext.default)();
|
|
132
|
+
const utils = context.appHelper.utils || {};
|
|
133
|
+
const locale = ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
|
|
134
|
+
const symbol = (utils == null ? void 0 : utils.getSymbolic()) || "$";
|
|
135
|
+
console.log(data, resources, "wh9786876");
|
|
136
|
+
return data == null ? void 0 : data.map((d) => {
|
|
137
|
+
var _a2, _b, _c;
|
|
138
|
+
const currentResource = resources == null ? void 0 : resources.find((r) => (d == null ? void 0 : d._id) === (r == null ? void 0 : r._id));
|
|
139
|
+
let currentResources = (_b = (_a2 = currentResource == null ? void 0 : currentResource.resources) == null ? void 0 : _a2[0]) == null ? void 0 : _b.renderList;
|
|
140
|
+
currentResources = currentResources == null ? void 0 : currentResources.map((d2) => {
|
|
141
|
+
return {
|
|
142
|
+
...d2,
|
|
143
|
+
label: (d2 == null ? void 0 : d2.main_field) || (d2 == null ? void 0 : d2.id)
|
|
144
|
+
};
|
|
145
|
+
});
|
|
130
146
|
return {
|
|
131
|
-
...
|
|
132
|
-
|
|
147
|
+
...d,
|
|
148
|
+
format: ["HH:mm", "HH:mm"],
|
|
149
|
+
show_time: true,
|
|
150
|
+
duration_type: ((_c = d == null ? void 0 : d.duration) == null ? void 0 : _c.type) || "minutes",
|
|
151
|
+
locale,
|
|
152
|
+
symbol,
|
|
153
|
+
resources: currentResources,
|
|
154
|
+
is_hide_like: true,
|
|
155
|
+
holders: formatHolder(accountLists),
|
|
156
|
+
allowClearHolder: true,
|
|
157
|
+
allowClearResource: true
|
|
133
158
|
};
|
|
134
159
|
});
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
duration_type: d.duration.type,
|
|
140
|
-
locale,
|
|
141
|
-
symbol,
|
|
142
|
-
resources: currentResources,
|
|
143
|
-
is_hide_like: true,
|
|
144
|
-
holder_title: ""
|
|
145
|
-
};
|
|
146
|
-
});
|
|
160
|
+
} catch (error) {
|
|
161
|
+
console.log(error, "formatCarts");
|
|
162
|
+
return [];
|
|
163
|
+
}
|
|
147
164
|
};
|
|
148
165
|
var sortResources = (resources, resourceSort) => {
|
|
149
166
|
try {
|
|
@@ -177,6 +194,15 @@ var sortResources = (resources, resourceSort) => {
|
|
|
177
194
|
var getMeAccount = (val) => {
|
|
178
195
|
return val == null ? void 0 : val.find((d) => !(d == null ? void 0 : d.isGuest));
|
|
179
196
|
};
|
|
197
|
+
var getCustomer = () => {
|
|
198
|
+
var _a, _b;
|
|
199
|
+
const context = (0, import_useEngineContext.default)();
|
|
200
|
+
const utils = context.appHelper.utils || {};
|
|
201
|
+
let userInfo = (_b = (_a = utils.getStore().getState()) == null ? void 0 : _a.global) == null ? void 0 : _b.userInfo;
|
|
202
|
+
const localUserInfo = JSON.parse(utils.storage.get("customer") || "{}");
|
|
203
|
+
userInfo = (userInfo == null ? void 0 : userInfo.id) ? userInfo : localUserInfo;
|
|
204
|
+
return userInfo;
|
|
205
|
+
};
|
|
180
206
|
var formatCustomer = (val) => {
|
|
181
207
|
let currentUserName = `${(val == null ? void 0 : val.first_name) || ""}${(val == null ? void 0 : val.last_name) ? ` ${val == null ? void 0 : val.last_name}` : ""}`;
|
|
182
208
|
currentUserName = currentUserName || (val == null ? void 0 : val.nickname) || "Me";
|
|
@@ -186,12 +212,7 @@ var formatCustomer = (val) => {
|
|
|
186
212
|
};
|
|
187
213
|
};
|
|
188
214
|
var formatCurrentUser = () => {
|
|
189
|
-
|
|
190
|
-
const context = (0, import_useEngineContext.default)();
|
|
191
|
-
const utils = context.appHelper.utils || {};
|
|
192
|
-
let userInfo = (_b = (_a = utils.getStore().getState()) == null ? void 0 : _a.global) == null ? void 0 : _b.userInfo;
|
|
193
|
-
const localUserInfo = JSON.parse(utils.storage.get("customer") || "{}");
|
|
194
|
-
userInfo = (userInfo == null ? void 0 : userInfo.id) ? userInfo : localUserInfo;
|
|
215
|
+
let userInfo = getCustomer();
|
|
195
216
|
const customer = formatCustomer(userInfo);
|
|
196
217
|
return customer;
|
|
197
218
|
};
|
|
@@ -209,20 +230,124 @@ var isEmptyCartsResourceId = (carts) => {
|
|
|
209
230
|
console.log(isEmptyResourceId, "isEmptyResourceId");
|
|
210
231
|
return isEmptyResourceId;
|
|
211
232
|
};
|
|
233
|
+
var getPunctuationMark = (index, totalLength, isEn) => {
|
|
234
|
+
const isLastItem = index === totalLength - 1;
|
|
235
|
+
const isSecondLastItem = index === totalLength - 2;
|
|
236
|
+
if (isLastItem) {
|
|
237
|
+
return isEn ? "." : "。";
|
|
238
|
+
}
|
|
239
|
+
if (isSecondLastItem) {
|
|
240
|
+
return import_utils.locales.getText("pisell2.appointment.deposit.and");
|
|
241
|
+
}
|
|
242
|
+
return isEn ? ", " : "、";
|
|
243
|
+
};
|
|
244
|
+
var hasResourceFormId = (array) => {
|
|
245
|
+
try {
|
|
246
|
+
if (!(array == null ? void 0 : array.length)) {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
return array.some((item) => {
|
|
250
|
+
var _a;
|
|
251
|
+
const resourceId = item.resource_id;
|
|
252
|
+
const foundResource = (_a = item == null ? void 0 : item.resources) == null ? void 0 : _a.find((resource) => resource.id === resourceId);
|
|
253
|
+
console.log(foundResource, item, "foundResource");
|
|
254
|
+
return foundResource && foundResource.resource_form_id;
|
|
255
|
+
});
|
|
256
|
+
} catch (error) {
|
|
257
|
+
console.log(error, "hasResourceFormId");
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
var formatForms = (array) => {
|
|
261
|
+
try {
|
|
262
|
+
if (!(array == null ? void 0 : array.length)) {
|
|
263
|
+
return [];
|
|
264
|
+
}
|
|
265
|
+
const mappedResources = array.map((item) => {
|
|
266
|
+
var _a;
|
|
267
|
+
const foundResource = (_a = item == null ? void 0 : item.resources) == null ? void 0 : _a.find((resource) => resource.id === item.resource_id);
|
|
268
|
+
if (foundResource && ((foundResource == null ? void 0 : foundResource.resource_form_id) || (foundResource == null ? void 0 : foundResource.policy_id))) {
|
|
269
|
+
return {
|
|
270
|
+
form_id: foundResource.resource_form_id,
|
|
271
|
+
policy_id: foundResource.policy_id,
|
|
272
|
+
id: foundResource == null ? void 0 : foundResource.id,
|
|
273
|
+
cart_id: item == null ? void 0 : item._id
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
return null;
|
|
277
|
+
}).filter(Boolean);
|
|
278
|
+
return mappedResources;
|
|
279
|
+
} catch (error) {
|
|
280
|
+
console.log(error, "hasResourceFormId");
|
|
281
|
+
return [];
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
var openForm = ({ form_id, title, callback, utils }) => {
|
|
285
|
+
utils.action({
|
|
286
|
+
type: "pisell1.form",
|
|
287
|
+
data: {
|
|
288
|
+
form_id,
|
|
289
|
+
form_title: title,
|
|
290
|
+
isV2API: true
|
|
291
|
+
},
|
|
292
|
+
callback
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
function updateLists(list, key, value, newData) {
|
|
296
|
+
const idx = list.findIndex((item) => item[key] === value);
|
|
297
|
+
if (idx > -1) {
|
|
298
|
+
const updated = { ...list[idx], ...newData };
|
|
299
|
+
const newList = [...list];
|
|
300
|
+
newList[idx] = updated;
|
|
301
|
+
return newList;
|
|
302
|
+
} else {
|
|
303
|
+
return [...list, { ...newData, [key]: value }];
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function hasFormError(formStatus, formLists) {
|
|
307
|
+
if (formStatus.length !== formLists.length) return true;
|
|
308
|
+
return formStatus.some((item) => item.status === "error");
|
|
309
|
+
}
|
|
310
|
+
var updateBookingFormStorage = (bookingForm, id, newData) => {
|
|
311
|
+
const newBookingForm = { ...bookingForm };
|
|
312
|
+
if (newBookingForm[id]) {
|
|
313
|
+
newBookingForm[id] = { ...newBookingForm[id], ...newData };
|
|
314
|
+
} else {
|
|
315
|
+
newBookingForm[id] = { ...newData };
|
|
316
|
+
}
|
|
317
|
+
return newBookingForm;
|
|
318
|
+
};
|
|
319
|
+
var Toast = (text) => {
|
|
320
|
+
try {
|
|
321
|
+
(0, import_materials.PisellToast)({
|
|
322
|
+
content: text
|
|
323
|
+
});
|
|
324
|
+
} catch (error) {
|
|
325
|
+
window == null ? void 0 : window.alert(text);
|
|
326
|
+
}
|
|
327
|
+
};
|
|
212
328
|
// Annotate the CommonJS export names for ESM import in node:
|
|
213
329
|
0 && (module.exports = {
|
|
330
|
+
Toast,
|
|
214
331
|
formatBackgroundColors,
|
|
215
332
|
formatCarts,
|
|
216
333
|
formatCurrentUser,
|
|
217
334
|
formatCustomer,
|
|
335
|
+
formatForms,
|
|
218
336
|
formatGuest,
|
|
219
337
|
formatHolder,
|
|
220
338
|
formatMonthDisplay,
|
|
339
|
+
getCustomer,
|
|
221
340
|
getMeAccount,
|
|
341
|
+
getPunctuationMark,
|
|
222
342
|
getScheduleColors,
|
|
223
343
|
getUsableSchedules,
|
|
344
|
+
hasFormError,
|
|
345
|
+
hasResourceFormId,
|
|
224
346
|
isEmptyCartsResourceId,
|
|
225
347
|
isEmptyGuest,
|
|
348
|
+
openForm,
|
|
226
349
|
resourceTitle,
|
|
227
|
-
sortResources
|
|
350
|
+
sortResources,
|
|
351
|
+
updateBookingFormStorage,
|
|
352
|
+
updateLists
|
|
228
353
|
});
|
|
@@ -209,7 +209,8 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
209
209
|
};
|
|
210
210
|
const handleAddProduct = (item, type) => {
|
|
211
211
|
let _list = [...state.addons.value];
|
|
212
|
-
const
|
|
212
|
+
const isSession = (0, import_utils2.isSessionProduct)(item);
|
|
213
|
+
const isEject = type === "detail" || item.bundle_group_count > 0 || isSession;
|
|
213
214
|
state.action({
|
|
214
215
|
type: "pisell1.handleOpenProductModal",
|
|
215
216
|
data: {
|
|
@@ -217,11 +218,12 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
217
218
|
date: state.date.value.format("YYYY-MM-DD"),
|
|
218
219
|
showConfig: {
|
|
219
220
|
option: false,
|
|
220
|
-
session:
|
|
221
|
+
session: isSession,
|
|
221
222
|
variant: false,
|
|
222
223
|
package: true
|
|
223
224
|
},
|
|
224
|
-
is_eject: isEject ? 1 : 0
|
|
225
|
+
is_eject: isEject ? 1 : 0,
|
|
226
|
+
isOS: isSession
|
|
225
227
|
},
|
|
226
228
|
callback: (e, extension_type, detail) => {
|
|
227
229
|
console.log("e", e);
|
|
@@ -365,6 +367,7 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
365
367
|
if (state.channelDisabledEdit) {
|
|
366
368
|
return;
|
|
367
369
|
}
|
|
370
|
+
const isSession = (0, import_utils2.isSessionProduct)(item);
|
|
368
371
|
state.action({
|
|
369
372
|
type: "pisell1.handleOpenProductModal",
|
|
370
373
|
data: {
|
|
@@ -372,11 +375,12 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
372
375
|
date: state.date.value.format("YYYY-MM-DD"),
|
|
373
376
|
showConfig: {
|
|
374
377
|
option: false,
|
|
375
|
-
session:
|
|
378
|
+
session: isSession,
|
|
376
379
|
variant: false,
|
|
377
380
|
package: true
|
|
378
381
|
},
|
|
379
|
-
value: item._extend.other
|
|
382
|
+
value: item._extend.other,
|
|
383
|
+
isOS: isSession
|
|
380
384
|
},
|
|
381
385
|
callback: (e, extension_type, detail) => {
|
|
382
386
|
var _a2;
|