@pisell/materials 1.0.1059 → 1.0.1062

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 (374) hide show
  1. package/README.md +285 -285
  2. package/build/lowcode/assets-daily.json +11 -11
  3. package/build/lowcode/assets-dev.json +2 -2
  4. package/build/lowcode/assets-prod.json +11 -11
  5. package/build/lowcode/index.js +1 -1
  6. package/build/lowcode/meta.js +7 -7
  7. package/build/lowcode/preview.js +9 -9
  8. package/build/lowcode/render/default/view.css +1 -1
  9. package/build/lowcode/render/default/view.js +27 -27
  10. package/build/lowcode/view.css +1 -1
  11. package/build/lowcode/view.js +27 -27
  12. package/es/components/PisellLayouts/index.d.ts +2 -1
  13. package/es/components/PisellLayouts/index.js +17 -15
  14. package/es/components/cardMetricItem/index.js +2 -2
  15. package/es/components/pisellFilter/type.d.ts +4 -2
  16. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +1 -1
  17. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +474 -202
  18. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +70 -0
  19. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +13 -0
  20. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +469 -38
  21. package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +22 -0
  22. package/es/components/pisellFloorMapLayout/components/CanvasTabs.js +203 -0
  23. package/es/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
  24. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
  25. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +341 -0
  26. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
  27. package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +39 -0
  28. package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +432 -0
  29. package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +17 -0
  30. package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.js +131 -0
  31. package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
  32. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +11 -0
  33. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +497 -0
  34. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +154 -0
  35. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +34 -0
  36. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +130 -0
  37. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +131 -0
  38. package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +6 -0
  39. package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.js +69 -0
  40. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
  41. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +361 -0
  42. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +237 -0
  43. package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +7 -0
  44. package/es/components/pisellFloorMapLayout/components/ItemLayer.js +37 -11
  45. package/es/components/pisellFloorMapLayout/components/MapLayer.d.ts +4 -0
  46. package/es/components/pisellFloorMapLayout/components/MapLayer.js +11 -3
  47. package/es/components/pisellFloorMapLayout/components/ViewControls.js +2 -2
  48. package/es/components/pisellFloorMapLayout/components/ViewControls.less +3 -2
  49. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +11 -0
  50. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +27 -0
  51. package/es/components/pisellFloorMapLayout/components/index.d.ts +14 -0
  52. package/es/components/pisellFloorMapLayout/components/index.js +8 -1
  53. package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
  54. package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +21 -0
  55. package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
  56. package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +28 -0
  57. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +62 -0
  58. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +438 -0
  59. package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
  60. package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +122 -0
  61. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
  62. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +322 -0
  63. package/es/components/pisellFloorMapLayout/index.d.ts +9 -2
  64. package/es/components/pisellFloorMapLayout/index.js +7 -2
  65. package/es/components/pisellFloorMapLayout/locales.d.ts +186 -0
  66. package/es/components/pisellFloorMapLayout/locales.js +185 -0
  67. package/es/components/pisellFloorMapLayout/types.d.ts +362 -1
  68. package/es/components/pisellFloorMapLayout/types.js +148 -1
  69. package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
  70. package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +129 -0
  71. package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
  72. package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +87 -0
  73. package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +26 -0
  74. package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +47 -0
  75. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
  76. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +69 -0
  77. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
  78. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +88 -0
  79. package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
  80. package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +8 -0
  81. package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
  82. package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +108 -0
  83. package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
  84. package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.js +125 -0
  85. package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
  86. package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +29 -0
  87. package/es/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
  88. package/es/components/pisellFloorMapLayout/utils/snap.js +21 -0
  89. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
  90. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +175 -0
  91. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
  92. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
  93. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +237 -0
  94. package/es/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
  95. package/es/components/pisellHierarchicalSummaryList/components/Row.js +313 -0
  96. package/es/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
  97. package/es/components/pisellHierarchicalSummaryList/components/index.js +1 -0
  98. package/es/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
  99. package/es/components/pisellHierarchicalSummaryList/hooks/index.js +1 -0
  100. package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
  101. package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +34 -0
  102. package/es/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
  103. package/es/components/pisellHierarchicalSummaryList/index.js +5 -0
  104. package/es/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
  105. package/es/components/pisellHierarchicalSummaryList/types.js +1 -0
  106. package/es/components/pisellLookup/PisellLookup.js +82 -82
  107. package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +34 -34
  108. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
  109. package/es/components/pisellRecordBoard/PisellRecordBoard.js +95 -18
  110. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
  111. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +1315 -383
  112. package/es/components/pisellRecordBoard/index.d.ts +7 -2
  113. package/es/components/pisellRecordBoard/index.js +2 -1
  114. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -3
  115. package/es/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
  116. package/es/components/pisellRecordBoard/shellFrame/FloorMap.js +15 -0
  117. package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
  118. package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +11 -0
  119. package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +47 -0
  120. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +57 -10
  121. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +3 -3
  122. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +4 -10
  123. package/es/components/pisellRecordBoard/shellFrame/index.js +101 -19
  124. package/es/components/pisellRecordBoard/types.d.ts +62 -2
  125. package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
  126. package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +57 -0
  127. package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
  128. package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +156 -0
  129. package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
  130. package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
  131. package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +105 -0
  132. package/es/components/pisellReservationSchedule/index.d.ts +2 -0
  133. package/es/components/pisellReservationSchedule/index.js +1 -0
  134. package/es/components/pisellReservationSchedule/locales.d.ts +25 -0
  135. package/es/components/pisellReservationSchedule/locales.js +24 -0
  136. package/es/components/pisellReservationSchedule/types.d.ts +42 -0
  137. package/es/components/pisellReservationSchedule/types.js +1 -0
  138. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
  139. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +91 -0
  140. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +49 -0
  141. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
  142. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +197 -0
  143. package/es/components/pisellReservationScheduleBand/index.d.ts +2 -0
  144. package/es/components/pisellReservationScheduleBand/index.js +1 -0
  145. package/es/components/pisellReservationScheduleBand/types.d.ts +45 -0
  146. package/es/components/pisellReservationScheduleBand/types.js +1 -0
  147. package/es/components/pisellRow/index.js +7 -7
  148. package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
  149. package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +609 -0
  150. package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +412 -0
  151. package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
  152. package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +290 -0
  153. package/es/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
  154. package/es/components/pisellTimeNavigator/components/BackgroundLayer.js +30 -0
  155. package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +20 -0
  156. package/es/components/pisellTimeNavigator/components/CursorLayer.js +46 -0
  157. package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +31 -0
  158. package/es/components/pisellTimeNavigator/components/GestureLayer.js +82 -0
  159. package/es/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
  160. package/es/components/pisellTimeNavigator/components/NowButton.js +38 -0
  161. package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +17 -0
  162. package/es/components/pisellTimeNavigator/components/ScaleLayer.js +51 -0
  163. package/es/components/pisellTimeNavigator/components/index.d.ts +5 -0
  164. package/es/components/pisellTimeNavigator/components/index.js +5 -0
  165. package/es/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
  166. package/es/components/pisellTimeNavigator/hooks/index.js +3 -0
  167. package/es/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
  168. package/es/components/pisellTimeNavigator/hooks/useDragInertia.js +109 -0
  169. package/es/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
  170. package/es/components/pisellTimeNavigator/hooks/useRealtime.js +16 -0
  171. package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
  172. package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +76 -0
  173. package/es/components/pisellTimeNavigator/index.d.ts +4 -0
  174. package/es/components/pisellTimeNavigator/index.js +3 -0
  175. package/es/components/pisellTimeNavigator/locales.d.ts +22 -0
  176. package/es/components/pisellTimeNavigator/locales.js +21 -0
  177. package/es/components/pisellTimeNavigator/types.d.ts +149 -0
  178. package/es/components/pisellTimeNavigator/types.js +1 -0
  179. package/es/components/pisellTimeNavigator/utils/index.d.ts +30 -0
  180. package/es/components/pisellTimeNavigator/utils/index.js +116 -0
  181. package/es/index.d.ts +15 -5
  182. package/es/index.js +7 -1
  183. package/es/locales/en-US.d.ts +2 -0
  184. package/es/locales/en-US.js +6 -4
  185. package/es/locales/zh-CN.d.ts +2 -0
  186. package/es/locales/zh-CN.js +6 -4
  187. package/es/locales/zh-TW.d.ts +2 -0
  188. package/es/locales/zh-TW.js +6 -4
  189. package/lib/components/PisellLayouts/index.d.ts +2 -1
  190. package/lib/components/PisellLayouts/index.js +13 -1
  191. package/lib/components/pisellFilter/type.d.ts +4 -2
  192. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +1 -1
  193. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +566 -181
  194. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +70 -0
  195. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +13 -0
  196. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +682 -84
  197. package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +22 -0
  198. package/lib/components/pisellFloorMapLayout/components/CanvasTabs.js +237 -0
  199. package/lib/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
  200. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
  201. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +358 -0
  202. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
  203. package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +39 -0
  204. package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +482 -0
  205. package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +17 -0
  206. package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.js +117 -0
  207. package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
  208. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +11 -0
  209. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +508 -0
  210. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +154 -0
  211. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +34 -0
  212. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +188 -0
  213. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +131 -0
  214. package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +6 -0
  215. package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.js +94 -0
  216. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
  217. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +333 -0
  218. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +237 -0
  219. package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +7 -0
  220. package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +26 -5
  221. package/lib/components/pisellFloorMapLayout/components/MapLayer.d.ts +4 -0
  222. package/lib/components/pisellFloorMapLayout/components/MapLayer.js +7 -2
  223. package/lib/components/pisellFloorMapLayout/components/ViewControls.less +3 -2
  224. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +11 -0
  225. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +63 -0
  226. package/lib/components/pisellFloorMapLayout/components/index.d.ts +14 -0
  227. package/lib/components/pisellFloorMapLayout/components/index.js +23 -2
  228. package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
  229. package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +54 -0
  230. package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
  231. package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +47 -0
  232. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +62 -0
  233. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +431 -0
  234. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
  235. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +146 -0
  236. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
  237. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +309 -0
  238. package/lib/components/pisellFloorMapLayout/index.d.ts +9 -2
  239. package/lib/components/pisellFloorMapLayout/index.js +31 -2
  240. package/lib/components/pisellFloorMapLayout/locales.d.ts +186 -0
  241. package/lib/components/pisellFloorMapLayout/locales.js +206 -0
  242. package/lib/components/pisellFloorMapLayout/types.d.ts +362 -1
  243. package/lib/components/pisellFloorMapLayout/types.js +15 -0
  244. package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
  245. package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +126 -0
  246. package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
  247. package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +66 -0
  248. package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +26 -0
  249. package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +61 -0
  250. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
  251. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +70 -0
  252. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
  253. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +135 -0
  254. package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
  255. package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +33 -0
  256. package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
  257. package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +128 -0
  258. package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
  259. package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.js +96 -0
  260. package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
  261. package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +41 -0
  262. package/lib/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
  263. package/lib/components/pisellFloorMapLayout/utils/snap.js +43 -0
  264. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
  265. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +179 -0
  266. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
  267. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
  268. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +218 -0
  269. package/lib/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
  270. package/lib/components/pisellHierarchicalSummaryList/components/Row.js +343 -0
  271. package/lib/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
  272. package/lib/components/pisellHierarchicalSummaryList/components/index.js +29 -0
  273. package/lib/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
  274. package/lib/components/pisellHierarchicalSummaryList/hooks/index.js +29 -0
  275. package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
  276. package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +51 -0
  277. package/lib/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
  278. package/lib/components/pisellHierarchicalSummaryList/index.js +31 -0
  279. package/lib/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
  280. package/lib/components/pisellHierarchicalSummaryList/types.js +17 -0
  281. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
  282. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +82 -8
  283. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
  284. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +915 -25
  285. package/lib/components/pisellRecordBoard/index.d.ts +7 -2
  286. package/lib/components/pisellRecordBoard/index.js +1 -0
  287. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +8 -2
  288. package/lib/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
  289. package/lib/components/pisellRecordBoard/shellFrame/FloorMap.js +27 -0
  290. package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
  291. package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +45 -0
  292. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +47 -0
  293. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +48 -4
  294. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +4 -10
  295. package/lib/components/pisellRecordBoard/shellFrame/index.js +88 -6
  296. package/lib/components/pisellRecordBoard/types.d.ts +62 -2
  297. package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
  298. package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +88 -0
  299. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
  300. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +200 -0
  301. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
  302. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
  303. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +116 -0
  304. package/lib/components/pisellReservationSchedule/index.d.ts +2 -0
  305. package/lib/components/pisellReservationSchedule/index.js +29 -0
  306. package/lib/components/pisellReservationSchedule/locales.d.ts +25 -0
  307. package/lib/components/pisellReservationSchedule/locales.js +47 -0
  308. package/lib/components/pisellReservationSchedule/types.d.ts +42 -0
  309. package/lib/components/pisellReservationSchedule/types.js +17 -0
  310. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
  311. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +127 -0
  312. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +49 -0
  313. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
  314. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +181 -0
  315. package/lib/components/pisellReservationScheduleBand/index.d.ts +2 -0
  316. package/lib/components/pisellReservationScheduleBand/index.js +29 -0
  317. package/lib/components/pisellReservationScheduleBand/types.d.ts +45 -0
  318. package/lib/components/pisellReservationScheduleBand/types.js +17 -0
  319. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
  320. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +716 -0
  321. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +412 -0
  322. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
  323. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +273 -0
  324. package/lib/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
  325. package/lib/components/pisellTimeNavigator/components/BackgroundLayer.js +81 -0
  326. package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +20 -0
  327. package/lib/components/pisellTimeNavigator/components/CursorLayer.js +74 -0
  328. package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +31 -0
  329. package/lib/components/pisellTimeNavigator/components/GestureLayer.js +159 -0
  330. package/lib/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
  331. package/lib/components/pisellTimeNavigator/components/NowButton.js +81 -0
  332. package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +17 -0
  333. package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +95 -0
  334. package/lib/components/pisellTimeNavigator/components/index.d.ts +5 -0
  335. package/lib/components/pisellTimeNavigator/components/index.js +41 -0
  336. package/lib/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
  337. package/lib/components/pisellTimeNavigator/hooks/index.js +35 -0
  338. package/lib/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
  339. package/lib/components/pisellTimeNavigator/hooks/useDragInertia.js +136 -0
  340. package/lib/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
  341. package/lib/components/pisellTimeNavigator/hooks/useRealtime.js +49 -0
  342. package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
  343. package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.js +81 -0
  344. package/lib/components/pisellTimeNavigator/index.d.ts +4 -0
  345. package/lib/components/pisellTimeNavigator/index.js +42 -0
  346. package/lib/components/pisellTimeNavigator/locales.d.ts +22 -0
  347. package/lib/components/pisellTimeNavigator/locales.js +41 -0
  348. package/lib/components/pisellTimeNavigator/types.d.ts +149 -0
  349. package/lib/components/pisellTimeNavigator/types.js +17 -0
  350. package/lib/components/pisellTimeNavigator/utils/index.d.ts +30 -0
  351. package/lib/components/pisellTimeNavigator/utils/index.js +107 -0
  352. package/lib/index.d.ts +15 -5
  353. package/lib/index.js +35 -0
  354. package/lib/locales/en-US.d.ts +2 -0
  355. package/lib/locales/en-US.js +2 -0
  356. package/lib/locales/zh-CN.d.ts +2 -0
  357. package/lib/locales/zh-CN.js +2 -0
  358. package/lib/locales/zh-TW.d.ts +2 -0
  359. package/lib/locales/zh-TW.js +2 -0
  360. package/lowcode/floor-map-layout-provider/meta.ts +65 -0
  361. package/lowcode/pisell-floor-map-layout/meta.ts +3894 -1
  362. package/lowcode/pisell-hierarchical-summary-list/meta.ts +244 -0
  363. package/lowcode/pisell-reservation-schedule/index.ts +3 -0
  364. package/lowcode/pisell-reservation-schedule/meta.ts +69 -0
  365. package/lowcode/pisell-reservation-schedule/snippets.ts +1 -0
  366. package/lowcode/pisell-reservation-schedule-band/index.ts +3 -0
  367. package/lowcode/pisell-reservation-schedule-band/meta.ts +96 -0
  368. package/lowcode/pisell-reservation-schedule-band/snippets.ts +1 -0
  369. package/lowcode/pisell-time-navigator/index.ts +3 -0
  370. package/lowcode/pisell-time-navigator/meta.ts +298 -0
  371. package/lowcode/pisell-time-navigator/snippets.ts +1 -0
  372. package/lowcode/render-figma-style-round-table-card/meta.ts +589 -0
  373. package/lowcode/render-figma-style-table-card/meta.ts +589 -0
  374. package/package.json +3 -3
