@illinois-grad/grad-vue 5.0.4 → 6.0.1
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/custom-elements.json +1 -1
- package/dist/components/GTable.vue.d.ts +3 -3
- package/dist/compose/usePaging.d.ts +2 -2
- package/dist/{grad-vue-ChdGX6W9.js → grad-vue-Bsk9dI_O.js} +21 -14
- package/dist/{grad-vue-ChdGX6W9.js.map → grad-vue-Bsk9dI_O.js.map} +1 -1
- package/dist/grad-vue-elements.css +28 -28
- package/dist/grad-vue-elements.d.ts +1 -1
- package/dist/grad-vue-elements.js +4 -4
- package/dist/grad-vue-elements.js.map +1 -1
- package/dist/grad-vue.d.ts +1 -1
- package/dist/grad-vue.js +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -141,7 +141,7 @@ declare const __VLS_export: <T extends TableRow, C extends TableColumn<T>>(__VLS
|
|
|
141
141
|
*/
|
|
142
142
|
resizableColumns?: boolean;
|
|
143
143
|
} & {
|
|
144
|
-
|
|
144
|
+
sort?: TableSort<T>[];
|
|
145
145
|
filter?: Partial<Record<keyof T, any>>;
|
|
146
146
|
columnState?: TableColumnState<T>;
|
|
147
147
|
selectedRows?: string[];
|
|
@@ -149,7 +149,7 @@ declare const __VLS_export: <T extends TableRow, C extends TableColumn<T>>(__VLS
|
|
|
149
149
|
"onRow-click"?: ((link: string) => any) | undefined;
|
|
150
150
|
"onCell-change"?: ((payload: CellChangePayload<T, Extract<keyof T, string>>) => any) | undefined;
|
|
151
151
|
"onUpdate:pageSize"?: ((value: number) => any) | undefined;
|
|
152
|
-
"onUpdate:
|
|
152
|
+
"onUpdate:sort"?: ((value: TableSort<T, Extract<keyof T, string>>[]) => any) | undefined;
|
|
153
153
|
"onUpdate:filter"?: ((value: Partial<Record<keyof T, any>>) => any) | undefined;
|
|
154
154
|
"onUpdate:columnState"?: ((value: Partial<Record<Extract<keyof T, string>, import("./table/TableColumn.ts").TableColumnStateValue>>) => any) | undefined;
|
|
155
155
|
"onUpdate:selectedRows"?: ((value: string[]) => any) | undefined;
|
|
@@ -170,7 +170,7 @@ declare const __VLS_export: <T extends TableRow, C extends TableColumn<T>>(__VLS
|
|
|
170
170
|
(e: "cell-change", payload: CellChangePayload<T>): void;
|
|
171
171
|
(e: "update:startIndex", value: number): void;
|
|
172
172
|
(e: "update:pageSize", value: number): void;
|
|
173
|
-
} & (((event: "update:
|
|
173
|
+
} & (((event: "update:sort", value: TableSort<T, Extract<keyof T, string>>[]) => void) & ((event: "update:filter", value: Partial<Record<keyof T, any>>) => void) & ((event: "update:columnState", value: Partial<Record<Extract<keyof T, string>, import("./table/TableColumn.ts").TableColumnStateValue>>) => void) & ((event: "update:selectedRows", value: string[]) => void));
|
|
174
174
|
}>) => import("vue").VNode & {
|
|
175
175
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
176
176
|
};
|
|
@@ -16,14 +16,14 @@ export interface UsePagingOptions {
|
|
|
16
16
|
query: FilterLocationQuery;
|
|
17
17
|
}) => unknown;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
sortKey?: string;
|
|
20
20
|
pageSizeKey?: string;
|
|
21
21
|
pageOffsetKey?: string;
|
|
22
22
|
defaultPageSize?: number;
|
|
23
23
|
defaultPageOffset?: number;
|
|
24
24
|
}
|
|
25
25
|
export interface UsePagingReturn<K extends SortKey = SortKey> {
|
|
26
|
-
|
|
26
|
+
sort: Ref<PagingSort<K>[]>;
|
|
27
27
|
pageSize: Ref<number>;
|
|
28
28
|
pageOffset: Ref<number>;
|
|
29
29
|
}
|
|
@@ -3302,8 +3302,8 @@ var fi = { class: "g-table-outer-wrap" }, pi = {
|
|
|
3302
3302
|
default: !1
|
|
3303
3303
|
}
|
|
3304
3304
|
}, {
|
|
3305
|
-
|
|
3306
|
-
|
|
3305
|
+
sort: { default: () => [] },
|
|
3306
|
+
sortModifiers: {},
|
|
3307
3307
|
filter: { default: () => ({}) },
|
|
3308
3308
|
filterModifiers: {},
|
|
3309
3309
|
columnState: { default: () => ({}) },
|
|
@@ -3318,13 +3318,13 @@ var fi = { class: "g-table-outer-wrap" }, pi = {
|
|
|
3318
3318
|
"update:startIndex",
|
|
3319
3319
|
"update:pageSize"
|
|
3320
3320
|
], [
|
|
3321
|
-
"update:
|
|
3321
|
+
"update:sort",
|
|
3322
3322
|
"update:filter",
|
|
3323
3323
|
"update:columnState",
|
|
3324
3324
|
"update:selectedRows"
|
|
3325
3325
|
]),
|
|
3326
3326
|
setup(t, { emit: n }) {
|
|
3327
|
-
let u = B(t, "
|
|
3327
|
+
let u = B(t, "sort"), f = B(t, "filter"), p = B(t, "columnState"), m = B(t, "selectedRows"), h = t, v = n, b = h.filtering;
|
|
3328
3328
|
b ||= di({});
|
|
3329
3329
|
let { filters: C, filteredColumns: T, isFiltered: E, clearFilters: A } = b, j = r(() => h.data.map((e) => e.key)), M = r(() => m.value.filter((e) => j.value.includes(e))), F = r(() => !h.bulkSelectionEnabled || h.data.length === 0 ? !1 : M.value.length === j.value.length), I = r(() => !h.bulkSelectionEnabled || h.data.length === 0 ? !1 : M.value.length > 0 && M.value.length < j.value.length), R = D(null);
|
|
3330
3330
|
function H() {
|
|
@@ -4752,17 +4752,24 @@ function So(e, t, n) {
|
|
|
4752
4752
|
.5,
|
|
4753
4753
|
.75,
|
|
4754
4754
|
1
|
|
4755
|
-
], i = `${-t}px 0px 0px 0px`, a = /* @__PURE__ */ new Map(), o = D(Array.from(Y(e)?.children || []))
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4755
|
+
], i = `${-t}px 0px 0px 0px`, a = /* @__PURE__ */ new Map(), o = D(Array.from(Y(e)?.children || [])), s = () => {
|
|
4756
|
+
let t = Array.from(Y(e)?.children || []), n = new Set(t);
|
|
4757
|
+
for (let e of a.keys()) n.has(e) || a.delete(e);
|
|
4758
|
+
o.value = t;
|
|
4759
|
+
};
|
|
4760
|
+
G(() => Y(e), () => {
|
|
4761
|
+
s();
|
|
4762
|
+
}, {
|
|
4763
|
+
immediate: !0,
|
|
4764
|
+
flush: "post"
|
|
4765
|
+
}), ue(e, s, { childList: !0 });
|
|
4766
|
+
let { stop: c } = ce(o, (e) => {
|
|
4760
4767
|
let t = o.value[o.value.length - 1];
|
|
4761
4768
|
for (let n of e) a.set(n.target, n.isIntersecting ? Math.ceil(100 * n.intersectionRatio) / 100 : 0), n.target === t && n.intersectionRatio === 1 && a.set(n.target, Infinity);
|
|
4762
4769
|
let r = null, i = 0;
|
|
4763
4770
|
for (let e of a.keys()) {
|
|
4764
4771
|
let t = a.get(e) || 0;
|
|
4765
|
-
t <= i || (
|
|
4772
|
+
t <= i || (r = e, i = t);
|
|
4766
4773
|
}
|
|
4767
4774
|
n.value = r instanceof HTMLElement ? r.id : "";
|
|
4768
4775
|
}, {
|
|
@@ -4771,7 +4778,7 @@ function So(e, t, n) {
|
|
|
4771
4778
|
rootMargin: i,
|
|
4772
4779
|
immediate: !0
|
|
4773
4780
|
});
|
|
4774
|
-
return { stop:
|
|
4781
|
+
return { stop: c };
|
|
4775
4782
|
}
|
|
4776
4783
|
//#endregion
|
|
4777
4784
|
//#region src/compose/useSidebar.ts
|
|
@@ -4849,7 +4856,7 @@ function jo(e, t) {
|
|
|
4849
4856
|
return t;
|
|
4850
4857
|
}
|
|
4851
4858
|
function Mo(e = {}) {
|
|
4852
|
-
let t = e.defaultPageSize ?? 50, n = e.defaultPageOffset ?? 0, i = e.
|
|
4859
|
+
let t = e.defaultPageSize ?? 50, n = e.defaultPageOffset ?? 0, i = e.sortKey ?? "sort", a = e.pageSizeKey ?? "pageSize", o = e.pageOffsetKey ?? "pageOffset", s = M([]), c = D(t), l = D(n);
|
|
4853
4860
|
return e.route && e.router && (G(() => e.route?.query[i], (e) => {
|
|
4854
4861
|
let t = To(e);
|
|
4855
4862
|
Ao(s.value, t) || (s.value = t);
|
|
@@ -4873,7 +4880,7 @@ function Mo(e = {}) {
|
|
|
4873
4880
|
}
|
|
4874
4881
|
f && e.router.replace({ query: l });
|
|
4875
4882
|
})), {
|
|
4876
|
-
|
|
4883
|
+
sort: r({
|
|
4877
4884
|
get: () => wo(s.value),
|
|
4878
4885
|
set: (e) => {
|
|
4879
4886
|
s.value = wo(e);
|
|
@@ -4990,4 +4997,4 @@ function No() {
|
|
|
4990
4997
|
//#endregion
|
|
4991
4998
|
export { tt as $, li as A, xn as B, Oa as C, ti as D, ri as E, br as F, un as G, gn as H, ir as I, Mt as J, nn as K, Un as L, di as M, ui as N, ci as O, jr as P, ot as Q, On as R, ka as S, ya as T, mn as U, bn as V, pn as W, xt as X, Et as Y, mt as Z, Ja as _, Eo as a, $ as at, Fa as b, So as c, De as ct, mo as d, Q as dt, et, fo as f, Ya as g, Xa as h, To as i, ze as it, ii as j, ni as k, xo as l, xe as lt, ro as m, Do as n, qe as nt, Mo as o, Ae as ot, io as p, Kt as q, wo as r, Je as rt, Co as s, Oe as st, No as t, $e as tt, ho as u, be as ut, Ua as v, Ta as w, Na as x, za as y, Cn as z };
|
|
4992
4999
|
|
|
4993
|
-
//# sourceMappingURL=grad-vue-
|
|
5000
|
+
//# sourceMappingURL=grad-vue-Bsk9dI_O.js.map
|