@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
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
align-items: start;
|
|
41
41
|
|
|
42
|
-
>
|
|
42
|
+
>div {
|
|
43
43
|
display: flex;
|
|
44
44
|
align-items: center;
|
|
45
45
|
justify-content: space-between;
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
.left {
|
|
57
57
|
display: flex;
|
|
58
58
|
flex-direction: column;
|
|
59
|
+
|
|
59
60
|
.gst {
|
|
60
61
|
color: var(--Gray-500, #667085);
|
|
61
62
|
font-size: 14px;
|
|
@@ -70,30 +71,38 @@
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
.event-amount {
|
|
73
|
-
color: var(--
|
|
74
|
+
color: var(--theme-color, #7f56d9);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.appointment-total-deposit-wrap {
|
|
79
|
+
span {
|
|
80
|
+
font-size: 16px !important;
|
|
81
|
+
font-weight: 500;
|
|
82
|
+
line-height: 24px;
|
|
83
|
+
color: var(--Text-Text_1, #1b1b1b) !important;
|
|
74
84
|
}
|
|
75
85
|
}
|
|
76
86
|
|
|
77
87
|
.appointment-cart-mobile-item-wrap {
|
|
88
|
+
height: 100%;
|
|
78
89
|
display: flex;
|
|
79
90
|
flex-direction: column;
|
|
80
|
-
|
|
81
|
-
height: 100%;
|
|
91
|
+
overflow: hidden;
|
|
82
92
|
|
|
83
93
|
.content {
|
|
84
94
|
flex: 1;
|
|
85
95
|
overflow-y: auto;
|
|
86
|
-
padding:
|
|
87
|
-
max-height: 100%;
|
|
96
|
+
padding: 16px 16px 0;
|
|
88
97
|
}
|
|
98
|
+
|
|
89
99
|
.appointment-footer {
|
|
90
|
-
|
|
91
|
-
position: fixed;
|
|
92
|
-
bottom: 0;
|
|
93
|
-
left: 0;
|
|
94
|
-
right: 0;
|
|
100
|
+
background: #fff;
|
|
95
101
|
border-top: 1px solid #eaecf0;
|
|
96
102
|
padding: 14px 24px 24px;
|
|
97
103
|
margin-top: 0;
|
|
104
|
+
position: relative;
|
|
105
|
+
flex: none;
|
|
106
|
+
z-index: 10;
|
|
98
107
|
}
|
|
99
|
-
}
|
|
108
|
+
}
|
|
@@ -47,14 +47,14 @@ var Cart = ({ open, onCancel }) => {
|
|
|
47
47
|
closable: true,
|
|
48
48
|
onCancel: () => onCancel(),
|
|
49
49
|
bodyStyle: {
|
|
50
|
-
padding:
|
|
50
|
+
padding: 0
|
|
51
51
|
},
|
|
52
52
|
destroyOnClose: true,
|
|
53
53
|
className: `appointment-cart-modal`,
|
|
54
54
|
footer: null,
|
|
55
55
|
forceRender: true
|
|
56
56
|
},
|
|
57
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
57
|
+
/* @__PURE__ */ import_react.default.createElement(import_Item.default, null)
|
|
58
58
|
);
|
|
59
59
|
};
|
|
60
60
|
var Cart_default = Cart;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { locales } from '@pisell/utils';
|
|
2
|
+
interface CheckLoginParams {
|
|
3
|
+
isLogin: boolean;
|
|
4
|
+
openLoginModal: (params: {
|
|
5
|
+
callback: (status: string) => void;
|
|
6
|
+
}) => void;
|
|
7
|
+
isFormSubject: boolean;
|
|
8
|
+
utils: any;
|
|
9
|
+
accountLists: any[];
|
|
10
|
+
appointmentBooking: any;
|
|
11
|
+
getHolders: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const checkLogin: ({ isLogin, openLoginModal, isFormSubject, utils, accountLists, appointmentBooking, getHolders, }: CheckLoginParams) => Promise<boolean>;
|
|
14
|
+
interface CheckHolderParams {
|
|
15
|
+
isFormSubject: boolean;
|
|
16
|
+
checkAccount: (type: string) => boolean;
|
|
17
|
+
carts: any[];
|
|
18
|
+
}
|
|
19
|
+
export declare const checkHolder: ({ isFormSubject, checkAccount, carts }: CheckHolderParams) => false | any[];
|
|
20
|
+
interface CheckResourceParams {
|
|
21
|
+
carts: any[];
|
|
22
|
+
resources: any[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @title: 检测资源数据
|
|
26
|
+
* @description:
|
|
27
|
+
* @param {CheckResourceParams} param1
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @Author: WangHan
|
|
30
|
+
* @Date: 2025-04-29 18:02
|
|
31
|
+
*/
|
|
32
|
+
export declare const checkResource: ({ carts, resources }: CheckResourceParams) => false | any[];
|
|
33
|
+
interface CheckResourceParams {
|
|
34
|
+
carts: any[];
|
|
35
|
+
}
|
|
36
|
+
interface HandleFormStepParams {
|
|
37
|
+
newCarts: any[];
|
|
38
|
+
addStep: (params: {
|
|
39
|
+
index: number;
|
|
40
|
+
key: string;
|
|
41
|
+
description: string;
|
|
42
|
+
}) => void;
|
|
43
|
+
removeStep: (key: string) => void;
|
|
44
|
+
setResourceOtherParams: (params: any) => void;
|
|
45
|
+
resourceOtherParams: any;
|
|
46
|
+
index: number;
|
|
47
|
+
locales: typeof locales;
|
|
48
|
+
}
|
|
49
|
+
export declare const handleFormStep: ({ newCarts, addStep, removeStep, setResourceOtherParams, resourceOtherParams, index, locales, }: HandleFormStepParams) => void;
|
|
50
|
+
/**
|
|
51
|
+
* 滚动到第一个错误卡片
|
|
52
|
+
* @param {string} selector - 错误卡片的 class 选择器
|
|
53
|
+
*/
|
|
54
|
+
export declare const scrollToFirstErrorCard: (selector?: string) => void;
|
|
55
|
+
export declare type StepKey = 'select-resource' | 'fill-form' | 'select-time' | 'confirm-information' | 'select-service' | 'select-date' | 'select-guest';
|
|
56
|
+
interface HandleResourceParams {
|
|
57
|
+
handleCheckResource: () => boolean;
|
|
58
|
+
newCarts: any[];
|
|
59
|
+
locales: typeof locales;
|
|
60
|
+
addStep: (params: {
|
|
61
|
+
index: number;
|
|
62
|
+
key: string;
|
|
63
|
+
description: string;
|
|
64
|
+
}, key?: StepKey) => void;
|
|
65
|
+
removeStep: (key: string) => void;
|
|
66
|
+
setResourceOtherParams: (params: any) => void;
|
|
67
|
+
resourceOtherParams: any;
|
|
68
|
+
currentStep: any;
|
|
69
|
+
getResourceTimeSlot: () => void;
|
|
70
|
+
appointmentBooking: any;
|
|
71
|
+
onIsErrorResource?: (isError: boolean) => void;
|
|
72
|
+
stepList: any[];
|
|
73
|
+
}
|
|
74
|
+
export declare const handleResource: ({ handleCheckResource, newCarts, addStep, removeStep, setResourceOtherParams, resourceOtherParams, currentStep, getResourceTimeSlot, appointmentBooking, onIsErrorResource, stepList }: HandleResourceParams) => Promise<void>;
|
|
75
|
+
export declare const stepHandlers: Record<StepKey, (params: any) => Promise<any>>;
|
|
76
|
+
export declare const handleContinueStep: (key: StepKey, params: any) => Promise<any>;
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/appointmentBooking/components/Cart/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
checkHolder: () => checkHolder,
|
|
23
|
+
checkLogin: () => checkLogin,
|
|
24
|
+
checkResource: () => checkResource,
|
|
25
|
+
handleContinueStep: () => handleContinueStep,
|
|
26
|
+
handleFormStep: () => handleFormStep,
|
|
27
|
+
handleResource: () => handleResource,
|
|
28
|
+
scrollToFirstErrorCard: () => scrollToFirstErrorCard,
|
|
29
|
+
stepHandlers: () => stepHandlers
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(utils_exports);
|
|
32
|
+
var import_utils = require("@pisell/utils");
|
|
33
|
+
var import_utils2 = require("../../utils");
|
|
34
|
+
var checkLogin = async ({
|
|
35
|
+
isLogin,
|
|
36
|
+
openLoginModal,
|
|
37
|
+
isFormSubject,
|
|
38
|
+
utils,
|
|
39
|
+
accountLists,
|
|
40
|
+
appointmentBooking,
|
|
41
|
+
getHolders
|
|
42
|
+
}) => {
|
|
43
|
+
if (!isLogin) {
|
|
44
|
+
openLoginModal({
|
|
45
|
+
callback: (status) => {
|
|
46
|
+
var _a, _b, _c, _d, _e;
|
|
47
|
+
if (status === "success") {
|
|
48
|
+
if (!isFormSubject) {
|
|
49
|
+
const user = ((_d = (_c = (_b = (_a = utils == null ? void 0 : utils.store) == null ? void 0 : _a.getState) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.global) == null ? void 0 : _d.userInfo) || JSON.parse(((_e = utils == null ? void 0 : utils.storage) == null ? void 0 : _e.get("customer")) || "{}");
|
|
50
|
+
const currentUser = (0, import_utils2.formatCustomer)(user);
|
|
51
|
+
const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
|
|
52
|
+
appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
|
|
53
|
+
} else {
|
|
54
|
+
getHolders();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
};
|
|
63
|
+
var checkHolder = ({ isFormSubject, checkAccount, carts }) => {
|
|
64
|
+
if (isFormSubject && !checkAccount("holder")) {
|
|
65
|
+
const newCarts = carts == null ? void 0 : carts.map((item) => {
|
|
66
|
+
return {
|
|
67
|
+
...item,
|
|
68
|
+
isErrorHolder: !(item == null ? void 0 : item.holder_id)
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
return newCarts;
|
|
72
|
+
}
|
|
73
|
+
return false;
|
|
74
|
+
};
|
|
75
|
+
var checkResource = ({ carts, resources }) => {
|
|
76
|
+
const isEmptyResourceId = carts == null ? void 0 : carts.some((item) => !(item == null ? void 0 : item.resource_id));
|
|
77
|
+
if (isEmptyResourceId) {
|
|
78
|
+
const newCarts = carts == null ? void 0 : carts.map((item) => {
|
|
79
|
+
var _a;
|
|
80
|
+
let errorText = "";
|
|
81
|
+
if (!(item == null ? void 0 : item.resource_id)) {
|
|
82
|
+
const currentCart = resources == null ? void 0 : resources.find((d) => (d == null ? void 0 : d._id) === (item == null ? void 0 : item._id));
|
|
83
|
+
const currentResources = (currentCart == null ? void 0 : currentCart.resources) || [];
|
|
84
|
+
errorText = ((_a = currentResources == null ? void 0 : currentResources[0]) == null ? void 0 : _a.title) || "";
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
...item,
|
|
88
|
+
isErrorResource: !(item == null ? void 0 : item.resource_id),
|
|
89
|
+
resourceErrorText: errorText
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
return newCarts;
|
|
93
|
+
}
|
|
94
|
+
return false;
|
|
95
|
+
};
|
|
96
|
+
var handleFormStep = ({
|
|
97
|
+
newCarts,
|
|
98
|
+
addStep,
|
|
99
|
+
removeStep,
|
|
100
|
+
setResourceOtherParams,
|
|
101
|
+
resourceOtherParams,
|
|
102
|
+
index,
|
|
103
|
+
locales: locales2
|
|
104
|
+
}) => {
|
|
105
|
+
if ((0, import_utils2.hasResourceFormId)(newCarts)) {
|
|
106
|
+
const description = locales2.getText("pisell2.appointment.fill-form");
|
|
107
|
+
addStep({ index, key: "fill-form", description });
|
|
108
|
+
} else {
|
|
109
|
+
removeStep("fill-form");
|
|
110
|
+
}
|
|
111
|
+
setResourceOtherParams({ ...resourceOtherParams, errorList: null });
|
|
112
|
+
};
|
|
113
|
+
var scrollToFirstErrorCard = (selector = ".pisell-lowcode-product-select-resource-error") => {
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
const errorCard = document.querySelector(selector);
|
|
116
|
+
if (errorCard) {
|
|
117
|
+
errorCard.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
118
|
+
}
|
|
119
|
+
}, 0);
|
|
120
|
+
};
|
|
121
|
+
var handleService = async ({
|
|
122
|
+
appointmentBooking
|
|
123
|
+
}) => {
|
|
124
|
+
appointmentBooking.next();
|
|
125
|
+
};
|
|
126
|
+
var handleResource = async ({
|
|
127
|
+
handleCheckResource,
|
|
128
|
+
newCarts,
|
|
129
|
+
addStep,
|
|
130
|
+
removeStep,
|
|
131
|
+
setResourceOtherParams,
|
|
132
|
+
resourceOtherParams,
|
|
133
|
+
currentStep,
|
|
134
|
+
getResourceTimeSlot,
|
|
135
|
+
appointmentBooking,
|
|
136
|
+
onIsErrorResource,
|
|
137
|
+
stepList
|
|
138
|
+
}) => {
|
|
139
|
+
if (handleCheckResource()) {
|
|
140
|
+
scrollToFirstErrorCard();
|
|
141
|
+
if (onIsErrorResource) {
|
|
142
|
+
onIsErrorResource(true);
|
|
143
|
+
}
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if ((0, import_utils2.hasResourceFormId)(newCarts)) {
|
|
147
|
+
const index = (currentStep == null ? void 0 : currentStep.index) + 1;
|
|
148
|
+
const description = import_utils.locales.getText("pisell2.appointment.fill-form");
|
|
149
|
+
const isExist = stepList == null ? void 0 : stepList.some((item) => (item == null ? void 0 : item.key) === "select-time");
|
|
150
|
+
addStep({ index, key: "fill-form", description }, isExist ? "select-time" : void 0);
|
|
151
|
+
} else {
|
|
152
|
+
removeStep("fill-form");
|
|
153
|
+
}
|
|
154
|
+
setResourceOtherParams({
|
|
155
|
+
...resourceOtherParams,
|
|
156
|
+
errorList: null
|
|
157
|
+
});
|
|
158
|
+
getResourceTimeSlot();
|
|
159
|
+
appointmentBooking.next();
|
|
160
|
+
};
|
|
161
|
+
var handleDate = async ({
|
|
162
|
+
appointmentBooking
|
|
163
|
+
}) => {
|
|
164
|
+
const data = await appointmentBooking.getDateRange();
|
|
165
|
+
if (!(data == null ? void 0 : data.length)) {
|
|
166
|
+
return (0, import_utils2.Toast)(import_utils.locales.getText("pisell2.appointment.unselect.date"));
|
|
167
|
+
}
|
|
168
|
+
appointmentBooking.next();
|
|
169
|
+
};
|
|
170
|
+
var handleForm = async ({
|
|
171
|
+
onContinue,
|
|
172
|
+
appointmentBooking
|
|
173
|
+
}) => {
|
|
174
|
+
if (onContinue) {
|
|
175
|
+
return onContinue();
|
|
176
|
+
}
|
|
177
|
+
appointmentBooking.next();
|
|
178
|
+
};
|
|
179
|
+
var handleTime = async ({
|
|
180
|
+
appointmentBooking
|
|
181
|
+
}) => {
|
|
182
|
+
const isUnSelectedTimes = appointmentBooking.checkCartItems("date");
|
|
183
|
+
if ((isUnSelectedTimes == null ? void 0 : isUnSelectedTimes.length) > 0) {
|
|
184
|
+
(0, import_utils2.Toast)(import_utils.locales.getText("pisell2.appointment.unselect.time"));
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
appointmentBooking.next();
|
|
188
|
+
};
|
|
189
|
+
var handleCheckout = async ({
|
|
190
|
+
summary,
|
|
191
|
+
isAgreeDepositPolicy,
|
|
192
|
+
appointmentBooking,
|
|
193
|
+
setLoading,
|
|
194
|
+
utils,
|
|
195
|
+
clearData,
|
|
196
|
+
goPaymentFinish
|
|
197
|
+
}) => {
|
|
198
|
+
var _a;
|
|
199
|
+
if (((_a = summary == null ? void 0 : summary.deposit) == null ? void 0 : _a.hasDeposit) && !isAgreeDepositPolicy) {
|
|
200
|
+
return (0, import_utils2.Toast)(
|
|
201
|
+
import_utils.locales.getText("pisell2.appointment.deposit.agree.policy")
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
const { deposit } = summary;
|
|
205
|
+
setLoading(true);
|
|
206
|
+
try {
|
|
207
|
+
const { data } = await appointmentBooking.submitOrder();
|
|
208
|
+
const { is_deposit, deposit_amount, total_amount, order_id } = data || {};
|
|
209
|
+
const _total = is_deposit ? deposit_amount : total_amount;
|
|
210
|
+
if (_total > 0) {
|
|
211
|
+
utils.action({
|
|
212
|
+
type: "pisell1.payment",
|
|
213
|
+
data: { ...data, total_amount: _total }
|
|
214
|
+
});
|
|
215
|
+
setTimeout(() => {
|
|
216
|
+
clearData();
|
|
217
|
+
setLoading(false);
|
|
218
|
+
}, 200);
|
|
219
|
+
} else {
|
|
220
|
+
if (deposit == null ? void 0 : deposit.hasDeposit) {
|
|
221
|
+
goPaymentFinish(order_id, _total);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
const freeResult = await appointmentBooking.getFreeProduct(order_id);
|
|
225
|
+
console.log(freeResult, "freeResult");
|
|
226
|
+
if (freeResult == null ? void 0 : freeResult.status) {
|
|
227
|
+
goPaymentFinish(order_id, total_amount);
|
|
228
|
+
} else {
|
|
229
|
+
(0, import_utils2.Toast)(freeResult == null ? void 0 : freeResult.message);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
} catch (error) {
|
|
233
|
+
setTimeout(() => {
|
|
234
|
+
setLoading(false);
|
|
235
|
+
}, 50);
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
var handleAccount = async ({
|
|
239
|
+
appointmentBooking
|
|
240
|
+
}) => {
|
|
241
|
+
appointmentBooking.next();
|
|
242
|
+
};
|
|
243
|
+
var stepHandlers = {
|
|
244
|
+
// 选择服务商品列表
|
|
245
|
+
"select-service": handleService,
|
|
246
|
+
// 选择资源
|
|
247
|
+
"select-resource": handleResource,
|
|
248
|
+
// 选择客户
|
|
249
|
+
"select-guest": handleAccount,
|
|
250
|
+
// 选择日期
|
|
251
|
+
"select-date": handleDate,
|
|
252
|
+
// 填写表单
|
|
253
|
+
"fill-form": handleForm,
|
|
254
|
+
// 选择时间切片
|
|
255
|
+
"select-time": handleTime,
|
|
256
|
+
// 确认信息
|
|
257
|
+
"confirm-information": handleCheckout
|
|
258
|
+
};
|
|
259
|
+
var handleContinueStep = (key, params) => {
|
|
260
|
+
var _a;
|
|
261
|
+
return (_a = stepHandlers[key]) == null ? void 0 : _a.call(stepHandlers, params);
|
|
262
|
+
};
|
|
263
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
264
|
+
0 && (module.exports = {
|
|
265
|
+
checkHolder,
|
|
266
|
+
checkLogin,
|
|
267
|
+
checkResource,
|
|
268
|
+
handleContinueStep,
|
|
269
|
+
handleFormStep,
|
|
270
|
+
handleResource,
|
|
271
|
+
scrollToFirstErrorCard,
|
|
272
|
+
stepHandlers
|
|
273
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/appointmentBooking/components/ConfirmInformation/index.tsx
|
|
30
|
+
var ConfirmInformation_exports = {};
|
|
31
|
+
__export(ConfirmInformation_exports, {
|
|
32
|
+
default: () => ConfirmInformation_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ConfirmInformation_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
38
|
+
var import_Item = __toESM(require("../Cart/Item"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var ConfirmInformation = () => {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
const context = (0, import_useEngineContext.default)();
|
|
43
|
+
const config = ((_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.constants) == null ? void 0 : _b.config) || {};
|
|
44
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-wrap" }, (0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement(import_Item.default, null) : /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "image" }, /* @__PURE__ */ import_react.default.createElement("img", { src: `${config == null ? void 0 : config.awsStatic}/checkout_confirm.png` })), /* @__PURE__ */ import_react.default.createElement("span", { className: "tips" }, import_utils.locales.getText("pisell2.appointment.tips")), /* @__PURE__ */ import_react.default.createElement("span", { className: "tips-content" }, import_utils.locales.getText("pisell2.appointment.tips.content"))));
|
|
45
|
+
};
|
|
46
|
+
var ConfirmInformation_default = ConfirmInformation;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.appointment-confirm-information-wrap {
|
|
2
|
+
padding-top: 20px;
|
|
3
|
+
height: 100%;
|
|
4
|
+
|
|
5
|
+
.appointment-confirm-information-content {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: center;
|
|
9
|
+
color: #000;
|
|
10
|
+
text-align: center;
|
|
11
|
+
font-size: 20px;
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
line-height: 30px;
|
|
15
|
+
|
|
16
|
+
.image {
|
|
17
|
+
display: flex;
|
|
18
|
+
width: 76%;
|
|
19
|
+
img {
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tips {
|
|
25
|
+
margin-top: 43px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tips-content {
|
|
29
|
+
margin-top: 8px;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
line-height: 24px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -42,15 +42,52 @@ var import_Date = __toESM(require("../Date"));
|
|
|
42
42
|
var import_Resource = __toESM(require("../Resource"));
|
|
43
43
|
var import_TimeSlicing = __toESM(require("../TimeSlicing"));
|
|
44
44
|
var import_Guest = __toESM(require("../Guest"));
|
|
45
|
+
var import_Form = __toESM(require("../Form"));
|
|
46
|
+
var import_ConfirmInformation = __toESM(require("../ConfirmInformation"));
|
|
45
47
|
var import_context = require("../../context");
|
|
46
48
|
var import_hooks = require("../../hooks");
|
|
47
49
|
var import_index = require("./index.less");
|
|
48
50
|
var Layout = () => {
|
|
49
|
-
var _a, _b, _c;
|
|
50
|
-
const
|
|
51
|
+
var _a, _b, _c, _d, _e;
|
|
52
|
+
const formRef = (0, import_react.useRef)();
|
|
53
|
+
const {
|
|
54
|
+
currentStep,
|
|
55
|
+
setResourceOtherParams,
|
|
56
|
+
resourceOtherParams,
|
|
57
|
+
setIsAgreeDepositPolicy,
|
|
58
|
+
appointmentBooking
|
|
59
|
+
} = (0, import_context.useAppointmentBookingContext)();
|
|
60
|
+
const { getLoadAllSchedule, isDateSelectedFirst, isFormSubject } = (0, import_hooks.useAppointmentBookingSetting)();
|
|
61
|
+
const { isLogin } = (0, import_hooks.useAppointmentBookingLogin)();
|
|
62
|
+
const { getHolders } = (0, import_hooks.useAppointmentBookingAccount)();
|
|
63
|
+
const { removeStep, addStep } = (0, import_hooks.useAppointmentBookingStep)();
|
|
51
64
|
(0, import_hooks.useAppointmentBookingCart)();
|
|
52
65
|
(0, import_hooks.useAppointmentBookingStep)();
|
|
53
66
|
const [params, setParams] = (0, import_react.useState)({});
|
|
67
|
+
(0, import_react.useEffect)(() => {
|
|
68
|
+
return () => {
|
|
69
|
+
setIsAgreeDepositPolicy(false);
|
|
70
|
+
};
|
|
71
|
+
}, []);
|
|
72
|
+
(0, import_react.useEffect)(() => {
|
|
73
|
+
if (isFormSubject) {
|
|
74
|
+
removeStep("select-guest");
|
|
75
|
+
} else {
|
|
76
|
+
appointmentBooking.addStep(
|
|
77
|
+
{
|
|
78
|
+
index: (currentStep == null ? void 0 : currentStep.index) + 1,
|
|
79
|
+
key: "select-guest",
|
|
80
|
+
description: import_utils.locales.getText("pisell2.appointment.add-guests")
|
|
81
|
+
},
|
|
82
|
+
"select-service"
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
}, [isFormSubject]);
|
|
86
|
+
(0, import_react.useEffect)(() => {
|
|
87
|
+
if (isFormSubject && isLogin) {
|
|
88
|
+
getHolders();
|
|
89
|
+
}
|
|
90
|
+
}, [isFormSubject, isLogin]);
|
|
54
91
|
(0, import_react.useEffect)(() => {
|
|
55
92
|
setResourceOtherParams({
|
|
56
93
|
...resourceOtherParams,
|
|
@@ -61,6 +98,10 @@ var Layout = () => {
|
|
|
61
98
|
behavior: "smooth"
|
|
62
99
|
});
|
|
63
100
|
}, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key]);
|
|
101
|
+
const handleFormSubmit = () => {
|
|
102
|
+
var _a2, _b2;
|
|
103
|
+
(_b2 = (_a2 = formRef.current) == null ? void 0 : _a2.submit) == null ? void 0 : _b2.call(_a2);
|
|
104
|
+
};
|
|
64
105
|
const Com = (0, import_react.useMemo)(() => {
|
|
65
106
|
var _a2;
|
|
66
107
|
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
@@ -75,7 +116,11 @@ var Layout = () => {
|
|
|
75
116
|
// 选择资源
|
|
76
117
|
"select-resource": import_Resource.default,
|
|
77
118
|
// 时间切片
|
|
78
|
-
"select-time": import_TimeSlicing.default
|
|
119
|
+
"select-time": import_TimeSlicing.default,
|
|
120
|
+
// 填写表单
|
|
121
|
+
"fill-form": (props) => /* @__PURE__ */ import_react.default.createElement(import_Form.default, { ref: formRef, ...props }),
|
|
122
|
+
// 确认信息
|
|
123
|
+
"confirm-information": import_ConfirmInformation.default
|
|
79
124
|
};
|
|
80
125
|
let Com2 = components[key];
|
|
81
126
|
return /* @__PURE__ */ import_react.default.createElement(Com2, { onChange: setParams, params });
|
|
@@ -98,13 +143,22 @@ var Layout = () => {
|
|
|
98
143
|
}
|
|
99
144
|
}
|
|
100
145
|
}, [(_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key]);
|
|
146
|
+
const isShowCartCom = (0, import_react.useMemo)(() => {
|
|
147
|
+
var _a2;
|
|
148
|
+
const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
|
|
149
|
+
if ((0, import_utils.isMobile)()) return null;
|
|
150
|
+
if (isDateSelectedFirst && key === "select-date") {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "parallel-content-right" }, /* @__PURE__ */ import_react.default.createElement(import_Item.default, { onContinue: handleFormSubmit }));
|
|
154
|
+
}, [isDateSelectedFirst, (_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key]);
|
|
101
155
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Header.default, null), /* @__PURE__ */ import_react.default.createElement(
|
|
102
156
|
"div",
|
|
103
157
|
{
|
|
104
158
|
className: `parallel-content-wrap ${(0, import_utils.isMobile)() ? "parallel-content-mobile-wrap" : ""}`
|
|
105
159
|
},
|
|
106
160
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "parallel-content-left" }, Com),
|
|
107
|
-
|
|
108
|
-
), (0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement(import_Footer.default,
|
|
161
|
+
isShowCartCom
|
|
162
|
+
), (0, import_utils.isMobile)() && ((_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key) !== "confirm-information" ? /* @__PURE__ */ import_react.default.createElement(import_Footer.default, { onContinue: handleFormSubmit }) : null);
|
|
109
163
|
};
|
|
110
164
|
var Content_default = Layout;
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
// align-items: center;
|
|
6
6
|
flex: 1;
|
|
7
7
|
|
|
8
|
+
.pisell-product-select-wrapper {
|
|
9
|
+
.pisell-product-select-tabs-wrapper {
|
|
10
|
+
top: 77px !important;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
.parallel-content-left {
|
|
9
15
|
flex: 1;
|
|
10
16
|
width: 634px;
|
|
@@ -37,6 +43,13 @@
|
|
|
37
43
|
.parallel-content-mobile-wrap {
|
|
38
44
|
width: 100%;
|
|
39
45
|
flex: none;
|
|
46
|
+
|
|
47
|
+
.pisell-product-select-wrapper {
|
|
48
|
+
.pisell-product-select-tabs-wrapper {
|
|
49
|
+
top: 0 !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
40
53
|
.parallel-content-left {
|
|
41
54
|
width: 100%;
|
|
42
55
|
flex: none;
|
|
@@ -50,6 +63,14 @@
|
|
|
50
63
|
padding: 16px;
|
|
51
64
|
}
|
|
52
65
|
|
|
66
|
+
.appointment-guest-wrap {
|
|
67
|
+
margin-top: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.appointment-confirm-information-wrap {
|
|
71
|
+
padding-top: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
53
74
|
.booking-tab-product {
|
|
54
75
|
.booking-tabs-wrap {
|
|
55
76
|
top: 0 !important;
|