hys-ui 0.2.0 → 0.4.0

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 (261) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +68 -59
  3. package/dist/components/HysAlert/HysAlert.vue.js +5 -54
  4. package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
  5. package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
  6. package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +146 -2
  7. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
  8. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
  9. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
  10. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
  11. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
  12. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
  13. package/dist/components/HysButton/HysButton.vue.js +2 -2
  14. package/dist/components/HysButton/HysButton2.vue.js +227 -60
  15. package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
  16. package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
  17. package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
  18. package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
  19. package/dist/components/HysCascader/HysCascader.vue.js +2 -2
  20. package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
  21. package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
  22. package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
  23. package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
  24. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
  25. package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
  26. package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
  27. package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
  28. package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
  29. package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
  30. package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
  31. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  32. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
  33. package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
  34. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
  35. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
  36. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
  37. package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
  38. package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
  39. package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
  40. package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
  41. package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
  42. package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
  43. package/dist/components/HysGantt/HysGantt.vue.js +1 -1
  44. package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
  45. package/dist/components/HysMention/HysMention.vue.js +1 -1
  46. package/dist/components/HysMention/HysMention2.vue.js +1092 -142
  47. package/dist/components/HysModal/HysModal.vue.js +2 -2
  48. package/dist/components/HysModal/HysModal2.vue.js +491 -85
  49. package/dist/components/HysPagination/HysPagination.vue.js +2 -2
  50. package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
  51. package/dist/components/HysPopover/HysPopover.vue.js +5 -91
  52. package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
  53. package/dist/components/HysProgress/HysProgress.vue.js +2 -2
  54. package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
  55. package/dist/components/HysSearch/HysSearch.vue.js +5 -82
  56. package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
  57. package/dist/components/HysSelect/HysSelect.vue.js +2 -2
  58. package/dist/components/HysSelect/HysSelect2.vue.js +755 -590
  59. package/dist/components/HysSlider/HysSlider.vue.js +2 -2
  60. package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
  61. package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
  62. package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
  63. package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
  64. package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
  65. package/dist/components/HysTable/HysTable.vue.js +2 -2
  66. package/dist/components/HysTable/HysTable2.vue.js +1416 -1127
  67. package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
  68. package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
  69. package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
  70. package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
  71. package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
  72. package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
  73. package/dist/components/HysTour/HysTour.vue.js +291 -63
  74. package/dist/components/HysTour/HysTour3.vue.js +5 -0
  75. package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
  76. package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
  77. package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
  78. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
  79. package/dist/components/HysTree/HysTree.vue.js +2 -2
  80. package/dist/components/HysTree/HysTree2.vue.js +195 -184
  81. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
  82. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
  83. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  84. package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
  85. package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
  86. package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
  87. package/dist/composables/buttonGroup.js +12 -0
  88. package/dist/composables/color.js +97 -0
  89. package/dist/composables/dataGrid.js +68 -0
  90. package/dist/composables/drawer.js +17 -0
  91. package/dist/composables/feedback.js +14 -0
  92. package/dist/composables/floatingPosition.js +18 -0
  93. package/dist/composables/mentionDocument.js +79 -0
  94. package/dist/composables/mentionEditor.js +58 -0
  95. package/dist/composables/menu.js +96 -0
  96. package/dist/composables/modal.js +14 -0
  97. package/dist/composables/overlayManager.js +48 -18
  98. package/dist/composables/progress.js +94 -0
  99. package/dist/composables/selectOptions.js +44 -38
  100. package/dist/composables/splitPaneSizes.js +58 -0
  101. package/dist/composables/table.js +128 -105
  102. package/dist/composables/tagInput.js +16 -0
  103. package/dist/composables/timeline.js +19 -0
  104. package/dist/composables/transfer.js +19 -17
  105. package/dist/composables/upload.js +55 -0
  106. package/dist/composables/uploadRequest.js +58 -0
  107. package/dist/composables/useAlert.js +124 -0
  108. package/dist/composables/useColorPicker.js +402 -0
  109. package/dist/composables/useContextMenu.js +514 -0
  110. package/dist/composables/useDataGridRemote.js +67 -0
  111. package/dist/composables/useDialog.js +86 -43
  112. package/dist/composables/useDrawerPush.js +33 -0
  113. package/dist/composables/useDrawerResize.js +221 -0
  114. package/dist/composables/useFloating.js +118 -80
  115. package/dist/composables/useHysModal.js +185 -0
  116. package/dist/composables/useMentionCaret.js +81 -0
  117. package/dist/composables/useMentionList.js +81 -0
  118. package/dist/composables/useMentionModel.js +90 -0
  119. package/dist/composables/useMentionOptions.js +421 -0
  120. package/dist/composables/useModal.js +295 -0
  121. package/dist/composables/useModalInteraction.js +394 -0
  122. package/dist/composables/usePopupSurface.js +458 -0
  123. package/dist/composables/useSplitPaneDrag.js +52 -0
  124. package/dist/composables/useSplitPaneStorage.js +38 -0
  125. package/dist/composables/useTable.js +344 -312
  126. package/dist/composables/useTableSticky.js +79 -0
  127. package/dist/composables/useTagInput.js +313 -0
  128. package/dist/composables/useTourLayout.js +129 -0
  129. package/dist/composables/useTransferMotion.js +185 -0
  130. package/dist/composables/useUpload.js +472 -0
  131. package/dist/composables/useUploadModel.js +65 -0
  132. package/dist/composables/useUploadRequests.js +266 -0
  133. package/dist/composables/useVirtualTableLayout.js +277 -0
  134. package/dist/composables/virtualTable.js +43 -0
  135. package/dist/config.js +11 -11
  136. package/dist/index.js +175 -153
  137. package/dist/internal/MultiSplitPane.vue.js +305 -0
  138. package/dist/internal/MultiSplitPane2.vue.js +4 -0
  139. package/dist/internal/PopupReference.js +39 -0
  140. package/dist/internal/PopupSurfacePanel.vue.js +7 -0
  141. package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
  142. package/dist/motion/PopupMotion.js +105 -0
  143. package/dist/motion/popup.js +10 -0
  144. package/dist/style.css +1 -1
  145. package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
  146. package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +61 -7
  147. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
  148. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
  149. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
  150. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
  151. package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
  152. package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
  153. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
  154. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
  155. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
  156. package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
  157. package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
  158. package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
  159. package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
  160. package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
  161. package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
  162. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
  163. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +3 -3
  164. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
  165. package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
  166. package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
  167. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
  168. package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -39
  169. package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
  170. package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
  171. package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
  172. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
  173. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
  174. package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
  175. package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
  176. package/dist/types/components/HysSearch/HysSearch.vue.d.ts +45 -7
  177. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +19 -5
  178. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
  179. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
  180. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
  181. package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
  182. package/dist/types/components/HysTable/HysTable.vue.d.ts +1742 -5
  183. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
  184. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
  185. package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
  186. package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
  187. package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -8
  188. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
  189. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
  190. package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
  191. package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
  192. package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
  193. package/dist/types/composables/autocomplete.d.ts +3 -0
  194. package/dist/types/composables/avatar.d.ts +3 -0
  195. package/dist/types/composables/buttonGroup.d.ts +9 -0
  196. package/dist/types/composables/cascader.d.ts +3 -0
  197. package/dist/types/composables/color.d.ts +97 -0
  198. package/dist/types/composables/dataGrid.d.ts +100 -0
  199. package/dist/types/composables/datePicker.d.ts +3 -0
  200. package/dist/types/composables/drawer.d.ts +102 -0
  201. package/dist/types/composables/feedback.d.ts +98 -0
  202. package/dist/types/composables/floatingPosition.d.ts +14 -0
  203. package/dist/types/composables/formContext.d.ts +2 -0
  204. package/dist/types/composables/mention.d.ts +284 -0
  205. package/dist/types/composables/mentionDocument.d.ts +15 -0
  206. package/dist/types/composables/mentionEditor.d.ts +7 -0
  207. package/dist/types/composables/menu.d.ts +183 -0
  208. package/dist/types/composables/modal.d.ts +185 -0
  209. package/dist/types/composables/overlayManager.d.ts +7 -3
  210. package/dist/types/composables/popupSurface.d.ts +83 -0
  211. package/dist/types/composables/progress.d.ts +92 -0
  212. package/dist/types/composables/selectOptions.d.ts +7 -0
  213. package/dist/types/composables/splitPaneSizes.d.ts +11 -0
  214. package/dist/types/composables/table.d.ts +119 -6
  215. package/dist/types/composables/tagInput.d.ts +96 -0
  216. package/dist/types/composables/timeline.d.ts +82 -0
  217. package/dist/types/composables/tour.d.ts +68 -0
  218. package/dist/types/composables/transfer.d.ts +7 -0
  219. package/dist/types/composables/tree.d.ts +3 -0
  220. package/dist/types/composables/treeSelect.d.ts +3 -0
  221. package/dist/types/composables/upload.d.ts +202 -0
  222. package/dist/types/composables/uploadRequest.d.ts +3 -0
  223. package/dist/types/composables/useAlert.d.ts +21 -0
  224. package/dist/types/composables/useCascader.d.ts +1 -1
  225. package/dist/types/composables/useColorPicker.d.ts +101 -0
  226. package/dist/types/composables/useContextMenu.d.ts +81 -0
  227. package/dist/types/composables/useDataGridRemote.d.ts +15 -0
  228. package/dist/types/composables/useDialog.d.ts +16 -3
  229. package/dist/types/composables/useDrawerPush.d.ts +6 -0
  230. package/dist/types/composables/useDrawerResize.d.ts +27 -0
  231. package/dist/types/composables/useFloating.d.ts +22 -3
  232. package/dist/types/composables/useHysModal.d.ts +44 -0
  233. package/dist/types/composables/useMentionCaret.d.ts +6 -0
  234. package/dist/types/composables/useMentionList.d.ts +23 -0
  235. package/dist/types/composables/useMentionModel.d.ts +14 -0
  236. package/dist/types/composables/useMentionOptions.d.ts +26 -0
  237. package/dist/types/composables/useModal.d.ts +62 -0
  238. package/dist/types/composables/useModalInteraction.d.ts +27 -0
  239. package/dist/types/composables/usePopupSurface.d.ts +3341 -0
  240. package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
  241. package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
  242. package/dist/types/composables/useTable.d.ts +7 -3
  243. package/dist/types/composables/useTableSticky.d.ts +22 -0
  244. package/dist/types/composables/useTagInput.d.ts +66 -0
  245. package/dist/types/composables/useTourLayout.d.ts +33 -0
  246. package/dist/types/composables/useTransferMotion.d.ts +36 -0
  247. package/dist/types/composables/useUpload.d.ts +94 -0
  248. package/dist/types/composables/useUploadModel.d.ts +14 -0
  249. package/dist/types/composables/useUploadRequests.d.ts +38 -0
  250. package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
  251. package/dist/types/composables/virtualTable.d.ts +126 -0
  252. package/dist/types/config.d.ts +1 -0
  253. package/dist/types/index.d.ts +53 -3
  254. package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
  255. package/dist/types/internal/PopupReference.d.ts +18 -0
  256. package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
  257. package/dist/types/motion/PopupMotion.d.ts +59 -0
  258. package/dist/types/motion/popup.d.ts +12 -0
  259. package/package.json +3 -2
  260. package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
  261. package/dist/components/HysTour/HysTour2.vue.js +0 -4
