@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
|
@@ -25,12 +25,12 @@ var Holder = function Holder(props) {
|
|
|
25
25
|
*/
|
|
26
26
|
var holders = useMemo(function () {
|
|
27
27
|
var lists = holderLists === null || holderLists === void 0 ? void 0 : holderLists.filter(function (d) {
|
|
28
|
-
return (d === null || d === void 0 ? void 0 : d.id) > 0;
|
|
28
|
+
return ((d === null || d === void 0 ? void 0 : d.id) || (d === null || d === void 0 ? void 0 : d.form_record_id)) > 0;
|
|
29
29
|
});
|
|
30
30
|
if (!(lists !== null && lists !== void 0 && lists.length)) return [];
|
|
31
31
|
return lists.map(function (d) {
|
|
32
32
|
return {
|
|
33
|
-
value: d === null || d === void 0 ? void 0 : d.id,
|
|
33
|
+
value: (d === null || d === void 0 ? void 0 : d.id) || (d === null || d === void 0 ? void 0 : d.form_record_id),
|
|
34
34
|
label: d === null || d === void 0 ? void 0 : d.main_field
|
|
35
35
|
};
|
|
36
36
|
});
|
|
@@ -35,7 +35,7 @@ var AddNote = function AddNote(_ref) {
|
|
|
35
35
|
}
|
|
36
36
|
}, [debouncedValue]);
|
|
37
37
|
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: ""
|
|
38
|
+
className: "pisell-lowcode__booking-notes"
|
|
39
39
|
}, /*#__PURE__*/React.createElement("div", {
|
|
40
40
|
className: "pisell-lowcode__booking-notes-label"
|
|
41
41
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
@@ -140,6 +140,7 @@ export declare const deleteCacheParams: () => void;
|
|
|
140
140
|
* @Date: 2024-12-01 22:43
|
|
141
141
|
*/
|
|
142
142
|
export declare const getDays: (cacheItem: any, type: 'minutes' | 'days') => any;
|
|
143
|
+
export declare const isSessionProduct: (cacheItem: any) => boolean;
|
|
143
144
|
/**
|
|
144
145
|
* @title: 创建一个服务商品
|
|
145
146
|
* @description:
|
|
@@ -263,8 +263,7 @@ export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cach
|
|
|
263
263
|
if (time.max_participants_limit == 0) {
|
|
264
264
|
isMaxLimitRange = true;
|
|
265
265
|
} else {
|
|
266
|
-
|
|
267
|
-
isMaxLimitRange = 'unknown';
|
|
266
|
+
isMaxLimitRange = time.order_event_count < time.max_participants_limit;
|
|
268
267
|
}
|
|
269
268
|
var timeStartDate = dayjs(time.start_date + ' ' + time.start_time).subtract(1, 'second');
|
|
270
269
|
var timeEndDate = dayjs(time.end_date + ' ' + time.end_time).add(1, 'second');
|
|
@@ -555,7 +554,7 @@ export var getErrorList = function getErrorList(resource, cacheItem, isDay) {
|
|
|
555
554
|
* @Date: 2024-01-09 13:40
|
|
556
555
|
*/
|
|
557
556
|
export var formatResource = function formatResource(resourceItem, cacheItem, formatLabel) {
|
|
558
|
-
var _cacheItem$_extend3;
|
|
557
|
+
var _resourceItem$_extend, _cacheItem$_extend3;
|
|
559
558
|
// 当前资源
|
|
560
559
|
var _resourceItem = _objectSpread({}, resourceItem);
|
|
561
560
|
|
|
@@ -567,12 +566,12 @@ export var formatResource = function formatResource(resourceItem, cacheItem, for
|
|
|
567
566
|
|
|
568
567
|
// 格式化label
|
|
569
568
|
_resourceItem.labelText = _resourceItem.room_name || _resourceItem.name;
|
|
570
|
-
var usable = _resourceItem._extend.usableTime && _resourceItem._extend.usableProduct;
|
|
569
|
+
var usable = _resourceItem._extend.usableTime && ((_resourceItem$_extend = _resourceItem._extend.usableTime._extend) === null || _resourceItem$_extend === void 0 ? void 0 : _resourceItem$_extend.isMaxLimitRange) && _resourceItem._extend.usableProduct;
|
|
571
570
|
|
|
572
571
|
// 跨日预约
|
|
573
572
|
if ((cacheItem === null || cacheItem === void 0 || (_cacheItem$_extend3 = cacheItem._extend) === null || _cacheItem$_extend3 === void 0 ? void 0 : _cacheItem$_extend3.sub_type) === 'days') {
|
|
574
|
-
var _resourceItem$
|
|
575
|
-
usable = ((_resourceItem$
|
|
573
|
+
var _resourceItem$_extend2, _resourceItem$_extend3;
|
|
574
|
+
usable = ((_resourceItem$_extend2 = _resourceItem._extend) === null || _resourceItem$_extend2 === void 0 || (_resourceItem$_extend2 = _resourceItem$_extend2.usableTime) === null || _resourceItem$_extend2 === void 0 ? void 0 : _resourceItem$_extend2.isUsable) && ((_resourceItem$_extend3 = _resourceItem._extend) === null || _resourceItem$_extend3 === void 0 ? void 0 : _resourceItem$_extend3.usableProduct);
|
|
576
575
|
}
|
|
577
576
|
_resourceItem.usable = usable;
|
|
578
577
|
if (formatLabel) {
|
|
@@ -616,6 +615,9 @@ export var getDays = function getDays(cacheItem, type) {
|
|
|
616
615
|
var endDate = dayjs((_cacheItem$_extend5 = cacheItem._extend) === null || _cacheItem$_extend5 === void 0 ? void 0 : _cacheItem$_extend5.end_date);
|
|
617
616
|
return endDate.diff(startDate, type);
|
|
618
617
|
};
|
|
618
|
+
export var isSessionProduct = function isSessionProduct(cacheItem) {
|
|
619
|
+
return ['session_product', 'session_ticket'].includes(cacheItem.extension_type);
|
|
620
|
+
};
|
|
619
621
|
|
|
620
622
|
/**
|
|
621
623
|
* @title: 创建一个服务商品
|
|
@@ -627,19 +629,29 @@ export var getDays = function getDays(cacheItem, type) {
|
|
|
627
629
|
* @Date: 2024-01-26 14:09
|
|
628
630
|
*/
|
|
629
631
|
export var getServerItemExtend = function getServerItemExtend(state, cacheItem, timeObj) {
|
|
630
|
-
var _cacheItem$duration;
|
|
631
632
|
// 编辑直接返回原数据
|
|
632
633
|
if (!cacheItem.new && cacheItem._extend.endDate) {
|
|
633
634
|
return cacheItem._extend;
|
|
634
635
|
}
|
|
636
|
+
var isSession = isSessionProduct(cacheItem);
|
|
635
637
|
var isDay = isDayBooking(state);
|
|
638
|
+
var setDuration = function setDuration() {
|
|
639
|
+
var _cacheItem$duration;
|
|
640
|
+
if (isDay) {
|
|
641
|
+
return getDays(cacheItem, 'days');
|
|
642
|
+
}
|
|
643
|
+
if (isSession) {
|
|
644
|
+
return getDays(cacheItem, 'minutes');
|
|
645
|
+
}
|
|
646
|
+
return findNextDuration(cacheItem.duration, timeObj.durationSlicesBasedOnTime, cacheItem === null || cacheItem === void 0 || (_cacheItem$duration = cacheItem.duration) === null || _cacheItem$duration === void 0 ? void 0 : _cacheItem$duration.value);
|
|
647
|
+
};
|
|
636
648
|
|
|
637
649
|
// 获取上一个服务商品
|
|
638
650
|
var lastServer = isDay ? false : getLastServer(state.service.value);
|
|
639
651
|
|
|
640
652
|
// 下一个商品的扩展参数
|
|
641
653
|
var _extend = {
|
|
642
|
-
duration:
|
|
654
|
+
duration: setDuration()
|
|
643
655
|
};
|
|
644
656
|
|
|
645
657
|
// 如果有上一个商品, 将上一个商品的某些参数 设置到新商品上
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "page" | "success" | "
|
|
12
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "page" | "success" | "
|
|
14
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | undefined;
|
|
301
301
|
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
package/es/components/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ import WalletList from './walletList';
|
|
|
14
14
|
import WorkspaceListDetail from './workSpaceListDetail/';
|
|
15
15
|
import WorkspaceList from './workSpaceList';
|
|
16
16
|
import PisellSelectCustomerModal from './pisellSelectCustomerModal';
|
|
17
|
-
|
|
17
|
+
import SubTotal from './subTotal';
|
|
18
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, };
|
package/es/components/index.js
CHANGED
|
@@ -14,4 +14,5 @@ import WalletList from "./walletList";
|
|
|
14
14
|
import WorkspaceListDetail from "./workSpaceListDetail/";
|
|
15
15
|
import WorkspaceList from "./workSpaceList";
|
|
16
16
|
import PisellSelectCustomerModal from "./pisellSelectCustomerModal";
|
|
17
|
-
|
|
17
|
+
import SubTotal from "./subTotal";
|
|
18
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
var _excluded = ["showTab", "layout", "list", "onChange", "amountSymbol", "scrollDom", "value", "loading", "emptyDescription"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
13
|
+
import { Skeleton } from 'antd';
|
|
14
|
+
import { PisellEmpty } from '@pisell/materials';
|
|
15
|
+
import { useMemoizedFn } from 'ahooks';
|
|
16
|
+
import { locales } from '@pisell/utils';
|
|
17
|
+
import Tabs from "../../../booking/components/TabProduct/tabs";
|
|
18
|
+
import ProductGroup, { ProductGroupSkeleton } from "../productGroup";
|
|
19
|
+
var io = null;
|
|
20
|
+
var TabProduct = function TabProduct(props) {
|
|
21
|
+
var _props$showTab = props.showTab,
|
|
22
|
+
showTab = _props$showTab === void 0 ? true : _props$showTab,
|
|
23
|
+
layout = props.layout,
|
|
24
|
+
list = props.list,
|
|
25
|
+
onChange = props.onChange,
|
|
26
|
+
_props$amountSymbol = props.amountSymbol,
|
|
27
|
+
amountSymbol = _props$amountSymbol === void 0 ? '$' : _props$amountSymbol,
|
|
28
|
+
scrollDom = props.scrollDom,
|
|
29
|
+
currentProductId = props.value,
|
|
30
|
+
loading = props.loading,
|
|
31
|
+
emptyDescription = props.emptyDescription,
|
|
32
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
33
|
+
var tabsRef = useRef();
|
|
34
|
+
var _useState = useState(1),
|
|
35
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
36
|
+
currentGroupId = _useState2[0],
|
|
37
|
+
setCurrentGroupId = _useState2[1];
|
|
38
|
+
useEffect(function () {
|
|
39
|
+
if (list !== null && list !== void 0 && list.length) {
|
|
40
|
+
setCurrentGroupId(list[0].id);
|
|
41
|
+
handleObserver();
|
|
42
|
+
}
|
|
43
|
+
}, [list]);
|
|
44
|
+
var handleObserver = useMemoizedFn(function () {
|
|
45
|
+
var _marginTop = 270;
|
|
46
|
+
var _marginBottom = window.innerHeight - 70 - 200 - 70;
|
|
47
|
+
var _rootMargin = "".concat(_marginTop * -1, "px 0px ").concat(_marginBottom * -1, "px 0px");
|
|
48
|
+
io = new IntersectionObserver(function (entries) {
|
|
49
|
+
if (entries[0].isIntersecting) {
|
|
50
|
+
var _entries$, _tabsRef$current;
|
|
51
|
+
var _entries$0$target$id$ = (_entries$ = entries[0]) === null || _entries$ === void 0 || (_entries$ = _entries$.target) === null || _entries$ === void 0 || (_entries$ = _entries$.id) === null || _entries$ === void 0 ? void 0 : _entries$.split('-'),
|
|
52
|
+
_entries$0$target$id$2 = _slicedToArray(_entries$0$target$id$, 2),
|
|
53
|
+
name = _entries$0$target$id$2[0],
|
|
54
|
+
id = _entries$0$target$id$2[1];
|
|
55
|
+
setCurrentGroupId(Number(id));
|
|
56
|
+
tabsRef === null || tabsRef === void 0 || (_tabsRef$current = tabsRef.current) === null || _tabsRef$current === void 0 || _tabsRef$current.scroll(id);
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
root: null,
|
|
60
|
+
rootMargin: _rootMargin
|
|
61
|
+
});
|
|
62
|
+
if (list !== null && list !== void 0 && list.length) {
|
|
63
|
+
var _iterator = _createForOfIteratorHelper(list),
|
|
64
|
+
_step;
|
|
65
|
+
try {
|
|
66
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
67
|
+
var item = _step.value;
|
|
68
|
+
var _item = document.querySelector("#list-".concat(item.id));
|
|
69
|
+
if (_item) {
|
|
70
|
+
io.observe(_item);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
} catch (err) {
|
|
74
|
+
_iterator.e(err);
|
|
75
|
+
} finally {
|
|
76
|
+
_iterator.f();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
var handleUnobserver = useMemoizedFn(function () {
|
|
81
|
+
if (list !== null && list !== void 0 && list.length && io) {
|
|
82
|
+
var _iterator2 = _createForOfIteratorHelper(list),
|
|
83
|
+
_step2;
|
|
84
|
+
try {
|
|
85
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
86
|
+
var item = _step2.value;
|
|
87
|
+
var _item = document.querySelector("#list-".concat(item.id));
|
|
88
|
+
if (_item) {
|
|
89
|
+
io.unobserve(_item);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
_iterator2.e(err);
|
|
94
|
+
} finally {
|
|
95
|
+
_iterator2.f();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
var renderContent = function renderContent() {
|
|
100
|
+
if (loading) {
|
|
101
|
+
return /*#__PURE__*/React.createElement(ProductGroupSkeleton, {
|
|
102
|
+
layout: layout
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
if (!(list !== null && list !== void 0 && list.length)) {
|
|
106
|
+
return /*#__PURE__*/React.createElement(PisellEmpty, {
|
|
107
|
+
description: emptyDescription || locales.getText('pisell2.product-select.empty')
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return list.map(function (item, i) {
|
|
111
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
id: "list-".concat(item.id),
|
|
113
|
+
key: i
|
|
114
|
+
}, /*#__PURE__*/React.createElement(ProductGroup, _extends({
|
|
115
|
+
onSelectProduct: onChange,
|
|
116
|
+
currentProductId: currentProductId,
|
|
117
|
+
key: item.id,
|
|
118
|
+
data: item,
|
|
119
|
+
layout: layout
|
|
120
|
+
}, rest)));
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
var tabSkeleton = useMemo(function () {
|
|
124
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
125
|
+
className: "booking-pisell-tabs"
|
|
126
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
className: "booking-pisell-tabs-btn-left",
|
|
128
|
+
style: {
|
|
129
|
+
marginLeft: 20,
|
|
130
|
+
width: 0
|
|
131
|
+
}
|
|
132
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
className: "booking-pisell-tabs-content"
|
|
134
|
+
}, /*#__PURE__*/React.createElement(Skeleton.Button, {
|
|
135
|
+
active: true,
|
|
136
|
+
size: 'large',
|
|
137
|
+
shape: 'round'
|
|
138
|
+
})));
|
|
139
|
+
}, []);
|
|
140
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showTab ? /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: "pisell-product-select-tabs-wrapper"
|
|
142
|
+
}, loading ? tabSkeleton : /*#__PURE__*/React.createElement(Tabs, {
|
|
143
|
+
ref: tabsRef,
|
|
144
|
+
options: list,
|
|
145
|
+
rowKey: 'id',
|
|
146
|
+
tab: currentGroupId,
|
|
147
|
+
onChange: function onChange(e) {
|
|
148
|
+
var _document, _document2;
|
|
149
|
+
var comWrapper = document.querySelector(".pisell-product-select-wrapper");
|
|
150
|
+
var categoryDom = document.querySelector('.pisell-product-select-tabs-wrapper');
|
|
151
|
+
var wrapperOffsetTop = comWrapper.offsetTop;
|
|
152
|
+
var top = 0;
|
|
153
|
+
if (categoryDom) {
|
|
154
|
+
top = categoryDom.offsetHeight;
|
|
155
|
+
}
|
|
156
|
+
var dom = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector('#list-' + e);
|
|
157
|
+
var main = (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector(scrollDom);
|
|
158
|
+
if (dom && main) {
|
|
159
|
+
var _list$;
|
|
160
|
+
if (e === ((_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.id)) {
|
|
161
|
+
main.scrollTop = 0;
|
|
162
|
+
} else {
|
|
163
|
+
main.scrollTop = dom.offsetTop - top - wrapperOffsetTop;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
handleUnobserver();
|
|
167
|
+
setCurrentGroupId(e);
|
|
168
|
+
setTimeout(function () {
|
|
169
|
+
handleObserver();
|
|
170
|
+
}, 1000);
|
|
171
|
+
}
|
|
172
|
+
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
173
|
+
className: "pisell-product-select-product-list"
|
|
174
|
+
}, renderContent()));
|
|
175
|
+
};
|
|
176
|
+
export default TabProduct;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Row, Col } from '@pisell/materials';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
var GridLayout = function GridLayout(_ref) {
|
|
5
|
+
var gridConfig = _ref.gridConfig,
|
|
6
|
+
items = _ref.items,
|
|
7
|
+
renderItem = _ref.renderItem;
|
|
8
|
+
var gridColumns = React.useMemo(function () {
|
|
9
|
+
if (!gridConfig) return [];
|
|
10
|
+
var columns = gridConfig.split(':').map(Number);
|
|
11
|
+
var isValid = columns.every(function (col) {
|
|
12
|
+
return col > 0 && Number.isInteger(col);
|
|
13
|
+
}) && columns.reduce(function (sum, col) {
|
|
14
|
+
return sum + col;
|
|
15
|
+
}, 0) <= 24;
|
|
16
|
+
return isValid ? columns : [12, 12];
|
|
17
|
+
}, [gridConfig]);
|
|
18
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
19
|
+
gutter: [12, 12],
|
|
20
|
+
className: "pisell-product-select-grid-layout"
|
|
21
|
+
}, items.map(function (item, index) {
|
|
22
|
+
return /*#__PURE__*/React.createElement(Col, {
|
|
23
|
+
key: index,
|
|
24
|
+
span: gridColumns.length > 0 ? gridColumns[index % gridColumns.length] : 12
|
|
25
|
+
}, renderItem(item));
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
28
|
+
export default GridLayout;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
export interface ProductCardConfig {
|
|
3
|
+
showImg: boolean;
|
|
4
|
+
imgWidth: string;
|
|
5
|
+
imgHeight: string;
|
|
6
|
+
showTitle: boolean;
|
|
7
|
+
showSpec: boolean;
|
|
8
|
+
showTags: boolean;
|
|
9
|
+
showPrice: boolean;
|
|
10
|
+
showOriginalPrice: boolean;
|
|
11
|
+
showZeroPrice: boolean;
|
|
12
|
+
showMarketingTag: boolean;
|
|
13
|
+
showRemark: boolean;
|
|
14
|
+
showStock: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface ProductGroupProps {
|
|
17
|
+
data: {
|
|
18
|
+
icon: string;
|
|
19
|
+
id: number;
|
|
20
|
+
name: string;
|
|
21
|
+
products: any[];
|
|
22
|
+
slug: string;
|
|
23
|
+
sort: number;
|
|
24
|
+
};
|
|
25
|
+
layout: {
|
|
26
|
+
grid: boolean;
|
|
27
|
+
config?: string;
|
|
28
|
+
};
|
|
29
|
+
onSelectProduct?: (id: number) => void;
|
|
30
|
+
currentProductId?: number;
|
|
31
|
+
}
|
|
32
|
+
declare const ProductGroup: ({ data, layout, onSelectProduct, currentProductId, showImg, imgWidth, imgHeight, showTitle, showSpec, showTags, showPrice, showOriginalPrice, showZeroPrice, showMarketingTag, showRemark, showStock, }: ProductGroupProps & ProductCardConfig) => JSX.Element;
|
|
33
|
+
export declare const ProductGroupSkeleton: ({ layout }: any) => JSX.Element;
|
|
34
|
+
export default ProductGroup;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import GridLayout from "../gridLayout";
|
|
4
|
+
import { PisellText } from '@pisell/materials';
|
|
5
|
+
import { locales } from '@pisell/utils';
|
|
6
|
+
import { Skeleton } from 'antd';
|
|
7
|
+
import "./index.less";
|
|
8
|
+
var ProductGroup = function ProductGroup(_ref) {
|
|
9
|
+
var data = _ref.data,
|
|
10
|
+
_ref$layout = _ref.layout,
|
|
11
|
+
layout = _ref$layout === void 0 ? {
|
|
12
|
+
grid: false
|
|
13
|
+
} : _ref$layout,
|
|
14
|
+
onSelectProduct = _ref.onSelectProduct,
|
|
15
|
+
currentProductId = _ref.currentProductId,
|
|
16
|
+
_ref$showImg = _ref.showImg,
|
|
17
|
+
showImg = _ref$showImg === void 0 ? true : _ref$showImg,
|
|
18
|
+
_ref$imgWidth = _ref.imgWidth,
|
|
19
|
+
imgWidth = _ref$imgWidth === void 0 ? '180px' : _ref$imgWidth,
|
|
20
|
+
_ref$imgHeight = _ref.imgHeight,
|
|
21
|
+
imgHeight = _ref$imgHeight === void 0 ? '126px' : _ref$imgHeight,
|
|
22
|
+
_ref$showTitle = _ref.showTitle,
|
|
23
|
+
showTitle = _ref$showTitle === void 0 ? true : _ref$showTitle,
|
|
24
|
+
_ref$showSpec = _ref.showSpec,
|
|
25
|
+
showSpec = _ref$showSpec === void 0 ? true : _ref$showSpec,
|
|
26
|
+
_ref$showTags = _ref.showTags,
|
|
27
|
+
showTags = _ref$showTags === void 0 ? true : _ref$showTags,
|
|
28
|
+
_ref$showPrice = _ref.showPrice,
|
|
29
|
+
showPrice = _ref$showPrice === void 0 ? true : _ref$showPrice,
|
|
30
|
+
_ref$showOriginalPric = _ref.showOriginalPrice,
|
|
31
|
+
showOriginalPrice = _ref$showOriginalPric === void 0 ? true : _ref$showOriginalPric,
|
|
32
|
+
_ref$showZeroPrice = _ref.showZeroPrice,
|
|
33
|
+
showZeroPrice = _ref$showZeroPrice === void 0 ? false : _ref$showZeroPrice,
|
|
34
|
+
_ref$showMarketingTag = _ref.showMarketingTag,
|
|
35
|
+
showMarketingTag = _ref$showMarketingTag === void 0 ? true : _ref$showMarketingTag,
|
|
36
|
+
_ref$showRemark = _ref.showRemark,
|
|
37
|
+
showRemark = _ref$showRemark === void 0 ? true : _ref$showRemark,
|
|
38
|
+
_ref$showStock = _ref.showStock,
|
|
39
|
+
showStock = _ref$showStock === void 0 ? true : _ref$showStock;
|
|
40
|
+
var _products = useMemo(function () {
|
|
41
|
+
var products = data.products;
|
|
42
|
+
return products;
|
|
43
|
+
}, [data]);
|
|
44
|
+
var getStockText = function getStockText(item) {
|
|
45
|
+
if (item.is_track === 0) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return "".concat(locales.getText('pisell2.product-select.stock'), "\uFF1A").concat(item.stock_quantity);
|
|
49
|
+
};
|
|
50
|
+
var renderPrice = function renderPrice(item) {
|
|
51
|
+
if (!showZeroPrice && !parseFloat(item.price)) return null;
|
|
52
|
+
return showPrice || showOriginalPrice ? /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
className: "price-info"
|
|
54
|
+
}, showPrice ? /*#__PURE__*/React.createElement("div", {
|
|
55
|
+
className: "price"
|
|
56
|
+
}, /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
57
|
+
value: item.price
|
|
58
|
+
})) : null, showOriginalPrice && parseFloat(item.original_price) ? /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
className: "original-price"
|
|
60
|
+
}, /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
61
|
+
value: item.original_price
|
|
62
|
+
})) : null) : null;
|
|
63
|
+
};
|
|
64
|
+
var renderItem = function renderItem(item) {
|
|
65
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: classNames('product-card', {
|
|
67
|
+
selected: currentProductId && item.id === currentProductId
|
|
68
|
+
}),
|
|
69
|
+
onClick: function onClick() {
|
|
70
|
+
onSelectProduct === null || onSelectProduct === void 0 || onSelectProduct(item);
|
|
71
|
+
}
|
|
72
|
+
}, showImg && item.cover ? /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: "card-left",
|
|
74
|
+
style: {
|
|
75
|
+
width: imgWidth || 'auto',
|
|
76
|
+
height: imgHeight || 'auto'
|
|
77
|
+
}
|
|
78
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
79
|
+
src: item.cover
|
|
80
|
+
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
className: "card-right"
|
|
82
|
+
}, showTitle ? /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: "title"
|
|
84
|
+
}, item.title) : null, showStock && !!item.is_track ? /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: "stock"
|
|
86
|
+
}, getStockText(item)) : null, renderPrice(item)));
|
|
87
|
+
};
|
|
88
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
"data-section": data.id,
|
|
90
|
+
className: "pisell-product-select-group"
|
|
91
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "group-title"
|
|
93
|
+
}, data.name), /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
style: {
|
|
95
|
+
padding: '16px 0'
|
|
96
|
+
}
|
|
97
|
+
}, layout !== null && layout !== void 0 && layout.grid && layout.config ? /*#__PURE__*/React.createElement(GridLayout, {
|
|
98
|
+
gridConfig: layout.config,
|
|
99
|
+
items: _products,
|
|
100
|
+
renderItem: renderItem
|
|
101
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
102
|
+
className: "group-row"
|
|
103
|
+
}, _products.map(function (item) {
|
|
104
|
+
return renderItem(item);
|
|
105
|
+
}))));
|
|
106
|
+
};
|
|
107
|
+
export var ProductGroupSkeleton = function ProductGroupSkeleton(_ref2) {
|
|
108
|
+
var layout = _ref2.layout;
|
|
109
|
+
var renderItem = function renderItem() {
|
|
110
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
111
|
+
className: classNames('product-card')
|
|
112
|
+
}, /*#__PURE__*/React.createElement(Skeleton.Image, {
|
|
113
|
+
active: true,
|
|
114
|
+
style: {
|
|
115
|
+
width: 180,
|
|
116
|
+
height: 126
|
|
117
|
+
}
|
|
118
|
+
}), /*#__PURE__*/React.createElement(Skeleton, {
|
|
119
|
+
active: true,
|
|
120
|
+
paragraph: {
|
|
121
|
+
rows: 2
|
|
122
|
+
}
|
|
123
|
+
}));
|
|
124
|
+
};
|
|
125
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
126
|
+
className: "pisell-product-select-group"
|
|
127
|
+
}, /*#__PURE__*/React.createElement(Skeleton.Input, {
|
|
128
|
+
active: true,
|
|
129
|
+
size: "small",
|
|
130
|
+
block: false
|
|
131
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
style: {
|
|
133
|
+
padding: '16px 0'
|
|
134
|
+
}
|
|
135
|
+
}, layout !== null && layout !== void 0 && layout.grid && layout.config ? /*#__PURE__*/React.createElement(GridLayout, {
|
|
136
|
+
gridConfig: layout.config,
|
|
137
|
+
items: [1, 2],
|
|
138
|
+
renderItem: renderItem
|
|
139
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
className: "group-row"
|
|
141
|
+
}, [1, 2, 3].map(function (item) {
|
|
142
|
+
return renderItem();
|
|
143
|
+
}))));
|
|
144
|
+
};
|
|
145
|
+
export default ProductGroup;
|