sveltekit-ui 1.0.11 → 1.0.12

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.
Files changed (56) hide show
  1. package/dist/Components/Content/index.svelte +12 -12
  2. package/dist/Components/Content/index.svelte.js +97 -49
  3. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Dropdown/index.svelte.js +1 -5
  4. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Number/index.svelte.js +1 -2
  5. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Qr/index.svelte.js +1 -3
  6. package/dist/Components/ContentInput/AttributesInput/CustomConfig/Slider/index.svelte.js +2 -4
  7. package/dist/Components/ContentInput/AttributesInput/CustomConfig/TableAdvanced/index.svelte.js +28 -32
  8. package/dist/Components/ContentInput/AttributesInput/CustomConfig/TextInput/index.svelte.js +1 -3
  9. package/dist/Components/ContentInput/AttributesInput/CustomConfig/TimeInput/index.svelte.js +1 -3
  10. package/dist/Components/ContentInput/AttributesInput/DefinedTypeInput/index.svelte.js +3 -13
  11. package/dist/Components/ContentInput/AttributesInput/index.svelte +1 -0
  12. package/dist/Components/ContentInput/AttributesInput/index.svelte.js +89 -120
  13. package/dist/Components/ContentInput/index.svelte.js +38 -62
  14. package/dist/Components/DataTypeInput/index.svelte.js +0 -3
  15. package/dist/Components/IconInput/index.svelte +1 -1
  16. package/dist/Components/TableAdvanced/ColumnInput/index.svelte.js +15 -62
  17. package/dist/Components/TableAdvanced/SortByInput/index.svelte.js +2 -1
  18. package/dist/Components/TableAdvanced/index.svelte.js +72 -73
  19. package/dist/Components/TextInput/index.svelte.js +12 -0
  20. package/dist/Components/VariablePathInput/index.svelte +47 -93
  21. package/dist/Components/VariablePathInput/index.svelte.js +205 -191
  22. package/dist/client/astc_formatting/index.js +15 -58
  23. package/dist/client/docs/index.js +4 -23
  24. package/dist/client/index.js +38 -90
  25. package/dist/client/types/index.js +2 -0
  26. package/dist/index.js +2 -0
  27. package/package.json +4 -4
  28. package/src/lib/Components/Content/index.svelte +12 -12
  29. package/src/lib/Components/Content/index.svelte.js +97 -49
  30. package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/Dropdown/index.svelte.js +1 -5
  31. package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/Number/index.svelte.js +1 -2
  32. package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/Qr/index.svelte.js +1 -3
  33. package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/Slider/index.svelte.js +2 -4
  34. package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/TableAdvanced/index.svelte.js +28 -32
  35. package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/TextInput/index.svelte.js +1 -3
  36. package/src/lib/Components/ContentInput/AttributesInput/CustomConfig/TimeInput/index.svelte.js +1 -3
  37. package/src/lib/Components/ContentInput/AttributesInput/DefinedTypeInput/index.svelte.js +3 -13
  38. package/src/lib/Components/ContentInput/AttributesInput/index.svelte +1 -0
  39. package/src/lib/Components/ContentInput/AttributesInput/index.svelte.js +89 -120
  40. package/src/lib/Components/ContentInput/index.svelte.js +38 -62
  41. package/src/lib/Components/DataTypeInput/index.svelte.js +0 -3
  42. package/src/lib/Components/IconInput/index.svelte +1 -1
  43. package/src/lib/Components/TableAdvanced/ColumnInput/index.svelte.js +15 -62
  44. package/src/lib/Components/TableAdvanced/SortByInput/index.svelte.js +2 -1
  45. package/src/lib/Components/TableAdvanced/index.svelte.js +72 -73
  46. package/src/lib/Components/TextInput/index.svelte.js +12 -0
  47. package/src/lib/Components/VariablePathInput/index.svelte +47 -93
  48. package/src/lib/Components/VariablePathInput/index.svelte.js +205 -191
  49. package/src/lib/client/astc_formatting/index.js +15 -58
  50. package/src/lib/client/docs/index.js +4 -23
  51. package/src/lib/client/index.js +38 -90
  52. package/src/lib/client/types/index.js +2 -0
  53. package/src/lib/index.js +2 -0
  54. package/src/routes/[component]/Showcase/Content/index.svelte +49 -83
  55. package/src/routes/[component]/Showcase/ContentInput/index.svelte +11 -13
  56. package/src/routes/[component]/Showcase/TableAdvanced/index.svelte +71 -252
@@ -40,7 +40,7 @@
40
40
  selector_id: "dvobhkqp",
41
41
  children: [],
42
42
  attributes: {
43
- content_from_variable_path: ["variables", "rows", ["loops", 0], "id"],
43
+ content_from_variable_path: ["rows", ["row_i"], "id"],
44
44
  size: 10,
45
45
  },
