sveltekit-ui 1.0.75 → 1.0.77
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/TableAdvanced/index.svelte +6 -0
- package/dist/Components/TableAdvanced/index.svelte.js +79 -1
- package/dist/client/types/index.js +157 -14
- package/package.json +3 -3
- package/src/lib/Components/TableAdvanced/index.svelte +6 -0
- package/src/lib/Components/TableAdvanced/index.svelte.js +79 -1
- package/src/lib/client/types/index.js +157 -14
|
@@ -45,6 +45,12 @@
|
|
|
45
45
|
{#if manager?.table_description}
|
|
46
46
|
<p>{manager?.table_description}</p>
|
|
47
47
|
{/if}
|
|
48
|
+
|
|
49
|
+
<div>
|
|
50
|
+
<h4 class="label">JSON Schema</h4>
|
|
51
|
+
<Button manager={manager?.settings_copy_row_json_schema_button_manager} />
|
|
52
|
+
<Button manager={manager?.settings_copy_rows_json_schema_button_manager} />
|
|
53
|
+
</div>
|
|
48
54
|
{#if manager?.is_data_editable}
|
|
49
55
|
<Button manager={manager?.settings_preempt_delete_table_popover_button_manager} />
|
|
50
56
|
<Popover manager={manager?.settings_delete_table_popover_manager}>
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from "../../client/index.js"
|
|
21
21
|
import { tick } from "svelte"
|
|
22
22
|
import { browser } from "$app/environment"
|
|
23
|
+
import { literal_types } from "../../client/types/index.js"
|
|
23
24
|
|
|
24
25
|
export function create_table_advanced_manager(config) {
|
|
25
26
|
const id = create_unique_id(null, 20)
|
|
@@ -45,6 +46,8 @@ export function create_table_advanced_manager(config) {
|
|
|
45
46
|
let settings_update_table_name_text_input_manager = $state(null)
|
|
46
47
|
let settings_update_table_description_button_manager = $state(null)
|
|
47
48
|
let settings_update_table_description_text_input_manager = $state(null)
|
|
49
|
+
let settings_copy_row_json_schema_button_manager = $state(null)
|
|
50
|
+
let settings_copy_rows_json_schema_button_manager = $state(null)
|
|
48
51
|
let settings_preempt_delete_table_popover_button_manager = $state(null)
|
|
49
52
|
let settings_delete_table_popover_manager = $state(null)
|
|
50
53
|
let settings_delete_table_cancel_button_manager = $state(null)
|
|
@@ -109,6 +112,55 @@ export function create_table_advanced_manager(config) {
|
|
|
109
112
|
let rows_data = $derived(get_def_from_variable_path(rows_data_from_variable_path, definition_stack))
|
|
110
113
|
let row_indexes_display_order = $derived(get_available_row_indexes())
|
|
111
114
|
let row_indexes_display_order_shown = $derived(get_row_indexes_shown())
|
|
115
|
+
let row_json_schema = $derived(get_row_json_schema(columns_prepped))
|
|
116
|
+
|
|
117
|
+
function get_row_json_schema(input) {
|
|
118
|
+
console.log("get_row_json_schema", input)
|
|
119
|
+
let properties = {}
|
|
120
|
+
if (Object.keys(input || {}).length > 0) {
|
|
121
|
+
for (let key of Object.keys(input)) {
|
|
122
|
+
console.log("key", key)
|
|
123
|
+
if (input?.[key]?.is_db_column && !input?.[key]?.is_autogenerated) {
|
|
124
|
+
properties[key] = get_json_schema_from_db_type(input?.[key]?.db_data_type)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
return null
|
|
129
|
+
}
|
|
130
|
+
return JSON.stringify({
|
|
131
|
+
type: "object",
|
|
132
|
+
properties: properties,
|
|
133
|
+
required: Object.keys(properties),
|
|
134
|
+
additionalProperties: false,
|
|
135
|
+
})
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function get_json_schema_from_db_type(input) {
|
|
139
|
+
if (input?.type == "array_uniform_literal") {
|
|
140
|
+
return {
|
|
141
|
+
type: "array",
|
|
142
|
+
items: get_json_schema_from_db_type(input?.items),
|
|
143
|
+
}
|
|
144
|
+
} else if (input?.type == "object_literal") {
|
|
145
|
+
let properties = {}
|
|
146
|
+
for (let key of Object.keys(input?.properties)) {
|
|
147
|
+
properties[key] = get_json_schema_from_db_type(input?.properties?.[key])
|
|
148
|
+
}
|
|
149
|
+
return { type: "object", properties: properties, required: Object.keys(properties), additionalProperties: false }
|
|
150
|
+
} else if (input?.type == "object_uniform_literal") {
|
|
151
|
+
// tbd try and avoid this
|
|
152
|
+
return { type: "null_literal" }
|
|
153
|
+
}
|
|
154
|
+
let default_json_schema = literal_types?.[input?.type]?.json_schema
|
|
155
|
+
if (default_json_schema?.type == "object") {
|
|
156
|
+
default_json_schema = {
|
|
157
|
+
...default_json_schema,
|
|
158
|
+
required: Object.keys(default_json_schema?.properties),
|
|
159
|
+
additionalProperties: false,
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return default_json_schema
|
|
163
|
+
}
|
|
112
164
|
|
|
113
165
|
let cur_page_to_use = $derived(
|
|
114
166
|
!Array.isArray(row_indexes_display_order) || row_indexes_display_order.length < rows_per_page_dropdown_manager?.val
|
|
@@ -319,6 +371,7 @@ export function create_table_advanced_manager(config) {
|
|
|
319
371
|
}
|
|
320
372
|
}
|
|
321
373
|
columns_prepped = columns_prepped_loc
|
|
374
|
+
console.log("columns_prepped", deep_copy(columns_prepped))
|
|
322
375
|
return columns_prepped
|
|
323
376
|
}
|
|
324
377
|
|
|
@@ -1031,7 +1084,7 @@ export function create_table_advanced_manager(config) {
|
|
|
1031
1084
|
})
|
|
1032
1085
|
settings_popover_manager = create_popover_manager({
|
|
1033
1086
|
type: "dropdown",
|
|
1034
|
-
target_width:
|
|
1087
|
+
target_width: 260,
|
|
1035
1088
|
target_height: 300,
|
|
1036
1089
|
anchor_id: () => `button_${settings_popover_toggle_button_manager?.id}`,
|
|
1037
1090
|
})
|
|
@@ -1134,6 +1187,25 @@ export function create_table_advanced_manager(config) {
|
|
|
1134
1187
|
min_height: 2.4,
|
|
1135
1188
|
popover_target: () => `popover_${settings_update_table_description_text_input_manager?.popover_manager?.id}`,
|
|
1136
1189
|
})
|
|
1190
|
+
settings_copy_row_json_schema_button_manager = create_button_manager({
|
|
1191
|
+
type: "outlined",
|
|
1192
|
+
text: "Copy Row JSON Schema",
|
|
1193
|
+
is_success_animation: true,
|
|
1194
|
+
support_icon: "clipboard",
|
|
1195
|
+
mb: 1,
|
|
1196
|
+
on_click: () => copy_to_clipboard(row_json_schema),
|
|
1197
|
+
})
|
|
1198
|
+
settings_copy_rows_json_schema_button_manager = create_button_manager({
|
|
1199
|
+
type: "outlined",
|
|
1200
|
+
text: "Copy Rows JSON Schema",
|
|
1201
|
+
is_success_animation: true,
|
|
1202
|
+
support_icon: "clipboard",
|
|
1203
|
+
on_click: () =>
|
|
1204
|
+
copy_to_clipboard({
|
|
1205
|
+
type: "array",
|
|
1206
|
+
items: row_json_schema,
|
|
1207
|
+
}),
|
|
1208
|
+
})
|
|
1137
1209
|
let delete_table_is_loading = $state(false)
|
|
1138
1210
|
settings_delete_table_popover_manager = create_popover_manager({
|
|
1139
1211
|
type: "center",
|
|
@@ -1457,6 +1529,12 @@ export function create_table_advanced_manager(config) {
|
|
|
1457
1529
|
get settings_update_table_description_text_input_manager() {
|
|
1458
1530
|
return settings_update_table_description_text_input_manager
|
|
1459
1531
|
},
|
|
1532
|
+
get settings_copy_row_json_schema_button_manager() {
|
|
1533
|
+
return settings_copy_row_json_schema_button_manager
|
|
1534
|
+
},
|
|
1535
|
+
get settings_copy_rows_json_schema_button_manager() {
|
|
1536
|
+
return settings_copy_rows_json_schema_button_manager
|
|
1537
|
+
},
|
|
1460
1538
|
get settings_preempt_delete_table_popover_button_manager() {
|
|
1461
1539
|
return settings_preempt_delete_table_popover_button_manager
|
|
1462
1540
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { time_formats } from "../../Components/TimeInput/index.js"
|
|
2
|
+
|
|
1
3
|
export const mime_type_extensions = {
|
|
2
4
|
"image/webp": "webp",
|
|
3
5
|
"image/jpeg": "jpeg",
|
|
@@ -392,19 +394,161 @@ const time_literal = {
|
|
|
392
394
|
json_schema: {
|
|
393
395
|
type: "object",
|
|
394
396
|
properties: {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
397
|
+
format: {
|
|
398
|
+
type: "string",
|
|
399
|
+
description: JSON.stringify(time_formats),
|
|
400
|
+
},
|
|
401
|
+
epoch: {
|
|
402
|
+
anyOf: [
|
|
403
|
+
{
|
|
404
|
+
type: "number",
|
|
405
|
+
description: "epoch in seconds",
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
type: "null",
|
|
409
|
+
},
|
|
410
|
+
],
|
|
411
|
+
description: "derived can keep null",
|
|
412
|
+
},
|
|
413
|
+
granularity: {
|
|
414
|
+
type: "string",
|
|
415
|
+
enum: ["year", "month", "week", "day", "hour", "minute", "second"],
|
|
416
|
+
description: ["year", "month", "week", "day", "hour", "minute", "second"].join(", "),
|
|
417
|
+
},
|
|
418
|
+
year: {
|
|
419
|
+
anyOf: [
|
|
420
|
+
{
|
|
421
|
+
type: "number",
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
type: "null",
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
description: "derived can keep null",
|
|
428
|
+
},
|
|
429
|
+
month: {
|
|
430
|
+
anyOf: [
|
|
431
|
+
{
|
|
432
|
+
type: "number",
|
|
433
|
+
enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
type: "null",
|
|
437
|
+
},
|
|
438
|
+
],
|
|
439
|
+
description: "derived can keep null",
|
|
440
|
+
},
|
|
441
|
+
day_of_month: {
|
|
442
|
+
anyOf: [
|
|
443
|
+
{
|
|
444
|
+
type: "number",
|
|
445
|
+
minimum: 1,
|
|
446
|
+
maximum: 31,
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
type: "null",
|
|
450
|
+
},
|
|
451
|
+
],
|
|
452
|
+
description: "derived can keep null",
|
|
453
|
+
},
|
|
454
|
+
day_of_week: {
|
|
455
|
+
anyOf: [
|
|
456
|
+
{
|
|
457
|
+
type: "number",
|
|
458
|
+
enum: [0, 1, 2, 3, 4, 5, 6],
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
type: "null",
|
|
462
|
+
},
|
|
463
|
+
],
|
|
464
|
+
description: "derived can keep null",
|
|
465
|
+
},
|
|
466
|
+
day_of_year: {
|
|
467
|
+
anyOf: [
|
|
468
|
+
{
|
|
469
|
+
type: "number",
|
|
470
|
+
minimum: 1,
|
|
471
|
+
maximum: 365,
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
type: "null",
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
description: "derived can keep null",
|
|
478
|
+
},
|
|
479
|
+
week_of_year: {
|
|
480
|
+
anyOf: [
|
|
481
|
+
{
|
|
482
|
+
type: "number",
|
|
483
|
+
minimum: 1,
|
|
484
|
+
maximum: 52,
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
type: "null",
|
|
488
|
+
},
|
|
489
|
+
],
|
|
490
|
+
description: "derived can keep null",
|
|
491
|
+
},
|
|
492
|
+
hour: {
|
|
493
|
+
anyOf: [
|
|
494
|
+
{
|
|
495
|
+
type: "number",
|
|
496
|
+
minimum: 1,
|
|
497
|
+
maximum: 24,
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
type: "null",
|
|
501
|
+
},
|
|
502
|
+
],
|
|
503
|
+
description: "derived can keep null",
|
|
504
|
+
},
|
|
505
|
+
minute: {
|
|
506
|
+
anyOf: [
|
|
507
|
+
{
|
|
508
|
+
type: "number",
|
|
509
|
+
minimum: 1,
|
|
510
|
+
maximum: 60,
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
type: "null",
|
|
514
|
+
},
|
|
515
|
+
],
|
|
516
|
+
description: "derived can keep null",
|
|
517
|
+
},
|
|
518
|
+
timezone: {
|
|
519
|
+
anyOf: [
|
|
520
|
+
{
|
|
521
|
+
type: "string",
|
|
522
|
+
description: time_zone_options.map((h) => h?.key).join(", "),
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
type: "null",
|
|
526
|
+
},
|
|
527
|
+
],
|
|
528
|
+
description: "derived can keep null",
|
|
529
|
+
},
|
|
530
|
+
content: {
|
|
531
|
+
anyOf: [
|
|
532
|
+
{
|
|
533
|
+
type: "string",
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
type: "null",
|
|
537
|
+
},
|
|
538
|
+
],
|
|
539
|
+
description: "derived can keep null",
|
|
540
|
+
},
|
|
541
|
+
datetime: {
|
|
542
|
+
anyOf: [
|
|
543
|
+
{
|
|
544
|
+
type: "string",
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
type: "null",
|
|
548
|
+
},
|
|
549
|
+
],
|
|
550
|
+
description: "derived can keep null",
|
|
551
|
+
},
|
|
408
552
|
},
|
|
409
553
|
additionalProperties: false,
|
|
410
554
|
required: ["epoch"],
|
|
@@ -2078,7 +2222,6 @@ export const language_options = [
|
|
|
2078
2222
|
{ key: "ta", name: "தமிழ்", english_name: "Tamil", emoji: "🇮🇳" },
|
|
2079
2223
|
{ key: "te", name: "తెలుగు", english_name: "Telugu", emoji: "🇮🇳" },
|
|
2080
2224
|
]
|
|
2081
|
-
// javascript: sequelize model definition using the iana timezone identifier
|
|
2082
2225
|
|
|
2083
2226
|
export const time_zone_options = [
|
|
2084
2227
|
{ key: "america/puerto_rico", name: "atlantic time / puerto rico (ast)", emoji: "🇵🇷" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sveltekit-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.77",
|
|
4
4
|
"description": "A SvelteKit UI component library for building modern web applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"context-filter-polyfill": "^0.3.23",
|
|
21
21
|
"qr-code-styling": "^1.9.2",
|
|
22
|
-
"svelte": "^5.39.
|
|
22
|
+
"svelte": "^5.39.11"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@sveltejs/kit": "^2.22.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@sveltejs/adapter-vercel": "^5.10.3",
|
|
29
|
-
"@sveltejs/kit": "^2.
|
|
29
|
+
"@sveltejs/kit": "^2.46.4",
|
|
30
30
|
"@sveltejs/package": "^2.5.4",
|
|
31
31
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
32
32
|
"@vercel/analytics": "^1.5.0",
|
|
@@ -45,6 +45,12 @@
|
|
|
45
45
|
{#if manager?.table_description}
|
|
46
46
|
<p>{manager?.table_description}</p>
|
|
47
47
|
{/if}
|
|
48
|
+
|
|
49
|
+
<div>
|
|
50
|
+
<h4 class="label">JSON Schema</h4>
|
|
51
|
+
<Button manager={manager?.settings_copy_row_json_schema_button_manager} />
|
|
52
|
+
<Button manager={manager?.settings_copy_rows_json_schema_button_manager} />
|
|
53
|
+
</div>
|
|
48
54
|
{#if manager?.is_data_editable}
|
|
49
55
|
<Button manager={manager?.settings_preempt_delete_table_popover_button_manager} />
|
|
50
56
|
<Popover manager={manager?.settings_delete_table_popover_manager}>
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from "$lib/client/index.js"
|
|
21
21
|
import { tick } from "svelte"
|
|
22
22
|
import { browser } from "$app/environment"
|
|
23
|
+
import { literal_types } from "$lib/client/types/index.js"
|
|
23
24
|
|
|
24
25
|
export function create_table_advanced_manager(config) {
|
|
25
26
|
const id = create_unique_id(null, 20)
|
|
@@ -45,6 +46,8 @@ export function create_table_advanced_manager(config) {
|
|
|
45
46
|
let settings_update_table_name_text_input_manager = $state(null)
|
|
46
47
|
let settings_update_table_description_button_manager = $state(null)
|
|
47
48
|
let settings_update_table_description_text_input_manager = $state(null)
|
|
49
|
+
let settings_copy_row_json_schema_button_manager = $state(null)
|
|
50
|
+
let settings_copy_rows_json_schema_button_manager = $state(null)
|
|
48
51
|
let settings_preempt_delete_table_popover_button_manager = $state(null)
|
|
49
52
|
let settings_delete_table_popover_manager = $state(null)
|
|
50
53
|
let settings_delete_table_cancel_button_manager = $state(null)
|
|
@@ -109,6 +112,55 @@ export function create_table_advanced_manager(config) {
|
|
|
109
112
|
let rows_data = $derived(get_def_from_variable_path(rows_data_from_variable_path, definition_stack))
|
|
110
113
|
let row_indexes_display_order = $derived(get_available_row_indexes())
|
|
111
114
|
let row_indexes_display_order_shown = $derived(get_row_indexes_shown())
|
|
115
|
+
let row_json_schema = $derived(get_row_json_schema(columns_prepped))
|
|
116
|
+
|
|
117
|
+
function get_row_json_schema(input) {
|
|
118
|
+
console.log("get_row_json_schema", input)
|
|
119
|
+
let properties = {}
|
|
120
|
+
if (Object.keys(input || {}).length > 0) {
|
|
121
|
+
for (let key of Object.keys(input)) {
|
|
122
|
+
console.log("key", key)
|
|
123
|
+
if (input?.[key]?.is_db_column && !input?.[key]?.is_autogenerated) {
|
|
124
|
+
properties[key] = get_json_schema_from_db_type(input?.[key]?.db_data_type)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
return null
|
|
129
|
+
}
|
|
130
|
+
return JSON.stringify({
|
|
131
|
+
type: "object",
|
|
132
|
+
properties: properties,
|
|
133
|
+
required: Object.keys(properties),
|
|
134
|
+
additionalProperties: false,
|
|
135
|
+
})
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function get_json_schema_from_db_type(input) {
|
|
139
|
+
if (input?.type == "array_uniform_literal") {
|
|
140
|
+
return {
|
|
141
|
+
type: "array",
|
|
142
|
+
items: get_json_schema_from_db_type(input?.items),
|
|
143
|
+
}
|
|
144
|
+
} else if (input?.type == "object_literal") {
|
|
145
|
+
let properties = {}
|
|
146
|
+
for (let key of Object.keys(input?.properties)) {
|
|
147
|
+
properties[key] = get_json_schema_from_db_type(input?.properties?.[key])
|
|
148
|
+
}
|
|
149
|
+
return { type: "object", properties: properties, required: Object.keys(properties), additionalProperties: false }
|
|
150
|
+
} else if (input?.type == "object_uniform_literal") {
|
|
151
|
+
// tbd try and avoid this
|
|
152
|
+
return { type: "null_literal" }
|
|
153
|
+
}
|
|
154
|
+
let default_json_schema = literal_types?.[input?.type]?.json_schema
|
|
155
|
+
if (default_json_schema?.type == "object") {
|
|
156
|
+
default_json_schema = {
|
|
157
|
+
...default_json_schema,
|
|
158
|
+
required: Object.keys(default_json_schema?.properties),
|
|
159
|
+
additionalProperties: false,
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return default_json_schema
|
|
163
|
+
}
|
|
112
164
|
|
|
113
165
|
let cur_page_to_use = $derived(
|
|
114
166
|
!Array.isArray(row_indexes_display_order) || row_indexes_display_order.length < rows_per_page_dropdown_manager?.val
|
|
@@ -319,6 +371,7 @@ export function create_table_advanced_manager(config) {
|
|
|
319
371
|
}
|
|
320
372
|
}
|
|
321
373
|
columns_prepped = columns_prepped_loc
|
|
374
|
+
console.log("columns_prepped", deep_copy(columns_prepped))
|
|
322
375
|
return columns_prepped
|
|
323
376
|
}
|
|
324
377
|
|
|
@@ -1031,7 +1084,7 @@ export function create_table_advanced_manager(config) {
|
|
|
1031
1084
|
})
|
|
1032
1085
|
settings_popover_manager = create_popover_manager({
|
|
1033
1086
|
type: "dropdown",
|
|
1034
|
-
target_width:
|
|
1087
|
+
target_width: 260,
|
|
1035
1088
|
target_height: 300,
|
|
1036
1089
|
anchor_id: () => `button_${settings_popover_toggle_button_manager?.id}`,
|
|
1037
1090
|
})
|
|
@@ -1134,6 +1187,25 @@ export function create_table_advanced_manager(config) {
|
|
|
1134
1187
|
min_height: 2.4,
|
|
1135
1188
|
popover_target: () => `popover_${settings_update_table_description_text_input_manager?.popover_manager?.id}`,
|
|
1136
1189
|
})
|
|
1190
|
+
settings_copy_row_json_schema_button_manager = create_button_manager({
|
|
1191
|
+
type: "outlined",
|
|
1192
|
+
text: "Copy Row JSON Schema",
|
|
1193
|
+
is_success_animation: true,
|
|
1194
|
+
support_icon: "clipboard",
|
|
1195
|
+
mb: 1,
|
|
1196
|
+
on_click: () => copy_to_clipboard(row_json_schema),
|
|
1197
|
+
})
|
|
1198
|
+
settings_copy_rows_json_schema_button_manager = create_button_manager({
|
|
1199
|
+
type: "outlined",
|
|
1200
|
+
text: "Copy Rows JSON Schema",
|
|
1201
|
+
is_success_animation: true,
|
|
1202
|
+
support_icon: "clipboard",
|
|
1203
|
+
on_click: () =>
|
|
1204
|
+
copy_to_clipboard({
|
|
1205
|
+
type: "array",
|
|
1206
|
+
items: row_json_schema,
|
|
1207
|
+
}),
|
|
1208
|
+
})
|
|
1137
1209
|
let delete_table_is_loading = $state(false)
|
|
1138
1210
|
settings_delete_table_popover_manager = create_popover_manager({
|
|
1139
1211
|
type: "center",
|
|
@@ -1457,6 +1529,12 @@ export function create_table_advanced_manager(config) {
|
|
|
1457
1529
|
get settings_update_table_description_text_input_manager() {
|
|
1458
1530
|
return settings_update_table_description_text_input_manager
|
|
1459
1531
|
},
|
|
1532
|
+
get settings_copy_row_json_schema_button_manager() {
|
|
1533
|
+
return settings_copy_row_json_schema_button_manager
|
|
1534
|
+
},
|
|
1535
|
+
get settings_copy_rows_json_schema_button_manager() {
|
|
1536
|
+
return settings_copy_rows_json_schema_button_manager
|
|
1537
|
+
},
|
|
1460
1538
|
get settings_preempt_delete_table_popover_button_manager() {
|
|
1461
1539
|
return settings_preempt_delete_table_popover_button_manager
|
|
1462
1540
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { time_formats } from "$lib/Components/TimeInput/index.js"
|
|
2
|
+
|
|
1
3
|
export const mime_type_extensions = {
|
|
2
4
|
"image/webp": "webp",
|
|
3
5
|
"image/jpeg": "jpeg",
|
|
@@ -392,19 +394,161 @@ const time_literal = {
|
|
|
392
394
|
json_schema: {
|
|
393
395
|
type: "object",
|
|
394
396
|
properties: {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
397
|
+
format: {
|
|
398
|
+
type: "string",
|
|
399
|
+
description: JSON.stringify(time_formats),
|
|
400
|
+
},
|
|
401
|
+
epoch: {
|
|
402
|
+
anyOf: [
|
|
403
|
+
{
|
|
404
|
+
type: "number",
|
|
405
|
+
description: "epoch in seconds",
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
type: "null",
|
|
409
|
+
},
|
|
410
|
+
],
|
|
411
|
+
description: "derived can keep null",
|
|
412
|
+
},
|
|
413
|
+
granularity: {
|
|
414
|
+
type: "string",
|
|
415
|
+
enum: ["year", "month", "week", "day", "hour", "minute", "second"],
|
|
416
|
+
description: ["year", "month", "week", "day", "hour", "minute", "second"].join(", "),
|
|
417
|
+
},
|
|
418
|
+
year: {
|
|
419
|
+
anyOf: [
|
|
420
|
+
{
|
|
421
|
+
type: "number",
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
type: "null",
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
description: "derived can keep null",
|
|
428
|
+
},
|
|
429
|
+
month: {
|
|
430
|
+
anyOf: [
|
|
431
|
+
{
|
|
432
|
+
type: "number",
|
|
433
|
+
enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
type: "null",
|
|
437
|
+
},
|
|
438
|
+
],
|
|
439
|
+
description: "derived can keep null",
|
|
440
|
+
},
|
|
441
|
+
day_of_month: {
|
|
442
|
+
anyOf: [
|
|
443
|
+
{
|
|
444
|
+
type: "number",
|
|
445
|
+
minimum: 1,
|
|
446
|
+
maximum: 31,
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
type: "null",
|
|
450
|
+
},
|
|
451
|
+
],
|
|
452
|
+
description: "derived can keep null",
|
|
453
|
+
},
|
|
454
|
+
day_of_week: {
|
|
455
|
+
anyOf: [
|
|
456
|
+
{
|
|
457
|
+
type: "number",
|
|
458
|
+
enum: [0, 1, 2, 3, 4, 5, 6],
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
type: "null",
|
|
462
|
+
},
|
|
463
|
+
],
|
|
464
|
+
description: "derived can keep null",
|
|
465
|
+
},
|
|
466
|
+
day_of_year: {
|
|
467
|
+
anyOf: [
|
|
468
|
+
{
|
|
469
|
+
type: "number",
|
|
470
|
+
minimum: 1,
|
|
471
|
+
maximum: 365,
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
type: "null",
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
description: "derived can keep null",
|
|
478
|
+
},
|
|
479
|
+
week_of_year: {
|
|
480
|
+
anyOf: [
|
|
481
|
+
{
|
|
482
|
+
type: "number",
|
|
483
|
+
minimum: 1,
|
|
484
|
+
maximum: 52,
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
type: "null",
|
|
488
|
+
},
|
|
489
|
+
],
|
|
490
|
+
description: "derived can keep null",
|
|
491
|
+
},
|
|
492
|
+
hour: {
|
|
493
|
+
anyOf: [
|
|
494
|
+
{
|
|
495
|
+
type: "number",
|
|
496
|
+
minimum: 1,
|
|
497
|
+
maximum: 24,
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
type: "null",
|
|
501
|
+
},
|
|
502
|
+
],
|
|
503
|
+
description: "derived can keep null",
|
|
504
|
+
},
|
|
505
|
+
minute: {
|
|
506
|
+
anyOf: [
|
|
507
|
+
{
|
|
508
|
+
type: "number",
|
|
509
|
+
minimum: 1,
|
|
510
|
+
maximum: 60,
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
type: "null",
|
|
514
|
+
},
|
|
515
|
+
],
|
|
516
|
+
description: "derived can keep null",
|
|
517
|
+
},
|
|
518
|
+
timezone: {
|
|
519
|
+
anyOf: [
|
|
520
|
+
{
|
|
521
|
+
type: "string",
|
|
522
|
+
description: time_zone_options.map((h) => h?.key).join(", "),
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
type: "null",
|
|
526
|
+
},
|
|
527
|
+
],
|
|
528
|
+
description: "derived can keep null",
|
|
529
|
+
},
|
|
530
|
+
content: {
|
|
531
|
+
anyOf: [
|
|
532
|
+
{
|
|
533
|
+
type: "string",
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
type: "null",
|
|
537
|
+
},
|
|
538
|
+
],
|
|
539
|
+
description: "derived can keep null",
|
|
540
|
+
},
|
|
541
|
+
datetime: {
|
|
542
|
+
anyOf: [
|
|
543
|
+
{
|
|
544
|
+
type: "string",
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
type: "null",
|
|
548
|
+
},
|
|
549
|
+
],
|
|
550
|
+
description: "derived can keep null",
|
|
551
|
+
},
|
|
408
552
|
},
|
|
409
553
|
additionalProperties: false,
|
|
410
554
|
required: ["epoch"],
|
|
@@ -2078,7 +2222,6 @@ export const language_options = [
|
|
|
2078
2222
|
{ key: "ta", name: "தமிழ்", english_name: "Tamil", emoji: "🇮🇳" },
|
|
2079
2223
|
{ key: "te", name: "తెలుగు", english_name: "Telugu", emoji: "🇮🇳" },
|
|
2080
2224
|
]
|
|
2081
|
-
// javascript: sequelize model definition using the iana timezone identifier
|
|
2082
2225
|
|
|
2083
2226
|
export const time_zone_options = [
|
|
2084
2227
|
{ key: "america/puerto_rico", name: "atlantic time / puerto rico (ast)", emoji: "🇵🇷" },
|