@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
@@ -121,38 +121,37 @@ export var getDevices = /*#__PURE__*/function () {
121
121
  return _ref5.apply(this, arguments);
122
122
  };
123
123
  }();
124
- export var getDeviceTypes = /*#__PURE__*/function () {
125
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
124
+ export var getDeviceDetail = /*#__PURE__*/function () {
125
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(id) {
126
126
  var response;
127
127
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
128
128
  while (1) switch (_context6.prev = _context6.next) {
129
129
  case 0:
130
130
  _context6.next = 2;
131
- return request.getRequest().get('/tenant/device/type/all', {
132
- with: params.with || ['activeModels', 'activeModels.activeProfiles'],
133
- kind: params.kind
131
+ return request.getRequest().get("/tenant/device/".concat(id), {
132
+ with: ['type', 'model', 'model.activeProfiles', 'profile']
134
133
  }, CONFIG);
135
134
  case 2:
136
135
  response = _context6.sent;
137
- return _context6.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || []);
136
+ return _context6.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || null);
138
137
  case 4:
139
138
  case "end":
140
139
  return _context6.stop();
141
140
  }
142
141
  }, _callee6);
143
142
  }));
144
- return function getDeviceTypes(_x6) {
143
+ return function getDeviceDetail(_x6) {
145
144
  return _ref6.apply(this, arguments);
146
145
  };
147
146
  }();
148
- export var createDevice = /*#__PURE__*/function () {
147
+ export var createDeviceConnection = /*#__PURE__*/function () {
149
148
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(payload) {
150
149
  var response;
151
150
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
152
151
  while (1) switch (_context7.prev = _context7.next) {
153
152
  case 0:
154
153
  _context7.next = 2;
155
- return request.getRequest().post('/tenant/device', payload, CONFIG);
154
+ return request.getRequest().post('/tenant/device/connection', payload, CONFIG);
156
155
  case 2:
157
156
  response = _context7.sent;
158
157
  return _context7.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || null);
@@ -162,36 +161,192 @@ export var createDevice = /*#__PURE__*/function () {
162
161
  }
163
162
  }, _callee7);
164
163
  }));
165
- return function createDevice(_x7) {
164
+ return function createDeviceConnection(_x7) {
166
165
  return _ref7.apply(this, arguments);
167
166
  };
168
167
  }();
169
- export var sortDevices = function sortDevices(ids) {
170
- return request.getRequest().post('/tenant/device/sort', {
171
- ids: ids
172
- }, CONFIG);
173
- };
174
- export var updateDevice = /*#__PURE__*/function () {
175
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id, payload) {
168
+ export var getDeviceConnections = /*#__PURE__*/function () {
169
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
176
170
  var response;
177
171
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
178
172
  while (1) switch (_context8.prev = _context8.next) {
179
173
  case 0:
180
174
  _context8.next = 2;
181
- return request.getRequest().put("/tenant/device/".concat(id), payload, CONFIG);
175
+ return request.getRequest().get('/tenant/device/connection', {
176
+ with: params.with || ['targetDevice.type', 'sourceDevice.type', 'profiles'],
177
+ type: params.type,
178
+ source_device_id: params.source_device_id,
179
+ target_device_id: params.target_device_id
180
+ }, CONFIG);
182
181
  case 2:
183
182
  response = _context8.sent;
184
- return _context8.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || null);
183
+ return _context8.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || []);
185
184
  case 4:
186
185
  case "end":
187
186
  return _context8.stop();
188
187
  }
189
188
  }, _callee8);
190
189
  }));
191
- return function updateDevice(_x8, _x9) {
190
+ return function getDeviceConnections(_x8) {
192
191
  return _ref8.apply(this, arguments);
193
192
  };
194
193
  }();
