@pisell/materials 6.11.17 → 6.11.18

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 (457) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +9 -9
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +32 -32
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +25 -25
  11. package/es/components/PisellLayouts/index.d.ts +10 -5
  12. package/es/components/PisellLayouts/index.js +8 -4
  13. package/es/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
  14. package/es/components/dataSourceComponents/dataSourceSubForm/index.js +274 -0
  15. package/es/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
  16. package/es/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
  17. package/es/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
  18. package/es/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
  19. package/es/components/dataSourceComponents/dataSourceSubForm/types.js +1 -0
  20. package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
  21. package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +61 -0
  22. package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
  23. package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +176 -0
  24. package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
  25. package/es/components/dataSourceComponents/fields/RecordListWrapper/index.js +11 -0
  26. package/es/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
  27. package/es/components/dataSourceComponents/fields/RecordListWrapper/type.js +1 -0
  28. package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
  29. package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.js +16 -0
  30. package/es/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
  31. package/es/components/dataSourceComponents/fields/Tabs/Tabs.js +93 -0
  32. package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
  33. package/es/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
  34. package/es/components/dataSourceComponents/fields/Tabs/WithMode.js +9 -0
  35. package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +12 -0
  36. package/es/components/dataSourceComponents/fields/Tabs/index.js +18 -0
  37. package/es/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
  38. package/es/components/dataSourceComponents/fields/Tabs/type.js +1 -0
  39. package/es/components/dataSourceComponents/fields/index.d.ts +39 -1
  40. package/es/components/dataSourceComponents/fields/index.js +5 -1
  41. package/es/components/dataSourceComponents/fields/utils.js +3 -0
  42. package/es/components/pisellFilter/type.d.ts +4 -2
  43. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
  44. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +611 -0
  45. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
  46. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
  47. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1667 -0
  48. package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
  49. package/es/components/pisellFloorMapLayout/components/CanvasTabs.js +203 -0
  50. package/es/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
  51. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
  52. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +341 -0
  53. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
  54. package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
  55. package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +432 -0
  56. package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
  57. package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.js +131 -0
  58. package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
  59. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
  60. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +543 -0
  61. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
  62. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
  63. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +135 -0
  64. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +149 -0
  65. package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
  66. package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.js +69 -0
  67. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
  68. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +366 -0
  69. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
  70. package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +48 -0
  71. package/es/components/pisellFloorMapLayout/components/ItemLayer.js +195 -0
  72. package/es/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
  73. package/es/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
  74. package/es/components/pisellFloorMapLayout/components/MapLayer.js +85 -0
  75. package/es/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
  76. package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
  77. package/es/components/pisellFloorMapLayout/components/ViewControls.js +88 -0
  78. package/es/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
  79. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
  80. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +29 -0
  81. package/es/components/pisellFloorMapLayout/components/index.d.ts +21 -0
  82. package/es/components/pisellFloorMapLayout/components/index.js +13 -0
  83. package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
  84. package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +21 -0
  85. package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
  86. package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +28 -0
  87. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
  88. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +561 -0
  89. package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
  90. package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +122 -0
  91. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
  92. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +399 -0
  93. package/es/components/pisellFloorMapLayout/index.d.ts +15 -0
  94. package/es/components/pisellFloorMapLayout/index.js +12 -0
  95. package/es/components/pisellFloorMapLayout/locales.d.ts +192 -0
  96. package/es/components/pisellFloorMapLayout/locales.js +191 -0
  97. package/es/components/pisellFloorMapLayout/types.d.ts +586 -0
  98. package/es/components/pisellFloorMapLayout/types.js +152 -0
  99. package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
  100. package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +129 -0
  101. package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
  102. package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +87 -0
  103. package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +9 -0
  104. package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +24 -0
  105. package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
  106. package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +56 -0
  107. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
  108. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +155 -0
  109. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
  110. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +89 -0
  111. package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
  112. package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +8 -0
  113. package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
  114. package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +108 -0
  115. package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
  116. package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.js +125 -0
  117. package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
  118. package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +29 -0
  119. package/es/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
  120. package/es/components/pisellFloorMapLayout/utils/snap.js +21 -0
  121. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
  122. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +175 -0
  123. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
  124. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
  125. package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +237 -0
  126. package/es/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
  127. package/es/components/pisellHierarchicalSummaryList/components/Row.js +313 -0
  128. package/es/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
  129. package/es/components/pisellHierarchicalSummaryList/components/index.js +1 -0
  130. package/es/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
  131. package/es/components/pisellHierarchicalSummaryList/hooks/index.js +1 -0
  132. package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
  133. package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +34 -0
  134. package/es/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
  135. package/es/components/pisellHierarchicalSummaryList/index.js +5 -0
  136. package/es/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
  137. package/es/components/pisellHierarchicalSummaryList/types.js +1 -0
  138. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
  139. package/es/components/pisellRecordBoard/PisellRecordBoard.js +98 -18
  140. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
  141. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +1276 -344
  142. package/es/components/pisellRecordBoard/index.d.ts +8 -2
  143. package/es/components/pisellRecordBoard/index.js +4 -2
  144. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -3
  145. package/es/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
  146. package/es/components/pisellRecordBoard/shellFrame/FloorMap.js +15 -0
  147. package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
  148. package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +11 -0
  149. package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
  150. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
  151. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +69 -11
  152. package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
  153. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
  154. package/es/components/pisellRecordBoard/shellFrame/index.js +111 -20
  155. package/es/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
  156. package/es/components/pisellRecordBoard/types.d.ts +68 -2
  157. package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
  158. package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +57 -0
  159. package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
  160. package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +156 -0
  161. package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
  162. package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
  163. package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +105 -0
  164. package/es/components/pisellReservationSchedule/index.d.ts +2 -0
  165. package/es/components/pisellReservationSchedule/index.js +1 -0
  166. package/es/components/pisellReservationSchedule/locales.d.ts +25 -0
  167. package/es/components/pisellReservationSchedule/locales.js +24 -0
  168. package/es/components/pisellReservationSchedule/types.d.ts +42 -0
  169. package/es/components/pisellReservationSchedule/types.js +1 -0
  170. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
  171. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +94 -0
  172. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
  173. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
  174. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +197 -0
  175. package/es/components/pisellReservationScheduleBand/index.d.ts +2 -0
  176. package/es/components/pisellReservationScheduleBand/index.js +1 -0
  177. package/es/components/pisellReservationScheduleBand/types.d.ts +49 -0
  178. package/es/components/pisellReservationScheduleBand/types.js +1 -0
  179. package/es/components/pisellShellFrame/PisellShellFrame.less +11 -0
  180. package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
  181. package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +787 -0
  182. package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
  183. package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
  184. package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +290 -0
  185. package/es/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
  186. package/es/components/pisellTimeNavigator/components/BackgroundLayer.js +30 -0
  187. package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
  188. package/es/components/pisellTimeNavigator/components/CursorLayer.js +77 -0
  189. package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
  190. package/es/components/pisellTimeNavigator/components/GestureLayer.js +91 -0
  191. package/es/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
  192. package/es/components/pisellTimeNavigator/components/NowButton.js +38 -0
  193. package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
  194. package/es/components/pisellTimeNavigator/components/ScaleLayer.js +73 -0
  195. package/es/components/pisellTimeNavigator/components/index.d.ts +5 -0
  196. package/es/components/pisellTimeNavigator/components/index.js +5 -0
  197. package/es/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
  198. package/es/components/pisellTimeNavigator/hooks/index.js +3 -0
  199. package/es/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
  200. package/es/components/pisellTimeNavigator/hooks/useDragInertia.js +109 -0
  201. package/es/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
  202. package/es/components/pisellTimeNavigator/hooks/useRealtime.js +16 -0
  203. package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
  204. package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +76 -0
  205. package/es/components/pisellTimeNavigator/index.d.ts +5 -0
  206. package/es/components/pisellTimeNavigator/index.js +4 -0
  207. package/es/components/pisellTimeNavigator/locales.d.ts +22 -0
  208. package/es/components/pisellTimeNavigator/locales.js +21 -0
  209. package/es/components/pisellTimeNavigator/types.d.ts +160 -0
  210. package/es/components/pisellTimeNavigator/types.js +1 -0
  211. package/es/components/pisellTimeNavigator/utils/index.d.ts +30 -0
  212. package/es/components/pisellTimeNavigator/utils/index.js +116 -0
  213. package/es/components/pisellWalletPassCard/index.js +1 -1
  214. package/es/components/table/index.js +1 -1
  215. package/es/index.d.ts +49 -33
  216. package/es/index.js +47 -27
  217. package/es/locales/en-US.d.ts +2 -0
  218. package/es/locales/en-US.js +2 -0
  219. package/es/locales/zh-CN.d.ts +2 -0
  220. package/es/locales/zh-CN.js +2 -0
  221. package/es/locales/zh-TW.d.ts +2 -0
  222. package/es/locales/zh-TW.js +2 -0
  223. package/lib/components/PisellLayouts/index.d.ts +10 -5
  224. package/lib/components/PisellLayouts/index.js +15 -1
  225. package/lib/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
  226. package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +229 -0
  227. package/lib/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
  228. package/lib/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
  229. package/lib/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
  230. package/lib/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
  231. package/lib/components/dataSourceComponents/dataSourceSubForm/types.js +17 -0
  232. package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
  233. package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +64 -0
  234. package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
  235. package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +157 -0
  236. package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
  237. package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.js +40 -0
  238. package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
  239. package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.js +17 -0
  240. package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
  241. package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.js +45 -0
  242. package/lib/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
  243. package/lib/components/dataSourceComponents/fields/Tabs/Tabs.js +95 -0
  244. package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
  245. package/lib/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
  246. package/lib/components/dataSourceComponents/fields/Tabs/WithMode.js +39 -0
  247. package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +12 -0
  248. package/lib/components/dataSourceComponents/fields/Tabs/index.js +40 -0
  249. package/lib/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
  250. package/lib/components/dataSourceComponents/fields/Tabs/type.js +17 -0
  251. package/lib/components/dataSourceComponents/fields/index.d.ts +39 -1
  252. package/lib/components/dataSourceComponents/fields/index.js +5 -1
  253. package/lib/components/dataSourceComponents/fields/utils.js +3 -0
  254. package/lib/components/pisellFilter/type.d.ts +4 -2
  255. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
  256. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +709 -0
  257. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
  258. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
  259. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1353 -0
  260. package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
  261. package/lib/components/pisellFloorMapLayout/components/CanvasTabs.js +237 -0
  262. package/lib/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
  263. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
  264. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +358 -0
  265. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
  266. package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
  267. package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +482 -0
  268. package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
  269. package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.js +117 -0
  270. package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
  271. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
  272. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +556 -0
  273. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
  274. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
  275. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +195 -0
  276. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +149 -0
  277. package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
  278. package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.js +94 -0
  279. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
  280. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +337 -0
  281. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
  282. package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +48 -0
  283. package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +219 -0
  284. package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
  285. package/lib/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
  286. package/lib/components/pisellFloorMapLayout/components/MapLayer.js +110 -0
  287. package/lib/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
  288. package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
  289. package/lib/components/pisellFloorMapLayout/components/ViewControls.js +121 -0
  290. package/lib/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
  291. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
  292. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +65 -0
  293. package/lib/components/pisellFloorMapLayout/components/index.d.ts +21 -0
  294. package/lib/components/pisellFloorMapLayout/components/index.js +56 -0
  295. package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
  296. package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +54 -0
  297. package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
  298. package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +47 -0
  299. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
  300. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +545 -0
  301. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
  302. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +146 -0
  303. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
  304. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +382 -0
  305. package/lib/components/pisellFloorMapLayout/index.d.ts +15 -0
  306. package/lib/components/pisellFloorMapLayout/index.js +64 -0
  307. package/lib/components/pisellFloorMapLayout/locales.d.ts +192 -0
  308. package/lib/components/pisellFloorMapLayout/locales.js +212 -0
  309. package/lib/components/pisellFloorMapLayout/types.d.ts +586 -0
  310. package/lib/components/pisellFloorMapLayout/types.js +32 -0
  311. package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
  312. package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +126 -0
  313. package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
  314. package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +66 -0
  315. package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +9 -0
  316. package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +44 -0
  317. package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
  318. package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +67 -0
  319. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
  320. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +139 -0
  321. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
  322. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +136 -0
  323. package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
  324. package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +33 -0
  325. package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
  326. package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +128 -0
  327. package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
  328. package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.js +96 -0
  329. package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
  330. package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +41 -0
  331. package/lib/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
  332. package/lib/components/pisellFloorMapLayout/utils/snap.js +43 -0
  333. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
  334. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +179 -0
  335. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
  336. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
  337. package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +185 -0
  338. package/lib/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
  339. package/lib/components/pisellHierarchicalSummaryList/components/Row.js +343 -0
  340. package/lib/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
  341. package/lib/components/pisellHierarchicalSummaryList/components/index.js +29 -0
  342. package/lib/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
  343. package/lib/components/pisellHierarchicalSummaryList/hooks/index.js +29 -0
  344. package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
  345. package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +49 -0
  346. package/lib/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
  347. package/lib/components/pisellHierarchicalSummaryList/index.js +31 -0
  348. package/lib/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
  349. package/lib/components/pisellHierarchicalSummaryList/types.js +17 -0
  350. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
  351. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +86 -8
  352. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
  353. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +915 -25
  354. package/lib/components/pisellRecordBoard/index.d.ts +8 -2
  355. package/lib/components/pisellRecordBoard/index.js +6 -2
  356. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +8 -2
  357. package/lib/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
  358. package/lib/components/pisellRecordBoard/shellFrame/FloorMap.js +27 -0
  359. package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
  360. package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +45 -0
  361. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
  362. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
  363. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +60 -8
  364. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
  365. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
  366. package/lib/components/pisellRecordBoard/shellFrame/index.js +101 -9
  367. package/lib/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
  368. package/lib/components/pisellRecordBoard/types.d.ts +68 -2
  369. package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
  370. package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +88 -0
  371. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
  372. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +200 -0
  373. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
  374. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
  375. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +116 -0
  376. package/lib/components/pisellReservationSchedule/index.d.ts +2 -0
  377. package/lib/components/pisellReservationSchedule/index.js +29 -0
  378. package/lib/components/pisellReservationSchedule/locales.d.ts +25 -0
  379. package/lib/components/pisellReservationSchedule/locales.js +47 -0
  380. package/lib/components/pisellReservationSchedule/types.d.ts +42 -0
  381. package/lib/components/pisellReservationSchedule/types.js +17 -0
  382. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
  383. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +128 -0
  384. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
  385. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
  386. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +181 -0
  387. package/lib/components/pisellReservationScheduleBand/index.d.ts +2 -0
  388. package/lib/components/pisellReservationScheduleBand/index.js +29 -0
  389. package/lib/components/pisellReservationScheduleBand/types.d.ts +49 -0
  390. package/lib/components/pisellReservationScheduleBand/types.js +17 -0
  391. package/lib/components/pisellShellFrame/PisellShellFrame.less +11 -0
  392. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
  393. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +901 -0
  394. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
  395. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
  396. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +273 -0
  397. package/lib/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
  398. package/lib/components/pisellTimeNavigator/components/BackgroundLayer.js +78 -0
  399. package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
  400. package/lib/components/pisellTimeNavigator/components/CursorLayer.js +111 -0
  401. package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
  402. package/lib/components/pisellTimeNavigator/components/GestureLayer.js +170 -0
  403. package/lib/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
  404. package/lib/components/pisellTimeNavigator/components/NowButton.js +81 -0
  405. package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
  406. package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +116 -0
  407. package/lib/components/pisellTimeNavigator/components/index.d.ts +5 -0
  408. package/lib/components/pisellTimeNavigator/components/index.js +41 -0
  409. package/lib/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
  410. package/lib/components/pisellTimeNavigator/hooks/index.js +35 -0
  411. package/lib/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
  412. package/lib/components/pisellTimeNavigator/hooks/useDragInertia.js +136 -0
  413. package/lib/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
  414. package/lib/components/pisellTimeNavigator/hooks/useRealtime.js +49 -0
  415. package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
  416. package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.js +87 -0
  417. package/lib/components/pisellTimeNavigator/index.d.ts +5 -0
  418. package/lib/components/pisellTimeNavigator/index.js +47 -0
  419. package/lib/components/pisellTimeNavigator/locales.d.ts +22 -0
  420. package/lib/components/pisellTimeNavigator/locales.js +41 -0
  421. package/lib/components/pisellTimeNavigator/types.d.ts +160 -0
  422. package/lib/components/pisellTimeNavigator/types.js +17 -0
  423. package/lib/components/pisellTimeNavigator/utils/index.d.ts +30 -0
  424. package/lib/components/pisellTimeNavigator/utils/index.js +107 -0
  425. package/lib/components/pisellWalletPassCard/index.js +1 -1
  426. package/lib/components/table/index.js +2 -2
  427. package/lib/index.d.ts +49 -33
  428. package/lib/index.js +93 -27
  429. package/lib/locales/en-US.d.ts +2 -0
  430. package/lib/locales/en-US.js +2 -0
  431. package/lib/locales/zh-CN.d.ts +2 -0
  432. package/lib/locales/zh-CN.js +2 -0
  433. package/lib/locales/zh-TW.d.ts +2 -0
  434. package/lib/locales/zh-TW.js +2 -0
  435. package/lowcode/data-source-form/constants.ts +3 -0
  436. package/lowcode/data-source-form/utils.ts +31 -5
  437. package/lowcode/data-source-sub-form/meta.ts +259 -0
  438. package/lowcode/data-source-sub-form/snippets.ts +21 -0
  439. package/lowcode/floor-map-image-element/meta.ts +113 -0
  440. package/lowcode/floor-map-layout-provider/meta.ts +65 -0
  441. package/lowcode/form-item-record-list-wrapper/meta.ts +180 -0
  442. package/lowcode/form-item-record-list-wrapper/snippets.ts +18 -0
  443. package/lowcode/form-item-tabs/meta.ts +172 -0
  444. package/lowcode/pisell-floor-map-layout/meta.ts +5599 -0
  445. package/lowcode/pisell-hierarchical-summary-list/meta.ts +240 -0
  446. package/lowcode/pisell-reservation-schedule/index.ts +3 -0
  447. package/lowcode/pisell-reservation-schedule/meta.ts +69 -0
  448. package/lowcode/pisell-reservation-schedule/snippets.ts +1 -0
  449. package/lowcode/pisell-reservation-schedule-band/index.ts +3 -0
  450. package/lowcode/pisell-reservation-schedule-band/meta.ts +96 -0
  451. package/lowcode/pisell-reservation-schedule-band/snippets.ts +1 -0
  452. package/lowcode/pisell-time-navigator/index.ts +3 -0
  453. package/lowcode/pisell-time-navigator/meta.ts +298 -0
  454. package/lowcode/pisell-time-navigator/snippets.ts +1 -0
  455. package/lowcode/render-figma-style-round-table-card/meta.ts +589 -0
  456. package/lowcode/render-figma-style-table-card/meta.ts +589 -0
  457. package/package.json +3 -2