@@ -0,0 +1,322 @@
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
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ 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."); }
9
+ 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); }
10
+ 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; }
11
+ 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; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ /**
14
+ * 视口 / 地图区尺寸、内容区宽高与偏移、缩放与全屏、fitBounds、拖拽图元后恢复 transform
15
+ */
16
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17
+ import { getContentSize, getPixelBoundingBox } from "../utils/layoutMeasurements";
18
+
19
+ /** 平面图包围盒单侧默认外扩(像素);过大会导致首屏大量空白 */
20
+ var DEFAULT_BOUNDING_PADDING = 56;
21
+
22
+ /** 视口内与首屏对齐时,图元束左上与容器边缘的留白 */
23
+ var VIEWPORT_TOP_LEFT_MARGIN = 16;
24
+
25
+ /** react-zoom-pan-pinch TransformWrapper render 注入的上下文 */
26
+
27
+ export function useFloorMapTransformMetrics(params) {
28
+ var items = params.items,
29
+ cellSize = params.cellSize,
30
+ itemGap = params.itemGap,
31
+ effectiveItemUnit = params.effectiveItemUnit,
32
+ isFloorMapView = params.isFloorMapView,
33
+ mode = params.mode,
34
+ zoom = params.zoom,
35
+ transformRef = params.transformRef,
36
+ contentOffsetRef = params.contentOffsetRef,
37
+ boundingPaddingProp = params.boundingPadding,
38
+ frameResetKey = params.frameResetKey;
39
+ var padSingle = boundingPaddingProp !== null && boundingPaddingProp !== void 0 ? boundingPaddingProp : DEFAULT_BOUNDING_PADDING;
40
+ var containerRef = useRef(null);
41
+ var mapAreaRef = useRef(null);
42
+ var _useState = useState({
43
+ width: 0,
44
+ height: 0
45
+ }),
46
+ _useState2 = _slicedToArray(_useState, 2),
47
+ viewportSize = _useState2[0],
48
+ setViewportSize = _useState2[1];
49
+ useEffect(function () {
50
+ var el = containerRef.current;
51
+ if (!el) return;
52
+ var ro = new ResizeObserver(function () {
53
+ setViewportSize({
54
+ width: el.clientWidth,
55
+ height: el.clientHeight
56
+ });
57
+ });
58
+ ro.observe(el);
59
+ setViewportSize({
60
+ width: el.clientWidth,
61
+ height: el.clientHeight
62
+ });
63
+ return function () {
64
+ return ro.disconnect();
65
+ };
66
+ }, []);
67
+ var _useState3 = useState({
68
+ width: 0,
69
+ height: 0
70
+ }),
71
+ _useState4 = _slicedToArray(_useState3, 2),
72
+ mapAreaSize = _useState4[0],
73
+ setMapAreaSize = _useState4[1];
74
+ useEffect(function () {
75
+ var el = mapAreaRef.current;
76
+ if (!el) return;
77
+ var ro = new ResizeObserver(function () {
78
+ setMapAreaSize({
79
+ width: el.clientWidth,
80
+ height: el.clientHeight
81
+ });
82
+ });
83
+ ro.observe(el);
84
+ setMapAreaSize({
85
+ width: el.clientWidth,
86
+ height: el.clientHeight
87
+ });
88
+ return function () {
89
+ return ro.disconnect();
90
+ };
91
+ }, []);
92
+ var autoFitOnMount = zoom.autoFitOnMount === true;
93
+ var zoomConfig = useMemo(function () {
94
+ var _zoom$defaultScale, _zoom$min, _zoom$max, _zoom$step;
95
+ return {
96
+ initialScale: (_zoom$defaultScale = zoom.defaultScale) !== null && _zoom$defaultScale !== void 0 ? _zoom$defaultScale : 1,
97
+ minScale: (_zoom$min = zoom.min) !== null && _zoom$min !== void 0 ? _zoom$min : 0.5,
98
+ maxScale: (_zoom$max = zoom.max) !== null && _zoom$max !== void 0 ? _zoom$max : 2,
99
+ step: (_zoom$step = zoom.step) !== null && _zoom$step !== void 0 ? _zoom$step : 0.1
100
+ };
101
+ }, [zoom.defaultScale, zoom.min, zoom.max, zoom.step]);
102
+ var _useState5 = useState(zoomConfig.initialScale),
103
+ _useState6 = _slicedToArray(_useState5, 2),
104
+ scale = _useState6[0],
105
+ setScale = _useState6[1];
106
+ var _useState7 = useState(false),
107
+ _useState8 = _slicedToArray(_useState7, 2),
108
+ isFullscreen = _useState8[0],
109
+ setIsFullscreen = _useState8[1];
110
+ var _useMemo = useMemo(function () {
111
+ var fromItems = getContentSize(items, cellSize, itemGap, effectiveItemUnit);
112
+ var pad = padSingle * 2;
113
+ var zeroOffset = {
114
+ contentOffsetX: 0,
115
+ contentOffsetY: 0
116
+ };
117
+ var useBoundingBox = isFloorMapView && effectiveItemUnit === 'pixel' && items.length > 0;
118
+ var box = useBoundingBox ? getPixelBoundingBox(items, cellSize) : null;
119
+ var padded;
120
+ var alignPad = null;
121
+ if (box) {
122
+ var w = box.maxRight - box.minLeft + pad;
123
+ var h = box.maxBottom - box.minTop + pad;
124
+ padded = {
125
+ contentWidth: w,
126
+ contentHeight: h,
127
+ contentOffsetX: padSingle - box.minLeft,
128
+ contentOffsetY: padSingle - box.minTop
129
+ };
130
+ alignPad = padSingle;
131
+ } else {
132
+ padded = _objectSpread({
133
+ contentWidth: fromItems.contentWidth + pad,
134
+ contentHeight: fromItems.contentHeight + pad
135
+ }, zeroOffset);
136
+ }
137
+ var result = _objectSpread(_objectSpread({}, padded), {}, {
138
+ alignPadSingle: alignPad
139
+ });
140
+ if (!isFloorMapView || mode !== 'edit') return result;
141
+ var vw = mapAreaSize.width > 0 ? mapAreaSize.width : viewportSize.width;
142
+ var vh = mapAreaSize.height > 0 ? mapAreaSize.height : viewportSize.height;
143
+ if (vw <= 0 || vh <= 0) return result;
144
+ result = _objectSpread(_objectSpread({}, result), {}, {
145
+ contentWidth: Math.max(padded.contentWidth, vw),
146
+ contentHeight: Math.max(padded.contentHeight, vh)
147
+ });
148
+ return result;
149
+ }, [items, cellSize, itemGap, effectiveItemUnit, isFloorMapView, mode, mapAreaSize.width, mapAreaSize.height, viewportSize.width, viewportSize.height, padSingle]),
150
+ contentWidth = _useMemo.contentWidth,
151
+ contentHeight = _useMemo.contentHeight,
152
+ contentOffsetX = _useMemo.contentOffsetX,
153
+ contentOffsetY = _useMemo.contentOffsetY,
154
+ alignPadSingle = _useMemo.alignPadSingle;
155
+ var padForAlign = alignPadSingle !== null && alignPadSingle !== void 0 ? alignPadSingle : 0;
156
+ var initialPositionX = VIEWPORT_TOP_LEFT_MARGIN - padForAlign * zoomConfig.initialScale;
157
+ var initialPositionY = VIEWPORT_TOP_LEFT_MARGIN - padForAlign * zoomConfig.initialScale;
158
+ contentOffsetRef.current = {
159
+ x: contentOffsetX,
160
+ y: contentOffsetY
161
+ };
162
+
163
+ /** 避免用 content 尺寸当 key 导致拖拽时整表 remount;切换画布或由空到有图元时再对齐一次 */
164
+ var initialAlignRef = useRef({
165
+ frame: '',
166
+ done: false
167
+ });
168
+ useEffect(function () {
169
+ if (!isFloorMapView || frameResetKey === undefined) return;
170
+ if (initialAlignRef.current.frame !== frameResetKey) {
171
+ initialAlignRef.current = {
172
+ frame: frameResetKey,
173
+ done: false
174
+ };
175
+ }
176
+ if (autoFitOnMount) {
177
+ initialAlignRef.current.done = true;
178
+ return;
179
+ }
180
+ if (alignPadSingle == null) {
181
+ initialAlignRef.current.done = false;
182
+ return;
183
+ }
184
+ if (initialAlignRef.current.done) return;
185
+ var cancelled = false;
186
+ var raf = 0;
187
+ var tick = function tick() {
188
+ if (cancelled) return;
189
+ var ctx = transformRef.current;
190
+ if (!ctx) {
191
+ raf = requestAnimationFrame(tick);
192
+ return;
193
+ }
194
+ ctx.setTransform(initialPositionX, initialPositionY, zoomConfig.initialScale);
195
+ initialAlignRef.current.done = true;
196
+ };
197
+ raf = requestAnimationFrame(tick);
198
+ return function () {
199
+ cancelled = true;
200
+ cancelAnimationFrame(raf);
201
+ };
202
+ }, [isFloorMapView, frameResetKey, alignPadSingle, initialPositionX, initialPositionY, zoomConfig.initialScale, transformRef, autoFitOnMount]);
203
+ useEffect(function () {
204
+ var el = containerRef.current;
205
+ if (!el) return;
206
+ var onFullscreenChange = function onFullscreenChange() {
207
+ return setIsFullscreen(document.fullscreenElement === el);
208
+ };
209
+ document.addEventListener('fullscreenchange', onFullscreenChange);
210
+ return function () {
211
+ return document.removeEventListener('fullscreenchange', onFullscreenChange);
212
+ };
213
+ }, []);
214
+ var toggleFullscreen = useCallback(function () {
215
+ var el = containerRef.current;
216
+ if (!el) return;
217
+ if (document.fullscreenElement) {
218
+ var _document$exitFullscr, _document;
219
+ (_document$exitFullscr = (_document = document).exitFullscreen) === null || _document$exitFullscr === void 0 || _document$exitFullscr.call(_document);
220
+ } else {
221
+ var _el$requestFullscreen;
222
+ (_el$requestFullscreen = el.requestFullscreen) === null || _el$requestFullscreen === void 0 || _el$requestFullscreen.call(el);
223
+ }
224
+ }, []);
225
+ var fitBounds = useCallback(function () {
226
+ var _zoom$max2;
227
+ var ctx = transformRef.current;
228
+ var container = containerRef.current;
229
+ if (!ctx || !container) return;
230
+ var wrapper = container.querySelector('.react-transform-wrapper');
231
+ if (!wrapper) return;
232
+ var wrapperRect = wrapper.getBoundingClientRect();
233
+ var nextScale = Math.min(wrapperRect.width / contentWidth, wrapperRect.height / contentHeight, (_zoom$max2 = zoom.max) !== null && _zoom$max2 !== void 0 ? _zoom$max2 : 2);
234
+ var padA = alignPadSingle !== null && alignPadSingle !== void 0 ? alignPadSingle : 0;
235
+ var x = VIEWPORT_TOP_LEFT_MARGIN - padA * nextScale;
236
+ var y = VIEWPORT_TOP_LEFT_MARGIN - padA * nextScale;
237
+ ctx.setTransform(x, y, nextScale);
238
+ }, [contentWidth, contentHeight, zoom.max, transformRef, alignPadSingle]);
239
+
240
+ /** autoFitOnMount:每画布一次 fitBounds(在 TransformWrapper 就绪后) */
241
+ var autoFitOnceRef = useRef({
242
+ frame: '',
243
+ done: false
244
+ });
245
+ useEffect(function () {
246
+ if (!isFloorMapView || !autoFitOnMount || frameResetKey === undefined) return;
247
+ var frame = String(frameResetKey);
248
+ if (autoFitOnceRef.current.frame !== frame) {
249
+ autoFitOnceRef.current = {
250
+ frame: frame,
251
+ done: false
252
+ };
253
+ }
254
+ if (autoFitOnceRef.current.done) return;
255
+ if (contentWidth <= 0 || contentHeight <= 0) return;
256
+ var cancelled = false;
257
+ var raf = 0;
258
+ var tick = function tick() {
259
+ if (cancelled) return;
260
+ var ctx = transformRef.current;
261
+ var container = containerRef.current;
262
+ if (!ctx || !(container !== null && container !== void 0 && container.querySelector('.react-transform-wrapper'))) {
263
+ raf = requestAnimationFrame(tick);
264
+ return;
265
+ }
266
+ fitBounds();
267
+ autoFitOnceRef.current.done = true;
268
+ };
269
+ raf = requestAnimationFrame(tick);
270
+ return function () {
271
+ cancelled = true;
272
+ cancelAnimationFrame(raf);
273
+ };
274
+ }, [isFloorMapView, autoFitOnMount, frameResetKey, contentWidth, contentHeight, fitBounds, transformRef]);
275
+ var lastTransformRef = useRef({
276
+ x: 0,
277
+ y: 0,
278
+ scale: 1
279
+ });
280
+ var _useState9 = useState(false),
281
+ _useState10 = _slicedToArray(_useState9, 2),
282
+ isInteractingWithElement = _useState10[0],
283
+ setIsInteractingWithElement = _useState10[1];
284
+ var prevInteractingRef = useRef(false);
285
+ useEffect(function () {
286
+ if (isInteractingWithElement) {
287
+ prevInteractingRef.current = true;
288
+ return;
289
+ }
290
+ if (!prevInteractingRef.current) return;
291
+ prevInteractingRef.current = false;
292
+ var saved = lastTransformRef.current;
293
+ var raf = requestAnimationFrame(function () {
294
+ var _transformRef$current;
295
+ (_transformRef$current = transformRef.current) === null || _transformRef$current === void 0 || _transformRef$current.setTransform(saved.x, saved.y, saved.scale);
296
+ });
297
+ return function () {
298
+ return cancelAnimationFrame(raf);
299
+ };
300
+ }, [isInteractingWithElement, transformRef]);
301
+ return {
302
+ containerRef: containerRef,
303
+ mapAreaRef: mapAreaRef,
304
+ viewportSize: viewportSize,
305
+ mapAreaSize: mapAreaSize,
306
+ contentWidth: contentWidth,
307
+ contentHeight: contentHeight,
308
+ contentOffsetX: contentOffsetX,
309
+ contentOffsetY: contentOffsetY,
310
+ initialPositionX: initialPositionX,
311
+ initialPositionY: initialPositionY,
312
+ zoomConfig: zoomConfig,
313
+ scale: scale,
314
+ setScale: setScale,
315
+ isFullscreen: isFullscreen,
316
+ toggleFullscreen: toggleFullscreen,
317
+ fitBounds: fitBounds,
318
+ lastTransformRef: lastTransformRef,
319
+ isInteractingWithElement: isInteractingWithElement,
320
+ setIsInteractingWithElement: setIsInteractingWithElement
321
+ };
322
+ }
@@ -1,6 +1,13 @@
1
1
  /**
2
2
  * PisellFloorMapLayout 组件入口
3
- * 空间布局视图:在二维平面按坐标渲染资源,支持缩放/平移/复位
3
+ * 空间布局视图:在二维平面按坐标渲染资源,支持缩放/平移/复位;支持 floorMapConfig + mode 平面图视图
4
4
  */
