@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,290 @@
1
+ import React from 'react';
2
+ import { PisellTimeNavigator } from "./PisellTimeNavigator";
3
+
4
+ /**
5
+ * PisellTimeNavigator 组件 Storybook
6
+ * 时间导航轴:时间范围内浏览、选择、控制
7
+ */
8
+ var meta = {
9
+ title: 'Data Entry/PisellTimeNavigator',
10
+ component: PisellTimeNavigator,
11
+ tags: ['autodocs'],
12
+ argTypes: {
13
+ cursorMode: {
14
+ control: 'radio',
15
+ options: ['axis-moves', 'cursor-moves'],
16
+ description: '指示器/轴移动模式'
17
+ },
18
+ orientation: {
19
+ control: 'radio',
20
+ options: ['horizontal', 'vertical'],
21
+ description: '横向/竖向'
22
+ },
23
+ realtime: {
24
+ control: 'boolean',
25
+ description: '是否实时跟随系统时间'
26
+ },
27
+ showNowButton: {
28
+ control: 'boolean',
29
+ description: '是否显示 Now 按钮'
30
+ },
31
+ snapToStep: {
32
+ control: 'boolean',
33
+ description: '是否吸附到刻度'
34
+ },
35
+ inertia: {
36
+ control: 'boolean',
37
+ description: '是否开启惯性滚动'
38
+ },
39
+ locale: {
40
+ control: 'select',
41
+ options: ['zh-cn', 'en', 'zh-hk'],
42
+ description: '语言'
43
+ }
44
+ }
45
+ };
46
+ export default meta;
47
+ var verticalDecorator = function verticalDecorator(Story) {
48
+ return /*#__PURE__*/React.createElement("div", {
49
+ style: {
50
+ width: 54,
51
+ height: 500
52
+ }
53
+ }, /*#__PURE__*/React.createElement(Story, null));
54
+ };
55
+
56
+ /**
57
+ * 默认:横向、轴动、显示 Now
58
+ */
59
+ export var Default = {
60
+ args: {}
61
+ };
62
+
63
+ /** 默认 - 竖向 */
64
+ export var DefaultVertical = {
65
+ args: {
66
+ orientation: 'vertical'
67
+ },
68
+ decorators: [verticalDecorator]
69
+ };
70
+
71
+ /**
72
+ * 受控 + 默认 12:00
73
+ */
74
+ export var Controlled = {
75
+ args: {
76
+ value: '12:00',
77
+ onChange: function onChange(v) {
78
+ return console.log('onChange', v === null || v === void 0 ? void 0 : v.format('HH:mm'));
79
+ }
80
+ }
81
+ };
82
+
83
+ /** 受控 - 竖向 */
84
+ export var ControlledVertical = {
85
+ args: {
86
+ orientation: 'vertical',
87
+ value: '12:00',
88
+ onChange: function onChange(v) {
89
+ return console.log('onChange', v === null || v === void 0 ? void 0 : v.format('HH:mm'));
90
+ }
91
+ },
92
+ decorators: [verticalDecorator]
93
+ };
94
+
95
+ /**
96
+ * 非受控 + 默认 14:30
97
+ */
98
+ export var Uncontrolled = {
99
+ args: {
100
+ defaultValue: '14:30'
101
+ }
102
+ };
103
+
104
+ /** 非受控 - 竖向 */
105
+ export var UncontrolledVertical = {
106
+ args: {
107
+ orientation: 'vertical',
108
+ defaultValue: '14:30'
109
+ },
110
+ decorators: [verticalDecorator]
111
+ };
112
+
113
+ /**
114
+ * 竖向
115
+ */
116
+ export var Vertical = {
117
+ args: {
118
+ orientation: 'vertical',
119
+ defaultValue: '12:00'
120
+ },
121
+ decorators: [verticalDecorator]
122
+ };
123
+
124
+ /**
125
+ * 指针动模式(cursor-moves)
126
+ */
127
+ export var CursorMoves = {
128
+ args: {
129
+ cursorMode: 'cursor-moves',
130
+ defaultValue: '10:00'
131
+ }
132
+ };
133
+
134
+ /** 指针动模式 - 竖向 */
135
+ export var CursorMovesVertical = {
136
+ args: {
137
+ orientation: 'vertical',
138
+ cursorMode: 'cursor-moves',
139
+ defaultValue: '10:00'
140
+ },
141
+ decorators: [verticalDecorator]
142
+ };
143
+
144
+ /**
145
+ * 营业时间高亮 10:00–22:00
146
+ */
147
+ export var BusinessHours = {
148
+ args: {
149
+ businessHours: {
150
+ start: '10:00',
151
+ end: '22:00'
152
+ },
153
+ defaultValue: '14:00'
154
+ }
155
+ };
156
+
157
+ /** 营业时间高亮 - 竖向 */
158
+ export var BusinessHoursVertical = {
159
+ args: {
160
+ orientation: 'vertical',
161
+ businessHours: {
162
+ start: '10:00',
163
+ end: '22:00'
164
+ },
165
+ defaultValue: '14:00'
166
+ },
167
+ decorators: [verticalDecorator]
168
+ };
169
+
170
+ /**
171
+ * 自定义时间范围 08:00–20:00
172
+ */
173
+ export var CustomRange = {
174
+ args: {
175
+ range: {
176
+ start: '08:00',
177
+ end: '20:00'
178
+ },
179
+ defaultValue: '12:00'
180
+ }
181
+ };
182
+
183
+ /** 自定义时间范围 - 竖向 */
184
+ export var CustomRangeVertical = {
185
+ args: {
186
+ orientation: 'vertical',
187
+ range: {
188
+ start: '08:00',
189
+ end: '20:00'
190
+ },
191
+ defaultValue: '12:00'
192
+ },
193
+ decorators: [verticalDecorator]
194
+ };
195
+
196
+ /**
197
+ * 步长 30 分钟
198
+ */
199
+ export var Step30 = {
200
+ args: {
201
+ stepMinutes: 30,
202
+ defaultValue: '12:30'
203
+ }
204
+ };
205
+
206
+ /** 步长 30 分钟 - 竖向 */
207
+ export var Step30Vertical = {
208
+ args: {
209
+ orientation: 'vertical',
210
+ stepMinutes: 30,
211
+ defaultValue: '12:30'
212
+ },
213
+ decorators: [verticalDecorator]
214
+ };
215
+
216
+ /**
217
+ * 惯性滚动开启
218
+ */
219
+ export var Inertia = {
220
+ args: {
221
+ inertia: true,
222
+ defaultValue: '12:00'
223
+ }
224
+ };
225
+
226
+ /** 惯性滚动 - 竖向 */
227
+ export var InertiaVertical = {
228
+ args: {
229
+ orientation: 'vertical',
230
+ inertia: true,
231
+ defaultValue: '12:00'
232
+ },
233
+ decorators: [verticalDecorator]
234
+ };
235
+
236
+ /**
237
+ * 吸附到整点(松手后自动吸附到 0/15/30/45 分刻度)
238
+ */
239
+ export var SnapToStep = {
240
+ args: {
241
+ snapToStep: true,
242
+ defaultValue: '12:00'
243
+ }
244
+ };
245
+
246
+ /** 吸附到整点 - 竖向 */
247
+ export var SnapToStepVertical = {
248
+ args: {
249
+ orientation: 'vertical',
250
+ snapToStep: true,
251
+ defaultValue: '12:00'
252
+ },
253
+ decorators: [verticalDecorator]
254
+ };
255
+
256
+ /**
257
+ * 隐藏 Now 按钮
258
+ */
259
+ export var NoNowButton = {
260
+ args: {
261
+ showNowButton: false
262
+ }
263
+ };
264
+
265
+ /** 隐藏 Now 按钮 - 竖向 */
266
+ export var NoNowButtonVertical = {
267
+ args: {
268
+ orientation: 'vertical',
269
+ showNowButton: false
270
+ },
271
+ decorators: [verticalDecorator]
272
+ };
273
+
274
+ /**
275
+ * 实时模式(仅演示,实际会跟随系统时间)
276
+ */
277
+ export var Realtime = {
278
+ args: {
279
+ realtime: true
280
+ }
281
+ };
282
+
283
+ /** 实时模式 - 竖向 */
284
+ export var RealtimeVertical = {
285
+ args: {
286
+ orientation: 'vertical',
287
+ realtime: true
288
+ },
289
+ decorators: [verticalDecorator]
290
+ };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface BackgroundLayerProps {
3
+ orientation: 'horizontal' | 'vertical';
4
+ /** 过去时间淡化色 */
5
+ pastTimeFade?: string;
6
+ /** 营业时间区间 [startPx, endPx],用于视觉高亮 */
7
+ businessHoursPx?: [number, number];
8
+ className?: string;
9
+ style?: React.CSSProperties;
10
+ }
11
+ /**
12
+ * 背景区间层:营业时间高亮、过去时间淡化等(当前时间渐变已拆为独立块,见 axis-wrap 内 .pisell-time-navigator-current-gradient)
13
+ */
14
+ export declare function BackgroundLayer({ orientation, pastTimeFade, businessHoursPx, className, style, }: BackgroundLayerProps): JSX.Element;
@@ -0,0 +1,30 @@
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 _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; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ 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); }
5
+ import React from 'react';
6
+ import classNames from 'classnames';
7
+ /**
8
+ * 背景区间层:营业时间高亮、过去时间淡化等(当前时间渐变已拆为独立块,见 axis-wrap 内 .pisell-time-navigator-current-gradient)
9
+ */
10
+ export function BackgroundLayer(_ref) {
11
+ var orientation = _ref.orientation,
12
+ pastTimeFade = _ref.pastTimeFade,
13
+ businessHoursPx = _ref.businessHoursPx,
14
+ className = _ref.className,
15
+ style = _ref.style;
16
+ var isHorizontal = orientation === 'horizontal';
17
+ return /*#__PURE__*/React.createElement("div", {
18
+ className: classNames('pisell-time-navigator-background', "pisell-time-navigator-background--".concat(orientation), className),
19
+ style: style,
20
+ "aria-hidden": true
21
+ }, businessHoursPx != null && /*#__PURE__*/React.createElement("div", {
22
+ className: "pisell-time-navigator-background-business",
23
+ style: _defineProperty(_defineProperty({}, isHorizontal ? 'left' : 'top', businessHoursPx[0]), isHorizontal ? 'width' : 'height', Math.max(0, businessHoursPx[1] - businessHoursPx[0]))
24
+ }), pastTimeFade && /*#__PURE__*/React.createElement("div", {
25
+ className: "pisell-time-navigator-background-past",
26
+ style: {
27
+ background: pastTimeFade
28
+ }
29
+ }));
30
+ }
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { Dayjs } from 'dayjs';
3
+ export interface CursorLayerProps {
4
+ orientation: 'horizontal' | 'vertical';
5
+ value: Dayjs | null;
6
+ timeFormat: string;
7
+ locale?: string;
8
+ isRealtime: boolean;
9
+ offsetPx: number;
10
+ /** axis-moves 时固定于视口中央,不应用 offsetPx */
11
+ fixedCenter?: boolean;
12
+ style?: React.CSSProperties;
13
+ className?: string;
14
+ }
15
+ /**
16
+ * 时间指示器层:竖线/横线 + 时间气泡
17
+ * 对齐基准为内部的竖线/横线,不是整块(气泡)的边或中心。
18
+ * 横向:竖线 3px;竖向:横线 2px。Realtime 态 #FF692E,浏览态 #344054
19
+ */
20
+ export declare function CursorLayer({ orientation, value, timeFormat, locale, isRealtime, offsetPx, fixedCenter, style, className, }: CursorLayerProps): JSX.Element | null;
@@ -0,0 +1,46 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import React from 'react';
8
+ import classNames from 'classnames';
9
+ /** 横向竖线宽度、竖向横线高度,用于以「线」为锚点定位,而非整块中心 */
10
+ var CURSOR_LINE_WIDTH_H = 3;
11
+ var CURSOR_LINE_HEIGHT_V = 2;
12
+
13
+ /**
14
+ * 时间指示器层:竖线/横线 + 时间气泡
15
+ * 对齐基准为内部的竖线/横线,不是整块(气泡)的边或中心。
16
+ * 横向:竖线 3px;竖向:横线 2px。Realtime 态 #FF692E,浏览态 #344054
17
+ */
18
+ export function CursorLayer(_ref) {
19
+ var orientation = _ref.orientation,
20
+ value = _ref.value,
21
+ timeFormat = _ref.timeFormat,
22
+ locale = _ref.locale,
23
+ isRealtime = _ref.isRealtime,
24
+ offsetPx = _ref.offsetPx,
25
+ fixedCenter = _ref.fixedCenter,
26
+ style = _ref.style,
27
+ className = _ref.className;
28
+ if (value == null) return null;
29
+ var label = locale ? value.locale(locale).format(timeFormat) : value.format(timeFormat);
30
+ var isHorizontal = orientation === 'horizontal';
31
+ /** 以竖线/横线中心为 offsetPx,故定位到 offsetPx - 线宽/2 */
32
+ var lineOffset = offsetPx - (isHorizontal ? CURSOR_LINE_WIDTH_H / 2 : CURSOR_LINE_HEIGHT_V / 2);
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ className: classNames('pisell-time-navigator-cursor', "pisell-time-navigator-cursor--".concat(orientation), {
35
+ 'pisell-time-navigator-cursor--realtime': isRealtime
36
+ }, {
37
+ 'pisell-time-navigator-cursor--fixed': fixedCenter
38
+ }, className),
39
+ style: fixedCenter ? style : _objectSpread(_objectSpread({}, style), {}, _defineProperty({}, isHorizontal ? 'left' : 'top', lineOffset)),
40
+ "aria-hidden": true
41
+ }, /*#__PURE__*/React.createElement("span", {
42
+ className: "pisell-time-navigator-cursor-line"
43
+ }), /*#__PURE__*/React.createElement("span", {
44
+ className: "pisell-time-navigator-cursor-bubble"
45
+ }, label));
46
+ }
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import type { Dayjs } from 'dayjs';
3
+ export interface GestureLayerProps {
4
+ orientation: 'horizontal' | 'vertical';
5
+ cellSizePx: number;
6
+ /** 轴在滚动内容中的起始边距(左/上),用于把「滚动内容坐标」转为「轴内偏移」(与 dot 对齐) */
7
+ axisStartMarginPx: number;
8
+ offsetToTime: (offset: number) => Dayjs | null;
9
+ onSelectTime: (t: Dayjs) => void;
10
+ isInDisabledRanges: (t: Dayjs) => boolean;
11
+ snapToStep: boolean;
12
+ stepMinutes: number;
13
+ snapFn: (t: Dayjs) => Dayjs;
14
+ scrollPosition: {
15
+ scrollLeft: number;
16
+ scrollTop: number;
17
+ };
18
+ viewportSize: {
19
+ w: number;
20
+ h: number;
21
+ };
22
+ onPointerDown?: React.PointerEventHandler;
23
+ onPointerMove?: React.PointerEventHandler;
24
+ onPointerUp?: React.PointerEventHandler;
25
+ onPointerLeave?: React.PointerEventHandler;
26
+ children: React.ReactNode;
27
+ }
28
+ /**
29
+ * 交互层:点击刻度跳转、键盘左右/上下 + 回车
30
+ */
31
+ export declare function GestureLayer({ orientation, cellSizePx, axisStartMarginPx, offsetToTime, onSelectTime, isInDisabledRanges, snapToStep, stepMinutes, snapFn, scrollPosition, viewportSize, onPointerDown, onPointerMove, onPointerUp, onPointerLeave, children, }: GestureLayerProps): JSX.Element;
@@ -0,0 +1,82 @@
1
+ import React, { useCallback } from 'react';
2
+ /**
3
+ * 交互层:点击刻度跳转、键盘左右/上下 + 回车
4
+ */
5
+ export function GestureLayer(_ref) {
6
+ var orientation = _ref.orientation,
7
+ cellSizePx = _ref.cellSizePx,
8
+ axisStartMarginPx = _ref.axisStartMarginPx,
9
+ offsetToTime = _ref.offsetToTime,
10
+ onSelectTime = _ref.onSelectTime,
11
+ isInDisabledRanges = _ref.isInDisabledRanges,
12
+ snapToStep = _ref.snapToStep,
13
+ stepMinutes = _ref.stepMinutes,
14
+ snapFn = _ref.snapFn,
15
+ scrollPosition = _ref.scrollPosition,
16
+ viewportSize = _ref.viewportSize,
17
+ onPointerDown = _ref.onPointerDown,
18
+ onPointerMove = _ref.onPointerMove,
19
+ onPointerUp = _ref.onPointerUp,
20
+ onPointerLeave = _ref.onPointerLeave,
21
+ children = _ref.children;
22
+ var isHorizontal = orientation === 'horizontal';
23
+ var handleClick = useCallback(function (e) {
24
+ var viewport = e.currentTarget.parentElement;
25
+ if (!viewport) return;
26
+ var vRect = viewport.getBoundingClientRect();
27
+ var scroll = isHorizontal ? viewport.scrollLeft : viewport.scrollTop;
28
+ var scrollContentPos = isHorizontal ? scroll + (e.clientX - vRect.left) : scroll + (e.clientY - vRect.top);
29
+ var offset = Math.max(0, scrollContentPos - axisStartMarginPx);
30
+ var t = offsetToTime(offset);
31
+ if (t == null) return;
32
+ var candidate = snapToStep ? snapFn(t) : t;
33
+ if (isInDisabledRanges(candidate)) return;
34
+ onSelectTime(candidate);
35
+ }, [isHorizontal, axisStartMarginPx, offsetToTime, onSelectTime, isInDisabledRanges, snapToStep, snapFn]);
36
+ var handleKeyDown = useCallback(function (e) {
37
+ var scrollContentCenter = orientation === 'horizontal' ? scrollPosition.scrollLeft + viewportSize.w / 2 : scrollPosition.scrollTop + viewportSize.h / 2;
38
+ var centerOffset = Math.max(0, scrollContentCenter - axisStartMarginPx);
39
+ var currentTime = offsetToTime(centerOffset);
40
+ if (currentTime == null) return;
41
+ if (e.key === 'Enter') {
42
+ var candidate = snapToStep ? snapFn(currentTime) : currentTime;
43
+ if (!isInDisabledRanges(candidate)) onSelectTime(candidate);
44
+ e.preventDefault();
45
+ return;
46
+ }
47
+ var step = stepMinutes * 60 * 1000;
48
+ var next;
49
+ if (orientation === 'horizontal') {
50
+ if (e.key === 'ArrowLeft') next = currentTime.subtract(step, 'ms');else if (e.key === 'ArrowRight') next = currentTime.add(step, 'ms');else return;
51
+ } else {
52
+ if (e.key === 'ArrowUp') next = currentTime.subtract(step, 'ms');else if (e.key === 'ArrowDown') next = currentTime.add(step, 'ms');else return;
53
+ }
54
+ e.preventDefault();
55
+ var snapped = snapToStep ? snapFn(next) : next;
56
+ if (!isInDisabledRanges(snapped)) onSelectTime(snapped);
57
+ }, [orientation, axisStartMarginPx, offsetToTime, onSelectTime, isInDisabledRanges, snapToStep, snapFn, stepMinutes, scrollPosition.scrollLeft, scrollPosition.scrollTop, viewportSize.w, viewportSize.h]);
58
+ var handlePointerDown = useCallback(function (e) {
59
+ if (onPointerDown) {
60
+ e.currentTarget.setPointerCapture(e.pointerId);
61
+ onPointerDown(e);
62
+ }
63
+ }, [onPointerDown]);
64
+ var handlePointerUp = useCallback(function (e) {
65
+ if (onPointerUp) {
66
+ e.currentTarget.releasePointerCapture(e.pointerId);
67
+ onPointerUp(e);
68
+ }
69
+ }, [onPointerUp]);
70
+ return /*#__PURE__*/React.createElement("div", {
71
+ className: "pisell-time-navigator-gesture pisell-time-navigator-gesture--".concat(orientation),
72
+ onClick: handleClick,
73
+ onKeyDown: handleKeyDown,
74
+ onPointerDown: handlePointerDown,
75
+ onPointerMove: onPointerMove,
76
+ onPointerUp: handlePointerUp,
77
+ onPointerLeave: onPointerLeave,
78
+ role: "slider",
79
+ tabIndex: 0,
80
+ "aria-label": "Time"
81
+ }, children);
82
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { CSSProperties } from 'react';
3
+ export interface NowButtonProps {
4
+ orientation: 'horizontal' | 'vertical';
5
+ onClick: () => void;
6
+ style?: CSSProperties;
7
+ className?: string;
8
+ renderCustom?: () => React.ReactNode;
9
+ }
10
+ /**
11
+ * Now 按钮:固定入口,点击跳回当前时间并进入 Realtime
12
+ * 横向:右侧,左箭头;竖向:底部,上箭头
13
+ */
14
+ export declare function NowButton({ orientation, onClick, style, className, renderCustom, }: NowButtonProps): JSX.Element;
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import { locales } from '@pisell/utils';
3
+ import classNames from 'classnames';
4
+ var I18N_NOW = 'pisell-time-navigator.now';
5
+ /**
6
+ * Now 按钮:固定入口,点击跳回当前时间并进入 Realtime
7
+ * 横向:右侧,左箭头;竖向:底部,上箭头
8
+ */
9
+ export function NowButton(_ref) {
10
+ var orientation = _ref.orientation,
11
+ onClick = _ref.onClick,
12
+ style = _ref.style,
13
+ className = _ref.className,
14
+ renderCustom = _ref.renderCustom;
15
+ var raw = locales.getText(I18N_NOW);
16
+ var label = raw && raw !== I18N_NOW ? raw : 'Now';
17
+ if (renderCustom) {
18
+ return /*#__PURE__*/React.createElement("button", {
19
+ type: "button",
20
+ className: classNames('pisell-time-navigator-now', className),
21
+ onClick: onClick,
22
+ style: style,
23
+ "aria-label": label
24
+ }, renderCustom());
25
+ }
26
+ return /*#__PURE__*/React.createElement("button", {
27
+ type: "button",
28
+ className: classNames('pisell-time-navigator-now', "pisell-time-navigator-now--".concat(orientation), className),
29
+ onClick: onClick,
30
+ style: style,
31
+ "aria-label": label
32
+ }, /*#__PURE__*/React.createElement("span", {
33
+ className: "pisell-time-navigator-now-icon",
34
+ "aria-hidden": true
35
+ }), /*#__PURE__*/React.createElement("span", {
36
+ className: "pisell-time-navigator-now-label"
37
+ }, label));
38
+ }
@@ -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,51 @@
1
+ import React from 'react';
2
+ import classNames from 'classnames';
3
+ /**
4
+ * 刻度层:渲染时间刻度与标签
5
+ * 横向:整点数字 + 小圆点;竖向:整点/半点数字 + 分割线
6
+ */
7
+ export function ScaleLayer(_ref) {
8
+ var orientation = _ref.orientation,
9
+ ticks = _ref.ticks,
10
+ stepMinutes = _ref.stepMinutes,
11
+ majorStepMinutes = _ref.majorStepMinutes,
12
+ timeFormat = _ref.timeFormat,
13
+ locale = _ref.locale,
14
+ style = _ref.style,
15
+ className = _ref.className;
16
+ var isHorizontal = orientation === 'horizontal';
17
+ return /*#__PURE__*/React.createElement("div", {
18
+ className: classNames('pisell-time-navigator-scale', "pisell-time-navigator-scale--".concat(orientation), className),
19
+ style: style
20
+ }, ticks.map(function (tick, i) {
21
+ var isMajor = tick.minute() % majorStepMinutes === 0;
22
+ /** 横向整点只展示小时,非整点用 timeFormat;竖向沿用 timeFormat */
23
+ var label = isHorizontal && isMajor ? locale ? tick.locale(locale).format('H') : tick.format('H') : locale ? tick.locale(locale).format(timeFormat) : tick.format(timeFormat);
24
+ if (isHorizontal) {
25
+ return /*#__PURE__*/React.createElement("div", {
26
+ key: i,
27
+ className: classNames('pisell-time-navigator-scale-cell', 'pisell-time-navigator-scale-cell--h', {
28
+ 'pisell-time-navigator-scale-cell--major': isMajor
29
+ })
30
+ }, isMajor && /*#__PURE__*/React.createElement("span", {
31
+ className: "pisell-time-navigator-scale-label"
32
+ }, label), !isMajor && /*#__PURE__*/React.createElement("span", {
33
+ className: "pisell-time-navigator-scale-dot",
34
+ "aria-hidden": true
35
+ }));
36
+ }
37
+
38
+ /* 竖向:仅展示整点时间;整点格加 --major,顶部粗线 */
39
+ return /*#__PURE__*/React.createElement("div", {
40
+ key: i,
41
+ className: classNames('pisell-time-navigator-scale-cell', 'pisell-time-navigator-scale-cell--v', {
42
+ 'pisell-time-navigator-scale-cell--major': isMajor
43
+ })
44
+ }, /*#__PURE__*/React.createElement("span", {
45
+ className: "pisell-time-navigator-scale-divider",
46
+ "aria-hidden": true
47
+ }), isMajor && /*#__PURE__*/React.createElement("span", {
48
+ className: "pisell-time-navigator-scale-label"
49
+ }, label));
50
+ }));
51
+ }
@@ -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,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,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,3 @@
1
+ export { useTimeAxis } from "./useTimeAxis";
2
+ export { useRealtime } from "./useRealtime";
3
+ export { useDragInertia } from "./useDragInertia";