@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,272 @@
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ 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."); }
7
+ 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); }
8
+ 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; }
9
+ 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; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import React, { useState } from 'react';
12
+ import { Dropdown, Empty, Spin } from 'antd';
13
+ import { Button, Icon, PisellModal } from '@pisell/materials';
14
+ import { DeleteOutlined, EditOutlined, LinkOutlined, MoreOutlined, PlusOutlined } from '@ant-design/icons';
15
+ import { formatToken } from "../../../constants";
16
+ import { getConnectionTypeLabel } from "../../../utils";
17
+ import ConnectExistingDeviceModal from "./ConnectExistingDeviceModal";
18
+ import "./DeviceConnectionsPanel.less";
19
+ var DeviceConnectionsPanel = function DeviceConnectionsPanel(_ref) {
20
+ var activeKind = _ref.activeKind,
21
+ currentDevice = _ref.currentDevice,
22
+ connections = _ref.connections,
23
+ loading = _ref.loading,
24
+ submitting = _ref.submitting,
25
+ deleting = _ref.deleting,
26
+ getText = _ref.getText,
27
+ translation = _ref.translation,
28
+ onCreateConnection = _ref.onCreateConnection,
29
+ onUpdateConnection = _ref.onUpdateConnection,
30
+ onDeleteConnection = _ref.onDeleteConnection;
31
+ var _useState = useState(),
32
+ _useState2 = _slicedToArray(_useState, 2),
33
+ removingConnection = _useState2[0],
34
+ setRemovingConnection = _useState2[1];
35
+ var _useState3 = useState(),
36
+ _useState4 = _slicedToArray(_useState3, 2),
37
+ connectMode = _useState4[0],
38
+ setConnectMode = _useState4[1];
39
+ var _useState5 = useState(),
40
+ _useState6 = _slicedToArray(_useState5, 2),
41
+ editingConnection = _useState6[0],
42
+ setEditingConnection = _useState6[1];
43
+ if (activeKind === 'integrated') {
44
+ return null;
45
+ }
46
+ var isSmart = activeKind === 'smart';
47
+ var getConnectedDevice = function getConnectedDevice(connection) {
48
+ return (isSmart ? connection.target_device : connection.source_device) || null;
49
+ };
50
+ var getConnectedDeviceName = function getConnectedDeviceName(connection) {
51
+ if (!connection) return '';
52
+ var device = getConnectedDevice(connection);
53
+ return device ? translation(device.name) || String(device.id) : '-';
54
+ };
55
+ var title = getText(isSmart ? 'pisell2.saas.device-planning.drawer.connections.peripherals' : 'pisell2.saas.device-planning.drawer.connections.connected-to');
56
+ var emptyText = getText(isSmart ? 'pisell2.saas.device-planning.drawer.connections.no-peripherals' : 'pisell2.saas.device-planning.drawer.connections.not-connected-smart');
57
+ var menuItems = [{
58
+ key: 'connect-existing',
59
+ icon: /*#__PURE__*/React.createElement(LinkOutlined, null),
60
+ label: getText('pisell2.saas.device-planning.drawer.connections.connect-existing'),
61
+ onClick: function onClick() {
62
+ return setConnectMode('existing');
63
+ }
64
+ }, {
65
+ key: 'add-new',
66
+ icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
67
+ label: getText('pisell2.saas.device-planning.drawer.connections.add-new'),
68
+ onClick: function onClick() {
69
+ return setConnectMode('new');
70
+ }
71
+ }];
72
+ var actionItems = function actionItems(connection) {
73
+ return [{
74
+ key: 'edit',
75
+ icon: /*#__PURE__*/React.createElement(EditOutlined, null),
76
+ label: getText('pisell2.saas.device-planning.drawer.connections.edit-configuration'),
77
+ onClick: function onClick() {
78
+ return setEditingConnection(connection);
79
+ }
80
+ }, {
81
+ key: 'remove',
82
+ icon: /*#__PURE__*/React.createElement(DeleteOutlined, null),
83
+ danger: true,
84
+ label: getText('pisell2.saas.device-planning.drawer.connections.remove'),
85
+ onClick: function onClick() {
86
+ return setRemovingConnection(connection);
87
+ }
88
+ }];
89
+ };
90
+ var connectButton = isSmart ? /*#__PURE__*/React.createElement(Dropdown, {
91
+ menu: {
92
+ items: menuItems
93
+ },
94
+ trigger: ['click'],
95
+ placement: "bottomRight"
96
+ }, /*#__PURE__*/React.createElement(Button, {
97
+ icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
98
+ }, getText('pisell2.saas.device-planning.drawer.connections.connect'))) : /*#__PURE__*/React.createElement(Button, {
99
+ icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
100
+ onClick: function onClick() {
101
+ return setConnectMode('existing');
102
+ }
103
+ }, getText('pisell2.saas.device-planning.drawer.connections.connect'));
104
+ var renderProfileTags = function renderProfileTags(connection) {
105
+ return (connection.profiles || []).map(function (profile) {
106
+ return /*#__PURE__*/React.createElement("span", {
107
+ key: profile.id,
108
+ className: "device-detail-drawer__connection-tag"
109
+ }, translation(profile.name) || profile.id);
110
+ });
111
+ };
112
+ var renderConnectionItem = function renderConnectionItem(connection) {
113
+ var _connection$config, _device$type;
114
+ var device = getConnectedDevice(connection);
115
+ var connectionType = getConnectionTypeLabel((_connection$config = connection.config) === null || _connection$config === void 0 ? void 0 : _connection$config.connection_type);
116
+ return /*#__PURE__*/React.createElement("div", {
117
+ key: connection.id,
118
+ className: "device-detail-drawer__connection-item"
119
+ }, /*#__PURE__*/React.createElement("div", {
120
+ className: "device-detail-drawer__connection-icon"
121
+ }, /*#__PURE__*/React.createElement(Icon, {
122
+ type: (device === null || device === void 0 || (_device$type = device.type) === null || _device$type === void 0 ? void 0 : _device$type.icon) || (isSmart ? 'PrinterOutlined' : 'DesktopOutlined')
123
+ })), /*#__PURE__*/React.createElement("div", {
124
+ className: "device-detail-drawer__connection-main"
125
+ }, /*#__PURE__*/React.createElement("div", {
126
+ className: "device-detail-drawer__connection-name"
127
+ }, device ? translation(device.name) || device.id : '-'), /*#__PURE__*/React.createElement("div", {
128
+ className: "device-detail-drawer__connection-meta"
129
+ }, /*#__PURE__*/React.createElement("span", null, connectionType), renderProfileTags(connection))), /*#__PURE__*/React.createElement(Dropdown, {
130
+ menu: {
131
+ items: actionItems(connection)
132
+ },
133
+ trigger: ['click'],
134
+ placement: "bottomRight"
135
+ }, /*#__PURE__*/React.createElement(Button, {
136
+ type: "text",
137
+ icon: /*#__PURE__*/React.createElement(MoreOutlined, null),
138
+ className: "device-detail-drawer__connection-more"
139
+ })));
140
+ };
141
+ return /*#__PURE__*/React.createElement("div", {
142
+ className: "device-detail-drawer__connections"
143
+ }, /*#__PURE__*/React.createElement("div", {
144
+ className: "device-detail-drawer__connections-header"
145
+ }, /*#__PURE__*/React.createElement("div", {
146
+ className: "device-detail-drawer__connections-title"
147
+ }, /*#__PURE__*/React.createElement(Icon, {
148
+ type: isSmart ? 'ApiOutlined' : 'LinkOutlined'
149
+ }), /*#__PURE__*/React.createElement("span", null, title)), connectButton), /*#__PURE__*/React.createElement(Spin, {
150
+ spinning: loading
151
+ }, connections.length ? /*#__PURE__*/React.createElement("div", {
152
+ className: "device-detail-drawer__connection-list"
153
+ }, connections.map(renderConnectionItem)) : /*#__PURE__*/React.createElement("div", {
154
+ className: "device-detail-drawer__connections-empty"
155
+ }, /*#__PURE__*/React.createElement(Empty, {
156
+ image: Empty.PRESENTED_IMAGE_SIMPLE,
157
+ description: emptyText
158
+ }))), removingConnection ? /*#__PURE__*/React.createElement(PisellModal, {
159
+ open: true,
160
+ title: getText('pisell2.saas.device-planning.drawer.connections.remove-title'),
161
+ onCancel: function onCancel() {
162
+ return setRemovingConnection(undefined);
163
+ },
164
+ okText: getText('pisell2.saas.device-planning.drawer.connections.remove'),
165
+ cancelText: getText('pisell2.saas.device-planning.drawer.connections.cancel'),
166
+ okButtonProps: {
167
+ block: true,
168
+ size: 'large',
169
+ danger: true,
170
+ loading: deleting,
171
+ onClick: function () {
172
+ var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
173
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
174
+ while (1) switch (_context.prev = _context.next) {
175
+ case 0:
176
+ _context.next = 2;
177
+ return onDeleteConnection(removingConnection.id);
178
+ case 2:
179
+ setRemovingConnection(undefined);
180
+ case 3:
181
+ case "end":
182
+ return _context.stop();
183
+ }
184
+ }, _callee);
185
+ }));
186
+ function onClick() {
187
+ return _onClick.apply(this, arguments);
188
+ }
189
+ return onClick;
190
+ }()
191
+ },
192
+ cancelButtonProps: {
193
+ block: true,
194
+ size: 'large',
195
+ type: 'default',
196
+ disabled: deleting,
197
+ onClick: function onClick() {
198
+ return setRemovingConnection(undefined);
199
+ }
200
+ },
201
+ width: 460,
202
+ headerDivider: false
203
+ }, formatToken(getText('pisell2.saas.device-planning.drawer.connections.remove-confirm'), {
204
+ DeviceName: getConnectedDeviceName(removingConnection)
205
+ })) : null, connectMode ? /*#__PURE__*/React.createElement(ConnectExistingDeviceModal, {
206
+ open: true,
207
+ mode: connectMode,
208
+ currentDevice: currentDevice,
209
+ connectedDeviceIds: connections.map(function (connection) {
210
+ return activeKind === 'smart' ? connection.target_device_id : connection.source_device_id;
211
+ }),
212
+ currentWorkAreaId: currentDevice.workarea_id,
213
+ getText: getText,
214
+ translation: translation,
215
+ submitting: submitting,
216
+ onClose: function onClose() {
217
+ return setConnectMode(undefined);
218
+ },
219
+ onSubmit: ( /*#__PURE__*/function () {
220
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(payload) {
221
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
222
+ while (1) switch (_context2.prev = _context2.next) {
223
+ case 0:
224
+ _context2.next = 2;
225
+ return onCreateConnection(payload);
226
+ case 2:
227
+ setConnectMode(undefined);
228
+ case 3:
229
+ case "end":
230
+ return _context2.stop();
231
+ }
232
+ }, _callee2);
233
+ }));
234
+ return function (_x) {
235
+ return _ref2.apply(this, arguments);
236
+ };
237
+ }())
238
+ }) : null, editingConnection ? /*#__PURE__*/React.createElement(ConnectExistingDeviceModal, {
239
+ open: true,
240
+ mode: "edit",
241
+ currentDevice: currentDevice,
242
+ editConnection: editingConnection,
243
+ connectedDeviceIds: [],
244
+ currentWorkAreaId: currentDevice.workarea_id,
245
+ getText: getText,
246
+ translation: translation,
247
+ submitting: submitting,
248
+ onClose: function onClose() {
249
+ return setEditingConnection(undefined);
250
+ },
251
+ onUpdate: ( /*#__PURE__*/function () {
252
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(id, payload) {
253
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
254
+ while (1) switch (_context3.prev = _context3.next) {
255
+ case 0:
256
+ _context3.next = 2;
257
+ return onUpdateConnection(id, payload);
258
+ case 2:
259
+ setEditingConnection(undefined);
260
+ case 3:
261
+ case "end":
262
+ return _context3.stop();
263
+ }
264
+ }, _callee3);
265
+ }));
266
+ return function (_x2, _x3) {
267
+ return _ref3.apply(this, arguments);
268
+ };
269
+ }())
270
+ }) : null);
271
+ };
272
+ export default DeviceConnectionsPanel;
@@ -0,0 +1,111 @@
1
+ .device-detail-drawer {
2
+ &__connections {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 16px;
6
+ min-height: 100%;
7
+ }
8
+
9
+ &__connections-header {
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: space-between;
13
+ gap: 12px;
14
+ }
15
+
16
+ &__connections-title {
17
+ display: inline-flex;
18
+ align-items: center;
19
+ gap: 8px;
20
+ font-size: 14px;
21
+ font-weight: 500;
22
+ color: rgba(0, 0, 0, 0.72);
23
+
24
+ .anticon {
25
+ color: rgba(0, 0, 0, 0.45);
26
+ }
27
+ }
28
+
29
+ &__connections-empty {
30
+ display: flex;
31
+ flex: 1;
32
+ align-items: center;
33
+ justify-content: center;
34
+ min-height: 260px;
35
+ border: 1px dashed #d9d9d9;
36
+ border-radius: 8px;
37
+ background: #fafafa;
38
+ }
39
+
40
+ &__connection-list {
41
+ display: flex;
42
+ flex-direction: column;
43
+ gap: 12px;
44
+ }
45
+
46
+ &__connection-item {
47
+ display: flex;
48
+ align-items: center;
49
+ gap: 12px;
50
+ padding: 12px 14px;
51
+ border: 1px solid #f0f0f0;
52
+ border-radius: 8px;
53
+ background: #fafafa;
54
+ transition: border-color 0.2s, box-shadow 0.2s;
55
+
56
+ &:hover {
57
+ border-color: #d9d9d9;
58
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
59
+ }
60
+ }
61
+
62
+ &__connection-icon {
63
+ display: inline-flex;
64
+ flex: 0 0 auto;
65
+ align-items: center;
66
+ justify-content: center;
67
+ width: 24px;
68
+ height: 24px;
69
+ color: #1677ff;
70
+ }
71
+
72
+ &__connection-main {
73
+ flex: 1;
74
+ min-width: 0;
75
+ }
76
+
77
+ &__connection-name {
78
+ font-size: 14px;
79
+ font-weight: 600;
80
+ line-height: 20px;
81
+ color: rgba(0, 0, 0, 0.88);
82
+ }
83
+
84
+ &__connection-meta {
85
+ display: flex;
86
+ flex-wrap: wrap;
87
+ align-items: center;
88
+ gap: 6px;
89
+ margin-top: 2px;
90
+ font-size: 12px;
91
+ line-height: 18px;
92
+ color: rgba(0, 0, 0, 0.55);
93
+ }
94
+
95
+ &__connection-tag {
96
+ display: inline-flex;
97
+ align-items: center;
98
+ height: 18px;
99
+ padding: 0 6px;
100
+ font-size: 11px;
101
+ line-height: 16px;
102
+ color: rgba(0, 0, 0, 0.72);
103
+ border: 1px solid #d9d9d9;
104
+ border-radius: 4px;
105
+ background: #fff;
106
+ }
107
+
108
+ &__connection-more {
109
+ flex: 0 0 auto;
110
+ }
111
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { DeviceRow } from '../../../types';
3
+ import './DeviceInfoPanel.less';
4
+ declare type GetText = (key: string) => string;
5
+ interface DeviceInfoPanelProps {
6
+ record: DeviceRow;
7
+ getText: GetText;
8
+ }
9
+ declare const DeviceInfoPanel: React.FC<DeviceInfoPanelProps>;
10
+ export default DeviceInfoPanel;
@@ -0,0 +1,211 @@
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, Empty } from 'antd';
9
+ import { Icon } from '@pisell/materials';
10
+ import classNames from 'classnames';
11
+ import LinkStatusTag from "../../shared/LinkStatusTag";
12
+ import OnlineStatus from "../../shared/OnlineStatus";
13
+ import "./DeviceInfoPanel.less";
14
+ var EMPTY_VALUE = '-';
15
+ var BYTE_PER_GB = 1024 * 1024 * 1024;
16
+ var REPORT_GROUPS = [{
17
+ key: 'software',
18
+ fields: [{
19
+ key: 'name'
20
+ }, {
21
+ key: 'version'
22
+ }]
23
+ }, {
24
+ key: 'battery',
25
+ fields: [{
26
+ key: 'level',
27
+ value: function value(data, getText) {
28
+ return renderBatteryValue(data, getText);
29
+ }
30
+ }]
31
+ }, {
32
+ key: 'network',
33
+ fields: [{
34
+ key: 'type'
35
+ }, {
36
+ key: 'local_ip'
37
+ }, {
38
+ key: 'gateway'
39
+ }, {
40
+ key: 'subnet_mask'
41
+ }, {
42
+ key: 'ssid'
43
+ }]
44
+ }, {
45
+ key: 'hardware',
46
+ fields: [{
47
+ key: 'model'
48
+ }, {
49
+ key: 'os_version'
50
+ }]
51
+ }, {
52
+ key: 'storage',
53
+ fields: [{
54
+ key: 'used',
55
+ value: function value(data) {
56
+ return formatStorageValue(data.used);
57
+ }
58
+ }, {
59
+ key: 'total',
60
+ value: function value(data) {
61
+ return formatStorageValue(data.total);
62
+ }
63
+ }]
64
+ }];
65
+ var isPlainObject = function isPlainObject(value) {
66
+ return Object.prototype.toString.call(value) === '[object Object]';
67
+ };
68
+ var getReportText = function getReportText(getText, key) {
69
+ return getText("pisell2.saas.device-planning.detail.report.".concat(key));
70
+ };
71
+ var formatReportValue = function formatReportValue(value, getText) {
72
+ if (value === null || value === undefined || value === '') {
73
+ return EMPTY_VALUE;
74
+ }
75
+ if (typeof value === 'boolean') {
76
+ return getText("pisell2.saas.device-planning.detail.".concat(value ? 'yes' : 'no'));
77
+ }
78
+ if (Array.isArray(value) || isPlainObject(value)) {
79
+ return /*#__PURE__*/React.createElement("span", {
80
+ className: "device-detail-drawer__json-value"
81
+ }, JSON.stringify(value));
82
+ }
83
+ return String(value);
84
+ };
85
+ var formatStorageValue = function formatStorageValue(value) {
86
+ var byteValue = typeof value === 'number' || typeof value === 'string' ? Number(value) : Number.NaN;
87
+ if (!Number.isFinite(byteValue)) {
88
+ return EMPTY_VALUE;
89
+ }
90
+ var gbValue = byteValue / BYTE_PER_GB;
91
+ var text = gbValue >= 10 ? String(Math.round(gbValue)) : gbValue.toFixed(2).replace(/\.?0+$/, '');
92
+ return "".concat(text, " GB");
93
+ };
94
+ var formatLastSeen = function formatLastSeen(value) {
95
+ return typeof value === 'string' && value.trim() ? value : EMPTY_VALUE;
96
+ };
97
+ var renderBatteryValue = function renderBatteryValue(data, getText) {
98
+ var rawLevel = typeof data.level === 'number' || typeof data.level === 'string' ? Number(data.level) : Number.NaN;
99
+ var hasLevel = Number.isFinite(rawLevel);
100
+ var levelValue = hasLevel ? Math.max(0, Math.min(rawLevel, 100)) : 0;
101
+ var level = hasLevel ? "".concat(rawLevel, "%") : EMPTY_VALUE;
102
+ var charging = (data === null || data === void 0 ? void 0 : data.charging) === true;
103
+ return /*#__PURE__*/React.createElement("span", {
104
+ className: "device-detail-drawer__battery-value"
105
+ }, /*#__PURE__*/React.createElement("span", {
106
+ className: classNames('device-detail-drawer__battery-icon', {
107
+ 'is-charging': charging
108
+ })
109
+ }, /*#__PURE__*/React.createElement("span", {
110
+ className: "device-detail-drawer__battery-fill",
111
+ style: {
112
+ width: "".concat(levelValue, "%")
113
+ }
114
+ }), charging ? /*#__PURE__*/React.createElement("span", {
115
+ className: "device-detail-drawer__battery-bolt"
116
+ }) : null), /*#__PURE__*/React.createElement("span", null, level), /*#__PURE__*/React.createElement("span", {
117
+ className: "device-detail-drawer__battery-status"
118
+ }, getReportText(getText, charging ? 'charging' : 'not-charging')));
119
+ };
120
+ var DeviceInfoPanel = function DeviceInfoPanel(_ref) {
121
+ var record = _ref.record,
122
+ getText = _ref.getText;
123
+ var device = record._raw;
124
+ var showAdvancedInfo = device.type_kind === 'smart';
125
+ var lastSeen = formatLastSeen(device.last_seen);
126
+ var reportGroups = useMemo(function () {
127
+ if (!isPlainObject(device.data)) return [];
128
+ return REPORT_GROUPS.reduce(function (list, group) {
129
+ var _device$data;
130
+ var data = (_device$data = device.data) === null || _device$data === void 0 ? void 0 : _device$data[group.key];
131
+ if (isPlainObject(data)) {
132
+ list.push(_objectSpread(_objectSpread({}, group), {}, {
133
+ data: data
134
+ }));
135
+ }
136
+ return list;
137
+ }, []);
138
+ }, [device.data]);
139
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
140
+ size: "small",
141
+ title: getText('pisell2.saas.device-planning.detail.basic-info'),
142
+ className: "device-detail-drawer__card"
143
+ }, /*#__PURE__*/React.createElement("div", {
144
+ className: "device-detail-drawer__info-list"
145
+ }, /*#__PURE__*/React.createElement("div", {
146
+ className: "device-detail-drawer__info-row"
147
+ }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.name')), /*#__PURE__*/React.createElement("strong", null, record.name)), /*#__PURE__*/React.createElement("div", {
148
+ className: "device-detail-drawer__info-row"
149
+ }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.type')), /*#__PURE__*/React.createElement("strong", null, record.typeName)), /*#__PURE__*/React.createElement("div", {
150
+ className: "device-detail-drawer__info-row"
151
+ }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.model')), /*#__PURE__*/React.createElement("strong", null, record.modelName)), showAdvancedInfo ? /*#__PURE__*/React.createElement("div", {
152
+ className: "device-detail-drawer__info-two-row"
153
+ }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.profile')), /*#__PURE__*/React.createElement("div", {
154
+ className: "device-detail-drawer__profile-card"
155
+ }, /*#__PURE__*/React.createElement(Icon, {
156
+ type: "FileTextOutlined"
157
+ }), record.profileName)) : null)), showAdvancedInfo ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
158
+ size: "small",
159
+ title: getText('pisell2.saas.device-planning.detail.status'),
160
+ className: "device-detail-drawer__card"
161
+ }, /*#__PURE__*/React.createElement("div", {
162
+ className: "device-detail-drawer__info-list"
163
+ }, /*#__PURE__*/React.createElement("div", {
164
+ className: "device-detail-drawer__info-row"
165
+ }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.link-status')), /*#__PURE__*/React.createElement(LinkStatusTag, {
166
+ value: record.link,
167
+ getText: getText,
168
+ style: {
169
+ marginRight: 0
170
+ }
171
+ })), /*#__PURE__*/React.createElement("div", {
172
+ className: "device-detail-drawer__info-row"
173
+ }, /*#__PURE__*/React.createElement("span", null, getText('pisell2.saas.device-planning.detail.online-status')), /*#__PURE__*/React.createElement(OnlineStatus, {
174
+ value: record.status,
175
+ getText: getText,
176
+ className: "device-detail-drawer__online-status",
177
+ dotClassName: "device-detail-drawer__status-dot"
178
+ })))), /*#__PURE__*/React.createElement(Card, {
179
+ size: "small",
180
+ title: getText('pisell2.saas.device-planning.detail.report-info'),
181
+ extra: /*#__PURE__*/React.createElement("span", {
182
+ className: "device-detail-drawer__last-seen"
183
+ }, getText('pisell2.saas.device-planning.detail.last-seen'), lastSeen),
184
+ className: "device-detail-drawer__card"
185
+ }, reportGroups.length > 0 ? /*#__PURE__*/React.createElement("div", {
186
+ className: "device-detail-drawer__report-list"
187
+ }, reportGroups.map(function (group) {
188
+ return /*#__PURE__*/React.createElement(Card, {
189
+ key: group.key,
190
+ size: "small",
191
+ type: "inner",
192
+ title: getReportText(getText, "group.".concat(group.key)),
193
+ className: "device-detail-drawer__report-card"
194
+ }, /*#__PURE__*/React.createElement("div", {
195
+ className: "device-detail-drawer__report-rows"
196
+ }, group.fields.map(function (field) {
197
+ return /*#__PURE__*/React.createElement("div", {
198
+ key: field.key,
199
+ className: "device-detail-drawer__report-row"
200
+ }, /*#__PURE__*/React.createElement("span", {
201
+ className: "device-detail-drawer__report-label"
202
+ }, getReportText(getText, "field.".concat(field.key))), /*#__PURE__*/React.createElement("span", {
203
+ className: "device-detail-drawer__report-value"
204
+ }, field.value ? field.value(group.data, getText) : formatReportValue(group.data[field.key], getText)));
205
+ })));
206
+ })) : /*#__PURE__*/React.createElement(Empty, {
207
+ image: Empty.PRESENTED_IMAGE_SIMPLE,
208
+ description: getText('pisell2.saas.device-planning.detail.no-report-info')
209
+ }))) : null);
210
+ };
211
+ export default DeviceInfoPanel;