@json-layout/vocabulary 0.1.0 → 0.2.0

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.
@@ -94,6 +94,9 @@ export default {
94
94
  {
95
95
  "$ref": "#/$defs/textarea"
96
96
  },
97
+ {
98
+ "$ref": "#/$defs/markdown"
99
+ },
97
100
  {
98
101
  "$ref": "#/$defs/checkbox"
99
102
  },
@@ -115,9 +118,18 @@ export default {
115
118
  {
116
119
  "$ref": "#/$defs/color-picker"
117
120
  },
121
+ {
122
+ "$ref": "#/$defs/combobox"
123
+ },
124
+ {
125
+ "$ref": "#/$defs/number-combobox"
126
+ },
118
127
  {
119
128
  "$ref": "#/$defs/select"
120
129
  },
130
+ {
131
+ "$ref": "#/$defs/autocomplete"
132
+ },
121
133
  {
122
134
  "$ref": "#/$defs/one-of-select"
123
135
  },
@@ -425,6 +437,21 @@ export default {
425
437
  }
426
438
  }
427
439
  },
440
+ "markdown": {
441
+ "type": "object",
442
+ "required": [
443
+ "comp",
444
+ "label"
445
+ ],
446
+ "properties": {
447
+ "comp": {
448
+ "const": "markdown"
449
+ },
450
+ "label": {
451
+ "type": "string"
452
+ }
453
+ }
454
+ },
428
455
  "checkbox": {
429
456
  "type": "object",
430
457
  "required": [
@@ -573,6 +600,63 @@ export default {
573
600
  }
574
601
  }
575
602
  },
603
+ "combobox": {
604
+ "type": "object",
605
+ "required": [
606
+ "comp",
607
+ "label"
608
+ ],
609
+ "properties": {
610
+ "comp": {
611
+ "const": "combobox"
612
+ },
613
+ "label": {
614
+ "type": "string"
615
+ },
616
+ "items": {
617
+ "$ref": "#/$defs/select-items"
618
+ },
619
+ "getItems": {
620
+ "$ref": "#/$defs/get-items"
621
+ },
622
+ "multiple": {
623
+ "type": "boolean"
624
+ }
625
+ }
626
+ },
627
+ "number-combobox": {
628
+ "type": "object",
629
+ "required": [
630
+ "comp",
631
+ "label"
632
+ ],
633
+ "properties": {
634
+ "comp": {
635
+ "const": "number-combobox"
636
+ },
637
+ "label": {
638
+ "type": "string"
639
+ },
640
+ "items": {
641
+ "$ref": "#/$defs/select-items"
642
+ },
643
+ "getItems": {
644
+ "$ref": "#/$defs/get-items"
645
+ },
646
+ "multiple": {
647
+ "type": "boolean"
648
+ },
649
+ "step": {
650
+ "type": "number"
651
+ },
652
+ "min": {
653
+ "type": "number"
654
+ },
655
+ "max": {
656
+ "type": "number"
657
+ }
658
+ }
659
+ },
576
660
  "select": {
577
661
  "type": "object",
578
662
  "required": [
@@ -591,6 +675,33 @@ export default {
591
675
  },
592
676
  "getItems": {
593
677
  "$ref": "#/$defs/get-items"
678
+ },
679
+ "multiple": {
680
+ "type": "boolean"
681
+ }
682
+ }
683
+ },
684
+ "autocomplete": {
685
+ "type": "object",
686
+ "required": [
687
+ "comp",
688
+ "label"
689
+ ],
690
+ "properties": {
691
+ "comp": {
692
+ "const": "autocomplete"
693
+ },
694
+ "label": {
695
+ "type": "string"
696
+ },
697
+ "items": {
698
+ "$ref": "#/$defs/select-items"
699
+ },
700
+ "getItems": {
701
+ "$ref": "#/$defs/get-items"
702
+ },
703
+ "multiple": {
704
+ "type": "boolean"
594
705
  }
595
706
  }
596
707
  },
@@ -614,35 +725,47 @@ export default {
614
725
  "key": {
615
726
  "type": "string"
616
727
  },
617
- "value": {}
728
+ "value": {},
729
+ "icon": {
730
+ "type": "string"
731
+ }
618
732
  }
619
733
  },
