@json-layout/vocabulary 0.1.0 → 0.3.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.
@@ -1,6 +1,9 @@
1
1
  export type NormalizedLayout = SwitchStruct | CompObject;
2
2
  export type CompObject = {
3
3
  if?: Expression;
4
+ defaultData?: Expression;
5
+ constData?: Expression;
6
+ nullable?: boolean;
4
7
  help?: string;
5
8
  cols?: ColsObj;
6
9
  props?: StateNodePropsLib;
@@ -18,6 +21,7 @@ export type CompObject = {
18
21
  | TextField
19
22
  | NumberField
20
23
  | Textarea
24
+ | Markdown
21
25
  | Checkbox
22
26
  | Switch
23
27
  | Slider
@@ -25,12 +29,16 @@ export type CompObject = {
25
29
  | DateTimePicker
26
30
  | TimePicker
27
31
  | ColorPicker
32
+ | Combobox
33
+ | NumberCombobox
28
34
  | Select
35
+ | Autocomplete
29
36
  | OneOfSelect
30
37
  | Section
31
38
  | Tabs
32
39
  | VerticalTabs
33
40
  | ExpansionPanels
41
+ | Stepper
34
42
  );
35
43
  export type Cols = number;
36
44
  /**
@@ -60,9 +68,9 @@ export type GetItems = {
60
68
  itemTitle?: Expression;
61
69
  itemKey?: Expression;
62
70
  itemValue?: Expression;
71
+ itemIcon?: Expression;
63
72
  [k: string]: unknown;
64
- } & GetItems1;
65
- export type GetItems1 = Expression | GetItemsFetch;
73
+ } & (Expression | GetItemsFetch);
66
74
  export type Child = Child1 & {
67
75
  key: string | number;
68
76
  cols?: ColsObj;
@@ -75,6 +83,10 @@ export type Children = Child[];
75
83
  export interface SwitchStruct {
76
84
  switch: CompObject[];
77
85
  }
86
+ /**
87
+ * This interface was referenced by `undefined`'s JSON-Schema definition
88
+ * via the `patternProperty` ".*".
89
+ */
78
90
  export interface Expression {
79
91
  type: "js-fn" | "js-eval" | "js-tpl";
80
92
  expr: string;
@@ -129,11 +141,13 @@ export interface List {
129
141
  export interface TextField {
130
142
  comp: "text-field";
131
143
  label: string;
144
+ autofocus?: boolean;
132
145
  [k: string]: unknown;
133
146
  }
134
147
  export interface NumberField {
135
148
  comp: "number-field";
136
149
  label: string;
150
+ autofocus?: boolean;
137
151
  step?: number;
138
152
  min?: number;
139
153
  max?: number;
@@ -142,6 +156,13 @@ export interface NumberField {
142
156
  export interface Textarea {
143
157
  comp: "textarea";
144
158
  label: string;
159
+ autofocus?: boolean;
160
+ [k: string]: unknown;
161
+ }
162
+ export interface Markdown {
163
+ comp: "markdown";
164
+ label: string;
165
+ autofocus?: boolean;
145
166
  [k: string]: unknown;
146
167
  }
147
168
  export interface Checkbox {
@@ -189,28 +210,62 @@ export interface ColorPicker {
189
210
  label: string;
190
211
  [k: string]: unknown;
191
212
  }
192
- export interface Select {
193
- comp: "select";
213
+ export interface Combobox {
214
+ comp: "combobox";
194
215
  label: string;
216
+ autofocus?: boolean;
195
217
  items?: SelectItems;
196
218
  getItems?: GetItems;
219
+ multiple?: boolean;
197
220
  [k: string]: unknown;
198
221
  }
199
222
  export interface SelectItem {
200
223
  title: string;
201
224
  key: string;
202
225
  value: unknown;
226
+ icon?: string;
203
227
  [k: string]: unknown;
204
228
  }
205
229
  export interface GetItemsFetch {
206
230
  url: Expression;
231
+ qSearchParam?: string;
232
+ searchParams?: {
233
+ [k: string]: Expression;
234
+ };
235
+ [k: string]: unknown;
236
+ }
237
+ export interface NumberCombobox {
238
+ comp: "number-combobox";
239
+ label: string;
240
+ autofocus?: boolean;
241
+ items?: SelectItems;
242
+ getItems?: GetItems;
243
+ multiple?: boolean;
244
+ step?: number;
245
+ min?: number;
246
+ max?: number;
247
+ [k: string]: unknown;
248
+ }
249
+ export interface Select {
250
+ comp: "select";
251
+ label: string;
252
+ autofocus?: boolean;
253
+ items?: SelectItems;
254
+ getItems?: GetItems;
255
+ multiple?: boolean;
256
+ [k: string]: unknown;
257
+ }
258
+ export interface Autocomplete {
259
+ comp: "autocomplete";
260
+ label: string;
261
+ autofocus?: boolean;
262
+ items?: SelectItems;
263
+ getItems?: GetItems;
264
+ multiple?: boolean;
207
265
  [k: string]: unknown;
208
266
  }
209
267
  export interface OneOfSelect {
210
268
  comp: "one-of-select";
211
- if?: Expression;
212
- label?: string;
213
- help?: string;
214
269
  [k: string]: unknown;
215
270
  }
216
271
  export interface Section {
@@ -241,3 +296,10 @@ export interface ExpansionPanels {
241
296
  children: Children;
242
297
  [k: string]: unknown;
243
298
  }
299
+ export interface Stepper {
300
+ comp: "stepper";
301
+ title?: string | null;
302
+ subtitle?: string | null;
303
+ children: Children;
304
+ [k: string]: unknown;
305
+ }