@pisell/private-materials 3.4.104 → 3.4.106
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 +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/es/plus/orderList/components/HandleActions.d.ts +1 -0
- package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/es/plus/orderList/components/Reset.d.ts +1 -0
- package/es/plus/orderList/components/Toolbar.d.ts +1 -0
- package/es/plus/saasDevice/devicePlanning/components/AddDeviceModal/index.d.ts +2 -1
- package/es/plus/saasDevice/devicePlanning/components/AddDeviceModal/index.js +54 -154
- package/es/plus/saasDevice/devicePlanning/components/AddDeviceModal/index.less +62 -9
- package/es/plus/saasDevice/devicePlanning/components/DeleteDeviceModal/index.js +7 -6
- package/es/plus/saasDevice/devicePlanning/components/DeleteWorkAreaModal/index.js +8 -6
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/ConnectExistingDeviceModal.d.ts +21 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/ConnectExistingDeviceModal.js +244 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/ConnectExistingDeviceModal.less +323 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceConnectionsPanel.d.ts +18 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceConnectionsPanel.js +272 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceConnectionsPanel.less +111 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceInfoPanel.d.ts +10 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceInfoPanel.js +211 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceInfoPanel.less +211 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DrawerSidebar.d.ts +11 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DrawerSidebar.js +39 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/ConnectDeviceModalHeader.d.ts +14 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/ConnectDeviceModalHeader.js +22 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/ConnectionConfigFields.d.ts +14 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/ConnectionConfigFields.js +122 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/DeviceConnectionSummary.d.ts +12 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/DeviceConnectionSummary.js +41 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/NewPeripheralInfoFields.d.ts +11 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/NewPeripheralInfoFields.js +51 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/PickExistingDeviceStep.d.ts +22 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/PickExistingDeviceStep.js +98 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/PickNewPeripheralStep.d.ts +12 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/PickNewPeripheralStep.js +24 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useConnectDeviceModal.d.ts +56 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useConnectDeviceModal.js +278 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceConnections.d.ts +20 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceConnections.js +125 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceDetail.d.ts +16 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceDetail.js +58 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.d.ts +3 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.js +62 -210
- package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.less +103 -209
- package/es/plus/saasDevice/devicePlanning/components/DeviceTable/index.js +29 -19
- package/es/plus/saasDevice/devicePlanning/components/DeviceTable/index.less +22 -1
- package/es/plus/saasDevice/devicePlanning/components/EditDeviceModal/index.js +17 -21
- package/es/plus/saasDevice/devicePlanning/components/WorkAreaModal/index.js +14 -15
- package/es/plus/saasDevice/devicePlanning/components/shared/DeviceBasicInfoForm.d.ts +25 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/DeviceBasicInfoForm.js +82 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/DeviceIcon.d.ts +10 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/DeviceIcon.js +18 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/DeviceModelPicker.d.ts +12 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/DeviceModelPicker.js +147 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/I18nNameFormItem.d.ts +9 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/I18nNameFormItem.js +22 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/LinkStatusTag.d.ts +9 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/LinkStatusTag.js +12 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/ModelPickerGrid.d.ts +15 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/ModelPickerGrid.js +61 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/OnlineStatus.d.ts +10 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/OnlineStatus.js +16 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/OnlineWarningAlert.d.ts +8 -0
- package/es/plus/saasDevice/devicePlanning/components/shared/OnlineWarningAlert.js +17 -0
- package/es/plus/saasDevice/devicePlanning/hooks/index.d.ts +2 -0
- package/es/plus/saasDevice/devicePlanning/hooks/index.js +12 -0
- package/es/plus/saasDevice/devicePlanning/hooks/useDeviceList.d.ts +33 -0
- package/es/plus/saasDevice/devicePlanning/hooks/useDeviceList.js +183 -0
- package/es/plus/saasDevice/devicePlanning/hooks/useDeviceModels.d.ts +20 -0
- package/es/plus/saasDevice/devicePlanning/hooks/useDeviceModels.js +92 -0
- package/es/plus/saasDevice/devicePlanning/hooks/useDevicePlanningDialogs.d.ts +27 -0
- package/es/plus/saasDevice/devicePlanning/hooks/useDevicePlanningDialogs.js +95 -0
- package/es/plus/saasDevice/devicePlanning/hooks/useWorkAreas.d.ts +35 -0
- package/es/plus/saasDevice/devicePlanning/hooks/useWorkAreas.js +292 -0
- package/es/plus/saasDevice/devicePlanning/index.js +168 -637
- package/es/plus/saasDevice/devicePlanning/locales.d.ts +215 -0
- package/es/plus/saasDevice/devicePlanning/locales.js +215 -0
- package/es/plus/saasDevice/devicePlanning/serve.d.ts +14 -2
- package/es/plus/saasDevice/devicePlanning/serve.js +175 -20
- package/es/plus/saasDevice/devicePlanning/types.d.ts +85 -0
- package/es/plus/saasDevice/devicePlanning/types.js +46 -3
- package/es/plus/saasDevice/devicePlanning/utils.d.ts +27 -0
- package/es/plus/saasDevice/devicePlanning/utils.js +125 -0
- package/es/plus/saasDevice/index.d.ts +3 -0
- package/es/plus/saasDevice/index.js +3 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passList/index.js +1 -2
- package/es/pro/Selector/demo.d.ts +0 -1
- package/es/pro/pisellPhoneKeyboard/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
- package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/lib/plus/orderList/components/Reset.d.ts +1 -0
- package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
- package/lib/plus/saasDevice/devicePlanning/components/AddDeviceModal/index.d.ts +2 -1
- package/lib/plus/saasDevice/devicePlanning/components/AddDeviceModal/index.js +50 -120
- package/lib/plus/saasDevice/devicePlanning/components/AddDeviceModal/index.less +62 -9
- package/lib/plus/saasDevice/devicePlanning/components/DeleteDeviceModal/index.js +15 -8
- package/lib/plus/saasDevice/devicePlanning/components/DeleteWorkAreaModal/index.js +10 -6
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/ConnectExistingDeviceModal.d.ts +21 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/ConnectExistingDeviceModal.js +270 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/ConnectExistingDeviceModal.less +323 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceConnectionsPanel.d.ts +18 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceConnectionsPanel.js +235 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceConnectionsPanel.less +111 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceInfoPanel.d.ts +10 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceInfoPanel.js +218 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DeviceInfoPanel.less +211 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DrawerSidebar.d.ts +11 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/DrawerSidebar.js +73 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/ConnectDeviceModalHeader.d.ts +14 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/ConnectDeviceModalHeader.js +61 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/ConnectionConfigFields.d.ts +14 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/ConnectionConfigFields.js +171 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/DeviceConnectionSummary.d.ts +12 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/DeviceConnectionSummary.js +78 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/NewPeripheralInfoFields.d.ts +11 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/NewPeripheralInfoFields.js +87 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/PickExistingDeviceStep.d.ts +22 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/PickExistingDeviceStep.js +129 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/PickNewPeripheralStep.d.ts +12 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/components/connectDeviceModal/PickNewPeripheralStep.js +56 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useConnectDeviceModal.d.ts +56 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useConnectDeviceModal.js +229 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceConnections.d.ts +20 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceConnections.js +90 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceDetail.d.ts +16 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceDetail.js +74 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.d.ts +3 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.js +62 -173
- package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.less +103 -209
- package/lib/plus/saasDevice/devicePlanning/components/DeviceTable/index.js +54 -39
- package/lib/plus/saasDevice/devicePlanning/components/DeviceTable/index.less +22 -1
- package/lib/plus/saasDevice/devicePlanning/components/EditDeviceModal/index.js +25 -25
- package/lib/plus/saasDevice/devicePlanning/components/WorkAreaModal/index.js +22 -17
- package/lib/plus/saasDevice/devicePlanning/components/shared/DeviceBasicInfoForm.d.ts +25 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/DeviceBasicInfoForm.js +126 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/DeviceIcon.d.ts +10 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/DeviceIcon.js +45 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/DeviceModelPicker.d.ts +12 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/DeviceModelPicker.js +165 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/I18nNameFormItem.d.ts +9 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/I18nNameFormItem.js +54 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/LinkStatusTag.d.ts +9 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/LinkStatusTag.js +42 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/ModelPickerGrid.d.ts +15 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/ModelPickerGrid.js +89 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/OnlineStatus.d.ts +10 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/OnlineStatus.js +50 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/OnlineWarningAlert.d.ts +8 -0
- package/lib/plus/saasDevice/devicePlanning/components/shared/OnlineWarningAlert.js +53 -0
- package/lib/plus/saasDevice/devicePlanning/hooks/index.d.ts +2 -0
- package/lib/plus/saasDevice/devicePlanning/{hooks.js → hooks/index.js} +9 -6
- package/lib/plus/saasDevice/devicePlanning/hooks/useDeviceList.d.ts +33 -0
- package/lib/plus/saasDevice/devicePlanning/hooks/useDeviceList.js +131 -0
- package/lib/plus/saasDevice/devicePlanning/hooks/useDeviceModels.d.ts +20 -0
- package/lib/plus/saasDevice/devicePlanning/hooks/useDeviceModels.js +109 -0
- package/lib/plus/saasDevice/devicePlanning/hooks/useDevicePlanningDialogs.d.ts +27 -0
- package/lib/plus/saasDevice/devicePlanning/hooks/useDevicePlanningDialogs.js +90 -0
- package/lib/plus/saasDevice/devicePlanning/hooks/useWorkAreas.d.ts +35 -0
- package/lib/plus/saasDevice/devicePlanning/hooks/useWorkAreas.js +169 -0
- package/lib/plus/saasDevice/devicePlanning/index.js +120 -375
- package/lib/plus/saasDevice/devicePlanning/locales.d.ts +215 -0
- package/lib/plus/saasDevice/devicePlanning/locales.js +215 -0
- package/lib/plus/saasDevice/devicePlanning/serve.d.ts +14 -2
- package/lib/plus/saasDevice/devicePlanning/serve.js +88 -1
- package/lib/plus/saasDevice/devicePlanning/types.d.ts +85 -0
- package/lib/plus/saasDevice/devicePlanning/types.js +1 -1
- package/lib/plus/saasDevice/devicePlanning/utils.d.ts +27 -0
- package/lib/plus/saasDevice/devicePlanning/utils.js +130 -0
- package/lib/plus/saasDevice/index.d.ts +3 -0
- package/lib/plus/saasDevice/index.js +42 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passList/index.js +0 -1
- package/lib/pro/Selector/demo.d.ts +0 -1
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +1 -0
- package/package.json +2 -2
- package/build/lowcode.zip +0 -0
- package/es/plus/saasDevice/devicePlanning/hooks.d.ts +0 -1
- package/es/plus/saasDevice/devicePlanning/hooks.js +0 -9
- package/lib/plus/saasDevice/devicePlanning/hooks.d.ts +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceConnections.ts
|
|
20
|
+
var useDeviceConnections_exports = {};
|
|
21
|
+
__export(useDeviceConnections_exports, {
|
|
22
|
+
useDeviceConnections: () => useDeviceConnections
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useDeviceConnections_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_ahooks = require("ahooks");
|
|
27
|
+
var import_serve = require("../../../serve");
|
|
28
|
+
var useDeviceConnections = ({
|
|
29
|
+
open,
|
|
30
|
+
activeTab,
|
|
31
|
+
activeKind,
|
|
32
|
+
displayRecord,
|
|
33
|
+
onConnectionsChanged
|
|
34
|
+
}) => {
|
|
35
|
+
const connectionRequest = (0, import_ahooks.useRequest)(import_serve.getDeviceConnections, { manual: true });
|
|
36
|
+
const createConnectionRequest = (0, import_ahooks.useRequest)(import_serve.createDeviceConnection, {
|
|
37
|
+
manual: true
|
|
38
|
+
});
|
|
39
|
+
const updateConnectionRequest = (0, import_ahooks.useRequest)(
|
|
40
|
+
(params) => (0, import_serve.updateDeviceConnection)(params.id, params.payload),
|
|
41
|
+
{ manual: true }
|
|
42
|
+
);
|
|
43
|
+
const deleteConnectionRequest = (0, import_ahooks.useRequest)(import_serve.deleteDeviceConnection, {
|
|
44
|
+
manual: true
|
|
45
|
+
});
|
|
46
|
+
const reloadConnections = () => {
|
|
47
|
+
if (!displayRecord || activeKind === "integrated") return;
|
|
48
|
+
const relationWith = activeKind === "smart" ? ["targetDevice.type", "targetDevice.model.brand", "targetDevice.workarea", "profiles"] : ["sourceDevice.type", "profiles"];
|
|
49
|
+
connectionRequest.run({
|
|
50
|
+
type: "dumb",
|
|
51
|
+
source_device_id: activeKind === "smart" ? displayRecord.id : void 0,
|
|
52
|
+
target_device_id: activeKind === "dumb" ? displayRecord.id : void 0,
|
|
53
|
+
with: relationWith
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
(0, import_react.useEffect)(() => {
|
|
57
|
+
if (!open || !displayRecord) return;
|
|
58
|
+
if (activeTab !== "connections") return;
|
|
59
|
+
if (activeKind === "integrated") return;
|
|
60
|
+
reloadConnections();
|
|
61
|
+
}, [activeKind, activeTab, displayRecord == null ? void 0 : displayRecord.id, open]);
|
|
62
|
+
const handleCreateConnection = async (payload) => {
|
|
63
|
+
await createConnectionRequest.runAsync(payload);
|
|
64
|
+
reloadConnections();
|
|
65
|
+
onConnectionsChanged == null ? void 0 : onConnectionsChanged();
|
|
66
|
+
};
|
|
67
|
+
const handleUpdateConnection = async (id, payload) => {
|
|
68
|
+
await updateConnectionRequest.runAsync({ id, payload });
|
|
69
|
+
reloadConnections();
|
|
70
|
+
onConnectionsChanged == null ? void 0 : onConnectionsChanged();
|
|
71
|
+
};
|
|
72
|
+
const handleDeleteConnection = async (id) => {
|
|
73
|
+
await deleteConnectionRequest.runAsync(id);
|
|
74
|
+
reloadConnections();
|
|
75
|
+
onConnectionsChanged == null ? void 0 : onConnectionsChanged();
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
connections: connectionRequest.data || [],
|
|
79
|
+
loading: connectionRequest.loading,
|
|
80
|
+
submitting: createConnectionRequest.loading || updateConnectionRequest.loading,
|
|
81
|
+
deleting: deleteConnectionRequest.loading,
|
|
82
|
+
handleCreateConnection,
|
|
83
|
+
handleUpdateConnection,
|
|
84
|
+
handleDeleteConnection
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
88
|
+
0 && (module.exports = {
|
|
89
|
+
useDeviceConnections
|
|
90
|
+
});
|
package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceDetail.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DeviceRow, I18nText } from '../../../types';
|
|
2
|
+
import type { DrawerTabKey } from '../components/DrawerSidebar';
|
|
3
|
+
interface UseDeviceDetailParams {
|
|
4
|
+
open: boolean;
|
|
5
|
+
record?: DeviceRow;
|
|
6
|
+
initialTab: DrawerTabKey;
|
|
7
|
+
translation: (val?: I18nText) => string;
|
|
8
|
+
}
|
|
9
|
+
/** 管理详情抽屉的当前 tab、设备详情补拉取和 integrated 设备 tab 保护。 */
|
|
10
|
+
export declare const useDeviceDetail: ({ open, record, initialTab, translation, }: UseDeviceDetailParams) => {
|
|
11
|
+
activeTab: DrawerTabKey;
|
|
12
|
+
activeKind: import("../../../types").DeviceKind;
|
|
13
|
+
displayRecord: DeviceRow | undefined;
|
|
14
|
+
setActiveTab: import("react").Dispatch<import("react").SetStateAction<DrawerTabKey>>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceDetail.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceDetail.ts
|
|
20
|
+
var useDeviceDetail_exports = {};
|
|
21
|
+
__export(useDeviceDetail_exports, {
|
|
22
|
+
useDeviceDetail: () => useDeviceDetail
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useDeviceDetail_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_serve = require("../../../serve");
|
|
27
|
+
var import_utils = require("../../../utils");
|
|
28
|
+
var useDeviceDetail = ({
|
|
29
|
+
open,
|
|
30
|
+
record,
|
|
31
|
+
initialTab,
|
|
32
|
+
translation
|
|
33
|
+
}) => {
|
|
34
|
+
const [activeTab, setActiveTab] = (0, import_react.useState)("info");
|
|
35
|
+
const [detailRecord, setDetailRecord] = (0, import_react.useState)();
|
|
36
|
+
const detailFetchedIdRef = (0, import_react.useRef)();
|
|
37
|
+
const displayRecord = detailRecord || record;
|
|
38
|
+
const activeKind = (displayRecord == null ? void 0 : displayRecord._raw.type_kind) || "smart";
|
|
39
|
+
(0, import_react.useEffect)(() => {
|
|
40
|
+
if (open) {
|
|
41
|
+
setActiveTab(initialTab);
|
|
42
|
+
setDetailRecord(record);
|
|
43
|
+
detailFetchedIdRef.current = void 0;
|
|
44
|
+
}
|
|
45
|
+
}, [initialTab, open, record == null ? void 0 : record.id]);
|
|
46
|
+
(0, import_react.useEffect)(() => {
|
|
47
|
+
if (!open || !(record == null ? void 0 : record.id)) return;
|
|
48
|
+
const shouldFetchDetail = activeTab === "info" || detailFetchedIdRef.current !== record.id;
|
|
49
|
+
if (!shouldFetchDetail) return;
|
|
50
|
+
detailFetchedIdRef.current = record.id;
|
|
51
|
+
(0, import_serve.getDeviceDetail)(record.id).then((detail) => {
|
|
52
|
+
if (detail) {
|
|
53
|
+
setDetailRecord((0, import_utils.createDeviceRow)(detail, translation));
|
|
54
|
+
}
|
|
55
|
+
}).catch(() => {
|
|
56
|
+
setDetailRecord(record);
|
|
57
|
+
});
|
|
58
|
+
}, [activeTab, open, record, record == null ? void 0 : record.id, translation]);
|
|
59
|
+
(0, import_react.useEffect)(() => {
|
|
60
|
+
if (activeKind === "integrated" && activeTab === "connections") {
|
|
61
|
+
setActiveTab("info");
|
|
62
|
+
}
|
|
63
|
+
}, [activeKind, activeTab]);
|
|
64
|
+
return {
|
|
65
|
+
activeTab,
|
|
66
|
+
activeKind,
|
|
67
|
+
displayRecord,
|
|
68
|
+
setActiveTab
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
+
0 && (module.exports = {
|
|
73
|
+
useDeviceDetail
|
|
74
|
+
});
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DeviceRow, I18nText } from '../../types';
|
|
3
|
+
import { DrawerTabKey } from './components/DrawerSidebar';
|
|
3
4
|
import './index.less';
|
|
4
5
|
interface DeviceDetailDrawerProps {
|
|
5
6
|
open: boolean;
|
|
6
7
|
record?: DeviceRow;
|
|
8
|
+
initialTab?: DrawerTabKey;
|
|
7
9
|
getText: (key: string) => string;
|
|
8
10
|
translation: (val?: I18nText) => string;
|
|
9
11
|
onClose: () => void;
|
|
10
12
|
onEdit: () => void;
|
|
11
13
|
onDelete: () => void;
|
|
14
|
+
onConnectionsChanged?: () => void;
|
|
12
15
|
}
|
|
13
16
|
declare const DeviceDetailDrawer: React.FC<DeviceDetailDrawerProps>;
|
|
14
17
|
export default DeviceDetailDrawer;
|
|
@@ -37,124 +37,45 @@ var import_antd = require("antd");
|
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
38
|
var import_icons = require("@ant-design/icons");
|
|
39
39
|
var import_classnames = __toESM(require("classnames"));
|
|
40
|
+
var import_utils = require("../../utils");
|
|
41
|
+
var import_DrawerSidebar = __toESM(require("./components/DrawerSidebar"));
|
|
42
|
+
var import_DeviceInfoPanel = __toESM(require("./components/DeviceInfoPanel"));
|
|
43
|
+
var import_DeviceConnectionsPanel = __toESM(require("./components/DeviceConnectionsPanel"));
|
|
44
|
+
var import_useDeviceConnections = require("./hooks/useDeviceConnections");
|
|
45
|
+
var import_useDeviceDetail = require("./hooks/useDeviceDetail");
|
|
40
46
|
var import_index = require("./index.less");
|
|
41
|
-
var EMPTY_VALUE = "-";
|
|
42
|
-
var BYTE_PER_GB = 1024 * 1024 * 1024;
|
|
43
|
-
var REPORT_GROUPS = [
|
|
44
|
-
{
|
|
45
|
-
key: "software",
|
|
46
|
-
fields: [{ key: "name" }, { key: "version" }]
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
key: "battery",
|
|
50
|
-
fields: [
|
|
51
|
-
{
|
|
52
|
-
key: "level",
|
|
53
|
-
value: (data, getText) => renderBatteryValue(data, getText)
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
key: "network",
|
|
59
|
-
fields: [
|
|
60
|
-
{ key: "type" },
|
|
61
|
-
{ key: "local_ip" },
|
|
62
|
-
{ key: "gateway" },
|
|
63
|
-
{ key: "subnet_mask" },
|
|
64
|
-
{ key: "ssid" }
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
key: "hardware",
|
|
69
|
-
fields: [{ key: "model" }, { key: "os_version" }]
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
key: "storage",
|
|
73
|
-
fields: [
|
|
74
|
-
{ key: "used", value: (data) => formatStorageValue(data.used) },
|
|
75
|
-
{ key: "total", value: (data) => formatStorageValue(data.total) }
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
];
|
|
79
|
-
var isPlainObject = (value) => Object.prototype.toString.call(value) === "[object Object]";
|
|
80
|
-
var getReportText = (getText, key) => getText(`pisell2.saas.device-planning.detail.report.${key}`);
|
|
81
|
-
var formatReportValue = (value, getText) => {
|
|
82
|
-
if (value === null || value === void 0 || value === "") {
|
|
83
|
-
return EMPTY_VALUE;
|
|
84
|
-
}
|
|
85
|
-
if (typeof value === "boolean") {
|
|
86
|
-
return getText(
|
|
87
|
-
`pisell2.saas.device-planning.detail.${value ? "yes" : "no"}`
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
if (Array.isArray(value) || isPlainObject(value)) {
|
|
91
|
-
return /* @__PURE__ */ import_react.default.createElement("span", { className: "device-detail-drawer__json-value" }, JSON.stringify(value));
|
|
92
|
-
}
|
|
93
|
-
return String(value);
|
|
94
|
-
};
|
|
95
|
-
var formatStorageValue = (value) => {
|
|
96
|
-
const byteValue = typeof value === "number" || typeof value === "string" ? Number(value) : Number.NaN;
|
|
97
|
-
if (!Number.isFinite(byteValue)) {
|
|
98
|
-
return EMPTY_VALUE;
|
|
99
|
-
}
|
|
100
|
-
const gbValue = byteValue / BYTE_PER_GB;
|
|
101
|
-
const text = gbValue >= 10 ? String(Math.round(gbValue)) : gbValue.toFixed(2).replace(/\.?0+$/, "");
|
|
102
|
-
return `${text} GB`;
|
|
103
|
-
};
|
|
104
|
-
var formatLastSeen = (value) => typeof value === "string" && value.trim() ? value : EMPTY_VALUE;
|
|
105
|
-
var renderBatteryValue = (data, getText) => {
|
|
106
|
-
const rawLevel = typeof data.level === "number" || typeof data.level === "string" ? Number(data.level) : Number.NaN;
|
|
107
|
-
const hasLevel = Number.isFinite(rawLevel);
|
|
108
|
-
const levelValue = hasLevel ? Math.max(0, Math.min(rawLevel, 100)) : 0;
|
|
109
|
-
const level = hasLevel ? `${rawLevel}%` : EMPTY_VALUE;
|
|
110
|
-
const charging = (data == null ? void 0 : data.charging) === true;
|
|
111
|
-
return /* @__PURE__ */ import_react.default.createElement("span", { className: "device-detail-drawer__battery-value" }, /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
-
"span",
|
|
113
|
-
{
|
|
114
|
-
className: (0, import_classnames.default)("device-detail-drawer__battery-icon", {
|
|
115
|
-
"is-charging": charging
|
|
116
|
-
})
|
|
117
|
-
},
|
|
118
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
119
|
-
"span",
|
|
120
|
-
{
|
|
121
|
-
className: "device-detail-drawer__battery-fill",
|
|
122
|
-
style: { width: `${levelValue}%` }
|
|
123
|
-
}
|
|
124
|
-
),
|
|
125
|
-
charging ? /* @__PURE__ */ import_react.default.createElement("span", { className: "device-detail-drawer__battery-bolt" }) : null
|
|
126
|
-
), /* @__PURE__ */ import_react.default.createElement("span", null, level), /* @__PURE__ */ import_react.default.createElement("span", { className: "device-detail-drawer__battery-status" }, getReportText(getText, charging ? "charging" : "not-charging")));
|
|
127
|
-
};
|
|
128
47
|
var DeviceDetailDrawer = ({
|
|
129
48
|
open,
|
|
130
49
|
record,
|
|
50
|
+
initialTab = "info",
|
|
131
51
|
getText,
|
|
132
52
|
translation,
|
|
133
53
|
onClose,
|
|
134
54
|
onEdit,
|
|
135
|
-
onDelete
|
|
55
|
+
onDelete,
|
|
56
|
+
onConnectionsChanged
|
|
136
57
|
}) => {
|
|
137
58
|
var _a;
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
59
|
+
const { activeTab, activeKind, displayRecord, setActiveTab } = (0, import_useDeviceDetail.useDeviceDetail)({
|
|
60
|
+
open,
|
|
61
|
+
record,
|
|
62
|
+
initialTab,
|
|
63
|
+
translation
|
|
64
|
+
});
|
|
65
|
+
const device = displayRecord == null ? void 0 : displayRecord._raw;
|
|
66
|
+
const connections = (0, import_useDeviceConnections.useDeviceConnections)({
|
|
67
|
+
open,
|
|
68
|
+
activeTab,
|
|
69
|
+
activeKind,
|
|
70
|
+
displayRecord,
|
|
71
|
+
onConnectionsChanged
|
|
72
|
+
});
|
|
152
73
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
153
74
|
import_antd.Drawer,
|
|
154
75
|
{
|
|
155
76
|
open,
|
|
156
77
|
onClose,
|
|
157
|
-
width:
|
|
78
|
+
width: 720,
|
|
158
79
|
maskClosable: true,
|
|
159
80
|
closable: false,
|
|
160
81
|
className: "device-detail-drawer",
|
|
@@ -166,84 +87,52 @@ var DeviceDetailDrawer = ({
|
|
|
166
87
|
},
|
|
167
88
|
bodyStyle: { padding: 0 }
|
|
168
89
|
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
{
|
|
172
|
-
size: "small",
|
|
173
|
-
title: getText("pisell2.saas.device-planning.detail.basic-info"),
|
|
174
|
-
className: "device-detail-drawer__card"
|
|
175
|
-
},
|
|
176
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__info-list" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__info-row" }, /* @__PURE__ */ import_react.default.createElement("span", null, getText("pisell2.saas.device-planning.detail.name")), /* @__PURE__ */ import_react.default.createElement("strong", null, record.name)), /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__info-row" }, /* @__PURE__ */ import_react.default.createElement("span", null, getText("pisell2.saas.device-planning.detail.type")), /* @__PURE__ */ import_react.default.createElement("strong", null, record.typeName)), /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__info-row" }, /* @__PURE__ */ import_react.default.createElement("span", null, getText("pisell2.saas.device-planning.detail.model")), /* @__PURE__ */ import_react.default.createElement("strong", null, record.modelName)), /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__info-two-row" }, /* @__PURE__ */ import_react.default.createElement("span", null, getText("pisell2.saas.device-planning.detail.profile")), /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__profile-card" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: "FileTextOutlined" }), record.profileName)))
|
|
177
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
178
|
-
import_antd.Card,
|
|
90
|
+
displayRecord ? /* @__PURE__ */ import_react.default.createElement(
|
|
91
|
+
"div",
|
|
179
92
|
{
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
93
|
+
className: (0, import_classnames.default)(
|
|
94
|
+
"device-detail-drawer__root",
|
|
95
|
+
`is-${activeKind}`
|
|
96
|
+
)
|
|
183
97
|
},
|
|
184
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
185
|
-
|
|
98
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
99
|
+
import_DrawerSidebar.default,
|
|
186
100
|
{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
)), /* @__PURE__ */ import_react.default.createElement("span", { className: "device-detail-drawer__online-status" }, /* @__PURE__ */ import_react.default.createElement(
|
|
196
|
-
"span",
|
|
101
|
+
activeKey: activeTab,
|
|
102
|
+
activeKind,
|
|
103
|
+
getText,
|
|
104
|
+
onChange: setActiveTab
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__main" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__header" }, ((_a = device == null ? void 0 : device.type) == null ? void 0 : _a.icon) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__icon" }, /* @__PURE__ */ import_react.default.createElement(
|
|
108
|
+
import_materials.Icon,
|
|
197
109
|
{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
{
|
|
201
|
-
"is-online": online
|
|
202
|
-
}
|
|
203
|
-
)
|
|
110
|
+
type: device.type.icon,
|
|
111
|
+
color: import_utils.DEVICE_ICON_COLOR[activeKind]
|
|
204
112
|
}
|
|
205
|
-
),
|
|
206
|
-
|
|
207
|
-
) || record.status)))
|
|
208
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
209
|
-
import_antd.Card,
|
|
210
|
-
{
|
|
211
|
-
size: "small",
|
|
212
|
-
title: getText("pisell2.saas.device-planning.detail.report-info"),
|
|
213
|
-
extra: /* @__PURE__ */ import_react.default.createElement("span", { className: "device-detail-drawer__last-seen" }, getText("pisell2.saas.device-planning.detail.last-seen"), lastSeen),
|
|
214
|
-
className: "device-detail-drawer__card"
|
|
215
|
-
},
|
|
216
|
-
reportGroups.length > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__report-list" }, reportGroups.map((group) => /* @__PURE__ */ import_react.default.createElement(
|
|
217
|
-
import_antd.Card,
|
|
113
|
+
)) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__heading" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__name" }, displayRecord.name), /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__type" }, displayRecord.typeName)), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, null), onClick: onClose })), /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__content" }, activeTab === "info" ? /* @__PURE__ */ import_react.default.createElement(
|
|
114
|
+
import_DeviceInfoPanel.default,
|
|
218
115
|
{
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__report-rows" }, group.fields.map((field) => /* @__PURE__ */ import_react.default.createElement(
|
|
226
|
-
"div",
|
|
227
|
-
{
|
|
228
|
-
key: field.key,
|
|
229
|
-
className: "device-detail-drawer__report-row"
|
|
230
|
-
},
|
|
231
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: "device-detail-drawer__report-label" }, getReportText(getText, `field.${field.key}`)),
|
|
232
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: "device-detail-drawer__report-value" }, field.value ? field.value(group.data, getText) : formatReportValue(
|
|
233
|
-
group.data[field.key],
|
|
234
|
-
getText
|
|
235
|
-
))
|
|
236
|
-
)))
|
|
237
|
-
))) : /* @__PURE__ */ import_react.default.createElement(
|
|
238
|
-
import_antd.Empty,
|
|
116
|
+
record: displayRecord,
|
|
117
|
+
getText
|
|
118
|
+
}
|
|
119
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
120
|
+
import_DeviceConnectionsPanel.default,
|
|
239
121
|
{
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
122
|
+
activeKind,
|
|
123
|
+
currentDevice: displayRecord._raw,
|
|
124
|
+
connections: connections.connections,
|
|
125
|
+
loading: connections.loading,
|
|
126
|
+
submitting: connections.submitting,
|
|
127
|
+
deleting: connections.deleting,
|
|
128
|
+
getText,
|
|
129
|
+
translation,
|
|
130
|
+
onCreateConnection: connections.handleCreateConnection,
|
|
131
|
+
onUpdateConnection: connections.handleUpdateConnection,
|
|
132
|
+
onDeleteConnection: connections.handleDeleteConnection
|
|
244
133
|
}
|
|
245
|
-
)
|
|
246
|
-
)
|
|
134
|
+
)), activeTab === "info" ? /* @__PURE__ */ import_react.default.createElement("div", { className: "device-detail-drawer__footer" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { danger: true, size: "large", onClick: onDelete }, getText("pisell2.saas.device-planning.detail.delete")), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { type: "primary", size: "large", onClick: onEdit }, getText("pisell2.saas.device-planning.detail.edit"))) : null)
|
|
135
|
+
) : null
|
|
247
136
|
);
|
|
248
137
|
};
|
|
249
138
|
var DeviceDetailDrawer_default = DeviceDetailDrawer;
|