620
734
  "get-items": {
621
735
  "type": "object",
622
- "properties": {
623
- "returnObjects": {
624
- "type": "boolean",
625
- "readOnly": true
626
- },
627
- "itemsResults": {
628
- "$ref": "#/$defs/expression"
629
- },
630
- "itemTitle": {
631
- "$ref": "#/$defs/expression"
632
- },
633
- "itemKey": {
634
- "$ref": "#/$defs/expression"
635
- },
636
- "itemValue": {
637
- "$ref": "#/$defs/expression"
638
- }
639
- },
640
- "oneOf": [
736
+ "allOf": [
641
737
  {
642
- "$ref": "#/$defs/expression"
738
+ "properties": {
739
+ "returnObjects": {
740
+ "type": "boolean",
741
+ "readOnly": true
742
+ },
743
+ "itemsResults": {
744
+ "$ref": "#/$defs/expression"
745
+ },
746
+ "itemTitle": {
747
+ "$ref": "#/$defs/expression"
748
+ },
749
+ "itemKey": {
750
+ "$ref": "#/$defs/expression"
751
+ },
752
+ "itemValue": {
753
+ "$ref": "#/$defs/expression"
754
+ },
755
+ "itemIcon": {
756
+ "$ref": "#/$defs/expression"
757
+ }
758
+ }
643
759
  },
644
760
  {
645
- "$ref": "#/$defs/get-items-fetch"
761
+ "oneOf": [
762
+ {
763
+ "$ref": "#/$defs/expression"
764
+ },
765
+ {
766
+ "$ref": "#/$defs/get-items-fetch"
767
+ }
768
+ ]
646
769
  }
647
770
  ]
648
771
  },
@@ -654,6 +777,17 @@ export default {
654
777
  "properties": {
655
778
  "url": {
656
779
  "$ref": "#/$defs/expression"
780
+ },
781
+ "qSearchParam": {
782
+ "type": "string"
783
+ },
784
+ "searchParams": {
785
+ "type": "object",
786
+ "patternProperties": {
787
+ ".*": {
788
+ "$ref": "#/$defs/expression"
789
+ }
790
+ }
657
791
  }
658
792
  }
659
793
  },
@@ -665,15 +799,6 @@ export default {
665
799
  "properties": {
666
800
  "comp": {
667
801
  "const": "one-of-select"
668
- },
669
- "if": {
670
- "$ref": "#/$defs/expression"
671
- },
672
- "label": {
673
- "type": "string"
674
- },
675
- "help": {
676
- "type": "string"
677
802
  }
678
803
  }
679
804
  },
@@ -52,6 +52,7 @@
52
52
  {"$ref": "#/$defs/text-field"},
53
53
  {"$ref": "#/$defs/number-field"},
54
54
  {"$ref": "#/$defs/textarea"},
55
+ {"$ref": "#/$defs/markdown"},
55
56
  {"$ref": "#/$defs/checkbox"},
56
57
  {"$ref": "#/$defs/switch"},
57
58
  {"$ref": "#/$defs/slider"},
@@ -59,7 +60,10 @@
59
60
  {"$ref": "#/$defs/date-time-picker"},
60
61
  {"$ref": "#/$defs/time-picker"},
61
62
  {"$ref": "#/$defs/color-picker"},
63
+ {"$ref": "#/$defs/combobox"},
64
+ {"$ref": "#/$defs/number-combobox"},
62
65
  {"$ref": "#/$defs/select"},
66
+ {"$ref": "#/$defs/autocomplete"},
63
67
  {"$ref": "#/$defs/one-of-select"},
64
68
  {"$ref": "#/$defs/section"},
65
69
  {"$ref": "#/$defs/tabs"},
@@ -194,6 +198,14 @@
194
198
  "label": {"type": "string"}
195
199
  }
196
200
  },
201
+ "markdown": {
202
+ "type": "object",
203
+ "required": ["comp", "label"],
204
+ "properties": {
205
+ "comp": {"const": "markdown"},
206
+ "label": {"type": "string"}
207
+ }
208
+ },
197
209
  "checkbox": {
198
210
  "type": "object",
199
211
  "required": ["comp", "label"],
@@ -260,6 +272,31 @@
260
272
  "label": {"type": "string"}
261
273
  }
262
274
  },