@@ -1,61 +1,64 @@
1
- import { defineComponent as Jt, ref as S, watch as G, computed as h, onMounted as Qt, onActivated as Zt, nextTick as ae, onDeactivated as jt, onBeforeUnmount as ea, useId as ta, shallowRef as aa, openBlock as o, createElementBlock as c, mergeProps as xt, unref as l, createElementVNode as u, createVNode as y, withCtx as U, createTextVNode as j, createCommentVNode as g, toDisplayString as p, normalizeStyle as H, withModifiers as m, Fragment as q, renderList as ee, withKeys as V, normalizeClass as X, createBlock as De, Teleport as la } from "vue";
2
- import { useHysRootAttrs as sa } from "../../config.js";
3
- import ia from "../HysSegmented/HysSegmented.vue.js";
4
- import W from "../HysButton/HysButton.vue.js";
5
- import It from "../HysInput/HysInput.vue.js";
6
- import na from "../HysPagination/HysPagination.vue.js";
7
- import { ganttDependencyPickPath as oa, ganttDependencyPath as ra, useGanttDependencies as ua } from "../../composables/useGanttDependencies.js";
8
- import { Undo2 as da, Redo2 as ca, TriangleAlert as Ct, X as Tt, Trash2 as Pt, ChevronDown as va, Search as Mt, LocateFixed as Qe, GitBranch as pa, Check as ha, CornerDownRight as ga } from "lucide-vue-next";
9
- import { useGanttLabelResize as fa } from "../../composables/useGanttLabelResize.js";
10
- import { useFloating as ya } from "../../composables/useFloating.js";
11
- import { useGanttHistory as ma } from "../../composables/useGanttHistory.js";
12
- import { analyzeGanttSchedule as ka, previewGanttConflicts as ba, ganttEdgeKey as wa } from "../../composables/ganttConflicts.js";
13
- const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
1
+ import { defineComponent as Ot, ref as z, watch as N, computed as g, onMounted as Yt, onActivated as Xt, nextTick as te, onDeactivated as Jt, onBeforeUnmount as Qt, useId as Zt, shallowRef as jt, openBlock as r, createElementBlock as c, mergeProps as kt, unref as l, createElementVNode as d, createVNode as f, withCtx as H, createTextVNode as Z, createCommentVNode as y, toDisplayString as h, normalizeStyle as _, withModifiers as k, Fragment as B, renderList as j, withKeys as A, normalizeClass as O, createBlock as ze, Teleport as ea } from "vue";
2
+ import ta from "../../motion/PopupMotion.js";
3
+ import { useHysRootAttrs as aa } from "../../config.js";
4
+ import la from "../HysSegmented/HysSegmented.vue.js";
5
+ import U from "../HysButton/HysButton.vue.js";
6
+ import bt from "../HysInput/HysInput.vue.js";
7
+ import sa from "../HysPagination/HysPagination.vue.js";
8
+ import { ganttDependencyPickPath as ia, ganttDependencyPath as na, useGanttDependencies as oa } from "../../composables/useGanttDependencies.js";
9
+ import { Undo2 as ra, Redo2 as ua, TriangleAlert as wt, X as xt, Trash2 as It, ChevronDown as da, Search as Ct, LocateFixed as Xe, GitBranch as ca, Check as va, CornerDownRight as pa } from "lucide-vue-next";
10
+ import { useGanttLabelResize as ha } from "../../composables/useGanttLabelResize.js";
11
+ import { useFloating as ga } from "../../composables/useFloating.js";
12
+ import { useGanttHistory as fa } from "../../composables/useGanttHistory.js";
13
+ import { analyzeGanttSchedule as ya, previewGanttConflicts as ma, ganttEdgeKey as ka } from "../../composables/ganttConflicts.js";
14
+ const ba = { class: "hys-ui-pg-toolbar" }, wa = {
14
15
  key: 0,
15
16
  class: "hys-ui-pg-history-controls",
16
17
  role: "group",
17
18
  "aria-label": "排期历史操作"
18
- }, Ca = { class: "hys-ui-pg-hint" }, Ta = { class: "hys-ui-pg-label-head" }, Pa = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], Ma = ["aria-pressed", "data-row-index", "onClick", "onKeydown"], za = ["title"], Sa = ["title"], Da = {
19
+ }, xa = { class: "hys-ui-pg-hint" }, Ia = { class: "hys-ui-pg-label-head" }, Ca = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], Ta = ["aria-pressed", "data-row-index", "onClick", "onKeydown"], Pa = ["title"], Ma = ["title"], za = {
19
20
  key: 0,
20
21
  class: "hys-ui-pg-empty"
21
- }, La = { class: "hys-ui-pg-months" }, $a = ["title"], Ea = { class: "hys-ui-pg-days" }, _a = ["data-row-index"], Ka = ["aria-pressed", "aria-label", "title", "onClick", "onKeydown", "onPointerdown"], Ha = { class: "hys-ui-pg-bar-title" }, Fa = ["onPointerdown"], Ra = ["onPointerdown"], Aa = ["aria-label", "onPointerdown", "onClick", "onKeydown"], Ua = ["width", "height", "aria-hidden"], Va = ["data-edge-key"], Wa = ["d"], Ba = ["d", "aria-label", "onClick", "onFocus", "onKeydown"], Na = ["cx", "cy"], qa = ["cx", "cy", "aria-label", "onFocus", "onPointerdown", "onClick", "onKeydown"], Ga = ["d"], Oa = ["cx", "cy"], Ya = ["transform", "aria-expanded", "aria-label", "onClick", "onKeydown"], Xa = {
22
+ }, Sa = { class: "hys-ui-pg-months" }, Da = ["title"], La = { class: "hys-ui-pg-days" }, $a = ["data-row-index"], Ea = ["aria-pressed", "aria-label", "title", "onClick", "onKeydown", "onPointerdown"], _a = { class: "hys-ui-pg-bar-title" }, Ka = ["onPointerdown"], Ha = ["onPointerdown"], Fa = ["aria-label", "onPointerdown", "onClick", "onKeydown"], Ra = ["width", "height", "aria-hidden"], Aa = ["data-edge-key"], Ua = ["d"], Va = ["d", "aria-label", "onClick", "onFocus", "onKeydown"], Wa = ["cx", "cy"], Ba = ["cx", "cy", "aria-label", "onFocus", "onPointerdown", "onClick", "onKeydown"], Na = ["d"], qa = ["cx", "cy"], Ga = ["transform", "aria-expanded", "aria-label", "onClick", "onKeydown"], Oa = {
22
23
  key: 0,
23
24
  cx: "29",
24
25
  r: "13",
25
26
  fill: "transparent",
26
27
  class: "hys-ui-pg-incoming-hit"
27
- }, Ja = {
28
+ }, Ya = {
28
29
  "text-anchor": "middle",
29
30
  dy: ".35em"
30
- }, Qa = ["d"], Za = { class: "hys-ui-pg-footer" }, ja = { key: 0 }, el = {
31
+ }, Xa = ["d"], Ja = { class: "hys-ui-pg-footer" }, Qa = { key: 0 }, Za = {
31
32
  key: 1,
32
33
  class: "hys-ui-pg-link-feedback"
33
- }, tl = {
34
+ }, ja = {
34
35
  role: "status",
35
36
  "aria-live": "polite"
36
- }, al = {
37
+ }, el = {
37
38
  key: 2,
38
39
  class: "hys-ui-pg-history-message",
39
40
  "aria-live": "polite"
40
- }, ll = {
41
+ }, tl = {
41
42
  key: 3,
42
43
  class: "hys-ui-pg-conflict-area"
43
- }, sl = { class: "hys-ui-pg-conflict-summary" }, il = { "aria-live": "polite" }, nl = {
44
+ }, al = { class: "hys-ui-pg-conflict-summary" }, ll = { "aria-live": "polite" }, sl = {
44
45
  key: 0,
45
46
  class: "hys-ui-pg-conflict-preview"
46
- }, ol = { class: "hys-ui-pg-conflict-list" }, rl = { class: "hys-ui-pg-conflict-tag" }, ul = {
47
+ }, il = { class: "hys-ui-pg-conflict-list" }, nl = { class: "hys-ui-pg-conflict-tag" }, ol = {
47
48
  key: 0,
48
49
  class: "hys-ui-pg-conflict-empty"
49
- }, dl = ["aria-label"], cl = { class: "hys-ui-pg-picker-heading" }, vl = { class: "hys-ui-pg-picker-target" }, pl = { class: "hys-ui-pg-picker-target-main" }, hl = ["title"], gl = { class: "hys-ui-pg-picker-options" }, fl = ["data-current"], yl = { class: "hys-ui-pg-picker-names" }, ml = ["title"], kl = { class: "hys-ui-pg-picker-check" }, bl = { class: "hys-ui-pg-picker-actions" }, wl = {
50
+ }, rl = ["aria-label"], ul = { class: "hys-ui-pg-picker-heading" }, dl = { class: "hys-ui-pg-picker-target" }, cl = { class: "hys-ui-pg-picker-target-main" }, vl = ["title"], pl = { class: "hys-ui-pg-picker-options" }, hl = ["data-current"], gl = { class: "hys-ui-pg-picker-names" }, fl = ["title"], yl = { class: "hys-ui-pg-picker-check" }, ml = { class: "hys-ui-pg-picker-actions" }, kl = {
50
51
  key: 0,
51
52
  class: "hys-ui-pg-picker-empty"
52
- }, xl = {
53
+ }, bl = {
53
54
  key: 0,
54
55
  class: "hys-ui-pg-picker-notice",
55
56
  role: "status"
56
- }, zt = 864e5, Kl = /* @__PURE__ */ Jt({
57
+ }, Tt = 864e5, _l = /* @__PURE__ */ Ot({
57
58
  __name: "HysGantt",
58
59
  props: {
60
+ popupTransition: {},
61
+ popupTransitionDuration: {},
59
62
  items: {},
60
63
  modelValue: {},
61
64
  scale: { default: "day" },
@@ -79,230 +82,230 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
79
82
  showConflicts: { type: Boolean, default: !0 }
80
83
  },
81
84
  emits: ["update:modelValue", "update:scale", "scaleChange", "update:items", "change", "open", "dependencyAdd", "dependencyRemove", "dependencyInvalid", "dependencyMove", "update:labelWidth", "labelResize", "historyChange", "undo", "redo", "historyInvalid", "conflictChange"],
82
- setup($, { expose: St, emit: Dt }) {
83
- const Ze = sa(), r = $, w = Dt, J = S(r.scale);
84
- G(
85
- () => r.scale,
86
- (e) => J.value = e
85
+ setup(L, { expose: Pt, emit: Mt }) {
86
+ const Je = aa(), u = L, b = Mt, Y = z(u.scale);
87
+ N(
88
+ () => u.scale,
89
+ (e) => Y.value = e
87
90
  );
88
- const F = S(r.modelValue ?? null);
89
- G(
90
- () => r.modelValue,
91
- (e) => F.value = e ?? null
91
+ const K = z(u.modelValue ?? null);
92
+ N(
93
+ () => u.modelValue,
94
+ (e) => K.value = e ?? null
92
95
  );
93
- const Le = S(), x = S(null), $e = S(null), Ee = S(0), je = S(null), be = /* @__PURE__ */ new Date();
94
- be.setHours(0, 0, 0, 0);
95
- function et(e) {
96
+ const Se = z(), w = z(null), De = z(null), Le = z(0), Qe = z(null), ke = /* @__PURE__ */ new Date();
97
+ ke.setHours(0, 0, 0, 0);
98
+ function Ze(e) {
96
99
  return typeof e == "number" ? Number.isFinite(e) && e >= 0 ? e + "px" : void 0 : typeof e == "string" && e.trim() ? e : void 0;
97
100
  }
98
- const Lt = h(() => ({
99
- height: et(r.height),
100
- maxHeight: r.maxHeight === !1 || r.height !== void 0 && r.maxHeight === void 0 ? "none" : et(
101
- r.maxHeight ?? (r.height === void 0 ? 620 : void 0)
101
+ const zt = g(() => ({
102
+ height: Ze(u.height),
103
+ maxHeight: u.maxHeight === !1 || u.height !== void 0 && u.maxHeight === void 0 ? "none" : Ze(
104
+ u.maxHeight ?? (u.height === void 0 ? 620 : void 0)
102
105
  ),
103
- scrollPaddingInlineStart: Ee.value + "px"
106
+ scrollPaddingInlineStart: Le.value + "px"
104
107
  }));
105
- function we(e) {
108
+ function be(e) {
106
109
  if (!/^\d{4}-\d{2}-\d{2}$/.test(e)) return null;
107
- const [t, s, n] = e.split("-").map(Number), d = new Date(t, s - 1, n);
108
- return d.getFullYear() === t && d.getMonth() === s - 1 && d.getDate() === n ? d : null;
110
+ const [t, s, a] = e.split("-").map(Number), n = new Date(t, s - 1, a);
111
+ return n.getFullYear() === t && n.getMonth() === s - 1 && n.getDate() === a ? n : null;
109
112
  }
110
- function Q(e) {
113
+ function X(e) {
111
114
  return Math.round(
112
- (Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()) - Date.UTC(1970, 0, 1)) / zt
115
+ (Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()) - Date.UTC(1970, 0, 1)) / Tt
113
116
  );
114
117
  }
115
- function xe(e) {
116
- return new Date(e * zt);
118
+ function we(e) {
119
+ return new Date(e * Tt);
117
120
  }
118
- function _e(e) {
119
- return xe(e).toISOString().slice(0, 10);
121
+ function $e(e) {
122
+ return we(e).toISOString().slice(0, 10);
120
123
  }
121
- const I = h(
122
- () => Number.isFinite(r.rowHeight) && r.rowHeight > 0 ? r.rowHeight : 46
123
- ), E = h(() => {
124
+ const x = g(
125
+ () => Number.isFinite(u.rowHeight) && u.rowHeight > 0 ? u.rowHeight : 46
126
+ ), $ = g(() => {
124
127
  const e = /* @__PURE__ */ new Map(), t = (s) => {
125
128
  if (!e.has(s)) {
126
- const n = we(s);
127
- e.set(s, n ? Q(n) : null);
129
+ const a = be(s);
130
+ e.set(s, a ? X(a) : null);
128
131
  }
129
132
  return e.get(s);
130
133
  };
131
- return r.items.map((s) => {
132
- const n = t(s.start), d = t(s.end);
133
- return n === null || d === null || d < n ? null : {
134
+ return u.items.map((s) => {
135
+ const a = t(s.start), n = t(s.end);
136
+ return a === null || n === null || n < a ? null : {
134
137
  ...s,
135
- s: n,
136
- e: d,
138
+ s: a,
139
+ e: n,
137
140
  progress: Math.min(100, Math.max(0, s.progress ?? 0))
138
141
  };
139
142
  }).filter((s) => s !== null);
140
- }), $t = h(
141
- () => E.value.filter((e) => e.status === "已完成").length
142
- ), Ve = S(620), ve = S(0), le = h(() => {
143
- const e = E.value.length;
144
- if (!r.virtual) return { start: 0, end: e };
145
- const t = Number.isFinite(r.overscan) ? Math.max(0, Math.min(100, Math.floor(r.overscan))) : 6, s = Math.min(
143
+ }), St = g(
144
+ () => $.value.filter((e) => e.status === "已完成").length
145
+ ), Ae = z(620), ce = z(0), ae = g(() => {
146
+ const e = $.value.length;
147
+ if (!u.virtual) return { start: 0, end: e };
148
+ const t = Number.isFinite(u.overscan) ? Math.max(0, Math.min(100, Math.floor(u.overscan))) : 6, s = Math.min(
146
149
  Math.max(0, e - 1),
147
- Math.max(0, Math.floor(ve.value / I.value))
150
+ Math.max(0, Math.floor(ce.value / x.value))
148
151
  );
149
152
  return {
150
153
  start: Math.max(0, s - t),
151
154
  end: Math.min(
152
155
  e,
153
156
  s + Math.ceil(
154
- Math.max(I.value, Ve.value - 66) / I.value
157
+ Math.max(x.value, Ae.value - 66) / x.value
155
158
  ) + t + 1
156
159
  )
157
160
  };
158
- }), tt = h(
159
- () => E.value.slice(le.value.start, le.value.end).map((e, t) => ({ task: e, index: t + le.value.start }))
160
- ), Et = h(
161
- () => J.value === "day" ? 36 : J.value === "week" ? 17 : J.value === "month" ? 7 : 36
162
- ), O = h(() => {
163
- const e = Q(be);
161
+ }), je = g(
162
+ () => $.value.slice(ae.value.start, ae.value.end).map((e, t) => ({ task: e, index: t + ae.value.start }))
163
+ ), Dt = g(
164
+ () => Y.value === "day" ? 36 : Y.value === "week" ? 17 : Y.value === "month" ? 7 : 36
165
+ ), q = g(() => {
166
+ const e = X(ke);
164
167
  let t = e - 7, s = e + 21;
165
- for (const n of E.value)
166
- t = Math.min(t, n.s), s = Math.max(s, n.e);
168
+ for (const a of $.value)
169
+ t = Math.min(t, a.s), s = Math.max(s, a.e);
167
170
  return { start: t - 7, end: s + 14 };
168
- }), We = h(() => O.value.end - O.value.start + 1), se = S(0), D = h(
171
+ }), Ue = g(() => q.value.end - q.value.start + 1), le = z(0), S = g(
169
172
  () => Math.max(
170
- Et.value,
171
- r.fitContainer ? se.value / We.value : 0
173
+ Dt.value,
174
+ u.fitContainer ? le.value / Ue.value : 0
172
175
  )
173
- ), Be = h(
176
+ ), Ve = g(
174
177
  () => Math.max(
175
- We.value * D.value,
176
- r.fitContainer ? se.value : 0
178
+ Ue.value * S.value,
179
+ u.fitContainer ? le.value : 0
177
180
  )
178
181
  );
179
- let ie, C = !0;
180
- const at = S(0), T = fa({
181
- width: () => r.labelWidth,
182
- min: () => r.minLabelWidth,
183
- max: () => r.maxLabelWidth,
184
- enabled: () => r.labelResizable,
185
- available: at,
182
+ let se, C = !0;
183
+ const et = z(0), T = ha({
184
+ width: () => u.labelWidth,
185
+ min: () => u.minLabelWidth,
186
+ max: () => u.maxLabelWidth,
187
+ enabled: () => u.labelResizable,
188
+ available: et,
186
189
  live: () => C,
187
190
  start: () => {
188
- B(), i.cancel();
191
+ V(), i.cancel();
189
192
  },
190
- update: (e) => w("update:labelWidth", e),
191
- commit: (e) => w("labelResize", e)
193
+ update: (e) => b("update:labelWidth", e),
194
+ commit: (e) => b("labelResize", e)
192
195
  });
193
- let Ke = !1, pe = 0, he, Ie, Z = { top: 0, left: 0 };
194
- function _t() {
195
- he = void 0, C && r.virtual && (ve.value = Math.floor(Z.top / I.value) * I.value);
196
+ let Ee = !1, ve = 0, pe, xe, J = { top: 0, left: 0 };
197
+ function Lt() {
198
+ pe = void 0, C && u.virtual && (ce.value = Math.floor(J.top / x.value) * x.value);
196
199
  }
197
- G(
198
- [() => r.virtual, I],
200
+ N(
201
+ [() => u.virtual, x],
199
202
  () => {
200
203
  var e;
201
- ve.value = Math.floor(
202
- (((e = x.value) == null ? void 0 : e.scrollTop) ?? Z.top) / I.value
203
- ) * I.value;
204
+ ce.value = Math.floor(
205
+ (((e = w.value) == null ? void 0 : e.scrollTop) ?? J.top) / x.value
206
+ ) * x.value;
204
207
  },
205
208
  { flush: "sync" }
206
209
  );
207
- function lt() {
208
- const e = x.value;
209
- if (!C || Ke || !(e != null && e.isConnected)) return;
210
- const t = Z.top !== e.scrollTop, s = Z.left !== e.scrollLeft;
211
- Z = { top: e.scrollTop, left: e.scrollLeft }, (t || s) && M.close(), r.virtual && t && he === void 0 && (he = requestAnimationFrame(_t));
210
+ function tt() {
211
+ const e = w.value;
212
+ if (!C || Ee || !(e != null && e.isConnected)) return;
213
+ const t = J.top !== e.scrollTop, s = J.left !== e.scrollLeft;
214
+ J = { top: e.scrollTop, left: e.scrollLeft }, (t || s) && M.close(), u.virtual && t && pe === void 0 && (pe = requestAnimationFrame(Lt));
212
215
  }
213
- function st() {
214
- he !== void 0 && cancelAnimationFrame(he), Ie !== void 0 && cancelAnimationFrame(Ie), he = Ie = void 0;
216
+ function at() {
217
+ pe !== void 0 && cancelAnimationFrame(pe), xe !== void 0 && cancelAnimationFrame(xe), pe = xe = void 0;
215
218
  }
216
- function Ce() {
217
- var e, t, s, n;
218
- C && (at.value = ((e = x.value) == null ? void 0 : e.clientWidth) || 0, Ee.value = ((t = $e.value) == null ? void 0 : t.offsetWidth) || T.width.value, Ve.value = ((s = x.value) == null ? void 0 : s.clientHeight) || 620, se.value = Math.max(
219
+ function Ie() {
220
+ var e, t, s, a;
221
+ C && (et.value = ((e = w.value) == null ? void 0 : e.clientWidth) || 0, Le.value = ((t = De.value) == null ? void 0 : t.offsetWidth) || T.width.value, Ae.value = ((s = w.value) == null ? void 0 : s.clientHeight) || 620, le.value = Math.max(
219
222
  0,
220
- (((n = x.value) == null ? void 0 : n.clientWidth) || 0) - Ee.value
223
+ (((a = w.value) == null ? void 0 : a.clientWidth) || 0) - Le.value
221
224
  ));
222
225
  }
223
- function Ne() {
224
- ie == null || ie.disconnect(), ie = void 0, window.removeEventListener("resize", Ce);
226
+ function We() {
227
+ se == null || se.disconnect(), se = void 0, window.removeEventListener("resize", Ie);
225
228
  }
226
- function it() {
227
- Ne(), !(!C || !x.value) && (Ce(), typeof ResizeObserver < "u" ? (ie = new ResizeObserver(Ce), ie.observe(x.value), $e.value && ie.observe($e.value)) : window.addEventListener("resize", Ce));
229
+ function lt() {
230
+ We(), !(!C || !w.value) && (Ie(), typeof ResizeObserver < "u" ? (se = new ResizeObserver(Ie), se.observe(w.value), De.value && se.observe(De.value)) : window.addEventListener("resize", Ie));
228
231
  }
229
- Qt(it), Zt(async () => {
230
- const e = ++pe;
231
- C = !0, Ke = !0, await ae(), !(!C || e !== pe) && (it(), await ae(), !(!C || e !== pe || !x.value) && (x.value.scrollTop = Z.top, x.value.scrollLeft = Z.left, ve.value = x.value.scrollTop, Ie = requestAnimationFrame(() => {
232
- Ie = void 0, C && e === pe && (Ke = !1, lt());
232
+ Yt(lt), Xt(async () => {
233
+ const e = ++ve;
234
+ C = !0, Ee = !0, await te(), !(!C || e !== ve) && (lt(), await te(), !(!C || e !== ve || !w.value) && (w.value.scrollTop = J.top, w.value.scrollLeft = J.left, ce.value = w.value.scrollTop, xe = requestAnimationFrame(() => {
235
+ xe = void 0, C && e === ve && (Ee = !1, tt());
233
236
  })));
234
- }), jt(() => {
235
- C = !1, Ke = !0, pe++, st(), Ne(), B();
236
- }), ea(() => {
237
- C = !1, pe++, st(), Ne(), B();
237
+ }), Jt(() => {
238
+ C = !1, Ee = !0, ve++, at(), We(), V();
239
+ }), Qt(() => {
240
+ C = !1, ve++, at(), We(), V();
238
241
  });
239
- function Kt(e) {
240
- !["day", "week", "month"].includes(e) || e === J.value || (i.cancel(), B(), J.value = e, w("update:scale", e), w("scaleChange", e));
242
+ function $t(e) {
243
+ !["day", "week", "month"].includes(e) || e === Y.value || (i.cancel(), V(), Y.value = e, b("update:scale", e), b("scaleChange", e));
241
244
  }
242
- const He = h(
243
- () => Array.from({ length: We.value }, (e, t) => O.value.start + t)
244
- ), Ht = h(() => {
245
+ const _e = g(
246
+ () => Array.from({ length: Ue.value }, (e, t) => q.value.start + t)
247
+ ), Et = g(() => {
245
248
  const e = [];
246
- for (let t = 0; t < He.value.length; t++) {
247
- const s = xe(He.value[t]), n = `${s.getUTCFullYear()}-${s.getUTCMonth()}`, d = e[e.length - 1];
248
- (d == null ? void 0 : d.key) === n ? d.width += D.value : e.push({
249
- key: n,
249
+ for (let t = 0; t < _e.value.length; t++) {
250
+ const s = we(_e.value[t]), a = `${s.getUTCFullYear()}-${s.getUTCMonth()}`, n = e[e.length - 1];
251
+ (n == null ? void 0 : n.key) === a ? n.width += S.value : e.push({
252
+ key: a,
250
253
  label: `${s.getUTCFullYear()}年${s.getUTCMonth() + 1}月`,
251
- left: t * D.value,
252
- width: D.value
254
+ left: t * S.value,
255
+ width: S.value
253
256
  });
254
257
  }
255
258
  return e;
256
- }), ge = h(
259
+ }), he = g(
257
260
  () => new Map(
258
- E.value.map((e, t) => [
261
+ $.value.map((e, t) => [
259
262
  e.id,
260
263
  {
261
- x: (e.s - O.value.start) * D.value,
262
- w: (e.e - e.s + 1) * D.value,
263
- y: t * I.value + I.value / 2,
264
+ x: (e.s - q.value.start) * S.value,
265
+ w: (e.e - e.s + 1) * S.value,
266
+ y: t * x.value + x.value / 2,
264
267
  index: t
265
268
  }
266
269
  ])
267
270
  )
268
- ), qe = h(
269
- () => E.value.flatMap(
271
+ ), Be = g(
272
+ () => $.value.flatMap(
270
273
  (e) => [...new Set(e.dependencies ?? [])].flatMap((t) => {
271
- var d;
272
- const s = ge.value.get(t), n = ge.value.get(e.id);
273
- return !s || !n || t === e.id ? [] : [
274
+ var n;
275
+ const s = he.value.get(t), a = he.value.get(e.id);
276
+ return !s || !a || t === e.id ? [] : [
274
277
  {
275
278
  id: JSON.stringify([t, e.id]),
276
279
  sourceId: t,
277
- sourceTitle: E.value[s.index].title,
280
+ sourceTitle: $.value[s.index].title,
278
281
  targetId: e.id,
279
282
  targetTitle: e.title,
280
- first: Math.min(s.index, n.index),
281
- last: Math.max(s.index, n.index),
282
- endpoint: { x: n.x - 9, y: n.y },
283
- editable: !e.disabled && !((d = E.value[s.index]) != null && d.disabled),
283
+ first: Math.min(s.index, a.index),
284
+ last: Math.max(s.index, a.index),
285
+ endpoint: { x: a.x - 9, y: a.y },
286
+ editable: !e.disabled && !((n = $.value[s.index]) != null && n.disabled),
284
287
  removable: !e.disabled,
285
- path: ra(s, n, I.value),
286
- pickPath: oa(s, n, I.value)
288
+ path: na(s, a, x.value),
289
+ pickPath: ia(s, a, x.value)
287
290
  }
288
291
  ];
289
292
  })
290
293
  )
291
- ), nt = h(
292
- () => r.virtual ? qe.value.filter(
293
- (e) => e.last >= le.value.start && e.first < le.value.end
294
- ) : qe.value
295
- ), Te = h(() => {
294
+ ), st = g(
295
+ () => u.virtual ? Be.value.filter(
296
+ (e) => e.last >= ae.value.start && e.first < ae.value.end
297
+ ) : Be.value
298
+ ), Ce = g(() => {
296
299
  const e = /* @__PURE__ */ new Map();
297
- for (const t of qe.value) {
300
+ for (const t of Be.value) {
298
301
  const s = e.get(t.targetId);
299
302
  s ? s.push(t) : e.set(t.targetId, [t]);
300
303
  }
301
304
  return e;
302
- }), Ft = h(
303
- () => [...Te.value].flatMap(([e, t]) => {
304
- const s = ge.value.get(e);
305
- return t.length > 1 && s && s.index >= le.value.start && s.index < le.value.end ? [
305
+ }), _t = g(
306
+ () => [...Ce.value].flatMap(([e, t]) => {
307
+ const s = he.value.get(e);
308
+ return t.length > 1 && s && s.index >= ae.value.start && s.index < ae.value.end ? [
306
309
  {
307
310
  id: e,
308
311
  title: t[0].targetTitle,
@@ -312,350 +315,350 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
312
315
  }
313
316
  ] : [];
314
317
  })
315
- ), R = h(
316
- () => r.dependencyEditable ?? r.editable
317
- ), f = ma({
318
- items: () => r.items,
319
- enabled: () => r.history,
320
- limit: () => r.historyLimit,
318
+ ), F = g(
319
+ () => u.dependencyEditable ?? u.editable
320
+ ), m = fa({
321
+ items: () => u.items,
322
+ enabled: () => u.history,
323
+ limit: () => u.historyLimit,
321
324
  live: () => C,
322
325
  allowed: (e, t) => !e.disabled && t.every(
323
- (s) => s === "dependencies" ? R.value : r.editable
326
+ (s) => s === "dependencies" ? F.value : u.editable
324
327
  ),
325
- send: (e) => w("update:items", e),
326
- change: (e) => w("change", e),
328
+ send: (e) => b("update:items", e),
329
+ change: (e) => b("change", e),
327
330
  beforeReplay: () => {
328
- B(), i.cancel(), i.clearSelected(), M.close();
331
+ V(), i.cancel(), i.clearSelected(), M.close();
329
332
  },
330
333
  external: () => {
331
- B(), i.cancel(), i.clearSelected(), M.close();
334
+ V(), i.cancel(), i.clearSelected(), M.close();
332
335
  },
333
- state: (e) => w("historyChange", e),
334
- invalid: (e) => w("historyInvalid", e),
336
+ state: (e) => b("historyChange", e),
337
+ invalid: (e) => b("historyInvalid", e),
335
338
  replay: (e, t) => {
336
339
  var s;
337
- w(e === "undo" ? "undo" : "redo", t), (s = x.value) == null || s.focus({ preventScroll: !0 });
340
+ b(e === "undo" ? "undo" : "redo", t), (s = w.value) == null || s.focus({ preventScroll: !0 });
338
341
  }
339
- }), Ge = h(
340
- () => new Map(r.items.map((e) => [e.id, e]))
341
- ), ne = h(() => ka(r.items)), oe = h(() => ne.value.conflicts), Rt = h(
342
- () => oe.value.map((e) => ({ ...e }))
343
- ), te = S(!1), fe = S(""), re = S(1), ot = "hys-gantt-conflicts-" + ta(), ye = h(() => {
344
- const e = fe.value.trim().toLocaleLowerCase();
345
- return e ? oe.value.filter(
342
+ }), Ne = g(
343
+ () => new Map(u.items.map((e) => [e.id, e]))
344
+ ), ie = g(() => ya(u.items)), ne = g(() => ie.value.conflicts), Kt = g(
345
+ () => ne.value.map((e) => ({ ...e }))
346
+ ), ee = z(!1), ge = z(""), oe = z(1), it = "hys-gantt-conflicts-" + Zt(), fe = g(() => {
347
+ const e = ge.value.trim().toLocaleLowerCase();
348
+ return e ? ne.value.filter(
346
349
  (t) => (t.taskTitle + " " + t.taskId + " " + (t.sourceTitle ?? "") + " " + (t.sourceId ?? "") + " " + t.message).toLocaleLowerCase().includes(e)
347
- ) : oe.value;
348
- }), At = h(
349
- () => ye.value.slice(
350
- (re.value - 1) * 10,
351
- re.value * 10
350
+ ) : ne.value;
351
+ }), Ht = g(
352
+ () => fe.value.slice(
353
+ (oe.value - 1) * 10,
354
+ oe.value * 10
352
355
  )
353
356
  );
354
- G([ye, fe], () => {
355
- re.value = Math.min(
356
- re.value,
357
- Math.max(1, Math.ceil(ye.value.length / 10))
357
+ N([fe, ge], () => {
358
+ oe.value = Math.min(
359
+ oe.value,
360
+ Math.max(1, Math.ceil(fe.value.length / 10))
358
361
  );
359
- }), G(fe, () => re.value = 1), G(
360
- () => r.showConflicts,
362
+ }), N(ge, () => oe.value = 1), N(
363
+ () => u.showConflicts,
361
364
  (e) => {
362
- e || (te.value = !1);
365
+ e || (ee.value = !1);
363
366
  }
364
367
  );
365
- let rt = "";
366
- G(
367
- oe,
368
+ let nt = "";
369
+ N(
370
+ ne,
368
371
  (e) => {
369
372
  const t = JSON.stringify(e);
370
- t !== rt && (rt = t, w(
373
+ t !== nt && (nt = t, b(
371
374
  "conflictChange",
372
375
  e.map((s) => ({ ...s }))
373
376
  ));
374
377
  },
375
378
  { immediate: !0 }
376
379
  );
377
- const i = ua({
378
- items: () => r.items,
379
- rows: () => E.value,
380
- enabled: R,
380
+ const i = oa({
381
+ items: () => u.items,
382
+ rows: () => $.value,
383
+ enabled: F,
381
384
  live: () => C,
382
- root: Le,
383
- viewport: x,
384
- grid: je,
385
- labelWidth: () => Ee.value,
386
- rowHeight: () => I.value,
387
- position: (e) => ge.value.get(e),
388
- locate: ze,
389
- cancelTask: B,
385
+ root: Se,
386
+ viewport: w,
387
+ grid: Qe,
388
+ labelWidth: () => Le.value,
389
+ rowHeight: () => x.value,
390
+ position: (e) => he.value.get(e),
391
+ locate: Me,
392
+ cancelTask: V,
390
393
  update: (e, t) => {
391
- var s, n;
392
- return f.capture(e, {
394
+ var s, a;
395
+ return m.capture(e, {
393
396
  type: t.type === "add" ? "dependency-add" : t.type === "remove" ? "dependency-remove" : "dependency-move",
394
- label: (t.type === "add" ? "添加依赖:" : t.type === "remove" ? "删除依赖:" : "改接依赖:") + (((s = Ge.value.get(t.sourceId)) == null ? void 0 : s.title) ?? t.sourceId) + " → " + (((n = Ge.value.get(t.targetId)) == null ? void 0 : n.title) ?? t.targetId)
397
+ label: (t.type === "add" ? "添加依赖:" : t.type === "remove" ? "删除依赖:" : "改接依赖:") + (((s = Ne.value.get(t.sourceId)) == null ? void 0 : s.title) ?? t.sourceId) + " → " + (((a = Ne.value.get(t.targetId)) == null ? void 0 : a.title) ?? t.targetId)
395
398
  });
396
399
  },
397
- change: (e) => w("change", e),
398
- added: (e, t) => w("dependencyAdd", e, t),
399
- removed: (e, t) => w("dependencyRemove", e, t),
400
- moved: (e, t, s) => w("dependencyMove", e, t, s),
401
- invalid: (e) => w("dependencyInvalid", e)
402
- }), ue = h(() => {
400
+ change: (e) => b("change", e),
401
+ added: (e, t) => b("dependencyAdd", e, t),
402
+ removed: (e, t) => b("dependencyRemove", e, t),
403
+ moved: (e, t, s) => b("dependencyMove", e, t, s),
404
+ invalid: (e) => b("dependencyInvalid", e)
405
+ }), re = g(() => {
403
406
  var t;
404
407
  const e = i.selected.value;
405
- return e ? (t = Te.value.get(e.targetId)) == null ? void 0 : t.find((s) => s.sourceId === e.sourceId) : void 0;
406
- }), ut = aa(), me = S(), de = S(), Fe = S(""), Pe = S(), Me = S(""), M = ya(ut, me, {
408
+ return e ? (t = Ce.value.get(e.targetId)) == null ? void 0 : t.find((s) => s.sourceId === e.sourceId) : void 0;
409
+ }), ot = jt(), ye = z(), ue = z(), Ke = z(""), Te = z(), Pe = z(""), M = ga(ot, ye, {
407
410
  placement: "bottom-start",
408
411
  gap: 8,
409
412
  width: () => 380
410
- }), ce = h(
411
- () => de.value === void 0 ? [] : Te.value.get(de.value) ?? []
412
- ), dt = h(() => {
413
- const e = Fe.value.trim().toLocaleLowerCase();
414
- return e ? ce.value.filter(
413
+ }), de = g(
414
+ () => ue.value === void 0 ? [] : Ce.value.get(ue.value) ?? []
415
+ ), rt = g(() => {
416
+ const e = Ke.value.trim().toLocaleLowerCase();
417
+ return e ? de.value.filter(
415
418
  (t) => (t.sourceTitle + " " + t.sourceId).toLocaleLowerCase().includes(e)
416
- ) : ce.value;
419
+ ) : de.value;
417
420
  });
418
- async function Oe(e, t) {
419
- var s, n, d;
420
- if (!(!C || !R.value)) {
421
- if (M.open.value && de.value === t) {
421
+ async function qe(e, t) {
422
+ var s, a, n;
423
+ if (!(!C || !F.value)) {
424
+ if (M.open.value && ue.value === t) {
422
425
  M.close(!0);
423
426
  return;
424
427
  }
425
- i.cancel(!i.selected.value), M.close(), de.value = t, Fe.value = "", Me.value = "", ut.value = e.currentTarget, await M.show(), C && M.open.value && ((d = ((s = me.value) == null ? void 0 : s.querySelector(
428
+ i.cancel(!i.selected.value), M.close(), ue.value = t, Ke.value = "", Pe.value = "", ot.value = e.currentTarget, await M.show(), C && M.open.value && ((n = ((s = ye.value) == null ? void 0 : s.querySelector(
426
429
  '[data-pg-choice][aria-pressed="true"]'
427
- )) ?? ((n = me.value) == null ? void 0 : n.querySelector("[data-pg-choice]"))) == null || d.focus());
430
+ )) ?? ((a = ye.value) == null ? void 0 : a.querySelector("[data-pg-choice]"))) == null || n.focus());
428
431
  }
429
432
  }
430
- async function Ut(e, t) {
431
- var n, d;
432
- if (M.close(), i.selectEdge(e, t.sourceId, t.targetId), await ae(), !C) return;
433
+ async function Ft(e, t) {
434
+ var a, n;
435
+ if (M.close(), i.selectEdge(e, t.sourceId, t.targetId), await te(), !C) return;
433
436
  const s = [
434
- ...((n = Le.value) == null ? void 0 : n.querySelectorAll(".hys-ui-pg-edge-group")) ?? []
435
- ].find((b) => b.dataset.edgeKey === t.id);
436
- (d = (s == null ? void 0 : s.querySelector(".hys-ui-pg-edge-endpoint-hit")) ?? (s == null ? void 0 : s.querySelector(".hys-ui-pg-edge-hit"))) == null || d.focus({ preventScroll: !0 });
437
+ ...((a = Se.value) == null ? void 0 : a.querySelectorAll(".hys-ui-pg-edge-group")) ?? []
438
+ ].find((v) => v.dataset.edgeKey === t.id);
439
+ (n = (s == null ? void 0 : s.querySelector(".hys-ui-pg-edge-endpoint-hit")) ?? (s == null ? void 0 : s.querySelector(".hys-ui-pg-edge-hit"))) == null || n.focus({ preventScroll: !0 });
437
440
  }
438
- async function ct(e, t, s) {
439
- var n;
440
- M.close(), t && s && i.selectEdge(t, s.sourceId, s.targetId), await ze(e) && (F.value = e, w("update:modelValue", e), (n = x.value) == null || n.focus({ preventScroll: !0 }));
441
+ async function ut(e, t, s) {
442
+ var a;
443
+ M.close(), t && s && i.selectEdge(t, s.sourceId, s.targetId), await Me(e) && (K.value = e, b("update:modelValue", e), (a = w.value) == null || a.focus({ preventScroll: !0 }));
441
444
  }
442
- async function Vt(e) {
443
- M.close(), await ze(e.targetId, { block: "nearest" }), i.beginKeyboard(e.sourceId, e.targetId);
445
+ async function Rt(e) {
446
+ M.close(), await Me(e.targetId, { block: "nearest" }), i.beginKeyboard(e.sourceId, e.targetId);
444
447
  }
445
- async function Wt(e) {
446
- var t, s, n;
447
- if (!Pe.value) {
448
- Pe.value = e.id, Me.value = "";
448
+ async function At(e) {
449
+ var t, s, a;
450
+ if (!Te.value) {
451
+ Te.value = e.id, Pe.value = "";
449
452
  try {
450
- await i.remove(e.sourceId, e.targetId) || (Me.value = i.message.value);
453
+ await i.remove(e.sourceId, e.targetId) || (Pe.value = i.message.value);
451
454
  } finally {
452
- Pe.value = void 0;
455
+ Te.value = void 0;
453
456
  }
454
- await ae(), C && M.open.value ? (s = (t = me.value) == null ? void 0 : t.querySelector("[data-pg-choice]")) == null || s.focus() : C && ((n = x.value) == null || n.focus({ preventScroll: !0 }));
457
+ await te(), C && M.open.value ? (s = (t = ye.value) == null ? void 0 : t.querySelector("[data-pg-choice]")) == null || s.focus() : C && ((a = w.value) == null || a.focus({ preventScroll: !0 }));
455
458
  }
456
459
  }
457
- function Bt(e) {
458
- var d, b;
459
- if (pt(e) || !["ArrowUp", "ArrowDown", "Home", "End"].includes(e.key) || e.target instanceof HTMLInputElement && ["Home", "End"].includes(e.key))
460
+ function Ut(e) {
461
+ var n, v;
462
+ if (ct(e) || !["ArrowUp", "ArrowDown", "Home", "End"].includes(e.key) || e.target instanceof HTMLInputElement && ["Home", "End"].includes(e.key))
460
463
  return;
461
464
  e.preventDefault(), e.stopPropagation();
462
465
  const t = [
463
- ...((d = me.value) == null ? void 0 : d.querySelectorAll(
466
+ ...((n = ye.value) == null ? void 0 : n.querySelectorAll(
464
467
  "[data-pg-choice]"
465
468
  )) ?? []
466
- ], s = t.indexOf(document.activeElement), n = e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : s < 0 ? e.key === "ArrowUp" ? t.length - 1 : 0 : (s + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length;
467
- (b = t[n]) == null || b.focus();
469
+ ], s = t.indexOf(document.activeElement), a = e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : s < 0 ? e.key === "ArrowUp" ? t.length - 1 : 0 : (s + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length;
470
+ (v = t[a]) == null || v.focus();
468
471
  }
469
- G(ce, () => {
470
- M.open.value && (ce.value.length < 2 ? M.close() : ae(M.update));
471
- }), G(
472
- [R, () => r.showDependencies, () => !!i.draft.value],
472
+ N(de, () => {
473
+ M.open.value && (de.value.length < 2 ? M.close() : te(M.update));
474
+ }), N(
475
+ [F, () => u.showDependencies, () => !!i.draft.value],
473
476
  () => {
474
- (!R.value || !r.showDependencies || i.draft.value) && M.close();
477
+ (!F.value || !u.showDependencies || i.draft.value) && M.close();
475
478
  }
476
- ), G(
477
- () => r.showDependencies,
479
+ ), N(
480
+ () => u.showDependencies,
478
481
  (e) => {
479
482
  e || i.cancel();
480
483
  }
481
484
  );
482
- async function ze(e, t = {}) {
485
+ async function Me(e, t = {}) {
483
486
  if (!C) return !1;
484
- const s = E.value.findIndex((z) => z.id === e);
485
- if (s < 0 || (await ae(), !C || !x.value)) return !1;
486
- Ce();
487
- const n = x.value, d = E.value[s];
488
- if (!d || d.id !== e) return !1;
489
- const b = Math.max(I.value, n.clientHeight - 66), a = s * I.value, k = a + I.value;
490
- let v = t.block === "start" ? a : t.block === "end" ? k - b : t.block === "nearest" ? a < n.scrollTop ? a : k > n.scrollTop + b ? k - b : n.scrollTop : a - (b - I.value) / 2, P = n.scrollLeft;
487
+ const s = $.value.findIndex((p) => p.id === e);
488
+ if (s < 0 || (await te(), !C || !w.value)) return !1;
489
+ Ie();
490
+ const a = w.value, n = $.value[s];
491
+ if (!n || n.id !== e) return !1;
492
+ const v = Math.max(x.value, a.clientHeight - 66), o = s * x.value, I = o + x.value;
493
+ let P = t.block === "start" ? o : t.block === "end" ? I - v : t.block === "nearest" ? o < a.scrollTop ? o : I > a.scrollTop + v ? I - v : a.scrollTop : o - (v - x.value) / 2, D = a.scrollLeft;
491
494
  if (t.horizontal !== !1) {
492
- const z = (d.s - O.value.start) * D.value, N = (d.e - d.s + 1) * D.value;
493
- z < P || N > se.value ? P = z : z + N > P + se.value && (P = z + N - se.value);
495
+ const p = (n.s - q.value.start) * S.value, Q = (n.e - n.s + 1) * S.value;
496
+ p < D || Q > le.value ? D = p : p + Q > D + le.value && (D = p + Q - le.value);
494
497
  }
495
- const K = {
496
- top: Math.max(0, v),
497
- left: Math.max(0, P),
498
+ const W = {
499
+ top: Math.max(0, P),
500
+ left: Math.max(0, D),
498
501
  behavior: t.behavior ?? "auto"
499
502
  };
500
- return n.scrollTo ? n.scrollTo(K) : (n.scrollTop = K.top, n.scrollLeft = K.left), Z = { top: n.scrollTop, left: n.scrollLeft }, ve.value = n.scrollTop, await ae(), C;
503
+ return a.scrollTo ? a.scrollTo(W) : (a.scrollTop = W.top, a.scrollLeft = W.left), J = { top: a.scrollTop, left: a.scrollLeft }, ce.value = a.scrollTop, await te(), C;
501
504
  }
502
- function Nt(e = {}) {
503
- if (!C || !x.value) return;
504
- const t = x.value;
505
+ function Vt(e = {}) {
506
+ if (!C || !w.value) return;
507
+ const t = w.value;
505
508
  t.scrollTo ? t.scrollTo({
506
509
  top: 0,
507
510
  left: t.scrollLeft,
508
511
  behavior: e.behavior ?? "auto"
509
- }) : t.scrollTop = 0, Z = { top: t.scrollTop, left: t.scrollLeft }, ve.value = t.scrollTop;
512
+ }) : t.scrollTop = 0, J = { top: t.scrollTop, left: t.scrollLeft }, ce.value = t.scrollTop;
510
513
  }
511
- function Re(e) {
514
+ function He(e) {
512
515
  var t;
513
516
  if (((t = i.draft.value) == null ? void 0 : t.mode) === "keyboard") {
514
517
  i.submit(e.id);
515
518
  return;
516
519
  }
517
- performance.now() < ft || (i.clearSelected(), F.value = e.id, w("update:modelValue", e.id), w("open", e));
520
+ performance.now() < ht || (i.clearSelected(), K.value = e.id, b("update:modelValue", e.id), b("open", e));
518
521
  }
519
- function vt() {
520
- F.value !== null && (F.value = null, w("update:modelValue", null));
522
+ function dt() {
523
+ K.value !== null && (K.value = null, b("update:modelValue", null));
521
524
  }
522
- function qt(e) {
523
- pt(e) || (i.key(e), !(e.defaultPrevented || e.key !== "Escape") && (!_.value && F.value === null || (_.value ? B() : vt(), e.preventDefault(), e.stopPropagation())));
525
+ function Wt(e) {
526
+ ct(e) || (i.key(e), !(e.defaultPrevented || e.key !== "Escape") && (!E.value && K.value === null || (E.value ? V() : dt(), e.preventDefault(), e.stopPropagation())));
524
527
  }
525
- function pt(e) {
526
- if (!f.enabled.value || !r.historyKeyboard || e.defaultPrevented || e.isComposing || e.altKey || !(e.ctrlKey || e.metaKey))
528
+ function ct(e) {
529
+ if (!m.enabled.value || !u.historyKeyboard || e.defaultPrevented || e.isComposing || e.altKey || !(e.ctrlKey || e.metaKey))
527
530
  return !1;
528
531
  const t = e.key.toLowerCase(), s = t === "y" || t === "z" && e.shiftKey;
529
532
  return t !== "z" && t !== "y" || e.target instanceof Element && e.target.closest(
530
533
  'input,textarea,select,[contenteditable="true"],[role="textbox"]'
531
- ) ? !1 : (e.preventDefault(), e.stopPropagation(), _.value || i.draft.value || T.resizing.value ? (B(), i.cancel(), T.cancel(), !0) : (f.pending.value || (s ? f.redo() : f.undo()), !0));
534
+ ) ? !1 : (e.preventDefault(), e.stopPropagation(), E.value || i.draft.value || T.resizing.value ? (V(), i.cancel(), T.cancel(), !0) : (m.pending.value || (s ? m.redo() : m.undo()), !0));
532
535
  }
533
- function ht(e) {
536
+ function vt(e) {
534
537
  if (e.type === "click" && e.detail > 0 || e.target instanceof Element && e.target.closest(
535
538
  ".hys-ui-pg-edge-hit, .hys-ui-pg-edge-endpoint-hit, .hys-ui-pg-incoming-trigger, .hys-ui-pg-link-feedback button"
536
539
  ))
537
540
  return;
538
541
  i.clearSelected(), M.close();
539
542
  const t = e.target;
540
- !i.draft.value && !_.value && t instanceof Element && !t.closest(
543
+ !i.draft.value && !E.value && t instanceof Element && !t.closest(
541
544
  ".hys-ui-pg-bar, .hys-ui-pg-task-label, .hys-ui-pg-link-port"
542
- ) && (t === x.value || t.closest(".hys-ui-pg-grid, .hys-ui-pg-task-list")) && vt();
545
+ ) && (t === w.value || t.closest(".hys-ui-pg-grid, .hys-ui-pg-task-list")) && dt();
543
546
  }
544
- function gt() {
547
+ function pt() {
545
548
  if (!C) return;
546
- const e = x.value;
549
+ const e = w.value;
547
550
  e && (e.scrollLeft = Math.max(
548
551
  0,
549
- (Q(be) - O.value.start) * D.value - se.value / 3
552
+ (X(ke) - q.value.start) * S.value - le.value / 3
550
553
  ));
551
554
  }
552
- G(J, () => ae(gt));
553
- const _ = S(null);
554
- let Ye, ft = 0;
555
- function yt() {
555
+ N(Y, () => te(pt));
556
+ const E = z(null);
557
+ let Ge, ht = 0;
558
+ function gt() {
556
559
  var t, s;
557
- const e = Ye;
558
- Ye = void 0, (s = e == null ? void 0 : (t = e.element).hasPointerCapture) != null && s.call(t, e.id) && e.element.releasePointerCapture(e.id);
560
+ const e = Ge;
561
+ Ge = void 0, (s = e == null ? void 0 : (t = e.element).hasPointerCapture) != null && s.call(t, e.id) && e.element.releasePointerCapture(e.id);
559
562
  }
560
- function B() {
561
- _.value && (ft = performance.now() + 350), _.value = null, yt();
563
+ function V() {
564
+ E.value && (ht = performance.now() + 350), E.value = null, gt();
562
565
  }
563
- function Xe(e, t, s) {
564
- var n;
565
- !r.editable || t.disabled || e.button !== 0 || f.pending.value || (e.preventDefault(), e.stopPropagation(), e.currentTarget.setPointerCapture(e.pointerId), Ye = { element: e.currentTarget, id: e.pointerId }, (n = e.currentTarget.closest(".hys-ui-pg-bar")) == null || n.focus({ preventScroll: !0 }), _.value = {
566
+ function Oe(e, t, s) {
567
+ var a;
568
+ !u.editable || t.disabled || e.button !== 0 || m.pending.value || (e.preventDefault(), e.stopPropagation(), e.currentTarget.setPointerCapture(e.pointerId), Ge = { element: e.currentTarget, id: e.pointerId }, (a = e.currentTarget.closest(".hys-ui-pg-bar")) == null || a.focus({ preventScroll: !0 }), E.value = {
566
569
  id: t.id,
567
570
  type: s,
568
571
  x: e.clientX,
569
572
  original: { ...t },
570
573
  days: 0,
571
- unitWidth: D.value
572
- }, F.value = t.id, w("update:modelValue", t.id));
574
+ unitWidth: S.value
575
+ }, K.value = t.id, b("update:modelValue", t.id));
573
576
  }
574
- function Je(e) {
575
- _.value && (_.value.days = Math.round(
576
- (e.clientX - _.value.x) / _.value.unitWidth
577
+ function Ye(e) {
578
+ E.value && (E.value.days = Math.round(
579
+ (e.clientX - E.value.x) / E.value.unitWidth
577
580
  ));
578
581
  }
579
- function ke(e) {
580
- const t = _.value;
581
- if (!t || (_.value = null, yt(), e.type === "pointercancel" || !t.days)) return;
582
- const s = Ge.value.get(t.id);
583
- if (!r.editable || !s || s.disabled) return;
584
- const n = we(t.original.start), d = we(t.original.end);
585
- if (!n || !d) return;
586
- let b = Q(n), a = Q(d);
587
- t.type === "move" ? (b += t.days, a += t.days) : t.type === "start" ? b = Math.min(a, b + t.days) : a = Math.max(b, a + t.days);
588
- const k = {
582
+ function me(e) {
583
+ const t = E.value;
584
+ if (!t || (E.value = null, gt(), e.type === "pointercancel" || !t.days)) return;
585
+ const s = Ne.value.get(t.id);
586
+ if (!u.editable || !s || s.disabled) return;
587
+ const a = be(t.original.start), n = be(t.original.end);
588
+ if (!a || !n) return;
589
+ let v = X(a), o = X(n);
590
+ t.type === "move" ? (v += t.days, o += t.days) : t.type === "start" ? v = Math.min(o, v + t.days) : o = Math.max(v, o + t.days);
591
+ const I = {
589
592
  ...s,
590
- start: _e(b),
591
- end: _e(a)
593
+ start: $e(v),
594
+ end: $e(o)
592
595
  };
593
- f.capture(
594
- r.items.map((v) => v.id === k.id ? k : v),
596
+ m.capture(
597
+ u.items.map((P) => P.id === I.id ? I : P),
595
598
  {
596
599
  type: t.type === "move" ? "move" : t.type === "start" ? "resize-start" : "resize-end",
597
- label: (t.type === "move" ? "移动任务:" : t.type === "start" ? "调整开始日期:" : "调整结束日期:") + k.title
600
+ label: (t.type === "move" ? "移动任务:" : t.type === "start" ? "调整开始日期:" : "调整结束日期:") + I.title
598
601
  }
599
- ) && w("change", k);
602
+ ) && b("change", I);
600
603
  }
601
- function mt(e) {
602
- const t = _.value;
604
+ function ft(e) {
605
+ const t = E.value;
603
606
  if (!t || t.id !== e.id) return { s: e.s, e: e.e };
604
607
  const s = t.days;
605
608
  return t.type === "move" ? { s: e.s + s, e: e.e + s } : t.type === "start" ? { s: Math.min(e.e, e.s + s), e: e.e } : { s: e.s, e: Math.max(e.s, e.e + s) };
606
609
  }
607
- function Gt(e) {
608
- const t = mt(e);
610
+ function Bt(e) {
611
+ const t = ft(e);
609
612
  return {
610
- left: `${(t.s - O.value.start) * D.value}px`,
611
- width: `${Math.max(D.value, (t.e - t.s + 1) * D.value)}px`,
613
+ left: `${(t.s - q.value.start) * S.value}px`,
614
+ width: `${Math.max(S.value, (t.e - t.s + 1) * S.value)}px`,
612
615
  background: e.color || "var(--hys-ui-primary,var(--hys-ui-theme-primary, #4776ed))"
613
616
  };
614
617
  }
615
- function Ot(e) {
618
+ function Nt(e) {
616
619
  return {
617
- left: (mt(e).e - O.value.start + 1) * D.value + 5 + "px"
620
+ left: (ft(e).e - q.value.start + 1) * S.value + 5 + "px"
618
621
  };
619
622
  }
620
- function Ae(e, t) {
621
- if (!r.editable || e.disabled || f.pending.value) return;
622
- const s = we(e.start), n = we(e.end);
623
- if (!s || !n) return;
624
- const d = {
623
+ function Fe(e, t) {
624
+ if (!u.editable || e.disabled || m.pending.value) return;
625
+ const s = be(e.start), a = be(e.end);
626
+ if (!s || !a) return;
627
+ const n = {
625
628
  ...e,
626
- start: _e(Q(s) + t),
627
- end: _e(Q(n) + t)
629
+ start: $e(X(s) + t),
630
+ end: $e(X(a) + t)
628
631
  };
629
- f.capture(
630
- r.items.map((b) => b.id === e.id ? d : b),
631
- { type: "nudge", label: "微调排期:" + d.title }
632
- ) && w("change", d);
632
+ m.capture(
633
+ u.items.map((v) => v.id === e.id ? n : v),
634
+ { type: "nudge", label: "微调排期:" + n.title }
635
+ ) && b("change", n);
633
636
  }
634
- const Y = h(() => {
635
- const e = _.value;
637
+ const G = g(() => {
638
+ const e = E.value;
636
639
  if (!e || !e.days) return;
637
- const t = ne.value.tasks.get(e.id);
640
+ const t = ie.value.tasks.get(e.id);
638
641
  if (!t || t.s === null || t.e === null) return;
639
- const s = e.type === "end" ? t.s : e.type === "start" ? Math.min(t.e, t.s + e.days) : t.s + e.days, n = e.type === "start" ? t.e : e.type === "end" ? Math.max(t.s, t.e + e.days) : t.e + e.days, d = (ne.value.incident.get(e.id) ?? []).flatMap(
640
- (v) => {
641
- const P = ne.value.byEdge.get(v.id);
642
- return (P == null ? void 0 : P.type) === "dependency-order" ? [P] : [];
642
+ const s = e.type === "end" ? t.s : e.type === "start" ? Math.min(t.e, t.s + e.days) : t.s + e.days, a = e.type === "start" ? t.e : e.type === "end" ? Math.max(t.s, t.e + e.days) : t.e + e.days, n = (ie.value.incident.get(e.id) ?? []).flatMap(
643
+ (P) => {
644
+ const D = ie.value.byEdge.get(P.id);
645
+ return (D == null ? void 0 : D.type) === "dependency-order" ? [D] : [];
643
646
  }
644
- ), b = ba(ne.value, e.id, s, n), a = new Set(d.map((v) => v.id)), k = new Set(b.map((v) => v.id));
647
+ ), v = ma(ie.value, e.id, s, a), o = new Set(n.map((P) => P.id)), I = new Set(v.map((P) => P.id));
645
648
  return {
646
- conflicts: b,
647
- added: b.filter((v) => !a.has(v.id)).length,
648
- resolved: d.filter((v) => !k.has(v.id)).length,
649
- before: d.length
649
+ conflicts: v,
650
+ added: v.filter((P) => !o.has(P.id)).length,
651
+ resolved: n.filter((P) => !I.has(P.id)).length,
652
+ before: n.length
650
653
  };
651
654
  });
652
- function Ue(e) {
653
- return ne.value.byTask.get(e) ?? [];
655
+ function Re(e) {
656
+ return ie.value.byTask.get(e) ?? [];
654
657
  }
655
- function kt(e, t) {
656
- return ne.value.byEdge.get(wa(e, t));
658
+ function yt(e, t) {
659
+ return ie.value.byEdge.get(ka(e, t));
657
660
  }
658
- function Yt(e) {
661
+ function qt(e) {
659
662
  return {
660
663
  "dependency-order": "前后置日期冲突",
661
664
  "invalid-date": "日期无效",
@@ -663,102 +666,102 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
663
666
  "dependency-cycle": "循环依赖"
664
667
  }[e];
665
668
  }
666
- async function Xt(e) {
669
+ async function Gt(e) {
667
670
  var t;
668
- await ze(e.taskId) && (F.value = e.taskId, w("update:modelValue", e.taskId), e.sourceId !== void 0 && ge.value.has(e.sourceId) && i.selectEdge(new Event("select"), e.sourceId, e.taskId), (t = x.value) == null || t.focus({ preventScroll: !0 }));
671
+ await Me(e.taskId) && (K.value = e.taskId, b("update:modelValue", e.taskId), e.sourceId !== void 0 && he.value.has(e.sourceId) && i.selectEdge(new Event("select"), e.sourceId, e.taskId), (t = w.value) == null || t.focus({ preventScroll: !0 }));
669
672
  }
670
- return St({
671
- element: Le,
672
- viewport: x,
673
- scrollToTask: ze,
674
- scrollToTop: Nt,
673
+ return Pt({
674
+ element: Se,
675
+ viewport: w,
676
+ scrollToTask: Me,
677
+ scrollToTop: Vt,
675
678
  addDependency: i.add,
676
679
  removeDependency: i.remove,
677
680
  moveDependency: i.moveTarget,
678
681
  cancelDependency: () => i.cancel(),
679
- undo: f.undo,
680
- redo: f.redo,
681
- clearHistory: f.clear,
682
- canUndo: f.canUndo,
683
- canRedo: f.canRedo,
684
- historyState: f.state,
685
- conflicts: Rt
682
+ undo: m.undo,
683
+ redo: m.redo,
684
+ clearHistory: m.clear,
685
+ canUndo: m.canUndo,
686
+ canRedo: m.canRedo,
687
+ historyState: m.state,
688
+ conflicts: Kt
686
689
  }), (e, t) => {
687
- var s, n, d, b;
688
- return o(), c("section", xt({
690
+ var s;
691
+ return r(), c("section", kt({
689
692
  ref_key: "root",
690
- ref: Le
691
- }, l(Ze), {
693
+ ref: Se
694
+ }, l(Je), {
692
695
  class: ["hys-ui-pg-gantt", { "hys-ui-pg-resizing-label": l(T).resizing.value }],
693
696
  "aria-label": "项目甘特图",
694
- onKeydown: qt,
695
- onPointerdownCapture: ht,
696
- onClickCapture: ht
697
+ onKeydown: Wt,
698
+ onPointerdownCapture: vt,
699
+ onClickCapture: vt
697
700
  }), [
698
- u("div", xa, [
699
- y(ia, {
701
+ d("div", ba, [
702
+ f(la, {
700
703
  class: "hys-ui-pg-scale",
701
- "model-value": J.value,
704
+ "model-value": Y.value,
702
705
  options: [
703
706
  { label: "日", value: "day" },
704
707
  { label: "周", value: "week" },
705
708
  { label: "月", value: "month" }
706
709
  ],
707
710
  "aria-label": "时间刻度",
708
- "onUpdate:modelValue": Kt
711
+ "onUpdate:modelValue": $t
709
712
  }, null, 8, ["model-value"]),
710
- y(W, {
713
+ f(U, {
711
714
  variant: "secondary",
712
715
  size: "sm",
713
716
  class: "hys-ui-pg-today",
714
- onClick: gt
717
+ onClick: pt
715
718
  }, {
716
- default: U(() => [...t[23] || (t[23] = [
717
- j("定位今天", -1)
719
+ default: H(() => [...t[23] || (t[23] = [
720
+ Z("定位今天", -1)
718
721
  ])]),
719
722
  _: 1
720
723
  }),
721
- l(f).enabled.value && $.showHistoryControls && ($.editable || R.value || l(f).state.value.undoCount || l(f).state.value.redoCount) ? (o(), c("div", Ia, [
722
- y(W, {
724
+ l(m).enabled.value && L.showHistoryControls && (L.editable || F.value || l(m).state.value.undoCount || l(m).state.value.redoCount) ? (r(), c("div", wa, [
725
+ f(U, {
723
726
  variant: "secondary",
724
727
  size: "sm",
725
- disabled: !l(f).canUndo.value,
728
+ disabled: !l(m).canUndo.value,
726
729
  "aria-label": "撤销",
727
- title: (l(f).state.value.undoLabel ? "撤销:" + l(f).state.value.undoLabel : "没有可撤销的操作") + "(Ctrl/⌘ + Z)",
728
- onClick: t[0] || (t[0] = (a) => l(f).undo())
730
+ title: (l(m).state.value.undoLabel ? "撤销:" + l(m).state.value.undoLabel : "没有可撤销的操作") + "(Ctrl/⌘ + Z)",
731
+ onClick: t[0] || (t[0] = (a) => l(m).undo())
729
732
  }, {
730
- default: U(() => [
731
- y(l(da), { size: 15 }),
732
- t[24] || (t[24] = j("撤销", -1))
733
+ default: H(() => [
734
+ f(l(ra), { size: 15 }),
735
+ t[24] || (t[24] = Z("撤销", -1))
733
736
  ]),
734
737
  _: 1
735
738
  }, 8, ["disabled", "title"]),
736
- y(W, {
739
+ f(U, {
737
740
  variant: "secondary",
738
741
  size: "sm",
739
- disabled: !l(f).canRedo.value,
742
+ disabled: !l(m).canRedo.value,
740
743
  "aria-label": "重做",
741
- title: (l(f).state.value.redoLabel ? "重做:" + l(f).state.value.redoLabel : "没有可重做的操作") + "(Ctrl/⌘ + Shift + Z)",
742
- onClick: t[1] || (t[1] = (a) => l(f).redo())
744
+ title: (l(m).state.value.redoLabel ? "重做:" + l(m).state.value.redoLabel : "没有可重做的操作") + "(Ctrl/⌘ + Shift + Z)",
745
+ onClick: t[1] || (t[1] = (a) => l(m).redo())
743
746
  }, {
744
- default: U(() => [
745
- y(l(ca), { size: 15 }),
746
- t[25] || (t[25] = j("重做", -1))
747
+ default: H(() => [
748
+ f(l(ua), { size: 15 }),
749
+ t[25] || (t[25] = Z("重做", -1))
747
750
  ]),
748
751
  _: 1
749
752
  }, 8, ["disabled", "title"])
750
- ])) : g("", !0),
751
- u("span", Ca, p($.editable ? "拖动任务条调整排期 · Alt + 左/右方向键微调日期 · Esc / 点击空白取消选中" : "点击任务查看详情 · Esc / 点击空白取消选中"), 1)
753
+ ])) : y("", !0),
754
+ d("span", xa, h(L.editable ? "拖动任务条调整排期 · Alt + 左/右方向键微调日期 · Esc / 点击空白取消选中" : "点击任务查看详情 · Esc / 点击空白取消选中"), 1)
752
755
  ]),
753
- u("div", {
756
+ d("div", {
754
757
  ref_key: "scroller",
755
- ref: x,
758
+ ref: w,
756
759
  class: "hys-ui-pg-body hys-ui-pg-scroll",
757
- style: H(Lt.value),
760
+ style: _(zt.value),
758
761
  role: "region",
759
762
  tabindex: "0",
760
763
  "aria-label": "可滚动的甘特图任务与时间轴",
761
- onScrollPassive: lt,
764
+ onScrollPassive: tt,
762
765
  onPointermove: t[11] || (t[11] = //@ts-ignore
763
766
  (...a) => l(i).move && l(i).move(...a)),
764
767
  onPointerup: t[12] || (t[12] = //@ts-ignore
@@ -768,18 +771,18 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
768
771
  onLostpointercapture: t[14] || (t[14] = //@ts-ignore
769
772
  (...a) => l(i).lost && l(i).lost(...a))
770
773
  }, [
771
- u("div", {
774
+ d("div", {
772
775
  ref_key: "labels",
773
- ref: $e,
776
+ ref: De,
774
777
  class: "hys-ui-pg-labels",
775
- style: H({
778
+ style: _({
776
779
  width: l(T).width.value + "px",
777
780
  minWidth: l(T).width.value + "px"
778
781
  })
779
782
  }, [
780
- u("div", Ta, [
781
- t[26] || (t[26] = j(" 任务 / 负责人 ", -1)),
782
- $.labelResizable ? (o(), c("div", {
783
+ d("div", Ia, [
784
+ t[26] || (t[26] = Z(" 任务 / 负责人 ", -1)),
785
+ L.labelResizable ? (r(), c("div", {
783
786
  key: 0,
784
787
  class: "hys-ui-pg-label-resizer",
785
788
  role: "separator",
@@ -789,9 +792,9 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
789
792
  "aria-valuenow": l(T).width.value,
790
793
  "aria-valuemin": l(T).minimum.value,
791
794
  "aria-valuemax": l(T).maximum.value,
792
- style: H({ height: Ve.value + "px" }),
795
+ style: _({ height: Ae.value + "px" }),
793
796
  title: "拖动调整任务列宽;左右键微调,Shift 加速,双击还原",
794
- onPointerdown: t[2] || (t[2] = m(
797
+ onPointerdown: t[2] || (t[2] = k(
795
798
  //@ts-ignore
796
799
  (...a) => l(T).down && l(T).down(...a),
797
800
  ["stop", "prevent"]
@@ -806,248 +809,248 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
806
809
  (...a) => l(T).cancel && l(T).cancel(...a)),
807
810
  onKeydown: t[7] || (t[7] = //@ts-ignore
808
811
  (...a) => l(T).key && l(T).key(...a)),
809
- onDblclick: t[8] || (t[8] = m(
812
+ onDblclick: t[8] || (t[8] = k(
810
813
  //@ts-ignore
811
814
  (...a) => l(T).reset && l(T).reset(...a),
812
815
  ["stop"]
813
816
  ))
814
- }, null, 44, Pa)) : g("", !0)
817
+ }, null, 44, Ca)) : y("", !0)
815
818
  ]),
816
- u("div", {
819
+ d("div", {
817
820
  class: "hys-ui-pg-task-list",
818
- style: H({ height: E.value.length * I.value + "px" })
821
+ style: _({ height: $.value.length * x.value + "px" })
819
822
  }, [
820
- (o(!0), c(q, null, ee(tt.value, (a) => {
821
- var k, v, P;
822
- return o(), c("button", {
823
+ (r(!0), c(B, null, j(je.value, (a) => {
824
+ var n, v, o;
825
+ return r(), c("button", {
823
826
  type: "button",
824
827
  key: a.task.id,
825
- class: X(["hys-ui-pg-task-label", {
826
- "hys-ui-selected": F.value === a.task.id,
827
- "hys-ui-pg-task-has-conflict": $.showConflicts && Ue(a.task.id).length > 0,
828
- "hys-ui-pg-link-target": ((k = l(i).draft.value) == null ? void 0 : k.targetId) === a.task.id,
829
- "hys-ui-pg-link-invalid": ((v = l(i).draft.value) == null ? void 0 : v.targetId) === a.task.id && !!((P = l(i).draft.value) != null && P.reason)
828
+ class: O(["hys-ui-pg-task-label", {
829
+ "hys-ui-selected": K.value === a.task.id,
830
+ "hys-ui-pg-task-has-conflict": L.showConflicts && Re(a.task.id).length > 0,
831
+ "hys-ui-pg-link-target": ((n = l(i).draft.value) == null ? void 0 : n.targetId) === a.task.id,
832
+ "hys-ui-pg-link-invalid": ((v = l(i).draft.value) == null ? void 0 : v.targetId) === a.task.id && !!((o = l(i).draft.value) != null && o.reason)
830
833
  }]),
831
- "aria-pressed": F.value === a.task.id,
834
+ "aria-pressed": K.value === a.task.id,
832
835
  "data-row-index": a.index,
833
- style: H({
834
- height: I.value + "px",
835
- top: a.index * I.value + "px"
836
+ style: _({
837
+ height: x.value + "px",
838
+ top: a.index * x.value + "px"
836
839
  }),
837
- onClick: (K) => Re(a.task),
840
+ onClick: (I) => He(a.task),
838
841
  onKeydown: [
839
- V(m((K) => Ae(a.task, -1), ["alt", "prevent"]), ["left"]),
840
- V(m((K) => Ae(a.task, 1), ["alt", "prevent"]), ["right"])
842
+ A(k((I) => Fe(a.task, -1), ["alt", "prevent"]), ["left"]),
843
+ A(k((I) => Fe(a.task, 1), ["alt", "prevent"]), ["right"])
841
844
  ]
842
845
  }, [
843
- u("strong", {
846
+ d("strong", {
844
847
  title: a.task.title
845
- }, p(a.task.title), 9, za),
846
- u("small", null, p(a.task.owner || "未分配") + " · " + p(a.task.status || "待办"), 1),
847
- $.showConflicts && Ue(a.task.id).length ? (o(), c("span", {
848
+ }, h(a.task.title), 9, Pa),
849
+ d("small", null, h(a.task.owner || "未分配") + " · " + h(a.task.status || "待办"), 1),
850
+ L.showConflicts && Re(a.task.id).length ? (r(), c("span", {
848
851
  key: 0,
849
852
  class: "hys-ui-pg-task-warning",
850
853
  "aria-hidden": "true",
851
- title: Ue(a.task.id).map((K) => K.message).join(`
854
+ title: Re(a.task.id).map((I) => I.message).join(`
852
855
  `)
853
856
  }, [
854
- y(l(Ct), { size: 14 })
855
- ], 8, Sa)) : g("", !0)
856
- ], 46, Ma);
857
+ f(l(wt), { size: 14 })
858
+ ], 8, Ma)) : y("", !0)
859
+ ], 46, Ta);
857
860
  }), 128))
858
861
  ], 4),
859
- E.value.length ? g("", !0) : (o(), c("div", Da, " 暂无有效排期任务 "))
862
+ $.value.length ? y("", !0) : (r(), c("div", za, " 暂无有效排期任务 "))
860
863
  ], 4),
861
- u("div", {
864
+ d("div", {
862
865
  class: "hys-ui-pg-timeline",
863
- style: H({ width: Be.value + "px" })
866
+ style: _({ width: Ve.value + "px" })
864
867
  }, [
865
- u("div", {
868
+ d("div", {
866
869
  class: "hys-ui-pg-canvas",
867
- style: H({ width: Be.value + "px" })
870
+ style: _({ width: Ve.value + "px" })
868
871
  }, [
869
- u("div", La, [
870
- (o(!0), c(q, null, ee(Ht.value, (a) => (o(), c("span", {
872
+ d("div", Sa, [
873
+ (r(!0), c(B, null, j(Et.value, (a) => (r(), c("span", {
871
874
  key: a.key,
872
875
  title: a.label,
873
- style: H({ left: a.left + "px", width: a.width + "px" })
874
- }, p(a.label), 13, $a))), 128))
876
+ style: _({ left: a.left + "px", width: a.width + "px" })
877
+ }, h(a.label), 13, Da))), 128))
875
878
  ]),
876
- u("div", Ea, [
877
- (o(!0), c(q, null, ee(He.value, (a) => (o(), c("span", {
879
+ d("div", La, [
880
+ (r(!0), c(B, null, j(_e.value, (a) => (r(), c("span", {
878
881
  key: a,
879
- class: X({
880
- "hys-ui-weekend": [0, 6].includes(xe(a).getUTCDay()),
881
- "hys-ui-today": a === Q(l(be))
882
+ class: O({
883
+ "hys-ui-weekend": [0, 6].includes(we(a).getUTCDay()),
884
+ "hys-ui-today": a === X(l(ke))
882
885
  }),
883
- style: H({ width: D.value + "px" })
884
- }, p(J.value === "month" ? "" : xe(a).getUTCDate()), 7))), 128))
886
+ style: _({ width: S.value + "px" })
887
+ }, h(Y.value === "month" ? "" : we(a).getUTCDate()), 7))), 128))
885
888
  ]),
886
- u("div", {
889
+ d("div", {
887
890
  ref_key: "grid",
888
- ref: je,
891
+ ref: Qe,
889
892
  class: "hys-ui-pg-grid",
890
- style: H({ height: E.value.length * I.value + "px" })
893
+ style: _({ height: $.value.length * x.value + "px" })
891
894
  }, [
892
- (o(!0), c(q, null, ee(He.value, (a) => (o(), c("div", {
895
+ (r(!0), c(B, null, j(_e.value, (a) => (r(), c("div", {
893
896
  key: a,
894
- class: X(["hys-ui-pg-day-column", {
895
- "hys-ui-weekend": [0, 6].includes(xe(a).getUTCDay())
897
+ class: O(["hys-ui-pg-day-column", {
898
+ "hys-ui-weekend": [0, 6].includes(we(a).getUTCDay())
896
899
  }]),
897
- style: H({
898
- left: (a - O.value.start) * D.value + "px",
899
- width: D.value + "px"
900
+ style: _({
901
+ left: (a - q.value.start) * S.value + "px",
902
+ width: S.value + "px"
900
903
  })
901
904
  }, null, 6))), 128)),
902
- u("div", {
905
+ d("div", {
903
906
  class: "hys-ui-pg-today-line",
904
- style: H({
905
- left: (Q(l(be)) - O.value.start) * D.value + D.value / 2 + "px"
907
+ style: _({
908
+ left: (X(l(ke)) - q.value.start) * S.value + S.value / 2 + "px"
906
909
  })
907
910
  }, null, 4),
908
- (o(!0), c(q, null, ee(tt.value, (a) => {
909
- var k, v, P, K, z, N, Se;
910
- return o(), c("div", {
911
+ (r(!0), c(B, null, j(je.value, (a) => {
912
+ var n, v, o, I, P, D, W;
913
+ return r(), c("div", {
911
914
  key: a.task.id,
912
915
  class: "hys-ui-pg-row",
913
916
  "data-row-index": a.index,
914
- style: H({
915
- top: a.index * I.value + "px",
916
- height: I.value + "px"
917
+ style: _({
918
+ top: a.index * x.value + "px",
919
+ height: x.value + "px"
917
920
  })
918
921
  }, [
919
- u("div", {
920
- class: X(["hys-ui-pg-bar", {
921
- "hys-ui-selected": F.value === a.task.id,
922
- "hys-ui-dragging": ((k = _.value) == null ? void 0 : k.id) === a.task.id,
922
+ d("div", {
923
+ class: O(["hys-ui-pg-bar", {
924
+ "hys-ui-selected": K.value === a.task.id,
925
+ "hys-ui-dragging": ((n = E.value) == null ? void 0 : n.id) === a.task.id,
923
926
  "hys-ui-disabled": a.task.disabled,
924
- "hys-ui-pg-bar-has-conflict": $.showConflicts && (((v = _.value) == null ? void 0 : v.id) === a.task.id && Y.value ? Y.value.conflicts.length > 0 : Ue(a.task.id).length > 0),
925
- "hys-ui-pg-link-source": ((P = l(i).draft.value) == null ? void 0 : P.sourceId) === a.task.id,
926
- "hys-ui-pg-link-target": ((K = l(i).draft.value) == null ? void 0 : K.targetId) === a.task.id,
927
- "hys-ui-pg-link-invalid": ((z = l(i).draft.value) == null ? void 0 : z.targetId) === a.task.id && !!((N = l(i).draft.value) != null && N.reason)
927
+ "hys-ui-pg-bar-has-conflict": L.showConflicts && (((v = E.value) == null ? void 0 : v.id) === a.task.id && G.value ? G.value.conflicts.length > 0 : Re(a.task.id).length > 0),
928
+ "hys-ui-pg-link-source": ((o = l(i).draft.value) == null ? void 0 : o.sourceId) === a.task.id,
929
+ "hys-ui-pg-link-target": ((I = l(i).draft.value) == null ? void 0 : I.targetId) === a.task.id,
930
+ "hys-ui-pg-link-invalid": ((P = l(i).draft.value) == null ? void 0 : P.targetId) === a.task.id && !!((D = l(i).draft.value) != null && D.reason)
928
931
  }]),
929
- style: H(Gt(a.task)),
932
+ style: _(Bt(a.task)),
930
933
  role: "button",
931
- "aria-pressed": F.value === a.task.id,
934
+ "aria-pressed": K.value === a.task.id,
932
935
  tabindex: "0",
933
936
  "aria-label": `${a.task.title},${a.task.start} 至 ${a.task.end},完成 ${a.task.progress}%`,
934
937
  title: `${a.task.title}
935
938
  ${a.task.start} → ${a.task.end}
936
939
  完成 ${a.task.progress}%`,
937
- onClick: (L) => Re(a.task),
940
+ onClick: (p) => He(a.task),
938
941
  onKeydown: [
939
- V((L) => Re(a.task), ["enter"]),
940
- V(m((L) => Re(a.task), ["prevent"]), ["space"]),
941
- V(m((L) => Ae(a.task, -1), ["alt", "prevent"]), ["left"]),
942
- V(m((L) => Ae(a.task, 1), ["alt", "prevent"]), ["right"])
942
+ A((p) => He(a.task), ["enter"]),
943
+ A(k((p) => He(a.task), ["prevent"]), ["space"]),
944
+ A(k((p) => Fe(a.task, -1), ["alt", "prevent"]), ["left"]),
945
+ A(k((p) => Fe(a.task, 1), ["alt", "prevent"]), ["right"])
943
946
  ],
944
- onPointerdown: (L) => Xe(L, a.task, "move"),
945
- onPointermove: Je,
946
- onPointerup: ke,
947
- onPointercancel: ke,
948
- onLostpointercapture: B
947
+ onPointerdown: (p) => Oe(p, a.task, "move"),
948
+ onPointermove: Ye,
949
+ onPointerup: me,
950
+ onPointercancel: me,
951
+ onLostpointercapture: V
949
952
  }, [
950
- u("div", {
953
+ d("div", {
951
954
  class: "hys-ui-pg-progress",
952
- style: H({ width: a.task.progress + "%" })
955
+ style: _({ width: a.task.progress + "%" })
953
956
  }, null, 4),
954
- u("span", Ha, p(a.task.progress) + "%", 1),
955
- $.editable && !a.task.disabled ? (o(), c("span", {
957
+ d("span", _a, h(a.task.progress) + "%", 1),
958
+ L.editable && !a.task.disabled ? (r(), c("span", {
956
959
  key: 0,
957
960
  class: "hys-ui-pg-handle hys-ui-start",
958
961
  title: "调整开始日期",
959
- onPointerdown: m((L) => Xe(L, a.task, "start"), ["stop"]),
960
- onPointermove: Je,
961
- onPointerup: ke,
962
- onPointercancel: ke,
963
- onLostpointercapture: B
964
- }, null, 40, Fa)) : g("", !0),
965
- $.editable && !a.task.disabled ? (o(), c("span", {
962
+ onPointerdown: k((p) => Oe(p, a.task, "start"), ["stop"]),
963
+ onPointermove: Ye,
964
+ onPointerup: me,
965
+ onPointercancel: me,
966
+ onLostpointercapture: V
967
+ }, null, 40, Ka)) : y("", !0),
968
+ L.editable && !a.task.disabled ? (r(), c("span", {
966
969
  key: 1,
967
970
  class: "hys-ui-pg-handle hys-ui-end",
968
971
  title: "调整结束日期",
969
- onPointerdown: m((L) => Xe(L, a.task, "end"), ["stop"]),
970
- onPointermove: Je,
971
- onPointerup: ke,
972
- onPointercancel: ke,
973
- onLostpointercapture: B
974
- }, null, 40, Ra)) : g("", !0)
975
- ], 46, Ka),
976
- R.value && $.showDependencies && !a.task.disabled ? (o(), c("button", {
972
+ onPointerdown: k((p) => Oe(p, a.task, "end"), ["stop"]),
973
+ onPointermove: Ye,
974
+ onPointerup: me,
975
+ onPointercancel: me,
976
+ onLostpointercapture: V
977
+ }, null, 40, Ha)) : y("", !0)
978
+ ], 46, Ea),
979
+ F.value && L.showDependencies && !a.task.disabled ? (r(), c("button", {
977
980
  key: 0,
978
981
  type: "button",
979
- class: X(["hys-ui-pg-link-port", {
980
- "hys-ui-pg-link-port-visible": F.value === a.task.id || ((Se = l(i).draft.value) == null ? void 0 : Se.sourceId) === a.task.id
982
+ class: O(["hys-ui-pg-link-port", {
983
+ "hys-ui-pg-link-port-visible": K.value === a.task.id || ((W = l(i).draft.value) == null ? void 0 : W.sourceId) === a.task.id
981
984
  }]),
982
- style: H(Ot(a.task)),
985
+ style: _(Nt(a.task)),
983
986
  "aria-label": "连接后续任务:" + a.task.title,
984
987
  title: "拖动到后置任务,或点击后选择任务;也支持 Enter 和上下键",
985
- onPointerdown: m((L) => l(i).beginPointer(L, a.task.id), ["stop", "prevent"]),
986
- onClick: m((L) => l(i).clickSource(L, a.task.id), ["stop"]),
988
+ onPointerdown: k((p) => l(i).beginPointer(p, a.task.id), ["stop", "prevent"]),
989
+ onClick: k((p) => l(i).clickSource(p, a.task.id), ["stop"]),
987
990
  onKeydown: [
988
- V(m((L) => l(i).beginKeyboard(a.task.id), ["stop", "prevent"]), ["enter"]),
989
- V(m((L) => l(i).beginKeyboard(a.task.id), ["stop", "prevent"]), ["space"])
991
+ A(k((p) => l(i).beginKeyboard(a.task.id), ["stop", "prevent"]), ["enter"]),
992
+ A(k((p) => l(i).beginKeyboard(a.task.id), ["stop", "prevent"]), ["space"])
990
993
  ]
991
- }, null, 46, Aa)) : g("", !0)
992
- ], 12, _a);
994
+ }, null, 46, Fa)) : y("", !0)
995
+ ], 12, $a);
993
996
  }), 128)),
994
- $.showDependencies && nt.value.length || l(i).draft.value ? (o(), c("svg", {
997
+ L.showDependencies && st.value.length || l(i).draft.value ? (r(), c("svg", {
995
998
  key: 0,
996
- class: X(["hys-ui-pg-dependencies", {
999
+ class: O(["hys-ui-pg-dependencies", {
997
1000
  "hys-ui-pg-has-edge-selection": !!l(i).selected.value
998
1001
  }]),
999
- width: Be.value,
1000
- height: E.value.length * I.value,
1001
- "aria-hidden": !R.value || void 0
1002
+ width: Ve.value,
1003
+ height: $.value.length * x.value,
1004
+ "aria-hidden": !F.value || void 0
1002
1005
  }, [
1003
- $.showDependencies ? (o(), c(q, { key: 0 }, [
1004
- (o(!0), c(q, null, ee(nt.value, (a) => {
1005
- var k, v, P, K, z, N, Se, L, bt, wt;
1006
- return o(), c("g", {
1006
+ L.showDependencies ? (r(), c(B, { key: 0 }, [
1007
+ (r(!0), c(B, null, j(st.value, (a) => {
1008
+ var n, v, o, I, P, D, W, p, Q, mt;
1009
+ return r(), c("g", {
1007
1010
  key: a.id,
1008
- class: X(["hys-ui-pg-edge-group", {
1009
- "hys-ui-pg-edge-shared": (((k = Te.value.get(a.targetId)) == null ? void 0 : k.length) ?? 0) > 1,
1010
- "hys-ui-pg-edge-current": ((v = l(i).selected.value) == null ? void 0 : v.sourceId) === a.sourceId && ((P = l(i).selected.value) == null ? void 0 : P.targetId) === a.targetId,
1011
- "hys-ui-pg-edge-rewiring": ((K = l(i).draft.value) == null ? void 0 : K.sourceId) === a.sourceId && ((z = l(i).draft.value) == null ? void 0 : z.previousTargetId) === a.targetId
1011
+ class: O(["hys-ui-pg-edge-group", {
1012
+ "hys-ui-pg-edge-shared": (((n = Ce.value.get(a.targetId)) == null ? void 0 : n.length) ?? 0) > 1,
1013
+ "hys-ui-pg-edge-current": ((v = l(i).selected.value) == null ? void 0 : v.sourceId) === a.sourceId && ((o = l(i).selected.value) == null ? void 0 : o.targetId) === a.targetId,
1014
+ "hys-ui-pg-edge-rewiring": ((I = l(i).draft.value) == null ? void 0 : I.sourceId) === a.sourceId && ((P = l(i).draft.value) == null ? void 0 : P.previousTargetId) === a.targetId
1012
1015
  }]),
1013
1016
  "data-edge-key": a.id
1014
1017
  }, [
1015
- u("path", {
1016
- class: X(["hys-ui-pg-edge-line", {
1017
- "hys-ui-pg-edge-selected": ((N = l(i).selected.value) == null ? void 0 : N.sourceId) === a.sourceId && ((Se = l(i).selected.value) == null ? void 0 : Se.targetId) === a.targetId,
1018
- "hys-ui-pg-edge-conflict": $.showConflicts && !!kt(a.sourceId, a.targetId),
1019
- "hys-ui-pg-edge-related": F.value === a.sourceId || F.value === a.targetId
1018
+ d("path", {
1019
+ class: O(["hys-ui-pg-edge-line", {
1020
+ "hys-ui-pg-edge-selected": ((D = l(i).selected.value) == null ? void 0 : D.sourceId) === a.sourceId && ((W = l(i).selected.value) == null ? void 0 : W.targetId) === a.targetId,
1021
+ "hys-ui-pg-edge-conflict": L.showConflicts && !!yt(a.sourceId, a.targetId),
1022
+ "hys-ui-pg-edge-related": K.value === a.sourceId || K.value === a.targetId
1020
1023
  }]),
1021
1024
  d: a.path,
1022
1025
  fill: "none",
1023
1026
  stroke: "currentColor",
1024
1027
  "stroke-width": "1.5"
1025
- }, null, 10, Wa),
1026
- R.value ? (o(), c("path", {
1028
+ }, null, 10, Ua),
1029
+ F.value ? (r(), c("path", {
1027
1030
  key: 0,
1028
1031
  class: "hys-ui-pg-edge-hit",
1029
- d: (((L = Te.value.get(a.targetId)) == null ? void 0 : L.length) ?? 0) > 1 && !(((bt = l(i).selected.value) == null ? void 0 : bt.sourceId) === a.sourceId && ((wt = l(i).selected.value) == null ? void 0 : wt.targetId) === a.targetId) ? a.pickPath : a.path,
1032
+ d: (((p = Ce.value.get(a.targetId)) == null ? void 0 : p.length) ?? 0) > 1 && !(((Q = l(i).selected.value) == null ? void 0 : Q.sourceId) === a.sourceId && ((mt = l(i).selected.value) == null ? void 0 : mt.targetId) === a.targetId) ? a.pickPath : a.path,
1030
1033
  fill: "none",
1031
1034
  stroke: "transparent",
1032
1035
  "stroke-width": "12",
1033
1036
  role: "button",
1034
1037
  tabindex: "0",
1035
1038
  "aria-label": "依赖 " + a.sourceId + " → " + a.targetId + ",选中后按 Delete 移除",
1036
- onPointerdown: t[9] || (t[9] = m(() => {
1039
+ onPointerdown: t[9] || (t[9] = k(() => {
1037
1040
  }, ["stop"])),
1038
- onClick: m((A) => l(i).selectEdge(A, a.sourceId, a.targetId), ["stop"]),
1039
- onFocus: (A) => l(i).selectEdge(A, a.sourceId, a.targetId),
1040
- onKeydown: V(m((A) => l(i).selectEdge(A, a.sourceId, a.targetId), ["prevent", "stop"]), ["enter"])
1041
- }, null, 40, Ba)) : g("", !0),
1042
- R.value && a.editable ? (o(), c(q, { key: 1 }, [
1043
- u("circle", {
1041
+ onClick: k((R) => l(i).selectEdge(R, a.sourceId, a.targetId), ["stop"]),
1042
+ onFocus: (R) => l(i).selectEdge(R, a.sourceId, a.targetId),
1043
+ onKeydown: A(k((R) => l(i).selectEdge(R, a.sourceId, a.targetId), ["prevent", "stop"]), ["enter"])
1044
+ }, null, 40, Va)) : y("", !0),
1045
+ F.value && a.editable ? (r(), c(B, { key: 1 }, [
1046
+ d("circle", {
1044
1047
  class: "hys-ui-pg-edge-endpoint",
1045
1048
  cx: a.endpoint.x,
1046
1049
  cy: a.endpoint.y,
1047
1050
  r: "5",
1048
1051
  "aria-hidden": "true"
1049
- }, null, 8, Na),
1050
- u("circle", {
1052
+ }, null, 8, Wa),
1053
+ d("circle", {
1051
1054
  class: "hys-ui-pg-edge-endpoint-hit",
1052
1055
  cx: a.endpoint.x,
1053
1056
  cy: a.endpoint.y,
@@ -1056,76 +1059,76 @@ ${a.task.start} → ${a.task.end}
1056
1059
  role: "button",
1057
1060
  tabindex: "0",
1058
1061
  "aria-label": "改接依赖终点:" + a.sourceId + " → " + a.targetId,
1059
- onFocus: (A) => l(i).selectEdge(A, a.sourceId, a.targetId),
1060
- onPointerdown: m((A) => l(i).beginPointer(A, a.sourceId, a.targetId), ["stop", "prevent"]),
1061
- onClick: m((A) => l(i).clickSource(A, a.sourceId, a.targetId), ["stop"]),
1062
+ onFocus: (R) => l(i).selectEdge(R, a.sourceId, a.targetId),
1063
+ onPointerdown: k((R) => l(i).beginPointer(R, a.sourceId, a.targetId), ["stop", "prevent"]),
1064
+ onClick: k((R) => l(i).clickSource(R, a.sourceId, a.targetId), ["stop"]),
1062
1065
  onKeydown: [
1063
- V(m((A) => l(i).beginKeyboard(a.sourceId, a.targetId), ["stop", "prevent"]), ["enter"]),
1064
- V(m((A) => l(i).beginKeyboard(a.sourceId, a.targetId), ["stop", "prevent"]), ["space"])
1066
+ A(k((R) => l(i).beginKeyboard(a.sourceId, a.targetId), ["stop", "prevent"]), ["enter"]),
1067
+ A(k((R) => l(i).beginKeyboard(a.sourceId, a.targetId), ["stop", "prevent"]), ["space"])
1065
1068
  ]
1066
1069
  }, [
1067
- u("title", null, p(a.sourceTitle) + " → " + p(a.targetTitle) + ":拖动修改连接终点,或按 Enter 后用上下键选择新任务 ", 1)
1068
- ], 40, qa)
1069
- ], 64)) : g("", !0)
1070
- ], 10, Va);
1070
+ d("title", null, h(a.sourceTitle) + " → " + h(a.targetTitle) + ":拖动修改连接终点,或按 Enter 后用上下键选择新任务 ", 1)
1071
+ ], 40, Ba)
1072
+ ], 64)) : y("", !0)
1073
+ ], 10, Aa);
1071
1074
  }), 128)),
1072
- ue.value ? (o(), c(q, { key: 0 }, [
1073
- u("path", {
1074
- class: X(["hys-ui-pg-active-edge-line", {
1075
- "hys-ui-pg-edge-conflict": $.showConflicts && !!kt(
1076
- ue.value.sourceId,
1077
- ue.value.targetId
1075
+ re.value ? (r(), c(B, { key: 0 }, [
1076
+ d("path", {
1077
+ class: O(["hys-ui-pg-active-edge-line", {
1078
+ "hys-ui-pg-edge-conflict": L.showConflicts && !!yt(
1079
+ re.value.sourceId,
1080
+ re.value.targetId
1078
1081
  )
1079
1082
  }]),
1080
- d: ue.value.path,
1083
+ d: re.value.path,
1081
1084
  fill: "none",
1082
1085
  "stroke-width": "2.5"
1083
- }, null, 10, Ga),
1084
- ue.value.editable && R.value ? (o(), c("circle", {
1086
+ }, null, 10, Na),
1087
+ re.value.editable && F.value ? (r(), c("circle", {
1085
1088
  key: 0,
1086
1089
  class: "hys-ui-pg-active-endpoint",
1087
- cx: ue.value.endpoint.x,
1088
- cy: ue.value.endpoint.y,
1090
+ cx: re.value.endpoint.x,
1091
+ cy: re.value.endpoint.y,
1089
1092
  r: "5"
1090
- }, null, 8, Oa)) : g("", !0)
1091
- ], 64)) : g("", !0),
1092
- R.value ? (o(!0), c(q, { key: 1 }, ee(Ft.value, (a) => {
1093
- var k;
1094
- return o(), c("g", {
1093
+ }, null, 8, qa)) : y("", !0)
1094
+ ], 64)) : y("", !0),
1095
+ F.value ? (r(!0), c(B, { key: 1 }, j(_t.value, (a) => {
1096
+ var n;
1097
+ return r(), c("g", {
1095
1098
  key: a.id,
1096
1099
  class: "hys-ui-pg-incoming-trigger",
1097
1100
  transform: `translate(${a.x} ${a.y})`,
1098
1101
  role: "button",
1099
1102
  tabindex: "0",
1100
1103
  "aria-haspopup": "dialog",
1101
- "aria-expanded": l(M).open.value && de.value === a.id,
1104
+ "aria-expanded": l(M).open.value && ue.value === a.id,
1102
1105
  "aria-label": "选择前置依赖:" + a.title + "," + a.count + " 条",
1103
- onPointerdown: t[10] || (t[10] = m(() => {
1106
+ onPointerdown: t[10] || (t[10] = k(() => {
1104
1107
  }, ["stop"])),
1105
- onClick: m((v) => Oe(v, a.id), ["stop"]),
1108
+ onClick: k((v) => qe(v, a.id), ["stop"]),
1106
1109
  onKeydown: [
1107
- V(m((v) => Oe(v, a.id), ["stop", "prevent"]), ["enter"]),
1108
- V(m((v) => Oe(v, a.id), ["stop", "prevent"]), ["space"])
1110
+ A(k((v) => qe(v, a.id), ["stop", "prevent"]), ["enter"]),
1111
+ A(k((v) => qe(v, a.id), ["stop", "prevent"]), ["space"])
1109
1112
  ]
1110
1113
  }, [
1111
- t[27] || (t[27] = u("circle", {
1114
+ t[27] || (t[27] = d("circle", {
1112
1115
  r: "13",
1113
1116
  fill: "transparent",
1114
1117
  class: "hys-ui-pg-incoming-hit"
1115
1118
  }, null, -1)),
1116
- ((k = l(i).selected.value) == null ? void 0 : k.targetId) !== a.id ? (o(), c("circle", Xa)) : g("", !0),
1117
- t[28] || (t[28] = u("circle", {
1119
+ ((n = l(i).selected.value) == null ? void 0 : n.targetId) !== a.id ? (r(), c("circle", Oa)) : y("", !0),
1120
+ t[28] || (t[28] = d("circle", {
1118
1121
  r: "9",
1119
1122
  class: "hys-ui-pg-incoming-badge"
1120
1123
  }, null, -1)),
1121
- u("text", Ja, p(a.count > 99 ? "99+" : a.count), 1),
1122
- u("title", null, p(a.title) + " 有 " + p(a.count) + " 条前置关系,点击选择要编辑的连线 ", 1)
1123
- ], 40, Ya);
1124
- }), 128)) : g("", !0)
1125
- ], 64)) : g("", !0),
1126
- l(i).draft.value ? (o(), c("path", {
1124
+ d("text", Ya, h(a.count > 99 ? "99+" : a.count), 1),
1125
+ d("title", null, h(a.title) + " 有 " + h(a.count) + " 条前置关系,点击选择要编辑的连线 ", 1)
1126
+ ], 40, Ga);
1127
+ }), 128)) : y("", !0)
1128
+ ], 64)) : y("", !0),
1129
+ l(i).draft.value ? (r(), c("path", {
1127
1130
  key: 1,
1128
- class: X(["hys-ui-pg-link-preview", {
1131
+ class: O(["hys-ui-pg-link-preview", {
1129
1132
  "hys-ui-pg-link-preview-invalid": !!l(i).draft.value.reason
1130
1133
  }]),
1131
1134
  d: l(i).path.value,
@@ -1133,29 +1136,29 @@ ${a.task.start} → ${a.task.end}
1133
1136
  stroke: "currentColor",
1134
1137
  "stroke-width": "2",
1135
1138
  "stroke-dasharray": "5 4"
1136
- }, null, 10, Qa)) : g("", !0)
1137
- ], 10, Ua)) : g("", !0)
1139
+ }, null, 10, Xa)) : y("", !0)
1140
+ ], 10, Ra)) : y("", !0)
1138
1141
  ], 4)
1139
1142
  ], 4)
1140
1143
  ], 4)
1141
1144
  ], 36),
1142
- u("div", Za, [
1143
- j(p(E.value.length) + " 项任务 · " + p($t.value) + " 项已完成 ", 1),
1144
- E.value.length !== $.items.length ? (o(), c("span", ja, "· " + p($.items.length - E.value.length) + " 项日期无效已隐藏", 1)) : g("", !0),
1145
- R.value ? (o(), c("div", el, [
1146
- u("span", tl, p(l(i).message.value || "拖动圆点连接依赖;选中连线可拖动终点改接或移除。"), 1),
1147
- l(i).draft.value ? (o(), De(W, {
1145
+ d("div", Ja, [
1146
+ Z(h($.value.length) + " 项任务 · " + h(St.value) + " 项已完成 ", 1),
1147
+ $.value.length !== L.items.length ? (r(), c("span", Qa, "· " + h(L.items.length - $.value.length) + " 项日期无效已隐藏", 1)) : y("", !0),
1148
+ F.value ? (r(), c("div", Za, [
1149
+ d("span", ja, h(l(i).message.value || "拖动圆点连接依赖;选中连线可拖动终点改接或移除。"), 1),
1150
+ l(i).draft.value ? (r(), ze(U, {
1148
1151
  key: 0,
1149
1152
  variant: "ghost",
1150
1153
  size: "sm",
1151
1154
  onClick: t[15] || (t[15] = (a) => l(i).cancel())
1152
1155
  }, {
1153
- default: U(() => [
1154
- y(l(Tt), { size: 14 }),
1155
- t[29] || (t[29] = j("取消连接", -1))
1156
+ default: H(() => [
1157
+ f(l(xt), { size: 14 }),
1158
+ t[29] || (t[29] = Z("取消连接", -1))
1156
1159
  ]),
1157
1160
  _: 1
1158
- })) : l(i).selected.value ? (o(), De(W, {
1161
+ })) : l(i).selected.value ? (r(), ze(U, {
1159
1162
  key: 1,
1160
1163
  variant: "ghost",
1161
1164
  size: "sm",
@@ -1164,238 +1167,250 @@ ${a.task.start} → ${a.task.end}
1164
1167
  l(i).selected.value.targetId
1165
1168
  ))
1166
1169
  }, {
1167
- default: U(() => [
1168
- y(l(Pt), { size: 14 }),
1169
- t[30] || (t[30] = j("移除依赖", -1))
1170
+ default: H(() => [
1171
+ f(l(It), { size: 14 }),
1172
+ t[30] || (t[30] = Z("移除依赖", -1))
1170
1173
  ]),
1171
1174
  _: 1
1172
- })) : g("", !0)
1173
- ])) : g("", !0),
1174
- l(f).message.value ? (o(), c("p", al, p(l(f).message.value), 1)) : g("", !0),
1175
- $.showConflicts && (oe.value.length || te.value || Y.value && (Y.value.before || Y.value.conflicts.length)) ? (o(), c("div", ll, [
1176
- u("div", sl, [
1177
- y(l(Ct), { size: 14 }),
1178
- u("span", il, p(oe.value.length ? oe.value.length + " 项排期冲突" : "当前排期检查正常"), 1),
1179
- y(W, {
1175
+ })) : y("", !0)
1176
+ ])) : y("", !0),
1177
+ l(m).message.value ? (r(), c("p", el, h(l(m).message.value), 1)) : y("", !0),
1178
+ L.showConflicts && (ne.value.length || ee.value || G.value && (G.value.before || G.value.conflicts.length)) ? (r(), c("div", tl, [
1179
+ d("div", al, [
1180
+ f(l(wt), { size: 14 }),
1181
+ d("span", ll, h(ne.value.length ? ne.value.length + " 项排期冲突" : "当前排期检查正常"), 1),
1182
+ f(U, {
1180
1183
  variant: "ghost",
1181
1184
  size: "sm",
1182
- "aria-expanded": te.value,
1183
- "aria-controls": ot,
1184
- onClick: t[17] || (t[17] = (a) => te.value = !te.value)
1185
+ "aria-expanded": ee.value,
1186
+ "aria-controls": it,
1187
+ onClick: t[17] || (t[17] = (a) => ee.value = !ee.value)
1185
1188
  }, {
1186
- default: U(() => [
1187
- j(p(te.value ? "收起详情" : "查看详情"), 1),
1188
- y(l(va), {
1189
+ default: H(() => [
1190
+ Z(h(ee.value ? "收起详情" : "查看详情"), 1),
1191
+ f(l(da), {
1189
1192
  size: 13,
1190
- style: H({
1191
- transform: te.value ? "rotate(180deg)" : void 0
1193
+ style: _({
1194
+ transform: ee.value ? "rotate(180deg)" : void 0
1192
1195
  })
1193
1196
  }, null, 8, ["style"])
1194
1197
  ]),
1195
1198
  _: 1
1196
1199
  }, 8, ["aria-expanded"])
1197
1200
  ]),
1198
- Y.value ? (o(), c("p", nl, " 调整预览:相关依赖有 " + p(Y.value.conflicts.length) + " 项冲突,新增 " + p(Y.value.added) + " 项、消除 " + p(Y.value.resolved) + " 项。" + p(((s = Y.value.conflicts[0]) == null ? void 0 : s.message) ?? ""), 1)) : g("", !0),
1199
- te.value ? (o(), c("section", {
1201
+ G.value ? (r(), c("p", sl, " 调整预览:相关依赖有 " + h(G.value.conflicts.length) + " 项冲突,新增 " + h(G.value.added) + " 项、消除 " + h(G.value.resolved) + " 项。" + h(((s = G.value.conflicts[0]) == null ? void 0 : s.message) ?? ""), 1)) : y("", !0),
1202
+ ee.value ? (r(), c("section", {
1200
1203
  key: 1,
1201
- id: ot,
1204
+ id: it,
1202
1205
  class: "hys-ui-pg-conflict-panel",
1203
1206
  "aria-label": "排期冲突详情"
1204
1207
  }, [
1205
- y(It, {
1206
- modelValue: fe.value,
1207
- "onUpdate:modelValue": t[18] || (t[18] = (a) => fe.value = a),
1208
+ f(bt, {
1209
+ modelValue: ge.value,
1210
+ "onUpdate:modelValue": t[18] || (t[18] = (a) => ge.value = a),
1208
1211
  size: "sm",
1209
- "prefix-icon": l(Mt),
1212
+ "prefix-icon": l(Ct),
1210
1213
  clearable: "",
1211
1214
  placeholder: "搜索任务、编号或冲突说明",
1212
1215
  "aria-label": "搜索排期冲突"
1213
1216
  }, null, 8, ["modelValue", "prefix-icon"]),
1214
- u("ul", ol, [
1215
- (o(!0), c(q, null, ee(At.value, (a) => (o(), c("li", {
1217
+ d("ul", il, [
1218
+ (r(!0), c(B, null, j(Ht.value, (a) => (r(), c("li", {
1216
1219
  key: a.id
1217
1220
  }, [
1218
- u("div", null, [
1219
- u("span", rl, p(Yt(a.type)), 1),
1220
- u("strong", null, p(a.sourceTitle ? a.sourceTitle + " → " : "") + p(a.taskTitle), 1),
1221
- u("p", null, p(a.message), 1)
1221
+ d("div", null, [
1222
+ d("span", nl, h(qt(a.type)), 1),
1223
+ d("strong", null, h(a.sourceTitle ? a.sourceTitle + " → " : "") + h(a.taskTitle), 1),
1224
+ d("p", null, h(a.message), 1)
1222
1225
  ]),
1223
- y(W, {
1226
+ f(U, {
1224
1227
  variant: "ghost",
1225
1228
  size: "sm",
1226
- disabled: !ge.value.has(a.taskId),
1229
+ disabled: !he.value.has(a.taskId),
1227
1230
  "aria-label": "定位冲突任务:" + a.taskTitle,
1228
- onClick: (k) => Xt(a)
1231
+ onClick: (n) => Gt(a)
1229
1232
  }, {
1230
- default: U(() => [
1231
- y(l(Qe), { size: 14 }),
1232
- t[31] || (t[31] = j("定位", -1))
1233
+ default: H(() => [
1234
+ f(l(Xe), { size: 14 }),
1235
+ t[31] || (t[31] = Z("定位", -1))
1233
1236
  ]),
1234
1237
  _: 1
1235
1238
  }, 8, ["disabled", "aria-label", "onClick"])
1236
1239
  ]))), 128)),
1237
- ye.value.length ? g("", !0) : (o(), c("li", ul, p(fe.value ? "没有匹配的排期冲突" : "当前没有排期冲突"), 1))
1240
+ fe.value.length ? y("", !0) : (r(), c("li", ol, h(ge.value ? "没有匹配的排期冲突" : "当前没有排期冲突"), 1))
1238
1241
  ]),
1239
- ye.value.length > 10 ? (o(), De(na, {
1242
+ fe.value.length > 10 ? (r(), ze(sa, {
1240
1243
  key: 0,
1241
- page: re.value,
1242
- "onUpdate:page": t[19] || (t[19] = (a) => re.value = a),
1243
- total: ye.value.length,
1244
+ page: oe.value,
1245
+ "onUpdate:page": t[19] || (t[19] = (a) => oe.value = a),
1246
+ total: fe.value.length,
1244
1247
  "page-size": 10,
1245
1248
  compact: ""
1246
- }, null, 8, ["page", "total"])) : g("", !0)
1247
- ])) : g("", !0)
1248
- ])) : g("", !0)
1249
+ }, null, 8, ["page", "total"])) : y("", !0)
1250
+ ])) : y("", !0)
1251
+ ])) : y("", !0)
1249
1252
  ]),
1250
- (o(), De(la, { to: "body" }, [
1251
- l(M).open.value ? (o(), c("div", xt({
1252
- key: 0,
1253
- ref_key: "pickerPanel",
1254
- ref: me
1255
- }, l(Ze), {
1256
- class: "hys-ui-pg-dependency-picker hys-ui-floating-surface",
1257
- style: l(M).style.value,
1258
- role: "dialog",
1259
- "aria-label": "选择前置依赖:" + (((n = ce.value[0]) == null ? void 0 : n.targetTitle) ?? ""),
1260
- onKeydown: Bt
1261
- }), [
1262
- u("div", cl, [
1263
- t[32] || (t[32] = u("strong", null, "选择前置关系", -1)),
1264
- y(W, {
1265
- variant: "ghost",
1266
- size: "sm",
1267
- class: "hys-ui-pg-picker-close",
1268
- "aria-label": "关闭前置关系列表",
1269
- onClick: t[20] || (t[20] = (a) => l(M).close(!0))
1270
- }, {
1271
- default: U(() => [
1272
- y(l(Tt), { size: 15 })
1273
- ]),
1274
- _: 1
1275
- })
1276
- ]),
1277
- u("div", vl, [
1278
- u("div", pl, [
1279
- t[33] || (t[33] = u("span", null, "后置", -1)),
1280
- u("strong", {
1281
- title: (d = ce.value[0]) == null ? void 0 : d.targetTitle
1282
- }, p((b = ce.value[0]) == null ? void 0 : b.targetTitle), 9, hl)
1283
- ]),
1284
- y(W, {
1285
- variant: "ghost",
1286
- size: "sm",
1287
- class: "hys-ui-pg-picker-action",
1288
- "aria-label": "定位后置任务",
1289
- title: "定位后置任务",
1290
- onClick: t[21] || (t[21] = (a) => de.value !== void 0 && ct(de.value))
1291
- }, {
1292
- default: U(() => [
1293
- y(l(Qe), { size: 15 })
1294
- ]),
1295
- _: 1
1296
- })
1297
- ]),
1298
- y(It, {
1299
- modelValue: Fe.value,
1300
- "onUpdate:modelValue": t[22] || (t[22] = (a) => Fe.value = a),
1301
- size: "sm",
1302
- "prefix-icon": l(Mt),
1303
- clearable: "",
1304
- placeholder: "搜索前置任务或编号",
1305
- "aria-label": "搜索前置关系",
1306
- class: "hys-ui-pg-picker-search"
1307
- }, null, 8, ["modelValue", "prefix-icon"]),
1308
- u("div", gl, [
1309
- (o(!0), c(q, null, ee(dt.value, (a) => {
1310
- var k, v, P, K;
1311
- return o(), c("div", {
1312
- key: a.id,
1313
- class: "hys-ui-pg-picker-option",
1314
- "data-current": ((k = l(i).selected.value) == null ? void 0 : k.sourceId) === a.sourceId && ((v = l(i).selected.value) == null ? void 0 : v.targetId) === a.targetId
1315
- }, [
1316
- y(W, {
1317
- variant: "ghost",
1318
- "data-pg-choice": "",
1319
- "aria-label": a.sourceTitle + " → " + a.targetTitle,
1320
- "aria-pressed": ((P = l(i).selected.value) == null ? void 0 : P.sourceId) === a.sourceId && ((K = l(i).selected.value) == null ? void 0 : K.targetId) === a.targetId,
1321
- onClick: (z) => Ut(z, a)
1322
- }, {
1323
- default: U(() => {
1324
- var z, N;
1325
- return [
1326
- y(l(pa), {
1327
- size: 15,
1328
- class: "hys-ui-pg-picker-icon"
1329
- }),
1330
- u("span", yl, [
1331
- u("span", {
1332
- title: a.sourceTitle
1333
- }, p(a.sourceTitle), 9, ml)
1334
- ]),
1335
- u("span", kl, [
1336
- ((z = l(i).selected.value) == null ? void 0 : z.sourceId) === a.sourceId && ((N = l(i).selected.value) == null ? void 0 : N.targetId) === a.targetId ? (o(), De(l(ha), {
1337
- key: 0,
1338
- size: 14
1339
- })) : g("", !0)
1340
- ])
1341
- ];
1342
- }),
1343
- _: 2
1344
- }, 1032, ["aria-label", "aria-pressed", "onClick"]),
1345
- u("div", bl, [
1346
- y(W, {
1253
+ (r(), ze(ea, { to: "body" }, [
1254
+ f(l(ta), {
1255
+ "popup-transition": u.popupTransition,
1256
+ "popup-transition-duration": u.popupTransitionDuration,
1257
+ placement: l(M).placement.value
1258
+ }, {
1259
+ default: H(() => {
1260
+ var a, n, v;
1261
+ return [
1262
+ l(M).open.value ? (r(), c("div", kt({
1263
+ key: 0,
1264
+ ref_key: "pickerPanel",
1265
+ ref: ye
1266
+ }, l(Je), {
1267
+ class: "hys-ui-pg-dependency-picker hys-ui-floating-surface",
1268
+ style: l(M).style.value,
1269
+ role: "dialog",
1270
+ "aria-label": "选择前置依赖:" + (((a = de.value[0]) == null ? void 0 : a.targetTitle) ?? ""),
1271
+ onKeydown: Ut
1272
+ }), [
1273
+ d("div", ul, [
1274
+ t[32] || (t[32] = d("strong", null, "选择前置关系", -1)),
1275
+ f(U, {
1347
1276
  variant: "ghost",
1348
1277
  size: "sm",
1349
- class: "hys-ui-pg-picker-action",
1350
- "aria-label": "定位前置任务:" + a.sourceTitle,
1351
- title: "定位前置任务",
1352
- onClick: m((z) => ct(a.sourceId, z, a), ["stop"])
1278
+ class: "hys-ui-pg-picker-close",
1279
+ "aria-label": "关闭前置关系列表",
1280
+ onClick: t[20] || (t[20] = (o) => l(M).close(!0))
1353
1281
  }, {
1354
- default: U(() => [
1355
- y(l(Qe), { size: 14 })
1282
+ default: H(() => [
1283
+ f(l(xt), { size: 15 })
1356
1284
  ]),
1357
1285
  _: 1
1358
- }, 8, ["aria-label", "onClick"]),
1359
- y(W, {
1286
+ })
1287
+ ]),
1288
+ d("div", dl, [
1289
+ d("div", cl, [
1290
+ t[33] || (t[33] = d("span", null, "后置", -1)),
1291
+ d("strong", {
1292
+ title: (n = de.value[0]) == null ? void 0 : n.targetTitle
1293
+ }, h((v = de.value[0]) == null ? void 0 : v.targetTitle), 9, vl)
1294
+ ]),
1295
+ f(U, {
1360
1296
  variant: "ghost",
1361
1297
  size: "sm",
1362
1298
  class: "hys-ui-pg-picker-action",
1363
- disabled: !a.editable || !!Pe.value,
1364
- "aria-label": "修改终点:" + a.sourceTitle + " → " + a.targetTitle,
1365
- title: "修改连接终点",
1366
- onClick: m((z) => Vt(a), ["stop"])
1367
- }, {
1368
- default: U(() => [
1369
- y(l(ga), { size: 14 })
1370
- ]),
1371
- _: 1
1372
- }, 8, ["disabled", "aria-label", "onClick"]),
1373
- y(W, {
1374
- variant: "ghost",
1375
- size: "sm",
1376
- class: "hys-ui-pg-picker-action hys-ui-pg-picker-delete",
1377
- disabled: !a.removable || !!Pe.value,
1378
- "aria-label": "删除依赖:" + a.sourceTitle + " → " + a.targetTitle,
1379
- title: "删除这条依赖",
1380
- onClick: m((z) => Wt(a), ["stop"])
1299
+ "aria-label": "定位后置任务",
1300
+ title: "定位后置任务",
1301
+ onClick: t[21] || (t[21] = (o) => ue.value !== void 0 && ut(ue.value))
1381
1302
  }, {
1382
- default: U(() => [
1383
- y(l(Pt), { size: 14 })
1303
+ default: H(() => [
1304
+ f(l(Xe), { size: 15 })
1384
1305
  ]),
1385
1306
  _: 1
1386
- }, 8, ["disabled", "aria-label", "onClick"])
1387
- ])
1388
- ], 8, fl);
1389
- }), 128)),
1390
- dt.value.length ? g("", !0) : (o(), c("p", wl, " 没有匹配的前置关系 "))
1391
- ]),
1392
- Me.value ? (o(), c("p", xl, p(Me.value), 1)) : g("", !0)
1393
- ], 16, dl)) : g("", !0)
1307
+ })
1308
+ ]),
1309
+ f(bt, {
1310
+ modelValue: Ke.value,
1311
+ "onUpdate:modelValue": t[22] || (t[22] = (o) => Ke.value = o),
1312
+ size: "sm",
1313
+ "prefix-icon": l(Ct),
1314
+ clearable: "",
1315
+ placeholder: "搜索前置任务或编号",
1316
+ "aria-label": "搜索前置关系",
1317
+ class: "hys-ui-pg-picker-search"
1318
+ }, null, 8, ["modelValue", "prefix-icon"]),
1319
+ d("div", pl, [
1320
+ (r(!0), c(B, null, j(rt.value, (o) => {
1321
+ var I, P, D, W;
1322
+ return r(), c("div", {
1323
+ key: o.id,
1324
+ class: "hys-ui-pg-picker-option",
1325
+ "data-current": ((I = l(i).selected.value) == null ? void 0 : I.sourceId) === o.sourceId && ((P = l(i).selected.value) == null ? void 0 : P.targetId) === o.targetId
1326
+ }, [
1327
+ f(U, {
1328
+ variant: "ghost",
1329
+ "data-pg-choice": "",
1330
+ "aria-label": o.sourceTitle + " → " + o.targetTitle,
1331
+ "aria-pressed": ((D = l(i).selected.value) == null ? void 0 : D.sourceId) === o.sourceId && ((W = l(i).selected.value) == null ? void 0 : W.targetId) === o.targetId,
1332
+ onClick: (p) => Ft(p, o)
1333
+ }, {
1334
+ default: H(() => {
1335
+ var p, Q;
1336
+ return [
1337
+ f(l(ca), {
1338
+ size: 15,
1339
+ class: "hys-ui-pg-picker-icon"
1340
+ }),
1341
+ d("span", gl, [
1342
+ d("span", {
1343
+ title: o.sourceTitle
1344
+ }, h(o.sourceTitle), 9, fl)
1345
+ ]),
1346
+ d("span", yl, [
1347
+ ((p = l(i).selected.value) == null ? void 0 : p.sourceId) === o.sourceId && ((Q = l(i).selected.value) == null ? void 0 : Q.targetId) === o.targetId ? (r(), ze(l(va), {
1348
+ key: 0,
1349
+ size: 14
1350
+ })) : y("", !0)
1351
+ ])
1352
+ ];
1353
+ }),
1354
+ _: 2
1355
+ }, 1032, ["aria-label", "aria-pressed", "onClick"]),
1356
+ d("div", ml, [
1357
+ f(U, {
1358
+ variant: "ghost",
1359
+ size: "sm",
1360
+ class: "hys-ui-pg-picker-action",
1361
+ "aria-label": "定位前置任务:" + o.sourceTitle,
1362
+ title: "定位前置任务",
1363
+ onClick: k((p) => ut(o.sourceId, p, o), ["stop"])
1364
+ }, {
1365
+ default: H(() => [
1366
+ f(l(Xe), { size: 14 })
1367
+ ]),
1368
+ _: 1
1369
+ }, 8, ["aria-label", "onClick"]),
1370
+ f(U, {
1371
+ variant: "ghost",
1372
+ size: "sm",
1373
+ class: "hys-ui-pg-picker-action",
1374
+ disabled: !o.editable || !!Te.value,
1375
+ "aria-label": "修改终点:" + o.sourceTitle + " → " + o.targetTitle,
1376
+ title: "修改连接终点",
1377
+ onClick: k((p) => Rt(o), ["stop"])
1378
+ }, {
1379
+ default: H(() => [
1380
+ f(l(pa), { size: 14 })
1381
+ ]),
1382
+ _: 1
1383
+ }, 8, ["disabled", "aria-label", "onClick"]),
1384
+ f(U, {
1385
+ variant: "ghost",
1386
+ size: "sm",
1387
+ class: "hys-ui-pg-picker-action hys-ui-pg-picker-delete",
1388
+ disabled: !o.removable || !!Te.value,
1389
+ "aria-label": "删除依赖:" + o.sourceTitle + " → " + o.targetTitle,
1390
+ title: "删除这条依赖",
1391
+ onClick: k((p) => At(o), ["stop"])
1392
+ }, {
1393
+ default: H(() => [
1394
+ f(l(It), { size: 14 })
1395
+ ]),
1396
+ _: 1
1397
+ }, 8, ["disabled", "aria-label", "onClick"])
1398
+ ])
1399
+ ], 8, hl);
1400
+ }), 128)),
1401
+ rt.value.length ? y("", !0) : (r(), c("p", kl, " 没有匹配的前置关系 "))
1402
+ ]),
1403
+ Pe.value ? (r(), c("p", bl, h(Pe.value), 1)) : y("", !0)
1404
+ ], 16, rl)) : y("", !0)
1405
+ ];
1406
+ }),
1407
+ _: 1
1408
+ }, 8, ["popup-transition", "popup-transition-duration", "placement"])
1394
1409
  ]))
1395
1410
  ], 16);
1396
1411
  };
1397
1412
  }
1398
1413
  });
1399
1414
  export {
1400
- Kl as default
1415
+ _l as default
1401
1416
  };