asma-ui-core 3.49.2 → 3.50.1
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/asma-ui-core.css +1 -1
- package/dist/components/custom/module/header-layout/ToolbarRows.js +50 -49
- package/dist/components/feedback/dialog/StyledDialog.js +27 -27
- package/dist/components/inputs/search-field/StyledSearchField.js +8 -8
- package/dist/table/components/StyledTable.module.js +55 -54
- package/dist/table/components/columns/selectColumn.js +33 -33
- package/package.json +1 -1
|
@@ -1,110 +1,111 @@
|
|
|
1
1
|
import { cn as f } from "../../../../helpers/cn.js";
|
|
2
2
|
import { CloseIcon as T } from "../../../icons/close-icon/CloseIcon.js";
|
|
3
|
-
import { StyledButton as
|
|
4
|
-
import { StyledWidgetTitle as
|
|
3
|
+
import { StyledButton as b } from "../../../inputs/button/StyledButton.js";
|
|
4
|
+
import { StyledWidgetTitle as j } from "../../widget/widget-title/StyledWidgetTitle.js";
|
|
5
5
|
import { ToolbarActionGroup as c, hasPlannedActions as u } from "./ToolbarActionGroup.js";
|
|
6
|
-
import { formatSelectionLabel as
|
|
7
|
-
import { Fragment as o, jsx as
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
6
|
+
import { formatSelectionLabel as k } from "./useTranslations.js";
|
|
7
|
+
import { Fragment as o, jsx as i, jsxs as r } from "react/jsx-runtime";
|
|
8
|
+
function I({ selectedCount: e, onClearSelection: n, translations: t }) {
|
|
9
|
+
return /* @__PURE__ */ i("div", {
|
|
10
10
|
className: "flex shrink-0 items-center whitespace-nowrap",
|
|
11
11
|
"aria-live": "polite",
|
|
12
12
|
"aria-atomic": "true",
|
|
13
|
-
children: /* @__PURE__ */
|
|
13
|
+
children: /* @__PURE__ */ i(b, {
|
|
14
14
|
dataTest: "dynamic-toolbar-clear-selection",
|
|
15
15
|
variant: "text",
|
|
16
16
|
size: "small",
|
|
17
17
|
className: "!min-w-0 !px-1 !font-semibold",
|
|
18
|
-
startIcon:
|
|
18
|
+
startIcon: n ? /* @__PURE__ */ i(T, {
|
|
19
19
|
width: 20,
|
|
20
20
|
height: 20
|
|
21
21
|
}) : void 0,
|
|
22
|
-
onClick:
|
|
22
|
+
onClick: n,
|
|
23
23
|
"aria-label": t.clearSelection,
|
|
24
|
-
children:
|
|
24
|
+
children: k(e, t)
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function q({ selectedCount: e, onClearSelection: n, translations: t, bulkActionsPlan: l }) {
|
|
29
29
|
return /* @__PURE__ */ r("div", {
|
|
30
30
|
className: "flex w-full min-w-0 flex-nowrap items-center justify-between gap-3",
|
|
31
|
-
children: [/* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ i(I, {
|
|
32
32
|
selectedCount: e,
|
|
33
|
-
onClearSelection:
|
|
33
|
+
onClearSelection: n,
|
|
34
34
|
translations: t
|
|
35
|
-
}), /* @__PURE__ */
|
|
35
|
+
}), /* @__PURE__ */ i(c, {
|
|
36
36
|
plan: l,
|
|
37
37
|
overflowMenuLabel: t.more,
|
|
38
38
|
selectionTone: !0
|
|
39
39
|
})]
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function N({ search: e, expanded:
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
ref:
|
|
45
|
-
|
|
42
|
+
function N({ search: e, expanded: n, measureRef: t }) {
|
|
43
|
+
return /* @__PURE__ */ i("div", {
|
|
44
|
+
ref: n ? void 0 : t,
|
|
45
|
+
style: n ? { "--dynamic-toolbar-search-width": "100%" } : void 0,
|
|
46
|
+
className: f(n ? "min-w-0 flex-1" : "w-40 shrink-0"),
|
|
46
47
|
children: e
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
|
-
function S({ visible: e, children:
|
|
50
|
-
return /* @__PURE__ */
|
|
50
|
+
function S({ visible: e, children: n }) {
|
|
51
|
+
return /* @__PURE__ */ i("div", {
|
|
51
52
|
className: f("overflow-hidden whitespace-nowrap transition-[max-width,opacity] duration-200 ease-in-out", e ? "max-w-[2000px] opacity-100" : "pointer-events-none max-w-0 opacity-0"),
|
|
52
53
|
"aria-hidden": !e,
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ i("div", {
|
|
54
55
|
className: "inline-flex items-center gap-2",
|
|
55
|
-
children:
|
|
56
|
+
children: n
|
|
56
57
|
})
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
return typeof e == "string" ? /* @__PURE__ */
|
|
61
|
-
ref:
|
|
60
|
+
function F({ title: e, measureRef: n }) {
|
|
61
|
+
return typeof e == "string" ? /* @__PURE__ */ i(j, {
|
|
62
|
+
ref: n,
|
|
62
63
|
className: "!min-w-0 truncate",
|
|
63
64
|
children: e
|
|
64
|
-
}) : /* @__PURE__ */
|
|
65
|
-
ref:
|
|
65
|
+
}) : /* @__PURE__ */ i("div", {
|
|
66
|
+
ref: n,
|
|
66
67
|
className: "min-w-0 truncate",
|
|
67
68
|
children: e
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
|
-
function
|
|
71
|
-
return !e && !
|
|
71
|
+
function D({ title: e, helperText: n, titleMeasureRef: t }) {
|
|
72
|
+
return !e && !n ? null : /* @__PURE__ */ r("div", {
|
|
72
73
|
className: "min-w-0 max-w-full",
|
|
73
|
-
children: [e && /* @__PURE__ */
|
|
74
|
+
children: [e && /* @__PURE__ */ i(F, {
|
|
74
75
|
title: e,
|
|
75
76
|
measureRef: t
|
|
76
|
-
}),
|
|
77
|
+
}), n && /* @__PURE__ */ i("div", {
|
|
77
78
|
className: "mt-1 text-sm text-delta-700",
|
|
78
|
-
children:
|
|
79
|
+
children: n
|
|
79
80
|
})]
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
const m =
|
|
83
|
+
function E({ variant: e, beforeFilterActionsPlan: n, filter: t, search: l, afterSearchActionsPlan: h, bulkActionsPlan: a, showPageActions: p, overflowMenuLabel: s, searchMeasureRef: g, align: B = "end" }) {
|
|
84
|
+
const m = p && u(n), d = p && u(h), w = e === "inline-selection" && u(a);
|
|
84
85
|
if (!(t != null || l != null) && !m && !d && !w) return null;
|
|
85
|
-
const x = m ? /* @__PURE__ */
|
|
86
|
+
const x = m ? /* @__PURE__ */ i(S, {
|
|
86
87
|
visible: m,
|
|
87
|
-
children: /* @__PURE__ */
|
|
88
|
-
plan:
|
|
88
|
+
children: /* @__PURE__ */ i(c, {
|
|
89
|
+
plan: n,
|
|
89
90
|
overflowMenuLabel: s
|
|
90
91
|
})
|
|
91
|
-
}) : null, v = d ? /* @__PURE__ */
|
|
92
|
+
}) : null, v = d ? /* @__PURE__ */ i(S, {
|
|
92
93
|
visible: d,
|
|
93
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ i("div", {
|
|
94
95
|
className: "flex flex-nowrap items-center gap-2",
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
-
plan:
|
|
96
|
+
children: /* @__PURE__ */ i(c, {
|
|
97
|
+
plan: h,
|
|
97
98
|
overflowMenuLabel: s
|
|
98
99
|
})
|
|
99
100
|
})
|
|
100
|
-
}) : null, y = /* @__PURE__ */ r(o, { children: [t, l != null && /* @__PURE__ */
|
|
101
|
+
}) : null, y = /* @__PURE__ */ r(o, { children: [t, l != null && /* @__PURE__ */ i(N, {
|
|
101
102
|
search: l,
|
|
102
103
|
measureRef: g
|
|
103
104
|
})] });
|
|
104
105
|
return /* @__PURE__ */ r("div", {
|
|
105
106
|
className: f("flex w-full min-w-0 flex-nowrap items-center gap-2", B === "end" ? "justify-end" : "justify-start"),
|
|
106
107
|
children: [
|
|
107
|
-
e === "inline-selection" && /* @__PURE__ */ r(o, { children: [w && a && /* @__PURE__ */
|
|
108
|
+
e === "inline-selection" && /* @__PURE__ */ r(o, { children: [w && a && /* @__PURE__ */ i(c, {
|
|
108
109
|
plan: a,
|
|
109
110
|
overflowMenuLabel: s,
|
|
110
111
|
selectionTone: !0
|
|
@@ -116,7 +117,7 @@ function q({ variant: e, beforeFilterActionsPlan: i, filter: t, search: l, after
|
|
|
116
117
|
] }),
|
|
117
118
|
e === "utility-row" && /* @__PURE__ */ r(o, { children: [
|
|
118
119
|
x,
|
|
119
|
-
l != null && /* @__PURE__ */
|
|
120
|
+
l != null && /* @__PURE__ */ i(N, {
|
|
120
121
|
search: l,
|
|
121
122
|
expanded: !0
|
|
122
123
|
}),
|
|
@@ -128,9 +129,9 @@ function q({ variant: e, beforeFilterActionsPlan: i, filter: t, search: l, after
|
|
|
128
129
|
}
|
|
129
130
|
export {
|
|
130
131
|
N as SearchSlot,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
I as SelectionIndicator,
|
|
133
|
+
q as SelectionRow,
|
|
134
|
+
D as TitleBlock,
|
|
135
|
+
F as TitleText,
|
|
136
|
+
E as UtilityCluster
|
|
136
137
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cn as f } from "../../../helpers/cn.js";
|
|
2
|
-
import { resolveSx as
|
|
3
|
-
import { CloseIcon as
|
|
4
|
-
import { StyledButton as
|
|
2
|
+
import { resolveSx as S } from "../../../helpers/sx.js";
|
|
3
|
+
import { CloseIcon as X } from "../../icons/close-icon/CloseIcon.js";
|
|
4
|
+
import { StyledButton as B } from "../../inputs/button/StyledButton.js";
|
|
5
5
|
import { useMobileMediaQuery as G } from "../../../hooks/useMediaQuery.hook.js";
|
|
6
6
|
import P from "./StyledDialog.module.js";
|
|
7
|
-
import { useEffect as
|
|
7
|
+
import { useEffect as D, useLayoutEffect as Q, useRef as u } from "react";
|
|
8
8
|
import { jsx as l, jsxs as r } from "react/jsx-runtime";
|
|
9
9
|
var $ = {
|
|
10
10
|
xs: 444,
|
|
@@ -12,51 +12,51 @@ var $ = {
|
|
|
12
12
|
md: 900,
|
|
13
13
|
lg: 1200,
|
|
14
14
|
xl: 1536
|
|
15
|
-
}, te = ({ open: t, onClose: a, children:
|
|
16
|
-
const I = G(),
|
|
17
|
-
|
|
15
|
+
}, te = ({ open: t, onClose: a, children: _, dataTest: i, maxWidth: x = "sm", fullWidth: C, fullScreen: E, scroll: p = "paper", disableEscapeKeyDown: h, className: H, style: j, sx: M, classes: y, PaperProps: R, slotProps: o, onCloseText: w, showCloseIcon: v = !0, dialogLabel: d, dialogTitle: s, dialogHeaderNode: W }) => {
|
|
16
|
+
const I = G(), b = u(null), c = u(!1), g = u(t), n = I ? !0 : E;
|
|
17
|
+
D(() => {
|
|
18
18
|
g.current && !t && o?.transition?.onExited?.(), g.current = t;
|
|
19
19
|
}, [t, o]), Q(() => {
|
|
20
|
-
const e =
|
|
21
|
-
e
|
|
22
|
-
}, [t]),
|
|
20
|
+
const e = b.current;
|
|
21
|
+
!e || !t || e.open || (e.showModal(), e.focus({ preventScroll: !0 }), requestAnimationFrame(() => e.open && e.focus({ preventScroll: !0 })));
|
|
22
|
+
}, [t]), D(() => {
|
|
23
23
|
if (!t) return;
|
|
24
|
-
const e = document.body.style.overflow,
|
|
24
|
+
const e = document.body.style.overflow, K = document.documentElement.style.overflow;
|
|
25
25
|
return document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden", () => {
|
|
26
|
-
document.body.style.overflow = e, document.documentElement.style.overflow =
|
|
26
|
+
document.body.style.overflow = e, document.documentElement.style.overflow = K;
|
|
27
27
|
};
|
|
28
28
|
}, [t]);
|
|
29
29
|
const m = {
|
|
30
30
|
...R,
|
|
31
31
|
...o?.paper
|
|
32
|
-
}, k = x === !1 ? void 0 : $[x], { className: O, style: z, onClick:
|
|
32
|
+
}, k = x === !1 ? void 0 : $[x], { className: O, style: z, onClick: q, ...A } = o?.backdrop ?? {}, N = (e) => {
|
|
33
33
|
c.current || (c.current = !0, window.setTimeout(() => {
|
|
34
34
|
c.current = !1;
|
|
35
35
|
}, 0), a?.(e, "escapeKeyDown"));
|
|
36
|
-
},
|
|
36
|
+
}, F = (e) => {
|
|
37
37
|
e.preventDefault(), h || N(e);
|
|
38
38
|
};
|
|
39
39
|
return t ? /* @__PURE__ */ r("dialog", {
|
|
40
|
-
ref:
|
|
40
|
+
ref: b,
|
|
41
41
|
tabIndex: -1,
|
|
42
42
|
"data-testid": i,
|
|
43
43
|
"aria-label": i,
|
|
44
|
-
onCancel:
|
|
44
|
+
onCancel: F,
|
|
45
45
|
onKeyDown: (e) => {
|
|
46
46
|
e.key !== "Escape" || h || (e.preventDefault(), N(e));
|
|
47
47
|
},
|
|
48
|
-
className: f(P.StyledDialog, "fixed inset-0 m-0 h-full max-h-none w-full max-w-none items-center justify-center overflow-hidden border-0 bg-transparent p-0 outline-none open:flex", p === "body" && "overflow-y-auto",
|
|
48
|
+
className: f(P.StyledDialog, "fixed inset-0 m-0 h-full max-h-none w-full max-w-none items-center justify-center overflow-hidden border-0 bg-transparent p-0 outline-none open:flex", p === "body" && "overflow-y-auto", H, y?.root),
|
|
49
49
|
style: {
|
|
50
50
|
zIndex: 999,
|
|
51
|
-
...
|
|
51
|
+
...S(M),
|
|
52
52
|
...j
|
|
53
53
|
},
|
|
54
54
|
children: [/* @__PURE__ */ l("div", {
|
|
55
|
-
...
|
|
55
|
+
...A,
|
|
56
56
|
className: f("absolute inset-0 bg-[#626e7eb2]", O),
|
|
57
57
|
style: z,
|
|
58
58
|
onClick: (e) => {
|
|
59
|
-
|
|
59
|
+
q?.(e), e.defaultPrevented || a?.(e, "backdropClick");
|
|
60
60
|
}
|
|
61
61
|
}), /* @__PURE__ */ r("div", {
|
|
62
62
|
className: f("relative z-[1] flex overflow-hidden rounded-lg border-0 bg-white p-0 text-delta-800 shadow-[0px_4px_40px_0px_#22213366]", p === "paper" && "flex-col", n && "rounded-none", m.className, y?.paper),
|
|
@@ -70,10 +70,10 @@ var $ = {
|
|
|
70
70
|
height: "100%",
|
|
71
71
|
maxHeight: "100%"
|
|
72
72
|
} : {
|
|
73
|
-
width:
|
|
73
|
+
width: C ? "calc(100% - 64px)" : "auto",
|
|
74
74
|
maxHeight: "100%"
|
|
75
75
|
},
|
|
76
|
-
...
|
|
76
|
+
...S(m.sx),
|
|
77
77
|
...m.style,
|
|
78
78
|
...n ? {
|
|
79
79
|
width: "100%",
|
|
@@ -82,7 +82,7 @@ var $ = {
|
|
|
82
82
|
maxHeight: "100%"
|
|
83
83
|
} : { maxHeight: "calc(100% - 64px)" }
|
|
84
84
|
},
|
|
85
|
-
children: [(!!d || !!s ||
|
|
85
|
+
children: [(!!d || !!s || v) && /* @__PURE__ */ r("div", {
|
|
86
86
|
className: "box-border flex w-full min-w-0 max-w-full justify-between px-4 pt-4",
|
|
87
87
|
children: [/* @__PURE__ */ r("div", {
|
|
88
88
|
className: "flex min-w-0 flex-1 flex-col justify-start gap-0.5",
|
|
@@ -93,14 +93,14 @@ var $ = {
|
|
|
93
93
|
className: "flex text-2xl font-semibold leading-8 text-delta-800",
|
|
94
94
|
children: s
|
|
95
95
|
})]
|
|
96
|
-
}),
|
|
96
|
+
}), v && /* @__PURE__ */ r("div", {
|
|
97
97
|
className: "flex min-w-0 max-w-full shrink-0 justify-end gap-2",
|
|
98
|
-
children: [W, /* @__PURE__ */ l(
|
|
98
|
+
children: [W, /* @__PURE__ */ l(B, {
|
|
99
99
|
dataTest: `close-button-${i}`,
|
|
100
100
|
"aria-label": w ? void 0 : "Close",
|
|
101
101
|
variant: "textGray",
|
|
102
102
|
size: "small",
|
|
103
|
-
endIcon: /* @__PURE__ */ l(
|
|
103
|
+
endIcon: /* @__PURE__ */ l(X, {
|
|
104
104
|
width: 20,
|
|
105
105
|
height: 20
|
|
106
106
|
}),
|
|
@@ -114,7 +114,7 @@ var $ = {
|
|
|
114
114
|
children: w
|
|
115
115
|
})]
|
|
116
116
|
})]
|
|
117
|
-
}),
|
|
117
|
+
}), _]
|
|
118
118
|
})]
|
|
119
119
|
}) : null;
|
|
120
120
|
};
|
|
@@ -4,8 +4,8 @@ import { CloseIcon as f } from "../../icons/close-icon/CloseIcon.js";
|
|
|
4
4
|
import { StyledInputField as u } from "../input-field/StyledInputField.js";
|
|
5
5
|
import { useState as v } from "react";
|
|
6
6
|
import { jsx as t } from "react/jsx-runtime";
|
|
7
|
-
var
|
|
8
|
-
const [h,
|
|
7
|
+
var I = ({ value: o, onClear: s, label: n, onFocus: d, onBlur: c, ...r }) => {
|
|
8
|
+
const [h, a] = v(!1), i = h || o, l = typeof n == "string" ? n : void 0;
|
|
9
9
|
return /* @__PURE__ */ t("div", {
|
|
10
10
|
className: "relative w-full",
|
|
11
11
|
children: /* @__PURE__ */ t(u, {
|
|
@@ -13,12 +13,12 @@ var b = ({ value: o, onClear: s, label: n, onFocus: d, onBlur: c, ...r }) => {
|
|
|
13
13
|
variant: "outlined",
|
|
14
14
|
value: o,
|
|
15
15
|
label: i ? n : void 0,
|
|
16
|
-
placeholder: i ? void 0 :
|
|
16
|
+
placeholder: i ? void 0 : l,
|
|
17
17
|
onFocus: (e) => {
|
|
18
|
-
|
|
18
|
+
a(!0), d?.(e);
|
|
19
19
|
},
|
|
20
20
|
onBlur: (e) => {
|
|
21
|
-
|
|
21
|
+
a(!1), c?.(e);
|
|
22
22
|
},
|
|
23
23
|
slotProps: {
|
|
24
24
|
htmlInput: {
|
|
@@ -28,7 +28,7 @@ var b = ({ value: o, onClear: s, label: n, onFocus: d, onBlur: c, ...r }) => {
|
|
|
28
28
|
whiteSpace: "nowrap",
|
|
29
29
|
...o ? { paddingRight: 40 } : {}
|
|
30
30
|
},
|
|
31
|
-
"aria-label": i ? void 0 :
|
|
31
|
+
"aria-label": i ? void 0 : l
|
|
32
32
|
},
|
|
33
33
|
input: {
|
|
34
34
|
endAdornment: o ? /* @__PURE__ */ t("button", {
|
|
@@ -65,12 +65,12 @@ var b = ({ value: o, onClear: s, label: n, onFocus: d, onBlur: c, ...r }) => {
|
|
|
65
65
|
},
|
|
66
66
|
...r,
|
|
67
67
|
sx: {
|
|
68
|
-
|
|
68
|
+
width: r.fullWidth ? "100%" : "var(--dynamic-toolbar-search-width, 160px)",
|
|
69
69
|
...r.sx
|
|
70
70
|
}
|
|
71
71
|
})
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
74
|
export {
|
|
75
|
-
|
|
75
|
+
I as StyledSearchField
|
|
76
76
|
};
|
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
var
|
|
2
|
-
"asma-ui-table-styled-table": "_asma-ui-table-styled-
|
|
3
|
-
"table-wrapper": "_table-
|
|
4
|
-
"table-shell": "_table-
|
|
5
|
-
"table-wrapper--no-rows": "_table-wrapper--no-
|
|
6
|
-
"table-wrapper--proxy": "_table-wrapper--
|
|
7
|
-
"table-wrapper--proxy-bottom": "_table-wrapper--proxy-
|
|
8
|
-
"table-wrapper-fetching": "_table-wrapper-
|
|
9
|
-
"table-scroll": "_table-
|
|
10
|
-
"table-x--fill-height": "_table-x--fill-
|
|
11
|
-
"table-x": "_table-
|
|
12
|
-
"table-content": "_table-
|
|
13
|
-
"table-header--sticky": "_table-header--
|
|
14
|
-
"table-hscroll": "_table-
|
|
15
|
-
"table-hscroll__content": "_table-
|
|
16
|
-
"no-rows-overlay-container": "_no-rows-overlay-
|
|
17
|
-
"no-rows-overlay-content": "_no-rows-overlay-
|
|
18
|
-
"styled-table": "_styled-
|
|
19
|
-
tbody:
|
|
20
|
-
"loading-icon": "_loading-
|
|
21
|
-
"t-row": "_t-
|
|
22
|
-
"t-cell": "_t-
|
|
23
|
-
"action-cell": "_action-
|
|
24
|
-
"fixed-cell": "_fixed-
|
|
25
|
-
"fixed-right-cell": "_fixed-right-
|
|
26
|
-
expanded_row:
|
|
27
|
-
selected:
|
|
28
|
-
"single-selection": "_single-
|
|
29
|
-
"action-cell--no-shadow": "_action-cell--no-
|
|
30
|
-
shadowed:
|
|
31
|
-
"shadowed-right": "_shadowed-
|
|
32
|
-
"is-loading": "_is-
|
|
33
|
-
"action-cell-default-background": "_action-cell-default-
|
|
34
|
-
"fixed-cell-default-background": "_fixed-cell-default-
|
|
35
|
-
"fixed-right-cell-default-background": "_fixed-right-cell-default-
|
|
36
|
-
"sortable-column": "_sortable-
|
|
37
|
-
resizer:
|
|
38
|
-
isResizing:
|
|
39
|
-
"hide-table-header": "_hide-table-
|
|
40
|
-
"show-table-header": "_show-table-
|
|
41
|
-
"table-header": "_table-
|
|
42
|
-
"hide-header": "_hide-
|
|
43
|
-
"t-cell__actions": "_t-
|
|
44
|
-
"t-cell__actions--no-shadow": "_t-cell__actions--no-
|
|
45
|
-
"t-cell__fixed": "_t-
|
|
46
|
-
"t-cell__fixed-right": "_t-cell__fixed-
|
|
47
|
-
"sort-icon": "_sort-
|
|
48
|
-
"header-content": "_header-
|
|
49
|
-
"table-footer--sticky": "_table-footer--
|
|
50
|
-
"table-footer--inline": "_table-footer--
|
|
51
|
-
"table-bottom": "_table-
|
|
52
|
-
"table-bottom--sticky": "_table-bottom--
|
|
53
|
-
"cursor-not-allowed": "_cursor-not-
|
|
1
|
+
var e = "_tbody_qdh8h_124", _ = "_expanded_row_qdh8h_187", l = "_selected_qdh8h_205", h = "_shadowed_qdh8h_228", t = "_resizer_qdh8h_282", a = "_isResizing_qdh8h_294", d = {
|
|
2
|
+
"asma-ui-table-styled-table": "_asma-ui-table-styled-table_qdh8h_1",
|
|
3
|
+
"table-wrapper": "_table-wrapper_qdh8h_26",
|
|
4
|
+
"table-shell": "_table-shell_qdh8h_33",
|
|
5
|
+
"table-wrapper--no-rows": "_table-wrapper--no-rows_qdh8h_39",
|
|
6
|
+
"table-wrapper--proxy": "_table-wrapper--proxy_qdh8h_42",
|
|
7
|
+
"table-wrapper--proxy-bottom": "_table-wrapper--proxy-bottom_qdh8h_43",
|
|
8
|
+
"table-wrapper-fetching": "_table-wrapper-fetching_qdh8h_53",
|
|
9
|
+
"table-scroll": "_table-scroll_qdh8h_56",
|
|
10
|
+
"table-x--fill-height": "_table-x--fill-height_qdh8h_65",
|
|
11
|
+
"table-x": "_table-x_qdh8h_65",
|
|
12
|
+
"table-content": "_table-content_qdh8h_80",
|
|
13
|
+
"table-header--sticky": "_table-header--sticky_qdh8h_85",
|
|
14
|
+
"table-hscroll": "_table-hscroll_qdh8h_90",
|
|
15
|
+
"table-hscroll__content": "_table-hscroll__content_qdh8h_100",
|
|
16
|
+
"no-rows-overlay-container": "_no-rows-overlay-container_qdh8h_103",
|
|
17
|
+
"no-rows-overlay-content": "_no-rows-overlay-content_qdh8h_111",
|
|
18
|
+
"styled-table": "_styled-table_qdh8h_115",
|
|
19
|
+
tbody: e,
|
|
20
|
+
"loading-icon": "_loading-icon_qdh8h_129",
|
|
21
|
+
"t-row": "_t-row_qdh8h_136",
|
|
22
|
+
"t-cell": "_t-cell_qdh8h_136",
|
|
23
|
+
"action-cell": "_action-cell_qdh8h_146",
|
|
24
|
+
"fixed-cell": "_fixed-cell_qdh8h_150",
|
|
25
|
+
"fixed-right-cell": "_fixed-right-cell_qdh8h_153",
|
|
26
|
+
expanded_row: _,
|
|
27
|
+
selected: l,
|
|
28
|
+
"single-selection": "_single-selection_qdh8h_208",
|
|
29
|
+
"action-cell--no-shadow": "_action-cell--no-shadow_qdh8h_225",
|
|
30
|
+
shadowed: h,
|
|
31
|
+
"shadowed-right": "_shadowed-right_qdh8h_262",
|
|
32
|
+
"is-loading": "_is-loading_qdh8h_266",
|
|
33
|
+
"action-cell-default-background": "_action-cell-default-background_qdh8h_269",
|
|
34
|
+
"fixed-cell-default-background": "_fixed-cell-default-background_qdh8h_272",
|
|
35
|
+
"fixed-right-cell-default-background": "_fixed-right-cell-default-background_qdh8h_275",
|
|
36
|
+
"sortable-column": "_sortable-column_qdh8h_278",
|
|
37
|
+
resizer: t,
|
|
38
|
+
isResizing: a,
|
|
39
|
+
"hide-table-header": "_hide-table-header_qdh8h_306",
|
|
40
|
+
"show-table-header": "_show-table-header_qdh8h_310",
|
|
41
|
+
"table-header": "_table-header_qdh8h_85",
|
|
42
|
+
"hide-header": "_hide-header_qdh8h_346",
|
|
43
|
+
"t-cell__actions": "_t-cell__actions_qdh8h_349",
|
|
44
|
+
"t-cell__actions--no-shadow": "_t-cell__actions--no-shadow_qdh8h_357",
|
|
45
|
+
"t-cell__fixed": "_t-cell__fixed_qdh8h_361",
|
|
46
|
+
"t-cell__fixed-right": "_t-cell__fixed-right_qdh8h_368",
|
|
47
|
+
"sort-icon": "_sort-icon_qdh8h_375",
|
|
48
|
+
"header-content": "_header-content_qdh8h_379",
|
|
49
|
+
"table-footer--sticky": "_table-footer--sticky_qdh8h_394",
|
|
50
|
+
"table-footer--inline": "_table-footer--inline_qdh8h_405",
|
|
51
|
+
"table-bottom": "_table-bottom_qdh8h_416",
|
|
52
|
+
"table-bottom--sticky": "_table-bottom--sticky_qdh8h_430",
|
|
53
|
+
"cursor-not-allowed": "_cursor-not-allowed_qdh8h_434",
|
|
54
|
+
"select-control": "_select-control_qdh8h_438"
|
|
54
55
|
};
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
d as default
|
|
57
58
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { SELECT_COLUMN_ID as
|
|
2
|
-
import
|
|
3
|
-
import { StyledCheckbox as
|
|
4
|
-
import { StyledTooltip as
|
|
1
|
+
import { SELECT_COLUMN_ID as p } from "../../types.js";
|
|
2
|
+
import s from "../StyledTable.module.js";
|
|
3
|
+
import { StyledCheckbox as c } from "../../shared-components/StyledCheckbox.js";
|
|
4
|
+
import { StyledTooltip as u } from "../../shared-components/tooltip/index.js";
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
-
var
|
|
6
|
+
var a = (t) => {
|
|
7
7
|
t.preventDefault(), t.stopPropagation();
|
|
8
|
-
}, i = (t,
|
|
9
|
-
t.key !== "Enter" && t.key !== " " || (t.preventDefault(), t.stopPropagation(),
|
|
8
|
+
}, i = (t, l) => {
|
|
9
|
+
t.key !== "Enter" && t.key !== " " || (t.preventDefault(), t.stopPropagation(), l());
|
|
10
10
|
}, w = (t) => t === "no" ? {
|
|
11
11
|
selectAll: "Velg alle rader",
|
|
12
|
-
selectRow: (
|
|
12
|
+
selectRow: (l) => `Velg rad ${l}`
|
|
13
13
|
} : {
|
|
14
14
|
selectAll: "Select all rows",
|
|
15
|
-
selectRow: (
|
|
15
|
+
selectRow: (l) => `Select row ${l}`
|
|
16
16
|
};
|
|
17
|
-
function k(t,
|
|
18
|
-
const
|
|
17
|
+
function k(t, l, d) {
|
|
18
|
+
const n = w(d);
|
|
19
19
|
return {
|
|
20
|
-
id:
|
|
20
|
+
id: p,
|
|
21
21
|
minSize: 38,
|
|
22
22
|
maxSize: 38,
|
|
23
23
|
size: 38,
|
|
24
24
|
header: ({ table: e }) => /* @__PURE__ */ r("div", {
|
|
25
25
|
role: "checkbox",
|
|
26
26
|
tabIndex: 0,
|
|
27
|
-
"aria-label":
|
|
27
|
+
"aria-label": n.selectAll,
|
|
28
28
|
"aria-checked": e.getIsSomeRowsSelected() ? "mixed" : e.getIsAllRowsSelected(),
|
|
29
|
-
className: "
|
|
29
|
+
className: s["select-control"],
|
|
30
30
|
onClick: () => e.toggleAllRowsSelected(),
|
|
31
|
-
onMouseDown:
|
|
32
|
-
onMouseUp:
|
|
33
|
-
onKeyDown: (
|
|
34
|
-
children: /* @__PURE__ */ r(
|
|
31
|
+
onMouseDown: a,
|
|
32
|
+
onMouseUp: a,
|
|
33
|
+
onKeyDown: (o) => i(o, () => e.toggleAllRowsSelected()),
|
|
34
|
+
children: /* @__PURE__ */ r(c, {
|
|
35
35
|
size: "small",
|
|
36
36
|
dataTest: "cell-select-all",
|
|
37
37
|
"aria-hidden": !0,
|
|
@@ -43,37 +43,37 @@ function k(t, o, c) {
|
|
|
43
43
|
})
|
|
44
44
|
}),
|
|
45
45
|
cell: ({ cell: e }) => {
|
|
46
|
-
const
|
|
46
|
+
const o = !e.row.getCanSelect();
|
|
47
47
|
return /* @__PURE__ */ r("div", {
|
|
48
48
|
role: "checkbox",
|
|
49
|
-
tabIndex:
|
|
50
|
-
"aria-label":
|
|
49
|
+
tabIndex: o ? -1 : 0,
|
|
50
|
+
"aria-label": n.selectRow(e.row.index + 1),
|
|
51
51
|
"aria-checked": e.row.getIsSelected(),
|
|
52
|
-
"aria-disabled":
|
|
53
|
-
style: { height:
|
|
54
|
-
className: "
|
|
52
|
+
"aria-disabled": o,
|
|
53
|
+
style: { height: l ?? "auto" },
|
|
54
|
+
className: s["select-control"],
|
|
55
55
|
onClick: () => {
|
|
56
|
-
|
|
56
|
+
o || e.row.toggleSelected();
|
|
57
57
|
},
|
|
58
|
-
onMouseDown:
|
|
59
|
-
onMouseUp:
|
|
60
|
-
onKeyDown: (
|
|
61
|
-
|
|
58
|
+
onMouseDown: a,
|
|
59
|
+
onMouseUp: a,
|
|
60
|
+
onKeyDown: (m) => {
|
|
61
|
+
o || i(m, () => e.row.toggleSelected());
|
|
62
62
|
},
|
|
63
|
-
children: /* @__PURE__ */ r(
|
|
63
|
+
children: /* @__PURE__ */ r(u, {
|
|
64
64
|
arrow: !0,
|
|
65
65
|
placement: "top-start",
|
|
66
66
|
title: e.row.getRowSelectionTooltip(),
|
|
67
67
|
children: /* @__PURE__ */ r("span", {
|
|
68
|
-
className:
|
|
69
|
-
children: /* @__PURE__ */ r(
|
|
68
|
+
className: o ? s["cursor-not-allowed"] : void 0,
|
|
69
|
+
children: /* @__PURE__ */ r(c, {
|
|
70
70
|
size: "small",
|
|
71
71
|
dataTest: "cell-select",
|
|
72
72
|
"aria-hidden": !0,
|
|
73
73
|
tabIndex: -1,
|
|
74
74
|
checked: e.row.getIsSelected(),
|
|
75
75
|
hideWrapper: !0,
|
|
76
|
-
disabled:
|
|
76
|
+
disabled: o,
|
|
77
77
|
className: "pointer-events-none"
|
|
78
78
|
})
|
|
79
79
|
})
|