asma-ui-core 3.103.0 → 3.104.0
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/data-display/badge/StyledBadge.js +30 -34
- package/dist/components/data-display/virtualized-list/VirtualizedList.js +16 -15
- package/dist/components/feedback/dialog/StyledDialog.js +71 -62
- package/dist/components/feedback/dialog/StyledDialogTitle.js +25 -14
- package/dist/components/feedback/dialog/dialogTitleContext.js +5 -0
- package/dist/components/miscellaneous/StyledFormControlLabel.js +14 -14
- package/dist/components/navigation/link/StyledLink.js +25 -18
- package/dist/components/navigation/link/StyledLink.module.js +6 -5
- package/dist/components/navigation/menu/StyledMenu.js +17 -16
- package/dist/components/navigation/menu/StyledMenu.module.js +5 -2
- package/dist/components/navigation/menu/StyledMenuList.js +35 -30
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +2 -0
- package/dist/src/components/feedback/dialog/StyledDialogTitle.d.ts +4 -1
- package/dist/src/components/feedback/dialog/dialogTitleContext.d.ts +15 -0
- package/dist/src/components/navigation/link/StyledLink.d.ts +3 -2
- package/dist/src/table/components/columns/dndHandleColumn.d.ts +2 -1
- package/dist/src/table/components/columns/expandColumn.d.ts +1 -1
- package/dist/src/table/components/columns/showTextColumn.d.ts +1 -1
- package/dist/table/components/columns/dndHandleColumn.js +20 -18
- package/dist/table/components/columns/expandColumn.js +15 -15
- package/dist/table/components/columns/showTextColumn.js +20 -19
- package/dist/table/helpers/injectColumns.js +8 -8
- package/package.json +1 -1
|
@@ -1,60 +1,65 @@
|
|
|
1
1
|
import { cn as S } from "../../../helpers/cn.js";
|
|
2
|
-
import { consumerOverrides as
|
|
3
|
-
import
|
|
4
|
-
import { useEffect as I, useLayoutEffect as
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
7
|
-
const i =
|
|
8
|
-
|
|
2
|
+
import { consumerOverrides as R } from "../../../helpers/classOverride.js";
|
|
3
|
+
import y from "./StyledMenu.module.js";
|
|
4
|
+
import { useEffect as I, useLayoutEffect as k, useRef as q } from "react";
|
|
5
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
6
|
+
var b = '[role="menu"], [role="listbox"]', c = '[role="menuitem"]', A = (l) => Array.from(l.childNodes).flatMap((r) => r instanceof HTMLElement ? r.hidden ? [] : r.matches(b) ? [null] : r.matches(c) ? [r] : r.querySelector(c) ? A(r) : [null] : r.textContent?.trim() ? [null] : []), g = (l) => l ? Array.from(l.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) : [], O = ({ children: l, id: r, role: x = "menu", className: m, autoFocus: f, disablePadding: E, onClick: w, onKeyDown: v }) => {
|
|
7
|
+
const i = q(null), d = R(m, "padding");
|
|
8
|
+
k(() => {
|
|
9
9
|
const e = i.current;
|
|
10
10
|
if (!e) return;
|
|
11
11
|
const t = () => {
|
|
12
|
-
const
|
|
13
|
-
Array.from(e.querySelectorAll(
|
|
12
|
+
const s = A(e);
|
|
13
|
+
if (Array.from(e.querySelectorAll(c)).filter((n) => n.closest(b) === e).forEach((n) => n.removeAttribute("data-menu-separator")), s.forEach((n, a) => n?.toggleAttribute("data-menu-separator", !!s[a + 1])), e.classList.contains(y.anchoredList)) {
|
|
14
|
+
const n = (s.every(Boolean) ? s[7] : null)?.getBoundingClientRect(), a = n && n.height > 0 ? n.top - e.getBoundingClientRect().top + e.scrollTop + n.height / 2 : null;
|
|
15
|
+
e.style.maxHeight = a === null ? "" : `${a}px`, e.toggleAttribute("data-menu-scroll", a !== null);
|
|
16
|
+
}
|
|
14
17
|
};
|
|
15
18
|
t();
|
|
16
|
-
const
|
|
17
|
-
return
|
|
19
|
+
const u = requestAnimationFrame(t), o = new MutationObserver(t);
|
|
20
|
+
return o.observe(e, {
|
|
18
21
|
childList: !0,
|
|
19
22
|
subtree: !0,
|
|
20
23
|
attributes: !0,
|
|
21
24
|
attributeFilter: ["hidden"]
|
|
22
|
-
}), () =>
|
|
25
|
+
}), () => {
|
|
26
|
+
cancelAnimationFrame(u), o.disconnect();
|
|
27
|
+
};
|
|
23
28
|
}, []), I(() => {
|
|
24
|
-
f &&
|
|
29
|
+
f && g(i.current)[0]?.focus();
|
|
25
30
|
}, [f]);
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
31
|
+
const L = (e) => {
|
|
32
|
+
if (v?.(e), ![
|
|
28
33
|
"ArrowDown",
|
|
29
34
|
"ArrowUp",
|
|
30
35
|
"Home",
|
|
31
36
|
"End"
|
|
32
37
|
].includes(e.key)) return;
|
|
33
38
|
e.preventDefault();
|
|
34
|
-
const t =
|
|
39
|
+
const t = g(i.current);
|
|
35
40
|
if (t.length === 0) return;
|
|
36
|
-
const
|
|
37
|
-
let
|
|
38
|
-
e.key === "ArrowDown" ?
|
|
39
|
-
},
|
|
41
|
+
const u = t.findIndex((s) => s === document.activeElement);
|
|
42
|
+
let o = u;
|
|
43
|
+
e.key === "ArrowDown" ? o = (u + 1) % t.length : e.key === "ArrowUp" ? o = (u - 1 + t.length) % t.length : e.key === "Home" ? o = 0 : e.key === "End" && (o = t.length - 1), t[o]?.focus(), i.current?.hasAttribute("data-menu-scroll") && t[o]?.scrollIntoView({ block: "nearest" });
|
|
44
|
+
}, h = {
|
|
40
45
|
id: r,
|
|
41
|
-
className: S(
|
|
46
|
+
className: S(y.list, "m-0 list-none outline-none", !d && "px-0", !d && (E ? "py-0" : "py-2"), m),
|
|
42
47
|
style: { fontFamily: "Roboto, Helvetica, Arial, sans-serif" },
|
|
43
|
-
onClick:
|
|
44
|
-
onKeyDown:
|
|
48
|
+
onClick: w,
|
|
49
|
+
onKeyDown: L
|
|
45
50
|
};
|
|
46
|
-
return
|
|
51
|
+
return x === "listbox" ? /* @__PURE__ */ p("ul", {
|
|
47
52
|
ref: i,
|
|
48
|
-
...
|
|
53
|
+
...h,
|
|
49
54
|
role: "listbox",
|
|
50
|
-
children:
|
|
51
|
-
}) : /* @__PURE__ */
|
|
55
|
+
children: l
|
|
56
|
+
}) : /* @__PURE__ */ p("ul", {
|
|
52
57
|
ref: i,
|
|
53
|
-
...
|
|
58
|
+
...h,
|
|
54
59
|
role: "menu",
|
|
55
|
-
children:
|
|
60
|
+
children: l
|
|
56
61
|
});
|
|
57
62
|
};
|
|
58
63
|
export {
|
|
59
|
-
|
|
64
|
+
O as StyledMenuList
|
|
60
65
|
};
|
|
@@ -55,6 +55,8 @@ export interface IStyledDialogProps {
|
|
|
55
55
|
dialogLabel?: ReactNode;
|
|
56
56
|
/** @figmaProp header Title (Page title 24 SemiBold, delta-800) */
|
|
57
57
|
dialogTitle?: ReactNode;
|
|
58
|
+
/** Accessible name when the dialog has no visible title. */
|
|
59
|
+
ariaLabel?: string;
|
|
58
60
|
dialogHeaderNode?: ReactNode;
|
|
59
61
|
}
|
|
60
62
|
/**
|
|
@@ -5,6 +5,9 @@ interface DialogTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* MUI-free dialog title: a semantic `<h2>` with the previous SCSS metrics as Tailwind. TASK-101.
|
|
8
|
+
*
|
|
9
|
+
* Adopts the id its enclosing `StyledDialog` offers, so the dialog is named by this visible title
|
|
10
|
+
* rather than by its test hook (WCAG 4.1.2). An explicit `id` from the caller always wins.
|
|
8
11
|
*/
|
|
9
|
-
export declare const StyledDialogTitle: ({ children, className, sx, style, classes: _classes, ...rest }: DialogTitleProps) => JSX.Element | null;
|
|
12
|
+
export declare const StyledDialogTitle: ({ children, className, sx, style, id, classes: _classes, ...rest }: DialogTitleProps) => JSX.Element | null;
|
|
10
13
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lets a `<StyledDialogTitle>` child name the dialog that contains it.
|
|
3
|
+
*
|
|
4
|
+
* `StyledDialog` can point `aria-labelledby` at its own `dialogTitle` prop directly, but a large
|
|
5
|
+
* share of consumers render the title as a child instead (e.g. advoca's privacy-consent modal).
|
|
6
|
+
* Without this, those dialogs fall back to having no accessible name at all — WCAG 4.1.2 requires
|
|
7
|
+
* the dialog to be named by its visible title, not by a test hook.
|
|
8
|
+
*/
|
|
9
|
+
export interface StyledDialogTitleContextValue {
|
|
10
|
+
/** `id` the title adopts so the dialog can reference it. */
|
|
11
|
+
titleId: string;
|
|
12
|
+
/** Registers the title's actual id, including an explicit caller-supplied id. */
|
|
13
|
+
setTitleId: (titleId: string | undefined) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const StyledDialogTitleContext: import('react').Context<StyledDialogTitleContextValue | null>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React, AnchorHTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { default as React, AnchorHTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* @figmaNode wXrXt5uKNNzV2DnQCgyYZH#14472-14569 (Design-System · "Link")
|
|
4
4
|
*
|
|
@@ -6,7 +6,8 @@ import { default as React, AnchorHTMLAttributes, ReactNode } from 'react';
|
|
|
6
6
|
* Disabled = delta-300; Focused/Pressed adds a 1px gama-400 rounded indicator (radius 4, px4/py2).
|
|
7
7
|
* State is derived at runtime from `:hover`/`:focus`/`disabled`, not a prop.
|
|
8
8
|
*/
|
|
9
|
-
export type StyledLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
9
|
+
export type StyledLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick'> & {
|
|
10
|
+
onClick?: (event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
|
|
10
11
|
/** @figmaProp State = true→"Disabled" (renders a non-interactive <span>, delta-300) */
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
/** @figmaProp Size = small→"Base" (14/20) | large→"Medium" (16/24); xs (12/20) = none (no DS size) */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Arguments } from '@dnd-kit/sortable/dist/hooks/useSortable';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { ColumnDef } from '../../types';
|
|
4
|
-
export declare function generateDndHandleColumn<TData>(custom_props?: ColumnDef<TData, unknown>, rowHeight?: number): ColumnDef<TData, unknown>;
|
|
4
|
+
export declare function generateDndHandleColumn<TData>(custom_props?: ColumnDef<TData, unknown>, rowHeight?: number, locale?: 'en' | 'no'): ColumnDef<TData, unknown>;
|
|
5
5
|
export declare const RowDragHandleCell: FC<Partial<Omit<Arguments, 'id'>> & {
|
|
6
|
+
ariaLabel?: string;
|
|
6
7
|
rowId: string;
|
|
7
8
|
rowHeight?: number;
|
|
8
9
|
}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ColumnDef } from '../../types';
|
|
2
|
-
export declare function generateExpandColumn<TData>(isFixed: boolean, rowHeight?: number): ColumnDef<TData, unknown>;
|
|
2
|
+
export declare function generateExpandColumn<TData>(isFixed: boolean, rowHeight?: number, locale?: 'en' | 'no'): ColumnDef<TData, unknown>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ColumnDef } from '../../types';
|
|
2
|
-
export declare function generateShowFullTextColumn<TData>(isFixed: boolean, rowHeight?: number): ColumnDef<TData, unknown>;
|
|
2
|
+
export declare function generateShowFullTextColumn<TData>(isFixed: boolean, rowHeight?: number, locale?: 'en' | 'no'): ColumnDef<TData, unknown>;
|
|
@@ -1,40 +1,42 @@
|
|
|
1
|
-
import { DND_HANDLE_COLUMN_ID as
|
|
2
|
-
import { DotsHorizontalIcon as
|
|
3
|
-
import
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { useSortable as
|
|
6
|
-
function
|
|
1
|
+
import { DND_HANDLE_COLUMN_ID as n } from "../../types.js";
|
|
2
|
+
import { DotsHorizontalIcon as d } from "../../shared-components/DotsHorizontalIcon.js";
|
|
3
|
+
import s from "clsx";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
+
import { useSortable as m } from "@dnd-kit/sortable";
|
|
6
|
+
function p(r, t, l) {
|
|
7
7
|
return {
|
|
8
8
|
enableHiding: !1,
|
|
9
9
|
enableSorting: !1,
|
|
10
10
|
header: () => null,
|
|
11
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
11
|
+
cell: ({ row: e }) => /* @__PURE__ */ a(u, {
|
|
12
|
+
ariaLabel: l === "no" ? `Endre rekkefølge på rad ${e.index + 1}` : `Reorder row ${e.index + 1}`,
|
|
12
13
|
rowId: e.id,
|
|
13
14
|
rowHeight: t
|
|
14
15
|
}),
|
|
15
16
|
minSize: 50,
|
|
16
17
|
size: 50,
|
|
17
18
|
...r,
|
|
18
|
-
id:
|
|
19
|
+
id: n
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
|
-
var
|
|
22
|
-
const { attributes:
|
|
23
|
-
id:
|
|
22
|
+
var u = ({ ariaLabel: r, rowId: t, rowHeight: l, ...e }) => {
|
|
23
|
+
const { attributes: i, listeners: o } = m({
|
|
24
|
+
id: t,
|
|
24
25
|
...e
|
|
25
26
|
});
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
...l,
|
|
27
|
+
return /* @__PURE__ */ a("div", {
|
|
28
28
|
...i,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
...o,
|
|
30
|
+
"aria-label": r,
|
|
31
|
+
style: { height: l ?? "auto" },
|
|
32
|
+
children: /* @__PURE__ */ a(d, {
|
|
31
33
|
width: 24,
|
|
32
34
|
height: 24,
|
|
33
|
-
className:
|
|
35
|
+
className: s(e.disabled ? "cursor-not-allowed text-delta-300" : "cursor-grab text-delta-800")
|
|
34
36
|
})
|
|
35
37
|
});
|
|
36
38
|
};
|
|
37
39
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
u as RowDragHandleCell,
|
|
41
|
+
p as generateDndHandleColumn
|
|
40
42
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { EXPAND_COLUMN_ID as
|
|
2
|
-
import { ChevronDownIcon as
|
|
3
|
-
import { jsx as
|
|
1
|
+
import { EXPAND_COLUMN_ID as a } from "../../types.js";
|
|
2
|
+
import { ChevronDownIcon as d } from "../../shared-components/ChevronDownIcon.js";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import "@tanstack/react-table";
|
|
5
|
-
function
|
|
5
|
+
function x(t, o, i) {
|
|
6
6
|
return {
|
|
7
|
-
id:
|
|
7
|
+
id: a,
|
|
8
8
|
minSize: 50,
|
|
9
9
|
maxSize: 50,
|
|
10
10
|
size: 50,
|
|
11
11
|
enableHiding: !1,
|
|
12
12
|
enableSorting: !1,
|
|
13
13
|
header: () => null,
|
|
14
|
-
cell: ({ cell:
|
|
15
|
-
const
|
|
16
|
-
return
|
|
14
|
+
cell: ({ cell: n }) => {
|
|
15
|
+
const e = n.row.getIsExpanded();
|
|
16
|
+
return n.row.getCanExpand() ? /* @__PURE__ */ r("button", {
|
|
17
17
|
type: "button",
|
|
18
|
-
"aria-label": n ?
|
|
19
|
-
"aria-expanded":
|
|
18
|
+
"aria-label": i === "no" ? e ? `Skjul rad ${n.row.index + 1}` : `Utvid rad ${n.row.index + 1}` : e ? `Collapse row ${n.row.index + 1}` : `Expand row ${n.row.index + 1}`,
|
|
19
|
+
"aria-expanded": e,
|
|
20
20
|
className: "flex w-full items-center justify-center border-0 bg-transparent p-0 outline-none focus:outline-none",
|
|
21
|
-
onClick: () =>
|
|
21
|
+
onClick: () => n.row.getToggleExpandedHandler()(),
|
|
22
22
|
style: { height: o ?? "auto" },
|
|
23
|
-
children: /* @__PURE__ */
|
|
23
|
+
children: /* @__PURE__ */ r(d, {
|
|
24
24
|
className: "block size-6 shrink-0",
|
|
25
25
|
width: 24,
|
|
26
26
|
height: 24,
|
|
27
27
|
style: {
|
|
28
|
-
transform:
|
|
28
|
+
transform: e ? "rotate(180deg)" : "rotate(0deg)",
|
|
29
29
|
transformBox: "fill-box",
|
|
30
30
|
transformOrigin: "center",
|
|
31
31
|
transitionProperty: "transform",
|
|
@@ -35,9 +35,9 @@ function f(r, o) {
|
|
|
35
35
|
})
|
|
36
36
|
}) : null;
|
|
37
37
|
},
|
|
38
|
-
fixedLeft:
|
|
38
|
+
fixedLeft: t
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
x as generateExpandColumn
|
|
43
43
|
};
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { SHOW_FULL_TEXT_ID as
|
|
2
|
-
import { ChevronDownIcon as
|
|
3
|
-
import { StyledButton as
|
|
4
|
-
import { jsx as
|
|
5
|
-
function
|
|
1
|
+
import { SHOW_FULL_TEXT_ID as l } from "../../types.js";
|
|
2
|
+
import { ChevronDownIcon as s } from "../../shared-components/ChevronDownIcon.js";
|
|
3
|
+
import { StyledButton as d } from "../../shared-components/button/StyledButton.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
function c(e, o, n) {
|
|
6
6
|
return {
|
|
7
|
-
id:
|
|
7
|
+
id: l,
|
|
8
8
|
minSize: 38,
|
|
9
9
|
maxSize: 38,
|
|
10
10
|
size: 38,
|
|
11
11
|
enableHiding: !1,
|
|
12
12
|
enableSorting: !1,
|
|
13
13
|
header: () => null,
|
|
14
|
-
cell: (
|
|
15
|
-
info:
|
|
16
|
-
|
|
14
|
+
cell: (a) => /* @__PURE__ */ r(u, {
|
|
15
|
+
info: a,
|
|
16
|
+
locale: n,
|
|
17
|
+
rowHeight: o
|
|
17
18
|
}),
|
|
18
19
|
fixedLeft: e
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
|
-
function u({ info: e, rowHeight:
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */
|
|
22
|
+
function u({ info: e, locale: o, rowHeight: n }) {
|
|
23
|
+
const a = e.row.getCanExpand(), i = e.row.isExpanded();
|
|
24
|
+
return /* @__PURE__ */ r("div", {
|
|
24
25
|
className: "flex w-full items-center justify-center",
|
|
25
|
-
style: { height:
|
|
26
|
-
children: /* @__PURE__ */
|
|
26
|
+
style: { height: n ?? "auto" },
|
|
27
|
+
children: /* @__PURE__ */ r(d, {
|
|
27
28
|
dataTest: "expand-text-button",
|
|
28
|
-
"aria-label":
|
|
29
|
+
"aria-label": o === "no" ? i ? `Skjul full tekst for rad ${e.row.index + 1}` : `Vis full tekst for rad ${e.row.index + 1}` : i ? `Collapse full text for row ${e.row.index + 1}` : `Show full text for row ${e.row.index + 1}`,
|
|
29
30
|
size: "small",
|
|
30
31
|
variant: "textGray",
|
|
31
32
|
onClick: (t) => {
|
|
32
|
-
t.stopPropagation(),
|
|
33
|
+
t.stopPropagation(), a && e.row.getToggleExpandedHandler()(), e.row.toggleExpand();
|
|
33
34
|
},
|
|
34
35
|
onMouseDown: (t) => {
|
|
35
36
|
t.preventDefault(), t.stopPropagation();
|
|
@@ -37,12 +38,12 @@ function u({ info: e, rowHeight: r }) {
|
|
|
37
38
|
onMouseUp: (t) => {
|
|
38
39
|
t.preventDefault(), t.stopPropagation();
|
|
39
40
|
},
|
|
40
|
-
startIcon: /* @__PURE__ */
|
|
41
|
+
startIcon: /* @__PURE__ */ r(s, {
|
|
41
42
|
className: "block size-5 shrink-0",
|
|
42
43
|
width: 20,
|
|
43
44
|
height: 20,
|
|
44
45
|
style: {
|
|
45
|
-
transform:
|
|
46
|
+
transform: i ? "rotate(180deg)" : "rotate(0deg)",
|
|
46
47
|
transformBox: "fill-box",
|
|
47
48
|
transformOrigin: "center",
|
|
48
49
|
transitionProperty: "transform",
|
|
@@ -55,5 +56,5 @@ function u({ info: e, rowHeight: r }) {
|
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
export {
|
|
58
|
-
|
|
59
|
+
c as generateShowFullTextColumn
|
|
59
60
|
};
|
|
@@ -4,17 +4,17 @@ import { generateExpandColumn as h } from "../components/columns/expandColumn.js
|
|
|
4
4
|
import { generateActionsColumn as x } from "../components/columns/action-column/actionColumn.js";
|
|
5
5
|
import { generateDndHandleColumn as _ } from "../components/columns/dndHandleColumn.js";
|
|
6
6
|
import { generateShowFullTextColumn as A } from "../components/columns/showTextColumn.js";
|
|
7
|
-
var T = (
|
|
8
|
-
const { actions:
|
|
9
|
-
return !n.find((o) => o.id === "actions") && (
|
|
10
|
-
headerPin:
|
|
11
|
-
actions:
|
|
12
|
-
customActionsNode:
|
|
7
|
+
var T = (r) => {
|
|
8
|
+
const { actions: m, customActionsNode: d, headerPin: s = !0, enableRowSelection: u, expandArrow: f, enableDnd: c, customDndColumnProps: a, rowHeight: e, textExpandArrow: l, customActionsColumnProps: p, rowActionsState: C, locale: t } = r, n = [...r.columns], i = n.some((o) => o.fixedLeft === !0);
|
|
9
|
+
return !n.find((o) => o.id === "actions") && (m || d || s) && n.push(x({
|
|
10
|
+
headerPin: s,
|
|
11
|
+
actions: m,
|
|
12
|
+
customActionsNode: d,
|
|
13
13
|
rowHeight: e,
|
|
14
14
|
customActionsColumnProps: p,
|
|
15
15
|
rowActionsState: C,
|
|
16
|
-
locale:
|
|
17
|
-
})),
|
|
16
|
+
locale: t
|
|
17
|
+
})), l && !n.find((o) => o.id === "show-full-text") && n.unshift(A(i, e, t)), f && !l && !n.find((o) => o.id === "expand-column-id") && n.unshift(h(i, e, t)), c && !n.find((o) => o.id === "dnd-handle") && n.unshift(_(a, e, t)), u && !n.find((o) => o.id === "select") && n.unshift(D(i, e, t)), n;
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
20
|
T as injectColumns
|