@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,81 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pisellTimeNavigator/components/NowButton.tsx
30
+ var NowButton_exports = {};
31
+ __export(NowButton_exports, {
32
+ NowButton: () => NowButton
33
+ });
34
+ module.exports = __toCommonJS(NowButton_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_utils = require("@pisell/utils");
37
+ var import_classnames = __toESM(require("classnames"));
38
+ var I18N_NOW = "pisell-time-navigator.now";
39
+ function NowButton({
40
+ orientation,
41
+ onClick,
42
+ style,
43
+ className,
44
+ renderCustom
45
+ }) {
46
+ const raw = import_utils.locales.getText(I18N_NOW);
47
+ const label = raw && raw !== I18N_NOW ? raw : "Now";
48
+ if (renderCustom) {
49
+ return /* @__PURE__ */ import_react.default.createElement(
50
+ "button",
51
+ {
52
+ type: "button",
53
+ className: (0, import_classnames.default)("pisell-time-navigator-now", className),
54
+ onClick,
55
+ style,
56
+ "aria-label": label
57
+ },
58
+ renderCustom()
59
+ );
60
+ }
61
+ return /* @__PURE__ */ import_react.default.createElement(
62
+ "button",
63
+ {
64
+ type: "button",
65
+ className: (0, import_classnames.default)(
66
+ "pisell-time-navigator-now",
67
+ `pisell-time-navigator-now--${orientation}`,
68
+ className
69
+ ),
70
+ onClick,
71
+ style,
72
+ "aria-label": label
73
+ },
74
+ /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-now-icon", "aria-hidden": true }),
75
+ /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-now-label" }, label)
76
+ );
77
+ }
78
+ // Annotate the CommonJS export names for ESM import in node:
79
+ 0 && (module.exports = {
80
+ NowButton
81
+ });
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { Dayjs } from 'dayjs';
3
+ export interface ScaleLayerProps {
4
+ orientation: 'horizontal' | 'vertical';
5
+ ticks: Dayjs[];
6
+ stepMinutes: number;
7
+ majorStepMinutes: number;
8
+ timeFormat: string;
9
+ locale?: string;
10
+ style?: React.CSSProperties;
11
+ className?: string;
12
+ }
13
+ /**
14
+ * 刻度层:渲染时间刻度与标签
15
+ * 横向:整点数字 + 小圆点;竖向:整点/半点数字 + 分割线
16
+ */
17
+ export declare function ScaleLayer({ orientation, ticks, stepMinutes, majorStepMinutes, timeFormat, locale, style, className, }: ScaleLayerProps): JSX.Element;
@@ -0,0 +1,95 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pisellTimeNavigator/components/ScaleLayer.tsx
30
+ var ScaleLayer_exports = {};
31
+ __export(ScaleLayer_exports, {
32
+ ScaleLayer: () => ScaleLayer
33
+ });
34
+ module.exports = __toCommonJS(ScaleLayer_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_classnames = __toESM(require("classnames"));
37
+ function ScaleLayer({
38
+ orientation,
39
+ ticks,
40
+ stepMinutes,
41
+ majorStepMinutes,
42
+ timeFormat,
43
+ locale,
44
+ style,
45
+ className
46
+ }) {
47
+ const isHorizontal = orientation === "horizontal";
48
+ return /* @__PURE__ */ import_react.default.createElement(
49
+ "div",
50
+ {
51
+ className: (0, import_classnames.default)(
52
+ "pisell-time-navigator-scale",
53
+ `pisell-time-navigator-scale--${orientation}`,
54
+ className
55
+ ),
56
+ style
57
+ },
58
+ ticks.map((tick, i) => {
59
+ const isMajor = tick.minute() % majorStepMinutes === 0;
60
+ const label = isHorizontal && isMajor ? locale ? tick.locale(locale).format("H") : tick.format("H") : locale ? tick.locale(locale).format(timeFormat) : tick.format(timeFormat);
61
+ if (isHorizontal) {
62
+ return /* @__PURE__ */ import_react.default.createElement(
63
+ "div",
64
+ {
65
+ key: i,
66
+ className: (0, import_classnames.default)(
67
+ "pisell-time-navigator-scale-cell",
68
+ "pisell-time-navigator-scale-cell--h",
69
+ { "pisell-time-navigator-scale-cell--major": isMajor }
70
+ )
71
+ },
72
+ isMajor && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-scale-label" }, label),
73
+ !isMajor && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-scale-dot", "aria-hidden": true })
74
+ );
75
+ }
76
+ return /* @__PURE__ */ import_react.default.createElement(
77
+ "div",
78
+ {
79
+ key: i,
80
+ className: (0, import_classnames.default)(
81
+ "pisell-time-navigator-scale-cell",
82
+ "pisell-time-navigator-scale-cell--v",
83
+ { "pisell-time-navigator-scale-cell--major": isMajor }
84
+ )
85
+ },
86
+ /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-scale-divider", "aria-hidden": true }),
87
+ isMajor && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-scale-label" }, label)
88
+ );
89
+ })
90
+ );
91
+ }
92
+ // Annotate the CommonJS export names for ESM import in node:
93
+ 0 && (module.exports = {
94
+ ScaleLayer
95
+ });
@@ -0,0 +1,5 @@
1
+ export { BackgroundLayer } from './BackgroundLayer';
2
+ export { CursorLayer } from './CursorLayer';
3
+ export { GestureLayer } from './GestureLayer';
4
+ export { NowButton } from './NowButton';
5
+ export { ScaleLayer } from './ScaleLayer';
@@ -0,0 +1,41 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/pisellTimeNavigator/components/index.tsx
20
+ var components_exports = {};
21
+ __export(components_exports, {
22
+ BackgroundLayer: () => import_BackgroundLayer.BackgroundLayer,
23
+ CursorLayer: () => import_CursorLayer.CursorLayer,
24
+ GestureLayer: () => import_GestureLayer.GestureLayer,
25
+ NowButton: () => import_NowButton.NowButton,
26
+ ScaleLayer: () => import_ScaleLayer.ScaleLayer
27
+ });
28
+ module.exports = __toCommonJS(components_exports);
29
+ var import_BackgroundLayer = require("./BackgroundLayer");
30
+ var import_CursorLayer = require("./CursorLayer");
31
+ var import_GestureLayer = require("./GestureLayer");
32
+ var import_NowButton = require("./NowButton");
33
+ var import_ScaleLayer = require("./ScaleLayer");
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ BackgroundLayer,
37
+ CursorLayer,
38
+ GestureLayer,
39
+ NowButton,
40
+ ScaleLayer
41
+ });
@@ -0,0 +1,5 @@
1
+ export { useTimeAxis } from './useTimeAxis';
2
+ export type { UseTimeAxisOptions, TimeAxisState } from './useTimeAxis';
3
+ export { useRealtime } from './useRealtime';
4
+ export { useDragInertia } from './useDragInertia';
5
+ export type { UseDragInertiaOptions } from './useDragInertia';
@@ -0,0 +1,35 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/pisellTimeNavigator/hooks/index.ts
20
+ var hooks_exports = {};
21
+ __export(hooks_exports, {
22
+ useDragInertia: () => import_useDragInertia.useDragInertia,
23
+ useRealtime: () => import_useRealtime.useRealtime,
24
+ useTimeAxis: () => import_useTimeAxis.useTimeAxis
25
+ });
26
+ module.exports = __toCommonJS(hooks_exports);
27
+ var import_useTimeAxis = require("./useTimeAxis");
28
+ var import_useRealtime = require("./useRealtime");
29
+ var import_useDragInertia = require("./useDragInertia");
30
+ // Annotate the CommonJS export names for ESM import in node:
31
+ 0 && (module.exports = {
32
+ useDragInertia,
33
+ useRealtime,
34
+ useTimeAxis
35
+ });
@@ -0,0 +1,14 @@
1
+ export interface UseDragInertiaOptions {
2
+ enabled: boolean;
3
+ orientation: 'horizontal' | 'vertical';
4
+ getScrollContainer: () => HTMLElement | null;
5
+ }
6
+ /**
7
+ * 惯性滚动:根据拖动末段速度在松手后继续滚动并衰减
8
+ */
9
+ export declare function useDragInertia(options: UseDragInertiaOptions): {
10
+ onPointerDown: (e: React.PointerEvent) => void;
11
+ onPointerMove: (e: React.PointerEvent) => void;
12
+ onPointerUp: (e: React.PointerEvent) => void;
13
+ stopInertia: () => void;
14
+ };
@@ -0,0 +1,136 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/pisellTimeNavigator/hooks/useDragInertia.ts
20
+ var useDragInertia_exports = {};
21
+ __export(useDragInertia_exports, {
22
+ useDragInertia: () => useDragInertia
23
+ });
24
+ module.exports = __toCommonJS(useDragInertia_exports);
25
+ var import_react = require("react");
26
+ var DECAY = 0.95;
27
+ var MIN_VELOCITY = 0.5;
28
+ var SAMPLE_MS = 50;
29
+ function useDragInertia(options) {
30
+ const { enabled, orientation, getScrollContainer } = options;
31
+ const rafId = (0, import_react.useRef)(null);
32
+ const lastPos = (0, import_react.useRef)(0);
33
+ const lastTime = (0, import_react.useRef)(0);
34
+ const velocity = (0, import_react.useRef)(0);
35
+ const samples = (0, import_react.useRef)([]);
36
+ const applyScroll = (0, import_react.useCallback)(
37
+ (delta) => {
38
+ const el = getScrollContainer();
39
+ if (!el) return;
40
+ if (orientation === "horizontal") {
41
+ el.scrollLeft = Math.max(0, el.scrollLeft + delta);
42
+ } else {
43
+ el.scrollTop = Math.max(0, el.scrollTop + delta);
44
+ }
45
+ },
46
+ [getScrollContainer, orientation]
47
+ );
48
+ const lastTickTime = (0, import_react.useRef)(0);
49
+ const tick = (0, import_react.useCallback)(
50
+ (now) => {
51
+ const t = now ?? performance.now();
52
+ const dt = lastTickTime.current ? (t - lastTickTime.current) / 1e3 : 0.016;
53
+ lastTickTime.current = t;
54
+ const v = velocity.current;
55
+ if (Math.abs(v) < MIN_VELOCITY) {
56
+ velocity.current = 0;
57
+ lastTickTime.current = 0;
58
+ return;
59
+ }
60
+ applyScroll(v * dt);
61
+ velocity.current = v * DECAY;
62
+ rafId.current = requestAnimationFrame(tick);
63
+ },
64
+ [applyScroll]
65
+ );
66
+ const stopInertia = (0, import_react.useCallback)(() => {
67
+ if (rafId.current != null) {
68
+ cancelAnimationFrame(rafId.current);
69
+ rafId.current = null;
70
+ }
71
+ velocity.current = 0;
72
+ samples.current = [];
73
+ }, []);
74
+ const onPointerDown = (0, import_react.useCallback)(
75
+ (e) => {
76
+ if (!enabled) return;
77
+ stopInertia();
78
+ const pos = orientation === "horizontal" ? e.clientX : e.clientY;
79
+ lastPos.current = pos;
80
+ lastTime.current = Date.now();
81
+ samples.current = [{ pos, t: lastTime.current }];
82
+ },
83
+ [enabled, orientation, stopInertia]
84
+ );
85
+ const onPointerMove = (0, import_react.useCallback)(
86
+ (e) => {
87
+ if (!enabled) return;
88
+ const pos = orientation === "horizontal" ? e.clientX : e.clientY;
89
+ const t = Date.now();
90
+ const el = getScrollContainer();
91
+ if (el) {
92
+ const scroll = orientation === "horizontal" ? el.scrollLeft : el.scrollTop;
93
+ const delta = pos - lastPos.current;
94
+ const maxScroll = orientation === "horizontal" ? el.scrollWidth - el.clientWidth : el.scrollHeight - el.clientHeight;
95
+ const next = Math.max(0, Math.min(maxScroll, scroll + delta));
96
+ if (orientation === "horizontal") {
97
+ el.scrollLeft = next;
98
+ } else {
99
+ el.scrollTop = next;
100
+ }
101
+ }
102
+ lastPos.current = pos;
103
+ lastTime.current = t;
104
+ samples.current.push({ pos, t });
105
+ const cutoff = t - SAMPLE_MS;
106
+ while (samples.current.length > 1 && samples.current[0].t < cutoff) {
107
+ samples.current.shift();
108
+ }
109
+ },
110
+ [enabled, orientation, getScrollContainer]
111
+ );
112
+ const onPointerUp = (0, import_react.useCallback)(
113
+ (e) => {
114
+ if (!enabled) return;
115
+ const arr = samples.current;
116
+ if (arr.length < 2) return;
117
+ const first = arr[0];
118
+ const last = arr[arr.length - 1];
119
+ const dt = (last.t - first.t) / 1e3;
120
+ if (dt <= 0) return;
121
+ const scrollEl = getScrollContainer();
122
+ if (!scrollEl) return;
123
+ const scroll = orientation === "horizontal" ? scrollEl.scrollLeft : scrollEl.scrollTop;
124
+ const totalDelta = last.pos - first.pos;
125
+ velocity.current = totalDelta / dt;
126
+ stopInertia();
127
+ rafId.current = requestAnimationFrame(tick);
128
+ },
129
+ [enabled, orientation, getScrollContainer, stopInertia, tick]
130
+ );
131
+ return { onPointerDown, onPointerMove, onPointerUp, stopInertia };
132
+ }
133
+ // Annotate the CommonJS export names for ESM import in node:
134
+ 0 && (module.exports = {
135
+ useDragInertia
136
+ });
@@ -0,0 +1,5 @@
1
+ import type { Dayjs } from 'dayjs';
2
+ /**
3
+ * Realtime 模式:每秒将当前系统时间通过 onTick 回传
4
+ */
5
+ export declare function useRealtime(enabled: boolean, onTick: (now: Dayjs) => void): void;
@@ -0,0 +1,49 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pisellTimeNavigator/hooks/useRealtime.ts
30
+ var useRealtime_exports = {};
31
+ __export(useRealtime_exports, {
32
+ useRealtime: () => useRealtime
33
+ });
34
+ module.exports = __toCommonJS(useRealtime_exports);
35
+ var import_react = require("react");
36
+ var import_dayjs = __toESM(require("dayjs"));
37
+ function useRealtime(enabled, onTick) {
38
+ (0, import_react.useEffect)(() => {
39
+ if (!enabled) return;
40
+ const id = setInterval(() => {
41
+ onTick((0, import_dayjs.default)());
42
+ }, 1e3);
43
+ return () => clearInterval(id);
44
+ }, [enabled, onTick]);
45
+ }
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ useRealtime
49
+ });
@@ -0,0 +1,27 @@
1
+ import type { Dayjs } from 'dayjs';
2
+ import type { TimeRangeOption } from '../types';
3
+ export interface UseTimeAxisOptions {
4
+ range?: TimeRangeOption;
5
+ stepMinutes: number;
6
+ referenceDate: Dayjs;
7
+ orientation: 'horizontal' | 'vertical';
8
+ /** 横向时每格宽度(px),竖向时每格高度(px) */
9
+ cellSizePx: number;
10
+ }
11
+ export interface TimeAxisState {
12
+ rangeStart: Dayjs;
13
+ rangeEnd: Dayjs;
14
+ ticks: Dayjs[];
15
+ /** 时间转主轴偏移(px) */
16
+ timeToOffset: (t: Dayjs) => number;
17
+ /** 主轴偏移(px)转时间(最近刻度,用于刻度对齐) */
18
+ offsetToTime: (offset: number) => Dayjs | null;
19
+ /** 主轴偏移(px)转时间(连续插值,用于拖动时按分钟步长显示) */
20
+ offsetToTimeContinuous: (offset: number) => Dayjs | null;
21
+ /** 主轴总长度(px) */
22
+ totalLengthPx: number;
23
+ }
24
+ /**
25
+ * 时间轴刻度与时间↔像素换算
26
+ */
27
+ export declare function useTimeAxis(options: UseTimeAxisOptions): TimeAxisState;
@@ -0,0 +1,81 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/pisellTimeNavigator/hooks/useTimeAxis.ts
20
+ var useTimeAxis_exports = {};
21
+ __export(useTimeAxis_exports, {
22
+ useTimeAxis: () => useTimeAxis
23
+ });
24
+ module.exports = __toCommonJS(useTimeAxis_exports);
25
+ var import_react = require("react");
26
+ var import_utils = require("../utils");
27
+ function useTimeAxis(options) {
28
+ const { range, stepMinutes, referenceDate, orientation, cellSizePx } = options;
29
+ return (0, import_react.useMemo)(() => {
30
+ const [rangeStart, rangeEnd] = (0, import_utils.getRangeBounds)(range, referenceDate);
31
+ const ticks = (0, import_utils.getTicks)(rangeStart, rangeEnd, stepMinutes);
32
+ const lastTick = ticks.length > 0 ? ticks[ticks.length - 1] : null;
33
+ const needTailCell = orientation === "horizontal" && lastTick != null && rangeEnd.isAfter(lastTick);
34
+ const noTailVertical = orientation === "vertical" && lastTick != null && !rangeEnd.isAfter(lastTick);
35
+ const effectiveTicks = noTailVertical && ticks.length > 0 ? ticks.slice(0, -1) : ticks;
36
+ const rawTotalPx = orientation === "vertical" ? effectiveTicks.length * cellSizePx : (ticks.length + (needTailCell ? 1 : 0)) * cellSizePx;
37
+ const totalLengthPx = Math.min(rawTotalPx, 5e5);
38
+ const dotOffsetPx = orientation === "vertical" ? 0 : cellSizePx / 2;
39
+ const maxOffsetPx = orientation === "vertical" ? totalLengthPx : dotOffsetPx + (needTailCell ? ticks.length : Math.max(0, ticks.length - 1)) * cellSizePx;
40
+ const timeToOffset = (t) => {
41
+ const diffMs = t.diff(rangeStart);
42
+ const diffMin = diffMs / (60 * 1e3);
43
+ const index = diffMin / stepMinutes;
44
+ const px = dotOffsetPx + index * cellSizePx;
45
+ return Math.max(dotOffsetPx, Math.min(px, maxOffsetPx));
46
+ };
47
+ const offsetToTime = (offset) => {
48
+ const index = Math.round((offset - dotOffsetPx) / cellSizePx);
49
+ const tick = effectiveTicks[index];
50
+ return tick ?? null;
51
+ };
52
+ const offsetToTimeContinuous = (offset) => {
53
+ const index = (offset - dotOffsetPx) / cellSizePx;
54
+ const minutesFromStart = index * stepMinutes;
55
+ let t = rangeStart.add(minutesFromStart, "minute");
56
+ if (t.isBefore(rangeStart)) return rangeStart;
57
+ if (t.isAfter(rangeEnd)) return rangeEnd;
58
+ return t;
59
+ };
60
+ return {
61
+ rangeStart,
62
+ rangeEnd,
63
+ ticks: effectiveTicks,
64
+ timeToOffset,
65
+ offsetToTime,
66
+ offsetToTimeContinuous,
67
+ totalLengthPx
68
+ };
69
+ }, [
70
+ range == null ? void 0 : range.start,
71
+ range == null ? void 0 : range.end,
72
+ stepMinutes,
73
+ referenceDate.valueOf(),
74
+ orientation,
75
+ cellSizePx
76
+ ]);
77
+ }
78
+ // Annotate the CommonJS export names for ESM import in node:
79
+ 0 && (module.exports = {
80
+ useTimeAxis
81
+ });
@@ -0,0 +1,4 @@
1
+ export { PisellTimeNavigator } from './PisellTimeNavigator';
2
+ export type { PisellTimeNavigatorProps, TimeNavigatorValue, TimeRangeOption, CursorMode, TimeNavigatorOrientation, } from './types';
3
+ /** 多语言文案(en / zh-CN / zh-HK / ja / pt),使用前请在应用内通过 locales.init(pisellTimeNavigatorLocales, lang) 合并 */
4
+ export { default as pisellTimeNavigatorLocales } from './locales';
@@ -0,0 +1,42 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pisellTimeNavigator/index.tsx
30
+ var pisellTimeNavigator_exports = {};
31
+ __export(pisellTimeNavigator_exports, {
32
+ PisellTimeNavigator: () => import_PisellTimeNavigator.PisellTimeNavigator,
33
+ pisellTimeNavigatorLocales: () => import_locales.default
34
+ });
35
+ module.exports = __toCommonJS(pisellTimeNavigator_exports);
36
+ var import_PisellTimeNavigator = require("./PisellTimeNavigator");
37
+ var import_locales = __toESM(require("./locales"));
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ PisellTimeNavigator,
41
+ pisellTimeNavigatorLocales
42
+ });