sveltekit-ui 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/Content/index.svelte +12 -12
- package/dist/Components/Content/index.svelte.js +73 -61
- package/dist/Components/ContentInput/AttributesInput/CustomConfig/Dropdown/index.svelte.js +1 -5
- package/dist/Components/ContentInput/AttributesInput/CustomConfig/Number/index.svelte.js +1 -2
- package/dist/Components/ContentInput/AttributesInput/CustomConfig/Qr/index.svelte.js +1 -3
- package/dist/Components/ContentInput/AttributesInput/CustomConfig/Slider/index.svelte.js +2 -4
- package/dist/Components/ContentInput/AttributesInput/CustomConfig/TableAdvanced/index.svelte.js +28 -32
- package/dist/Components/ContentInput/AttributesInput/CustomConfig/TextInput/index.svelte.js +1 -3
- package/dist/Components/ContentInput/AttributesInput/CustomConfig/TimeInput/index.svelte.js +1 -3
- package/dist/Components/ContentInput/AttributesInput/DefinedTypeInput/index.svelte.js +3 -13
- package/dist/Components/ContentInput/AttributesInput/index.svelte +1 -0
- package/dist/Components/ContentInput/AttributesInput/index.svelte.js +89 -120
- package/dist/Components/ContentInput/index.svelte.js +38 -62
- package/dist/Components/DataTypeInput/index.svelte.js +0 -3
- package/dist/Components/IconInput/index.svelte +1 -1
- package/dist/Components/TableAdvanced/ColumnInput/index.svelte.js +16 -64
- package/dist/Components/TableAdvanced/SortByInput/index.svelte.js +2 -1
- package/dist/Components/TableAdvanced/index.svelte.js +124 -98
- package/dist/Components/TextInput/index.svelte.js +12 -0
- package/dist/Components/VariablePathInput/index.svelte +47 -93
- package/dist/Components/VariablePathInput/index.svelte.js +205 -191
- package/dist/client/astc_formatting/index.js +15 -58
- package/dist/client/docs/index.js +4 -23
- package/dist/client/index.js +86 -90
- package/dist/client/types/index.js +2 -0
- package/dist/index.js +2 -0
- package/package.json +4 -4
- package/src/lib/Components/Content/index.svelte +12 -12
- package/src/lib/Components/Content/index.svelte.js +73 -61
- package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/Dropdown/index.svelte.js +1 -5
- package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/Number/index.svelte.js +1 -2
- package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/Qr/index.svelte.js +1 -3
- package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/Slider/index.svelte.js +2 -4
- package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/TableAdvanced/index.svelte.js +28 -32
- package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/TextInput/index.svelte.js +1 -3
- package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/TimeInput/index.svelte.js +1 -3
- package/src/lib/Components/ContentInput/AttributesInput/DefinedTypeInput/index.svelte.js +3 -13
- package/src/lib/Components/ContentInput/AttributesInput/index.svelte +1 -0
- package/src/lib/Components/ContentInput/AttributesInput/index.svelte.js +89 -120
- package/src/lib/Components/ContentInput/index.svelte.js +38 -62
- package/src/lib/Components/DataTypeInput/index.svelte.js +0 -3
- package/src/lib/Components/IconInput/index.svelte +1 -1
- package/src/lib/Components/TableAdvanced/ColumnInput/index.svelte.js +16 -64
- package/src/lib/Components/TableAdvanced/SortByInput/index.svelte.js +2 -1
- package/src/lib/Components/TableAdvanced/index.svelte.js +124 -98
- package/src/lib/Components/TextInput/index.svelte.js +12 -0
- package/src/lib/Components/VariablePathInput/index.svelte +47 -93
- package/src/lib/Components/VariablePathInput/index.svelte.js +205 -191
- package/src/lib/client/astc_formatting/index.js +15 -58
- package/src/lib/client/docs/index.js +4 -23
- package/src/lib/client/index.js +86 -90
- package/src/lib/client/types/index.js +2 -0
- package/src/lib/index.js +2 -0
- package/src/routes/[component]/Showcase/Content/index.svelte +49 -83
- package/src/routes/[component]/Showcase/ContentInput/index.svelte +11 -13
- package/src/routes/[component]/Showcase/TableAdvanced/index.svelte +108 -418
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
selector_id: "dvobhkqp",
|
|
41
41
|
children: [],
|
|
42
42
|
attributes: {
|
|
43
|
-
content_from_variable_path: ["
|
|
43
|
+
content_from_variable_path: ["rows", ["row_i"], "id"],
|
|
44
44
|
size: 10,
|
|
45
45
|
},
|
|
46
46
|
},
|
|
@@ -58,68 +58,35 @@
|
|
|
58
58
|
selector_id: "div_escitwrx",
|
|
59
59
|
children: [
|
|
60
60
|
{
|
|
61
|
-
type_id: "
|
|
62
|
-
selector_id: "
|
|
61
|
+
type_id: "div",
|
|
62
|
+
selector_id: "ymcklbcy",
|
|
63
63
|
children: [
|
|
64
64
|
{
|
|
65
65
|
type_id: "div",
|
|
66
|
-
selector_id: "
|
|
66
|
+
selector_id: "drsdciju",
|
|
67
67
|
children: [
|
|
68
68
|
{
|
|
69
|
-
type_id: "
|
|
70
|
-
selector_id: "
|
|
71
|
-
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
children: [],
|
|
84
|
-
attributes: {
|
|
85
|
-
type: "number",
|
|
86
|
-
val_from_variable_path: [
|
|
87
|
-
"variables",
|
|
88
|
-
"rows",
|
|
89
|
-
["loops", 1],
|
|
90
|
-
"sharks",
|
|
91
|
-
["loops", 0],
|
|
92
|
-
"seat_order_l_to_r",
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
attributes: {},
|
|
69
|
+
type_id: "base_text",
|
|
70
|
+
selector_id: "oejzzhrk",
|
|
71
|
+
children: [],
|
|
72
|
+
attributes: {
|
|
73
|
+
content: "label:",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type_id: "text_input",
|
|
78
|
+
selector_id: "lkblpxsl",
|
|
79
|
+
children: [],
|
|
80
|
+
attributes: {
|
|
81
|
+
val_from_variable_path: ["rows", ["row_i"], "label"],
|
|
82
|
+
},
|
|
98
83
|
},
|
|
99
84
|
],
|
|
100
85
|
attributes: {},
|
|
101
86
|
},
|
|
102
87
|
],
|
|
103
88
|
attributes: {
|
|
104
|
-
val_from_variable_path: ["
|
|
105
|
-
property_key_table_id: "fwzniuwaxgplzhakcpqx",
|
|
106
|
-
label: "sharks",
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
attributes: {},
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
type_id: "div",
|
|
114
|
-
selector_id: "div_chvlwjbr",
|
|
115
|
-
children: [
|
|
116
|
-
{
|
|
117
|
-
type_id: "table_row_id_input",
|
|
118
|
-
selector_id: "rjoyxsas",
|
|
119
|
-
children: [],
|
|
120
|
-
attributes: {
|
|
121
|
-
table_id: "gqcilfsvgggxouxxupzq",
|
|
122
|
-
label: "season",
|
|
89
|
+
val_from_variable_path: ["rows", ["row_i"], "label"],
|
|
123
90
|
},
|
|
124
91
|
},
|
|
125
92
|
],
|
|
@@ -127,127 +94,38 @@
|
|
|
127
94
|
},
|
|
128
95
|
{
|
|
129
96
|
type_id: "div",
|
|
130
|
-
selector_id: "
|
|
131
|
-
children: [
|
|
132
|
-
{
|
|
133
|
-
type_id: "text_input",
|
|
134
|
-
selector_id: "qaqweuks",
|
|
135
|
-
children: [],
|
|
136
|
-
attributes: {
|
|
137
|
-
type: "number",
|
|
138
|
-
val_from_variable_path: ["variables", "rows", ["loops", 0], "season_number"],
|
|
139
|
-
label: "season_number",
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
attributes: {},
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
type_id: "div",
|
|
147
|
-
selector_id: "div_rqanuqun",
|
|
148
|
-
children: [
|
|
149
|
-
{
|
|
150
|
-
type_id: "text_input",
|
|
151
|
-
selector_id: "pvabnllw",
|
|
152
|
-
children: [],
|
|
153
|
-
attributes: {
|
|
154
|
-
type: "number",
|
|
155
|
-
val_from_variable_path: ["variables", "rows", ["loops", 0], "episode_number"],
|
|
156
|
-
label: "episode_number",
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
attributes: {},
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
type_id: "div",
|
|
164
|
-
selector_id: "div_sqzsqmdj",
|
|
165
|
-
children: [
|
|
166
|
-
{
|
|
167
|
-
type_id: "text_input",
|
|
168
|
-
selector_id: "oomvgein",
|
|
169
|
-
children: [],
|
|
170
|
-
attributes: {
|
|
171
|
-
type: "number",
|
|
172
|
-
val_from_variable_path: ["variables", "rows", ["loops", 0], "episode_number_overall"],
|
|
173
|
-
label: "episode_number_overall",
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
],
|
|
177
|
-
attributes: {},
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
type_id: "div",
|
|
181
|
-
selector_id: "div_qtmiebqv",
|
|
182
|
-
children: [
|
|
183
|
-
{
|
|
184
|
-
type_id: "text_input",
|
|
185
|
-
selector_id: "wogzeujk",
|
|
186
|
-
children: [],
|
|
187
|
-
attributes: {
|
|
188
|
-
type: "number",
|
|
189
|
-
val_from_variable_path: ["variables", "rows", ["loops", 0], "viewers_in_millions"],
|
|
190
|
-
label: "viewers_in_millions",
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
],
|
|
194
|
-
attributes: {},
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
type_id: "div",
|
|
198
|
-
selector_id: "div_xjoebvfy",
|
|
199
|
-
children: [
|
|
200
|
-
{
|
|
201
|
-
type_id: "time_input",
|
|
202
|
-
selector_id: "ypqcitbz",
|
|
203
|
-
children: [],
|
|
204
|
-
attributes: {
|
|
205
|
-
val_type: "epoch",
|
|
206
|
-
val_from_variable_path: ["variables", "rows", ["loops", 0], "air_date"],
|
|
207
|
-
label: "air_date",
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
],
|
|
211
|
-
attributes: {},
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
type_id: "div",
|
|
215
|
-
selector_id: "div_xzrkrlhc",
|
|
216
|
-
children: [
|
|
217
|
-
{
|
|
218
|
-
type_id: "text_input",
|
|
219
|
-
selector_id: "zcbbkbqx",
|
|
220
|
-
children: [],
|
|
221
|
-
attributes: {
|
|
222
|
-
type: "number",
|
|
223
|
-
val_from_variable_path: ["variables", "rows", ["loops", 0], "prod_code"],
|
|
224
|
-
label: "prod_code",
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
],
|
|
228
|
-
attributes: {},
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
type_id: "div",
|
|
232
|
-
selector_id: "div_xzaarlhc",
|
|
97
|
+
selector_id: "div_escitwrx",
|
|
233
98
|
children: [
|
|
234
99
|
{
|
|
235
|
-
type_id: "
|
|
236
|
-
selector_id: "
|
|
237
|
-
children: [
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
100
|
+
type_id: "div",
|
|
101
|
+
selector_id: "ymcklbcy",
|
|
102
|
+
children: [
|
|
103
|
+
{
|
|
104
|
+
type_id: "div",
|
|
105
|
+
selector_id: "drsdciju",
|
|
106
|
+
children: [
|
|
107
|
+
{
|
|
108
|
+
type_id: "base_text",
|
|
109
|
+
selector_id: "oejzzhrk",
|
|
110
|
+
children: [],
|
|
111
|
+
attributes: {
|
|
112
|
+
content: "fav_color:",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type_id: "color_input",
|
|
117
|
+
selector_id: "lkblpxsl",
|
|
118
|
+
children: [],
|
|
119
|
+
attributes: {
|
|
120
|
+
val_from_variable_path: ["rows", ["row_i"], "fav_color"],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
attributes: {},
|
|
125
|
+
},
|
|
126
|
+
],
|
|
246
127
|
attributes: {
|
|
247
|
-
|
|
248
|
-
is_popover_button: true,
|
|
249
|
-
is_popover: true,
|
|
250
|
-
val_from_variable_path: ["variables", "rows", ["loops", 0], "location"],
|
|
128
|
+
val_from_variable_path: ["rows", ["row_i"], "fav_color"],
|
|
251
129
|
},
|
|
252
130
|
},
|
|
253
131
|
],
|
|
@@ -286,7 +164,7 @@
|
|
|
286
164
|
children: [],
|
|
287
165
|
attributes: {
|
|
288
166
|
format: "epoch",
|
|
289
|
-
val_from_variable_path: ["
|
|
167
|
+
val_from_variable_path: ["rows", ["row_i"], "db_epoch_created"],
|
|
290
168
|
},
|
|
291
169
|
},
|
|
292
170
|
{
|
|
@@ -331,7 +209,7 @@
|
|
|
331
209
|
children: [],
|
|
332
210
|
attributes: {
|
|
333
211
|
format: "epoch",
|
|
334
|
-
val_from_variable_path: ["
|
|
212
|
+
val_from_variable_path: ["rows", ["row_i"], "db_epoch_updated"],
|
|
335
213
|
},
|
|
336
214
|
},
|
|
337
215
|
{
|
|
@@ -347,102 +225,11 @@
|
|
|
347
225
|
}
|
|
348
226
|
|
|
349
227
|
let data = $state({
|
|
350
|
-
id: "
|
|
351
|
-
name: "
|
|
352
|
-
rows: [
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
label: null,
|
|
356
|
-
fav_color: null,
|
|
357
|
-
db_epoch_created: 1723421882,
|
|
358
|
-
db_epoch_updated: 1723421882,
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
id: "wqhfxttzpwdpkawzusyt",
|
|
362
|
-
label: "tint bl",
|
|
363
|
-
fav_color: {
|
|
364
|
-
c: 16,
|
|
365
|
-
h: 17,
|
|
366
|
-
l: 5,
|
|
367
|
-
o: 16,
|
|
368
|
-
is_dark_theme_invert: true,
|
|
369
|
-
},
|
|
370
|
-
db_epoch_created: 1723421882,
|
|
371
|
-
db_epoch_updated: 1723422096,
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
id: "egrdjfqlcysykmpwudsp",
|
|
375
|
-
label: null,
|
|
376
|
-
fav_color: {
|
|
377
|
-
c: 10,
|
|
378
|
-
h: 4,
|
|
379
|
-
l: 1,
|
|
380
|
-
o: 24,
|
|
381
|
-
is_dark_theme_invert: true,
|
|
382
|
-
},
|
|
383
|
-
db_epoch_created: 1723422106,
|
|
384
|
-
db_epoch_updated: 1723422106,
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
id: "zbcqvteloefgebbcwrnd",
|
|
388
|
-
label: null,
|
|
389
|
-
fav_color: {
|
|
390
|
-
c: 10,
|
|
391
|
-
h: 4,
|
|
392
|
-
l: 1,
|
|
393
|
-
o: 24,
|
|
394
|
-
is_dark_theme_invert: true,
|
|
395
|
-
},
|
|
396
|
-
db_epoch_created: 1723423614,
|
|
397
|
-
db_epoch_updated: 1723423614,
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
id: "ennjpaemwacveifswbwq",
|
|
401
|
-
label: null,
|
|
402
|
-
fav_color: null,
|
|
403
|
-
db_epoch_created: 1723423614,
|
|
404
|
-
db_epoch_updated: 1723423614,
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
id: "redpwlvrmboleibyawxj",
|
|
408
|
-
label: "tint bl",
|
|
409
|
-
fav_color: {
|
|
410
|
-
c: 16,
|
|
411
|
-
h: 17,
|
|
412
|
-
l: 5,
|
|
413
|
-
o: 16,
|
|
414
|
-
is_dark_theme_invert: true,
|
|
415
|
-
},
|
|
416
|
-
db_epoch_created: 1723423614,
|
|
417
|
-
db_epoch_updated: 1723423614,
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
id: "ugarkuprolztkecxqody",
|
|
421
|
-
label: "not invert",
|
|
422
|
-
fav_color: {
|
|
423
|
-
c: 12,
|
|
424
|
-
h: 14,
|
|
425
|
-
l: 4,
|
|
426
|
-
o: 24,
|
|
427
|
-
is_dark_theme_invert: false,
|
|
428
|
-
},
|
|
429
|
-
db_epoch_created: 1723423614,
|
|
430
|
-
db_epoch_updated: 1723423678,
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
id: "dyfidxdkepupllmccxmb",
|
|
434
|
-
label: "yes invert",
|
|
435
|
-
fav_color: {
|
|
436
|
-
c: 12,
|
|
437
|
-
h: 14,
|
|
438
|
-
l: 4,
|
|
439
|
-
o: 24,
|
|
440
|
-
is_dark_theme_invert: true,
|
|
441
|
-
},
|
|
442
|
-
db_epoch_created: 1723421882,
|
|
443
|
-
db_epoch_updated: 1723423732,
|
|
444
|
-
},
|
|
445
|
-
],
|
|
228
|
+
id: "cbsemvrsoidhrzyhugue",
|
|
229
|
+
name: "test",
|
|
230
|
+
rows: [],
|
|
231
|
+
limit: 100,
|
|
232
|
+
offset: 0,
|
|
446
233
|
columns: {
|
|
447
234
|
id: {
|
|
448
235
|
is_fixed: true,
|
|
@@ -481,103 +268,50 @@
|
|
|
481
268
|
is_autogenerated: true,
|
|
482
269
|
is_force_uniqueness: false,
|
|
483
270
|
},
|
|
484
|
-
|
|
271
|
+
ttttt: {
|
|
485
272
|
is_fixed: false,
|
|
486
273
|
is_shown: true,
|
|
487
274
|
alignment: "left",
|
|
488
|
-
max_width:
|
|
489
|
-
min_width:
|
|
490
|
-
description:
|
|
275
|
+
max_width: 30,
|
|
276
|
+
min_width: 20,
|
|
277
|
+
description: "ffff",
|
|
491
278
|
is_nullable: true,
|
|
492
279
|
body_content: {
|
|
493
|
-
type_id: "
|
|
280
|
+
type_id: "number",
|
|
494
281
|
children: [],
|
|
495
282
|
attributes: {
|
|
496
|
-
|
|
497
|
-
content: null,
|
|
498
|
-
content_from_variable_path: ["variables", "rows", ["loops", 0], "label"],
|
|
283
|
+
val_from_variable_path: ["rows", ["row_i"], "ttttt"],
|
|
499
284
|
},
|
|
500
|
-
selector_id: "
|
|
285
|
+
selector_id: "vukyefhw",
|
|
501
286
|
},
|
|
502
287
|
db_data_type: {
|
|
503
|
-
type: "
|
|
288
|
+
type: "int_literal",
|
|
504
289
|
attributes: {},
|
|
505
290
|
},
|
|
506
291
|
is_db_column: true,
|
|
292
|
+
is_updatable: false,
|
|
507
293
|
default_value: null,
|
|
508
294
|
display_order: 1,
|
|
509
|
-
postgres_type: "
|
|
295
|
+
postgres_type: "int",
|
|
510
296
|
header_content: {
|
|
511
297
|
type_id: "base_text",
|
|
512
298
|
children: [],
|
|
513
299
|
attributes: {
|
|
514
|
-
|
|
515
|
-
content: "Label",
|
|
516
|
-
content_from_variable_path: null,
|
|
300
|
+
content: "Ttttt",
|
|
517
301
|
},
|
|
518
|
-
selector_id: "
|
|
519
|
-
},
|
|
520
|
-
is_primary_key: false,
|
|
521
|
-
is_autogenerated: false,
|
|
522
|
-
is_force_uniqueness: false,
|
|
523
|
-
},
|
|
524
|
-
fav_color: {
|
|
525
|
-
is_fixed: false,
|
|
526
|
-
is_shown: true,
|
|
527
|
-
alignment: "right",
|
|
528
|
-
max_width: 25,
|
|
529
|
-
min_width: 3,
|
|
530
|
-
description: null,
|
|
531
|
-
is_nullable: true,
|
|
532
|
-
body_content: {
|
|
533
|
-
type_id: "color",
|
|
534
|
-
children: [],
|
|
535
|
-
attributes: {
|
|
536
|
-
val: {
|
|
537
|
-
c: 21,
|
|
538
|
-
h: 2,
|
|
539
|
-
l: 6,
|
|
540
|
-
o: 24,
|
|
541
|
-
is_dark_theme_invert: true,
|
|
542
|
-
},
|
|
543
|
-
val_from_variable_path: ["variables", "rows", ["loops", 0], "fav_color"],
|
|
544
|
-
},
|
|
545
|
-
selector_id: "anpwr",
|
|
546
|
-
},
|
|
547
|
-
db_data_type: {
|
|
548
|
-
type: "color_literal",
|
|
549
|
-
attributes: {},
|
|
550
|
-
},
|
|
551
|
-
is_db_column: true,
|
|
552
|
-
default_value: null,
|
|
553
|
-
display_order: 2,
|
|
554
|
-
postgres_type: "jsonb",
|
|
555
|
-
header_content: {
|
|
556
|
-
type_id: "base_text",
|
|
557
|
-
children: [],
|
|
558
|
-
attributes: {
|
|
559
|
-
color: {
|
|
560
|
-
c: 10,
|
|
561
|
-
h: 15,
|
|
562
|
-
l: 19,
|
|
563
|
-
o: 24,
|
|
564
|
-
is_dark_theme_invert: true,
|
|
565
|
-
},
|
|
566
|
-
content: "Fav Color",
|
|
567
|
-
content_from_variable_path: null,
|
|
568
|
-
},
|
|
569
|
-
selector_id: "gcvda",
|
|
302
|
+
selector_id: "lpcqsjlq",
|
|
570
303
|
},
|
|
571
304
|
is_primary_key: false,
|
|
572
305
|
is_autogenerated: false,
|
|
573
306
|
is_force_uniqueness: false,
|
|
307
|
+
is_use_in_short_display: false,
|
|
574
308
|
},
|
|
575
309
|
db_epoch_created: {
|
|
576
310
|
is_fixed: false,
|
|
577
311
|
is_shown: true,
|
|
578
312
|
alignment: "left",
|
|
579
313
|
max_width: 50,
|
|
580
|
-
min_width:
|
|
314
|
+
min_width: 20,
|
|
581
315
|
description: null,
|
|
582
316
|
is_nullable: false,
|
|
583
317
|
body_content: {
|
|
@@ -587,7 +321,7 @@
|
|
|
587
321
|
format: "epoch",
|
|
588
322
|
val_from_variable_path: ["variables", "rows", ["loops", 0], "db_epoch_created"],
|
|
589
323
|
},
|
|
590
|
-
selector_id: "
|
|
324
|
+
selector_id: "time_urzjm",
|
|
591
325
|
},
|
|
592
326
|
db_data_type: {
|
|
593
327
|
type: "epoch_literal",
|
|
@@ -595,7 +329,7 @@
|
|
|
595
329
|
},
|
|
596
330
|
is_db_column: true,
|
|
597
331
|
default_value: null,
|
|
598
|
-
display_order:
|
|
332
|
+
display_order: 2,
|
|
599
333
|
postgres_type: "bigint",
|
|
600
334
|
header_content: {
|
|
601
335
|
type_id: "base_text",
|
|
@@ -614,7 +348,7 @@
|
|
|
614
348
|
is_shown: true,
|
|
615
349
|
alignment: "left",
|
|
616
350
|
max_width: 50,
|
|
617
|
-
min_width:
|
|
351
|
+
min_width: 20,
|
|
618
352
|
description: null,
|
|
619
353
|
is_nullable: false,
|
|
620
354
|
body_content: {
|
|
@@ -624,7 +358,7 @@
|
|
|
624
358
|
format: "epoch",
|
|
625
359
|
val_from_variable_path: ["variables", "rows", ["loops", 0], "db_epoch_updated"],
|
|
626
360
|
},
|
|
627
|
-
selector_id: "
|
|
361
|
+
selector_id: "epoch_rozyy",
|
|
628
362
|
},
|
|
629
363
|
db_data_type: {
|
|
630
364
|
type: "epoch_literal",
|
|
@@ -632,7 +366,7 @@
|
|
|
632
366
|
},
|
|
633
367
|
is_db_column: true,
|
|
634
368
|
default_value: null,
|
|
635
|
-
display_order:
|
|
369
|
+
display_order: 3,
|
|
636
370
|
postgres_type: "bigint",
|
|
637
371
|
header_content: {
|
|
638
372
|
type_id: "base_text",
|
|
@@ -646,76 +380,25 @@
|
|
|
646
380
|
is_autogenerated: true,
|
|
647
381
|
is_force_uniqueness: false,
|
|
648
382
|
},
|
|
649
|
-
location: {
|
|
650
|
-
is_fixed: false,
|
|
651
|
-
is_shown: true,
|
|
652
|
-
alignment: "left",
|
|
653
|
-
max_width: 25,
|
|
654
|
-
min_width: 3,
|
|
655
|
-
description: null,
|
|
656
|
-
is_nullable: true,
|
|
657
|
-
body_content: {
|
|
658
|
-
type_id: "location",
|
|
659
|
-
children: [],
|
|
660
|
-
attributes: {
|
|
661
|
-
is_popover: true,
|
|
662
|
-
val_from_variable_path: ["variables", "rows", ["loops", 0], "location"],
|
|
663
|
-
},
|
|
664
|
-
selector_id: "meqwu",
|
|
665
|
-
},
|
|
666
|
-
db_data_type: {
|
|
667
|
-
type: "location_literal",
|
|
668
|
-
attributes: {},
|
|
669
|
-
},
|
|
670
|
-
is_db_column: true,
|
|
671
|
-
default_value: null,
|
|
672
|
-
display_order: 1,
|
|
673
|
-
postgres_type: "text",
|
|
674
|
-
header_content: {
|
|
675
|
-
type_id: "base_text",
|
|
676
|
-
children: [],
|
|
677
|
-
attributes: {
|
|
678
|
-
color: null,
|
|
679
|
-
content: "Label",
|
|
680
|
-
content_from_variable_path: null,
|
|
681
|
-
},
|
|
682
|
-
selector_id: "fbhid",
|
|
683
|
-
},
|
|
684
|
-
is_primary_key: false,
|
|
685
|
-
is_autogenerated: false,
|
|
686
|
-
is_force_uniqueness: false,
|
|
687
|
-
},
|
|
688
383
|
},
|
|
689
|
-
account_id: "
|
|
690
|
-
total_rows:
|
|
691
|
-
description: "
|
|
384
|
+
account_id: "kmjexchofxophkkuqfvp",
|
|
385
|
+
total_rows: 0,
|
|
386
|
+
description: "need to make sure new loop stuff works",
|
|
692
387
|
default_sort: null,
|
|
693
|
-
|
|
694
|
-
row_input_content: test_row_input_content,
|
|
388
|
+
row_input_content: null,
|
|
695
389
|
row_searchable_content: null,
|
|
696
390
|
})
|
|
697
391
|
|
|
698
|
-
let
|
|
699
|
-
|
|
392
|
+
let row_data_type = {
|
|
393
|
+
type: "object_literal",
|
|
394
|
+
attributes: {},
|
|
395
|
+
properties: Object.fromEntries(Object.entries(data?.columns || {}).map(([key, val]) => [key, val?.db_data_type])),
|
|
396
|
+
}
|
|
700
397
|
|
|
701
|
-
|
|
702
|
-
columns: null,
|
|
703
|
-
rows_data: null,
|
|
704
|
-
rows_data_from_variable_path: null,
|
|
705
|
-
is_data_editable: true,
|
|
706
|
-
is_paginate: true,
|
|
707
|
-
is_show_pagination: true,
|
|
708
|
-
is_show_load_more_button: true,
|
|
709
|
-
is_show_table_search: true,
|
|
710
|
-
is_show_rows_per_page_input: true,
|
|
711
|
-
sort_by: null,
|
|
712
|
-
filter: null,
|
|
713
|
-
row_searchable_content: null,
|
|
714
|
-
row_input_content: null,
|
|
715
|
-
})
|
|
398
|
+
console.log("row_data_type", row_data_type)
|
|
716
399
|
|
|
400
|
+
let table_manager = $state(null)
|
|
717
401
|
let variables = $state({ rows: data?.rows })
|
|
718
|
-
let variables_data_type = $state(null)
|
|
719
402
|
|
|
720
403
|
table_manager = create_table_advanced_manager({
|
|
721
404
|
table_id: "abcdefg",
|
|
@@ -723,9 +406,10 @@
|
|
|
723
406
|
table_description: "This has data about uh...stuff...idk",
|
|
724
407
|
mapkit_js_token: PUBLIC_APPLE_MAPKIT_JS_API_KEY,
|
|
725
408
|
table_options: [{ key: "test", name: "Test" }],
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
409
|
+
definition_stack: [{ ...variables }],
|
|
410
|
+
rows_data_from_variable_path: ["rows"],
|
|
411
|
+
row_data_type: row_data_type,
|
|
412
|
+
row_iter_identifier: "row_i",
|
|
729
413
|
table_header_max_height: 8,
|
|
730
414
|
table_row_max_height: 8,
|
|
731
415
|
columns: data?.columns,
|
|
@@ -748,11 +432,11 @@
|
|
|
748
432
|
],
|
|
749
433
|
is_more_to_load: true,
|
|
750
434
|
on_event: async (input) => {
|
|
751
|
-
console.log("
|
|
435
|
+
console.log("table_on_event", { input: deep_copy(input), variables })
|
|
752
436
|
if (input?.type == "update_row") {
|
|
753
437
|
const path_to_set = input?.path
|
|
754
|
-
let
|
|
755
|
-
let target =
|
|
438
|
+
let variables_loc = deep_copy(variables)
|
|
439
|
+
let target = variables_loc
|
|
756
440
|
for (let i = 0; i < path_to_set.length - 1; i++) {
|
|
757
441
|
if (target[path_to_set[i]] === undefined || target[path_to_set[i]] === null) {
|
|
758
442
|
target[path_to_set[i]] = {}
|
|
@@ -761,15 +445,16 @@
|
|
|
761
445
|
}
|
|
762
446
|
const last_key = path_to_set[path_to_set.length - 1]
|
|
763
447
|
target[last_key] = input?.row
|
|
764
|
-
variables =
|
|
448
|
+
variables = variables_loc
|
|
449
|
+
table_manager.reset_definition_stack([{ ...variables }])
|
|
765
450
|
return {
|
|
766
451
|
is_success: true,
|
|
767
452
|
row: target?.[last_key],
|
|
768
453
|
}
|
|
769
454
|
} else if (input?.type == "insert_row") {
|
|
770
455
|
const path_to_set = input?.path
|
|
771
|
-
let
|
|
772
|
-
let target =
|
|
456
|
+
let variables_loc = deep_copy(variables)
|
|
457
|
+
let target = variables_loc
|
|
773
458
|
for (let i = 0; i < path_to_set.length - 1; i++) {
|
|
774
459
|
if (target[path_to_set[i]] === undefined) {
|
|
775
460
|
target[path_to_set[i]] = {}
|
|
@@ -781,7 +466,8 @@
|
|
|
781
466
|
throw new Error("Target is not an array")
|
|
782
467
|
}
|
|
783
468
|
target.splice(last_key, 0, input?.row)
|
|
784
|
-
variables =
|
|
469
|
+
variables = variables_loc
|
|
470
|
+
table_manager.reset_definition_stack([{ ...variables }])
|
|
785
471
|
return {
|
|
786
472
|
is_success: true,
|
|
787
473
|
row: target?.[last_key],
|
|
@@ -789,8 +475,8 @@
|
|
|
789
475
|
} else if (input?.type == "bulk_insert_rows") {
|
|
790
476
|
console.log("bulk_insert_rows")
|
|
791
477
|
const path_to_set = input?.path
|
|
792
|
-
let
|
|
793
|
-
let target =
|
|
478
|
+
let variables_loc = deep_copy(variables)
|
|
479
|
+
let target = variables_loc
|
|
794
480
|
for (let i = 0; i < path_to_set.length - 1; i++) {
|
|
795
481
|
if (target[path_to_set[i]] === undefined) {
|
|
796
482
|
target[path_to_set[i]] = {}
|
|
@@ -802,7 +488,8 @@
|
|
|
802
488
|
throw new Error("Target is not an array")
|
|
803
489
|
}
|
|
804
490
|
target.splice(last_key, 0, input?.value)
|
|
805
|
-
variables =
|
|
491
|
+
variables = variables_loc
|
|
492
|
+
table_manager.reset_definition_stack([{ ...variables }])
|
|
806
493
|
return {
|
|
807
494
|
is_success: true,
|
|
808
495
|
rows: target?.[last_key],
|
|
@@ -810,8 +497,8 @@
|
|
|
810
497
|
} else if (input?.type == "delete_row") {
|
|
811
498
|
console.log("delete_row", deep_copy(input))
|
|
812
499
|
const path_to_delete = input?.path
|
|
813
|
-
let
|
|
814
|
-
let target =
|
|
500
|
+
let variables_loc = deep_copy(variables)
|
|
501
|
+
let target = variables_loc
|
|
815
502
|
for (let i = 0; i < path_to_delete.length - 1; i++) {
|
|
816
503
|
if (target[path_to_delete[i]] === undefined) {
|
|
817
504
|
target[path_to_delete[i]] = {}
|
|
@@ -822,8 +509,9 @@
|
|
|
822
509
|
if (Array.isArray(target)) {
|
|
823
510
|
target.splice(last_key, 1)
|
|
824
511
|
}
|
|
825
|
-
variables =
|
|
512
|
+
variables = variables_loc
|
|
826
513
|
console.log("variables", deep_copy(variables))
|
|
514
|
+
table_manager.reset_definition_stack([{ ...variables }])
|
|
827
515
|
return {
|
|
828
516
|
is_success: true,
|
|
829
517
|
}
|
|
@@ -835,6 +523,7 @@
|
|
|
835
523
|
}
|
|
836
524
|
} else if (input?.type == "insert_column") {
|
|
837
525
|
console.log("insert_column", deep_copy(input))
|
|
526
|
+
table_manager.set_columns(data?.columns)
|
|
838
527
|
return {
|
|
839
528
|
is_success: true,
|
|
840
529
|
column: input?.column,
|
|
@@ -884,5 +573,6 @@
|
|
|
884
573
|
</script>
|
|
885
574
|
|
|
886
575
|
<div>
|
|
576
|
+
<pre>{JSON.stringify(variables, null, 2)}</pre>
|
|
887
577
|
<TableAdvanced manager={table_manager} />
|
|
888
578
|
</div>
|