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