impact-nova 3.0.0-alpha.5 → 3.0.0-alpha.7
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/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +56 -42
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +48 -45
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +31 -33
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +18 -17
- package/dist/components/data/ag-grid-react/editable-utils.d.ts +9 -1
- package/dist/components/data/ag-grid-react/editable-utils.js +46 -41
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +203 -199
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/expandable-list-item/sku-picker-chrome.js +35 -30
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +1 -1
- package/dist/components/data-display/chart/chart-scatter3d.d.ts +39 -0
- package/dist/components/data-display/chart/chart-scatter3d.js +180 -0
- package/dist/components/data-display/chart/chart.js +125 -112
- package/dist/components/data-display/chart/chart.utils.js +122 -92
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +46 -36
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +47 -27
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +1 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +81 -75
- package/dist/components/flows/iris-chat/iris-chat.js +83 -83
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +2 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +1 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.js +29 -11
- package/dist/components/forms/choice-card/choice-card-percent.js +82 -51
- package/dist/components/forms/choice-card/choice-card.js +23 -23
- package/dist/components/forms/input/input.js +5 -5
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/primitives/button/button.variants.js +1 -1
- package/dist/components/primitives/stepper/internals/step-model.d.ts +1 -1
- package/dist/components/primitives/stepper/internals/step-model.js +5 -5
- package/dist/components/primitives/stepper/internals/stepper-compact.js +13 -13
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +6 -6
- package/dist/components/primitives/stepper/internals/stepper-rail.js +15 -15
- package/dist/components/primitives/stepper/internals/stepper-summary.js +7 -7
- package/dist/components/primitives/stepper/internals/stepper-track.js +2 -2
- package/dist/components/primitives/stepper/stepper.js +92 -91
- package/dist/components/primitives/stepper/stepper.types.d.ts +2 -0
- package/dist/impact-nova-components.css +88 -4
- package/dist/impact-nova.css +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js
CHANGED
|
@@ -1,30 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as D, useState as O, useRef as h, useImperativeHandle as R, useCallback as i } from "react";
|
|
3
3
|
import { Select as j } from "../../../../forms/select/select.js";
|
|
4
|
-
import { cn as
|
|
5
|
-
|
|
4
|
+
import { cn as P } from "../../../../../lib/utils.js";
|
|
5
|
+
function k(t) {
|
|
6
|
+
if (typeof t.onValueChange == "function")
|
|
7
|
+
return t.onValueChange;
|
|
8
|
+
const a = t.colDef?.cellEditorParams, e = typeof a == "function" ? a(t) : a;
|
|
9
|
+
if (!e || typeof e != "object" || !("onValueChange" in e))
|
|
10
|
+
return;
|
|
11
|
+
const n = e.onValueChange;
|
|
12
|
+
if (typeof n == "function")
|
|
13
|
+
return n;
|
|
14
|
+
}
|
|
15
|
+
const L = D((t, a) => {
|
|
6
16
|
const {
|
|
7
|
-
value:
|
|
8
|
-
options:
|
|
9
|
-
placeholder:
|
|
10
|
-
isSearchable:
|
|
17
|
+
value: e,
|
|
18
|
+
options: n = [],
|
|
19
|
+
placeholder: S = "Select...",
|
|
20
|
+
isSearchable: V = !0,
|
|
11
21
|
isClearable: b = !0,
|
|
12
|
-
stopEditing:
|
|
13
|
-
onValueChange: u,
|
|
22
|
+
stopEditing: f,
|
|
14
23
|
colDef: w
|
|
15
|
-
} =
|
|
16
|
-
value:
|
|
17
|
-
label:
|
|
18
|
-
isDisabled:
|
|
19
|
-
})), [
|
|
20
|
-
|
|
21
|
-
),
|
|
22
|
-
|
|
24
|
+
} = t, d = k(t), M = w?.cellRendererParams?.triggerClassName, o = e && typeof e == "object" && "value" in e, m = o ? e.cellMetadata : void 0, s = o ? e.value : e, g = n.map((l) => ({
|
|
25
|
+
value: l.value,
|
|
26
|
+
label: l.label,
|
|
27
|
+
isDisabled: l.isDisabled
|
|
28
|
+
})), [N, C] = O(
|
|
29
|
+
s != null ? String(s) : null
|
|
30
|
+
), p = h(
|
|
31
|
+
s != null ? String(s) : null
|
|
32
|
+
), v = h(!1);
|
|
33
|
+
R(a, () => ({
|
|
23
34
|
getValue() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
const l = p.current;
|
|
36
|
+
return o ? {
|
|
37
|
+
value: l,
|
|
38
|
+
...m !== void 0 && { cellMetadata: m }
|
|
39
|
+
} : l;
|
|
28
40
|
},
|
|
29
41
|
isCancelBeforeStart() {
|
|
30
42
|
return !1;
|
|
@@ -33,29 +45,31 @@ const I = E((g, C) => {
|
|
|
33
45
|
return !1;
|
|
34
46
|
},
|
|
35
47
|
isPopup() {
|
|
36
|
-
return !
|
|
48
|
+
return !0;
|
|
37
49
|
}
|
|
38
50
|
}));
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
}, [
|
|
42
|
-
(
|
|
43
|
-
const
|
|
44
|
-
|
|
51
|
+
const x = g.find((l) => l.value === N) ?? null, r = i(() => {
|
|
52
|
+
v.current || (v.current = !0, f());
|
|
53
|
+
}, [f]), y = i(
|
|
54
|
+
(l) => {
|
|
55
|
+
const u = l ? l.value : null;
|
|
56
|
+
p.current = u, C(u), d?.(u), r();
|
|
45
57
|
},
|
|
46
|
-
[
|
|
47
|
-
),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
58
|
+
[r, C, d]
|
|
59
|
+
), E = i(() => {
|
|
60
|
+
queueMicrotask(() => {
|
|
61
|
+
r();
|
|
62
|
+
});
|
|
63
|
+
}, [r]);
|
|
64
|
+
return /* @__PURE__ */ c("div", { className: "flex h-full w-full min-w-0 items-center ag-cell-inner-padding", children: /* @__PURE__ */ c("div", { className: P("min-w-0 flex-1", M), children: /* @__PURE__ */ c(
|
|
51
65
|
j,
|
|
52
66
|
{
|
|
53
|
-
options:
|
|
54
|
-
value:
|
|
55
|
-
onChange:
|
|
56
|
-
onMenuClose:
|
|
57
|
-
placeholder:
|
|
58
|
-
isSearchable:
|
|
67
|
+
options: g,
|
|
68
|
+
value: x,
|
|
69
|
+
onChange: y,
|
|
70
|
+
onMenuClose: E,
|
|
71
|
+
placeholder: S,
|
|
72
|
+
isSearchable: V,
|
|
59
73
|
isClearable: b,
|
|
60
74
|
isMulti: !1,
|
|
61
75
|
defaultMenuIsOpen: !0,
|
|
@@ -64,7 +78,7 @@ const I = E((g, C) => {
|
|
|
64
78
|
}
|
|
65
79
|
) }) });
|
|
66
80
|
});
|
|
67
|
-
|
|
81
|
+
L.displayName = "ListSelectCellEditor";
|
|
68
82
|
export {
|
|
69
|
-
|
|
83
|
+
L as ListSelectCellEditor
|
|
70
84
|
};
|
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Select as
|
|
4
|
-
import { SelectAiInsightAffordance as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as F, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as k, useState as B, useRef as g, useImperativeHandle as H, useCallback as r } from "react";
|
|
3
|
+
import { Select as L } from "../../../../forms/select/select.js";
|
|
4
|
+
import { SelectAiInsightAffordance as P } from "../select-ai-insight-affordance.js";
|
|
5
|
+
const q = k((b, v) => {
|
|
6
6
|
const {
|
|
7
7
|
value: l,
|
|
8
|
-
options:
|
|
8
|
+
options: S = [],
|
|
9
9
|
placeholder: C = "Select...",
|
|
10
|
-
isSearchable:
|
|
11
|
-
isClearable:
|
|
12
|
-
stopEditing:
|
|
13
|
-
onValueChange:
|
|
14
|
-
data:
|
|
15
|
-
showAiInsight:
|
|
16
|
-
aiInsightField:
|
|
17
|
-
confidenceScore:
|
|
10
|
+
isSearchable: w = !0,
|
|
11
|
+
isClearable: x = !0,
|
|
12
|
+
stopEditing: u,
|
|
13
|
+
onValueChange: d,
|
|
14
|
+
data: n,
|
|
15
|
+
showAiInsight: M,
|
|
16
|
+
aiInsightField: V,
|
|
17
|
+
confidenceScore: R,
|
|
18
18
|
confidenceScoreField: j,
|
|
19
19
|
confidenceReason: D,
|
|
20
20
|
confidenceReasonField: E,
|
|
21
21
|
confidenceLabel: I
|
|
22
|
-
} =
|
|
22
|
+
} = b, o = l && typeof l == "object" && "value" in l, s = o ? l.cellMetadata : void 0, t = o ? l.value : l, f = S.map((e) => ({
|
|
23
23
|
value: e.value,
|
|
24
24
|
label: e.label,
|
|
25
25
|
isDisabled: e.isDisabled
|
|
26
|
-
})), [
|
|
27
|
-
|
|
28
|
-
),
|
|
29
|
-
|
|
26
|
+
})), [N, p] = B(
|
|
27
|
+
t != null ? String(t) : null
|
|
28
|
+
), m = g(
|
|
29
|
+
t != null ? String(t) : null
|
|
30
|
+
), h = g(!1);
|
|
31
|
+
H(v, () => ({
|
|
30
32
|
getValue() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
const e = m.current;
|
|
34
|
+
return o ? {
|
|
35
|
+
value: e,
|
|
36
|
+
...s !== void 0 && { cellMetadata: s }
|
|
37
|
+
} : e;
|
|
35
38
|
},
|
|
36
39
|
isCancelBeforeStart() {
|
|
37
40
|
return !1;
|
|
@@ -43,33 +46,33 @@ const P = y((g, b) => {
|
|
|
43
46
|
return !0;
|
|
44
47
|
}
|
|
45
48
|
}));
|
|
46
|
-
const
|
|
47
|
-
h.current || (h.current = !0,
|
|
48
|
-
}, [
|
|
49
|
+
const A = f.find((e) => e.value === N) ?? null, a = r(() => {
|
|
50
|
+
h.current || (h.current = !0, u());
|
|
51
|
+
}, [u]), O = r(
|
|
49
52
|
(e) => {
|
|
50
|
-
const
|
|
51
|
-
p(
|
|
53
|
+
const c = e ? e.value : null;
|
|
54
|
+
m.current = c, p(c), d?.(c), a();
|
|
52
55
|
},
|
|
53
|
-
[a,
|
|
54
|
-
),
|
|
56
|
+
[a, d, p]
|
|
57
|
+
), y = r(() => {
|
|
55
58
|
a();
|
|
56
59
|
}, [a]);
|
|
57
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ F(
|
|
58
61
|
"div",
|
|
59
62
|
{
|
|
60
63
|
className: "box-border flex h-full w-full min-w-0 items-center gap-2 ps-2 pe-2.5 ag-editable-cell-highlight",
|
|
61
64
|
"data-component": "select-cell-editor",
|
|
62
65
|
children: [
|
|
63
66
|
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ i(
|
|
64
|
-
|
|
67
|
+
L,
|
|
65
68
|
{
|
|
66
69
|
options: f,
|
|
67
|
-
value:
|
|
68
|
-
onChange:
|
|
69
|
-
onMenuClose:
|
|
70
|
+
value: A,
|
|
71
|
+
onChange: O,
|
|
72
|
+
onMenuClose: y,
|
|
70
73
|
placeholder: C,
|
|
71
|
-
isSearchable:
|
|
72
|
-
isClearable:
|
|
74
|
+
isSearchable: w,
|
|
75
|
+
isClearable: x,
|
|
73
76
|
isMulti: !1,
|
|
74
77
|
defaultMenuIsOpen: !0,
|
|
75
78
|
className: "!border-none !shadow-none !ring-0 !h-7 !rounded-[8px] !px-1.5",
|
|
@@ -77,24 +80,24 @@ const P = y((g, b) => {
|
|
|
77
80
|
}
|
|
78
81
|
) }),
|
|
79
82
|
/* @__PURE__ */ i(
|
|
80
|
-
|
|
83
|
+
P,
|
|
81
84
|
{
|
|
82
|
-
showAiInsight:
|
|
83
|
-
aiInsightField:
|
|
84
|
-
confidenceScore:
|
|
85
|
+
showAiInsight: M,
|
|
86
|
+
aiInsightField: V,
|
|
87
|
+
confidenceScore: R,
|
|
85
88
|
confidenceScoreField: j,
|
|
86
89
|
confidenceReason: D,
|
|
87
90
|
confidenceReasonField: E,
|
|
88
91
|
confidenceLabel: I,
|
|
89
|
-
data:
|
|
90
|
-
cellMetadata:
|
|
92
|
+
data: n && typeof n == "object" ? n : null,
|
|
93
|
+
cellMetadata: s
|
|
91
94
|
}
|
|
92
95
|
)
|
|
93
96
|
]
|
|
94
97
|
}
|
|
95
98
|
);
|
|
96
99
|
});
|
|
97
|
-
|
|
100
|
+
q.displayName = "SelectCellEditor";
|
|
98
101
|
export {
|
|
99
|
-
|
|
102
|
+
q as SelectCellEditor
|
|
100
103
|
};
|
|
@@ -1,61 +1,59 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import { Cross as N, ChevronRight as D } from "impact-nova-icons";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as o } from "../../../../lib/utils.js";
|
|
4
4
|
import { selectTriggerVariants as j } from "../../../forms/select/select.variants.js";
|
|
5
|
-
|
|
5
|
+
import { readColDefEditable as C } from "../editable-utils.js";
|
|
6
|
+
const V = (c) => {
|
|
6
7
|
const {
|
|
7
|
-
value:
|
|
8
|
-
options:
|
|
9
|
-
placeholder:
|
|
10
|
-
disabled:
|
|
11
|
-
isClearable:
|
|
8
|
+
value: e,
|
|
9
|
+
options: h = [],
|
|
10
|
+
placeholder: x = "Select...",
|
|
11
|
+
disabled: a,
|
|
12
|
+
isClearable: g = !0,
|
|
12
13
|
triggerClassName: w,
|
|
13
|
-
colDef:
|
|
14
|
-
data:
|
|
14
|
+
colDef: d,
|
|
15
|
+
data: i,
|
|
15
16
|
setValue: v
|
|
16
|
-
} =
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
const n = l && typeof l == "object" && "value" in l ? l.value : l, u = g.find((a) => a.value === String(n ?? ""))?.label ?? (n != null && n !== "" ? String(n) : ""), c = !u, y = x && e && !c && !i, p = (a) => {
|
|
23
|
-
a.preventDefault(), a.stopPropagation(), v?.(null);
|
|
17
|
+
} = c, f = e && typeof e == "object" && "cellMetadata" in e ? e.cellMetadata?._isDisabled : void 0, m = i && typeof i == "object" && "rowMetadata" in i ? i.rowMetadata?._isDisabled : void 0;
|
|
18
|
+
let l = !1;
|
|
19
|
+
a || (d?.editable === !1 ? l = !1 : f === !1 ? l = !0 : f === !0 ? l = !1 : m === !1 ? l = !0 : m === !0 ? l = !1 : l = C(d, c));
|
|
20
|
+
const s = e && typeof e == "object" && "value" in e ? e.value : e, u = h.find((n) => n.value === String(s ?? ""))?.label ?? (s != null && s !== "" ? String(s) : ""), r = !u, y = g && l && !r && !a, p = (n) => {
|
|
21
|
+
n.preventDefault(), n.stopPropagation(), v?.(null);
|
|
24
22
|
};
|
|
25
23
|
return /* @__PURE__ */ t(
|
|
26
24
|
"div",
|
|
27
25
|
{
|
|
28
|
-
className:
|
|
26
|
+
className: o(
|
|
29
27
|
"flex h-full w-full min-w-0 items-center ag-cell-inner-padding",
|
|
30
|
-
|
|
31
|
-
!
|
|
28
|
+
a && "cursor-not-allowed opacity-60",
|
|
29
|
+
!a && l && "in-ag-editable-cell-highlight"
|
|
32
30
|
),
|
|
33
|
-
children: /* @__PURE__ */ t("div", { className:
|
|
31
|
+
children: /* @__PURE__ */ t("div", { className: o("min-w-0 flex-1", w), children: /* @__PURE__ */ t(
|
|
34
32
|
"div",
|
|
35
33
|
{
|
|
36
|
-
className:
|
|
34
|
+
className: o(
|
|
37
35
|
j({
|
|
38
36
|
size: "default",
|
|
39
37
|
error: !1,
|
|
40
|
-
disabled: !!
|
|
41
|
-
readOnly: !
|
|
38
|
+
disabled: !!a,
|
|
39
|
+
readOnly: !l,
|
|
42
40
|
open: !1
|
|
43
41
|
}),
|
|
44
42
|
"w-full max-w-full"
|
|
45
43
|
),
|
|
46
44
|
"data-component": "select-trigger",
|
|
47
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ b("div", { className: "flex w-full min-w-0 max-w-full items-center justify-between", children: [
|
|
48
46
|
/* @__PURE__ */ t(
|
|
49
47
|
"span",
|
|
50
48
|
{
|
|
51
|
-
className:
|
|
49
|
+
className: o(
|
|
52
50
|
"block min-w-0 truncate text-[14px] text-content",
|
|
53
|
-
|
|
51
|
+
r ? "font-normal text-content-placeholder" : "font-normal"
|
|
54
52
|
),
|
|
55
|
-
children:
|
|
53
|
+
children: r ? x : u
|
|
56
54
|
}
|
|
57
55
|
),
|
|
58
|
-
|
|
56
|
+
/* @__PURE__ */ b("div", { className: "flex shrink-0 items-center gap-1 text-content-icon", children: [
|
|
59
57
|
y ? /* @__PURE__ */ t(
|
|
60
58
|
"span",
|
|
61
59
|
{
|
|
@@ -76,14 +74,14 @@ const C = (b) => {
|
|
|
76
74
|
className: "rotate-90 shrink-0"
|
|
77
75
|
}
|
|
78
76
|
)
|
|
79
|
-
] })
|
|
77
|
+
] })
|
|
80
78
|
] })
|
|
81
79
|
}
|
|
82
80
|
) })
|
|
83
81
|
}
|
|
84
82
|
);
|
|
85
83
|
};
|
|
86
|
-
|
|
84
|
+
V.displayName = "ListSelectDisplayRenderer";
|
|
87
85
|
export {
|
|
88
|
-
|
|
86
|
+
V as ListSelectDisplayRenderer
|
|
89
87
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsxs as p, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { LoadingSpinner as N, ChevronRight as R } from "impact-nova-icons";
|
|
3
3
|
import { cn as f } from "../../../../lib/utils.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { readColDefEditable as F } from "../editable-utils.js";
|
|
5
|
+
import { SelectAiInsightAffordance as C } from "./select-ai-insight-affordance.js";
|
|
6
|
+
function E(e) {
|
|
6
7
|
if (e && typeof e == "object" && "cellMetadata" in e)
|
|
7
8
|
return e.cellMetadata;
|
|
8
9
|
}
|
|
@@ -10,16 +11,16 @@ function A(e) {
|
|
|
10
11
|
if (e && typeof e == "object" && "rowMetadata" in e)
|
|
11
12
|
return e.rowMetadata;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
return e.isLoading === !0 ||
|
|
14
|
+
function g(e) {
|
|
15
|
+
return e.isLoading === !0 || E(e.value)?.isLoading === !0 ? !0 : A(e.data)?.isLoading === !0;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function I(e) {
|
|
17
18
|
const { value: t, data: a, disabled: d, colDef: i } = e;
|
|
18
|
-
if (d ||
|
|
19
|
-
const n = t && typeof t == "object" && "cellMetadata" in t ? t.cellMetadata?._isDisabled : void 0, l = a && typeof a == "object" && "rowMetadata" in a ? a.rowMetadata?._isDisabled : void 0
|
|
20
|
-
return i?.editable === !1 ? !1 : n === !1 ? !0 : n === !0 ? !1 : l === !1 ? !0 : l === !0 ? !1 :
|
|
19
|
+
if (d || g(e)) return !1;
|
|
20
|
+
const n = t && typeof t == "object" && "cellMetadata" in t ? t.cellMetadata?._isDisabled : void 0, l = a && typeof a == "object" && "rowMetadata" in a ? a.rowMetadata?._isDisabled : void 0;
|
|
21
|
+
return i?.editable === !1 ? !1 : n === !1 ? !0 : n === !0 ? !1 : l === !1 ? !0 : l === !0 ? !1 : F(i, e);
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
+
const O = (e) => {
|
|
23
24
|
const {
|
|
24
25
|
value: t,
|
|
25
26
|
options: a = [],
|
|
@@ -27,13 +28,13 @@ const I = (e) => {
|
|
|
27
28
|
disabled: i,
|
|
28
29
|
data: n,
|
|
29
30
|
showAiInsight: l,
|
|
30
|
-
aiInsightField:
|
|
31
|
+
aiInsightField: h,
|
|
31
32
|
confidenceScore: v,
|
|
32
33
|
confidenceScoreField: y,
|
|
33
34
|
confidenceReason: w,
|
|
34
35
|
confidenceReasonField: x,
|
|
35
36
|
confidenceLabel: S
|
|
36
|
-
} = e, o =
|
|
37
|
+
} = e, o = g(e), r = I(e), M = r || o, u = t && typeof t == "object" && "value" in t, j = u ? t.cellMetadata : void 0, c = u ? t.value : t, b = a.find((L) => L.value === String(c ?? ""))?.label ?? (c != null && c !== "" ? String(c) : ""), m = !b, D = n && typeof n == "object" ? n : null;
|
|
37
38
|
return /* @__PURE__ */ p(
|
|
38
39
|
"div",
|
|
39
40
|
{
|
|
@@ -60,9 +61,9 @@ const I = (e) => {
|
|
|
60
61
|
{
|
|
61
62
|
className: f(
|
|
62
63
|
"truncate text-sm font-medium text-content",
|
|
63
|
-
|
|
64
|
+
m && "text-content-empty"
|
|
64
65
|
),
|
|
65
|
-
children:
|
|
66
|
+
children: m ? d : b
|
|
66
67
|
}
|
|
67
68
|
),
|
|
68
69
|
o ? /* @__PURE__ */ s(N, { size: "14px", className: "shrink-0 text-content-icon" }) : r ? /* @__PURE__ */ s(R, { className: "h-3.5 w-3.5 shrink-0 rotate-90 text-content-icon" }) : null
|
|
@@ -70,10 +71,10 @@ const I = (e) => {
|
|
|
70
71
|
}
|
|
71
72
|
),
|
|
72
73
|
/* @__PURE__ */ s(
|
|
73
|
-
|
|
74
|
+
C,
|
|
74
75
|
{
|
|
75
76
|
showAiInsight: l,
|
|
76
|
-
aiInsightField:
|
|
77
|
+
aiInsightField: h,
|
|
77
78
|
confidenceScore: v,
|
|
78
79
|
confidenceScoreField: y,
|
|
79
80
|
confidenceReason: w,
|
|
@@ -87,7 +88,7 @@ const I = (e) => {
|
|
|
87
88
|
}
|
|
88
89
|
);
|
|
89
90
|
};
|
|
90
|
-
|
|
91
|
+
O.displayName = "SelectDisplayRenderer";
|
|
91
92
|
export {
|
|
92
|
-
|
|
93
|
+
O as SelectDisplayRenderer
|
|
93
94
|
};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { ColDef, ColGroupDef } from 'ag-grid-community';
|
|
1
|
+
import { ColDef, ColGroupDef, ICellRendererParams } from 'ag-grid-community';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve column-level editability for display renderers.
|
|
4
|
+
*
|
|
5
|
+
* AG Grid accepts `editable` as a boolean *or* a callback. Display chrome
|
|
6
|
+
* (Select trigger, chevron) must invoke the callback — `=== true` misses every
|
|
7
|
+
* function and paints the cell as a disabled input.
|
|
8
|
+
*/
|
|
9
|
+
export declare function readColDefEditable(colDef: ColDef | null | undefined, rendererParams: ICellRendererParams): boolean;
|
|
2
10
|
/**
|
|
3
11
|
* Recursively overrides `editable` on leaf columns to be a function
|
|
4
12
|
* that enforces the **4-level editable priority**: column < split < row < cell.
|
|
@@ -1,62 +1,67 @@
|
|
|
1
1
|
import { resolveCellEditable as d } from "./cell-renderers/cell-renderer-utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
function j(n, t) {
|
|
3
|
+
const e = n?.editable;
|
|
4
|
+
return typeof e == "function" ? e(t) : e === !0 ? !0 : e === !1 ? !1 : n?._originalEditable === !0;
|
|
5
|
+
}
|
|
6
|
+
const y = (n, t) => {
|
|
7
|
+
if (t in n) return n[t];
|
|
8
|
+
if (t.includes(".")) {
|
|
9
|
+
const e = t.split(".");
|
|
10
|
+
let l = n;
|
|
11
|
+
for (const r of e)
|
|
12
|
+
if (l != null && typeof l == "object")
|
|
13
|
+
l = l[r];
|
|
10
14
|
else
|
|
11
15
|
return;
|
|
12
|
-
return
|
|
16
|
+
return l;
|
|
13
17
|
}
|
|
14
|
-
},
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
let e =
|
|
18
|
-
if (!(
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
for (let i = 0; i <
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
e =
|
|
18
|
+
}, E = (n) => {
|
|
19
|
+
const t = n.colDef.field;
|
|
20
|
+
if (!t) return !1;
|
|
21
|
+
let e = n.data, l = t;
|
|
22
|
+
if (!(t in e) && t.includes(".")) {
|
|
23
|
+
const o = t.split(".");
|
|
24
|
+
l = o[o.length - 1];
|
|
25
|
+
for (let i = 0; i < o.length - 1; i++) {
|
|
26
|
+
const a = e[o[i]];
|
|
27
|
+
if (a != null && typeof a == "object")
|
|
28
|
+
e = a;
|
|
25
29
|
else
|
|
26
30
|
return !1;
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
|
-
const
|
|
30
|
-
return
|
|
33
|
+
const r = e[l], u = n.newValue;
|
|
34
|
+
return r && typeof r == "object" && "cellMetadata" in r ? e[l] = u && typeof u == "object" && "value" in u ? u : { ...r, value: u } : e[l] = u, !0;
|
|
31
35
|
};
|
|
32
|
-
function
|
|
33
|
-
return
|
|
34
|
-
const e = { ...
|
|
36
|
+
function g(n) {
|
|
37
|
+
return n.map((t) => {
|
|
38
|
+
const e = { ...t };
|
|
35
39
|
if (e.children?.length)
|
|
36
|
-
return e.children =
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
const
|
|
40
|
-
return e._originalEditable =
|
|
40
|
+
return e.children = g(e.children), e;
|
|
41
|
+
const l = e.field;
|
|
42
|
+
if (!l) return e;
|
|
43
|
+
const r = e.cellEditorParams?.splits, u = r?.some((i) => i.editable === !0) ?? !1, o = typeof e.editable == "boolean" ? e.editable : void 0;
|
|
44
|
+
return e._originalEditable = o, r || (e.valueSetter = E), e.editable = (i) => {
|
|
41
45
|
if (i.node?.group === !0 || i.data?.group === !0)
|
|
42
46
|
return !1;
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
const p =
|
|
48
|
-
return
|
|
49
|
-
const f =
|
|
47
|
+
const a = i.data;
|
|
48
|
+
if (!a) return u || !!o;
|
|
49
|
+
const s = y(a, l);
|
|
50
|
+
if (r) {
|
|
51
|
+
const p = s != null && typeof s == "object" ? s : null;
|
|
52
|
+
return r.some((c) => {
|
|
53
|
+
const f = c.field?.split(".")?.pop();
|
|
50
54
|
if (!f) return !1;
|
|
51
55
|
const v = p?.[f];
|
|
52
|
-
return d(
|
|
56
|
+
return d(o, c.editable, a, v);
|
|
53
57
|
});
|
|
54
58
|
}
|
|
55
|
-
const b =
|
|
56
|
-
return d(
|
|
59
|
+
const b = s != null && typeof s == "object" && "value" in s ? s : void 0;
|
|
60
|
+
return d(o, void 0, a, b);
|
|
57
61
|
}, e;
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
export {
|
|
61
|
-
|
|
65
|
+
g as addRowDataEditableCheck,
|
|
66
|
+
j as readColDefEditable
|
|
62
67
|
};
|