@epam/ai-dial-ui-kit 0.15.1 → 0.15.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.
- package/dist/DateCellRenderer-C7yExfh5.cjs +1 -0
- package/dist/{DateCellRenderer-CZNa4jVJ.cjs → DateCellRenderer-ElULb0hY.cjs} +22 -22
- package/dist/JsonEditor-Bxui5wJH.cjs +1 -0
- package/dist/{MarkdownEditor-Cp-KX6-T.cjs → MarkdownEditor-BKtFs714.cjs} +1 -1
- package/dist/{MarkdownEditor-Dav_pp0T.cjs → MarkdownEditor-Bapd1ycU.cjs} +1 -1
- package/dist/MarkdownEditorContainer-B5aHwoYF.cjs +1 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +16 -18
- package/dist/components/New/Grid/Grid.js +139 -132
- package/dist/components/New/Grid/constants.js +5 -2
- package/dist/components-manifest.json +27 -4
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +37 -35
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/grid.js +19 -17
- package/dist/lazy-_W6FYhKg.cjs +1 -0
- package/dist/node_modules/ag-grid-community/dist/package/main.esm.js +1767 -1763
- package/dist/src/components/New/Grid/Grid.d.ts +12 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/subpaths/grid.d.ts +1 -0
- package/dist/src/types/grid.d.ts +8 -0
- package/dist/types/grid.js +4 -0
- package/dist/{use-file-manager-tabs-Bzzwwcgk.cjs → use-file-manager-tabs-Bgh8mfOJ.cjs} +1 -1
- package/package.json +1 -1
- package/dist/DateCellRenderer-BdUMSg-E.cjs +0 -1
- package/dist/JsonEditor-eAV7SaKu.cjs +0 -1
- package/dist/MarkdownEditorContainer-96cKYmYd.cjs +0 -1
- package/dist/editor-BH6_A1k2.cjs +0 -1
- package/dist/lazy-DMVYJhUR.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),a=require("./lazy-_W6FYhKg.cjs"),c=require("@monaco-editor/react");function g(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const f=g(c),b={[a.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"}},[a.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"}}},k=({value:e,onChange:o,onValidateJSON:r,options:t,currentTheme:n,themesConfig:s=b})=>{function d(i){i?.editor?.defineTheme(n,s[n]),i.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}}]})}const{Editor:l}=f;return u.jsx(l,{beforeMount:d,height:"100%",defaultLanguage:"json",value:e,onChange:o,theme:n,onValidate:r,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},...t??{}}})};exports.DialJsonEditor=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),O=require("@uiw/react-md-editor"),_=require("./lazy-_W6FYhKg.cjs"),k=require("./merge-classes-BEJXjzkx.cjs"),o=require("@tabler/icons-react"),p=require("./icon-DhjrDQ8I.cjs"),f=require("./icon-CrGVkVpG.cjs");function E(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,c.get?c:{enumerable:!0,get:()=>n[r]})}}return i.default=n,Object.freeze(i)}const h=E(O),L=f.DIAL_ICON_SIZE.SM,t={size:L,stroke:p.DIAL_KIT_ICON_STROKE},s=(n,i)=>({...n,icon:i}),M=()=>{const{bold:n,code:i,divider:r,group:c,heading1:a,heading2:d,heading3:u,italic:l,link:m,orderedListCommand:I,quote:g,strikethrough:x,table:j,unorderedListCommand:C}=h;return[s(n,e.jsx(o.IconBold,{...t})),s(l,e.jsx(o.IconItalic,{...t})),s(x,e.jsx(o.IconStrikethrough,{...t})),r,c([a,d,u],{name:"heading",groupName:"heading",icon:e.jsx(o.IconTextSize,{...t}),buttonProps:{"aria-label":"Text style",title:"Text style"}}),r,s(C,e.jsx(o.IconList,{...t})),s(I,e.jsx(o.IconListNumbers,{...t})),r,s(g,e.jsx(o.IconQuote,{...t})),s(m,e.jsx(o.IconLink,{...t})),s(i,e.jsx(o.IconCode,{...t})),r,s(j,e.jsx(o.IconTable,{...t}))]},S=()=>{const{codeEdit:n,codeLive:i,codePreview:r,divider:c,fullscreen:a}=h;return[s(n,e.jsx(o.IconPencil,{...t})),s(i,e.jsx(o.IconLayoutColumns,{...t})),s(r,e.jsx(o.IconEye,{...t})),c,s(a,e.jsx(o.IconMaximize,{...t}))]},T=({value:n,onChange:i,height:r=300,theme:c=_.EditorThemes.light,className:a,placeholder:d,defaultPreview:u="edit",id:l,ariaLabel:m,showDragbar:I=!0})=>{const g=b.useMemo(()=>M(),[]),x=b.useMemo(()=>S(),[]);return e.jsx("div",{"data-color-mode":c,className:k.mergeClasses("dial-kit-markdown-editor",a),children:e.jsx(O,{value:n,onChange:j=>i?.(j||""),height:r,preview:u,visibleDragbar:I,commands:g,extraCommands:x,textareaProps:{placeholder:d,id:l,"aria-label":m}})})};exports.MarkdownEditor=T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("@uiw/react-md-editor"),u=require("./lazy-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("@uiw/react-md-editor"),u=require("./lazy-_W6FYhKg.cjs"),x=require("./merge-classes-BEJXjzkx.cjs"),g=({value:r,onChange:s,height:o=300,preview:i="edit",theme:a=u.EditorThemes.dark,className:n,placeholder:t,showDragbar:d=!0})=>{const l=t!==void 0&&!r;return e.jsxs("div",{"data-color-mode":a,className:x.mergeClasses("relative",n),children:[e.jsx(m,{value:r,onChange:c=>s?.(c||""),height:o,preview:i,visibleDragbar:d}),l&&e.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:t})]})};exports.DialMarkdownEditor=g;
|
|
@@ -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-DE6MrcqJ.cjs"),N=require("./lazy-_W6FYhKg.cjs"),b=require("./MarkdownEditor-Bapd1ycU.cjs"),g=({value:r,onChangeValue:l,label:i,headerContent:a,switcherLabel:d,height:c=300,theme:u=N.EditorThemes.dark,onValidateJSON:x,preview:j="edit",showDragbar:w=!0})=>{const C=n.useId(),[t,p]=n.useState(!1),[f,S]=n.useState(null);n.useEffect(()=>{t&&typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-Bxui5wJH.cjs")).then(s=>{S(()=>s.DialJsonEditor)})},[t]);const h=n.useCallback(s=>{l?.(s)},[l]),E=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:C,onChange:s=>p(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:E,currentTheme:u})}):e.jsx(b.DialMarkdownEditor,{value:r,onChange:h,height:c,preview:j,showDragbar:w,theme:u})]})})})};exports.DialMarkdownEditorContainer=g;
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useId as J, useState as u, useEffect as S, useCallback as x } from "react";
|
|
3
|
-
import "
|
|
4
|
-
import { EditorThemes as
|
|
5
|
-
import "@monaco-editor/react";
|
|
6
|
-
import { DialSwitch as v } from "../Switch/Switch.js";
|
|
3
|
+
import { DialSwitch as b } from "../Switch/Switch.js";
|
|
4
|
+
import { EditorThemes as v } from "../../types/editor.js";
|
|
7
5
|
import { DialMarkdownEditor as y } from "./MarkdownEditor.js";
|
|
8
6
|
import { DialLabel as j } from "../Label/Label.js";
|
|
9
|
-
const
|
|
7
|
+
const B = ({
|
|
10
8
|
value: s,
|
|
11
9
|
onChangeValue: l,
|
|
12
|
-
label:
|
|
10
|
+
label: t,
|
|
13
11
|
headerContent: d,
|
|
14
12
|
switcherLabel: a,
|
|
15
13
|
height: c = 300,
|
|
16
|
-
theme: m =
|
|
14
|
+
theme: m = v.dark,
|
|
17
15
|
onValidateJSON: f,
|
|
18
16
|
preview: C = "edit",
|
|
19
17
|
showDragbar: N = !0
|
|
20
18
|
}) => {
|
|
21
|
-
const w = J(), [
|
|
19
|
+
const w = J(), [n, D] = u(!1), [p, E] = u(null);
|
|
22
20
|
S(() => {
|
|
23
|
-
|
|
21
|
+
n && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
|
|
24
22
|
E(() => o.DialJsonEditor);
|
|
25
23
|
});
|
|
26
|
-
}, [
|
|
24
|
+
}, [n]);
|
|
27
25
|
const h = x(
|
|
28
26
|
(o) => {
|
|
29
27
|
l?.(o);
|
|
@@ -34,16 +32,16 @@ const q = ({
|
|
|
34
32
|
f?.(o);
|
|
35
33
|
},
|
|
36
34
|
[f]
|
|
37
|
-
),
|
|
35
|
+
), i = !!a;
|
|
38
36
|
return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
|
|
39
|
-
(
|
|
40
|
-
|
|
37
|
+
(t || d || i) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
|
|
38
|
+
t && /* @__PURE__ */ e(j, { label: t }),
|
|
41
39
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
|
|
42
40
|
d,
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
i && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
|
|
42
|
+
b,
|
|
45
43
|
{
|
|
46
|
-
isOn:
|
|
44
|
+
isOn: n,
|
|
47
45
|
label: a,
|
|
48
46
|
switchId: w,
|
|
49
47
|
onChange: (o) => D(o)
|
|
@@ -51,7 +49,7 @@ const q = ({
|
|
|
51
49
|
) })
|
|
52
50
|
] })
|
|
53
51
|
] }),
|
|
54
|
-
|
|
52
|
+
i && n ? /* @__PURE__ */ e(
|
|
55
53
|
"div",
|
|
56
54
|
{
|
|
57
55
|
className: "border border-primary rounded",
|
|
@@ -80,5 +78,5 @@ const q = ({
|
|
|
80
78
|
] }) }) });
|
|
81
79
|
};
|
|
82
80
|
export {
|
|
83
|
-
|
|
81
|
+
B as DialMarkdownEditorContainer
|
|
84
82
|
};
|
|
@@ -1,106 +1,113 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { themeBalham as
|
|
3
|
-
import { AgGridReact as
|
|
4
|
-
import { IconZoomCancel as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { useIsMobileScreen as
|
|
7
|
-
import { useIsTabletScreen as
|
|
8
|
-
import { GridSelectionMode as
|
|
9
|
-
import { DropdownTrigger as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
2
|
+
import { themeBalham as Ne, colorSchemeDark as Ie, colorSchemeLight as Te } from "../../../node_modules/ag-grid-community/dist/package/main.esm.js";
|
|
3
|
+
import { AgGridReact as De } from "../../../node_modules/ag-grid-react/dist/package/index.esm.js";
|
|
4
|
+
import { IconZoomCancel as Ge } from "@tabler/icons-react";
|
|
5
|
+
import { useState as Ae, useRef as b, useId as be, 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 X } from "../../../models/selection-mode.js";
|
|
9
|
+
import { DropdownTrigger as Oe } from "../../../types/dropdown.js";
|
|
10
|
+
import { GridColorScheme as Y } from "../../../types/grid.js";
|
|
11
|
+
import { debounceFn as ye } from "../../../utils/debounce.js";
|
|
12
|
+
import { baseColumnComparator as ve, omitUndefined as ke } from "../../../utils/grid-comparators.js";
|
|
13
|
+
import { registerAgGridModulesOnce as xe } from "../../../utils/grid-registration.js";
|
|
14
|
+
import { mergeClasses as ee } from "../../../utils/merge-classes.js";
|
|
15
|
+
import { Dropdown as He } from "../Dropdown/Dropdown.js";
|
|
16
|
+
import { EllipsisTooltip as We } from "../EllipsisTooltip/EllipsisTooltip.js";
|
|
17
|
+
import { NoDataContent as ze } from "../NoDataContent/NoDataContent.js";
|
|
18
|
+
import { SelectionCell as Pe } from "./components/SelectionCell.js";
|
|
19
|
+
import { SelectionHeader as Fe } from "./components/SelectionHeader.js";
|
|
20
|
+
import { GRID_THEME_PARAMS as L, SelectionEventSourceType as S, GRID_ROW_SELECT_CLASS as Ue, GRID_HEADER_SELECT_CLASS as Me, ROW_HEIGHT as re, GRID_WITHOUT_HEADER_BORDERS_CLASS as Be, GRID_SELECTION_VISIBLE_CLASS as Ve, GRID_WITH_SELECTION_CLASS as je, GRID_ROOT_CLASS as Je } from "./constants.js";
|
|
21
|
+
import { SELECTION_COL_DEF as Ze } from "./renderers/constants.js";
|
|
22
|
+
const $e = "dial-kit-grid-selection", qe = 150, Ke = 100, Rr = ({
|
|
22
23
|
columnDefs: _,
|
|
23
24
|
rowData: c,
|
|
24
|
-
additionalGridOptions:
|
|
25
|
+
additionalGridOptions: w,
|
|
25
26
|
getContextMenuItems: N,
|
|
26
|
-
className:
|
|
27
|
-
ariaLabel:
|
|
27
|
+
className: te,
|
|
28
|
+
ariaLabel: oe = "Data grid",
|
|
28
29
|
wrapCustomCellRenderers: I = !0,
|
|
29
30
|
disabledRowIds: p,
|
|
30
31
|
selectedRowIds: l,
|
|
31
32
|
onSelectionChange: O,
|
|
32
|
-
onGridApiChange:
|
|
33
|
-
getRowId:
|
|
34
|
-
alternateOddRowColors:
|
|
35
|
-
filterPlaceholder:
|
|
33
|
+
onGridApiChange: ne,
|
|
34
|
+
getRowId: y,
|
|
35
|
+
alternateOddRowColors: v = !1,
|
|
36
|
+
filterPlaceholder: k = "Enter value",
|
|
36
37
|
emptyStateIcon: x,
|
|
37
38
|
emptyStateTitle: H = "No results found",
|
|
38
39
|
emptyStateDescription: W = "Sorry, we couldn't find any results for your search.",
|
|
39
|
-
loading:
|
|
40
|
-
wrapperBorder:
|
|
41
|
-
withoutHeaderBorders:
|
|
42
|
-
allowDisabledContextMenu:
|
|
40
|
+
loading: z = !1,
|
|
41
|
+
wrapperBorder: P = !0,
|
|
42
|
+
withoutHeaderBorders: ie = !1,
|
|
43
|
+
allowDisabledContextMenu: F = !1,
|
|
43
44
|
selectionMode: n,
|
|
44
|
-
selectRowLabel:
|
|
45
|
-
selectAllLabel:
|
|
45
|
+
selectRowLabel: U,
|
|
46
|
+
selectAllLabel: M = "Select all rows",
|
|
47
|
+
colorScheme: T = Y.Light
|
|
46
48
|
}) => {
|
|
47
|
-
|
|
48
|
-
const [t,
|
|
49
|
+
xe();
|
|
50
|
+
const [t, se] = Ae(), ae = Le(), le = we(), D = b(/* @__PURE__ */ new Set()), B = b(
|
|
49
51
|
void 0
|
|
50
|
-
),
|
|
51
|
-
getRowId:
|
|
52
|
+
), V = `dial-kit-grid-selection-${be()}`, d = b({
|
|
53
|
+
getRowId: y,
|
|
52
54
|
getContextMenuItems: N,
|
|
53
55
|
onSelectionChange: O,
|
|
54
|
-
selectRowLabel:
|
|
56
|
+
selectRowLabel: U,
|
|
55
57
|
wrapCustomCellRenderers: I
|
|
56
58
|
});
|
|
57
59
|
d.current = {
|
|
58
|
-
getRowId:
|
|
60
|
+
getRowId: y,
|
|
59
61
|
getContextMenuItems: N,
|
|
60
62
|
onSelectionChange: O,
|
|
61
|
-
selectRowLabel:
|
|
63
|
+
selectRowLabel: U,
|
|
62
64
|
wrapCustomCellRenderers: I
|
|
63
65
|
};
|
|
64
66
|
const a = s((e) => {
|
|
65
67
|
const r = d.current.getRowId;
|
|
66
68
|
return r ? r(e) : String(e.id ?? JSON.stringify(e));
|
|
67
|
-
}, []),
|
|
68
|
-
() =>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
}, []), j = !!N, J = !!I, ce = m(
|
|
70
|
+
() => Ne.withPart(
|
|
71
|
+
T === Y.Dark ? Ie : Te
|
|
72
|
+
).withParams({
|
|
73
|
+
...L,
|
|
74
|
+
// The shared params pin `browserColorScheme` to light and are applied
|
|
75
|
+
// after the part, so the chosen scheme is set again here.
|
|
76
|
+
browserColorScheme: T,
|
|
77
|
+
oddRowBackgroundColor: v ? L.oddRowBackgroundColor : L.backgroundColor,
|
|
78
|
+
wrapperBorder: P
|
|
72
79
|
}),
|
|
73
|
-
[
|
|
74
|
-
),
|
|
80
|
+
[v, T, P]
|
|
81
|
+
), de = s((e) => {
|
|
75
82
|
e.api.sizeColumnsToFit();
|
|
76
|
-
}, []),
|
|
83
|
+
}, []), ue = ae || le || (l?.size ?? 0) > 0, u = s(
|
|
77
84
|
(e) => !!e && !!p?.has(a(e)),
|
|
78
85
|
[p, a]
|
|
79
86
|
), C = s(
|
|
80
|
-
(e, r, i) =>
|
|
81
|
-
|
|
87
|
+
(e, r, i) => j ? /* @__PURE__ */ o(
|
|
88
|
+
He,
|
|
82
89
|
{
|
|
83
|
-
trigger: [
|
|
90
|
+
trigger: [Oe.ContextMenu],
|
|
84
91
|
items: e.data ? d.current.getContextMenuItems?.(e.data) ?? [] : [],
|
|
85
92
|
anchorToMouse: !0,
|
|
86
93
|
matchReferenceWidth: !0,
|
|
87
|
-
className:
|
|
94
|
+
className: ee(
|
|
88
95
|
"size-full",
|
|
89
96
|
i && "cursor-not-allowed opacity-75"
|
|
90
97
|
),
|
|
91
|
-
disabled: i && !
|
|
98
|
+
disabled: i && !F,
|
|
92
99
|
children: /* @__PURE__ */ o("span", { className: "block min-w-0 max-w-full flex-1", children: r })
|
|
93
100
|
}
|
|
94
101
|
) : r,
|
|
95
|
-
[
|
|
96
|
-
),
|
|
102
|
+
[j, F]
|
|
103
|
+
), G = s(
|
|
97
104
|
(e) => {
|
|
98
105
|
if (!e.data) return null;
|
|
99
106
|
const r = u(e.data);
|
|
100
107
|
return C(
|
|
101
108
|
e,
|
|
102
109
|
/* @__PURE__ */ o(
|
|
103
|
-
|
|
110
|
+
We,
|
|
104
111
|
{
|
|
105
112
|
text: e.value == null ? "" : String(e.value),
|
|
106
113
|
className: "max-w-full dial-small-text text-primary",
|
|
@@ -111,35 +118,35 @@ const je = "dial-kit-grid-selection", Je = 150, Ze = 100, Sr = ({
|
|
|
111
118
|
);
|
|
112
119
|
},
|
|
113
120
|
[u, C]
|
|
114
|
-
),
|
|
121
|
+
), h = s(
|
|
115
122
|
(e) => e === S.API || e === S.ROW_DATA_CHANGED,
|
|
116
123
|
[]
|
|
117
|
-
),
|
|
118
|
-
() =>
|
|
119
|
-
const i = (e.selectedNodes ?? []).map((
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
[
|
|
123
|
-
),
|
|
124
|
+
), me = m(
|
|
125
|
+
() => ye((e) => {
|
|
126
|
+
const i = (e.selectedNodes ?? []).map((K) => K.data), f = new Set(i.map(a));
|
|
127
|
+
D.current = f, B.current = e.source, !h(e.source) && d.current.onSelectionChange?.(f, i);
|
|
128
|
+
}, Ke),
|
|
129
|
+
[h, a]
|
|
130
|
+
), A = m(() => {
|
|
124
131
|
if (n)
|
|
125
132
|
return {
|
|
126
|
-
...
|
|
127
|
-
colId:
|
|
133
|
+
...Ze,
|
|
134
|
+
colId: $e,
|
|
128
135
|
headerName: "",
|
|
129
|
-
headerClass:
|
|
130
|
-
cellClass:
|
|
131
|
-
headerComponent: n ===
|
|
132
|
-
headerComponentParams: { label:
|
|
136
|
+
headerClass: Me,
|
|
137
|
+
cellClass: Ue,
|
|
138
|
+
headerComponent: n === X.MULTIPLE ? Fe : void 0,
|
|
139
|
+
headerComponentParams: { label: M },
|
|
133
140
|
cellRenderer: (e) => {
|
|
134
141
|
if (!e.data) return null;
|
|
135
142
|
const r = a(e.data);
|
|
136
143
|
return /* @__PURE__ */ o(
|
|
137
|
-
|
|
144
|
+
Pe,
|
|
138
145
|
{
|
|
139
146
|
params: e,
|
|
140
147
|
mode: n,
|
|
141
148
|
rowId: r,
|
|
142
|
-
radioName:
|
|
149
|
+
radioName: V,
|
|
143
150
|
label: d.current.selectRowLabel?.(e.data) ?? "Select row",
|
|
144
151
|
disabled: p?.has(r)
|
|
145
152
|
}
|
|
@@ -148,88 +155,88 @@ const je = "dial-kit-grid-selection", Je = 150, Ze = 100, Sr = ({
|
|
|
148
155
|
};
|
|
149
156
|
}, [
|
|
150
157
|
n,
|
|
151
|
-
|
|
158
|
+
M,
|
|
152
159
|
a,
|
|
153
160
|
p,
|
|
154
|
-
|
|
155
|
-
]),
|
|
161
|
+
V
|
|
162
|
+
]), Z = s(
|
|
156
163
|
(e) => {
|
|
157
164
|
if (!e.cellRenderer)
|
|
158
|
-
return { ...e, cellRenderer:
|
|
165
|
+
return { ...e, cellRenderer: G };
|
|
159
166
|
const r = d.current.wrapCustomCellRenderers;
|
|
160
167
|
if (!(typeof r == "function" ? r(e) : !!r))
|
|
161
168
|
return e;
|
|
162
169
|
const f = e.cellRenderer;
|
|
163
170
|
return { ...e, cellRenderer: (E) => {
|
|
164
|
-
const
|
|
165
|
-
return C(E,
|
|
171
|
+
const ge = u(E.data), Q = typeof f == "function" ? f : void 0, _e = Q ? /* @__PURE__ */ o(Q, { ...E }) : G(E);
|
|
172
|
+
return C(E, _e, ge);
|
|
166
173
|
} };
|
|
167
174
|
},
|
|
168
|
-
[u,
|
|
169
|
-
),
|
|
170
|
-
const e =
|
|
171
|
-
return
|
|
172
|
-
}, [_,
|
|
173
|
-
defaultColDef:
|
|
174
|
-
rowSelection:
|
|
175
|
-
...
|
|
176
|
-
} =
|
|
175
|
+
[u, G, C]
|
|
176
|
+
), fe = m(() => {
|
|
177
|
+
const e = J ? (_ ?? []).map(Z) : _ ?? [];
|
|
178
|
+
return A ? [A, ...e] : e;
|
|
179
|
+
}, [_, J, Z, A]), {
|
|
180
|
+
defaultColDef: $,
|
|
181
|
+
rowSelection: R,
|
|
182
|
+
...Se
|
|
183
|
+
} = w ?? {}, pe = m(
|
|
177
184
|
() => ({
|
|
178
|
-
minWidth:
|
|
185
|
+
minWidth: qe,
|
|
179
186
|
resizable: !0,
|
|
180
187
|
sortable: !0,
|
|
181
188
|
floatingFilter: !0,
|
|
182
189
|
filter: "agTextColumnFilter",
|
|
183
190
|
filterParams: {
|
|
184
|
-
filterPlaceholder:
|
|
191
|
+
filterPlaceholder: k,
|
|
185
192
|
buttons: ["reset"]
|
|
186
193
|
},
|
|
187
|
-
comparator:
|
|
188
|
-
...
|
|
194
|
+
comparator: ve,
|
|
195
|
+
...ke($)
|
|
189
196
|
}),
|
|
190
|
-
[
|
|
191
|
-
),
|
|
192
|
-
e.api.sizeColumnsToFit(),
|
|
197
|
+
[k, $]
|
|
198
|
+
), Ce = (e) => {
|
|
199
|
+
e.api.sizeColumnsToFit(), se(e.api), w?.onGridReady?.(e), ne?.(e.api);
|
|
193
200
|
};
|
|
194
201
|
g(() => {
|
|
195
202
|
t && c && t.setGridOption("rowData", c);
|
|
196
203
|
}, [t, c]);
|
|
197
|
-
const
|
|
204
|
+
const he = s(
|
|
198
205
|
() => /* @__PURE__ */ o(
|
|
199
|
-
|
|
206
|
+
ze,
|
|
200
207
|
{
|
|
201
208
|
live: !0,
|
|
202
209
|
title: H,
|
|
203
210
|
description: W,
|
|
204
|
-
icon: x ?? /* @__PURE__ */ o(
|
|
211
|
+
icon: x ?? /* @__PURE__ */ o(Ge, { size: 100, stroke: 0.5, "aria-hidden": "true" })
|
|
205
212
|
}
|
|
206
213
|
),
|
|
207
214
|
[H, W, x]
|
|
208
|
-
),
|
|
215
|
+
), q = typeof R == "object" ? R : void 0, Re = m(() => n ? {
|
|
209
216
|
isRowSelectable: (e) => !u(e.data),
|
|
210
217
|
/*
|
|
211
218
|
Merged, not replaced, the way `defaultColDef` is: a consumer reaching
|
|
212
219
|
for `isRowSelectable` alone would otherwise hand ag-Grid a whole new
|
|
213
220
|
object and lose the three settings below with it.
|
|
214
221
|
*/
|
|
215
|
-
|
|
222
|
+
...q,
|
|
216
223
|
/*
|
|
217
224
|
`selectionMode` owns the mode, because it also decides whether the
|
|
218
225
|
selection column draws checkboxes or radios.
|
|
219
226
|
*/
|
|
220
|
-
mode: n ===
|
|
227
|
+
mode: n === X.SINGLE ? "singleRow" : "multiRow",
|
|
221
228
|
// The controls live in this component's own selection column, so
|
|
222
229
|
// ag-Grid's inputs are switched off and only its behaviour is used.
|
|
223
230
|
checkboxes: !1,
|
|
224
231
|
headerCheckbox: !1
|
|
225
|
-
} :
|
|
226
|
-
|
|
227
|
-
|
|
232
|
+
} : R, [
|
|
233
|
+
R,
|
|
234
|
+
q,
|
|
228
235
|
u,
|
|
229
236
|
n
|
|
230
237
|
]);
|
|
231
238
|
g(() => {
|
|
232
|
-
t && c &&
|
|
239
|
+
t && c && D.current.size && D.current.forEach((e) => {
|
|
233
240
|
const r = t.getRowNode(e);
|
|
234
241
|
r && !r.isSelected() && r.setSelected(!0, !1, S.API);
|
|
235
242
|
});
|
|
@@ -239,13 +246,13 @@ const je = "dial-kit-grid-selection", Je = 150, Ze = 100, Sr = ({
|
|
|
239
246
|
r && !r.isSelected() && r.setSelected(!0, !1, S.API);
|
|
240
247
|
}));
|
|
241
248
|
}, [t, l]);
|
|
242
|
-
const
|
|
249
|
+
const Ee = s(
|
|
243
250
|
(e) => e.data ? a(e.data) : "",
|
|
244
251
|
[a]
|
|
245
252
|
);
|
|
246
253
|
return g(() => {
|
|
247
|
-
const e =
|
|
248
|
-
|
|
254
|
+
const e = h(
|
|
255
|
+
B.current
|
|
249
256
|
);
|
|
250
257
|
if (t && l?.size && e) {
|
|
251
258
|
const r = Array.from(l)[0];
|
|
@@ -254,48 +261,48 @@ const je = "dial-kit-grid-selection", Je = 150, Ze = 100, Sr = ({
|
|
|
254
261
|
i && t.ensureNodeVisible(i);
|
|
255
262
|
}
|
|
256
263
|
}
|
|
257
|
-
}, [t,
|
|
264
|
+
}, [t, h, l]), /* @__PURE__ */ o(
|
|
258
265
|
"div",
|
|
259
266
|
{
|
|
260
|
-
className:
|
|
261
|
-
|
|
267
|
+
className: ee(
|
|
268
|
+
Je,
|
|
262
269
|
"size-full",
|
|
263
|
-
n &&
|
|
264
|
-
n &&
|
|
265
|
-
|
|
266
|
-
|
|
270
|
+
n && je,
|
|
271
|
+
n && ue && Ve,
|
|
272
|
+
ie && Be,
|
|
273
|
+
te
|
|
267
274
|
),
|
|
268
275
|
role: "region",
|
|
269
|
-
"aria-label":
|
|
270
|
-
"aria-busy":
|
|
276
|
+
"aria-label": oe,
|
|
277
|
+
"aria-busy": z,
|
|
271
278
|
children: /* @__PURE__ */ o("div", { className: "h-full overflow-x-auto", children: /* @__PURE__ */ o(
|
|
272
|
-
|
|
279
|
+
De,
|
|
273
280
|
{
|
|
274
281
|
rowModelType: "clientSide",
|
|
275
|
-
headerHeight:
|
|
276
|
-
rowHeight:
|
|
282
|
+
headerHeight: re,
|
|
283
|
+
rowHeight: re,
|
|
277
284
|
cellSelection: !1,
|
|
278
|
-
theme:
|
|
285
|
+
theme: ce,
|
|
279
286
|
autoSizeStrategy: { type: "fitGridWidth" },
|
|
280
|
-
columnDefs:
|
|
281
|
-
defaultColDef:
|
|
282
|
-
onGridSizeChanged:
|
|
283
|
-
onGridReady:
|
|
284
|
-
loading:
|
|
287
|
+
columnDefs: fe,
|
|
288
|
+
defaultColDef: pe,
|
|
289
|
+
onGridSizeChanged: de,
|
|
290
|
+
onGridReady: Ce,
|
|
291
|
+
loading: z,
|
|
285
292
|
suppressCellFocus: !0,
|
|
286
293
|
suppressDragLeaveHidesColumns: !0,
|
|
287
|
-
noRowsOverlayComponent:
|
|
294
|
+
noRowsOverlayComponent: he,
|
|
288
295
|
rowData: c,
|
|
289
|
-
rowSelection:
|
|
290
|
-
onSelectionChanged:
|
|
291
|
-
getRowId:
|
|
292
|
-
...
|
|
296
|
+
rowSelection: Re,
|
|
297
|
+
onSelectionChanged: me,
|
|
298
|
+
getRowId: Ee,
|
|
299
|
+
...Se
|
|
293
300
|
}
|
|
294
301
|
) })
|
|
295
302
|
}
|
|
296
303
|
);
|
|
297
304
|
};
|
|
298
305
|
export {
|
|
299
|
-
|
|
300
|
-
|
|
306
|
+
$e as GRID_SELECTION_COLUMN_ID,
|
|
307
|
+
Rr as Grid
|
|
301
308
|
};
|
|
@@ -25,8 +25,11 @@ const a = "dial-kit-grid", t = "dial-kit-grid-with-selection", d = "dial-kit-gri
|
|
|
25
25
|
headerBackgroundColor: "var(--bg-layer-raised, #FCFCFC)",
|
|
26
26
|
foregroundColor: "var(--text-primary, #161B2D)",
|
|
27
27
|
headerTextColor: "var(--text-secondary, #57647A)",
|
|
28
|
-
//
|
|
29
|
-
//
|
|
28
|
+
// Native form controls inside the grid, including the date filter's
|
|
29
|
+
// calendar, follow this value. The light default matches the token
|
|
30
|
+
// fallbacks. `Grid` sets it again after this object is spread, because a
|
|
31
|
+
// dark `colorScheme` has to replace this light value or the browser keeps
|
|
32
|
+
// painting those controls light.
|
|
30
33
|
browserColorScheme: "light",
|
|
31
34
|
headerFontSize: 14,
|
|
32
35
|
headerFontWeight: 600,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.15.
|
|
3
|
-
"generatedAt": "2026-10-
|
|
2
|
+
"version": "0.15.2",
|
|
3
|
+
"generatedAt": "2026-10-12T14:06:18.751Z",
|
|
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",
|
|
@@ -5204,10 +5204,17 @@
|
|
|
5204
5204
|
"required": false,
|
|
5205
5205
|
"defaultValue": "'Select all rows'",
|
|
5206
5206
|
"description": "Accessible name of the select-all control."
|
|
5207
|
+
},
|
|
5208
|
+
{
|
|
5209
|
+
"name": "colorScheme",
|
|
5210
|
+
"type": "GridColorScheme",
|
|
5211
|
+
"required": false,
|
|
5212
|
+
"defaultValue": "GridColorScheme.Light",
|
|
5213
|
+
"description": "AG Grid color scheme. `dark` paints native controls dark."
|
|
5207
5214
|
}
|
|
5208
5215
|
],
|
|
5209
5216
|
"examples": [
|
|
5210
|
-
"interface Product { id: string; name: string; price: number }\n\nconst columns: ColDef<Product>[] = [\n { field: 'name', headerName: 'Product', flex: 1 },\n { field: 'price', headerName: 'Price', width: 120 },\n];\n\n<Grid<Product> columnDefs={columns} rowData={products} />\n\n// With selection and a context menu\n<Grid<Product>\n columnDefs={columns}\n rowData={products}\n selectionMode={GridSelectionMode.MULTIPLE}\n selectedRowIds={selectedIds}\n onSelectionChange={(ids) => setSelectedIds(ids)}\n selectRowLabel={(row) => `Select ${row.name}`}\n getContextMenuItems={(row) => [{ key: 'edit', label: 'Edit' }]}\n/>"
|
|
5217
|
+
"interface Product { id: string; name: string; price: number }\n\nconst columns: ColDef<Product>[] = [\n { field: 'name', headerName: 'Product', flex: 1 },\n { field: 'price', headerName: 'Price', width: 120 },\n];\n\n<Grid<Product> columnDefs={columns} rowData={products} />\n\n// With selection and a context menu\n<Grid<Product>\n columnDefs={columns}\n rowData={products}\n selectionMode={GridSelectionMode.MULTIPLE}\n selectedRowIds={selectedIds}\n onSelectionChange={(ids) => setSelectedIds(ids)}\n selectRowLabel={(row) => `Select ${row.name}`}\n getContextMenuItems={(row) => [{ key: 'edit', label: 'Edit' }]}\n/>\n\n// Dark native controls, including the date-filter calendar\n<Grid<Product> columnDefs={columns} rowData={products} colorScheme={GridColorScheme.Dark} />"
|
|
5211
5218
|
],
|
|
5212
5219
|
"sourceFile": "components/New/Grid/Grid.tsx"
|
|
5213
5220
|
},
|
|
@@ -12334,6 +12341,22 @@
|
|
|
12334
12341
|
],
|
|
12335
12342
|
"sourceFile": "types/transfer-queue.ts",
|
|
12336
12343
|
"description": "Lifecycle status of one item in a `TransferQueue`."
|
|
12344
|
+
},
|
|
12345
|
+
{
|
|
12346
|
+
"name": "GridColorScheme",
|
|
12347
|
+
"kind": "enum",
|
|
12348
|
+
"members": [
|
|
12349
|
+
{
|
|
12350
|
+
"name": "Light",
|
|
12351
|
+
"value": "'light'"
|
|
12352
|
+
},
|
|
12353
|
+
{
|
|
12354
|
+
"name": "Dark",
|
|
12355
|
+
"value": "'dark'"
|
|
12356
|
+
}
|
|
12357
|
+
],
|
|
12358
|
+
"sourceFile": "types/grid.ts",
|
|
12359
|
+
"description": "Color scheme `Grid` passes to AG Grid. It selects the light or dark theme\npart and the browser `color-scheme` native controls inside the grid follow."
|
|
12337
12360
|
}
|
|
12338
12361
|
],
|
|
12339
12362
|
"hooks": [
|
|
@@ -12453,7 +12476,7 @@
|
|
|
12453
12476
|
"name": "GRID_THEME_PARAMS",
|
|
12454
12477
|
"sourceFile": "components/New/Grid/constants.ts",
|
|
12455
12478
|
"description": "ag-Grid theme parameters, resolved from the 2.0 colour tokens with the same\nliteral fallbacks the Tailwind config carries, so a consumer that defines no\nCSS variables still gets the intended palette.\n\nHover uses the subtle accent tint and selection the slightly stronger\nselected tint, as in the grid cell design.",
|
|
12456
|
-
"signature": "GRID_THEME_PARAMS = {\n accentColor: 'var(--bg-control-accent, #1D4ED8)',\n backgroundColor: 'var(--bg-layer-raised, #FCFCFC)',\n oddRowBackgroundColor: 'var(--bg-layer-sunken, #EEF1F7)',\n selectedRowBackgroundColor:\n 'var(--bg-control-accent-alpha-active-subtle, #2764D914)',\n rowHoverColor: 'var(--bg-control-accent-alpha-hover-subtle, #2764D90A)',\n borderColor: 'var(--stroke-tertiary, #E0E6F0)',\n // Dividers inside the table sit on the thin stroke (0.5px) rather than the\n // 1px main stroke that controls and standalone dividers use, so a dense grid\n // reads as rows of data instead of a set of boxes. Sub-pixel widths are\n // antialiased rather than snapped, which is what makes the line look lighter.\n // `wrapperBorder` and the pinned-column boundary are left on the main stroke\n // by the theme: those frame the table and separate its regions rather than\n // dividing rows and columns.\n rowBorder: THIN_TABLE_DIVIDER,\n // Off: ag-Grid draws this one both under the header and between the title\n // row and the filter row, and the design has no line between those two. The\n // line under the header is drawn at 1px in `styles/grid.scss`.\n headerRowBorder: false,\n headerColumnBorder: THIN_TABLE_DIVIDER,\n // The design's header divider is a short 12px mark centred in the cell, not\n // the 20px (half the row) ag-Grid draws by default.\n headerColumnBorderHeight: 12,\n chromeBackgroundColor: 'var(--bg-layer-base, #F5F7FA)',\n headerBackgroundColor: 'var(--bg-layer-raised, #FCFCFC)',\n foregroundColor: 'var(--text-primary, #161B2D)',\n headerTextColor: 'var(--text-secondary, #57647A)',\n //
|
|
12479
|
+
"signature": "GRID_THEME_PARAMS = {\n accentColor: 'var(--bg-control-accent, #1D4ED8)',\n backgroundColor: 'var(--bg-layer-raised, #FCFCFC)',\n oddRowBackgroundColor: 'var(--bg-layer-sunken, #EEF1F7)',\n selectedRowBackgroundColor:\n 'var(--bg-control-accent-alpha-active-subtle, #2764D914)',\n rowHoverColor: 'var(--bg-control-accent-alpha-hover-subtle, #2764D90A)',\n borderColor: 'var(--stroke-tertiary, #E0E6F0)',\n // Dividers inside the table sit on the thin stroke (0.5px) rather than the\n // 1px main stroke that controls and standalone dividers use, so a dense grid\n // reads as rows of data instead of a set of boxes. Sub-pixel widths are\n // antialiased rather than snapped, which is what makes the line look lighter.\n // `wrapperBorder` and the pinned-column boundary are left on the main stroke\n // by the theme: those frame the table and separate its regions rather than\n // dividing rows and columns.\n rowBorder: THIN_TABLE_DIVIDER,\n // Off: ag-Grid draws this one both under the header and between the title\n // row and the filter row, and the design has no line between those two. The\n // line under the header is drawn at 1px in `styles/grid.scss`.\n headerRowBorder: false,\n headerColumnBorder: THIN_TABLE_DIVIDER,\n // The design's header divider is a short 12px mark centred in the cell, not\n // the 20px (half the row) ag-Grid draws by default.\n headerColumnBorderHeight: 12,\n chromeBackgroundColor: 'var(--bg-layer-base, #F5F7FA)',\n headerBackgroundColor: 'var(--bg-layer-raised, #FCFCFC)',\n foregroundColor: 'var(--text-primary, #161B2D)',\n headerTextColor: 'var(--text-secondary, #57647A)',\n // Native form controls inside the grid, including the date filter's\n // calendar, follow this value. The light default matches the token\n // fallbacks. `Grid` sets it again after this object is spread, because a\n // dark `colorScheme` has to replace this light value or the browser keeps\n // painting those controls light.\n browserColorScheme: 'light',\n headerFontSize: 14,\n headerFontWeight: 600,\n fontSize: 14,\n fontFamily: 'var(--theme-font, var(--font-inter))',\n spacing: 4,\n borderRadius: 4,\n // Search fields in the header and filter popups: `rounded-lg`.\n inputBorderRadius: 8,\n wrapperBorderRadius: 8,\n}"
|
|
12457
12480
|
},
|
|
12458
12481
|
{
|
|
12459
12482
|
"name": "GRID_ROW_HEIGHT",
|