@nice2dev/ui 1.2.0 → 1.2.2

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 (229) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/dist/NiceApiExplorer.doc-CFJndg5h.js +25 -0
  3. package/dist/NiceApiExplorer.doc-TEx67kV5.cjs +1 -0
  4. package/dist/NiceBPMNDesigner.doc-6lK1pXRq.js +32 -0
  5. package/dist/NiceBPMNDesigner.doc-BY8t7qOi.cjs +8 -0
  6. package/dist/NiceBackupDiffViewer.doc-CYvOeX19.js +25 -0
  7. package/dist/NiceBackupDiffViewer.doc-ChQaZCg1.cjs +1 -0
  8. package/dist/NiceBackupList.doc-BdQCw0_D.cjs +1 -0
  9. package/dist/NiceBackupList.doc-BwjIAoqz.js +25 -0
  10. package/dist/NiceBackupRestoreDialog.doc-B2iiqTps.cjs +1 -0
  11. package/dist/NiceBackupRestoreDialog.doc-DuXSGJiD.js +25 -0
  12. package/dist/NiceBackupScheduler.doc-BpY45181.js +31 -0
  13. package/dist/NiceBackupScheduler.doc-ByeL3iH1.cjs +7 -0
  14. package/dist/NiceBackupStatusBadge.doc-BA3dYgiW.cjs +1 -0
  15. package/dist/NiceBackupStatusBadge.doc-CxwkVarP.js +25 -0
  16. package/dist/NiceBackupTagEditor.doc-Bej1KHco.cjs +7 -0
  17. package/dist/NiceBackupTagEditor.doc-CNy4uNws.js +31 -0
  18. package/dist/NiceBottomSheet.doc-keq-Fzlz.cjs +8 -0
  19. package/dist/NiceBottomSheet.doc-v-UPUKQk.js +32 -0
  20. package/dist/NiceBranchManager.doc-BTyRjX7X.cjs +6 -0
  21. package/dist/NiceBranchManager.doc-Cz4SyEqE.js +30 -0
  22. package/dist/NiceButton-3AcJJ15c.cjs +1 -0
  23. package/dist/NiceButton-vkI07DP0.js +88 -0
  24. package/dist/NiceCodeEditor-C43xFG8v.cjs +260 -0
  25. package/dist/NiceCodeEditor-CspuYLh6.js +1174 -0
  26. package/dist/NiceCodeEditor-VGIDWSkS.js +1181 -0
  27. package/dist/NiceCodeEditor-qX39PSnQ.cjs +260 -0
  28. package/dist/NiceColorPicker-CQhhjZ8w.cjs +1 -0
  29. package/dist/NiceColorPicker-Cbop7VMu.js +491 -0
  30. package/dist/NiceConnectorConfigForm.doc-BKrDuhXw.cjs +7 -0
  31. package/dist/NiceConnectorConfigForm.doc-BsHeXz3M.js +31 -0
  32. package/dist/NiceDataBranchGraph.doc-Axidz41W.js +29 -0
  33. package/dist/NiceDataBranchGraph.doc-sjLmrrtE.cjs +5 -0
  34. package/dist/NiceDataBranchManager.doc-B1-Rp2X4.cjs +6 -0
  35. package/dist/NiceDataBranchManager.doc-GUqfTFvW.js +30 -0
  36. package/dist/NiceDataConflictResolver.doc-CjQryrTu.cjs +5 -0
  37. package/dist/NiceDataConflictResolver.doc-L-TcnQMX.js +29 -0
  38. package/dist/NiceDataDiffViewer.doc-BzGrf0U-.cjs +6 -0
  39. package/dist/NiceDataDiffViewer.doc-goxhSldH.js +30 -0
  40. package/dist/NiceDataGrid-BDEIbuBS.js +2218 -0
  41. package/dist/NiceDataGrid-CS5aB-EN.cjs +10 -0
  42. package/dist/NiceDataGrid-CrD4HPlO.cjs +10 -0
  43. package/dist/NiceDataGrid-Dfg1DVbU.js +2224 -0
  44. package/dist/NiceDataMapper.doc-QmnmnvVq.js +30 -0
  45. package/dist/NiceDataMapper.doc-ytGVtYVr.cjs +6 -0
  46. package/dist/NiceDataMergeBuilder.doc-BcmzKxh2.cjs +6 -0
  47. package/dist/NiceDataMergeBuilder.doc-BvYa4aUJ.js +30 -0
  48. package/dist/NiceDataSnapshot.doc-C73K1biG.cjs +6 -0
  49. package/dist/NiceDataSnapshot.doc-hU7wnOzM.js +30 -0
  50. package/dist/NiceDesktopViews.doc-DJjYlyP2.cjs +1 -0
  51. package/dist/NiceDesktopViews.doc-ly-VUAJj.js +25 -0
  52. package/dist/NiceDeviceControlCard.doc-BZIo92-w.cjs +1 -0
  53. package/dist/NiceDeviceControlCard.doc-DIzZcW9L.js +25 -0
  54. package/dist/NiceDocumentViewer-B9VIVKyw.js +726 -0
  55. package/dist/NiceDocumentViewer-CDXAmPp7.cjs +180 -0
  56. package/dist/NiceDocumentationViewer.doc-BSNGa7a_.js +25 -0
  57. package/dist/NiceDocumentationViewer.doc-CrwlvPFg.cjs +1 -0
  58. package/dist/NiceEnergyChart.doc-DW-jllDV.cjs +1 -0
  59. package/dist/NiceEnergyChart.doc-DnEehTff.js +25 -0
  60. package/dist/NiceFeatureGate.doc-DN17uS_B.cjs +3 -0
  61. package/dist/NiceFeatureGate.doc-DNfFSRrh.js +27 -0
  62. package/dist/NiceForm-BcN4p2kG.cjs +1 -0
  63. package/dist/NiceForm-CISJyzoW.cjs +1 -0
  64. package/dist/NiceForm-DmH6k1b_.js +4775 -0
  65. package/dist/NiceForm-tIXS-M6b.js +4770 -0
  66. package/dist/NiceFormItem.doc-BJwEnDz2.js +36 -0
  67. package/dist/NiceFormItem.doc-Ck3PgaPD.cjs +12 -0
  68. package/dist/NiceGantt-CHnq-n8f.cjs +1 -0
  69. package/dist/NiceGantt-CTbqCuwv.cjs +1 -0
  70. package/dist/NiceGantt-CX3jVNaF.js +330 -0
  71. package/dist/NiceGantt-Dao7pN9z.js +328 -0
  72. package/dist/NiceGantt.doc-B6YZcJvG.cjs +11 -0
  73. package/dist/NiceGantt.doc-DsI1QXly.js +48 -0
  74. package/dist/NiceGitBlame.doc-BQ2KvGkD.js +30 -0
  75. package/dist/NiceGitBlame.doc-DuTSjZVN.cjs +6 -0
  76. package/dist/NiceGitDiffViewer.doc-D24AGos_.js +30 -0
  77. package/dist/NiceGitDiffViewer.doc-D9FVquBC.cjs +6 -0
  78. package/dist/NiceGitGraph.doc-C-8VGMIz.js +29 -0
  79. package/dist/NiceGitGraph.doc-eRvTmefl.cjs +5 -0
  80. package/dist/NiceGitHooks.doc-DCTVw7HX.cjs +5 -0
  81. package/dist/NiceGitHooks.doc-OCFj5w6v.js +29 -0
  82. package/dist/NiceHtmlEditor-DUwcqj5N.cjs +10 -0
  83. package/dist/NiceHtmlEditor-DeK0Of98.js +883 -0
  84. package/dist/NiceHtmlEditor-DiAphF1k.js +889 -0
  85. package/dist/NiceHtmlEditor-DvVxl4Fu.cjs +10 -0
  86. package/dist/NiceInstanceMonitor.doc-BSDZp5xa.js +31 -0
  87. package/dist/NiceInstanceMonitor.doc-HVbLufnh.cjs +7 -0
  88. package/dist/NiceLocaleManager.doc-CbVHDEWu.js +25 -0
  89. package/dist/NiceLocaleManager.doc-XH6hMW0Z.cjs +1 -0
  90. package/dist/NiceLockButton.doc-BMhSj3TB.cjs +1 -0
  91. package/dist/NiceLockButton.doc-DvHGhcfm.js +25 -0
  92. package/dist/NiceLoginForm-CHXbz0eu.js +747 -0
  93. package/dist/NiceLoginForm-DQe77Isv.js +747 -0
  94. package/dist/NiceLoginForm-NBCo-DUZ.cjs +1 -0
  95. package/dist/NiceLoginForm-ix6J1adA.cjs +1 -0
  96. package/dist/NiceLoginForm.css +1 -1
  97. package/dist/NiceMAM.doc-CsQ57saR.cjs +8 -0
  98. package/dist/NiceMAM.doc-hjW7buTH.js +32 -0
  99. package/dist/NiceMention--3P3vO-W.cjs +430 -0
  100. package/dist/NiceMention-Co2cqkVM.js +11316 -0
  101. package/dist/NiceMention-DKhk3xdM.js +11321 -0
  102. package/dist/NiceMention-wp1AJ5oh.cjs +430 -0
  103. package/dist/NiceMention.css +1 -1
  104. package/dist/NiceModal-BbQwiEOp.cjs +1 -0
  105. package/dist/NiceModal-DQEfTcnZ.js +85 -0
  106. package/dist/NiceModuleLifecyclePanel-22CEEVbA.cjs +1 -0
  107. package/dist/NiceModuleLifecyclePanel-BCd9Wv5Y.js +6825 -0
  108. package/dist/NiceModuleLifecyclePanel-DV3F_QdI.cjs +1 -0
  109. package/dist/NiceModuleLifecyclePanel-gaZkIEtK.js +6825 -0
  110. package/dist/NiceModuleLifecyclePanel.css +1 -1
  111. package/dist/NiceNetworkDiscoveryPanel.doc-B0RtGaS3.js +25 -0
  112. package/dist/NiceNetworkDiscoveryPanel.doc-BFgFZI5G.cjs +1 -0
  113. package/dist/NicePagination-B3nZDZem.js +165 -0
  114. package/dist/NicePagination-B8rg1Y67.cjs +1 -0
  115. package/dist/NicePagination-BFGt1v0a.js +165 -0
  116. package/dist/NicePagination-DltL3-Sz.cjs +1 -0
  117. package/dist/NicePipelineEditor.doc-CjqDKe2x.js +29 -0
  118. package/dist/NicePipelineEditor.doc-DZ0pTVTp.cjs +5 -0
  119. package/dist/NicePipelineMonitor.doc-C88-TagI.cjs +5 -0
  120. package/dist/NicePipelineMonitor.doc-CFtH4XJx.js +29 -0
  121. package/dist/NicePivotGrid-BD87Na7P.js +1163 -0
  122. package/dist/NicePivotGrid-BPmnvbPQ.cjs +152 -0
  123. package/dist/NicePivotGrid-BaZa2YZW.js +1157 -0
  124. package/dist/NicePivotGrid-DyOPhPO8.cjs +152 -0
  125. package/dist/NiceRoomGrid.doc-DJPVUQVg.cjs +8 -0
  126. package/dist/NiceRoomGrid.doc-DLHJS_Wb.js +32 -0
  127. package/dist/NiceSavedQueryPanel-BC84uRfh.cjs +586 -0
  128. package/dist/NiceSavedQueryPanel-BSTiZvFg.js +5130 -0
  129. package/dist/NiceSavedQueryPanel-CMfcODIO.js +5120 -0
  130. package/dist/NiceSavedQueryPanel-DrR3sw4T.cjs +586 -0
  131. package/dist/NiceSavedQueryPanel.css +1 -1
  132. package/dist/NiceSceneBar.doc-09sc3yuF.cjs +1 -0
  133. package/dist/NiceSceneBar.doc-DLePMuVU.js +25 -0
  134. package/dist/NiceSceneSelector.doc-CPzCAy-d.cjs +7 -0
  135. package/dist/NiceSceneSelector.doc-FCLZvPc0.js +31 -0
  136. package/dist/NiceScheduler-BAJRzFQN.js +1690 -0
  137. package/dist/NiceScheduler-DvxJ8N0I.js +1698 -0
  138. package/dist/NiceScheduler-TIksdF0k.cjs +5 -0
  139. package/dist/NiceScheduler-dJ7gHDv7.cjs +5 -0
  140. package/dist/NiceSchedulerViews.doc-C9opZpgg.cjs +1 -0
  141. package/dist/NiceSchedulerViews.doc-Dy7ZH1iL.js +25 -0
  142. package/dist/NiceSelect-CZR8Zu_k.js +420 -0
  143. package/dist/NiceSelect-DIKGbaJo.cjs +1 -0
  144. package/dist/NiceSensorGaugePanel.doc-BHirbWLn.cjs +8 -0
  145. package/dist/NiceSensorGaugePanel.doc-DjKmooI6.js +32 -0
  146. package/dist/NiceSpotlight.doc-BVZFfDVI.cjs +10 -0
  147. package/dist/NiceSpotlight.doc-JqwkzrEm.js +34 -0
  148. package/dist/NiceStateDesigner.doc-CfnwiwfU.js +29 -0
  149. package/dist/NiceStateDesigner.doc-DV4zEC50.cjs +5 -0
  150. package/dist/NiceStepper.doc-5VjaLM6r.js +31 -0
  151. package/dist/NiceStepper.doc-f8lYpr33.cjs +7 -0
  152. package/dist/NiceTaskInbox.doc-CHrxthqp.js +32 -0
  153. package/dist/NiceTaskInbox.doc-CdCTfgBq.cjs +8 -0
  154. package/dist/NiceTestBuilder.doc-BoBzLfa0.js +30 -0
  155. package/dist/NiceTestBuilder.doc-Cj1fNTvk.cjs +6 -0
  156. package/dist/NiceTranscoder.doc-Dnirl3wg.cjs +7 -0
  157. package/dist/NiceTranscoder.doc-cInCYZh7.js +31 -0
  158. package/dist/NiceVideoAnnotator.doc-C1iEi7OM.cjs +7 -0
  159. package/dist/NiceVideoAnnotator.doc-C8zyfKH_.js +31 -0
  160. package/dist/NiceVideoEditor.doc-C6mhEb-q.cjs +7 -0
  161. package/dist/NiceVideoEditor.doc-lrwmKjqj.js +31 -0
  162. package/dist/NiceWindow-CWN8OCHF.js +2109 -0
  163. package/dist/NiceWindow-Dd8qjkIW.cjs +1 -0
  164. package/dist/NiceWindow.css +1 -1
  165. package/dist/charts-Bo2WAI5T.cjs +768 -0
  166. package/dist/charts-BpELGDXh.cjs +768 -0
  167. package/dist/charts-ByrdMeQP.js +4767 -0
  168. package/dist/charts-M6LuVI7F.js +4776 -0
  169. package/dist/charts.cjs +1 -1
  170. package/dist/charts.css +1 -1
  171. package/dist/charts.d.ts +28 -46
  172. package/dist/charts.mjs +1 -1
  173. package/dist/core-B8eBUE4m.js +438 -0
  174. package/dist/core-lBFqvT0V.cjs +1 -0
  175. package/dist/core-lazy-Bh2yg4Et.js +351 -0
  176. package/dist/core-lazy-CkWKjfc6.cjs +1 -0
  177. package/dist/core-lazy-Ctin_LwS.cjs +1 -0
  178. package/dist/core-lazy-iDiropM6.js +351 -0
  179. package/dist/data-branching-BgIAw01q.cjs +1 -0
  180. package/dist/data-branching-Dak1_ZKR.cjs +1 -0
  181. package/dist/data-branching-DiLAO4Qt.js +6386 -0
  182. package/dist/data-branching-bvB9K6KS.js +6386 -0
  183. package/dist/data-branching.cjs +1 -1
  184. package/dist/data-branching.mjs +1 -1
  185. package/dist/data.cjs +1 -1
  186. package/dist/data.d.ts +22 -18
  187. package/dist/data.mjs +3 -3
  188. package/dist/devops-Bp-_aA-9.js +8682 -0
  189. package/dist/devops-CXBSjnyX.cjs +17 -0
  190. package/dist/devops-DkVluHBp.cjs +17 -0
  191. package/dist/devops-zsMUueTd.js +8648 -0
  192. package/dist/devops.cjs +1 -1
  193. package/dist/devops.d.ts +3 -3
  194. package/dist/devops.mjs +1 -1
  195. package/dist/editors.cjs +1 -1
  196. package/dist/editors.d.ts +100 -38
  197. package/dist/editors.mjs +8 -8
  198. package/dist/feedback.cjs +1 -1
  199. package/dist/feedback.d.ts +71 -2
  200. package/dist/feedback.mjs +10 -9
  201. package/dist/index.cjs +263 -263
  202. package/dist/index.css +1 -1
  203. package/dist/index.d.ts +641 -253
  204. package/dist/index.mjs +26438 -26260
  205. package/dist/injectStyleOnce-BzC_BCs_.js +9 -0
  206. package/dist/injectStyleOnce-DeWaxcdf.cjs +1 -0
  207. package/dist/lazy.cjs +1 -1
  208. package/dist/lazy.d.ts +9 -7
  209. package/dist/lazy.mjs +51 -51
  210. package/dist/navigation.cjs +1 -1
  211. package/dist/navigation.css +1 -0
  212. package/dist/navigation.d.ts +99 -43
  213. package/dist/navigation.mjs +504 -547
  214. package/dist/no-code-BNFk_BDO.js +8275 -0
  215. package/dist/no-code-CFdTp543.cjs +331 -0
  216. package/dist/no-code-DiTEnuRv.js +8288 -0
  217. package/dist/no-code-wG9c0z_T.cjs +331 -0
  218. package/dist/no-code.cjs +1 -1
  219. package/dist/no-code.css +1 -1
  220. package/dist/no-code.mjs +1 -1
  221. package/dist/overlays.cjs +1 -1
  222. package/dist/overlays.d.ts +12 -6
  223. package/dist/overlays.mjs +1 -1
  224. package/dist/pickerCommons-BCRiHDE_.cjs +1 -0
  225. package/dist/pickerCommons-CMxFt9SW.js +548 -0
  226. package/dist/pickerCommons-Dc_hlz-e.cjs +1 -0
  227. package/dist/pickerCommons-DkumQ3KE.js +548 -0
  228. package/dist/style.css +12 -9
  229. package/package.json +3 -3