275
+ "combobox": {
276
+ "type": "object",
277
+ "required": ["comp", "label"],
278
+ "properties": {
279
+ "comp": {"const": "combobox"},
280
+ "label": {"type": "string"},
281
+ "items": {"$ref": "#/$defs/select-items"},
282
+ "getItems": {"$ref": "#/$defs/get-items"},
283
+ "multiple": {"type": "boolean"}
284
+ }
285
+ },
286
+ "number-combobox": {
287
+ "type": "object",
288
+ "required": ["comp", "label"],
289
+ "properties": {
290
+ "comp": {"const": "number-combobox"},
291
+ "label": {"type": "string"},
292
+ "items": {"$ref": "#/$defs/select-items"},
293
+ "getItems": {"$ref": "#/$defs/get-items"},
294
+ "multiple": {"type": "boolean"},
295
+ "step": {"type": "number"},
296
+ "min": {"type": "number"},
297
+ "max": {"type": "number"}
298
+ }
299
+ },
263
300
  "select": {
264
301
  "type": "object",
265
302
  "required": ["comp", "label"],
@@ -267,7 +304,19 @@
267
304
  "comp": {"const": "select"},
268
305
  "label": {"type": "string"},
269
306
  "items": {"$ref": "#/$defs/select-items"},
270
- "getItems": {"$ref": "#/$defs/get-items"}
307
+ "getItems": {"$ref": "#/$defs/get-items"},
308
+ "multiple": {"type": "boolean"}
309
+ }
310
+ },
311
+ "autocomplete": {
312
+ "type": "object",
313
+ "required": ["comp", "label"],
314
+ "properties": {
315
+ "comp": {"const": "autocomplete"},
316
+ "label": {"type": "string"},
317
+ "items": {"$ref": "#/$defs/select-items"},
318
+ "getItems": {"$ref": "#/$defs/get-items"},
319
+ "multiple": {"type": "boolean"}
271
320
  }
272
321
  },
273
322
  "select-items": {
@@ -280,38 +329,48 @@
280
329
  "properties": {
281
330
  "title": {"type": "string"},
282
331
  "key": {"type": "string"},
283
- "value": {}
332
+ "value": {},
333
+ "icon": {"type": "string"}
284
334
  }
285
335
  },
