tinybase 8.2.0-beta.0 → 8.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/persisters/index.d.ts +1 -1
- package/@types/persisters/persister-durable-object-sql-storage/index.d.ts +6 -6
- package/@types/persisters/persister-durable-object-sql-storage/with-schemas/index.d.ts +6 -6
- package/@types/persisters/persister-durable-object-storage/index.d.ts +2 -2
- package/@types/persisters/persister-durable-object-storage/with-schemas/index.d.ts +2 -2
- package/@types/persisters/persister-electric-sql/index.d.ts +3 -3
- package/@types/persisters/persister-electric-sql/with-schemas/index.d.ts +3 -3
- package/@types/persisters/persister-expo-sqlite/index.d.ts +3 -3
- package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.ts +3 -3
- package/@types/persisters/persister-file/index.d.ts +1 -1
- package/@types/persisters/persister-file/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-libsql/index.d.ts +3 -3
- package/@types/persisters/persister-libsql/with-schemas/index.d.ts +3 -3
- package/@types/persisters/persister-partykit-client/index.d.ts +2 -2
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.ts +2 -2
- package/@types/persisters/persister-powersync/index.d.ts +3 -3
- package/@types/persisters/persister-powersync/with-schemas/index.d.ts +3 -3
- package/@types/persisters/persister-react-native-mmkv/index.d.ts +2 -2
- package/@types/persisters/persister-react-native-mmkv/with-schemas/index.d.ts +2 -2
- package/@types/persisters/persister-react-native-sqlite/index.d.ts +3 -3
- package/@types/persisters/persister-react-native-sqlite/with-schemas/index.d.ts +3 -3
- package/@types/persisters/persister-remote/index.d.ts +1 -1
- package/@types/persisters/persister-remote/with-schemas/index.d.ts +1 -1
- package/@types/persisters/with-schemas/index.d.ts +1 -1
- package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.ts +7 -7
- package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.ts +7 -7
- package/@types/ui-react/index.d.ts +3 -3
- package/@types/ui-react/with-schemas/index.d.ts +3 -3
- package/@types/ui-react-dom/index.d.ts +18 -13
- package/@types/ui-react-dom/with-schemas/index.d.ts +18 -13
- package/@types/ui-react-inspector/index.d.ts +4 -4
- package/@types/ui-react-inspector/with-schemas/index.d.ts +4 -4
- package/@types/ui-svelte-dom/index.d.ts +2105 -0
- package/@types/ui-svelte-dom/with-schemas/index.d.ts +2152 -0
- package/@types/ui-svelte-inspector/index.d.ts +70 -0
- package/@types/ui-svelte-inspector/with-schemas/index.d.ts +70 -0
- package/agents.md +16 -9
- 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-svelte-dom/index.js +1 -0
- package/min/ui-svelte-dom/index.js.gz +0 -0
- package/min/ui-svelte-dom/with-schemas/index.js +1 -0
- package/min/ui-svelte-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-svelte-inspector/index.js +1 -0
- package/min/ui-svelte-inspector/index.js.gz +0 -0
- package/min/ui-svelte-inspector/with-schemas/index.js +1 -0
- package/min/ui-svelte-inspector/with-schemas/index.js.gz +0 -0
- package/package.json +75 -3
- package/readme.md +14 -14
- package/releases.md +48 -48
- package/ui-react-inspector/index.js +4676 -4657
- package/ui-react-inspector/with-schemas/index.js +4676 -4657
- package/ui-svelte-dom/index.js +2443 -0
- package/ui-svelte-dom/with-schemas/index.js +2443 -0
- package/ui-svelte-inspector/index.js +7682 -0
- package/ui-svelte-inspector/with-schemas/index.js +7682 -0
|
@@ -0,0 +1,2443 @@
|
|
|
1
|
+
import {getContext} from 'svelte';
|
|
2
|
+
import * as $ from 'svelte/internal/client';
|
|
3
|
+
import 'svelte/internal/disclose-version';
|
|
4
|
+
import {createSubscriber} from 'svelte/reactivity';
|
|
5
|
+
|
|
6
|
+
const getTypeOf = (thing) => typeof thing;
|
|
7
|
+
const TINYBASE = 'tinybase';
|
|
8
|
+
const EMPTY_STRING = '';
|
|
9
|
+
const DOT = '.';
|
|
10
|
+
const STRING = getTypeOf(EMPTY_STRING);
|
|
11
|
+
const BOOLEAN = getTypeOf(true);
|
|
12
|
+
const NUMBER = getTypeOf(0);
|
|
13
|
+
const FUNCTION = getTypeOf(getTypeOf);
|
|
14
|
+
const OBJECT = 'object';
|
|
15
|
+
const ARRAY = 'array';
|
|
16
|
+
const NULL = 'null';
|
|
17
|
+
const LISTENER = 'Listener';
|
|
18
|
+
const RESULT = 'Result';
|
|
19
|
+
const GET = 'get';
|
|
20
|
+
const ADD = 'add';
|
|
21
|
+
const IDS = 'Ids';
|
|
22
|
+
const TABLE = 'Table';
|
|
23
|
+
const ROW = 'Row';
|
|
24
|
+
const ROW_COUNT = ROW + 'Count';
|
|
25
|
+
const ROW_IDS = ROW + IDS;
|
|
26
|
+
const SORTED_ROW_IDS = 'Sorted' + ROW + IDS;
|
|
27
|
+
const CELL = 'Cell';
|
|
28
|
+
const CELL_IDS = CELL + IDS;
|
|
29
|
+
const VALUE = 'Value';
|
|
30
|
+
const VALUE_IDS = VALUE + IDS;
|
|
31
|
+
const SLICE = 'Slice';
|
|
32
|
+
const REMOTE_ROW_ID = 'Remote' + ROW + 'Id';
|
|
33
|
+
const EXTRA = 'extra';
|
|
34
|
+
|
|
35
|
+
const getIfNotFunction = (predicate) => (value, then, otherwise) =>
|
|
36
|
+
predicate(value)
|
|
37
|
+
? /* istanbul ignore next */
|
|
38
|
+
otherwise?.()
|
|
39
|
+
: then(value);
|
|
40
|
+
const GLOBAL = globalThis;
|
|
41
|
+
const math = Math;
|
|
42
|
+
const mathMin = math.min;
|
|
43
|
+
const isFiniteNumber = isFinite;
|
|
44
|
+
const isNullish = (thing) => thing == null;
|
|
45
|
+
const isUndefined = (thing) => thing === void 0;
|
|
46
|
+
const hasWindow = () => !isUndefined(GLOBAL.window);
|
|
47
|
+
const isNull = (thing) => thing === null;
|
|
48
|
+
const isTrue = (thing) => thing === true;
|
|
49
|
+
const isFalse = (thing) => thing === false;
|
|
50
|
+
const ifNotNullish = getIfNotFunction(isNullish);
|
|
51
|
+
const ifNotUndefined = getIfNotFunction(isUndefined);
|
|
52
|
+
const isTypeStringOrBoolean = (type) => type == STRING || type == BOOLEAN;
|
|
53
|
+
const isString = (thing) => getTypeOf(thing) == STRING;
|
|
54
|
+
const isFunction = (thing) => getTypeOf(thing) == FUNCTION;
|
|
55
|
+
const isArray = (thing) => Array.isArray(thing);
|
|
56
|
+
const noop = () => {};
|
|
57
|
+
const tryReturn = (tryF, catchReturn) => {
|
|
58
|
+
try {
|
|
59
|
+
return tryF();
|
|
60
|
+
} catch {
|
|
61
|
+
/* istanbul ignore next */
|
|
62
|
+
return catchReturn;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const arrayMap = (array, cb) => array.map(cb);
|
|
67
|
+
|
|
68
|
+
const object = Object;
|
|
69
|
+
const getPrototypeOf = (obj) => object.getPrototypeOf(obj);
|
|
70
|
+
const objEntries = object.entries;
|
|
71
|
+
const isObject = (obj) =>
|
|
72
|
+
!isNullish(obj) &&
|
|
73
|
+
ifNotNullish(
|
|
74
|
+
getPrototypeOf(obj),
|
|
75
|
+
(objPrototype) =>
|
|
76
|
+
objPrototype == object.prototype ||
|
|
77
|
+
isNullish(getPrototypeOf(objPrototype)),
|
|
78
|
+
|
|
79
|
+
/* istanbul ignore next */
|
|
80
|
+
() => true,
|
|
81
|
+
);
|
|
82
|
+
const objNew = (entries = []) => object.fromEntries(entries);
|
|
83
|
+
const objGet = (obj, id) => ifNotUndefined(obj, (obj2) => obj2[id]);
|
|
84
|
+
const objToArray = (obj, cb) =>
|
|
85
|
+
arrayMap(objEntries(obj), ([id, value]) => cb(value, id));
|
|
86
|
+
const objMap = (obj, cb) =>
|
|
87
|
+
objNew(objToArray(obj, (value, id) => [id, cb(value, id)]));
|
|
88
|
+
|
|
89
|
+
const TINYBASE_CONTEXT_KEY = TINYBASE + '_uisc';
|
|
90
|
+
|
|
91
|
+
/* functions.svelte.ts generated by Svelte v5.55.1 */
|
|
92
|
+
|
|
93
|
+
class ReactiveHandle {
|
|
94
|
+
#get;
|
|
95
|
+
#sub;
|
|
96
|
+
|
|
97
|
+
constructor(getCurrent, subscribe) {
|
|
98
|
+
this.#get = getCurrent;
|
|
99
|
+
this.#sub = subscribe;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
get current() {
|
|
103
|
+
this.#sub();
|
|
104
|
+
|
|
105
|
+
return this.#get();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
class WritableHandle extends ReactiveHandle {
|
|
110
|
+
#set;
|
|
111
|
+
|
|
112
|
+
constructor(getCurrent, setCurrent, subscribe) {
|
|
113
|
+
super(getCurrent, subscribe);
|
|
114
|
+
this.#set = setCurrent;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
get current() {
|
|
118
|
+
return super.current;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
set current(value) {
|
|
122
|
+
this.#set(value);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const EMPTY_ARR = [];
|
|
127
|
+
const OFFSET_STORE = 0;
|
|
128
|
+
const OFFSET_INDEXES = 2;
|
|
129
|
+
const OFFSET_RELATIONSHIPS = 3;
|
|
130
|
+
const OFFSET_QUERIES = 4;
|
|
131
|
+
const maybeGet = (thing) => (isFunction(thing) ? thing() : thing);
|
|
132
|
+
const getContextValue = () => getContext(TINYBASE_CONTEXT_KEY) ?? [];
|
|
133
|
+
|
|
134
|
+
const getThing = (contextValue, thingOrThingId, offset) =>
|
|
135
|
+
isUndefined(thingOrThingId)
|
|
136
|
+
? contextValue[offset * 2]
|
|
137
|
+
: isString(thingOrThingId)
|
|
138
|
+
? objGet(contextValue[offset * 2 + 1], thingOrThingId)
|
|
139
|
+
: thingOrThingId;
|
|
140
|
+
|
|
141
|
+
const resolveProvidedThing = (thingOrThingId, offset) => {
|
|
142
|
+
const contextValue = getContextValue();
|
|
143
|
+
|
|
144
|
+
return () => getThing(contextValue, maybeGet(thingOrThingId), offset);
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const resolveStore = (storeOrStoreId) =>
|
|
148
|
+
resolveProvidedThing(storeOrStoreId, OFFSET_STORE);
|
|
149
|
+
const resolveIndexes = (indexesOrIndexesId) =>
|
|
150
|
+
resolveProvidedThing(indexesOrIndexesId, OFFSET_INDEXES);
|
|
151
|
+
const resolveRelationships = (relationshipsOrRelationshipsId) =>
|
|
152
|
+
resolveProvidedThing(relationshipsOrRelationshipsId, OFFSET_RELATIONSHIPS);
|
|
153
|
+
const resolveQueries = (queriesOrQueriesId) =>
|
|
154
|
+
resolveProvidedThing(queriesOrQueriesId, OFFSET_QUERIES);
|
|
155
|
+
|
|
156
|
+
const createListenable = (
|
|
157
|
+
getThing2,
|
|
158
|
+
listenable,
|
|
159
|
+
defaultValue,
|
|
160
|
+
getArgs = () => EMPTY_ARR,
|
|
161
|
+
isHas,
|
|
162
|
+
) => {
|
|
163
|
+
const getListenableMethod = GET + listenable;
|
|
164
|
+
const addListenableMethod = ADD + '' + listenable + LISTENER;
|
|
165
|
+
let subscribe = $.state($.proxy(noop));
|
|
166
|
+
|
|
167
|
+
if (hasWindow()) {
|
|
168
|
+
$.user_effect(() => {
|
|
169
|
+
const thing = getThing2();
|
|
170
|
+
const args = getArgs();
|
|
171
|
+
|
|
172
|
+
$.set(
|
|
173
|
+
subscribe,
|
|
174
|
+
createSubscriber((update) => {
|
|
175
|
+
const listenerId = thing?.[addListenableMethod]?.(...args, update);
|
|
176
|
+
|
|
177
|
+
return () => thing?.delListener?.(listenerId);
|
|
178
|
+
}),
|
|
179
|
+
true,
|
|
180
|
+
);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return new ReactiveHandle(
|
|
185
|
+
() => getThing2()?.[getListenableMethod]?.(...getArgs()) ?? defaultValue,
|
|
186
|
+
() => $.get(subscribe)(),
|
|
187
|
+
);
|
|
188
|
+
};
|
|
189
|
+
const getTableCellIds = (tableId, storeOrStoreId) =>
|
|
190
|
+
createListenable(
|
|
191
|
+
resolveStore(storeOrStoreId),
|
|
192
|
+
TABLE + CELL_IDS,
|
|
193
|
+
EMPTY_ARR,
|
|
194
|
+
() => [maybeGet(tableId)],
|
|
195
|
+
);
|
|
196
|
+
const getRowCount = (tableId, storeOrStoreId) =>
|
|
197
|
+
createListenable(resolveStore(storeOrStoreId), ROW_COUNT, 0, () => [
|
|
198
|
+
maybeGet(tableId),
|
|
199
|
+
]);
|
|
200
|
+
const getRowIds = (tableId, storeOrStoreId) =>
|
|
201
|
+
createListenable(resolveStore(storeOrStoreId), ROW_IDS, EMPTY_ARR, () => [
|
|
202
|
+
maybeGet(tableId),
|
|
203
|
+
]);
|
|
204
|
+
|
|
205
|
+
const getSortedRowIds = (
|
|
206
|
+
tableId,
|
|
207
|
+
cellId,
|
|
208
|
+
descending = false,
|
|
209
|
+
offset = 0,
|
|
210
|
+
limit,
|
|
211
|
+
storeOrStoreId,
|
|
212
|
+
) =>
|
|
213
|
+
createListenable(
|
|
214
|
+
resolveStore(storeOrStoreId),
|
|
215
|
+
SORTED_ROW_IDS,
|
|
216
|
+
EMPTY_ARR,
|
|
217
|
+
() => [
|
|
218
|
+
maybeGet(tableId),
|
|
219
|
+
maybeGet(cellId),
|
|
220
|
+
maybeGet(descending),
|
|
221
|
+
maybeGet(offset),
|
|
222
|
+
maybeGet(limit),
|
|
223
|
+
],
|
|
224
|
+
);
|
|
225
|
+
|
|
226
|
+
const getCell = (tableId, rowId, cellId, storeOrStoreId) => {
|
|
227
|
+
const getStore2 = resolveStore(storeOrStoreId);
|
|
228
|
+
let subscribe = $.state($.proxy(noop));
|
|
229
|
+
|
|
230
|
+
if (hasWindow()) {
|
|
231
|
+
$.user_effect(() => {
|
|
232
|
+
const store = getStore2();
|
|
233
|
+
const tableIdValue = maybeGet(tableId);
|
|
234
|
+
const rowIdValue = maybeGet(rowId);
|
|
235
|
+
const cellIdValue = maybeGet(cellId);
|
|
236
|
+
|
|
237
|
+
$.set(
|
|
238
|
+
subscribe,
|
|
239
|
+
createSubscriber((update) => {
|
|
240
|
+
const listenerId = store?.addCellListener(
|
|
241
|
+
tableIdValue,
|
|
242
|
+
rowIdValue,
|
|
243
|
+
cellIdValue,
|
|
244
|
+
update,
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
return () => store?.delListener?.(listenerId);
|
|
248
|
+
}),
|
|
249
|
+
true,
|
|
250
|
+
);
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return new WritableHandle(
|
|
255
|
+
() =>
|
|
256
|
+
getStore2()?.getCell(
|
|
257
|
+
maybeGet(tableId),
|
|
258
|
+
maybeGet(rowId),
|
|
259
|
+
maybeGet(cellId),
|
|
260
|
+
),
|
|
261
|
+
(nextCell) =>
|
|
262
|
+
getStore2()?.setCell(
|
|
263
|
+
maybeGet(tableId),
|
|
264
|
+
maybeGet(rowId),
|
|
265
|
+
maybeGet(cellId),
|
|
266
|
+
nextCell,
|
|
267
|
+
),
|
|
268
|
+
() => $.get(subscribe)(),
|
|
269
|
+
);
|
|
270
|
+
};
|
|
271
|
+
const getValueIds = (storeOrStoreId) =>
|
|
272
|
+
createListenable(resolveStore(storeOrStoreId), VALUE_IDS, EMPTY_ARR);
|
|
273
|
+
|
|
274
|
+
const getValue = (valueId, storeOrStoreId) => {
|
|
275
|
+
const getStore2 = resolveStore(storeOrStoreId);
|
|
276
|
+
let subscribe = $.state($.proxy(noop));
|
|
277
|
+
|
|
278
|
+
if (hasWindow()) {
|
|
279
|
+
$.user_effect(() => {
|
|
280
|
+
const store = getStore2();
|
|
281
|
+
const valueIdValue = maybeGet(valueId);
|
|
282
|
+
|
|
283
|
+
$.set(
|
|
284
|
+
subscribe,
|
|
285
|
+
createSubscriber((update) => {
|
|
286
|
+
const listenerId = store?.addValueListener(valueIdValue, update);
|
|
287
|
+
|
|
288
|
+
return () => store?.delListener?.(listenerId);
|
|
289
|
+
}),
|
|
290
|
+
true,
|
|
291
|
+
);
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
return new WritableHandle(
|
|
296
|
+
() => getStore2()?.getValue(maybeGet(valueId)),
|
|
297
|
+
(nextValue) => getStore2()?.setValue(maybeGet(valueId), nextValue),
|
|
298
|
+
() => $.get(subscribe)(),
|
|
299
|
+
);
|
|
300
|
+
};
|
|
301
|
+
const getSliceRowIds = (indexId, sliceId, indexesOrIndexesId) =>
|
|
302
|
+
createListenable(
|
|
303
|
+
resolveIndexes(indexesOrIndexesId),
|
|
304
|
+
SLICE + ROW_IDS,
|
|
305
|
+
EMPTY_ARR,
|
|
306
|
+
() => [maybeGet(indexId), maybeGet(sliceId)],
|
|
307
|
+
);
|
|
308
|
+
|
|
309
|
+
const getIndexStoreTableId = (indexesOrId, indexId) => {
|
|
310
|
+
const getIndexes2 = resolveIndexes(indexesOrId);
|
|
311
|
+
|
|
312
|
+
return {
|
|
313
|
+
get store() {
|
|
314
|
+
return getIndexes2()?.getStore();
|
|
315
|
+
},
|
|
316
|
+
|
|
317
|
+
get tableId() {
|
|
318
|
+
return getIndexes2()?.getTableId(maybeGet(indexId));
|
|
319
|
+
},
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
const getResultTableCellIds = (queryId, queriesOrQueriesId) =>
|
|
323
|
+
createListenable(
|
|
324
|
+
resolveQueries(queriesOrQueriesId),
|
|
325
|
+
RESULT + TABLE + CELL_IDS,
|
|
326
|
+
EMPTY_ARR,
|
|
327
|
+
() => [maybeGet(queryId)],
|
|
328
|
+
);
|
|
329
|
+
const getResultRowCount = (queryId, queriesOrQueriesId) =>
|
|
330
|
+
createListenable(
|
|
331
|
+
resolveQueries(queriesOrQueriesId),
|
|
332
|
+
RESULT + ROW_COUNT,
|
|
333
|
+
0,
|
|
334
|
+
() => [maybeGet(queryId)],
|
|
335
|
+
);
|
|
336
|
+
const getResultRowIds = (queryId, queriesOrQueriesId) =>
|
|
337
|
+
createListenable(
|
|
338
|
+
resolveQueries(queriesOrQueriesId),
|
|
339
|
+
RESULT + ROW_IDS,
|
|
340
|
+
EMPTY_ARR,
|
|
341
|
+
() => [maybeGet(queryId)],
|
|
342
|
+
);
|
|
343
|
+
|
|
344
|
+
const getResultSortedRowIds = (
|
|
345
|
+
queryId,
|
|
346
|
+
cellId,
|
|
347
|
+
descending = false,
|
|
348
|
+
offset = 0,
|
|
349
|
+
limit,
|
|
350
|
+
queriesOrQueriesId,
|
|
351
|
+
) =>
|
|
352
|
+
createListenable(
|
|
353
|
+
resolveQueries(queriesOrQueriesId),
|
|
354
|
+
RESULT + SORTED_ROW_IDS,
|
|
355
|
+
EMPTY_ARR,
|
|
356
|
+
() => [
|
|
357
|
+
maybeGet(queryId),
|
|
358
|
+
maybeGet(cellId),
|
|
359
|
+
maybeGet(descending),
|
|
360
|
+
maybeGet(offset),
|
|
361
|
+
maybeGet(limit),
|
|
362
|
+
],
|
|
363
|
+
);
|
|
364
|
+
const getResultCell = (queryId, rowId, cellId, queriesOrQueriesId) =>
|
|
365
|
+
createListenable(
|
|
366
|
+
resolveQueries(queriesOrQueriesId),
|
|
367
|
+
RESULT + CELL,
|
|
368
|
+
void 0,
|
|
369
|
+
() => [maybeGet(queryId), maybeGet(rowId), maybeGet(cellId)],
|
|
370
|
+
);
|
|
371
|
+
const getRemoteRowId = (
|
|
372
|
+
relationshipId,
|
|
373
|
+
localRowId,
|
|
374
|
+
relationshipsOrRelationshipsId,
|
|
375
|
+
) =>
|
|
376
|
+
createListenable(
|
|
377
|
+
resolveRelationships(relationshipsOrRelationshipsId),
|
|
378
|
+
REMOTE_ROW_ID,
|
|
379
|
+
void 0,
|
|
380
|
+
() => [maybeGet(relationshipId), maybeGet(localRowId)],
|
|
381
|
+
);
|
|
382
|
+
|
|
383
|
+
const getRelationshipsStoreTableIds = (relationshipsOrId, relationshipId) => {
|
|
384
|
+
const getRelationships2 = resolveRelationships(relationshipsOrId);
|
|
385
|
+
|
|
386
|
+
return {
|
|
387
|
+
get store() {
|
|
388
|
+
return getRelationships2()?.getStore();
|
|
389
|
+
},
|
|
390
|
+
|
|
391
|
+
get localTableId() {
|
|
392
|
+
return getRelationships2()?.getLocalTableId(maybeGet(relationshipId));
|
|
393
|
+
},
|
|
394
|
+
|
|
395
|
+
get remoteTableId() {
|
|
396
|
+
return getRelationships2()?.getRemoteTableId(maybeGet(relationshipId));
|
|
397
|
+
},
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
const jsonString = JSON.stringify;
|
|
402
|
+
const jsonParse = JSON.parse;
|
|
403
|
+
|
|
404
|
+
const getCellOrValueType = (cellOrValue) => {
|
|
405
|
+
if (isNull(cellOrValue)) {
|
|
406
|
+
return NULL;
|
|
407
|
+
}
|
|
408
|
+
if (isArray(cellOrValue)) {
|
|
409
|
+
return ARRAY;
|
|
410
|
+
}
|
|
411
|
+
if (isObject(cellOrValue)) {
|
|
412
|
+
return OBJECT;
|
|
413
|
+
}
|
|
414
|
+
const type = getTypeOf(cellOrValue);
|
|
415
|
+
return isTypeStringOrBoolean(type) ||
|
|
416
|
+
(type == NUMBER && isFiniteNumber(cellOrValue))
|
|
417
|
+
? type
|
|
418
|
+
: void 0;
|
|
419
|
+
};
|
|
420
|
+
const getTypeCase = (
|
|
421
|
+
type,
|
|
422
|
+
stringCase,
|
|
423
|
+
numberCase,
|
|
424
|
+
booleanCase,
|
|
425
|
+
objectCase,
|
|
426
|
+
arrayCase,
|
|
427
|
+
) =>
|
|
428
|
+
type == STRING
|
|
429
|
+
? stringCase
|
|
430
|
+
: type == NUMBER
|
|
431
|
+
? numberCase
|
|
432
|
+
: type == BOOLEAN
|
|
433
|
+
? booleanCase
|
|
434
|
+
: type == OBJECT
|
|
435
|
+
? objectCase
|
|
436
|
+
: type == ARRAY
|
|
437
|
+
? arrayCase
|
|
438
|
+
: null;
|
|
439
|
+
|
|
440
|
+
var root_1$5 = $.from_html(`<button> </button>`);
|
|
441
|
+
var root_2$4 = $.from_html(`<input/>`);
|
|
442
|
+
var root_3$3 = $.from_html(`<input type="number"/>`);
|
|
443
|
+
var root_4$4 = $.from_html(`<input type="checkbox"/>`);
|
|
444
|
+
var root_5$3 = $.from_html(`<input/>`);
|
|
445
|
+
var root_6$2 = $.from_html(`<input/>`);
|
|
446
|
+
var root$5 = $.from_html(`<div><!> <!></div>`);
|
|
447
|
+
|
|
448
|
+
function EditableThing($$anchor, $$props) {
|
|
449
|
+
$.push($$props, true);
|
|
450
|
+
|
|
451
|
+
let showType = $.prop($$props, 'showType', 3, true);
|
|
452
|
+
const EMPTY_STRING = '';
|
|
453
|
+
const INVALID = 'invalid';
|
|
454
|
+
let thingType = $.state(void 0);
|
|
455
|
+
let currentThingKey = $.state(void 0);
|
|
456
|
+
let stringThing = $.state(void 0);
|
|
457
|
+
let numberThing = $.state(void 0);
|
|
458
|
+
let booleanThing = $.state(void 0);
|
|
459
|
+
let objectThing = $.state('{}');
|
|
460
|
+
let arrayThing = $.state('[]');
|
|
461
|
+
let objectClassName = $.state(EMPTY_STRING);
|
|
462
|
+
let arrayClassName = $.state(EMPTY_STRING);
|
|
463
|
+
const getThingKey = (thing) =>
|
|
464
|
+
`${getCellOrValueType(thing)}:${isObject(thing) || isArray(thing) ? jsonString(thing) : String(thing)}`;
|
|
465
|
+
|
|
466
|
+
$.user_effect(() => {
|
|
467
|
+
const thingKey = getThingKey($$props.thing);
|
|
468
|
+
|
|
469
|
+
if ($.get(currentThingKey) !== thingKey) {
|
|
470
|
+
$.set(thingType, getCellOrValueType($$props.thing), true);
|
|
471
|
+
$.set(currentThingKey, thingKey, true);
|
|
472
|
+
|
|
473
|
+
if (isObject($$props.thing)) {
|
|
474
|
+
$.set(objectThing, jsonString($$props.thing), true);
|
|
475
|
+
} else if (isArray($$props.thing)) {
|
|
476
|
+
$.set(arrayThing, jsonString($$props.thing), true);
|
|
477
|
+
} else {
|
|
478
|
+
$.set(stringThing, String($$props.thing), true);
|
|
479
|
+
$.set(numberThing, Number($$props.thing) || 0, true);
|
|
480
|
+
$.set(booleanThing, Boolean($$props.thing), true);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
const handleThingChange = (nextThing, setTypedThing) => {
|
|
486
|
+
setTypedThing(nextThing);
|
|
487
|
+
$.set(currentThingKey, getThingKey(nextThing), true);
|
|
488
|
+
$$props.onThingChange(nextThing);
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
const handleJsonThingChange = (
|
|
492
|
+
value,
|
|
493
|
+
setTypedThing,
|
|
494
|
+
isThing,
|
|
495
|
+
setTypedClassName,
|
|
496
|
+
) => {
|
|
497
|
+
setTypedThing(value);
|
|
498
|
+
|
|
499
|
+
try {
|
|
500
|
+
const object = jsonParse(value);
|
|
501
|
+
|
|
502
|
+
if (isThing(object)) {
|
|
503
|
+
$.set(currentThingKey, getThingKey(object), true);
|
|
504
|
+
$$props.onThingChange(object);
|
|
505
|
+
setTypedClassName(EMPTY_STRING);
|
|
506
|
+
}
|
|
507
|
+
} catch {
|
|
508
|
+
setTypedClassName(INVALID);
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
const handleTypeChange = () => {
|
|
513
|
+
if (!$$props.hasSchema?.()) {
|
|
514
|
+
const nextType = getTypeCase(
|
|
515
|
+
$.get(thingType),
|
|
516
|
+
NUMBER,
|
|
517
|
+
BOOLEAN,
|
|
518
|
+
OBJECT,
|
|
519
|
+
ARRAY,
|
|
520
|
+
STRING,
|
|
521
|
+
);
|
|
522
|
+
const nextThing = getTypeCase(
|
|
523
|
+
nextType,
|
|
524
|
+
$.get(stringThing),
|
|
525
|
+
$.get(numberThing),
|
|
526
|
+
$.get(booleanThing),
|
|
527
|
+
tryReturn(() => jsonParse($.get(objectThing)), {}),
|
|
528
|
+
tryReturn(() => jsonParse($.get(arrayThing)), []),
|
|
529
|
+
);
|
|
530
|
+
|
|
531
|
+
$.set(thingType, nextType, true);
|
|
532
|
+
$.set(currentThingKey, getThingKey(nextThing), true);
|
|
533
|
+
$$props.onThingChange(nextThing);
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
const hasWidget = $.derived(
|
|
538
|
+
() => getTypeCase($.get(thingType), 1, 1, 1, 1, 1) == 1,
|
|
539
|
+
);
|
|
540
|
+
var div = root$5();
|
|
541
|
+
var node = $.child(div);
|
|
542
|
+
|
|
543
|
+
{
|
|
544
|
+
var consequent = ($$anchor) => {
|
|
545
|
+
var button = root_1$5();
|
|
546
|
+
var text = $.child(button, true);
|
|
547
|
+
|
|
548
|
+
$.reset(button);
|
|
549
|
+
|
|
550
|
+
$.template_effect(() => {
|
|
551
|
+
$.set_attribute(button, 'title', $.get(thingType));
|
|
552
|
+
$.set_class(button, 1, $.clsx($.get(thingType)));
|
|
553
|
+
$.set_text(text, $.get(thingType));
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
$.delegated('click', button, handleTypeChange);
|
|
557
|
+
$.append($$anchor, button);
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
$.if(node, ($$render) => {
|
|
561
|
+
if (showType() && $.get(hasWidget)) $$render(consequent);
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
var node_1 = $.sibling(node, 2);
|
|
566
|
+
|
|
567
|
+
{
|
|
568
|
+
var consequent_1 = ($$anchor) => {
|
|
569
|
+
var input = root_2$4();
|
|
570
|
+
|
|
571
|
+
$.remove_input_defaults(input);
|
|
572
|
+
$.template_effect(() => $.set_value(input, $.get(stringThing)));
|
|
573
|
+
$.delegated('input', input, (event) =>
|
|
574
|
+
handleThingChange(String(event.currentTarget.value), (value) =>
|
|
575
|
+
$.set(stringThing, value, true),
|
|
576
|
+
),
|
|
577
|
+
);
|
|
578
|
+
$.append($$anchor, input);
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
var consequent_2 = ($$anchor) => {
|
|
582
|
+
var input_1 = root_3$3();
|
|
583
|
+
|
|
584
|
+
$.remove_input_defaults(input_1);
|
|
585
|
+
$.template_effect(() => $.set_value(input_1, $.get(numberThing)));
|
|
586
|
+
$.delegated('input', input_1, (event) =>
|
|
587
|
+
handleThingChange(Number(event.currentTarget.value || 0), (value) =>
|
|
588
|
+
$.set(numberThing, value, true),
|
|
589
|
+
),
|
|
590
|
+
);
|
|
591
|
+
$.append($$anchor, input_1);
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
var consequent_3 = ($$anchor) => {
|
|
595
|
+
var input_2 = root_4$4();
|
|
596
|
+
|
|
597
|
+
$.remove_input_defaults(input_2);
|
|
598
|
+
$.template_effect(() => $.set_checked(input_2, $.get(booleanThing)));
|
|
599
|
+
$.delegated('change', input_2, (event) =>
|
|
600
|
+
handleThingChange(Boolean(event.currentTarget.checked), (value) =>
|
|
601
|
+
$.set(booleanThing, value, true),
|
|
602
|
+
),
|
|
603
|
+
);
|
|
604
|
+
$.append($$anchor, input_2);
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
var consequent_4 = ($$anchor) => {
|
|
608
|
+
var input_3 = root_5$3();
|
|
609
|
+
|
|
610
|
+
$.remove_input_defaults(input_3);
|
|
611
|
+
|
|
612
|
+
$.template_effect(() => {
|
|
613
|
+
$.set_value(input_3, $.get(objectThing));
|
|
614
|
+
$.set_class(input_3, 1, $.clsx($.get(objectClassName)));
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
$.delegated('input', input_3, (event) =>
|
|
618
|
+
handleJsonThingChange(
|
|
619
|
+
event.currentTarget.value,
|
|
620
|
+
(value) => $.set(objectThing, value, true),
|
|
621
|
+
isObject,
|
|
622
|
+
(value) => $.set(objectClassName, value, true),
|
|
623
|
+
),
|
|
624
|
+
);
|
|
625
|
+
$.append($$anchor, input_3);
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
var consequent_5 = ($$anchor) => {
|
|
629
|
+
var input_4 = root_6$2();
|
|
630
|
+
|
|
631
|
+
$.remove_input_defaults(input_4);
|
|
632
|
+
|
|
633
|
+
$.template_effect(() => {
|
|
634
|
+
$.set_value(input_4, $.get(arrayThing));
|
|
635
|
+
$.set_class(input_4, 1, $.clsx($.get(arrayClassName)));
|
|
636
|
+
});
|
|
637
|
+
|
|
638
|
+
$.delegated('input', input_4, (event) =>
|
|
639
|
+
handleJsonThingChange(
|
|
640
|
+
event.currentTarget.value,
|
|
641
|
+
(value) => $.set(arrayThing, value, true),
|
|
642
|
+
isArray,
|
|
643
|
+
(value) => $.set(arrayClassName, value, true),
|
|
644
|
+
),
|
|
645
|
+
);
|
|
646
|
+
$.append($$anchor, input_4);
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
$.if(node_1, ($$render) => {
|
|
650
|
+
if ($.get(thingType) == STRING) $$render(consequent_1);
|
|
651
|
+
else if ($.get(thingType) == NUMBER) $$render(consequent_2, 1);
|
|
652
|
+
else if ($.get(thingType) == BOOLEAN) $$render(consequent_3, 2);
|
|
653
|
+
else if ($.get(thingType) == OBJECT) $$render(consequent_4, 3);
|
|
654
|
+
else if ($.get(thingType) == ARRAY) $$render(consequent_5, 4);
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
$.reset(div);
|
|
659
|
+
$.template_effect(() => $.set_class(div, 1, $.clsx($$props.className)));
|
|
660
|
+
$.append($$anchor, div);
|
|
661
|
+
$.pop();
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
$.delegate(['click', 'input', 'change']);
|
|
665
|
+
|
|
666
|
+
const UP_ARROW = '\u2191';
|
|
667
|
+
const DOWN_ARROW = '\u2193';
|
|
668
|
+
const EDITABLE = 'editable';
|
|
669
|
+
const extraKey = (index, after) => (after ? '>' : '<') + index;
|
|
670
|
+
const getProps = (getComponentProps, ...ids) =>
|
|
671
|
+
getComponentProps == null ? {} : getComponentProps(...ids);
|
|
672
|
+
const getCells = (defaultCellIds, customCells, defaultCellComponent) => {
|
|
673
|
+
const cellIds = customCells ?? defaultCellIds;
|
|
674
|
+
const source = isArray(cellIds)
|
|
675
|
+
? objNew(arrayMap(cellIds, (cellId) => [cellId, cellId]))
|
|
676
|
+
: cellIds;
|
|
677
|
+
return objMap(source, (labelOrCustomCell, cellId) => ({
|
|
678
|
+
...{label: cellId, component: defaultCellComponent},
|
|
679
|
+
...(isString(labelOrCustomCell)
|
|
680
|
+
? {label: labelOrCustomCell}
|
|
681
|
+
: labelOrCustomCell),
|
|
682
|
+
}));
|
|
683
|
+
};
|
|
684
|
+
const getExtraHeaders = (extraCells = [], after = 0) =>
|
|
685
|
+
arrayMap(extraCells, ({label}, index) => ({
|
|
686
|
+
className: EXTRA,
|
|
687
|
+
key: extraKey(index, after),
|
|
688
|
+
label,
|
|
689
|
+
}));
|
|
690
|
+
|
|
691
|
+
function EditableCellView($$anchor, $$props) {
|
|
692
|
+
$.push($$props, true);
|
|
693
|
+
|
|
694
|
+
const cell = getCell(
|
|
695
|
+
() => $$props.tableId,
|
|
696
|
+
() => $$props.rowId,
|
|
697
|
+
() => $$props.cellId,
|
|
698
|
+
() => $$props.store,
|
|
699
|
+
);
|
|
700
|
+
const resolvedStore = resolveStore(() => $$props.store);
|
|
701
|
+
|
|
702
|
+
{
|
|
703
|
+
let $0 = $.derived(() => $$props.className ?? EDITABLE + CELL);
|
|
704
|
+
|
|
705
|
+
EditableThing($$anchor, {
|
|
706
|
+
get thing() {
|
|
707
|
+
return cell.current;
|
|
708
|
+
},
|
|
709
|
+
onThingChange: (thing) => (cell.current = thing),
|
|
710
|
+
get className() {
|
|
711
|
+
return $.get($0);
|
|
712
|
+
},
|
|
713
|
+
|
|
714
|
+
get showType() {
|
|
715
|
+
return $$props.showType;
|
|
716
|
+
},
|
|
717
|
+
hasSchema: () => resolvedStore()?.hasTablesSchema() ?? false,
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
$.pop();
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
function EditableValueView($$anchor, $$props) {
|
|
725
|
+
$.push($$props, true);
|
|
726
|
+
|
|
727
|
+
const value = getValue(
|
|
728
|
+
() => $$props.valueId,
|
|
729
|
+
() => $$props.store,
|
|
730
|
+
);
|
|
731
|
+
const resolvedStore = resolveStore(() => $$props.store);
|
|
732
|
+
|
|
733
|
+
{
|
|
734
|
+
let $0 = $.derived(() => $$props.className ?? EDITABLE + VALUE);
|
|
735
|
+
|
|
736
|
+
EditableThing($$anchor, {
|
|
737
|
+
get thing() {
|
|
738
|
+
return value.current;
|
|
739
|
+
},
|
|
740
|
+
onThingChange: (thing) => (value.current = thing),
|
|
741
|
+
get className() {
|
|
742
|
+
return $.get($0);
|
|
743
|
+
},
|
|
744
|
+
|
|
745
|
+
get showType() {
|
|
746
|
+
return $$props.showType;
|
|
747
|
+
},
|
|
748
|
+
hasSchema: () => resolvedStore()?.hasValuesSchema() ?? false,
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
$.pop();
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
function CellView($$anchor, $$props) {
|
|
756
|
+
$.push($$props, true);
|
|
757
|
+
|
|
758
|
+
const cell = getCell(
|
|
759
|
+
() => $$props.tableId,
|
|
760
|
+
() => $$props.rowId,
|
|
761
|
+
() => $$props.cellId,
|
|
762
|
+
() => $$props.store,
|
|
763
|
+
);
|
|
764
|
+
const display = $.derived(() => '' + (cell.current ?? ''));
|
|
765
|
+
|
|
766
|
+
const output = $.derived(() =>
|
|
767
|
+
$$props.debugIds ? `${$$props.cellId}:{${$.get(display)}}` : $.get(display),
|
|
768
|
+
);
|
|
769
|
+
|
|
770
|
+
$.next();
|
|
771
|
+
|
|
772
|
+
var text = $.text();
|
|
773
|
+
|
|
774
|
+
$.template_effect(() => $.set_text(text, $.get(output)));
|
|
775
|
+
$.append($$anchor, text);
|
|
776
|
+
$.pop();
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
var root_1$4 = $.from_html(`<td><!></td>`);
|
|
780
|
+
var root_2$3 = $.from_html(`<th> </th> <th> </th>`, 1);
|
|
781
|
+
var root_4$3 = $.from_html(`<td><!></td>`);
|
|
782
|
+
var root_5$2 = $.from_html(`<td><!></td>`);
|
|
783
|
+
var root$4 = $.from_html(`<tr><!><!><!><!></tr>`);
|
|
784
|
+
|
|
785
|
+
function RelationshipInHtmlRow($$anchor, $$props) {
|
|
786
|
+
$.push($$props, true);
|
|
787
|
+
|
|
788
|
+
let extraCellsBefore = $.prop($$props, 'extraCellsBefore', 19, () => []),
|
|
789
|
+
extraCellsAfter = $.prop($$props, 'extraCellsAfter', 19, () => []);
|
|
790
|
+
|
|
791
|
+
const remoteRowId = getRemoteRowId(
|
|
792
|
+
() => $$props.relationshipId,
|
|
793
|
+
() => $$props.localRowId,
|
|
794
|
+
() => $$props.relationships,
|
|
795
|
+
);
|
|
796
|
+
const cellEntries = $.derived(() => objEntries($$props.cells));
|
|
797
|
+
|
|
798
|
+
const rowProps = $.derived(() => ({
|
|
799
|
+
tableId: $$props.localTableId ?? '',
|
|
800
|
+
rowId: $$props.localRowId,
|
|
801
|
+
store: $$props.store,
|
|
802
|
+
}));
|
|
803
|
+
|
|
804
|
+
var tr = root$4();
|
|
805
|
+
var node = $.child(tr);
|
|
806
|
+
|
|
807
|
+
$.each(
|
|
808
|
+
node,
|
|
809
|
+
19,
|
|
810
|
+
extraCellsBefore,
|
|
811
|
+
(extraCell, index) => extraKey(index, 0),
|
|
812
|
+
($$anchor, extraCell) => {
|
|
813
|
+
const ExtraCell = $.derived(() => $.get(extraCell).component);
|
|
814
|
+
var td = root_1$4();
|
|
815
|
+
var node_1 = $.child(td);
|
|
816
|
+
|
|
817
|
+
$.component(
|
|
818
|
+
node_1,
|
|
819
|
+
() => $.get(ExtraCell),
|
|
820
|
+
($$anchor, ExtraCell_1) => {
|
|
821
|
+
ExtraCell_1(
|
|
822
|
+
$$anchor,
|
|
823
|
+
$.spread_props(() => $.get(rowProps)),
|
|
824
|
+
);
|
|
825
|
+
},
|
|
826
|
+
);
|
|
827
|
+
|
|
828
|
+
$.reset(td);
|
|
829
|
+
$.template_effect(() => $.set_class(td, 1, $.clsx(EXTRA)));
|
|
830
|
+
$.append($$anchor, td);
|
|
831
|
+
},
|
|
832
|
+
);
|
|
833
|
+
|
|
834
|
+
var node_2 = $.sibling(node);
|
|
835
|
+
|
|
836
|
+
{
|
|
837
|
+
var consequent = ($$anchor) => {
|
|
838
|
+
var fragment = root_2$3();
|
|
839
|
+
var th = $.first_child(fragment);
|
|
840
|
+
var text = $.child(th, true);
|
|
841
|
+
|
|
842
|
+
$.reset(th);
|
|
843
|
+
|
|
844
|
+
var th_1 = $.sibling(th, 2);
|
|
845
|
+
var text_1 = $.child(th_1, true);
|
|
846
|
+
|
|
847
|
+
$.reset(th_1);
|
|
848
|
+
|
|
849
|
+
$.template_effect(() => {
|
|
850
|
+
$.set_attribute(th, 'title', $$props.localRowId);
|
|
851
|
+
$.set_text(text, $$props.localRowId);
|
|
852
|
+
$.set_attribute(th_1, 'title', remoteRowId.current);
|
|
853
|
+
$.set_text(text_1, remoteRowId.current);
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
$.append($$anchor, fragment);
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
var d = $.derived(() => !isFalse($$props.idColumn));
|
|
860
|
+
|
|
861
|
+
$.if(node_2, ($$render) => {
|
|
862
|
+
if ($.get(d)) $$render(consequent);
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
var node_3 = $.sibling(node_2);
|
|
867
|
+
|
|
868
|
+
$.each(
|
|
869
|
+
node_3,
|
|
870
|
+
17,
|
|
871
|
+
() => $.get(cellEntries),
|
|
872
|
+
(entry) => entry[0],
|
|
873
|
+
($$anchor, entry) => {
|
|
874
|
+
const compoundCellId = $.derived(() => $.get(entry)[0]);
|
|
875
|
+
const cell = $.derived(() => $.get(entry)[1]);
|
|
876
|
+
const CellComponent = $.derived(() => $.get(cell).component);
|
|
877
|
+
|
|
878
|
+
const computed_const = $.derived(() => {
|
|
879
|
+
const [tableId, cellId] = $.get(compoundCellId).split('.', 2);
|
|
880
|
+
|
|
881
|
+
return {tableId, cellId};
|
|
882
|
+
});
|
|
883
|
+
|
|
884
|
+
const rowId = $.derived(() =>
|
|
885
|
+
$.get(computed_const).tableId === $$props.localTableId
|
|
886
|
+
? $$props.localRowId
|
|
887
|
+
: $.get(computed_const).tableId === $$props.remoteTableId
|
|
888
|
+
? remoteRowId.current
|
|
889
|
+
: undefined,
|
|
890
|
+
);
|
|
891
|
+
|
|
892
|
+
var fragment_1 = $.comment();
|
|
893
|
+
var node_4 = $.first_child(fragment_1);
|
|
894
|
+
|
|
895
|
+
{
|
|
896
|
+
var consequent_1 = ($$anchor) => {
|
|
897
|
+
var td_1 = root_4$3();
|
|
898
|
+
var node_5 = $.child(td_1);
|
|
899
|
+
|
|
900
|
+
{
|
|
901
|
+
let $0 = $.derived(() =>
|
|
902
|
+
getProps(
|
|
903
|
+
$.get(cell).getComponentProps,
|
|
904
|
+
$.get(rowId),
|
|
905
|
+
$.get(computed_const).cellId,
|
|
906
|
+
),
|
|
907
|
+
);
|
|
908
|
+
|
|
909
|
+
$.component(
|
|
910
|
+
node_5,
|
|
911
|
+
() => $.get(CellComponent),
|
|
912
|
+
($$anchor, CellComponent_1) => {
|
|
913
|
+
CellComponent_1(
|
|
914
|
+
$$anchor,
|
|
915
|
+
$.spread_props(() => $.get($0), {
|
|
916
|
+
get store() {
|
|
917
|
+
return $$props.store;
|
|
918
|
+
},
|
|
919
|
+
|
|
920
|
+
get tableId() {
|
|
921
|
+
return $.get(computed_const).tableId;
|
|
922
|
+
},
|
|
923
|
+
|
|
924
|
+
get rowId() {
|
|
925
|
+
return $.get(rowId);
|
|
926
|
+
},
|
|
927
|
+
|
|
928
|
+
get cellId() {
|
|
929
|
+
return $.get(computed_const).cellId;
|
|
930
|
+
},
|
|
931
|
+
}),
|
|
932
|
+
);
|
|
933
|
+
},
|
|
934
|
+
);
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
$.reset(td_1);
|
|
938
|
+
$.append($$anchor, td_1);
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
var d_1 = $.derived(() => !isUndefined($.get(rowId)));
|
|
942
|
+
|
|
943
|
+
$.if(node_4, ($$render) => {
|
|
944
|
+
if ($.get(d_1)) $$render(consequent_1);
|
|
945
|
+
});
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
$.append($$anchor, fragment_1);
|
|
949
|
+
},
|
|
950
|
+
);
|
|
951
|
+
|
|
952
|
+
var node_6 = $.sibling(node_3);
|
|
953
|
+
|
|
954
|
+
$.each(
|
|
955
|
+
node_6,
|
|
956
|
+
19,
|
|
957
|
+
extraCellsAfter,
|
|
958
|
+
(extraCell, index) => extraKey(index, 1),
|
|
959
|
+
($$anchor, extraCell) => {
|
|
960
|
+
const ExtraCell = $.derived(() => $.get(extraCell).component);
|
|
961
|
+
var td_2 = root_5$2();
|
|
962
|
+
var node_7 = $.child(td_2);
|
|
963
|
+
|
|
964
|
+
$.component(
|
|
965
|
+
node_7,
|
|
966
|
+
() => $.get(ExtraCell),
|
|
967
|
+
($$anchor, ExtraCell_2) => {
|
|
968
|
+
ExtraCell_2(
|
|
969
|
+
$$anchor,
|
|
970
|
+
$.spread_props(() => $.get(rowProps)),
|
|
971
|
+
);
|
|
972
|
+
},
|
|
973
|
+
);
|
|
974
|
+
|
|
975
|
+
$.reset(td_2);
|
|
976
|
+
$.template_effect(() => $.set_class(td_2, 1, $.clsx(EXTRA)));
|
|
977
|
+
$.append($$anchor, td_2);
|
|
978
|
+
},
|
|
979
|
+
);
|
|
980
|
+
|
|
981
|
+
$.reset(tr);
|
|
982
|
+
$.append($$anchor, tr);
|
|
983
|
+
$.pop();
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
var root_2$2 = $.from_html(`<th> </th>`);
|
|
987
|
+
var root_3$2 = $.from_html(`<th> </th> <th> </th>`, 1);
|
|
988
|
+
var root_4$2 = $.from_html(`<th> </th>`);
|
|
989
|
+
var root_5$1 = $.from_html(`<th> </th>`);
|
|
990
|
+
var root_1$3 = $.from_html(`<thead><tr><!><!><!><!></tr></thead>`);
|
|
991
|
+
var root$3 = $.from_html(`<table><!><tbody></tbody></table>`);
|
|
992
|
+
|
|
993
|
+
function RelationshipInHtmlTable($$anchor, $$props) {
|
|
994
|
+
$.push($$props, true);
|
|
995
|
+
|
|
996
|
+
let extraCellsBefore = $.prop($$props, 'extraCellsBefore', 19, () => []),
|
|
997
|
+
extraCellsAfter = $.prop($$props, 'extraCellsAfter', 19, () => []),
|
|
998
|
+
idColumn = $.prop($$props, 'idColumn', 3, true);
|
|
999
|
+
|
|
1000
|
+
const relationship = getRelationshipsStoreTableIds(
|
|
1001
|
+
() => $$props.relationships,
|
|
1002
|
+
() => $$props.relationshipId,
|
|
1003
|
+
);
|
|
1004
|
+
const localCellIds = getTableCellIds(
|
|
1005
|
+
() => relationship.localTableId,
|
|
1006
|
+
() => relationship.store,
|
|
1007
|
+
);
|
|
1008
|
+
const remoteCellIds = getTableCellIds(
|
|
1009
|
+
() => relationship.remoteTableId,
|
|
1010
|
+
() => relationship.store,
|
|
1011
|
+
);
|
|
1012
|
+
const localRowIds = getRowIds(
|
|
1013
|
+
() => relationship.localTableId,
|
|
1014
|
+
() => relationship.store,
|
|
1015
|
+
);
|
|
1016
|
+
const defaultCellComponent = $.derived(() =>
|
|
1017
|
+
$$props.editable ? EditableCellView : CellView,
|
|
1018
|
+
);
|
|
1019
|
+
|
|
1020
|
+
const cells = $.derived(() =>
|
|
1021
|
+
getCells(
|
|
1022
|
+
[
|
|
1023
|
+
...arrayMap(
|
|
1024
|
+
localCellIds.current,
|
|
1025
|
+
(cellId) => relationship.localTableId + DOT + cellId,
|
|
1026
|
+
),
|
|
1027
|
+
...arrayMap(
|
|
1028
|
+
remoteCellIds.current,
|
|
1029
|
+
(cellId) => relationship.remoteTableId + DOT + cellId,
|
|
1030
|
+
),
|
|
1031
|
+
],
|
|
1032
|
+
$$props.customCells,
|
|
1033
|
+
$.get(defaultCellComponent),
|
|
1034
|
+
),
|
|
1035
|
+
);
|
|
1036
|
+
|
|
1037
|
+
const cellEntries = $.derived(() => objEntries($.get(cells)));
|
|
1038
|
+
const extraHeadersBefore = $.derived(() =>
|
|
1039
|
+
getExtraHeaders(extraCellsBefore()),
|
|
1040
|
+
);
|
|
1041
|
+
const extraHeadersAfter = $.derived(() =>
|
|
1042
|
+
getExtraHeaders(extraCellsAfter(), 1),
|
|
1043
|
+
);
|
|
1044
|
+
var table = root$3();
|
|
1045
|
+
var node = $.child(table);
|
|
1046
|
+
|
|
1047
|
+
{
|
|
1048
|
+
var consequent_1 = ($$anchor) => {
|
|
1049
|
+
var thead = root_1$3();
|
|
1050
|
+
var tr = $.child(thead);
|
|
1051
|
+
var node_1 = $.child(tr);
|
|
1052
|
+
|
|
1053
|
+
$.each(
|
|
1054
|
+
node_1,
|
|
1055
|
+
17,
|
|
1056
|
+
() => $.get(extraHeadersBefore),
|
|
1057
|
+
(extraHeader) => extraHeader.key,
|
|
1058
|
+
($$anchor, extraHeader) => {
|
|
1059
|
+
var th = root_2$2();
|
|
1060
|
+
var text = $.child(th, true);
|
|
1061
|
+
|
|
1062
|
+
$.reset(th);
|
|
1063
|
+
|
|
1064
|
+
$.template_effect(() => {
|
|
1065
|
+
$.set_class(th, 1, $.clsx($.get(extraHeader).className));
|
|
1066
|
+
$.set_text(text, $.get(extraHeader).label);
|
|
1067
|
+
});
|
|
1068
|
+
|
|
1069
|
+
$.append($$anchor, th);
|
|
1070
|
+
},
|
|
1071
|
+
);
|
|
1072
|
+
|
|
1073
|
+
var node_2 = $.sibling(node_1);
|
|
1074
|
+
|
|
1075
|
+
{
|
|
1076
|
+
var consequent = ($$anchor) => {
|
|
1077
|
+
var fragment = root_3$2();
|
|
1078
|
+
var th_1 = $.first_child(fragment);
|
|
1079
|
+
var text_1 = $.child(th_1);
|
|
1080
|
+
|
|
1081
|
+
$.reset(th_1);
|
|
1082
|
+
|
|
1083
|
+
var th_2 = $.sibling(th_1, 2);
|
|
1084
|
+
var text_2 = $.child(th_2);
|
|
1085
|
+
|
|
1086
|
+
$.reset(th_2);
|
|
1087
|
+
|
|
1088
|
+
$.template_effect(() => {
|
|
1089
|
+
$.set_text(text_1, `${relationship.localTableId ?? ''}.Id`);
|
|
1090
|
+
$.set_text(text_2, `${relationship.remoteTableId ?? ''}.Id`);
|
|
1091
|
+
});
|
|
1092
|
+
|
|
1093
|
+
$.append($$anchor, fragment);
|
|
1094
|
+
};
|
|
1095
|
+
|
|
1096
|
+
var d = $.derived(() => !isFalse(idColumn()));
|
|
1097
|
+
|
|
1098
|
+
$.if(node_2, ($$render) => {
|
|
1099
|
+
if ($.get(d)) $$render(consequent);
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
var node_3 = $.sibling(node_2);
|
|
1104
|
+
|
|
1105
|
+
$.each(
|
|
1106
|
+
node_3,
|
|
1107
|
+
17,
|
|
1108
|
+
() => $.get(cellEntries),
|
|
1109
|
+
(entry) => entry[0],
|
|
1110
|
+
($$anchor, entry) => {
|
|
1111
|
+
var th_3 = root_4$2();
|
|
1112
|
+
var text_3 = $.child(th_3, true);
|
|
1113
|
+
|
|
1114
|
+
$.reset(th_3);
|
|
1115
|
+
$.template_effect(() => $.set_text(text_3, $.get(entry)[1].label));
|
|
1116
|
+
$.append($$anchor, th_3);
|
|
1117
|
+
},
|
|
1118
|
+
);
|
|
1119
|
+
|
|
1120
|
+
var node_4 = $.sibling(node_3);
|
|
1121
|
+
|
|
1122
|
+
$.each(
|
|
1123
|
+
node_4,
|
|
1124
|
+
17,
|
|
1125
|
+
() => $.get(extraHeadersAfter),
|
|
1126
|
+
(extraHeader) => extraHeader.key,
|
|
1127
|
+
($$anchor, extraHeader) => {
|
|
1128
|
+
var th_4 = root_5$1();
|
|
1129
|
+
var text_4 = $.child(th_4, true);
|
|
1130
|
+
|
|
1131
|
+
$.reset(th_4);
|
|
1132
|
+
|
|
1133
|
+
$.template_effect(() => {
|
|
1134
|
+
$.set_class(th_4, 1, $.clsx($.get(extraHeader).className));
|
|
1135
|
+
$.set_text(text_4, $.get(extraHeader).label);
|
|
1136
|
+
});
|
|
1137
|
+
|
|
1138
|
+
$.append($$anchor, th_4);
|
|
1139
|
+
},
|
|
1140
|
+
);
|
|
1141
|
+
|
|
1142
|
+
$.reset(tr);
|
|
1143
|
+
$.reset(thead);
|
|
1144
|
+
$.append($$anchor, thead);
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1147
|
+
$.if(node, ($$render) => {
|
|
1148
|
+
if ($$props.headerRow !== false) $$render(consequent_1);
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
var tbody = $.sibling(node);
|
|
1153
|
+
|
|
1154
|
+
$.each(
|
|
1155
|
+
tbody,
|
|
1156
|
+
20,
|
|
1157
|
+
() => localRowIds.current,
|
|
1158
|
+
(localRowId) => localRowId,
|
|
1159
|
+
($$anchor, localRowId) => {
|
|
1160
|
+
RelationshipInHtmlRow($$anchor, {
|
|
1161
|
+
get localRowId() {
|
|
1162
|
+
return localRowId;
|
|
1163
|
+
},
|
|
1164
|
+
|
|
1165
|
+
get idColumn() {
|
|
1166
|
+
return idColumn();
|
|
1167
|
+
},
|
|
1168
|
+
|
|
1169
|
+
get cells() {
|
|
1170
|
+
return $.get(cells);
|
|
1171
|
+
},
|
|
1172
|
+
|
|
1173
|
+
get localTableId() {
|
|
1174
|
+
return relationship.localTableId;
|
|
1175
|
+
},
|
|
1176
|
+
|
|
1177
|
+
get remoteTableId() {
|
|
1178
|
+
return relationship.remoteTableId;
|
|
1179
|
+
},
|
|
1180
|
+
|
|
1181
|
+
get relationshipId() {
|
|
1182
|
+
return $$props.relationshipId;
|
|
1183
|
+
},
|
|
1184
|
+
|
|
1185
|
+
get relationships() {
|
|
1186
|
+
return $$props.relationships;
|
|
1187
|
+
},
|
|
1188
|
+
|
|
1189
|
+
get store() {
|
|
1190
|
+
return relationship.store;
|
|
1191
|
+
},
|
|
1192
|
+
|
|
1193
|
+
get extraCellsBefore() {
|
|
1194
|
+
return extraCellsBefore();
|
|
1195
|
+
},
|
|
1196
|
+
|
|
1197
|
+
get extraCellsAfter() {
|
|
1198
|
+
return extraCellsAfter();
|
|
1199
|
+
},
|
|
1200
|
+
});
|
|
1201
|
+
},
|
|
1202
|
+
);
|
|
1203
|
+
|
|
1204
|
+
$.reset(tbody);
|
|
1205
|
+
$.reset(table);
|
|
1206
|
+
$.template_effect(() => $.set_class(table, 1, $.clsx($$props.className)));
|
|
1207
|
+
$.append($$anchor, table);
|
|
1208
|
+
$.pop();
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
function ResultCellView($$anchor, $$props) {
|
|
1212
|
+
$.push($$props, true);
|
|
1213
|
+
|
|
1214
|
+
const cell = getResultCell(
|
|
1215
|
+
() => $$props.queryId,
|
|
1216
|
+
() => $$props.rowId,
|
|
1217
|
+
() => $$props.cellId,
|
|
1218
|
+
() => $$props.queries,
|
|
1219
|
+
);
|
|
1220
|
+
const display = $.derived(() => '' + (cell.current ?? ''));
|
|
1221
|
+
|
|
1222
|
+
const output = $.derived(() =>
|
|
1223
|
+
$$props.debugIds ? `${$$props.cellId}:{${$.get(display)}}` : $.get(display),
|
|
1224
|
+
);
|
|
1225
|
+
|
|
1226
|
+
$.next();
|
|
1227
|
+
|
|
1228
|
+
var text = $.text();
|
|
1229
|
+
|
|
1230
|
+
$.template_effect(() => $.set_text(text, $.get(output)));
|
|
1231
|
+
$.append($$anchor, text);
|
|
1232
|
+
$.pop();
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
var root_1$2 = $.from_html(`<caption><!></caption>`);
|
|
1236
|
+
var root_3$1 = $.from_html(`<th> </th>`);
|
|
1237
|
+
var root_4$1 = $.from_html(`<th><!> Id</th>`);
|
|
1238
|
+
var root_6$1 = $.from_html(`<th><!> </th>`);
|
|
1239
|
+
var root_8$1 = $.from_html(`<th> </th>`);
|
|
1240
|
+
var root_2$1 = $.from_html(`<thead><tr><!><!><!><!></tr></thead>`);
|
|
1241
|
+
var root_10 = $.from_html(`<td><!></td>`);
|
|
1242
|
+
var root_11 = $.from_html(`<th> </th>`);
|
|
1243
|
+
var root_12 = $.from_html(`<td><!></td>`);
|
|
1244
|
+
var root_13 = $.from_html(`<td><!></td>`);
|
|
1245
|
+
var root_9 = $.from_html(`<tr><!><!><!><!></tr>`);
|
|
1246
|
+
var root$2 = $.from_html(`<table><!><!><tbody></tbody></table>`);
|
|
1247
|
+
|
|
1248
|
+
function HtmlTable($$anchor, $$props) {
|
|
1249
|
+
$.push($$props, true);
|
|
1250
|
+
|
|
1251
|
+
let extraCellsBefore = $.prop($$props, 'extraCellsBefore', 19, () => []),
|
|
1252
|
+
extraCellsAfter = $.prop($$props, 'extraCellsAfter', 19, () => []);
|
|
1253
|
+
|
|
1254
|
+
const cellEntries = $.derived(() => objEntries($$props.cells));
|
|
1255
|
+
const extraHeadersBefore = $.derived(() =>
|
|
1256
|
+
getExtraHeaders(extraCellsBefore()),
|
|
1257
|
+
);
|
|
1258
|
+
const extraHeadersAfter = $.derived(() =>
|
|
1259
|
+
getExtraHeaders(extraCellsAfter(), 1),
|
|
1260
|
+
);
|
|
1261
|
+
const PaginatorComponent = $.derived(() => $$props.paginator?.component);
|
|
1262
|
+
const paginatorProps = $.derived(() => $$props.paginator?.props);
|
|
1263
|
+
var table = root$2();
|
|
1264
|
+
var node = $.child(table);
|
|
1265
|
+
|
|
1266
|
+
{
|
|
1267
|
+
var consequent = ($$anchor) => {
|
|
1268
|
+
var caption = root_1$2();
|
|
1269
|
+
var node_1 = $.child(caption);
|
|
1270
|
+
|
|
1271
|
+
$.component(
|
|
1272
|
+
node_1,
|
|
1273
|
+
() => $.get(PaginatorComponent),
|
|
1274
|
+
($$anchor, PaginatorComponent_1) => {
|
|
1275
|
+
PaginatorComponent_1(
|
|
1276
|
+
$$anchor,
|
|
1277
|
+
$.spread_props(() => $.get(paginatorProps)),
|
|
1278
|
+
);
|
|
1279
|
+
},
|
|
1280
|
+
);
|
|
1281
|
+
|
|
1282
|
+
$.reset(caption);
|
|
1283
|
+
$.append($$anchor, caption);
|
|
1284
|
+
};
|
|
1285
|
+
|
|
1286
|
+
$.if(node, ($$render) => {
|
|
1287
|
+
if ($.get(PaginatorComponent) && $.get(paginatorProps))
|
|
1288
|
+
$$render(consequent);
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
var node_2 = $.sibling(node);
|
|
1293
|
+
|
|
1294
|
+
{
|
|
1295
|
+
var consequent_4 = ($$anchor) => {
|
|
1296
|
+
var thead = root_2$1();
|
|
1297
|
+
var tr = $.child(thead);
|
|
1298
|
+
var node_3 = $.child(tr);
|
|
1299
|
+
|
|
1300
|
+
$.each(
|
|
1301
|
+
node_3,
|
|
1302
|
+
17,
|
|
1303
|
+
() => $.get(extraHeadersBefore),
|
|
1304
|
+
(extraHeader) => extraHeader.key,
|
|
1305
|
+
($$anchor, extraHeader) => {
|
|
1306
|
+
var th = root_3$1();
|
|
1307
|
+
var text = $.child(th, true);
|
|
1308
|
+
|
|
1309
|
+
$.reset(th);
|
|
1310
|
+
|
|
1311
|
+
$.template_effect(() => {
|
|
1312
|
+
$.set_class(th, 1, $.clsx($.get(extraHeader).className));
|
|
1313
|
+
$.set_text(text, $.get(extraHeader).label);
|
|
1314
|
+
});
|
|
1315
|
+
|
|
1316
|
+
$.append($$anchor, th);
|
|
1317
|
+
},
|
|
1318
|
+
);
|
|
1319
|
+
|
|
1320
|
+
var node_4 = $.sibling(node_3);
|
|
1321
|
+
|
|
1322
|
+
{
|
|
1323
|
+
var consequent_2 = ($$anchor) => {
|
|
1324
|
+
var th_1 = root_4$1();
|
|
1325
|
+
var node_5 = $.child(th_1);
|
|
1326
|
+
|
|
1327
|
+
{
|
|
1328
|
+
var consequent_1 = ($$anchor) => {
|
|
1329
|
+
var text_1 = $.text();
|
|
1330
|
+
|
|
1331
|
+
$.template_effect(() =>
|
|
1332
|
+
$.set_text(
|
|
1333
|
+
text_1,
|
|
1334
|
+
($$props.sortAndOffset[1] ? DOWN_ARROW : UP_ARROW) + ' ',
|
|
1335
|
+
),
|
|
1336
|
+
);
|
|
1337
|
+
$.append($$anchor, text_1);
|
|
1338
|
+
};
|
|
1339
|
+
|
|
1340
|
+
var d = $.derived(
|
|
1341
|
+
() =>
|
|
1342
|
+
!isUndefined($$props.sortAndOffset) &&
|
|
1343
|
+
$$props.sortAndOffset[0] == null,
|
|
1344
|
+
);
|
|
1345
|
+
|
|
1346
|
+
$.if(node_5, ($$render) => {
|
|
1347
|
+
if ($.get(d)) $$render(consequent_1);
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
$.next();
|
|
1352
|
+
$.reset(th_1);
|
|
1353
|
+
|
|
1354
|
+
$.template_effect(
|
|
1355
|
+
($0) => $.set_class(th_1, 1, $0),
|
|
1356
|
+
[
|
|
1357
|
+
() =>
|
|
1358
|
+
$.clsx(
|
|
1359
|
+
isUndefined($$props.sortAndOffset) ||
|
|
1360
|
+
$$props.sortAndOffset[0] != null
|
|
1361
|
+
? undefined
|
|
1362
|
+
: `sorted ${$$props.sortAndOffset[1] ? 'de' : 'a'}scending`,
|
|
1363
|
+
),
|
|
1364
|
+
],
|
|
1365
|
+
);
|
|
1366
|
+
|
|
1367
|
+
$.delegated('click', th_1, () => $$props.handleSort?.(undefined));
|
|
1368
|
+
$.append($$anchor, th_1);
|
|
1369
|
+
};
|
|
1370
|
+
|
|
1371
|
+
$.if(node_4, ($$render) => {
|
|
1372
|
+
if ($$props.idColumn !== false) $$render(consequent_2);
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
var node_6 = $.sibling(node_4);
|
|
1377
|
+
|
|
1378
|
+
$.each(
|
|
1379
|
+
node_6,
|
|
1380
|
+
17,
|
|
1381
|
+
() => $.get(cellEntries),
|
|
1382
|
+
(entry) => entry[0],
|
|
1383
|
+
($$anchor, entry) => {
|
|
1384
|
+
const cellId = $.derived(() => $.get(entry)[0]);
|
|
1385
|
+
const cell = $.derived(() => $.get(entry)[1]);
|
|
1386
|
+
var th_2 = root_6$1();
|
|
1387
|
+
var node_7 = $.child(th_2);
|
|
1388
|
+
|
|
1389
|
+
{
|
|
1390
|
+
var consequent_3 = ($$anchor) => {
|
|
1391
|
+
var text_2 = $.text();
|
|
1392
|
+
|
|
1393
|
+
$.template_effect(() =>
|
|
1394
|
+
$.set_text(
|
|
1395
|
+
text_2,
|
|
1396
|
+
($$props.sortAndOffset[1] ? DOWN_ARROW : UP_ARROW) + ' ',
|
|
1397
|
+
),
|
|
1398
|
+
);
|
|
1399
|
+
$.append($$anchor, text_2);
|
|
1400
|
+
};
|
|
1401
|
+
|
|
1402
|
+
var d_1 = $.derived(
|
|
1403
|
+
() =>
|
|
1404
|
+
!isUndefined($$props.sortAndOffset) &&
|
|
1405
|
+
$$props.sortAndOffset[0] == $.get(cellId),
|
|
1406
|
+
);
|
|
1407
|
+
|
|
1408
|
+
$.if(node_7, ($$render) => {
|
|
1409
|
+
if ($.get(d_1)) $$render(consequent_3);
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
var text_3 = $.sibling(node_7);
|
|
1414
|
+
|
|
1415
|
+
$.reset(th_2);
|
|
1416
|
+
|
|
1417
|
+
$.template_effect(
|
|
1418
|
+
($0) => {
|
|
1419
|
+
$.set_class(th_2, 1, $0);
|
|
1420
|
+
$.set_text(text_3, ` ${$.get(cell).label ?? ''}`);
|
|
1421
|
+
},
|
|
1422
|
+
[
|
|
1423
|
+
() =>
|
|
1424
|
+
$.clsx(
|
|
1425
|
+
isUndefined($$props.sortAndOffset) ||
|
|
1426
|
+
$$props.sortAndOffset[0] != $.get(cellId)
|
|
1427
|
+
? undefined
|
|
1428
|
+
: `sorted ${$$props.sortAndOffset[1] ? 'de' : 'a'}scending`,
|
|
1429
|
+
),
|
|
1430
|
+
],
|
|
1431
|
+
);
|
|
1432
|
+
|
|
1433
|
+
$.delegated('click', th_2, () => $$props.handleSort?.($.get(cellId)));
|
|
1434
|
+
$.append($$anchor, th_2);
|
|
1435
|
+
},
|
|
1436
|
+
);
|
|
1437
|
+
|
|
1438
|
+
var node_8 = $.sibling(node_6);
|
|
1439
|
+
|
|
1440
|
+
$.each(
|
|
1441
|
+
node_8,
|
|
1442
|
+
17,
|
|
1443
|
+
() => $.get(extraHeadersAfter),
|
|
1444
|
+
(extraHeader) => extraHeader.key,
|
|
1445
|
+
($$anchor, extraHeader) => {
|
|
1446
|
+
var th_3 = root_8$1();
|
|
1447
|
+
var text_4 = $.child(th_3, true);
|
|
1448
|
+
|
|
1449
|
+
$.reset(th_3);
|
|
1450
|
+
|
|
1451
|
+
$.template_effect(() => {
|
|
1452
|
+
$.set_class(th_3, 1, $.clsx($.get(extraHeader).className));
|
|
1453
|
+
$.set_text(text_4, $.get(extraHeader).label);
|
|
1454
|
+
});
|
|
1455
|
+
|
|
1456
|
+
$.append($$anchor, th_3);
|
|
1457
|
+
},
|
|
1458
|
+
);
|
|
1459
|
+
|
|
1460
|
+
$.reset(tr);
|
|
1461
|
+
$.reset(thead);
|
|
1462
|
+
$.append($$anchor, thead);
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1465
|
+
$.if(node_2, ($$render) => {
|
|
1466
|
+
if ($$props.headerRow !== false) $$render(consequent_4);
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
var tbody = $.sibling(node_2);
|
|
1471
|
+
|
|
1472
|
+
$.each(
|
|
1473
|
+
tbody,
|
|
1474
|
+
20,
|
|
1475
|
+
() => $$props.rowIds.current,
|
|
1476
|
+
(rowId) => rowId,
|
|
1477
|
+
($$anchor, rowId) => {
|
|
1478
|
+
const rowProps = $.derived(() => ({
|
|
1479
|
+
...$$props.cellComponentProps,
|
|
1480
|
+
rowId,
|
|
1481
|
+
}));
|
|
1482
|
+
var tr_1 = root_9();
|
|
1483
|
+
var node_9 = $.child(tr_1);
|
|
1484
|
+
|
|
1485
|
+
$.each(
|
|
1486
|
+
node_9,
|
|
1487
|
+
19,
|
|
1488
|
+
extraCellsBefore,
|
|
1489
|
+
(extraCell, index) => extraKey(index, 0),
|
|
1490
|
+
($$anchor, extraCell) => {
|
|
1491
|
+
const ExtraCell = $.derived(() => $.get(extraCell).component);
|
|
1492
|
+
var td = root_10();
|
|
1493
|
+
var node_10 = $.child(td);
|
|
1494
|
+
|
|
1495
|
+
$.component(
|
|
1496
|
+
node_10,
|
|
1497
|
+
() => $.get(ExtraCell),
|
|
1498
|
+
($$anchor, ExtraCell_1) => {
|
|
1499
|
+
ExtraCell_1(
|
|
1500
|
+
$$anchor,
|
|
1501
|
+
$.spread_props(() => $.get(rowProps)),
|
|
1502
|
+
);
|
|
1503
|
+
},
|
|
1504
|
+
);
|
|
1505
|
+
|
|
1506
|
+
$.reset(td);
|
|
1507
|
+
$.template_effect(() => $.set_class(td, 1, $.clsx(EXTRA)));
|
|
1508
|
+
$.append($$anchor, td);
|
|
1509
|
+
},
|
|
1510
|
+
);
|
|
1511
|
+
|
|
1512
|
+
var node_11 = $.sibling(node_9);
|
|
1513
|
+
|
|
1514
|
+
{
|
|
1515
|
+
var consequent_5 = ($$anchor) => {
|
|
1516
|
+
var th_4 = root_11();
|
|
1517
|
+
var text_5 = $.child(th_4, true);
|
|
1518
|
+
|
|
1519
|
+
$.reset(th_4);
|
|
1520
|
+
|
|
1521
|
+
$.template_effect(() => {
|
|
1522
|
+
$.set_attribute(th_4, 'title', rowId);
|
|
1523
|
+
$.set_text(text_5, rowId);
|
|
1524
|
+
});
|
|
1525
|
+
|
|
1526
|
+
$.append($$anchor, th_4);
|
|
1527
|
+
};
|
|
1528
|
+
|
|
1529
|
+
var d_2 = $.derived(() => !isFalse($$props.idColumn));
|
|
1530
|
+
|
|
1531
|
+
$.if(node_11, ($$render) => {
|
|
1532
|
+
if ($.get(d_2)) $$render(consequent_5);
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
var node_12 = $.sibling(node_11);
|
|
1537
|
+
|
|
1538
|
+
$.each(
|
|
1539
|
+
node_12,
|
|
1540
|
+
17,
|
|
1541
|
+
() => $.get(cellEntries),
|
|
1542
|
+
(entry) => entry[0],
|
|
1543
|
+
($$anchor, entry) => {
|
|
1544
|
+
const cellId = $.derived(() => $.get(entry)[0]);
|
|
1545
|
+
const cell = $.derived(() => $.get(entry)[1]);
|
|
1546
|
+
const CellComponent = $.derived(() => $.get(cell).component);
|
|
1547
|
+
var td_1 = root_12();
|
|
1548
|
+
var node_13 = $.child(td_1);
|
|
1549
|
+
|
|
1550
|
+
{
|
|
1551
|
+
let $0 = $.derived(() =>
|
|
1552
|
+
getProps($.get(cell).getComponentProps, rowId, $.get(cellId)),
|
|
1553
|
+
);
|
|
1554
|
+
|
|
1555
|
+
$.component(
|
|
1556
|
+
node_13,
|
|
1557
|
+
() => $.get(CellComponent),
|
|
1558
|
+
($$anchor, CellComponent_1) => {
|
|
1559
|
+
CellComponent_1(
|
|
1560
|
+
$$anchor,
|
|
1561
|
+
$.spread_props(
|
|
1562
|
+
() => $.get($0),
|
|
1563
|
+
() => $.get(rowProps),
|
|
1564
|
+
{
|
|
1565
|
+
get cellId() {
|
|
1566
|
+
return $.get(cellId);
|
|
1567
|
+
},
|
|
1568
|
+
},
|
|
1569
|
+
),
|
|
1570
|
+
);
|
|
1571
|
+
},
|
|
1572
|
+
);
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
$.reset(td_1);
|
|
1576
|
+
$.append($$anchor, td_1);
|
|
1577
|
+
},
|
|
1578
|
+
);
|
|
1579
|
+
|
|
1580
|
+
var node_14 = $.sibling(node_12);
|
|
1581
|
+
|
|
1582
|
+
$.each(
|
|
1583
|
+
node_14,
|
|
1584
|
+
19,
|
|
1585
|
+
extraCellsAfter,
|
|
1586
|
+
(extraCell, index) => extraKey(index, 1),
|
|
1587
|
+
($$anchor, extraCell) => {
|
|
1588
|
+
const ExtraCell = $.derived(() => $.get(extraCell).component);
|
|
1589
|
+
var td_2 = root_13();
|
|
1590
|
+
var node_15 = $.child(td_2);
|
|
1591
|
+
|
|
1592
|
+
$.component(
|
|
1593
|
+
node_15,
|
|
1594
|
+
() => $.get(ExtraCell),
|
|
1595
|
+
($$anchor, ExtraCell_2) => {
|
|
1596
|
+
ExtraCell_2(
|
|
1597
|
+
$$anchor,
|
|
1598
|
+
$.spread_props(() => $.get(rowProps)),
|
|
1599
|
+
);
|
|
1600
|
+
},
|
|
1601
|
+
);
|
|
1602
|
+
|
|
1603
|
+
$.reset(td_2);
|
|
1604
|
+
$.template_effect(() => $.set_class(td_2, 1, $.clsx(EXTRA)));
|
|
1605
|
+
$.append($$anchor, td_2);
|
|
1606
|
+
},
|
|
1607
|
+
);
|
|
1608
|
+
|
|
1609
|
+
$.reset(tr_1);
|
|
1610
|
+
$.append($$anchor, tr_1);
|
|
1611
|
+
},
|
|
1612
|
+
);
|
|
1613
|
+
|
|
1614
|
+
$.reset(tbody);
|
|
1615
|
+
$.reset(table);
|
|
1616
|
+
$.template_effect(() => $.set_class(table, 1, $.clsx($$props.className)));
|
|
1617
|
+
$.append($$anchor, table);
|
|
1618
|
+
$.pop();
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
$.delegate(['click']);
|
|
1622
|
+
|
|
1623
|
+
var root_1$1 = $.from_html(
|
|
1624
|
+
`<button class="previous"></button> <button class="next"></button> `,
|
|
1625
|
+
1,
|
|
1626
|
+
);
|
|
1627
|
+
var root$1 = $.from_html(`<!> `, 1);
|
|
1628
|
+
|
|
1629
|
+
function SortedTablePaginator($$anchor, $$props) {
|
|
1630
|
+
$.push($$props, true);
|
|
1631
|
+
$.rest_props($$props, ['$$slots', '$$events', '$$legacy']);
|
|
1632
|
+
const offset = $.derived(() =>
|
|
1633
|
+
$$props.offset == null ||
|
|
1634
|
+
$$props.offset > $$props.total ||
|
|
1635
|
+
$$props.offset < 0
|
|
1636
|
+
? 0
|
|
1637
|
+
: $$props.offset,
|
|
1638
|
+
);
|
|
1639
|
+
const limit = $.derived(() => $$props.limit ?? $$props.total);
|
|
1640
|
+
const singular = $.derived(() => $$props.singular ?? 'row');
|
|
1641
|
+
const plural = $.derived(() => $$props.plural ?? $.get(singular) + 's');
|
|
1642
|
+
|
|
1643
|
+
$.user_effect(() => {
|
|
1644
|
+
if (($$props.offset ?? 0) > $$props.total || ($$props.offset ?? 0) < 0) {
|
|
1645
|
+
$$props.onChange(0);
|
|
1646
|
+
}
|
|
1647
|
+
});
|
|
1648
|
+
|
|
1649
|
+
var fragment = root$1();
|
|
1650
|
+
var node = $.first_child(fragment);
|
|
1651
|
+
|
|
1652
|
+
{
|
|
1653
|
+
var consequent = ($$anchor) => {
|
|
1654
|
+
var fragment_1 = root_1$1();
|
|
1655
|
+
var button = $.first_child(fragment_1);
|
|
1656
|
+
|
|
1657
|
+
button.textContent = '←';
|
|
1658
|
+
|
|
1659
|
+
var button_1 = $.sibling(button, 2);
|
|
1660
|
+
|
|
1661
|
+
button_1.textContent = '→';
|
|
1662
|
+
|
|
1663
|
+
var text = $.sibling(button_1);
|
|
1664
|
+
|
|
1665
|
+
$.template_effect(
|
|
1666
|
+
($0) => {
|
|
1667
|
+
button.disabled = $.get(offset) == 0;
|
|
1668
|
+
button_1.disabled = $.get(offset) + $.get(limit) >= $$props.total;
|
|
1669
|
+
$.set_text(text, `${$.get(offset) + 1} to ${$0 ?? ''} of`);
|
|
1670
|
+
},
|
|
1671
|
+
[() => mathMin($$props.total, $.get(offset) + $.get(limit))],
|
|
1672
|
+
);
|
|
1673
|
+
|
|
1674
|
+
$.delegated('click', button, () =>
|
|
1675
|
+
$$props.onChange($.get(offset) - $.get(limit)),
|
|
1676
|
+
);
|
|
1677
|
+
$.delegated('click', button_1, () =>
|
|
1678
|
+
$$props.onChange($.get(offset) + $.get(limit)),
|
|
1679
|
+
);
|
|
1680
|
+
$.append($$anchor, fragment_1);
|
|
1681
|
+
};
|
|
1682
|
+
|
|
1683
|
+
$.if(node, ($$render) => {
|
|
1684
|
+
if ($$props.total > $.get(limit)) $$render(consequent);
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
var text_1 = $.sibling(node);
|
|
1689
|
+
|
|
1690
|
+
$.template_effect(() =>
|
|
1691
|
+
$.set_text(
|
|
1692
|
+
text_1,
|
|
1693
|
+
` ${$$props.total ?? ''}
|
|
1694
|
+
${($$props.total != 1 ? $.get(plural) : $.get(singular)) ?? ''}`,
|
|
1695
|
+
),
|
|
1696
|
+
);
|
|
1697
|
+
|
|
1698
|
+
$.append($$anchor, fragment);
|
|
1699
|
+
$.pop();
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
$.delegate(['click']);
|
|
1703
|
+
|
|
1704
|
+
/* sortingAndPagination.svelte.ts generated by Svelte v5.55.1 */
|
|
1705
|
+
|
|
1706
|
+
const createSortingAndPagination = (
|
|
1707
|
+
getCellId,
|
|
1708
|
+
getDescending,
|
|
1709
|
+
getSortOnClick,
|
|
1710
|
+
getOffset,
|
|
1711
|
+
getLimit,
|
|
1712
|
+
getTotal,
|
|
1713
|
+
getPaginator,
|
|
1714
|
+
getOnChange,
|
|
1715
|
+
) => {
|
|
1716
|
+
let currentCellId = $.state($.proxy(getCellId()));
|
|
1717
|
+
let currentDescending = $.state($.proxy(getDescending() ?? false));
|
|
1718
|
+
let currentOffset = $.state($.proxy(getOffset() ?? 0));
|
|
1719
|
+
|
|
1720
|
+
const setState = (sortAndOffset) => {
|
|
1721
|
+
$.set(currentCellId, sortAndOffset[0], true);
|
|
1722
|
+
$.set(currentDescending, sortAndOffset[1], true);
|
|
1723
|
+
$.set(currentOffset, sortAndOffset[2], true);
|
|
1724
|
+
getOnChange()?.(sortAndOffset);
|
|
1725
|
+
};
|
|
1726
|
+
|
|
1727
|
+
const handleSort = getSortOnClick()
|
|
1728
|
+
? (nextCellId) =>
|
|
1729
|
+
setState([
|
|
1730
|
+
nextCellId,
|
|
1731
|
+
nextCellId == $.get(currentCellId)
|
|
1732
|
+
? !$.get(currentDescending)
|
|
1733
|
+
: false,
|
|
1734
|
+
$.get(currentOffset),
|
|
1735
|
+
])
|
|
1736
|
+
: void 0;
|
|
1737
|
+
|
|
1738
|
+
const handleChangeOffset = (nextOffset) =>
|
|
1739
|
+
setState([$.get(currentCellId), $.get(currentDescending), nextOffset]);
|
|
1740
|
+
const paginator = getPaginator();
|
|
1741
|
+
const PaginatorComponent = isTrue(paginator)
|
|
1742
|
+
? SortedTablePaginator
|
|
1743
|
+
: paginator;
|
|
1744
|
+
|
|
1745
|
+
return {
|
|
1746
|
+
get sortAndOffset() {
|
|
1747
|
+
return [
|
|
1748
|
+
$.get(currentCellId),
|
|
1749
|
+
$.get(currentDescending),
|
|
1750
|
+
$.get(currentOffset),
|
|
1751
|
+
];
|
|
1752
|
+
},
|
|
1753
|
+
|
|
1754
|
+
get handleSort() {
|
|
1755
|
+
return handleSort;
|
|
1756
|
+
},
|
|
1757
|
+
|
|
1758
|
+
get paginator() {
|
|
1759
|
+
return isFalse(paginator)
|
|
1760
|
+
? void 0
|
|
1761
|
+
: {
|
|
1762
|
+
component: PaginatorComponent,
|
|
1763
|
+
props: {
|
|
1764
|
+
offset: $.get(currentOffset),
|
|
1765
|
+
limit: getLimit(),
|
|
1766
|
+
total: getTotal(),
|
|
1767
|
+
onChange: handleChangeOffset,
|
|
1768
|
+
},
|
|
1769
|
+
};
|
|
1770
|
+
},
|
|
1771
|
+
};
|
|
1772
|
+
};
|
|
1773
|
+
|
|
1774
|
+
function ResultSortedTableInHtmlTable($$anchor, $$props) {
|
|
1775
|
+
$.push($$props, true);
|
|
1776
|
+
|
|
1777
|
+
let paginator = $.prop($$props, 'paginator', 3, false),
|
|
1778
|
+
props = $.rest_props($$props, [
|
|
1779
|
+
'$$slots',
|
|
1780
|
+
'$$events',
|
|
1781
|
+
'$$legacy',
|
|
1782
|
+
'queryId',
|
|
1783
|
+
'cellId',
|
|
1784
|
+
'descending',
|
|
1785
|
+
'offset',
|
|
1786
|
+
'limit',
|
|
1787
|
+
'queries',
|
|
1788
|
+
'sortOnClick',
|
|
1789
|
+
'paginator',
|
|
1790
|
+
'customCells',
|
|
1791
|
+
'extraCellsBefore',
|
|
1792
|
+
'extraCellsAfter',
|
|
1793
|
+
'onChange',
|
|
1794
|
+
]);
|
|
1795
|
+
|
|
1796
|
+
const defaultCellIds = getResultTableCellIds(
|
|
1797
|
+
() => $$props.queryId,
|
|
1798
|
+
() => $$props.queries,
|
|
1799
|
+
);
|
|
1800
|
+
const rowCount = getResultRowCount(
|
|
1801
|
+
() => $$props.queryId,
|
|
1802
|
+
() => $$props.queries,
|
|
1803
|
+
);
|
|
1804
|
+
const sorting = createSortingAndPagination(
|
|
1805
|
+
() => $$props.cellId,
|
|
1806
|
+
() => $$props.descending,
|
|
1807
|
+
() => $$props.sortOnClick,
|
|
1808
|
+
() => $$props.offset,
|
|
1809
|
+
() => $$props.limit,
|
|
1810
|
+
() => rowCount.current,
|
|
1811
|
+
() => paginator(),
|
|
1812
|
+
() => $$props.onChange,
|
|
1813
|
+
);
|
|
1814
|
+
const rowIds = getResultSortedRowIds(
|
|
1815
|
+
() => $$props.queryId,
|
|
1816
|
+
() => sorting.sortAndOffset[0],
|
|
1817
|
+
() => sorting.sortAndOffset[1],
|
|
1818
|
+
() => sorting.sortAndOffset[2],
|
|
1819
|
+
() => $$props.limit,
|
|
1820
|
+
() => $$props.queries,
|
|
1821
|
+
);
|
|
1822
|
+
const cells = $.derived(() =>
|
|
1823
|
+
getCells(defaultCellIds.current, $$props.customCells, ResultCellView),
|
|
1824
|
+
);
|
|
1825
|
+
const cellComponentProps = $.derived(() => ({
|
|
1826
|
+
queries: $$props.queries,
|
|
1827
|
+
queryId: $$props.queryId,
|
|
1828
|
+
}));
|
|
1829
|
+
|
|
1830
|
+
HtmlTable(
|
|
1831
|
+
$$anchor,
|
|
1832
|
+
$.spread_props(() => props, {
|
|
1833
|
+
get cells() {
|
|
1834
|
+
return $.get(cells);
|
|
1835
|
+
},
|
|
1836
|
+
|
|
1837
|
+
get cellComponentProps() {
|
|
1838
|
+
return $.get(cellComponentProps);
|
|
1839
|
+
},
|
|
1840
|
+
|
|
1841
|
+
get rowIds() {
|
|
1842
|
+
return rowIds;
|
|
1843
|
+
},
|
|
1844
|
+
|
|
1845
|
+
get extraCellsBefore() {
|
|
1846
|
+
return $$props.extraCellsBefore;
|
|
1847
|
+
},
|
|
1848
|
+
|
|
1849
|
+
get extraCellsAfter() {
|
|
1850
|
+
return $$props.extraCellsAfter;
|
|
1851
|
+
},
|
|
1852
|
+
|
|
1853
|
+
get sortAndOffset() {
|
|
1854
|
+
return sorting.sortAndOffset;
|
|
1855
|
+
},
|
|
1856
|
+
|
|
1857
|
+
get handleSort() {
|
|
1858
|
+
return sorting.handleSort;
|
|
1859
|
+
},
|
|
1860
|
+
|
|
1861
|
+
get paginator() {
|
|
1862
|
+
return sorting.paginator;
|
|
1863
|
+
},
|
|
1864
|
+
}),
|
|
1865
|
+
);
|
|
1866
|
+
|
|
1867
|
+
$.pop();
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
function ResultTableInHtmlTable($$anchor, $$props) {
|
|
1871
|
+
$.push($$props, true);
|
|
1872
|
+
|
|
1873
|
+
let props = $.rest_props($$props, [
|
|
1874
|
+
'$$slots',
|
|
1875
|
+
'$$events',
|
|
1876
|
+
'$$legacy',
|
|
1877
|
+
'queryId',
|
|
1878
|
+
'queries',
|
|
1879
|
+
'customCells',
|
|
1880
|
+
'extraCellsBefore',
|
|
1881
|
+
'extraCellsAfter',
|
|
1882
|
+
]);
|
|
1883
|
+
|
|
1884
|
+
const defaultCellIds = getResultTableCellIds(
|
|
1885
|
+
() => $$props.queryId,
|
|
1886
|
+
() => $$props.queries,
|
|
1887
|
+
);
|
|
1888
|
+
const rowIds = getResultRowIds(
|
|
1889
|
+
() => $$props.queryId,
|
|
1890
|
+
() => $$props.queries,
|
|
1891
|
+
);
|
|
1892
|
+
const cells = $.derived(() =>
|
|
1893
|
+
getCells(defaultCellIds.current, $$props.customCells, ResultCellView),
|
|
1894
|
+
);
|
|
1895
|
+
const cellComponentProps = $.derived(() => ({
|
|
1896
|
+
queries: $$props.queries,
|
|
1897
|
+
queryId: $$props.queryId,
|
|
1898
|
+
}));
|
|
1899
|
+
|
|
1900
|
+
HtmlTable(
|
|
1901
|
+
$$anchor,
|
|
1902
|
+
$.spread_props(() => props, {
|
|
1903
|
+
get cells() {
|
|
1904
|
+
return $.get(cells);
|
|
1905
|
+
},
|
|
1906
|
+
|
|
1907
|
+
get cellComponentProps() {
|
|
1908
|
+
return $.get(cellComponentProps);
|
|
1909
|
+
},
|
|
1910
|
+
|
|
1911
|
+
get rowIds() {
|
|
1912
|
+
return rowIds;
|
|
1913
|
+
},
|
|
1914
|
+
|
|
1915
|
+
get extraCellsBefore() {
|
|
1916
|
+
return $$props.extraCellsBefore;
|
|
1917
|
+
},
|
|
1918
|
+
|
|
1919
|
+
get extraCellsAfter() {
|
|
1920
|
+
return $$props.extraCellsAfter;
|
|
1921
|
+
},
|
|
1922
|
+
}),
|
|
1923
|
+
);
|
|
1924
|
+
|
|
1925
|
+
$.pop();
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
function SliceInHtmlTable($$anchor, $$props) {
|
|
1929
|
+
$.push($$props, true);
|
|
1930
|
+
|
|
1931
|
+
let props = $.rest_props($$props, [
|
|
1932
|
+
'$$slots',
|
|
1933
|
+
'$$events',
|
|
1934
|
+
'$$legacy',
|
|
1935
|
+
'indexId',
|
|
1936
|
+
'sliceId',
|
|
1937
|
+
'indexes',
|
|
1938
|
+
'editable',
|
|
1939
|
+
'customCells',
|
|
1940
|
+
'extraCellsBefore',
|
|
1941
|
+
'extraCellsAfter',
|
|
1942
|
+
]);
|
|
1943
|
+
|
|
1944
|
+
const index = getIndexStoreTableId(
|
|
1945
|
+
() => $$props.indexes,
|
|
1946
|
+
() => $$props.indexId,
|
|
1947
|
+
);
|
|
1948
|
+
const defaultCellIds = getTableCellIds(
|
|
1949
|
+
() => index.tableId,
|
|
1950
|
+
() => index.store,
|
|
1951
|
+
);
|
|
1952
|
+
const rowIds = getSliceRowIds(
|
|
1953
|
+
() => $$props.indexId,
|
|
1954
|
+
() => $$props.sliceId,
|
|
1955
|
+
() => $$props.indexes,
|
|
1956
|
+
);
|
|
1957
|
+
const defaultCellComponent = $.derived(() =>
|
|
1958
|
+
$$props.editable ? EditableCellView : CellView,
|
|
1959
|
+
);
|
|
1960
|
+
const cells = $.derived(() =>
|
|
1961
|
+
getCells(
|
|
1962
|
+
defaultCellIds.current,
|
|
1963
|
+
$$props.customCells,
|
|
1964
|
+
$.get(defaultCellComponent),
|
|
1965
|
+
),
|
|
1966
|
+
);
|
|
1967
|
+
const cellComponentProps = $.derived(() => ({
|
|
1968
|
+
store: index.store,
|
|
1969
|
+
tableId: index.tableId,
|
|
1970
|
+
}));
|
|
1971
|
+
|
|
1972
|
+
HtmlTable(
|
|
1973
|
+
$$anchor,
|
|
1974
|
+
$.spread_props(() => props, {
|
|
1975
|
+
get cells() {
|
|
1976
|
+
return $.get(cells);
|
|
1977
|
+
},
|
|
1978
|
+
|
|
1979
|
+
get cellComponentProps() {
|
|
1980
|
+
return $.get(cellComponentProps);
|
|
1981
|
+
},
|
|
1982
|
+
|
|
1983
|
+
get rowIds() {
|
|
1984
|
+
return rowIds;
|
|
1985
|
+
},
|
|
1986
|
+
|
|
1987
|
+
get extraCellsBefore() {
|
|
1988
|
+
return $$props.extraCellsBefore;
|
|
1989
|
+
},
|
|
1990
|
+
|
|
1991
|
+
get extraCellsAfter() {
|
|
1992
|
+
return $$props.extraCellsAfter;
|
|
1993
|
+
},
|
|
1994
|
+
}),
|
|
1995
|
+
);
|
|
1996
|
+
|
|
1997
|
+
$.pop();
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
function SortedTableInHtmlTable($$anchor, $$props) {
|
|
2001
|
+
$.push($$props, true);
|
|
2002
|
+
|
|
2003
|
+
let paginator = $.prop($$props, 'paginator', 3, false),
|
|
2004
|
+
props = $.rest_props($$props, [
|
|
2005
|
+
'$$slots',
|
|
2006
|
+
'$$events',
|
|
2007
|
+
'$$legacy',
|
|
2008
|
+
'tableId',
|
|
2009
|
+
'cellId',
|
|
2010
|
+
'descending',
|
|
2011
|
+
'offset',
|
|
2012
|
+
'limit',
|
|
2013
|
+
'store',
|
|
2014
|
+
'editable',
|
|
2015
|
+
'sortOnClick',
|
|
2016
|
+
'paginator',
|
|
2017
|
+
'onChange',
|
|
2018
|
+
'customCells',
|
|
2019
|
+
'extraCellsBefore',
|
|
2020
|
+
'extraCellsAfter',
|
|
2021
|
+
]);
|
|
2022
|
+
|
|
2023
|
+
const defaultCellIds = getTableCellIds(
|
|
2024
|
+
() => $$props.tableId,
|
|
2025
|
+
() => $$props.store,
|
|
2026
|
+
);
|
|
2027
|
+
const rowCount = getRowCount(
|
|
2028
|
+
() => $$props.tableId,
|
|
2029
|
+
() => $$props.store,
|
|
2030
|
+
);
|
|
2031
|
+
const sorting = createSortingAndPagination(
|
|
2032
|
+
() => $$props.cellId,
|
|
2033
|
+
() => $$props.descending,
|
|
2034
|
+
() => $$props.sortOnClick,
|
|
2035
|
+
() => $$props.offset,
|
|
2036
|
+
() => $$props.limit,
|
|
2037
|
+
() => rowCount.current,
|
|
2038
|
+
() => paginator(),
|
|
2039
|
+
() => $$props.onChange,
|
|
2040
|
+
);
|
|
2041
|
+
const rowIds = getSortedRowIds(
|
|
2042
|
+
() => $$props.tableId,
|
|
2043
|
+
() => sorting.sortAndOffset[0],
|
|
2044
|
+
() => sorting.sortAndOffset[1],
|
|
2045
|
+
() => sorting.sortAndOffset[2],
|
|
2046
|
+
() => $$props.limit,
|
|
2047
|
+
() => $$props.store,
|
|
2048
|
+
);
|
|
2049
|
+
const defaultCellComponent = $.derived(() =>
|
|
2050
|
+
$$props.editable ? EditableCellView : CellView,
|
|
2051
|
+
);
|
|
2052
|
+
const cells = $.derived(() =>
|
|
2053
|
+
getCells(
|
|
2054
|
+
defaultCellIds.current,
|
|
2055
|
+
$$props.customCells,
|
|
2056
|
+
$.get(defaultCellComponent),
|
|
2057
|
+
),
|
|
2058
|
+
);
|
|
2059
|
+
const cellComponentProps = $.derived(() => ({
|
|
2060
|
+
store: $$props.store,
|
|
2061
|
+
tableId: $$props.tableId,
|
|
2062
|
+
}));
|
|
2063
|
+
|
|
2064
|
+
HtmlTable(
|
|
2065
|
+
$$anchor,
|
|
2066
|
+
$.spread_props(() => props, {
|
|
2067
|
+
get cells() {
|
|
2068
|
+
return $.get(cells);
|
|
2069
|
+
},
|
|
2070
|
+
|
|
2071
|
+
get cellComponentProps() {
|
|
2072
|
+
return $.get(cellComponentProps);
|
|
2073
|
+
},
|
|
2074
|
+
|
|
2075
|
+
get rowIds() {
|
|
2076
|
+
return rowIds;
|
|
2077
|
+
},
|
|
2078
|
+
|
|
2079
|
+
get extraCellsBefore() {
|
|
2080
|
+
return $$props.extraCellsBefore;
|
|
2081
|
+
},
|
|
2082
|
+
|
|
2083
|
+
get extraCellsAfter() {
|
|
2084
|
+
return $$props.extraCellsAfter;
|
|
2085
|
+
},
|
|
2086
|
+
|
|
2087
|
+
get sortAndOffset() {
|
|
2088
|
+
return sorting.sortAndOffset;
|
|
2089
|
+
},
|
|
2090
|
+
|
|
2091
|
+
get handleSort() {
|
|
2092
|
+
return sorting.handleSort;
|
|
2093
|
+
},
|
|
2094
|
+
|
|
2095
|
+
get paginator() {
|
|
2096
|
+
return sorting.paginator;
|
|
2097
|
+
},
|
|
2098
|
+
}),
|
|
2099
|
+
);
|
|
2100
|
+
|
|
2101
|
+
$.pop();
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
function TableInHtmlTable($$anchor, $$props) {
|
|
2105
|
+
$.push($$props, true);
|
|
2106
|
+
|
|
2107
|
+
let props = $.rest_props($$props, [
|
|
2108
|
+
'$$slots',
|
|
2109
|
+
'$$events',
|
|
2110
|
+
'$$legacy',
|
|
2111
|
+
'tableId',
|
|
2112
|
+
'store',
|
|
2113
|
+
'editable',
|
|
2114
|
+
'customCells',
|
|
2115
|
+
'extraCellsBefore',
|
|
2116
|
+
'extraCellsAfter',
|
|
2117
|
+
]);
|
|
2118
|
+
|
|
2119
|
+
const defaultCellIds = getTableCellIds(
|
|
2120
|
+
() => $$props.tableId,
|
|
2121
|
+
() => $$props.store,
|
|
2122
|
+
);
|
|
2123
|
+
const rowIds = getRowIds(
|
|
2124
|
+
() => $$props.tableId,
|
|
2125
|
+
() => $$props.store,
|
|
2126
|
+
);
|
|
2127
|
+
const defaultCellComponent = $.derived(() =>
|
|
2128
|
+
$$props.editable ? EditableCellView : CellView,
|
|
2129
|
+
);
|
|
2130
|
+
const cells = $.derived(() =>
|
|
2131
|
+
getCells(
|
|
2132
|
+
defaultCellIds.current,
|
|
2133
|
+
$$props.customCells,
|
|
2134
|
+
$.get(defaultCellComponent),
|
|
2135
|
+
),
|
|
2136
|
+
);
|
|
2137
|
+
const cellComponentProps = $.derived(() => ({
|
|
2138
|
+
store: $$props.store,
|
|
2139
|
+
tableId: $$props.tableId,
|
|
2140
|
+
}));
|
|
2141
|
+
|
|
2142
|
+
HtmlTable(
|
|
2143
|
+
$$anchor,
|
|
2144
|
+
$.spread_props(() => props, {
|
|
2145
|
+
get cells() {
|
|
2146
|
+
return $.get(cells);
|
|
2147
|
+
},
|
|
2148
|
+
|
|
2149
|
+
get cellComponentProps() {
|
|
2150
|
+
return $.get(cellComponentProps);
|
|
2151
|
+
},
|
|
2152
|
+
|
|
2153
|
+
get rowIds() {
|
|
2154
|
+
return rowIds;
|
|
2155
|
+
},
|
|
2156
|
+
|
|
2157
|
+
get extraCellsBefore() {
|
|
2158
|
+
return $$props.extraCellsBefore;
|
|
2159
|
+
},
|
|
2160
|
+
|
|
2161
|
+
get extraCellsAfter() {
|
|
2162
|
+
return $$props.extraCellsAfter;
|
|
2163
|
+
},
|
|
2164
|
+
}),
|
|
2165
|
+
);
|
|
2166
|
+
|
|
2167
|
+
$.pop();
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
function ValueView($$anchor, $$props) {
|
|
2171
|
+
$.push($$props, true);
|
|
2172
|
+
|
|
2173
|
+
const value = getValue(
|
|
2174
|
+
() => $$props.valueId,
|
|
2175
|
+
() => $$props.store,
|
|
2176
|
+
);
|
|
2177
|
+
const display = $.derived(() => '' + (value.current ?? ''));
|
|
2178
|
+
|
|
2179
|
+
const output = $.derived(() =>
|
|
2180
|
+
$$props.debugIds
|
|
2181
|
+
? `${$$props.valueId}:{${$.get(display)}}`
|
|
2182
|
+
: $.get(display),
|
|
2183
|
+
);
|
|
2184
|
+
|
|
2185
|
+
$.next();
|
|
2186
|
+
|
|
2187
|
+
var text = $.text();
|
|
2188
|
+
|
|
2189
|
+
$.template_effect(() => $.set_text(text, $.get(output)));
|
|
2190
|
+
$.append($$anchor, text);
|
|
2191
|
+
$.pop();
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
var root_2 = $.from_html(`<th> </th>`);
|
|
2195
|
+
var root_3 = $.from_html(`<th>Id</th>`);
|
|
2196
|
+
var root_4 = $.from_html(`<th> </th>`);
|
|
2197
|
+
var root_1 = $.from_html(`<thead><tr><!><!><th> </th><!></tr></thead>`);
|
|
2198
|
+
var root_6 = $.from_html(`<td><!></td>`);
|
|
2199
|
+
var root_7 = $.from_html(`<th> </th>`);
|
|
2200
|
+
var root_8 = $.from_html(`<td><!></td>`);
|
|
2201
|
+
var root_5 = $.from_html(`<tr><!><!><td><!></td><!></tr>`);
|
|
2202
|
+
var root = $.from_html(`<table><!><tbody></tbody></table>`);
|
|
2203
|
+
|
|
2204
|
+
function ValuesInHtmlTable($$anchor, $$props) {
|
|
2205
|
+
$.push($$props, true);
|
|
2206
|
+
|
|
2207
|
+
let editable = $.prop($$props, 'editable', 3, false),
|
|
2208
|
+
extraCellsBefore = $.prop($$props, 'extraCellsBefore', 19, () => []),
|
|
2209
|
+
extraCellsAfter = $.prop($$props, 'extraCellsAfter', 19, () => []);
|
|
2210
|
+
|
|
2211
|
+
const valueIds = getValueIds(() => $$props.store);
|
|
2212
|
+
const ValueComponent = $.derived(
|
|
2213
|
+
() =>
|
|
2214
|
+
$$props.valueComponent ?? (editable() ? EditableValueView : ValueView),
|
|
2215
|
+
);
|
|
2216
|
+
const extraHeadersBefore = $.derived(() =>
|
|
2217
|
+
getExtraHeaders(extraCellsBefore()),
|
|
2218
|
+
);
|
|
2219
|
+
const extraHeadersAfter = $.derived(() =>
|
|
2220
|
+
getExtraHeaders(extraCellsAfter(), 1),
|
|
2221
|
+
);
|
|
2222
|
+
var table = root();
|
|
2223
|
+
var node = $.child(table);
|
|
2224
|
+
|
|
2225
|
+
{
|
|
2226
|
+
var consequent_1 = ($$anchor) => {
|
|
2227
|
+
var thead = root_1();
|
|
2228
|
+
var tr = $.child(thead);
|
|
2229
|
+
var node_1 = $.child(tr);
|
|
2230
|
+
|
|
2231
|
+
$.each(
|
|
2232
|
+
node_1,
|
|
2233
|
+
17,
|
|
2234
|
+
() => $.get(extraHeadersBefore),
|
|
2235
|
+
(extraHeader) => extraHeader.key,
|
|
2236
|
+
($$anchor, extraHeader) => {
|
|
2237
|
+
var th = root_2();
|
|
2238
|
+
var text = $.child(th, true);
|
|
2239
|
+
|
|
2240
|
+
$.reset(th);
|
|
2241
|
+
|
|
2242
|
+
$.template_effect(() => {
|
|
2243
|
+
$.set_class(th, 1, $.clsx($.get(extraHeader).className));
|
|
2244
|
+
$.set_text(text, $.get(extraHeader).label);
|
|
2245
|
+
});
|
|
2246
|
+
|
|
2247
|
+
$.append($$anchor, th);
|
|
2248
|
+
},
|
|
2249
|
+
);
|
|
2250
|
+
|
|
2251
|
+
var node_2 = $.sibling(node_1);
|
|
2252
|
+
|
|
2253
|
+
{
|
|
2254
|
+
var consequent = ($$anchor) => {
|
|
2255
|
+
var th_1 = root_3();
|
|
2256
|
+
|
|
2257
|
+
$.append($$anchor, th_1);
|
|
2258
|
+
};
|
|
2259
|
+
|
|
2260
|
+
$.if(node_2, ($$render) => {
|
|
2261
|
+
if ($$props.idColumn !== false) $$render(consequent);
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
var th_2 = $.sibling(node_2);
|
|
2266
|
+
var text_1 = $.child(th_2, true);
|
|
2267
|
+
|
|
2268
|
+
$.reset(th_2);
|
|
2269
|
+
|
|
2270
|
+
var node_3 = $.sibling(th_2);
|
|
2271
|
+
|
|
2272
|
+
$.each(
|
|
2273
|
+
node_3,
|
|
2274
|
+
17,
|
|
2275
|
+
() => $.get(extraHeadersAfter),
|
|
2276
|
+
(extraHeader) => extraHeader.key,
|
|
2277
|
+
($$anchor, extraHeader) => {
|
|
2278
|
+
var th_3 = root_4();
|
|
2279
|
+
var text_2 = $.child(th_3, true);
|
|
2280
|
+
|
|
2281
|
+
$.reset(th_3);
|
|
2282
|
+
|
|
2283
|
+
$.template_effect(() => {
|
|
2284
|
+
$.set_class(th_3, 1, $.clsx($.get(extraHeader).className));
|
|
2285
|
+
$.set_text(text_2, $.get(extraHeader).label);
|
|
2286
|
+
});
|
|
2287
|
+
|
|
2288
|
+
$.append($$anchor, th_3);
|
|
2289
|
+
},
|
|
2290
|
+
);
|
|
2291
|
+
|
|
2292
|
+
$.reset(tr);
|
|
2293
|
+
$.reset(thead);
|
|
2294
|
+
$.template_effect(() => $.set_text(text_1, VALUE));
|
|
2295
|
+
$.append($$anchor, thead);
|
|
2296
|
+
};
|
|
2297
|
+
|
|
2298
|
+
$.if(node, ($$render) => {
|
|
2299
|
+
if ($$props.headerRow !== false) $$render(consequent_1);
|
|
2300
|
+
});
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
var tbody = $.sibling(node);
|
|
2304
|
+
|
|
2305
|
+
$.each(
|
|
2306
|
+
tbody,
|
|
2307
|
+
20,
|
|
2308
|
+
() => valueIds.current,
|
|
2309
|
+
(valueId) => valueId,
|
|
2310
|
+
($$anchor, valueId) => {
|
|
2311
|
+
const valueProps = $.derived(() => ({valueId, store: $$props.store}));
|
|
2312
|
+
var tr_1 = root_5();
|
|
2313
|
+
var node_4 = $.child(tr_1);
|
|
2314
|
+
|
|
2315
|
+
$.each(
|
|
2316
|
+
node_4,
|
|
2317
|
+
19,
|
|
2318
|
+
extraCellsBefore,
|
|
2319
|
+
(extraCell, index) => extraKey(index, 0),
|
|
2320
|
+
($$anchor, extraCell) => {
|
|
2321
|
+
const ExtraCell = $.derived(() => $.get(extraCell).component);
|
|
2322
|
+
var td = root_6();
|
|
2323
|
+
var node_5 = $.child(td);
|
|
2324
|
+
|
|
2325
|
+
$.component(
|
|
2326
|
+
node_5,
|
|
2327
|
+
() => $.get(ExtraCell),
|
|
2328
|
+
($$anchor, ExtraCell_1) => {
|
|
2329
|
+
ExtraCell_1(
|
|
2330
|
+
$$anchor,
|
|
2331
|
+
$.spread_props(() => $.get(valueProps)),
|
|
2332
|
+
);
|
|
2333
|
+
},
|
|
2334
|
+
);
|
|
2335
|
+
|
|
2336
|
+
$.reset(td);
|
|
2337
|
+
$.template_effect(() => $.set_class(td, 1, $.clsx(EXTRA)));
|
|
2338
|
+
$.append($$anchor, td);
|
|
2339
|
+
},
|
|
2340
|
+
);
|
|
2341
|
+
|
|
2342
|
+
var node_6 = $.sibling(node_4);
|
|
2343
|
+
|
|
2344
|
+
{
|
|
2345
|
+
var consequent_2 = ($$anchor) => {
|
|
2346
|
+
var th_4 = root_7();
|
|
2347
|
+
var text_3 = $.child(th_4, true);
|
|
2348
|
+
|
|
2349
|
+
$.reset(th_4);
|
|
2350
|
+
|
|
2351
|
+
$.template_effect(() => {
|
|
2352
|
+
$.set_attribute(th_4, 'title', valueId);
|
|
2353
|
+
$.set_text(text_3, valueId);
|
|
2354
|
+
});
|
|
2355
|
+
|
|
2356
|
+
$.append($$anchor, th_4);
|
|
2357
|
+
};
|
|
2358
|
+
|
|
2359
|
+
var d = $.derived(() => !isFalse($$props.idColumn));
|
|
2360
|
+
|
|
2361
|
+
$.if(node_6, ($$render) => {
|
|
2362
|
+
if ($.get(d)) $$render(consequent_2);
|
|
2363
|
+
});
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
var td_1 = $.sibling(node_6);
|
|
2367
|
+
var node_7 = $.child(td_1);
|
|
2368
|
+
|
|
2369
|
+
{
|
|
2370
|
+
let $0 = $.derived(() =>
|
|
2371
|
+
getProps($$props.getValueComponentProps, valueId),
|
|
2372
|
+
);
|
|
2373
|
+
|
|
2374
|
+
$.component(
|
|
2375
|
+
node_7,
|
|
2376
|
+
() => $.get(ValueComponent),
|
|
2377
|
+
($$anchor, ValueComponent_1) => {
|
|
2378
|
+
ValueComponent_1(
|
|
2379
|
+
$$anchor,
|
|
2380
|
+
$.spread_props(
|
|
2381
|
+
() => $.get($0),
|
|
2382
|
+
() => $.get(valueProps),
|
|
2383
|
+
),
|
|
2384
|
+
);
|
|
2385
|
+
},
|
|
2386
|
+
);
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
$.reset(td_1);
|
|
2390
|
+
|
|
2391
|
+
var node_8 = $.sibling(td_1);
|
|
2392
|
+
|
|
2393
|
+
$.each(
|
|
2394
|
+
node_8,
|
|
2395
|
+
19,
|
|
2396
|
+
extraCellsAfter,
|
|
2397
|
+
(extraCell, index) => extraKey(index, 1),
|
|
2398
|
+
($$anchor, extraCell) => {
|
|
2399
|
+
const ExtraCell = $.derived(() => $.get(extraCell).component);
|
|
2400
|
+
var td_2 = root_8();
|
|
2401
|
+
var node_9 = $.child(td_2);
|
|
2402
|
+
|
|
2403
|
+
$.component(
|
|
2404
|
+
node_9,
|
|
2405
|
+
() => $.get(ExtraCell),
|
|
2406
|
+
($$anchor, ExtraCell_2) => {
|
|
2407
|
+
ExtraCell_2(
|
|
2408
|
+
$$anchor,
|
|
2409
|
+
$.spread_props(() => $.get(valueProps)),
|
|
2410
|
+
);
|
|
2411
|
+
},
|
|
2412
|
+
);
|
|
2413
|
+
|
|
2414
|
+
$.reset(td_2);
|
|
2415
|
+
$.template_effect(() => $.set_class(td_2, 1, $.clsx(EXTRA)));
|
|
2416
|
+
$.append($$anchor, td_2);
|
|
2417
|
+
},
|
|
2418
|
+
);
|
|
2419
|
+
|
|
2420
|
+
$.reset(tr_1);
|
|
2421
|
+
$.append($$anchor, tr_1);
|
|
2422
|
+
},
|
|
2423
|
+
);
|
|
2424
|
+
|
|
2425
|
+
$.reset(tbody);
|
|
2426
|
+
$.reset(table);
|
|
2427
|
+
$.template_effect(() => $.set_class(table, 1, $.clsx($$props.className)));
|
|
2428
|
+
$.append($$anchor, table);
|
|
2429
|
+
$.pop();
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
export {
|
|
2433
|
+
EditableCellView,
|
|
2434
|
+
EditableValueView,
|
|
2435
|
+
RelationshipInHtmlTable,
|
|
2436
|
+
ResultSortedTableInHtmlTable,
|
|
2437
|
+
ResultTableInHtmlTable,
|
|
2438
|
+
SliceInHtmlTable,
|
|
2439
|
+
SortedTableInHtmlTable,
|
|
2440
|
+
SortedTablePaginator,
|
|
2441
|
+
TableInHtmlTable,
|
|
2442
|
+
ValuesInHtmlTable,
|
|
2443
|
+
};
|