@epam/ai-dial-ui-kit 0.14.0-dev.35 → 0.14.0-dev.36

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 (34) hide show
  1. package/dist/{DateCellRenderer-B41xNX7a.cjs → DateCellRenderer-CPm5auvF.cjs} +1 -1
  2. package/dist/{DateCellRenderer-B0o0BqbW.cjs → DateCellRenderer-s9DQ6Fjk.cjs} +19 -19
  3. package/dist/JsonEditor-BlaSMX26.cjs +1 -0
  4. package/dist/MarkdownEditor-5kljDPcm.cjs +1 -0
  5. package/dist/MarkdownEditor-C0_gU7Fi.cjs +1 -0
  6. package/dist/MarkdownEditorContainer-D4bI2w3-.cjs +1 -0
  7. package/dist/components/Grid/Grid.js +111 -111
  8. package/dist/components/JsonEditor/lazy.js +4 -0
  9. package/dist/components/MarkdownEditor/lazy.js +4 -0
  10. package/dist/components/New/Grid/Grid.js +129 -129
  11. package/dist/components/New/MarkdownEditor/lazy.js +4 -0
  12. package/dist/components-manifest.json +2 -2
  13. package/dist/dial-ui-kit.cjs +2 -2
  14. package/dist/dial-ui-kit.js +410 -408
  15. package/dist/editors.cjs +1 -1
  16. package/dist/editors.js +10 -7
  17. package/dist/file-manager.cjs +1 -1
  18. package/dist/grid.cjs +1 -1
  19. package/dist/lazy-B1eG0EeX.cjs +1 -0
  20. package/dist/src/components/JsonEditor/lazy.d.ts +14 -0
  21. package/dist/src/components/MarkdownEditor/lazy.d.ts +7 -0
  22. package/dist/src/components/New/MarkdownEditor/lazy.d.ts +7 -0
  23. package/dist/src/index.d.ts +3 -3
  24. package/dist/src/subpaths/editors.d.ts +13 -12
  25. package/dist/src/utils/grid-registration.d.ts +16 -0
  26. package/dist/src/utils/grid-registration.spec.d.ts +1 -0
  27. package/dist/{use-file-manager-tabs-CkYH0CvF.cjs → use-file-manager-tabs-3AM-Fjrr.cjs} +1 -1
  28. package/dist/utils/grid-registration.js +8 -0
  29. package/package.json +1 -1
  30. package/dist/JsonEditor-pdzI3xkJ.cjs +0 -1
  31. package/dist/MarkdownEditor-CNEY8i7O.cjs +0 -1
  32. package/dist/MarkdownEditor-Dea4eQpw.cjs +0 -1
  33. package/dist/MarkdownEditorContainer-BO6PafCS.cjs +0 -1
  34. package/dist/editor-Ba3vCFHk.cjs +0 -1
@@ -1,37 +1,36 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { themeBalham as ge, colorSchemeLight as _e, setupAgTestIds as Ne, ModuleRegistry as Ie, AllCommunityModule as Te } from "../../../node_modules/ag-grid-community/dist/package/main.esm.js";
3
- import { AgGridReact as Ae } from "../../../node_modules/ag-grid-react/dist/package/index.esm.js";
4
- import { IconZoomCancel as be } from "@tabler/icons-react";
5
- import { useState as De, useRef as D, useId as Ge, useCallback as s, useMemo as m, useEffect as g } from "react";
6
- import { useIsMobileScreen as Le } from "../../../hooks/use-is-mobile-screen.js";
7
- import { useIsTabletScreen as we } from "../../../hooks/use-is-tablet-screen.js";
8
- import { GridSelectionMode as K } from "../../../models/selection-mode.js";
9
- import { DropdownTrigger as Oe } from "../../../types/dropdown.js";
10
- import { debounceFn as ye } from "../../../utils/debounce.js";
11
- import { baseColumnComparator as ve, omitUndefined as xe } from "../../../utils/grid-comparators.js";
2
+ import { themeBalham as ge, colorSchemeLight as _e } from "../../../node_modules/ag-grid-community/dist/package/main.esm.js";
3
+ import { AgGridReact as Ne } from "../../../node_modules/ag-grid-react/dist/package/index.esm.js";
4
+ import { IconZoomCancel as Ie } from "@tabler/icons-react";
5
+ import { useState as Te, useRef as D, useId as Ae, useCallback as s, useMemo as m, useEffect as g } from "react";
6
+ import { useIsMobileScreen as Ge } from "../../../hooks/use-is-mobile-screen.js";
7
+ import { useIsTabletScreen as De } from "../../../hooks/use-is-tablet-screen.js";
8
+ import { GridSelectionMode as Q } from "../../../models/selection-mode.js";
9
+ import { DropdownTrigger as be } from "../../../types/dropdown.js";
10
+ import { debounceFn as Le } from "../../../utils/debounce.js";
11
+ import { baseColumnComparator as Oe, omitUndefined as we } from "../../../utils/grid-comparators.js";
12
+ import { registerAgGridModulesOnce as ye } from "../../../utils/grid-registration.js";
12
13
  import { mergeClasses as X } from "../../../utils/merge-classes.js";