194
+ export var getDeviceConnectionDetail = /*#__PURE__*/function () {
195
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(id) {
196
+ var response;
197
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
198
+ while (1) switch (_context9.prev = _context9.next) {
199
+ case 0:
200
+ _context9.next = 2;
201
+ return request.getRequest().get("/tenant/device/connection/".concat(id), {
202
+ with: ['targetDevice.type', 'sourceDevice.type', 'profiles']
203
+ }, CONFIG);
204
+ case 2:
205
+ response = _context9.sent;
206
+ return _context9.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || null);
207
+ case 4:
208
+ case "end":
209
+ return _context9.stop();
210
+ }
211
+ }, _callee9);
212
+ }));
213
+ return function getDeviceConnectionDetail(_x9) {
214
+ return _ref9.apply(this, arguments);
215
+ };
216
+ }();
217
+ export var updateDeviceConnection = /*#__PURE__*/function () {
218
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(id, payload) {
219
+ var response;
220
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
221
+ while (1) switch (_context10.prev = _context10.next) {
222
+ case 0:
223
+ _context10.next = 2;
224
+ return request.getRequest().put("/tenant/device/connection/".concat(id), payload, CONFIG);
225
+ case 2:
226
+ response = _context10.sent;
227
+ return _context10.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || null);
228
+ case 4:
229
+ case "end":
230
+ return _context10.stop();
231
+ }
232
+ }, _callee10);
233
+ }));
234
+ return function updateDeviceConnection(_x10, _x11) {
235
+ return _ref10.apply(this, arguments);
236
+ };
237
+ }();
238
+ export var deleteDeviceConnection = function deleteDeviceConnection(id) {
239
+ return request.getRequest().remove("/tenant/device/connection/".concat(id), {}, CONFIG);
240
+ };
241
+ export var getDeviceTypes = /*#__PURE__*/function () {
242
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
243
+ var response;
244
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
245
+ while (1) switch (_context11.prev = _context11.next) {
246
+ case 0:
247
+ _context11.next = 2;
248
+ return request.getRequest().get('/tenant/device/type/all', {
249
+ with: params.with || ['activeModels', 'activeModels.activeProfiles', 'activeModels.brand'],
250
+ kind: params.kind
251
+ }, CONFIG);
252
+ case 2:
253
+ response = _context11.sent;
254
+ return _context11.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || []);
255
+ case 4:
256
+ case "end":
257
+ return _context11.stop();
258
+ }
259
+ }, _callee11);
260
+ }));
261
+ return function getDeviceTypes(_x12) {
262
+ return _ref11.apply(this, arguments);
263
+ };
264
+ }();
265
+ export var getDeviceBrands = /*#__PURE__*/function () {
266
+ var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
267
+ var response;
268
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
269
+ while (1) switch (_context12.prev = _context12.next) {
270
+ case 0:
271
+ _context12.next = 2;
272
+ return request.getRequest().get('/api/device_brand:list', {
273
+ page: 1,
274
+ pageSize: 20,
275
+ filter: {
276
+ $and: [{
277
+ $and: {
278
+ deleted_at: {
279
+ $is: null
280
+ }
281
+ }
282
+ }]
283
+ }
284
+ }, {
285
+ isNocobase: true,
286
+ headers: {
287
+ 'x-data-source': 'pisell2'
288
+ }
289
+ });
290
+ case 2:
291
+ response = _context12.sent;
292
+ return _context12.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || []);
293
+ case 4:
294
+ case "end":
295
+ return _context12.stop();
296
+ }
297
+ }, _callee12);
298
+ }));
299
+ return function getDeviceBrands() {
300
+ return _ref12.apply(this, arguments);
301
+ };
302
+ }();
303
+ export var createDevice = /*#__PURE__*/function () {
304
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(payload) {
305
+ var response;
306
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
307
+ while (1) switch (_context13.prev = _context13.next) {
308
+ case 0:
309
+ _context13.next = 2;
310
+ return request.getRequest().post('/tenant/device', payload, CONFIG);
311
+ case 2:
312
+ response = _context13.sent;
313
+ return _context13.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || null);
314
+ case 4:
315
+ case "end":
316
+ return _context13.stop();
317
+ }
318
+ }, _callee13);
319
+ }));
320
+ return function createDevice(_x13) {
321
+ return _ref13.apply(this, arguments);
322
+ };
323
+ }();
324
+ export var sortDevices = function sortDevices(ids) {
325
+ return request.getRequest().post('/tenant/device/sort', {
326
+ ids: ids
327
+ }, CONFIG);
328
+ };
329
+ export var updateDevice = /*#__PURE__*/function () {
330
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(id, payload) {
331
+ var response;
332
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
333
+ while (1) switch (_context14.prev = _context14.next) {
334
+ case 0:
335
+ _context14.next = 2;
336
+ return request.getRequest().put("/tenant/device/".concat(id), payload, CONFIG);
337
+ case 2:
338
+ response = _context14.sent;
339
+ return _context14.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || null);
340
+ case 4:
341
+ case "end":
342
+ return _context14.stop();
343
+ }
344
+ }, _callee14);
345
+ }));
346
+ return function updateDevice(_x14, _x15) {
347
+ return _ref14.apply(this, arguments);
348
+ };
349
+ }();
195
350
  export var deleteDevice = function deleteDevice(id) {
196
351
  return request.getRequest().remove("/tenant/device/".concat(id), {}, CONFIG);
197
352
  };
