@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
|
@@ -35,15 +35,16 @@ module.exports = __toCommonJS(devicePlanning_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_materials = require("@pisell/materials");
|
|
37
37
|
var import_antd = require("antd");
|
|
38
|
-
var import_sortable = require("@dnd-kit/sortable");
|
|
39
|
-
var import_ahooks = require("ahooks");
|
|
40
38
|
var import_classnames = __toESM(require("classnames"));
|
|
41
39
|
var import_utils = require("@pisell/utils");
|
|
42
40
|
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
43
41
|
var import_useLocale = __toESM(require("../../../hooks/useLocale"));
|
|
44
42
|
var import_utils2 = require("../../../utils");
|
|
45
|
-
var import_serve = require("./serve");
|
|
46
43
|
var import_hooks = require("./hooks");
|
|
44
|
+
var import_useDeviceList = require("./hooks/useDeviceList");
|
|
45
|
+
var import_useDeviceModels = require("./hooks/useDeviceModels");
|
|
46
|
+
var import_useDevicePlanningDialogs = require("./hooks/useDevicePlanningDialogs");
|
|
47
|
+
var import_useWorkAreas = require("./hooks/useWorkAreas");
|
|
47
48
|
var import_locales = __toESM(require("./locales"));
|
|
48
49
|
var import_constants = require("./constants");
|
|
49
50
|
var import_WorkAreaList = __toESM(require("./components/WorkAreaList"));
|
|
@@ -56,343 +57,93 @@ var import_WorkAreaModal = __toESM(require("./components/WorkAreaModal"));
|
|
|
56
57
|
var import_DeleteWorkAreaModal = __toESM(require("./components/DeleteWorkAreaModal"));
|
|
57
58
|
var import_types = require("./types");
|
|
58
59
|
var import_index = require("./index.less");
|
|
59
|
-
var EMPTY_DEVICES = [];
|
|
60
|
-
var isSameIds = (a, b) => a.length === b.length && a.every((id, index) => id === b[index]);
|
|
61
60
|
var SaasDevicePlanning = ({
|
|
62
61
|
className,
|
|
63
62
|
style
|
|
64
63
|
}) => {
|
|
65
|
-
var _a;
|
|
64
|
+
var _a, _b;
|
|
66
65
|
const context = (0, import_useEngineContext.default)();
|
|
67
66
|
const locale = (0, import_useLocale.default)();
|
|
68
67
|
import_utils.locales.init(import_locales.default, locale || "en");
|
|
69
68
|
const getText = import_utils.locales.getText;
|
|
70
69
|
const translation = (0, import_hooks.useTranslation)();
|
|
71
70
|
const utils = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
72
|
-
const [workAreas, setWorkAreas] = (0, import_react.useState)([]);
|
|
73
|
-
const [selectedWorkAreaId, setSelectedWorkAreaId] = (0, import_react.useState)();
|
|
74
71
|
const [activeKind, setActiveKind] = (0, import_react.useState)("smart");
|
|
75
|
-
const
|
|
76
|
-
const [typeFilter, setTypeFilter] = (0, import_react.useState)(void 0);
|
|
77
|
-
const [modelCacheByKind, setModelCacheByKind] = (0, import_react.useState)({});
|
|
78
|
-
const modelCacheByKindRef = (0, import_react.useRef)({});
|
|
79
|
-
const [deviceOrderIds, setDeviceOrderIds] = (0, import_react.useState)([]);
|
|
80
|
-
const requestedModelKindsRef = (0, import_react.useRef)(/* @__PURE__ */ new Set());
|
|
81
|
-
const [page, setPage] = (0, import_react.useState)(1);
|
|
82
|
-
const [pageSize, setPageSize] = (0, import_react.useState)(import_constants.DEFAULT_PAGE_SIZE);
|
|
83
|
-
const [addDeviceOpen, setAddDeviceOpen] = (0, import_react.useState)(false);
|
|
84
|
-
const [detailOpen, setDetailOpen] = (0, import_react.useState)(false);
|
|
85
|
-
const [selectedDevice, setSelectedDevice] = (0, import_react.useState)();
|
|
86
|
-
const [editDeviceOpen, setEditDeviceOpen] = (0, import_react.useState)(false);
|
|
87
|
-
const [deleteDeviceOpen, setDeleteDeviceOpen] = (0, import_react.useState)(false);
|
|
88
|
-
const [workAreaModalOpen, setWorkAreaModalOpen] = (0, import_react.useState)(false);
|
|
89
|
-
const [workAreaModalMode, setWorkAreaModalMode] = (0, import_react.useState)("create");
|
|
90
|
-
const [editingWorkArea, setEditingWorkArea] = (0, import_react.useState)();
|
|
91
|
-
const [deleteModalOpen, setDeleteModalOpen] = (0, import_react.useState)(false);
|
|
92
|
-
const [deleteRecord, setDeleteRecord] = (0, import_react.useState)();
|
|
93
|
-
const [deleteCounts, setDeleteCounts] = (0, import_react.useState)({
|
|
94
|
-
smart: 0,
|
|
95
|
-
dumb: 0,
|
|
96
|
-
integrated: 0
|
|
97
|
-
});
|
|
72
|
+
const dialogs = (0, import_useDevicePlanningDialogs.useDevicePlanningDialogs)();
|
|
98
73
|
(0, import_react.useEffect)(() => {
|
|
99
74
|
if (utils == null ? void 0 : utils.request) {
|
|
100
75
|
import_utils2.request.setRequest(utils.request);
|
|
101
76
|
}
|
|
102
77
|
}, [utils == null ? void 0 : utils.request]);
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
const workArea = (0, import_useWorkAreas.useWorkAreas)({
|
|
79
|
+
getText,
|
|
80
|
+
workAreaModalMode: dialogs.workAreaModalMode,
|
|
81
|
+
editingWorkArea: dialogs.editingWorkArea,
|
|
82
|
+
closeWorkAreaModal: dialogs.closeWorkAreaModal
|
|
107
83
|
});
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const deviceRequest = (0, import_ahooks.useRequest)(import_serve.getDevices, { manual: true });
|
|
114
|
-
const createDeviceRequest = (0, import_ahooks.useRequest)(import_serve.createDevice, { manual: true });
|
|
115
|
-
const updateDeviceRequest = (0, import_ahooks.useRequest)(
|
|
116
|
-
(params) => (0, import_serve.updateDevice)(params.id, params.payload),
|
|
117
|
-
{ manual: true }
|
|
118
|
-
);
|
|
119
|
-
const removeDeviceRequest = (0, import_ahooks.useRequest)(import_serve.deleteDevice, { manual: true });
|
|
120
|
-
const sortDeviceRequest = (0, import_ahooks.useRequest)(import_serve.sortDevices, { manual: true });
|
|
121
|
-
const getWorkAreaDetailRequest = (0, import_ahooks.useRequest)(import_serve.getWorkAreaDetail, {
|
|
122
|
-
manual: true
|
|
84
|
+
const modelState = (0, import_useDeviceModels.useDeviceModels)({
|
|
85
|
+
activeKind,
|
|
86
|
+
selectedWorkAreaId: workArea.selectedWorkAreaId,
|
|
87
|
+
devices: [],
|
|
88
|
+
translation
|
|
123
89
|
});
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
setSelectedWorkAreaId(void 0);
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
const exists = workAreas.some((item) => item.id === selectedWorkAreaId);
|
|
131
|
-
if (!selectedWorkAreaId || !exists) {
|
|
132
|
-
setSelectedWorkAreaId(workAreas[0].id);
|
|
133
|
-
}
|
|
134
|
-
}, [selectedWorkAreaId, workAreas]);
|
|
135
|
-
(0, import_react.useEffect)(() => {
|
|
136
|
-
if (!selectedWorkAreaId) return;
|
|
137
|
-
deviceRequest.run({
|
|
138
|
-
workarea_id: selectedWorkAreaId,
|
|
139
|
-
type_kind: activeKind,
|
|
140
|
-
with: ["type", "model", "workarea"]
|
|
141
|
-
});
|
|
142
|
-
}, [selectedWorkAreaId, activeKind]);
|
|
143
|
-
(0, import_react.useEffect)(() => {
|
|
144
|
-
if (!selectedWorkAreaId) return;
|
|
145
|
-
if (modelCacheByKindRef.current[activeKind]) return;
|
|
146
|
-
if (requestedModelKindsRef.current.has(activeKind)) return;
|
|
147
|
-
requestedModelKindsRef.current.add(activeKind);
|
|
148
|
-
(0, import_serve.getDeviceTypes)({
|
|
149
|
-
kind: activeKind,
|
|
150
|
-
with: ["activeModels", "activeModels.activeProfiles"]
|
|
151
|
-
}).then((types) => {
|
|
152
|
-
const modelMap = /* @__PURE__ */ new Map();
|
|
153
|
-
types.forEach((type) => {
|
|
154
|
-
(type.active_models || []).forEach((model) => {
|
|
155
|
-
if (!modelMap.has(model.code)) {
|
|
156
|
-
modelMap.set(model.code, { ...model, type });
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
const models = Array.from(modelMap.values());
|
|
161
|
-
modelCacheByKindRef.current = {
|
|
162
|
-
...modelCacheByKindRef.current,
|
|
163
|
-
[activeKind]: models
|
|
164
|
-
};
|
|
165
|
-
setModelCacheByKind(modelCacheByKindRef.current);
|
|
166
|
-
}).catch(() => {
|
|
167
|
-
modelCacheByKindRef.current = {
|
|
168
|
-
...modelCacheByKindRef.current,
|
|
169
|
-
[activeKind]: []
|
|
170
|
-
};
|
|
171
|
-
setModelCacheByKind(modelCacheByKindRef.current);
|
|
172
|
-
});
|
|
173
|
-
}, [activeKind, selectedWorkAreaId]);
|
|
174
|
-
const selectedWorkArea = (0, import_react.useMemo)(
|
|
175
|
-
() => workAreas.find((item) => item.id === selectedWorkAreaId),
|
|
176
|
-
[selectedWorkAreaId, workAreas]
|
|
177
|
-
);
|
|
178
|
-
const devices = deviceRequest.data || EMPTY_DEVICES;
|
|
179
|
-
(0, import_react.useEffect)(() => {
|
|
180
|
-
const nextIds = devices.map((item) => item.id);
|
|
181
|
-
setDeviceOrderIds((prev) => isSameIds(prev, nextIds) ? prev : nextIds);
|
|
182
|
-
}, [devices]);
|
|
183
|
-
const typeOptions = (0, import_react.useMemo)(() => {
|
|
184
|
-
const models = modelCacheByKind[activeKind] || [];
|
|
185
|
-
return models.map((model) => ({
|
|
186
|
-
label: translation(model.name) || model.code,
|
|
187
|
-
value: model.code
|
|
188
|
-
}));
|
|
189
|
-
}, [activeKind, modelCacheByKind, translation]);
|
|
190
|
-
const profileNameMap = (0, import_react.useMemo)(() => {
|
|
191
|
-
const map = /* @__PURE__ */ new Map();
|
|
192
|
-
Object.values(modelCacheByKind).forEach((models) => {
|
|
193
|
-
(models || []).forEach((model) => {
|
|
194
|
-
(model.active_profiles || []).forEach((profile) => {
|
|
195
|
-
map.set(profile.id, translation(profile.name) || String(profile.id));
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
});
|
|
199
|
-
devices.forEach((device) => {
|
|
200
|
-
var _a2;
|
|
201
|
-
if ((_a2 = device.profile) == null ? void 0 : _a2.id) {
|
|
202
|
-
map.set(
|
|
203
|
-
device.profile.id,
|
|
204
|
-
translation(device.profile.name) || String(device.profile.id)
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
return map;
|
|
209
|
-
}, [devices, modelCacheByKind, translation]);
|
|
210
|
-
const tableData = (0, import_react.useMemo)(() => {
|
|
211
|
-
const keyword = (0, import_constants.normalizeText)(search);
|
|
212
|
-
const orderMap = new Map(deviceOrderIds.map((id, index) => [id, index]));
|
|
213
|
-
return [...devices].sort(
|
|
214
|
-
(a, b) => (orderMap.get(a.id) ?? Number.MAX_SAFE_INTEGER) - (orderMap.get(b.id) ?? Number.MAX_SAFE_INTEGER)
|
|
215
|
-
).map((item) => {
|
|
216
|
-
var _a2, _b, _c;
|
|
217
|
-
const name = translation(item.name);
|
|
218
|
-
const typeName = translation((_a2 = item.type) == null ? void 0 : _a2.name) || item.type_code;
|
|
219
|
-
const modelName = translation((_b = item.model) == null ? void 0 : _b.name) || item.model_code;
|
|
220
|
-
const link = item.link || "unlinked";
|
|
221
|
-
const profileName = translation((_c = item.profile) == null ? void 0 : _c.name) || (item.profile_id ? profileNameMap.get(item.profile_id) : "") || (item.profile_id ? String(item.profile_id) : "-");
|
|
222
|
-
return {
|
|
223
|
-
id: item.id,
|
|
224
|
-
name,
|
|
225
|
-
typeName,
|
|
226
|
-
modelName,
|
|
227
|
-
profileName,
|
|
228
|
-
link,
|
|
229
|
-
status: link === "linked" ? item.status || "offline" : "unknown",
|
|
230
|
-
typeCode: item.type_code,
|
|
231
|
-
modelCode: item.model_code,
|
|
232
|
-
_raw: item
|
|
233
|
-
};
|
|
234
|
-
}).filter((item) => {
|
|
235
|
-
const matchesKeyword = keyword ? (0, import_constants.normalizeText)(item.name).includes(keyword) : true;
|
|
236
|
-
const matchesType = typeFilter ? item.modelCode === typeFilter : true;
|
|
237
|
-
return matchesKeyword && matchesType;
|
|
238
|
-
});
|
|
239
|
-
}, [
|
|
240
|
-
deviceOrderIds,
|
|
241
|
-
devices,
|
|
242
|
-
profileNameMap,
|
|
243
|
-
search,
|
|
90
|
+
const deviceList = (0, import_useDeviceList.useDeviceList)({
|
|
91
|
+
activeKind,
|
|
92
|
+
selectedWorkAreaId: workArea.selectedWorkAreaId,
|
|
244
93
|
translation,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
const list = await workAreaRequest.runAsync();
|
|
251
|
-
const sorted = (0, import_constants.sortWorkAreaList)(list);
|
|
252
|
-
setWorkAreas(sorted);
|
|
253
|
-
if (selectedId) {
|
|
254
|
-
setSelectedWorkAreaId(selectedId);
|
|
255
|
-
}
|
|
256
|
-
return sorted;
|
|
257
|
-
};
|
|
258
|
-
const resetDeviceView = () => {
|
|
259
|
-
setSearch("");
|
|
260
|
-
setTypeFilter(void 0);
|
|
261
|
-
setPage(1);
|
|
262
|
-
};
|
|
263
|
-
const reloadDevices = () => {
|
|
264
|
-
if (!selectedWorkAreaId) return;
|
|
265
|
-
deviceRequest.run({
|
|
266
|
-
workarea_id: selectedWorkAreaId,
|
|
267
|
-
type_kind: activeKind,
|
|
268
|
-
with: ["type", "model", "workarea"]
|
|
269
|
-
});
|
|
270
|
-
};
|
|
271
|
-
const handleDragEnd = async (event) => {
|
|
272
|
-
const { active, over } = event;
|
|
273
|
-
if (!over || active.id === over.id) return;
|
|
274
|
-
const oldIndex = workAreas.findIndex((item) => item.id === active.id);
|
|
275
|
-
const newIndex = workAreas.findIndex((item) => item.id === over.id);
|
|
276
|
-
if (oldIndex < 0 || newIndex < 0) return;
|
|
277
|
-
const next = (0, import_sortable.arrayMove)(workAreas, oldIndex, newIndex).map(
|
|
278
|
-
(item, index) => ({
|
|
279
|
-
...item,
|
|
280
|
-
sort: index
|
|
281
|
-
})
|
|
282
|
-
);
|
|
283
|
-
setWorkAreas(next);
|
|
284
|
-
try {
|
|
285
|
-
await sortRequest.runAsync(next.map((item) => item.id));
|
|
286
|
-
} catch (e) {
|
|
287
|
-
reloadWorkAreas();
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
const openCreateModal = () => {
|
|
291
|
-
setWorkAreaModalMode("create");
|
|
292
|
-
setEditingWorkArea(void 0);
|
|
293
|
-
setWorkAreaModalOpen(true);
|
|
294
|
-
};
|
|
295
|
-
const openEditModal = (record) => {
|
|
296
|
-
setWorkAreaModalMode("edit");
|
|
297
|
-
setEditingWorkArea(record);
|
|
298
|
-
setWorkAreaModalOpen(true);
|
|
299
|
-
};
|
|
300
|
-
const handleSaveWorkArea = async (payload) => {
|
|
301
|
-
try {
|
|
302
|
-
const saved = await saveRequest.runAsync(payload);
|
|
303
|
-
(0, import_materials.PisellToast)({
|
|
304
|
-
content: getText(
|
|
305
|
-
workAreaModalMode === "create" ? "pisell2.saas.device-planning.message.create-success" : "pisell2.saas.device-planning.message.update-success"
|
|
306
|
-
),
|
|
307
|
-
duration: 2
|
|
308
|
-
});
|
|
309
|
-
setWorkAreaModalOpen(false);
|
|
310
|
-
setEditingWorkArea(void 0);
|
|
311
|
-
await reloadWorkAreas((saved == null ? void 0 : saved.id) || (editingWorkArea == null ? void 0 : editingWorkArea.id));
|
|
312
|
-
} catch (e) {
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
const openDeleteModal = (record) => {
|
|
316
|
-
setDeleteRecord(record);
|
|
317
|
-
setDeleteCounts({ smart: 0, dumb: 0, integrated: 0 });
|
|
318
|
-
setDeleteModalOpen(true);
|
|
319
|
-
getWorkAreaDetailRequest.runAsync({
|
|
320
|
-
id: record.id,
|
|
321
|
-
relation_count: ["smartDevices", "dumbDevices", "integratedDevices"]
|
|
322
|
-
}).then((res) => {
|
|
323
|
-
var _a2;
|
|
324
|
-
console.log("xue_detail", res);
|
|
325
|
-
const _workArea = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2[0];
|
|
326
|
-
setDeleteCounts({
|
|
327
|
-
smart: (_workArea == null ? void 0 : _workArea.smart_devices_count) || 0,
|
|
328
|
-
dumb: (_workArea == null ? void 0 : _workArea.dumb_devices_count) || 0,
|
|
329
|
-
integrated: (_workArea == null ? void 0 : _workArea.integrated_devices_count) || 0
|
|
330
|
-
});
|
|
331
|
-
}).catch(() => setDeleteCounts({ smart: 0, dumb: 0, integrated: 0 }));
|
|
332
|
-
};
|
|
333
|
-
const handleConfirmDelete = async () => {
|
|
334
|
-
if (!deleteRecord) return;
|
|
335
|
-
try {
|
|
336
|
-
await deleteRequest.runAsync(deleteRecord.id);
|
|
337
|
-
(0, import_materials.PisellToast)({
|
|
338
|
-
content: getText("pisell2.saas.device-planning.message.delete-success"),
|
|
339
|
-
duration: 2
|
|
340
|
-
});
|
|
341
|
-
setDeleteModalOpen(false);
|
|
342
|
-
setDeleteRecord(void 0);
|
|
343
|
-
await reloadWorkAreas();
|
|
344
|
-
} catch (e) {
|
|
345
|
-
}
|
|
94
|
+
profileNameMap: modelState.profileNameMap
|
|
95
|
+
});
|
|
96
|
+
const openAddDeviceModal = () => {
|
|
97
|
+
modelState.loadBrandsIfNeeded();
|
|
98
|
+
dialogs.setAddDeviceOpen(true);
|
|
346
99
|
};
|
|
347
100
|
const handleCreateDevice = async (payload) => {
|
|
348
101
|
try {
|
|
349
|
-
await createDeviceRequest.runAsync(payload);
|
|
102
|
+
const created = await deviceList.createDeviceRequest.runAsync(payload);
|
|
350
103
|
(0, import_materials.PisellToast)({
|
|
351
104
|
content: getText("pisell2.saas.device-planning.add.create-success"),
|
|
352
105
|
duration: 2
|
|
353
106
|
});
|
|
354
|
-
setAddDeviceOpen(false);
|
|
355
|
-
setPage(1);
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
reloadDevices();
|
|
107
|
+
dialogs.setAddDeviceOpen(false);
|
|
108
|
+
deviceList.setPage(1);
|
|
109
|
+
const refreshedDevices = await deviceList.reloadDevicesAsync();
|
|
110
|
+
if (created == null ? void 0 : created.id) {
|
|
111
|
+
const createdDevice = refreshedDevices.find((item) => item.id === created.id) || created;
|
|
112
|
+
dialogs.setSelectedDevice(deviceList.toDeviceRow(createdDevice));
|
|
113
|
+
dialogs.setDetailInitialTab(
|
|
114
|
+
createdDevice.type_kind === "integrated" ? "info" : "connections"
|
|
115
|
+
);
|
|
116
|
+
dialogs.setDetailOpen(true);
|
|
117
|
+
}
|
|
366
118
|
} catch (e) {
|
|
367
|
-
reloadDevices();
|
|
368
119
|
}
|
|
369
120
|
};
|
|
370
121
|
const handleUpdateDevice = async (id, payload) => {
|
|
371
122
|
try {
|
|
372
|
-
await updateDeviceRequest.runAsync({ id, payload });
|
|
123
|
+
await deviceList.updateDeviceRequest.runAsync({ id, payload });
|
|
373
124
|
(0, import_materials.PisellToast)({
|
|
374
125
|
content: getText("pisell2.saas.device-planning.edit.success"),
|
|
375
126
|
duration: 2
|
|
376
127
|
});
|
|
377
|
-
setEditDeviceOpen(false);
|
|
378
|
-
setDetailOpen(false);
|
|
379
|
-
|
|
380
|
-
reloadDevices();
|
|
128
|
+
dialogs.setEditDeviceOpen(false);
|
|
129
|
+
dialogs.setDetailOpen(false);
|
|
130
|
+
dialogs.clearSelectedDevice();
|
|
131
|
+
deviceList.reloadDevices();
|
|
381
132
|
} catch (e) {
|
|
382
133
|
}
|
|
383
134
|
};
|
|
384
135
|
const handleDeleteDevice = async () => {
|
|
385
|
-
if (!selectedDevice) return;
|
|
136
|
+
if (!dialogs.selectedDevice) return;
|
|
386
137
|
try {
|
|
387
|
-
await removeDeviceRequest.runAsync(selectedDevice.id);
|
|
138
|
+
await deviceList.removeDeviceRequest.runAsync(dialogs.selectedDevice.id);
|
|
388
139
|
(0, import_materials.PisellToast)({
|
|
389
140
|
content: getText("pisell2.saas.device-planning.delete-device.success"),
|
|
390
141
|
duration: 2
|
|
391
142
|
});
|
|
392
|
-
setDeleteDeviceOpen(false);
|
|
393
|
-
setDetailOpen(false);
|
|
394
|
-
|
|
395
|
-
reloadDevices();
|
|
143
|
+
dialogs.setDeleteDeviceOpen(false);
|
|
144
|
+
dialogs.setDetailOpen(false);
|
|
145
|
+
dialogs.clearSelectedDevice();
|
|
146
|
+
deviceList.reloadDevices();
|
|
396
147
|
} catch (e) {
|
|
397
148
|
}
|
|
398
149
|
};
|
|
@@ -405,22 +156,22 @@ var SaasDevicePlanning = ({
|
|
|
405
156
|
/* @__PURE__ */ import_react.default.createElement(
|
|
406
157
|
import_WorkAreaList.default,
|
|
407
158
|
{
|
|
408
|
-
loading: workAreaRequest.loading,
|
|
409
|
-
workAreas,
|
|
410
|
-
selectedWorkAreaId,
|
|
159
|
+
loading: workArea.workAreaRequest.loading,
|
|
160
|
+
workAreas: workArea.workAreas,
|
|
161
|
+
selectedWorkAreaId: workArea.selectedWorkAreaId,
|
|
411
162
|
getText,
|
|
412
163
|
translation,
|
|
413
|
-
onCreate:
|
|
164
|
+
onCreate: dialogs.openCreateWorkArea,
|
|
414
165
|
onSelect: (id) => {
|
|
415
|
-
setSelectedWorkAreaId(id);
|
|
416
|
-
resetDeviceView();
|
|
166
|
+
workArea.setSelectedWorkAreaId(id);
|
|
167
|
+
deviceList.resetDeviceView();
|
|
417
168
|
},
|
|
418
|
-
onEdit:
|
|
419
|
-
onDelete: openDeleteModal,
|
|
420
|
-
onSortEnd: handleDragEnd
|
|
169
|
+
onEdit: dialogs.openEditWorkArea,
|
|
170
|
+
onDelete: workArea.openDeleteModal,
|
|
171
|
+
onSortEnd: workArea.handleDragEnd
|
|
421
172
|
}
|
|
422
173
|
),
|
|
423
|
-
/* @__PURE__ */ import_react.default.createElement("main", { className: "saas-device-planning__content" }, showWorkAreaLoading ? /* @__PURE__ */ import_react.default.createElement("div", { className: "saas-device-planning__empty-workarea" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, null)) : showEmptyWorkArea ? /* @__PURE__ */ import_react.default.createElement("div", { className: "saas-device-planning__empty-workarea" }, /* @__PURE__ */ import_react.default.createElement(
|
|
174
|
+
/* @__PURE__ */ import_react.default.createElement("main", { className: "saas-device-planning__content" }, workArea.showWorkAreaLoading ? /* @__PURE__ */ import_react.default.createElement("div", { className: "saas-device-planning__empty-workarea" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, null)) : workArea.showEmptyWorkArea ? /* @__PURE__ */ import_react.default.createElement("div", { className: "saas-device-planning__empty-workarea" }, /* @__PURE__ */ import_react.default.createElement(
|
|
424
175
|
import_materials.Empty,
|
|
425
176
|
{
|
|
426
177
|
image: import_materials.Empty.PRESENTED_IMAGE_SIMPLE,
|
|
@@ -428,13 +179,13 @@ var SaasDevicePlanning = ({
|
|
|
428
179
|
"pisell2.saas.device-planning.empty.workarea-first"
|
|
429
180
|
)
|
|
430
181
|
}
|
|
431
|
-
)) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "saas-device-planning__page-header" }, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: "saas-device-planning__title" }, selectedWorkArea ? translation(selectedWorkArea.name) : "-"), (selectedWorkArea == null ? void 0 :
|
|
182
|
+
)) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "saas-device-planning__page-header" }, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: "saas-device-planning__title" }, workArea.selectedWorkArea ? translation(workArea.selectedWorkArea.name) : "-"), ((_b = workArea.selectedWorkArea) == null ? void 0 : _b.description) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "saas-device-planning__subtitle" }, translation(workArea.selectedWorkArea.description)) : null)), /* @__PURE__ */ import_react.default.createElement(
|
|
432
183
|
import_antd.Tabs,
|
|
433
184
|
{
|
|
434
185
|
activeKey: activeKind,
|
|
435
186
|
onChange: (key) => {
|
|
436
187
|
setActiveKind(key);
|
|
437
|
-
resetDeviceView();
|
|
188
|
+
deviceList.resetDeviceView();
|
|
438
189
|
},
|
|
439
190
|
items: import_types.DEVICE_KIND_OPTIONS.map((kind) => ({
|
|
440
191
|
key: kind,
|
|
@@ -445,116 +196,110 @@ var SaasDevicePlanning = ({
|
|
|
445
196
|
import_DeviceTable.default,
|
|
446
197
|
{
|
|
447
198
|
activeKind,
|
|
448
|
-
data: tableData,
|
|
449
|
-
loading: deviceRequest.loading,
|
|
450
|
-
search,
|
|
451
|
-
typeFilter,
|
|
452
|
-
typeOptions,
|
|
453
|
-
page,
|
|
454
|
-
pageSize,
|
|
199
|
+
data: deviceList.tableData,
|
|
200
|
+
loading: deviceList.deviceRequest.loading,
|
|
201
|
+
search: deviceList.search,
|
|
202
|
+
typeFilter: deviceList.typeFilter,
|
|
203
|
+
typeOptions: modelState.typeOptions,
|
|
204
|
+
page: deviceList.page,
|
|
205
|
+
pageSize: deviceList.pageSize,
|
|
455
206
|
getText,
|
|
456
207
|
onSearchChange: (value) => {
|
|
457
|
-
setSearch(value);
|
|
458
|
-
setPage(1);
|
|
208
|
+
deviceList.setSearch(value);
|
|
209
|
+
deviceList.setPage(1);
|
|
459
210
|
},
|
|
460
211
|
onTypeFilterChange: (value) => {
|
|
461
|
-
setTypeFilter(value);
|
|
462
|
-
setPage(1);
|
|
212
|
+
deviceList.setTypeFilter(value);
|
|
213
|
+
deviceList.setPage(1);
|
|
463
214
|
},
|
|
464
215
|
onPageChange: (nextPage, nextPageSize) => {
|
|
465
|
-
setPage(nextPage);
|
|
466
|
-
setPageSize(nextPageSize);
|
|
216
|
+
deviceList.setPage(nextPage);
|
|
217
|
+
deviceList.setPageSize(nextPageSize);
|
|
467
218
|
},
|
|
468
|
-
onAdd:
|
|
469
|
-
onSortChange: handleDeviceSort,
|
|
470
|
-
onRowClick: (record) =>
|
|
471
|
-
setSelectedDevice(record);
|
|
472
|
-
setDetailOpen(true);
|
|
473
|
-
}
|
|
219
|
+
onAdd: openAddDeviceModal,
|
|
220
|
+
onSortChange: deviceList.handleDeviceSort,
|
|
221
|
+
onRowClick: (record) => dialogs.openDeviceDetail(record, "info")
|
|
474
222
|
}
|
|
475
223
|
))),
|
|
476
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
224
|
+
dialogs.detailOpen && dialogs.selectedDevice ? /* @__PURE__ */ import_react.default.createElement(
|
|
477
225
|
import_DeviceDetailDrawer.default,
|
|
478
226
|
{
|
|
479
|
-
|
|
480
|
-
|
|
227
|
+
key: dialogs.selectedDevice.id,
|
|
228
|
+
open: dialogs.detailOpen,
|
|
229
|
+
record: dialogs.selectedDevice,
|
|
230
|
+
initialTab: dialogs.detailInitialTab,
|
|
481
231
|
getText,
|
|
482
232
|
translation,
|
|
483
|
-
onClose:
|
|
484
|
-
onEdit: () => setEditDeviceOpen(true),
|
|
485
|
-
onDelete: () => setDeleteDeviceOpen(true)
|
|
233
|
+
onClose: dialogs.closeDeviceDetail,
|
|
234
|
+
onEdit: () => dialogs.setEditDeviceOpen(true),
|
|
235
|
+
onDelete: () => dialogs.setDeleteDeviceOpen(true),
|
|
236
|
+
onConnectionsChanged: deviceList.reloadDevices
|
|
486
237
|
}
|
|
487
|
-
),
|
|
488
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
238
|
+
) : null,
|
|
239
|
+
dialogs.editDeviceOpen && dialogs.selectedDevice ? /* @__PURE__ */ import_react.default.createElement(
|
|
489
240
|
import_EditDeviceModal.default,
|
|
490
241
|
{
|
|
491
|
-
open:
|
|
492
|
-
record: selectedDevice,
|
|
493
|
-
workAreas,
|
|
494
|
-
models:
|
|
495
|
-
submitting: updateDeviceRequest.loading,
|
|
242
|
+
open: true,
|
|
243
|
+
record: dialogs.selectedDevice,
|
|
244
|
+
workAreas: workArea.workAreas,
|
|
245
|
+
models: modelState.activeModels,
|
|
246
|
+
submitting: deviceList.updateDeviceRequest.loading,
|
|
496
247
|
getText,
|
|
497
248
|
translation,
|
|
498
|
-
onCancel: () => setEditDeviceOpen(false),
|
|
249
|
+
onCancel: () => dialogs.setEditDeviceOpen(false),
|
|
499
250
|
onSubmit: handleUpdateDevice
|
|
500
251
|
}
|
|
501
|
-
),
|
|
502
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
252
|
+
) : null,
|
|
253
|
+
dialogs.deleteDeviceOpen && dialogs.selectedDevice ? /* @__PURE__ */ import_react.default.createElement(
|
|
503
254
|
import_DeleteDeviceModal.default,
|
|
504
255
|
{
|
|
505
|
-
open:
|
|
506
|
-
record: selectedDevice,
|
|
507
|
-
submitting: removeDeviceRequest.loading,
|
|
256
|
+
open: true,
|
|
257
|
+
record: dialogs.selectedDevice,
|
|
258
|
+
submitting: deviceList.removeDeviceRequest.loading,
|
|
508
259
|
getText,
|
|
509
|
-
onCancel: () => setDeleteDeviceOpen(false),
|
|
260
|
+
onCancel: () => dialogs.setDeleteDeviceOpen(false),
|
|
510
261
|
onConfirm: handleDeleteDevice
|
|
511
262
|
}
|
|
512
|
-
),
|
|
513
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
263
|
+
) : null,
|
|
264
|
+
dialogs.addDeviceOpen ? /* @__PURE__ */ import_react.default.createElement(
|
|
514
265
|
import_AddDeviceModal.default,
|
|
515
266
|
{
|
|
516
|
-
open:
|
|
267
|
+
open: true,
|
|
517
268
|
activeKind,
|
|
518
|
-
models:
|
|
519
|
-
|
|
520
|
-
|
|
269
|
+
models: modelState.activeModels,
|
|
270
|
+
brands: modelState.brands,
|
|
271
|
+
workAreaId: workArea.selectedWorkAreaId,
|
|
272
|
+
submitting: deviceList.createDeviceRequest.loading,
|
|
521
273
|
getText,
|
|
522
274
|
translation,
|
|
523
|
-
onClose: () => setAddDeviceOpen(false),
|
|
275
|
+
onClose: () => dialogs.setAddDeviceOpen(false),
|
|
524
276
|
onSubmit: handleCreateDevice
|
|
525
277
|
}
|
|
526
|
-
),
|
|
278
|
+
) : null,
|
|
527
279
|
/* @__PURE__ */ import_react.default.createElement(
|
|
528
280
|
import_WorkAreaModal.default,
|
|
529
281
|
{
|
|
530
|
-
open: workAreaModalOpen,
|
|
531
|
-
mode: workAreaModalMode,
|
|
532
|
-
record: editingWorkArea,
|
|
533
|
-
submitting: saveRequest.loading,
|
|
282
|
+
open: dialogs.workAreaModalOpen,
|
|
283
|
+
mode: dialogs.workAreaModalMode,
|
|
284
|
+
record: dialogs.editingWorkArea,
|
|
285
|
+
submitting: workArea.saveRequest.loading,
|
|
534
286
|
getText,
|
|
535
|
-
onCancel:
|
|
536
|
-
|
|
537
|
-
setEditingWorkArea(void 0);
|
|
538
|
-
},
|
|
539
|
-
onSubmit: handleSaveWorkArea
|
|
287
|
+
onCancel: dialogs.closeWorkAreaModal,
|
|
288
|
+
onSubmit: workArea.handleSaveWorkArea
|
|
540
289
|
}
|
|
541
290
|
),
|
|
542
291
|
/* @__PURE__ */ import_react.default.createElement(
|
|
543
292
|
import_DeleteWorkAreaModal.default,
|
|
544
293
|
{
|
|
545
|
-
open: deleteModalOpen,
|
|
546
|
-
loading: getWorkAreaDetailRequest.loading,
|
|
547
|
-
submitting: deleteRequest.loading,
|
|
548
|
-
record: deleteRecord,
|
|
549
|
-
counts: deleteCounts,
|
|
294
|
+
open: workArea.deleteModalOpen,
|
|
295
|
+
loading: workArea.getWorkAreaDetailRequest.loading,
|
|
296
|
+
submitting: workArea.deleteRequest.loading,
|
|
297
|
+
record: workArea.deleteRecord,
|
|
298
|
+
counts: workArea.deleteCounts,
|
|
550
299
|
translation,
|
|
551
300
|
getText,
|
|
552
|
-
onClose:
|
|
553
|
-
|
|
554
|
-
setDeleteRecord(void 0);
|
|
555
|
-
setDeleteCounts({ smart: 0, dumb: 0, integrated: 0 });
|
|
556
|
-
},
|
|
557
|
-
onConfirm: handleConfirmDelete
|
|
301
|
+
onClose: workArea.closeDeleteModal,
|
|
302
|
+
onConfirm: workArea.handleConfirmDelete
|
|
558
303
|
}
|
|
559
304
|
)
|
|
560
305
|
);
|