13
- import { Dropdown as He } from "../Dropdown/Dropdown.js";
14
- import { EllipsisTooltip as We } from "../EllipsisTooltip/EllipsisTooltip.js";
15
- import { NoDataContent as ke } from "../NoDataContent/NoDataContent.js";
16
- import { SelectionCell as ze } from "./components/SelectionCell.js";
17
- import { SelectionHeader as Pe } from "./components/SelectionHeader.js";
18
- import { GRID_THEME_PARAMS as G, SelectionEventSourceType as S, GRID_ROW_SELECT_CLASS as Me, GRID_HEADER_SELECT_CLASS as Fe, ROW_HEIGHT as Y, GRID_WITHOUT_HEADER_BORDERS_CLASS as Ue, GRID_SELECTION_VISIBLE_CLASS as Be, GRID_WITH_SELECTION_CLASS as Ve, GRID_ROOT_CLASS as je } from "./constants.js";
19
- import { SELECTION_COL_DEF as Je } from "./renderers/constants.js";
20
- Ne({ testIdAttribute: "dataQA" });
21
- Ie.registerModules([Te]);
22
- const Qe = "dial-kit-grid-selection", Ze = 150, $e = 100, pt = ({
14
+ import { Dropdown as ve } from "../Dropdown/Dropdown.js";
15
+ import { EllipsisTooltip as xe } from "../EllipsisTooltip/EllipsisTooltip.js";
16
+ import { NoDataContent as He } from "../NoDataContent/NoDataContent.js";
17
+ import { SelectionCell as We } from "./components/SelectionCell.js";
18
+ import { SelectionHeader as ke } from "./components/SelectionHeader.js";
19
+ import { GRID_THEME_PARAMS as b, SelectionEventSourceType as S, GRID_ROW_SELECT_CLASS as ze, GRID_HEADER_SELECT_CLASS as Pe, ROW_HEIGHT as Y, GRID_WITHOUT_HEADER_BORDERS_CLASS as Fe, GRID_SELECTION_VISIBLE_CLASS as Ue, GRID_WITH_SELECTION_CLASS as Me, GRID_ROOT_CLASS as Be } from "./constants.js";
20
+ import { SELECTION_COL_DEF as Ve } from "./renderers/constants.js";
21
+ const je = "dial-kit-grid-selection", Je = 150, Ze = 100, Sr = ({
23
22
  columnDefs: _,
24
23
  rowData: c,
25
24
  additionalGridOptions: L,
26
25
  getContextMenuItems: N,
27
26
  className: ee,
28
- ariaLabel: te = "Data grid",
27
+ ariaLabel: re = "Data grid",
29
28
  wrapCustomCellRenderers: I = !0,
30
29
  disabledRowIds: p,
31
- selectedRowIds: a,
32
- onSelectionChange: w,
33
- onGridApiChange: re,
34
- getRowId: O,
30
+ selectedRowIds: l,
31
+ onSelectionChange: O,
32
+ onGridApiChange: te,
33
+ getRowId: w,
35
34
  alternateOddRowColors: y = !1,
36
35
  filterPlaceholder: v = "Enter value",
37
36
  emptyStateIcon: x,
@@ -42,46 +41,47 @@ const Qe = "dial-kit-grid-selection", Ze = 150, $e = 100, pt = ({
42
41
  withoutHeaderBorders: oe = !1,
43
42
  allowDisabledContextMenu: P = !1,
44
43
  selectionMode: n,
45
- selectRowLabel: M,
46
- selectAllLabel: F = "Select all rows"
44
+ selectRowLabel: F,
45
+ selectAllLabel: U = "Select all rows"
47
46
  }) => {
48
- const [r, ne] = De(), ie = Le(), se = we(), T = D(/* @__PURE__ */ new Set()), U = D(
47
+ ye();
48
+ const [t, ne] = Te(), ie = Ge(), se = De(), T = D(/* @__PURE__ */ new Set()), M = D(
49
49
  void 0
50
- ), B = `dial-kit-grid-selection-${Ge()}`, u = D({
51
- getRowId: O,
50
+ ), B = `dial-kit-grid-selection-${Ae()}`, d = D({
51
+ getRowId: w,
52
52
  getContextMenuItems: N,
53
- onSelectionChange: w,
54
- selectRowLabel: M,
53
+ onSelectionChange: O,
54
+ selectRowLabel: F,
55
55
  wrapCustomCellRenderers: I
56
56
  });
57
- u.current = {
58
- getRowId: O,
57
+ d.current = {
58
+ getRowId: w,
59
59
  getContextMenuItems: N,
60
- onSelectionChange: w,
61
- selectRowLabel: M,
60
+ onSelectionChange: O,
61
+ selectRowLabel: F,
62
62
  wrapCustomCellRenderers: I
63
63
  };
64
- const l = s((e) => {
65
- const t = u.current.getRowId;
66
- return t ? t(e) : String(e.id ?? JSON.stringify(e));
67
- }, []), V = !!N, j = !!I, le = m(
64
+ const a = s((e) => {
65
+ const r = d.current.getRowId;
66
+ return r ? r(e) : String(e.id ?? JSON.stringify(e));
67
+ }, []), V = !!N, j = !!I, ae = m(
68
68
  () => ge.withPart(_e).withParams({
69
- ...G,
70
- oddRowBackgroundColor: y ? G.oddRowBackgroundColor : G.backgroundColor,
69
+ ...b,
70
+ oddRowBackgroundColor: y ? b.oddRowBackgroundColor : b.backgroundColor,
71
71
  wrapperBorder: z
72
72
  }),
73
73
  [y, z]
74
- ), ae = s((e) => {
74
+ ), le = s((e) => {
75
75
  e.api.sizeColumnsToFit();
76
- }, []), ce = ie || se || (a?.size ?? 0) > 0, d = s(
77
- (e) => !!e && !!p?.has(l(e)),
78
- [p, l]
76
+ }, []), ce = ie || se || (l?.size ?? 0) > 0, u = s(
77
+ (e) => !!e && !!p?.has(a(e)),
78
+ [p, a]
79
79
  ), C = s(
80
- (e, t, i) => V ? /* @__PURE__ */ o(
81
- He,
80
+ (e, r, i) => V ? /* @__PURE__ */ o(
81
+ ve,
82
82
  {
83
- trigger: [Oe.ContextMenu],
84
- items: e.data ? u.current.getContextMenuItems?.(e.data) ?? [] : [],
83
+ trigger: [be.ContextMenu],
84
+ items: e.data ? d.current.getContextMenuItems?.(e.data) ?? [] : [],
85
85
  anchorToMouse: !0,
86
86
  matchReferenceWidth: !0,
87
87
  className: X(
@@ -89,93 +89,93 @@ const Qe = "dial-kit-grid-selection", Ze = 150, $e = 100, pt = ({
89
89
  i && "cursor-not-allowed opacity-75"
90
90
  ),
91
91
  disabled: i && !P,
92
- children: /* @__PURE__ */ o("span", { className: "block min-w-0 max-w-full flex-1", children: t })
92
+ children: /* @__PURE__ */ o("span", { className: "block min-w-0 max-w-full flex-1", children: r })
93
93
  }
94
- ) : t,
94
+ ) : r,
95
95
  [V, P]
96
96
  ), A = s(
97
97
  (e) => {
98
98
  if (!e.data) return null;
99
- const t = d(e.data);
99
+ const r = u(e.data);
100
100
  return C(
101
101
  e,
102
102
  /* @__PURE__ */ o(
103
- We,
103
+ xe,
104
104
  {
105
105
  text: e.value == null ? "" : String(e.value),
106
106
  className: "max-w-full dial-small-text text-primary",
107
- hideTooltip: t
107
+ hideTooltip: r
108
108
  }
109
109
  ),
110
- t
110
+ r
111
111
  );
112
112
  },
113
- [d, C]
113
+ [u, C]
114
114
  ), R = s(
115
115
  (e) => e === S.API || e === S.ROW_DATA_CHANGED,
116
116
  []
117
- ), ue = m(
118
- () => ye((e) => {
119
- const i = (e.selectedNodes ?? []).map(($) => $.data), f = new Set(i.map(l));
120
- T.current = f, U.current = e.source, !R(e.source) && u.current.onSelectionChange?.(f, i);
121
- }, $e),
122
- [R, l]
123
- ), b = m(() => {
117
+ ), de = m(
118
+ () => Le((e) => {
119
+ const i = (e.selectedNodes ?? []).map((q) => q.data), f = new Set(i.map(a));
120
+ T.current = f, M.current = e.source, !R(e.source) && d.current.onSelectionChange?.(f, i);
121
+ }, Ze),
122
+ [R, a]
123
+ ), G = m(() => {
124
124
  if (n)
125
125
  return {
126
- ...Je,
127
- colId: Qe,
126
+ ...Ve,
127
+ colId: je,
128
128
  headerName: "",
129
- headerClass: Fe,
130
- cellClass: Me,
131
- headerComponent: n === K.MULTIPLE ? Pe : void 0,
132
- headerComponentParams: { label: F },
129
+ headerClass: Pe,
130
+ cellClass: ze,
131
+ headerComponent: n === Q.MULTIPLE ? ke : void 0,
132
+ headerComponentParams: { label: U },
133
133
  cellRenderer: (e) => {
134
134
  if (!e.data) return null;
135
- const t = l(e.data);
135
+ const r = a(e.data);
136
136
  return /* @__PURE__ */ o(
137
- ze,
137
+ We,
138
138
  {
139
139
  params: e,
140
140
  mode: n,
141
- rowId: t,
141
+ rowId: r,
142
142
  radioName: B,
143
- label: u.current.selectRowLabel?.(e.data) ?? "Select row",
144
- disabled: p?.has(t)
143
+ label: d.current.selectRowLabel?.(e.data) ?? "Select row",
144
+ disabled: p?.has(r)
145
145
  }
146
146
  );
147
147
  }
148
148
  };
149
149
  }, [
150
150
  n,
151
- F,
152
- l,
151
+ U,
152
+ a,
153
153
  p,
154
154
  B
155
155
  ]), J = s(
156
156
  (e) => {
157
157
  if (!e.cellRenderer)
158
158
  return { ...e, cellRenderer: A };
159
- const t = u.current.wrapCustomCellRenderers;
160
- if (!(typeof t == "function" ? t(e) : !!t))
159
+ const r = d.current.wrapCustomCellRenderers;
160
+ if (!(typeof r == "function" ? r(e) : !!r))
161
161
  return e;
162
162
  const f = e.cellRenderer;
163
163
  return { ...e, cellRenderer: (E) => {
164
- const he = d(E.data), q = typeof f == "function" ? f : void 0, Ee = q ? /* @__PURE__ */ o(q, { ...E }) : A(E);
164
+ const he = u(E.data), K = typeof f == "function" ? f : void 0, Ee = K ? /* @__PURE__ */ o(K, { ...E }) : A(E);
165
165
  return C(E, Ee, he);
166
166
  } };
167
167
  },
168
- [d, A, C]
169
- ), de = m(() => {
168
+ [u, A, C]
169
+ ), ue = m(() => {
170
170
  const e = j ? (_ ?? []).map(J) : _ ?? [];
171
- return b ? [b, ...e] : e;
172
- }, [_, j, J, b]), {
173
- defaultColDef: Q,
171
+ return G ? [G, ...e] : e;
172
+ }, [_, j, J, G]), {
173
+ defaultColDef: Z,
174
174
  rowSelection: h,
175
175
  ...me
176
176
  } = L ?? {}, fe = m(
177
177
  () => ({
178
- minWidth: Ze,
178
+ minWidth: Je,
179
179
  resizable: !0,
180
180
  sortable: !0,
181
181
  floatingFilter: !0,
@@ -184,102 +184,102 @@ const Qe = "dial-kit-grid-selection", Ze = 150, $e = 100, pt = ({
184
184
  filterPlaceholder: v,
185
185
  buttons: ["reset"]
186
186
  },
187
- comparator: ve,
188
- ...xe(Q)
187
+ comparator: Oe,
188
+ ...we(Z)
189
189
  }),
190
- [v, Q]
190
+ [v, Z]
191
191
  ), Se = (e) => {
192
- e.api.sizeColumnsToFit(), ne(e.api), L?.onGridReady?.(e), re?.(e.api);
192
+ e.api.sizeColumnsToFit(), ne(e.api), L?.onGridReady?.(e), te?.(e.api);
193
193
  };
194
194
  g(() => {
195
- r && c && r.setGridOption("rowData", c);
196
- }, [r, c]);
195
+ t && c && t.setGridOption("rowData", c);
196
+ }, [t, c]);
197
197
  const pe = s(
198
198
  () => /* @__PURE__ */ o(
199
- ke,
199
+ He,
200
200
  {
201
201
  live: !0,
202
202
  title: H,
203
203
  description: W,
204
- icon: x ?? /* @__PURE__ */ o(be, { size: 100, stroke: 0.5, "aria-hidden": "true" })
204
+ icon: x ?? /* @__PURE__ */ o(Ie, { size: 100, stroke: 0.5, "aria-hidden": "true" })
205
205
  }
206
206
  ),
207
207
  [H, W, x]
208
- ), Z = typeof h == "object" ? h : void 0, Ce = m(() => n ? {
209
- isRowSelectable: (e) => !d(e.data),
208
+ ), $ = typeof h == "object" ? h : void 0, Ce = m(() => n ? {
209
+ isRowSelectable: (e) => !u(e.data),
210
210
  /*
211
211
  Merged, not replaced, the way `defaultColDef` is: a consumer reaching
212
212
  for `isRowSelectable` alone would otherwise hand ag-Grid a whole new
213
213
  object and lose the three settings below with it.
214
214
  */
215
- ...Z,
215
+ ...$,
216
216
  /*
217
217
  `selectionMode` owns the mode, because it also decides whether the
218
218
  selection column draws checkboxes or radios.
219
219
  */
220
- mode: n === K.SINGLE ? "singleRow" : "multiRow",
220
+ mode: n === Q.SINGLE ? "singleRow" : "multiRow",
221
221
  // The controls live in this component's own selection column, so
222
222
  // ag-Grid's inputs are switched off and only its behaviour is used.
223
223
  checkboxes: !1,
224
224
  headerCheckbox: !1
225
225
  } : h, [
226
226
  h,
227
- Z,
228
- d,
227
+ $,
228
+ u,
229
229
  n
230
230
  ]);
231
231
  g(() => {
232
- r && c && T.current.size && T.current.forEach((e) => {
233
- const t = r.getRowNode(e);
234
- t && !t.isSelected() && t.setSelected(!0, !1, S.API);
232
+ t && c && T.current.size && T.current.forEach((e) => {
233
+ const r = t.getRowNode(e);
234
+ r && !r.isSelected() && r.setSelected(!0, !1, S.API);
235
235
  });
236
- }, [r, c]), g(() => {
237
- r && a && (r.deselectAll("all", S.API), a.forEach((e) => {
238
- const t = r.getRowNode(e);
239
- t && !t.isSelected() && t.setSelected(!0, !1, S.API);
236
+ }, [t, c]), g(() => {
237
+ t && l && (t.deselectAll("all", S.API), l.forEach((e) => {
238
+ const r = t.getRowNode(e);
239
+ r && !r.isSelected() && r.setSelected(!0, !1, S.API);
240
240
  }));
241
- }, [r, a]);
241
+ }, [t, l]);
242
242
  const Re = s(
243
- (e) => e.data ? l(e.data) : "",
244
- [l]
243
+ (e) => e.data ? a(e.data) : "",
244
+ [a]
245
245
  );
246
246
  return g(() => {
247
247
  const e = R(
248
- U.current
248
+ M.current
249
249
  );
250
- if (r && a?.size && e) {
251
- const t = Array.from(a)[0];
252
- if (t) {
253
- const i = r.getRowNode(t);
254
- i && r.ensureNodeVisible(i);
250
+ if (t && l?.size && e) {
251
+ const r = Array.from(l)[0];
252
+ if (r) {
253
+ const i = t.getRowNode(r);
254
+ i && t.ensureNodeVisible(i);
255
255
  }
256
256
  }
257
- }, [r, R, a]), /* @__PURE__ */ o(
257
+ }, [t, R, l]), /* @__PURE__ */ o(
258
258
  "div",
259
259
  {
260
260
  className: X(
261
- je,
261
+ Be,
262
262
  "size-full",
263
- n && Ve,
264
- n && ce && Be,
265
- oe && Ue,
263
+ n && Me,
264
+ n && ce && Ue,
265
+ oe && Fe,
266
266
  ee
267
267
  ),
268
268
  role: "region",
269
- "aria-label": te,
269
+ "aria-label": re,
270
270
  "aria-busy": k,
271
271
  children: /* @__PURE__ */ o("div", { className: "h-full overflow-x-auto", children: /* @__PURE__ */ o(
272
- Ae,
272
+ Ne,
273
273
  {
274
274
  rowModelType: "clientSide",
275
275
  headerHeight: Y,
276
276
  rowHeight: Y,
277
277
  cellSelection: !1,
278
- theme: le,
278
+ theme: ae,
279
279
  autoSizeStrategy: { type: "fitGridWidth" },
280
- columnDefs: de,
280
+ columnDefs: ue,
281
281
  defaultColDef: fe,
282
- onGridSizeChanged: ae,
282
+ onGridSizeChanged: le,
283
283
  onGridReady: Se,
284
284
  loading: k,
285
285
  suppressCellFocus: !0,
@@ -287,7 +287,7 @@ const Qe = "dial-kit-grid-selection", Ze = 150, $e = 100, pt = ({
287
287
  noRowsOverlayComponent: pe,
288
288
  rowData: c,
289
289
  rowSelection: Ce,
290
- onSelectionChanged: ue,
290
+ onSelectionChanged: de,
291
291
  getRowId: Re,
292
292
  ...me
293
293
  }
@@ -296,6 +296,6 @@ const Qe = "dial-kit-grid-selection", Ze = 150, $e = 100, pt = ({
296
296
  );
297
297
  };
298
298
  export {
299
- Qe as GRID_SELECTION_COLUMN_ID,
300
- pt as Grid
299
+ je as GRID_SELECTION_COLUMN_ID,
300
+ Sr as Grid
301
301
  };
@@ -0,0 +1,4 @@
1
+ const o = () => import("./MarkdownEditor.js");
2
+ export {
3
+ o as LazyMarkdownEditor
4
+ };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.14.0-dev.35",
3
- "generatedAt": "2026-09-08T09:17:00.546Z",
2
+ "version": "0.14.0-dev.36",
3
+ "generatedAt": "2026-09-08T13:07:17.129Z",
4
4
  "kit": {
5
5
  "name": "@epam/ai-dial-ui-kit",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",