@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,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
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
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
- var device = record === null || record === void 0 ? void 0 : record._raw;
129
- var reportData = device === null || device === void 0 ? void 0 : device.data;
130
- var online = (record === null || record === void 0 ? void 0 : record.status) === 'online';
131
- var lastSeen = formatLastSeen(device === null || device === void 0 ? void 0 : device.last_seen);
132
- var reportGroups = useMemo(function () {
133
- if (!isPlainObject(reportData)) return [];
134
- return REPORT_GROUPS.reduce(function (list, group) {
135
- var data = reportData[group.key];
136
- if (isPlainObject(data)) {
137
- list.push(_objectSpread(_objectSpread({}, group), {}, {
138
- data: data
139
- }));
140
- }
141
- return list;
142
- }, []);
143
- }, [reportData]);
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: 520,
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
- }, record ? /*#__PURE__*/React.createElement("div", {
161
- className: "device-detail-drawer__root"
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
- }, record.name), /*#__PURE__*/React.createElement("div", {
79
+ }, displayRecord.name), /*#__PURE__*/React.createElement("div", {
173
80
  className: "device-detail-drawer__type"
174
- }, record.typeName)), /*#__PURE__*/React.createElement(Button, {
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(Card, {
181
- size: "small",
182
- title: getText('pisell2.saas.device-planning.detail.basic-info'),
183
- className: "device-detail-drawer__card"
184
- }, /*#__PURE__*/React.createElement("div", {
185
- className: "device-detail-drawer__info-list"
186
- }, /*#__PURE__*/React.createElement("div", {
187
- className: "device-detail-drawer__info-row"
188
- }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.name')), /*#__PURE__*/React.createElement("strong", null, record.name)), /*#__PURE__*/React.createElement("div", {
189
- className: "device-detail-drawer__info-row"
190
- }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.type')), /*#__PURE__*/React.createElement("strong", null, record.typeName)), /*#__PURE__*/React.createElement("div", {
191
- className: "device-detail-drawer__info-row"
192
- }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.model')), /*#__PURE__*/React.createElement("strong", null, record.modelName)), /*#__PURE__*/React.createElement("div", {
193
- className: "device-detail-drawer__info-two-row"
194
- }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.profile')), /*#__PURE__*/React.createElement("div", {
195
- className: "device-detail-drawer__profile-card"
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;