laif-ds 0.2.60 → 0.2.62
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/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/agent-docs/components/AppDialog.md +271 -0
- package/dist/agent-docs/components/DataTable.md +73 -2
- package/dist/agent-docs/components-list.md +9 -0
- package/dist/components/ui/app-dialog.js +123 -0
- package/dist/components/ui/app-select.js +36 -34
- package/dist/components/ui/async-select.js +12 -11
- package/dist/components/ui/dialog.js +50 -46
- package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +87 -87
- package/dist/components/ui/tables/data-table/components/data-table-column-visibility.js +82 -77
- package/dist/components/ui/tables/data-table/components/data-table-filters.js +16 -16
- package/dist/components/ui/tables/data-table/components/data-table-sorting.js +14 -14
- package/dist/components/ui/tables/data-table/data-table.js +293 -288
- package/dist/components/ui/tables/data-table/data-table.service.js +43 -43
- package/dist/components/ui/tables/data-table/data-table.utils.js +95 -88
- package/dist/index.d.ts +68 -19
- package/dist/index.js +291 -288
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { getListMultiSelectFilterOptions as v, getListSingleSelectFilterOptions as D, getDateTimeFilterOptions as A, getDateFilterOptions as F, getBooleanFilterOptions as b, getNumberFilterOptions as T, getStringFilterOptions as q } from "./data-table-constants.js";
|
|
3
|
-
import { defaultDataTableI18n as
|
|
3
|
+
import { defaultDataTableI18n as p } from "./data-table-i18n.js";
|
|
4
4
|
function O(e, a = "string") {
|
|
5
5
|
const t = (s) => {
|
|
6
6
|
switch (s) {
|
|
7
7
|
case "string":
|
|
8
|
-
return q(
|
|
8
|
+
return q(p)?.[0]?.value ?? "like";
|
|
9
9
|
case "number":
|
|
10
|
-
return T(
|
|
10
|
+
return T(p)?.[0]?.value ?? "eq";
|
|
11
11
|
case "boolean":
|
|
12
|
-
return b(
|
|
12
|
+
return b(p)?.[0]?.value ?? "eq";
|
|
13
13
|
case "date":
|
|
14
|
-
return F(
|
|
14
|
+
return F(p)?.[0]?.value ?? "eq";
|
|
15
15
|
case "datetime":
|
|
16
|
-
return A(
|
|
16
|
+
return A(p)?.[0]?.value ?? "date_time_before";
|
|
17
17
|
case "list_single_select":
|
|
18
|
-
return D(
|
|
18
|
+
return D(p)?.[0]?.value ?? "array_overlap";
|
|
19
19
|
case "list_multi_select":
|
|
20
|
-
return v(
|
|
20
|
+
return v(p)?.[0]?.value ?? "array_overlap";
|
|
21
21
|
default:
|
|
22
22
|
return "eq";
|
|
23
23
|
}
|
|
@@ -25,8 +25,8 @@ function O(e, a = "string") {
|
|
|
25
25
|
return {
|
|
26
26
|
id: crypto.randomUUID(),
|
|
27
27
|
columnId: e?.id || "",
|
|
28
|
-
columnLabel: e?.column.columnDef.
|
|
29
|
-
columnAccessorKey: (e?.column.columnDef
|
|
28
|
+
columnLabel: e?.column.columnDef.meta?.headerLabel || (typeof e?.column.columnDef.header == "string" ? e.column.columnDef.header : "") || e?.id || "",
|
|
29
|
+
columnAccessorKey: (e?.column.columnDef && "accessorKey" in e.column.columnDef && typeof e.column.columnDef.accessorKey == "string" ? e.column.columnDef.accessorKey : e?.id) || "",
|
|
30
30
|
columnType: e?.column.columnDef.meta?.type || a,
|
|
31
31
|
operator: t(
|
|
32
32
|
e?.column.columnDef.meta?.type
|
|
@@ -57,25 +57,25 @@ function I() {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
function k(e, a) {
|
|
60
|
-
const t = e.filter((n) => n.operator === "eq_null" || n.operator === "n_eq_null" ? !0 : n.value === void 0 || n.value === "" ? !1 : n.columnType === "list_multi_select" ? (Array.isArray(n.value) ? n.value.filter((
|
|
61
|
-
const
|
|
62
|
-
const
|
|
60
|
+
const t = e.filter((n) => n.operator === "eq_null" || n.operator === "n_eq_null" ? !0 : n.value === void 0 || n.value === "" ? !1 : n.columnType === "list_multi_select" ? (Array.isArray(n.value) ? n.value.filter((i) => i !== void 0) : [n.value].filter((i) => i !== void 0)).length > 0 : !0), u = a ? ((n) => {
|
|
61
|
+
const m = (i) => {
|
|
62
|
+
const y = i.conditions.filter((o) => !o.columnId || !o.operator ? !1 : o.operator === "eq_null" || o.operator === "n_eq_null" ? !0 : o.value === void 0 ? !1 : o.columnType === "list_multi_select" ? (Array.isArray(o.value) ? o.value.filter((_) => _ !== void 0) : [o.value].filter((_) => _ !== void 0)).length > 0 : !0).map((o) => ({
|
|
63
63
|
[o.columnAccessorKey]: {
|
|
64
64
|
operator: o.operator,
|
|
65
65
|
value: o.operator === "eq_null" || o.operator === "n_eq_null" ? "" : o.columnType === "list_single_select" ? Array.isArray(o.value) ? o.value.filter((f) => f !== void 0) : [o.value].filter((f) => f !== void 0) : o.value
|
|
66
66
|
}
|
|
67
|
-
})), g =
|
|
68
|
-
...
|
|
67
|
+
})), g = i.groups?.map(m).filter(Boolean) || [], d = [
|
|
68
|
+
...y,
|
|
69
69
|
...g
|
|
70
70
|
];
|
|
71
|
-
return d.length === 0 ? null : d.length === 1 ? d[0] :
|
|
71
|
+
return d.length === 0 ? null : d.length === 1 ? d[0] : i.logicalOperator === "AND" ? { _and: d } : { _or: d };
|
|
72
72
|
};
|
|
73
|
-
return
|
|
73
|
+
return m(n.rootGroup);
|
|
74
74
|
})(a) : null, c = t.map(
|
|
75
75
|
(n) => ({
|
|
76
76
|
[n.columnAccessorKey]: {
|
|
77
77
|
operator: n.operator,
|
|
78
|
-
value: n.operator === "eq_null" || n.operator === "n_eq_null" ? "" : n.columnType === "list_single_select" ? Array.isArray(n.value) ? n.value.filter((
|
|
78
|
+
value: n.operator === "eq_null" || n.operator === "n_eq_null" ? "" : n.columnType === "list_single_select" ? Array.isArray(n.value) ? n.value.filter((m) => m !== void 0) : [n.value].filter((m) => m !== void 0) : n.value ?? ""
|
|
79
79
|
}
|
|
80
80
|
})
|
|
81
81
|
), r = [
|
|
@@ -91,21 +91,21 @@ function H(e, a) {
|
|
|
91
91
|
containerHeight: u = 1,
|
|
92
92
|
onPageChange: c,
|
|
93
93
|
setPagination: r
|
|
94
|
-
} = a,
|
|
95
|
-
(
|
|
96
|
-
),
|
|
97
|
-
r((
|
|
98
|
-
if (
|
|
94
|
+
} = a, l = e?.offsetHeight || u, n = Math.floor(
|
|
95
|
+
(l - s) / t
|
|
96
|
+
), m = n > 1 ? n : 1;
|
|
97
|
+
r((i) => {
|
|
98
|
+
if (i.pageSize !== m) {
|
|
99
99
|
if (c) {
|
|
100
|
-
const
|
|
100
|
+
const y = Math.max(
|
|
101
101
|
0,
|
|
102
|
-
Math.ceil(
|
|
103
|
-
), g = Math.min(
|
|
104
|
-
c(g,
|
|
102
|
+
Math.ceil(i.pageSize * (i.pageIndex + 1) / m) - 1
|
|
103
|
+
), g = Math.min(i.pageIndex, y);
|
|
104
|
+
c(g, m);
|
|
105
105
|
}
|
|
106
|
-
return { ...
|
|
106
|
+
return { ...i, pageSize: m };
|
|
107
107
|
}
|
|
108
|
-
return
|
|
108
|
+
return i;
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
function C(e, a, t) {
|
|
@@ -147,13 +147,13 @@ function C(e, a, t) {
|
|
|
147
147
|
case "array_overlap":
|
|
148
148
|
return Array.isArray(e) && Array.isArray(t) ? t.length === 0 ? !0 : e.length === 0 ? !1 : t.some(
|
|
149
149
|
(r) => e.some(
|
|
150
|
-
(
|
|
150
|
+
(l) => s(l) === s(r)
|
|
151
151
|
)
|
|
152
152
|
) : !1;
|
|
153
153
|
case "n_array_overlap":
|
|
154
154
|
return Array.isArray(e) && Array.isArray(t) ? t.length === 0 || e.length === 0 ? !0 : !t.some(
|
|
155
155
|
(r) => e.some(
|
|
156
|
-
(
|
|
156
|
+
(l) => s(l) === s(r)
|
|
157
157
|
)
|
|
158
158
|
) : !0;
|
|
159
159
|
case "checked":
|
|
@@ -162,29 +162,29 @@ function C(e, a, t) {
|
|
|
162
162
|
return e === !1;
|
|
163
163
|
case "date_before":
|
|
164
164
|
try {
|
|
165
|
-
const r = new Date(e),
|
|
166
|
-
return r.setHours(0, 0, 0, 0),
|
|
165
|
+
const r = new Date(e), l = new Date(t);
|
|
166
|
+
return r.setHours(0, 0, 0, 0), l.setHours(0, 0, 0, 0), r < l;
|
|
167
167
|
} catch {
|
|
168
168
|
return !1;
|
|
169
169
|
}
|
|
170
170
|
case "date_after":
|
|
171
171
|
try {
|
|
172
|
-
const r = new Date(e),
|
|
173
|
-
return r.setHours(0, 0, 0, 0),
|
|
172
|
+
const r = new Date(e), l = new Date(t);
|
|
173
|
+
return r.setHours(0, 0, 0, 0), l.setHours(0, 0, 0, 0), r > l;
|
|
174
174
|
} catch {
|
|
175
175
|
return !1;
|
|
176
176
|
}
|
|
177
177
|
case "date_time_before":
|
|
178
178
|
try {
|
|
179
|
-
const r = new Date(e),
|
|
180
|
-
return r <
|
|
179
|
+
const r = new Date(e), l = new Date(t);
|
|
180
|
+
return r < l;
|
|
181
181
|
} catch {
|
|
182
182
|
return !1;
|
|
183
183
|
}
|
|
184
184
|
case "date_time_after":
|
|
185
185
|
try {
|
|
186
|
-
const r = new Date(e),
|
|
187
|
-
return r >
|
|
186
|
+
const r = new Date(e), l = new Date(t);
|
|
187
|
+
return r > l;
|
|
188
188
|
} catch {
|
|
189
189
|
return !1;
|
|
190
190
|
}
|
|
@@ -214,7 +214,7 @@ function h(e, a) {
|
|
|
214
214
|
}
|
|
215
215
|
return !0;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function K(e, a) {
|
|
218
218
|
let t;
|
|
219
219
|
return function(...s) {
|
|
220
220
|
clearTimeout(t), t = setTimeout(() => {
|
|
@@ -222,7 +222,7 @@ function M(e, a) {
|
|
|
222
222
|
}, a);
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function M(e) {
|
|
226
226
|
switch (e) {
|
|
227
227
|
case "string":
|
|
228
228
|
return "CaseUpper";
|
|
@@ -250,7 +250,7 @@ export {
|
|
|
250
250
|
k as buildSearchFilter,
|
|
251
251
|
O as createBadgeFilterFromHeader,
|
|
252
252
|
I as createDefaultAdvancedFilter,
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
K as debounce,
|
|
254
|
+
M as getIconFromColumnType,
|
|
255
255
|
H as updatePageSizeFromContainer
|
|
256
256
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
let
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const r = e.id
|
|
2
|
+
let d = 0;
|
|
3
|
+
const o = () => `col-${Date.now()}-${++d}`;
|
|
4
|
+
function s(e, t) {
|
|
5
|
+
const r = e.id ?? e.accessorKey ?? o(), a = e.headerLabel ?? (typeof e.header == "string" ? e.header : r);
|
|
6
6
|
return {
|
|
7
7
|
id: r,
|
|
8
|
-
header: e.header,
|
|
8
|
+
header: typeof e.header == "string" ? e.header : () => e.header,
|
|
9
9
|
...e.accessorKey ? { accessorKey: e.accessorKey } : {},
|
|
10
10
|
...e.cell ? {
|
|
11
11
|
cell: ({ row: n }) => {
|
|
12
|
-
const
|
|
13
|
-
return e.cell(
|
|
12
|
+
const i = e.accessorKey ? n.getValue(r) : void 0;
|
|
13
|
+
return e.cell(i, n.original, n);
|
|
14
14
|
}
|
|
15
15
|
} : {},
|
|
16
16
|
meta: {
|
|
17
17
|
type: t,
|
|
18
|
+
headerLabel: a,
|
|
18
19
|
sortable: e.sortable ?? !1,
|
|
19
20
|
filterable: e.filterable ?? !1,
|
|
20
21
|
searchable: e.searchable ?? !1,
|
|
@@ -22,23 +23,23 @@ function a(e, t) {
|
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
|
-
function b(e) {
|
|
26
|
-
return a(e, "string");
|
|
27
|
-
}
|
|
28
26
|
function y(e) {
|
|
29
|
-
return
|
|
27
|
+
return s(e, "string");
|
|
30
28
|
}
|
|
31
29
|
function h(e) {
|
|
32
|
-
return
|
|
30
|
+
return s(e, "number");
|
|
33
31
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
32
|
+
function _(e) {
|
|
33
|
+
return s(e, "boolean");
|
|
36
34
|
}
|
|
37
|
-
function
|
|
38
|
-
return
|
|
35
|
+
function C(e) {
|
|
36
|
+
return s(e, "date");
|
|
39
37
|
}
|
|
40
38
|
function q(e) {
|
|
41
|
-
|
|
39
|
+
return s(e, "datetime");
|
|
40
|
+
}
|
|
41
|
+
function F(e) {
|
|
42
|
+
const t = Array.isArray(e.options) ? typeof e.options[0] == "string" ? e.options.map((a) => ({ value: a, label: a })) : e.options : [], r = s(e, "list_single_select");
|
|
42
43
|
return {
|
|
43
44
|
...r,
|
|
44
45
|
meta: {
|
|
@@ -48,8 +49,8 @@ function q(e) {
|
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
-
const t = Array.isArray(e.options) ? typeof e.options[0] == "string" ? e.options.map((
|
|
52
|
+
function K(e) {
|
|
53
|
+
const t = Array.isArray(e.options) ? typeof e.options[0] == "string" ? e.options.map((a) => ({ value: a, label: a })) : e.options : [], r = s(e, "list_multi_select");
|
|
53
54
|
return {
|
|
54
55
|
...r,
|
|
55
56
|
meta: {
|
|
@@ -59,13 +60,15 @@ function F(e) {
|
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function L(e) {
|
|
64
|
+
const t = e.headerLabel ?? (typeof e.header == "string" ? e.header : e.id);
|
|
63
65
|
return {
|
|
64
66
|
id: e.id,
|
|
65
|
-
header: e.header,
|
|
66
|
-
cell: ({ row:
|
|
67
|
+
header: typeof e.header == "string" ? e.header : () => e.header,
|
|
68
|
+
cell: ({ row: r }) => e.cell(r.original),
|
|
67
69
|
meta: {
|
|
68
70
|
type: "other",
|
|
71
|
+
headerLabel: t,
|
|
69
72
|
sortable: !1,
|
|
70
73
|
filterable: !1,
|
|
71
74
|
searchable: !1,
|
|
@@ -74,12 +77,14 @@ function K(e) {
|
|
|
74
77
|
};
|
|
75
78
|
}
|
|
76
79
|
function v(e) {
|
|
80
|
+
const t = e.id ?? o(), r = e.headerLabel ?? (typeof e.header == "string" ? e.header : t);
|
|
77
81
|
return {
|
|
78
|
-
id:
|
|
79
|
-
header: e.header,
|
|
80
|
-
cell: ({ row:
|
|
82
|
+
id: t,
|
|
83
|
+
header: typeof e.header == "string" ? e.header : () => e.header,
|
|
84
|
+
cell: ({ row: a }) => e.cell(a.original),
|
|
81
85
|
meta: {
|
|
82
86
|
type: "other",
|
|
87
|
+
headerLabel: r,
|
|
83
88
|
sortable: !1,
|
|
84
89
|
filterable: !1,
|
|
85
90
|
searchable: e.searchable ?? !1,
|
|
@@ -88,12 +93,14 @@ function v(e) {
|
|
|
88
93
|
};
|
|
89
94
|
}
|
|
90
95
|
function S(e) {
|
|
96
|
+
const t = e.id ?? o(), r = e.headerLabel ?? (typeof e.header == "string" ? e.header : t);
|
|
91
97
|
return {
|
|
92
|
-
id:
|
|
93
|
-
header: e.header,
|
|
94
|
-
cell: ({ row:
|
|
98
|
+
id: t,
|
|
99
|
+
header: typeof e.header == "string" ? e.header : () => e.header,
|
|
100
|
+
cell: ({ row: a }) => e.cell(a.original),
|
|
95
101
|
meta: {
|
|
96
102
|
type: e.type,
|
|
103
|
+
headerLabel: r,
|
|
97
104
|
sortable: e.sortable ?? !1,
|
|
98
105
|
filterable: e.filterable ?? !1,
|
|
99
106
|
searchable: e.searchable ?? !1,
|
|
@@ -102,10 +109,10 @@ function S(e) {
|
|
|
102
109
|
};
|
|
103
110
|
}
|
|
104
111
|
let m = 0;
|
|
105
|
-
const
|
|
106
|
-
function
|
|
112
|
+
const c = () => `filter-${Date.now()}-${++m}`;
|
|
113
|
+
function u(e) {
|
|
107
114
|
return {
|
|
108
|
-
id:
|
|
115
|
+
id: c(),
|
|
109
116
|
columnId: e.columnId,
|
|
110
117
|
columnAccessorKey: e.columnAccessorKey,
|
|
111
118
|
columnLabel: e.columnLabel,
|
|
@@ -116,76 +123,76 @@ function s(e) {
|
|
|
116
123
|
};
|
|
117
124
|
}
|
|
118
125
|
function O(e) {
|
|
119
|
-
return e.map((t) =>
|
|
126
|
+
return e.map((t) => u(t));
|
|
120
127
|
}
|
|
121
|
-
function T(e, t, r,
|
|
122
|
-
return
|
|
128
|
+
function T(e, t, r, a, l) {
|
|
129
|
+
return u({
|
|
123
130
|
columnId: e,
|
|
124
131
|
columnAccessorKey: t,
|
|
125
132
|
columnLabel: r,
|
|
126
133
|
columnType: "string",
|
|
127
|
-
operator:
|
|
128
|
-
value:
|
|
134
|
+
operator: a,
|
|
135
|
+
value: l
|
|
129
136
|
});
|
|
130
137
|
}
|
|
131
|
-
function I(e, t, r,
|
|
132
|
-
return
|
|
138
|
+
function I(e, t, r, a, l) {
|
|
139
|
+
return u({
|
|
133
140
|
columnId: e,
|
|
134
141
|
columnAccessorKey: t,
|
|
135
142
|
columnLabel: r,
|
|
136
143
|
columnType: "number",
|
|
137
|
-
operator:
|
|
138
|
-
value:
|
|
144
|
+
operator: a,
|
|
145
|
+
value: l
|
|
139
146
|
});
|
|
140
147
|
}
|
|
141
|
-
function B(e, t, r,
|
|
142
|
-
return
|
|
148
|
+
function B(e, t, r, a, l) {
|
|
149
|
+
return u({
|
|
143
150
|
columnId: e,
|
|
144
151
|
columnAccessorKey: t,
|
|
145
152
|
columnLabel: r,
|
|
146
153
|
columnType: "boolean",
|
|
147
|
-
operator:
|
|
148
|
-
value:
|
|
154
|
+
operator: a,
|
|
155
|
+
value: l
|
|
149
156
|
});
|
|
150
157
|
}
|
|
151
|
-
function A(e, t, r,
|
|
152
|
-
return
|
|
158
|
+
function A(e, t, r, a, l) {
|
|
159
|
+
return u({
|
|
153
160
|
columnId: e,
|
|
154
161
|
columnAccessorKey: t,
|
|
155
162
|
columnLabel: r,
|
|
156
163
|
columnType: "date",
|
|
157
|
-
operator:
|
|
158
|
-
value:
|
|
164
|
+
operator: a,
|
|
165
|
+
value: l
|
|
159
166
|
});
|
|
160
167
|
}
|
|
161
|
-
function D(e, t, r,
|
|
162
|
-
return
|
|
168
|
+
function D(e, t, r, a, l) {
|
|
169
|
+
return u({
|
|
163
170
|
columnId: e,
|
|
164
171
|
columnAccessorKey: t,
|
|
165
172
|
columnLabel: r,
|
|
166
173
|
columnType: "datetime",
|
|
167
|
-
operator:
|
|
168
|
-
value:
|
|
174
|
+
operator: a,
|
|
175
|
+
value: l
|
|
169
176
|
});
|
|
170
177
|
}
|
|
171
|
-
function V(e, t, r, l, n,
|
|
172
|
-
return
|
|
178
|
+
function V(e, t, r, a, l, n, i) {
|
|
179
|
+
return u({
|
|
173
180
|
columnId: e,
|
|
174
181
|
columnAccessorKey: t,
|
|
175
182
|
columnLabel: r,
|
|
176
|
-
columnType:
|
|
177
|
-
operator:
|
|
178
|
-
value:
|
|
179
|
-
listOptions:
|
|
183
|
+
columnType: a,
|
|
184
|
+
operator: l,
|
|
185
|
+
value: n,
|
|
186
|
+
listOptions: i
|
|
180
187
|
});
|
|
181
188
|
}
|
|
182
|
-
function
|
|
189
|
+
function p(e) {
|
|
183
190
|
return {
|
|
184
191
|
sort_by: e.map((t) => t.column),
|
|
185
192
|
sort_order: e.map((t) => t.order)
|
|
186
193
|
};
|
|
187
194
|
}
|
|
188
|
-
function
|
|
195
|
+
function f(e) {
|
|
189
196
|
return {
|
|
190
197
|
...e.filters && {
|
|
191
198
|
filters: {
|
|
@@ -198,45 +205,45 @@ function k(e) {
|
|
|
198
205
|
searchbarFilter: e.searchbarFilter
|
|
199
206
|
}
|
|
200
207
|
},
|
|
201
|
-
...e.sorting && { sorting:
|
|
208
|
+
...e.sorting && { sorting: p(e.sorting) },
|
|
202
209
|
...e.pagination && { pagination: e.pagination },
|
|
203
210
|
...e.columnVisibility && {
|
|
204
211
|
columnVisibility: e.columnVisibility
|
|
205
212
|
}
|
|
206
213
|
};
|
|
207
214
|
}
|
|
208
|
-
function
|
|
215
|
+
function b(e) {
|
|
209
216
|
return e.map((t) => ({ value: t, label: t }));
|
|
210
217
|
}
|
|
211
|
-
function
|
|
212
|
-
return e.map((
|
|
213
|
-
value: String(
|
|
214
|
-
label: String(
|
|
218
|
+
function k(e, t, r) {
|
|
219
|
+
return e.map((a) => ({
|
|
220
|
+
value: String(a[t]),
|
|
221
|
+
label: String(a[r])
|
|
215
222
|
}));
|
|
216
223
|
}
|
|
217
224
|
function $(e, t, r) {
|
|
218
|
-
return e.map((
|
|
219
|
-
if (
|
|
220
|
-
const
|
|
225
|
+
return e.map((a) => {
|
|
226
|
+
if (a.accessorKey === t) {
|
|
227
|
+
const n = typeof r[0] == "string" ? b(r) : r;
|
|
221
228
|
return {
|
|
222
|
-
...
|
|
229
|
+
...a,
|
|
223
230
|
meta: {
|
|
224
|
-
...
|
|
225
|
-
listOptions:
|
|
231
|
+
...a.meta,
|
|
232
|
+
listOptions: n
|
|
226
233
|
}
|
|
227
234
|
};
|
|
228
235
|
}
|
|
229
|
-
return
|
|
236
|
+
return a;
|
|
230
237
|
});
|
|
231
238
|
}
|
|
232
239
|
function M(e, t) {
|
|
233
240
|
return e.map((r) => {
|
|
234
|
-
const
|
|
235
|
-
return
|
|
241
|
+
const a = r.accessorKey || r.id, l = t.left?.includes(a) ? "left" : t.right?.includes(a) ? "right" : void 0;
|
|
242
|
+
return l ? {
|
|
236
243
|
...r,
|
|
237
244
|
meta: {
|
|
238
245
|
...r.meta,
|
|
239
|
-
pinned:
|
|
246
|
+
pinned: l
|
|
240
247
|
}
|
|
241
248
|
} : r;
|
|
242
249
|
});
|
|
@@ -276,30 +283,30 @@ function N(e, t) {
|
|
|
276
283
|
}[t]?.includes(e) ?? !1;
|
|
277
284
|
}
|
|
278
285
|
export {
|
|
279
|
-
|
|
280
|
-
|
|
286
|
+
L as createActionColumn,
|
|
287
|
+
_ as createBooleanColumn,
|
|
281
288
|
B as createBooleanFilter,
|
|
282
289
|
S as createComputedColumn,
|
|
283
290
|
C as createDateColumn,
|
|
284
291
|
A as createDateFilter,
|
|
285
|
-
|
|
292
|
+
q as createDateTimeColumn,
|
|
286
293
|
D as createDateTimeFilter,
|
|
287
294
|
v as createDisplayColumn,
|
|
288
|
-
|
|
295
|
+
u as createFilterBadge,
|
|
289
296
|
O as createFilterBadges,
|
|
290
|
-
|
|
297
|
+
f as createInitialState,
|
|
291
298
|
V as createListFilter,
|
|
292
|
-
|
|
293
|
-
|
|
299
|
+
K as createMultiSelectColumn,
|
|
300
|
+
h as createNumberColumn,
|
|
294
301
|
I as createNumberFilter,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
302
|
+
F as createSingleSelectColumn,
|
|
303
|
+
p as createSorting,
|
|
304
|
+
y as createStringColumn,
|
|
298
305
|
T as createStringFilter,
|
|
299
306
|
w as getColumnIds,
|
|
300
307
|
N as isValidOperatorForType,
|
|
301
308
|
M as pinColumns,
|
|
302
|
-
|
|
303
|
-
|
|
309
|
+
b as toSelectOptions,
|
|
310
|
+
k as toSelectOptionsFromObjects,
|
|
304
311
|
$ as updateColumnListOptions
|
|
305
312
|
};
|