@pisell/private-materials 6.7.9 → 6.8.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 +7 -7
- 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/Voucher/index.js +2 -1
- package/es/components/booking/addons/index.js +25 -17
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +548 -84
- package/es/components/booking/components/footer/index.js +77 -56
- package/es/components/booking/components/footer/utils.d.ts +19 -0
- package/es/components/booking/components/footer/utils.js +194 -73
- package/es/components/booking/components/voucher/index.js +23 -7
- package/es/components/booking/hooks/useQuotation.js +4 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/service2/utils.js +1 -0
- package/es/components/booking/info2/cartClientCard/index.js +30 -6
- package/es/components/booking/info2/index.js +1 -1
- package/es/components/booking/info2/service/addService/index.js +2 -3
- package/es/components/booking/info2/service/editNormalService/index.js +6 -0
- package/es/components/booking/info2/service/editService/index.js +16 -6
- package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/es/components/booking/info2/service/editService/utils.js +66 -0
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +16 -3
- package/es/components/checkout/PaymentModal.d.ts +13 -5
- package/es/components/checkout/PaymentModal.js +304 -252
- package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/es/components/checkout/components/AdditionalModule/index.js +52 -12
- package/es/components/checkout/components/AmountSummary/index.js +9 -76
- package/es/components/checkout/components/AmountSummary/index.less +5 -6
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
- package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
- package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/es/components/checkout/components/SearchAndClientModule/index.js +39 -40
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +6 -0
- package/es/components/checkout/locales.js +6 -0
- package/es/components/checkout/plugin.d.ts +2 -0
- package/es/components/checkout/plugin.js +303 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
- package/es/components/eftposPay/payo/config.js +70 -32
- package/es/components/eftposPay/payo/payment.d.ts +66 -0
- package/es/components/eftposPay/payo/payment.js +579 -0
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/tyro/index.js +12 -0
- package/es/components/eftposPay/utils/log/index.d.ts +110 -0
- package/es/components/eftposPay/utils/log/index.js +371 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/list/List.js +99 -56
- package/es/components/list/hooks/useListState.d.ts +5 -3
- package/es/components/list/hooks/useListState.js +10 -2
- package/es/components/list/styles/base.less +4 -0
- package/es/components/list/styles/content.less +1 -1
- package/es/components/list/styles/header.less +4 -4
- package/es/components/list/types.d.ts +1 -0
- package/es/components/list/utils/index.d.ts +13 -1
- package/es/components/list/utils/index.js +43 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
- package/es/components/pay/toC/index.js +7 -4
- package/es/components/pay/toC/locales.d.ts +3 -0
- package/es/components/pay/toC/locales.js +6 -3
- package/es/components/pay/toC/status.d.ts +1 -0
- package/es/components/pay/toC/status.js +3 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/subTotal/index.js +1 -1
- package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
- package/es/components/{checkout/PaymentPlugin.js → systemSettings/registry/components/GroupModal.js} +132 -171
- package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
- package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
- package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
- package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
- package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
- package/es/components/systemSettings/registry/components/SectionList.js +174 -0
- package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
- package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
- package/es/components/systemSettings/registry/components/index.d.ts +4 -0
- package/es/components/systemSettings/registry/components/index.js +4 -0
- package/es/components/systemSettings/registry/index.d.ts +5 -0
- package/es/components/systemSettings/registry/index.js +1059 -0
- package/es/components/systemSettings/registry/index.less +410 -0
- package/es/components/systemSettings/registry/locales.d.ts +272 -0
- package/es/components/systemSettings/registry/locales.js +300 -0
- package/es/components/systemSettings/registry/services.d.ts +77 -0
- package/es/components/systemSettings/registry/services.js +472 -0
- package/es/components/systemSettings/registry/types.d.ts +126 -0
- package/es/components/systemSettings/registry/types.js +1 -0
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
- package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/es/components/systemSettings/registry/utils/validators.js +44 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +58 -11
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +149 -36
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -86
- package/es/components/ticketBooking/components/menuBar/index.js +109 -12
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/es/components/ticketBooking/components/timeBar/index.js +112 -7
- package/es/components/ticketBooking/components/timeBar/index.less +59 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +29 -18
- package/es/components/ticketBooking/locales.d.ts +9 -0
- package/es/components/ticketBooking/locales.js +12 -3
- package/es/components/ticketBooking/utils/index.d.ts +3 -0
- package/es/components/ticketBooking/utils/index.js +36 -13
- package/es/components/wallet/Detail/index.js +34 -2
- package/es/components/wallet/Detail/index.less +11 -0
- package/es/components/wallet/Detail/locales.d.ts +6 -0
- package/es/components/wallet/Detail/locales.js +14 -2
- package/es/components/wallet/Voucher/index.js +11 -10
- package/es/components/wallet/components/WalletCard.js +5 -1
- package/es/components/wallet/index.js +4 -2
- package/es/components/wallet/serve.d.ts +7 -0
- package/es/components/wallet/utils.d.ts +48 -0
- package/es/components/wallet/utils.js +342 -0
- package/es/index.d.ts +5 -0
- package/es/index.js +6 -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/productSelect/CategoryTabs/index.d.ts +1 -0
- package/es/plus/productSelect/CategoryTabs/index.js +2 -1
- package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
- package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +84 -31
- package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
- package/es/plus/walletPassGallery/index.js +7 -3
- package/es/plus/walletPassGallery/serve.d.ts +3 -0
- package/es/plus/walletPassGallery/serve.js +4 -2
- package/es/pro/Login2.0/index.less +15 -8
- package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/es/pro/Selector/BatchSelectorDemo.js +470 -0
- package/es/pro/Selector/Selector.d.ts +5 -0
- package/es/pro/Selector/Selector.js +283 -0
- package/es/pro/Selector/SelectorGroup.d.ts +11 -0
- package/es/pro/Selector/SelectorGroup.js +537 -0
- package/es/pro/Selector/components/Card/index.d.ts +27 -0
- package/es/pro/Selector/components/Card/index.js +96 -0
- package/es/pro/Selector/components/Card/index.less +132 -0
- package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/es/pro/Selector/components/IntersectionObserver.js +384 -0
- package/es/pro/Selector/components/NumericStepper/index.d.ts +41 -0
- package/es/pro/Selector/components/NumericStepper/index.js +198 -0
- package/es/pro/Selector/components/NumericStepper/index.less +221 -0
- package/es/pro/Selector/components/index.d.ts +2 -0
- package/es/pro/Selector/components/index.js +2 -0
- package/es/pro/Selector/demo.d.ts +3 -0
- package/es/pro/Selector/demo.js +158 -0
- package/es/pro/Selector/hooks/useSelectionController.d.ts +42 -0
- package/es/pro/Selector/hooks/useSelectionController.js +414 -0
- package/es/pro/Selector/index.d.ts +8 -0
- package/es/pro/Selector/index.js +5 -0
- package/es/pro/Selector/locales.d.ts +42 -0
- package/es/pro/Selector/locales.js +80 -0
- package/es/pro/Selector/selector.less +3 -0
- package/es/pro/Selector/selectorGroup.less +8 -0
- package/es/pro/Selector/types.d.ts +114 -0
- package/es/pro/Selector/types.js +1 -0
- package/es/pro/Selector/utils/index.d.ts +49 -0
- package/es/pro/Selector/utils/index.js +229 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +45 -36
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
- package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/lib/components/booking/addons/index.js +15 -7
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +293 -41
- package/lib/components/booking/components/footer/index.js +30 -11
- package/lib/components/booking/components/footer/utils.d.ts +19 -0
- package/lib/components/booking/components/footer/utils.js +138 -41
- package/lib/components/booking/components/voucher/index.js +25 -9
- package/lib/components/booking/hooks/useQuotation.js +2 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.js +1 -0
- package/lib/components/booking/info2/cartClientCard/index.js +25 -5
- package/lib/components/booking/info2/index.js +7 -2
- package/lib/components/booking/info2/service/addService/index.js +1 -2
- package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
- package/lib/components/booking/info2/service/editService/index.js +12 -3
- package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/lib/components/booking/info2/service/editService/utils.js +40 -3
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +11 -0
- package/lib/components/checkout/PaymentModal.d.ts +13 -5
- package/lib/components/checkout/PaymentModal.js +190 -147
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/lib/components/checkout/components/AdditionalModule/index.js +52 -11
- package/lib/components/checkout/components/AmountSummary/index.js +5 -46
- package/lib/components/checkout/components/AmountSummary/index.less +5 -6
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
- package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
- package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/lib/components/checkout/components/SearchAndClientModule/index.js +29 -3
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +6 -0
- package/lib/components/checkout/locales.js +6 -0
- package/lib/components/checkout/plugin.d.ts +2 -0
- package/lib/components/checkout/plugin.js +263 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
- package/lib/components/eftposPay/payo/config.js +98 -73
- package/lib/components/eftposPay/payo/payment.d.ts +66 -0
- package/lib/components/eftposPay/payo/payment.js +357 -0
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/tyro/index.js +12 -0
- package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
- package/lib/components/eftposPay/utils/log/index.js +294 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/list/List.js +58 -36
- package/lib/components/list/hooks/useListState.d.ts +5 -3
- package/lib/components/list/hooks/useListState.js +9 -1
- package/lib/components/list/styles/base.less +4 -0
- package/lib/components/list/styles/content.less +1 -1
- package/lib/components/list/styles/header.less +4 -4
- package/lib/components/list/types.d.ts +1 -0
- package/lib/components/list/utils/index.d.ts +13 -1
- package/lib/components/list/utils/index.js +27 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
- package/lib/components/pay/toC/index.js +4 -1
- package/lib/components/pay/toC/locales.d.ts +3 -0
- package/lib/components/pay/toC/locales.js +6 -3
- package/lib/components/pay/toC/status.d.ts +1 -0
- package/lib/components/pay/toC/status.js +5 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/subTotal/index.js +1 -1
- package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
- package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
- package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
- package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
- package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
- package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/index.js +48 -0
- package/lib/components/systemSettings/registry/index.d.ts +5 -0
- package/lib/components/systemSettings/registry/index.js +529 -0
- package/lib/components/systemSettings/registry/index.less +410 -0
- package/lib/components/systemSettings/registry/locales.d.ts +272 -0
- package/lib/components/systemSettings/registry/locales.js +324 -0
- package/lib/components/systemSettings/registry/services.d.ts +77 -0
- package/lib/components/systemSettings/registry/services.js +290 -0
- package/lib/components/systemSettings/registry/types.d.ts +126 -0
- package/lib/components/systemSettings/registry/types.js +17 -0
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
- package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/lib/components/systemSettings/registry/utils/validators.js +54 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +40 -5
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +93 -24
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
- package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
- package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +17 -13
- package/lib/components/ticketBooking/locales.d.ts +9 -0
- package/lib/components/ticketBooking/locales.js +12 -3
- package/lib/components/ticketBooking/utils/index.d.ts +3 -0
- package/lib/components/ticketBooking/utils/index.js +20 -6
- package/lib/components/wallet/Detail/index.js +31 -3
- package/lib/components/wallet/Detail/index.less +11 -0
- package/lib/components/wallet/Detail/locales.d.ts +6 -0
- package/lib/components/wallet/Detail/locales.js +14 -2
- package/lib/components/wallet/Voucher/index.js +8 -8
- package/lib/components/wallet/components/WalletCard.js +4 -0
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/serve.d.ts +7 -0
- package/lib/components/wallet/utils.d.ts +48 -0
- package/lib/components/wallet/utils.js +287 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +15 -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/productSelect/CategoryTabs/index.d.ts +1 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +2 -1
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +54 -15
- package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
- package/lib/plus/walletPassGallery/index.js +7 -3
- package/lib/plus/walletPassGallery/serve.d.ts +3 -0
- package/lib/plus/walletPassGallery/serve.js +3 -2
- package/lib/pro/Login2.0/index.less +15 -8
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/lib/pro/Selector/BatchSelectorDemo.js +376 -0
- package/lib/pro/Selector/Selector.d.ts +5 -0
- package/lib/pro/Selector/Selector.js +264 -0
- package/lib/pro/Selector/SelectorGroup.d.ts +11 -0
- package/lib/pro/Selector/SelectorGroup.js +463 -0
- package/lib/pro/Selector/components/Card/index.d.ts +27 -0
- package/lib/pro/Selector/components/Card/index.js +114 -0
- package/lib/pro/Selector/components/Card/index.less +132 -0
- package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/lib/pro/Selector/components/IntersectionObserver.js +281 -0
- package/lib/pro/Selector/components/NumericStepper/index.d.ts +41 -0
- package/lib/pro/Selector/components/NumericStepper/index.js +221 -0
- package/lib/pro/Selector/components/NumericStepper/index.less +221 -0
- package/lib/pro/Selector/components/index.d.ts +2 -0
- package/lib/pro/Selector/components/index.js +42 -0
- package/lib/pro/Selector/demo.d.ts +3 -0
- package/lib/pro/Selector/demo.js +102 -0
- package/lib/pro/Selector/hooks/useSelectionController.d.ts +42 -0
- package/lib/pro/Selector/hooks/useSelectionController.js +338 -0
- package/lib/pro/Selector/index.d.ts +8 -0
- package/lib/pro/Selector/index.js +39 -0
- package/lib/pro/Selector/locales.d.ts +42 -0
- package/lib/pro/Selector/locales.js +80 -0
- package/lib/pro/Selector/selector.less +3 -0
- package/lib/pro/Selector/selectorGroup.less +8 -0
- package/lib/pro/Selector/types.d.ts +114 -0
- package/lib/pro/Selector/types.js +17 -0
- package/lib/pro/Selector/utils/index.d.ts +49 -0
- package/lib/pro/Selector/utils/index.js +221 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +42 -43
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/lowcode/payment-modal/meta.ts +135 -0
- package/lowcode/selector/meta.ts +352 -0
- package/lowcode/selector.group/meta.ts +200 -0
- package/lowcode/settings-registry/meta.ts +29 -0
- package/lowcode/wallet-pass-detail/meta.ts +89 -0
- package/package.json +4 -4
- package/es/components/checkout/PaymentPlugin.d.ts +0 -3
- package/lib/components/checkout/PaymentPlugin.d.ts +0 -3
- package/lib/components/checkout/PaymentPlugin.js +0 -181
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
2
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
3
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4
|
+
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); }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
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; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React, { useEffect, useState } from 'react';
|
|
12
|
+
import { Drawer, Form, Input, Select, Checkbox, Row, Col, InputNumber } from 'antd';
|
|
13
|
+
import { Button, BaseTranslation } from '@pisell/materials';
|
|
14
|
+
import { locales } from '@pisell/utils';
|
|
15
|
+
import { validateDefaultValue, parseDefaultValue } from "../utils/typeValidation";
|
|
16
|
+
import { createPrefixedAppIdentifierValidator } from "../utils/validators";
|
|
17
|
+
var Option = Select.Option;
|
|
18
|
+
var TextArea = Input.TextArea;
|
|
19
|
+
|
|
20
|
+
// 作用域选项
|
|
21
|
+
var scopeOptions = [{
|
|
22
|
+
value: 'system',
|
|
23
|
+
label: 'registry.scope.systemDefault'
|
|
24
|
+
}, {
|
|
25
|
+
value: 'saas',
|
|
26
|
+
label: 'registry.scope.saasDefault'
|
|
27
|
+
}, {
|
|
28
|
+
value: 'organization',
|
|
29
|
+
label: 'registry.scope.organization'
|
|
30
|
+
}, {
|
|
31
|
+
value: 'business',
|
|
32
|
+
label: 'registry.scope.business'
|
|
33
|
+
}, {
|
|
34
|
+
value: 'channel',
|
|
35
|
+
label: 'registry.scope.channel'
|
|
36
|
+
}, {
|
|
37
|
+
value: 'board',
|
|
38
|
+
label: 'registry.scope.board'
|
|
39
|
+
}];
|
|
40
|
+
|
|
41
|
+
// 字段类型选项
|
|
42
|
+
var fieldTypeOptions = [{
|
|
43
|
+
value: 'string',
|
|
44
|
+
label: 'String'
|
|
45
|
+
}, {
|
|
46
|
+
value: 'integer',
|
|
47
|
+
label: 'Integer'
|
|
48
|
+
}, {
|
|
49
|
+
value: 'float',
|
|
50
|
+
label: 'Float'
|
|
51
|
+
}, {
|
|
52
|
+
value: 'boolean',
|
|
53
|
+
label: 'Boolean'
|
|
54
|
+
}, {
|
|
55
|
+
value: 'array',
|
|
56
|
+
label: 'Array'
|
|
57
|
+
}];
|
|
58
|
+
|
|
59
|
+
// 界面类型选项(根据字段类型联动)
|
|
60
|
+
var interfaceTypeOptions = {
|
|
61
|
+
string: [{
|
|
62
|
+
value: 'Input',
|
|
63
|
+
label: '单行文本输入框'
|
|
64
|
+
}, {
|
|
65
|
+
value: 'Input.TextArea',
|
|
66
|
+
label: '多行文本输入框'
|
|
67
|
+
}, {
|
|
68
|
+
value: 'Select',
|
|
69
|
+
label: '单选下拉框'
|
|
70
|
+
}],
|
|
71
|
+
integer: [{
|
|
72
|
+
value: 'InputNumber',
|
|
73
|
+
label: '数字输入框(整数模式)'
|
|
74
|
+
}],
|
|
75
|
+
float: [{
|
|
76
|
+
value: 'InputNumber',
|
|
77
|
+
label: '数字输入框(支持小数)'
|
|
78
|
+
}],
|
|
79
|
+
boolean: [{
|
|
80
|
+
value: 'Checkbox',
|
|
81
|
+
label: '复选框'
|
|
82
|
+
}, {
|
|
83
|
+
value: 'Switch',
|
|
84
|
+
label: '开关组件'
|
|
85
|
+
}],
|
|
86
|
+
array: [{
|
|
87
|
+
value: 'Select',
|
|
88
|
+
label: '多选下拉框'
|
|
89
|
+
}, {
|
|
90
|
+
value: 'Input.JSON',
|
|
91
|
+
label: 'JSON编辑器'
|
|
92
|
+
}]
|
|
93
|
+
};
|
|
94
|
+
var ItemModal = function ItemModal(_ref) {
|
|
95
|
+
var open = _ref.open,
|
|
96
|
+
type = _ref.type,
|
|
97
|
+
data = _ref.data,
|
|
98
|
+
section = _ref.section,
|
|
99
|
+
onOk = _ref.onOk,
|
|
100
|
+
onCancel = _ref.onCancel;
|
|
101
|
+
var _Form$useForm = Form.useForm(),
|
|
102
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
103
|
+
form = _Form$useForm2[0];
|
|
104
|
+
var _useState = useState('string'),
|
|
105
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
106
|
+
selectedFieldType = _useState2[0],
|
|
107
|
+
setSelectedFieldType = _useState2[1];
|
|
108
|
+
var _useState3 = useState([]),
|
|
109
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
110
|
+
selectedScopes = _useState4[0],
|
|
111
|
+
setSelectedScopes = _useState4[1];
|
|
112
|
+
var _useState5 = useState(false),
|
|
113
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
114
|
+
showSystemDefaultValue = _useState6[0],
|
|
115
|
+
setShowSystemDefaultValue = _useState6[1];
|
|
116
|
+
|
|
117
|
+
// 根据字段类型渲染对应的输入组件
|
|
118
|
+
var renderDefaultValueInput = function renderDefaultValueInput(fieldType) {
|
|
119
|
+
switch (fieldType) {
|
|
120
|
+
case 'string':
|
|
121
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
122
|
+
placeholder: "\u8BF7\u8F93\u5165\u9ED8\u8BA4\u503C",
|
|
123
|
+
allowClear: true
|
|
124
|
+
});
|
|
125
|
+
case 'integer':
|
|
126
|
+
return /*#__PURE__*/React.createElement(InputNumber, {
|
|
127
|
+
placeholder: "\u8BF7\u8F93\u5165\u6574\u6570",
|
|
128
|
+
style: {
|
|
129
|
+
width: '100%'
|
|
130
|
+
},
|
|
131
|
+
precision: 0,
|
|
132
|
+
allowClear: true
|
|
133
|
+
});
|
|
134
|
+
case 'float':
|
|
135
|
+
return /*#__PURE__*/React.createElement(InputNumber, {
|
|
136
|
+
placeholder: "\u8BF7\u8F93\u5165\u6570\u5B57",
|
|
137
|
+
style: {
|
|
138
|
+
width: '100%'
|
|
139
|
+
},
|
|
140
|
+
allowClear: true
|
|
141
|
+
});
|
|
142
|
+
case 'boolean':
|
|
143
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
144
|
+
placeholder: "\u8BF7\u9009\u62E9\u5E03\u5C14\u503C",
|
|
145
|
+
allowClear: true
|
|
146
|
+
}, /*#__PURE__*/React.createElement(Option, {
|
|
147
|
+
value: "true"
|
|
148
|
+
}, "true"), /*#__PURE__*/React.createElement(Option, {
|
|
149
|
+
value: "false"
|
|
150
|
+
}, "false"));
|
|
151
|
+
case 'array':
|
|
152
|
+
return /*#__PURE__*/React.createElement(TextArea, {
|
|
153
|
+
placeholder: "\u8BF7\u8F93\u5165JSON\u5BF9\u8C61\u6216\u6570\u7EC4\uFF0C\u4F8B\u5982\uFF1A{} \u6216 []",
|
|
154
|
+
rows: 4,
|
|
155
|
+
allowClear: true
|
|
156
|
+
});
|
|
157
|
+
default:
|
|
158
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
159
|
+
placeholder: "\u8BF7\u8F93\u5165\u9ED8\u8BA4\u503C",
|
|
160
|
+
allowClear: true
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// 当模态框打开时,初始化表单数据
|
|
166
|
+
useEffect(function () {
|
|
167
|
+
if (open) {
|
|
168
|
+
if (type === 'edit' && data) {
|
|
169
|
+
// 处理多语言字段
|
|
170
|
+
var getName = function getName(nameField) {
|
|
171
|
+
if (typeof nameField === 'string') return nameField;
|
|
172
|
+
if (nameField && _typeof(nameField) === 'object') {
|
|
173
|
+
return nameField['zh-CN'] || nameField.original || nameField.en || '';
|
|
174
|
+
}
|
|
175
|
+
return '';
|
|
176
|
+
};
|
|
177
|
+
var getDescription = function getDescription(descField) {
|
|
178
|
+
if (typeof descField === 'string') {
|
|
179
|
+
return {
|
|
180
|
+
en: '',
|
|
181
|
+
'zh-CN': '',
|
|
182
|
+
'zh-HK': '',
|
|
183
|
+
original: descField
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
if (descField && _typeof(descField) === 'object') {
|
|
187
|
+
return {
|
|
188
|
+
en: descField.en || '',
|
|
189
|
+
'zh-CN': descField['zh-CN'] || '',
|
|
190
|
+
'zh-HK': descField['zh-HK'] || '',
|
|
191
|
+
original: descField.original || descField['zh-CN'] || descField.en || ''
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
en: '',
|
|
196
|
+
'zh-CN': '',
|
|
197
|
+
'zh-HK': '',
|
|
198
|
+
original: ''
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
var formData = {
|
|
202
|
+
name: getDescription(data.title),
|
|
203
|
+
key: data.key || data.code,
|
|
204
|
+
fieldType: data.type || data.fieldType || 'string',
|
|
205
|
+
interfaceType: data.interface || data.interfaceType,
|
|
206
|
+
scopes: data.scopes || [],
|
|
207
|
+
description: getDescription(data.description),
|
|
208
|
+
default: data.default,
|
|
209
|
+
uiSchema: function () {
|
|
210
|
+
// 处理UI Schema的显示:如果是对象则转换为字符串,如果是字符串则直接使用
|
|
211
|
+
var uiSchemaValue = data.schema || data.uiSchema;
|
|
212
|
+
if (!uiSchemaValue) return '';
|
|
213
|
+
if (typeof uiSchemaValue === 'string') return uiSchemaValue;
|
|
214
|
+
return JSON.stringify(uiSchemaValue, null, 2);
|
|
215
|
+
}()
|
|
216
|
+
};
|
|
217
|
+
form.setFieldsValue(formData);
|
|
218
|
+
setSelectedFieldType(formData.fieldType);
|
|
219
|
+
setSelectedScopes(formData.scopes);
|
|
220
|
+
// 根据作用域设置系统默认值显示状态
|
|
221
|
+
setShowSystemDefaultValue(formData.scopes.includes('system'));
|
|
222
|
+
} else {
|
|
223
|
+
form.resetFields();
|
|
224
|
+
// 设置默认值
|
|
225
|
+
var defaultValues = {
|
|
226
|
+
name: {
|
|
227
|
+
en: '',
|
|
228
|
+
'zh-CN': '',
|
|
229
|
+
'zh-HK': '',
|
|
230
|
+
original: ''
|
|
231
|
+
},
|
|
232
|
+
description: {
|
|
233
|
+
en: '',
|
|
234
|
+
'zh-CN': '',
|
|
235
|
+
'zh-HK': '',
|
|
236
|
+
original: ''
|
|
237
|
+
},
|
|
238
|
+
fieldType: 'string',
|
|
239
|
+
scopes: ['string'],
|
|
240
|
+
// 为key字段添加section code前缀作为默认值
|
|
241
|
+
key: section !== null && section !== void 0 && section.code ? "".concat(section.code, ".") : ''
|
|
242
|
+
};
|
|
243
|
+
form.setFieldsValue(defaultValues);
|
|
244
|
+
setSelectedFieldType('string');
|
|
245
|
+
setSelectedScopes(['string']);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}, [open, type, data, form]);
|
|
249
|
+
|
|
250
|
+
// 处理字段类型变化
|
|
251
|
+
var handleFieldTypeChange = function handleFieldTypeChange(value) {
|
|
252
|
+
setSelectedFieldType(value);
|
|
253
|
+
// 清空界面类型选择
|
|
254
|
+
form.setFieldsValue({
|
|
255
|
+
interfaceType: undefined
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// 清空默认值,因为不同类型的输入组件可能不兼容
|
|
259
|
+
form.setFieldsValue({
|
|
260
|
+
default: undefined
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
// 重新验证默认值字段
|
|
264
|
+
form.validateFields(['default']).catch(function () {
|
|
265
|
+
// 验证失败时不做特殊处理,让用户看到错误信息
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
// 处理作用域变化
|
|
270
|
+
var handleScopesChange = function handleScopesChange(values) {
|
|
271
|
+
var stringValues = values.map(function (v) {
|
|
272
|
+
return String(v);
|
|
273
|
+
});
|
|
274
|
+
setSelectedScopes(stringValues);
|
|
275
|
+
console.log('stringValues', stringValues);
|
|
276
|
+
setShowSystemDefaultValue(stringValues.includes('system'));
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
// 处理确认
|
|
280
|
+
var handleOk = /*#__PURE__*/function () {
|
|
281
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
282
|
+
var values, validation, _validation;
|
|
283
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
284
|
+
while (1) switch (_context.prev = _context.next) {
|
|
285
|
+
case 0:
|
|
286
|
+
_context.prev = 0;
|
|
287
|
+
_context.next = 3;
|
|
288
|
+
return form.validateFields();
|
|
289
|
+
case 3:
|
|
290
|
+
values = _context.sent;
|
|
291
|
+
if (!(values.default !== undefined && values.default !== null && values.default !== '')) {
|
|
292
|
+
_context.next = 19;
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
if (!(values.fieldType === 'integer' || values.fieldType === 'float')) {
|
|
296
|
+
_context.next = 13;
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
if (!(typeof values.default !== 'number')) {
|
|
300
|
+
_context.next = 11;
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
validation = validateDefaultValue(values.fieldType, values.default);
|
|
304
|
+
if (validation.isValid) {
|
|
305
|
+
_context.next = 10;
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
throw new Error("\u9ED8\u8BA4\u503C\u9A8C\u8BC1\u5931\u8D25: ".concat(validation.error));
|
|
309
|
+
case 10:
|
|
310
|
+
values.default = parseDefaultValue(values.fieldType, values.default);
|
|
311
|
+
case 11:
|
|
312
|
+
_context.next = 17;
|
|
313
|
+
break;
|
|
314
|
+
case 13:
|
|
315
|
+
// 其他类型需要验证和解析
|
|
316
|
+
_validation = validateDefaultValue(values.fieldType, values.default);
|
|
317
|
+
if (_validation.isValid) {
|
|
318
|
+
_context.next = 16;
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
throw new Error("\u9ED8\u8BA4\u503C\u9A8C\u8BC1\u5931\u8D25: ".concat(_validation.error));
|
|
322
|
+
case 16:
|
|
323
|
+
values.default = parseDefaultValue(values.fieldType, values.default);
|
|
324
|
+
case 17:
|
|
325
|
+
_context.next = 20;
|
|
326
|
+
break;
|
|
327
|
+
case 19:
|
|
328
|
+
values.default = null;
|
|
329
|
+
case 20:
|
|
330
|
+
if (!values.uiSchema) {
|
|
331
|
+
_context.next = 30;
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
_context.prev = 21;
|
|
335
|
+
// 验证并解析JSON字符串
|
|
336
|
+
values.uiSchema = JSON.parse(values.uiSchema);
|
|
337
|
+
_context.next = 28;
|
|
338
|
+
break;
|
|
339
|
+
case 25:
|
|
340
|
+
_context.prev = 25;
|
|
341
|
+
_context.t0 = _context["catch"](21);
|
|
342
|
+
throw new Error("UI Schema\u683C\u5F0F\u9519\u8BEF: ".concat(_context.t0 instanceof Error ? _context.t0.message : '未知错误'));
|
|
343
|
+
case 28:
|
|
344
|
+
_context.next = 31;
|
|
345
|
+
break;
|
|
346
|
+
case 30:
|
|
347
|
+
values.uiSchema = undefined;
|
|
348
|
+
case 31:
|
|
349
|
+
_context.next = 33;
|
|
350
|
+
return onOk(values);
|
|
351
|
+
case 33:
|
|
352
|
+
_context.next = 38;
|
|
353
|
+
break;
|
|
354
|
+
case 35:
|
|
355
|
+
_context.prev = 35;
|
|
356
|
+
_context.t1 = _context["catch"](0);
|
|
357
|
+
console.error('Validation failed:', _context.t1);
|
|
358
|
+
// 保存失败时不清空表单,不关闭抽屉
|
|
359
|
+
case 38:
|
|
360
|
+
case "end":
|
|
361
|
+
return _context.stop();
|
|
362
|
+
}
|
|
363
|
+
}, _callee, null, [[0, 35], [21, 25]]);
|
|
364
|
+
}));
|
|
365
|
+
return function handleOk() {
|
|
366
|
+
return _ref2.apply(this, arguments);
|
|
367
|
+
};
|
|
368
|
+
}();
|
|
369
|
+
|
|
370
|
+
// 处理取消
|
|
371
|
+
var handleCancel = function handleCancel() {
|
|
372
|
+
form.resetFields();
|
|
373
|
+
onCancel();
|
|
374
|
+
};
|
|
375
|
+
var title = locales.getText(type === 'add' ? 'registry.modal.add.item' : 'registry.modal.edit.item');
|
|
376
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
377
|
+
title: title,
|
|
378
|
+
open: open,
|
|
379
|
+
onClose: handleCancel,
|
|
380
|
+
width: 600,
|
|
381
|
+
destroyOnClose: true,
|
|
382
|
+
footer: /*#__PURE__*/React.createElement("div", {
|
|
383
|
+
style: {
|
|
384
|
+
textAlign: 'right'
|
|
385
|
+
}
|
|
386
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
387
|
+
onClick: handleCancel,
|
|
388
|
+
style: {
|
|
389
|
+
marginRight: 8
|
|
390
|
+
}
|
|
391
|
+
}, locales.getText('registry.button.cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
392
|
+
type: "primary",
|
|
393
|
+
onClick: handleOk
|
|
394
|
+
}, locales.getText('registry.button.save')))
|
|
395
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
396
|
+
form: form,
|
|
397
|
+
layout: "vertical",
|
|
398
|
+
requiredMark: true
|
|
399
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
400
|
+
name: "name",
|
|
401
|
+
label: locales.getText('registry.form.name'),
|
|
402
|
+
rules: [{
|
|
403
|
+
required: true,
|
|
404
|
+
validator: function validator(_, value) {
|
|
405
|
+
if (!value || !value.original) {
|
|
406
|
+
return Promise.reject(new Error(locales.getText('registry.message.required')));
|
|
407
|
+
}
|
|
408
|
+
if (value.original.length > 100) {
|
|
409
|
+
return Promise.reject(new Error(locales.getText('registry.message.name.maxLength')));
|
|
410
|
+
}
|
|
411
|
+
return Promise.resolve();
|
|
412
|
+
}
|
|
413
|
+
}]
|
|
414
|
+
}, /*#__PURE__*/React.createElement(BaseTranslation, {
|
|
415
|
+
placeholder: locales.getText('registry.form.name.placeholder'),
|
|
416
|
+
type: "text",
|
|
417
|
+
renderMode: "edit"
|
|
418
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
419
|
+
name: "key",
|
|
420
|
+
label: locales.getText('registry.form.key'),
|
|
421
|
+
rules: [{
|
|
422
|
+
required: true,
|
|
423
|
+
message: locales.getText('registry.message.required')
|
|
424
|
+
}, {
|
|
425
|
+
max: 100,
|
|
426
|
+
message: locales.getText('registry.message.key.maxLength')
|
|
427
|
+
}, {
|
|
428
|
+
validator: section !== null && section !== void 0 && section.code ? createPrefixedAppIdentifierValidator(section.code) : function (_, value) {
|
|
429
|
+
if (!value) return Promise.resolve();
|
|
430
|
+
return Promise.reject(new Error('未找到当前区块信息'));
|
|
431
|
+
}
|
|
432
|
+
}]
|
|
433
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
434
|
+
placeholder: locales.getText('registry.form.key.placeholder'),
|
|
435
|
+
maxLength: 100
|
|
436
|
+
})), /*#__PURE__*/React.createElement(Row, {
|
|
437
|
+
gutter: 16
|
|
438
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
439
|
+
span: 12
|
|
440
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
441
|
+
name: "fieldType",
|
|
442
|
+
label: locales.getText('registry.form.fieldType'),
|
|
443
|
+
rules: [{
|
|
444
|
+
required: true,
|
|
445
|
+
message: locales.getText('registry.message.required')
|
|
446
|
+
}]
|
|
447
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
448
|
+
placeholder: locales.getText('registry.form.fieldType.placeholder'),
|
|
449
|
+
onChange: handleFieldTypeChange
|
|
450
|
+
}, fieldTypeOptions.map(function (option) {
|
|
451
|
+
return /*#__PURE__*/React.createElement(Option, {
|
|
452
|
+
key: option.value,
|
|
453
|
+
value: option.value
|
|
454
|
+
}, option.label);
|
|
455
|
+
})))), /*#__PURE__*/React.createElement(Col, {
|
|
456
|
+
span: 12
|
|
457
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
458
|
+
name: "interfaceType",
|
|
459
|
+
label: locales.getText('registry.form.interfaceType'),
|
|
460
|
+
rules: [{
|
|
461
|
+
required: true,
|
|
462
|
+
message: locales.getText('registry.message.required')
|
|
463
|
+
}]
|
|
464
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
465
|
+
placeholder: locales.getText('registry.form.interfaceType.placeholder'),
|
|
466
|
+
allowClear: true
|
|
467
|
+
}, (interfaceTypeOptions[selectedFieldType] || []).map(function (option) {
|
|
468
|
+
return /*#__PURE__*/React.createElement(Option, {
|
|
469
|
+
key: option.value,
|
|
470
|
+
value: option.value
|
|
471
|
+
}, option.label);
|
|
472
|
+
}))))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
473
|
+
name: "scopes",
|
|
474
|
+
label: locales.getText('registry.form.scopes'),
|
|
475
|
+
rules: [{
|
|
476
|
+
required: true,
|
|
477
|
+
message: locales.getText('registry.message.required')
|
|
478
|
+
}]
|
|
479
|
+
}, /*#__PURE__*/React.createElement(Checkbox.Group, {
|
|
480
|
+
options: scopeOptions.map(function (option) {
|
|
481
|
+
return {
|
|
482
|
+
label: locales.getText(option.label),
|
|
483
|
+
value: option.value
|
|
484
|
+
};
|
|
485
|
+
}),
|
|
486
|
+
onChange: handleScopesChange
|
|
487
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
488
|
+
name: "description",
|
|
489
|
+
label: locales.getText('registry.form.description'),
|
|
490
|
+
rules: [{
|
|
491
|
+
validator: function validator(_, value) {
|
|
492
|
+
if (value && value.original && value.original.length > 500) {
|
|
493
|
+
return Promise.reject(new Error(locales.getText('registry.message.description.maxLength')));
|
|
494
|
+
}
|
|
495
|
+
return Promise.resolve();
|
|
496
|
+
}
|
|
497
|
+
}]
|
|
498
|
+
}, /*#__PURE__*/React.createElement(BaseTranslation, {
|
|
499
|
+
placeholder: locales.getText('registry.form.description.placeholder'),
|
|
500
|
+
type: "textarea",
|
|
501
|
+
renderMode: "edit"
|
|
502
|
+
})), showSystemDefaultValue && /*#__PURE__*/React.createElement(Form.Item, {
|
|
503
|
+
name: "default",
|
|
504
|
+
label: locales.getText('registry.form.systemDefaultValue'),
|
|
505
|
+
rules: [{
|
|
506
|
+
validator: function validator(_, value) {
|
|
507
|
+
// 支持空值
|
|
508
|
+
if (value === null || value === undefined || value === '') {
|
|
509
|
+
return Promise.resolve();
|
|
510
|
+
}
|
|
511
|
+
var currentFieldType = form.getFieldValue('fieldType');
|
|
512
|
+
if (!currentFieldType) {
|
|
513
|
+
return Promise.reject(new Error('请先选择字段类型'));
|
|
514
|
+
}
|
|
515
|
+
var validation = validateDefaultValue(currentFieldType, value);
|
|
516
|
+
if (!validation.isValid) {
|
|
517
|
+
return Promise.reject(new Error(validation.error));
|
|
518
|
+
}
|
|
519
|
+
return Promise.resolve();
|
|
520
|
+
}
|
|
521
|
+
}]
|
|
522
|
+
}, renderDefaultValueInput(selectedFieldType)), /*#__PURE__*/React.createElement(Form.Item, {
|
|
523
|
+
name: "uiSchema",
|
|
524
|
+
label: locales.getText('registry.form.uiSchema'),
|
|
525
|
+
rules: [{
|
|
526
|
+
validator: function validator(_, value) {
|
|
527
|
+
// 支持空值时跳过验证
|
|
528
|
+
if (!value || value.trim() === '') {
|
|
529
|
+
return Promise.resolve();
|
|
530
|
+
}
|
|
531
|
+
try {
|
|
532
|
+
JSON.parse(value);
|
|
533
|
+
return Promise.resolve();
|
|
534
|
+
} catch (error) {
|
|
535
|
+
return Promise.reject(new Error(locales.getText('registry.message.uiSchema.invalid')));
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}]
|
|
539
|
+
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
540
|
+
placeholder: locales.getText('registry.form.uiSchema.placeholder'),
|
|
541
|
+
rows: 6,
|
|
542
|
+
style: {
|
|
543
|
+
fontFamily: 'monospace'
|
|
544
|
+
}
|
|
545
|
+
}))));
|
|
546
|
+
};
|
|
547
|
+
export default ItemModal;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Card, Empty, Tag } from 'antd';
|
|
3
|
+
import { ShoppingCartOutlined, CreditCardOutlined, SafetyCertificateOutlined, SettingOutlined } from '@ant-design/icons';
|
|
4
|
+
import { locales } from '@pisell/utils';
|
|
5
|
+
// 区块图标映射
|
|
6
|
+
var sectionIcons = {
|
|
7
|
+
order: /*#__PURE__*/React.createElement(ShoppingCartOutlined, null),
|
|
8
|
+
payment: /*#__PURE__*/React.createElement(CreditCardOutlined, null),
|
|
9
|
+
auth: /*#__PURE__*/React.createElement(SafetyCertificateOutlined, null),
|
|
10
|
+
default: /*#__PURE__*/React.createElement(SettingOutlined, null)
|
|
11
|
+
};
|
|
12
|
+
var SectionList = function SectionList(_ref) {
|
|
13
|
+
var sections = _ref.sections,
|
|
14
|
+
selectedSectionId = _ref.selectedSectionId,
|
|
15
|
+
onSectionSelect = _ref.onSectionSelect;
|
|
16
|
+
if (sections.length === 0) {
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: "pisell-settings-registry-sections-empty"
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Empty, {
|
|
20
|
+
description: locales.getText('registry.sections.empty'),
|
|
21
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: "pisell-settings-registry-sections"
|
|
26
|
+
}, sections.map(function (section) {
|
|
27
|
+
return /*#__PURE__*/React.createElement(Card, {
|
|
28
|
+
key: section.id,
|
|
29
|
+
className: "pisell-settings-registry-section-item pisell-settings-registry-section-card ".concat(selectedSectionId === section.id ? 'active' : ''),
|
|
30
|
+
hoverable: true,
|
|
31
|
+
onClick: function onClick() {
|
|
32
|
+
return onSectionSelect(section.id);
|
|
33
|
+
},
|
|
34
|
+
bodyStyle: {
|
|
35
|
+
padding: '16px'
|
|
36
|
+
}
|
|
37
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "pisell-settings-registry-section-content"
|
|
39
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: "pisell-settings-registry-section-icon"
|
|
41
|
+
}, sectionIcons[section.code] || sectionIcons.default), /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: "pisell-settings-registry-section-info"
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "pisell-settings-registry-section-name"
|
|
45
|
+
}, section.name), /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "pisell-settings-registry-section-code"
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
48
|
+
color: "blue"
|
|
49
|
+
}, section.code)), section.description && /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: "pisell-settings-registry-section-description"
|
|
51
|
+
}, section.description))));
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
54
|
+
export default SectionList;
|