5
5
  export { PisellFloorMapLayout } from './PisellFloorMapLayout';
6
- export type { PisellFloorMapLayoutProps, PisellFloorMapLayoutRef, FloorMapItemBase, FloorMapItemUnit, FloorMapLayerConfig, FloorMapZoomConfig, FloorMapPanConfig, FloorMapControlsConfig, FloorMapItemShape, FloorMapBackgroundType, FloorMapPanBoundary, FloorMapLayoutMode, FloorMapGridLayoutConfig, } from './types';
6
+ export type { PisellFloorMapLayoutProps, PisellFloorMapLayoutRef, FloorMapItemBase, FloorMapItemUnit, FloorMapLayerConfig, FloorMapZoomConfig, FloorMapPanConfig, FloorMapControlsConfig, FloorMapItemShape, FloorMapBackgroundType, FloorMapPanBoundary, FloorMapLayoutMode, FloorMapGridLayoutConfig, FloorMapCanvas, FloorMapCanvasNameI18n, FloorMapElement, FloorMapData, FloorMapViewConfig, FloorMapCanvasUiConfig, FloorMapSceneElement, FloorMapSceneElementDataBinding, FloorMapPlaceMode, FloorMapElementKindCategory, FloorMapElementDataBindingPolicy, FloorMapElementDefaultPresentation, FloorMapEdge, FloorMapElementKindConfig, FloorMapElementType, FloorMapTextSlot, FloorMapDataSources, FloorMapRenderOptions, FloorMapEditPanelParams, DataSourceFormColumn, FloorMapMergedItem, FloorMapRecordFormRenderContext, FloorMapDataSourceRecordFormContent, FloorMapFullscreenMode, FloorMapLayoutContextValue, } from './types';
7
+ export { FLOOR_MAP_STAGE_ELEMENT_KIND, FLOOR_MAP_IMAGE_ELEMENT_KIND, } from './types';
8
+ export { FloorMapLayoutProvider, useFloorMapLayoutContext, EMPTY_FLOOR_MAP_LAYOUT_CONTEXT, } from './context/FloorMapLayoutContext';
9
+ export type { FloorMapLayoutProviderProps } from './context/FloorMapLayoutContext';
10
+ export { mergeFloorMapLayoutPropsFromContext } from './context/mergeFloorMapLayoutContext';
11
+ export { FloorMapImageElement } from './components/FloorMapImageElement';
12
+ export { getFigmaTableCardFromMerged, renderFigmaStyleTableCard, renderFigmaStyleRoundTableCard, getRenderItemByKindTable, getRenderItemByKindRoundTable, } from './components/FigmaTableCard';
13
+ export type { FigmaTableCardItem, FigmaTableStatus, } from './components/FigmaTableCard';
@@ -1,5 +1,10 @@
1
1
  /**
2
2
  * PisellFloorMapLayout 组件入口
3
- * 空间布局视图:在二维平面按坐标渲染资源,支持缩放/平移/复位
3
+ * 空间布局视图:在二维平面按坐标渲染资源,支持缩放/平移/复位;支持 floorMapConfig + mode 平面图视图
4
4
  */