@@ -2,6 +2,7 @@ import type React from 'react';
2
2
  export declare type DeviceKind = 'smart' | 'dumb' | 'integrated';
3
3
  export declare type DeviceLinkStatus = 'linked' | 'unlinked' | string;
4
4
  export declare type DeviceOnlineStatus = 'online' | 'offline' | 'unknown' | string;
5
+ /** 多语言字段,后端可能返回字符串或语言字典。 */
5
6
  export declare type I18nText = string | {
6
7
  original?: string;
7
8
  'zh-CN'?: string;
@@ -19,19 +20,37 @@ export declare type LangDict = {
19
20
  ja?: string;
20
21
  pt?: string;
21
22
  };
23
+ /** SaasDevicePlanning 低代码物料的对外 props。 */
22
24
  export interface SaasDevicePlanningProps {
23
25
  className?: string;
24
26
  style?: React.CSSProperties;
25
27
  }
28
+ /** 工作区,设备规划左侧列表的基本单元。 */
26
29
  export interface WorkAreaItem {
27
30
  id: number;
28
31
  tenant_id?: number;
29
32
  name: I18nText;
30
33
  description?: I18nText;
31
34
  sort: number;
35
+ smart_devices_count?: number;
36
+ dumb_devices_count?: number;
37
+ integrated_devices_count?: number;
32
38
  created_at?: string;
33
39
  updated_at?: string;
34
40
  }
41
+ /** 设备品牌,主要用于外设型号筛选。 */
42
+ export interface DeviceBrandItem {
43
+ id: number;
44
+ code: string;
45
+ name: I18nText;
46
+ description?: I18nText;
47
+ website?: string;
48
+ status?: string;
49
+ created_at?: string;
50
+ updated_at?: string;
51
+ deleted_at?: string | null;
52
+ }
53
+ /** 设备类型,例如 POS、Receipt Printer;一个类型下可包含多个型号。 */
35
54
  export interface DeviceTypeItem {
36
55
  id: number;
37
56
  kind: DeviceKind;
@@ -43,6 +62,7 @@ export interface DeviceTypeItem {
43
62
  sort?: number;
44
63
  active_models?: DeviceModelItem[];
45
64
  }
65
+ /** 设备型号,创建设备和连接新增外设时都以 model_code 为核心。 */
46
66
  export interface DeviceModelItem {
47
67
  id: number;
48
68
  brand_code?: string;
@@ -56,12 +76,15 @@ export interface DeviceModelItem {
56
76
  required?: boolean;
57
77
  tabs?: unknown[];
58
78
  };
79
+ connection_types?: string[];
59
80
  [key: string]: unknown;
60
81
  } | null;
61
82
  status?: string;
62
83
  sort?: number;
63
84
  active_profiles?: DeviceProfileItem[];
85
+ brand?: DeviceBrandItem;
64
86
  }
87
+ /** 设备配置方案,智能设备和外设连接时可绑定多个 profile。 */
65
88
  export interface DeviceProfileItem {
66
89
  id: number;
67
90
  model_code?: string;
@@ -71,6 +94,7 @@ export interface DeviceProfileItem {
71
94
  setting?: Record<string, unknown> | null;
72
95
  status?: string;
73
96
  }
97
+ /** 后端设备实体,smart/dumb/integrated 三类设备共用。 */
74
98
  export interface DeviceItem {
75
99
  id: number;
76
100
  tenant_id?: number;
@@ -94,27 +118,85 @@ export interface DeviceItem {
94
118
  profile?: DeviceProfileItem | null;
95
119
  workarea?: WorkAreaItem;
96
120
  }
121
+ /** 设备连接配置,网络连接时会带 connection_method 和 connection_ip。 */
122
+ export interface DeviceConnectionConfig {
123
+ connection_ip?: string;
124
+ connection_type?: string;
125
+ connection_method?: string;
126
+ [key: string]: unknown;
127
+ }
128
+ /** 设备连接业务类型;当前接口仅启用哑设备连接。 */
129
+ export declare type DeviceConnectionType = 'dumb';
130
+ /** 智能设备与外设的连接关系。 */
131
+ export interface DeviceConnectionItem {
132
+ id: number;
133
+ tenant_id?: number;
134
+ type?: DeviceConnectionType;
135
+ source_device_id: number;
136
+ target_device_id: number;
137
+ config?: DeviceConnectionConfig | null;
138
+ profile_ids?: number[];
139
+ status?: string | null;
140
+ created_at?: string;
141
+ updated_at?: string;
142
+ source_device?: DeviceItem | null;
143
+ target_device?: DeviceItem | null;
144
+ profiles?: DeviceProfileItem[];
145
+ }
146
+ /** 设备列表查询参数。 */
97
147
  export interface ListDeviceParams {
98
148
  with?: string[];
99
149
  workarea_id?: number;
100
150
  type_kind?: DeviceKind;
101
151
  profile_id?: number;
102
152
  }
153
+ /** 设备连接列表查询参数。source 和 target 通过不同 id 字段过滤。 */
154
+ export interface ListDeviceConnectionParams {
155
+ type?: DeviceConnectionType;
156
+ source_device_id?: number;
157
+ target_device_id?: number;
158
+ with?: string[];
159
+ }
160
+ /** 保存工作区的表单 payload。 */
103
161
  export interface SaveWorkAreaPayload {
104
162
  name: LangDict;
105
163
  description: LangDict;
106
164
  }
165
+ /** 单独创建设备的 payload,由 AddDeviceModal 提交。 */
107
166
  export interface CreateDevicePayload {
108
167
  workarea_id: number;
109
168
  model_code: string;
110
169
  profile_id: number | null;
111
170
  name: LangDict;
112
171
  }
172
+ /** 连接流程里“新增外设并连接”时嵌套创建的目标设备 payload。 */
173
+ export interface CreateConnectionTargetDevicePayload {
174
+ workarea_id: number;
175
+ model_code: string;
176
+ name: LangDict;
177
+ }
178
+ /** 创建连接的 payload,支持连接已有外设或新增外设后连接。 */
179
+ export interface CreateDeviceConnectionPayload {
180
+ type: DeviceConnectionType;
181
+ source_device_id: number;
182
+ target_device_id?: number;
183
+ target_device?: CreateConnectionTargetDevicePayload;
184
+ target_device_action: 'existing' | 'new';
185
+ config: DeviceConnectionConfig;
186
+ profile_ids: number[];
187
+ }
188
+ /** 更新连接配置的 payload,仅更新 config 和 profile_ids。 */
189
+ export interface UpdateDeviceConnectionPayload {
190
+ config: DeviceConnectionConfig;
191
+ profile_ids: number[];
192
+ }
193
+ /** 编辑设备时允许更新工作区、名称和 smart profile。 */
113
194
  export interface UpdateDevicePayload {
114
195
  workarea_id: number;
115
196
  profile_id: number | null;
116
197
  name: LangDict;
117
198
  }
199
+ /** 表格/详情抽屉使用的展示模型,保留 _raw 以便提交时读取原始字段。 */
118
200
  export interface DeviceRow {
119
201
  id: number;
120
202
  name: string;
@@ -127,6 +209,7 @@ export interface DeviceRow {
127
209
  modelCode: string;
128
210
  _raw: DeviceItem;
129
211
  }
212
+ /** 删除工作区前用于判断是否阻断删除的设备数量。 */
130
213
  export interface DeleteWorkAreaCounts {
131
214
  smart: number;
132
215
  dumb: number;
@@ -134,5 +217,7 @@ export interface DeleteWorkAreaCounts {
134
217
  }
135
218
  export declare const EMPTY_I18N: LangDict;
136
219
  export declare const DEVICE_KIND_OPTIONS: DeviceKind[];
220
+ /** 统一把后端多语言值转成可编辑表单需要的语言字典。 */
137
221
  export declare const toLangDict: (val?: I18nText) => LangDict;
222
+ /** 校验 BaseTranslation 字段是否至少填写 original 或任一语言值。 */
138
223
  export declare const validateI18nRequired: (message: string) => (_rule: unknown, value: I18nText | undefined) => Promise<void>;
@@ -10,6 +10,48 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  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; }
11
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
12
  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); }
13
+ /** 多语言字段,后端可能返回字符串或语言字典。 */
14
+
15
+ /** SaasDevicePlanning 低代码物料的对外 props。 */
16
+
17
+ /** 工作区,设备规划左侧列表的基本单元。 */
18
+
19
+ /** 设备品牌,主要用于外设型号筛选。 */
20
+
21
+ /** 设备类型,例如 POS、Receipt Printer;一个类型下可包含多个型号。 */
22
+
23
+ /** 设备型号,创建设备和连接新增外设时都以 model_code 为核心。 */
24
+
25
+ /** 设备配置方案,智能设备和外设连接时可绑定多个 profile。 */
26
+
27
+ /** 后端设备实体,smart/dumb/integrated 三类设备共用。 */
28
+
29
+ /** 设备连接配置,网络连接时会带 connection_method 和 connection_ip。 */
30
+
31
+ /** 设备连接业务类型;当前接口仅启用哑设备连接。 */
32
+
33
+ /** 智能设备与外设的连接关系。 */
34
+
35
+ /** 设备列表查询参数。 */
36
+
37
+ /** 设备连接列表查询参数。source 和 target 通过不同 id 字段过滤。 */
38
+
39
+ /** 保存工作区的表单 payload。 */
40
+
41
+ /** 单独创建设备的 payload,由 AddDeviceModal 提交。 */
42
+
43
+ /** 连接流程里“新增外设并连接”时嵌套创建的目标设备 payload。 */
44
+
45
+ /** 创建连接的 payload,支持连接已有外设或新增外设后连接。 */
46
+
47
+ /** 更新连接配置的 payload,仅更新 config 和 profile_ids。 */
48
+
49
+ /** 编辑设备时允许更新工作区、名称和 smart profile。 */
50
+
51
+ /** 表格/详情抽屉使用的展示模型,保留 _raw 以便提交时读取原始字段。 */
52
+
53
+ /** 删除工作区前用于判断是否阻断删除的设备数量。 */
54
+
13
55
  export var EMPTY_I18N = {
14
56
  original: '',
15
57
  en: '',
@@ -18,10 +60,9 @@ export var EMPTY_I18N = {
18
60
  ja: '',
19
61
  pt: ''
20
62
  };
63
+ export var DEVICE_KIND_OPTIONS = ['smart', 'dumb', 'integrated'];
21
64
 
22
- // export const DEVICE_KIND_OPTIONS: DeviceKind[] = ['smart', 'dumb', 'integrated'];
23
- // TODO: 一期只需要智能设备,后续再开放其他设备类型
24
- export var DEVICE_KIND_OPTIONS = ['smart'];
65
+ /** 统一把后端多语言值转成可编辑表单需要的语言字典。 */
25
66
  export var toLangDict = function toLangDict(val) {
26
67
  if (!val) return _objectSpread({}, EMPTY_I18N);
27
68
  if (typeof val === 'string') {
@@ -32,6 +73,8 @@ export var toLangDict = function toLangDict(val) {
32
73
  }
33
74
  return _objectSpread(_objectSpread({}, EMPTY_I18N), val);
34
75
  };
76
+
77
+ /** 校验 BaseTranslation 字段是否至少填写 original 或任一语言值。 */
35
78
  export var validateI18nRequired = function validateI18nRequired(message) {
36
79
  return function (_rule, value) {
37
80
  if (!value) return Promise.reject(new Error(message));
@@ -0,0 +1,27 @@
1
+ import type { DeleteWorkAreaCounts, DeviceBrandItem, DeviceItem, DeviceKind, DeviceModelItem, DeviceRow, DeviceTypeItem, I18nText } from './types';
2
+ export declare const DEVICE_ICON_COLOR: Record<DeviceKind, string>;
3
+ export declare const CONNECTION_TYPE_OPTIONS: {
4
+ label: string;
5
+ value: string;
6
+ }[];
7
+ export declare const BRAND_OPTION_SEPARATOR = "__";
8
+ /** 把品牌 id 和 code 编码成 Select value,避免 code 中特殊字符与 id 冲突。 */
9
+ export declare const getBrandOptionValue: (brand: DeviceBrandItem) => string;
10
+ /** 从品牌 Select value 中还原 brand_code。 */
11
+ export declare const getBrandCodeFromOptionValue: (value?: string) => string | undefined;
12
+ /** 读取型号支持的连接方式,用于外设型号筛选和连接配置展示。 */
13
+ export declare const getModelConnectionTypes: (model: DeviceModelItem) => string[];
14
+ /** 把连接方式 code 转成 UI 展示文案。 */
15
+ export declare const getConnectionTypeLabel: (value?: string) => string;
16
+ /** 判断当前型号是否必须选择 profile。 */
17
+ export declare const isProfileRequired: (model?: DeviceModelItem) => boolean;
18
+ /** 判断多语言表单值是否至少有一个非空语言值。 */
19
+ export declare const hasI18nValue: (value?: Record<string, unknown>) => boolean;
20
+ /** 将后端按类型返回的 active_models 展平成去重后的型号列表。 */
21
+ export declare const flattenDeviceModels: (types: DeviceTypeItem[]) => DeviceModelItem[];
22
+ /** 把后端设备实体转换成列表和详情抽屉共用的展示模型。 */
23
+ export declare const createDeviceRow: (item: DeviceItem, translation: (val?: I18nText) => string, profileNameMap?: Map<number, string>) => DeviceRow;
24
+ /** 兼容工作区详情接口可能返回 data 数组或单对象的两种结构。 */
25
+ export declare const resolveWorkAreaDetail: (response: unknown) => any;
26
+ /** 从工作区详情响应中提取三类设备数量,用于删除前阻断判断。 */
27
+ export declare const getDeleteWorkAreaCounts: (response: unknown) => DeleteWorkAreaCounts;
@@ -0,0 +1,125 @@
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
+ export var DEVICE_ICON_COLOR = {
8
+ smart: '#1677ff',
9
+ dumb: '#faad14',
10
+ integrated: '#389e0d'
11
+ };
12
+ export var CONNECTION_TYPE_OPTIONS = [{
13
+ label: 'USB',
14
+ value: 'usb'
15
+ }, {
16
+ label: 'Ethernet',
17
+ value: 'ethernet'
18
+ }, {
19
+ label: 'WiFi',
20
+ value: 'wifi'
21
+ }, {
22
+ label: 'Bluetooth',
23
+ value: 'bluetooth'
24
+ }, {
25
+ label: 'Serial',
26
+ value: 'serial'
27
+ }];
28
+ export var BRAND_OPTION_SEPARATOR = '__';
29
+
30
+ /** 把品牌 id 和 code 编码成 Select value,避免 code 中特殊字符与 id 冲突。 */
31
+ export var getBrandOptionValue = function getBrandOptionValue(brand) {
32
+ return "".concat(brand.id).concat(BRAND_OPTION_SEPARATOR).concat(brand.code);
33
+ };
34
+
35
+ /** 从品牌 Select value 中还原 brand_code。 */
36
+ export var getBrandCodeFromOptionValue = function getBrandCodeFromOptionValue(value) {
37
+ return value === null || value === void 0 ? void 0 : value.split(BRAND_OPTION_SEPARATOR).slice(1).join(BRAND_OPTION_SEPARATOR);
38
+ };
39
+
40
+ /** 读取型号支持的连接方式,用于外设型号筛选和连接配置展示。 */
41
+ export var getModelConnectionTypes = function getModelConnectionTypes(model) {
42
+ var _model$data;
43
+ var connections = (_model$data = model.data) === null || _model$data === void 0 ? void 0 : _model$data.connection_types;
44
+ return Array.isArray(connections) ? connections.map(function (item) {
45
+ return String(item || '').trim();
46
+ }).filter(Boolean) : [];
47
+ };
48
+
49
+ /** 把连接方式 code 转成 UI 展示文案。 */
50
+ export var getConnectionTypeLabel = function getConnectionTypeLabel(value) {
51
+ var _CONNECTION_TYPE_OPTI;
52
+ if (!value) return '-';
53
+ var normalizedValue = value.toLowerCase().trim();
54
+ return ((_CONNECTION_TYPE_OPTI = CONNECTION_TYPE_OPTIONS.find(function (option) {
55
+ return option.value === normalizedValue;
56
+ })) === null || _CONNECTION_TYPE_OPTI === void 0 ? void 0 : _CONNECTION_TYPE_OPTI.label) || value;
57
+ };
58
+
59
+ /** 判断当前型号是否必须选择 profile。 */
60
+ export var isProfileRequired = function isProfileRequired(model) {
61
+ var _model$data2;
62
+ return Boolean(model === null || model === void 0 || (_model$data2 = model.data) === null || _model$data2 === void 0 || (_model$data2 = _model$data2.profile_structure) === null || _model$data2 === void 0 ? void 0 : _model$data2.required);
63
+ };
64
+
65
+ /** 判断多语言表单值是否至少有一个非空语言值。 */
66
+ export var hasI18nValue = function hasI18nValue(value) {
67
+ if (!value) return false;
68
+ return Object.values(value).some(function (item) {
69
+ return String(item || '').trim();
70
+ });
71
+ };
72
+
73
+ /** 将后端按类型返回的 active_models 展平成去重后的型号列表。 */
74
+ export var flattenDeviceModels = function flattenDeviceModels(types) {
75
+ var modelMap = new Map();
76
+ types.forEach(function (type) {
77
+ (type.active_models || []).forEach(function (model) {
78
+ if (!modelMap.has(model.code)) {
79
+ modelMap.set(model.code, _objectSpread(_objectSpread({}, model), {}, {
80
+ type: model.type || type
81
+ }));
82
+ }
83
+ });
84
+ });
85
+ return Array.from(modelMap.values());
86
+ };
87
+
88
+ /** 把后端设备实体转换成列表和详情抽屉共用的展示模型。 */
89
+ export var createDeviceRow = function createDeviceRow(item, translation, profileNameMap) {
90
+ var _item$type, _item$model, _item$profile;
91
+ var name = translation(item.name);
92
+ var typeName = translation((_item$type = item.type) === null || _item$type === void 0 ? void 0 : _item$type.name) || item.type_code;
93
+ var modelName = translation((_item$model = item.model) === null || _item$model === void 0 ? void 0 : _item$model.name) || item.model_code;
94
+ var link = item.link || 'unlinked';
95
+ var profileName = translation((_item$profile = item.profile) === null || _item$profile === void 0 ? void 0 : _item$profile.name) || (item.profile_id ? profileNameMap === null || profileNameMap === void 0 ? void 0 : profileNameMap.get(item.profile_id) : '') || (item.profile_id ? String(item.profile_id) : '-');
96
+ return {
97
+ id: item.id,
98
+ name: name,
99
+ typeName: typeName,
100
+ modelName: modelName,
101
+ profileName: profileName,
102
+ link: link,
103
+ status: link === 'linked' ? item.status || 'offline' : 'unknown',
104
+ typeCode: item.type_code,
105
+ modelCode: item.model_code,
106
+ _raw: item
107
+ };
108
+ };
109
+
110
+ /** 兼容工作区详情接口可能返回 data 数组或单对象的两种结构。 */
111
+ export var resolveWorkAreaDetail = function resolveWorkAreaDetail(response) {
112
+ var data = response === null || response === void 0 ? void 0 : response.data;
113
+ if (Array.isArray(data)) return data[0];
114
+ return data || response;
115
+ };
116
+
117
+ /** 从工作区详情响应中提取三类设备数量,用于删除前阻断判断。 */
118
+ export var getDeleteWorkAreaCounts = function getDeleteWorkAreaCounts(response) {
119
+ var workArea = resolveWorkAreaDetail(response);
120
+ return {
121
+ smart: (workArea === null || workArea === void 0 ? void 0 : workArea.smart_devices_count) || 0,
122
+ dumb: (workArea === null || workArea === void 0 ? void 0 : workArea.dumb_devices_count) || 0,
123
+ integrated: (workArea === null || workArea === void 0 ? void 0 : workArea.integrated_devices_count) || 0
124
+ };
125
+ };
@@ -0,0 +1,3 @@
1
+ import DevicePlanning from './devicePlanning';
2
+ import DeviceProfile from './deviceProfile';
3
+ export { DevicePlanning, DeviceProfile };
@@ -0,0 +1,3 @@
1
+ import DevicePlanning from "./devicePlanning";
2
+ import DeviceProfile from "./deviceProfile";
3
+ export { DevicePlanning, DeviceProfile };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../index.less';
2
3
  declare const VertifyEmail: (props: {
3
4
  email: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ErrorTip: ({ text }: any) => JSX.Element;
3
4
  export default ErrorTip;