tinybase 8.1.0-beta.3 → 8.1.0-beta.4
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/ui-svelte/index.d.ts +556 -581
- package/@types/ui-svelte/with-schemas/index.d.ts +560 -597
- 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/persisters/persister-remote/index.js +1 -1
- package/min/persisters/persister-remote/index.js.gz +0 -0
- package/min/persisters/persister-remote/with-schemas/index.js +1 -1
- package/min/persisters/persister-remote/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/omni/index.js +7 -9
- package/omni/with-schemas/index.js +7 -9
- package/package.json +17 -17
- package/persisters/persister-remote/index.js +7 -9
- package/persisters/persister-remote/with-schemas/index.js +7 -9
- package/readme.md +1 -1
- package/ui-svelte/index.js +550 -598
- package/ui-svelte/with-schemas/index.js +550 -598
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {getContext, setContext, untrack} from 'svelte';
|
|
2
2
|
import * as $ from 'svelte/internal/client';
|
|
3
3
|
import 'svelte/internal/disclose-version';
|
|
4
|
+
import {createSubscriber} from 'svelte/reactivity';
|
|
4
5
|
|
|
5
6
|
const getTypeOf = (thing) => typeof thing;
|
|
6
7
|
const TINYBASE = 'tinybase';
|
|
@@ -44,10 +45,13 @@ const getIfNotFunction = (predicate) => (value, then, otherwise) =>
|
|
|
44
45
|
? /* istanbul ignore next */
|
|
45
46
|
otherwise?.()
|
|
46
47
|
: then(value);
|
|
48
|
+
const GLOBAL = globalThis;
|
|
47
49
|
const isUndefined = (thing) => thing === void 0;
|
|
50
|
+
const hasWindow = () => !isUndefined(GLOBAL.window);
|
|
48
51
|
const ifNotUndefined = getIfNotFunction(isUndefined);
|
|
49
52
|
const isString = (thing) => getTypeOf(thing) == STRING;
|
|
50
53
|
const isFunction = (thing) => getTypeOf(thing) == FUNCTION;
|
|
54
|
+
const noop = () => {};
|
|
51
55
|
|
|
52
56
|
const object = Object;
|
|
53
57
|
const objIds = object.keys;
|
|
@@ -55,7 +59,40 @@ const objGet = (obj, id) => ifNotUndefined(obj, (obj2) => obj2[id]);
|
|
|
55
59
|
|
|
56
60
|
const TINYBASE_CONTEXT_KEY = TINYBASE + '_uisc';
|
|
57
61
|
|
|
58
|
-
/*
|
|
62
|
+
/* functions.svelte.ts generated by Svelte v5.55.1 */
|
|
63
|
+
|
|
64
|
+
class ReactiveHandle {
|
|
65
|
+
#get;
|
|
66
|
+
#sub;
|
|
67
|
+
|
|
68
|
+
constructor(getCurrent, subscribe) {
|
|
69
|
+
this.#get = getCurrent;
|
|
70
|
+
this.#sub = subscribe;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
get current() {
|
|
74
|
+
this.#sub();
|
|
75
|
+
|
|
76
|
+
return this.#get();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
class WritableHandle extends ReactiveHandle {
|
|
81
|
+
#set;
|
|
82
|
+
|
|
83
|
+
constructor(getCurrent, setCurrent, subscribe) {
|
|
84
|
+
super(getCurrent, subscribe);
|
|
85
|
+
this.#set = setCurrent;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
get current() {
|
|
89
|
+
return super.current;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
set current(value) {
|
|
93
|
+
this.#set(value);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
59
96
|
|
|
60
97
|
const EMPTY_ARR = [];
|
|
61
98
|
const EMPTY_OBJ = {};
|
|
@@ -78,10 +115,10 @@ const getThing = (contextValue, thingOrThingId, offset) =>
|
|
|
78
115
|
? objGet(contextValue[offset * 2 + 1], thingOrThingId)
|
|
79
116
|
: thingOrThingId;
|
|
80
117
|
|
|
81
|
-
const
|
|
118
|
+
const getProvidedThing = (thingOrThingId, offset) =>
|
|
82
119
|
getThing(getContextValue(), thingOrThingId, offset);
|
|
83
120
|
|
|
84
|
-
const
|
|
121
|
+
const resolveProvidedThing = (thingOrThingId, offset) => {
|
|
85
122
|
const contextValue = getContextValue();
|
|
86
123
|
|
|
87
124
|
return () => getThing(contextValue, maybeGet(thingOrThingId), offset);
|
|
@@ -90,66 +127,65 @@ const useThingOrThingById = (thingOrThingId, offset) => {
|
|
|
90
127
|
const getThingIds = (contextValue, offset) =>
|
|
91
128
|
objIds(contextValue[offset * 2 + 1] ?? EMPTY_OBJ);
|
|
92
129
|
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const
|
|
130
|
+
const resolveStore = (storeOrStoreId) =>
|
|
131
|
+
resolveProvidedThing(storeOrStoreId, OFFSET_STORE);
|
|
132
|
+
const resolveMetrics = (metricsOrMetricsId) =>
|
|
133
|
+
resolveProvidedThing(metricsOrMetricsId, OFFSET_METRICS);
|
|
134
|
+
const resolveIndexes = (indexesOrIndexesId) =>
|
|
135
|
+
resolveProvidedThing(indexesOrIndexesId, OFFSET_INDEXES);
|
|
136
|
+
const resolveRelationships = (relationshipsOrRelationshipsId) =>
|
|
137
|
+
resolveProvidedThing(relationshipsOrRelationshipsId, OFFSET_RELATIONSHIPS);
|
|
138
|
+
const resolveQueries = (queriesOrQueriesId) =>
|
|
139
|
+
resolveProvidedThing(queriesOrQueriesId, OFFSET_QUERIES);
|
|
140
|
+
const resolveCheckpoints = (checkpointsOrCheckpointsId) =>
|
|
141
|
+
resolveProvidedThing(checkpointsOrCheckpointsId, OFFSET_CHECKPOINTS);
|
|
142
|
+
const resolvePersister = (persisterOrPersisterId) =>
|
|
143
|
+
resolveProvidedThing(persisterOrPersisterId, OFFSET_PERSISTER);
|
|
144
|
+
const resolveSynchronizer = (synchronizerOrSynchronizerId) =>
|
|
145
|
+
resolveProvidedThing(synchronizerOrSynchronizerId, OFFSET_SYNCHRONIZER);
|
|
146
|
+
|
|
147
|
+
const createListenable = (
|
|
111
148
|
getThing2,
|
|
112
149
|
listenable,
|
|
113
150
|
defaultValue,
|
|
114
151
|
getArgs = () => EMPTY_ARR,
|
|
115
152
|
isHas,
|
|
116
153
|
) => {
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
let
|
|
120
|
-
$.proxy(getThing2()?.[getMethod]?.(...getArgs()) ?? defaultValue),
|
|
121
|
-
);
|
|
154
|
+
const getListenableMethod = (isHas ? _HAS : GET) + listenable;
|
|
155
|
+
const addListenableMethod = ADD + (isHas ? HAS : '') + listenable + LISTENER;
|
|
156
|
+
let subscribe = $.state($.proxy(noop));
|
|
122
157
|
|
|
123
|
-
if (
|
|
158
|
+
if (hasWindow()) {
|
|
124
159
|
$.user_effect(() => {
|
|
125
160
|
const thing = getThing2();
|
|
126
161
|
const args = getArgs();
|
|
127
162
|
|
|
128
|
-
$.set(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
});
|
|
163
|
+
$.set(
|
|
164
|
+
subscribe,
|
|
165
|
+
createSubscriber((update) => {
|
|
166
|
+
const listenerId = thing?.[addListenableMethod]?.(...args, update);
|
|
133
167
|
|
|
134
|
-
|
|
168
|
+
return () => thing?.delListener?.(listenerId);
|
|
169
|
+
}),
|
|
170
|
+
true,
|
|
171
|
+
);
|
|
135
172
|
});
|
|
136
173
|
}
|
|
137
174
|
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
};
|
|
175
|
+
return new ReactiveHandle(
|
|
176
|
+
() => getThing2()?.[getListenableMethod]?.(...getArgs()) ?? defaultValue,
|
|
177
|
+
() => $.get(subscribe)(),
|
|
178
|
+
);
|
|
143
179
|
};
|
|
144
180
|
|
|
145
|
-
const
|
|
181
|
+
const addListenerEffect = (
|
|
146
182
|
getThing2,
|
|
147
183
|
listenable,
|
|
148
184
|
listener,
|
|
149
185
|
getPreArgs = () => EMPTY_ARR,
|
|
150
186
|
mutator,
|
|
151
187
|
) => {
|
|
152
|
-
if (
|
|
188
|
+
if (hasWindow()) {
|
|
153
189
|
$.user_effect(() => {
|
|
154
190
|
const thing = getThing2();
|
|
155
191
|
const preArgs = getPreArgs();
|
|
@@ -164,55 +200,55 @@ const useListener = (
|
|
|
164
200
|
}
|
|
165
201
|
};
|
|
166
202
|
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
203
|
+
const createHasTables = (storeOrStoreId) =>
|
|
204
|
+
createListenable(
|
|
205
|
+
resolveStore(storeOrStoreId),
|
|
170
206
|
TABLES,
|
|
171
207
|
false,
|
|
172
208
|
() => EMPTY_ARR,
|
|
173
209
|
1,
|
|
174
210
|
);
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
211
|
+
const createTables = (storeOrStoreId) =>
|
|
212
|
+
createListenable(resolveStore(storeOrStoreId), TABLES, EMPTY_OBJ);
|
|
213
|
+
const createTableIds = (storeOrStoreId) =>
|
|
214
|
+
createListenable(resolveStore(storeOrStoreId), TABLE_IDS, EMPTY_ARR);
|
|
215
|
+
const createHasTable = (tableId, storeOrStoreId) =>
|
|
216
|
+
createListenable(
|
|
217
|
+
resolveStore(storeOrStoreId),
|
|
182
218
|
TABLE,
|
|
183
219
|
false,
|
|
184
220
|
() => [maybeGet(tableId)],
|
|
185
221
|
1,
|
|
186
222
|
);
|
|
187
|
-
const
|
|
188
|
-
|
|
223
|
+
const createTable = (tableId, storeOrStoreId) =>
|
|
224
|
+
createListenable(resolveStore(storeOrStoreId), TABLE, EMPTY_OBJ, () => [
|
|
189
225
|
maybeGet(tableId),
|
|
190
226
|
]);
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
227
|
+
const createTableCellIds = (tableId, storeOrStoreId) =>
|
|
228
|
+
createListenable(
|
|
229
|
+
resolveStore(storeOrStoreId),
|
|
194
230
|
TABLE + CELL_IDS,
|
|
195
231
|
EMPTY_ARR,
|
|
196
232
|
() => [maybeGet(tableId)],
|
|
197
233
|
);
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
|
|
234
|
+
const createHasTableCell = (tableId, cellId, storeOrStoreId) =>
|
|
235
|
+
createListenable(
|
|
236
|
+
resolveStore(storeOrStoreId),
|
|
201
237
|
TABLE + CELL,
|
|
202
238
|
false,
|
|
203
239
|
() => [maybeGet(tableId), maybeGet(cellId)],
|
|
204
240
|
1,
|
|
205
241
|
);
|
|
206
|
-
const
|
|
207
|
-
|
|
242
|
+
const createRowCount = (tableId, storeOrStoreId) =>
|
|
243
|
+
createListenable(resolveStore(storeOrStoreId), ROW_COUNT, 0, () => [
|
|
208
244
|
maybeGet(tableId),
|
|
209
245
|
]);
|
|
210
|
-
const
|
|
211
|
-
|
|
246
|
+
const createRowIds = (tableId, storeOrStoreId) =>
|
|
247
|
+
createListenable(resolveStore(storeOrStoreId), ROW_IDS, EMPTY_ARR, () => [
|
|
212
248
|
maybeGet(tableId),
|
|
213
249
|
]);
|
|
214
250
|
|
|
215
|
-
const
|
|
251
|
+
const createSortedRowIds = (
|
|
216
252
|
tableId,
|
|
217
253
|
cellId,
|
|
218
254
|
descending = false,
|
|
@@ -220,8 +256,8 @@ const useSortedRowIds = (
|
|
|
220
256
|
limit,
|
|
221
257
|
storeOrStoreId,
|
|
222
258
|
) =>
|
|
223
|
-
|
|
224
|
-
|
|
259
|
+
createListenable(
|
|
260
|
+
resolveStore(storeOrStoreId),
|
|
225
261
|
SORTED_ROW_IDS,
|
|
226
262
|
EMPTY_ARR,
|
|
227
263
|
() => [
|
|
@@ -233,144 +269,135 @@ const useSortedRowIds = (
|
|
|
233
269
|
],
|
|
234
270
|
);
|
|
235
271
|
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
272
|
+
const createHasRow = (tableId, rowId, storeOrStoreId) =>
|
|
273
|
+
createListenable(
|
|
274
|
+
resolveStore(storeOrStoreId),
|
|
239
275
|
ROW,
|
|
240
276
|
false,
|
|
241
277
|
() => [maybeGet(tableId), maybeGet(rowId)],
|
|
242
278
|
1,
|
|
243
279
|
);
|
|
244
|
-
const
|
|
245
|
-
|
|
280
|
+
const createRow = (tableId, rowId, storeOrStoreId) =>
|
|
281
|
+
createListenable(resolveStore(storeOrStoreId), ROW, EMPTY_OBJ, () => [
|
|
246
282
|
maybeGet(tableId),
|
|
247
283
|
maybeGet(rowId),
|
|
248
284
|
]);
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
useListenable(
|
|
258
|
-
useStoreOrStoreById(storeOrStoreId),
|
|
285
|
+
const createCellIds = (tableId, rowId, storeOrStoreId) =>
|
|
286
|
+
createListenable(resolveStore(storeOrStoreId), CELL_IDS, EMPTY_ARR, () => [
|
|
287
|
+
maybeGet(tableId),
|
|
288
|
+
maybeGet(rowId),
|
|
289
|
+
]);
|
|
290
|
+
const createHasCell = (tableId, rowId, cellId, storeOrStoreId) =>
|
|
291
|
+
createListenable(
|
|
292
|
+
resolveStore(storeOrStoreId),
|
|
259
293
|
CELL,
|
|
260
294
|
false,
|
|
261
295
|
() => [maybeGet(tableId), maybeGet(rowId), maybeGet(cellId)],
|
|
262
296
|
1,
|
|
263
297
|
);
|
|
264
|
-
const useCell = (tableId, rowId, cellId, storeOrStoreId) =>
|
|
265
|
-
useListenable(useStoreOrStoreById(storeOrStoreId), CELL, void 0, () => [
|
|
266
|
-
maybeGet(tableId),
|
|
267
|
-
maybeGet(rowId),
|
|
268
|
-
maybeGet(cellId),
|
|
269
|
-
]);
|
|
270
298
|
|
|
271
|
-
const
|
|
272
|
-
const
|
|
273
|
-
let
|
|
274
|
-
$.proxy(
|
|
275
|
-
getS()?.getCell(maybeGet(tableId), maybeGet(rowId), maybeGet(cellId)),
|
|
276
|
-
),
|
|
277
|
-
);
|
|
299
|
+
const createCell = (tableId, rowId, cellId, storeOrStoreId) => {
|
|
300
|
+
const getStore2 = resolveStore(storeOrStoreId);
|
|
301
|
+
let subscribe = $.state($.proxy(noop));
|
|
278
302
|
|
|
279
|
-
if (
|
|
303
|
+
if (hasWindow()) {
|
|
280
304
|
$.user_effect(() => {
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
});
|
|
305
|
+
const store = getStore2();
|
|
306
|
+
const tableIdValue = maybeGet(tableId);
|
|
307
|
+
const rowIdValue = maybeGet(rowId);
|
|
308
|
+
const cellIdValue = maybeGet(cellId);
|
|
309
|
+
|
|
310
|
+
$.set(
|
|
311
|
+
subscribe,
|
|
312
|
+
createSubscriber((update) => {
|
|
313
|
+
const listenerId = store?.addCellListener(
|
|
314
|
+
tableIdValue,
|
|
315
|
+
rowIdValue,
|
|
316
|
+
cellIdValue,
|
|
317
|
+
update,
|
|
318
|
+
);
|
|
296
319
|
|
|
297
|
-
|
|
320
|
+
return () => store?.delListener?.(listenerId);
|
|
321
|
+
}),
|
|
322
|
+
true,
|
|
323
|
+
);
|
|
298
324
|
});
|
|
299
325
|
}
|
|
300
326
|
|
|
301
|
-
return
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
327
|
+
return new WritableHandle(
|
|
328
|
+
() =>
|
|
329
|
+
getStore2()?.getCell(
|
|
330
|
+
maybeGet(tableId),
|
|
331
|
+
maybeGet(rowId),
|
|
332
|
+
maybeGet(cellId),
|
|
333
|
+
),
|
|
334
|
+
(nextCell) =>
|
|
335
|
+
getStore2()?.setCell(
|
|
336
|
+
maybeGet(tableId),
|
|
337
|
+
maybeGet(rowId),
|
|
338
|
+
maybeGet(cellId),
|
|
339
|
+
nextCell,
|
|
340
|
+
),
|
|
341
|
+
() => $.get(subscribe)(),
|
|
342
|
+
);
|
|
310
343
|
};
|
|
311
344
|
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
345
|
+
const createHasValues = (storeOrStoreId) =>
|
|
346
|
+
createListenable(
|
|
347
|
+
resolveStore(storeOrStoreId),
|
|
315
348
|
VALUES,
|
|
316
349
|
false,
|
|
317
350
|
() => EMPTY_ARR,
|
|
318
351
|
1,
|
|
319
352
|
);
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
|
|
353
|
+
const createValues = (storeOrStoreId) =>
|
|
354
|
+
createListenable(resolveStore(storeOrStoreId), VALUES, EMPTY_OBJ);
|
|
355
|
+
const createValueIds = (storeOrStoreId) =>
|
|
356
|
+
createListenable(resolveStore(storeOrStoreId), VALUE_IDS, EMPTY_ARR);
|
|
357
|
+
const createHasValue = (valueId, storeOrStoreId) =>
|
|
358
|
+
createListenable(
|
|
359
|
+
resolveStore(storeOrStoreId),
|
|
327
360
|
VALUE,
|
|
328
361
|
false,
|
|
329
362
|
() => [maybeGet(valueId)],
|
|
330
363
|
1,
|
|
331
364
|
);
|
|
332
|
-
const useValue = (valueId, storeOrStoreId) =>
|
|
333
|
-
useListenable(useStoreOrStoreById(storeOrStoreId), VALUE, void 0, () => [
|
|
334
|
-
maybeGet(valueId),
|
|
335
|
-
]);
|
|
336
365
|
|
|
337
|
-
const
|
|
338
|
-
const
|
|
339
|
-
let
|
|
366
|
+
const createValue = (valueId, storeOrStoreId) => {
|
|
367
|
+
const getStore2 = resolveStore(storeOrStoreId);
|
|
368
|
+
let subscribe = $.state($.proxy(noop));
|
|
340
369
|
|
|
341
|
-
if (
|
|
370
|
+
if (hasWindow()) {
|
|
342
371
|
$.user_effect(() => {
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
$.set(value, s?.getValue(vid), true);
|
|
372
|
+
const store = getStore2();
|
|
373
|
+
const valueIdValue = maybeGet(valueId);
|
|
347
374
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
375
|
+
$.set(
|
|
376
|
+
subscribe,
|
|
377
|
+
createSubscriber((update) => {
|
|
378
|
+
const listenerId = store?.addValueListener(valueIdValue, update);
|
|
351
379
|
|
|
352
|
-
|
|
380
|
+
return () => store?.delListener?.(listenerId);
|
|
381
|
+
}),
|
|
382
|
+
true,
|
|
383
|
+
);
|
|
353
384
|
});
|
|
354
385
|
}
|
|
355
386
|
|
|
356
|
-
return
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
set current(v) {
|
|
362
|
-
getS()?.setValue(maybeGet(valueId), v);
|
|
363
|
-
},
|
|
364
|
-
};
|
|
387
|
+
return new WritableHandle(
|
|
388
|
+
() => getStore2()?.getValue(maybeGet(valueId)),
|
|
389
|
+
(nextValue) => getStore2()?.setValue(maybeGet(valueId), nextValue),
|
|
390
|
+
() => $.get(subscribe)(),
|
|
391
|
+
);
|
|
365
392
|
};
|
|
366
393
|
|
|
367
|
-
const
|
|
394
|
+
const getStore = (id) => getProvidedThing(id, OFFSET_STORE);
|
|
368
395
|
|
|
369
|
-
const
|
|
396
|
+
const createStoreIds = () => {
|
|
370
397
|
const contextValue = getContextValue();
|
|
371
398
|
let ids = $.state($.proxy(getThingIds(contextValue, OFFSET_STORE)));
|
|
372
399
|
|
|
373
|
-
if (
|
|
400
|
+
if (hasWindow()) {
|
|
374
401
|
$.user_effect(() => {
|
|
375
402
|
$.set(ids, getThingIds(contextValue, OFFSET_STORE), true);
|
|
376
403
|
});
|
|
@@ -383,13 +410,13 @@ const useStoreIds = () => {
|
|
|
383
410
|
};
|
|
384
411
|
};
|
|
385
412
|
|
|
386
|
-
const
|
|
413
|
+
const getMetrics = (id) => getProvidedThing(id, OFFSET_METRICS);
|
|
387
414
|
|
|
388
|
-
const
|
|
415
|
+
const createMetricsIds = () => {
|
|
389
416
|
const contextValue = getContextValue();
|
|
390
417
|
let ids = $.state($.proxy(getThingIds(contextValue, OFFSET_METRICS)));
|
|
391
418
|
|
|
392
|
-
if (
|
|
419
|
+
if (hasWindow()) {
|
|
393
420
|
$.user_effect(() => {
|
|
394
421
|
$.set(ids, getThingIds(contextValue, OFFSET_METRICS), true);
|
|
395
422
|
});
|
|
@@ -402,26 +429,19 @@ const useMetricsIds = () => {
|
|
|
402
429
|
};
|
|
403
430
|
};
|
|
404
431
|
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
);
|
|
411
|
-
const
|
|
412
|
-
useListenable(
|
|
413
|
-
useMetricsOrMetricsById(metricsOrMetricsId),
|
|
414
|
-
METRIC,
|
|
415
|
-
void 0,
|
|
416
|
-
() => [maybeGet(metricId)],
|
|
417
|
-
);
|
|
418
|
-
const useIndexes = (id) => useThing(id, OFFSET_INDEXES);
|
|
432
|
+
const createMetricIds = (metricsOrMetricsId) =>
|
|
433
|
+
createListenable(resolveMetrics(metricsOrMetricsId), METRIC + IDS, EMPTY_ARR);
|
|
434
|
+
const createMetric = (metricId, metricsOrMetricsId) =>
|
|
435
|
+
createListenable(resolveMetrics(metricsOrMetricsId), METRIC, void 0, () => [
|
|
436
|
+
maybeGet(metricId),
|
|
437
|
+
]);
|
|
438
|
+
const getIndexes = (id) => getProvidedThing(id, OFFSET_INDEXES);
|
|
419
439
|
|
|
420
|
-
const
|
|
440
|
+
const createIndexesIds = () => {
|
|
421
441
|
const contextValue = getContextValue();
|
|
422
442
|
let ids = $.state($.proxy(getThingIds(contextValue, OFFSET_INDEXES)));
|
|
423
443
|
|
|
424
|
-
if (
|
|
444
|
+
if (hasWindow()) {
|
|
425
445
|
$.user_effect(() => {
|
|
426
446
|
$.set(ids, getThingIds(contextValue, OFFSET_INDEXES), true);
|
|
427
447
|
});
|
|
@@ -434,48 +454,44 @@ const useIndexesIds = () => {
|
|
|
434
454
|
};
|
|
435
455
|
};
|
|
436
456
|
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
);
|
|
443
|
-
const useSliceIds = (indexId, indexesOrIndexesId) =>
|
|
444
|
-
useListenable(
|
|
445
|
-
useIndexesOrIndexesById(indexesOrIndexesId),
|
|
457
|
+
const createIndexIds = (indexesOrIndexesId) =>
|
|
458
|
+
createListenable(resolveIndexes(indexesOrIndexesId), INDEX + IDS, EMPTY_ARR);
|
|
459
|
+
const createSliceIds = (indexId, indexesOrIndexesId) =>
|
|
460
|
+
createListenable(
|
|
461
|
+
resolveIndexes(indexesOrIndexesId),
|
|
446
462
|
SLICE + IDS,
|
|
447
463
|
EMPTY_ARR,
|
|
448
464
|
() => [maybeGet(indexId)],
|
|
449
465
|
);
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
|
|
466
|
+
const createSliceRowIds = (indexId, sliceId, indexesOrIndexesId) =>
|
|
467
|
+
createListenable(
|
|
468
|
+
resolveIndexes(indexesOrIndexesId),
|
|
453
469
|
SLICE + ROW_IDS,
|
|
454
470
|
EMPTY_ARR,
|
|
455
471
|
() => [maybeGet(indexId), maybeGet(sliceId)],
|
|
456
472
|
);
|
|
457
473
|
|
|
458
|
-
const
|
|
459
|
-
const
|
|
474
|
+
const getIndexStoreTableId = (indexesOrId, indexId) => {
|
|
475
|
+
const getIndexes2 = resolveIndexes(indexesOrId);
|
|
460
476
|
|
|
461
477
|
return {
|
|
462
478
|
get store() {
|
|
463
|
-
return
|
|
479
|
+
return getIndexes2()?.getStore();
|
|
464
480
|
},
|
|
465
481
|
|
|
466
482
|
get tableId() {
|
|
467
|
-
return
|
|
483
|
+
return getIndexes2()?.getTableId(maybeGet(indexId));
|
|
468
484
|
},
|
|
469
485
|
};
|
|
470
486
|
};
|
|
471
487
|
|
|
472
|
-
const
|
|
488
|
+
const getQueries = (id) => getProvidedThing(id, OFFSET_QUERIES);
|
|
473
489
|
|
|
474
|
-
const
|
|
490
|
+
const createQueriesIds = () => {
|
|
475
491
|
const contextValue = getContextValue();
|
|
476
492
|
let ids = $.state($.proxy(getThingIds(contextValue, OFFSET_QUERIES)));
|
|
477
493
|
|
|
478
|
-
if (
|
|
494
|
+
if (hasWindow()) {
|
|
479
495
|
$.user_effect(() => {
|
|
480
496
|
$.set(ids, getThingIds(contextValue, OFFSET_QUERIES), true);
|
|
481
497
|
});
|
|
@@ -488,42 +504,38 @@ const useQueriesIds = () => {
|
|
|
488
504
|
};
|
|
489
505
|
};
|
|
490
506
|
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
);
|
|
497
|
-
const useResultTable = (queryId, queriesOrQueriesId) =>
|
|
498
|
-
useListenable(
|
|
499
|
-
useQueriesOrQueriesById(queriesOrQueriesId),
|
|
507
|
+
const createQueryIds = (queriesOrQueriesId) =>
|
|
508
|
+
createListenable(resolveQueries(queriesOrQueriesId), QUERY + IDS, EMPTY_ARR);
|
|
509
|
+
const createResultTable = (queryId, queriesOrQueriesId) =>
|
|
510
|
+
createListenable(
|
|
511
|
+
resolveQueries(queriesOrQueriesId),
|
|
500
512
|
RESULT + TABLE,
|
|
501
513
|
EMPTY_OBJ,
|
|
502
514
|
() => [maybeGet(queryId)],
|
|
503
515
|
);
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
|
|
516
|
+
const createResultTableCellIds = (queryId, queriesOrQueriesId) =>
|
|
517
|
+
createListenable(
|
|
518
|
+
resolveQueries(queriesOrQueriesId),
|
|
507
519
|
RESULT + TABLE + CELL_IDS,
|
|
508
520
|
EMPTY_ARR,
|
|
509
521
|
() => [maybeGet(queryId)],
|
|
510
522
|
);
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
|
|
523
|
+
const createResultRowCount = (queryId, queriesOrQueriesId) =>
|
|
524
|
+
createListenable(
|
|
525
|
+
resolveQueries(queriesOrQueriesId),
|
|
514
526
|
RESULT + ROW_COUNT,
|
|
515
527
|
0,
|
|
516
528
|
() => [maybeGet(queryId)],
|
|
517
529
|
);
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
|
|
530
|
+
const createResultRowIds = (queryId, queriesOrQueriesId) =>
|
|
531
|
+
createListenable(
|
|
532
|
+
resolveQueries(queriesOrQueriesId),
|
|
521
533
|
RESULT + ROW_IDS,
|
|
522
534
|
EMPTY_ARR,
|
|
523
535
|
() => [maybeGet(queryId)],
|
|
524
536
|
);
|
|
525
537
|
|
|
526
|
-
const
|
|
538
|
+
const createResultSortedRowIds = (
|
|
527
539
|
queryId,
|
|
528
540
|
cellId,
|
|
529
541
|
descending = false,
|
|
@@ -531,8 +543,8 @@ const useResultSortedRowIds = (
|
|
|
531
543
|
limit,
|
|
532
544
|
queriesOrQueriesId,
|
|
533
545
|
) =>
|
|
534
|
-
|
|
535
|
-
|
|
546
|
+
createListenable(
|
|
547
|
+
resolveQueries(queriesOrQueriesId),
|
|
536
548
|
RESULT + SORTED_ROW_IDS,
|
|
537
549
|
EMPTY_ARR,
|
|
538
550
|
() => [
|
|
@@ -544,34 +556,34 @@ const useResultSortedRowIds = (
|
|
|
544
556
|
],
|
|
545
557
|
);
|
|
546
558
|
|
|
547
|
-
const
|
|
548
|
-
|
|
549
|
-
|
|
559
|
+
const createResultRow = (queryId, rowId, queriesOrQueriesId) =>
|
|
560
|
+
createListenable(
|
|
561
|
+
resolveQueries(queriesOrQueriesId),
|
|
550
562
|
RESULT + ROW,
|
|
551
563
|
EMPTY_OBJ,
|
|
552
564
|
() => [maybeGet(queryId), maybeGet(rowId)],
|
|
553
565
|
);
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
|
|
566
|
+
const createResultCellIds = (queryId, rowId, queriesOrQueriesId) =>
|
|
567
|
+
createListenable(
|
|
568
|
+
resolveQueries(queriesOrQueriesId),
|
|
557
569
|
RESULT + CELL_IDS,
|
|
558
570
|
EMPTY_ARR,
|
|
559
571
|
() => [maybeGet(queryId), maybeGet(rowId)],
|
|
560
572
|
);
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
|
|
573
|
+
const createResultCell = (queryId, rowId, cellId, queriesOrQueriesId) =>
|
|
574
|
+
createListenable(
|
|
575
|
+
resolveQueries(queriesOrQueriesId),
|
|
564
576
|
RESULT + CELL,
|
|
565
577
|
void 0,
|
|
566
578
|
() => [maybeGet(queryId), maybeGet(rowId), maybeGet(cellId)],
|
|
567
579
|
);
|
|
568
|
-
const
|
|
580
|
+
const getRelationships = (id) => getProvidedThing(id, OFFSET_RELATIONSHIPS);
|
|
569
581
|
|
|
570
|
-
const
|
|
582
|
+
const createRelationshipsIds = () => {
|
|
571
583
|
const contextValue = getContextValue();
|
|
572
584
|
let ids = $.state($.proxy(getThingIds(contextValue, OFFSET_RELATIONSHIPS)));
|
|
573
585
|
|
|
574
|
-
if (
|
|
586
|
+
if (hasWindow()) {
|
|
575
587
|
$.user_effect(() => {
|
|
576
588
|
$.set(ids, getThingIds(contextValue, OFFSET_RELATIONSHIPS), true);
|
|
577
589
|
});
|
|
@@ -584,71 +596,71 @@ const useRelationshipsIds = () => {
|
|
|
584
596
|
};
|
|
585
597
|
};
|
|
586
598
|
|
|
587
|
-
const
|
|
588
|
-
|
|
589
|
-
|
|
599
|
+
const createRelationshipIds = (relationshipsOrRelationshipsId) =>
|
|
600
|
+
createListenable(
|
|
601
|
+
resolveRelationships(relationshipsOrRelationshipsId),
|
|
590
602
|
RELATIONSHIP + IDS,
|
|
591
603
|
EMPTY_ARR,
|
|
592
604
|
);
|
|
593
|
-
const
|
|
605
|
+
const createRemoteRowId = (
|
|
594
606
|
relationshipId,
|
|
595
607
|
localRowId,
|
|
596
608
|
relationshipsOrRelationshipsId,
|
|
597
609
|
) =>
|
|
598
|
-
|
|
599
|
-
|
|
610
|
+
createListenable(
|
|
611
|
+
resolveRelationships(relationshipsOrRelationshipsId),
|
|
600
612
|
REMOTE_ROW_ID,
|
|
601
613
|
void 0,
|
|
602
614
|
() => [maybeGet(relationshipId), maybeGet(localRowId)],
|
|
603
615
|
);
|
|
604
|
-
const
|
|
616
|
+
const createLocalRowIds = (
|
|
605
617
|
relationshipId,
|
|
606
618
|
remoteRowId,
|
|
607
619
|
relationshipsOrRelationshipsId,
|
|
608
620
|
) =>
|
|
609
|
-
|
|
610
|
-
|
|
621
|
+
createListenable(
|
|
622
|
+
resolveRelationships(relationshipsOrRelationshipsId),
|
|
611
623
|
LOCAL + ROW_IDS,
|
|
612
624
|
EMPTY_ARR,
|
|
613
625
|
() => [maybeGet(relationshipId), maybeGet(remoteRowId)],
|
|
614
626
|
);
|
|
615
|
-
const
|
|
627
|
+
const createLinkedRowIds = (
|
|
616
628
|
relationshipId,
|
|
617
629
|
firstRowId,
|
|
618
630
|
relationshipsOrRelationshipsId,
|
|
619
631
|
) =>
|
|
620
|
-
|
|
621
|
-
|
|
632
|
+
createListenable(
|
|
633
|
+
resolveRelationships(relationshipsOrRelationshipsId),
|
|
622
634
|
LINKED + ROW_IDS,
|
|
623
635
|
EMPTY_ARR,
|
|
624
636
|
() => [maybeGet(relationshipId), maybeGet(firstRowId)],
|
|
625
637
|
);
|
|
626
638
|
|
|
627
|
-
const
|
|
628
|
-
const
|
|
639
|
+
const getRelationshipsStoreTableIds = (relationshipsOrId, relationshipId) => {
|
|
640
|
+
const getRelationships2 = resolveRelationships(relationshipsOrId);
|
|
629
641
|
|
|
630
642
|
return {
|
|
631
643
|
get store() {
|
|
632
|
-
return
|
|
644
|
+
return getRelationships2()?.getStore();
|
|
633
645
|
},
|
|
634
646
|
|
|
635
647
|
get localTableId() {
|
|
636
|
-
return
|
|
648
|
+
return getRelationships2()?.getLocalTableId(maybeGet(relationshipId));
|
|
637
649
|
},
|
|
638
650
|
|
|
639
651
|
get remoteTableId() {
|
|
640
|
-
return
|
|
652
|
+
return getRelationships2()?.getRemoteTableId(maybeGet(relationshipId));
|
|
641
653
|
},
|
|
642
654
|
};
|
|
643
655
|
};
|
|
644
656
|
|
|
645
|
-
const
|
|
657
|
+
const getCheckpoints = (id) => getProvidedThing(id, OFFSET_CHECKPOINTS);
|
|
646
658
|
|
|
647
|
-
const
|
|
659
|
+
const createCheckpointsIds = () => {
|
|
648
660
|
const contextValue = getContextValue();
|
|
649
661
|
let ids = $.state($.proxy(getThingIds(contextValue, OFFSET_CHECKPOINTS)));
|
|
650
662
|
|
|
651
|
-
if (
|
|
663
|
+
if (hasWindow()) {
|
|
652
664
|
$.user_effect(() => {
|
|
653
665
|
$.set(ids, getThingIds(contextValue, OFFSET_CHECKPOINTS), true);
|
|
654
666
|
});
|
|
@@ -661,39 +673,39 @@ const useCheckpointsIds = () => {
|
|
|
661
673
|
};
|
|
662
674
|
};
|
|
663
675
|
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
|
|
676
|
+
const createCheckpointIds = (checkpointsOrCheckpointsId) =>
|
|
677
|
+
createListenable(
|
|
678
|
+
resolveCheckpoints(checkpointsOrCheckpointsId),
|
|
667
679
|
CHECKPOINT + IDS,
|
|
668
680
|
DEFAULT_CHECKPOINT_IDS,
|
|
669
681
|
);
|
|
670
|
-
const
|
|
671
|
-
|
|
672
|
-
|
|
682
|
+
const createCheckpoint = (checkpointId, checkpointsOrCheckpointsId) =>
|
|
683
|
+
createListenable(
|
|
684
|
+
resolveCheckpoints(checkpointsOrCheckpointsId),
|
|
673
685
|
CHECKPOINT,
|
|
674
686
|
void 0,
|
|
675
687
|
() => [maybeGet(checkpointId)],
|
|
676
688
|
);
|
|
677
689
|
|
|
678
|
-
const
|
|
679
|
-
const
|
|
690
|
+
const createGoBackwardCallback = (checkpointsOrCheckpointsId) => {
|
|
691
|
+
const getCheckpoints2 = resolveCheckpoints(checkpointsOrCheckpointsId);
|
|
680
692
|
|
|
681
|
-
return () =>
|
|
693
|
+
return () => getCheckpoints2()?.goBackward();
|
|
682
694
|
};
|
|
683
695
|
|
|
684
|
-
const
|
|
685
|
-
const
|
|
696
|
+
const createGoForwardCallback = (checkpointsOrCheckpointsId) => {
|
|
697
|
+
const getCheckpoints2 = resolveCheckpoints(checkpointsOrCheckpointsId);
|
|
686
698
|
|
|
687
|
-
return () =>
|
|
699
|
+
return () => getCheckpoints2()?.goForward();
|
|
688
700
|
};
|
|
689
701
|
|
|
690
|
-
const
|
|
702
|
+
const getPersister = (id) => getProvidedThing(id, OFFSET_PERSISTER);
|
|
691
703
|
|
|
692
|
-
const
|
|
704
|
+
const createPersisterIds = () => {
|
|
693
705
|
const contextValue = getContextValue();
|
|
694
706
|
let ids = $.state($.proxy(getThingIds(contextValue, OFFSET_PERSISTER)));
|
|
695
707
|
|
|
696
|
-
if (
|
|
708
|
+
if (hasWindow()) {
|
|
697
709
|
$.user_effect(() => {
|
|
698
710
|
$.set(ids, getThingIds(contextValue, OFFSET_PERSISTER), true);
|
|
699
711
|
});
|
|
@@ -706,15 +718,15 @@ const usePersisterIds = () => {
|
|
|
706
718
|
};
|
|
707
719
|
};
|
|
708
720
|
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
const
|
|
721
|
+
const createPersisterStatus = (persisterOrPersisterId) =>
|
|
722
|
+
createListenable(resolvePersister(persisterOrPersisterId), STATUS, 0);
|
|
723
|
+
const getSynchronizer = (id) => getProvidedThing(id, OFFSET_SYNCHRONIZER);
|
|
712
724
|
|
|
713
|
-
const
|
|
725
|
+
const createSynchronizerIds = () => {
|
|
714
726
|
const contextValue = getContextValue();
|
|
715
727
|
let ids = $.state($.proxy(getThingIds(contextValue, OFFSET_SYNCHRONIZER)));
|
|
716
728
|
|
|
717
|
-
if (
|
|
729
|
+
if (hasWindow()) {
|
|
718
730
|
$.user_effect(() => {
|
|
719
731
|
$.set(ids, getThingIds(contextValue, OFFSET_SYNCHRONIZER), true);
|
|
720
732
|
});
|
|
@@ -727,92 +739,86 @@ const useSynchronizerIds = () => {
|
|
|
727
739
|
};
|
|
728
740
|
};
|
|
729
741
|
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
-
|
|
742
|
+
const createSynchronizerStatus = (synchronizerOrSynchronizerId) =>
|
|
743
|
+
createListenable(
|
|
744
|
+
resolveSynchronizer(synchronizerOrSynchronizerId),
|
|
733
745
|
STATUS,
|
|
734
746
|
0,
|
|
735
747
|
);
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
|
|
748
|
+
const onHasTables = (listener, mutator, storeOrStoreId) =>
|
|
749
|
+
addListenerEffect(
|
|
750
|
+
resolveStore(storeOrStoreId),
|
|
739
751
|
HAS + TABLES,
|
|
740
752
|
listener,
|
|
741
753
|
() => EMPTY_ARR,
|
|
742
754
|
mutator,
|
|
743
755
|
);
|
|
744
|
-
const
|
|
745
|
-
|
|
746
|
-
|
|
756
|
+
const onTables = (listener, mutator, storeOrStoreId) =>
|
|
757
|
+
addListenerEffect(
|
|
758
|
+
resolveStore(storeOrStoreId),
|
|
747
759
|
TABLES,
|
|
748
760
|
listener,
|
|
749
761
|
() => EMPTY_ARR,
|
|
750
762
|
mutator,
|
|
751
763
|
);
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
|
|
764
|
+
const onTableIds = (listener, mutator, storeOrStoreId) =>
|
|
765
|
+
addListenerEffect(
|
|
766
|
+
resolveStore(storeOrStoreId),
|
|
755
767
|
TABLE_IDS,
|
|
756
768
|
listener,
|
|
757
769
|
() => EMPTY_ARR,
|
|
758
770
|
mutator,
|
|
759
771
|
);
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
-
|
|
772
|
+
const onHasTable = (tableId, listener, mutator, storeOrStoreId) =>
|
|
773
|
+
addListenerEffect(
|
|
774
|
+
resolveStore(storeOrStoreId),
|
|
763
775
|
HAS + TABLE,
|
|
764
776
|
listener,
|
|
765
777
|
() => [maybeGet(tableId)],
|
|
766
778
|
mutator,
|
|
767
779
|
);
|
|
768
|
-
const
|
|
769
|
-
|
|
770
|
-
|
|
780
|
+
const onTable = (tableId, listener, mutator, storeOrStoreId) =>
|
|
781
|
+
addListenerEffect(
|
|
782
|
+
resolveStore(storeOrStoreId),
|
|
771
783
|
TABLE,
|
|
772
784
|
listener,
|
|
773
785
|
() => [maybeGet(tableId)],
|
|
774
786
|
mutator,
|
|
775
787
|
);
|
|
776
|
-
const
|
|
777
|
-
|
|
778
|
-
|
|
788
|
+
const onTableCellIds = (tableId, listener, mutator, storeOrStoreId) =>
|
|
789
|
+
addListenerEffect(
|
|
790
|
+
resolveStore(storeOrStoreId),
|
|
779
791
|
TABLE + CELL_IDS,
|
|
780
792
|
listener,
|
|
781
793
|
() => [maybeGet(tableId)],
|
|
782
794
|
mutator,
|
|
783
795
|
);
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
listener,
|
|
788
|
-
mutator,
|
|
789
|
-
storeOrStoreId,
|
|
790
|
-
) =>
|
|
791
|
-
useListener(
|
|
792
|
-
useStoreOrStoreById(storeOrStoreId),
|
|
796
|
+
const onHasTableCell = (tableId, cellId, listener, mutator, storeOrStoreId) =>
|
|
797
|
+
addListenerEffect(
|
|
798
|
+
resolveStore(storeOrStoreId),
|
|
793
799
|
HAS + TABLE + CELL,
|
|
794
800
|
listener,
|
|
795
801
|
() => [maybeGet(tableId), maybeGet(cellId)],
|
|
796
802
|
mutator,
|
|
797
803
|
);
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
|
|
804
|
+
const onRowCount = (tableId, listener, mutator, storeOrStoreId) =>
|
|
805
|
+
addListenerEffect(
|
|
806
|
+
resolveStore(storeOrStoreId),
|
|
801
807
|
ROW_COUNT,
|
|
802
808
|
listener,
|
|
803
809
|
() => [maybeGet(tableId)],
|
|
804
810
|
mutator,
|
|
805
811
|
);
|
|
806
|
-
const
|
|
807
|
-
|
|
808
|
-
|
|
812
|
+
const onRowIds = (tableId, listener, mutator, storeOrStoreId) =>
|
|
813
|
+
addListenerEffect(
|
|
814
|
+
resolveStore(storeOrStoreId),
|
|
809
815
|
ROW_IDS,
|
|
810
816
|
listener,
|
|
811
817
|
() => [maybeGet(tableId)],
|
|
812
818
|
mutator,
|
|
813
819
|
);
|
|
814
820
|
|
|
815
|
-
const
|
|
821
|
+
const onSortedRowIds = (
|
|
816
822
|
tableId,
|
|
817
823
|
cellId,
|
|
818
824
|
descending,
|
|
@@ -822,8 +828,8 @@ const useSortedRowIdsListener = (
|
|
|
822
828
|
mutator,
|
|
823
829
|
storeOrStoreId,
|
|
824
830
|
) =>
|
|
825
|
-
|
|
826
|
-
|
|
831
|
+
addListenerEffect(
|
|
832
|
+
resolveStore(storeOrStoreId),
|
|
827
833
|
SORTED_ROW_IDS,
|
|
828
834
|
listener,
|
|
829
835
|
() => [
|
|
@@ -836,220 +842,195 @@ const useSortedRowIdsListener = (
|
|
|
836
842
|
mutator,
|
|
837
843
|
);
|
|
838
844
|
|
|
839
|
-
const
|
|
840
|
-
|
|
841
|
-
|
|
845
|
+
const onHasRow = (tableId, rowId, listener, mutator, storeOrStoreId) =>
|
|
846
|
+
addListenerEffect(
|
|
847
|
+
resolveStore(storeOrStoreId),
|
|
842
848
|
HAS + ROW,
|
|
843
849
|
listener,
|
|
844
850
|
() => [maybeGet(tableId), maybeGet(rowId)],
|
|
845
851
|
mutator,
|
|
846
852
|
);
|
|
847
|
-
const
|
|
848
|
-
|
|
849
|
-
|
|
853
|
+
const onRow = (tableId, rowId, listener, mutator, storeOrStoreId) =>
|
|
854
|
+
addListenerEffect(
|
|
855
|
+
resolveStore(storeOrStoreId),
|
|
850
856
|
ROW,
|
|
851
857
|
listener,
|
|
852
858
|
() => [maybeGet(tableId), maybeGet(rowId)],
|
|
853
859
|
mutator,
|
|
854
860
|
);
|
|
855
|
-
const
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
listener,
|
|
859
|
-
mutator,
|
|
860
|
-
storeOrStoreId,
|
|
861
|
-
) =>
|
|
862
|
-
useListener(
|
|
863
|
-
useStoreOrStoreById(storeOrStoreId),
|
|
861
|
+
const onCellIds = (tableId, rowId, listener, mutator, storeOrStoreId) =>
|
|
862
|
+
addListenerEffect(
|
|
863
|
+
resolveStore(storeOrStoreId),
|
|
864
864
|
CELL_IDS,
|
|
865
865
|
listener,
|
|
866
866
|
() => [maybeGet(tableId), maybeGet(rowId)],
|
|
867
867
|
mutator,
|
|
868
868
|
);
|
|
869
|
-
const
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
cellId,
|
|
873
|
-
listener,
|
|
874
|
-
mutator,
|
|
875
|
-
storeOrStoreId,
|
|
876
|
-
) =>
|
|
877
|
-
useListener(
|
|
878
|
-
useStoreOrStoreById(storeOrStoreId),
|
|
869
|
+
const onHasCell = (tableId, rowId, cellId, listener, mutator, storeOrStoreId) =>
|
|
870
|
+
addListenerEffect(
|
|
871
|
+
resolveStore(storeOrStoreId),
|
|
879
872
|
HAS + CELL,
|
|
880
873
|
listener,
|
|
881
874
|
() => [maybeGet(tableId), maybeGet(rowId), maybeGet(cellId)],
|
|
882
875
|
mutator,
|
|
883
876
|
);
|
|
884
|
-
const
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
cellId,
|
|
888
|
-
listener,
|
|
889
|
-
mutator,
|
|
890
|
-
storeOrStoreId,
|
|
891
|
-
) =>
|
|
892
|
-
useListener(
|
|
893
|
-
useStoreOrStoreById(storeOrStoreId),
|
|
877
|
+
const onCell = (tableId, rowId, cellId, listener, mutator, storeOrStoreId) =>
|
|
878
|
+
addListenerEffect(
|
|
879
|
+
resolveStore(storeOrStoreId),
|
|
894
880
|
CELL,
|
|
895
881
|
listener,
|
|
896
882
|
() => [maybeGet(tableId), maybeGet(rowId), maybeGet(cellId)],
|
|
897
883
|
mutator,
|
|
898
884
|
);
|
|
899
|
-
const
|
|
900
|
-
|
|
901
|
-
|
|
885
|
+
const onHasValues = (listener, mutator, storeOrStoreId) =>
|
|
886
|
+
addListenerEffect(
|
|
887
|
+
resolveStore(storeOrStoreId),
|
|
902
888
|
HAS + VALUES,
|
|
903
889
|
listener,
|
|
904
890
|
() => EMPTY_ARR,
|
|
905
891
|
mutator,
|
|
906
892
|
);
|
|
907
|
-
const
|
|
908
|
-
|
|
909
|
-
|
|
893
|
+
const onValues = (listener, mutator, storeOrStoreId) =>
|
|
894
|
+
addListenerEffect(
|
|
895
|
+
resolveStore(storeOrStoreId),
|
|
910
896
|
VALUES,
|
|
911
897
|
listener,
|
|
912
898
|
() => EMPTY_ARR,
|
|
913
899
|
mutator,
|
|
914
900
|
);
|
|
915
|
-
const
|
|
916
|
-
|
|
917
|
-
|
|
901
|
+
const onValueIds = (listener, mutator, storeOrStoreId) =>
|
|
902
|
+
addListenerEffect(
|
|
903
|
+
resolveStore(storeOrStoreId),
|
|
918
904
|
VALUE_IDS,
|
|
919
905
|
listener,
|
|
920
906
|
() => EMPTY_ARR,
|
|
921
907
|
mutator,
|
|
922
908
|
);
|
|
923
|
-
const
|
|
924
|
-
|
|
925
|
-
|
|
909
|
+
const onHasValue = (valueId, listener, mutator, storeOrStoreId) =>
|
|
910
|
+
addListenerEffect(
|
|
911
|
+
resolveStore(storeOrStoreId),
|
|
926
912
|
HAS + VALUE,
|
|
927
913
|
listener,
|
|
928
914
|
() => [maybeGet(valueId)],
|
|
929
915
|
mutator,
|
|
930
916
|
);
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
|
|
917
|
+
const onValue = (valueId, listener, mutator, storeOrStoreId) =>
|
|
918
|
+
addListenerEffect(
|
|
919
|
+
resolveStore(storeOrStoreId),
|
|
934
920
|
VALUE,
|
|
935
921
|
listener,
|
|
936
922
|
() => [maybeGet(valueId)],
|
|
937
923
|
mutator,
|
|
938
924
|
);
|
|
939
|
-
const
|
|
940
|
-
|
|
941
|
-
|
|
925
|
+
const onStartTransaction = (listener, storeOrStoreId) =>
|
|
926
|
+
addListenerEffect(
|
|
927
|
+
resolveStore(storeOrStoreId),
|
|
942
928
|
'Start' + TRANSACTION,
|
|
943
929
|
listener,
|
|
944
930
|
);
|
|
945
|
-
const
|
|
946
|
-
|
|
947
|
-
|
|
931
|
+
const onWillFinishTransaction = (listener, storeOrStoreId) =>
|
|
932
|
+
addListenerEffect(
|
|
933
|
+
resolveStore(storeOrStoreId),
|
|
948
934
|
'Will' + FINISH + TRANSACTION,
|
|
949
935
|
listener,
|
|
950
936
|
);
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
|
|
937
|
+
const onDidFinishTransaction = (listener, storeOrStoreId) =>
|
|
938
|
+
addListenerEffect(
|
|
939
|
+
resolveStore(storeOrStoreId),
|
|
954
940
|
'Did' + FINISH + TRANSACTION,
|
|
955
941
|
listener,
|
|
956
942
|
);
|
|
957
|
-
const
|
|
958
|
-
|
|
959
|
-
|
|
943
|
+
const onMetric = (metricId, listener, metricsOrMetricsId) =>
|
|
944
|
+
addListenerEffect(
|
|
945
|
+
resolveMetrics(metricsOrMetricsId),
|
|
960
946
|
METRIC,
|
|
961
947
|
listener,
|
|
962
948
|
() => [maybeGet(metricId)],
|
|
963
949
|
);
|
|
964
|
-
const
|
|
965
|
-
|
|
966
|
-
|
|
950
|
+
const onSliceIds = (indexId, listener, indexesOrIndexesId) =>
|
|
951
|
+
addListenerEffect(
|
|
952
|
+
resolveIndexes(indexesOrIndexesId),
|
|
967
953
|
SLICE + IDS,
|
|
968
954
|
listener,
|
|
969
955
|
() => [maybeGet(indexId)],
|
|
970
956
|
);
|
|
971
|
-
const
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
listener,
|
|
975
|
-
indexesOrIndexesId,
|
|
976
|
-
) =>
|
|
977
|
-
useListener(
|
|
978
|
-
useIndexesOrIndexesById(indexesOrIndexesId),
|
|
957
|
+
const onSliceRowIds = (indexId, sliceId, listener, indexesOrIndexesId) =>
|
|
958
|
+
addListenerEffect(
|
|
959
|
+
resolveIndexes(indexesOrIndexesId),
|
|
979
960
|
SLICE + ROW_IDS,
|
|
980
961
|
listener,
|
|
981
962
|
() => [maybeGet(indexId), maybeGet(sliceId)],
|
|
982
963
|
);
|
|
983
964
|
|
|
984
|
-
const
|
|
965
|
+
const onRemoteRowId = (
|
|
985
966
|
relationshipId,
|
|
986
967
|
localRowId,
|
|
987
968
|
listener,
|
|
988
969
|
relationshipsOrRelationshipsId,
|
|
989
970
|
) =>
|
|
990
|
-
|
|
991
|
-
|
|
971
|
+
addListenerEffect(
|
|
972
|
+
resolveRelationships(relationshipsOrRelationshipsId),
|
|
992
973
|
REMOTE_ROW_ID,
|
|
993
974
|
listener,
|
|
994
975
|
() => [maybeGet(relationshipId), maybeGet(localRowId)],
|
|
995
976
|
);
|
|
996
977
|
|
|
997
|
-
const
|
|
978
|
+
const onLocalRowIds = (
|
|
998
979
|
relationshipId,
|
|
999
980
|
remoteRowId,
|
|
1000
981
|
listener,
|
|
1001
982
|
relationshipsOrRelationshipsId,
|
|
1002
983
|
) =>
|
|
1003
|
-
|
|
1004
|
-
|
|
984
|
+
addListenerEffect(
|
|
985
|
+
resolveRelationships(relationshipsOrRelationshipsId),
|
|
1005
986
|
LOCAL + ROW_IDS,
|
|
1006
987
|
listener,
|
|
1007
988
|
() => [maybeGet(relationshipId), maybeGet(remoteRowId)],
|
|
1008
989
|
);
|
|
1009
990
|
|
|
1010
|
-
const
|
|
991
|
+
const onLinkedRowIds = (
|
|
1011
992
|
relationshipId,
|
|
1012
993
|
firstRowId,
|
|
1013
994
|
listener,
|
|
1014
995
|
relationshipsOrRelationshipsId,
|
|
1015
996
|
) =>
|
|
1016
|
-
|
|
1017
|
-
|
|
997
|
+
addListenerEffect(
|
|
998
|
+
resolveRelationships(relationshipsOrRelationshipsId),
|
|
1018
999
|
LINKED + ROW_IDS,
|
|
1019
1000
|
listener,
|
|
1020
1001
|
() => [maybeGet(relationshipId), maybeGet(firstRowId)],
|
|
1021
1002
|
);
|
|
1022
1003
|
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1025
|
-
|
|
1004
|
+
const onResultTable = (queryId, listener, queriesOrQueriesId) =>
|
|
1005
|
+
addListenerEffect(
|
|
1006
|
+
resolveQueries(queriesOrQueriesId),
|
|
1026
1007
|
RESULT + TABLE,
|
|
1027
1008
|
listener,
|
|
1028
1009
|
() => [maybeGet(queryId)],
|
|
1029
1010
|
);
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1032
|
-
|
|
1011
|
+
const onResultTableCellIds = (queryId, listener, queriesOrQueriesId) =>
|
|
1012
|
+
addListenerEffect(
|
|
1013
|
+
resolveQueries(queriesOrQueriesId),
|
|
1033
1014
|
RESULT + TABLE + CELL_IDS,
|
|
1034
1015
|
listener,
|
|
1035
1016
|
() => [maybeGet(queryId)],
|
|
1036
1017
|
);
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1039
|
-
|
|
1018
|
+
const onResultRowCount = (queryId, listener, queriesOrQueriesId) =>
|
|
1019
|
+
addListenerEffect(
|
|
1020
|
+
resolveQueries(queriesOrQueriesId),
|
|
1040
1021
|
RESULT + ROW_COUNT,
|
|
1041
1022
|
listener,
|
|
1042
1023
|
() => [maybeGet(queryId)],
|
|
1043
1024
|
);
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1046
|
-
|
|
1025
|
+
const onResultRowIds = (queryId, listener, queriesOrQueriesId) =>
|
|
1026
|
+
addListenerEffect(
|
|
1027
|
+
resolveQueries(queriesOrQueriesId),
|
|
1047
1028
|
RESULT + ROW_IDS,
|
|
1048
1029
|
listener,
|
|
1049
1030
|
() => [maybeGet(queryId)],
|
|
1050
1031
|
);
|
|
1051
1032
|
|
|
1052
|
-
const
|
|
1033
|
+
const onResultSortedRowIds = (
|
|
1053
1034
|
queryId,
|
|
1054
1035
|
cellId,
|
|
1055
1036
|
descending,
|
|
@@ -1058,8 +1039,8 @@ const useResultSortedRowIdsListener = (
|
|
|
1058
1039
|
listener,
|
|
1059
1040
|
queriesOrQueriesId,
|
|
1060
1041
|
) =>
|
|
1061
|
-
|
|
1062
|
-
|
|
1042
|
+
addListenerEffect(
|
|
1043
|
+
resolveQueries(queriesOrQueriesId),
|
|
1063
1044
|
RESULT + SORTED_ROW_IDS,
|
|
1064
1045
|
listener,
|
|
1065
1046
|
() => [
|
|
@@ -1071,86 +1052,59 @@ const useResultSortedRowIdsListener = (
|
|
|
1071
1052
|
],
|
|
1072
1053
|
);
|
|
1073
1054
|
|
|
1074
|
-
const
|
|
1075
|
-
|
|
1076
|
-
|
|
1055
|
+
const onResultRow = (queryId, rowId, listener, queriesOrQueriesId) =>
|
|
1056
|
+
addListenerEffect(
|
|
1057
|
+
resolveQueries(queriesOrQueriesId),
|
|
1077
1058
|
RESULT + ROW,
|
|
1078
1059
|
listener,
|
|
1079
1060
|
() => [maybeGet(queryId), maybeGet(rowId)],
|
|
1080
1061
|
);
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
listener,
|
|
1085
|
-
queriesOrQueriesId,
|
|
1086
|
-
) =>
|
|
1087
|
-
useListener(
|
|
1088
|
-
useQueriesOrQueriesById(queriesOrQueriesId),
|
|
1062
|
+
const onResultCellIds = (queryId, rowId, listener, queriesOrQueriesId) =>
|
|
1063
|
+
addListenerEffect(
|
|
1064
|
+
resolveQueries(queriesOrQueriesId),
|
|
1089
1065
|
RESULT + CELL_IDS,
|
|
1090
1066
|
listener,
|
|
1091
1067
|
() => [maybeGet(queryId), maybeGet(rowId)],
|
|
1092
1068
|
);
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
cellId,
|
|
1097
|
-
listener,
|
|
1098
|
-
queriesOrQueriesId,
|
|
1099
|
-
) =>
|
|
1100
|
-
useListener(
|
|
1101
|
-
useQueriesOrQueriesById(queriesOrQueriesId),
|
|
1069
|
+
const onResultCell = (queryId, rowId, cellId, listener, queriesOrQueriesId) =>
|
|
1070
|
+
addListenerEffect(
|
|
1071
|
+
resolveQueries(queriesOrQueriesId),
|
|
1102
1072
|
RESULT + CELL,
|
|
1103
1073
|
listener,
|
|
1104
1074
|
() => [maybeGet(queryId), maybeGet(rowId), maybeGet(cellId)],
|
|
1105
1075
|
);
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1108
|
-
|
|
1076
|
+
const onParamValues = (queryId, listener, queriesOrQueriesId) =>
|
|
1077
|
+
addListenerEffect(
|
|
1078
|
+
resolveQueries(queriesOrQueriesId),
|
|
1109
1079
|
'ParamValues',
|
|
1110
1080
|
listener,
|
|
1111
1081
|
() => [maybeGet(queryId)],
|
|
1112
1082
|
);
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
listener,
|
|
1117
|
-
queriesOrQueriesId,
|
|
1118
|
-
) =>
|
|
1119
|
-
useListener(
|
|
1120
|
-
useQueriesOrQueriesById(queriesOrQueriesId),
|
|
1083
|
+
const onParamValue = (queryId, paramId, listener, queriesOrQueriesId) =>
|
|
1084
|
+
addListenerEffect(
|
|
1085
|
+
resolveQueries(queriesOrQueriesId),
|
|
1121
1086
|
'ParamValue',
|
|
1122
1087
|
listener,
|
|
1123
1088
|
() => [maybeGet(queryId), maybeGet(paramId)],
|
|
1124
1089
|
);
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1127
|
-
|
|
1090
|
+
const onCheckpointIds = (listener, checkpointsOrCheckpointsId) =>
|
|
1091
|
+
addListenerEffect(
|
|
1092
|
+
resolveCheckpoints(checkpointsOrCheckpointsId),
|
|
1128
1093
|
CHECKPOINT + IDS,
|
|
1129
1094
|
listener,
|
|
1130
1095
|
);
|
|
1131
|
-
const
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
checkpointsOrCheckpointsId,
|
|
1135
|
-
) =>
|
|
1136
|
-
useListener(
|
|
1137
|
-
useCheckpointsOrCheckpointsById(checkpointsOrCheckpointsId),
|
|
1096
|
+
const onCheckpoint = (checkpointId, listener, checkpointsOrCheckpointsId) =>
|
|
1097
|
+
addListenerEffect(
|
|
1098
|
+
resolveCheckpoints(checkpointsOrCheckpointsId),
|
|
1138
1099
|
CHECKPOINT,
|
|
1139
1100
|
listener,
|
|
1140
1101
|
() => [maybeGet(checkpointId)],
|
|
1141
1102
|
);
|
|
1142
|
-
const
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
);
|
|
1148
|
-
const useSynchronizerStatusListener = (
|
|
1149
|
-
listener,
|
|
1150
|
-
synchronizerOrSynchronizerId,
|
|
1151
|
-
) =>
|
|
1152
|
-
useListener(
|
|
1153
|
-
useSynchronizerOrSynchronizerById(synchronizerOrSynchronizerId),
|
|
1103
|
+
const onPersisterStatus = (listener, persisterOrPersisterId) =>
|
|
1104
|
+
addListenerEffect(resolvePersister(persisterOrPersisterId), STATUS, listener);
|
|
1105
|
+
const onSynchronizerStatus = (listener, synchronizerOrSynchronizerId) =>
|
|
1106
|
+
addListenerEffect(
|
|
1107
|
+
resolveSynchronizer(synchronizerOrSynchronizerId),
|
|
1154
1108
|
STATUS,
|
|
1155
1109
|
listener,
|
|
1156
1110
|
);
|
|
@@ -1158,7 +1112,7 @@ const useSynchronizerStatusListener = (
|
|
|
1158
1112
|
const provideThing = (thingId, thing, offset) => {
|
|
1159
1113
|
const contextValue = getContextValue();
|
|
1160
1114
|
|
|
1161
|
-
if (
|
|
1115
|
+
if (hasWindow()) {
|
|
1162
1116
|
$.user_effect(() => {
|
|
1163
1117
|
contextValue[16]?.(offset, thingId, thing);
|
|
1164
1118
|
|
|
@@ -1187,7 +1141,7 @@ const provideSynchronizer = (synchronizerId, synchronizer) =>
|
|
|
1187
1141
|
function CheckpointView($$anchor, $$props) {
|
|
1188
1142
|
$.push($$props, true);
|
|
1189
1143
|
|
|
1190
|
-
const checkpoint =
|
|
1144
|
+
const checkpoint = createCheckpoint(
|
|
1191
1145
|
() => $$props.checkpointId,
|
|
1192
1146
|
() => $$props.checkpoints,
|
|
1193
1147
|
);
|
|
@@ -1318,7 +1272,7 @@ function Wrap($$anchor, $$props) {
|
|
|
1318
1272
|
function BackwardCheckpointsView($$anchor, $$props) {
|
|
1319
1273
|
$.push($$props, true);
|
|
1320
1274
|
|
|
1321
|
-
const checkpointIds =
|
|
1275
|
+
const checkpointIds = createCheckpointIds(() => $$props.checkpoints);
|
|
1322
1276
|
const ids = $.derived(() => checkpointIds.current[0]);
|
|
1323
1277
|
|
|
1324
1278
|
{
|
|
@@ -1365,7 +1319,7 @@ function BackwardCheckpointsView($$anchor, $$props) {
|
|
|
1365
1319
|
function CellView($$anchor, $$props) {
|
|
1366
1320
|
$.push($$props, true);
|
|
1367
1321
|
|
|
1368
|
-
const cell =
|
|
1322
|
+
const cell = createCell(
|
|
1369
1323
|
() => $$props.tableId,
|
|
1370
1324
|
() => $$props.rowId,
|
|
1371
1325
|
() => $$props.cellId,
|
|
@@ -1389,7 +1343,7 @@ function CellView($$anchor, $$props) {
|
|
|
1389
1343
|
function CurrentCheckpointView($$anchor, $$props) {
|
|
1390
1344
|
$.push($$props, true);
|
|
1391
1345
|
|
|
1392
|
-
const checkpointIds =
|
|
1346
|
+
const checkpointIds = createCheckpointIds(() => $$props.checkpoints);
|
|
1393
1347
|
const currentId = $.derived(() => checkpointIds.current[1]);
|
|
1394
1348
|
var fragment = $.comment();
|
|
1395
1349
|
var node = $.first_child(fragment);
|
|
@@ -1451,7 +1405,7 @@ function CurrentCheckpointView($$anchor, $$props) {
|
|
|
1451
1405
|
function ForwardCheckpointsView($$anchor, $$props) {
|
|
1452
1406
|
$.push($$props, true);
|
|
1453
1407
|
|
|
1454
|
-
const checkpointIds =
|
|
1408
|
+
const checkpointIds = createCheckpointIds(() => $$props.checkpoints);
|
|
1455
1409
|
const ids = $.derived(() => checkpointIds.current[2]);
|
|
1456
1410
|
|
|
1457
1411
|
{
|
|
@@ -1498,7 +1452,7 @@ function ForwardCheckpointsView($$anchor, $$props) {
|
|
|
1498
1452
|
function RowView($$anchor, $$props) {
|
|
1499
1453
|
$.push($$props, true);
|
|
1500
1454
|
|
|
1501
|
-
const defaultCellIds =
|
|
1455
|
+
const defaultCellIds = createCellIds(
|
|
1502
1456
|
() => $$props.tableId,
|
|
1503
1457
|
() => $$props.rowId,
|
|
1504
1458
|
() => $$props.store,
|
|
@@ -1563,11 +1517,11 @@ function RowView($$anchor, $$props) {
|
|
|
1563
1517
|
function SliceView($$anchor, $$props) {
|
|
1564
1518
|
$.push($$props, true);
|
|
1565
1519
|
|
|
1566
|
-
const {store, tableId} =
|
|
1520
|
+
const {store, tableId} = getIndexStoreTableId(
|
|
1567
1521
|
() => $$props.indexes,
|
|
1568
1522
|
() => $$props.indexId,
|
|
1569
1523
|
);
|
|
1570
|
-
const rowIds =
|
|
1524
|
+
const rowIds = createSliceRowIds(
|
|
1571
1525
|
() => $$props.indexId,
|
|
1572
1526
|
() => $$props.sliceId,
|
|
1573
1527
|
() => $$props.indexes,
|
|
@@ -1638,7 +1592,7 @@ function SliceView($$anchor, $$props) {
|
|
|
1638
1592
|
function IndexView($$anchor, $$props) {
|
|
1639
1593
|
$.push($$props, true);
|
|
1640
1594
|
|
|
1641
|
-
const sliceIds =
|
|
1595
|
+
const sliceIds = createSliceIds(
|
|
1642
1596
|
() => $$props.indexId,
|
|
1643
1597
|
() => $$props.indexes,
|
|
1644
1598
|
);
|
|
@@ -1695,11 +1649,11 @@ function IndexView($$anchor, $$props) {
|
|
|
1695
1649
|
function LinkedRowsView($$anchor, $$props) {
|
|
1696
1650
|
$.push($$props, true);
|
|
1697
1651
|
|
|
1698
|
-
const {store, localTableId} =
|
|
1652
|
+
const {store, localTableId} = getRelationshipsStoreTableIds(
|
|
1699
1653
|
() => $$props.relationships,
|
|
1700
1654
|
() => $$props.relationshipId,
|
|
1701
1655
|
);
|
|
1702
|
-
const rowIds =
|
|
1656
|
+
const rowIds = createLinkedRowIds(
|
|
1703
1657
|
() => $$props.relationshipId,
|
|
1704
1658
|
() => $$props.firstRowId,
|
|
1705
1659
|
() => $$props.relationships,
|
|
@@ -1770,11 +1724,11 @@ function LinkedRowsView($$anchor, $$props) {
|
|
|
1770
1724
|
function LocalRowsView($$anchor, $$props) {
|
|
1771
1725
|
$.push($$props, true);
|
|
1772
1726
|
|
|
1773
|
-
const {store, localTableId} =
|
|
1727
|
+
const {store, localTableId} = getRelationshipsStoreTableIds(
|
|
1774
1728
|
() => $$props.relationships,
|
|
1775
1729
|
() => $$props.relationshipId,
|
|
1776
1730
|
);
|
|
1777
|
-
const rowIds =
|
|
1731
|
+
const rowIds = createLocalRowIds(
|
|
1778
1732
|
() => $$props.relationshipId,
|
|
1779
1733
|
() => $$props.remoteRowId,
|
|
1780
1734
|
() => $$props.relationships,
|
|
@@ -1845,7 +1799,7 @@ function LocalRowsView($$anchor, $$props) {
|
|
|
1845
1799
|
function MetricView($$anchor, $$props) {
|
|
1846
1800
|
$.push($$props, true);
|
|
1847
1801
|
|
|
1848
|
-
const metric =
|
|
1802
|
+
const metric = createMetric(
|
|
1849
1803
|
() => $$props.metricId,
|
|
1850
1804
|
() => $$props.metrics,
|
|
1851
1805
|
);
|
|
@@ -1987,11 +1941,11 @@ var root = $.from_html(`<!><!><!>`, 1);
|
|
|
1987
1941
|
function RemoteRowView($$anchor, $$props) {
|
|
1988
1942
|
$.push($$props, true);
|
|
1989
1943
|
|
|
1990
|
-
const {store, remoteTableId} =
|
|
1944
|
+
const {store, remoteTableId} = getRelationshipsStoreTableIds(
|
|
1991
1945
|
() => $$props.relationships,
|
|
1992
1946
|
() => $$props.relationshipId,
|
|
1993
1947
|
);
|
|
1994
|
-
const remoteRowId =
|
|
1948
|
+
const remoteRowId = createRemoteRowId(
|
|
1995
1949
|
() => $$props.relationshipId,
|
|
1996
1950
|
() => $$props.localRowId,
|
|
1997
1951
|
() => $$props.relationships,
|
|
@@ -2092,7 +2046,7 @@ function RemoteRowView($$anchor, $$props) {
|
|
|
2092
2046
|
function ResultCellView($$anchor, $$props) {
|
|
2093
2047
|
$.push($$props, true);
|
|
2094
2048
|
|
|
2095
|
-
const cell =
|
|
2049
|
+
const cell = createResultCell(
|
|
2096
2050
|
() => $$props.queryId,
|
|
2097
2051
|
() => $$props.rowId,
|
|
2098
2052
|
() => $$props.cellId,
|
|
@@ -2116,7 +2070,7 @@ function ResultCellView($$anchor, $$props) {
|
|
|
2116
2070
|
function ResultRowView($$anchor, $$props) {
|
|
2117
2071
|
$.push($$props, true);
|
|
2118
2072
|
|
|
2119
|
-
const cellIds =
|
|
2073
|
+
const cellIds = createResultCellIds(
|
|
2120
2074
|
() => $$props.queryId,
|
|
2121
2075
|
() => $$props.rowId,
|
|
2122
2076
|
() => $$props.queries,
|
|
@@ -2178,7 +2132,7 @@ function ResultRowView($$anchor, $$props) {
|
|
|
2178
2132
|
function ResultSortedTableView($$anchor, $$props) {
|
|
2179
2133
|
$.push($$props, true);
|
|
2180
2134
|
|
|
2181
|
-
const rowIds =
|
|
2135
|
+
const rowIds = createResultSortedRowIds(
|
|
2182
2136
|
() => $$props.queryId,
|
|
2183
2137
|
() => $$props.cellId,
|
|
2184
2138
|
() => $$props.descending ?? false,
|
|
@@ -2239,7 +2193,7 @@ function ResultSortedTableView($$anchor, $$props) {
|
|
|
2239
2193
|
function ResultTableView($$anchor, $$props) {
|
|
2240
2194
|
$.push($$props, true);
|
|
2241
2195
|
|
|
2242
|
-
const rowIds =
|
|
2196
|
+
const rowIds = createResultRowIds(
|
|
2243
2197
|
() => $$props.queryId,
|
|
2244
2198
|
() => $$props.queries,
|
|
2245
2199
|
);
|
|
@@ -2296,7 +2250,7 @@ function ResultTableView($$anchor, $$props) {
|
|
|
2296
2250
|
function SortedTableView($$anchor, $$props) {
|
|
2297
2251
|
$.push($$props, true);
|
|
2298
2252
|
|
|
2299
|
-
const rowIds =
|
|
2253
|
+
const rowIds = createSortedRowIds(
|
|
2300
2254
|
() => $$props.tableId,
|
|
2301
2255
|
() => $$props.cellId,
|
|
2302
2256
|
() => $$props.descending ?? false,
|
|
@@ -2361,7 +2315,7 @@ function SortedTableView($$anchor, $$props) {
|
|
|
2361
2315
|
function TableView($$anchor, $$props) {
|
|
2362
2316
|
$.push($$props, true);
|
|
2363
2317
|
|
|
2364
|
-
const rowIds =
|
|
2318
|
+
const rowIds = createRowIds(
|
|
2365
2319
|
() => $$props.tableId,
|
|
2366
2320
|
() => $$props.store,
|
|
2367
2321
|
);
|
|
@@ -2422,7 +2376,7 @@ function TableView($$anchor, $$props) {
|
|
|
2422
2376
|
function TablesView($$anchor, $$props) {
|
|
2423
2377
|
$.push($$props, true);
|
|
2424
2378
|
|
|
2425
|
-
const tableIds =
|
|
2379
|
+
const tableIds = createTableIds(() => $$props.store);
|
|
2426
2380
|
|
|
2427
2381
|
{
|
|
2428
2382
|
const children = ($$anchor, tableId = $.noop) => {
|
|
@@ -2468,7 +2422,7 @@ function TablesView($$anchor, $$props) {
|
|
|
2468
2422
|
function ValueView($$anchor, $$props) {
|
|
2469
2423
|
$.push($$props, true);
|
|
2470
2424
|
|
|
2471
|
-
const value =
|
|
2425
|
+
const value = createValue(
|
|
2472
2426
|
() => $$props.valueId,
|
|
2473
2427
|
() => $$props.store,
|
|
2474
2428
|
);
|
|
@@ -2492,7 +2446,7 @@ function ValueView($$anchor, $$props) {
|
|
|
2492
2446
|
function ValuesView($$anchor, $$props) {
|
|
2493
2447
|
$.push($$props, true);
|
|
2494
2448
|
|
|
2495
|
-
const valueIds =
|
|
2449
|
+
const valueIds = createValueIds(() => $$props.store);
|
|
2496
2450
|
|
|
2497
2451
|
{
|
|
2498
2452
|
const children = ($$anchor, valueId = $.noop) => {
|
|
@@ -2539,12 +2493,117 @@ export {
|
|
|
2539
2493
|
BackwardCheckpointsView,
|
|
2540
2494
|
CellView,
|
|
2541
2495
|
CheckpointView,
|
|
2496
|
+
createCell,
|
|
2497
|
+
createCellIds,
|
|
2498
|
+
createCheckpoint,
|
|
2499
|
+
createCheckpointIds,
|
|
2500
|
+
createCheckpointsIds,
|
|
2501
|
+
createGoBackwardCallback,
|
|
2502
|
+
createGoForwardCallback,
|
|
2503
|
+
createHasCell,
|
|
2504
|
+
createHasRow,
|
|
2505
|
+
createHasTable,
|
|
2506
|
+
createHasTableCell,
|
|
2507
|
+
createHasTables,
|
|
2508
|
+
createHasValue,
|
|
2509
|
+
createHasValues,
|
|
2510
|
+
createIndexesIds,
|
|
2511
|
+
createIndexIds,
|
|
2512
|
+
createLinkedRowIds,
|
|
2513
|
+
createLocalRowIds,
|
|
2514
|
+
createMetric,
|
|
2515
|
+
createMetricIds,
|
|
2516
|
+
createMetricsIds,
|
|
2517
|
+
createPersisterIds,
|
|
2518
|
+
createPersisterStatus,
|
|
2519
|
+
createQueriesIds,
|
|
2520
|
+
createQueryIds,
|
|
2521
|
+
createRelationshipIds,
|
|
2522
|
+
createRelationshipsIds,
|
|
2523
|
+
createRemoteRowId,
|
|
2524
|
+
createResultCell,
|
|
2525
|
+
createResultCellIds,
|
|
2526
|
+
createResultRow,
|
|
2527
|
+
createResultRowCount,
|
|
2528
|
+
createResultRowIds,
|
|
2529
|
+
createResultSortedRowIds,
|
|
2530
|
+
createResultTable,
|
|
2531
|
+
createResultTableCellIds,
|
|
2532
|
+
createRow,
|
|
2533
|
+
createRowCount,
|
|
2534
|
+
createRowIds,
|
|
2535
|
+
createSliceIds,
|
|
2536
|
+
createSliceRowIds,
|
|
2537
|
+
createSortedRowIds,
|
|
2538
|
+
createStoreIds,
|
|
2539
|
+
createSynchronizerIds,
|
|
2540
|
+
createSynchronizerStatus,
|
|
2541
|
+
createTable,
|
|
2542
|
+
createTableCellIds,
|
|
2543
|
+
createTableIds,
|
|
2544
|
+
createTables,
|
|
2545
|
+
createValue,
|
|
2546
|
+
createValueIds,
|
|
2547
|
+
createValues,
|
|
2542
2548
|
CurrentCheckpointView,
|
|
2543
2549
|
ForwardCheckpointsView,
|
|
2550
|
+
getCheckpoints,
|
|
2551
|
+
getIndexes,
|
|
2552
|
+
getIndexStoreTableId,
|
|
2553
|
+
getMetrics,
|
|
2554
|
+
getPersister,
|
|
2555
|
+
getQueries,
|
|
2556
|
+
getRelationships,
|
|
2557
|
+
getRelationshipsStoreTableIds,
|
|
2558
|
+
getStore,
|
|
2559
|
+
getSynchronizer,
|
|
2544
2560
|
IndexView,
|
|
2545
2561
|
LinkedRowsView,
|
|
2546
2562
|
LocalRowsView,
|
|
2547
2563
|
MetricView,
|
|
2564
|
+
onCell,
|
|
2565
|
+
onCellIds,
|
|
2566
|
+
onCheckpoint,
|
|
2567
|
+
onCheckpointIds,
|
|
2568
|
+
onDidFinishTransaction,
|
|
2569
|
+
onHasCell,
|
|
2570
|
+
onHasRow,
|
|
2571
|
+
onHasTable,
|
|
2572
|
+
onHasTableCell,
|
|
2573
|
+
onHasTables,
|
|
2574
|
+
onHasValue,
|
|
2575
|
+
onHasValues,
|
|
2576
|
+
onLinkedRowIds,
|
|
2577
|
+
onLocalRowIds,
|
|
2578
|
+
onMetric,
|
|
2579
|
+
onParamValue,
|
|
2580
|
+
onParamValues,
|
|
2581
|
+
onPersisterStatus,
|
|
2582
|
+
onRemoteRowId,
|
|
2583
|
+
onResultCell,
|
|
2584
|
+
onResultCellIds,
|
|
2585
|
+
onResultRow,
|
|
2586
|
+
onResultRowCount,
|
|
2587
|
+
onResultRowIds,
|
|
2588
|
+
onResultSortedRowIds,
|
|
2589
|
+
onResultTable,
|
|
2590
|
+
onResultTableCellIds,
|
|
2591
|
+
onRow,
|
|
2592
|
+
onRowCount,
|
|
2593
|
+
onRowIds,
|
|
2594
|
+
onSliceIds,
|
|
2595
|
+
onSliceRowIds,
|
|
2596
|
+
onSortedRowIds,
|
|
2597
|
+
onStartTransaction,
|
|
2598
|
+
onSynchronizerStatus,
|
|
2599
|
+
onTable,
|
|
2600
|
+
onTableCellIds,
|
|
2601
|
+
onTableIds,
|
|
2602
|
+
onTables,
|
|
2603
|
+
onValue,
|
|
2604
|
+
onValueIds,
|
|
2605
|
+
onValues,
|
|
2606
|
+
onWillFinishTransaction,
|
|
2548
2607
|
provideCheckpoints,
|
|
2549
2608
|
provideIndexes,
|
|
2550
2609
|
provideMetrics,
|
|
@@ -2555,6 +2614,14 @@ export {
|
|
|
2555
2614
|
provideStore,
|
|
2556
2615
|
provideSynchronizer,
|
|
2557
2616
|
RemoteRowView,
|
|
2617
|
+
resolveCheckpoints,
|
|
2618
|
+
resolveIndexes,
|
|
2619
|
+
resolveMetrics,
|
|
2620
|
+
resolvePersister,
|
|
2621
|
+
resolveQueries,
|
|
2622
|
+
resolveRelationships,
|
|
2623
|
+
resolveStore,
|
|
2624
|
+
resolveSynchronizer,
|
|
2558
2625
|
ResultCellView,
|
|
2559
2626
|
ResultRowView,
|
|
2560
2627
|
ResultSortedTableView,
|
|
@@ -2564,121 +2631,6 @@ export {
|
|
|
2564
2631
|
SortedTableView,
|
|
2565
2632
|
TablesView,
|
|
2566
2633
|
TableView,
|
|
2567
|
-
useBindableCell,
|
|
2568
|
-
useBindableValue,
|
|
2569
|
-
useCell,
|
|
2570
|
-
useCellIds,
|
|
2571
|
-
useCellIdsListener,
|
|
2572
|
-
useCellListener,
|
|
2573
|
-
useCheckpoint,
|
|
2574
|
-
useCheckpointIds,
|
|
2575
|
-
useCheckpointIdsListener,
|
|
2576
|
-
useCheckpointListener,
|
|
2577
|
-
useCheckpoints,
|
|
2578
|
-
useCheckpointsIds,
|
|
2579
|
-
useCheckpointsOrCheckpointsById,
|
|
2580
|
-
useDidFinishTransactionListener,
|
|
2581
|
-
useGoBackwardCallback,
|
|
2582
|
-
useGoForwardCallback,
|
|
2583
|
-
useHasCell,
|
|
2584
|
-
useHasCellListener,
|
|
2585
|
-
useHasRow,
|
|
2586
|
-
useHasRowListener,
|
|
2587
|
-
useHasTable,
|
|
2588
|
-
useHasTableCell,
|
|
2589
|
-
useHasTableCellListener,
|
|
2590
|
-
useHasTableListener,
|
|
2591
|
-
useHasTables,
|
|
2592
|
-
useHasTablesListener,
|
|
2593
|
-
useHasValue,
|
|
2594
|
-
useHasValueListener,
|
|
2595
|
-
useHasValues,
|
|
2596
|
-
useHasValuesListener,
|
|
2597
|
-
useIndexes,
|
|
2598
|
-
useIndexesIds,
|
|
2599
|
-
useIndexesOrIndexesById,
|
|
2600
|
-
useIndexIds,
|
|
2601
|
-
useIndexStoreTableId,
|
|
2602
|
-
useLinkedRowIds,
|
|
2603
|
-
useLinkedRowIdsListener,
|
|
2604
|
-
useLocalRowIds,
|
|
2605
|
-
useLocalRowIdsListener,
|
|
2606
|
-
useMetric,
|
|
2607
|
-
useMetricIds,
|
|
2608
|
-
useMetricListener,
|
|
2609
|
-
useMetrics,
|
|
2610
|
-
useMetricsIds,
|
|
2611
|
-
useMetricsOrMetricsById,
|
|
2612
|
-
useParamValueListener,
|
|
2613
|
-
useParamValuesListener,
|
|
2614
|
-
usePersister,
|
|
2615
|
-
usePersisterIds,
|
|
2616
|
-
usePersisterOrPersisterById,
|
|
2617
|
-
usePersisterStatus,
|
|
2618
|
-
usePersisterStatusListener,
|
|
2619
|
-
useQueries,
|
|
2620
|
-
useQueriesIds,
|
|
2621
|
-
useQueriesOrQueriesById,
|
|
2622
|
-
useQueryIds,
|
|
2623
|
-
useRelationshipIds,
|
|
2624
|
-
useRelationships,
|
|
2625
|
-
useRelationshipsIds,
|
|
2626
|
-
useRelationshipsOrRelationshipsById,
|
|
2627
|
-
useRelationshipsStoreTableIds,
|
|
2628
|
-
useRemoteRowId,
|
|
2629
|
-
useRemoteRowIdListener,
|
|
2630
|
-
useResultCell,
|
|
2631
|
-
useResultCellIds,
|
|
2632
|
-
useResultCellIdsListener,
|
|
2633
|
-
useResultCellListener,
|
|
2634
|
-
useResultRow,
|
|
2635
|
-
useResultRowCount,
|
|
2636
|
-
useResultRowCountListener,
|
|
2637
|
-
useResultRowIds,
|
|
2638
|
-
useResultRowIdsListener,
|
|
2639
|
-
useResultRowListener,
|
|
2640
|
-
useResultSortedRowIds,
|
|
2641
|
-
useResultSortedRowIdsListener,
|
|
2642
|
-
useResultTable,
|
|
2643
|
-
useResultTableCellIds,
|
|
2644
|
-
useResultTableCellIdsListener,
|
|
2645
|
-
useResultTableListener,
|
|
2646
|
-
useRow,
|
|
2647
|
-
useRowCount,
|
|
2648
|
-
useRowCountListener,
|
|
2649
|
-
useRowIds,
|
|
2650
|
-
useRowIdsListener,
|
|
2651
|
-
useRowListener,
|
|
2652
|
-
useSliceIds,
|
|
2653
|
-
useSliceIdsListener,
|
|
2654
|
-
useSliceRowIds,
|
|
2655
|
-
useSliceRowIdsListener,
|
|
2656
|
-
useSortedRowIds,
|
|
2657
|
-
useSortedRowIdsListener,
|
|
2658
|
-
useStartTransactionListener,
|
|
2659
|
-
useStore,
|
|
2660
|
-
useStoreIds,
|
|
2661
|
-
useStoreOrStoreById,
|
|
2662
|
-
useSynchronizer,
|
|
2663
|
-
useSynchronizerIds,
|
|
2664
|
-
useSynchronizerOrSynchronizerById,
|
|
2665
|
-
useSynchronizerStatus,
|
|
2666
|
-
useSynchronizerStatusListener,
|
|
2667
|
-
useTable,
|
|
2668
|
-
useTableCellIds,
|
|
2669
|
-
useTableCellIdsListener,
|
|
2670
|
-
useTableIds,
|
|
2671
|
-
useTableIdsListener,
|
|
2672
|
-
useTableListener,
|
|
2673
|
-
useTables,
|
|
2674
|
-
useTablesListener,
|
|
2675
|
-
useValue,
|
|
2676
|
-
useValueIds,
|
|
2677
|
-
useValueIdsListener,
|
|
2678
|
-
useValueListener,
|
|
2679
|
-
useValues,
|
|
2680
|
-
useValuesListener,
|
|
2681
|
-
useWillFinishTransactionListener,
|
|
2682
2634
|
ValuesView,
|
|
2683
2635
|
ValueView,
|
|
2684
2636
|
};
|