5
- export { PisellFloorMapLayout } from "./PisellFloorMapLayout";
5
+ export { PisellFloorMapLayout } from "./PisellFloorMapLayout";
6
+ export { FLOOR_MAP_STAGE_ELEMENT_KIND, FLOOR_MAP_IMAGE_ELEMENT_KIND } from "./types";
7
+ export { FloorMapLayoutProvider, useFloorMapLayoutContext, EMPTY_FLOOR_MAP_LAYOUT_CONTEXT } from "./context/FloorMapLayoutContext";
8
+ export { mergeFloorMapLayoutPropsFromContext } from "./context/mergeFloorMapLayoutContext";
9
+ export { FloorMapImageElement } from "./components/FloorMapImageElement";
10
+ export { getFigmaTableCardFromMerged, renderFigmaStyleTableCard, renderFigmaStyleRoundTableCard, getRenderItemByKindTable, getRenderItemByKindRoundTable } from "./components/FigmaTableCard";
@@ -0,0 +1,186 @@
1
+ /**
2
+ * PisellFloorMapLayout 内置文案(画布 Tab、编辑面板等)
3
+ */
4
+ declare const _default: {
5
+ en: {
6
+ 'pisell-floor-map-layout.loading': string;
7
+ 'pisell-floor-map-layout.read-canvas-tabs.aria': string;
8
+ 'pisell-floor-map-layout.edit-top-bar.aria': string;
9
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-enter-aria': string;
10
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-enter-title': string;
11
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-exit-aria': string;
12
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-exit-title': string;
13
+ 'pisell-floor-map-layout.edit-top-bar.unsaved': string;
14
+ 'pisell-floor-map-layout.edit-top-bar.save': string;
15
+ 'pisell-floor-map-layout.edit-top-bar.saving': string;
16
+ 'pisell-floor-map-layout.canvas-tabs.empty': string;
17
+ 'pisell-floor-map-layout.canvas-tabs.add': string;
18
+ 'pisell-floor-map-layout.canvas-tabs.add-title': string;
19
+ 'pisell-floor-map-layout.canvas-tabs.hint': string;
20
+ 'pisell-floor-map-layout.canvas-tabs.rename-aria': string;
21
+ 'pisell-floor-map-layout.canvas-tabs.remove-aria': string;
22
+ 'pisell-floor-map-layout.canvas-tabs.rename-title': string;
23
+ 'pisell-floor-map-layout.canvas-tabs.rename-button-aria': string;
24
+ 'pisell-floor-map-layout.canvas-tabs.rename-button-title': string;
25
+ 'pisell-floor-map-layout.canvas-tabs.default-new-canvas-name': string;
26
+ 'pisell-floor-map-layout.canvas-tabs.rename-modal-title': string;
27
+ 'pisell-floor-map-layout.canvas-tabs.rename-modal-ok': string;
28
+ 'pisell-floor-map-layout.canvas-tabs.rename-modal-cancel': string;
29
+ 'pisell-floor-map-layout.edit-panel.element-props': string;
30
+ 'pisell-floor-map-layout.edit-panel.close-aria': string;
31
+ 'pisell-floor-map-layout.edit-panel.hint-apply': string;
32
+ 'pisell-floor-map-layout.edit-panel.hint-save': string;
33
+ 'pisell-floor-map-layout.edit-panel.section-layout': string;
34
+ 'pisell-floor-map-layout.edit-panel.lock-on': string;
35
+ 'pisell-floor-map-layout.edit-panel.lock-off': string;
36
+ 'pisell-floor-map-layout.edit-panel.label-x': string;
37
+ 'pisell-floor-map-layout.edit-panel.label-y': string;
38
+ 'pisell-floor-map-layout.edit-panel.label-z': string;
39
+ 'pisell-floor-map-layout.edit-panel.label-width': string;
40
+ 'pisell-floor-map-layout.edit-panel.label-height': string;
41
+ 'pisell-floor-map-layout.edit-panel.label-name': string;
42
+ 'pisell-floor-map-layout.edit-panel.label-name-stage': string;
43
+ 'pisell-floor-map-layout.edit-panel.ph-name-stage': string;
44
+ 'pisell-floor-map-layout.edit-panel.ph-name': string;
45
+ 'pisell-floor-map-layout.edit-panel.label-image-url': string;
46
+ 'pisell-floor-map-layout.edit-panel.extra-image-url': string;
47
+ 'pisell-floor-map-layout.edit-panel.ph-https': string;
48
+ 'pisell-floor-map-layout.edit-panel.label-canvas': string;
49
+ 'pisell-floor-map-layout.edit-panel.apply': string;
50
+ 'pisell-floor-map-layout.edit-panel.data-binding': string;
51
+ 'pisell-floor-map-layout.edit-panel.data-binding-note': string;
52
+ 'pisell-floor-map-layout.edit-panel.label-data-source': string;
53
+ 'pisell-floor-map-layout.edit-panel.ph-data-source': string;
54
+ 'pisell-floor-map-layout.edit-panel.label-pick-row': string;
55
+ 'pisell-floor-map-layout.edit-panel.ph-pick-row': string;
56
+ 'pisell-floor-map-layout.edit-panel.ph-no-rows': string;
57
+ 'pisell-floor-map-layout.edit-panel.hint-unbound': string;
58
+ 'pisell-floor-map-layout.edit-panel.record-title': string;
59
+ 'pisell-floor-map-layout.edit-panel.pop-title': string;
60
+ 'pisell-floor-map-layout.edit-panel.pop-desc': string;
61
+ 'pisell-floor-map-layout.edit-panel.btn-delete': string;
62
+ 'pisell-floor-map-layout.edit-panel.btn-cancel': string;
63
+ 'pisell-floor-map-layout.edit-panel.btn-ok-delete': string;
64
+ };
65
+ 'zh-CN': {
66
+ 'pisell-floor-map-layout.loading': string;
67
+ 'pisell-floor-map-layout.read-canvas-tabs.aria': string;
68
+ 'pisell-floor-map-layout.edit-top-bar.aria': string;
69
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-enter-aria': string;
70
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-enter-title': string;
71
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-exit-aria': string;
72
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-exit-title': string;
73
+ 'pisell-floor-map-layout.edit-top-bar.unsaved': string;
74
+ 'pisell-floor-map-layout.edit-top-bar.save': string;
75
+ 'pisell-floor-map-layout.edit-top-bar.saving': string;
76
+ 'pisell-floor-map-layout.canvas-tabs.empty': string;
77
+ 'pisell-floor-map-layout.canvas-tabs.add': string;
78
+ 'pisell-floor-map-layout.canvas-tabs.add-title': string;
79
+ 'pisell-floor-map-layout.canvas-tabs.hint': string;
80
+ 'pisell-floor-map-layout.canvas-tabs.rename-aria': string;
81
+ 'pisell-floor-map-layout.canvas-tabs.remove-aria': string;
82
+ 'pisell-floor-map-layout.canvas-tabs.rename-title': string;
83
+ 'pisell-floor-map-layout.canvas-tabs.rename-button-aria': string;
84
+ 'pisell-floor-map-layout.canvas-tabs.rename-button-title': string;
85
+ 'pisell-floor-map-layout.canvas-tabs.default-new-canvas-name': string;
86
+ 'pisell-floor-map-layout.canvas-tabs.rename-modal-title': string;
87
+ 'pisell-floor-map-layout.canvas-tabs.rename-modal-ok': string;
88
+ 'pisell-floor-map-layout.canvas-tabs.rename-modal-cancel': string;
89
+ 'pisell-floor-map-layout.edit-panel.element-props': string;
90
+ 'pisell-floor-map-layout.edit-panel.close-aria': string;
91
+ 'pisell-floor-map-layout.edit-panel.hint-apply': string;
92
+ 'pisell-floor-map-layout.edit-panel.hint-save': string;
93
+ 'pisell-floor-map-layout.edit-panel.section-layout': string;
94
+ 'pisell-floor-map-layout.edit-panel.lock-on': string;
95
+ 'pisell-floor-map-layout.edit-panel.lock-off': string;
96
+ 'pisell-floor-map-layout.edit-panel.label-x': string;
97
+ 'pisell-floor-map-layout.edit-panel.label-y': string;
98
+ 'pisell-floor-map-layout.edit-panel.label-z': string;
99
+ 'pisell-floor-map-layout.edit-panel.label-width': string;
100
+ 'pisell-floor-map-layout.edit-panel.label-height': string;
101
+ 'pisell-floor-map-layout.edit-panel.label-name': string;
102
+ 'pisell-floor-map-layout.edit-panel.label-name-stage': string;
103
+ 'pisell-floor-map-layout.edit-panel.ph-name-stage': string;
104
+ 'pisell-floor-map-layout.edit-panel.ph-name': string;
105
+ 'pisell-floor-map-layout.edit-panel.label-image-url': string;
106
+ 'pisell-floor-map-layout.edit-panel.extra-image-url': string;
107
+ 'pisell-floor-map-layout.edit-panel.ph-https': string;
108
+ 'pisell-floor-map-layout.edit-panel.label-canvas': string;
109
+ 'pisell-floor-map-layout.edit-panel.apply': string;
110
+ 'pisell-floor-map-layout.edit-panel.data-binding': string;
111
+ 'pisell-floor-map-layout.edit-panel.data-binding-note': string;
112
+ 'pisell-floor-map-layout.edit-panel.label-data-source': string;
113
+ 'pisell-floor-map-layout.edit-panel.ph-data-source': string;
114
+ 'pisell-floor-map-layout.edit-panel.label-pick-row': string;
115
+ 'pisell-floor-map-layout.edit-panel.ph-pick-row': string;
116
+ 'pisell-floor-map-layout.edit-panel.ph-no-rows': string;
117
+ 'pisell-floor-map-layout.edit-panel.hint-unbound': string;
118
+ 'pisell-floor-map-layout.edit-panel.record-title': string;
119
+ 'pisell-floor-map-layout.edit-panel.pop-title': string;
120
+ 'pisell-floor-map-layout.edit-panel.pop-desc': string;
121
+ 'pisell-floor-map-layout.edit-panel.btn-delete': string;
122
+ 'pisell-floor-map-layout.edit-panel.btn-cancel': string;
123
+ 'pisell-floor-map-layout.edit-panel.btn-ok-delete': string;
124
+ };
125
+ 'zh-HK': {
126
+ 'pisell-floor-map-layout.loading': string;
127
+ 'pisell-floor-map-layout.read-canvas-tabs.aria': string;
128
+ 'pisell-floor-map-layout.edit-top-bar.aria': string;
129
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-enter-aria': string;
130
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-enter-title': string;
131
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-exit-aria': string;
132
+ 'pisell-floor-map-layout.edit-top-bar.fullscreen-exit-title': string;
133
+ 'pisell-floor-map-layout.edit-top-bar.unsaved': string;
134
+ 'pisell-floor-map-layout.edit-top-bar.save': string;
135
+ 'pisell-floor-map-layout.edit-top-bar.saving': string;
136
+ 'pisell-floor-map-layout.canvas-tabs.empty': string;
137
+ 'pisell-floor-map-layout.canvas-tabs.add': string;
138
+ 'pisell-floor-map-layout.canvas-tabs.add-title': string;
139
+ 'pisell-floor-map-layout.canvas-tabs.hint': string;
140
+ 'pisell-floor-map-layout.canvas-tabs.rename-aria': string;
141
+ 'pisell-floor-map-layout.canvas-tabs.remove-aria': string;
142
+ 'pisell-floor-map-layout.canvas-tabs.rename-title': string;
143
+ 'pisell-floor-map-layout.canvas-tabs.rename-button-aria': string;
144
+ 'pisell-floor-map-layout.canvas-tabs.rename-button-title': string;
145
+ 'pisell-floor-map-layout.canvas-tabs.default-new-canvas-name': string;
146
+ 'pisell-floor-map-layout.canvas-tabs.rename-modal-title': string;
147
+ 'pisell-floor-map-layout.canvas-tabs.rename-modal-ok': string;
148
+ 'pisell-floor-map-layout.canvas-tabs.rename-modal-cancel': string;
149
+ 'pisell-floor-map-layout.edit-panel.element-props': string;
150
+ 'pisell-floor-map-layout.edit-panel.close-aria': string;
151
+ 'pisell-floor-map-layout.edit-panel.hint-apply': string;
152
+ 'pisell-floor-map-layout.edit-panel.hint-save': string;
153
+ 'pisell-floor-map-layout.edit-panel.section-layout': string;
154
+ 'pisell-floor-map-layout.edit-panel.lock-on': string;
155
+ 'pisell-floor-map-layout.edit-panel.lock-off': string;
156
+ 'pisell-floor-map-layout.edit-panel.label-x': string;
157
+ 'pisell-floor-map-layout.edit-panel.label-y': string;
158
+ 'pisell-floor-map-layout.edit-panel.label-z': string;
159
+ 'pisell-floor-map-layout.edit-panel.label-width': string;
160
+ 'pisell-floor-map-layout.edit-panel.label-height': string;
161
+ 'pisell-floor-map-layout.edit-panel.label-name': string;
162
+ 'pisell-floor-map-layout.edit-panel.label-name-stage': string;
163
+ 'pisell-floor-map-layout.edit-panel.ph-name-stage': string;
164
+ 'pisell-floor-map-layout.edit-panel.ph-name': string;
165
+ 'pisell-floor-map-layout.edit-panel.label-image-url': string;
166
+ 'pisell-floor-map-layout.edit-panel.extra-image-url': string;
167
+ 'pisell-floor-map-layout.edit-panel.ph-https': string;
168
+ 'pisell-floor-map-layout.edit-panel.label-canvas': string;
169
+ 'pisell-floor-map-layout.edit-panel.apply': string;
170
+ 'pisell-floor-map-layout.edit-panel.data-binding': string;
171
+ 'pisell-floor-map-layout.edit-panel.data-binding-note': string;
172
+ 'pisell-floor-map-layout.edit-panel.label-data-source': string;
173
+ 'pisell-floor-map-layout.edit-panel.ph-data-source': string;
174
+ 'pisell-floor-map-layout.edit-panel.label-pick-row': string;
175
+ 'pisell-floor-map-layout.edit-panel.ph-pick-row': string;
176
+ 'pisell-floor-map-layout.edit-panel.ph-no-rows': string;
177
+ 'pisell-floor-map-layout.edit-panel.hint-unbound': string;
178
+ 'pisell-floor-map-layout.edit-panel.record-title': string;
179
+ 'pisell-floor-map-layout.edit-panel.pop-title': string;
180
+ 'pisell-floor-map-layout.edit-panel.pop-desc': string;
181
+ 'pisell-floor-map-layout.edit-panel.btn-delete': string;
182
+ 'pisell-floor-map-layout.edit-panel.btn-cancel': string;
183
+ 'pisell-floor-map-layout.edit-panel.btn-ok-delete': string;
184
+ };
185
+ };
186
+ export default _default;