@gemologic/sheen-table 0.2.1 → 0.3.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/DataTable.d.ts +4 -0
- package/dist/DataTable.js +1154 -1628
- package/dist/DataTableToolbar.js +1 -2
- package/dist/FilterBar.d.ts +3 -0
- package/dist/FilterBar.js +127 -108
- package/dist/QueryBuilder.js +72 -68
- package/dist/cell-edit.js +1 -2
- package/dist/client-state.js +20 -21
- package/dist/client-view.js +12 -13
- package/dist/column-layout.js +1 -2
- package/dist/columns.d.ts +5 -1
- package/dist/columns.js +7 -5
- package/dist/constrained-columns.js +1 -2
- package/dist/data-table-features.d.ts +129 -0
- package/dist/data-table-features.js +550 -0
- package/dist/export.js +1 -2
- package/dist/facets.js +5 -7
- package/dist/filter-bar-state.js +14 -18
- package/dist/filter-client.js +1 -2
- package/dist/filter.js +1 -2
- package/dist/grouping.js +1 -2
- package/dist/index.js +3 -3
- package/dist/messages.d.ts +1 -1
- package/dist/messages.js +2 -3
- package/dist/pagination.js +1 -2
- package/dist/query-builder-state.js +1 -2
- package/dist/requests.js +1 -2
- package/dist/row-hierarchy.js +1 -2
- package/dist/row-identity.js +1 -2
- package/dist/saved-views.js +1 -2
- package/dist/search-controller.js +1 -2
- package/dist/search.js +1 -2
- package/dist/selection-client.js +1 -2
- package/dist/selection.d.ts +3 -0
- package/dist/selection.js +9 -2
- package/dist/server-export.js +1 -2
- package/dist/sorting.js +1 -2
- package/dist/table-state-changes.js +1 -2
- package/dist/table-state.js +1 -2
- package/dist/text-normalization.js +1 -2
- package/dist/url-state.js +1 -2
- package/package.json +5 -5
- package/src/DataTable.tsx +276 -712
- package/src/FilterBar.tsx +17 -3
- package/src/QueryBuilder.tsx +5 -5
- package/src/columns.ts +9 -3
- package/src/data-table-features.tsx +579 -0
- package/src/messages.ts +1 -1
- package/src/selection.ts +8 -0
- package/src/styles.css +17 -11
package/dist/facets.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/facets.ts
|
|
2
2
|
function e(e, t, n) {
|
|
3
3
|
let r = /* @__PURE__ */ new Set(), i = t.flatMap((e) => {
|
|
4
4
|
if (typeof e.id != "string" || !e.id.trim() || r.has(e.id)) throw Error("Invalid or duplicate facet column");
|
|
@@ -22,12 +22,11 @@ function e(e, t, n) {
|
|
|
22
22
|
let a = i[e];
|
|
23
23
|
if (!a) throw Error(`Missing facet column at index ${e}`);
|
|
24
24
|
let o = n.getValue(r, a.column);
|
|
25
|
-
if (o == null)
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
if (o == null) a.missing++;
|
|
26
|
+
else {
|
|
27
|
+
if (typeof o != "string" || !a.counts.has(o)) throw Error(`Invalid enum value for facet ${a.column} at row ${t}`);
|
|
28
|
+
a.counts.set(o, (a.counts.get(o) ?? 0) + 1);
|
|
28
29
|
}
|
|
29
|
-
if (typeof o != "string" || !a.counts.has(o)) throw Error(`Invalid enum value for facet ${a.column} at row ${t}`);
|
|
30
|
-
a.counts.set(o, (a.counts.get(o) ?? 0) + 1);
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
return Object.freeze(i.map((e) => Object.freeze({
|
|
@@ -39,5 +38,4 @@ function e(e, t, n) {
|
|
|
39
38
|
missing: e.missing
|
|
40
39
|
})));
|
|
41
40
|
}
|
|
42
|
-
//#endregion
|
|
43
41
|
export { e as countClientFacets };
|
package/dist/filter-bar-state.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/filter-bar-state.ts
|
|
2
2
|
function e(e) {
|
|
3
3
|
return e.kind !== "and" && e.kind !== "or" && e.kind !== "not";
|
|
4
4
|
}
|
|
@@ -8,26 +8,23 @@ function t(t) {
|
|
|
8
8
|
if (t.kind === "and" || t.kind === "or") {
|
|
9
9
|
let e = Object.freeze([...o, t.kind]);
|
|
10
10
|
for (let n = 0; n < t.children.length; n++) r(t.children[n], Object.freeze([...i, n]), a, e);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
} else if (t.kind === "not") e(t.child) ? n.push(Object.freeze({
|
|
12
|
+
path: Object.freeze([...i]),
|
|
13
|
+
condition: t.child,
|
|
14
|
+
directNegated: !0,
|
|
15
|
+
inheritedNegated: a,
|
|
16
|
+
groups: Object.freeze([...o])
|
|
17
|
+
})) : r(t.child, Object.freeze([...i, "child"]), !a, o);
|
|
18
|
+
else {
|
|
19
|
+
if (!e(t)) throw Error("Filter condition traversal reached a non-leaf node");
|
|
20
|
+
n.push(Object.freeze({
|
|
15
21
|
path: Object.freeze([...i]),
|
|
16
|
-
condition: t
|
|
17
|
-
directNegated: !
|
|
22
|
+
condition: t,
|
|
23
|
+
directNegated: !1,
|
|
18
24
|
inheritedNegated: a,
|
|
19
25
|
groups: Object.freeze([...o])
|
|
20
|
-
}))
|
|
21
|
-
return;
|
|
26
|
+
}));
|
|
22
27
|
}
|
|
23
|
-
if (!e(t)) throw Error("Filter condition traversal reached a non-leaf node");
|
|
24
|
-
n.push(Object.freeze({
|
|
25
|
-
path: Object.freeze([...i]),
|
|
26
|
-
condition: t,
|
|
27
|
-
directNegated: !1,
|
|
28
|
-
inheritedNegated: a,
|
|
29
|
-
groups: Object.freeze([...o])
|
|
30
|
-
}));
|
|
31
28
|
}
|
|
32
29
|
return r(t, Object.freeze([]), !1, Object.freeze([])), Object.freeze(n);
|
|
33
30
|
}
|
|
@@ -124,5 +121,4 @@ function l(e, t) {
|
|
|
124
121
|
children: Object.freeze([])
|
|
125
122
|
});
|
|
126
123
|
}
|
|
127
|
-
//#endregion
|
|
128
124
|
export { s as appendFilterCondition, t as listFilterConditions, l as removeFilterColumnConditions, o as removeFilterCondition, i as replaceFilterCondition };
|
package/dist/filter-client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseFilter as e } from "./filter.js";
|
|
2
2
|
import { createTextNormalizer as t } from "./text-normalization.js";
|
|
3
|
-
|
|
3
|
+
// src/filter-client.ts
|
|
4
4
|
function n(n, r, i) {
|
|
5
5
|
let a = Intl.getCanonicalLocales(i.locale)[0] ?? "";
|
|
6
6
|
if (!a) throw Error("Filter evaluation requires an explicit locale");
|
|
@@ -65,5 +65,4 @@ function r(e, t, r, i) {
|
|
|
65
65
|
let a = n(t, r, i);
|
|
66
66
|
return t.kind === "and" && t.children.length === 0 ? e : e.filter(a);
|
|
67
67
|
}
|
|
68
|
-
//#endregion
|
|
69
68
|
export { n as compileFilter, r as filterClientRows };
|
package/dist/filter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/filter.ts
|
|
2
2
|
function e(e) {
|
|
3
3
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
4
4
|
}
|
|
@@ -128,5 +128,4 @@ function o(r, a) {
|
|
|
128
128
|
}
|
|
129
129
|
return e(o) ? (n(o, ["version", "filter"], "$"), o.version === 1 ? i(o.filter, a) : t("$", "unsupported filter version")) : t("$", "expected versioned envelope");
|
|
130
130
|
}
|
|
131
|
-
//#endregion
|
|
132
131
|
export { o as deserializeFilter, i as parseFilter, a as serializeFilter };
|
package/dist/grouping.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/grouping.ts
|
|
2
2
|
function e(e, t) {
|
|
3
3
|
if (e === null || typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e)) return e;
|
|
4
4
|
throw Error(`${t} must be a string, finite number, boolean, or null`);
|
|
@@ -122,5 +122,4 @@ function o(e) {
|
|
|
122
122
|
}
|
|
123
123
|
return Object.freeze(t);
|
|
124
124
|
}
|
|
125
|
-
//#endregion
|
|
126
125
|
export { r as groupClientRows, a as normalizeServerGroups };
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { createRowHierarchy as $ } from "./row-hierarchy.js";
|
|
|
25
25
|
import { createTableUrlState as ee } from "./url-state.js";
|
|
26
26
|
import { createSavedViews as te } from "./saved-views.js";
|
|
27
27
|
import { englishTableMessages as ne, resolveTableMessages as re } from "./messages.js";
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
28
|
+
import { DataTable as ie } from "./DataTable.js";
|
|
29
|
+
import { FilterBar as ae } from "./FilterBar.js";
|
|
30
30
|
import { QueryBuilder as oe } from "./QueryBuilder.js";
|
|
31
|
-
export {
|
|
31
|
+
export { ie as DataTable, ae as FilterBar, oe as QueryBuilder, y as appendFilterCondition, d as appendQueryChild, e as assessServerPage, B as canMoveColumn, P as changeClientViewState, z as changeTableState, w as compileFilter, O as countClientFacets, J as createCellEdit, G as createClientExport, N as createClientView, M as createDebouncedSearch, $ as createRowHierarchy, X as createRowIdentity, te as createSavedViews, q as createServerExport, s as createTableRequests, W as createTableSelection, ee as createTableUrlState, f as defaultQueryRule, Y as defineColumns, c as deserializeFilter, I as deserializeState, ne as englishTableMessages, T as filterClientRows, k as formatSearchQuery, t as getPageRange, Z as groupClientRows, b as listFilterConditions, V as moveColumn, p as moveQueryNode, Q as normalizeServerGroups, H as orderColumnStates, n as paginateClientRows, F as parseClientViewState, l as parseFilter, r as parsePagination, A as parseSearchQuery, E as parseSorting, L as parseTableState, U as placeColumn, m as queryBuilderFilterColumns, h as queryNodeAt, x as removeFilterColumnConditions, S as removeFilterCondition, g as removeQueryNode, C as replaceFilterCondition, _ as replaceQueryNode, i as resetPagination, a as resizePagination, o as resolvePagination, re as resolveTableMessages, j as searchClientRows, K as selectClientRows, u as serializeFilter, R as serializeState, D as sortClientRows, v as toggleQueryNegation };
|
package/dist/messages.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare const englishTableMessages: Readonly<{
|
|
|
38
38
|
retryExport: "Retry export";
|
|
39
39
|
downloadLastExport: "Download last export";
|
|
40
40
|
filters: "Filters";
|
|
41
|
-
filterAdd: "
|
|
41
|
+
filterAdd: "Add filter";
|
|
42
42
|
filterColumns: "Filter columns";
|
|
43
43
|
filterSearchColumns: "Search filter columns";
|
|
44
44
|
filterEdit: "Edit filter";
|
package/dist/messages.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/messages.ts
|
|
2
2
|
var e = Object.freeze({
|
|
3
3
|
loading: "Loading",
|
|
4
4
|
refreshing: "Refreshing, showing existing results",
|
|
@@ -39,7 +39,7 @@ var e = Object.freeze({
|
|
|
39
39
|
retryExport: "Retry export",
|
|
40
40
|
downloadLastExport: "Download last export",
|
|
41
41
|
filters: "Filters",
|
|
42
|
-
filterAdd: "
|
|
42
|
+
filterAdd: "Add filter",
|
|
43
43
|
filterColumns: "Filter columns",
|
|
44
44
|
filterSearchColumns: "Search filter columns",
|
|
45
45
|
filterEdit: "Edit filter",
|
|
@@ -120,5 +120,4 @@ function t(t) {
|
|
|
120
120
|
...t
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
//#endregion
|
|
124
123
|
export { e as englishTableMessages, t as resolveTableMessages };
|
package/dist/pagination.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/pagination.ts
|
|
2
2
|
function e(e, t) {
|
|
3
3
|
if (typeof e != "number" || !Number.isSafeInteger(e) || e < 0) throw Error(`${t} must be a nonnegative safe integer`);
|
|
4
4
|
}
|
|
@@ -98,5 +98,4 @@ function s(n, r) {
|
|
|
98
98
|
result: r
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
//#endregion
|
|
102
101
|
export { s as assessServerPage, a as getPageRange, o as paginateClientRows, t as parsePagination, r as resetPagination, i as resizePagination, n as resolvePagination };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseFilter as e } from "./filter.js";
|
|
2
|
-
|
|
2
|
+
// src/query-builder-state.ts
|
|
3
3
|
function t(e) {
|
|
4
4
|
let t = /* @__PURE__ */ new Set();
|
|
5
5
|
return Object.freeze(e.map((e) => {
|
|
@@ -124,5 +124,4 @@ function l(t, n, i) {
|
|
|
124
124
|
child: e
|
|
125
125
|
})), i);
|
|
126
126
|
}
|
|
127
|
-
//#endregion
|
|
128
127
|
export { o as appendQueryChild, n as defaultQueryRule, c as moveQueryNode, t as queryBuilderFilterColumns, i as queryNodeAt, s as removeQueryNode, a as replaceQueryNode, l as toggleQueryNegation };
|
package/dist/requests.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assessServerPage as e, resolvePagination as t } from "./pagination.js";
|
|
2
|
-
|
|
2
|
+
// src/requests.ts
|
|
3
3
|
function n(n, r) {
|
|
4
4
|
let i = {
|
|
5
5
|
accepted: null,
|
|
@@ -102,5 +102,4 @@ function n(n, r) {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
//#endregion
|
|
106
105
|
export { n as createTableRequests };
|
package/dist/row-hierarchy.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/row-hierarchy.ts
|
|
2
2
|
function e(e, t) {
|
|
3
3
|
if (!Array.isArray(e)) throw Error(`${t} must be an array`);
|
|
4
4
|
let n = [];
|
|
@@ -166,5 +166,4 @@ function t(t) {
|
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
//#endregion
|
|
170
169
|
export { t as createRowHierarchy };
|
package/dist/row-identity.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/row-identity.ts
|
|
2
2
|
function e(e) {
|
|
3
3
|
if (typeof e != "function") throw Error("getRowId must be a function");
|
|
4
4
|
let t = /* @__PURE__ */ new WeakMap();
|
|
@@ -32,5 +32,4 @@ function e(e) {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { e as createRowIdentity };
|
package/dist/saved-views.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { deserializeState as e, serializeState as t } from "./table-state.js";
|
|
2
|
-
|
|
2
|
+
// src/saved-views.ts
|
|
3
3
|
function n(e, t) {
|
|
4
4
|
if (typeof e != "string" || !e || e.trim() !== e) throw Error(`${t} must be a nonempty trimmed string`);
|
|
5
5
|
return e;
|
|
@@ -149,5 +149,4 @@ function o(o, s) {
|
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
//#endregion
|
|
153
152
|
export { o as createSavedViews };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/search-controller.ts
|
|
2
2
|
function e(e, t = 120, n) {
|
|
3
3
|
if (!Number.isSafeInteger(t) || t < 0 || t > 2147483647) throw Error("Search delay must be a nonnegative timer-safe integer");
|
|
4
4
|
if (n && typeof n.query != "string") throw Error("Initial search query must be a string");
|
|
@@ -71,5 +71,4 @@ function e(e, t = 120, n) {
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
//#endregion
|
|
75
74
|
export { e as createDebouncedSearch };
|
package/dist/search.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createTextNormalizer as e } from "./text-normalization.js";
|
|
2
|
-
|
|
2
|
+
// src/search.ts
|
|
3
3
|
function t(e, t) {
|
|
4
4
|
if (e === t) return 0;
|
|
5
5
|
if (e.startsWith(t)) return 1;
|
|
@@ -107,5 +107,4 @@ function s(e, t, n) {
|
|
|
107
107
|
let r = i(t, n);
|
|
108
108
|
return r.terms.length === 0 ? e : a(e, r, n).map((e) => e.row);
|
|
109
109
|
}
|
|
110
|
-
//#endregion
|
|
111
110
|
export { r as formatSearchQuery, n as parseSearchQuery, s as searchClientRowValues, o as searchClientRows };
|
package/dist/selection-client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compileFilter as e } from "./filter-client.js";
|
|
2
|
-
|
|
2
|
+
// src/selection-client.ts
|
|
3
3
|
function t(t, n, r) {
|
|
4
4
|
let i = new Set(n.kind === "ids" ? n.ids : n.excluded);
|
|
5
5
|
for (let e of i) if (typeof e != "string" || !e.trim()) throw Error("Invalid selection ID");
|
|
@@ -10,5 +10,4 @@ function t(t, n, r) {
|
|
|
10
10
|
return o.add(t), n.kind === "ids" ? i.has(t) : !i.has(t) && !!a?.(e);
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { t as selectClientRows };
|
package/dist/selection.d.ts
CHANGED
|
@@ -16,6 +16,9 @@ export declare function createTableSelection(initialFilter: FilterNode, columns:
|
|
|
16
16
|
selectRange(anchor: string, target: string, selected?: boolean): void;
|
|
17
17
|
selectAllMatching(): void;
|
|
18
18
|
isSelected(id: string): boolean;
|
|
19
|
+
isLoaded(id: string): boolean;
|
|
20
|
+
/** Counts selected loaded rows from the smaller explicit/excluded set instead of walking every loaded row. */
|
|
21
|
+
loadedSelectedCount(): number;
|
|
19
22
|
getPayload(): BulkSelection;
|
|
20
23
|
/** Filter changes clear selection and loaded-row eligibility. Reapplying identical state does not. */
|
|
21
24
|
setFilter(value: FilterNode): void;
|
package/dist/selection.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseFilter as e } from "./filter.js";
|
|
2
|
-
|
|
2
|
+
// src/selection.ts
|
|
3
3
|
function t(e) {
|
|
4
4
|
let t = /* @__PURE__ */ new Set();
|
|
5
5
|
for (let n of e) {
|
|
@@ -36,6 +36,14 @@ function n(n, r) {
|
|
|
36
36
|
isSelected(e) {
|
|
37
37
|
return l ? o.has(e) && !c.has(e) : s.has(e);
|
|
38
38
|
},
|
|
39
|
+
isLoaded(e) {
|
|
40
|
+
return o.has(e);
|
|
41
|
+
},
|
|
42
|
+
loadedSelectedCount() {
|
|
43
|
+
let e = l ? c : s, t = 0;
|
|
44
|
+
for (let n of e) o.has(n) && t++;
|
|
45
|
+
return l ? o.size - t : t;
|
|
46
|
+
},
|
|
39
47
|
getPayload() {
|
|
40
48
|
return Object.freeze(l ? {
|
|
41
49
|
kind: "query",
|
|
@@ -56,5 +64,4 @@ function n(n, r) {
|
|
|
56
64
|
}
|
|
57
65
|
};
|
|
58
66
|
}
|
|
59
|
-
//#endregion
|
|
60
67
|
export { n as createTableSelection };
|
package/dist/server-export.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseFilter as e } from "./filter.js";
|
|
2
2
|
import { parseTableState as t } from "./table-state.js";
|
|
3
|
-
|
|
3
|
+
// src/server-export.ts
|
|
4
4
|
function n(n, r) {
|
|
5
5
|
if (n.format !== "csv" && n.format !== "json") throw Error("Unsupported table export format");
|
|
6
6
|
let i = t(n.state, r), a = null;
|
|
@@ -101,5 +101,4 @@ function r(e, t) {
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
|
-
//#endregion
|
|
105
104
|
export { r as createServerExport };
|
package/dist/sorting.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/sorting.ts
|
|
2
2
|
function e(e, t) {
|
|
3
3
|
let n = /* @__PURE__ */ new Set();
|
|
4
4
|
for (let e of t) {
|
|
@@ -54,5 +54,4 @@ function t(t, n, r, i) {
|
|
|
54
54
|
return e.index - t.index;
|
|
55
55
|
}), u.map((e) => e.row);
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { e as parseSorting, t as sortClientRows };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { changeClientViewState as e } from "./client-state.js";
|
|
2
2
|
import { parseTableState as t } from "./table-state.js";
|
|
3
|
-
|
|
3
|
+
// src/table-state-changes.ts
|
|
4
4
|
function n(n, r, i) {
|
|
5
5
|
let a = t(n, i), o = {
|
|
6
6
|
search: a.search,
|
|
@@ -63,5 +63,4 @@ function n(n, r, i) {
|
|
|
63
63
|
default: throw Error("Unknown table state change");
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
//#endregion
|
|
67
66
|
export { n as changeTableState };
|
package/dist/table-state.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseClientViewState as e } from "./client-state.js";
|
|
2
|
-
|
|
2
|
+
// src/table-state.ts
|
|
3
3
|
function t(e) {
|
|
4
4
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
5
5
|
}
|
|
@@ -73,5 +73,4 @@ function a(e, i) {
|
|
|
73
73
|
if (n(a, ["version", "state"], "$"), a.version !== 1) throw Error("Unsupported table state version");
|
|
74
74
|
return r(a.state, i);
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { a as deserializeState, r as parseTableState, i as serializeState };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/text-normalization.ts
|
|
2
2
|
var e = /^[\u0000-\u007f]*$/u;
|
|
3
3
|
function t(t, n = !1) {
|
|
4
4
|
let r = n || "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toLocaleLowerCase(t) === "abcdefghijklmnopqrstuvwxyz";
|
|
@@ -8,5 +8,4 @@ function t(t, n = !1) {
|
|
|
8
8
|
return n ? a : a.toLocaleLowerCase(t).normalize("NFC");
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { t as createTextNormalizer };
|
package/dist/url-state.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { deserializeState as e, serializeState as t } from "./table-state.js";
|
|
2
|
-
|
|
2
|
+
// src/url-state.ts
|
|
3
3
|
function n(e) {
|
|
4
4
|
if (!/^[A-Za-z][A-Za-z0-9_.-]*$/.test(e)) throw Error("Table URL parameter must start with a letter and contain only letters, digits, dot, underscore, or hyphen");
|
|
5
5
|
return e;
|
|
@@ -71,5 +71,4 @@ function a(a, o, s) {
|
|
|
71
71
|
clear: d
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
//#endregion
|
|
75
74
|
export { a as createTableUrlState };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gemologic/sheen-table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Compact accessible data tables and query-building components for Sheen SolidJS applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
"./styles.css": "./src/styles.css"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@gemologic/sheen": "0.
|
|
53
|
-
"solid-js": "1.9.
|
|
52
|
+
"@gemologic/sheen": "0.3.0",
|
|
53
|
+
"solid-js": "1.9.19"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@tanstack/solid-virtual": "3.13.37"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@gemologic/sheen": "0.
|
|
60
|
-
"solid-js": "1.9.
|
|
59
|
+
"@gemologic/sheen": "0.3.0",
|
|
60
|
+
"solid-js": "1.9.19",
|
|
61
61
|
"vite-plugin-solid": "2.11.14"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|