@pisell/private-materials 6.3.87 → 6.3.89
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +9 -0
- package/es/components/ecocup/components/AddCustomerModal/index.js +216 -0
- package/es/components/ecocup/components/AddCustomerModal/index.less +9 -0
- package/es/components/ecocup/components/CupActionList/index.d.ts +13 -0
- package/es/components/ecocup/components/CupActionList/index.js +91 -0
- package/es/components/ecocup/components/CupActionList/index.less +102 -0
- package/es/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
- package/es/components/ecocup/components/CupActionModal/hooks.js +68 -0
- package/es/components/ecocup/components/CupActionModal/index.d.ts +14 -0
- package/es/components/ecocup/components/CupActionModal/index.js +92 -0
- package/es/components/ecocup/components/CupActionModal/index.less +38 -0
- package/es/components/ecocup/components/CupInfoCard/index.d.ts +7 -0
- package/es/components/ecocup/components/CupInfoCard/index.js +12 -0
- package/es/components/ecocup/components/CupInfoCard/index.less +11 -0
- package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +5 -0
- package/es/components/ecocup/components/CupStatusModal/hooks.js +68 -0
- package/es/components/ecocup/components/CupStatusModal/index.d.ts +13 -0
- package/es/components/ecocup/components/CupStatusModal/index.js +147 -0
- package/es/components/ecocup/components/CupStatusModal/index.less +35 -0
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.js +133 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +16 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.js +227 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.less +68 -0
- package/es/components/ecocup/components/CustomerCard/index.d.ts +6 -0
- package/es/components/ecocup/components/CustomerCard/index.js +34 -0
- package/es/components/ecocup/components/CustomerCard/index.less +50 -0
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +8 -0
- package/es/components/ecocup/components/MoreDropdown/index.js +33 -0
- package/es/components/ecocup/components/PageHeader/index.d.ts +6 -0
- package/es/components/ecocup/components/PageHeader/index.js +37 -0
- package/es/components/ecocup/components/PageHeader/index.less +19 -0
- package/es/components/ecocup/components/SearchBar/const.d.ts +4 -0
- package/es/components/ecocup/components/SearchBar/const.js +16 -0
- package/es/components/ecocup/components/SearchBar/hooks.d.ts +44 -0
- package/es/components/ecocup/components/SearchBar/hooks.js +184 -0
- package/es/components/ecocup/components/SearchBar/index.d.ts +12 -0
- package/es/components/ecocup/components/SearchBar/index.js +218 -0
- package/es/components/ecocup/components/SearchBar/index.less +88 -0
- package/es/components/ecocup/cupList/const.d.ts +133 -0
- package/es/components/ecocup/cupList/const.js +306 -0
- package/es/components/ecocup/cupList/hooks/index.d.ts +4 -0
- package/es/components/ecocup/cupList/hooks/index.js +4 -0
- package/es/components/ecocup/cupList/hooks/useColumns.d.ts +43 -0
- package/es/components/ecocup/cupList/hooks/useColumns.js +168 -0
- package/es/components/ecocup/cupList/hooks/useCupApi.d.ts +32 -0
- package/es/components/ecocup/cupList/hooks/useCupApi.js +172 -0
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +2 -0
- package/es/components/ecocup/cupList/hooks/useSummary.js +40 -0
- package/es/components/ecocup/cupList/index.d.ts +6 -0
- package/es/components/ecocup/cupList/index.js +220 -0
- package/es/components/ecocup/cupList/index.less +113 -0
- package/es/components/ecocup/cupProject/const.d.ts +7 -0
- package/es/components/ecocup/cupProject/const.js +27 -0
- package/es/components/ecocup/cupProject/index.d.ts +3 -0
- package/es/components/ecocup/cupProject/index.js +103 -0
- package/es/components/ecocup/cupProject/index.less +41 -0
- package/es/components/ecocup/customerList/const.d.ts +44 -0
- package/es/components/ecocup/customerList/const.js +67 -0
- package/es/components/ecocup/customerList/hooks/index.d.ts +3 -0
- package/es/components/ecocup/customerList/hooks/index.js +3 -0
- package/es/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
- package/es/components/ecocup/customerList/hooks/useColumns.js +44 -0
- package/es/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
- package/es/components/ecocup/customerList/hooks/useCustomerApi.js +70 -0
- package/es/components/ecocup/customerList/index.d.ts +7 -0
- package/es/components/ecocup/customerList/index.js +127 -0
- package/es/components/ecocup/customerList/index.less +15 -0
- package/es/components/ecocup/hooks.d.ts +49 -0
- package/es/components/ecocup/hooks.js +151 -0
- package/es/components/ecocup/locales.d.ts +339 -0
- package/es/components/ecocup/locales.js +372 -0
- package/es/components/ecocup/types.d.ts +103 -0
- package/es/components/ecocup/types.js +36 -0
- package/es/components/ecocup/utils/scanListener.d.ts +20 -0
- package/es/components/ecocup/utils/scanListener.js +107 -0
- package/es/components/eftpos/const.d.ts +1 -3
- package/es/components/eftpos/const.js +0 -2
- package/es/components/eftpos/device.d.ts +1 -3
- package/es/components/eftpos/device.js +3 -5
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/index.js +11 -34
- package/es/components/eftpos/index.less +1 -26
- package/es/components/eftpos/locales.d.ts +0 -3
- package/es/components/eftpos/locales.js +0 -3
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/const.d.ts +1 -6
- package/es/components/eftposPay/const.js +0 -2
- package/es/components/eftposPay/device.js +208 -36
- package/es/components/eftposPay/hooks.d.ts +1 -2
- package/es/components/eftposPay/hooks.js +0 -12
- package/es/components/eftposPay/linkly/index.js +0 -1
- package/es/components/eftposPay/manufacturer.d.ts +0 -1
- package/es/components/eftposPay/manufacturer.js +0 -4
- package/es/components/eftposPay/pay.js +2 -7
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.js +9 -9
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/hooks/useEngineContext.d.ts +1 -0
- package/es/hooks/useEngineContext.js +7 -0
- package/es/index.d.ts +5 -1
- package/es/index.js +5 -1
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/orderList/components/BatchActionBar.d.ts +9 -0
- package/es/plus/orderList/components/BatchActionBar.js +835 -0
- package/es/plus/orderList/components/FilterList.d.ts +8 -0
- package/es/plus/orderList/components/FilterList.js +78 -0
- package/es/plus/orderList/components/HandleActions.d.ts +4 -0
- package/es/plus/orderList/components/HandleActions.js +24 -0
- package/es/plus/orderList/components/QuickFilter.d.ts +4 -0
- package/es/plus/orderList/components/QuickFilter.js +14 -0
- package/es/plus/orderList/components/Reset.d.ts +6 -0
- package/es/plus/orderList/components/Reset.js +23 -0
- package/es/plus/orderList/components/Toolbar.d.ts +5 -0
- package/es/plus/orderList/components/Toolbar.js +57 -0
- package/es/plus/orderList/config.d.ts +154 -0
- package/es/plus/orderList/config.js +786 -0
- package/es/plus/orderList/index.d.ts +9 -0
- package/es/plus/orderList/index.js +128 -0
- package/es/plus/orderList/index.less +125 -0
- package/es/plus/orderList/locales.d.ts +372 -0
- package/es/plus/orderList/locales.js +459 -0
- package/es/plus/orderList/serve.d.ts +42 -0
- package/es/plus/orderList/serve.js +351 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.less +2 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/index.js +2 -2
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +9 -2
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +8 -4
- package/es/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/es/pro/NumericStepper/index.d.ts +28 -3
- package/es/pro/NumericStepper/index.js +175 -107
- package/es/pro/NumericStepper/index.less +295 -143
- package/es/pro/Selector/Selector.js +33 -26
- package/es/pro/Selector/components/Card/index.js +2 -3
- package/es/pro/Selector/components/Card/index.less +11 -4
- package/es/pro/Selector/components/Indicator/index.d.ts +1 -0
- package/es/pro/Selector/components/Indicator/index.js +2 -1
- package/es/pro/Selector/components/Indicator/index.less +4 -1
- package/es/pro/Selector/components/LayoutContainer/index.d.ts +5 -3
- package/es/pro/Selector/components/LayoutContainer/index.js +226 -9
- package/es/pro/Selector/components/LayoutContainer/index.less +19 -0
- package/es/pro/Selector/demo.js +1 -1
- package/es/pro/Selector/hooks/usePresetItemProps.js +2 -0
- package/es/pro/Selector/hooks/usePresetProps.js +60 -6
- package/es/pro/Selector/selector.less +0 -64
- package/es/pro/Selector/types.d.ts +40 -0
- package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.d.ts +11 -0
- package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.js +54 -0
- package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.less +28 -0
- package/es/pro/comprehensiveSearch/components/index.d.ts +2 -0
- package/es/pro/comprehensiveSearch/components/index.js +2 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.d.ts +24 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.js +140 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.less +100 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +14 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
- package/es/pro/comprehensiveSearch/index.d.ts +7 -0
- package/es/pro/comprehensiveSearch/index.js +207 -0
- package/es/pro/comprehensiveSearch/index.less +196 -0
- package/es/pro/comprehensiveSearch/locales.d.ts +15 -0
- package/es/pro/comprehensiveSearch/locales.js +14 -0
- package/es/pro/comprehensiveSearch/types.d.ts +32 -0
- package/es/pro/comprehensiveSearch/types.js +1 -0
- package/es/pro/keyboards/index.d.ts +2 -0
- package/es/pro/keyboards/index.js +1 -0
- package/es/pro/keyboards/locales.d.ts +24 -0
- package/es/pro/keyboards/locales.js +35 -0
- package/es/pro/keyboards/numberKeyboard/index.d.ts +16 -0
- package/es/pro/keyboards/numberKeyboard/index.js +523 -0
- package/es/pro/keyboards/numberKeyboard/index.less +59 -0
- package/es/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/es/pro/keyboards/numberKeyboard/types.js +1 -0
- package/es/pro/pisellPaymentList/example.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +9 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.js +212 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.less +9 -0
- package/lib/components/ecocup/components/CupActionList/index.d.ts +13 -0
- package/lib/components/ecocup/components/CupActionList/index.js +116 -0
- package/lib/components/ecocup/components/CupActionList/index.less +102 -0
- package/lib/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
- package/lib/components/ecocup/components/CupActionModal/hooks.js +55 -0
- package/lib/components/ecocup/components/CupActionModal/index.d.ts +14 -0
- package/lib/components/ecocup/components/CupActionModal/index.js +125 -0
- package/lib/components/ecocup/components/CupActionModal/index.less +38 -0
- package/lib/components/ecocup/components/CupInfoCard/index.d.ts +7 -0
- package/lib/components/ecocup/components/CupInfoCard/index.js +43 -0
- package/lib/components/ecocup/components/CupInfoCard/index.less +11 -0
- package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +5 -0
- package/lib/components/ecocup/components/CupStatusModal/hooks.js +55 -0
- package/lib/components/ecocup/components/CupStatusModal/index.d.ts +13 -0
- package/lib/components/ecocup/components/CupStatusModal/index.js +140 -0
- package/lib/components/ecocup/components/CupStatusModal/index.less +35 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.js +89 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +16 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.js +178 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.less +68 -0
- package/lib/components/ecocup/components/CustomerCard/index.d.ts +6 -0
- package/lib/components/ecocup/components/CustomerCard/index.js +48 -0
- package/lib/components/ecocup/components/CustomerCard/index.less +50 -0
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +8 -0
- package/lib/components/ecocup/components/MoreDropdown/index.js +68 -0
- package/lib/components/ecocup/components/PageHeader/index.d.ts +6 -0
- package/lib/components/ecocup/components/PageHeader/index.js +59 -0
- package/lib/components/ecocup/components/PageHeader/index.less +19 -0
- package/lib/components/ecocup/components/SearchBar/const.d.ts +4 -0
- package/lib/components/{eftposPay/mx51/types.js → ecocup/components/SearchBar/const.js} +28 -17
- package/lib/components/ecocup/components/SearchBar/hooks.d.ts +44 -0
- package/lib/components/ecocup/components/SearchBar/hooks.js +135 -0
- package/lib/components/ecocup/components/SearchBar/index.d.ts +12 -0
- package/lib/components/ecocup/components/SearchBar/index.js +213 -0
- package/lib/components/ecocup/components/SearchBar/index.less +88 -0
- package/lib/components/ecocup/cupList/const.d.ts +133 -0
- package/lib/components/ecocup/cupList/const.js +326 -0
- package/lib/components/ecocup/cupList/hooks/index.d.ts +4 -0
- package/lib/components/ecocup/cupList/hooks/index.js +39 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +43 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.js +202 -0
- package/lib/components/ecocup/cupList/hooks/useCupApi.d.ts +32 -0
- package/lib/components/ecocup/cupList/hooks/useCupApi.js +112 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +2 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.js +75 -0
- package/lib/components/ecocup/cupList/index.d.ts +6 -0
- package/lib/components/ecocup/cupList/index.js +208 -0
- package/lib/components/ecocup/cupList/index.less +113 -0
- package/lib/components/ecocup/cupProject/const.d.ts +7 -0
- package/lib/components/ecocup/cupProject/const.js +58 -0
- package/lib/components/ecocup/cupProject/index.d.ts +3 -0
- package/lib/components/ecocup/cupProject/index.js +126 -0
- package/lib/components/ecocup/cupProject/index.less +41 -0
- package/lib/components/ecocup/customerList/const.d.ts +44 -0
- package/lib/components/ecocup/customerList/const.js +93 -0
- package/lib/components/ecocup/customerList/hooks/index.d.ts +3 -0
- package/lib/components/{eftposPay/aggregatePayment → ecocup/customerList/hooks}/index.js +10 -10
- package/lib/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
- package/lib/components/ecocup/customerList/hooks/useColumns.js +89 -0
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.js +56 -0
- package/lib/components/ecocup/customerList/index.d.ts +7 -0
- package/lib/components/ecocup/customerList/index.js +138 -0
- package/lib/components/ecocup/customerList/index.less +15 -0
- package/lib/components/ecocup/hooks.d.ts +49 -0
- package/lib/components/ecocup/hooks.js +155 -0
- package/lib/components/ecocup/locales.d.ts +339 -0
- package/lib/components/ecocup/locales.js +389 -0
- package/lib/components/ecocup/types.d.ts +103 -0
- package/lib/components/ecocup/types.js +57 -0
- package/lib/components/ecocup/utils/scanListener.d.ts +20 -0
- package/lib/components/ecocup/utils/scanListener.js +90 -0
- package/lib/components/eftpos/const.d.ts +1 -3
- package/lib/components/eftpos/const.js +0 -2
- package/lib/components/eftpos/device.d.ts +1 -3
- package/lib/components/eftpos/device.js +3 -3
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/index.js +5 -20
- package/lib/components/eftpos/index.less +1 -26
- package/lib/components/eftpos/locales.d.ts +0 -3
- package/lib/components/eftpos/locales.js +0 -3
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/const.d.ts +1 -6
- package/lib/components/eftposPay/const.js +0 -2
- package/lib/components/eftposPay/device.js +108 -23
- package/lib/components/eftposPay/hooks.d.ts +1 -2
- package/lib/components/eftposPay/hooks.js +0 -16
- package/lib/components/eftposPay/linkly/index.js +0 -1
- package/lib/components/eftposPay/manufacturer.d.ts +0 -1
- package/lib/components/eftposPay/manufacturer.js +0 -6
- package/lib/components/eftposPay/pay.js +2 -4
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.js +9 -9
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/hooks/useEngineContext.d.ts +1 -0
- package/lib/hooks/useEngineContext.js +10 -2
- package/lib/index.d.ts +5 -1
- package/lib/index.js +13 -1
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/orderList/components/BatchActionBar.d.ts +9 -0
- package/lib/plus/orderList/components/BatchActionBar.js +567 -0
- package/lib/plus/orderList/components/FilterList.d.ts +8 -0
- package/lib/plus/orderList/components/FilterList.js +121 -0
- package/lib/plus/orderList/components/HandleActions.d.ts +4 -0
- package/lib/plus/orderList/components/HandleActions.js +52 -0
- package/lib/plus/orderList/components/QuickFilter.d.ts +4 -0
- package/lib/plus/orderList/components/QuickFilter.js +43 -0
- package/lib/plus/orderList/components/Reset.d.ts +6 -0
- package/lib/plus/orderList/components/Reset.js +58 -0
- package/lib/plus/orderList/components/Toolbar.d.ts +5 -0
- package/lib/plus/orderList/components/Toolbar.js +68 -0
- package/lib/plus/orderList/config.d.ts +154 -0
- package/lib/plus/orderList/config.js +764 -0
- package/lib/plus/orderList/index.d.ts +9 -0
- package/lib/plus/orderList/index.js +132 -0
- package/lib/plus/orderList/index.less +125 -0
- package/lib/plus/orderList/locales.d.ts +372 -0
- package/lib/plus/orderList/locales.js +471 -0
- package/lib/plus/orderList/serve.d.ts +42 -0
- package/lib/plus/orderList/serve.js +177 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.less +2 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/index.js +2 -2
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +9 -2
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +7 -3
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/lib/pro/NumericStepper/index.d.ts +28 -3
- package/lib/pro/NumericStepper/index.js +176 -88
- package/lib/pro/NumericStepper/index.less +295 -143
- package/lib/pro/Selector/Selector.js +27 -16
- package/lib/pro/Selector/components/Card/index.js +9 -1
- package/lib/pro/Selector/components/Card/index.less +11 -4
- package/lib/pro/Selector/components/Indicator/index.d.ts +1 -0
- package/lib/pro/Selector/components/Indicator/index.js +1 -1
- package/lib/pro/Selector/components/Indicator/index.less +4 -1
- package/lib/pro/Selector/components/LayoutContainer/index.d.ts +5 -3
- package/lib/pro/Selector/components/LayoutContainer/index.js +130 -2
- package/lib/pro/Selector/components/LayoutContainer/index.less +19 -0
- package/lib/pro/Selector/demo.js +1 -1
- package/lib/pro/Selector/hooks/usePresetItemProps.js +2 -0
- package/lib/pro/Selector/hooks/usePresetProps.js +28 -6
- package/lib/pro/Selector/selector.less +0 -64
- package/lib/pro/Selector/types.d.ts +40 -0
- package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.d.ts +11 -0
- package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.js +64 -0
- package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.less +28 -0
- package/lib/pro/comprehensiveSearch/components/index.d.ts +2 -0
- package/lib/pro/comprehensiveSearch/components/index.js +42 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.d.ts +24 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.js +153 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.less +100 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +38 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
- package/lib/pro/comprehensiveSearch/index.d.ts +7 -0
- package/lib/pro/comprehensiveSearch/index.js +190 -0
- package/lib/pro/comprehensiveSearch/index.less +196 -0
- package/lib/pro/comprehensiveSearch/locales.d.ts +15 -0
- package/lib/pro/comprehensiveSearch/locales.js +38 -0
- package/lib/pro/comprehensiveSearch/types.d.ts +32 -0
- package/lib/pro/comprehensiveSearch/types.js +17 -0
- package/lib/pro/keyboards/index.d.ts +2 -0
- package/lib/pro/keyboards/index.js +39 -0
- package/lib/pro/keyboards/locales.d.ts +24 -0
- package/lib/pro/keyboards/locales.js +47 -0
- package/lib/pro/keyboards/numberKeyboard/index.d.ts +16 -0
- package/lib/pro/keyboards/numberKeyboard/index.js +400 -0
- package/lib/pro/keyboards/numberKeyboard/index.less +59 -0
- package/lib/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/lib/pro/keyboards/numberKeyboard/types.js +17 -0
- package/lib/pro/pisellPaymentList/example.d.ts +1 -0
- package/lowcode/eco-cup-list/meta.ts +63 -0
- package/lowcode/eco-customer-list/meta.ts +63 -0
- package/lowcode/ecocup-cup-list/meta.ts +38 -0
- package/lowcode/ecocup-cup-project/meta.ts +35 -0
- package/lowcode/ecocup-customer-list/meta.ts +38 -0
- package/lowcode/order-list/meta.ts +87 -0
- package/package.json +4 -4
- package/es/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +0 -6
- package/es/components/eftposPay/aggregatePayment/hooks/usePayment.js +0 -125
- package/es/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/es/components/eftposPay/aggregatePayment/index.js +0 -3
- package/es/components/eftposPay/aggregatePayment/mock.d.ts +0 -495
- package/es/components/eftposPay/aggregatePayment/mock.js +0 -567
- package/es/components/eftposPay/aggregatePayment/service.d.ts +0 -24
- package/es/components/eftposPay/aggregatePayment/service.js +0 -70
- package/es/components/eftposPay/aggregatePayment/types.d.ts +0 -96
- package/es/components/eftposPay/aggregatePayment/types.js +0 -61
- package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
- package/es/components/eftposPay/aggregatePayment/utils/logs.js +0 -385
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -132
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +0 -1127
- package/es/components/eftposPay/mx51/Action.d.ts +0 -6
- package/es/components/eftposPay/mx51/Action.js +0 -91
- package/es/components/eftposPay/mx51/const.d.ts +0 -5
- package/es/components/eftposPay/mx51/const.js +0 -69
- package/es/components/eftposPay/mx51/index.d.ts +0 -6
- package/es/components/eftposPay/mx51/index.js +0 -362
- package/es/components/eftposPay/mx51/types.d.ts +0 -136
- package/es/components/eftposPay/mx51/types.js +0 -29
- package/es/components/eftposPay/mx51/utils.d.ts +0 -10
- package/es/components/eftposPay/mx51/utils.js +0 -120
- package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +0 -6
- package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.js +0 -152
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/lib/components/eftposPay/aggregatePayment/mock.d.ts +0 -495
- package/lib/components/eftposPay/aggregatePayment/mock.js +0 -679
- package/lib/components/eftposPay/aggregatePayment/service.d.ts +0 -24
- package/lib/components/eftposPay/aggregatePayment/service.js +0 -81
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +0 -96
- package/lib/components/eftposPay/aggregatePayment/types.js +0 -74
- package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
- package/lib/components/eftposPay/aggregatePayment/utils/logs.js +0 -302
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -132
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +0 -746
- package/lib/components/eftposPay/mx51/Action.d.ts +0 -6
- package/lib/components/eftposPay/mx51/Action.js +0 -127
- package/lib/components/eftposPay/mx51/const.d.ts +0 -5
- package/lib/components/eftposPay/mx51/const.js +0 -85
- package/lib/components/eftposPay/mx51/index.d.ts +0 -6
- package/lib/components/eftposPay/mx51/index.js +0 -330
- package/lib/components/eftposPay/mx51/types.d.ts +0 -136
- package/lib/components/eftposPay/mx51/utils.d.ts +0 -10
- package/lib/components/eftposPay/mx51/utils.js +0 -114
|
@@ -95,7 +95,8 @@ var Indicator = function Indicator(props) {
|
|
|
95
95
|
}, checked && /*#__PURE__*/React.createElement(React.Fragment, null, mode === 'single' && variant === 'outlined' ? /*#__PURE__*/React.createElement("div", {
|
|
96
96
|
className: "".concat(prefixCls, "-dot")
|
|
97
97
|
}) : renderCheckIcon())), children && /*#__PURE__*/React.createElement("span", {
|
|
98
|
-
className: "".concat(prefixCls, "-content")
|
|
98
|
+
className: "".concat(prefixCls, "-content"),
|
|
99
|
+
style: styles === null || styles === void 0 ? void 0 : styles.content
|
|
99
100
|
}, children));
|
|
100
101
|
};
|
|
101
102
|
export default Indicator;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
.pisell-pro-indicator {
|
|
2
|
+
vertical-align: middle;
|
|
2
3
|
display: inline-flex;
|
|
3
4
|
align-items: center;
|
|
4
|
-
|
|
5
|
+
justify-content: center;
|
|
5
6
|
cursor: pointer;
|
|
6
7
|
user-select: none;
|
|
7
8
|
font-size: 14px;
|
|
8
9
|
line-height: 1.5;
|
|
9
10
|
position: relative;
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 100%;
|
|
10
13
|
|
|
11
14
|
&-input {
|
|
12
15
|
position: absolute;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LayoutConfig } from '../../types';
|
|
3
|
+
import './index.less';
|
|
3
4
|
interface LayoutContainerProps {
|
|
4
5
|
className: string;
|
|
5
6
|
config: LayoutConfig | null;
|
|
@@ -8,9 +9,10 @@ interface LayoutContainerProps {
|
|
|
8
9
|
/**
|
|
9
10
|
* 统一的布局容器组件
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
* 1.
|
|
13
|
-
* 2.
|
|
12
|
+
* 支持三种布局模式:
|
|
13
|
+
* 1. 响应式布局(推荐):通过 responsive 配置,使用 ResizeObserver 实现容器级响应式
|
|
14
|
+
* 2. Custom 布局:通过 className 使用预设样式
|
|
15
|
+
* 3. Ant Design Grid 布局:基础的栅格布局,用于简单场景
|
|
14
16
|
*/
|
|
15
17
|
declare function LayoutContainer({ className: containerClassName, config, children, }: LayoutContainerProps): React.ReactElement | null;
|
|
16
18
|
export default LayoutContainer;
|
|
@@ -1,24 +1,227 @@
|
|
|
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); }
|
|
1
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4
|
+
function 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; }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
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); }
|
|
9
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
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."); }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
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; } }
|
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
+
import React, { useRef, useState, useEffect, useMemo } from 'react';
|
|
3
16
|
import { Row, Col } from 'antd';
|
|
4
17
|
import classNames from 'classnames';
|
|
18
|
+
import "./index.less";
|
|
5
19
|
var ARow = Row;
|
|
6
20
|
var ACol = Col;
|
|
21
|
+
/**
|
|
22
|
+
* 标准化断点配置
|
|
23
|
+
* 将简写形式 { 420: 2 } 转换为完整形式 { 420: { columns: 2 } }
|
|
24
|
+
*/
|
|
25
|
+
function normalizeBreakpoints(breakpoints, defaultGap) {
|
|
26
|
+
var normalized = {};
|
|
27
|
+
for (var _i = 0, _Object$entries = Object.entries(breakpoints); _i < _Object$entries.length; _i++) {
|
|
28
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
29
|
+
width = _Object$entries$_i[0],
|
|
30
|
+
config = _Object$entries$_i[1];
|
|
31
|
+
var widthNum = Number(width);
|
|
32
|
+
if (typeof config === 'number') {
|
|
33
|
+
// 简写形式:数字表示列数
|
|
34
|
+
normalized[widthNum] = {
|
|
35
|
+
columns: config,
|
|
36
|
+
gap: defaultGap
|
|
37
|
+
};
|
|
38
|
+
} else {
|
|
39
|
+
var _config$gap;
|
|
40
|
+
// 完整形式
|
|
41
|
+
normalized[widthNum] = _objectSpread(_objectSpread({}, config), {}, {
|
|
42
|
+
gap: (_config$gap = config.gap) !== null && _config$gap !== void 0 ? _config$gap : defaultGap
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return normalized;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 根据 minWidth 和 maxColumns 自动生成断点配置
|
|
51
|
+
*/
|
|
52
|
+
function generateBreakpoints(minWidth, maxColumns) {
|
|
53
|
+
var gap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 16;
|
|
54
|
+
var gapNum = typeof gap === 'number' ? gap : parseInt(gap, 10) || 16;
|
|
55
|
+
var breakpoints = {
|
|
56
|
+
0: {
|
|
57
|
+
columns: 1,
|
|
58
|
+
gap: gap
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
for (var cols = 2; cols <= maxColumns; cols++) {
|
|
62
|
+
// 计算需要的最小容器宽度:cols * minWidth + (cols - 1) * gap
|
|
63
|
+
var breakpoint = cols * minWidth + (cols - 1) * gapNum;
|
|
64
|
+
breakpoints[breakpoint] = {
|
|
65
|
+
columns: cols,
|
|
66
|
+
gap: gap
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return breakpoints;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 根据容器宽度计算当前应该使用的断点配置
|
|
74
|
+
*/
|
|
75
|
+
function getActiveBreakpoint(width, breakpoints) {
|
|
76
|
+
var defaultColumns = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
77
|
+
var defaultGap = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 16;
|
|
78
|
+
// 获取所有断点并按宽度降序排序
|
|
79
|
+
var sortedBreakpoints = Object.keys(breakpoints).map(Number).sort(function (a, b) {
|
|
80
|
+
return b - a;
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// 找到第一个小于等于当前宽度的断点
|
|
84
|
+
var _iterator = _createForOfIteratorHelper(sortedBreakpoints),
|
|
85
|
+
_step;
|
|
86
|
+
try {
|
|
87
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
88
|
+
var breakpoint = _step.value;
|
|
89
|
+
if (width >= breakpoint) {
|
|
90
|
+
return breakpoints[breakpoint];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// 如果没有匹配的断点,返回默认配置
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator.f();
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
columns: defaultColumns,
|
|
102
|
+
gap: defaultGap
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 解析响应式配置,生成最终的断点映射
|
|
108
|
+
*/
|
|
109
|
+
function parseResponsiveConfig(responsive) {
|
|
110
|
+
var minWidth = responsive.minWidth,
|
|
111
|
+
maxColumns = responsive.maxColumns,
|
|
112
|
+
breakpoints = responsive.breakpoints,
|
|
113
|
+
_responsive$gap = responsive.gap,
|
|
114
|
+
gap = _responsive$gap === void 0 ? 16 : _responsive$gap;
|
|
115
|
+
var finalBreakpoints = {};
|
|
116
|
+
|
|
117
|
+
// 方式一:自动计算断点
|
|
118
|
+
if (minWidth && maxColumns) {
|
|
119
|
+
finalBreakpoints = generateBreakpoints(minWidth, maxColumns, gap);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// 方式二:显式断点定义(会覆盖自动计算的断点)
|
|
123
|
+
if (breakpoints) {
|
|
124
|
+
var normalizedBreakpoints = normalizeBreakpoints(breakpoints, gap);
|
|
125
|
+
finalBreakpoints = _objectSpread(_objectSpread({}, finalBreakpoints), normalizedBreakpoints);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// 确保至少有默认断点
|
|
129
|
+
if (Object.keys(finalBreakpoints).length === 0) {
|
|
130
|
+
var _responsive$defaultCo;
|
|
131
|
+
finalBreakpoints = {
|
|
132
|
+
0: {
|
|
133
|
+
columns: (_responsive$defaultCo = responsive.defaultColumns) !== null && _responsive$defaultCo !== void 0 ? _responsive$defaultCo : 1,
|
|
134
|
+
gap: gap
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
return finalBreakpoints;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* 自定义 Hook:使用 ResizeObserver 监听容器宽度变化
|
|
143
|
+
*/
|
|
144
|
+
function useContainerWidth(ref) {
|
|
145
|
+
var debounceMs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
146
|
+
var _useState = useState(0),
|
|
147
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
148
|
+
width = _useState2[0],
|
|
149
|
+
setWidth = _useState2[1];
|
|
150
|
+
var timeoutRef = useRef(null);
|
|
151
|
+
useEffect(function () {
|
|
152
|
+
var element = ref.current;
|
|
153
|
+
if (!element) return;
|
|
154
|
+
var updateWidth = function updateWidth(newWidth) {
|
|
155
|
+
if (debounceMs > 0) {
|
|
156
|
+
if (timeoutRef.current) {
|
|
157
|
+
clearTimeout(timeoutRef.current);
|
|
158
|
+
}
|
|
159
|
+
timeoutRef.current = setTimeout(function () {
|
|
160
|
+
setWidth(newWidth);
|
|
161
|
+
}, debounceMs);
|
|
162
|
+
} else {
|
|
163
|
+
setWidth(newWidth);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
var observer = new ResizeObserver(function (entries) {
|
|
167
|
+
var entry = entries[0];
|
|
168
|
+
if (entry) {
|
|
169
|
+
updateWidth(entry.contentRect.width);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
observer.observe(element);
|
|
173
|
+
|
|
174
|
+
// 初始化宽度
|
|
175
|
+
setWidth(element.getBoundingClientRect().width);
|
|
176
|
+
return function () {
|
|
177
|
+
observer.disconnect();
|
|
178
|
+
if (timeoutRef.current) {
|
|
179
|
+
clearTimeout(timeoutRef.current);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
}, [ref, debounceMs]);
|
|
183
|
+
return width;
|
|
184
|
+
}
|
|
185
|
+
var baseClassName = 'pisell-pro-selector_layout';
|
|
186
|
+
|
|
7
187
|
/**
|
|
8
188
|
* 统一的布局容器组件
|
|
9
189
|
*
|
|
10
|
-
*
|
|
11
|
-
* 1.
|
|
12
|
-
* 2.
|
|
190
|
+
* 支持三种布局模式:
|
|
191
|
+
* 1. 响应式布局(推荐):通过 responsive 配置,使用 ResizeObserver 实现容器级响应式
|
|
192
|
+
* 2. Custom 布局:通过 className 使用预设样式
|
|
193
|
+
* 3. Ant Design Grid 布局:基础的栅格布局,用于简单场景
|
|
13
194
|
*/
|
|
14
195
|
function LayoutContainer(_ref) {
|
|
196
|
+
var _responsiveConfig$deb;
|
|
15
197
|
var containerClassName = _ref.className,
|
|
16
198
|
config = _ref.config,
|
|
17
199
|
children = _ref.children;
|
|
200
|
+
var containerRef = useRef(null);
|
|
201
|
+
|
|
202
|
+
// 解析响应式配置
|
|
203
|
+
var responsiveConfig = config === null || config === void 0 ? void 0 : config.responsive;
|
|
204
|
+
var hasResponsive = !!responsiveConfig;
|
|
205
|
+
|
|
206
|
+
// 解析断点配置
|
|
207
|
+
var breakpoints = useMemo(function () {
|
|
208
|
+
if (!responsiveConfig) return null;
|
|
209
|
+
return parseResponsiveConfig(responsiveConfig);
|
|
210
|
+
}, [responsiveConfig]);
|
|
211
|
+
|
|
212
|
+
// 监听容器宽度
|
|
213
|
+
var containerWidth = useContainerWidth(containerRef, (_responsiveConfig$deb = responsiveConfig === null || responsiveConfig === void 0 ? void 0 : responsiveConfig.debounce) !== null && _responsiveConfig$deb !== void 0 ? _responsiveConfig$deb : 0);
|
|
214
|
+
|
|
215
|
+
// 计算当前激活的断点配置
|
|
216
|
+
var activeConfig = useMemo(function () {
|
|
217
|
+
if (!breakpoints) return null;
|
|
218
|
+
return getActiveBreakpoint(containerWidth, breakpoints, responsiveConfig === null || responsiveConfig === void 0 ? void 0 : responsiveConfig.defaultColumns, responsiveConfig === null || responsiveConfig === void 0 ? void 0 : responsiveConfig.gap);
|
|
219
|
+
}, [containerWidth, breakpoints, responsiveConfig]);
|
|
220
|
+
|
|
18
221
|
// 无配置时使用默认布局
|
|
19
222
|
if (!config) {
|
|
20
223
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: containerClassName
|
|
224
|
+
className: classNames(baseClassName, containerClassName)
|
|
22
225
|
}, children);
|
|
23
226
|
}
|
|
24
227
|
var type = config.type,
|
|
@@ -26,17 +229,31 @@ function LayoutContainer(_ref) {
|
|
|
26
229
|
_config$containerStyl = config.containerStyle,
|
|
27
230
|
containerStyle = _config$containerStyl === void 0 ? {} : _config$containerStyl;
|
|
28
231
|
|
|
29
|
-
// 1.
|
|
232
|
+
// 1. 响应式布局(优先级最高)
|
|
233
|
+
if (hasResponsive) {
|
|
234
|
+
var _activeConfig$columns, _activeConfig$gap;
|
|
235
|
+
// 通过 CSS 变量传递动态值,实际布局样式在 Less 文件中定义
|
|
236
|
+
var cssVariables = {
|
|
237
|
+
'--layout-columns': (_activeConfig$columns = activeConfig === null || activeConfig === void 0 ? void 0 : activeConfig.columns) !== null && _activeConfig$columns !== void 0 ? _activeConfig$columns : 1,
|
|
238
|
+
'--layout-gap': typeof (activeConfig === null || activeConfig === void 0 ? void 0 : activeConfig.gap) === 'number' ? "".concat(activeConfig.gap, "px") : (_activeConfig$gap = activeConfig === null || activeConfig === void 0 ? void 0 : activeConfig.gap) !== null && _activeConfig$gap !== void 0 ? _activeConfig$gap : '16px'
|
|
239
|
+
};
|
|
240
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
241
|
+
ref: containerRef,
|
|
242
|
+
className: classNames(baseClassName, "".concat(baseClassName, "-responsive"), containerClassName, className),
|
|
243
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, cssVariables), containerStyle), activeConfig === null || activeConfig === void 0 ? void 0 : activeConfig.style)
|
|
244
|
+
}, children);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// 2. 自定义样式布局
|
|
30
248
|
if (type !== 'antdGrid') {
|
|
31
|
-
|
|
32
|
-
var layoutClassName = classNames(containerClassName, className);
|
|
249
|
+
var layoutClassName = classNames(baseClassName, containerClassName, className);
|
|
33
250
|
return /*#__PURE__*/React.createElement("div", {
|
|
34
251
|
className: layoutClassName,
|
|
35
252
|
style: containerStyle
|
|
36
253
|
}, children);
|
|
37
254
|
}
|
|
38
255
|
|
|
39
|
-
//
|
|
256
|
+
// 3. Ant Design Grid 布局(基础场景)
|
|
40
257
|
var _config$columns = config.columns,
|
|
41
258
|
columns = _config$columns === void 0 ? 1 : _config$columns,
|
|
42
259
|
align = config.align,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.pisell-pro-selector_layout {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
// 响应式布局容器
|
|
6
|
+
&-responsive {
|
|
7
|
+
display: grid;
|
|
8
|
+
gap: var(--layout-gap, 16px);
|
|
9
|
+
grid-template-columns: repeat(var(--layout-columns, 1), 1fr);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// 自动宽度布局 - 内容自适应
|
|
13
|
+
&-auto-flex {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
gap: 16px;
|
|
18
|
+
}
|
|
19
|
+
}
|
package/es/pro/Selector/demo.js
CHANGED
|
@@ -84,7 +84,7 @@ var SelectorDemo = function SelectorDemo() {
|
|
|
84
84
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
85
85
|
serviceOptions = _useState32[0],
|
|
86
86
|
setServiceOptions = _useState32[1];
|
|
87
|
-
var _useState33 = useState('
|
|
87
|
+
var _useState33 = useState('100%'),
|
|
88
88
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
89
89
|
width = _useState34[0],
|
|
90
90
|
setWidth = _useState34[1];
|
|
@@ -143,6 +143,7 @@ var usePresetItemProps = function usePresetItemProps(params) {
|
|
|
143
143
|
content: {}
|
|
144
144
|
};
|
|
145
145
|
if (presetVariant === '1') {
|
|
146
|
+
_defaultStyles.container.padding = '12px 16px';
|
|
146
147
|
_defaultStyles.content.textAlign = 'center';
|
|
147
148
|
baseProps = {
|
|
148
149
|
selectedType: 'outlined-bold'
|
|
@@ -152,6 +153,7 @@ var usePresetItemProps = function usePresetItemProps(params) {
|
|
|
152
153
|
}
|
|
153
154
|
indicator = null;
|
|
154
155
|
} else if (presetVariant === '2') {
|
|
156
|
+
_defaultStyles.container.padding = '12px 16px';
|
|
155
157
|
baseProps = {
|
|
156
158
|
selectedType: 'filled'
|
|
157
159
|
};
|
|
@@ -8,6 +8,59 @@ import { useMemo } from 'react';
|
|
|
8
8
|
var VARIANT_MAP = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 'default', ['1', '2', '3', '4']), 'select', ['1']), 'card', ['1', '2', '3', '4', '5']), 'media', ['1', '2']);
|
|
9
9
|
var EMPTY_CONFIG = {};
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* 预设响应式配置
|
|
13
|
+
* 使用 ResizeObserver 实现容器级响应式布局
|
|
14
|
+
*/
|
|
15
|
+
var RESPONSIVE_PRESETS = {
|
|
16
|
+
/** 响应式布局 - 最小宽度 210px,最多 5 列 */
|
|
17
|
+
responsive210: {
|
|
18
|
+
breakpoints: {
|
|
19
|
+
0: {
|
|
20
|
+
columns: 1,
|
|
21
|
+
gap: 16
|
|
22
|
+
},
|
|
23
|
+
420: {
|
|
24
|
+
columns: 2,
|
|
25
|
+
gap: 16
|
|
26
|
+
},
|
|
27
|
+
630: {
|
|
28
|
+
columns: 3,
|
|
29
|
+
gap: 16
|
|
30
|
+
},
|
|
31
|
+
841: {
|
|
32
|
+
columns: 4,
|
|
33
|
+
gap: 16
|
|
34
|
+
},
|
|
35
|
+
1367: {
|
|
36
|
+
columns: 5,
|
|
37
|
+
gap: 16
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
/** 响应式布局 - 最小宽度 330px,最多 4 列 */
|
|
42
|
+
responsive330: {
|
|
43
|
+
breakpoints: {
|
|
44
|
+
0: {
|
|
45
|
+
columns: 1,
|
|
46
|
+
gap: 16
|
|
47
|
+
},
|
|
48
|
+
660: {
|
|
49
|
+
columns: 2,
|
|
50
|
+
gap: 16
|
|
51
|
+
},
|
|
52
|
+
995: {
|
|
53
|
+
columns: 3,
|
|
54
|
+
gap: 16
|
|
55
|
+
},
|
|
56
|
+
1367: {
|
|
57
|
+
columns: 4,
|
|
58
|
+
gap: 16
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
11
64
|
/**
|
|
12
65
|
* 预设布局配置库
|
|
13
66
|
* 定义所有可用的布局模式,配置更加语义化和集中化
|
|
@@ -18,13 +71,13 @@ var PRESET_LAYOUTS = {
|
|
|
18
71
|
autoFlex: {
|
|
19
72
|
className: 'pisell-pro-selector_layout-auto-flex'
|
|
20
73
|
},
|
|
21
|
-
/** 响应式布局 - 最小宽度 210px */
|
|
74
|
+
/** 响应式布局 - 最小宽度 210px,最多 5 列 */
|
|
22
75
|
responsive210: {
|
|
23
|
-
|
|
76
|
+
responsive: RESPONSIVE_PRESETS.responsive210
|
|
24
77
|
},
|
|
25
|
-
/** 响应式布局 - 最小宽度 330px */
|
|
78
|
+
/** 响应式布局 - 最小宽度 330px,最多 4 列 */
|
|
26
79
|
responsive330: {
|
|
27
|
-
|
|
80
|
+
responsive: RESPONSIVE_PRESETS.responsive330
|
|
28
81
|
}
|
|
29
82
|
};
|
|
30
83
|
var VARIANT_PRESET_MAP = {
|
|
@@ -71,7 +124,7 @@ var usePresetProps = function usePresetProps(_ref) {
|
|
|
71
124
|
|
|
72
125
|
// select 和没有 preset.variant 时不应用布局配置
|
|
73
126
|
if (variant === 'select' || !(preset !== null && preset !== void 0 && preset.variant)) {
|
|
74
|
-
layoutConfig = null;
|
|
127
|
+
layoutConfig = layout || null;
|
|
75
128
|
} else {
|
|
76
129
|
// 1. 获取预设的基础布局配置
|
|
77
130
|
var baseLayoutConfig = null;
|
|
@@ -115,7 +168,8 @@ var usePresetProps = function usePresetProps(_ref) {
|
|
|
115
168
|
if (shouldUseFilled) {
|
|
116
169
|
// 设置默认值
|
|
117
170
|
computedIndicatorProps = {
|
|
118
|
-
variant: 'filled'
|
|
171
|
+
variant: 'filled',
|
|
172
|
+
size: 'small'
|
|
119
173
|
};
|
|
120
174
|
}
|
|
121
175
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
5
|
-
container-type: inline-size; // 启用容器查询
|
|
6
5
|
|
|
7
6
|
&_header {
|
|
8
7
|
display: flex;
|
|
@@ -43,67 +42,4 @@
|
|
|
43
42
|
line-height: 34px;
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
&_options-container {
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
gap: 16px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// 自动宽度布局 - 内容自适应
|
|
54
|
-
&_layout-auto-flex {
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-direction: row;
|
|
57
|
-
flex-wrap: wrap;
|
|
58
|
-
gap: 16px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// 响应式布局 - 最小宽度 210px
|
|
62
|
-
&_layout-responsive-210 {
|
|
63
|
-
display: grid;
|
|
64
|
-
gap: 16px;
|
|
65
|
-
grid-template-columns: 1fr; // 默认一列
|
|
66
|
-
|
|
67
|
-
// 容器宽度 >= 420px 且 < 630px: 两列
|
|
68
|
-
@container (min-width: 420px) {
|
|
69
|
-
grid-template-columns: repeat(2, 1fr);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// 容器宽度 >= 630px 且 <= 840px: 三列
|
|
73
|
-
@container (min-width: 630px) {
|
|
74
|
-
grid-template-columns: repeat(3, 1fr);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// 容器宽度 >= 841px 且 <= 1366px: 四列
|
|
78
|
-
@container (min-width: 841px) {
|
|
79
|
-
grid-template-columns: repeat(4, 1fr);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// 容器宽度 > 1366px: 五列
|
|
83
|
-
@container (min-width: 1367px) {
|
|
84
|
-
grid-template-columns: repeat(5, 1fr);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// 响应式布局 - 最小宽度 330px
|
|
89
|
-
&_layout-responsive-330 {
|
|
90
|
-
display: grid;
|
|
91
|
-
gap: 16px;
|
|
92
|
-
grid-template-columns: 1fr; // 默认一列
|
|
93
|
-
|
|
94
|
-
// 容器宽度 >= 660px 且 < 995px: 两列
|
|
95
|
-
@container (min-width: 660px) {
|
|
96
|
-
grid-template-columns: repeat(2, 1fr);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// 容器宽度 >= 995px 且 <= 1366px: 三列
|
|
100
|
-
@container (min-width: 995px) {
|
|
101
|
-
grid-template-columns: repeat(3, 1fr);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// 容器宽度 > 1366px: 四列
|
|
105
|
-
@container (min-width: 1367px) {
|
|
106
|
-
grid-template-columns: repeat(4, 1fr);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
45
|
}
|
|
@@ -77,10 +77,48 @@ export declare type ItemProps = {
|
|
|
77
77
|
[key: string]: any;
|
|
78
78
|
};
|
|
79
79
|
export declare type LayoutType = 'antdGrid' | 'custom';
|
|
80
|
+
/** 单个断点的完整配置 */
|
|
81
|
+
export declare type BreakpointConfig = {
|
|
82
|
+
columns: number;
|
|
83
|
+
gap?: number | string;
|
|
84
|
+
style?: React.CSSProperties;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* 断点映射
|
|
88
|
+
* key: 最小宽度(px)
|
|
89
|
+
* value: 列数(简写)或完整配置
|
|
90
|
+
* @example { 0: 1, 420: 2, 630: 3 } // 简写
|
|
91
|
+
* @example { 0: { columns: 1, gap: 12 }, 420: { columns: 2, gap: 16 } } // 完整
|
|
92
|
+
*/
|
|
93
|
+
export declare type BreakpointMap = Record<number, number | BreakpointConfig>;
|
|
94
|
+
/** 响应式布局配置 */
|
|
95
|
+
export declare type ResponsiveConfig = {
|
|
96
|
+
/** 每项最小宽度,系统自动计算断点 */
|
|
97
|
+
minWidth?: number;
|
|
98
|
+
/** 最大列数限制 */
|
|
99
|
+
maxColumns?: number;
|
|
100
|
+
/**
|
|
101
|
+
* 显式断点映射,key 为容器最小宽度(px)
|
|
102
|
+
* @example { 0: 1, 420: 2, 630: 3, 841: 4, 1367: 5 }
|
|
103
|
+
* @example { 0: { columns: 1, gap: 12 }, 420: { columns: 2, gap: 16 } }
|
|
104
|
+
*/
|
|
105
|
+
breakpoints?: BreakpointMap;
|
|
106
|
+
/** 默认列数(容器宽度小于所有断点时),默认为 1 */
|
|
107
|
+
defaultColumns?: number;
|
|
108
|
+
/** 间距,默认为 16 */
|
|
109
|
+
gap?: number | string;
|
|
110
|
+
/** ResizeObserver 防抖延迟(ms),默认为 0 */
|
|
111
|
+
debounce?: number;
|
|
112
|
+
};
|
|
80
113
|
export declare type LayoutConfig = {
|
|
81
114
|
type?: LayoutType;
|
|
82
115
|
className?: string;
|
|
83
116
|
containerStyle?: React.CSSProperties;
|
|
117
|
+
/**
|
|
118
|
+
* 响应式布局配置
|
|
119
|
+
* 存在此配置时自动启用 ResizeObserver 响应式布局
|
|
120
|
+
*/
|
|
121
|
+
responsive?: ResponsiveConfig;
|
|
84
122
|
columns?: number;
|
|
85
123
|
gutter?: number | object | Array<number>;
|
|
86
124
|
align?: 'top' | 'middle' | 'bottom' | 'stretch';
|
|
@@ -146,6 +184,7 @@ export interface SelectorProps<T = OptionKey> extends GroupItem {
|
|
|
146
184
|
stepperProps?: {
|
|
147
185
|
size?: 'small' | 'middle' | 'large';
|
|
148
186
|
shape?: 'round' | 'square';
|
|
187
|
+
horizontalPadding?: number | string;
|
|
149
188
|
};
|
|
150
189
|
style?: React.CSSProperties;
|
|
151
190
|
/**
|
|
@@ -153,6 +192,7 @@ export interface SelectorProps<T = OptionKey> extends GroupItem {
|
|
|
153
192
|
*/
|
|
154
193
|
titleProps?: HeaderProps;
|
|
155
194
|
headerProps?: HeaderProps;
|
|
195
|
+
selectProps?: any;
|
|
156
196
|
}
|
|
157
197
|
export interface SelectorGroupProps {
|
|
158
198
|
allowedValuesPolicy?: 'relaxed' | 'strict';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface DeviceIconGroupProps {
|
|
4
|
+
isShowScanner?: boolean;
|
|
5
|
+
isShowCamera?: boolean;
|
|
6
|
+
isShowNFC?: boolean;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const DeviceIconGroup: React.FC<DeviceIconGroupProps>;
|
|
11
|
+
export default DeviceIconGroup;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Iconfont } from '@pisell/materials';
|
|
3
|
+
import useTerminalPeripherals from "../../hooks/useTerminalPeripherals";
|
|
4
|
+
import useNativeScanner from "../../hooks/useNativeScanner";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
var DeviceIconGroup = function DeviceIconGroup(_ref) {
|
|
7
|
+
var _ref$isShowScanner = _ref.isShowScanner,
|
|
8
|
+
isShowScanner = _ref$isShowScanner === void 0 ? true : _ref$isShowScanner,
|
|
9
|
+
_ref$isShowCamera = _ref.isShowCamera,
|
|
10
|
+
isShowCamera = _ref$isShowCamera === void 0 ? true : _ref$isShowCamera,
|
|
11
|
+
_ref$isShowNFC = _ref.isShowNFC,
|
|
12
|
+
isShowNFC = _ref$isShowNFC === void 0 ? true : _ref$isShowNFC,
|
|
13
|
+
style = _ref.style,
|
|
14
|
+
className = _ref.className;
|
|
15
|
+
var _useTerminalPeriphera = useTerminalPeripherals(),
|
|
16
|
+
peripheralsStatus = _useTerminalPeriphera.peripheralsStatus;
|
|
17
|
+
var _useNativeScanner = useNativeScanner(),
|
|
18
|
+
isTerminal = _useNativeScanner.isTerminal;
|
|
19
|
+
|
|
20
|
+
// 状态指示器渲染函数
|
|
21
|
+
var statusIndicator = function statusIndicator(status) {
|
|
22
|
+
return /*#__PURE__*/React.createElement(Iconfont, {
|
|
23
|
+
style: {
|
|
24
|
+
borderRadius: '50%',
|
|
25
|
+
background: status ? '#17B26A' : '#F04438',
|
|
26
|
+
color: '#fff'
|
|
27
|
+
},
|
|
28
|
+
type: status ? 'pisell2-check' : 'pisell2-x-close'
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "device-icon-group ".concat(className || ''),
|
|
33
|
+
style: style
|
|
34
|
+
}, isShowScanner && /*#__PURE__*/React.createElement("span", {
|
|
35
|
+
className: "device-icon-group__icon-item"
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
37
|
+
type: "pisell2-Scanner"
|
|
38
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: "status-indicator"
|
|
40
|
+
}, statusIndicator((peripheralsStatus === null || peripheralsStatus === void 0 ? void 0 : peripheralsStatus.scanner) === 'connected'))), isShowNFC && /*#__PURE__*/React.createElement("span", {
|
|
41
|
+
className: "device-icon-group__icon-item"
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
43
|
+
type: "pisell2-NFC"
|
|
44
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: "status-indicator"
|
|
46
|
+
}, statusIndicator((peripheralsStatus === null || peripheralsStatus === void 0 ? void 0 : peripheralsStatus.nfc) === 'connected'))), isShowCamera && /*#__PURE__*/React.createElement("span", {
|
|
47
|
+
className: "device-icon-group__icon-item"
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
49
|
+
type: "pisell2-camera"
|
|
50
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: "status-indicator"
|
|
52
|
+
}, statusIndicator(isTerminal))));
|
|
53
|
+
};
|
|
54
|
+
export default DeviceIconGroup;
|