sveltekit-ui 1.0.12 → 1.0.14

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.
@@ -225,102 +225,11 @@
225
225
  }
226
226
 
227
227
  let data = $state({
228
- id: "srooithnmomwnpbmexkr",
229
- name: "Hello World",
230
- rows: [
231
- {
232
- id: "dnscyyvfhqdzptdvzcdp",
233
- label: null,
234
- fav_color: null,
235
- db_epoch_created: 1723421882,
236
- db_epoch_updated: 1723421882,
237
- },
238
- {
239
- id: "wqhfxttzpwdpkawzusyt",
240
- label: "tint bl",
241
- fav_color: {
242
- c: 16,
243
- h: 17,
244
- l: 5,
245
- o: 16,
246
- is_dark_theme_invert: true,
247
- },
248
- db_epoch_created: 1723421882,
249
- db_epoch_updated: 1723422096,
250
- },
251
- {
252
- id: "egrdjfqlcysykmpwudsp",
253
- label: null,
254
- fav_color: {
255
- c: 10,
256
- h: 4,
257
- l: 1,
258
- o: 24,
259
- is_dark_theme_invert: true,
260
- },
261
- db_epoch_created: 1723422106,
262
- db_epoch_updated: 1723422106,
263
- },
264
- {
265
- id: "zbcqvteloefgebbcwrnd",
266
- label: null,
267
- fav_color: {
268
- c: 10,
269
- h: 4,
270
- l: 1,
271
- o: 24,
272
- is_dark_theme_invert: true,
273
- },
274
- db_epoch_created: 1723423614,
275
- db_epoch_updated: 1723423614,
276
- },
277
- {
278
- id: "ennjpaemwacveifswbwq",
279
- label: null,
280
- fav_color: null,
281
- db_epoch_created: 1723423614,
282
- db_epoch_updated: 1723423614,
283
- },
284
- {
285
- id: "redpwlvrmboleibyawxj",
286
- label: "tint bl",
287
- fav_color: {
288
- c: 16,
289
- h: 17,
290
- l: 5,
291
- o: 16,
292
- is_dark_theme_invert: true,
293
- },
294
- db_epoch_created: 1723423614,
295
- db_epoch_updated: 1723423614,
296
- },
297
- {
298
- id: "ugarkuprolztkecxqody",
299
- label: "not invert",
300
- fav_color: {
301
- c: 12,
302
- h: 14,
303
- l: 4,
304
- o: 24,
305
- is_dark_theme_invert: false,
306
- },
307
- db_epoch_created: 1723423614,
308
- db_epoch_updated: 1723423678,
309
- },
310
- {
311
- id: "dyfidxdkepupllmccxmb",
312
- label: "yes invert",
313
- fav_color: {
314
- c: 12,
315
- h: 14,
316
- l: 4,
317
- o: 24,
318
- is_dark_theme_invert: true,
319
- },
320
- db_epoch_created: 1723421882,
321
- db_epoch_updated: 1723423732,
322
- },
323
- ],
228
+ id: "cbsemvrsoidhrzyhugue",
229
+ name: "test",
230
+ rows: [],
231
+ limit: 100,
232
+ offset: 0,
324
233
  columns: {
325
234
  id: {
326
235
  is_fixed: true,
@@ -335,7 +244,7 @@
335
244
  children: [],
336
245
  attributes: {
337
246
  size: 10,
338
- content_from_variable_path: ["rows", ["row_i"], "id"],
247
+ content_from_variable_path: ["variables", "rows", ["loops", 0], "id"],
339
248
  },
340
249
  selector_id: "hcsqz",
341
250
  },
@@ -359,103 +268,50 @@
359
268
  is_autogenerated: true,
360
269
  is_force_uniqueness: false,
361
270
  },
362
- label: {
271
+ ttttt: {
363
272
  is_fixed: false,
364
273
  is_shown: true,
365
274
  alignment: "left",
366
- max_width: 25,
367
- min_width: 3,
368
- description: null,
275
+ max_width: 30,
276
+ min_width: 20,
277
+ description: "ffff",
369
278
  is_nullable: true,
370
279
  body_content: {
371
- type_id: "base_text",
280
+ type_id: "number",
372
281
  children: [],
373
282
  attributes: {
374
- color: null,
375
- content: null,
376
- content_from_variable_path: ["rows", ["row_i"], "label"],
283
+ val_from_variable_path: ["rows", ["row_i"], "ttttt"],
377
284
  },
378
- selector_id: "mersu",
285
+ selector_id: "vukyefhw",
379
286
  },
380
287
  db_data_type: {
381
- type: "text_literal",
288
+ type: "int_literal",
382
289
  attributes: {},
383
290
  },
384
291
  is_db_column: true,
292
+ is_updatable: false,
385
293
  default_value: null,
386
294
  display_order: 1,
387
- postgres_type: "text",
295
+ postgres_type: "int",
388
296
  header_content: {
389
297
  type_id: "base_text",
390
298
  children: [],
391
299
  attributes: {
392
- color: null,
393
- content: "Label",
394
- content_from_variable_path: null,
300
+ content: "Ttttt",
395
301
  },
396
- selector_id: "fbhid",
397
- },
398
- is_primary_key: false,
399
- is_autogenerated: false,
400
- is_force_uniqueness: false,
401
- },
402
- fav_color: {
403
- is_fixed: false,
404
- is_shown: true,
405
- alignment: "right",
406
- max_width: 25,
407
- min_width: 3,
408
- description: null,
409
- is_nullable: true,
410
- body_content: {
411
- type_id: "color",
412
- children: [],
413
- attributes: {
414
- val: {
415
- c: 21,
416
- h: 2,
417
- l: 6,
418
- o: 24,
419
- is_dark_theme_invert: true,
420
- },
421
- val_from_variable_path: ["rows", ["row_i"], "fav_color"],
422
- },
423
- selector_id: "anpwr",
424
- },
425
- db_data_type: {
426
- type: "color_literal",
427
- attributes: {},
428
- },
429
- is_db_column: true,
430
- default_value: null,
431
- display_order: 2,
432
- postgres_type: "jsonb",
433
- header_content: {
434
- type_id: "base_text",
435
- children: [],
436
- attributes: {
437
- color: {
438
- c: 10,
439
- h: 15,
440
- l: 19,
441
- o: 24,
442
- is_dark_theme_invert: true,
443
- },
444
- content: "Fav Color",
445
- content_from_variable_path: null,
446
- },
447
- selector_id: "gcvda",
302
+ selector_id: "lpcqsjlq",
448
303
  },
449
304
  is_primary_key: false,
450
305
  is_autogenerated: false,
451
306
  is_force_uniqueness: false,
307
+ is_use_in_short_display: false,
452
308
  },
453
309
  db_epoch_created: {
454
310
  is_fixed: false,
455
311
  is_shown: true,
456
312
  alignment: "left",
457
313
  max_width: 50,
458
- min_width: 5,
314
+ min_width: 20,
459
315
  description: null,
460
316
  is_nullable: false,
461
317
  body_content: {
@@ -463,9 +319,9 @@
463
319
  children: [],
464
320
  attributes: {
465
321
  format: "epoch",
466
- val_from_variable_path: ["rows", ["row_i"], "db_epoch_created"],
322
+ val_from_variable_path: ["variables", "rows", ["loops", 0], "db_epoch_created"],
467
323
  },
468
- selector_id: "urzjm",
324
+ selector_id: "time_urzjm",
469
325
  },
470
326
  db_data_type: {
471
327
  type: "epoch_literal",
@@ -473,7 +329,7 @@
473
329
  },
474
330
  is_db_column: true,
475
331
  default_value: null,
476
- display_order: 3,
332
+ display_order: 2,
477
333
  postgres_type: "bigint",
478
334
  header_content: {
479
335
  type_id: "base_text",
@@ -492,7 +348,7 @@
492
348
  is_shown: true,
493
349
  alignment: "left",
494
350
  max_width: 50,
495
- min_width: 5,
351
+ min_width: 20,
496
352
  description: null,
497
353
  is_nullable: false,
498
354
  body_content: {
@@ -500,9 +356,9 @@
500
356
  children: [],
501
357
  attributes: {
502
358
  format: "epoch",
503
- val_from_variable_path: ["rows", ["row_i"], "db_epoch_updated"],
359
+ val_from_variable_path: ["variables", "rows", ["loops", 0], "db_epoch_updated"],
504
360
  },
505
- selector_id: "rozyy",
361
+ selector_id: "epoch_rozyy",
506
362
  },
507
363
  db_data_type: {
508
364
  type: "epoch_literal",
@@ -510,7 +366,7 @@
510
366
  },
511
367
  is_db_column: true,
512
368
  default_value: null,
513
- display_order: 4,
369
+ display_order: 3,
514
370
  postgres_type: "bigint",
515
371
  header_content: {
516
372
  type_id: "base_text",
@@ -525,11 +381,11 @@
525
381
  is_force_uniqueness: false,
526
382
  },
527
383
  },
528
- account_id: "idredbvbbogpofinurea",
529
- total_rows: 8,
530
- description: "hiiiiii",
384
+ account_id: "kmjexchofxophkkuqfvp",
385
+ total_rows: 0,
386
+ description: "need to make sure new loop stuff works",
531
387
  default_sort: null,
532
- row_input_content: test_row_input_content,
388
+ row_input_content: null,
533
389
  row_searchable_content: null,
534
390
  })
535
391
 
@@ -581,6 +437,7 @@
581
437
  const last_key = path_to_set[path_to_set.length - 1]
582
438
  target[last_key] = input?.row
583
439
  variables = variables_loc
440
+ table_manager.reset_definition_stack([{ ...variables }])
584
441
  return {
585
442
  is_success: true,
586
443
  row: target?.[last_key],
@@ -601,6 +458,7 @@
601
458
  }
602
459
  target.splice(last_key, 0, input?.row)
603
460
  variables = variables_loc
461
+ table_manager.reset_definition_stack([{ ...variables }])
604
462
  return {
605
463
  is_success: true,
606
464
  row: target?.[last_key],
@@ -622,6 +480,7 @@
622
480
  }
623
481
  target.splice(last_key, 0, input?.value)
624
482
  variables = variables_loc
483
+ table_manager.reset_definition_stack([{ ...variables }])
625
484
  return {
626
485
  is_success: true,
627
486
  rows: target?.[last_key],
@@ -643,6 +502,7 @@
643
502
  }
644
503
  variables = variables_loc
645
504
  console.log("variables", deep_copy(variables))
505
+ table_manager.reset_definition_stack([{ ...variables }])
646
506
  return {
647
507
  is_success: true,
648
508
  }
@@ -654,6 +514,7 @@
654
514
  }
655
515
  } else if (input?.type == "insert_column") {
656
516
  console.log("insert_column", deep_copy(input))
517
+ table_manager.set_columns(data?.columns)
657
518
  return {
658
519
  is_success: true,
659
520
  column: input?.column,
@@ -703,5 +564,6 @@
703
564
  </script>
704
565
 
705
566
  <div>
567
+ <pre>{JSON.stringify(variables, null, 2)}</pre>
706
568
  <TableAdvanced manager={table_manager} />
707
569
  </div>