@pisell/private-materials 6.5.27 → 6.6.1
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/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +146 -165
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/components/actionButtons/index.js +34 -20
- package/es/components/booking/components/customSelect/index.js +1 -1
- package/es/components/booking/components/footer/amount.js +25 -8
- package/es/components/booking/components/footer/index.js +66 -33
- package/es/components/booking/components/footer/utils.d.ts +7 -0
- package/es/components/booking/components/footer/utils.js +126 -99
- package/es/components/booking/components/voucher/index.js +25 -9
- package/es/components/booking/dashboard/serve.js +1 -6
- package/es/components/booking/forms/footer.js +24 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/forms/serve.js +2 -12
- package/es/components/booking/hooks/useQuotation.js +69 -21
- package/es/components/booking/info/client/index.js +28 -13
- package/es/components/booking/info/client/serve.js +2 -11
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
- package/es/components/booking/info/main.js +3 -2
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/pet/serve.js +1 -6
- package/es/components/booking/info/service/Lists.d.ts +1 -1
- package/es/components/booking/info/service/Lists.js +10 -4
- package/es/components/booking/info/service/addTimeModal/serve.js +1 -11
- package/es/components/booking/info/service/serve.d.ts +14 -0
- package/es/components/booking/info/service/serve.js +25 -18
- package/es/components/booking/info/service2/Group/utils.js +2 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -33
- package/es/components/booking/info/service2/utils.js +92 -56
- package/es/components/booking/info/utils.js +5 -0
- package/es/components/booking/info2/cartClientCard/index.js +49 -9
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/serve.js +1 -6
- package/es/components/booking/info2/service/addService/index.js +146 -89
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +83 -14
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
- package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/es/components/booking/info2/service/editService/index.js +313 -57
- package/es/components/booking/info2/utilsByBooking.js +19 -14
- package/es/components/booking/locales.d.ts +36 -0
- package/es/components/booking/locales.js +48 -3
- package/es/components/booking/model.d.ts +4 -0
- package/es/components/booking/model.js +3 -0
- package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/es/components/booking/utils/confirmHolderModal.js +318 -0
- package/es/components/booking/utils/confirmHolderModal.less +40 -0
- package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/es/components/booking/utils/selectHolderModal.js +407 -0
- package/es/components/booking/utils.d.ts +16 -7
- package/es/components/booking/utils.js +26 -37
- package/es/components/checkout/PaymentModal.js +61 -30
- package/es/components/checkout/components/CashPaymentModule/index.js +1 -7
- package/es/components/checkout/components/ScrollableList/index.js +0 -1
- package/es/components/checkout/locales.d.ts +3 -0
- package/es/components/checkout/locales.js +3 -0
- package/es/components/eftposPay/linkly/index.js +64 -2
- package/es/components/eftposPay/tyro/index.js +12 -0
- package/es/components/list/List.js +3 -0
- package/es/components/pay/toB/components/MX51/index.js +14 -44
- package/es/components/pay/toB/types/index.d.ts +0 -12
- package/es/components/pay/toB/types/index.js +0 -4
- package/es/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -5
- package/es/components/shoppingCart/components/Cart/Product.js +6 -3
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +419 -794
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -4
- package/es/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
- package/es/components/ticketBooking/components/menuBar/index.js +109 -12
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
- package/es/components/ticketBooking/components/ticketBooking/index.js +32 -61
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.js +1 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +122 -170
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/index.js +0 -2
- package/es/components/ticketBooking/serve.js +17 -119
- package/es/components/ticketBooking/utils/index.d.ts +7 -1
- package/es/components/ticketBooking/utils/index.js +44 -28
- package/es/hooks/useEngineContext.d.ts +0 -1
- package/es/hooks/useEngineContext.js +0 -7
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +28 -30
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +7 -4
- package/es/plus/clinetSearch/types.d.ts +12 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +41 -0
- package/es/plus/contactInfoModal/index.js +155 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
- package/es/plus/productSelect/ProductCard/index.js +1 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
- package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
- package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/es/plus/selectHolder/components/HolderList/index.js +43 -0
- package/es/plus/selectHolder/index.d.ts +7 -0
- package/es/plus/selectHolder/index.js +273 -0
- package/es/plus/selectHolder/index.less +137 -0
- package/es/plus/selectHolder/locales.d.ts +24 -0
- package/es/plus/selectHolder/locales.js +29 -0
- package/es/plus/selectHolder/types.d.ts +104 -0
- package/es/plus/selectHolder/types.js +1 -0
- package/es/plus/selectHolder/utils.d.ts +9 -0
- package/es/plus/selectHolder/utils.js +16 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +357 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/es/pro/multiDayTimeSelect/index.js +1 -0
- package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/es/pro/multiDayTimeSelect/types.js +1 -0
- package/es/pro/skuDetailModal/types.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +6 -3
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/components/actionButtons/index.js +11 -2
- package/lib/components/booking/components/customSelect/index.js +1 -1
- package/lib/components/booking/components/footer/amount.js +23 -6
- package/lib/components/booking/components/footer/index.js +26 -5
- package/lib/components/booking/components/footer/utils.d.ts +7 -0
- package/lib/components/booking/components/footer/utils.js +120 -82
- package/lib/components/booking/components/voucher/index.js +10 -1
- package/lib/components/booking/dashboard/serve.js +1 -6
- package/lib/components/booking/forms/footer.js +29 -11
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/forms/serve.js +2 -12
- package/lib/components/booking/hooks/useQuotation.js +45 -13
- package/lib/components/booking/info/client/index.js +14 -1
- package/lib/components/booking/info/client/serve.js +2 -13
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
- package/lib/components/booking/info/main.js +5 -4
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/pet/serve.js +1 -6
- package/lib/components/booking/info/service/Lists.d.ts +1 -1
- package/lib/components/booking/info/service/Lists.js +5 -3
- package/lib/components/booking/info/service/addTimeModal/serve.js +1 -7
- package/lib/components/booking/info/service/serve.d.ts +14 -0
- package/lib/components/booking/info/service/serve.js +8 -17
- package/lib/components/booking/info/service2/Group/utils.js +2 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -33
- package/lib/components/booking/info/service2/utils.js +38 -29
- package/lib/components/booking/info/utils.js +4 -0
- package/lib/components/booking/info2/cartClientCard/index.js +34 -5
- package/lib/components/booking/info2/index.js +11 -5
- package/lib/components/booking/info2/serve.js +1 -6
- package/lib/components/booking/info2/service/addService/index.js +22 -3
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +48 -11
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
- package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/lib/components/booking/info2/service/editService/index.js +254 -32
- package/lib/components/booking/info2/utilsByBooking.js +26 -19
- package/lib/components/booking/locales.d.ts +36 -0
- package/lib/components/booking/locales.js +42 -3
- package/lib/components/booking/model.d.ts +4 -0
- package/lib/components/booking/model.js +3 -0
- package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/lib/components/booking/utils/confirmHolderModal.js +253 -0
- package/lib/components/booking/utils/confirmHolderModal.less +40 -0
- package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/lib/components/booking/utils/selectHolderModal.js +319 -0
- package/lib/components/booking/utils.d.ts +16 -7
- package/lib/components/booking/utils.js +18 -21
- package/lib/components/checkout/PaymentModal.js +41 -18
- package/lib/components/checkout/components/CashPaymentModule/index.js +1 -7
- package/lib/components/checkout/components/ScrollableList/index.js +0 -1
- package/lib/components/checkout/locales.d.ts +3 -0
- package/lib/components/checkout/locales.js +3 -0
- package/lib/components/eftposPay/linkly/index.js +31 -1
- package/lib/components/eftposPay/tyro/index.js +12 -0
- package/lib/components/list/List.js +3 -0
- package/lib/components/pay/toB/components/MX51/index.js +12 -37
- package/lib/components/pay/toB/types/index.d.ts +0 -12
- package/lib/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -8
- package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +279 -313
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +5 -3
- package/lib/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
- package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
- package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -49
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.js +1 -3
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +69 -98
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.js +0 -2
- package/lib/components/ticketBooking/serve.js +15 -117
- package/lib/components/ticketBooking/utils/index.d.ts +7 -1
- package/lib/components/ticketBooking/utils/index.js +29 -23
- package/lib/hooks/useEngineContext.d.ts +0 -1
- package/lib/hooks/useEngineContext.js +2 -10
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +17 -8
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +7 -4
- package/lib/plus/clinetSearch/types.d.ts +12 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +41 -0
- package/lib/plus/contactInfoModal/index.js +139 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
- package/lib/plus/productSelect/ProductCard/index.js +1 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.js +30 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
- package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/lib/plus/selectHolder/components/HolderList/index.js +63 -0
- package/lib/plus/selectHolder/index.d.ts +7 -0
- package/lib/plus/selectHolder/index.js +223 -0
- package/lib/plus/selectHolder/index.less +137 -0
- package/lib/plus/selectHolder/locales.d.ts +24 -0
- package/lib/plus/selectHolder/locales.js +47 -0
- package/lib/plus/selectHolder/types.d.ts +104 -0
- package/lib/plus/selectHolder/types.js +17 -0
- package/lib/plus/selectHolder/utils.d.ts +9 -0
- package/lib/plus/selectHolder/utils.js +34 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/lib/{hooks/printer.js → pro/multiDayTimeSelect/index.js} +6 -31
- package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/lib/pro/multiDayTimeSelect/types.js +17 -0
- package/lib/pro/skuDetailModal/types.d.ts +1 -0
- package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -0
- package/lowcode/event-select-holder/meta.ts +2 -2
- package/lowcode/select-holder/meta.ts +220 -0
- package/lowcode/select-holder/snippets.ts +41 -0
- package/package.json +13 -11
- package/es/hooks/printer.d.ts +0 -4
- package/es/hooks/printer.js +0 -35
- package/lib/hooks/printer.d.ts +0 -4
|
@@ -0,0 +1,304 @@
|
|
|
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/pro/multiDayTimeSelect/MultiDayTimeSelect.tsx
|
|
30
|
+
var MultiDayTimeSelect_exports = {};
|
|
31
|
+
__export(MultiDayTimeSelect_exports, {
|
|
32
|
+
default: () => MultiDayTimeSelect_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(MultiDayTimeSelect_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_icons = require("@ant-design/icons");
|
|
37
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
38
|
+
var import_materials = require("@pisell/materials");
|
|
39
|
+
var import_antd = require("antd");
|
|
40
|
+
var import_utils = require("@pisell/utils");
|
|
41
|
+
var import_MultiDayTimeSelect = require("./MultiDayTimeSelect.less");
|
|
42
|
+
var RangePicker = import_materials.DatePicker.RangePicker;
|
|
43
|
+
var MultiDayTimeSelect = (0, import_react.forwardRef)(({
|
|
44
|
+
maxDays = 30,
|
|
45
|
+
defaultStartDate,
|
|
46
|
+
separateStartEnd = false,
|
|
47
|
+
value,
|
|
48
|
+
onChange,
|
|
49
|
+
locale = "en",
|
|
50
|
+
disabled = false,
|
|
51
|
+
startDateLabel,
|
|
52
|
+
endDateLabel,
|
|
53
|
+
durationLabel
|
|
54
|
+
}, ref) => {
|
|
55
|
+
const [form] = import_antd.Form.useForm();
|
|
56
|
+
const [internalValue, setInternalValue] = (0, import_react.useState)(null);
|
|
57
|
+
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
58
|
+
validate: async () => {
|
|
59
|
+
await form.validateFields();
|
|
60
|
+
},
|
|
61
|
+
getValue: () => internalValue
|
|
62
|
+
}));
|
|
63
|
+
const formatLocale = (0, import_react.useMemo)(() => {
|
|
64
|
+
const isEn = locale === "en" || locale === "en-US";
|
|
65
|
+
return isEn ? "DD/MM/YYYY" : "YYYY-MM-DD";
|
|
66
|
+
}, [locale]);
|
|
67
|
+
const durationOptions = (0, import_react.useMemo)(() => {
|
|
68
|
+
const options = [];
|
|
69
|
+
for (let i = 1; i <= maxDays; i++) {
|
|
70
|
+
options.push({
|
|
71
|
+
label: `${i} ${i === 1 ? locale === "en" ? "day" : "天" : locale === "en" ? "days" : "天"}`,
|
|
72
|
+
value: i
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return options;
|
|
76
|
+
}, [maxDays, locale]);
|
|
77
|
+
(0, import_react.useEffect)(() => {
|
|
78
|
+
if (value) {
|
|
79
|
+
setInternalValue(value);
|
|
80
|
+
form.setFieldsValue({
|
|
81
|
+
dateRange: separateStartEnd ? void 0 : [value.startDate, value.endDate],
|
|
82
|
+
startDate: separateStartEnd ? value.startDate : void 0,
|
|
83
|
+
endDate: separateStartEnd ? value.endDate : void 0,
|
|
84
|
+
duration: value.duration
|
|
85
|
+
});
|
|
86
|
+
} else {
|
|
87
|
+
const startDate = defaultStartDate || (0, import_dayjs.default)();
|
|
88
|
+
const endDate = startDate.add(1, "day");
|
|
89
|
+
const initialValue = {
|
|
90
|
+
startDate,
|
|
91
|
+
endDate,
|
|
92
|
+
duration: 1
|
|
93
|
+
};
|
|
94
|
+
setInternalValue(initialValue);
|
|
95
|
+
form.setFieldsValue({
|
|
96
|
+
dateRange: separateStartEnd ? void 0 : [startDate, endDate],
|
|
97
|
+
startDate: separateStartEnd ? startDate : void 0,
|
|
98
|
+
endDate: separateStartEnd ? endDate : void 0,
|
|
99
|
+
duration: 1
|
|
100
|
+
});
|
|
101
|
+
onChange == null ? void 0 : onChange(initialValue);
|
|
102
|
+
}
|
|
103
|
+
}, [value, defaultStartDate, separateStartEnd, form, onChange]);
|
|
104
|
+
const updateValue = (newValue) => {
|
|
105
|
+
setInternalValue(newValue);
|
|
106
|
+
onChange == null ? void 0 : onChange(newValue);
|
|
107
|
+
};
|
|
108
|
+
const handleDateRangeChange = (dates) => {
|
|
109
|
+
if (dates && dates[0] && dates[1]) {
|
|
110
|
+
const days = dates[1].diff(dates[0], "day");
|
|
111
|
+
let finalEndDate = dates[1];
|
|
112
|
+
let finalDuration = days;
|
|
113
|
+
if (days > maxDays) {
|
|
114
|
+
const endTime = {
|
|
115
|
+
hour: dates[1].hour(),
|
|
116
|
+
minute: dates[1].minute(),
|
|
117
|
+
second: dates[1].second(),
|
|
118
|
+
millisecond: dates[1].millisecond()
|
|
119
|
+
};
|
|
120
|
+
finalEndDate = dates[0].add(maxDays, "day");
|
|
121
|
+
finalEndDate = finalEndDate.hour(endTime.hour).minute(endTime.minute).second(endTime.second).millisecond(endTime.millisecond);
|
|
122
|
+
finalDuration = maxDays;
|
|
123
|
+
}
|
|
124
|
+
if (days > 0) {
|
|
125
|
+
const newValue = {
|
|
126
|
+
startDate: dates[0],
|
|
127
|
+
endDate: finalEndDate,
|
|
128
|
+
duration: finalDuration
|
|
129
|
+
};
|
|
130
|
+
updateValue(newValue);
|
|
131
|
+
form.setFieldsValue({
|
|
132
|
+
dateRange: [dates[0], finalEndDate],
|
|
133
|
+
duration: finalDuration
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const handleStartDateChange = (date) => {
|
|
139
|
+
if (date && internalValue) {
|
|
140
|
+
const currentEndDate = internalValue.endDate;
|
|
141
|
+
const endTime = {
|
|
142
|
+
hour: currentEndDate.hour(),
|
|
143
|
+
minute: currentEndDate.minute(),
|
|
144
|
+
second: currentEndDate.second(),
|
|
145
|
+
millisecond: currentEndDate.millisecond()
|
|
146
|
+
};
|
|
147
|
+
const targetDuration = Math.min(internalValue.duration, maxDays);
|
|
148
|
+
let newEndDate = date.add(targetDuration, "day");
|
|
149
|
+
const finalEndDate = newEndDate.hour(endTime.hour).minute(endTime.minute).second(endTime.second).millisecond(endTime.millisecond);
|
|
150
|
+
const newValue = {
|
|
151
|
+
startDate: date,
|
|
152
|
+
endDate: finalEndDate,
|
|
153
|
+
duration: targetDuration
|
|
154
|
+
};
|
|
155
|
+
updateValue(newValue);
|
|
156
|
+
form.setFieldsValue({
|
|
157
|
+
endDate: finalEndDate,
|
|
158
|
+
duration: targetDuration
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
const handleEndDateChange = (date) => {
|
|
163
|
+
if (date && internalValue) {
|
|
164
|
+
const days = date.diff(internalValue.startDate, "day");
|
|
165
|
+
let finalEndDate = date;
|
|
166
|
+
let finalDuration = days;
|
|
167
|
+
if (days > maxDays) {
|
|
168
|
+
const endTime = {
|
|
169
|
+
hour: date.hour(),
|
|
170
|
+
minute: date.minute(),
|
|
171
|
+
second: date.second(),
|
|
172
|
+
millisecond: date.millisecond()
|
|
173
|
+
};
|
|
174
|
+
finalEndDate = internalValue.startDate.add(maxDays, "day");
|
|
175
|
+
finalEndDate = finalEndDate.hour(endTime.hour).minute(endTime.minute).second(endTime.second).millisecond(endTime.millisecond);
|
|
176
|
+
finalDuration = maxDays;
|
|
177
|
+
}
|
|
178
|
+
if (days > 0) {
|
|
179
|
+
const newValue = {
|
|
180
|
+
startDate: internalValue.startDate,
|
|
181
|
+
endDate: finalEndDate,
|
|
182
|
+
duration: finalDuration
|
|
183
|
+
};
|
|
184
|
+
updateValue(newValue);
|
|
185
|
+
form.setFieldsValue({
|
|
186
|
+
endDate: finalEndDate,
|
|
187
|
+
duration: finalDuration
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
const handleDurationChange = (durationValue) => {
|
|
193
|
+
if (internalValue) {
|
|
194
|
+
const newEndDate = internalValue.startDate.add(durationValue, "day");
|
|
195
|
+
const newValue = {
|
|
196
|
+
startDate: internalValue.startDate,
|
|
197
|
+
endDate: newEndDate,
|
|
198
|
+
duration: durationValue
|
|
199
|
+
};
|
|
200
|
+
updateValue(newValue);
|
|
201
|
+
if (separateStartEnd) {
|
|
202
|
+
form.setFieldsValue({ endDate: newEndDate });
|
|
203
|
+
} else {
|
|
204
|
+
form.setFieldsValue({ dateRange: [internalValue.startDate, newEndDate] });
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { form, layout: "vertical", className: "multi-day-time-select-form" }, separateStartEnd ? /* @__PURE__ */ import_react.default.createElement("div", { className: "multi-day-time-select-row" }, /* @__PURE__ */ import_react.default.createElement(
|
|
209
|
+
import_antd.Form.Item,
|
|
210
|
+
{
|
|
211
|
+
label: startDateLabel || import_utils.locales.getText("pisell2.text.start_date"),
|
|
212
|
+
name: "startDate",
|
|
213
|
+
rules: [{ required: true, message: startDateLabel || import_utils.locales.getText("pisell2.text.start_date") }],
|
|
214
|
+
style: { flex: 1 }
|
|
215
|
+
},
|
|
216
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
217
|
+
import_materials.DatePicker,
|
|
218
|
+
{
|
|
219
|
+
inputReadOnly: true,
|
|
220
|
+
allowClear: false,
|
|
221
|
+
size: "large",
|
|
222
|
+
style: { width: "100%", padding: 0 },
|
|
223
|
+
suffixIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CalendarOutlined, null),
|
|
224
|
+
value: internalValue == null ? void 0 : internalValue.startDate,
|
|
225
|
+
onChange: handleStartDateChange,
|
|
226
|
+
format: formatLocale,
|
|
227
|
+
isHideCustomSelect: true,
|
|
228
|
+
disabled
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
232
|
+
import_antd.Form.Item,
|
|
233
|
+
{
|
|
234
|
+
label: endDateLabel || import_utils.locales.getText("pisell2.text.end_date"),
|
|
235
|
+
name: "endDate",
|
|
236
|
+
rules: [{ required: true, message: endDateLabel || import_utils.locales.getText("pisell2.text.end_date") }],
|
|
237
|
+
style: { flex: 1 }
|
|
238
|
+
},
|
|
239
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
240
|
+
import_materials.DatePicker,
|
|
241
|
+
{
|
|
242
|
+
inputReadOnly: true,
|
|
243
|
+
allowClear: false,
|
|
244
|
+
size: "large",
|
|
245
|
+
style: { width: "100%", padding: 0 },
|
|
246
|
+
suffixIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CalendarOutlined, null),
|
|
247
|
+
value: internalValue == null ? void 0 : internalValue.endDate,
|
|
248
|
+
onChange: handleEndDateChange,
|
|
249
|
+
format: formatLocale,
|
|
250
|
+
isHideCustomSelect: true,
|
|
251
|
+
disabled,
|
|
252
|
+
disabledDate: (current) => {
|
|
253
|
+
if (internalValue == null ? void 0 : internalValue.startDate) {
|
|
254
|
+
return current.isSameOrBefore(internalValue.startDate, "day");
|
|
255
|
+
}
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
)
|
|
260
|
+
)) : /* @__PURE__ */ import_react.default.createElement("div", { className: "multi-day-time-select-row" }, /* @__PURE__ */ import_react.default.createElement(
|
|
261
|
+
import_antd.Form.Item,
|
|
262
|
+
{
|
|
263
|
+
label: startDateLabel || import_utils.locales.getText("pisell2.text.start_date"),
|
|
264
|
+
name: "dateRange",
|
|
265
|
+
rules: [{ required: true, message: startDateLabel || import_utils.locales.getText("pisell2.text.start_date") }],
|
|
266
|
+
style: { flex: 1 }
|
|
267
|
+
},
|
|
268
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.Page, { isRenderPisellConfigProvider: false }, /* @__PURE__ */ import_react.default.createElement(
|
|
269
|
+
RangePicker,
|
|
270
|
+
{
|
|
271
|
+
inputReadOnly: true,
|
|
272
|
+
allowClear: false,
|
|
273
|
+
size: "large",
|
|
274
|
+
style: { width: "100%", padding: 0 },
|
|
275
|
+
suffixIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CalendarOutlined, null),
|
|
276
|
+
value: internalValue ? [internalValue.startDate, internalValue.endDate] : null,
|
|
277
|
+
onChange: handleDateRangeChange,
|
|
278
|
+
format: formatLocale,
|
|
279
|
+
isHideCustomSelect: true,
|
|
280
|
+
endDateDays: 1,
|
|
281
|
+
disabled
|
|
282
|
+
}
|
|
283
|
+
))
|
|
284
|
+
)), /* @__PURE__ */ import_react.default.createElement(
|
|
285
|
+
import_antd.Form.Item,
|
|
286
|
+
{
|
|
287
|
+
label: durationLabel || import_utils.locales.getText("pisell2.text.duration"),
|
|
288
|
+
name: "duration",
|
|
289
|
+
rules: [{ required: true, message: durationLabel || import_utils.locales.getText("pisell2.text.duration") }]
|
|
290
|
+
},
|
|
291
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
292
|
+
import_antd.Select,
|
|
293
|
+
{
|
|
294
|
+
size: "large",
|
|
295
|
+
value: internalValue == null ? void 0 : internalValue.duration,
|
|
296
|
+
onChange: handleDurationChange,
|
|
297
|
+
options: durationOptions,
|
|
298
|
+
disabled
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
));
|
|
302
|
+
});
|
|
303
|
+
MultiDayTimeSelect.displayName = "MultiDayTimeSelect";
|
|
304
|
+
var MultiDayTimeSelect_default = MultiDayTimeSelect;
|
|
@@ -26,35 +26,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// src/
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
32
|
-
default: () =>
|
|
29
|
+
// src/pro/multiDayTimeSelect/index.tsx
|
|
30
|
+
var multiDayTimeSelect_exports = {};
|
|
31
|
+
__export(multiDayTimeSelect_exports, {
|
|
32
|
+
default: () => import_MultiDayTimeSelect.default
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var usePrinter = () => {
|
|
37
|
-
var _a;
|
|
38
|
-
const context = (0, import_useEngineContext.default)();
|
|
39
|
-
const { action } = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
40
|
-
const nativePrint = (data, callback) => {
|
|
41
|
-
action({
|
|
42
|
-
type: "webpos.handlePrint",
|
|
43
|
-
data,
|
|
44
|
-
callback: (res) => {
|
|
45
|
-
if (typeof (res == null ? void 0 : res.status) === "string") {
|
|
46
|
-
callback == null ? void 0 : callback({
|
|
47
|
-
...res || {},
|
|
48
|
-
result: (res == null ? void 0 : res.status) == "success" ? true : false
|
|
49
|
-
});
|
|
50
|
-
} else {
|
|
51
|
-
callback == null ? void 0 : callback(res);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
return {
|
|
57
|
-
nativePrint
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
var printer_default = usePrinter;
|
|
34
|
+
module.exports = __toCommonJS(multiDayTimeSelect_exports);
|
|
35
|
+
var import_MultiDayTimeSelect = __toESM(require("./MultiDayTimeSelect"));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
export interface MultiDayTimeSelectValue {
|
|
3
|
+
startDate: Dayjs;
|
|
4
|
+
endDate: Dayjs;
|
|
5
|
+
duration: number;
|
|
6
|
+
}
|
|
7
|
+
export interface MultiDayTimeSelectProps {
|
|
8
|
+
/** 最大天数,默认30天 */
|
|
9
|
+
maxDays?: number;
|
|
10
|
+
/** 默认开始时间 */
|
|
11
|
+
defaultStartDate?: Dayjs;
|
|
12
|
+
/** 开始时间和结束时间是否分离,false使用RangePicker,true使用两个独立的DatePicker */
|
|
13
|
+
separateStartEnd?: boolean;
|
|
14
|
+
/** 受控值 */
|
|
15
|
+
value?: MultiDayTimeSelectValue;
|
|
16
|
+
/** 值变化回调 */
|
|
17
|
+
onChange?: (value: MultiDayTimeSelectValue) => void;
|
|
18
|
+
/** 语言环境 */
|
|
19
|
+
locale?: string;
|
|
20
|
+
/** 是否禁用 */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** 开始日期标签 */
|
|
23
|
+
startDateLabel?: string;
|
|
24
|
+
/** 结束日期标签 */
|
|
25
|
+
endDateLabel?: string;
|
|
26
|
+
/** 时长标签 */
|
|
27
|
+
durationLabel?: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/pro/multiDayTimeSelect/types.ts
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '宽度',
|
|
4
|
+
name: 'style.width',
|
|
5
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
title: '高度',
|
|
9
|
+
name: 'style.height',
|
|
10
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
title: '显示边框',
|
|
14
|
+
name: 'style.borderStyle',
|
|
15
|
+
setter: {
|
|
16
|
+
componentName: 'RadioGroupSetter',
|
|
17
|
+
props: {
|
|
18
|
+
options: [
|
|
19
|
+
{
|
|
20
|
+
label: '显示边框',
|
|
21
|
+
value: 'solid',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: '无边框',
|
|
25
|
+
value: 'none',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
initialValue: 'solid',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: '边框粗细',
|
|
34
|
+
name: 'style.borderWidth',
|
|
35
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
36
|
+
defaultValue: 1,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: '边框颜色',
|
|
40
|
+
name: 'style.borderColor',
|
|
41
|
+
setter: ['ColorSetter'],
|
|
42
|
+
defaultValue: '#D0D5DD',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
title: '圆角',
|
|
46
|
+
name: 'style.borderRadius',
|
|
47
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
48
|
+
defaultValue: 8,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: '内边距',
|
|
52
|
+
name: 'style.padding',
|
|
53
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
54
|
+
defaultValue: 8,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
title: { label: '左右间距', tip: '头像与内容之间间距' },
|
|
58
|
+
name: 'horizontalGap',
|
|
59
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
60
|
+
defaultValue: 8,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: { label: '字段', tip: '字段上下间距' },
|
|
64
|
+
name: 'verticalGap',
|
|
65
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
66
|
+
defaultValue: 4,
|
|
67
|
+
},
|
|
68
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
type: 'group',
|
|
4
|
+
display: 'plain',
|
|
5
|
+
title: '姓名样式',
|
|
6
|
+
items: [
|
|
7
|
+
{
|
|
8
|
+
title: '文本大小',
|
|
9
|
+
name: 'nameStyle.fontSize',
|
|
10
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
11
|
+
defaultValue: 14,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: '文本粗细',
|
|
15
|
+
name: 'nameStyle.fontWeight',
|
|
16
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
17
|
+
defaultValue: 600,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: '文本颜色',
|
|
21
|
+
name: 'nameStyle.color',
|
|
22
|
+
setter: ['ColorSetter'],
|
|
23
|
+
defaultValue: '#101828',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: '文本下划线',
|
|
27
|
+
name: 'nameStyle.textDecoration',
|
|
28
|
+
setter: ['StringSetter'],
|
|
29
|
+
defaultvalu: 'unset',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
];
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { AntdIconSetter } from '@pisell/materials/lowcode/_setters';
|
|
2
|
+
export default [
|
|
3
|
+
// {
|
|
4
|
+
// name: 'avatar.icon',
|
|
5
|
+
// title: { label: '头像图标', tip: 'icon | 设置头像的自定义图标' },
|
|
6
|
+
// setter: AntdIconSetter,
|
|
7
|
+
// },
|
|
8
|
+
{
|
|
9
|
+
name: 'avatar.shape',
|
|
10
|
+
title: { label: '头像形状', tip: 'shape | 指定头像的形状' },
|
|
11
|
+
setter: {
|
|
12
|
+
componentName: 'RadioGroupSetter',
|
|
13
|
+
props: {
|
|
14
|
+
options: ['circle', 'square'],
|
|
15
|
+
},
|
|
16
|
+
initialValue: 'circle',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'avatar.borderRadius',
|
|
21
|
+
title: { label: '圆角度数', tip: 'borderRadius | 方形头像的圆角大小' },
|
|
22
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
23
|
+
defaultValue: 4,
|
|
24
|
+
condition: (target: any) => {
|
|
25
|
+
const shape = target.getProps().getPropValue('avatar.shape');
|
|
26
|
+
return shape === 'square';
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'avatar.size',
|
|
31
|
+
title: { label: '尺寸', tip: 'size | 设置头像的大小' },
|
|
32
|
+
setter: [
|
|
33
|
+
{
|
|
34
|
+
componentName: 'SelectSetter',
|
|
35
|
+
props: {
|
|
36
|
+
options: [
|
|
37
|
+
{
|
|
38
|
+
label: 'xs',
|
|
39
|
+
value: 'xs',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: 'sm',
|
|
43
|
+
value: 'sm',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: 'md',
|
|
47
|
+
value: 'md',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: 'lg',
|
|
51
|
+
value: 'lg',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: 'xl',
|
|
55
|
+
value: 'xl',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'xxl',
|
|
59
|
+
value: 'xxl',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
'NumberSetter',
|
|
65
|
+
'StringSetter',
|
|
66
|
+
],
|
|
67
|
+
defaultValue: 'md',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'avatar.useTextAvatar',
|
|
71
|
+
title: {
|
|
72
|
+
label: '使用文本头像',
|
|
73
|
+
tip: 'useTextAvatar | 是否使用文本作为头像',
|
|
74
|
+
},
|
|
75
|
+
setter: 'BoolSetter',
|
|
76
|
+
defaultValue: false,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'avatar.children',
|
|
80
|
+
title: { label: '文本内容', tip: 'children | 文本头像的内容' },
|
|
81
|
+
setter: 'StringSetter',
|
|
82
|
+
condition: {
|
|
83
|
+
type: 'JSFunction',
|
|
84
|
+
value: "target => target.getProps().getPropValue('avatar.useTextAvatar')",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
// {
|
|
88
|
+
// title: '头像状态',
|
|
89
|
+
// name: 'avatar.isShowStatus',
|
|
90
|
+
// condition: (target: any) => target.getProps().getPropValue('isShowAvatar'),
|
|
91
|
+
// setter: 'BoolSetter',
|
|
92
|
+
// defaultValue: false,
|
|
93
|
+
// },
|
|
94
|
+
// {
|
|
95
|
+
// title: '状态颜色',
|
|
96
|
+
// name: 'avatar.statusColor',
|
|
97
|
+
// condition: (target: any) =>
|
|
98
|
+
// target.getProps().getPropValue('isShowAvatar') &&
|
|
99
|
+
// target.getProps().getPropValue('avatar.isShowStatus'),
|
|
100
|
+
// setter: 'ColorSetter',
|
|
101
|
+
// defaultValue: '#17B26A',
|
|
102
|
+
// },
|
|
103
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
type: 'group',
|
|
4
|
+
display: 'plain',
|
|
5
|
+
title: '文本样式',
|
|
6
|
+
items: [
|
|
7
|
+
{
|
|
8
|
+
title: '文本大小',
|
|
9
|
+
name: 'textStyle.fontSize',
|
|
10
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
11
|
+
defaultValue: 14,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: '文本粗细',
|
|
15
|
+
name: 'textStyle.fontWeight',
|
|
16
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
17
|
+
defaultValue: 400,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: '文本颜色',
|
|
21
|
+
name: 'textStyle.color',
|
|
22
|
+
setter: ['ColorSetter'],
|
|
23
|
+
defaultValue: '#667085',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: '文本下划线',
|
|
27
|
+
name: 'textStyle.textDecoration',
|
|
28
|
+
setter: ['StringSetter'],
|
|
29
|
+
defaultvalu: 'unset',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
];
|