@@ -0,0 +1,901 @@
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/PisellTimeNavigator.tsx
30
+ var PisellTimeNavigator_exports = {};
31
+ __export(PisellTimeNavigator_exports, {
32
+ PisellTimeNavigator: () => PisellTimeNavigator
33
+ });
34
+ module.exports = __toCommonJS(PisellTimeNavigator_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_dayjs = __toESM(require("dayjs"));
37
+ var import_classnames = __toESM(require("classnames"));
38
+ var import_PisellScrollView = __toESM(require("../PisellScrollView"));
39
+ var import_utils = require("./utils");
40
+ var import_hooks = require("./hooks");
41
+ var import_components = require("./components");
42
+ var import_utils2 = require("@pisell/utils");
43
+ var import_locales = __toESM(require("./locales"));
44
+ var import_PisellTimeNavigator = require("./PisellTimeNavigator.less");
45
+ var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
46
+ var CELL_SIZE_H = 82;
47
+ var CURRENT_TIME_GRADIENT_WIDTH_H_PX = Math.round(CELL_SIZE_H * 1.7);
48
+ var CELL_SIZE_V = 20;
49
+ var CURSOR_MOVES_NOW_RESERVE_PX = 56;
50
+ var CURSOR_MOVES_H_PADDING_PX = 8;
51
+ var CURSOR_MOVES_MIN_CELL_PX = 8;
52
+ var DENSITY_LAYER_HEIGHT = 46;
53
+ function PisellTimeNavigator(props) {
54
+ var _a, _b;
55
+ const {
56
+ value: valueProp,
57
+ onChange,
58
+ defaultValue,
59
+ referenceDate: referenceDateProp,
60
+ realtime = false,
61
+ range,
62
+ stepMinutes = 15,
63
+ majorStepMinutes = 60,
64
+ cursorMode = "axis-moves",
65
+ orientation = "horizontal",
66
+ disabledRanges,
67
+ showNowButton = true,
68
+ userInteractionLocked = false,
69
+ snapToStep = false,
70
+ inertia = false,
71
+ businessHours,
72
+ pastTimeFade,
73
+ containerStyle,
74
+ scaleStyle,
75
+ cursorStyle,
76
+ nowButtonStyle,
77
+ className,
78
+ style,
79
+ locale,
80
+ timeFormat = "HH:mm",
81
+ renderNowButton,
82
+ onUserInteraction,
83
+ densitySeries: densitySeriesProp,
84
+ loadDensity: loadDensityProp
85
+ } = props;
86
+ const context = (0, import_useEngineContext.default)();
87
+ import_utils2.locales.init(
88
+ import_locales.default,
89
+ ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en"
90
+ );
91
+ const referenceDateFromProp = (0, import_react.useMemo)(() => {
92
+ if (referenceDateProp == null) return void 0;
93
+ const d = (0, import_utils.parseValue)(referenceDateProp, (0, import_dayjs.default)());
94
+ return (d ?? (0, import_dayjs.default)()).startOf("day");
95
+ }, [referenceDateProp]);
96
+ const referenceDate = referenceDateFromProp ?? (0, import_dayjs.default)().startOf("day");
97
+ const isHorizontal = orientation === "horizontal";
98
+ const referenceDayKey = referenceDateFromProp != null ? referenceDateFromProp.format("YYYY-MM-DD") : (0, import_dayjs.default)().format("YYYY-MM-DD");
99
+ const [densityLoaded, setDensityLoaded] = (0, import_react.useState)();
100
+ const densityReqId = (0, import_react.useRef)(0);
101
+ const densityGradientId = (0, import_react.useMemo)(
102
+ () => `pisell-time-density-fill-${Math.random().toString(36).slice(2, 8)}`,
103
+ []
104
+ );
105
+ (0, import_react.useEffect)(() => {
106
+ if (densitySeriesProp !== void 0) {
107
+ setDensityLoaded(void 0);
108
+ return;
109
+ }
110
+ if (!loadDensityProp) {
111
+ setDensityLoaded(void 0);
112
+ return;
113
+ }
114
+ const req = ++densityReqId.current;
115
+ let cancelled = false;
116
+ setDensityLoaded(void 0);
117
+ const refDay = (0, import_dayjs.default)(referenceDayKey).startOf("day");
118
+ void loadDensityProp({ referenceDate: refDay, stepMinutes }).then((arr) => {
119
+ if (cancelled || req !== densityReqId.current) return;
120
+ setDensityLoaded(Array.isArray(arr) ? arr : []);
121
+ }).catch(() => {
122
+ if (cancelled || req !== densityReqId.current) return;
123
+ setDensityLoaded(void 0);
124
+ });
125
+ return () => {
126
+ cancelled = true;
127
+ };
128
+ }, [referenceDayKey, stepMinutes, loadDensityProp, densitySeriesProp]);
129
+ const resolvedDensity = densitySeriesProp !== void 0 ? densitySeriesProp : densityLoaded;
130
+ const isAxisMoves = cursorMode === "axis-moves";
131
+ const [viewportSize, setViewportSize] = (0, import_react.useState)({ w: 0, h: 0 });
132
+ const viewportWrapRef = (0, import_react.useRef)(null);
133
+ (0, import_react.useEffect)(() => {
134
+ const el = viewportWrapRef.current;
135
+ if (!el) return;
136
+ const setSize = () => {
137
+ const w = el.clientWidth;
138
+ const h = el.clientHeight;
139
+ setViewportSize(
140
+ (prev) => prev.w === w && prev.h === h ? prev : { w, h }
141
+ );
142
+ };
143
+ setSize();
144
+ const ro = new ResizeObserver(setSize);
145
+ ro.observe(el);
146
+ return () => ro.disconnect();
147
+ }, []);
148
+ const horizontalSlotCount = (0, import_react.useMemo)(
149
+ () => isHorizontal ? (0, import_utils.getHorizontalAxisSlotCount)(range, referenceDate, stepMinutes) : 0,
150
+ [isHorizontal, range == null ? void 0 : range.start, range == null ? void 0 : range.end, referenceDate, stepMinutes]
151
+ );
152
+ const cellSizePx = (0, import_react.useMemo)(() => {
153
+ if (!isHorizontal) return CELL_SIZE_V;
154
+ if (isAxisMoves) return CELL_SIZE_H;
155
+ const n = horizontalSlotCount;
156
+ if (n <= 0) return CELL_SIZE_H;
157
+ const vpW = Math.max(1, viewportSize.w || 400);
158
+ const reserve = showNowButton ? CURSOR_MOVES_NOW_RESERVE_PX : 0;
159
+ const usable = Math.max(40, vpW - reserve - CURSOR_MOVES_H_PADDING_PX * 2);
160
+ const raw = Math.floor(usable / n);
161
+ return Math.max(CURSOR_MOVES_MIN_CELL_PX, Math.min(CELL_SIZE_H, raw));
162
+ }, [
163
+ isHorizontal,
164
+ isAxisMoves,
165
+ horizontalSlotCount,
166
+ viewportSize.w,
167
+ showNowButton
168
+ ]);
169
+ const axis = (0, import_hooks.useTimeAxis)({
170
+ range,
171
+ stepMinutes,
172
+ referenceDate,
173
+ orientation,
174
+ cellSizePx
175
+ });
176
+ const horizontalDensityCurve = (0, import_react.useMemo)(() => {
177
+ if (!isHorizontal || !(resolvedDensity == null ? void 0 : resolvedDensity.length)) return null;
178
+ const ticksN = axis.ticks.length;
179
+ const n = Math.min(resolvedDensity.length, ticksN);
180
+ if (n < 2) return null;
181
+ const slice = resolvedDensity.slice(0, n);
182
+ const maxV = Math.max(...slice, 0);
183
+ const minV = Math.min(...slice, 0);
184
+ const span = Math.max(1, maxV - minV);
185
+ const h = DENSITY_LAYER_HEIGHT;
186
+ const points = slice.map((v, i) => {
187
+ const x = i * cellSizePx + cellSizePx / 2;
188
+ const t = (v - minV) / span;
189
+ const y = h - 1 - t * (h - 3);
190
+ return { x, y };
191
+ });
192
+ const first = points[0];
193
+ const last = points[points.length - 1];
194
+ let linePath = `M ${first.x} ${first.y}`;
195
+ for (let i = 0; i < points.length - 1; i += 1) {
196
+ const p0 = points[i];
197
+ const p1 = points[i + 1];
198
+ const cx = (p0.x + p1.x) / 2;
199
+ const cy = (p0.y + p1.y) / 2;
200
+ linePath += ` Q ${p0.x} ${p0.y} ${cx} ${cy}`;
201
+ }
202
+ linePath += ` T ${last.x} ${last.y}`;
203
+ const areaPath = `${linePath} L ${last.x} ${h} L ${first.x} ${h} Z`;
204
+ return {
205
+ points,
206
+ linePath,
207
+ areaPath,
208
+ h,
209
+ w: axis.totalLengthPx
210
+ };
211
+ }, [
212
+ isHorizontal,
213
+ resolvedDensity,
214
+ axis.ticks,
215
+ axis.totalLengthPx,
216
+ cellSizePx
217
+ ]);
218
+ const isControlled = valueProp !== void 0;
219
+ const [internalValue, setInternalValue] = (0, import_react.useState)(() => {
220
+ const v = valueProp ?? defaultValue;
221
+ return (0, import_utils.parseValue)(v, referenceDate);
222
+ });
223
+ const value = isControlled ? valueProp != null ? (0, import_utils.parseValue)(valueProp, referenceDate) : null : internalValue;
224
+ const effectiveValue = value ?? axis.rangeStart;
225
+ const scrollRef = (0, import_react.useRef)(null);
226
+ const scrollToCenterInProgressRef = (0, import_react.useRef)(false);
227
+ const valueUpdatedByScrollRef = (0, import_react.useRef)(false);
228
+ const isPointerDownRef = (0, import_react.useRef)(false);
229
+ const [scrollPosition, setScrollPosition] = (0, import_react.useState)({
230
+ scrollLeft: 0,
231
+ scrollTop: 0
232
+ });
233
+ const [, setNowTick] = (0, import_react.useState)(0);
234
+ (0, import_react.useEffect)(() => {
235
+ const id = setInterval(() => setNowTick((n) => n + 1), 60 * 1e3);
236
+ return () => clearInterval(id);
237
+ }, []);
238
+ const cursorDragActiveRef = (0, import_react.useRef)(false);
239
+ const cursorDragBaseRef = (0, import_react.useRef)({ startClient: 0, startOffset: 0 });
240
+ const getScrollContainer = (0, import_react.useCallback)(
241
+ () => {
242
+ var _a2, _b2;
243
+ return ((_b2 = (_a2 = scrollRef.current) == null ? void 0 : _a2.getScrollContainer) == null ? void 0 : _b2.call(_a2)) ?? null;
244
+ },
245
+ []
246
+ );
247
+ const inertiaHandlers = (0, import_hooks.useDragInertia)({
248
+ enabled: inertia && !userInteractionLocked,
249
+ orientation,
250
+ getScrollContainer
251
+ });
252
+ const effectiveViewportW = viewportSize.w || 400;
253
+ const effectiveViewportH = viewportSize.h || 300;
254
+ const halfViewportW = effectiveViewportW / 2;
255
+ const halfViewportH = effectiveViewportH / 2;
256
+ const dotOffsetPx = isHorizontal ? cellSizePx / 2 : 0;
257
+ const axisStartMarginW = isHorizontal && !isAxisMoves ? CURSOR_MOVES_H_PADDING_PX : Math.max(0, halfViewportW - dotOffsetPx);
258
+ const axisStartMarginH = Math.max(0, halfViewportH - dotOffsetPx);
259
+ const horizontalAxisWrapStyle = (0, import_react.useMemo)(() => {
260
+ if (!isHorizontal) return null;
261
+ const minHeight = 48;
262
+ if (isAxisMoves) {
263
+ const natural2 = axis.totalLengthPx + (effectiveViewportW - cellSizePx);
264
+ if (!showNowButton) {
265
+ return {
266
+ width: "100%",
267
+ minWidth: natural2,
268
+ minHeight,
269
+ boxSizing: "border-box"
270
+ };
271
+ }
272
+ return { width: natural2, minHeight };
273
+ }
274
+ const natural = CURSOR_MOVES_H_PADDING_PX + axis.totalLengthPx + CURSOR_MOVES_H_PADDING_PX;
275
+ if (!showNowButton) {
276
+ return {
277
+ width: "100%",
278
+ minWidth: natural,
279
+ minHeight,
280
+ boxSizing: "border-box"
281
+ };
282
+ }
283
+ return { width: natural, minHeight };
284
+ }, [
285
+ isHorizontal,
286
+ isAxisMoves,
287
+ axis.totalLengthPx,
288
+ effectiveViewportW,
289
+ cellSizePx,
290
+ showNowButton
291
+ ]);
292
+ const handleScroll = (0, import_react.useCallback)(
293
+ (data) => {
294
+ if (scrollToCenterInProgressRef.current) return;
295
+ setScrollPosition({
296
+ scrollLeft: data.scrollLeft,
297
+ scrollTop: data.scrollTop
298
+ });
299
+ setViewportSize({ w: data.clientWidth, h: data.clientHeight });
300
+ if (userInteractionLocked) return;
301
+ if (!isAxisMoves || data.clientWidth <= 0 && data.clientHeight <= 0)
302
+ return;
303
+ const halfW = data.clientWidth / 2;
304
+ const halfH = data.clientHeight / 2;
305
+ const hasPadding = isHorizontal ? effectiveViewportW > 0 : effectiveViewportH > 0;
306
+ const centerOffset = isHorizontal ? hasPadding ? data.scrollLeft + dotOffsetPx : data.scrollLeft + halfW : hasPadding ? data.scrollTop + dotOffsetPx : data.scrollTop + halfH;
307
+ const t = axis.offsetToTimeContinuous(centerOffset);
308
+ if (!t) return;
309
+ const tMinute = t.startOf("minute");
310
+ if ((0, import_utils.isInDisabledRanges)(tMinute, disabledRanges)) return;
311
+ valueUpdatedByScrollRef.current = true;
312
+ if (!isControlled) setInternalValue(tMinute);
313
+ onChange == null ? void 0 : onChange(tMinute);
314
+ },
315
+ [
316
+ isAxisMoves,
317
+ isHorizontal,
318
+ isControlled,
319
+ axis.offsetToTimeContinuous,
320
+ disabledRanges,
321
+ onChange,
322
+ effectiveViewportW,
323
+ effectiveViewportH,
324
+ dotOffsetPx,
325
+ userInteractionLocked
326
+ ]
327
+ );
328
+ const performSnapFromScrollPosition = (0, import_react.useCallback)(
329
+ (scrollLeft, scrollTop, clientWidth, clientHeight) => {
330
+ if (!isAxisMoves || clientWidth <= 0 && clientHeight <= 0) return;
331
+ valueUpdatedByScrollRef.current = false;
332
+ const hasPadding = isHorizontal ? effectiveViewportW > 0 : effectiveViewportH > 0;
333
+ const centerOffset = isHorizontal ? hasPadding ? scrollLeft + dotOffsetPx : scrollLeft + clientWidth / 2 : hasPadding ? scrollTop + dotOffsetPx : scrollTop + clientHeight / 2;
334
+ const t = axis.offsetToTimeContinuous(centerOffset);
335
+ if (!t) return;
336
+ const snapped = snapToStep ? (0, import_utils.snapToStepMinutes)(t, stepMinutes) : t;
337
+ if ((0, import_utils.isInDisabledRanges)(snapped, disabledRanges)) return;
338
+ if (!isControlled) setInternalValue(snapped);
339
+ onChange == null ? void 0 : onChange(snapped);
340
+ },
341
+ [
342
+ isAxisMoves,
343
+ isHorizontal,
344
+ isControlled,
345
+ axis.offsetToTimeContinuous,
346
+ snapToStep,
347
+ stepMinutes,
348
+ disabledRanges,
349
+ onChange,
350
+ effectiveViewportW,
351
+ effectiveViewportH,
352
+ dotOffsetPx
353
+ ]
354
+ );
355
+ const scrollEndClearTimeoutRef = (0, import_react.useRef)(
356
+ null
357
+ );
358
+ const handleScrollEnd = (0, import_react.useCallback)(
359
+ (data) => {
360
+ if (userInteractionLocked) return;
361
+ if (scrollToCenterInProgressRef.current) {
362
+ if (scrollEndClearTimeoutRef.current)
363
+ clearTimeout(scrollEndClearTimeoutRef.current);
364
+ scrollEndClearTimeoutRef.current = setTimeout(() => {
365
+ scrollToCenterInProgressRef.current = false;
366
+ scrollEndClearTimeoutRef.current = null;
367
+ }, 500);
368
+ return;
369
+ }
370
+ if (isPointerDownRef.current) return;
371
+ performSnapFromScrollPosition(
372
+ data.scrollLeft,
373
+ data.scrollTop,
374
+ data.clientWidth,
375
+ data.clientHeight
376
+ );
377
+ },
378
+ [performSnapFromScrollPosition, userInteractionLocked]
379
+ );
380
+ const handlePointerUp = (0, import_react.useCallback)(
381
+ (e) => {
382
+ var _a2, _b2, _c, _d;
383
+ isPointerDownRef.current = false;
384
+ if (userInteractionLocked) return;
385
+ if ((_b2 = (_a2 = e.target) == null ? void 0 : _a2.closest) == null ? void 0 : _b2.call(_a2, ".pisell-time-navigator-now"))
386
+ return;
387
+ if (!isAxisMoves) return;
388
+ const container = (_d = (_c = scrollRef.current) == null ? void 0 : _c.getScrollContainer) == null ? void 0 : _d.call(_c);
389
+ if (!container) return;
390
+ performSnapFromScrollPosition(
391
+ container.scrollLeft,
392
+ container.scrollTop,
393
+ container.clientWidth,
394
+ container.clientHeight
395
+ );
396
+ },
397
+ [isAxisMoves, performSnapFromScrollPosition, userInteractionLocked]
398
+ );
399
+ const snapFn = (0, import_react.useCallback)(
400
+ (t) => (0, import_utils.snapToStepMinutes)(t, stepMinutes),
401
+ [stepMinutes]
402
+ );
403
+ const isInDisabled = (0, import_react.useCallback)(
404
+ (t) => (0, import_utils.isInDisabledRanges)(t, disabledRanges),
405
+ [disabledRanges]
406
+ );
407
+ const handleChange = (0, import_react.useCallback)(
408
+ (next) => {
409
+ if (isInDisabled(next)) return;
410
+ if (!isControlled) setInternalValue(next);
411
+ onChange == null ? void 0 : onChange(next);
412
+ },
413
+ [isControlled, onChange, isInDisabled]
414
+ );
415
+ (0, import_hooks.useRealtime)(realtime, () => {
416
+ const wall = (0, import_dayjs.default)().startOf("minute");
417
+ const [rangeStart, rangeEnd] = (0, import_utils.getRangeBounds)(range, referenceDate);
418
+ const clamped = wall.isBefore(rangeStart) ? rangeStart : wall.isAfter(rangeEnd) ? rangeEnd : wall;
419
+ const snapped = snapToStep ? snapFn(clamped) : clamped;
420
+ if (!isInDisabled(snapped)) handleChange(snapped);
421
+ });
422
+ (0, import_react.useEffect)(() => {
423
+ if (!isControlled && valueProp !== void 0) {
424
+ setInternalValue((0, import_utils.parseValue)(valueProp, referenceDate));
425
+ }
426
+ }, [isControlled, valueProp, referenceDate]);
427
+ const referenceDayMs = referenceDate.valueOf();
428
+ (0, import_react.useEffect)(() => {
429
+ if (isControlled) return;
430
+ setInternalValue((prev) => {
431
+ if (!prev) {
432
+ return (0, import_utils.parseValue)(defaultValue, referenceDate);
433
+ }
434
+ return referenceDate.hour(prev.hour()).minute(prev.minute()).second(0).millisecond(0);
435
+ });
436
+ }, [referenceDayMs, isControlled, defaultValue]);
437
+ const cursorOffsetPx = axis.timeToOffset(effectiveValue);
438
+ const wallAligned = (0, import_dayjs.default)().startOf("minute");
439
+ const currentTimeInRange = !wallAligned.isBefore(axis.rangeStart) && !wallAligned.isAfter(axis.rangeEnd);
440
+ const currentTimeOffsetPx = currentTimeInRange ? axis.timeToOffset(wallAligned) : void 0;
441
+ const horizontalCurrentTimeHighlightStyle = (0, import_react.useMemo)(() => {
442
+ if (!isHorizontal || currentTimeOffsetPx == null || currentTimeOffsetPx < 0) {
443
+ return null;
444
+ }
445
+ const w = Math.min(CURRENT_TIME_GRADIENT_WIDTH_H_PX, currentTimeOffsetPx);
446
+ return {
447
+ left: axisStartMarginW + Math.max(0, currentTimeOffsetPx - w),
448
+ top: 0,
449
+ width: w,
450
+ height: 48
451
+ };
452
+ }, [isHorizontal, currentTimeOffsetPx, axisStartMarginW]);
453
+ const SCROLL_SYNC_THRESHOLD_PX = 2;
454
+ const hasScrollPadding = isHorizontal ? effectiveViewportW > 0 : effectiveViewportH > 0;
455
+ const verticalTailPx = effectiveViewportH / 2;
456
+ const verticalWrapHeight = axisStartMarginH + axis.totalLengthPx + verticalTailPx;
457
+ const maxScrollPx = isHorizontal ? Math.max(0, axis.totalLengthPx - cellSizePx) : Math.max(0, verticalWrapHeight - effectiveViewportH);
458
+ (0, import_react.useEffect)(() => {
459
+ var _a2, _b2, _c, _d;
460
+ if (!isAxisMoves && isHorizontal) {
461
+ const container2 = (_b2 = (_a2 = scrollRef.current) == null ? void 0 : _a2.getScrollContainer) == null ? void 0 : _b2.call(_a2);
462
+ if (container2 && container2.scrollLeft !== 0) {
463
+ container2.scrollTo({ left: 0, behavior: "auto" });
464
+ }
465
+ return;
466
+ }
467
+ if (!isAxisMoves && cursorDragActiveRef.current) return;
468
+ if (valueUpdatedByScrollRef.current) {
469
+ valueUpdatedByScrollRef.current = false;
470
+ return;
471
+ }
472
+ const container = (_d = (_c = scrollRef.current) == null ? void 0 : _c.getScrollContainer) == null ? void 0 : _d.call(_c);
473
+ if (!container) return;
474
+ const viewportPx = isHorizontal ? container.clientWidth : container.clientHeight;
475
+ const targetScroll = hasScrollPadding ? Math.max(0, Math.min(cursorOffsetPx - dotOffsetPx, maxScrollPx)) : Math.max(
476
+ 0,
477
+ Math.min(
478
+ cursorOffsetPx - viewportPx / 2,
479
+ Math.max(0, axis.totalLengthPx - viewportPx)
480
+ )
481
+ );
482
+ const currentScroll = isHorizontal ? container.scrollLeft : container.scrollTop;
483
+ if (Math.abs(currentScroll - targetScroll) <= SCROLL_SYNC_THRESHOLD_PX)
484
+ return;
485
+ scrollToCenterInProgressRef.current = true;
486
+ if (isHorizontal) {
487
+ container.scrollTo({ left: targetScroll, behavior: "smooth" });
488
+ } else {
489
+ container.scrollTo({ top: targetScroll, behavior: "smooth" });
490
+ }
491
+ }, [
492
+ effectiveValue.valueOf(),
493
+ isHorizontal,
494
+ cursorOffsetPx,
495
+ maxScrollPx,
496
+ hasScrollPadding,
497
+ dotOffsetPx,
498
+ cellSizePx,
499
+ axis.totalLengthPx,
500
+ isAxisMoves
501
+ ]);
502
+ const scrollToCenterTime = (0, import_react.useCallback)(
503
+ (t) => {
504
+ const container = getScrollContainer();
505
+ if (!container) return;
506
+ const offset = axis.timeToOffset(t);
507
+ const viewportPx = isHorizontal ? container.clientWidth : container.clientHeight;
508
+ const maxScroll = hasScrollPadding ? maxScrollPx : Math.max(0, axis.totalLengthPx - viewportPx);
509
+ const target = hasScrollPadding ? Math.max(0, Math.min(offset - dotOffsetPx, maxScrollPx)) : Math.max(0, Math.min(offset - viewportPx / 2, maxScroll));
510
+ scrollToCenterInProgressRef.current = true;
511
+ container.scrollTo({
512
+ left: isHorizontal ? target : 0,
513
+ top: isHorizontal ? 0 : target,
514
+ behavior: "smooth"
515
+ });
516
+ },
517
+ [
518
+ getScrollContainer,
519
+ axis.timeToOffset,
520
+ axis.totalLengthPx,
521
+ isHorizontal,
522
+ hasScrollPadding,
523
+ dotOffsetPx,
524
+ maxScrollPx
525
+ ]
526
+ );
527
+ const handleSelectTime = (0, import_react.useCallback)(
528
+ (t) => {
529
+ handleChange(t);
530
+ if (isAxisMoves) scrollToCenterTime(t);
531
+ },
532
+ [handleChange, isAxisMoves, scrollToCenterTime]
533
+ );
534
+ const handleNow = (0, import_react.useCallback)(() => {
535
+ valueUpdatedByScrollRef.current = false;
536
+ const wall = (0, import_dayjs.default)().startOf("minute");
537
+ const [rangeStart, rangeEnd] = (0, import_utils.getRangeBounds)(range, referenceDate);
538
+ const clamped = wall.isBefore(rangeStart) ? rangeStart : wall.isAfter(rangeEnd) ? rangeEnd : wall;
539
+ handleChange(clamped);
540
+ }, [range, referenceDate, handleChange]);
541
+ const applyOffsetToNavigatorValue = (0, import_react.useCallback)(
542
+ (offsetPx, snap) => {
543
+ const maxO = Math.max(0, axis.totalLengthPx - 1e-3);
544
+ const nextOff = Math.max(0, Math.min(offsetPx, maxO));
545
+ const t = axis.offsetToTimeContinuous(nextOff);
546
+ if (!t) return;
547
+ const out = snapToStep ? snap ? (0, import_utils.snapToStepMinutes)(t, stepMinutes) : t.startOf("minute") : t;
548
+ if ((0, import_utils.isInDisabledRanges)(out, disabledRanges)) return;
549
+ if (!isControlled) setInternalValue(out);
550
+ onChange == null ? void 0 : onChange(out);
551
+ },
552
+ [
553
+ axis.totalLengthPx,
554
+ axis.offsetToTimeContinuous,
555
+ snapToStep,
556
+ stepMinutes,
557
+ disabledRanges,
558
+ isControlled,
559
+ onChange
560
+ ]
561
+ );
562
+ const handleCursorDragPointerDown = (0, import_react.useCallback)(
563
+ (e) => {
564
+ if (userInteractionLocked || isAxisMoves) return;
565
+ e.preventDefault();
566
+ e.stopPropagation();
567
+ onUserInteraction == null ? void 0 : onUserInteraction();
568
+ cursorDragActiveRef.current = true;
569
+ cursorDragBaseRef.current = {
570
+ startClient: isHorizontal ? e.clientX : e.clientY,
571
+ startOffset: cursorOffsetPx
572
+ };
573
+ valueUpdatedByScrollRef.current = true;
574
+ e.currentTarget.setPointerCapture(e.pointerId);
575
+ },
576
+ [
577
+ userInteractionLocked,
578
+ isAxisMoves,
579
+ isHorizontal,
580
+ cursorOffsetPx,
581
+ onUserInteraction
582
+ ]
583
+ );
584
+ const handleCursorDragPointerMove = (0, import_react.useCallback)(
585
+ (e) => {
586
+ if (!cursorDragActiveRef.current) return;
587
+ const client = isHorizontal ? e.clientX : e.clientY;
588
+ const delta = client - cursorDragBaseRef.current.startClient;
589
+ const nextOff = cursorDragBaseRef.current.startOffset + delta;
590
+ applyOffsetToNavigatorValue(nextOff, false);
591
+ },
592
+ [isHorizontal, applyOffsetToNavigatorValue]
593
+ );
594
+ const handleCursorDragPointerUp = (0, import_react.useCallback)(
595
+ (e) => {
596
+ if (!cursorDragActiveRef.current) return;
597
+ cursorDragActiveRef.current = false;
598
+ try {
599
+ e.currentTarget.releasePointerCapture(e.pointerId);
600
+ } catch {
601
+ }
602
+ const client = isHorizontal ? e.clientX : e.clientY;
603
+ const delta = client - cursorDragBaseRef.current.startClient;
604
+ const nextOff = cursorDragBaseRef.current.startOffset + delta;
605
+ valueUpdatedByScrollRef.current = false;
606
+ applyOffsetToNavigatorValue(nextOff, true);
607
+ },
608
+ [isHorizontal, applyOffsetToNavigatorValue]
609
+ );
610
+ const businessHoursPx = (0, import_react.useMemo)(() => {
611
+ if (!businessHours) return void 0;
612
+ const [s, e] = (0, import_utils.getRangeBounds)(businessHours, referenceDate);
613
+ return [axis.timeToOffset(s), axis.timeToOffset(e)];
614
+ }, [businessHours, referenceDate, axis.timeToOffset]);
615
+ const scrollConfig = (0, import_react.useMemo)(
616
+ () => ({
617
+ show: false,
618
+ type: isHorizontal ? "lrArrows" : "tbArrows",
619
+ scrollDistance: cellSizePx
620
+ }),
621
+ [isHorizontal, cellSizePx]
622
+ );
623
+ return /* @__PURE__ */ import_react.default.createElement(
624
+ "div",
625
+ {
626
+ className: (0, import_classnames.default)(
627
+ "pisell-time-navigator",
628
+ `pisell-time-navigator--${orientation}`,
629
+ userInteractionLocked && "pisell-time-navigator--interaction-locked",
630
+ className
631
+ ),
632
+ style: isHorizontal ? style : { height: "100%", minHeight: 200, ...style }
633
+ },
634
+ /* @__PURE__ */ import_react.default.createElement(
635
+ "div",
636
+ {
637
+ ref: viewportWrapRef,
638
+ className: "pisell-time-navigator-viewport-wrap",
639
+ style: isHorizontal ? void 0 : { height: "100%", minHeight: 200, maxHeight: 800 },
640
+ onPointerDownCapture: () => {
641
+ isPointerDownRef.current = true;
642
+ },
643
+ onPointerUpCapture: handlePointerUp,
644
+ onPointerLeaveCapture: handlePointerUp
645
+ },
646
+ /* @__PURE__ */ import_react.default.createElement(
647
+ "div",
648
+ {
649
+ className: (0, import_classnames.default)(
650
+ "pisell-time-navigator-scroll-host",
651
+ userInteractionLocked && "pisell-time-navigator-scroll-host--interaction-locked"
652
+ )
653
+ },
654
+ /* @__PURE__ */ import_react.default.createElement(
655
+ import_PisellScrollView.default,
656
+ {
657
+ ref: scrollRef,
658
+ width: "100%",
659
+ height: "100%",
660
+ overflow: isHorizontal ? "x" : "y",
661
+ showScrollButtons: false,
662
+ scrollbarStyle: "none",
663
+ scrollActionsConfig: scrollConfig,
664
+ onScroll: handleScroll,
665
+ onScrollEnd: handleScrollEnd,
666
+ style: {
667
+ ...isHorizontal ? { height: 48 } : {
668
+ width: 54,
669
+ minHeight: 200,
670
+ height: "100%",
671
+ maxHeight: 800
672
+ },
673
+ ...containerStyle
674
+ }
675
+ },
676
+ /* @__PURE__ */ import_react.default.createElement(
677
+ import_components.GestureLayer,
678
+ {
679
+ orientation,
680
+ cellSizePx,
681
+ axisStartMarginPx: isHorizontal ? axisStartMarginW : axisStartMarginH,
682
+ offsetToTime: axis.offsetToTime,
683
+ onSelectTime: handleSelectTime,
684
+ isInDisabledRanges: isInDisabled,
685
+ snapToStep,
686
+ stepMinutes,
687
+ snapFn,
688
+ scrollPosition,
689
+ viewportSize,
690
+ onUserInteraction,
691
+ onPointerDown: inertiaHandlers.onPointerDown,
692
+ onPointerMove: inertiaHandlers.onPointerMove,
693
+ onPointerUp: inertiaHandlers.onPointerUp,
694
+ onPointerLeave: inertiaHandlers.onPointerUp
695
+ },
696
+ /* @__PURE__ */ import_react.default.createElement(
697
+ "div",
698
+ {
699
+ className: "pisell-time-navigator-axis-wrap",
700
+ style: isHorizontal ? horizontalAxisWrapStyle ?? { minHeight: 48 } : {
701
+ width: "100%"
702
+ /* 不设 height,由轴(marginTop + 内容 + marginBottom)自然撑开,避免固定高度与 margin 的 CSS 盒模型歧义 */
703
+ }
704
+ },
705
+ horizontalCurrentTimeHighlightStyle && /* @__PURE__ */ import_react.default.createElement(
706
+ "div",
707
+ {
708
+ className: "pisell-time-navigator-current-gradient pisell-time-navigator-current-gradient--horizontal",
709
+ style: horizontalCurrentTimeHighlightStyle,
710
+ "aria-hidden": true
711
+ }
712
+ ),
713
+ /* @__PURE__ */ import_react.default.createElement(
714
+ "div",
715
+ {
716
+ className: (0, import_classnames.default)(
717
+ "pisell-time-navigator-axis",
718
+ `pisell-time-navigator-axis--${orientation}`
719
+ ),
720
+ "data-time-navigator-axis": true,
721
+ style: isHorizontal ? {
722
+ width: axis.totalLengthPx,
723
+ height: 48,
724
+ marginLeft: axisStartMarginW
725
+ } : {
726
+ height: axis.totalLengthPx,
727
+ width: "100%",
728
+ marginTop: axisStartMarginH,
729
+ marginBottom: verticalTailPx
730
+ }
731
+ },
732
+ /* @__PURE__ */ import_react.default.createElement(
733
+ import_components.BackgroundLayer,
734
+ {
735
+ orientation,
736
+ pastTimeFade,
737
+ businessHoursPx
738
+ }
739
+ ),
740
+ horizontalDensityCurve ? /* @__PURE__ */ import_react.default.createElement(
741
+ "svg",
742
+ {
743
+ className: "pisell-time-navigator-density-layer",
744
+ width: horizontalDensityCurve.w,
745
+ height: horizontalDensityCurve.h,
746
+ viewBox: `0 0 ${horizontalDensityCurve.w} ${horizontalDensityCurve.h}`,
747
+ preserveAspectRatio: "none",
748
+ "aria-hidden": true
749
+ },
750
+ /* @__PURE__ */ import_react.default.createElement("defs", null, /* @__PURE__ */ import_react.default.createElement(
751
+ "linearGradient",
752
+ {
753
+ id: densityGradientId,
754
+ x1: "0",
755
+ y1: "0",
756
+ x2: "0",
757
+ y2: "1"
758
+ },
759
+ /* @__PURE__ */ import_react.default.createElement(
760
+ "stop",
761
+ {
762
+ offset: "0%",
763
+ stopColor: "#ff9c66",
764
+ stopOpacity: "0.32"
765
+ }
766
+ ),
767
+ /* @__PURE__ */ import_react.default.createElement(
768
+ "stop",
769
+ {
770
+ offset: "100%",
771
+ stopColor: "#ff9c66",
772
+ stopOpacity: "0.02"
773
+ }
774
+ )
775
+ )),
776
+ /* @__PURE__ */ import_react.default.createElement(
777
+ "path",
778
+ {
779
+ d: horizontalDensityCurve.areaPath,
780
+ fill: `url(#${densityGradientId})`
781
+ }
782
+ ),
783
+ /* @__PURE__ */ import_react.default.createElement(
784
+ "path",
785
+ {
786
+ d: horizontalDensityCurve.linePath,
787
+ fill: "none",
788
+ stroke: "#ff8a4a",
789
+ strokeWidth: 1.8,
790
+ vectorEffect: "non-scaling-stroke"
791
+ }
792
+ ),
793
+ horizontalDensityCurve.points.map((p, i) => /* @__PURE__ */ import_react.default.createElement(
794
+ "circle",
795
+ {
796
+ key: i,
797
+ cx: p.x,
798
+ cy: p.y,
799
+ r: 1.4,
800
+ fill: "#ff8a4a"
801
+ }
802
+ ))
803
+ ) : null,
804
+ /* @__PURE__ */ import_react.default.createElement(
805
+ import_components.ScaleLayer,
806
+ {
807
+ orientation,
808
+ ticks: axis.ticks,
809
+ stepMinutes,
810
+ majorStepMinutes,
811
+ timeFormat,
812
+ locale,
813
+ style: scaleStyle,
814
+ horizontalCellSizePx: isHorizontal ? cellSizePx : void 0
815
+ }
816
+ ),
817
+ isHorizontal && currentTimeOffsetPx != null && currentTimeOffsetPx >= 0 && /* @__PURE__ */ import_react.default.createElement(
818
+ "span",
819
+ {
820
+ className: "pisell-time-navigator-current-time-bubble",
821
+ style: { left: currentTimeOffsetPx },
822
+ "aria-hidden": true
823
+ },
824
+ locale ? wallAligned.locale(locale).format(timeFormat) : wallAligned.format(timeFormat)
825
+ ),
826
+ !isHorizontal && currentTimeOffsetPx != null && currentTimeOffsetPx >= 0 && /* @__PURE__ */ import_react.default.createElement(
827
+ "div",
828
+ {
829
+ className: "pisell-time-navigator-current-line",
830
+ style: {
831
+ left: 0,
832
+ top: currentTimeOffsetPx - 1,
833
+ width: "100%",
834
+ height: 2,
835
+ background: "#FF692E"
836
+ },
837
+ "aria-hidden": true
838
+ }
839
+ ),
840
+ !isAxisMoves && /* @__PURE__ */ import_react.default.createElement(
841
+ import_components.CursorLayer,
842
+ {
843
+ orientation,
844
+ value: effectiveValue,
845
+ timeFormat,
846
+ locale,
847
+ isRealtime: realtime,
848
+ offsetPx: cursorOffsetPx,
849
+ style: cursorStyle,
850
+ dragInteractive: !userInteractionLocked,
851
+ onDragPointerDown: handleCursorDragPointerDown,
852
+ onDragPointerMove: handleCursorDragPointerMove,
853
+ onDragPointerUp: handleCursorDragPointerUp,
854
+ onDragPointerCancel: handleCursorDragPointerUp
855
+ }
856
+ )
857
+ )
858
+ )
859
+ )
860
+ )
861
+ ),
862
+ isAxisMoves && /* @__PURE__ */ import_react.default.createElement(
863
+ "div",
864
+ {
865
+ className: (0, import_classnames.default)(
866
+ "pisell-time-navigator-cursor-fixed",
867
+ `pisell-time-navigator-cursor-fixed--${orientation}`
868
+ ),
869
+ "aria-hidden": true
870
+ },
871
+ /* @__PURE__ */ import_react.default.createElement(
872
+ import_components.CursorLayer,
873
+ {
874
+ orientation,
875
+ value: effectiveValue,
876
+ timeFormat,
877
+ locale,
878
+ isRealtime: realtime,
879
+ offsetPx: 0,
880
+ fixedCenter: true,
881
+ style: cursorStyle
882
+ }
883
+ )
884
+ ),
885
+ showNowButton && /* @__PURE__ */ import_react.default.createElement(
886
+ import_components.NowButton,
887
+ {
888
+ orientation,
889
+ onClick: handleNow,
890
+ style: nowButtonStyle,
891
+ renderCustom: renderNowButton
892
+ }
893
+ )
894
+ )
895
+ );
896
+ }
897
+ PisellTimeNavigator.displayName = "PisellTimeNavigator";
898
+ // Annotate the CommonJS export names for ESM import in node:
899
+ 0 && (module.exports = {
900
+ PisellTimeNavigator
901
+ });