@pisell/private-materials 3.4.105 → 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/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +0 -1
- package/es/components/ecocup/components/CupActionList/index.d.ts +0 -1
- package/es/components/ecocup/components/CupActionModal/index.d.ts +0 -1
- package/es/components/ecocup/components/CupStatusModal/index.d.ts +0 -1
- package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +0 -1
- package/es/components/ecocup/components/SearchBar/index.d.ts +0 -1
- package/es/components/ecocup/components/SettingModal/index.d.ts +0 -1
- package/es/components/ecocup/cupList/hooks/useColumns.d.ts +0 -1
- package/es/components/ecocup/cupList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -2
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.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/signature/index.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +6 -6
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- 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/productExtension/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/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/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +0 -1
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/walletList/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +0 -1
- package/es/plus/orderList/config.d.ts +0 -1
- package/es/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +0 -1
- package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -7
- package/es/plus/saasAttendance/settings/components/membersField/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/index.d.ts +0 -1
- 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/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/es/plus/walletPassGallery/index.d.ts +0 -1
- package/es/pro/Selector/Selector.d.ts +1 -1
- package/es/pro/Selector/demo.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +0 -1
- package/lib/components/ecocup/components/CupActionList/index.d.ts +0 -1
- package/lib/components/ecocup/components/CupActionModal/index.d.ts +0 -1
- package/lib/components/ecocup/components/CupStatusModal/index.d.ts +0 -1
- package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +0 -1
- package/lib/components/ecocup/components/SearchBar/index.d.ts +0 -1
- package/lib/components/ecocup/components/SettingModal/index.d.ts +0 -1
- package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +0 -1
- package/lib/components/ecocup/cupList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -2
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.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/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
- 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/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/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/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +0 -1
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/walletList/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +0 -1
- package/lib/plus/orderList/config.d.ts +0 -1
- package/lib/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +0 -1
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -7
- package/lib/plus/saasAttendance/settings/components/membersField/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
- 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/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/index.d.ts +0 -1
- package/lib/pro/Selector/Selector.d.ts +1 -1
- package/lib/pro/Selector/demo.d.ts +0 -1
- package/package.json +4 -4
- 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
package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/hooks/useDeviceDetail.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { useEffect, useRef, useState } from 'react';
|
|
8
|
+
import { getDeviceDetail } from "../../../serve";
|
|
9
|
+
import { createDeviceRow } from "../../../utils";
|
|
10
|
+
/** 管理详情抽屉的当前 tab、设备详情补拉取和 integrated 设备 tab 保护。 */
|
|
11
|
+
export var useDeviceDetail = function useDeviceDetail(_ref) {
|
|
12
|
+
var open = _ref.open,
|
|
13
|
+
record = _ref.record,
|
|
14
|
+
initialTab = _ref.initialTab,
|
|
15
|
+
translation = _ref.translation;
|
|
16
|
+
var _useState = useState('info'),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
activeTab = _useState2[0],
|
|
19
|
+
setActiveTab = _useState2[1];
|
|
20
|
+
var _useState3 = useState(),
|
|
21
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
22
|
+
detailRecord = _useState4[0],
|
|
23
|
+
setDetailRecord = _useState4[1];
|
|
24
|
+
var detailFetchedIdRef = useRef();
|
|
25
|
+
var displayRecord = detailRecord || record;
|
|
26
|
+
var activeKind = (displayRecord === null || displayRecord === void 0 ? void 0 : displayRecord._raw.type_kind) || 'smart';
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
if (open) {
|
|
29
|
+
setActiveTab(initialTab);
|
|
30
|
+
setDetailRecord(record);
|
|
31
|
+
detailFetchedIdRef.current = undefined;
|
|
32
|
+
}
|
|
33
|
+
}, [initialTab, open, record === null || record === void 0 ? void 0 : record.id]);
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
if (!open || !(record !== null && record !== void 0 && record.id)) return;
|
|
36
|
+
var shouldFetchDetail = activeTab === 'info' || detailFetchedIdRef.current !== record.id;
|
|
37
|
+
if (!shouldFetchDetail) return;
|
|
38
|
+
detailFetchedIdRef.current = record.id;
|
|
39
|
+
getDeviceDetail(record.id).then(function (detail) {
|
|
40
|
+
if (detail) {
|
|
41
|
+
setDetailRecord(createDeviceRow(detail, translation));
|
|
42
|
+
}
|
|
43
|
+
}).catch(function () {
|
|
44
|
+
setDetailRecord(record);
|
|
45
|
+
});
|
|
46
|
+
}, [activeTab, open, record, record === null || record === void 0 ? void 0 : record.id, translation]);
|
|
47
|
+
useEffect(function () {
|
|
48
|
+
if (activeKind === 'integrated' && activeTab === 'connections') {
|
|
49
|
+
setActiveTab('info');
|
|
50
|
+
}
|
|
51
|
+
}, [activeKind, activeTab]);
|
|
52
|
+
return {
|
|
53
|
+
activeTab: activeTab,
|
|
54
|
+
activeKind: activeKind,
|
|
55
|
+
displayRecord: displayRecord,
|
|
56
|
+
setActiveTab: setActiveTab
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -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;
|
|
@@ -1,150 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import React, { useMemo } from 'react';
|
|
8
|
-
import { Card, Drawer, Empty } from 'antd';
|
|
9
|
-
import { Button, Icon, Tag } from '@pisell/materials';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Drawer } from 'antd';
|
|
3
|
+
import { Button, Icon } from '@pisell/materials';
|
|
10
4
|
import { CloseOutlined } from '@ant-design/icons';
|
|
11
5
|
import classNames from 'classnames';
|
|
6
|
+
import { DEVICE_ICON_COLOR } from "../../utils";
|
|
7
|
+
import DrawerSidebar from "./components/DrawerSidebar";
|
|
8
|
+
import DeviceInfoPanel from "./components/DeviceInfoPanel";
|
|
9
|
+
import DeviceConnectionsPanel from "./components/DeviceConnectionsPanel";
|
|
10
|
+
import { useDeviceConnections } from "./hooks/useDeviceConnections";
|
|
11
|
+
import { useDeviceDetail } from "./hooks/useDeviceDetail";
|
|
12
12
|
import "./index.less";
|
|
13
|
-
var EMPTY_VALUE = '-';
|
|
14
|
-
var BYTE_PER_GB = 1024 * 1024 * 1024;
|
|
15
|
-
var REPORT_GROUPS = [{
|
|
16
|
-
key: 'software',
|
|
17
|
-
fields: [{
|
|
18
|
-
key: 'name'
|
|
19
|
-
}, {
|
|
20
|
-
key: 'version'
|
|
21
|
-
}]
|
|
22
|
-
}, {
|
|
23
|
-
key: 'battery',
|
|
24
|
-
fields: [{
|
|
25
|
-
key: 'level',
|
|
26
|
-
value: function value(data, getText) {
|
|
27
|
-
return renderBatteryValue(data, getText);
|
|
28
|
-
}
|
|
29
|
-
}]
|
|
30
|
-
}, {
|
|
31
|
-
key: 'network',
|
|
32
|
-
fields: [{
|
|
33
|
-
key: 'type'
|
|
34
|
-
}, {
|
|
35
|
-
key: 'local_ip'
|
|
36
|
-
}, {
|
|
37
|
-
key: 'gateway'
|
|
38
|
-
}, {
|
|
39
|
-
key: 'subnet_mask'
|
|
40
|
-
}, {
|
|
41
|
-
key: 'ssid'
|
|
42
|
-
}]
|
|
43
|
-
}, {
|
|
44
|
-
key: 'hardware',
|
|
45
|
-
fields: [{
|
|
46
|
-
key: 'model'
|
|
47
|
-
}, {
|
|
48
|
-
key: 'os_version'
|
|
49
|
-
}]
|
|
50
|
-
}, {
|
|
51
|
-
key: 'storage',
|
|
52
|
-
fields: [{
|
|
53
|
-
key: 'used',
|
|
54
|
-
value: function value(data) {
|
|
55
|
-
return formatStorageValue(data.used);
|
|
56
|
-
}
|
|
57
|
-
}, {
|
|
58
|
-
key: 'total',
|
|
59
|
-
value: function value(data) {
|
|
60
|
-
return formatStorageValue(data.total);
|
|
61
|
-
}
|
|
62
|
-
}]
|
|
63
|
-
}];
|
|
64
|
-
var isPlainObject = function isPlainObject(value) {
|
|
65
|
-
return Object.prototype.toString.call(value) === '[object Object]';
|
|
66
|
-
};
|
|
67
|
-
var getReportText = function getReportText(getText, key) {
|
|
68
|
-
return getText("pisell2.saas.device-planning.detail.report.".concat(key));
|
|
69
|
-
};
|
|
70
|
-
var formatReportValue = function formatReportValue(value, getText) {
|
|
71
|
-
if (value === null || value === undefined || value === '') {
|
|
72
|
-
return EMPTY_VALUE;
|
|
73
|
-
}
|
|
74
|
-
if (typeof value === 'boolean') {
|
|
75
|
-
return getText("pisell2.saas.device-planning.detail.".concat(value ? 'yes' : 'no'));
|
|
76
|
-
}
|
|
77
|
-
if (Array.isArray(value) || isPlainObject(value)) {
|
|
78
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
79
|
-
className: "device-detail-drawer__json-value"
|
|
80
|
-
}, JSON.stringify(value));
|
|
81
|
-
}
|
|
82
|
-
return String(value);
|
|
83
|
-
};
|
|
84
|
-
var formatStorageValue = function formatStorageValue(value) {
|
|
85
|
-
var byteValue = typeof value === 'number' || typeof value === 'string' ? Number(value) : Number.NaN;
|
|
86
|
-
if (!Number.isFinite(byteValue)) {
|
|
87
|
-
return EMPTY_VALUE;
|
|
88
|
-
}
|
|
89
|
-
var gbValue = byteValue / BYTE_PER_GB;
|
|
90
|
-
var text = gbValue >= 10 ? String(Math.round(gbValue)) : gbValue.toFixed(2).replace(/\.?0+$/, '');
|
|
91
|
-
return "".concat(text, " GB");
|
|
92
|
-
};
|
|
93
|
-
var formatLastSeen = function formatLastSeen(value) {
|
|
94
|
-
return typeof value === 'string' && value.trim() ? value : EMPTY_VALUE;
|
|
95
|
-
};
|
|
96
|
-
var renderBatteryValue = function renderBatteryValue(data, getText) {
|
|
97
|
-
var rawLevel = typeof data.level === 'number' || typeof data.level === 'string' ? Number(data.level) : Number.NaN;
|
|
98
|
-
var hasLevel = Number.isFinite(rawLevel);
|
|
99
|
-
var levelValue = hasLevel ? Math.max(0, Math.min(rawLevel, 100)) : 0;
|
|
100
|
-
var level = hasLevel ? "".concat(rawLevel, "%") : EMPTY_VALUE;
|
|
101
|
-
var charging = (data === null || data === void 0 ? void 0 : data.charging) === true;
|
|
102
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
103
|
-
className: "device-detail-drawer__battery-value"
|
|
104
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
105
|
-
className: classNames('device-detail-drawer__battery-icon', {
|
|
106
|
-
'is-charging': charging
|
|
107
|
-
})
|
|
108
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
109
|
-
className: "device-detail-drawer__battery-fill",
|
|
110
|
-
style: {
|
|
111
|
-
width: "".concat(levelValue, "%")
|
|
112
|
-
}
|
|
113
|
-
}), charging ? /*#__PURE__*/React.createElement("span", {
|
|
114
|
-
className: "device-detail-drawer__battery-bolt"
|
|
115
|
-
}) : null), /*#__PURE__*/React.createElement("span", null, level), /*#__PURE__*/React.createElement("span", {
|
|
116
|
-
className: "device-detail-drawer__battery-status"
|
|
117
|
-
}, getReportText(getText, charging ? 'charging' : 'not-charging')));
|
|
118
|
-
};
|
|
119
13
|
var DeviceDetailDrawer = function DeviceDetailDrawer(_ref) {
|
|
120
14
|
var _device$type;
|
|
121
15
|
var open = _ref.open,
|
|
122
16
|
record = _ref.record,
|
|
17
|
+
_ref$initialTab = _ref.initialTab,
|
|
18
|
+
initialTab = _ref$initialTab === void 0 ? 'info' : _ref$initialTab,
|
|
123
19
|
getText = _ref.getText,
|
|
124
20
|
translation = _ref.translation,
|
|
125
21
|
onClose = _ref.onClose,
|
|
126
22
|
onEdit = _ref.onEdit,
|
|
127
|
-
onDelete = _ref.onDelete
|
|
128
|
-
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
23
|
+
onDelete = _ref.onDelete,
|
|
24
|
+
onConnectionsChanged = _ref.onConnectionsChanged;
|
|
25
|
+
var _useDeviceDetail = useDeviceDetail({
|
|
26
|
+
open: open,
|
|
27
|
+
record: record,
|
|
28
|
+
initialTab: initialTab,
|
|
29
|
+
translation: translation
|
|
30
|
+
}),
|
|
31
|
+
activeTab = _useDeviceDetail.activeTab,
|
|
32
|
+
activeKind = _useDeviceDetail.activeKind,
|
|
33
|
+
displayRecord = _useDeviceDetail.displayRecord,
|
|
34
|
+
setActiveTab = _useDeviceDetail.setActiveTab;
|
|
35
|
+
var device = displayRecord === null || displayRecord === void 0 ? void 0 : displayRecord._raw;
|
|
36
|
+
var connections = useDeviceConnections({
|
|
37
|
+
open: open,
|
|
38
|
+
activeTab: activeTab,
|
|
39
|
+
activeKind: activeKind,
|
|
40
|
+
displayRecord: displayRecord,
|
|
41
|
+
onConnectionsChanged: onConnectionsChanged
|
|
42
|
+
});
|
|
144
43
|
return /*#__PURE__*/React.createElement(Drawer, {
|
|
145
44
|
open: open,
|
|
146
45
|
onClose: onClose,
|
|
147
|
-
width:
|
|
46
|
+
width: 720,
|
|
148
47
|
maskClosable: true,
|
|
149
48
|
closable: false,
|
|
150
49
|
className: "device-detail-drawer",
|
|
@@ -157,97 +56,50 @@ var DeviceDetailDrawer = function DeviceDetailDrawer(_ref) {
|
|
|
157
56
|
bodyStyle: {
|
|
158
57
|
padding: 0
|
|
159
58
|
}
|
|
160
|
-
},
|
|
161
|
-
className:
|
|
59
|
+
}, displayRecord ? /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: classNames('device-detail-drawer__root', "is-".concat(activeKind))
|
|
61
|
+
}, /*#__PURE__*/React.createElement(DrawerSidebar, {
|
|
62
|
+
activeKey: activeTab,
|
|
63
|
+
activeKind: activeKind,
|
|
64
|
+
getText: getText,
|
|
65
|
+
onChange: setActiveTab
|
|
66
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: "device-detail-drawer__main"
|
|
162
68
|
}, /*#__PURE__*/React.createElement("div", {
|
|
163
69
|
className: "device-detail-drawer__header"
|
|
164
70
|
}, device !== null && device !== void 0 && (_device$type = device.type) !== null && _device$type !== void 0 && _device$type.icon ? /*#__PURE__*/React.createElement("div", {
|
|
165
71
|
className: "device-detail-drawer__icon"
|
|
166
72
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
167
|
-
type: device.type.icon
|
|
73
|
+
type: device.type.icon,
|
|
74
|
+
color: DEVICE_ICON_COLOR[activeKind]
|
|
168
75
|
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
169
76
|
className: "device-detail-drawer__heading"
|
|
170
77
|
}, /*#__PURE__*/React.createElement("div", {
|
|
171
78
|
className: "device-detail-drawer__name"
|
|
172
|
-
},
|
|
79
|
+
}, displayRecord.name), /*#__PURE__*/React.createElement("div", {
|
|
173
80
|
className: "device-detail-drawer__type"
|
|
174
|
-
},
|
|
81
|
+
}, displayRecord.typeName)), /*#__PURE__*/React.createElement(Button, {
|
|
175
82
|
type: "text",
|
|
176
83
|
icon: /*#__PURE__*/React.createElement(CloseOutlined, null),
|
|
177
84
|
onClick: onClose
|
|
178
85
|
})), /*#__PURE__*/React.createElement("div", {
|
|
179
86
|
className: "device-detail-drawer__content"
|
|
180
|
-
}, /*#__PURE__*/React.createElement(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
197
|
-
type: "FileTextOutlined"
|
|
198
|
-
}), record.profileName)))), /*#__PURE__*/React.createElement(Card, {
|
|
199
|
-
size: "small",
|
|
200
|
-
title: getText('pisell2.saas.device-planning.detail.status'),
|
|
201
|
-
className: "device-detail-drawer__card"
|
|
202
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
203
|
-
className: "device-detail-drawer__info-list"
|
|
204
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
205
|
-
className: "device-detail-drawer__info-row"
|
|
206
|
-
}, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.link-status')), /*#__PURE__*/React.createElement(Tag, {
|
|
207
|
-
color: record.link === 'linked' ? 'green' : 'gold',
|
|
208
|
-
style: {
|
|
209
|
-
marginRight: 0
|
|
210
|
-
}
|
|
211
|
-
}, getText("pisell2.saas.device-planning.status.".concat(record.link)) || record.link)), /*#__PURE__*/React.createElement("div", {
|
|
212
|
-
className: "device-detail-drawer__info-row"
|
|
213
|
-
}, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.online-status')), /*#__PURE__*/React.createElement("span", {
|
|
214
|
-
className: "device-detail-drawer__online-status"
|
|
215
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
216
|
-
className: classNames('device-detail-drawer__status-dot', {
|
|
217
|
-
'is-online': online
|
|
218
|
-
})
|
|
219
|
-
}), getText("pisell2.saas.device-planning.status.".concat(record.status)) || record.status)))), /*#__PURE__*/React.createElement(Card, {
|
|
220
|
-
size: "small",
|
|
221
|
-
title: getText('pisell2.saas.device-planning.detail.report-info'),
|
|
222
|
-
extra: /*#__PURE__*/React.createElement("span", {
|
|
223
|
-
className: "device-detail-drawer__last-seen"
|
|
224
|
-
}, getText('pisell2.saas.device-planning.detail.last-seen'), lastSeen),
|
|
225
|
-
className: "device-detail-drawer__card"
|
|
226
|
-
}, reportGroups.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
227
|
-
className: "device-detail-drawer__report-list"
|
|
228
|
-
}, reportGroups.map(function (group) {
|
|
229
|
-
return /*#__PURE__*/React.createElement(Card, {
|
|
230
|
-
key: group.key,
|
|
231
|
-
size: "small",
|
|
232
|
-
type: "inner",
|
|
233
|
-
title: getReportText(getText, "group.".concat(group.key)),
|
|
234
|
-
className: "device-detail-drawer__report-card"
|
|
235
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
236
|
-
className: "device-detail-drawer__report-rows"
|
|
237
|
-
}, group.fields.map(function (field) {
|
|
238
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
239
|
-
key: field.key,
|
|
240
|
-
className: "device-detail-drawer__report-row"
|
|
241
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
242
|
-
className: "device-detail-drawer__report-label"
|
|
243
|
-
}, getReportText(getText, "field.".concat(field.key))), /*#__PURE__*/React.createElement("span", {
|
|
244
|
-
className: "device-detail-drawer__report-value"
|
|
245
|
-
}, field.value ? field.value(group.data, getText) : formatReportValue(group.data[field.key], getText)));
|
|
246
|
-
})));
|
|
247
|
-
})) : /*#__PURE__*/React.createElement(Empty, {
|
|
248
|
-
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
249
|
-
description: getText('pisell2.saas.device-planning.detail.no-report-info')
|
|
250
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
}, activeTab === 'info' ? /*#__PURE__*/React.createElement(DeviceInfoPanel, {
|
|
88
|
+
record: displayRecord,
|
|
89
|
+
getText: getText
|
|
90
|
+
}) : /*#__PURE__*/React.createElement(DeviceConnectionsPanel, {
|
|
91
|
+
activeKind: activeKind,
|
|
92
|
+
currentDevice: displayRecord._raw,
|
|
93
|
+
connections: connections.connections,
|
|
94
|
+
loading: connections.loading,
|
|
95
|
+
submitting: connections.submitting,
|
|
96
|
+
deleting: connections.deleting,
|
|
97
|
+
getText: getText,
|
|
98
|
+
translation: translation,
|
|
99
|
+
onCreateConnection: connections.handleCreateConnection,
|
|
100
|
+
onUpdateConnection: connections.handleUpdateConnection,
|
|
101
|
+
onDeleteConnection: connections.handleDeleteConnection
|
|
102
|
+
})), activeTab === 'info' ? /*#__PURE__*/React.createElement("div", {
|
|
251
103
|
className: "device-detail-drawer__footer"
|
|
252
104
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
253
105
|
danger: true,
|
|
@@ -257,6 +109,6 @@ var DeviceDetailDrawer = function DeviceDetailDrawer(_ref) {
|
|
|
257
109
|
type: "primary",
|
|
258
110
|
size: "large",
|
|
259
111
|
onClick: onEdit
|
|
260
|
-
}, getText('pisell2.saas.device-planning.detail.edit')))) : null);
|
|
112
|
+
}, getText('pisell2.saas.device-planning.detail.edit'))) : null)) : null);
|
|
261
113
|
};
|
|
262
114
|
export default DeviceDetailDrawer;
|