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