@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
|
@@ -0,0 +1,172 @@
|
|
|
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/productSelect/components/TabProduct/index.tsx
|
|
30
|
+
var TabProduct_exports = {};
|
|
31
|
+
__export(TabProduct_exports, {
|
|
32
|
+
default: () => TabProduct_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(TabProduct_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_materials = require("@pisell/materials");
|
|
38
|
+
var import_ahooks = require("ahooks");
|
|
39
|
+
var import_utils = require("@pisell/utils");
|
|
40
|
+
var import_tabs = __toESM(require("../../../booking/components/TabProduct/tabs"));
|
|
41
|
+
var import_productGroup = __toESM(require("../productGroup"));
|
|
42
|
+
var io = null;
|
|
43
|
+
var TabProduct = (props) => {
|
|
44
|
+
const {
|
|
45
|
+
showTab = true,
|
|
46
|
+
layout,
|
|
47
|
+
list,
|
|
48
|
+
onChange,
|
|
49
|
+
amountSymbol = "$",
|
|
50
|
+
scrollDom,
|
|
51
|
+
value: currentProductId,
|
|
52
|
+
loading,
|
|
53
|
+
emptyDescription,
|
|
54
|
+
...rest
|
|
55
|
+
} = props;
|
|
56
|
+
const tabsRef = (0, import_react.useRef)();
|
|
57
|
+
const [currentGroupId, setCurrentGroupId] = (0, import_react.useState)(1);
|
|
58
|
+
(0, import_react.useEffect)(() => {
|
|
59
|
+
if (list == null ? void 0 : list.length) {
|
|
60
|
+
setCurrentGroupId(list[0].id);
|
|
61
|
+
handleObserver();
|
|
62
|
+
}
|
|
63
|
+
}, [list]);
|
|
64
|
+
const handleObserver = (0, import_ahooks.useMemoizedFn)(() => {
|
|
65
|
+
const _marginTop = 270;
|
|
66
|
+
const _marginBottom = window.innerHeight - 70 - 200 - 70;
|
|
67
|
+
const _rootMargin = `${_marginTop * -1}px 0px ${_marginBottom * -1}px 0px`;
|
|
68
|
+
io = new IntersectionObserver(
|
|
69
|
+
(entries) => {
|
|
70
|
+
var _a, _b, _c, _d;
|
|
71
|
+
if (entries[0].isIntersecting) {
|
|
72
|
+
const [name, id] = (_c = (_b = (_a = entries[0]) == null ? void 0 : _a.target) == null ? void 0 : _b.id) == null ? void 0 : _c.split("-");
|
|
73
|
+
setCurrentGroupId(Number(id));
|
|
74
|
+
(_d = tabsRef == null ? void 0 : tabsRef.current) == null ? void 0 : _d.scroll(id);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
root: null,
|
|
79
|
+
rootMargin: _rootMargin
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
if (list == null ? void 0 : list.length) {
|
|
83
|
+
for (const item of list) {
|
|
84
|
+
const _item = document.querySelector(`#list-${item.id}`);
|
|
85
|
+
if (_item) {
|
|
86
|
+
io.observe(_item);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
const handleUnobserver = (0, import_ahooks.useMemoizedFn)(() => {
|
|
92
|
+
if ((list == null ? void 0 : list.length) && io) {
|
|
93
|
+
for (const item of list) {
|
|
94
|
+
const _item = document.querySelector(`#list-${item.id}`);
|
|
95
|
+
if (_item) {
|
|
96
|
+
io.unobserve(_item);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
const renderContent = () => {
|
|
102
|
+
if (loading) {
|
|
103
|
+
return /* @__PURE__ */ import_react.default.createElement(import_productGroup.ProductGroupSkeleton, { layout });
|
|
104
|
+
}
|
|
105
|
+
if (!(list == null ? void 0 : list.length)) {
|
|
106
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
107
|
+
import_materials.PisellEmpty,
|
|
108
|
+
{
|
|
109
|
+
description: emptyDescription || import_utils.locales.getText("pisell2.product-select.empty")
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
return list.map((item, i) => {
|
|
114
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { id: `list-${item.id}`, key: i }, /* @__PURE__ */ import_react.default.createElement(
|
|
115
|
+
import_productGroup.default,
|
|
116
|
+
{
|
|
117
|
+
onSelectProduct: onChange,
|
|
118
|
+
currentProductId,
|
|
119
|
+
key: item.id,
|
|
120
|
+
data: item,
|
|
121
|
+
layout,
|
|
122
|
+
...rest
|
|
123
|
+
}
|
|
124
|
+
));
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
const tabSkeleton = (0, import_react.useMemo)(() => {
|
|
128
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-pisell-tabs" }, /* @__PURE__ */ import_react.default.createElement(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
className: "booking-pisell-tabs-btn-left",
|
|
132
|
+
style: { marginLeft: 20, width: 0 }
|
|
133
|
+
}
|
|
134
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-pisell-tabs-content" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton.Button, { active: true, size: "large", shape: "round" })));
|
|
135
|
+
}, []);
|
|
136
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showTab ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-product-select-tabs-wrapper" }, loading ? tabSkeleton : /* @__PURE__ */ import_react.default.createElement(
|
|
137
|
+
import_tabs.default,
|
|
138
|
+
{
|
|
139
|
+
ref: tabsRef,
|
|
140
|
+
options: list,
|
|
141
|
+
rowKey: "id",
|
|
142
|
+
tab: currentGroupId,
|
|
143
|
+
onChange: (e) => {
|
|
144
|
+
var _a;
|
|
145
|
+
let comWrapper = document.querySelector(".pisell-product-select-wrapper");
|
|
146
|
+
let categoryDom = document.querySelector(
|
|
147
|
+
".pisell-product-select-tabs-wrapper"
|
|
148
|
+
);
|
|
149
|
+
let wrapperOffsetTop = comWrapper.offsetTop;
|
|
150
|
+
let top = 0;
|
|
151
|
+
if (categoryDom) {
|
|
152
|
+
top = categoryDom.offsetHeight;
|
|
153
|
+
}
|
|
154
|
+
const dom = document == null ? void 0 : document.querySelector("#list-" + e);
|
|
155
|
+
const main = document == null ? void 0 : document.querySelector(scrollDom);
|
|
156
|
+
if (dom && main) {
|
|
157
|
+
if (e === ((_a = list[0]) == null ? void 0 : _a.id)) {
|
|
158
|
+
main.scrollTop = 0;
|
|
159
|
+
} else {
|
|
160
|
+
main.scrollTop = dom.offsetTop - top - wrapperOffsetTop;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
handleUnobserver();
|
|
164
|
+
setCurrentGroupId(e);
|
|
165
|
+
setTimeout(() => {
|
|
166
|
+
handleObserver();
|
|
167
|
+
}, 1e3);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
)) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-product-select-product-list" }, renderContent()));
|
|
171
|
+
};
|
|
172
|
+
var TabProduct_default = TabProduct;
|
|
@@ -0,0 +1,58 @@
|
|
|
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/productSelect/components/gridLayout/index.tsx
|
|
30
|
+
var gridLayout_exports = {};
|
|
31
|
+
__export(gridLayout_exports, {
|
|
32
|
+
default: () => gridLayout_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(gridLayout_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var GridLayout = ({
|
|
39
|
+
gridConfig,
|
|
40
|
+
items,
|
|
41
|
+
renderItem
|
|
42
|
+
}) => {
|
|
43
|
+
const gridColumns = import_react.default.useMemo(() => {
|
|
44
|
+
if (!gridConfig) return [];
|
|
45
|
+
const columns = gridConfig.split(":").map(Number);
|
|
46
|
+
const isValid = columns.every((col) => col > 0 && Number.isInteger(col)) && columns.reduce((sum, col) => sum + col, 0) <= 24;
|
|
47
|
+
return isValid ? columns : [12, 12];
|
|
48
|
+
}, [gridConfig]);
|
|
49
|
+
return /* @__PURE__ */ import_react.default.createElement(import_materials.Row, { gutter: [12, 12], className: "pisell-product-select-grid-layout" }, items.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
50
|
+
import_materials.Col,
|
|
51
|
+
{
|
|
52
|
+
key: index,
|
|
53
|
+
span: gridColumns.length > 0 ? gridColumns[index % gridColumns.length] : 12
|
|
54
|
+
},
|
|
55
|
+
renderItem(item)
|
|
56
|
+
)));
|
|
57
|
+
};
|
|
58
|
+
var gridLayout_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,122 @@
|
|
|
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/productSelect/components/productGroup/index.tsx
|
|
30
|
+
var productGroup_exports = {};
|
|
31
|
+
__export(productGroup_exports, {
|
|
32
|
+
ProductGroupSkeleton: () => ProductGroupSkeleton,
|
|
33
|
+
default: () => productGroup_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(productGroup_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_gridLayout = __toESM(require("../gridLayout"));
|
|
39
|
+
var import_materials = require("@pisell/materials");
|
|
40
|
+
var import_utils = require("@pisell/utils");
|
|
41
|
+
var import_antd = require("antd");
|
|
42
|
+
var import_index = require("./index.less");
|
|
43
|
+
var ProductGroup = ({
|
|
44
|
+
data,
|
|
45
|
+
layout = { grid: false },
|
|
46
|
+
onSelectProduct,
|
|
47
|
+
currentProductId,
|
|
48
|
+
showImg = true,
|
|
49
|
+
imgWidth = "180px",
|
|
50
|
+
imgHeight = "126px",
|
|
51
|
+
showTitle = true,
|
|
52
|
+
showSpec = true,
|
|
53
|
+
showTags = true,
|
|
54
|
+
showPrice = true,
|
|
55
|
+
showOriginalPrice = true,
|
|
56
|
+
showZeroPrice = false,
|
|
57
|
+
showMarketingTag = true,
|
|
58
|
+
showRemark = true,
|
|
59
|
+
showStock = true
|
|
60
|
+
}) => {
|
|
61
|
+
const _products = (0, import_react.useMemo)(() => {
|
|
62
|
+
const { products } = data;
|
|
63
|
+
return products;
|
|
64
|
+
}, [data]);
|
|
65
|
+
const getStockText = (item) => {
|
|
66
|
+
if (item.is_track === 0) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return `${import_utils.locales.getText("pisell2.product-select.stock")}:${item.stock_quantity}`;
|
|
70
|
+
};
|
|
71
|
+
const renderPrice = (item) => {
|
|
72
|
+
if (!showZeroPrice && !parseFloat(item.price)) return null;
|
|
73
|
+
return showPrice || showOriginalPrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: "price-info" }, showPrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: "price" }, /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: item.price })) : null, showOriginalPrice && parseFloat(item.original_price) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "original-price" }, /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: item.original_price })) : null) : null;
|
|
74
|
+
};
|
|
75
|
+
const renderItem = (item) => /* @__PURE__ */ import_react.default.createElement(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: (0, import_classnames.default)("product-card", {
|
|
79
|
+
selected: currentProductId && item.id === currentProductId
|
|
80
|
+
}),
|
|
81
|
+
onClick: () => {
|
|
82
|
+
onSelectProduct == null ? void 0 : onSelectProduct(item);
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
showImg && item.cover ? /* @__PURE__ */ import_react.default.createElement(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
className: "card-left",
|
|
89
|
+
style: {
|
|
90
|
+
width: imgWidth || "auto",
|
|
91
|
+
height: imgHeight || "auto"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
/* @__PURE__ */ import_react.default.createElement("img", { src: item.cover })
|
|
95
|
+
) : null,
|
|
96
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "card-right" }, showTitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "title" }, item.title) : null, showStock && !!item.is_track ? /* @__PURE__ */ import_react.default.createElement("div", { className: "stock" }, getStockText(item)) : null, renderPrice(item))
|
|
97
|
+
);
|
|
98
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { "data-section": data.id, className: "pisell-product-select-group" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "group-title" }, data.name), /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "16px 0" } }, (layout == null ? void 0 : layout.grid) && layout.config ? /* @__PURE__ */ import_react.default.createElement(
|
|
99
|
+
import_gridLayout.default,
|
|
100
|
+
{
|
|
101
|
+
gridConfig: layout.config,
|
|
102
|
+
items: _products,
|
|
103
|
+
renderItem
|
|
104
|
+
}
|
|
105
|
+
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "group-row" }, _products.map((item) => renderItem(item)))));
|
|
106
|
+
};
|
|
107
|
+
var ProductGroupSkeleton = ({ layout }) => {
|
|
108
|
+
const renderItem = () => /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("product-card") }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton.Image, { active: true, style: { width: 180, height: 126 } }), /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { active: true, paragraph: { rows: 2 } }));
|
|
109
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-product-select-group" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton.Input, { active: true, size: "small", block: false }), /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "16px 0" } }, (layout == null ? void 0 : layout.grid) && layout.config ? /* @__PURE__ */ import_react.default.createElement(
|
|
110
|
+
import_gridLayout.default,
|
|
111
|
+
{
|
|
112
|
+
gridConfig: layout.config,
|
|
113
|
+
items: [1, 2],
|
|
114
|
+
renderItem
|
|
115
|
+
}
|
|
116
|
+
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "group-row" }, [1, 2, 3].map((item) => renderItem()))));
|
|
117
|
+
};
|
|
118
|
+
var productGroup_default = ProductGroup;
|
|
119
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
120
|
+
0 && (module.exports = {
|
|
121
|
+
ProductGroupSkeleton
|
|
122
|
+
});
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
.pisell-product-select-group {
|
|
2
|
+
.group-title {
|
|
3
|
+
color: var(--ps-category-text-color, #000);
|
|
4
|
+
font-family: Inter;
|
|
5
|
+
font-size: 18px;
|
|
6
|
+
font-style: normal;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
line-height: 24px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.group-row {
|
|
12
|
+
.product-card {
|
|
13
|
+
min-width: 363px;
|
|
14
|
+
max-width: 737px;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
margin-top: 12px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.product-card {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
border-radius: 12px;
|
|
23
|
+
background: var(--ps-card-bg, #fff);
|
|
24
|
+
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
25
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
|
|
26
|
+
padding: 8px;
|
|
27
|
+
display: flex;
|
|
28
|
+
padding: 8px;
|
|
29
|
+
gap: 20px;
|
|
30
|
+
position: relative;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
min-height: 142px;
|
|
33
|
+
height: 100%;
|
|
34
|
+
align-items: center;
|
|
35
|
+
|
|
36
|
+
// 只在非触摸设备上启用hover效果
|
|
37
|
+
@media (hover: hover) {
|
|
38
|
+
&:hover {
|
|
39
|
+
background: var(--ps-card-hover-bg, #eaecf0);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.selected {
|
|
44
|
+
background: var(--ps-card-selected-bg, #8157d5);
|
|
45
|
+
|
|
46
|
+
.card-right {
|
|
47
|
+
.title,
|
|
48
|
+
.price {
|
|
49
|
+
color: var(--ps-card-selected-text-color, '#FFFFFF');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.spec-item,
|
|
53
|
+
.original-price,
|
|
54
|
+
.stock {
|
|
55
|
+
color: var(
|
|
56
|
+
--ps-card-selected-secondary-text-color,
|
|
57
|
+
rgba(255, 255, 255, 0.7)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.marketing-tags-wrapper {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 0;
|
|
66
|
+
left: 0;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
user-select: none;
|
|
69
|
+
z-index: 1;
|
|
70
|
+
|
|
71
|
+
.marketing-tags {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
row-gap: 6px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.marketing-tag-item {
|
|
78
|
+
display: flex;
|
|
79
|
+
padding: 6px 10px;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: 10px;
|
|
83
|
+
border-radius: 0 12px 12px 0;
|
|
84
|
+
background: var(--Error-100, #fee4e2);
|
|
85
|
+
color: var(--Error-700, #b42318);
|
|
86
|
+
text-align: center;
|
|
87
|
+
font-family: Inter;
|
|
88
|
+
font-size: 14px;
|
|
89
|
+
font-style: normal;
|
|
90
|
+
font-weight: 500;
|
|
91
|
+
line-height: 20px;
|
|
92
|
+
|
|
93
|
+
&:nth-of-type(1) {
|
|
94
|
+
border-radius: 0 0 12px 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.card-left {
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
|
|
102
|
+
img {
|
|
103
|
+
border-radius: 8px;
|
|
104
|
+
background: url(<path-to-image>) lightgray 50% / cover no-repeat;
|
|
105
|
+
width: 100%;
|
|
106
|
+
height: 100%;
|
|
107
|
+
object-fit: cover;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.card-right {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
row-gap: 8px;
|
|
115
|
+
min-height: 92px;
|
|
116
|
+
.title {
|
|
117
|
+
color: var(--ps-card-text, #1B1B1B);
|
|
118
|
+
font-family: Inter;
|
|
119
|
+
font-size: 18px;
|
|
120
|
+
font-style: normal;
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
line-height: 28px;
|
|
123
|
+
display: -webkit-box;
|
|
124
|
+
-webkit-line-clamp: 2;
|
|
125
|
+
-webkit-box-orient: vertical;
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
text-overflow: ellipsis;
|
|
128
|
+
// word-break: break-word;
|
|
129
|
+
}
|
|
130
|
+
.stock,
|
|
131
|
+
.specs {
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
color: var(--ps-color-text-secondary, #4E4E4E);
|
|
134
|
+
text-overflow: ellipsis;
|
|
135
|
+
font-family: Inter;
|
|
136
|
+
font-size: 14px;
|
|
137
|
+
font-style: normal;
|
|
138
|
+
font-weight: 500;
|
|
139
|
+
line-height: 20px;
|
|
140
|
+
|
|
141
|
+
.spec-item {
|
|
142
|
+
margin-top: 8px;
|
|
143
|
+
|
|
144
|
+
&:nth-of-type(1) {
|
|
145
|
+
margin-top: 0;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
.tags {
|
|
150
|
+
display: flex;
|
|
151
|
+
gap: 8px;
|
|
152
|
+
flex-wrap: wrap;
|
|
153
|
+
|
|
154
|
+
.tag-item {
|
|
155
|
+
display: flex;
|
|
156
|
+
padding: 4px 12px;
|
|
157
|
+
align-items: center;
|
|
158
|
+
border-radius: 16px;
|
|
159
|
+
border: 1px solid var(--Error-200, #fecdca);
|
|
160
|
+
background: var(--Error-50, #fef3f2);
|
|
161
|
+
mix-blend-mode: multiply;
|
|
162
|
+
color: var(--Error-700, #b42318);
|
|
163
|
+
text-align: center;
|
|
164
|
+
font-family: Inter;
|
|
165
|
+
font-size: 14px;
|
|
166
|
+
font-style: normal;
|
|
167
|
+
font-weight: 500;
|
|
168
|
+
line-height: 20px;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
.price-info {
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
gap: 8px;
|
|
175
|
+
}
|
|
176
|
+
.price {
|
|
177
|
+
color: var(--ps-card-text, #1B1B1B);
|
|
178
|
+
font-family: Inter;
|
|
179
|
+
font-size: 18px;
|
|
180
|
+
font-style: normal;
|
|
181
|
+
font-weight: 600;
|
|
182
|
+
line-height: 28px;
|
|
183
|
+
}
|
|
184
|
+
.original-price {
|
|
185
|
+
color: var(--ps-color-text-secondary, #4E4E4E);
|
|
186
|
+
font-family: Inter;
|
|
187
|
+
font-size: 16px;
|
|
188
|
+
font-style: normal;
|
|
189
|
+
font-weight: 400;
|
|
190
|
+
line-height: 24px;
|
|
191
|
+
text-decoration-line: line-through;
|
|
192
|
+
|
|
193
|
+
> span {
|
|
194
|
+
vertical-align: middle;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.remark {
|
|
199
|
+
color: var(--Warning-600, #dc6803);
|
|
200
|
+
font-family: Inter;
|
|
201
|
+
font-size: 14px;
|
|
202
|
+
font-style: normal;
|
|
203
|
+
font-weight: 600;
|
|
204
|
+
line-height: 20px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ProductSelectToken } from '../theme/token';
|
|
2
|
+
export declare function useToken(customToken?: Partial<ProductSelectToken>): {
|
|
3
|
+
colorPrimary: string;
|
|
4
|
+
colorText: string;
|
|
5
|
+
colorTextSecondary: string;
|
|
6
|
+
searchInputColor: string;
|
|
7
|
+
containerBg: string;
|
|
8
|
+
tabItemBg: string;
|
|
9
|
+
tabItemHoverBg: string;
|
|
10
|
+
tabItemActiveBg: string;
|
|
11
|
+
categoryTextColor: string;
|
|
12
|
+
cardBg: string;
|
|
13
|
+
cardHoverBg: string;
|
|
14
|
+
cardSelectedBg: string;
|
|
15
|
+
cardSelectedTextColor: string;
|
|
16
|
+
cardSelectedSecondaryTextColor: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function genCSSVars(token: ProductSelectToken): Record<string, string>;
|
|
@@ -0,0 +1,51 @@
|
|
|
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/productSelect/hooks/useToken.ts
|
|
20
|
+
var useToken_exports = {};
|
|
21
|
+
__export(useToken_exports, {
|
|
22
|
+
genCSSVars: () => genCSSVars,
|
|
23
|
+
useToken: () => useToken
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(useToken_exports);
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_token = require("../theme/token");
|
|
28
|
+
function useToken(customToken) {
|
|
29
|
+
return (0, import_react.useMemo)(() => {
|
|
30
|
+
let contextToken = null;
|
|
31
|
+
return {
|
|
32
|
+
...import_token.defaultToken,
|
|
33
|
+
...contextToken || {},
|
|
34
|
+
...customToken || {}
|
|
35
|
+
};
|
|
36
|
+
}, [customToken]);
|
|
37
|
+
}
|
|
38
|
+
function genCSSVars(token) {
|
|
39
|
+
const cssVars = {};
|
|
40
|
+
console.log("token", token);
|
|
41
|
+
Object.entries(token).forEach(([key, value]) => {
|
|
42
|
+
const cssKey = `--ps-${key.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)}`;
|
|
43
|
+
cssVars[cssKey] = value;
|
|
44
|
+
});
|
|
45
|
+
return cssVars;
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
genCSSVars,
|
|
50
|
+
useToken
|
|
51
|
+
});
|