@@ -0,0 +1,328 @@
1
+ import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
+ import { useNiceAccessMode as le, useNiceTranslation as he } from "@nice2dev/ui-core";
3
+ import { useState as F, useRef as R, useEffect as J, useMemo as O, useCallback as z } from "react";
4
+ const me = [], b = (m, D) => {
5
+ const y = new Date(m);
6
+ return y.setDate(y.getDate() + D), y;
7
+ }, E = (m, D) => Math.ceil((D.getTime() - m.getTime()) / 864e5), ue = ({
8
+ tasks: m = me,
9
+ columns: D,
10
+ scale: y = "day",
11
+ rowHeight: _ = 36,
12
+ dayWidth: P = 30,
13
+ onTaskClick: q,
14
+ onTaskUpdate: w,
15
+ showDependencies: G = !0,
16
+ dependencyStyle: K = "square",
17
+ draggable: M,
18
+ zoomControls: V,
19
+ className: Z,
20
+ style: k,
21
+ accessMode: H,
22
+ id: U
23
+ }) => {
24
+ const ee = le(H, U) === "hidden", { t: fe } = he(), [o, A] = F(P), [f, C] = F(null), x = D || [{ field: "title", title: "Task", width: 200 }], B = x.reduce((e, t) => e + (t.width || 120), 0), T = R(null), j = R(null), S = R(!1);
25
+ J(() => {
26
+ const e = T.current, t = j.current;
27
+ if (!e || !t)
28
+ return;
29
+ const a = (c, i) => () => {
30
+ S.current || (S.current = !0, i.scrollTop = c.scrollTop, requestAnimationFrame(() => {
31
+ S.current = !1;
32
+ }));
33
+ }, n = a(e, t), r = a(t, e);
34
+ return e.addEventListener("scroll", n, { passive: !0 }), t.addEventListener("scroll", r, { passive: !0 }), () => {
35
+ e.removeEventListener("scroll", n), t.removeEventListener("scroll", r);
36
+ };
37
+ }, []);
38
+ const d = O(() => {
39
+ const e = (t) => m.filter((n) => (n.parentId ?? null) === t).flatMap((n) => [n, ...e(n.id)]);
40
+ return e(null);
41
+ }, [m]), u = O(() => {
42
+ if (d.length === 0)
43
+ return { start: /* @__PURE__ */ new Date(), end: /* @__PURE__ */ new Date(), days: 30 };
44
+ let e = new Date(d[0].start), t = new Date(d[0].end);
45
+ return d.forEach((a) => {
46
+ new Date(a.start) < e && (e = new Date(a.start)), new Date(a.end) > t && (t = new Date(a.end));
47
+ }), e = b(e, -2), t = b(t, 2), { start: e, end: t, days: E(e, t) };
48
+ }, [d]), X = u.days * o;
49
+ J(() => {
50
+ if (!f || !w)
51
+ return;
52
+ const e = (a) => {
53
+ const n = a.clientX - f.startX, r = Math.round(n / o);
54
+ if (r === 0)
55
+ return;
56
+ const c = m.find((i) => i.id === f.taskId);
57
+ if (c)
58
+ if (f.mode === "move")
59
+ w({
60
+ ...c,
61
+ start: b(f.origStart, r),
62
+ end: b(f.origEnd, r)
63
+ });
64
+ else {
65
+ const i = b(f.origEnd, r);
66
+ i > f.origStart && w({ ...c, end: i });
67
+ }
68
+ }, t = () => C(null);
69
+ return document.addEventListener("mousemove", e), document.addEventListener("mouseup", t), () => {
70
+ document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", t);
71
+ };
72
+ }, [f, o, m, w]);
73
+ const I = z(
74
+ (e, t, a) => {
75
+ if (!M || !w)
76
+ return;
77
+ a.stopPropagation();
78
+ const n = m.find((r) => r.id === e);
79
+ n && C({
80
+ taskId: e,
81
+ mode: t,
82
+ startX: a.clientX,
83
+ origStart: new Date(n.start),
84
+ origEnd: new Date(n.end)
85
+ });
86
+ },
87
+ [M, m, w]
88
+ ), te = z(() => A((e) => Math.min(100, e + 5)), []), ne = z(() => A((e) => Math.max(8, e - 5)), []), ae = () => {
89
+ const e = [], t = [];
90
+ new Date(u.start);
91
+ const a = [
92
+ "Jan",
93
+ "Feb",
94
+ "Mar",
95
+ "Apr",
96
+ "May",
97
+ "Jun",
98
+ "Jul",
99
+ "Aug",
100
+ "Sep",
101
+ "Oct",
102
+ "Nov",
103
+ "Dec"
104
+ ];
105
+ if (y === "day") {
106
+ let n = -1, r = 0;
107
+ for (let c = 0; c < u.days; c++) {
108
+ const i = b(u.start, c);
109
+ i.getMonth() !== n && (n >= 0 && e.push(
110
+ /* @__PURE__ */ l(
111
+ "div",
112
+ {
113
+ className: "nice-gantt__header-cell",
114
+ style: { width: (c - r) * o },
115
+ children: [
116
+ a[n],
117
+ " ",
118
+ i.getFullYear()
119
+ ]
120
+ },
121
+ `m${n}-${r}`
122
+ )
123
+ ), n = i.getMonth(), r = c);
124
+ const h = i.getDay() === 0 || i.getDay() === 6;
125
+ t.push(
126
+ /* @__PURE__ */ s(
127
+ "div",
128
+ {
129
+ className: `nice-gantt__header-cell nice-gantt__header-cell--sub ${h ? "nice-gantt__header-cell--weekend" : ""}`,
130
+ style: { width: o },
131
+ children: i.getDate()
132
+ },
133
+ c
134
+ )
135
+ );
136
+ }
137
+ n >= 0 && e.push(
138
+ /* @__PURE__ */ s(
139
+ "div",
140
+ {
141
+ className: "nice-gantt__header-cell",
142
+ style: { width: (u.days - r) * o },
143
+ children: a[n]
144
+ },
145
+ `m${n}-last`
146
+ )
147
+ );
148
+ }
149
+ return /* @__PURE__ */ l("div", { className: "nice-gantt__chart-header", children: [
150
+ /* @__PURE__ */ s("div", { className: "nice-gantt__header-row", children: e }),
151
+ /* @__PURE__ */ s("div", { className: "nice-gantt__header-row", children: t })
152
+ ] });
153
+ }, re = (e, t) => {
154
+ const a = E(u.start, new Date(e.start)) * o, n = Math.max(E(new Date(e.start), new Date(e.end)) * o, o), r = t * _ + 4, c = _ - 8, i = e.progress ?? 0;
155
+ return /* @__PURE__ */ l(
156
+ "div",
157
+ {
158
+ className: `nice-gantt__bar ${M ? "nice-gantt__bar--draggable" : ""}`,
159
+ title: `${e.title} (${Math.round(i)}%)`,
160
+ style: {
161
+ left: a,
162
+ top: r,
163
+ width: n,
164
+ height: c,
165
+ backgroundColor: e.color || "var(--nice-color-primary, #3b82f6)"
166
+ },
167
+ onClick: () => q?.(e),
168
+ onMouseDown: M ? (h) => I(e.id, "move", h) : void 0,
169
+ children: [
170
+ i > 0 && /* @__PURE__ */ s("div", { className: "nice-gantt__bar-progress", style: { width: `${i}%` } }),
171
+ /* @__PURE__ */ s("span", { className: "nice-gantt__bar-label", children: e.title }),
172
+ M && /* @__PURE__ */ s(
173
+ "div",
174
+ {
175
+ className: "nice-gantt__bar-resize",
176
+ onMouseDown: (h) => I(e.id, "resize", h)
177
+ }
178
+ )
179
+ ]
180
+ },
181
+ e.id
182
+ );
183
+ }, se = (e, t, a, n, r) => {
184
+ const h = e + 10, L = a - 14, W = (t + n) / 2, N = n >= t ? 1 : -1, Q = Math.abs(n - t) < 1, Y = L <= h + 4, p = Q ? t : W, g = Y ? Math.max(h, e + 10) : h, v = Y ? Math.min(L, a - 10) : L;
185
+ if (Q || !r)
186
+ return [
187
+ `M ${e} ${t}`,
188
+ `L ${g} ${t}`,
189
+ `L ${g} ${p}`,
190
+ `L ${v} ${p}`,
191
+ `L ${v} ${n}`,
192
+ `L ${a} ${n}`
193
+ ].join(" ");
194
+ const ce = Math.max(0, v - g), oe = Math.abs(n - t), de = Math.min(oe / 2 || 10, ce / 2 || 10), $ = Math.max(2, Math.min(10, de));
195
+ return [
196
+ `M ${e} ${t}`,
197
+ `L ${g - $} ${t}`,
198
+ `Q ${g} ${t} ${g} ${t + N * $}`,
199
+ `L ${g} ${p - N * $}`,
200
+ `Q ${g} ${p} ${g + $} ${p}`,
201
+ `L ${v - $} ${p}`,
202
+ `Q ${v} ${p} ${v} ${p + N * $}`,
203
+ `L ${v} ${n - N * $}`,
204
+ `Q ${v} ${n} ${v + $} ${n}`,
205
+ `L ${a} ${n}`
206
+ ].join(" ");
207
+ }, ie = () => {
208
+ if (!G)
209
+ return null;
210
+ const e = [], t = new Map(d.map((a, n) => [a.id, n]));
211
+ return d.forEach((a) => {
212
+ (a.dependencies || []).forEach((n) => {
213
+ const r = t.get(n), c = t.get(a.id);
214
+ if (r == null || c == null)
215
+ return;
216
+ const i = d[r], h = E(u.start, new Date(i.end)) * o, L = r * _ + _ / 2, W = E(u.start, new Date(a.start)) * o, N = c * _ + _ / 2;
217
+ e.push(
218
+ /* @__PURE__ */ s(
219
+ "path",
220
+ {
221
+ d: se(h, L, W, N, K === "rounded"),
222
+ fill: "none",
223
+ stroke: "var(--nice-text-secondary, #6b7280)",
224
+ strokeWidth: 1.5,
225
+ strokeLinejoin: "round",
226
+ strokeLinecap: "round",
227
+ markerEnd: "url(#arrowhead)"
228
+ },
229
+ `${n}-${a.id}`
230
+ )
231
+ );
232
+ });
233
+ }), /* @__PURE__ */ l(
234
+ "svg",
235
+ {
236
+ className: "nice-gantt__deps",
237
+ width: X,
238
+ height: d.length * _,
239
+ style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" },
240
+ children: [
241
+ /* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("marker", { id: "arrowhead", markerWidth: "6", markerHeight: "4", refX: "5", refY: "2", orient: "auto", children: /* @__PURE__ */ s("polygon", { points: "0 0, 6 2, 0 4", fill: "var(--nice-text-secondary, #6b7280)" }) }) }),
242
+ e
243
+ ]
244
+ }
245
+ );
246
+ };
247
+ return ee ? null : /* @__PURE__ */ l("div", { className: `nice-gantt ${Z || ""}`, style: k, children: [
248
+ V && /* @__PURE__ */ l("div", { className: "nice-gantt__zoom-controls", children: [
249
+ /* @__PURE__ */ s("button", { type: "button", className: "nice-btn nice-btn--sm", onClick: ne, children: "−" }),
250
+ /* @__PURE__ */ l("span", { className: "nice-gantt__zoom-label", children: [
251
+ o,
252
+ "px"
253
+ ] }),
254
+ /* @__PURE__ */ s("button", { type: "button", className: "nice-btn nice-btn--sm", onClick: te, children: "+" })
255
+ ] }),
256
+ /* @__PURE__ */ l("div", { className: "nice-gantt__container", children: [
257
+ /* @__PURE__ */ l("div", { className: "nice-gantt__table", style: { width: B, minWidth: B }, children: [
258
+ /* @__PURE__ */ l("div", { className: "nice-gantt__table-header", children: [
259
+ /* @__PURE__ */ s(
260
+ "div",
261
+ {
262
+ className: "nice-gantt__table-header-row nice-gantt__table-header-row--main",
263
+ "aria-hidden": "true",
264
+ children: " "
265
+ }
266
+ ),
267
+ /* @__PURE__ */ s("div", { className: "nice-gantt__table-header-row nice-gantt__table-header-row--sub", children: x.map((e, t) => /* @__PURE__ */ s(
268
+ "div",
269
+ {
270
+ className: "nice-gantt__table-header-cell",
271
+ style: { width: e.width || 120 },
272
+ children: e.title
273
+ },
274
+ t
275
+ )) })
276
+ ] }),
277
+ /* @__PURE__ */ s("div", { className: "nice-gantt__table-body", ref: T, children: d.map((e, t) => /* @__PURE__ */ s("div", { className: "nice-gantt__table-row", style: { height: _ }, children: x.map((a, n) => /* @__PURE__ */ s(
278
+ "div",
279
+ {
280
+ className: "nice-gantt__table-cell",
281
+ style: { width: a.width || 120 },
282
+ children: e[a.field]
283
+ },
284
+ n
285
+ )) }, e.id)) })
286
+ ] }),
287
+ /* @__PURE__ */ s("div", { className: "nice-gantt__chart", children: /* @__PURE__ */ l("div", { className: "nice-gantt__chart-body-wrap", ref: j, children: [
288
+ ae(),
289
+ /* @__PURE__ */ l(
290
+ "div",
291
+ {
292
+ className: "nice-gantt__chart-body",
293
+ style: {
294
+ width: X,
295
+ height: d.length * _,
296
+ position: "relative"
297
+ },
298
+ children: [
299
+ Array.from({ length: u.days }, (e, t) => {
300
+ const a = b(u.start, t), n = a.getDay() === 0 || a.getDay() === 6;
301
+ return /* @__PURE__ */ s(
302
+ "div",
303
+ {
304
+ className: `nice-gantt__gridline ${n ? "nice-gantt__gridline--weekend" : ""}`,
305
+ style: {
306
+ left: t * o,
307
+ width: o,
308
+ height: "100%",
309
+ position: "absolute",
310
+ top: 0
311
+ }
312
+ },
313
+ t
314
+ );
315
+ }),
316
+ d.map((e, t) => re(e, t)),
317
+ ie()
318
+ ]
319
+ }
320
+ )
321
+ ] }) })
322
+ ] })
323
+ ] });
324
+ };
325
+ process.env.NODE_ENV !== "production" && (ue.displayName = "NiceGantt");
326
+ export {
327
+ ue as NiceGantt
328
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceGantt",a="Gantt Chart",s="1.0.0",n="stable",o="planning",i="scheduling",r="Project Gantt chart with draggable bars, dependencies, and zoom controls.",c="1.0.0",d=["web","desktop"],l=["gantt","project","timeline","scheduling","tasks"],p=[{name:"tasks",type:"NiceGanttTask[]",required:!1,default:"[]",description:"Tasks (id, title, start, end, progress, color, parentId, dependencies)."},{name:"columns",type:"NiceGanttColumn[]",required:!1,description:"Left panel columns configuration."},{name:"scale",type:"'day' | 'week' | 'month'",required:!1,default:"'day'",description:"Time scale."},{name:"rowHeight",type:"number",required:!1,description:"Row height in px."},{name:"dayWidth",type:"number",required:!1,description:"Day column width in px."},{name:"showDependencies",type:"boolean",required:!1,default:"true",description:"Show dependency arrows."},{name:"draggable",type:"boolean",required:!1,description:"Enable drag to move/resize tasks."},{name:"zoomControls",type:"boolean",required:!1,description:"Show zoom controls."}],m=[{name:"onTaskClick",parameters:[{name:"task",type:"NiceGanttTask"}],description:"Called when task clicked."},{name:"onTaskUpdate",parameters:[{name:"task",type:"NiceGanttTask"}],description:"Called after task drag/resize."}],u=[],h=[{title:"Project Gantt",code:`<NiceGantt
2
+ tasks={projectTasks}
3
+ columns={[
4
+ { field: 'title', header: 'Task', width: 200 },
5
+ { field: 'assignee', header: 'Assignee', width: 100 }
6
+ ]}
7
+ scale="week"
8
+ draggable
9
+ showDependencies
10
+ onTaskUpdate={handleTaskUpdate}
11
+ />`,language:"tsx"}],g=[{name:"NiceScheduler",relationship:"calendar"},{name:"NiceTimeline",relationship:"simple"}],k={$schema:e,name:t,displayName:a,version:s,status:n,category:o,subcategory:i,package:"@nicetoDev/ui",description:r,since:c,platforms:d,keywords:l,props:p,events:m,cssVariables:u,examples:h,related:g};exports.$schema=e;exports.category=o;exports.cssVariables=u;exports.default=k;exports.description=r;exports.displayName=a;exports.events=m;exports.examples=h;exports.keywords=l;exports.name=t;exports.platforms=d;exports.props=p;exports.related=g;exports.since=c;exports.status=n;exports.subcategory=i;exports.version=s;
@@ -0,0 +1,48 @@
1
+ const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceGantt", n = "Gantt Chart", a = "1.0.0", s = "stable", o = "planning", i = "scheduling", c = "Project Gantt chart with draggable bars, dependencies, and zoom controls.", r = "1.0.0", d = ["web", "desktop"], l = ["gantt", "project", "timeline", "scheduling", "tasks"], p = [{ name: "tasks", type: "NiceGanttTask[]", required: !1, default: "[]", description: "Tasks (id, title, start, end, progress, color, parentId, dependencies)." }, { name: "columns", type: "NiceGanttColumn[]", required: !1, description: "Left panel columns configuration." }, { name: "scale", type: "'day' | 'week' | 'month'", required: !1, default: "'day'", description: "Time scale." }, { name: "rowHeight", type: "number", required: !1, description: "Row height in px." }, { name: "dayWidth", type: "number", required: !1, description: "Day column width in px." }, { name: "showDependencies", type: "boolean", required: !1, default: "true", description: "Show dependency arrows." }, { name: "draggable", type: "boolean", required: !1, description: "Enable drag to move/resize tasks." }, { name: "zoomControls", type: "boolean", required: !1, description: "Show zoom controls." }], m = [{ name: "onTaskClick", parameters: [{ name: "task", type: "NiceGanttTask" }], description: "Called when task clicked." }, { name: "onTaskUpdate", parameters: [{ name: "task", type: "NiceGanttTask" }], description: "Called after task drag/resize." }], u = [], h = [{ title: "Project Gantt", code: `<NiceGantt
2
+ tasks={projectTasks}
3
+ columns={[
4
+ { field: 'title', header: 'Task', width: 200 },
5
+ { field: 'assignee', header: 'Assignee', width: 100 }
6
+ ]}
7
+ scale="week"
8
+ draggable
9
+ showDependencies
10
+ onTaskUpdate={handleTaskUpdate}
11
+ />`, language: "tsx" }], k = [{ name: "NiceScheduler", relationship: "calendar" }, { name: "NiceTimeline", relationship: "simple" }], g = {
12
+ $schema: e,
13
+ name: t,
14
+ displayName: n,
15
+ version: a,
16
+ status: s,
17
+ category: o,
18
+ subcategory: i,
19
+ package: "@nicetoDev/ui",
20
+ description: c,
21
+ since: r,
22
+ platforms: d,
23
+ keywords: l,
24
+ props: p,
25
+ events: m,
26
+ cssVariables: u,
27
+ examples: h,
28
+ related: k
29
+ };
30
+ export {
31
+ e as $schema,
32
+ o as category,
33
+ u as cssVariables,
34
+ g as default,
35
+ c as description,
36
+ n as displayName,
37
+ m as events,
38
+ h as examples,
39
+ l as keywords,
40
+ t as name,
41
+ d as platforms,
42
+ p as props,
43
+ k as related,
44
+ r as since,
45
+ s as status,
46
+ i as subcategory,
47
+ a as version
48
+ };
@@ -0,0 +1,30 @@
1
+ const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceGitBlame", i = "Git blame view showing commit info per line with author, date, and commit message.", n = "devops", o = "1.0.7", c = "stable", a = [{ name: "content", type: "string", required: !0, description: "File content" }, { name: "language", type: "string", description: "Language for syntax highlighting" }, { name: "onCommitClick", type: "(hash: string) => void", description: "Callback when clicking a commit" }, { name: "showAge", type: "boolean", default: !0, description: "Show relative age colors" }], s = [{ title: "Git Blame", description: "View line-by-line commit history", code: `<NiceGitBlame
2
+ content={fileContent}
3
+ blameData={blameInfo}
4
+ language="typescript"
5
+ onCommitClick={handleCommitClick}
6
+ />` }], l = { role: "region", ariaLabel: "Git blame view" }, m = ["NiceGitGraph", "NiceGitDiffViewer"], r = {
7
+ $schema: e,
8
+ name: t,
9
+ description: i,
10
+ category: n,
11
+ since: o,
12
+ status: c,
13
+ props: a,
14
+ examples: s,
15
+ accessibility: l,
16
+ seeAlso: m
17
+ };
18
+ export {
19
+ e as $schema,
20
+ l as accessibility,
21
+ n as category,
22
+ r as default,
23
+ i as description,
24
+ s as examples,
25
+ t as name,
26
+ a as props,
27
+ m as seeAlso,
28
+ o as since,
29
+ c as status
30
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceGitBlame",i="Git blame view showing commit info per line with author, date, and commit message.",n="devops",o="1.0.7",s="stable",c=[{name:"content",type:"string",required:!0,description:"File content"},{name:"language",type:"string",description:"Language for syntax highlighting"},{name:"onCommitClick",type:"(hash: string) => void",description:"Callback when clicking a commit"},{name:"showAge",type:"boolean",default:!0,description:"Show relative age colors"}],a=[{title:"Git Blame",description:"View line-by-line commit history",code:`<NiceGitBlame
2
+ content={fileContent}
3
+ blameData={blameInfo}
4
+ language="typescript"
5
+ onCommitClick={handleCommitClick}
6
+ />`}],l={role:"region",ariaLabel:"Git blame view"},m=["NiceGitGraph","NiceGitDiffViewer"],r={$schema:e,name:t,description:i,category:n,since:o,status:s,props:c,examples:a,accessibility:l,seeAlso:m};exports.$schema=e;exports.accessibility=l;exports.category=n;exports.default=r;exports.description=i;exports.examples=a;exports.name=t;exports.props=c;exports.seeAlso=m;exports.since=o;exports.status=s;
@@ -0,0 +1,30 @@
1
+ const e = "https://nice2dev.com/schemas/component-doc-v1.json", i = "NiceGitDiffViewer", n = "Side-by-side or unified diff viewer with syntax highlighting and line navigation.", t = "devops", o = "1.0.7", s = "stable", a = [{ name: "filename", type: "string", description: "File name for syntax detection" }, { name: "mode", type: "'split' | 'unified'", default: "split", description: "Diff display mode" }, { name: "language", type: "string", description: "Language for syntax highlighting" }, { name: "showLineNumbers", type: "boolean", default: !0, description: "Show line numbers" }], c = [{ title: "Diff Viewer", description: "Compare two file versions", code: `<NiceGitDiffViewer
2
+ oldContent={oldCode}
3
+ newContent={newCode}
4
+ filename="index.ts"
5
+ mode="split"
6
+ />` }], d = { role: "region", ariaLabel: "File diff viewer" }, l = ["NiceGitGraph", "NiceGitBlame", "NiceGitConflictResolver"], r = {
7
+ $schema: e,
8
+ name: i,
9
+ description: n,
10
+ category: t,
11
+ since: o,
12
+ status: s,
13
+ props: a,
14
+ examples: c,
15
+ accessibility: d,
16
+ seeAlso: l
17
+ };
18
+ export {
19
+ e as $schema,
20
+ d as accessibility,
21
+ t as category,
22
+ r as default,
23
+ n as description,
24
+ c as examples,
25
+ i as name,
26
+ a as props,
27
+ l as seeAlso,
28
+ o as since,
29
+ s as status
30
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",i="NiceGitDiffViewer",t="Side-by-side or unified diff viewer with syntax highlighting and line navigation.",n="devops",s="1.0.7",o="stable",c=[{name:"filename",type:"string",description:"File name for syntax detection"},{name:"mode",type:"'split' | 'unified'",default:"split",description:"Diff display mode"},{name:"language",type:"string",description:"Language for syntax highlighting"},{name:"showLineNumbers",type:"boolean",default:!0,description:"Show line numbers"}],a=[{title:"Diff Viewer",description:"Compare two file versions",code:`<NiceGitDiffViewer
2
+ oldContent={oldCode}
3
+ newContent={newCode}
4
+ filename="index.ts"
5
+ mode="split"
6
+ />`}],l={role:"region",ariaLabel:"File diff viewer"},r=["NiceGitGraph","NiceGitBlame","NiceGitConflictResolver"],d={$schema:e,name:i,description:t,category:n,since:s,status:o,props:c,examples:a,accessibility:l,seeAlso:r};exports.$schema=e;exports.accessibility=l;exports.category=n;exports.default=d;exports.description=t;exports.examples=a;exports.name=i;exports.props=c;exports.seeAlso=r;exports.since=s;exports.status=o;
@@ -0,0 +1,29 @@
1
+ const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceGitGraph", i = "Interactive Git commit graph visualization with branch lines, commit nodes, and merge indicators.", c = "devops", o = "1.0.7", n = "stable", a = [{ name: "commits", type: "GitCommit[]", required: !0, description: "Array of commits to visualize" }, { name: "branches", type: "GitBranch[]", description: "Branch information for coloring" }, { name: "selectedCommit", type: "string", description: "Currently selected commit hash" }, { name: "onCommitSelect", type: "(hash: string) => void", description: "Callback when a commit is clicked" }, { name: "onBranchSelect", type: "(branch: string) => void", description: "Callback when a branch is clicked" }, { name: "layout", type: "'horizontal' | 'vertical'", default: "vertical", description: "Graph layout direction" }], s = [{ title: "Git Graph", description: "Visualize commit history with branches", code: `<NiceGitGraph
2
+ commits={commits}
3
+ branches={branches}
4
+ onCommitSelect={(hash) => console.log('Selected:', hash)}
5
+ />` }], r = { role: "tree", ariaLabel: "Git commit history graph" }, m = ["NiceBranchManager", "NiceGitDiffViewer", "NiceGitBlame"], h = {
6
+ $schema: e,
7
+ name: t,
8
+ description: i,
9
+ category: c,
10
+ since: o,
11
+ status: n,
12
+ props: a,
13
+ examples: s,
14
+ accessibility: r,
15
+ seeAlso: m
16
+ };
17
+ export {
18
+ e as $schema,
19
+ r as accessibility,
20
+ c as category,
21
+ h as default,
22
+ i as description,
23
+ s as examples,
24
+ t as name,
25
+ a as props,
26
+ m as seeAlso,
27
+ o as since,
28
+ n as status
29
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceGitGraph",i="Interactive Git commit graph visualization with branch lines, commit nodes, and merge indicators.",c="devops",o="1.0.7",s="stable",n=[{name:"commits",type:"GitCommit[]",required:!0,description:"Array of commits to visualize"},{name:"branches",type:"GitBranch[]",description:"Branch information for coloring"},{name:"selectedCommit",type:"string",description:"Currently selected commit hash"},{name:"onCommitSelect",type:"(hash: string) => void",description:"Callback when a commit is clicked"},{name:"onBranchSelect",type:"(branch: string) => void",description:"Callback when a branch is clicked"},{name:"layout",type:"'horizontal' | 'vertical'",default:"vertical",description:"Graph layout direction"}],a=[{title:"Git Graph",description:"Visualize commit history with branches",code:`<NiceGitGraph
2
+ commits={commits}
3
+ branches={branches}
4
+ onCommitSelect={(hash) => console.log('Selected:', hash)}
5
+ />`}],r={role:"tree",ariaLabel:"Git commit history graph"},m=["NiceBranchManager","NiceGitDiffViewer","NiceGitBlame"],l={$schema:e,name:t,description:i,category:c,since:o,status:s,props:n,examples:a,accessibility:r,seeAlso:m};exports.$schema=e;exports.accessibility=r;exports.category=c;exports.default=l;exports.description=i;exports.examples=a;exports.name=t;exports.props=n;exports.seeAlso=m;exports.since=o;exports.status=s;
@@ -0,0 +1,5 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o="https://nice2dev.com/schemas/component-doc-v1.json",e="NiceGitHooks",s="Git hooks configuration panel for pre-commit, pre-push, and other hook types.",t="devops",i="1.0.7",n="stable",c=[{name:"hooks",type:"GitHook[]",required:!0,description:"Configured hooks"},{name:"onChange",type:"(hooks: GitHook[]) => void",description:"Callback when hooks change"},{name:"templates",type:"HookTemplate[]",description:"Hook script templates"}],a=[{title:"Git Hooks",description:"Configure repository hooks",code:`<NiceGitHooks
2
+ hooks={repoHooks}
3
+ onChange={handleHooksChange}
4
+ availableHooks={['pre-commit', 'pre-push', 'commit-msg']}
5
+ />`}],r={role:"region",ariaLabel:"Git hooks configuration"},p=["NiceGitManager","NicePipelineEditor"],l={$schema:o,name:e,description:s,category:t,since:i,status:n,props:c,examples:a,accessibility:r,seeAlso:p};exports.$schema=o;exports.accessibility=r;exports.category=t;exports.default=l;exports.description=s;exports.examples=a;exports.name=e;exports.props=c;exports.seeAlso=p;exports.since=i;exports.status=n;
@@ -0,0 +1,29 @@
1
+ const o = "https://nice2dev.com/schemas/component-doc-v1.json", e = "NiceGitHooks", s = "Git hooks configuration panel for pre-commit, pre-push, and other hook types.", t = "devops", i = "1.0.7", n = "stable", c = [{ name: "hooks", type: "GitHook[]", required: !0, description: "Configured hooks" }, { name: "onChange", type: "(hooks: GitHook[]) => void", description: "Callback when hooks change" }, { name: "templates", type: "HookTemplate[]", description: "Hook script templates" }], a = [{ title: "Git Hooks", description: "Configure repository hooks", code: `<NiceGitHooks
2
+ hooks={repoHooks}
3
+ onChange={handleHooksChange}
4
+ availableHooks={['pre-commit', 'pre-push', 'commit-msg']}
5
+ />` }], p = { role: "region", ariaLabel: "Git hooks configuration" }, r = ["NiceGitManager", "NicePipelineEditor"], h = {
6
+ $schema: o,
7
+ name: e,
8
+ description: s,
9
+ category: t,
10
+ since: i,
11
+ status: n,
12
+ props: c,
13
+ examples: a,
14
+ accessibility: p,
15
+ seeAlso: r
16
+ };
17
+ export {
18
+ o as $schema,
19
+ p as accessibility,
20
+ t as category,
21
+ h as default,
22
+ s as description,
23
+ a as examples,
24
+ e as name,
25
+ c as props,
26
+ r as seeAlso,
27
+ i as since,
28
+ n as status
29
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),m=require("@nice2dev/ui-core"),i=require("react"),v=require("./NiceButton-3AcJJ15c.cjs"),it=require("./devops-DkVluHBp.cjs"),st=require("./NiceSelect-DIKGbaJo.cjs"),ke=require("./NiceColorPicker-CQhhjZ8w.cjs");function ye(u){const t=u.trim().toLowerCase();return t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")?!0:!(t.startsWith("javascript:")||t.startsWith("vbscript:")||t.startsWith("data:text"))}function ve(u){const t=typeof window<"u"?window.getSelection():null;if(!t||t.rangeCount===0)return null;const R=t.getRangeAt(0);return u.contains(R.commonAncestorContainer)?R.cloneRange():null}function je(u){const t=typeof window<"u"?window.getSelection():null;!t||!u||(t.removeAllRanges(),t.addRange(u))}const at=[{target:".nice-htmleditor",titleKey:"tutorial.htmlEditor.intro.title",title:"Rich text editor",contentKey:"tutorial.htmlEditor.intro.content",content:"Format text with the toolbar, insert links, images and tables, and switch to HTML or Markdown source when you need it.",placement:"auto"}],lt=["bold","italic","underline","strikethrough","h1","h2","h3","ul","ol","blockquote","hr","link","unlink","image","table","code","alignLeft","alignCenter","alignRight","fontSize","fontColor","undo","redo","clear","findReplace","emoji","source","fullscreen","markdown"],l=u=>r.jsx(m.NiceIcon,{name:u,size:16}),ct={bold:r.jsx("strong",{style:{fontFamily:"serif"},children:"B"}),italic:r.jsx("em",{style:{fontFamily:"serif"},children:"I"}),underline:r.jsx("span",{style:{textDecoration:"underline"},children:"U"}),strikethrough:r.jsx("span",{style:{textDecoration:"line-through"},children:"S"}),h1:"H1",h2:"H2",h3:"H3",ul:l("list"),ol:l("list-ordered"),link:l("link"),unlink:l("unlink"),undo:l("reply"),redo:l("forward"),clear:l("trash"),table:l("table"),image:l("image"),code:l("code"),markdown:"MD",blockquote:l("quote"),hr:l("minus"),subscript:"X₂",superscript:"X²",indent:l("indent"),outdent:l("outdent"),alignLeft:l("align-left"),alignCenter:l("align-center"),alignRight:l("align-right"),alignJustify:l("align-justify"),fullscreen:l("expand"),removeFormat:l("eraser"),print:l("printer"),source:l("terminal"),emoji:l("smile"),findReplace:l("search"),fontSize:l("type"),fontColor:l("palette")},dt=[{value:"1",label:"8pt"},{value:"2",label:"10pt"},{value:"3",label:"12pt"},{value:"4",label:"14pt"},{value:"5",label:"18pt"},{value:"6",label:"24pt"},{value:"7",label:"36pt"}],ut=[{label:"Faces",emojis:["😀","😂","😊","😍","🤔","😢","😎","🥳","😤","🤯","🥰","😴"]},{label:"Hands",emojis:["👍","👎","👏","🤝","✌️","🤞","💪","🙌","👋","🤙"]},{label:"Symbols",emojis:["❤️","⭐","🔥","✅","❌","⚡","💡","📌","🎯","🏆","🎉","💬"]},{label:"Arrows",emojis:["➡️","⬅️","⬆️","⬇️","↩️","🔄","▶️","⏸️","⏹️","⏩"]}];function mt(u){let t=u;return t=t.replace(/<h1[^>]*>(.*?)<\/h1>/gi,`# $1
2
+ `),t=t.replace(/<h2[^>]*>(.*?)<\/h2>/gi,`## $1
3
+ `),t=t.replace(/<h3[^>]*>(.*?)<\/h3>/gi,`### $1
4
+ `),t=t.replace(/<strong[^>]*>(.*?)<\/strong>/gi,"**$1**"),t=t.replace(/<b[^>]*>(.*?)<\/b>/gi,"**$1**"),t=t.replace(/<em[^>]*>(.*?)<\/em>/gi,"*$1*"),t=t.replace(/<i[^>]*>(.*?)<\/i>/gi,"*$1*"),t=t.replace(/<code[^>]*>(.*?)<\/code>/gi,"`$1`"),t=t.replace(/<pre[^>]*>(.*?)<\/pre>/gis,"```\n$1\n```\n"),t=t.replace(/<br\s*\/?>/gi,`
5
+ `),t=t.replace(/<li[^>]*>(.*?)<\/li>/gi,`- $1
6
+ `),t=t.replace(/<\/?(?:ul|ol|p|div)[^>]*>/gi,`
7
+ `),t=t.replace(/<[^>]+>/g,""),t=t.replace(/\n{3,}/g,`
8
+
9
+ `),t.trim()}function ft(u){let t=u;return t=t.replace(/^### (.+)$/gm,"<h3>$1</h3>"),t=t.replace(/^## (.+)$/gm,"<h2>$1</h2>"),t=t.replace(/^# (.+)$/gm,"<h1>$1</h1>"),t=t.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),t=t.replace(/\*(.+?)\*/g,"<em>$1</em>"),t=t.replace(/`([^`]+)`/g,"<code>$1</code>"),t=t.replace(/```\n?([\s\S]*?)\n?```/g,"<pre>$1</pre>"),t=t.replace(/^- (.+)$/gm,"<li>$1</li>"),t=t.replace(/(<li>.*<\/li>)/gs,"<ul>$1</ul>"),t=t.replace(/\n/g,"<br>"),t}const pt=({value:u,defaultValue:t,onChange:R,placeholder:Se,height:I=200,toolbar:we=lt,readOnly:g,onImageUpload:H,mentionTrigger:C,mentionSuggestions:te,onMentionSearch:ne,onFileDrop:N,pasteCleanup:re=!0,maxLength:M=0,showWordCount:oe=!1,templates:O,label:ie,error:E,helperText:se,required:Te,disabled:b,size:He="md",id:ae,className:Ne,style:Me,accessMode:Le,tutorial:_e})=>{const{t:d}=m.useNiceTranslation(),{prompt:B,element:Re}=it.useNiceDialogs(),F=m.useNiceAccessMode(Le,ae),Ee=F==="hidden";F==="disabled"&&(b=!0),F==="readOnly"&&(g=!0);const le=m.useControlId(ae),[p,c]=m.useControllableState({value:u,defaultValue:t,fallbackValue:"",onChange:R,componentName:"NiceHtmlEditor"}),f=i.useRef(null),[ze]=i.useState(()=>({__html:p})),W=i.useRef(p);W.current=p;const $e=i.useCallback(e=>{f.current=e,e&&e.innerHTML!==W.current&&(e.innerHTML=W.current)},[]);i.useLayoutEffect(()=>{const e=f.current;e&&e.innerHTML!==p&&(e.innerHTML=p)},[p]);const ce=i.useRef(null),De=i.useRef(null),[j,K]=i.useState(!1),[A,de]=i.useState(""),[S,q]=i.useState(!1),[P,ue]=i.useState(""),[U,z]=i.useState(!1),[me,Ie]=i.useState(""),[Q,X]=i.useState(0),[J,Oe]=i.useState(!1),[fe,Be]=i.useState("#000000"),[pe,Fe]=i.useState("#ffff00"),[he,$]=i.useState(0),[We,Ke]=i.useState(0),[V,G]=i.useState(!1),[h,Ae]=i.useState(""),[L,qe]=i.useState(""),[Y,xe]=i.useState(!1),[ge,be]=i.useState(!1),x=i.useCallback((e,n)=>{if(g||b)return;if(e==="markdown"){j?(c(ft(A)),K(!1)):(de(mt(p)),K(!0),q(!1));return}if(e==="source"){S?(c(P),q(!1)):(ue(p),q(!0),K(!1));return}const s=f.current;if(s){if(e==="fullscreen"){Oe(o=>!o);return}if(e==="emoji"){xe(o=>!o);return}if(e==="findReplace"){G(o=>!o);return}if(e==="image"){if(H)ce.current?.click();else{const o=ve(s);B({title:d("htmlEditor.imageUrlPrompt","Image URL"),inputType:"url",placeholder:"https://"}).then(a=>{a&&ye(a)&&(s.focus(),je(o),document.execCommand("insertImage",!1,a),c(m.sanitizeHtml(s.innerHTML)))})}return}switch(s.focus(),e){case"bold":document.execCommand("bold");break;case"italic":document.execCommand("italic");break;case"underline":document.execCommand("underline");break;case"strikethrough":document.execCommand("strikeThrough");break;case"h1":document.execCommand("formatBlock",!1,"h1");break;case"h2":document.execCommand("formatBlock",!1,"h2");break;case"h3":document.execCommand("formatBlock",!1,"h3");break;case"ul":document.execCommand("insertUnorderedList");break;case"ol":document.execCommand("insertOrderedList");break;case"blockquote":document.execCommand("formatBlock",!1,"blockquote");break;case"hr":document.execCommand("insertHorizontalRule");break;case"subscript":document.execCommand("subscript");break;case"superscript":document.execCommand("superscript");break;case"indent":document.execCommand("indent");break;case"outdent":document.execCommand("outdent");break;case"alignLeft":document.execCommand("justifyLeft");break;case"alignCenter":document.execCommand("justifyCenter");break;case"alignRight":document.execCommand("justifyRight");break;case"alignJustify":document.execCommand("justifyFull");break;case"removeFormat":document.execCommand("removeFormat");break;case"print":window.print();return;case"link":{const o=ve(s);B({title:d("htmlEditor.linkUrlPrompt","Link URL"),inputType:"url",placeholder:"https://"}).then(a=>{a&&ye(a)&&(s.focus(),je(o),document.execCommand("createLink",!1,a),c(m.sanitizeHtml(s.innerHTML)),$(s.textContent?.length??0))});return}case"unlink":document.execCommand("unlink");break;case"undo":document.execCommand("undo");break;case"redo":document.execCommand("redo");break;case"clear":document.execCommand("removeFormat");break;case"fontSize":{n&&document.execCommand("fontSize",!1,n);break}case"fontColor":{n&&document.execCommand("foreColor",!1,n);break}case"bgColor":{n&&document.execCommand("hiliteColor",!1,n);break}case"table":{document.execCommand("insertHTML",!1,'<table class="nice-htmleditor__table"><thead><tr><th>Header 1</th><th>Header 2</th><th>Header 3</th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table><p>&nbsp;</p>');break}case"code":{const a=window.getSelection()?.toString()||"";a.includes(`
10
+ `)||a.length>60?document.execCommand("insertHTML",!1,`<pre class="nice-htmleditor__code-block">${a||"// code"}</pre>`):document.execCommand("insertHTML",!1,`<code>${a||"code"}</code>`);break}}c(m.sanitizeHtml(s.innerHTML)),$(s.textContent?.length??0)}},[c,g,b,j,A,p,H,S,P,B,d]),Pe=i.useCallback(async e=>{const n=e.target.files?.[0];if(!n||!H)return;const s=await H(n),o=f.current;o&&s&&(o.focus(),document.execCommand("insertImage",!1,s),c(o.innerHTML)),e.target.value=""},[H,c]),Ue=i.useCallback(()=>{const e=f.current;if(!e)return;const n=e.textContent?.length??0;if(M>0&&n>M&&(e.textContent=(e.textContent??"").slice(0,M)),$(n),Ke((e.textContent??"").trim().split(/\s+/).filter(Boolean).length),c(e.innerHTML),C){const s=window.getSelection();if(s&&s.rangeCount>0){const o=s.getRangeAt(0),a=o.startContainer;if(a.nodeType===Node.TEXT_NODE){const k=a.textContent||"",T=o.startOffset,D=k.slice(0,T),y=D.lastIndexOf(C);if(y>=0&&(y===0||/\s/.test(D[y-1]))){const _=D.slice(y+C.length);if(!/\s/.test(_)){z(!0),Ie(_),X(0),ne?.(_);return}}}}z(!1)}},[c,C,ne]),w=i.useMemo(()=>te?.filter(e=>e.label.toLowerCase().includes(me.toLowerCase())).slice(0,8)??[],[te,me]),Z=i.useCallback(e=>{const n=f.current;if(!n)return;const s=window.getSelection();if(!s||s.rangeCount===0)return;const o=s.getRangeAt(0),a=o.startContainer;if(a.nodeType===Node.TEXT_NODE&&C){const k=a.textContent||"",T=o.startOffset,y=k.slice(0,T).lastIndexOf(C);if(y>=0){const _=k.slice(0,y),nt=k.slice(T),rt=`<span class="nice-htmleditor__mention" data-mention="${e.key}" contenteditable="false">${C}${e.label}</span>&nbsp;`;a.textContent=_;const ee=document.createRange();ee.setStartAfter(a),ee.collapse(!0);const ot=ee.createContextualFragment(rt+nt);a.parentNode?.insertBefore(ot,a.nextSibling),s.collapseToEnd(),c(n.innerHTML)}}z(!1)},[C,c]),Qe=i.useCallback(e=>{if(U&&w.length>0){e.key==="ArrowDown"?(e.preventDefault(),X(n=>Math.min(n+1,w.length-1))):e.key==="ArrowUp"?(e.preventDefault(),X(n=>Math.max(n-1,0))):e.key==="Enter"?(e.preventDefault(),Z(w[Q])):e.key==="Escape"&&z(!1);return}(e.ctrlKey||e.metaKey)&&e.key==="b"?(e.preventDefault(),x("bold")):(e.ctrlKey||e.metaKey)&&e.key==="i"?(e.preventDefault(),x("italic")):(e.ctrlKey||e.metaKey)&&e.key==="u"?(e.preventDefault(),x("underline")):(e.ctrlKey||e.metaKey)&&e.key==="f"?(e.preventDefault(),G(n=>!n)):(e.ctrlKey||e.metaKey)&&e.key==="z"&&!e.shiftKey?(e.preventDefault(),x("undo")):(e.ctrlKey||e.metaKey)&&(e.key==="y"||e.key==="z"&&e.shiftKey)&&(e.preventDefault(),x("redo"))},[U,w,Q,Z,x]),Xe=i.useCallback(e=>{if(!re)return;e.preventDefault();const n=e.clipboardData.getData("text/html"),s=e.clipboardData.getData("text/plain");if(n){const a=n.replace(/<style[\s\S]*?<\/style>/gi,"").replace(/<script[\s\S]*?<\/script>/gi,"").replace(/class="[^"]*"/gi,"").replace(/style="[^"]*"/gi,"").replace(/<o:[^>]*>[\s\S]*?<\/o:[^>]*>/gi,"").replace(/<!--[\s\S]*?-->/g,"").replace(/<\/?(?:xml|meta|link|font|span)[^>]*>/gi,"");document.execCommand("insertHTML",!1,a)}else s&&document.execCommand("insertText",!1,s);const o=f.current;o&&(c(o.innerHTML),$(o.textContent?.length??0))},[re,c]),Je=i.useCallback(async e=>{if(!N)return;e.preventDefault();const n=Array.from(e.dataTransfer.files);if(n.length===0)return;const s=await N(n),o=f.current;if(o){o.focus();for(const a of s)if(/\.(png|jpe?g|gif|webp|svg|bmp|ico)$/i.test(a)||a.startsWith("data:image/"))document.execCommand("insertImage",!1,a);else{const T=`<a href="${a}">${a.split("/").pop()??a}</a>`;document.execCommand("insertHTML",!1,T)}c(o.innerHTML)}},[N,c]),Ve=i.useCallback(e=>{N&&e.preventDefault()},[N]),Ce=i.useCallback(e=>{const n=f.current;if(!n||!h)return;const s=n.textContent??"",o=h.toLowerCase(),a=s.toLowerCase();(e===1?a.indexOf(o):a.lastIndexOf(o))!==-1&&(n.focus(),window.find?.(h))},[h]),Ge=i.useCallback(()=>{const e=f.current;!e||!h||(e.innerHTML=e.innerHTML.split(h).join(L),c(e.innerHTML))},[h,L,c]),Ye=i.useCallback(()=>{if(!h)return;const e=p.split(h).join(L);c(e);const n=f.current;n&&(n.innerHTML=e)},[h,L,p,c]),Ze=i.useCallback(e=>{const n=f.current;n&&(n.focus(),document.execCommand("insertText",!1,e),c(n.innerHTML),xe(!1))},[c]),et=i.useCallback(e=>{const n=f.current;n&&(n.focus(),document.execCommand("insertHTML",!1,e),c(n.innerHTML),be(!1))},[c]),tt=i.useCallback(e=>{const n=b||g;if(e==="fontSize")return r.jsx(st.NiceSelect,{size:"sm",value:"",onChange:o=>x("fontSize",String(o)),disabled:n,placeholder:d("htmlEditor.size","Size"),options:dt.map(o=>({value:o.value,label:o.label})),style:{minWidth:70,maxWidth:80}},e);if(e==="fontColor")return r.jsx(ke.NiceColorPicker,{value:fe,onChange:o=>{Be(o),x("fontColor",o)},disabled:n,size:"sm",label:"",title:d("htmlEditor.textColor","Text color")},e);if(e==="bgColor")return r.jsx(ke.NiceColorPicker,{value:pe,onChange:o=>{Fe(o),x("bgColor",o)},disabled:n,size:"sm",label:"",title:d("htmlEditor.highlightColor","Highlight color")},e);const s=e==="markdown"&&j||e==="fullscreen"&&J||e==="source"&&S||e==="findReplace"&&V||e==="emoji"&&Y;return r.jsx(v.NiceButton,{size:"sm",variant:s?"primary":"ghost",onClick:()=>x(e),title:e,disabled:n,children:ct[e]||e},e)},[b,g,x,j,J,fe,pe,S,V,Y,d]);return Ee?null:r.jsxs("div",{className:`nice-field nice-field--${He} ${E?"nice-field--error":""} ${Ne||""}`,style:Me,children:[Re,ie&&r.jsxs("label",{className:"nice-field__label",htmlFor:le,children:[ie,Te&&r.jsx("span",{className:"nice-field__required",children:"*"})]}),r.jsxs("div",{ref:De,className:`nice-htmleditor${J?" nice-htmleditor--fullscreen":""}`,style:{position:"relative"},children:[r.jsx("span",{style:{position:"absolute",top:6,right:6,zIndex:20},children:r.jsx(m.NiceTutorialButton,{steps:m.resolveTutorial(_e,at)})}),r.jsxs("div",{className:"nice-htmleditor__toolbar",style:{display:"flex",flexWrap:"wrap",gap:2,alignItems:"center"},children:[we.map(tt),O&&O.length>0&&r.jsxs("div",{style:{position:"relative"},children:[r.jsx(v.NiceButton,{size:"sm",variant:ge?"primary":"ghost",onClick:()=>be(e=>!e),title:d("htmlEditor.insertTemplate","Insert template"),children:r.jsx(m.NiceIcon,{name:"clipboard",size:16})}),ge&&r.jsx("ul",{style:{position:"absolute",top:"100%",right:0,zIndex:200,background:"var(--nice-bg-primary, #fff)",border:"1px solid var(--nice-border-color, #ddd)",borderRadius:6,boxShadow:"0 4px 16px var(--nice-overlay-12, rgba(0, 0, 0, 0.12))",listStyle:"none",margin:0,padding:4,minWidth:160,maxHeight:200,overflow:"auto"},children:O.map((e,n)=>r.jsx("li",{style:{padding:"6px 10px",cursor:"pointer",borderRadius:4},onMouseDown:s=>{s.preventDefault(),et(e.html)},children:e.label},n))})]})]}),V&&r.jsxs("div",{className:"nice-htmleditor__find-bar",style:{display:"flex",gap:4,alignItems:"center",padding:"4px 8px",background:"var(--nice-bg-secondary, #f8f9fa)",borderBottom:"1px solid var(--nice-border-color, #ddd)",fontSize:"0.875em"},children:[r.jsx("input",{type:"text",placeholder:d("htmlEditor.find","Find..."),value:h,onChange:e=>Ae(e.target.value),style:{flex:1,maxWidth:180,padding:"2px 6px",border:"1px solid var(--nice-border-color, #ccc)",borderRadius:4,background:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #1f2937)"}}),r.jsx("input",{type:"text",placeholder:d("htmlEditor.replace","Replace..."),value:L,onChange:e=>qe(e.target.value),style:{flex:1,maxWidth:180,padding:"2px 6px",border:"1px solid var(--nice-border-color, #ccc)",borderRadius:4,background:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #1f2937)"}}),r.jsx(v.NiceButton,{size:"sm",variant:"ghost",onClick:()=>Ce(1),title:d("htmlEditor.findNext","Find next"),children:r.jsx(m.NiceIcon,{name:"chevron-right",size:14})}),r.jsx(v.NiceButton,{size:"sm",variant:"ghost",onClick:()=>Ce(-1),title:d("htmlEditor.findPrevious","Find previous"),children:r.jsx(m.NiceIcon,{name:"chevron-left",size:14})}),r.jsx(v.NiceButton,{size:"sm",variant:"ghost",onClick:Ge,disabled:b||g,children:d("htmlEditor.replace2","Replace")}),r.jsx(v.NiceButton,{size:"sm",variant:"ghost",onClick:Ye,disabled:b||g,children:"All"}),r.jsx(v.NiceButton,{size:"sm",variant:"ghost",onClick:()=>G(!1),children:r.jsx(m.NiceIcon,{name:"close",size:14,title:d("htmlEditor.close","Close")})})]}),Y&&r.jsx("div",{className:"nice-htmleditor__emoji-picker",style:{padding:8,background:"var(--nice-bg-primary, #fff)",borderBottom:"1px solid var(--nice-border-color, #ddd)",maxHeight:180,overflowY:"auto"},children:ut.map(e=>r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:"0.7em",fontWeight:600,color:"var(--nice-text-muted, #999)",padding:"4px 0"},children:e.label}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:2},children:e.emojis.map(n=>r.jsx("span",{style:{cursor:"pointer",fontSize:"1.2em",padding:2,borderRadius:4},onClick:()=>Ze(n),title:n,children:n},n))})]},e.label))}),r.jsx("input",{ref:ce,type:"file",accept:"image/*",style:{display:"none"},onChange:Pe}),S?r.jsx("textarea",{className:"nice-htmleditor__source",value:P,onChange:e=>ue(e.target.value),style:{minHeight:I,width:"100%",fontFamily:"monospace",resize:"vertical",whiteSpace:"pre",fontSize:"0.85em",background:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #1f2937)",border:"none",padding:12,boxSizing:"border-box",outline:"none"},disabled:b||g}):j?r.jsx("textarea",{className:"nice-htmleditor__markdown",value:A,onChange:e=>de(e.target.value),style:{minHeight:I,width:"100%",fontFamily:"monospace",resize:"vertical",background:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #1f2937)",border:"none",padding:12,boxSizing:"border-box",outline:"none"},disabled:b||g}):r.jsxs("div",{style:{position:"relative"},children:[r.jsx("div",{ref:$e,id:le,className:"nice-htmleditor__content",contentEditable:!b&&!g,dangerouslySetInnerHTML:ze,onInput:Ue,onKeyDown:Qe,onPaste:Xe,onDrop:Je,onDragOver:Ve,style:{minHeight:I},"data-placeholder":Se,role:"textbox","aria-multiline":"true",suppressContentEditableWarning:!0}),U&&w.length>0&&r.jsx("ul",{className:"nice-htmleditor__mention-list",children:w.map((e,n)=>r.jsx("li",{className:`nice-htmleditor__mention-item ${n===Q?"nice-htmleditor__mention-item--active":""}`,onMouseDown:s=>{s.preventDefault(),Z(e)},children:e.label},e.key))})]}),r.jsxs("div",{className:"nice-htmleditor__statusbar",style:{display:"flex",gap:12,padding:"2px 8px",fontSize:"0.75em",color:"var(--nice-text-muted, #666)",borderTop:"1px solid var(--nice-border-color, #eee)"},children:[M>0&&r.jsxs("span",{children:[he," / ",M]}),oe&&r.jsxs("span",{children:[We," words"]}),oe&&r.jsxs("span",{children:[he," chars"]}),S&&r.jsx("span",{style:{fontWeight:600},children:d("htmlEditor.htmlSource","HTML Source")}),j&&r.jsx("span",{style:{fontWeight:600},children:d("htmlEditor.markdown","Markdown")})]})]}),E&&r.jsx("div",{className:"nice-field__error",children:E}),se&&!E&&r.jsx("div",{className:"nice-field__hint",children:se})]})};exports.NiceHtmlEditor=pt;