@vielzeug/refine 2.2.5 → 2.4.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/accordion-item.cjs +1 -1
- package/dist/accordion-item.cjs.map +1 -1
- package/dist/accordion-item.js +1 -1
- package/dist/accordion-item.js.map +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.cjs.map +1 -1
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.cjs.map +1 -1
- package/dist/carousel.js +1 -1
- package/dist/carousel.js.map +1 -1
- package/dist/chat-message.cjs +9 -9
- package/dist/chat-message.cjs.map +1 -1
- package/dist/chat-message.js +41 -38
- package/dist/chat-message.js.map +1 -1
- package/dist/combobox.cjs +9 -7
- package/dist/combobox.cjs.map +1 -1
- package/dist/combobox.js +55 -48
- package/dist/combobox.js.map +1 -1
- package/dist/command-palette.cjs +1 -1
- package/dist/command-palette.cjs.map +1 -1
- package/dist/command-palette.js +1 -1
- package/dist/command-palette.js.map +1 -1
- package/dist/content/index.d.ts +2 -0
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/list/list-item.css.cjs +1 -1
- package/dist/content/list/list-item.css.cjs.map +1 -1
- package/dist/content/list/list-item.css.js +1 -1
- package/dist/content/list/list-item.css.js.map +1 -1
- package/dist/content/list/list-item.d.ts +9 -0
- package/dist/content/list/list-item.d.ts.map +1 -1
- package/dist/content/stats/stats.css.cjs +2 -0
- package/dist/content/stats/stats.css.cjs.map +1 -0
- package/dist/content/stats/stats.css.js +6 -0
- package/dist/content/stats/stats.css.js.map +1 -0
- package/dist/content/stats/stats.d.ts +72 -0
- package/dist/content/stats/stats.d.ts.map +1 -0
- package/dist/core/announcer.cjs +1 -1
- package/dist/core/announcer.cjs.map +1 -1
- package/dist/core/announcer.d.ts +13 -3
- package/dist/core/announcer.d.ts.map +1 -1
- package/dist/core/announcer.js +16 -9
- package/dist/core/announcer.js.map +1 -1
- package/dist/core/auto-resize.cjs +1 -1
- package/dist/core/auto-resize.cjs.map +1 -1
- package/dist/core/auto-resize.js +1 -1
- package/dist/core/auto-resize.js.map +1 -1
- package/dist/custom-elements.json +4457 -4161
- package/dist/datagrid.cjs +199 -179
- package/dist/datagrid.cjs.map +1 -1
- package/dist/datagrid.js +435 -321
- package/dist/datagrid.js.map +1 -1
- package/dist/disclosure/tab-item/tab-item.css.cjs +1 -1
- package/dist/disclosure/tab-item/tab-item.css.cjs.map +1 -1
- package/dist/disclosure/tab-item/tab-item.css.js +1 -1
- package/dist/disclosure/tab-item/tab-item.css.js.map +1 -1
- package/dist/disclosure/tab-item/tab-item.d.ts +3 -0
- package/dist/disclosure/tab-item/tab-item.d.ts.map +1 -1
- package/dist/disclosure/tabs/tabs.css.cjs +1 -1
- package/dist/disclosure/tabs/tabs.css.cjs.map +1 -1
- package/dist/disclosure/tabs/tabs.css.js +1 -1
- package/dist/disclosure/tabs/tabs.css.js.map +1 -1
- package/dist/disclosure/tabs/tabs.d.ts +4 -0
- package/dist/disclosure/tabs/tabs.d.ts.map +1 -1
- package/dist/feedback/typing-indicator/typing-indicator.d.ts +2 -2
- package/dist/file-input.cjs +49 -49
- package/dist/file-input.cjs.map +1 -1
- package/dist/file-input.js +128 -127
- package/dist/file-input.js.map +1 -1
- package/dist/frameworks/elements.d.ts +2 -1
- package/dist/icon.cjs +1 -1
- package/dist/icon.cjs.map +1 -1
- package/dist/icon.js +1 -1
- package/dist/icon.js.map +1 -1
- package/dist/input.cjs +5 -4
- package/dist/input.cjs.map +1 -1
- package/dist/input.js +14 -8
- package/dist/input.js.map +1 -1
- package/dist/inputs/combobox/combobox-options.cjs +1 -1
- package/dist/inputs/combobox/combobox-options.cjs.map +1 -1
- package/dist/inputs/combobox/combobox-options.d.ts.map +1 -1
- package/dist/inputs/combobox/combobox-options.js +1 -0
- package/dist/inputs/combobox/combobox-options.js.map +1 -1
- package/dist/inputs/combobox/combobox.css.cjs +1 -1
- package/dist/inputs/combobox/combobox.css.cjs.map +1 -1
- package/dist/inputs/combobox/combobox.css.js +1 -1
- package/dist/inputs/combobox/combobox.css.js.map +1 -1
- package/dist/inputs/combobox/combobox.d.ts +1 -0
- package/dist/inputs/combobox/combobox.d.ts.map +1 -1
- package/dist/inputs/combobox/combobox.types.d.ts +7 -0
- package/dist/inputs/combobox/combobox.types.d.ts.map +1 -1
- package/dist/inputs/datagrid/datagrid-model.cjs +1 -1
- package/dist/inputs/datagrid/datagrid-model.cjs.map +1 -1
- package/dist/inputs/datagrid/datagrid-model.d.ts +17 -3
- package/dist/inputs/datagrid/datagrid-model.d.ts.map +1 -1
- package/dist/inputs/datagrid/datagrid-model.js +93 -70
- package/dist/inputs/datagrid/datagrid-model.js.map +1 -1
- package/dist/inputs/datagrid/datagrid.css.cjs +1 -1
- package/dist/inputs/datagrid/datagrid.css.cjs.map +1 -1
- package/dist/inputs/datagrid/datagrid.css.js +1 -1
- package/dist/inputs/datagrid/datagrid.css.js.map +1 -1
- package/dist/inputs/datagrid/datagrid.d.ts +54 -4
- package/dist/inputs/datagrid/datagrid.d.ts.map +1 -1
- package/dist/inputs/file-input/file-input-upload.cjs +1 -1
- package/dist/inputs/file-input/file-input-upload.cjs.map +1 -1
- package/dist/inputs/file-input/file-input-upload.d.ts +2 -0
- package/dist/inputs/file-input/file-input-upload.d.ts.map +1 -1
- package/dist/inputs/file-input/file-input-upload.js +5 -2
- package/dist/inputs/file-input/file-input-upload.js.map +1 -1
- package/dist/inputs/file-input/file-input.d.ts.map +1 -1
- package/dist/inputs/index.d.ts +1 -1
- package/dist/inputs/index.d.ts.map +1 -1
- package/dist/inputs/input/input.css.cjs +1 -1
- package/dist/inputs/input/input.css.cjs.map +1 -1
- package/dist/inputs/input/input.css.js +1 -1
- package/dist/inputs/input/input.css.js.map +1 -1
- package/dist/inputs/input/input.d.ts +3 -0
- package/dist/inputs/input/input.d.ts.map +1 -1
- package/dist/inputs/select/select.css.cjs +1 -1
- package/dist/inputs/select/select.css.cjs.map +1 -1
- package/dist/inputs/select/select.css.js +1 -1
- package/dist/inputs/select/select.css.js.map +1 -1
- package/dist/inputs/select/select.d.ts +5 -0
- package/dist/inputs/select/select.d.ts.map +1 -1
- package/dist/layout/navbar/navbar.d.ts +2 -0
- package/dist/layout/navbar/navbar.d.ts.map +1 -1
- package/dist/layout/sidebar/sidebar.css.cjs +1 -1
- package/dist/layout/sidebar/sidebar.css.cjs.map +1 -1
- package/dist/layout/sidebar/sidebar.css.js +1 -1
- package/dist/layout/sidebar/sidebar.css.js.map +1 -1
- package/dist/layout/sidebar/sidebar.d.ts +8 -0
- package/dist/layout/sidebar/sidebar.d.ts.map +1 -1
- package/dist/list-item.cjs +6 -5
- package/dist/list-item.cjs.map +1 -1
- package/dist/list-item.js +23 -17
- package/dist/list-item.js.map +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.cjs.map +1 -1
- package/dist/list.js +1 -1
- package/dist/list.js.map +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.cjs.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/menu.js.map +1 -1
- package/dist/navbar.cjs +2 -2
- package/dist/navbar.cjs.map +1 -1
- package/dist/navbar.js +7 -5
- package/dist/navbar.js.map +1 -1
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.cjs.map +1 -1
- package/dist/navigation-menu.js +1 -1
- package/dist/navigation-menu.js.map +1 -1
- package/dist/overlay/popover/popover.css.cjs +1 -1
- package/dist/overlay/popover/popover.css.cjs.map +1 -1
- package/dist/overlay/popover/popover.css.js +1 -1
- package/dist/overlay/popover/popover.css.js.map +1 -1
- package/dist/overlay/popover/popover.d.ts +1 -0
- package/dist/overlay/popover/popover.d.ts.map +1 -1
- package/dist/overlay/shared/use-dialog.cjs +1 -1
- package/dist/overlay/shared/use-dialog.cjs.map +1 -1
- package/dist/overlay/shared/use-dialog.js +1 -1
- package/dist/overlay/shared/use-dialog.js.map +1 -1
- package/dist/overlay/shared/use-floating-trigger.cjs +1 -1
- package/dist/overlay/shared/use-floating-trigger.cjs.map +1 -1
- package/dist/overlay/shared/use-floating-trigger.js +1 -1
- package/dist/overlay/shared/use-floating-trigger.js.map +1 -1
- package/dist/popover.cjs.map +1 -1
- package/dist/popover.js.map +1 -1
- package/dist/radio.cjs +1 -1
- package/dist/radio.cjs.map +1 -1
- package/dist/radio.js +10 -8
- package/dist/radio.js.map +1 -1
- package/dist/rating.cjs +1 -1
- package/dist/rating.cjs.map +1 -1
- package/dist/rating.js +1 -1
- package/dist/rating.js.map +1 -1
- package/dist/refine.cjs +428 -379
- package/dist/refine.cjs.map +1 -1
- package/dist/refine.iife.js +428 -379
- package/dist/refine.iife.js.map +1 -1
- package/dist/refine.js +458 -409
- package/dist/refine.js.map +1 -1
- package/dist/select.cjs +16 -14
- package/dist/select.cjs.map +1 -1
- package/dist/select.js +118 -112
- package/dist/select.js.map +1 -1
- package/dist/sidebar.cjs +28 -23
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.js +112 -77
- package/dist/sidebar.js.map +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.cjs.map +1 -1
- package/dist/slider.js +1 -1
- package/dist/slider.js.map +1 -1
- package/dist/stats.cjs +18 -0
- package/dist/stats.cjs.map +1 -0
- package/dist/stats.js +88 -0
- package/dist/stats.js.map +1 -0
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.cjs.map +1 -1
- package/dist/stepper.js +1 -1
- package/dist/stepper.js.map +1 -1
- package/dist/styles/mixins/animation.css.cjs +2 -0
- package/dist/styles/mixins/animation.css.cjs.map +1 -1
- package/dist/styles/mixins/animation.css.d.ts.map +1 -1
- package/dist/styles/mixins/animation.css.js +2 -0
- package/dist/styles/mixins/animation.css.js.map +1 -1
- package/dist/tab-item.cjs +1 -1
- package/dist/tab-item.cjs.map +1 -1
- package/dist/tab-item.js +3 -2
- package/dist/tab-item.js.map +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.cjs.map +1 -1
- package/dist/tabs.js +3 -1
- package/dist/tabs.js.map +1 -1
- package/dist/toast.cjs.map +1 -1
- package/dist/toast.js.map +1 -1
- package/dist/typing-indicator.cjs +1 -1
- package/dist/typing-indicator.cjs.map +1 -1
- package/dist/typing-indicator.js +8 -7
- package/dist/typing-indicator.js.map +1 -1
- package/package.json +66 -58
package/dist/datagrid.js
CHANGED
|
@@ -4,53 +4,108 @@ import { disablableBundle as t, loadableBundle as n } from "./shared/prop-bundle
|
|
|
4
4
|
import r from "./inputs/datagrid/datagrid.css.js";
|
|
5
5
|
import { COLUMN_OBSERVED_ATTRS as i, COLUMN_TAG as a, parseColumnChildren as o } from "./inputs/datagrid/datagrid-column.js";
|
|
6
6
|
import { createDataGridModel as s } from "./inputs/datagrid/datagrid-model.js";
|
|
7
|
-
import { createGridNav as
|
|
8
|
-
import { define as
|
|
9
|
-
import { computed as
|
|
10
|
-
import { debounce as
|
|
7
|
+
import { createGridNav as ee } from "./inputs/datagrid/datagrid-nav.js";
|
|
8
|
+
import { define as c, getHost as te, html as l, onCleanup as ne, onMounted as u, prop as d, unsafeHtml as f, useEmit as p, useSlots as m } from "@vielzeug/ore";
|
|
9
|
+
import { computed as h, signal as g, watch as _ } from "@vielzeug/ripple";
|
|
10
|
+
import { debounce as re } from "@vielzeug/arsenal/function";
|
|
11
11
|
//#region src/inputs/datagrid/datagrid.ts
|
|
12
|
-
|
|
12
|
+
var v = {
|
|
13
|
+
activeFilters: (e) => `${e} active filter${e === 1 ? "" : "s"}`,
|
|
14
|
+
addFilter: "Add filter…",
|
|
15
|
+
ascending: "A → Z",
|
|
16
|
+
clearAllFilters: "Clear all filters",
|
|
17
|
+
clearFiltersAndSearch: "Clear all filters & search",
|
|
18
|
+
clearSort: "Clear sort",
|
|
19
|
+
closeSearch: "Close search",
|
|
20
|
+
collapseRow: "Collapse row",
|
|
21
|
+
columnOptions: "Column options",
|
|
22
|
+
columnVisibility: "Column visibility",
|
|
23
|
+
comfortableDensity: "Density: Comfortable",
|
|
24
|
+
compactDensity: "Density: Compact",
|
|
25
|
+
contains: "Contains",
|
|
26
|
+
cozyDensity: "Density: Cozy",
|
|
27
|
+
data: "Data",
|
|
28
|
+
descending: "Z → A",
|
|
29
|
+
emptyValue: "(empty)",
|
|
30
|
+
equals: "Equals",
|
|
31
|
+
expandRow: "Expand row",
|
|
32
|
+
filter: "Filter",
|
|
33
|
+
filterBy: "Filter by",
|
|
34
|
+
filterOperator: (e) => `${e} operator`,
|
|
35
|
+
greaterThan: "Greater than",
|
|
36
|
+
hiddenColumns: (e) => `${e} hidden column${e === 1 ? "" : "s"}`,
|
|
37
|
+
lessThan: "Less than",
|
|
38
|
+
nextPage: "Next page",
|
|
39
|
+
numericAscending: "0 → 9",
|
|
40
|
+
numericDescending: "9 → 0",
|
|
41
|
+
pageNavigation: "Page navigation",
|
|
42
|
+
pagination: "Pagination",
|
|
43
|
+
previousPage: "Previous page",
|
|
44
|
+
property: "Property",
|
|
45
|
+
range: (e, t, n) => `${e} to ${t} of ${n}`,
|
|
46
|
+
removeFilter: "Remove filter",
|
|
47
|
+
resetColumns: "Reset",
|
|
48
|
+
rowDetails: "Row details",
|
|
49
|
+
rows: (e) => `${e} row${e === 1 ? "" : "s"}`,
|
|
50
|
+
rowsPerPage: "Rows per page",
|
|
51
|
+
search: "Search",
|
|
52
|
+
selectAllRows: "Select all rows on this page",
|
|
53
|
+
selectRow: "Select row",
|
|
54
|
+
sort: "Sort",
|
|
55
|
+
sortBy: "Sort by",
|
|
56
|
+
views: "Views",
|
|
57
|
+
visibleColumns: (e, t) => `${e} of ${t} visible`
|
|
58
|
+
};
|
|
59
|
+
function y(e, t) {
|
|
13
60
|
return e.key !== t || e.direction === "none" ? "chevrons-up-down" : e.direction === "asc" ? "chevron-up" : "chevron-down";
|
|
14
61
|
}
|
|
15
|
-
function
|
|
62
|
+
function b(e, t) {
|
|
16
63
|
return e.key !== t || e.direction === "none" ? "none" : e.direction === "asc" ? "ascending" : "descending";
|
|
17
64
|
}
|
|
65
|
+
function x(e) {
|
|
66
|
+
let t = e.detail;
|
|
67
|
+
return Array.isArray(t?.values) ? t.values : (e.target.value ?? "").split(",").filter(Boolean);
|
|
68
|
+
}
|
|
18
69
|
var S = "ore-datagrid";
|
|
19
|
-
|
|
70
|
+
c(S, {
|
|
20
71
|
props: {
|
|
21
|
-
activeView:
|
|
22
|
-
density:
|
|
72
|
+
activeView: d.string(),
|
|
73
|
+
density: d.string(),
|
|
23
74
|
...t,
|
|
24
75
|
...n,
|
|
25
|
-
columns:
|
|
26
|
-
emptyText:
|
|
27
|
-
expandable:
|
|
28
|
-
filterOptions:
|
|
29
|
-
fullwidth:
|
|
30
|
-
getRowKey:
|
|
31
|
-
label:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
76
|
+
columns: d.data(),
|
|
77
|
+
emptyText: d.string("No data"),
|
|
78
|
+
expandable: d.bool(!1),
|
|
79
|
+
filterOptions: d.data(),
|
|
80
|
+
fullwidth: d.bool(!1),
|
|
81
|
+
getRowKey: d.data(),
|
|
82
|
+
label: d.string(),
|
|
83
|
+
labels: d.data(),
|
|
84
|
+
pageSize: d.number(10),
|
|
85
|
+
pageSizeOptions: d.data(),
|
|
86
|
+
rows: d.data(),
|
|
87
|
+
searchLabel: d.data(),
|
|
88
|
+
searchPlaceholder: d.string(),
|
|
89
|
+
selectedKeys: d.data(),
|
|
90
|
+
selectionMode: d.string("none"),
|
|
91
|
+
sortMode: d.string("client"),
|
|
92
|
+
source: d.data(),
|
|
93
|
+
striped: d.bool(!1),
|
|
94
|
+
views: d.data()
|
|
43
95
|
},
|
|
44
96
|
setup(e) {
|
|
45
|
-
let t =
|
|
46
|
-
|
|
47
|
-
e
|
|
97
|
+
let t = te(), n = p(), r = m(), a = h(() => ({
|
|
98
|
+
...v,
|
|
99
|
+
...e.labels.value
|
|
100
|
+
})), c = h(() => e.disabled.value === !0), d = h(() => e.selectionMode.value ?? "none"), S = g(/* @__PURE__ */ new Set()), C = h(() => e.expandable.value === !0 && D.value.some((e) => typeof e.renderExpanded == "function")), w = h(() => +(d.value === "multi")), T = g(e.pageSize.value ?? 10);
|
|
101
|
+
_(e.pageSize, (e) => {
|
|
102
|
+
e != null && (T.value = e);
|
|
48
103
|
});
|
|
49
|
-
let
|
|
50
|
-
|
|
51
|
-
|
|
104
|
+
let E = g([]);
|
|
105
|
+
u(() => {
|
|
106
|
+
E.value = o(t);
|
|
52
107
|
let e = new MutationObserver(() => {
|
|
53
|
-
|
|
108
|
+
E.value = o(t);
|
|
54
109
|
});
|
|
55
110
|
return e.observe(t, {
|
|
56
111
|
attributeFilter: i,
|
|
@@ -59,38 +114,48 @@ l(S, {
|
|
|
59
114
|
subtree: !0
|
|
60
115
|
}), () => e.disconnect();
|
|
61
116
|
});
|
|
62
|
-
let
|
|
117
|
+
let D = h(() => {
|
|
63
118
|
let t = e.columns.value;
|
|
64
|
-
return t === void 0 ?
|
|
65
|
-
}),
|
|
119
|
+
return t === void 0 ? E.value : t;
|
|
120
|
+
}), O = h(() => {
|
|
121
|
+
let t = D.value.map((e) => ({
|
|
122
|
+
label: e.label,
|
|
123
|
+
value: e.key
|
|
124
|
+
})), n = new Set(t.map((e) => e.value));
|
|
125
|
+
for (let r of e.filterOptions.value ?? []) n.has(r.key) || t.push({
|
|
126
|
+
label: r.label,
|
|
127
|
+
value: r.key
|
|
128
|
+
});
|
|
129
|
+
return t;
|
|
130
|
+
}), k = (t) => {
|
|
66
131
|
let n = e.getRowKey.value;
|
|
67
132
|
if (n) return n(t);
|
|
68
133
|
let r = t.id;
|
|
69
134
|
return r == null ? `__missing_${Math.random().toString(36).slice(2)}` : String(r);
|
|
70
|
-
},
|
|
135
|
+
}, A = h(() => e.source.value != null), j = g([]), M = g({
|
|
71
136
|
error: null,
|
|
72
137
|
isLoading: !1,
|
|
73
138
|
pageCount: 1,
|
|
74
139
|
pageNumber: 1,
|
|
75
|
-
pageSize:
|
|
140
|
+
pageSize: T.value,
|
|
76
141
|
totalItems: 0
|
|
77
|
-
}),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}),
|
|
81
|
-
if (
|
|
82
|
-
|
|
142
|
+
}), N = null;
|
|
143
|
+
ne(() => {
|
|
144
|
+
N?.(), N = null;
|
|
145
|
+
}), _(e.source, (e) => {
|
|
146
|
+
if (N?.(), N = null, !e) {
|
|
147
|
+
j.value = [], M.value = {
|
|
83
148
|
error: null,
|
|
84
149
|
isLoading: !1,
|
|
85
150
|
pageCount: 1,
|
|
86
151
|
pageNumber: 1,
|
|
87
|
-
pageSize:
|
|
152
|
+
pageSize: T.value,
|
|
88
153
|
totalItems: 0
|
|
89
154
|
};
|
|
90
155
|
return;
|
|
91
156
|
}
|
|
92
157
|
let t = (t = e.snapshot) => {
|
|
93
|
-
|
|
158
|
+
j.value = t.data, M.value = {
|
|
94
159
|
error: t.error,
|
|
95
160
|
isLoading: t.isFetching,
|
|
96
161
|
pageCount: t.pagination.count,
|
|
@@ -99,119 +164,156 @@ l(S, {
|
|
|
99
164
|
totalItems: t.pagination.total
|
|
100
165
|
};
|
|
101
166
|
};
|
|
102
|
-
t(),
|
|
167
|
+
t(), N = e.subscribe(t);
|
|
103
168
|
}, { immediate: !0 });
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
|
|
169
|
+
let P = s({
|
|
170
|
+
activeView: h(() => (e.views.value ?? []).find((t) => t.id === e.activeView.value)),
|
|
171
|
+
clientSide: h(() => !A.value),
|
|
172
|
+
columns: D,
|
|
173
|
+
emptyValueLabel: h(() => a.value.emptyValue),
|
|
174
|
+
filterOperators: h(() => [
|
|
175
|
+
{
|
|
176
|
+
label: a.value.contains,
|
|
177
|
+
value: "contains"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
label: a.value.equals,
|
|
181
|
+
value: "equals"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
label: a.value.greaterThan,
|
|
185
|
+
value: "gt"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
label: a.value.lessThan,
|
|
189
|
+
value: "lt"
|
|
190
|
+
}
|
|
191
|
+
]),
|
|
107
192
|
filterOptions: e.filterOptions,
|
|
108
|
-
getRowKey:
|
|
109
|
-
items:
|
|
193
|
+
getRowKey: k,
|
|
194
|
+
items: h(() => A.value ? j.value : e.rows.value ?? []),
|
|
110
195
|
onSelectionChange: (e) => {
|
|
111
196
|
n("selection-change", {
|
|
112
197
|
keys: [...e],
|
|
113
|
-
rows:
|
|
198
|
+
rows: P.selectedRows.value
|
|
114
199
|
});
|
|
115
200
|
},
|
|
116
201
|
onSortChange: (e) => {
|
|
117
202
|
n("sort-change", e);
|
|
118
203
|
},
|
|
119
|
-
pageSize:
|
|
120
|
-
selectionMode:
|
|
121
|
-
sortMode:
|
|
122
|
-
}),
|
|
204
|
+
pageSize: h(() => A.value ? 0 : T.value),
|
|
205
|
+
selectionMode: d,
|
|
206
|
+
sortMode: h(() => e.sortMode.value ?? "client")
|
|
207
|
+
}), ie = h(() => {
|
|
208
|
+
let e = D.value.find((e) => e.key === P.sortState.value.key);
|
|
209
|
+
if (e?.sortType) return e.sortType;
|
|
210
|
+
let t = P.filteredRows.value.find((t) => t[e?.key ?? ""] != null);
|
|
211
|
+
return t && typeof t[e?.key ?? ""] == "number" ? "number" : "text";
|
|
212
|
+
}), F = h(() => ie.value === "number" ? [{
|
|
213
|
+
label: a.value.numericAscending,
|
|
214
|
+
value: "asc"
|
|
215
|
+
}, {
|
|
216
|
+
label: a.value.numericDescending,
|
|
217
|
+
value: "desc"
|
|
218
|
+
}] : [{
|
|
219
|
+
label: a.value.ascending,
|
|
220
|
+
value: "asc"
|
|
221
|
+
}, {
|
|
222
|
+
label: a.value.descending,
|
|
223
|
+
value: "desc"
|
|
224
|
+
}]), I = re((t) => {
|
|
123
225
|
let n = e.source.value;
|
|
124
|
-
n?.setQuery ? n.setQuery({ search: t }) :
|
|
226
|
+
n?.setQuery ? n.setQuery({ search: t }) : P.setSearchQuery(t);
|
|
125
227
|
}, 250);
|
|
126
|
-
|
|
127
|
-
Array.isArray(e) &&
|
|
228
|
+
_(e.selectedKeys, (e) => {
|
|
229
|
+
Array.isArray(e) && P.setSelection(new Set(e));
|
|
128
230
|
}, { immediate: !0 });
|
|
129
|
-
let
|
|
231
|
+
let L = g({}), R = (e, t) => (n) => {
|
|
130
232
|
n.preventDefault();
|
|
131
233
|
let r = n.clientX, i = t.getBoundingClientRect().width, a = new AbortController(), { signal: o } = a;
|
|
132
234
|
window.addEventListener("pointermove", (t) => {
|
|
133
|
-
|
|
134
|
-
...
|
|
235
|
+
L.value = {
|
|
236
|
+
...L.value,
|
|
135
237
|
[e]: Math.max(40, i + t.clientX - r)
|
|
136
238
|
};
|
|
137
239
|
}, { signal: o }), window.addEventListener("pointerup", () => a.abort(), { signal: o });
|
|
138
|
-
},
|
|
240
|
+
}, z = P.visibleColumns, B = (e, t) => {
|
|
139
241
|
if (e.cell) return e.cell(t);
|
|
140
242
|
let n = t[e.key];
|
|
141
243
|
return n == null ? "" : String(n);
|
|
142
244
|
};
|
|
143
|
-
function
|
|
245
|
+
function V(t) {
|
|
144
246
|
let r = e.source.value;
|
|
145
247
|
if (r) {
|
|
146
248
|
t === "prev" ? r.page?.previous() : r.page?.next();
|
|
147
249
|
return;
|
|
148
250
|
}
|
|
149
|
-
t === "prev" ?
|
|
150
|
-
pageIndex:
|
|
151
|
-
pageSize:
|
|
251
|
+
t === "prev" ? P.prevPage() : P.nextPage(), n("page-change", {
|
|
252
|
+
pageIndex: P.pageIndex.value,
|
|
253
|
+
pageSize: T.value
|
|
152
254
|
});
|
|
153
255
|
}
|
|
154
|
-
let
|
|
155
|
-
let e =
|
|
156
|
-
return !e.length ||
|
|
157
|
-
}),
|
|
158
|
-
if (
|
|
159
|
-
let { pageNumber: e, pageSize: t, totalItems: n } =
|
|
160
|
-
if (!
|
|
161
|
-
if (n === 0) return
|
|
162
|
-
let i = (e - 1) * r + 1;
|
|
163
|
-
return
|
|
256
|
+
let H = h(() => {
|
|
257
|
+
let e = P.currentPageItems.value;
|
|
258
|
+
return !e.length || P.isAllSelected() ? !1 : e.some((e) => P.selectedKeys.value.has(k(e)));
|
|
259
|
+
}), U = h(() => z.value.length + +(d.value === "multi") + +!!C.value), W = h(() => A.value ? M.value.pageCount > 1 : T.value > 0), G = h(() => {
|
|
260
|
+
if (A.value) {
|
|
261
|
+
let { pageNumber: e, pageSize: t, totalItems: n } = M.value, r = Math.max(1, t);
|
|
262
|
+
if (!W.value) return a.value.rows(n);
|
|
263
|
+
if (n === 0) return a.value.range(0, 0, 0);
|
|
264
|
+
let i = (e - 1) * r + 1, o = Math.min(i + r - 1, n);
|
|
265
|
+
return a.value.range(i, o, n);
|
|
164
266
|
}
|
|
165
|
-
let e =
|
|
166
|
-
if (!
|
|
167
|
-
if (e === 0) return
|
|
168
|
-
let t =
|
|
169
|
-
return
|
|
170
|
-
}),
|
|
267
|
+
let e = P.totalItems.value;
|
|
268
|
+
if (!W.value) return a.value.rows(e);
|
|
269
|
+
if (e === 0) return a.value.range(0, 0, 0);
|
|
270
|
+
let t = P.pageIndex.value * T.value + 1, n = Math.min(t + T.value - 1, e);
|
|
271
|
+
return a.value.range(t, n, e);
|
|
272
|
+
}), K = h(() => e.loading.value === !0 || A.value && M.value.isLoading), q = h(() => A.value ? M.value.pageNumber > 1 : P.hasPrevPage.value), J = h(() => A.value ? M.value.pageNumber < M.value.pageCount : P.hasNextPage.value), ae = h(() => A.value ? M.value.totalItems === 0 ? "0 / 0" : `${M.value.pageNumber} / ${M.value.pageCount}` : `${P.pageIndex.value + 1} / ${P.pageCount.value}`), Y = [
|
|
171
273
|
"compact",
|
|
172
274
|
"cozy",
|
|
173
275
|
"comfortable"
|
|
174
|
-
],
|
|
276
|
+
], oe = {
|
|
175
277
|
comfortable: "rows-2",
|
|
176
278
|
compact: "rows-4",
|
|
177
279
|
cozy: "rows-3"
|
|
178
|
-
},
|
|
179
|
-
comfortable:
|
|
180
|
-
compact:
|
|
181
|
-
cozy:
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
e && (
|
|
280
|
+
}, se = h(() => ({
|
|
281
|
+
comfortable: a.value.comfortableDensity,
|
|
282
|
+
compact: a.value.compactDensity,
|
|
283
|
+
cozy: a.value.cozyDensity
|
|
284
|
+
})), X = g(e.density.value ?? "cozy");
|
|
285
|
+
_(e.density, (e) => {
|
|
286
|
+
e && (X.value = e);
|
|
185
287
|
});
|
|
186
|
-
let
|
|
187
|
-
let e =
|
|
188
|
-
|
|
189
|
-
}, Z =
|
|
190
|
-
let t = new Set(
|
|
191
|
-
r ? t.add(e) : t.delete(e),
|
|
288
|
+
let ce = () => {
|
|
289
|
+
let e = Y.indexOf(X.value), r = Y[(e + 1) % Y.length];
|
|
290
|
+
X.value = r, t.setAttribute("density", r), n("density-change", { density: r });
|
|
291
|
+
}, Z = (e) => {
|
|
292
|
+
let t = new Set(S.value), r = !t.has(e);
|
|
293
|
+
r ? t.add(e) : t.delete(e), S.value = t, n("row-expand", {
|
|
192
294
|
expanded: r,
|
|
193
295
|
key: e
|
|
194
296
|
});
|
|
195
|
-
},
|
|
196
|
-
activeCell:
|
|
297
|
+
}, Q = {
|
|
298
|
+
activeCell: g({
|
|
197
299
|
col: 0,
|
|
198
300
|
row: 0
|
|
199
301
|
}),
|
|
200
302
|
focusCell: () => {}
|
|
201
303
|
};
|
|
202
|
-
|
|
304
|
+
u(() => {
|
|
203
305
|
let e = t.shadowRoot, n = e.querySelector(".dg-table");
|
|
204
306
|
if (!n) return;
|
|
205
|
-
let { cleanup: r, handle: i } =
|
|
206
|
-
return
|
|
207
|
-
}), t.focusCell = (e) =>
|
|
208
|
-
let
|
|
307
|
+
let { cleanup: r, handle: i } = ee(n, e);
|
|
308
|
+
return Q = i, r;
|
|
309
|
+
}), t.focusCell = (e) => Q.focusCell(e);
|
|
310
|
+
let le = () => {
|
|
209
311
|
let t = e.views.value ?? [], r = e.activeView.value;
|
|
210
|
-
return
|
|
312
|
+
return l`
|
|
211
313
|
<div
|
|
212
314
|
class="dg-tabs"
|
|
213
315
|
role="tablist"
|
|
214
|
-
aria-label="
|
|
316
|
+
aria-label="${() => a.value.views}"
|
|
215
317
|
aria-controls="dg-tabpanel"
|
|
216
318
|
@keydown="${(e) => {
|
|
217
319
|
if (![
|
|
@@ -227,7 +329,7 @@ l(S, {
|
|
|
227
329
|
n.focus(), n.click();
|
|
228
330
|
}
|
|
229
331
|
}}">
|
|
230
|
-
${t.map((e) =>
|
|
332
|
+
${t.map((e) => l`
|
|
231
333
|
<ore-button
|
|
232
334
|
class="${() => `dg-tab${r === e.id ? " dg-tab--active" : ""}`}"
|
|
233
335
|
role="tab"
|
|
@@ -248,206 +350,218 @@ l(S, {
|
|
|
248
350
|
`)}
|
|
249
351
|
</div>
|
|
250
352
|
`;
|
|
251
|
-
},
|
|
252
|
-
<ore-popover class="dg-action-popover" placement="bottom-end" label="
|
|
253
|
-
<ore-button
|
|
353
|
+
}, $ = () => l`
|
|
354
|
+
<ore-popover class="dg-action-popover" placement="bottom-end" label="${() => a.value.sort}" style="--popover-min-width:18rem;--popover-overflow:visible">
|
|
355
|
+
<ore-button
|
|
356
|
+
class="dg-icon-btn dg-state-trigger"
|
|
357
|
+
variant="ghost"
|
|
358
|
+
size="sm"
|
|
359
|
+
icon-only
|
|
360
|
+
?data-customized="${() => P.sortState.value.direction !== "none"}"
|
|
361
|
+
label="${() => a.value.sort}">
|
|
254
362
|
<ore-icon name="arrow-up-down" size="15" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
255
363
|
</ore-button>
|
|
256
364
|
<div slot="content" class="dg-pop-sort">
|
|
257
365
|
<div class="dg-pop-header">
|
|
258
|
-
<span class="dg-pop-title"
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
366
|
+
<span class="dg-pop-title">${() => a.value.sortBy}</span>
|
|
367
|
+
${() => P.sortState.value.direction === "none" ? l`` : l`
|
|
368
|
+
<ore-button
|
|
369
|
+
class="dg-icon-btn"
|
|
370
|
+
variant="ghost"
|
|
371
|
+
size="sm"
|
|
372
|
+
icon-only
|
|
373
|
+
label="${() => a.value.clearSort}"
|
|
374
|
+
@click="${() => P.sortTo("", "none")}">
|
|
375
|
+
<ore-icon name="trash-2" size="14" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
376
|
+
</ore-button>
|
|
377
|
+
`}
|
|
269
378
|
</div>
|
|
270
379
|
<div class="dg-pop-sort-row">
|
|
271
380
|
<ore-select
|
|
272
381
|
class="dg-pop-select"
|
|
382
|
+
hide-label
|
|
273
383
|
variant="flat"
|
|
274
384
|
size="sm"
|
|
275
385
|
rounded="lg"
|
|
276
|
-
|
|
386
|
+
label="${() => a.value.property}"
|
|
387
|
+
placeholder="${() => a.value.property}"
|
|
277
388
|
fullwidth
|
|
278
|
-
value="${() =>
|
|
279
|
-
options="${() =>
|
|
389
|
+
value="${() => P.sortState.value.key}"
|
|
390
|
+
options="${() => D.value.map((e) => ({
|
|
280
391
|
label: e.label,
|
|
281
392
|
value: e.key
|
|
282
393
|
}))}"
|
|
283
394
|
@change="${(e) => {
|
|
284
|
-
let t = e
|
|
285
|
-
|
|
395
|
+
let t = x(e)[0] ?? "", n = P.sortState.value.direction === "none" ? "asc" : P.sortState.value.direction;
|
|
396
|
+
P.sortTo(t, n);
|
|
286
397
|
}}"></ore-select>
|
|
287
398
|
<ore-select
|
|
288
399
|
class="dg-pop-dir-select"
|
|
400
|
+
hide-label
|
|
289
401
|
variant="flat"
|
|
290
402
|
size="sm"
|
|
291
403
|
rounded="lg"
|
|
404
|
+
label="${() => a.value.sort}"
|
|
292
405
|
fullwidth
|
|
293
|
-
disabled="${() => !
|
|
294
|
-
value="${() =>
|
|
295
|
-
options="${
|
|
296
|
-
label: "A → Z",
|
|
297
|
-
value: "asc"
|
|
298
|
-
}, {
|
|
299
|
-
label: "Z → A",
|
|
300
|
-
value: "desc"
|
|
301
|
-
}]}"
|
|
406
|
+
disabled="${() => !P.sortState.value.key || void 0}"
|
|
407
|
+
value="${() => P.sortState.value.direction === "none" ? "asc" : P.sortState.value.direction}"
|
|
408
|
+
options="${F}"
|
|
302
409
|
@change="${(e) => {
|
|
303
|
-
|
|
410
|
+
P.sortState.value.key && P.sortTo(P.sortState.value.key, x(e)[0] ?? "asc");
|
|
304
411
|
}}"></ore-select>
|
|
305
412
|
</div>
|
|
306
413
|
</div>
|
|
307
414
|
</ore-popover>
|
|
308
|
-
`,
|
|
415
|
+
`, ue = () => l`
|
|
309
416
|
<ore-popover
|
|
310
417
|
class="dg-action-popover"
|
|
311
418
|
placement="bottom-end"
|
|
312
|
-
label="
|
|
313
|
-
style="--popover-min-width:
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
@mouseenter="${() => Z.value = !0}"
|
|
324
|
-
@mouseleave="${() => Z.value = !1}"
|
|
325
|
-
@focusin="${() => Z.value = !0}"
|
|
326
|
-
@focusout="${() => Z.value = !1}">
|
|
327
|
-
<ore-button slot="target" variant="ghost" size="sm" icon-only label="Filter">
|
|
328
|
-
<ore-icon name="filter" size="15" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
329
|
-
</ore-button>
|
|
330
|
-
</ore-badge>
|
|
331
|
-
` : d`
|
|
332
|
-
<ore-button class="dg-icon-btn" variant="ghost" size="sm" icon-only label="Filter">
|
|
333
|
-
<ore-icon name="filter" size="15" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
334
|
-
</ore-button>
|
|
335
|
-
`}
|
|
419
|
+
label="${() => a.value.filter}"
|
|
420
|
+
style="--popover-min-width:18rem;--popover-max-height:min(90vh,48rem)">
|
|
421
|
+
<ore-button
|
|
422
|
+
class="dg-icon-btn dg-state-trigger"
|
|
423
|
+
variant="ghost"
|
|
424
|
+
size="sm"
|
|
425
|
+
icon-only
|
|
426
|
+
?data-customized="${() => P.filterDefs.value.length > 0}"
|
|
427
|
+
label="${() => P.filterDefs.value.length ? `${a.value.filter}: ${a.value.activeFilters(P.filterDefs.value.length)}` : a.value.filter}">
|
|
428
|
+
<ore-icon name="filter" size="15" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
429
|
+
</ore-button>
|
|
336
430
|
<div slot="content" class="dg-pop-filter">
|
|
337
431
|
<div class="dg-pop-header">
|
|
338
|
-
<span class="dg-pop-title"
|
|
339
|
-
${() =>
|
|
432
|
+
<span class="dg-pop-title">${() => a.value.filterBy}</span>
|
|
433
|
+
${() => P.filterDefs.value.length ? l`
|
|
340
434
|
<ore-button
|
|
341
435
|
class="dg-icon-btn"
|
|
342
436
|
variant="ghost"
|
|
343
437
|
size="sm"
|
|
344
438
|
icon-only
|
|
345
|
-
label="
|
|
346
|
-
@click="${() =>
|
|
439
|
+
label="${() => a.value.clearAllFilters}"
|
|
440
|
+
@click="${() => P.clearAllFilters()}">
|
|
347
441
|
<ore-icon name="trash-2" size="14" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
348
442
|
</ore-button>
|
|
349
|
-
` :
|
|
443
|
+
` : l``}
|
|
350
444
|
</div>
|
|
351
445
|
|
|
352
446
|
<!-- Always-visible field picker: select columns to add filter rules -->
|
|
353
447
|
<div class="dg-pop-filter-fields">
|
|
354
448
|
<ore-combobox
|
|
355
|
-
|
|
449
|
+
hide-label
|
|
450
|
+
label="${() => a.value.addFilter}"
|
|
451
|
+
placeholder="${() => a.value.addFilter}"
|
|
356
452
|
multiple
|
|
357
453
|
fullwidth
|
|
358
454
|
autoclose
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
value="${() => M.filterDefs.value.map((e) => e.key)}"
|
|
455
|
+
size="sm"
|
|
456
|
+
variant="flat"
|
|
457
|
+
options="${O}"
|
|
458
|
+
value="${() => P.filterDefs.value.map((e) => e.key)}"
|
|
364
459
|
@change="${(e) => {
|
|
365
|
-
|
|
460
|
+
P.setActiveFilterKeys(x(e));
|
|
366
461
|
}}"></ore-combobox>
|
|
367
462
|
</div>
|
|
368
463
|
|
|
369
464
|
<!-- Active filter rules (appear below the field picker as rules are added) -->
|
|
370
|
-
<div class="dg-pop-filter-rules" ?hidden="${() => !
|
|
371
|
-
${() =>
|
|
465
|
+
<div class="dg-pop-filter-rules" ?hidden="${() => !P.filterDefs.value.length}">
|
|
466
|
+
${() => P.filterDefs.value.map((e) => l`
|
|
372
467
|
<div class="dg-pop-filter-rule">
|
|
373
468
|
<div class="dg-pop-filter-rule-header">
|
|
374
469
|
<span class="dg-pop-filter-field">${e.label}</span>
|
|
375
470
|
<ore-select
|
|
376
471
|
class="dg-pop-filter-op-select"
|
|
472
|
+
hide-label
|
|
377
473
|
variant="ghost"
|
|
378
474
|
size="sm"
|
|
475
|
+
label="${() => a.value.filterOperator(e.label)}"
|
|
379
476
|
fullwidth
|
|
380
|
-
value="${() =>
|
|
477
|
+
value="${() => P.filterValues.value.get(e.key)?.operator ?? "contains"}"
|
|
381
478
|
options="${() => e.operators ?? []}"
|
|
382
479
|
@change="${(t) => {
|
|
383
|
-
|
|
480
|
+
let n = x(t)[0];
|
|
481
|
+
n && P.setFilterOperator(e.key, n);
|
|
384
482
|
}}"></ore-select>
|
|
385
483
|
<ore-button
|
|
386
484
|
class="dg-icon-btn"
|
|
387
485
|
variant="ghost"
|
|
388
486
|
size="sm"
|
|
389
487
|
icon-only
|
|
390
|
-
label="
|
|
391
|
-
@click="${() =>
|
|
488
|
+
label="${() => a.value.removeFilter}"
|
|
489
|
+
@click="${() => P.removeFilter(e.key)}">
|
|
392
490
|
<ore-icon name="trash-2" size="13" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
393
491
|
</ore-button>
|
|
394
492
|
</div>
|
|
395
493
|
<ore-combobox
|
|
396
494
|
class="dg-filter"
|
|
495
|
+
hide-label
|
|
496
|
+
size="sm"
|
|
497
|
+
variant="flat"
|
|
498
|
+
label="${() => e.label}"
|
|
397
499
|
placeholder="${() => e.label}"
|
|
398
500
|
options="${() => e.options}"
|
|
399
|
-
value="${() => [...
|
|
400
|
-
disabled="${() =>
|
|
501
|
+
value="${() => [...P.filterValues.value.get(e.key)?.values ?? []]}"
|
|
502
|
+
disabled="${() => c.value || void 0}"
|
|
401
503
|
multiple
|
|
402
504
|
fullwidth
|
|
403
505
|
autoclose
|
|
404
506
|
@change="${(t) => {
|
|
405
|
-
|
|
507
|
+
P.setFilter(e.key, x(t));
|
|
406
508
|
}}"></ore-combobox>
|
|
407
509
|
</div>
|
|
408
510
|
`)}
|
|
409
511
|
</div>
|
|
410
512
|
</div>
|
|
411
513
|
</ore-popover>
|
|
412
|
-
`,
|
|
514
|
+
`, de = () => l`
|
|
413
515
|
<ore-popover
|
|
414
516
|
class="dg-action-popover"
|
|
415
517
|
placement="bottom-end"
|
|
416
|
-
label="
|
|
518
|
+
label="${() => a.value.columnOptions}"
|
|
417
519
|
style="--popover-min-width:18rem">
|
|
418
|
-
<ore-button
|
|
520
|
+
<ore-button
|
|
521
|
+
class="dg-icon-btn dg-state-trigger dg-column-trigger"
|
|
522
|
+
variant="ghost"
|
|
523
|
+
size="sm"
|
|
524
|
+
icon-only
|
|
525
|
+
?data-customized="${() => P.hiddenColumns.value.size > 0}"
|
|
526
|
+
label="${() => P.hiddenColumns.value.size ? `${a.value.columnOptions}: ${a.value.hiddenColumns(P.hiddenColumns.value.size)}` : a.value.columnOptions}">
|
|
419
527
|
<ore-icon name="columns-2" size="15" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
420
528
|
</ore-button>
|
|
421
|
-
<div slot="content" class="dg-pop-col
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
529
|
+
<div slot="content" class="dg-pop-col">
|
|
530
|
+
<div class="dg-pop-header">
|
|
531
|
+
<span class="dg-pop-heading"><strong class="dg-pop-title">${() => a.value.columnVisibility}</strong><small>${() => a.value.visibleColumns(P.visibleColumns.value.length, D.value.length)}</small></span>
|
|
532
|
+
${() => P.hiddenColumns.value.size ? l`
|
|
533
|
+
<ore-button
|
|
534
|
+
class="dg-icon-btn"
|
|
535
|
+
variant="ghost"
|
|
536
|
+
size="sm"
|
|
537
|
+
icon-only
|
|
538
|
+
label="${() => a.value.resetColumns}"
|
|
539
|
+
@click="${() => P.resetColumnVisibility()}">
|
|
540
|
+
<ore-icon name="trash-2" size="14" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
541
|
+
</ore-button>
|
|
542
|
+
` : l``}
|
|
543
|
+
</div>
|
|
544
|
+
<div class="dg-pop-col-list" role="group" aria-label="${() => a.value.columnVisibility}">
|
|
545
|
+
${() => D.value.map((e) => l`
|
|
546
|
+
<ore-checkbox
|
|
547
|
+
class="dg-pop-col-item"
|
|
548
|
+
checked="${() => !P.hiddenColumns.value.has(e.key)}"
|
|
549
|
+
disabled="${() => !P.hiddenColumns.value.has(e.key) && P.visibleColumns.value.length === 1 || void 0}"
|
|
550
|
+
@change="${() => P.toggleColumnVisibility(e.key)}">${e.label}</ore-checkbox>
|
|
551
|
+
`)}
|
|
552
|
+
</div>
|
|
439
553
|
</div>
|
|
440
554
|
</ore-popover>
|
|
441
555
|
`;
|
|
442
|
-
return
|
|
556
|
+
return l`
|
|
443
557
|
<!-- ── Controls Bar ────────────────────────────────────────────────── -->
|
|
444
558
|
<div class="dg-controls" part="controls">
|
|
445
559
|
<!-- Left: view tabs -->
|
|
446
|
-
${() =>
|
|
560
|
+
${() => le()}
|
|
447
561
|
|
|
448
562
|
<!-- Right: Action bar -->
|
|
449
563
|
<div class="dg-actions">
|
|
450
|
-
${() =>
|
|
564
|
+
${() => $()} ${() => ue()} ${() => de()}
|
|
451
565
|
|
|
452
566
|
<!-- Density toggle -->
|
|
453
567
|
<ore-button
|
|
@@ -455,10 +569,10 @@ l(S, {
|
|
|
455
569
|
variant="ghost"
|
|
456
570
|
size="sm"
|
|
457
571
|
icon-only
|
|
458
|
-
label="${() =>
|
|
459
|
-
@click="${
|
|
572
|
+
label="${() => se.value[X.value]}"
|
|
573
|
+
@click="${ce}">
|
|
460
574
|
<ore-icon
|
|
461
|
-
name="${() =>
|
|
575
|
+
name="${() => oe[X.value]}"
|
|
462
576
|
size="15"
|
|
463
577
|
stroke-width="1.75"
|
|
464
578
|
aria-hidden="true"></ore-icon>
|
|
@@ -469,45 +583,46 @@ l(S, {
|
|
|
469
583
|
<slot name="actions"></slot>
|
|
470
584
|
|
|
471
585
|
<!-- Search toggle: rightmost, expands in-place -->
|
|
472
|
-
<div class="${() => `dg-search${
|
|
473
|
-
${() =>
|
|
586
|
+
<div class="${() => `dg-search${P.searchActive.value ? " dg-search--open" : ""}`}">
|
|
587
|
+
${() => P.searchActive.value ? l`
|
|
474
588
|
<ore-input
|
|
475
589
|
class="dg-search-input"
|
|
476
590
|
type="search"
|
|
477
591
|
variant="flat"
|
|
478
592
|
size="sm"
|
|
479
593
|
rounded="full"
|
|
480
|
-
|
|
481
|
-
|
|
594
|
+
aria-label="${() => a.value.search}"
|
|
595
|
+
placeholder="${() => e.searchPlaceholder.value ?? `${a.value.search}…`}"
|
|
596
|
+
disabled="${() => c.value || void 0}"
|
|
482
597
|
ref="${(e) => {
|
|
483
598
|
e && requestAnimationFrame(() => e.focus());
|
|
484
599
|
}}"
|
|
485
600
|
@input="${(e) => {
|
|
486
|
-
|
|
601
|
+
I(e.currentTarget.value);
|
|
487
602
|
}}"
|
|
488
603
|
@keydown="${(t) => {
|
|
489
604
|
if (t.key === "Escape") {
|
|
490
605
|
let t = e.source.value;
|
|
491
|
-
t?.setQuery && t.setQuery({ search: "" }),
|
|
606
|
+
t?.setQuery && t.setQuery({ search: "" }), P.toggleSearch();
|
|
492
607
|
}
|
|
493
608
|
}}">
|
|
494
609
|
<ore-icon slot="prefix" name="search" size="13" stroke-width="1.75" aria-hidden="true"></ore-icon>
|
|
495
610
|
</ore-input>
|
|
496
|
-
` :
|
|
611
|
+
` : l``}
|
|
497
612
|
<ore-button
|
|
498
613
|
variant="ghost"
|
|
499
614
|
size="sm"
|
|
500
615
|
icon-only
|
|
501
616
|
label="${() => {
|
|
502
|
-
let [t, n] = e.searchLabel.value ?? [
|
|
503
|
-
return
|
|
617
|
+
let [t, n] = e.searchLabel.value ?? [a.value.search, a.value.closeSearch];
|
|
618
|
+
return P.searchActive.value ? n : t;
|
|
504
619
|
}}"
|
|
505
620
|
@click="${() => {
|
|
506
621
|
let t = e.source.value;
|
|
507
|
-
t?.setQuery &&
|
|
622
|
+
t?.setQuery && P.searchActive.value && t.setQuery({ search: "" }), P.toggleSearch();
|
|
508
623
|
}}">
|
|
509
624
|
<ore-icon
|
|
510
|
-
name="${() =>
|
|
625
|
+
name="${() => P.searchActive.value ? "x" : "search"}"
|
|
511
626
|
size="15"
|
|
512
627
|
stroke-width="1.75"
|
|
513
628
|
aria-hidden="true"></ore-icon>
|
|
@@ -516,7 +631,7 @@ l(S, {
|
|
|
516
631
|
</div>
|
|
517
632
|
</div>
|
|
518
633
|
|
|
519
|
-
<div id="dg-tabpanel" class="dg-scroll" role="tabpanel" aria-label="
|
|
634
|
+
<div id="dg-tabpanel" class="dg-scroll" role="tabpanel" aria-label="${() => a.value.data}">
|
|
520
635
|
<div class="dg-loading-overlay">
|
|
521
636
|
<ore-icon name="loader-2" size="24" class="dg-spin" aria-hidden="true"></ore-icon>
|
|
522
637
|
</div>
|
|
@@ -525,181 +640,181 @@ l(S, {
|
|
|
525
640
|
part="table"
|
|
526
641
|
role="grid"
|
|
527
642
|
aria-label="${() => e.label.value ?? void 0}"
|
|
528
|
-
aria-busy="${() =>
|
|
529
|
-
aria-disabled="${() =>
|
|
643
|
+
aria-busy="${() => K.value ? "true" : null}"
|
|
644
|
+
aria-disabled="${() => c.value ? "true" : null}">
|
|
530
645
|
<!-- Head -->
|
|
531
646
|
<thead class="dg-head" part="thead">
|
|
532
647
|
<tr role="row">
|
|
533
|
-
${() =>
|
|
648
|
+
${() => d.value === "multi" ? l`
|
|
534
649
|
<th
|
|
535
650
|
class="dg-th dg-th-check"
|
|
536
651
|
role="columnheader"
|
|
537
652
|
scope="col"
|
|
538
|
-
tabindex="${() =>
|
|
653
|
+
tabindex="${() => Q.activeCell.value.row === 0 && Q.activeCell.value.col === 0 && w.value >= 1 ? "0" : "-1"}">
|
|
539
654
|
<ore-checkbox
|
|
540
655
|
class="dg-check"
|
|
541
|
-
checked="${() =>
|
|
542
|
-
indeterminate="${
|
|
543
|
-
?disabled="${
|
|
544
|
-
aria-label="
|
|
656
|
+
checked="${() => P.isAllSelected()}"
|
|
657
|
+
indeterminate="${H}"
|
|
658
|
+
?disabled="${c}"
|
|
659
|
+
aria-label="${() => a.value.selectAllRows}"
|
|
545
660
|
@change="${() => {
|
|
546
|
-
|
|
661
|
+
c.value || P.selectAll();
|
|
547
662
|
}}"></ore-checkbox>
|
|
548
663
|
</th>
|
|
549
|
-
` :
|
|
550
|
-
${() =>
|
|
551
|
-
let n = t ===
|
|
552
|
-
return
|
|
664
|
+
` : l``}
|
|
665
|
+
${() => z.value.map((e, t) => {
|
|
666
|
+
let n = t === z.value.length - 1;
|
|
667
|
+
return l`
|
|
553
668
|
<th
|
|
554
|
-
class="${`dg-th${n &&
|
|
669
|
+
class="${`dg-th${n && C.value ? " dg-th-last" : ""}`}"
|
|
555
670
|
role="columnheader"
|
|
556
671
|
scope="col"
|
|
557
672
|
tabindex="${() => {
|
|
558
|
-
let e =
|
|
559
|
-
return e.row === 0 && e.col === t +
|
|
673
|
+
let e = Q.activeCell.value;
|
|
674
|
+
return e.row === 0 && e.col === t + w.value ? "0" : "-1";
|
|
560
675
|
}}"
|
|
561
676
|
data-align="${e.align ?? "left"}"
|
|
562
|
-
aria-sort="${() => e.sortable ?
|
|
677
|
+
aria-sort="${() => e.sortable ? b(P.sortState.value, e.key) : void 0}"
|
|
563
678
|
aria-label="${e.sortable ? void 0 : e.headerLabel ?? e.label}"
|
|
564
679
|
style="${() => {
|
|
565
|
-
let t =
|
|
680
|
+
let t = L.value[e.key];
|
|
566
681
|
return t ? `width:${t}px` : e.width ? `width:${e.width}` : "";
|
|
567
682
|
}}">
|
|
568
683
|
<div class="dg-th-inner">
|
|
569
|
-
${() => e.sortable ?
|
|
684
|
+
${() => e.sortable ? l`
|
|
570
685
|
<ore-button
|
|
571
686
|
class="dg-sort-btn"
|
|
572
687
|
variant="text"
|
|
573
688
|
size="sm"
|
|
574
689
|
fullwidth
|
|
575
690
|
label="${e.headerLabel ?? e.label}"
|
|
576
|
-
disabled="${() =>
|
|
691
|
+
disabled="${() => c.value || void 0}"
|
|
577
692
|
@click="${() => {
|
|
578
|
-
|
|
693
|
+
c.value || P.sortBy(e.key);
|
|
579
694
|
}}">
|
|
580
695
|
${e.label}
|
|
581
696
|
<ore-icon
|
|
582
697
|
slot="suffix"
|
|
583
698
|
class="dg-sort-icon"
|
|
584
|
-
name="${() =>
|
|
699
|
+
name="${() => y(P.sortState.value, e.key)}"
|
|
585
700
|
size="14"
|
|
586
701
|
stroke-width="2"></ore-icon>
|
|
587
702
|
</ore-button>
|
|
588
703
|
` : e.label}
|
|
589
|
-
${e.resizable ?
|
|
704
|
+
${e.resizable ? l`
|
|
590
705
|
<span
|
|
591
706
|
class="dg-col-resize"
|
|
592
707
|
aria-hidden="true"
|
|
593
708
|
ref="${(t) => {
|
|
594
709
|
if (!t) return;
|
|
595
710
|
let n = t.closest("th");
|
|
596
|
-
n && t.addEventListener("pointerdown",
|
|
711
|
+
n && t.addEventListener("pointerdown", R(e.key, n));
|
|
597
712
|
}}"></span>
|
|
598
|
-
` :
|
|
713
|
+
` : l``}
|
|
599
714
|
</div>
|
|
600
715
|
</th>
|
|
601
716
|
`;
|
|
602
717
|
})}
|
|
603
|
-
${() =>
|
|
718
|
+
${() => C.value ? l`
|
|
604
719
|
<th
|
|
605
720
|
class="dg-th dg-th-expand"
|
|
606
721
|
role="columnheader"
|
|
607
722
|
scope="col"
|
|
608
|
-
aria-label="
|
|
723
|
+
aria-label="${() => a.value.rowDetails}"
|
|
609
724
|
tabindex="-1"></th>
|
|
610
|
-
` :
|
|
725
|
+
` : l``}
|
|
611
726
|
</tr>
|
|
612
727
|
</thead>
|
|
613
728
|
|
|
614
729
|
<!-- Body -->
|
|
615
730
|
<tbody class="dg-body" part="tbody">
|
|
616
|
-
${() =>
|
|
731
|
+
${() => P.currentPageItems.value.length === 0 ? l`
|
|
617
732
|
<tr role="row">
|
|
618
|
-
<td class="dg-empty" role="gridcell" colspan="${() => String(
|
|
733
|
+
<td class="dg-empty" role="gridcell" colspan="${() => String(U.value)}">
|
|
619
734
|
<div class="dg-empty-content">
|
|
620
735
|
${() => e.emptyText.value ?? "No data"}
|
|
621
|
-
${() =>
|
|
736
|
+
${() => P.searchQuery.value || P.filterValues.value.size ? l`
|
|
622
737
|
<div class="dg-empty-actions">
|
|
623
738
|
<ore-button
|
|
624
739
|
variant="text"
|
|
625
740
|
size="sm"
|
|
626
741
|
@click="${() => {
|
|
627
|
-
|
|
742
|
+
P.resetSearch(), P.resetFilters();
|
|
628
743
|
}}">
|
|
629
|
-
|
|
744
|
+
${() => a.value.clearFiltersAndSearch}
|
|
630
745
|
</ore-button>
|
|
631
746
|
</div>
|
|
632
|
-
` :
|
|
747
|
+
` : l``}
|
|
633
748
|
</div>
|
|
634
749
|
</td>
|
|
635
750
|
</tr>
|
|
636
|
-
` :
|
|
637
|
-
let n =
|
|
638
|
-
return
|
|
751
|
+
` : P.currentPageItems.value.map((e, t) => {
|
|
752
|
+
let n = k(e), r = d.value !== "none" && !c.value, i = t + 1;
|
|
753
|
+
return l`
|
|
639
754
|
<tr
|
|
640
755
|
class="dg-tr"
|
|
641
756
|
part="row"
|
|
642
757
|
role="row"
|
|
643
|
-
aria-selected="${() =>
|
|
644
|
-
aria-expanded="${() =>
|
|
758
|
+
aria-selected="${() => d.value === "none" ? null : String(P.selectedKeys.value.has(n))}"
|
|
759
|
+
aria-expanded="${() => C.value ? String(S.value.has(n)) : null}"
|
|
645
760
|
?data-selectable="${r}"
|
|
646
|
-
?data-disabled="${
|
|
761
|
+
?data-disabled="${c}"
|
|
647
762
|
@click="${() => {
|
|
648
|
-
r &&
|
|
763
|
+
r && d.value === "single" && P.toggleRow(n);
|
|
649
764
|
}}"
|
|
650
765
|
@keydown="${(e) => {
|
|
651
|
-
(e.key === "Enter" || e.key === " ") && r &&
|
|
766
|
+
(e.key === "Enter" || e.key === " ") && r && d.value === "single" && (e.preventDefault(), P.toggleRow(n));
|
|
652
767
|
}}">
|
|
653
|
-
${() =>
|
|
768
|
+
${() => d.value === "multi" ? l`
|
|
654
769
|
<td
|
|
655
770
|
class="dg-td dg-td-check"
|
|
656
771
|
role="gridcell"
|
|
657
772
|
tabindex="${() => {
|
|
658
|
-
let e =
|
|
773
|
+
let e = Q.activeCell.value;
|
|
659
774
|
return e.row === i && e.col === 0 ? "0" : "-1";
|
|
660
775
|
}}"
|
|
661
776
|
@keydown="${(e) => {
|
|
662
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
777
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), c.value || P.toggleRow(n));
|
|
663
778
|
}}">
|
|
664
779
|
<ore-checkbox
|
|
665
780
|
class="dg-check"
|
|
666
|
-
checked="${() =>
|
|
667
|
-
?disabled="${
|
|
668
|
-
aria-label="
|
|
781
|
+
checked="${() => P.selectedKeys.value.has(n)}"
|
|
782
|
+
?disabled="${c}"
|
|
783
|
+
aria-label="${() => a.value.selectRow}"
|
|
669
784
|
tabindex="-1"
|
|
670
785
|
@click="${(e) => e.stopPropagation()}"
|
|
671
786
|
@change="${() => {
|
|
672
|
-
|
|
787
|
+
c.value || P.toggleRow(n);
|
|
673
788
|
}}"></ore-checkbox>
|
|
674
789
|
</td>
|
|
675
|
-
` :
|
|
676
|
-
${
|
|
677
|
-
let r =
|
|
678
|
-
return
|
|
790
|
+
` : l``}
|
|
791
|
+
${z.value.map((t, n) => {
|
|
792
|
+
let r = e, a = B(t, r), o = t.renderCell?.(r) ?? a, s = n === z.value.length - 1;
|
|
793
|
+
return l`
|
|
679
794
|
<td
|
|
680
|
-
class="${`dg-td${
|
|
795
|
+
class="${`dg-td${s && C.value ? " dg-td-last" : ""}`}"
|
|
681
796
|
part="cell"
|
|
682
797
|
role="gridcell"
|
|
683
798
|
data-align="${t.align ?? "left"}"
|
|
684
799
|
tabindex="${() => {
|
|
685
|
-
let e =
|
|
686
|
-
return e.row === i && e.col === n +
|
|
800
|
+
let e = Q.activeCell.value;
|
|
801
|
+
return e.row === i && e.col === n + w.value ? "0" : "-1";
|
|
687
802
|
}}"
|
|
688
|
-
title="${
|
|
689
|
-
${
|
|
803
|
+
title="${a}">
|
|
804
|
+
${o}
|
|
690
805
|
</td>
|
|
691
806
|
`;
|
|
692
807
|
})}
|
|
693
|
-
${() =>
|
|
808
|
+
${() => C.value ? l`
|
|
694
809
|
<td
|
|
695
810
|
class="dg-td dg-td-expand"
|
|
696
811
|
role="gridcell"
|
|
697
812
|
tabindex="${() => {
|
|
698
|
-
let e =
|
|
699
|
-
return e.row === i && e.col ===
|
|
813
|
+
let e = Q.activeCell.value;
|
|
814
|
+
return e.row === i && e.col === U.value - 1 ? "0" : "-1";
|
|
700
815
|
}}"
|
|
701
816
|
@keydown="${(e) => {
|
|
702
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
817
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), c.value || Z(n));
|
|
703
818
|
}}">
|
|
704
819
|
<ore-button
|
|
705
820
|
class="dg-expand-btn"
|
|
@@ -707,31 +822,31 @@ l(S, {
|
|
|
707
822
|
size="sm"
|
|
708
823
|
icon-only
|
|
709
824
|
tabindex="-1"
|
|
710
|
-
label="${() =>
|
|
711
|
-
aria-expanded="${() => String(
|
|
712
|
-
disabled="${() =>
|
|
825
|
+
label="${() => S.value.has(n) ? a.value.collapseRow : a.value.expandRow}"
|
|
826
|
+
aria-expanded="${() => String(S.value.has(n))}"
|
|
827
|
+
disabled="${() => c.value || void 0}"
|
|
713
828
|
@click="${(e) => {
|
|
714
|
-
e.stopPropagation(),
|
|
829
|
+
e.stopPropagation(), c.value || Z(n);
|
|
715
830
|
}}">
|
|
716
831
|
<ore-icon
|
|
717
|
-
name="${() =>
|
|
832
|
+
name="${() => S.value.has(n) ? "chevron-up" : "chevron-down"}"
|
|
718
833
|
size="14"
|
|
719
834
|
stroke-width="2"
|
|
720
835
|
aria-hidden="true"></ore-icon>
|
|
721
836
|
</ore-button>
|
|
722
837
|
</td>
|
|
723
|
-
` :
|
|
838
|
+
` : l``}
|
|
724
839
|
</tr>
|
|
725
|
-
${() =>
|
|
840
|
+
${() => C.value && S.value.has(n) ? l`
|
|
726
841
|
<tr class="dg-tr-expanded" role="row">
|
|
727
842
|
<td
|
|
728
843
|
class="dg-td-expanded"
|
|
729
844
|
role="gridcell"
|
|
730
|
-
colspan="${() => String(
|
|
731
|
-
${
|
|
845
|
+
colspan="${() => String(U.value)}">
|
|
846
|
+
${f(() => D.value.find((e) => typeof e.renderExpanded == "function")?.renderExpanded?.(e) ?? "")}
|
|
732
847
|
</td>
|
|
733
848
|
</tr>
|
|
734
|
-
` :
|
|
849
|
+
` : l``}
|
|
735
850
|
`;
|
|
736
851
|
})}
|
|
737
852
|
</tbody>
|
|
@@ -739,47 +854,47 @@ l(S, {
|
|
|
739
854
|
</div>
|
|
740
855
|
|
|
741
856
|
<!-- Footer / Pagination -->
|
|
742
|
-
${() =>
|
|
743
|
-
<div class="dg-footer" part="footer" role="navigation" aria-label="
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
`}
|
|
749
|
-
<div class="dg-footer-end">
|
|
857
|
+
${() => W.value ? l`
|
|
858
|
+
<div class="dg-footer" part="footer" role="navigation" aria-label="${() => a.value.pagination}">
|
|
859
|
+
<div class="dg-footer-start">
|
|
860
|
+
<span class="dg-footer-info" dir="ltr" aria-live="polite" aria-atomic="true">
|
|
861
|
+
${G}
|
|
862
|
+
</span>
|
|
750
863
|
${() => {
|
|
751
864
|
let t = e.pageSizeOptions.value ?? [];
|
|
752
|
-
return t.length ?
|
|
865
|
+
return t.length ? l`
|
|
753
866
|
<div class="dg-page-size-wrap">
|
|
754
867
|
<ore-select
|
|
755
868
|
class="dg-page-size-select"
|
|
756
869
|
fullwidth
|
|
757
|
-
|
|
758
|
-
|
|
870
|
+
hide-label
|
|
871
|
+
label="${() => a.value.rowsPerPage}"
|
|
872
|
+
value="${() => String(T.value)}"
|
|
759
873
|
options="${() => t.map((e) => ({
|
|
760
874
|
label: String(e),
|
|
761
875
|
value: String(e)
|
|
762
876
|
}))}"
|
|
763
|
-
disabled="${() =>
|
|
877
|
+
disabled="${() => c.value || void 0}"
|
|
764
878
|
@change="${(e) => {
|
|
765
|
-
let t = parseInt(e
|
|
766
|
-
Number.isNaN(t) || (
|
|
879
|
+
let t = parseInt(x(e)[0] ?? "", 10);
|
|
880
|
+
Number.isNaN(t) || (T.value = t, P.goToPage(0), n("page-change", {
|
|
767
881
|
pageIndex: 0,
|
|
768
882
|
pageSize: t
|
|
769
883
|
}));
|
|
770
884
|
}}"></ore-select>
|
|
771
885
|
</div>
|
|
772
|
-
` :
|
|
886
|
+
` : l``;
|
|
773
887
|
}}
|
|
774
|
-
|
|
888
|
+
</div>
|
|
889
|
+
<div class="dg-pagination" role="group" aria-label="${() => a.value.pageNavigation}">
|
|
775
890
|
<ore-button
|
|
776
891
|
class="dg-page-btn"
|
|
777
892
|
variant="ghost"
|
|
778
893
|
size="sm"
|
|
779
894
|
icon-only
|
|
780
|
-
label="
|
|
781
|
-
disabled="${() => !
|
|
782
|
-
@click="${() =>
|
|
895
|
+
label="${() => a.value.previousPage}"
|
|
896
|
+
disabled="${() => !q.value || c.value}"
|
|
897
|
+
@click="${() => V("prev")}">
|
|
783
898
|
<ore-icon name="chevron-left" size="14" stroke-width="2" aria-hidden="true"></ore-icon>
|
|
784
899
|
</ore-button>
|
|
785
900
|
<span
|
|
@@ -789,28 +904,27 @@ l(S, {
|
|
|
789
904
|
role="status"
|
|
790
905
|
aria-live="polite"
|
|
791
906
|
aria-atomic="true">
|
|
792
|
-
${() =>
|
|
907
|
+
${() => ae.value}
|
|
793
908
|
</span>
|
|
794
909
|
<ore-button
|
|
795
910
|
class="dg-page-btn"
|
|
796
911
|
variant="ghost"
|
|
797
912
|
size="sm"
|
|
798
913
|
icon-only
|
|
799
|
-
label="
|
|
800
|
-
disabled="${() => !
|
|
801
|
-
@click="${() =>
|
|
914
|
+
label="${() => a.value.nextPage}"
|
|
915
|
+
disabled="${() => !J.value || c.value}"
|
|
916
|
+
@click="${() => V("next")}">
|
|
802
917
|
<ore-icon name="chevron-right" size="14" stroke-width="2" aria-hidden="true"></ore-icon>
|
|
803
918
|
</ore-button>
|
|
804
|
-
</div>
|
|
805
919
|
</div>
|
|
806
920
|
</div>
|
|
807
|
-
` :
|
|
921
|
+
` : l``}
|
|
808
922
|
`;
|
|
809
923
|
},
|
|
810
924
|
shadow: { delegatesFocus: !0 },
|
|
811
925
|
styles: [e("datagrid"), r]
|
|
812
926
|
});
|
|
813
927
|
//#endregion
|
|
814
|
-
export { a as COLUMN_TAG, S as DATAGRID_TAG,
|
|
928
|
+
export { a as COLUMN_TAG, S as DATAGRID_TAG, b as ariaSortValue, y as sortIconName };
|
|
815
929
|
|
|
816
930
|
//# sourceMappingURL=datagrid.js.map
|