@konstructio/ui 0.1.2-alpha.94 → 0.1.2-alpha.96
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/Breadcrumb-xLKDl92B.js +82 -0
- package/dist/assets/icons/components/ApiKey.js +31 -0
- package/dist/assets/icons/components/ArrowBack.js +20 -0
- package/dist/assets/icons/components/CheckAlt.js +24 -0
- package/dist/assets/icons/components/Configure.js +41 -0
- package/dist/assets/icons/components/Deploy.js +41 -0
- package/dist/assets/icons/components/Github.js +34 -0
- package/dist/assets/icons/components/LockAlt.js +21 -0
- package/dist/assets/icons/components/index.js +208 -194
- package/dist/assets/icons/index.js +208 -194
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/BackButton/BackButton.js +41 -0
- package/dist/components/Breadcrumb/components/BackButton/BackButton.variants.js +19 -0
- package/dist/components/Breadcrumb/components/Item/Item.js +37 -21
- package/dist/components/Breadcrumb/components/index.js +4 -2
- package/dist/components/VirtualizedTable/VirtualizedTable.js +64 -61
- package/dist/components/VirtualizedTable/components/Body/Body.js +60 -42
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +78 -68
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/VirtualizedTable/events/index.js +10 -7
- package/dist/components/index.js +26 -25
- package/dist/icons.js +208 -194
- package/dist/index.js +43 -42
- package/dist/lib/assets/icons/components/ApiKey.d.ts +3 -0
- package/dist/lib/assets/icons/components/ArrowBack.d.ts +3 -0
- package/dist/lib/assets/icons/components/CheckAlt.d.ts +3 -0
- package/dist/lib/assets/icons/components/Configure.d.ts +3 -0
- package/dist/lib/assets/icons/components/Deploy.d.ts +3 -0
- package/dist/lib/assets/icons/components/Github.d.ts +3 -0
- package/dist/lib/assets/icons/components/LockAlt.d.ts +3 -0
- package/dist/lib/assets/icons/components/index.d.ts +7 -0
- package/dist/lib/components/Breadcrumb/Breadcrumb.d.ts +9 -0
- package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +27 -1
- package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.d.ts +3 -0
- package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.types.d.ts +7 -0
- package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.variants.d.ts +1 -0
- package/dist/lib/components/Breadcrumb/components/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Body/Body.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/events/index.d.ts +4 -2
- package/dist/lib/components/index.d.ts +1 -1
- package/dist/lib/icons.d.ts +1 -1
- package/dist/package.json +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table.provider-BBlJgEJf.js → table.provider-BPlFpIAe.js} +309 -309
- package/package.json +1 -1
- package/dist/Breadcrumb-BYO5PNVF.js +0 -77
|
@@ -1,95 +1,98 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { Actions as
|
|
3
|
-
import { t as
|
|
4
|
-
import { sendCollapseRowEvent as
|
|
5
|
-
import { Body as
|
|
6
|
-
import { Filter as
|
|
7
|
-
import { Header as
|
|
8
|
-
import { Pagination as
|
|
9
|
-
import { TruncateText as
|
|
10
|
-
import { WrapperBody as
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { jsx as
|
|
13
|
-
var
|
|
14
|
-
const
|
|
15
|
-
t,
|
|
16
|
-
i,
|
|
1
|
+
import { t as n } from "../../utils-COaoD3PI.js";
|
|
2
|
+
import { Actions as Z } from "./components/Actions/Actions.js";
|
|
3
|
+
import { t as _ } from "../../table.provider-BPlFpIAe.js";
|
|
4
|
+
import { sendCollapseRowEvent as $, sendExpandRowEvent as D, sendResetFiltersEvent as L, sendToggleRowEvent as ee } from "./events/index.js";
|
|
5
|
+
import { Body as re } from "./components/Body/Body.js";
|
|
6
|
+
import { Filter as ae } from "./components/Filter/Filter.js";
|
|
7
|
+
import { Header as te } from "./components/Header/Header.js";
|
|
8
|
+
import { Pagination as oe } from "./components/Pagination/Pagination.js";
|
|
9
|
+
import { TruncateText as le } from "./components/TruncateText/TruncateText.js";
|
|
10
|
+
import { WrapperBody as ie } from "./components/WrapperBody/WrapperBody.js";
|
|
11
|
+
import { useMemo as se } from "react";
|
|
12
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
13
|
+
var me = ({ id: o, ariaLabel: p, columns: d, data: f, totalItems: u = -1 / 0, className: b, classNameHeaderActiveArrows: v, classNameHeaderArrows: T, classNameHeaderTable: E, classNameTable: x, classNameWrapperTable: N, isLoading: t, emptyState: w, getRowId: A, fetchData: y, queryOptions: R, showPagination: h, showTotalItems: l, showDropdownPagination: i, showDotPagination: s, showFormPagination: m, pageSizes: z, showFilter: B = !1, showFilterInput: V, filterSearchPlaceholder: g = "", filters: j, multiSelectFilter: k, filterActions: P, showResetButton: C = !0, resetButtonClassName: F, closeOnApply: H = !0, enableHoverRow: I, classNameHoverRow: K, enableExpandedRow: M, expandedState: W, defaultExpanded: q, classNameExpandedRow: G, classNameExpandedCell: J, classNameExpandedContent: O, classNameExpandedHeader: Q, classNameActiveExpandedRow: S, onExpandedChange: U, renderExpandedRow: X, keepExpandColumnVisible: Y }) => {
|
|
14
|
+
const r = se(() => h || [
|
|
17
15
|
l,
|
|
16
|
+
i,
|
|
17
|
+
s,
|
|
18
18
|
m
|
|
19
19
|
].some(Boolean), []);
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
id:
|
|
20
|
+
return /* @__PURE__ */ e(_, {
|
|
21
|
+
id: o,
|
|
22
22
|
columns: d,
|
|
23
23
|
data: f,
|
|
24
|
-
getRowId:
|
|
25
|
-
fetchData:
|
|
24
|
+
getRowId: A,
|
|
25
|
+
fetchData: y,
|
|
26
26
|
totalItems: u,
|
|
27
|
-
queryOptions:
|
|
28
|
-
isPaginationEnabled:
|
|
27
|
+
queryOptions: R,
|
|
28
|
+
isPaginationEnabled: r,
|
|
29
29
|
enableExpandedRow: M,
|
|
30
30
|
expandedState: W,
|
|
31
|
-
onExpandedChange:
|
|
31
|
+
onExpandedChange: U,
|
|
32
32
|
defaultExpanded: q,
|
|
33
|
-
classNameExpandedRow:
|
|
34
|
-
classNameExpandedCell:
|
|
35
|
-
classNameExpandedContent:
|
|
36
|
-
classNameExpandedHeader:
|
|
37
|
-
classNameActiveExpandedRow:
|
|
33
|
+
classNameExpandedRow: G,
|
|
34
|
+
classNameExpandedCell: J,
|
|
35
|
+
classNameExpandedContent: O,
|
|
36
|
+
classNameExpandedHeader: Q,
|
|
37
|
+
classNameActiveExpandedRow: S,
|
|
38
38
|
enableHoverRow: I,
|
|
39
39
|
classNameHoverRow: K,
|
|
40
|
-
renderExpandedRow:
|
|
41
|
-
keepExpandColumnVisible:
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
-
className:
|
|
40
|
+
renderExpandedRow: X,
|
|
41
|
+
keepExpandColumnVisible: Y,
|
|
42
|
+
children: /* @__PURE__ */ c("section", {
|
|
43
|
+
className: n("w-full min-w-fit", b),
|
|
44
44
|
children: [
|
|
45
|
-
B && /* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
B && /* @__PURE__ */ e(ae, {
|
|
46
|
+
id: o,
|
|
47
|
+
actions: P,
|
|
48
|
+
filters: j,
|
|
49
|
+
multiSelectFilter: k,
|
|
50
|
+
placeholder: g,
|
|
51
|
+
showFilterInput: V,
|
|
52
|
+
showResetButton: C,
|
|
53
|
+
resetButtonClassName: F,
|
|
53
54
|
closeOnApply: H
|
|
54
55
|
}),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
showPagination:
|
|
56
|
+
/* @__PURE__ */ e(ie, {
|
|
57
|
+
showPagination: r,
|
|
57
58
|
classNameWrapperTable: N,
|
|
58
|
-
isLoading:
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
className:
|
|
59
|
+
isLoading: t,
|
|
60
|
+
children: /* @__PURE__ */ c("table", {
|
|
61
|
+
className: n("w-full border-collapse table-auto", "dark:border-separate dark:border-spacing-0", x),
|
|
61
62
|
"aria-label": p,
|
|
62
|
-
children: [/* @__PURE__ */
|
|
63
|
-
className:
|
|
63
|
+
children: [/* @__PURE__ */ e(te, {
|
|
64
|
+
className: E,
|
|
64
65
|
classNameArrows: T,
|
|
65
66
|
classNameActiveArrows: v
|
|
66
|
-
}), /* @__PURE__ */
|
|
67
|
-
isLoading:
|
|
68
|
-
showPagination:
|
|
67
|
+
}), /* @__PURE__ */ e(re, {
|
|
68
|
+
isLoading: t,
|
|
69
|
+
showPagination: r,
|
|
70
|
+
emptyState: w
|
|
69
71
|
})]
|
|
70
72
|
})
|
|
71
73
|
}),
|
|
72
|
-
|
|
73
|
-
showTotalItems:
|
|
74
|
+
r && /* @__PURE__ */ e(oe, {
|
|
75
|
+
showTotalItems: l,
|
|
74
76
|
showDropdownPagination: i,
|
|
75
|
-
showDotPagination:
|
|
77
|
+
showDotPagination: s,
|
|
76
78
|
showFormPagination: m,
|
|
77
79
|
pageSizes: z,
|
|
78
|
-
isLoading:
|
|
80
|
+
isLoading: t
|
|
79
81
|
})
|
|
80
82
|
]
|
|
81
83
|
})
|
|
82
84
|
});
|
|
83
|
-
}, a =
|
|
85
|
+
}, a = me;
|
|
84
86
|
a.displayName = "KonstructVirtualizedTable";
|
|
85
|
-
a.TruncateText =
|
|
86
|
-
a.Actions =
|
|
87
|
+
a.TruncateText = le;
|
|
88
|
+
a.Actions = Z;
|
|
87
89
|
a.Events = {
|
|
88
|
-
sendExpandRowEvent:
|
|
89
|
-
sendCollapseRowEvent:
|
|
90
|
-
sendToggleRowEvent:
|
|
90
|
+
sendExpandRowEvent: D,
|
|
91
|
+
sendCollapseRowEvent: $,
|
|
92
|
+
sendToggleRowEvent: ee,
|
|
93
|
+
sendResetFiltersEvent: L
|
|
91
94
|
};
|
|
92
95
|
export {
|
|
93
|
-
|
|
96
|
+
le as TruncateText,
|
|
94
97
|
a as VirtualizedTable
|
|
95
98
|
};
|
|
@@ -1,54 +1,72 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { n as A } from "../../../../table.provider-
|
|
1
|
+
import { t as r } from "../../../../utils-COaoD3PI.js";
|
|
2
|
+
import { n as A } from "../../../../table.provider-BPlFpIAe.js";
|
|
3
3
|
import { useTableContext as B } from "../../contexts/table.hook.js";
|
|
4
4
|
import { Skeleton as H } from "../Skeleton/Skeleton.js";
|
|
5
|
-
import { ExpandableRow as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { jsx as
|
|
8
|
-
var
|
|
9
|
-
const { table:
|
|
10
|
-
if (
|
|
11
|
-
numberOfRows:
|
|
12
|
-
table:
|
|
5
|
+
import { ExpandableRow as L } from "../ExpandableRow/ExpandableRow.js";
|
|
6
|
+
import { Fragment as M } from "react";
|
|
7
|
+
import { jsx as e, jsxs as O } from "react/jsx-runtime";
|
|
8
|
+
var W = ({ isLoading: h, showPagination: l, emptyState: p }) => {
|
|
9
|
+
const { table: m, pageSize: k, tableFetching: N, enableExpandedRow: w, classNameExpandedRow: R, classNameExpandedCell: E, classNameExpandedContent: v, enableHoverRow: g, classNameHoverRow: C, classNameActiveExpandedRow: y, renderExpandedRow: u, isBorderOnAdjacentCell: D, isExpandColumnVisible: j } = B();
|
|
10
|
+
if (h || N) return /* @__PURE__ */ e(H, {
|
|
11
|
+
numberOfRows: k,
|
|
12
|
+
table: m
|
|
13
13
|
});
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
className:
|
|
21
|
-
"data-row
|
|
14
|
+
const a = m.getRowModel().rows ?? [];
|
|
15
|
+
if (a.length === 0 && p) {
|
|
16
|
+
const n = m.getVisibleLeafColumns().length;
|
|
17
|
+
return /* @__PURE__ */ e("tbody", {
|
|
18
|
+
className: r("text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
|
|
19
|
+
children: /* @__PURE__ */ e("tr", {
|
|
20
|
+
className: r("border-b", "border-b-gray-200", "dark:border-b-metal-700", "bg-transparent"),
|
|
21
|
+
"data-empty-row": !0,
|
|
22
|
+
children: /* @__PURE__ */ e("td", {
|
|
23
|
+
colSpan: n,
|
|
24
|
+
className: r("p-0", "bg-white", "dark:bg-metal-900", "dark:border", "dark:border-metal-700", "rounded-b-lg"),
|
|
25
|
+
children: /* @__PURE__ */ e("div", {
|
|
26
|
+
className: "flex items-center justify-center",
|
|
27
|
+
children: p
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return /* @__PURE__ */ e("tbody", {
|
|
34
|
+
className: r("text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
|
|
35
|
+
children: a.map((n, c) => {
|
|
36
|
+
const { id: b, original: i, getVisibleCells: z } = n, { meta: o = {} } = i, s = z(), t = w && n.getIsExpanded(), F = !!o.expandedRow || !!u, x = s[0]?.column.id !== "__expand" || j ? 0 : D ? 1 : null;
|
|
37
|
+
return /* @__PURE__ */ O(M, { children: [/* @__PURE__ */ e("tr", {
|
|
38
|
+
className: r({ "group/row": g }, "border-b", "border-b-gray-200", "dark:text-metal-50", "dark:border-b-metal-700", "bg-transparent", o.className),
|
|
39
|
+
"data-row-id": b,
|
|
22
40
|
...o.attributes ?? {},
|
|
23
|
-
children:
|
|
24
|
-
const _ = typeof
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
className:
|
|
27
|
-
"group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800":
|
|
28
|
-
[
|
|
29
|
-
},
|
|
30
|
-
"rounded-bl-lg":
|
|
31
|
-
"rounded-br-lg":
|
|
32
|
-
"dark:[tr:last-child_&]:border-b": !
|
|
41
|
+
children: s.map(({ id: S, column: d, getContext: V }, f) => {
|
|
42
|
+
const _ = typeof d.columnDef.meta?.className == "function" ? d.columnDef.meta?.className(i) : d.columnDef.meta?.className;
|
|
43
|
+
return /* @__PURE__ */ e("td", {
|
|
44
|
+
className: r("px-4", "py-1", "text-sm", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", {
|
|
45
|
+
"group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": g,
|
|
46
|
+
[r("bg-zinc-100 dark:bg-metal-800", y)]: !!t
|
|
47
|
+
}, C, _, {
|
|
48
|
+
"rounded-bl-lg": c === a.length - 1 && x !== null && f === x && !l && !t,
|
|
49
|
+
"rounded-br-lg": c === a.length - 1 && f === s.length - 1 && !l && !t,
|
|
50
|
+
"dark:[tr:last-child_&]:border-b": !l
|
|
33
51
|
}),
|
|
34
|
-
"data-expanded":
|
|
35
|
-
...
|
|
36
|
-
children: A(
|
|
37
|
-
},
|
|
52
|
+
"data-expanded": t ? !0 : void 0,
|
|
53
|
+
...d.columnDef.meta?.attributes ?? {},
|
|
54
|
+
children: A(d.columnDef.cell, V())
|
|
55
|
+
}, S);
|
|
38
56
|
})
|
|
39
|
-
}),
|
|
40
|
-
classNameExpandedCell:
|
|
41
|
-
classNameExpandedContent:
|
|
57
|
+
}), F && /* @__PURE__ */ e(L, {
|
|
58
|
+
classNameExpandedCell: E,
|
|
59
|
+
classNameExpandedContent: v,
|
|
42
60
|
classNameExpandedRow: R,
|
|
43
|
-
colSpan:
|
|
44
|
-
id:
|
|
45
|
-
isExpanded: !!
|
|
46
|
-
isLastRow:
|
|
47
|
-
children: o.expandedRow ??
|
|
48
|
-
})] },
|
|
61
|
+
colSpan: s.length,
|
|
62
|
+
id: b,
|
|
63
|
+
isExpanded: !!t,
|
|
64
|
+
isLastRow: c === a.length - 1 && !l,
|
|
65
|
+
children: o.expandedRow ?? u?.(i)
|
|
66
|
+
})] }, b);
|
|
49
67
|
})
|
|
50
68
|
});
|
|
51
69
|
};
|
|
52
70
|
export {
|
|
53
|
-
|
|
71
|
+
W as Body
|
|
54
72
|
};
|
|
@@ -1,65 +1,75 @@
|
|
|
1
|
-
import { o as
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { Button as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { o as $ } from "../../../../chunk-cI0lbGMq.js";
|
|
2
|
+
import { t as G } from "../../../../Input-BZG7N8m1.js";
|
|
3
|
+
import { t as H } from "../../../../utils-COaoD3PI.js";
|
|
4
|
+
import { Button as J } from "../../../Button/Button.js";
|
|
5
|
+
import { resetEvent as K } from "../../../Filter/events/index.js";
|
|
6
|
+
import { Filter as n } from "../../../Filter/Filter.js";
|
|
7
|
+
import { t as Q } from "../../../../debounce-B55BpO1u.js";
|
|
8
|
+
import { useTableContext as U } from "../../contexts/table.hook.js";
|
|
9
|
+
import { VirtualizedTableEvent as W } from "../../events/index.js";
|
|
10
|
+
import { useCallback as w, useEffect as X, useMemo as u, useRef as Y } from "react";
|
|
9
11
|
import { jsx as s, jsxs as p } from "react/jsx-runtime";
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
const e = d ??
|
|
13
|
-
...
|
|
12
|
+
var Z = /* @__PURE__ */ $(Q(), 1), ue = ({ id: m, actions: i, filters: d, multiSelectFilter: h, placeholder: D, showFilterInput: x = !0, showResetButton: A = !0, resetButtonClassName: M, closeOnApply: j = !0 }) => {
|
|
13
|
+
const c = Y(null), { termOfSearch: y, multiselectSelected: b, dateFilters: F, dateRangeFilters: S, timeFilters: v, onChangeTermOfSearch: l, onSelectMultiselect: R, onSelectDateFilter: E, onSelectDateRangeFilter: O, onSelectTimeFilter: B } = U(), I = u(() => {
|
|
14
|
+
const e = d ?? h?.map((a) => ({
|
|
15
|
+
...a,
|
|
14
16
|
type: "badgeMultiSelect"
|
|
15
|
-
})) ?? [], t =
|
|
17
|
+
})) ?? [], t = i ?? [];
|
|
16
18
|
return [...e, ...t];
|
|
17
19
|
}, [
|
|
18
20
|
d,
|
|
19
|
-
i,
|
|
20
|
-
u
|
|
21
|
-
]), R = v((e, t) => D(e, t.map((o) => o.id)), [D]), P = v(() => {
|
|
22
|
-
c(""), l.current && (l.current.value = "");
|
|
23
|
-
}, [c]), _ = m(() => (0, V.default)((e) => {
|
|
24
|
-
c(e.target.value);
|
|
25
|
-
}, 500), [c]), I = m(() => !!h || Object.values(y ?? {}).flat().length > 0 || Object.values(F ?? {}).some(Boolean) || Object.values(b ?? {}).some(Boolean) || Object.values(S ?? {}).some(Boolean), [
|
|
26
21
|
h,
|
|
22
|
+
i
|
|
23
|
+
]), T = w((e, t) => R(e, t.map((a) => a.id)), [R]), _ = w(() => {
|
|
24
|
+
l(""), c.current && (c.current.value = "");
|
|
25
|
+
}, [l]);
|
|
26
|
+
X(() => {
|
|
27
|
+
const e = Array.isArray(m) ? m.join(",") : String(m), t = new AbortController();
|
|
28
|
+
return document.addEventListener(W.RESET_FILTERS, (a) => {
|
|
29
|
+
const { detail: o } = a;
|
|
30
|
+
o.tableId === e && (l(""), c.current && (c.current.value = ""), K());
|
|
31
|
+
}, { signal: t.signal }), () => t.abort();
|
|
32
|
+
}, [m, l]);
|
|
33
|
+
const k = u(() => (0, Z.default)((e) => {
|
|
34
|
+
l(e.target.value);
|
|
35
|
+
}, 500), [l]), P = u(() => !!y || Object.values(b ?? {}).flat().length > 0 || Object.values(F ?? {}).some(Boolean) || Object.values(S ?? {}).some(Boolean) || Object.values(v ?? {}).some(Boolean), [
|
|
27
36
|
y,
|
|
28
|
-
F,
|
|
29
37
|
b,
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
F,
|
|
39
|
+
S,
|
|
40
|
+
v
|
|
41
|
+
]), g = (e) => {
|
|
32
42
|
if (e.type === "action") {
|
|
33
|
-
const { label:
|
|
34
|
-
return /* @__PURE__ */ p(
|
|
35
|
-
appearance:
|
|
36
|
-
variant:
|
|
37
|
-
...
|
|
43
|
+
const { label: r, appearance: N = "compact", variant: L = "secondary", leftIcon: q, rightIcon: z, type: f, ...V } = e;
|
|
44
|
+
return /* @__PURE__ */ p(J, {
|
|
45
|
+
appearance: N,
|
|
46
|
+
variant: L,
|
|
47
|
+
...V,
|
|
38
48
|
children: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
q,
|
|
50
|
+
r,
|
|
51
|
+
z
|
|
42
52
|
]
|
|
43
|
-
},
|
|
53
|
+
}, r);
|
|
44
54
|
}
|
|
45
|
-
const { key: t, label:
|
|
46
|
-
return e.type === "textMultiSelect" ? /* @__PURE__ */ s(
|
|
47
|
-
label:
|
|
48
|
-
position:
|
|
55
|
+
const { key: t, label: a, position: o = "right" } = e;
|
|
56
|
+
return e.type === "textMultiSelect" ? /* @__PURE__ */ s(n.TextMultiSelect, {
|
|
57
|
+
label: a,
|
|
58
|
+
position: o,
|
|
49
59
|
options: e.options,
|
|
50
|
-
onApply: (
|
|
51
|
-
|
|
60
|
+
onApply: (r) => {
|
|
61
|
+
T(t, r);
|
|
52
62
|
}
|
|
53
|
-
}, t) : e.type === "date" ? /* @__PURE__ */ s(
|
|
54
|
-
label:
|
|
55
|
-
position:
|
|
63
|
+
}, t) : e.type === "date" ? /* @__PURE__ */ s(n.DateFilterDropdown, {
|
|
64
|
+
label: a,
|
|
65
|
+
position: o,
|
|
56
66
|
countryCode: e.countryCode,
|
|
57
|
-
onApply: (
|
|
58
|
-
|
|
67
|
+
onApply: (r) => {
|
|
68
|
+
E(t, r);
|
|
59
69
|
}
|
|
60
|
-
}, t) : e.type === "dateRange" ? /* @__PURE__ */ s(
|
|
61
|
-
label:
|
|
62
|
-
position:
|
|
70
|
+
}, t) : e.type === "dateRange" ? /* @__PURE__ */ s(n.DateRangeFilterDropdown, {
|
|
71
|
+
label: a,
|
|
72
|
+
position: o,
|
|
63
73
|
showTime: e.showTime,
|
|
64
74
|
timeFormat: e.timeFormat,
|
|
65
75
|
showPresets: e.showPresets,
|
|
@@ -67,48 +77,48 @@ var V = /* @__PURE__ */ G(L(), 1), re = ({ actions: u, filters: d, multiSelectFi
|
|
|
67
77
|
minDate: e.minDate,
|
|
68
78
|
maxDate: e.maxDate,
|
|
69
79
|
countryCode: e.countryCode,
|
|
70
|
-
onApply: (
|
|
71
|
-
|
|
80
|
+
onApply: (r) => {
|
|
81
|
+
O(t, r);
|
|
72
82
|
},
|
|
73
83
|
onRangeChange: e.onRangeChange
|
|
74
|
-
}, t) : e.type === "time" ? /* @__PURE__ */ s(
|
|
75
|
-
label:
|
|
76
|
-
position:
|
|
84
|
+
}, t) : e.type === "time" ? /* @__PURE__ */ s(n.TimeFilterDropdown, {
|
|
85
|
+
label: a,
|
|
86
|
+
position: o,
|
|
77
87
|
format: e.format,
|
|
78
88
|
presets: e.presets,
|
|
79
89
|
showTimePicker: e.showTimePicker,
|
|
80
|
-
onApply: (
|
|
81
|
-
B(t,
|
|
90
|
+
onApply: (r) => {
|
|
91
|
+
B(t, r);
|
|
82
92
|
}
|
|
83
|
-
}, t) : /* @__PURE__ */ s(
|
|
84
|
-
label:
|
|
85
|
-
position:
|
|
93
|
+
}, t) : /* @__PURE__ */ s(n.BadgeMultiSelect, {
|
|
94
|
+
label: a,
|
|
95
|
+
position: o,
|
|
86
96
|
options: e.options,
|
|
87
|
-
onApply: (
|
|
88
|
-
|
|
97
|
+
onApply: (r) => {
|
|
98
|
+
T(t, r);
|
|
89
99
|
}
|
|
90
100
|
}, t);
|
|
91
101
|
};
|
|
92
102
|
return /* @__PURE__ */ p("div", {
|
|
93
103
|
className: "w-full flex items-center justify-end pb-6",
|
|
94
|
-
children: [
|
|
95
|
-
ref:
|
|
96
|
-
placeholder:
|
|
104
|
+
children: [x && /* @__PURE__ */ s(G, {
|
|
105
|
+
ref: c,
|
|
106
|
+
placeholder: D,
|
|
97
107
|
isSearch: !0,
|
|
98
108
|
autoComplete: "false",
|
|
99
109
|
className: "w-72",
|
|
100
110
|
inputMode: "search",
|
|
101
|
-
onChange:
|
|
102
|
-
}), /* @__PURE__ */ p(
|
|
111
|
+
onChange: k
|
|
112
|
+
}), /* @__PURE__ */ p(n, {
|
|
103
113
|
closeOnApply: j,
|
|
104
|
-
children: [
|
|
105
|
-
className:
|
|
106
|
-
disabled: !
|
|
107
|
-
onClick:
|
|
114
|
+
children: [I.map(g), A && /* @__PURE__ */ s(n.ResetButton, {
|
|
115
|
+
className: H("select-none", M),
|
|
116
|
+
disabled: !P,
|
|
117
|
+
onClick: _
|
|
108
118
|
})]
|
|
109
119
|
})]
|
|
110
120
|
});
|
|
111
121
|
};
|
|
112
122
|
export {
|
|
113
|
-
|
|
123
|
+
ue as Filter
|
|
114
124
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as r } from "../../../../utils-COaoD3PI.js";
|
|
2
|
-
import { n as b } from "../../../../table.provider-
|
|
2
|
+
import { n as b } from "../../../../table.provider-BPlFpIAe.js";
|
|
3
3
|
import { useTableContext as g } from "../../contexts/table.hook.js";
|
|
4
4
|
import u from "../../assets/chevron-up.js";
|
|
5
5
|
import k from "../../assets/chevron-down.js";
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
var n = /* @__PURE__ */ (function(t) {
|
|
2
|
-
return t.EXPAND_ROW = "@konstructio/VirtualizedTable/event-EXPAND_ROW", t.COLLAPSE_ROW = "@konstructio/VirtualizedTable/event-COLLAPSE_ROW", t.TOGGLE_ROW = "@konstructio/VirtualizedTable/event-TOGGLE_ROW", t;
|
|
3
|
-
})({}),
|
|
2
|
+
return t.EXPAND_ROW = "@konstructio/VirtualizedTable/event-EXPAND_ROW", t.COLLAPSE_ROW = "@konstructio/VirtualizedTable/event-COLLAPSE_ROW", t.TOGGLE_ROW = "@konstructio/VirtualizedTable/event-TOGGLE_ROW", t.RESET_FILTERS = "@konstructio/VirtualizedTable/event-RESET_FILTERS", t;
|
|
3
|
+
})({}), E = (t, e) => {
|
|
4
4
|
document.dispatchEvent(new CustomEvent(n.EXPAND_ROW, { detail: {
|
|
5
5
|
tableId: t,
|
|
6
6
|
rowId: e
|
|
7
7
|
} }));
|
|
8
|
-
},
|
|
8
|
+
}, o = (t, e) => {
|
|
9
9
|
document.dispatchEvent(new CustomEvent(n.COLLAPSE_ROW, { detail: {
|
|
10
10
|
tableId: t,
|
|
11
11
|
rowId: e
|
|
12
12
|
} }));
|
|
13
|
-
},
|
|
13
|
+
}, s = (t, e) => {
|
|
14
14
|
document.dispatchEvent(new CustomEvent(n.TOGGLE_ROW, { detail: {
|
|
15
15
|
tableId: t,
|
|
16
16
|
rowId: e
|
|
17
17
|
} }));
|
|
18
|
+
}, R = (t) => {
|
|
19
|
+
document.dispatchEvent(new CustomEvent(n.RESET_FILTERS, { detail: { tableId: t } }));
|
|
18
20
|
};
|
|
19
21
|
export {
|
|
20
22
|
n as VirtualizedTableEvent,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
o as sendCollapseRowEvent,
|
|
24
|
+
E as sendExpandRowEvent,
|
|
25
|
+
R as sendResetFiltersEvent,
|
|
26
|
+
s as sendToggleRowEvent
|
|
24
27
|
};
|