tinybase 9.1.0-beta.0 → 9.1.0-beta.2
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/@types/_internal/store/with-schemas/index.d.ts +133 -2
- package/@types/common/index.d.ts +17 -2
- package/@types/common/with-schemas/index.d.ts +18 -2
- package/@types/indexes/index.d.ts +97 -0
- package/@types/indexes/with-schemas/index.d.ts +137 -0
- package/@types/store/index.d.ts +133 -25
- package/@types/store/with-schemas/index.d.ts +145 -51
- package/@types/ui-react/index.d.ts +48 -2
- package/@types/ui-react/with-schemas/index.d.ts +108 -34
- package/@types/ui-solid/index.d.ts +51 -2
- package/@types/ui-solid/with-schemas/index.d.ts +111 -34
- package/@types/ui-svelte/index.d.ts +84 -2
- package/@types/ui-svelte/with-schemas/index.d.ts +122 -25
- package/index.js +155 -38
- package/indexes/index.js +39 -0
- package/indexes/with-schemas/index.js +39 -0
- package/mergeable-store/index.js +116 -38
- package/mergeable-store/with-schemas/index.js +116 -38
- package/min/index.js +1 -1
- package/min/index.js.gz +0 -0
- package/min/indexes/index.js +1 -1
- package/min/indexes/index.js.gz +0 -0
- package/min/indexes/with-schemas/index.js +1 -1
- package/min/indexes/with-schemas/index.js.gz +0 -0
- package/min/mergeable-store/index.js +1 -1
- package/min/mergeable-store/index.js.gz +0 -0
- package/min/mergeable-store/with-schemas/index.js +1 -1
- package/min/mergeable-store/with-schemas/index.js.gz +0 -0
- package/min/omni/index.js +1 -1
- package/min/omni/index.js.gz +0 -0
- package/min/omni/with-schemas/index.js +1 -1
- package/min/omni/with-schemas/index.js.gz +0 -0
- package/min/store/index.js +1 -1
- package/min/store/index.js.gz +0 -0
- package/min/store/with-schemas/index.js +1 -1
- package/min/store/with-schemas/index.js.gz +0 -0
- package/min/ui-react/index.js +1 -1
- package/min/ui-react/index.js.gz +0 -0
- package/min/ui-react/with-schemas/index.js +1 -1
- package/min/ui-react/with-schemas/index.js.gz +0 -0
- package/min/ui-react-dom/index.js +1 -1
- package/min/ui-react-dom/index.js.gz +0 -0
- package/min/ui-react-dom/with-schemas/index.js +1 -1
- package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-react-dom-charts/index.js +1 -1
- package/min/ui-react-dom-charts/index.js.gz +0 -0
- package/min/ui-react-dom-charts/with-schemas/index.js +1 -1
- package/min/ui-react-dom-charts/with-schemas/index.js.gz +0 -0
- package/min/ui-react-inspector/index.js +1 -1
- package/min/ui-react-inspector/index.js.gz +0 -0
- package/min/ui-react-inspector/with-schemas/index.js +1 -1
- package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
- package/min/ui-solid/index.js +1 -1
- package/min/ui-solid/index.js.gz +0 -0
- package/min/ui-solid/with-schemas/index.js +1 -1
- package/min/ui-solid/with-schemas/index.js.gz +0 -0
- package/min/ui-solid-dom/index.js +1 -1
- package/min/ui-solid-dom/index.js.gz +0 -0
- package/min/ui-solid-dom/with-schemas/index.js +1 -1
- package/min/ui-solid-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-solid-inspector/index.js +1 -1
- package/min/ui-solid-inspector/index.js.gz +0 -0
- package/min/ui-solid-inspector/with-schemas/index.js +1 -1
- package/min/ui-solid-inspector/with-schemas/index.js.gz +0 -0
- package/min/ui-svelte/index.js +1 -1
- package/min/ui-svelte/index.js.gz +0 -0
- package/min/ui-svelte/with-schemas/index.js +1 -1
- package/min/ui-svelte/with-schemas/index.js.gz +0 -0
- package/min/ui-svelte-dom/index.js +1 -1
- package/min/ui-svelte-dom/index.js.gz +0 -0
- package/min/ui-svelte-dom/with-schemas/index.js +1 -1
- package/min/ui-svelte-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-svelte-inspector/index.js +1 -1
- package/min/ui-svelte-inspector/index.js.gz +0 -0
- package/min/ui-svelte-inspector/with-schemas/index.js +1 -1
- package/min/ui-svelte-inspector/with-schemas/index.js.gz +0 -0
- package/min/with-schemas/index.js +1 -1
- package/min/with-schemas/index.js.gz +0 -0
- package/omni/index.js +155 -38
- package/omni/with-schemas/index.js +155 -38
- package/package.json +3 -3
- package/readme.md +14 -14
- package/releases.md +101 -60
- package/store/index.js +116 -38
- package/store/with-schemas/index.js +116 -38
- package/ui-react/index.js +52 -6
- package/ui-react/with-schemas/index.js +52 -6
- package/ui-react-dom/index.js +24 -4
- package/ui-react-dom/with-schemas/index.js +24 -4
- package/ui-react-dom-charts/index.js +24 -4
- package/ui-react-dom-charts/with-schemas/index.js +24 -4
- package/ui-react-inspector/index.js +140 -42
- package/ui-react-inspector/with-schemas/index.js +140 -42
- package/ui-solid/index.js +48 -2
- package/ui-solid/with-schemas/index.js +48 -2
- package/ui-solid-dom/index.js +17 -1
- package/ui-solid-dom/with-schemas/index.js +17 -1
- package/ui-solid-inspector/index.js +133 -39
- package/ui-solid-inspector/with-schemas/index.js +133 -39
- package/ui-svelte/index.js +91 -31
- package/ui-svelte/with-schemas/index.js +91 -31
- package/ui-svelte-dom/index.js +35 -14
- package/ui-svelte-dom/with-schemas/index.js +35 -14
- package/ui-svelte-inspector/index.js +151 -52
- package/ui-svelte-inspector/with-schemas/index.js +151 -52
- package/with-schemas/index.js +155 -38
package/ui-svelte/index.js
CHANGED
|
@@ -49,12 +49,25 @@ const GLOBAL = globalThis;
|
|
|
49
49
|
const isNullish = (thing) => thing == null;
|
|
50
50
|
const isUndefined = (thing) => thing === void 0;
|
|
51
51
|
const hasWindow = () => !isUndefined(GLOBAL.window);
|
|
52
|
+
const ifNotNullish = getIfNotFunction(isNullish);
|
|
52
53
|
const ifNotUndefined = getIfNotFunction(isUndefined);
|
|
53
54
|
const isString = (thing) => getTypeOf(thing) == STRING;
|
|
54
55
|
const isFunction = (thing) => getTypeOf(thing) == FUNCTION;
|
|
55
56
|
const noop = () => {};
|
|
56
57
|
|
|
57
58
|
const object = Object;
|
|
59
|
+
const getPrototypeOf = (obj) => object.getPrototypeOf(obj);
|
|
60
|
+
const isObject = (obj) =>
|
|
61
|
+
!isNullish(obj) &&
|
|
62
|
+
ifNotNullish(
|
|
63
|
+
getPrototypeOf(obj),
|
|
64
|
+
(objPrototype) =>
|
|
65
|
+
objPrototype == object.prototype ||
|
|
66
|
+
isNullish(getPrototypeOf(objPrototype)),
|
|
67
|
+
|
|
68
|
+
/* istanbul ignore next */
|
|
69
|
+
() => true,
|
|
70
|
+
);
|
|
58
71
|
const objIds = object.keys;
|
|
59
72
|
const objGet = (obj, id) => ifNotUndefined(obj, (obj2) => obj2[id]);
|
|
60
73
|
|
|
@@ -250,25 +263,45 @@ const getRowIds = (tableId, storeOrStoreId) =>
|
|
|
250
263
|
]);
|
|
251
264
|
|
|
252
265
|
const getSortedRowIds = (
|
|
253
|
-
|
|
254
|
-
|
|
266
|
+
tableIdOrArgs,
|
|
267
|
+
cellIdOrStoreOrStoreId,
|
|
255
268
|
descending = false,
|
|
256
269
|
offset = 0,
|
|
257
270
|
limit,
|
|
271
|
+
sorter,
|
|
258
272
|
storeOrStoreId,
|
|
259
273
|
) =>
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
274
|
+
isObject(tableIdOrArgs)
|
|
275
|
+
? createListenable(
|
|
276
|
+
resolveStore(cellIdOrStoreOrStoreId),
|
|
277
|
+
SORTED_ROW_IDS,
|
|
278
|
+
EMPTY_ARR,
|
|
279
|
+
() => [tableIdOrArgs],
|
|
280
|
+
)
|
|
281
|
+
: createListenable(
|
|
282
|
+
resolveStore(storeOrStoreId),
|
|
283
|
+
SORTED_ROW_IDS,
|
|
284
|
+
EMPTY_ARR,
|
|
285
|
+
() =>
|
|
286
|
+
isUndefined(sorter)
|
|
287
|
+
? [
|
|
288
|
+
maybeGet(tableIdOrArgs),
|
|
289
|
+
maybeGet(cellIdOrStoreOrStoreId),
|
|
290
|
+
maybeGet(descending),
|
|
291
|
+
maybeGet(offset),
|
|
292
|
+
maybeGet(limit),
|
|
293
|
+
]
|
|
294
|
+
: [
|
|
295
|
+
{
|
|
296
|
+
tableId: maybeGet(tableIdOrArgs),
|
|
297
|
+
cellId: maybeGet(cellIdOrStoreOrStoreId),
|
|
298
|
+
descending: maybeGet(descending) ?? false,
|
|
299
|
+
offset: maybeGet(offset) ?? 0,
|
|
300
|
+
limit: maybeGet(limit),
|
|
301
|
+
sorter,
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
);
|
|
272
305
|
|
|
273
306
|
const hasRow = (tableId, rowId, storeOrStoreId) =>
|
|
274
307
|
createListenable(
|
|
@@ -457,6 +490,14 @@ const getIndexesIds = () => {
|
|
|
457
490
|
|
|
458
491
|
const getIndexIds = (indexesOrIndexesId) =>
|
|
459
492
|
createListenable(resolveIndexes(indexesOrIndexesId), INDEX + IDS, EMPTY_ARR);
|
|
493
|
+
const hasIndex = (indexId, indexesOrIndexesId) =>
|
|
494
|
+
createListenable(
|
|
495
|
+
resolveIndexes(indexesOrIndexesId),
|
|
496
|
+
INDEX,
|
|
497
|
+
false,
|
|
498
|
+
() => [maybeGet(indexId)],
|
|
499
|
+
1,
|
|
500
|
+
);
|
|
460
501
|
const getSliceIds = (indexId, indexesOrIndexesId) =>
|
|
461
502
|
createListenable(
|
|
462
503
|
resolveIndexes(indexesOrIndexesId),
|
|
@@ -464,6 +505,14 @@ const getSliceIds = (indexId, indexesOrIndexesId) =>
|
|
|
464
505
|
EMPTY_ARR,
|
|
465
506
|
() => [maybeGet(indexId)],
|
|
466
507
|
);
|
|
508
|
+
const hasSlice = (indexId, sliceId, indexesOrIndexesId) =>
|
|
509
|
+
createListenable(
|
|
510
|
+
resolveIndexes(indexesOrIndexesId),
|
|
511
|
+
SLICE,
|
|
512
|
+
false,
|
|
513
|
+
() => [maybeGet(indexId), maybeGet(sliceId)],
|
|
514
|
+
1,
|
|
515
|
+
);
|
|
467
516
|
const getSliceRowIds = (indexId, sliceId, indexesOrIndexesId) =>
|
|
468
517
|
createListenable(
|
|
469
518
|
resolveIndexes(indexesOrIndexesId),
|
|
@@ -820,28 +869,36 @@ const onRowIds = (tableId, listener, mutator, storeOrStoreId) =>
|
|
|
820
869
|
);
|
|
821
870
|
|
|
822
871
|
const onSortedRowIds = (
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
872
|
+
tableIdOrArgs,
|
|
873
|
+
cellIdOrListener,
|
|
874
|
+
descendingOrMutator,
|
|
875
|
+
offsetOrStoreOrStoreId,
|
|
827
876
|
limit,
|
|
828
877
|
listener,
|
|
829
878
|
mutator,
|
|
830
879
|
storeOrStoreId,
|
|
831
880
|
) =>
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
881
|
+
isObject(tableIdOrArgs)
|
|
882
|
+
? addListenerEffect(
|
|
883
|
+
resolveStore(offsetOrStoreOrStoreId),
|
|
884
|
+
SORTED_ROW_IDS,
|
|
885
|
+
cellIdOrListener,
|
|
886
|
+
() => [tableIdOrArgs],
|
|
887
|
+
descendingOrMutator,
|
|
888
|
+
)
|
|
889
|
+
: addListenerEffect(
|
|
890
|
+
resolveStore(storeOrStoreId),
|
|
891
|
+
SORTED_ROW_IDS,
|
|
892
|
+
listener,
|
|
893
|
+
() => [
|
|
894
|
+
maybeGet(tableIdOrArgs),
|
|
895
|
+
maybeGet(cellIdOrListener),
|
|
896
|
+
maybeGet(descendingOrMutator),
|
|
897
|
+
maybeGet(offsetOrStoreOrStoreId),
|
|
898
|
+
maybeGet(limit),
|
|
899
|
+
],
|
|
900
|
+
mutator,
|
|
901
|
+
);
|
|
845
902
|
|
|
846
903
|
const onHasRow = (tableId, rowId, listener, mutator, storeOrStoreId) =>
|
|
847
904
|
addListenerEffect(
|
|
@@ -2263,6 +2320,7 @@ function SortedTableView($$anchor, $$props) {
|
|
|
2263
2320
|
() => $$props.descending ?? false,
|
|
2264
2321
|
() => $$props.offset ?? 0,
|
|
2265
2322
|
() => $$props.limit,
|
|
2323
|
+
undefined,
|
|
2266
2324
|
() => $$props.store,
|
|
2267
2325
|
);
|
|
2268
2326
|
|
|
@@ -2558,7 +2616,9 @@ export {
|
|
|
2558
2616
|
getValueIds,
|
|
2559
2617
|
getValues,
|
|
2560
2618
|
hasCell,
|
|
2619
|
+
hasIndex,
|
|
2561
2620
|
hasRow,
|
|
2621
|
+
hasSlice,
|
|
2562
2622
|
hasTable,
|
|
2563
2623
|
hasTableCell,
|
|
2564
2624
|
hasTables,
|
|
@@ -49,12 +49,25 @@ const GLOBAL = globalThis;
|
|
|
49
49
|
const isNullish = (thing) => thing == null;
|
|
50
50
|
const isUndefined = (thing) => thing === void 0;
|
|
51
51
|
const hasWindow = () => !isUndefined(GLOBAL.window);
|
|
52
|
+
const ifNotNullish = getIfNotFunction(isNullish);
|
|
52
53
|
const ifNotUndefined = getIfNotFunction(isUndefined);
|
|
53
54
|
const isString = (thing) => getTypeOf(thing) == STRING;
|
|
54
55
|
const isFunction = (thing) => getTypeOf(thing) == FUNCTION;
|
|
55
56
|
const noop = () => {};
|
|
56
57
|
|
|
57
58
|
const object = Object;
|
|
59
|
+
const getPrototypeOf = (obj) => object.getPrototypeOf(obj);
|
|
60
|
+
const isObject = (obj) =>
|
|
61
|
+
!isNullish(obj) &&
|
|
62
|
+
ifNotNullish(
|
|
63
|
+
getPrototypeOf(obj),
|
|
64
|
+
(objPrototype) =>
|
|
65
|
+
objPrototype == object.prototype ||
|
|
66
|
+
isNullish(getPrototypeOf(objPrototype)),
|
|
67
|
+
|
|
68
|
+
/* istanbul ignore next */
|
|
69
|
+
() => true,
|
|
70
|
+
);
|
|
58
71
|
const objIds = object.keys;
|
|
59
72
|
const objGet = (obj, id) => ifNotUndefined(obj, (obj2) => obj2[id]);
|
|
60
73
|
|
|
@@ -250,25 +263,45 @@ const getRowIds = (tableId, storeOrStoreId) =>
|
|
|
250
263
|
]);
|
|
251
264
|
|
|
252
265
|
const getSortedRowIds = (
|
|
253
|
-
|
|
254
|
-
|
|
266
|
+
tableIdOrArgs,
|
|
267
|
+
cellIdOrStoreOrStoreId,
|
|
255
268
|
descending = false,
|
|
256
269
|
offset = 0,
|
|
257
270
|
limit,
|
|
271
|
+
sorter,
|
|
258
272
|
storeOrStoreId,
|
|
259
273
|
) =>
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
274
|
+
isObject(tableIdOrArgs)
|
|
275
|
+
? createListenable(
|
|
276
|
+
resolveStore(cellIdOrStoreOrStoreId),
|
|
277
|
+
SORTED_ROW_IDS,
|
|
278
|
+
EMPTY_ARR,
|
|
279
|
+
() => [tableIdOrArgs],
|
|
280
|
+
)
|
|
281
|
+
: createListenable(
|
|
282
|
+
resolveStore(storeOrStoreId),
|
|
283
|
+
SORTED_ROW_IDS,
|
|
284
|
+
EMPTY_ARR,
|
|
285
|
+
() =>
|
|
286
|
+
isUndefined(sorter)
|
|
287
|
+
? [
|
|
288
|
+
maybeGet(tableIdOrArgs),
|
|
289
|
+
maybeGet(cellIdOrStoreOrStoreId),
|
|
290
|
+
maybeGet(descending),
|
|
291
|
+
maybeGet(offset),
|
|
292
|
+
maybeGet(limit),
|
|
293
|
+
]
|
|
294
|
+
: [
|
|
295
|
+
{
|
|
296
|
+
tableId: maybeGet(tableIdOrArgs),
|
|
297
|
+
cellId: maybeGet(cellIdOrStoreOrStoreId),
|
|
298
|
+
descending: maybeGet(descending) ?? false,
|
|
299
|
+
offset: maybeGet(offset) ?? 0,
|
|
300
|
+
limit: maybeGet(limit),
|
|
301
|
+
sorter,
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
);
|
|
272
305
|
|
|
273
306
|
const hasRow = (tableId, rowId, storeOrStoreId) =>
|
|
274
307
|
createListenable(
|
|
@@ -457,6 +490,14 @@ const getIndexesIds = () => {
|
|
|
457
490
|
|
|
458
491
|
const getIndexIds = (indexesOrIndexesId) =>
|
|
459
492
|
createListenable(resolveIndexes(indexesOrIndexesId), INDEX + IDS, EMPTY_ARR);
|
|
493
|
+
const hasIndex = (indexId, indexesOrIndexesId) =>
|
|
494
|
+
createListenable(
|
|
495
|
+
resolveIndexes(indexesOrIndexesId),
|
|
496
|
+
INDEX,
|
|
497
|
+
false,
|
|
498
|
+
() => [maybeGet(indexId)],
|
|
499
|
+
1,
|
|
500
|
+
);
|
|
460
501
|
const getSliceIds = (indexId, indexesOrIndexesId) =>
|
|
461
502
|
createListenable(
|
|
462
503
|
resolveIndexes(indexesOrIndexesId),
|
|
@@ -464,6 +505,14 @@ const getSliceIds = (indexId, indexesOrIndexesId) =>
|
|
|
464
505
|
EMPTY_ARR,
|
|
465
506
|
() => [maybeGet(indexId)],
|
|
466
507
|
);
|
|
508
|
+
const hasSlice = (indexId, sliceId, indexesOrIndexesId) =>
|
|
509
|
+
createListenable(
|
|
510
|
+
resolveIndexes(indexesOrIndexesId),
|
|
511
|
+
SLICE,
|
|
512
|
+
false,
|
|
513
|
+
() => [maybeGet(indexId), maybeGet(sliceId)],
|
|
514
|
+
1,
|
|
515
|
+
);
|
|
467
516
|
const getSliceRowIds = (indexId, sliceId, indexesOrIndexesId) =>
|
|
468
517
|
createListenable(
|
|
469
518
|
resolveIndexes(indexesOrIndexesId),
|
|
@@ -820,28 +869,36 @@ const onRowIds = (tableId, listener, mutator, storeOrStoreId) =>
|
|
|
820
869
|
);
|
|
821
870
|
|
|
822
871
|
const onSortedRowIds = (
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
872
|
+
tableIdOrArgs,
|
|
873
|
+
cellIdOrListener,
|
|
874
|
+
descendingOrMutator,
|
|
875
|
+
offsetOrStoreOrStoreId,
|
|
827
876
|
limit,
|
|
828
877
|
listener,
|
|
829
878
|
mutator,
|
|
830
879
|
storeOrStoreId,
|
|
831
880
|
) =>
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
881
|
+
isObject(tableIdOrArgs)
|
|
882
|
+
? addListenerEffect(
|
|
883
|
+
resolveStore(offsetOrStoreOrStoreId),
|
|
884
|
+
SORTED_ROW_IDS,
|
|
885
|
+
cellIdOrListener,
|
|
886
|
+
() => [tableIdOrArgs],
|
|
887
|
+
descendingOrMutator,
|
|
888
|
+
)
|
|
889
|
+
: addListenerEffect(
|
|
890
|
+
resolveStore(storeOrStoreId),
|
|
891
|
+
SORTED_ROW_IDS,
|
|
892
|
+
listener,
|
|
893
|
+
() => [
|
|
894
|
+
maybeGet(tableIdOrArgs),
|
|
895
|
+
maybeGet(cellIdOrListener),
|
|
896
|
+
maybeGet(descendingOrMutator),
|
|
897
|
+
maybeGet(offsetOrStoreOrStoreId),
|
|
898
|
+
maybeGet(limit),
|
|
899
|
+
],
|
|
900
|
+
mutator,
|
|
901
|
+
);
|
|
845
902
|
|
|
846
903
|
const onHasRow = (tableId, rowId, listener, mutator, storeOrStoreId) =>
|
|
847
904
|
addListenerEffect(
|
|
@@ -2263,6 +2320,7 @@ function SortedTableView($$anchor, $$props) {
|
|
|
2263
2320
|
() => $$props.descending ?? false,
|
|
2264
2321
|
() => $$props.offset ?? 0,
|
|
2265
2322
|
() => $$props.limit,
|
|
2323
|
+
undefined,
|
|
2266
2324
|
() => $$props.store,
|
|
2267
2325
|
);
|
|
2268
2326
|
|
|
@@ -2558,7 +2616,9 @@ export {
|
|
|
2558
2616
|
getValueIds,
|
|
2559
2617
|
getValues,
|
|
2560
2618
|
hasCell,
|
|
2619
|
+
hasIndex,
|
|
2561
2620
|
hasRow,
|
|
2621
|
+
hasSlice,
|
|
2562
2622
|
hasTable,
|
|
2563
2623
|
hasTableCell,
|
|
2564
2624
|
hasTables,
|
package/ui-svelte-dom/index.js
CHANGED
|
@@ -206,25 +206,45 @@ const getRowIds = (tableId, storeOrStoreId) =>
|
|
|
206
206
|
]);
|
|
207
207
|
|
|
208
208
|
const getSortedRowIds = (
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
tableIdOrArgs,
|
|
210
|
+
cellIdOrStoreOrStoreId,
|
|
211
211
|
descending = false,
|
|
212
212
|
offset = 0,
|
|
213
213
|
limit,
|
|
214
|
+
sorter,
|
|
214
215
|
storeOrStoreId,
|
|
215
216
|
) =>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
217
|
+
isObject(tableIdOrArgs)
|
|
218
|
+
? createListenable(
|
|
219
|
+
resolveStore(cellIdOrStoreOrStoreId),
|
|
220
|
+
SORTED_ROW_IDS,
|
|
221
|
+
EMPTY_ARR,
|
|
222
|
+
() => [tableIdOrArgs],
|
|
223
|
+
)
|
|
224
|
+
: createListenable(
|
|
225
|
+
resolveStore(storeOrStoreId),
|
|
226
|
+
SORTED_ROW_IDS,
|
|
227
|
+
EMPTY_ARR,
|
|
228
|
+
() =>
|
|
229
|
+
isUndefined(sorter)
|
|
230
|
+
? [
|
|
231
|
+
maybeGet(tableIdOrArgs),
|
|
232
|
+
maybeGet(cellIdOrStoreOrStoreId),
|
|
233
|
+
maybeGet(descending),
|
|
234
|
+
maybeGet(offset),
|
|
235
|
+
maybeGet(limit),
|
|
236
|
+
]
|
|
237
|
+
: [
|
|
238
|
+
{
|
|
239
|
+
tableId: maybeGet(tableIdOrArgs),
|
|
240
|
+
cellId: maybeGet(cellIdOrStoreOrStoreId),
|
|
241
|
+
descending: maybeGet(descending) ?? false,
|
|
242
|
+
offset: maybeGet(offset) ?? 0,
|
|
243
|
+
limit: maybeGet(limit),
|
|
244
|
+
sorter,
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
);
|
|
228
248
|
|
|
229
249
|
const getCell = (tableId, rowId, cellId, storeOrStoreId) => {
|
|
230
250
|
const getStore2 = resolveStore(storeOrStoreId);
|
|
@@ -2042,6 +2062,7 @@ function SortedTableInHtmlTable($$anchor, $$props) {
|
|
|
2042
2062
|
() => sorting.sortAndOffset[1],
|
|
2043
2063
|
() => sorting.sortAndOffset[2],
|
|
2044
2064
|
() => $$props.limit,
|
|
2065
|
+
undefined,
|
|
2045
2066
|
() => $$props.store,
|
|
2046
2067
|
);
|
|
2047
2068
|
const defaultCellComponent = $.derived(() =>
|
|
@@ -206,25 +206,45 @@ const getRowIds = (tableId, storeOrStoreId) =>
|
|
|
206
206
|
]);
|
|
207
207
|
|
|
208
208
|
const getSortedRowIds = (
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
tableIdOrArgs,
|
|
210
|
+
cellIdOrStoreOrStoreId,
|
|
211
211
|
descending = false,
|
|
212
212
|
offset = 0,
|
|
213
213
|
limit,
|
|
214
|
+
sorter,
|
|
214
215
|
storeOrStoreId,
|
|
215
216
|
) =>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
217
|
+
isObject(tableIdOrArgs)
|
|
218
|
+
? createListenable(
|
|
219
|
+
resolveStore(cellIdOrStoreOrStoreId),
|
|
220
|
+
SORTED_ROW_IDS,
|
|
221
|
+
EMPTY_ARR,
|
|
222
|
+
() => [tableIdOrArgs],
|
|
223
|
+
)
|
|
224
|
+
: createListenable(
|
|
225
|
+
resolveStore(storeOrStoreId),
|
|
226
|
+
SORTED_ROW_IDS,
|
|
227
|
+
EMPTY_ARR,
|
|
228
|
+
() =>
|
|
229
|
+
isUndefined(sorter)
|
|
230
|
+
? [
|
|
231
|
+
maybeGet(tableIdOrArgs),
|
|
232
|
+
maybeGet(cellIdOrStoreOrStoreId),
|
|
233
|
+
maybeGet(descending),
|
|
234
|
+
maybeGet(offset),
|
|
235
|
+
maybeGet(limit),
|
|
236
|
+
]
|
|
237
|
+
: [
|
|
238
|
+
{
|
|
239
|
+
tableId: maybeGet(tableIdOrArgs),
|
|
240
|
+
cellId: maybeGet(cellIdOrStoreOrStoreId),
|
|
241
|
+
descending: maybeGet(descending) ?? false,
|
|
242
|
+
offset: maybeGet(offset) ?? 0,
|
|
243
|
+
limit: maybeGet(limit),
|
|
244
|
+
sorter,
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
);
|
|
228
248
|
|
|
229
249
|
const getCell = (tableId, rowId, cellId, storeOrStoreId) => {
|
|
230
250
|
const getStore2 = resolveStore(storeOrStoreId);
|
|
@@ -2042,6 +2062,7 @@ function SortedTableInHtmlTable($$anchor, $$props) {
|
|
|
2042
2062
|
() => sorting.sortAndOffset[1],
|
|
2043
2063
|
() => sorting.sortAndOffset[2],
|
|
2044
2064
|
() => $$props.limit,
|
|
2065
|
+
undefined,
|
|
2045
2066
|
() => $$props.store,
|
|
2046
2067
|
);
|
|
2047
2068
|
const defaultCellComponent = $.derived(() =>
|