46
46
  },
@@ -58,170 +58,35 @@
58
58
  selector_id: "div_escitwrx",
59
59
  children: [
60
60
  {
61
- type_id: "object_uniform_input",
62
- selector_id: "lipxplrm",
61
+ type_id: "div",
62
+ selector_id: "ymcklbcy",
63
63
  children: [
64
64
  {
65
65
  type_id: "div",
66
- selector_id: "ymcklbcy",
66
+ selector_id: "drsdciju",
67
67
  children: [
68
68
  {
69
- type_id: "div",
70
- selector_id: "drsdciju",
71
- children: [
72
- {
73
- type_id: "base_text",
74
- selector_id: "oejzzhrk",
75
- children: [],
76
- attributes: {
77
- content: "seat_order_l_to_r:",
78
- },
79
- },
80
- {
81
- type_id: "text_input",
82
- selector_id: "lkblpxsl",
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: ["variables", "rows", ["loops", 0], "sharks"],
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",
123
- },
124
- },
125
- ],
126
- attributes: {},
127
- },
128
- {
129
- type_id: "div",
130
- selector_id: "div_ukbvlckf",
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",
89
+ val_from_variable_path: ["rows", ["row_i"], "label"],
225
90
  },
226
91
  },
227
92
  ],
@@ -229,25 +94,38 @@
229
94
  },
230
95
  {
231
96
  type_id: "div",
232
- selector_id: "div_xzaarlhc",
97
+ selector_id: "div_escitwrx",
233
98
  children: [
234
99
  {
235
- type_id: "base_text",
236
- selector_id: "jajajaj",
237
- children: [],
238
- attributes: {
239
- content: "location_test",
240
- },
241
- },
242
- {
243
- type_id: "location_input",
244
- selector_id: "zqqbkbqx",
245
- children: [],
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
- label: "location",
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: ["variables", "rows", ["loops", 0], "db_epoch_created"],
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: ["variables", "rows", ["loops", 0], "db_epoch_updated"],
212
+ val_from_variable_path: ["rows", ["row_i"], "db_epoch_updated"],
335
213
  },
336
214
  },
337
215
  {
@@ -457,7 +335,7 @@
457
335
  children: [],
458
336
  attributes: {
459
337
  size: 10,
460
- content_from_variable_path: ["variables", "rows", ["loops", 0], "id"],
338
+ content_from_variable_path: ["rows", ["row_i"], "id"],
461
339
  },
462
340
  selector_id: "hcsqz",
463
341
  },
@@ -495,7 +373,7 @@
495
373
  attributes: {
496
374
  color: null,
497
375
  content: null,
498
- content_from_variable_path: ["variables", "rows", ["loops", 0], "label"],
376
+ content_from_variable_path: ["rows", ["row_i"], "label"],
499
377
  },
500
378
  selector_id: "mersu",
501
379
  },
@@ -540,7 +418,7 @@
540
418
  o: 24,
541
419
  is_dark_theme_invert: true,
542
420
  },
543
- val_from_variable_path: ["variables", "rows", ["loops", 0], "fav_color"],
421
+ val_from_variable_path: ["rows", ["row_i"], "fav_color"],
544
422
  },
545
423
  selector_id: "anpwr",
546
424
  },
@@ -585,7 +463,7 @@
585
463
  children: [],
586
464
  attributes: {
587
465
  format: "epoch",
588
- val_from_variable_path: ["variables", "rows", ["loops", 0], "db_epoch_created"],
466
+ val_from_variable_path: ["rows", ["row_i"], "db_epoch_created"],
589
467
  },
590
468
  selector_id: "urzjm",
591
469
  },
@@ -622,7 +500,7 @@
622
500
  children: [],
623
501
  attributes: {
624
502
  format: "epoch",
625
- val_from_variable_path: ["variables", "rows", ["loops", 0], "db_epoch_updated"],
503
+ val_from_variable_path: ["rows", ["row_i"], "db_epoch_updated"],
626
504
  },
627
505
  selector_id: "rozyy",
628
506
  },
@@ -646,76 +524,17 @@
646
524
  is_autogenerated: true,
647
525
  is_force_uniqueness: false,
648
526
  },
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
527
  },
689
528
  account_id: "idredbvbbogpofinurea",
690
529
  total_rows: 8,
691
530
  description: "hiiiiii",
692
531
  default_sort: null,
693
- // row_input_content: null,
694
532
  row_input_content: test_row_input_content,
695
533
  row_searchable_content: null,
696
534
  })
697
535
 
698
- let table_config_manager = $state(null)
699
536
  let table_manager = $state(null)
700
-
701
- const table_attributes_initial = $state({
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
- })
716
-
717
537
  let variables = $state({ rows: data?.rows })
