@json-layout/vocabulary 1.4.1 → 1.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-layout/vocabulary",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Main JSON Layout vocabulary as JSON schemas and Typescript types. Also contains some small utility functions to validate and normalize annotations.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -23,7 +23,6 @@
23
23
  "clean": "rm -rf ./types && rm -f src/*/types.ts && rm -f src/*/validate.js",
24
24
  "build:types": "node scripts/compile-types.js",
25
25
  "build:tsc": "tsc -p tsconfig.build.json",
26
- "lint": "eslint . --fix",
27
26
  "watch:schemas": "node --watch scripts/compile-schemas.js",
28
27
  "watch:build": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
29
28
  "watch:test": "node --test --watch test/*.spec.js"
@@ -45,9 +44,9 @@
45
44
  },
46
45
  "homepage": "https://github.com/json-layout/json-layout#readme",
47
46
  "dependencies": {
48
- "ajv": "^8.12.0",
47
+ "ajv": "^8.17.1",
49
48
  "ajv-errors": "^3.0.0",
50
- "ajv-formats": "^2.1.1",
49
+ "ajv-formats": "^3.0.1",
51
50
  "debug": "^4.3.4"
52
51
  },
53
52
  "devDependencies": {
package/src/index.js CHANGED
@@ -4,4 +4,4 @@
4
4
  export * from './layout-keyword/index.js'
5
5
  export * from './normalized-layout/index.js'
6
6
  export * from './components/index.js'
7
- export { normalizeLayoutFragment, getSchemaFragmentType } from './normalize.js'
7
+ export { normalizeLayoutFragment, getSchemaFragmentType, mergeNullableSubSchema } from './normalize.js'
@@ -1,5 +1,5 @@
1
1
  import schema from './schema.js'
2
- import {ajv} from '../validate.js'
2
+ import { ajv } from '../validate.js'
3
3
 
4
4
  /**
5
5
  * @typedef {import('./types.js').LayoutKeyword} LayoutKeyword
@@ -19,10 +19,9 @@ import {ajv} from '../validate.js'
19
19
  * @typedef {import('./types.js').PartialSlotName} PartialSlotName
20
20
  * @typedef {import('./types.js').PartialSlot} PartialSlot
21
21
  * @typedef {import('./types.js').PartialSelectItem} PartialSelectItem
22
- * @typedef {{ errors: any, (layoutKeyword: any): layoutKeyword is LayoutKeyword }} ValidateLayoutKeyword
23
22
  */
24
23
 
25
- export const /** @type {ValidateLayoutKeyword} */ validateLayoutKeyword = /** @type {any} */ (ajv.getSchema(schema.$id))
24
+ export const /** @type {import('../types.js').ValidateLayoutKeyword} */ validateLayoutKeyword = /** @type {any} */ (ajv.getSchema(schema.$id))
26
25
 
27
26
  export const layoutKeywordSchema = /** @type {any} */ (schema)
28
27
 
@@ -73,15 +72,15 @@ export function isPartialGetItemsFetch (getItems) {
73
72
 
74
73
  /** @type {(partialSlot: PartialSlot) => partialSlot is PartialSlotMarkdown} */
75
74
  export function isPartialSlotMarkdown (partialSlot) {
76
- return typeof partialSlot == 'object' && !!/** @type {PartialSlotMarkdown} */(partialSlot).markdown
75
+ return typeof partialSlot === 'object' && !!(/** @type {any} */(partialSlot)).markdown
77
76
  }
78
77
 
79
78
  /** @type {(partialSlot: PartialSlot) => partialSlot is PartialSlotText} */
80
79
  export function isPartialSlotText (partialSlot) {
81
- return typeof partialSlot == 'object' && !!/** @type {PartialSlotText} */(partialSlot).text
80
+ return typeof partialSlot === 'object' && !!(/** @type {any} */(partialSlot)).text
82
81
  }
83
82
 
84
83
  /** @type {(partialSlot: PartialSlot) => partialSlot is PartialSlotName} */
85
84
  export function isPartialSlotName (partialSlot) {
86
- return typeof partialSlot == 'object' && !!/** @type {PartialSlotName} */(partialSlot).name
87
- }
85
+ return typeof partialSlot === 'object' && !!(/** @type {any} */(partialSlot)).name
86
+ }
package/src/normalize.js CHANGED
@@ -291,6 +291,35 @@ function getItemsFromSchema (schemaFragment) {
291
291
  return null
292
292
  }
293
293
 
294
+ /**
295
+ * @param {SchemaFragment} schemaFragment
296
+ * @returns {boolean | undefined}
297
+ */
298
+ export const mergeNullableSubSchema = (schemaFragment) => {
299
+ /** @type {null | 'oneOf' | 'anyOf'} */
300
+ let subTypesKey = null
301
+ if (schemaFragment.oneOf) subTypesKey = 'oneOf'
302
+ else if (schemaFragment.anyOf) subTypesKey = 'anyOf'
303
+ if (subTypesKey) {
304
+ const subTypes = schemaFragment[subTypesKey]
305
+ /* if (subTypes && subTypes.length === 1) {
306
+ const subType = subTypes[0]
307
+ for (const key of Object.keys(schemaFragment)) delete subType[key]
308
+ Object.assign(schemaFragment, subType)
309
+ delete schemaFragment[subTypesKey]
310
+ } */
311
+ if (subTypes && subTypes.length === 2 && subTypes.some(t => t.type === 'null')) {
312
+ const subType = subTypes.find(t => t.type !== 'null')
313
+ if (subType) {
314
+ for (const key of Object.keys(schemaFragment)) delete subType[key]
315
+ Object.assign(schemaFragment, subType)
316
+ delete schemaFragment[subTypesKey]
317
+ return true
318
+ }
319
+ }
320
+ }
321
+ }
322
+
294
323
  /**
295
324
  * @param {SchemaFragment} schemaFragment
296
325
  * @returns {{type: string | undefined, nullable: boolean}}
@@ -306,7 +335,6 @@ export const getSchemaFragmentType = (schemaFragment) => {
306
335
  }
307
336
 
308
337
  // case where type is not defined but can be deduced from children oneOf/allOf/anyOf
309
- /** @type {any[]} */
310
338
  if (!schemaFragment.type) {
311
339
  /** @type {string[]} */
312
340
  const combinationTypes = []
@@ -323,6 +351,10 @@ export const getSchemaFragmentType = (schemaFragment) => {
323
351
  if (combinationTypes.length === 1) return { type: combinationTypes[0], nullable: false }
324
352
  }
325
353
 
354
+ if (Array.isArray(schemaFragment.type)) {
355
+ throw new Error('multiple types are not supported')
356
+ }
357
+
326
358
  return { type: schemaFragment.type, nullable: false }
327
359
  }
328
360
 
@@ -661,6 +693,7 @@ function normalizeValidLayoutFragment (key, schemaFragment, type, nullable, sche
661
693
  */
662
694
  export function normalizeLayoutFragment (key, schemaFragment, schemaPath, components, markdown = (src) => src, useDescription, optionsKeys, schemaChild, knownType, knownNullable) {
663
695
  const { type, nullable } = knownType ? { type: knownType, nullable: knownNullable ?? false } : getSchemaFragmentType(schemaFragment)
696
+
664
697
  /** @type {string[]} */
665
698
  const errors = []
666
699
  try {
@@ -1,5 +1,5 @@
1
1
  import schema from './schema.js'
2
- import {ajv} from '../validate.js'
2
+ import { ajv } from '../validate.js'
3
3
 
4
4
  /**
5
5
  * @typedef {import('./types.js').NormalizedLayout} NormalizedLayout
@@ -23,10 +23,9 @@ import {ajv} from '../validate.js'
23
23
  * @typedef {import('./types.js').StateNodePropsLib} StateNodePropsLib
24
24
  * @typedef {import('./types.js').Slot} Slot
25
25
  * @typedef {import('./types.js').Slots} Slots
26
- * @typedef {{ errors: any, (layoutKeyword: any): layoutKeyword is NormalizedLayout }} ValidateNormalizedLayout
27
26
  */
28
27
 
29
- export const /** @type {ValidateNormalizedLayout} */ validateNormalizedLayout = /** @type {any} */ (ajv.getSchema(schema.$id))
28
+ export const /** @type {import('../types.js').ValidateNormalizedLayout} */ validateNormalizedLayout = /** @type {any} */ (ajv.getSchema(schema.$id))
30
29
 
31
30
  export const normalizedLayoutSchema = /** @type {any} */ (schema)
32
31
 
@@ -96,4 +95,4 @@ export function isMarkdownSlot (slot) {
96
95
  export function isNameSlot (slot) {
97
96
  // @ts-ignore
98
97
  return !!slot.name
99
- }
98
+ }
package/src/types.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { type LayoutKeyword } from './layout-keyword/types.js'
2
+ import { type NormalizedLayout } from './normalized-layout/types.js'
2
3
 
3
4
  export interface SchemaFragment {
4
5
  layout?: LayoutKeyword
5
6
  oneOfLayout?: LayoutKeyword
6
7
  patternPropertiesLayout?: LayoutKeyword
7
- type: string
8
+ type?: string | string[]
8
9
  format?: string
9
10
  title?: string
10
11
  description?: string
@@ -40,3 +41,13 @@ export interface ComponentInfo {
40
41
  isFileInput?: boolean
41
42
  hintable?: boolean
42
43
  }
44
+
45
+ export interface ValidateLayoutKeyword {
46
+ (layoutKeyword: any): layoutKeyword is LayoutKeyword
47
+ errors: any
48
+ }
49
+
50
+ export interface ValidateNormalizedLayout {
51
+ (layout: any): layout is NormalizedLayout
52
+ errors: any
53
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @param {string} from
3
+ * @returns {string}
4
+ */
5
+ export function getComponentTypesCodeImport(from: string): string;
6
+ /**
7
+ * @param {any} schema
8
+ * @param {string} key
9
+ * @param {boolean} standalone
10
+ * @returns {Promise<string>}
11
+ */
12
+ export function getComponentTypesCode(schema: any, key: string, standalone?: boolean): Promise<string>;
13
+ //# sourceMappingURL=compile-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile-types.d.ts","sourceRoot":"","sources":["../../src/components/compile-types.js"],"names":[],"mappings":"AA6BA;;;GAGG;AACH,kDAHW,MAAM,GACJ,MAAM,CAclB;AAED;;;;;GAKG;AACH,8CALW,GAAG,OACH,MAAM,eACN,OAAO,GACL,OAAO,CAAC,MAAM,CAAC,CAS3B"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @param {import('../types.js').ComponentInfo} component
3
+ * @returns {any}
4
+ */
5
+ export function getComponentSchema(component: import("../types.js").ComponentInfo): any;
6
+ /**
7
+ * @typedef {import('./types.js').Section} Section
8
+ * @typedef {import('./types.js').Select} Select
9
+ * @typedef {import('./types.js').Autocomplete} Autocomplete
10
+ * @typedef {import('./types.js').TextField} TextField
11
+ * @typedef {import('./types.js').Textarea} Textarea
12
+ * @typedef {import('./types.js').NumberField} NumberField
13
+ * @typedef {import('./types.js').Slider} Slider
14
+ * @typedef {import('./types.js').Checkbox} Checkbox
15
+ * @typedef {import('./types.js').Switch} Switch
16
+ * @typedef {import('./types.js').DatePicker} DatePicker
17
+ * @typedef {import('./types.js').TimePicker} TimePicker
18
+ * @typedef {import('./types.js').DateTimePicker} DateTimePicker
19
+ * @typedef {import('./types.js').ColorPicker} ColorPicker
20
+ * @typedef {import('./types.js').OneOfSelect} OneOfSelect
21
+ * @typedef {import('./types.js').Tabs} Tabs
22
+ * @typedef {import('./types.js').VerticalTabs} VerticalTabs
23
+ * @typedef {import('./types.js').ExpansionPanels} ExpansionPanels
24
+ * @typedef {import('./types.js').Stepper} Stepper
25
+ * @typedef {import('./types.js').List} List
26
+ * @typedef {import('./types.js').Combobox} Combobox
27
+ * @typedef {import('./types.js').FileInput} FileInput
28
+ * @typedef {import('./types.js').Card} Card
29
+ */
30
+ /** @type {import('../types.js').ComponentInfo[]} */
31
+ export const standardComponents: import("../types.js").ComponentInfo[];
32
+ export type Section = import("./types.js").Section;
33
+ export type Select = import("./types.js").Select;
34
+ export type Autocomplete = import("./types.js").Autocomplete;
35
+ export type TextField = import("./types.js").TextField;
36
+ export type Textarea = import("./types.js").Textarea;
37
+ export type NumberField = import("./types.js").NumberField;
38
+ export type Slider = import("./types.js").Slider;
39
+ export type Checkbox = import("./types.js").Checkbox;
40
+ export type Switch = import("./types.js").Switch;
41
+ export type DatePicker = import("./types.js").DatePicker;
42
+ export type TimePicker = import("./types.js").TimePicker;
43
+ export type DateTimePicker = import("./types.js").DateTimePicker;
44
+ export type ColorPicker = import("./types.js").ColorPicker;
45
+ export type OneOfSelect = import("./types.js").OneOfSelect;
46
+ export type Tabs = import("./types.js").Tabs;
47
+ export type VerticalTabs = import("./types.js").VerticalTabs;
48
+ export type ExpansionPanels = import("./types.js").ExpansionPanels;
49
+ export type Stepper = import("./types.js").Stepper;
50
+ export type List = import("./types.js").List;
51
+ export type Combobox = import("./types.js").Combobox;
52
+ export type FileInput = import("./types.js").FileInput;
53
+ export type Card = import("./types.js").Card;
54
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.js"],"names":[],"mappings":"AAyOA;;;GAGG;AACH,8CAHW,OAAO,aAAa,EAAE,aAAa,GACjC,GAAG,CAgCf;AA3QD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,oDAAoD;AACpD,iCADW,OAAO,aAAa,EAAE,aAAa,EAAE,CA8M/C;sBAtOY,OAAO,YAAY,EAAE,OAAO;qBAC5B,OAAO,YAAY,EAAE,MAAM;2BAC3B,OAAO,YAAY,EAAE,YAAY;wBACjC,OAAO,YAAY,EAAE,SAAS;uBAC9B,OAAO,YAAY,EAAE,QAAQ;0BAC7B,OAAO,YAAY,EAAE,WAAW;qBAChC,OAAO,YAAY,EAAE,MAAM;uBAC3B,OAAO,YAAY,EAAE,QAAQ;qBAC7B,OAAO,YAAY,EAAE,MAAM;yBAC3B,OAAO,YAAY,EAAE,UAAU;yBAC/B,OAAO,YAAY,EAAE,UAAU;6BAC/B,OAAO,YAAY,EAAE,cAAc;0BACnC,OAAO,YAAY,EAAE,WAAW;0BAChC,OAAO,YAAY,EAAE,WAAW;mBAChC,OAAO,YAAY,EAAE,IAAI;2BACzB,OAAO,YAAY,EAAE,YAAY;8BACjC,OAAO,YAAY,EAAE,eAAe;sBACpC,OAAO,YAAY,EAAE,OAAO;mBAC5B,OAAO,YAAY,EAAE,IAAI;uBACzB,OAAO,YAAY,EAAE,QAAQ;wBAC7B,OAAO,YAAY,EAAE,SAAS;mBAC9B,OAAO,YAAY,EAAE,IAAI"}
@@ -0,0 +1,420 @@
1
+ import type { BaseCompObject, Expression, Children, GetItems, SelectItems } from '../normalized-layout/types.js';
2
+ export type None = {
3
+ comp?: "none";
4
+ [k: string]: unknown;
5
+ } & BaseCompObject & (BaseCompObject & {
6
+ comp: string;
7
+ label?: string;
8
+ hint?: string | null;
9
+ [k: string]: unknown;
10
+ });
11
+ export type Slot = {
12
+ comp?: "slot";
13
+ [k: string]: unknown;
14
+ } & BaseCompObject & (BaseCompObject & {
15
+ comp: string;
16
+ label?: string;
17
+ hint?: string | null;
18
+ [k: string]: unknown;
19
+ });
20
+ export type Section = {
21
+ comp?: "section";
22
+ [k: string]: unknown;
23
+ } & BaseCompObject & (BaseCompObject & {
24
+ comp: string;
25
+ title?: string | null;
26
+ subtitle?: string | null;
27
+ children: Children;
28
+ [k: string]: unknown;
29
+ });
30
+ export type Tabs = {
31
+ comp?: "tabs";
32
+ [k: string]: unknown;
33
+ } & BaseCompObject & (BaseCompObject & {
34
+ comp: string;
35
+ title?: string | null;
36
+ subtitle?: string | null;
37
+ children: Children;
38
+ [k: string]: unknown;
39
+ });
40
+ export type VerticalTabs = {
41
+ comp?: "vertical-tabs";
42
+ [k: string]: unknown;
43
+ } & BaseCompObject & (BaseCompObject & {
44
+ comp: string;
45
+ title?: string | null;
46
+ subtitle?: string | null;
47
+ children: Children;
48
+ [k: string]: unknown;
49
+ });
50
+ export type ExpansionPanels = {
51
+ comp?: "expansion-panels";
52
+ [k: string]: unknown;
53
+ } & BaseCompObject & (BaseCompObject & {
54
+ comp: string;
55
+ title?: string | null;
56
+ subtitle?: string | null;
57
+ children: Children;
58
+ [k: string]: unknown;
59
+ });
60
+ export type Stepper = {
61
+ comp?: "stepper";
62
+ [k: string]: unknown;
63
+ } & BaseCompObject & (BaseCompObject & {
64
+ comp: string;
65
+ title?: string | null;
66
+ subtitle?: string | null;
67
+ children: Children;
68
+ [k: string]: unknown;
69
+ });
70
+ export type Card = {
71
+ comp?: "card";
72
+ [k: string]: unknown;
73
+ } & BaseCompObject & (BaseCompObject & {
74
+ comp: string;
75
+ title?: string | null;
76
+ subtitle?: string | null;
77
+ children: Children;
78
+ [k: string]: unknown;
79
+ });
80
+ export type List = {
81
+ comp?: "list";
82
+ [k: string]: unknown;
83
+ } & BaseCompObject & (BaseCompObject & {
84
+ comp: string;
85
+ label?: string;
86
+ hint?: string | null;
87
+ [k: string]: unknown;
88
+ }) & {
89
+ title?: string;
90
+ listEditMode: "inline" | "inline-single" | "menu" | "dialog";
91
+ listActions: ("add" | "edit" | "delete" | "sort" | "duplicate")[];
92
+ itemTitle?: Expression;
93
+ itemSubtitle?: Expression;
94
+ indexed?: string[];
95
+ messages?: {
96
+ addItem?: string;
97
+ delete?: string;
98
+ edit?: string;
99
+ duplicate?: string;
100
+ sort?: string;
101
+ };
102
+ [k: string]: unknown;
103
+ };
104
+ export type TextField = {
105
+ comp?: "text-field";
106
+ [k: string]: unknown;
107
+ } & BaseCompObject & (BaseCompObject & {
108
+ comp: string;
109
+ label?: string;
110
+ hint?: string | null;
111
+ [k: string]: unknown;
112
+ }) & (BaseCompObject & {
113
+ comp: string;
114
+ autofocus?: boolean;
115
+ [k: string]: unknown;
116
+ }) & {
117
+ placeholder?: string;
118
+ [k: string]: unknown;
119
+ };
120
+ export type Textarea = {
121
+ comp?: "textarea";
122
+ [k: string]: unknown;
123
+ } & BaseCompObject & (BaseCompObject & {
124
+ comp: string;
125
+ label?: string;
126
+ hint?: string | null;
127
+ [k: string]: unknown;
128
+ }) & (BaseCompObject & {
129
+ comp: string;
130
+ autofocus?: boolean;
131
+ [k: string]: unknown;
132
+ }) & {
133
+ placeholder?: string;
134
+ rows?: number;
135
+ [k: string]: unknown;
136
+ };
137
+ export type NumberField = {
138
+ comp?: "number-field";
139
+ [k: string]: unknown;
140
+ } & BaseCompObject & (BaseCompObject & {
141
+ comp: string;
142
+ label?: string;
143
+ hint?: string | null;
144
+ [k: string]: unknown;
145
+ }) & (BaseCompObject & {
146
+ comp: string;
147
+ autofocus?: boolean;
148
+ [k: string]: unknown;
149
+ }) & {
150
+ step?: number;
151
+ min?: number;
152
+ max?: number;
153
+ placeholder?: string;
154
+ [k: string]: unknown;
155
+ };
156
+ export type Checkbox = {
157
+ comp?: "checkbox";
158
+ [k: string]: unknown;
159
+ } & BaseCompObject & (BaseCompObject & {
160
+ comp: string;
161
+ label?: string;
162
+ hint?: string | null;
163
+ [k: string]: unknown;
164
+ });
165
+ export type Switch = {
166
+ comp?: "switch";
167
+ [k: string]: unknown;
168
+ } & BaseCompObject & (BaseCompObject & {
169
+ comp: string;
170
+ label?: string;
171
+ hint?: string | null;
172
+ [k: string]: unknown;
173
+ });
174
+ export type Slider = {
175
+ comp?: "slider";
176
+ [k: string]: unknown;
177
+ } & BaseCompObject & (BaseCompObject & {
178
+ comp: string;
179
+ label?: string;
180
+ hint?: string | null;
181
+ [k: string]: unknown;
182
+ }) & {
183
+ step?: number;
184
+ min?: number;
185
+ max?: number;
186
+ [k: string]: unknown;
187
+ };
188
+ export type DatePicker = {
189
+ comp?: "date-picker";
190
+ [k: string]: unknown;
191
+ } & BaseCompObject & (BaseCompObject & {
192
+ comp: string;
193
+ label?: string;
194
+ hint?: string | null;
195
+ [k: string]: unknown;
196
+ }) & {
197
+ min?: string;
198
+ max?: string;
199
+ format?: "date" | "date-time";
200
+ [k: string]: unknown;
201
+ };
202
+ export type DateTimePicker = {
203
+ comp?: "date-time-picker";
204
+ [k: string]: unknown;
205
+ } & BaseCompObject & (BaseCompObject & {
206
+ comp: string;
207
+ label?: string;
208
+ hint?: string | null;
209
+ [k: string]: unknown;
210
+ }) & {
211
+ min?: string;
212
+ max?: string;
213
+ [k: string]: unknown;
214
+ };
215
+ export type TimePicker = {
216
+ comp?: "time-picker";
217
+ [k: string]: unknown;
218
+ } & BaseCompObject & (BaseCompObject & {
219
+ comp: string;
220
+ label?: string;
221
+ hint?: string | null;
222
+ [k: string]: unknown;
223
+ }) & {
224
+ min?: string;
225
+ max?: string;
226
+ [k: string]: unknown;
227
+ };
228
+ export type ColorPicker = {
229
+ comp?: "color-picker";
230
+ [k: string]: unknown;
231
+ } & BaseCompObject & (BaseCompObject & {
232
+ comp: string;
233
+ label?: string;
234
+ hint?: string | null;
235
+ [k: string]: unknown;
236
+ });
237
+ export type Select = {
238
+ comp?: "select";
239
+ [k: string]: unknown;
240
+ } & BaseCompObject & (BaseCompObject & {
241
+ comp: string;
242
+ label?: string;
243
+ hint?: string | null;
244
+ [k: string]: unknown;
245
+ }) & (BaseCompObject & {
246
+ comp: string;
247
+ autofocus?: boolean;
248
+ [k: string]: unknown;
249
+ }) & (BaseCompObject & {
250
+ comp: string;
251
+ items?: SelectItems;
252
+ getItems?: GetItems;
253
+ [k: string]: unknown;
254
+ }) & (BaseCompObject & {
255
+ comp: string;
256
+ multiple?: boolean;
257
+ separator?: string;
258
+ [k: string]: unknown;
259
+ });
260
+ export type Autocomplete = {
261
+ comp?: "autocomplete";
262
+ [k: string]: unknown;
263
+ } & BaseCompObject & (BaseCompObject & {
264
+ comp: string;
265
+ label?: string;
266
+ hint?: string | null;
267
+ [k: string]: unknown;
268
+ }) & (BaseCompObject & {
269
+ comp: string;
270
+ autofocus?: boolean;
271
+ [k: string]: unknown;
272
+ }) & (BaseCompObject & {
273
+ comp: string;
274
+ items?: SelectItems;
275
+ getItems?: GetItems;
276
+ [k: string]: unknown;
277
+ }) & (BaseCompObject & {
278
+ comp: string;
279
+ multiple?: boolean;
280
+ separator?: string;
281
+ [k: string]: unknown;
282
+ });
283
+ export type Combobox = {
284
+ comp?: "combobox";
285
+ [k: string]: unknown;
286
+ } & BaseCompObject & (BaseCompObject & {
287
+ comp: string;
288
+ label?: string;
289
+ hint?: string | null;
290
+ [k: string]: unknown;
291
+ }) & (BaseCompObject & {
292
+ comp: string;
293
+ autofocus?: boolean;
294
+ [k: string]: unknown;
295
+ }) & (BaseCompObject & {
296
+ comp: string;
297
+ items?: SelectItems;
298
+ getItems?: GetItems;
299
+ [k: string]: unknown;
300
+ }) & (BaseCompObject & {
301
+ comp: string;
302
+ multiple?: boolean;
303
+ separator?: string;
304
+ [k: string]: unknown;
305
+ });
306
+ export type NumberCombobox = {
307
+ comp?: "number-combobox";
308
+ [k: string]: unknown;
309
+ } & BaseCompObject & (BaseCompObject & {
310
+ comp: string;
311
+ label?: string;
312
+ hint?: string | null;
313
+ [k: string]: unknown;
314
+ }) & (BaseCompObject & {
315
+ comp: string;
316
+ autofocus?: boolean;
317
+ [k: string]: unknown;
318
+ }) & (BaseCompObject & {
319
+ comp: string;
320
+ items?: SelectItems;
321
+ getItems?: GetItems;
322
+ [k: string]: unknown;
323
+ }) & (BaseCompObject & {
324
+ comp: string;
325
+ multiple?: boolean;
326
+ separator?: string;
327
+ [k: string]: unknown;
328
+ }) & {
329
+ step?: number;
330
+ min?: number;
331
+ max?: number;
332
+ [k: string]: unknown;
333
+ };
334
+ export type CheckboxGroup = {
335
+ comp?: "checkbox-group";
336
+ [k: string]: unknown;
337
+ } & BaseCompObject & (BaseCompObject & {
338
+ comp: string;
339
+ label?: string;
340
+ hint?: string | null;
341
+ [k: string]: unknown;
342
+ }) & (BaseCompObject & {
343
+ comp: string;
344
+ items?: SelectItems;
345
+ getItems?: GetItems;
346
+ [k: string]: unknown;
347
+ }) & (BaseCompObject & {
348
+ comp: string;
349
+ multiple?: boolean;
350
+ separator?: string;
351
+ [k: string]: unknown;
352
+ });
353
+ export type SwitchGroup = {
354
+ comp?: "switch-group";
355
+ [k: string]: unknown;
356
+ } & BaseCompObject & (BaseCompObject & {
357
+ comp: string;
358
+ label?: string;
359
+ hint?: string | null;
360
+ [k: string]: unknown;
361
+ }) & (BaseCompObject & {
362
+ comp: string;
363
+ items?: SelectItems;
364
+ getItems?: GetItems;
365
+ [k: string]: unknown;
366
+ }) & (BaseCompObject & {
367
+ comp: string;
368
+ multiple?: boolean;
369
+ separator?: string;
370
+ [k: string]: unknown;
371
+ });
372
+ export type RadioGroup = {
373
+ comp?: "radio-group";
374
+ [k: string]: unknown;
375
+ } & BaseCompObject & (BaseCompObject & {
376
+ comp: string;
377
+ label?: string;
378
+ hint?: string | null;
379
+ [k: string]: unknown;
380
+ }) & (BaseCompObject & {
381
+ comp: string;
382
+ items?: SelectItems;
383
+ getItems?: GetItems;
384
+ [k: string]: unknown;
385
+ });
386
+ export type FileInput = {
387
+ comp?: "file-input";
388
+ [k: string]: unknown;
389
+ } & BaseCompObject & (BaseCompObject & {
390
+ comp: string;
391
+ label?: string;
392
+ hint?: string | null;
393
+ [k: string]: unknown;
394
+ }) & (BaseCompObject & {
395
+ comp: string;
396
+ autofocus?: boolean;
397
+ [k: string]: unknown;
398
+ }) & (BaseCompObject & {
399
+ comp: string;
400
+ multiple?: boolean;
401
+ separator?: string;
402
+ [k: string]: unknown;
403
+ }) & {
404
+ accept?: string;
405
+ placeholder?: string;
406
+ [k: string]: unknown;
407
+ };
408
+ export type OneOfSelect = {
409
+ comp?: "one-of-select";
410
+ [k: string]: unknown;
411
+ } & BaseCompObject & (BaseCompObject & {
412
+ comp: string;
413
+ label?: string;
414
+ hint?: string | null;
415
+ [k: string]: unknown;
416
+ }) & {
417
+ emptyData?: boolean;
418
+ [k: string]: unknown;
419
+ };
420
+ //# sourceMappingURL=types.d.ts.map