286
336
  "get-items": {
287
337
  "type": "object",
288
- "properties": {
289
- "returnObjects": {"type": "boolean", "readOnly": true},
290
- "itemsResults": {"$ref": "#/$defs/expression"},
291
- "itemTitle": {"$ref": "#/$defs/expression"},
292
- "itemKey": {"$ref": "#/$defs/expression"},
293
- "itemValue": {"$ref": "#/$defs/expression"}
338
+ "allOf": [{
339
+ "properties": {
340
+ "returnObjects": {"type": "boolean", "readOnly": true},
341
+ "itemsResults": {"$ref": "#/$defs/expression"},
342
+ "itemTitle": {"$ref": "#/$defs/expression"},
343
+ "itemKey": {"$ref": "#/$defs/expression"},
344
+ "itemValue": {"$ref": "#/$defs/expression"},
345
+ "itemIcon": {"$ref": "#/$defs/expression"}
346
+ }
294
347
  },
295
- "oneOf": [
296
- {"$ref": "#/$defs/expression"},
297
- {"$ref": "#/$defs/get-items-fetch"}
298
- ]
348
+ {
349
+ "oneOf": [
350
+ {"$ref": "#/$defs/expression"},
351
+ {"$ref": "#/$defs/get-items-fetch"}
352
+ ]
353
+ }]
299
354
  },
300
355
  "get-items-fetch": {
301
356
  "type": "object",
302
357
  "required": ["url"],
303
358
  "properties": {
304
- "url": {"$ref": "#/$defs/expression"}
359
+ "url": {"$ref": "#/$defs/expression"},
360
+ "qSearchParam": {"type": "string"},
361
+ "searchParams": {
362
+ "type": "object",
363
+ "patternProperties": {
364
+ ".*": {"$ref": "#/$defs/expression"}
365
+ }
366
+ }
305
367
  }
306
368
  },
307
369
  "one-of-select": {
308
370
  "type": "object",
309
371
  "required": ["comp"],
310
372
  "properties": {
311
- "comp": {"const": "one-of-select"},
312
- "if": {"$ref": "#/$defs/expression"},
313
- "label": {"type": "string"},
314
- "help": {"type": "string"}
373
+ "comp": {"const": "one-of-select"}
315
374
  }
316
375
  },
317
376
  "expression": {
@@ -18,6 +18,7 @@ export type CompObject = {
18
18
  | TextField
19
19
  | NumberField
20
20
  | Textarea
21
+ | Markdown
21
22
  | Checkbox
22
23
  | Switch
23
24
  | Slider
@@ -25,7 +26,10 @@ export type CompObject = {
25
26
  | DateTimePicker
26
27
  | TimePicker
27
28
  | ColorPicker
29
+ | Combobox
30
+ | NumberCombobox
28
31
  | Select
32
+ | Autocomplete
29
33
  | OneOfSelect
30
34
  | Section
31
35
  | Tabs
@@ -60,9 +64,9 @@ export type GetItems = {
60
64
  itemTitle?: Expression;
61
65
  itemKey?: Expression;
62
66
  itemValue?: Expression;
67
+ itemIcon?: Expression;
63
68
  [k: string]: unknown;
64
- } & GetItems1;
65
- export type GetItems1 = Expression | GetItemsFetch;
69
+ } & (Expression | GetItemsFetch);
66
70
  export type Child = Child1 & {
67
71
  key: string | number;
68
72
  cols?: ColsObj;
@@ -75,6 +79,10 @@ export type Children = Child[];
75
79
  export interface SwitchStruct {
76
80
  switch: CompObject[];
77
81
  }
82
+ /**
83
+ * This interface was referenced by `undefined`'s JSON-Schema definition
84
+ * via the `patternProperty` ".*".
85
+ */
78
86
  export interface Expression {
79
87
  type: "js-fn" | "js-eval" | "js-tpl";
80
88
  expr: string;
@@ -144,6 +152,11 @@ export interface Textarea {
144
152
  label: string;
145
153
  [k: string]: unknown;
146
154
  }
155
+ export interface Markdown {
156
+ comp: "markdown";
157
+ label: string;
158
+ [k: string]: unknown;
159
+ }
147
160
  export interface Checkbox {
148
161
  comp: "checkbox";
149
162
  label: string;
@@ -189,28 +202,58 @@ export interface ColorPicker {
189
202
  label: string;
190
203
  [k: string]: unknown;
191
204
  }
192
- export interface Select {
193
- comp: "select";
205
+ export interface Combobox {
206
+ comp: "combobox";
194
207
  label: string;
195
208
  items?: SelectItems;
196
209
  getItems?: GetItems;
210
+ multiple?: boolean;
197
211
  [k: string]: unknown;
198
212
  }
199
213
  export interface SelectItem {
200
214
  title: string;
201
215
  key: string;
202
216
  value: unknown;
217
+ icon?: string;
203
218
  [k: string]: unknown;
204
219
  }
205
220
  export interface GetItemsFetch {
206
221
  url: Expression;
222
+ qSearchParam?: string;
223
+ searchParams?: {
224
+ [k: string]: Expression;
225
+ };
226
+ [k: string]: unknown;
227
+ }
228
+ export interface NumberCombobox {
229
+ comp: "number-combobox";
230
+ label: string;
231
+ items?: SelectItems;
232
+ getItems?: GetItems;
233
+ multiple?: boolean;
234
+ step?: number;
235
+ min?: number;
236
+ max?: number;
237
+ [k: string]: unknown;
238
+ }
239
+ export interface Select {
240
+ comp: "select";
241
+ label: string;
242
+ items?: SelectItems;
243
+ getItems?: GetItems;
244
+ multiple?: boolean;
245
+ [k: string]: unknown;
246
+ }
247
+ export interface Autocomplete {
248
+ comp: "autocomplete";
249
+ label: string;
250
+ items?: SelectItems;
251
+ getItems?: GetItems;
252
+ multiple?: boolean;
207
253
  [k: string]: unknown;
208
254
  }
209
255
  export interface OneOfSelect {
210
256
  comp: "one-of-select";
211
- if?: Expression;
212
- label?: string;
213
- help?: string;
214
257
  [k: string]: unknown;
215
258
  }
216
259
  export interface Section {