718
- let variables_data_type = $state(null)
719
538
 
720
539
  table_manager = create_table_advanced_manager({
721
540
  table_id: "abcdefg",
@@ -723,9 +542,9 @@
723
542
  table_description: "This has data about uh...stuff...idk",
724
543
  mapkit_js_token: PUBLIC_APPLE_MAPKIT_JS_API_KEY,
725
544
  table_options: [{ key: "test", name: "Test" }],
726
- variables: () => variables,
727
- variables_data_type: () => variables_data_type,
728
- rows_data_from_variable_path: ["variables", "rows"],
545
+ definition_stack: [{ ...variables }],
546
+ rows_data_from_variable_path: ["rows"],
547
+ row_iter_identifier: "row_i",
729
548
  table_header_max_height: 8,
730
549
  table_row_max_height: 8,
731
550
  columns: data?.columns,
@@ -748,11 +567,11 @@
748
567
  ],
749
568
  is_more_to_load: true,
750
569
  on_event: async (input) => {
751
- console.log("showcase on_event tbd", deep_copy(input))
570
+ console.log("table_on_event", { input: deep_copy(input), variables })
752
571
  if (input?.type == "update_row") {
753
572
  const path_to_set = input?.path
754
- let complete_variables_loc = deep_copy({ variables: variables, loops: null })
755
- let target = complete_variables_loc
573
+ let variables_loc = deep_copy(variables)
574
+ let target = variables_loc
756
575
  for (let i = 0; i < path_to_set.length - 1; i++) {
757
576
  if (target[path_to_set[i]] === undefined || target[path_to_set[i]] === null) {
758
577
  target[path_to_set[i]] = {}
@@ -761,15 +580,15 @@
761
580
  }
762
581
  const last_key = path_to_set[path_to_set.length - 1]
763
582
  target[last_key] = input?.row
764
- variables = complete_variables_loc?.variables
583
+ variables = variables_loc
765
584
  return {
766
585
  is_success: true,
767
586
  row: target?.[last_key],
768
587
  }
769
588
  } else if (input?.type == "insert_row") {
770
589
  const path_to_set = input?.path
771
- let complete_variables_loc = deep_copy({ variables: variables, loops: null })
772
- let target = complete_variables_loc
590
+ let variables_loc = deep_copy(variables)
591
+ let target = variables_loc
773
592
  for (let i = 0; i < path_to_set.length - 1; i++) {
774
593
  if (target[path_to_set[i]] === undefined) {
775
594
  target[path_to_set[i]] = {}
@@ -781,7 +600,7 @@
781
600
  throw new Error("Target is not an array")
782
601
  }
783
602
  target.splice(last_key, 0, input?.row)
784
- variables = complete_variables_loc?.variables
603
+ variables = variables_loc
785
604
  return {
786
605
  is_success: true,
787
606
  row: target?.[last_key],
@@ -789,8 +608,8 @@
789
608
  } else if (input?.type == "bulk_insert_rows") {
790
609
  console.log("bulk_insert_rows")
791
610
  const path_to_set = input?.path
792
- let complete_variables_loc = deep_copy({ variables: variables, loops: null })
793
- let target = complete_variables_loc
611
+ let variables_loc = deep_copy(variables)
612
+ let target = variables_loc
794
613
  for (let i = 0; i < path_to_set.length - 1; i++) {
795
614
  if (target[path_to_set[i]] === undefined) {
796
615
  target[path_to_set[i]] = {}
@@ -802,7 +621,7 @@
802
621
  throw new Error("Target is not an array")
803
622
  }
804
623
  target.splice(last_key, 0, input?.value)
805
- variables = complete_variables_loc?.variables
624
+ variables = variables_loc
806
625
  return {
807
626
  is_success: true,
808
627
  rows: target?.[last_key],
@@ -810,8 +629,8 @@
810
629
  } else if (input?.type == "delete_row") {
811
630
  console.log("delete_row", deep_copy(input))
812
631
  const path_to_delete = input?.path
813
- let complete_variables_loc = deep_copy({ variables: variables, loops: null })
814
- let target = complete_variables_loc
632
+ let variables_loc = deep_copy(variables)
633
+ let target = variables_loc
815
634
  for (let i = 0; i < path_to_delete.length - 1; i++) {
816
635
  if (target[path_to_delete[i]] === undefined) {
817
636
  target[path_to_delete[i]] = {}
@@ -822,7 +641,7 @@
822
641
  if (Array.isArray(target)) {
823
642
  target.splice(last_key, 1)
824
643
  }
825
- variables = complete_variables_loc?.variables
644
+ variables = variables_loc
826
645
  console.log("variables", deep_copy(variables))
827
646
  return {
828
647
  is_success: true,