@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,58 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
3
|
+
|
|
4
|
+
const BookingDepositMeta: ComponentMetadata = {
|
|
5
|
+
"componentName": "AppointmentDeposit",
|
|
6
|
+
"title": "AppointmentDeposit",
|
|
7
|
+
"docUrl": "",
|
|
8
|
+
"screenshot": "",
|
|
9
|
+
"devMode": "proCode",
|
|
10
|
+
"npm": {
|
|
11
|
+
"package": "@pisell/private-materials",
|
|
12
|
+
"version": "1.0.4",
|
|
13
|
+
"exportName": "AppointmentDeposit",
|
|
14
|
+
"main": "src/index.ts",
|
|
15
|
+
"destructuring": true,
|
|
16
|
+
"subName": ""
|
|
17
|
+
},
|
|
18
|
+
"configure": {
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'title',
|
|
22
|
+
title: { label: '标题文案', tip: 'title | 标题文案' },
|
|
23
|
+
setter: 'StringSetter',
|
|
24
|
+
defaultValue: 'Deposit',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'isAgreePolicy',
|
|
28
|
+
title: { label: '同意协议', tip: 'isAgreePolicy | 同意协议' },
|
|
29
|
+
setter: 'BoolSetter',
|
|
30
|
+
defaultValue: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'isShowTitle',
|
|
34
|
+
title: { label: '标题显隐', tip: 'isShowTitle | 标题显隐' },
|
|
35
|
+
setter: 'BoolSetter',
|
|
36
|
+
defaultValue: true,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
"supports": {},
|
|
40
|
+
"component": {}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const snippets: Snippet[] = [
|
|
44
|
+
{
|
|
45
|
+
"title": "AppointmentDeposit",
|
|
46
|
+
"screenshot": "",
|
|
47
|
+
"schema": {
|
|
48
|
+
"componentName": "AppointmentDeposit",
|
|
49
|
+
"props": {
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
export default {
|
|
56
|
+
...BookingDepositMeta,
|
|
57
|
+
snippets
|
|
58
|
+
};
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IPublicTypeSnippet,
|
|
3
|
+
IPublicModelSettingField,
|
|
4
|
+
} from '@alilc/lowcode-types';
|
|
5
|
+
|
|
6
|
+
const snippets: IPublicTypeSnippet[] = [
|
|
7
|
+
{
|
|
8
|
+
title: '商品选择',
|
|
9
|
+
screenshot: '',
|
|
10
|
+
schema: {
|
|
11
|
+
componentName: 'ProductSelect',
|
|
12
|
+
props: {},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
const productSelectMeta = {
|
|
18
|
+
snippets,
|
|
19
|
+
componentName: 'ProductSelect',
|
|
20
|
+
title: 'ProductSelect',
|
|
21
|
+
category: '数据展示',
|
|
22
|
+
docUrl: '',
|
|
23
|
+
screenshot: '',
|
|
24
|
+
devMode: 'proCode',
|
|
25
|
+
npm: {
|
|
26
|
+
package: '@pisell/private-materials',
|
|
27
|
+
version: '1.0.1',
|
|
28
|
+
exportName: 'ProductSelect',
|
|
29
|
+
main: 'src/index.tsx',
|
|
30
|
+
destructuring: true,
|
|
31
|
+
subName: '',
|
|
32
|
+
},
|
|
33
|
+
props: [
|
|
34
|
+
{
|
|
35
|
+
title: { label: '数据' },
|
|
36
|
+
type: 'group',
|
|
37
|
+
display: 'block',
|
|
38
|
+
items: [
|
|
39
|
+
{
|
|
40
|
+
name: 'dataSource',
|
|
41
|
+
title: { label: '当前list数据', tip: '当前list数据' },
|
|
42
|
+
setter: ['JsonSetter', 'VariableSetter'],
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: { label: '样式' },
|
|
48
|
+
type: 'group',
|
|
49
|
+
display: 'block',
|
|
50
|
+
items: [
|
|
51
|
+
{
|
|
52
|
+
name: 'theme',
|
|
53
|
+
title: { label: '卡片样式' },
|
|
54
|
+
propType: { type: 'oneOf', value: ['dark', 'light'] },
|
|
55
|
+
setter: [
|
|
56
|
+
{
|
|
57
|
+
componentName: 'RadioGroupSetter',
|
|
58
|
+
props: {
|
|
59
|
+
options: [
|
|
60
|
+
{
|
|
61
|
+
title: 'Dark',
|
|
62
|
+
value: 'dark',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: 'Light',
|
|
66
|
+
value: 'light',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
defaultValue: 'Dark',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'showSearch',
|
|
76
|
+
title: { label: '全部商品tab', tip: '全部商品tab' },
|
|
77
|
+
propType: 'bool',
|
|
78
|
+
setter: 'BoolSetter',
|
|
79
|
+
defaultValue: true,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'showTab',
|
|
83
|
+
title: { label: '全部商品tab', tip: '全部商品tab' },
|
|
84
|
+
propType: 'bool',
|
|
85
|
+
setter: 'BoolSetter',
|
|
86
|
+
defaultValue: true,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: 'group',
|
|
90
|
+
items: [
|
|
91
|
+
{
|
|
92
|
+
name: 'layout.grid',
|
|
93
|
+
title: { label: '开启栅格', tip: '开启栅格' },
|
|
94
|
+
propType: 'bool',
|
|
95
|
+
setter: 'BoolSetter',
|
|
96
|
+
defaultValue: true,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'layout.config',
|
|
100
|
+
condition: (target: IPublicModelSettingField) => {
|
|
101
|
+
return target.parent.getPropValue('layout.grid') === true;
|
|
102
|
+
},
|
|
103
|
+
title: { label: '当前选中值', tip: '当前选中值' },
|
|
104
|
+
propType: 'string',
|
|
105
|
+
setter: 'StringSetter',
|
|
106
|
+
defaultValue: '12:12',
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
title: { label: '商品信息展示' },
|
|
114
|
+
type: 'group',
|
|
115
|
+
display: 'block',
|
|
116
|
+
items: [
|
|
117
|
+
{
|
|
118
|
+
name: 'showImg',
|
|
119
|
+
title: { label: '商品图片', tip: '是否展示商品图片' },
|
|
120
|
+
propType: 'bool',
|
|
121
|
+
setter: 'BoolSetter',
|
|
122
|
+
defaultValue: true,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'imgWidth',
|
|
126
|
+
condition: (target: IPublicModelSettingField) => {
|
|
127
|
+
return target.parent.getPropValue('showImg') === true;
|
|
128
|
+
},
|
|
129
|
+
title: { label: '商品图片宽度' },
|
|
130
|
+
propType: 'string',
|
|
131
|
+
setter: 'StringSetter',
|
|
132
|
+
defaultValue: '180px',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'imgHeight',
|
|
136
|
+
condition: (target: IPublicModelSettingField) => {
|
|
137
|
+
return target.parent.getPropValue('showImg') === true;
|
|
138
|
+
},
|
|
139
|
+
title: { label: '商品图片高度' },
|
|
140
|
+
propType: 'string',
|
|
141
|
+
setter: 'StringSetter',
|
|
142
|
+
defaultValue: '126px',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'showTitle',
|
|
146
|
+
title: { label: '商品名称' },
|
|
147
|
+
propType: 'bool',
|
|
148
|
+
setter: 'BoolSetter',
|
|
149
|
+
defaultValue: true,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'showSpec',
|
|
153
|
+
title: { label: '商品规格' },
|
|
154
|
+
propType: 'bool',
|
|
155
|
+
setter: 'BoolSetter',
|
|
156
|
+
defaultValue: true,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'showTags',
|
|
160
|
+
title: { label: '商品标签' },
|
|
161
|
+
propType: 'bool',
|
|
162
|
+
setter: 'BoolSetter',
|
|
163
|
+
defaultValue: true,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'showPrice',
|
|
167
|
+
title: { label: '价格' },
|
|
168
|
+
propType: 'bool',
|
|
169
|
+
setter: 'BoolSetter',
|
|
170
|
+
defaultValue: true,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'showOriginalPrice',
|
|
174
|
+
title: { label: '商品原价' },
|
|
175
|
+
propType: 'bool',
|
|
176
|
+
setter: 'BoolSetter',
|
|
177
|
+
defaultValue: true,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'showMarketingTag',
|
|
181
|
+
title: { label: '营销标记' },
|
|
182
|
+
propType: 'bool',
|
|
183
|
+
setter: 'BoolSetter',
|
|
184
|
+
defaultValue: true,
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'showRemark',
|
|
188
|
+
title: { label: '商品备注' },
|
|
189
|
+
propType: 'bool',
|
|
190
|
+
setter: 'BoolSetter',
|
|
191
|
+
defaultValue: true,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'showStock',
|
|
195
|
+
title: { label: '商品库存' },
|
|
196
|
+
propType: 'bool',
|
|
197
|
+
setter: 'BoolSetter',
|
|
198
|
+
defaultValue: true,
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
configure: {
|
|
204
|
+
supports: {
|
|
205
|
+
style: true,
|
|
206
|
+
events: [
|
|
207
|
+
{
|
|
208
|
+
name: 'onSelectItemChange',
|
|
209
|
+
template:
|
|
210
|
+
"onSelectItemChange(value,${extParams}){\n// 关闭时触发的回调函数\nconsole.log('onChange');}",
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
export default productSelectMeta;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
3
|
+
|
|
4
|
+
const SubTotalMeta: ComponentMetadata = {
|
|
5
|
+
"componentName": "SubTotal",
|
|
6
|
+
"title": "SubTotal",
|
|
7
|
+
"docUrl": "",
|
|
8
|
+
"screenshot": "",
|
|
9
|
+
"devMode": "proCode",
|
|
10
|
+
"npm": {
|
|
11
|
+
"package": "@pisell/private-materials",
|
|
12
|
+
"version": "1.0.4",
|
|
13
|
+
"exportName": "SubTotal",
|
|
14
|
+
"main": "src/index.ts",
|
|
15
|
+
"destructuring": true,
|
|
16
|
+
"subName": ""
|
|
17
|
+
},
|
|
18
|
+
"configure": {
|
|
19
|
+
"props": [
|
|
20
|
+
{
|
|
21
|
+
"title": {
|
|
22
|
+
"label": {
|
|
23
|
+
"type": "i18n",
|
|
24
|
+
"en-US": "List",
|
|
25
|
+
"zh-CN": "列表"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"name": "list",
|
|
29
|
+
"setter": ["JsonSetter", "VariableSetter"],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "mode",
|
|
33
|
+
title: {
|
|
34
|
+
label: {
|
|
35
|
+
type: "i18n",
|
|
36
|
+
"en-US": "mode",
|
|
37
|
+
"zh-CN": "模式",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
setter: [
|
|
41
|
+
{
|
|
42
|
+
componentName: "RadioGroupSetter",
|
|
43
|
+
props: {
|
|
44
|
+
options: [
|
|
45
|
+
{
|
|
46
|
+
title: "默认",
|
|
47
|
+
value: "column1",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: "紧凑",
|
|
51
|
+
value: "column2",
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
"VariableSetter",
|
|
57
|
+
],
|
|
58
|
+
defaultValue: "column1",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"title": {
|
|
62
|
+
"label": {
|
|
63
|
+
"type": "i18n",
|
|
64
|
+
"en-US": "Describe",
|
|
65
|
+
"zh-CN": "描述"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"name": "describe",
|
|
69
|
+
"setter": ["StringSetter", "VariableSetter"],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
"supports": {
|
|
73
|
+
"style": true,
|
|
74
|
+
"events": [{
|
|
75
|
+
"name": "onSubTotal"
|
|
76
|
+
}]
|
|
77
|
+
},
|
|
78
|
+
"component": {}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const snippets: Snippet[] = [
|
|
82
|
+
{
|
|
83
|
+
"title": "SubTotal",
|
|
84
|
+
"screenshot": "",
|
|
85
|
+
"schema": {
|
|
86
|
+
"componentName": "SubTotal",
|
|
87
|
+
"props": {
|
|
88
|
+
list: [
|
|
89
|
+
{
|
|
90
|
+
key: 'deposit',
|
|
91
|
+
value: 0,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
key: 'total',
|
|
95
|
+
value: 0,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
key: 'sub_total',
|
|
99
|
+
value: 0,
|
|
100
|
+
count: 1,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: 'tax',
|
|
104
|
+
value: 0,
|
|
105
|
+
tax: {
|
|
106
|
+
rate: 0.1,
|
|
107
|
+
is_price_include_tax: true,
|
|
108
|
+
title: 'GST',
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
key: 'delivery_fee',
|
|
113
|
+
value: 0,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
key: 'point_deduction',
|
|
117
|
+
value: 0,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: 'member_deduction',
|
|
121
|
+
value: 0,
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
describe: 'Describe',
|
|
125
|
+
mode: "column1",
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
|
|
131
|
+
export default {
|
|
132
|
+
...SubTotalMeta,
|
|
133
|
+
snippets
|
|
134
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const snippets = [
|
|
2
|
+
{
|
|
3
|
+
"title": "TicketBooking",
|
|
4
|
+
"screenshot": "",
|
|
5
|
+
"schema": {
|
|
6
|
+
"componentName": "TicketBooking",
|
|
7
|
+
"props": {}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
];
|
|
11
|
+
const TicketBookingMeta = {
|
|
12
|
+
"snippets": snippets,
|
|
13
|
+
"componentName": "TicketBooking",
|
|
14
|
+
"title": "TicketBooking",
|
|
15
|
+
"docUrl": "",
|
|
16
|
+
"screenshot": "",
|
|
17
|
+
"devMode": "proCode",
|
|
18
|
+
"npm": {
|
|
19
|
+
"package": "@pisell/private-materials",
|
|
20
|
+
"version": "1.0.1",
|
|
21
|
+
"exportName": "TicketBooking",
|
|
22
|
+
"main": "src/index.ts",
|
|
23
|
+
"destructuring": true,
|
|
24
|
+
"subName": ""
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export default TicketBookingMeta;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
-
"@pisell/materials": "3.2.26",
|
|
63
62
|
"@pisell/utils": "1.0.42",
|
|
63
|
+
"@pisell/materials": "3.3.0",
|
|
64
64
|
"@pisell/icon": "0.0.11",
|
|
65
65
|
"@pisell/date-picker": "3.0.2"
|
|
66
66
|
},
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface ApplicableProductDetails {
|
|
4
|
-
amount: string;
|
|
5
|
-
type: string;
|
|
6
|
-
resource_id: number;
|
|
7
|
-
title: string;
|
|
8
|
-
original_amount: string;
|
|
9
|
-
}
|
|
10
|
-
interface Discount {
|
|
11
|
-
id: number;
|
|
12
|
-
product_name: string;
|
|
13
|
-
encoded: string;
|
|
14
|
-
code: string;
|
|
15
|
-
tag: string;
|
|
16
|
-
expire_time?: string;
|
|
17
|
-
product_id: number;
|
|
18
|
-
relation_type: string;
|
|
19
|
-
par_value: string;
|
|
20
|
-
used_par_value: string;
|
|
21
|
-
limit_status: string;
|
|
22
|
-
limited_relation_product_data: any;
|
|
23
|
-
balance: string;
|
|
24
|
-
format_title: any;
|
|
25
|
-
product: any;
|
|
26
|
-
savedAmount: number;
|
|
27
|
-
isDisabled: boolean;
|
|
28
|
-
isSelected?: boolean;
|
|
29
|
-
isAvailable?: boolean;
|
|
30
|
-
isUsed?: boolean;
|
|
31
|
-
applicableProductIds?: number[];
|
|
32
|
-
applicableProductDetails: ApplicableProductDetails[];
|
|
33
|
-
appliedProductDetails: any[];
|
|
34
|
-
}
|
|
35
|
-
export interface PisellGoodPassCardProps {
|
|
36
|
-
/**数据源 */
|
|
37
|
-
dataSource: Array<Discount>;
|
|
38
|
-
/**事件 */
|
|
39
|
-
onChange?: (current: {
|
|
40
|
-
id: string | number;
|
|
41
|
-
isSelected: boolean;
|
|
42
|
-
}) => void;
|
|
43
|
-
/**样式 */
|
|
44
|
-
style: React.CSSProperties;
|
|
45
|
-
}
|
|
46
|
-
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
47
|
-
export default index;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
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."); }
|
|
9
|
-
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); }
|
|
10
|
-
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; }
|
|
11
|
-
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; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useState } from 'react';
|
|
14
|
-
import { Checkbox, Divider, Typography } from 'antd';
|
|
15
|
-
import { locales } from '@pisell/utils';
|
|
16
|
-
import { PisellText, PisellCard, PisellModal } from '@pisell/materials';
|
|
17
|
-
import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
18
|
-
import "./index.less";
|
|
19
|
-
var clsPrefix = 'pisell-good-pass-card';
|
|
20
|
-
var index = function index(props) {
|
|
21
|
-
var _context$appHelper;
|
|
22
|
-
var context = useEngineContext();
|
|
23
|
-
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
24
|
-
translationShop = _context$appHelper$ut.translationShop;
|
|
25
|
-
var _props$dataSource = props.dataSource,
|
|
26
|
-
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
|
|
27
|
-
onChange = props.onChange,
|
|
28
|
-
_props$style = props.style,
|
|
29
|
-
style = _props$style === void 0 ? {} : _props$style;
|
|
30
|
-
var _useState = useState(false),
|
|
31
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
-
showModal = _useState2[0],
|
|
33
|
-
setShowModal = _useState2[1];
|
|
34
|
-
console.log('pisell good card datasource', dataSource);
|
|
35
|
-
var handleChange = function handleChange(newValue) {
|
|
36
|
-
if (onChange) {
|
|
37
|
-
onChange(newValue);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
var handleItemChange = function handleItemChange(item, checked) {
|
|
41
|
-
handleChange({
|
|
42
|
-
id: item.id,
|
|
43
|
-
isSelected: checked
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
var renderVoucherContent = function renderVoucherContent(item) {
|
|
47
|
-
return /*#__PURE__*/React.createElement("span", null, "Save ", /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
48
|
-
value: item.savedAmount
|
|
49
|
-
}));
|
|
50
|
-
};
|
|
51
|
-
var renderActionElement = function renderActionElement(item) {
|
|
52
|
-
var isChecked = item.isSelected;
|
|
53
|
-
return /*#__PURE__*/React.createElement(Checkbox, {
|
|
54
|
-
disabled: item.isDisabled,
|
|
55
|
-
style: {
|
|
56
|
-
marginLeft: 8
|
|
57
|
-
},
|
|
58
|
-
checked: isChecked,
|
|
59
|
-
onChange: function onChange(e) {
|
|
60
|
-
return handleItemChange(item, e.target.checked);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
var renderVoucherItem = function renderVoucherItem(item) {
|
|
65
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
key: item.id,
|
|
67
|
-
className: "".concat(clsPrefix, "-voucher-item")
|
|
68
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: "item-title"
|
|
70
|
-
}, translationShop(item.format_title)), /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
className: "item-content"
|
|
72
|
-
}, renderVoucherContent(item), renderActionElement(item)));
|
|
73
|
-
};
|
|
74
|
-
var renderModal = function renderModal() {
|
|
75
|
-
return /*#__PURE__*/React.createElement(PisellModal, {
|
|
76
|
-
title: 'Vouchers',
|
|
77
|
-
footer: null,
|
|
78
|
-
open: showModal,
|
|
79
|
-
onCancel: function onCancel() {
|
|
80
|
-
return setShowModal(false);
|
|
81
|
-
},
|
|
82
|
-
className: "".concat(clsPrefix, "-all-items-modal")
|
|
83
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
84
|
-
style: {
|
|
85
|
-
padding: '10px 0'
|
|
86
|
-
}
|
|
87
|
-
}, dataSource.map(renderVoucherItem)));
|
|
88
|
-
};
|
|
89
|
-
var renderMixedMode = function renderMixedMode() {
|
|
90
|
-
var list = dataSource.length > 3 ? dataSource.slice(0, 3) : dataSource;
|
|
91
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
92
|
-
className: "".concat(clsPrefix, "-header")
|
|
93
|
-
}, /*#__PURE__*/React.createElement("div", null, locales.getText('pisell2.text.goodpass.product-vouchers')), /*#__PURE__*/React.createElement(Typography.Text, {
|
|
94
|
-
underline: true,
|
|
95
|
-
onClick: function onClick() {
|
|
96
|
-
return setShowModal(true);
|
|
97
|
-
}
|
|
98
|
-
}, locales.getText('pisell2.text.goodpass.view-more'))), /*#__PURE__*/React.createElement(Divider, {
|
|
99
|
-
style: {
|
|
100
|
-
margin: 4
|
|
101
|
-
}
|
|
102
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
103
|
-
className: "".concat(clsPrefix, "-body")
|
|
104
|
-
}, list.map(renderVoucherItem)));
|
|
105
|
-
};
|
|
106
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, renderModal(), /*#__PURE__*/React.createElement(PisellCard, {
|
|
107
|
-
padding: 8,
|
|
108
|
-
borderRadius: 8,
|
|
109
|
-
style: _objectSpread({
|
|
110
|
-
width: 378
|
|
111
|
-
}, style),
|
|
112
|
-
className: clsPrefix
|
|
113
|
-
}, renderMixedMode()));
|
|
114
|
-
};
|
|
115
|
-
export default index;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
.pisell-good-pass-card-all-items-modal,
|
|
2
|
-
.pisell-good-pass-card {
|
|
3
|
-
.pisell-good-pass-card-header,
|
|
4
|
-
.pisell-good-pass-card-group-header {
|
|
5
|
-
display: flex;
|
|
6
|
-
justify-content: space-between;
|
|
7
|
-
align-items: center;
|
|
8
|
-
color: var(--Gray-900, #101828);
|
|
9
|
-
text-align: center;
|
|
10
|
-
font-family: Inter;
|
|
11
|
-
font-size: 14px;
|
|
12
|
-
font-style: normal;
|
|
13
|
-
font-weight: 600;
|
|
14
|
-
line-height: 20px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.pisell-good-pass-card-voucher-item {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: space-between;
|
|
21
|
-
height: 22px;
|
|
22
|
-
|
|
23
|
-
.item-title {
|
|
24
|
-
color: var(--Gray-500, #667085);
|
|
25
|
-
text-align: center;
|
|
26
|
-
font-family: Inter;
|
|
27
|
-
font-size: 14px;
|
|
28
|
-
font-style: normal;
|
|
29
|
-
font-weight: 600;
|
|
30
|
-
line-height: 20px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.item-content {
|
|
34
|
-
color: var(--, #8157d5);
|
|
35
|
-
font-family: Inter;
|
|
36
|
-
font-size: 14px;
|
|
37
|
-
font-style: normal;
|
|
38
|
-
font-weight: 400;
|
|
39
|
-
line-height: 20px;
|
|
40
|
-
|
|
41
|
-
.add-btn {
|
|
42
|
-
color: var(--, #8157d5);
|
|
43
|
-
text-align: center;
|
|
44
|
-
font-family: Inter;
|
|
45
|
-
font-size: 14px;
|
|
46
|
-
font-style: normal;
|
|
47
|
-
font-weight: 600;
|
|
48
|
-
line-height: 20px; /* 142.857% */
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|