@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.
- package/dist/{DateCellRenderer-B41xNX7a.cjs → DateCellRenderer-CPm5auvF.cjs} +1 -1
- package/dist/{DateCellRenderer-B0o0BqbW.cjs → DateCellRenderer-s9DQ6Fjk.cjs} +19 -19
- package/dist/JsonEditor-BlaSMX26.cjs +1 -0
- package/dist/MarkdownEditor-5kljDPcm.cjs +1 -0
- package/dist/MarkdownEditor-C0_gU7Fi.cjs +1 -0
- package/dist/MarkdownEditorContainer-D4bI2w3-.cjs +1 -0
- package/dist/components/Grid/Grid.js +111 -111
- package/dist/components/JsonEditor/lazy.js +4 -0
- package/dist/components/MarkdownEditor/lazy.js +4 -0
- package/dist/components/New/Grid/Grid.js +129 -129
- package/dist/components/New/MarkdownEditor/lazy.js +4 -0
- package/dist/components-manifest.json +2 -2
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +410 -408
- package/dist/editors.cjs +1 -1
- package/dist/editors.js +10 -7
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/lazy-B1eG0EeX.cjs +1 -0
- package/dist/src/components/JsonEditor/lazy.d.ts +14 -0
- package/dist/src/components/MarkdownEditor/lazy.d.ts +7 -0
- package/dist/src/components/New/MarkdownEditor/lazy.d.ts +7 -0
- package/dist/src/index.d.ts +3 -3
- package/dist/src/subpaths/editors.d.ts +13 -12
- package/dist/src/utils/grid-registration.d.ts +16 -0
- package/dist/src/utils/grid-registration.spec.d.ts +1 -0
- package/dist/{use-file-manager-tabs-CkYH0CvF.cjs → use-file-manager-tabs-3AM-Fjrr.cjs} +1 -1
- package/dist/utils/grid-registration.js +8 -0
- package/package.json +1 -1
- package/dist/JsonEditor-pdzI3xkJ.cjs +0 -1
- package/dist/MarkdownEditor-CNEY8i7O.cjs +0 -1
- package/dist/MarkdownEditor-Dea4eQpw.cjs +0 -1
- package/dist/MarkdownEditorContainer-BO6PafCS.cjs +0 -1
- package/dist/editor-Ba3vCFHk.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("./lazy-B1eG0EeX.cjs"),u=require("@monaco-editor/react"),c={[o.EditorThemes.dark]:{base:"vs-dark",inherit:!1,rules:[{token:"string.key.json",foreground:"#37BABC"},{token:"string.value.json",foreground:"#5C8DEA"},{token:"number",foreground:"#D97C27"},{token:"keyword.json",foreground:"#F4CE46"},{token:"delimiter",foreground:"#EEF1F7"},{token:"delimiter.bracket.json",foreground:"#A972FF"},{token:"delimiter.parenthesis",foreground:"#A972FF"}],colors:{"editor.foreground":"#F76464","editor.background":"#161B2D","editorCursor.foreground":"#EEF1F7","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}},[o.EditorThemes.light]:{base:"vs",inherit:!1,rules:[{token:"string.key.json",foreground:"#009D9F"},{token:"string.value.json",foreground:"#2764D9"},{token:"number",foreground:"#B25500"},{token:"keyword.json",foreground:"#3F3D25"},{token:"delimiter",foreground:"#161B2D"},{token:"delimiter.bracket.json",foreground:"#7E39EC"},{token:"delimiter.parenthesis",foreground:"#7E39EC"}],colors:{"editor.foreground":"#AE2F2F","editor.background":"#EEF1F7","editorCursor.foreground":"#161B2D","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}}},g=({value:n,onChange:t,onValidateJSON:i,options:s,currentTheme:e,themesConfig:d=c})=>{function a(r){r?.editor?.defineTheme(e,d[e]),r.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:[{uri:"http://custom-schema/object-required.json",fileMatch:["*"],schema:{type:"object",description:"Top-level value must be an object",additionalProperties:!0}}]})}return l.jsx(u.Editor,{beforeMount:a,height:"100%",defaultLanguage:"json",value:n,onChange:t,theme:e,onValidate:i,options:{minimap:{enabled:!1},formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!1,automaticLayout:!0,scrollBeyondLastLine:!1,wordWrap:"on",smoothScrolling:!0,overviewRulerLanes:0,scrollbar:{horizontal:"hidden",verticalScrollbarSize:4,verticalSliderSize:4},...s??{}}})};exports.DialJsonEditor=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@uiw/react-md-editor"),m=require("./lazy-B1eG0EeX.cjs"),u=require("./merge-classes-Dipy1Ih1.cjs"),x=({value:t,onChange:s,height:o=300,preview:i="edit",theme:a=m.EditorThemes.dark,className:n,placeholder:r})=>{const d=r!==void 0&&!t;return e.jsxs("div",{"data-color-mode":a,className:u.mergeClasses("relative",n),children:[e.jsx(c,{value:t,onChange:l=>s?.(l||""),height:o,preview:i}),d&&e.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:r})]})};exports.DialMarkdownEditor=x;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("react"),e=require("@uiw/react-md-editor"),C=require("./lazy-B1eG0EeX.cjs"),O=require("./merge-classes-Dipy1Ih1.cjs"),t=require("@tabler/icons-react"),k=require("./icon-DhjrDQ8I.cjs"),L=require("./icon-CrGVkVpG.cjs"),M=L.DIAL_ICON_SIZE.SM,i={size:M,stroke:k.DIAL_KIT_ICON_STROKE},n=(s,r)=>({...s,icon:r}),v=()=>[n(e.bold,o.jsx(t.IconBold,{...i})),n(e.italic,o.jsx(t.IconItalic,{...i})),n(e.strikethrough,o.jsx(t.IconStrikethrough,{...i})),e.divider,e.group([e.heading1,e.heading2,e.heading3],{name:"heading",groupName:"heading",icon:o.jsx(t.IconTextSize,{...i}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),e.divider,n(e.unorderedListCommand,o.jsx(t.IconList,{...i})),n(e.orderedListCommand,o.jsx(t.IconListNumbers,{...i})),e.divider,n(e.quote,o.jsx(t.IconQuote,{...i})),n(e.link,o.jsx(t.IconLink,{...i})),n(e.code,o.jsx(t.IconCode,{...i})),e.divider,n(e.table,o.jsx(t.IconTable,{...i}))],E=()=>[n(e.codeEdit,o.jsx(t.IconPencil,{...i})),n(e.codeLive,o.jsx(t.IconLayoutColumns,{...i})),n(e.codePreview,o.jsx(t.IconEye,{...i})),e.divider,n(e.fullscreen,o.jsx(t.IconMaximize,{...i}))],T=({value:s,onChange:r,height:d=300,theme:a=C.EditorThemes.light,className:l,placeholder:m,defaultPreview:u="edit",id:I,ariaLabel:x})=>{const g=c.useMemo(()=>v(),[]),j=c.useMemo(()=>E(),[]);return o.jsx("div",{"data-color-mode":a,className:O.mergeClasses("dial-kit-markdown-editor",l),children:o.jsx(e,{value:s,onChange:h=>r?.(h||""),height:d,preview:u,commands:g,extraCommands:j,textareaProps:{placeholder:m,id:I,"aria-label":x}})})};exports.MarkdownEditor=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),m=require("./Switch-CtdhpYik.cjs"),E=require("./lazy-B1eG0EeX.cjs"),N=require("./MarkdownEditor-5kljDPcm.cjs"),b=({value:r,onChangeValue:l,label:i,headerContent:a,switcherLabel:d,height:c=300,theme:u=E.EditorThemes.dark,onValidateJSON:x,preview:j="edit"})=>{const w=n.useId(),[t,C]=n.useState(!1),[f,p]=n.useState(null);n.useEffect(()=>{t&&typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-BlaSMX26.cjs")).then(s=>{p(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),S=n.useCallback(s=>{x?.(s)},[x]),o=!!d;return e.jsx("div",{className:"size-full flex flex-col",children:e.jsx("div",{className:"flex flex-col gap-8",children:e.jsxs("div",{children:[(i||a||o)&&e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i&&e.jsx(m.DialLabel,{label:i}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 justify-end",children:[a,o&&e.jsx("label",{className:"flex items-center gap-2 cursor-pointer",children:e.jsx(m.DialSwitch,{isOn:t,label:d,switchId:w,onChange:s=>C(s)})})]})]}),o&&t?e.jsx("div",{className:"border border-primary rounded",style:{height:`${c}px`},children:f&&e.jsx(f,{value:r,onChange:h,onValidateJSON:S,currentTheme:u})}):e.jsx(N.DialMarkdownEditor,{value:r,onChange:h,height:c,preview:j,theme:u})]})})})};exports.DialMarkdownEditorContainer=b;
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { themeBalham as Ne, colorSchemeLight as ge
|
|
3
|
-
import { AgGridReact as
|
|
4
|
-
import
|
|
5
|
-
import { useState as
|
|
2
|
+
import { themeBalham as Ne, colorSchemeLight as ge } from "../../node_modules/ag-grid-community/dist/package/main.esm.js";
|
|
3
|
+
import { AgGridReact as be } from "../../node_modules/ag-grid-react/dist/package/index.esm.js";
|
|
4
|
+
import Q from "classnames";
|
|
5
|
+
import { useState as ye, useId as Ee, useRef as Y, useMemo as h, useCallback as l, useEffect as E } from "react";
|
|
6
6
|
import { DialDropdown as R } from "../Dropdown/Dropdown.js";
|
|
7
|
-
import { DialEllipsisTooltip as
|
|
8
|
-
import { RADIO_BUTTON_COL_DEF as
|
|
9
|
-
import { DialNoDataContent as
|
|
10
|
-
import { DialRadioButton as
|
|
7
|
+
import { DialEllipsisTooltip as De } from "../EllipsisTooltip/EllipsisTooltip.js";
|
|
8
|
+
import { RADIO_BUTTON_COL_DEF as Ae, CHECKBOX_COL_DEF as Te } from "./renderers/constants.js";
|
|
9
|
+
import { DialNoDataContent as Ge } from "../NoDataContent/NoDataContent.js";
|
|
10
|
+
import { DialRadioButton as ve } from "../RadioButton/RadioButton.js";
|
|
11
11
|
import { GridSelectionMode as x } from "../../models/selection-mode.js";
|
|
12
12
|
import { DropdownTrigger as w } from "../../types/dropdown.js";
|
|
13
|
-
import { IconZoomCancel as
|
|
14
|
-
import { GRID_THEME_COLORS as z, SelectionEventSourceType as p, checkboxClass as I, ROW_HEIGHT as ee, gridBaseClassName as
|
|
15
|
-
import { ariaDescription as
|
|
16
|
-
import { useIsMobileScreen as
|
|
17
|
-
import { useIsTabletScreen as
|
|
18
|
-
import { debounceFn as
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
columnDefs: E,
|
|
13
|
+
import { IconZoomCancel as Oe } from "@tabler/icons-react";
|
|
14
|
+
import { GRID_THEME_COLORS as z, SelectionEventSourceType as p, checkboxClass as I, ROW_HEIGHT as ee, gridBaseClassName as xe } from "./constants.js";
|
|
15
|
+
import { ariaDescription as re } from "../Checkbox/constants.js";
|
|
16
|
+
import { useIsMobileScreen as ze } from "../../hooks/use-is-mobile-screen.js";
|
|
17
|
+
import { useIsTabletScreen as _e } from "../../hooks/use-is-tablet-screen.js";
|
|
18
|
+
import { debounceFn as ke } from "../../utils/debounce.js";
|
|
19
|
+
import { registerAgGridModulesOnce as He } from "../../utils/grid-registration.js";
|
|
20
|
+
import { baseColumnComparator as Le, omitUndefined as Fe } from "../../utils/grid-comparators.js";
|
|
21
|
+
const or = ({
|
|
22
|
+
columnDefs: D,
|
|
24
23
|
rowData: f,
|
|
25
24
|
additionalGridOptions: _,
|
|
26
25
|
getContextMenuItems: C,
|
|
27
|
-
className:
|
|
26
|
+
className: te,
|
|
28
27
|
ariaLabel: oe = "Data grid",
|
|
29
|
-
wrapCustomCellRenderers:
|
|
28
|
+
wrapCustomCellRenderers: m = !0,
|
|
30
29
|
disabledRowIds: c,
|
|
31
30
|
selectedRowIds: n,
|
|
32
31
|
onSelectionChange: k,
|
|
33
32
|
onGridApiChange: ne,
|
|
34
|
-
getRowId: i = (
|
|
33
|
+
getRowId: i = (t) => String(t.id ?? JSON.stringify(t)),
|
|
35
34
|
alternateOddRowColors: H = !1,
|
|
36
35
|
filterPlaceholder: L = "Enter value",
|
|
37
36
|
emptyStateIcon: F,
|
|
@@ -41,9 +40,10 @@ const nt = ({
|
|
|
41
40
|
wrapperBorder: $ = !0,
|
|
42
41
|
withoutHeaderBorders: ie = !1,
|
|
43
42
|
allowDisabledContextMenu: N = !1,
|
|
44
|
-
selectionMode:
|
|
43
|
+
selectionMode: d
|
|
45
44
|
}) => {
|
|
46
|
-
|
|
45
|
+
He();
|
|
46
|
+
const [t, se] = ye(), ae = Ee(), g = ze(), b = _e(), A = Y(/* @__PURE__ */ new Set()), U = Y(
|
|
47
47
|
void 0
|
|
48
48
|
), le = h(
|
|
49
49
|
() => ({
|
|
@@ -57,18 +57,18 @@ const nt = ({
|
|
|
57
57
|
}, []), T = l(
|
|
58
58
|
(e) => {
|
|
59
59
|
if (e.data) {
|
|
60
|
-
const
|
|
60
|
+
const r = i(e.data), o = c?.has(r) ?? !1, u = o && !N, a = e.value == null ? "" : String(e.value), v = C?.(e.data) ?? [];
|
|
61
61
|
return /* @__PURE__ */ s(
|
|
62
62
|
R,
|
|
63
63
|
{
|
|
64
64
|
trigger: [w.ContextMenu],
|
|
65
|
-
items:
|
|
65
|
+
items: v,
|
|
66
66
|
anchorToMouse: !0,
|
|
67
67
|
matchReferenceWidth: !0,
|
|
68
68
|
className: "w-full",
|
|
69
69
|
disabled: u,
|
|
70
70
|
children: /* @__PURE__ */ s("span", { className: "block min-w-0 h-full max-w-full", children: /* @__PURE__ */ s(
|
|
71
|
-
|
|
71
|
+
De,
|
|
72
72
|
{
|
|
73
73
|
text: a,
|
|
74
74
|
className: "max-w-full h-full",
|
|
@@ -83,23 +83,23 @@ const nt = ({
|
|
|
83
83
|
), y = l(
|
|
84
84
|
(e) => e === p.API || e === p.ROW_DATA_CHANGED,
|
|
85
85
|
[]
|
|
86
|
-
),
|
|
86
|
+
), j = l(
|
|
87
87
|
(e) => {
|
|
88
|
-
if (!
|
|
88
|
+
if (!t)
|
|
89
89
|
return;
|
|
90
90
|
const o = (e.selectedNodes || []).map((a) => a.data), u = new Set(o.map(i));
|
|
91
|
-
|
|
91
|
+
A.current = u, U.current = e.source, y(e.source) || k?.(u, o);
|
|
92
92
|
},
|
|
93
|
-
[
|
|
94
|
-
), ue = h(() =>
|
|
95
|
-
(e) =>
|
|
93
|
+
[t, i, y, k]
|
|
94
|
+
), ue = h(() => ke(
|
|
95
|
+
(e) => j?.(e),
|
|
96
96
|
100
|
|
97
|
-
), [
|
|
97
|
+
), [j]), q = l(
|
|
98
98
|
(e) => {
|
|
99
99
|
if (!e.data) return null;
|
|
100
|
-
const
|
|
100
|
+
const r = i(e.data), o = e.node.isSelected(), u = c?.has(r), a = `row-select-${r}`;
|
|
101
101
|
return /* @__PURE__ */ s("div", { className: "size-6 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
102
|
-
|
|
102
|
+
ve,
|
|
103
103
|
{
|
|
104
104
|
className: "size-[18px]",
|
|
105
105
|
inputId: a,
|
|
@@ -119,56 +119,56 @@ const nt = ({
|
|
|
119
119
|
},
|
|
120
120
|
[i, c]
|
|
121
121
|
), S = l(() => {
|
|
122
|
-
const e = "dial-row-select",
|
|
123
|
-
return g || b || n && n.size > 0 ? `${e} ${
|
|
124
|
-
}, [g, b, n]),
|
|
125
|
-
if (
|
|
122
|
+
const e = "dial-row-select", r = "dial-row-select-visible";
|
|
123
|
+
return g || b || n && n.size > 0 ? `${e} ${r}` : !n || n.size === 0 ? e : `${e} ${r}`;
|
|
124
|
+
}, [g, b, n]), K = l(() => g || b ? S() : !n || n.size === 0 ? "dial-row-not-select-header" : S(), [S, g, b, n]), fe = h(() => {
|
|
125
|
+
if (d === x.SINGLE)
|
|
126
126
|
return {
|
|
127
|
-
...
|
|
128
|
-
cellRenderer:
|
|
127
|
+
...Ae,
|
|
128
|
+
cellRenderer: q
|
|
129
129
|
};
|
|
130
|
-
if (
|
|
130
|
+
if (d === x.MULTIPLE)
|
|
131
131
|
return {
|
|
132
|
-
...
|
|
133
|
-
headerClass: () =>
|
|
132
|
+
...Te,
|
|
133
|
+
headerClass: () => K(),
|
|
134
134
|
cellClass: (e) => {
|
|
135
|
-
const
|
|
135
|
+
const r = e.data ? i(e.data) : null;
|
|
136
136
|
let o = S();
|
|
137
|
-
return
|
|
137
|
+
return r && c?.has(r) && (o += " opacity-50 pointer-events-none"), o;
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
}, [
|
|
141
|
-
|
|
142
|
-
j,
|
|
141
|
+
d,
|
|
143
142
|
q,
|
|
143
|
+
K,
|
|
144
144
|
i,
|
|
145
145
|
S,
|
|
146
146
|
c
|
|
147
|
-
]),
|
|
147
|
+
]), X = l(
|
|
148
148
|
(e) => {
|
|
149
|
-
const
|
|
149
|
+
const r = typeof m == "function" ? m(e) : !!m;
|
|
150
150
|
if (!e.cellRenderer)
|
|
151
151
|
return { ...e, cellRenderer: T };
|
|
152
|
-
if (!
|
|
152
|
+
if (!r)
|
|
153
153
|
return e;
|
|
154
154
|
const o = e.cellRenderer;
|
|
155
155
|
return { ...e, cellRenderer: (a) => {
|
|
156
|
-
const
|
|
156
|
+
const v = a.data ? C?.(a.data) ?? [] : [];
|
|
157
157
|
let O = null;
|
|
158
158
|
typeof o == "function" ? O = /* @__PURE__ */ s(o, { ...a }) : O = T(a);
|
|
159
|
-
const
|
|
159
|
+
const V = a.data ? i(a.data) : null, Z = V ? c?.has(V) : !1;
|
|
160
160
|
return /* @__PURE__ */ s(
|
|
161
161
|
R,
|
|
162
162
|
{
|
|
163
163
|
trigger: [w.ContextMenu],
|
|
164
|
-
items:
|
|
164
|
+
items: v,
|
|
165
165
|
anchorToMouse: !0,
|
|
166
166
|
matchReferenceWidth: !0,
|
|
167
|
-
className:
|
|
167
|
+
className: Q(
|
|
168
168
|
"w-full h-full",
|
|
169
|
-
|
|
169
|
+
Z && "!cursor-not-allowed opacity-75"
|
|
170
170
|
),
|
|
171
|
-
disabled:
|
|
171
|
+
disabled: Z && !N,
|
|
172
172
|
children: /* @__PURE__ */ s("span", { className: "block min-w-0 max-w-full flex-1", children: O })
|
|
173
173
|
}
|
|
174
174
|
);
|
|
@@ -179,19 +179,19 @@ const nt = ({
|
|
|
179
179
|
C,
|
|
180
180
|
i,
|
|
181
181
|
T,
|
|
182
|
-
|
|
182
|
+
m,
|
|
183
183
|
N
|
|
184
184
|
]
|
|
185
|
-
),
|
|
186
|
-
() =>
|
|
185
|
+
), J = h(
|
|
186
|
+
() => m ? (D ?? []).map(X) : D ?? [],
|
|
187
187
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
188
188
|
[
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
D,
|
|
190
|
+
m,
|
|
191
191
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
192
|
-
|
|
192
|
+
m ? X : null
|
|
193
193
|
]
|
|
194
|
-
), { defaultColDef:
|
|
194
|
+
), { defaultColDef: M, ...me } = _ ?? {}, de = h(
|
|
195
195
|
() => ({
|
|
196
196
|
minWidth: 150,
|
|
197
197
|
resizable: !0,
|
|
@@ -202,32 +202,32 @@ const nt = ({
|
|
|
202
202
|
filterPlaceholder: L,
|
|
203
203
|
buttons: ["reset"]
|
|
204
204
|
},
|
|
205
|
-
comparator:
|
|
206
|
-
...
|
|
205
|
+
comparator: Le,
|
|
206
|
+
...Fe(M)
|
|
207
207
|
}),
|
|
208
|
-
[L,
|
|
208
|
+
[L, M]
|
|
209
209
|
), he = (e) => {
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
const o =
|
|
210
|
+
const r = document.querySelector(I);
|
|
211
|
+
r && r.setAttribute("aria-description", re);
|
|
212
|
+
const o = J.map((u) => ({
|
|
213
213
|
...u,
|
|
214
214
|
sort: void 0
|
|
215
215
|
}));
|
|
216
216
|
e.api.updateGridOptions({ columnDefs: o, rowData: f }), e.api.sizeColumnsToFit(), se(e.api), _?.onGridReady?.(e), ne?.(e.api);
|
|
217
217
|
};
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}, [
|
|
218
|
+
E(() => {
|
|
219
|
+
t && f && t.setGridOption("rowData", f);
|
|
220
|
+
}, [t, f]);
|
|
221
221
|
const pe = l(
|
|
222
222
|
() => /* @__PURE__ */ s(
|
|
223
|
-
|
|
223
|
+
Ge,
|
|
224
224
|
{
|
|
225
225
|
title: W,
|
|
226
226
|
description: B,
|
|
227
227
|
containerClassName: "gap-3",
|
|
228
228
|
titleClassName: "mt-2 !text-lg",
|
|
229
229
|
icon: F || /* @__PURE__ */ s(
|
|
230
|
-
|
|
230
|
+
Oe,
|
|
231
231
|
{
|
|
232
232
|
size: 100,
|
|
233
233
|
stroke: 0.5,
|
|
@@ -238,52 +238,52 @@ const nt = ({
|
|
|
238
238
|
),
|
|
239
239
|
[W, B, F]
|
|
240
240
|
), Se = h(() => {
|
|
241
|
-
if (
|
|
241
|
+
if (d)
|
|
242
242
|
return {
|
|
243
|
-
mode:
|
|
243
|
+
mode: d === x.SINGLE ? "singleRow" : "multiRow",
|
|
244
244
|
isRowSelectable: (e) => {
|
|
245
|
-
const
|
|
246
|
-
return
|
|
245
|
+
const r = e.data ? i(e.data) : null;
|
|
246
|
+
return r ? !c?.has(r) : !0;
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
}, [c, i,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
const
|
|
253
|
-
|
|
249
|
+
}, [c, i, d]);
|
|
250
|
+
E(() => {
|
|
251
|
+
t && f && A.current.size && A.current.forEach((e) => {
|
|
252
|
+
const r = t.getRowNode(e);
|
|
253
|
+
r && !r.isSelected() && r.setSelected(!0, !1, p.API);
|
|
254
254
|
});
|
|
255
|
-
}, [
|
|
256
|
-
|
|
257
|
-
const
|
|
258
|
-
|
|
255
|
+
}, [t, f]), E(() => {
|
|
256
|
+
t && n && (t.deselectAll("all", p.API), n.forEach((e) => {
|
|
257
|
+
const r = t.getRowNode(e);
|
|
258
|
+
r && !r.isSelected() && r.setSelected(!0, !1, p.API);
|
|
259
259
|
}));
|
|
260
|
-
}, [
|
|
260
|
+
}, [t, n]);
|
|
261
261
|
const Ce = l(
|
|
262
262
|
(e) => e.data ? i(e.data) : "",
|
|
263
263
|
[i]
|
|
264
|
-
),
|
|
264
|
+
), G = l(() => {
|
|
265
265
|
document.querySelectorAll(`.ag-row ${I}`).forEach((e) => {
|
|
266
|
-
e.setAttribute("aria-description",
|
|
266
|
+
e.setAttribute("aria-description", re);
|
|
267
267
|
});
|
|
268
268
|
}, []);
|
|
269
|
-
return
|
|
269
|
+
return E(() => {
|
|
270
270
|
const e = y(
|
|
271
271
|
U.current
|
|
272
272
|
);
|
|
273
|
-
if (
|
|
274
|
-
const
|
|
275
|
-
if (
|
|
276
|
-
const o =
|
|
277
|
-
o &&
|
|
273
|
+
if (t && n?.size && e) {
|
|
274
|
+
const r = Array.from(n)[0];
|
|
275
|
+
if (r) {
|
|
276
|
+
const o = t.getRowNode(r);
|
|
277
|
+
o && t.ensureNodeVisible(o);
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
-
}, [
|
|
280
|
+
}, [t, y, n]), /* @__PURE__ */ s(
|
|
281
281
|
"div",
|
|
282
282
|
{
|
|
283
|
-
className:
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
283
|
+
className: Q(
|
|
284
|
+
xe,
|
|
285
|
+
te,
|
|
286
|
+
d && "with-selection-column",
|
|
287
287
|
ie && "dial-without-header-borders"
|
|
288
288
|
),
|
|
289
289
|
"aria-label": oe,
|
|
@@ -296,7 +296,7 @@ const nt = ({
|
|
|
296
296
|
role: "table",
|
|
297
297
|
"aria-describedby": ae,
|
|
298
298
|
children: /* @__PURE__ */ s(
|
|
299
|
-
|
|
299
|
+
be,
|
|
300
300
|
{
|
|
301
301
|
rowModelType: "clientSide",
|
|
302
302
|
headerHeight: ee,
|
|
@@ -304,8 +304,8 @@ const nt = ({
|
|
|
304
304
|
cellSelection: !1,
|
|
305
305
|
theme: Ne.withPart(ge).withParams({ ...le }),
|
|
306
306
|
autoSizeStrategy: { type: "fitGridWidth" },
|
|
307
|
-
columnDefs:
|
|
308
|
-
defaultColDef:
|
|
307
|
+
columnDefs: J,
|
|
308
|
+
defaultColDef: de,
|
|
309
309
|
selectionColumnDef: fe,
|
|
310
310
|
onGridSizeChanged: ce,
|
|
311
311
|
onGridReady: he,
|
|
@@ -317,10 +317,10 @@ const nt = ({
|
|
|
317
317
|
rowSelection: Se,
|
|
318
318
|
onSelectionChanged: ue,
|
|
319
319
|
getRowId: Ce,
|
|
320
|
-
onRowDataUpdated:
|
|
321
|
-
onBodyScroll:
|
|
322
|
-
onFirstDataRendered:
|
|
323
|
-
...
|
|
320
|
+
onRowDataUpdated: G,
|
|
321
|
+
onBodyScroll: G,
|
|
322
|
+
onFirstDataRendered: G,
|
|
323
|
+
...me
|
|
324
324
|
}
|
|
325
325
|
)
|
|
326
326
|
}
|
|
@@ -329,5 +329,5 @@ const nt = ({
|
|
|
329
329
|
);
|
|
330
330
|
};
|
|
331
331
|
export {
|
|
332
|
-
|
|
332
|
+
or as DialGrid
|
|
333
333
|
};
|