@limetech/lime-elements 37.7.0 → 37.8.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/CHANGELOG.md +16 -0
- package/dist/cjs/get-icon-props-50be7440.js.map +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/limel-action-bar-item_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +2 -3
- package/dist/cjs/limel-chip_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-collapsible-section.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-file-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +5 -5
- package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-header.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-help-content.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-help.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-input-field_3.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-switch.cjs.entry.js.map +1 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-item.js +1 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-item.js.map +1 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js +1 -1
- package/dist/collection/components/action-bar/action-bar-item/action-bar-overflow-menu.js.map +1 -1
- package/dist/collection/components/action-bar/action-bar.types.js.map +1 -1
- package/dist/collection/components/chip/chip.css +0 -8
- package/dist/collection/components/chip/chip.js +4 -5
- package/dist/collection/components/chip/chip.js.map +1 -1
- package/dist/collection/components/chip-set/chip-set.js.map +1 -1
- package/dist/collection/components/chip-set/chip.types.js.map +1 -1
- package/dist/collection/components/collapsible-section/collapsible-section.js +2 -2
- package/dist/collection/components/collapsible-section/collapsible-section.js.map +1 -1
- package/dist/collection/components/dialog/dialog.types.js.map +1 -1
- package/dist/collection/components/file/file.types.js.map +1 -1
- package/dist/collection/components/file-viewer/file-viewer.js.map +1 -1
- package/dist/collection/components/form/fields/field-helpers.js.map +1 -1
- package/dist/collection/components/form/fields/object-field.js.map +1 -1
- package/dist/collection/components/form/fields/schema-field.js.map +1 -1
- package/dist/collection/components/form/fields/types.js.map +1 -1
- package/dist/collection/components/form/form.js +2 -2
- package/dist/collection/components/form/form.types.js +1 -1
- package/dist/collection/components/form/form.types.js.map +1 -1
- package/dist/collection/components/form/schema.js.map +1 -1
- package/dist/collection/components/form/templates/array-field-collapsible-item.js.map +1 -1
- package/dist/collection/components/form/templates/array-field.js.map +1 -1
- package/dist/collection/components/form/templates/common.js +3 -3
- package/dist/collection/components/form/templates/common.js.map +1 -1
- package/dist/collection/components/form/templates/field.js.map +1 -1
- package/dist/collection/components/form/templates/object-field.js.map +1 -1
- package/dist/collection/components/form/templates/types.js.map +1 -1
- package/dist/collection/components/form/widgets/date-picker.js.map +1 -1
- package/dist/collection/components/form/widgets/input-field.js +2 -2
- package/dist/collection/components/form/widgets/input-field.js.map +1 -1
- package/dist/collection/components/form/widgets/slider.js.map +1 -1
- package/dist/collection/components/header/header.js +1 -1
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/help/help-content.js +1 -1
- package/dist/collection/components/help/help-content.js.map +1 -1
- package/dist/collection/components/help/help.js +1 -1
- package/dist/collection/components/help/help.js.map +1 -1
- package/dist/collection/components/help/help.types.js.map +1 -1
- package/dist/collection/components/icon/get-icon-props.js.map +1 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js.map +1 -1
- package/dist/collection/components/input-field/input-field.js.map +1 -1
- package/dist/collection/components/list/list-item.types.js.map +1 -1
- package/dist/collection/components/list/list-renderer.js.map +1 -1
- package/dist/collection/components/menu/menu.js +2 -2
- package/dist/collection/components/menu/menu.types.js.map +1 -1
- package/dist/collection/components/menu-list/menu-list.js +1 -1
- package/dist/collection/components/menu-list/menu-list.types.js.map +1 -1
- package/dist/collection/components/picker/picker.js.map +1 -1
- package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.js +1 -1
- package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.js.map +1 -1
- package/dist/collection/components/select/option.types.js.map +1 -1
- package/dist/collection/components/split-button/split-button.js +1 -1
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/global/shared-types/separator.types.js +2 -0
- package/dist/collection/global/shared-types/separator.types.js.map +1 -0
- package/dist/collection/interface.js +1 -2
- package/dist/collection/interface.js.map +1 -1
- package/dist/esm/get-icon-props-0b65f85e.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/limel-action-bar-item_2.entry.js.map +1 -1
- package/dist/esm/limel-chip_2.entry.js +2 -3
- package/dist/esm/limel-chip_2.entry.js.map +1 -1
- package/dist/esm/limel-collapsible-section.entry.js.map +1 -1
- package/dist/esm/limel-file-viewer.entry.js.map +1 -1
- package/dist/esm/limel-form.entry.js +5 -5
- package/dist/esm/limel-form.entry.js.map +1 -1
- package/dist/esm/limel-header.entry.js.map +1 -1
- package/dist/esm/limel-help-content.entry.js.map +1 -1
- package/dist/esm/limel-help.entry.js.map +1 -1
- package/dist/esm/limel-icon-button.entry.js.map +1 -1
- package/dist/esm/limel-input-field_3.entry.js.map +1 -1
- package/dist/esm/limel-picker.entry.js.map +1 -1
- package/dist/esm/limel-progress-flow-item.entry.js.map +1 -1
- package/dist/esm/limel-switch.entry.js.map +1 -1
- package/dist/lime-elements/index.esm.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-1ca94bcf.entry.js.map +1 -1
- package/dist/lime-elements/p-27d64a5a.entry.js.map +1 -1
- package/dist/lime-elements/p-2f777fdb.js.map +1 -1
- package/dist/lime-elements/p-386d1c5a.entry.js.map +1 -1
- package/dist/lime-elements/p-68cb9574.entry.js.map +1 -1
- package/dist/lime-elements/p-71282352.entry.js.map +1 -1
- package/dist/lime-elements/p-86550ce4.entry.js.map +1 -1
- package/dist/lime-elements/p-8d13a44f.entry.js.map +1 -1
- package/dist/lime-elements/{p-64e352ec.entry.js → p-a88039bf.entry.js} +2 -2
- package/dist/lime-elements/p-a88039bf.entry.js.map +1 -0
- package/dist/lime-elements/p-b03c1b71.entry.js.map +1 -1
- package/dist/lime-elements/p-b9922526.entry.js.map +1 -1
- package/dist/lime-elements/p-c0543a74.entry.js.map +1 -1
- package/dist/lime-elements/p-dfa06174.entry.js.map +1 -1
- package/dist/lime-elements/p-fb54539a.entry.js +2 -0
- package/dist/lime-elements/p-fb54539a.entry.js.map +1 -0
- package/dist/types/components/action-bar/action-bar.types.d.ts +2 -3
- package/dist/types/components/chip/chip.d.ts +3 -1
- package/dist/types/components/chip-set/chip.types.d.ts +1 -1
- package/dist/types/components/dialog/dialog.types.d.ts +1 -1
- package/dist/types/components/file/file.types.d.ts +1 -1
- package/dist/types/components/form/fields/array-field.d.ts +1 -1
- package/dist/types/components/form/fields/field-helpers.d.ts +2 -1
- package/dist/types/components/form/fields/schema-field.d.ts +2 -1
- package/dist/types/components/form/fields/types.d.ts +4 -3
- package/dist/types/components/form/form.types.d.ts +343 -6
- package/dist/types/components/form/schema.d.ts +6 -5
- package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +3 -2
- package/dist/types/components/form/templates/common.d.ts +2 -1
- package/dist/types/components/form/templates/types.d.ts +2 -2
- package/dist/types/components/header/header.d.ts +1 -1
- package/dist/types/components/help/help-content.d.ts +1 -1
- package/dist/types/components/help/help.d.ts +2 -1
- package/dist/types/components/help/help.types.d.ts +7 -1
- package/dist/types/components/icon/get-icon-props.d.ts +1 -1
- package/dist/types/components/list/list-item.types.d.ts +2 -16
- package/dist/types/components/list/list-renderer.d.ts +2 -1
- package/dist/types/components/menu/menu.types.d.ts +1 -1
- package/dist/types/components/menu-list/menu-list.types.d.ts +1 -2
- package/dist/types/components/select/option.types.d.ts +1 -1
- package/dist/types/components.d.ts +10 -10
- package/dist/types/global/shared-types/separator.types.d.ts +18 -0
- package/dist/types/interface.d.ts +2 -3
- package/package.json +7 -7
- package/dist/lime-elements/p-64e352ec.entry.js.map +0 -1
- package/dist/lime-elements/p-953ce801.entry.js +0 -2
- package/dist/lime-elements/p-953ce801.entry.js.map +0 -1
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { JSONSchema7 } from 'json-schema';
|
|
2
2
|
import { Help } from '../help/help.types';
|
|
3
3
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
4
|
+
/**
|
|
5
|
+
* EventEmitter from `@stencil/core`.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { EventEmitter } from '../../stencil-public-runtime';
|
|
4
10
|
declare module 'json-schema' {
|
|
5
11
|
interface JSONSchema7 {
|
|
6
12
|
/**
|
|
@@ -175,8 +181,8 @@ export interface LimeSchemaOptions {
|
|
|
175
181
|
help?: string | Partial<Help>;
|
|
176
182
|
}
|
|
177
183
|
/**
|
|
178
|
-
* @public
|
|
179
184
|
* Options for a layout to be used in a form
|
|
185
|
+
* @public
|
|
180
186
|
*/
|
|
181
187
|
export type LimeLayoutOptions = GridLayoutOptions & RowLayoutOptions;
|
|
182
188
|
/**
|
|
@@ -205,8 +211,8 @@ export interface FormLayoutOptions<T extends FormLayoutType | `${FormLayoutType}
|
|
|
205
211
|
type: T;
|
|
206
212
|
}
|
|
207
213
|
/**
|
|
208
|
-
* @public
|
|
209
214
|
* Layout options for a grid layout
|
|
215
|
+
* @public
|
|
210
216
|
*/
|
|
211
217
|
export interface GridLayoutOptions extends FormLayoutOptions<FormLayoutType | `${FormLayoutType}`> {
|
|
212
218
|
/**
|
|
@@ -231,8 +237,8 @@ export interface GridLayoutOptions extends FormLayoutOptions<FormLayoutType | `$
|
|
|
231
237
|
dense?: boolean;
|
|
232
238
|
}
|
|
233
239
|
/**
|
|
234
|
-
* @public
|
|
235
240
|
* Layout options for a row layout
|
|
241
|
+
* @public
|
|
236
242
|
*/
|
|
237
243
|
export interface RowLayoutOptions extends FormLayoutOptions<FormLayoutType | `${FormLayoutType}`> {
|
|
238
244
|
/**
|
|
@@ -242,8 +248,8 @@ export interface RowLayoutOptions extends FormLayoutOptions<FormLayoutType | `${
|
|
|
242
248
|
icon?: string;
|
|
243
249
|
}
|
|
244
250
|
/**
|
|
245
|
-
* @public
|
|
246
251
|
* Represents the layout types for a form.
|
|
252
|
+
* @public
|
|
247
253
|
*/
|
|
248
254
|
export declare enum FormLayoutType {
|
|
249
255
|
/**
|
|
@@ -264,9 +270,340 @@ export declare enum FormLayoutType {
|
|
|
264
270
|
Row = "row"
|
|
265
271
|
}
|
|
266
272
|
/**
|
|
267
|
-
* @public
|
|
268
273
|
* Represents the JSON schema with Lime specific options
|
|
274
|
+
* @public
|
|
269
275
|
*/
|
|
270
|
-
export interface FormSchema extends JSONSchema7 {
|
|
276
|
+
export interface FormSchema<T extends Record<string, any> = any> extends JSONSchema7 {
|
|
277
|
+
/**
|
|
278
|
+
* The value of "items" MUST be either a valid JSON Schema or an array
|
|
279
|
+
* of valid JSON Schemas.
|
|
280
|
+
*
|
|
281
|
+
* This keyword determines how child instances validate for arrays, and
|
|
282
|
+
* does not directly validate the immediate instance itself.
|
|
283
|
+
*
|
|
284
|
+
* If "items" is a schema, validation succeeds if all elements in the
|
|
285
|
+
* array successfully validate against that schema.
|
|
286
|
+
*
|
|
287
|
+
* If "items" is an array of schemas, validation succeeds if each
|
|
288
|
+
* element of the instance validates against the schema at the same
|
|
289
|
+
* position, if any.
|
|
290
|
+
*
|
|
291
|
+
* Omitting this keyword has the same behavior as an empty schema.
|
|
292
|
+
*
|
|
293
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.1
|
|
294
|
+
*/
|
|
295
|
+
items?: FormSchemaArrayItem<T> | Array<FormSchemaArrayItem<T>>;
|
|
296
|
+
/**
|
|
297
|
+
* The value of "items" MUST be either a valid JSON Schema or an array
|
|
298
|
+
* of valid JSON Schemas.
|
|
299
|
+
*
|
|
300
|
+
* This keyword determines how child instances validate for arrays, and
|
|
301
|
+
* does not directly validate the immediate instance itself.
|
|
302
|
+
*
|
|
303
|
+
* If "items" is a schema, validation succeeds if all elements in the
|
|
304
|
+
* array successfully validate against that schema.
|
|
305
|
+
*
|
|
306
|
+
* If "items" is an array of schemas, validation succeeds if each
|
|
307
|
+
* element of the instance validates against the schema at the same
|
|
308
|
+
* position, if any.
|
|
309
|
+
*
|
|
310
|
+
* Omitting this keyword has the same behavior as an empty schema.
|
|
311
|
+
*
|
|
312
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.2
|
|
313
|
+
*/
|
|
314
|
+
additionalItems?: FormSchemaArrayItem<T>;
|
|
315
|
+
/**
|
|
316
|
+
* The value of this keyword MUST be a valid JSON Schema.
|
|
317
|
+
*
|
|
318
|
+
* An array instance is valid against "contains" if at least one of its
|
|
319
|
+
* elements is valid against the given schema.
|
|
320
|
+
*
|
|
321
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.4.6
|
|
322
|
+
*/
|
|
323
|
+
contains?: FormSchemaArrayItem<T>;
|
|
324
|
+
/**
|
|
325
|
+
* The value of this keyword MUST be an array. Elements of this array,
|
|
326
|
+
* if any, MUST be strings, and MUST be unique.
|
|
327
|
+
*
|
|
328
|
+
* An object instance is valid against this keyword if every item in the
|
|
329
|
+
* array is the name of a property in the instance.
|
|
330
|
+
*
|
|
331
|
+
* Omitting this keyword has the same behavior as an empty array.
|
|
332
|
+
*
|
|
333
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.3
|
|
334
|
+
*/
|
|
335
|
+
required?: Array<ReplaceObjectType<T, Extract<keyof T, string>, string>>;
|
|
336
|
+
/**
|
|
337
|
+
* The value of "properties" MUST be an object. Each value of this
|
|
338
|
+
* object MUST be a valid JSON Schema.
|
|
339
|
+
*
|
|
340
|
+
* This keyword determines how child instances validate for objects, and
|
|
341
|
+
* does not directly validate the immediate instance itself.
|
|
342
|
+
*
|
|
343
|
+
* Validation succeeds if, for each name that appears in both the
|
|
344
|
+
* instance and as a name within this keyword's value, the child
|
|
345
|
+
* instance for that name successfully validates against the
|
|
346
|
+
* corresponding schema.
|
|
347
|
+
*
|
|
348
|
+
* Omitting this keyword has the same behavior as an empty object.
|
|
349
|
+
*
|
|
350
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.4
|
|
351
|
+
*/
|
|
352
|
+
properties?: ReplaceObjectType<T, FormSubKeySchema<T>, Record<string, FormSchema>>;
|
|
353
|
+
/**
|
|
354
|
+
* This keyword's value MUST be a non-empty array. Each item of the
|
|
355
|
+
* array MUST be a valid JSON Schema.
|
|
356
|
+
*
|
|
357
|
+
* An instance validates successfully against this keyword if it
|
|
358
|
+
* validates successfully against all schemas defined by this keyword's
|
|
359
|
+
* value.
|
|
360
|
+
*
|
|
361
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.1
|
|
362
|
+
*/
|
|
363
|
+
allOf?: Array<FormSchemaArrayItem<T>>;
|
|
364
|
+
/**
|
|
365
|
+
* This keyword's value MUST be a non-empty array. Each item of the
|
|
366
|
+
* array MUST be a valid JSON Schema.
|
|
367
|
+
*
|
|
368
|
+
* An instance validates successfully against this keyword if it
|
|
369
|
+
* validates successfully against at least one schema defined by this
|
|
370
|
+
* keyword's value.
|
|
371
|
+
*
|
|
372
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.2
|
|
373
|
+
*/
|
|
374
|
+
anyOf?: Array<FormSchemaArrayItem<T>>;
|
|
375
|
+
/**
|
|
376
|
+
* This keyword's value MUST be a non-empty array. Each item of the
|
|
377
|
+
* array MUST be a valid JSON Schema.
|
|
378
|
+
*
|
|
379
|
+
* An instance validates successfully against this keyword if it
|
|
380
|
+
* validates successfully against exactly one schema defined by this
|
|
381
|
+
* keyword's value.
|
|
382
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.3
|
|
383
|
+
*/
|
|
384
|
+
oneOf?: Array<FormSchemaArrayItem<T>>;
|
|
385
|
+
/**
|
|
386
|
+
* The value of "patternProperties" MUST be an object. Each property
|
|
387
|
+
* name of this object SHOULD be a valid regular expression, according
|
|
388
|
+
* to the ECMA 262 regular expression dialect. Each property value of
|
|
389
|
+
* this object MUST be a valid JSON Schema.
|
|
390
|
+
*
|
|
391
|
+
* This keyword determines how child instances validate for objects, and
|
|
392
|
+
* does not directly validate the immediate instance itself. Validation
|
|
393
|
+
* of the primitive instance type against this keyword always succeeds.
|
|
394
|
+
*
|
|
395
|
+
* Validation succeeds if, for each instance name that matches any
|
|
396
|
+
* regular expressions that appear as a property name in this keyword's
|
|
397
|
+
* value, the child instance for that name successfully validates
|
|
398
|
+
* against each schema that corresponds to a matching regular
|
|
399
|
+
* expression.
|
|
400
|
+
*
|
|
401
|
+
* Omitting this keyword has the same behavior as an empty object.
|
|
402
|
+
*
|
|
403
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.5
|
|
404
|
+
*/
|
|
405
|
+
patternProperties?: Record<string, FormSchema>;
|
|
406
|
+
/**
|
|
407
|
+
* The value of "additionalProperties" MUST be a valid JSON Schema.
|
|
408
|
+
*
|
|
409
|
+
* This keyword determines how child instances validate for objects, and
|
|
410
|
+
* does not directly validate the immediate instance itself.
|
|
411
|
+
*
|
|
412
|
+
* Validation with "additionalProperties" applies only to the child
|
|
413
|
+
* values of instance names that do not match any names in "properties",
|
|
414
|
+
* and do not match any regular expression in "patternProperties".
|
|
415
|
+
*
|
|
416
|
+
* For all such properties, validation succeeds if the child instance
|
|
417
|
+
* validates against the "additionalProperties" schema.
|
|
418
|
+
*
|
|
419
|
+
* Omitting this keyword has the same behavior as an empty schema.
|
|
420
|
+
*
|
|
421
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.6
|
|
422
|
+
*/
|
|
423
|
+
additionalProperties?: FormSchema | boolean;
|
|
424
|
+
/**
|
|
425
|
+
* This keyword specifies rules that are evaluated if the instance is an
|
|
426
|
+
* object and contains a certain property.
|
|
427
|
+
*
|
|
428
|
+
* This keyword's value MUST be an object. Each property specifies a
|
|
429
|
+
* dependency. Each dependency value MUST be an array or a valid JSON
|
|
430
|
+
* Schema.
|
|
431
|
+
*
|
|
432
|
+
* If the dependency value is a subschema, and the dependency key is a
|
|
433
|
+
* property in the instance, the entire instance must validate against
|
|
434
|
+
* the dependency value.
|
|
435
|
+
*
|
|
436
|
+
* If the dependency value is an array, each element in the array, if
|
|
437
|
+
* any, MUST be a string, and MUST be unique. If the dependency key is
|
|
438
|
+
* a property in the instance, each of the items in the dependency value
|
|
439
|
+
* must be a property that exists in the instance.
|
|
440
|
+
*
|
|
441
|
+
* Omitting this keyword has the same behavior as an empty object.
|
|
442
|
+
*
|
|
443
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.7
|
|
444
|
+
*/
|
|
445
|
+
dependencies?: Record<string, FormSchema | string[]>;
|
|
446
|
+
/**
|
|
447
|
+
* The value of "propertyNames" MUST be a valid JSON Schema.
|
|
448
|
+
*
|
|
449
|
+
* If the instance is an object, this keyword validates if every
|
|
450
|
+
* property name in the instance validates against the provided schema.
|
|
451
|
+
* Note the property name that the schema is testing will always be a
|
|
452
|
+
* string.
|
|
453
|
+
*
|
|
454
|
+
* Omitting this keyword has the same behavior as an empty schema.
|
|
455
|
+
*
|
|
456
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.5.8
|
|
457
|
+
*/
|
|
458
|
+
propertyNames?: FormSchema;
|
|
459
|
+
/**
|
|
460
|
+
* This keyword's value MUST be a valid JSON Schema.
|
|
461
|
+
*
|
|
462
|
+
* This validation outcome of this keyword's subschema has no direct
|
|
463
|
+
* effect on the overall validation result. Rather, it controls which
|
|
464
|
+
* of the "then" or "else" keywords are evaluated.
|
|
465
|
+
*
|
|
466
|
+
* Instances that successfully validate against this keyword's subschema
|
|
467
|
+
* MUST also be valid against the subschema value of the "then" keyword,
|
|
468
|
+
* if present.
|
|
469
|
+
*
|
|
470
|
+
* Instances that fail to validate against this keyword's subschema MUST
|
|
471
|
+
* also be valid against the subschema value of the "else" keyword, if
|
|
472
|
+
* present.
|
|
473
|
+
*
|
|
474
|
+
* If annotations (Section 3.3) are being collected, they are collected
|
|
475
|
+
* from this keyword's subschema in the usual way, including when the
|
|
476
|
+
* keyword is present without either "then" or "else".
|
|
477
|
+
*
|
|
478
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6.1
|
|
479
|
+
*/
|
|
480
|
+
if?: FormSchema;
|
|
481
|
+
/**
|
|
482
|
+
* This keyword's value MUST be a valid JSON Schema.
|
|
483
|
+
*
|
|
484
|
+
* This validation outcome of this keyword's subschema has no direct
|
|
485
|
+
* effect on the overall validation result. Rather, it controls which
|
|
486
|
+
* of the "then" or "else" keywords are evaluated.
|
|
487
|
+
*
|
|
488
|
+
* Instances that successfully validate against this keyword's subschema
|
|
489
|
+
* MUST also be valid against the subschema value of the "then" keyword,
|
|
490
|
+
* if present.
|
|
491
|
+
*
|
|
492
|
+
* Instances that fail to validate against this keyword's subschema MUST
|
|
493
|
+
* also be valid against the subschema value of the "else" keyword, if
|
|
494
|
+
* present.
|
|
495
|
+
*
|
|
496
|
+
* If annotations (Section 3.3) are being collected, they are collected
|
|
497
|
+
* from this keyword's subschema in the usual way, including when the
|
|
498
|
+
* keyword is present without either "then" or "else".
|
|
499
|
+
*
|
|
500
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6.2
|
|
501
|
+
*/
|
|
502
|
+
then?: FormSchema;
|
|
503
|
+
/**
|
|
504
|
+
* This keyword's value MUST be a valid JSON Schema.
|
|
505
|
+
*
|
|
506
|
+
* When "if" is present, and the instance fails to validate against its
|
|
507
|
+
* subschema, then valiation succeeds against this keyword if the
|
|
508
|
+
* instance successfully validates against this keyword's subschema.
|
|
509
|
+
*
|
|
510
|
+
* This keyword has no effect when "if" is absent, or when the instance
|
|
511
|
+
* successfully validates against its subschema. Implementations MUST
|
|
512
|
+
* NOT evaluate the instance against this keyword, for either validation
|
|
513
|
+
* or annotation collection purposes, in such cases.
|
|
514
|
+
*
|
|
515
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6.3
|
|
516
|
+
*/
|
|
517
|
+
else?: FormSchema;
|
|
518
|
+
/**
|
|
519
|
+
* This keyword's value MUST be a valid JSON Schema.
|
|
520
|
+
*
|
|
521
|
+
* An instance is valid against this keyword if it fails to validate
|
|
522
|
+
* successfully against the schema defined by this keyword.
|
|
523
|
+
*
|
|
524
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7.4
|
|
525
|
+
*/
|
|
526
|
+
not?: FormSchema;
|
|
527
|
+
/**
|
|
528
|
+
* The "$defs" keywords provides a standardized location for
|
|
529
|
+
* schema authors to inline re-usable JSON Schemas into a more general
|
|
530
|
+
* schema. The keyword does not directly affect the validation result.
|
|
531
|
+
*
|
|
532
|
+
* This keyword's value MUST be an object. Each member value of this
|
|
533
|
+
* object MUST be a valid JSON Schema.
|
|
534
|
+
*
|
|
535
|
+
* As an example, here is a schema describing an array of positive
|
|
536
|
+
* integers, where the positive integer constraint is a subschema in
|
|
537
|
+
* "definitions":
|
|
538
|
+
* ```
|
|
539
|
+
* {
|
|
540
|
+
* "type": "array",
|
|
541
|
+
* "items": { "$ref": "#/definitions/positiveInteger" },
|
|
542
|
+
* "definitions": {
|
|
543
|
+
* "positiveInteger": {
|
|
544
|
+
* "type": "integer",
|
|
545
|
+
* "exclusiveMinimum": 0
|
|
546
|
+
* }
|
|
547
|
+
* }
|
|
548
|
+
* }
|
|
549
|
+
* ```
|
|
550
|
+
*
|
|
551
|
+
* $defs is the newer keyword introduced in the JSON Schema Draft 2019-09, while definitions is from the older drafts.
|
|
552
|
+
*
|
|
553
|
+
* The main difference is that definitions is no longer an official keyword in the latest JSON Schema specification (Draft 2019-09 and later),
|
|
554
|
+
* but it is still widely supported for backward compatibility.
|
|
555
|
+
*
|
|
556
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-9
|
|
557
|
+
*/
|
|
558
|
+
$defs?: Record<string, FormSchema>;
|
|
559
|
+
/**
|
|
560
|
+
* The "definitions" keywords provides a standardized location for
|
|
561
|
+
* schema authors to inline re-usable JSON Schemas into a more general
|
|
562
|
+
* schema. The keyword does not directly affect the validation result.
|
|
563
|
+
*
|
|
564
|
+
* This keyword's value MUST be an object. Each member value of this
|
|
565
|
+
* object MUST be a valid JSON Schema.
|
|
566
|
+
*
|
|
567
|
+
* As an example, here is a schema describing an array of positive
|
|
568
|
+
* integers, where the positive integer constraint is a subschema in
|
|
569
|
+
* "definitions":
|
|
570
|
+
* ```
|
|
571
|
+
* {
|
|
572
|
+
* "type": "array",
|
|
573
|
+
* "items": { "$ref": "#/definitions/positiveInteger" },
|
|
574
|
+
* "definitions": {
|
|
575
|
+
* "positiveInteger": {
|
|
576
|
+
* "type": "integer",
|
|
577
|
+
* "exclusiveMinimum": 0
|
|
578
|
+
* }
|
|
579
|
+
* }
|
|
580
|
+
* }
|
|
581
|
+
* ```
|
|
582
|
+
*
|
|
583
|
+
* $defs is the newer keyword introduced in the JSON Schema Draft 2019-09, while definitions is from the older drafts.
|
|
584
|
+
*
|
|
585
|
+
* The main difference is that definitions is no longer an official keyword in the latest JSON Schema specification (Draft 2019-09 and later),
|
|
586
|
+
* but it is still widely supported for backward compatibility.
|
|
587
|
+
*
|
|
588
|
+
* @see https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-9
|
|
589
|
+
*/
|
|
590
|
+
definitions?: Record<string, FormSchema>;
|
|
271
591
|
}
|
|
592
|
+
/**
|
|
593
|
+
* Utility type for replacing object types with a specified type
|
|
594
|
+
* @public
|
|
595
|
+
*/
|
|
596
|
+
export type ReplaceObjectType<T, AllowedType, ElseType> = T extends any[] ? ElseType : T extends Record<string, any> ? AllowedType : ElseType;
|
|
597
|
+
/**
|
|
598
|
+
* Utility type for supporting nested sub items in arrays
|
|
599
|
+
* @public
|
|
600
|
+
*/
|
|
601
|
+
export type FormSchemaArrayItem<T> = T extends any[] ? FormSchema<T[Extract<keyof T, number>]> : FormSchema;
|
|
602
|
+
/**
|
|
603
|
+
* Utility type for recursive properties in a schema
|
|
604
|
+
* @public
|
|
605
|
+
*/
|
|
606
|
+
export type FormSubKeySchema<TObj> = Partial<{
|
|
607
|
+
[Key in Extract<keyof TObj, any>]: FormSchema<TObj[Key]>;
|
|
608
|
+
}>;
|
|
272
609
|
//# sourceMappingURL=form.types.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
1
|
+
import { FormSchema } from './form.types';
|
|
2
|
+
export declare function isObjectType(schema?: FormSchema): boolean;
|
|
3
|
+
export declare function isArrayType(schema: FormSchema): boolean;
|
|
4
|
+
export declare function isStringType(schema: FormSchema): boolean;
|
|
5
|
+
export declare function isNumberType(schema: FormSchema): boolean;
|
|
6
|
+
export declare function isIntegerType(schema: FormSchema): boolean;
|
|
6
7
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ArrayFieldItem } from './types';
|
|
3
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
4
|
interface CollapsibleItemProps {
|
|
4
5
|
/**
|
|
5
6
|
* Data from reach-jsonschema-form
|
|
@@ -16,11 +17,11 @@ interface CollapsibleItemProps {
|
|
|
16
17
|
/**
|
|
17
18
|
* Schema for the field
|
|
18
19
|
*/
|
|
19
|
-
schema:
|
|
20
|
+
schema: JSONSchema7;
|
|
20
21
|
/**
|
|
21
22
|
* Schema for the entire form
|
|
22
23
|
*/
|
|
23
|
-
formSchema:
|
|
24
|
+
formSchema: JSONSchema7;
|
|
24
25
|
}
|
|
25
26
|
export declare class CollapsibleItemTemplate extends React.Component {
|
|
26
27
|
props: CollapsibleItemProps;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { JSONSchema7 } from 'json-schema';
|
|
2
3
|
export declare function renderTitle(title: string): React.DetailedReactHTMLElement<{
|
|
3
4
|
className: string;
|
|
4
5
|
}, HTMLElement>;
|
|
@@ -17,5 +18,5 @@ export declare function renderDescription(description: string): React.DetailedRe
|
|
|
17
18
|
* @param formSchema - schema for the form
|
|
18
19
|
* @returns describing title of the data
|
|
19
20
|
*/
|
|
20
|
-
export declare function findTitle(data: any, fieldSchema:
|
|
21
|
+
export declare function findTitle(data: any, fieldSchema: JSONSchema7, formSchema: JSONSchema7): any;
|
|
21
22
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ObjectFieldTemplateProps, ArrayFieldTemplateProps } from '@rjsf/core';
|
|
2
|
-
import {
|
|
2
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
3
|
export { FieldTemplateProps, ArrayFieldTemplateProps } from '@rjsf/core';
|
|
4
4
|
export type TemplateProps = ObjectFieldTemplateProps | ArrayFieldTemplateProps;
|
|
5
5
|
export type ObjectFieldProperty = ObjectFieldTemplateProps['properties'][0];
|
|
6
6
|
export type ArrayFieldItem = ArrayFieldTemplateProps['items'][0];
|
|
7
7
|
export interface LimeObjectFieldTemplateProps extends ObjectFieldTemplateProps {
|
|
8
|
-
schema:
|
|
8
|
+
schema: JSONSchema7;
|
|
9
9
|
}
|
|
10
10
|
export interface Runnable {
|
|
11
11
|
run: (event: any) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OpenDirection } from '../menu/menu.types';
|
|
2
|
-
import { Help
|
|
2
|
+
import { Help } from '../help/help.types';
|
|
3
|
+
import { Link } from '../../global/shared-types/link.types';
|
|
3
4
|
/**
|
|
4
5
|
* A good design is self-explanatory! However, sometimes concepts are
|
|
5
6
|
* too complex to understand, no matter how well-designed a user interface is.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { OpenDirection } from '../menu/menu.types';
|
|
2
|
-
import { Link } from '../../
|
|
2
|
+
import { Link } from '../../global/shared-types/link.types';
|
|
3
|
+
/**
|
|
4
|
+
* This interface represents the properties that can be passed to the
|
|
5
|
+
* `limel-help` component.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
3
9
|
export interface Help {
|
|
4
10
|
/**
|
|
5
11
|
* Decides the popover's location in relation to the trigger.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ListSeparator } from '../../global/shared-types/separator.types';
|
|
1
2
|
import { Icon } from '../../global/shared-types/icon.types';
|
|
2
3
|
import { MenuItem } from '../menu/menu.types';
|
|
4
|
+
export { ListSeparator };
|
|
3
5
|
/**
|
|
4
6
|
* List item.
|
|
5
7
|
* @public
|
|
@@ -52,22 +54,6 @@ export interface ListItem<T = any> {
|
|
|
52
54
|
*/
|
|
53
55
|
primaryComponent?: ListComponent;
|
|
54
56
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Indicates that a separator should be rendered in the list.
|
|
57
|
-
* @public
|
|
58
|
-
*/
|
|
59
|
-
export interface ListSeparator {
|
|
60
|
-
/**
|
|
61
|
-
* Indicates that a separator should be rendered in the list.
|
|
62
|
-
*/
|
|
63
|
-
separator: true;
|
|
64
|
-
/**
|
|
65
|
-
* Text to display in the separator.
|
|
66
|
-
* This can be used as a label for the section of the list following the separator.
|
|
67
|
-
* If not specified, the separator will be rendered without a label.
|
|
68
|
-
*/
|
|
69
|
-
text?: string;
|
|
70
|
-
}
|
|
71
57
|
/**
|
|
72
58
|
* Component used to render a list item.
|
|
73
59
|
* @public
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ListItem
|
|
1
|
+
import { ListItem } from './list-item.types';
|
|
2
|
+
import { ListSeparator } from '../../global/shared-types/separator.types';
|
|
2
3
|
import { ListRendererConfig } from './list-renderer-config';
|
|
3
4
|
export declare class ListRenderer {
|
|
4
5
|
private defaultConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ListSeparator } from '../../global/shared-types/separator.types';
|
|
1
2
|
import { Icon } from '../../global/shared-types/icon.types';
|
|
2
|
-
import { ListSeparator } from '../list/list-item.types';
|
|
3
3
|
/**
|
|
4
4
|
* The direction in which the menu should open.
|
|
5
5
|
* - `left-start`: Menu opens to the left, aligned with the start of the trigger.
|
|
@@ -12,7 +12,8 @@ import { BreadcrumbsItem } from "./components/breadcrumbs/breadcrumbs.types";
|
|
|
12
12
|
import { Button } from "./components/button/button.types";
|
|
13
13
|
import { CalloutType } from "./components/callout/callout.types";
|
|
14
14
|
import { DateType, Languages } from "./components/date-picker/date.types";
|
|
15
|
-
import { Icon
|
|
15
|
+
import { Icon } from "./global/shared-types/icon.types";
|
|
16
|
+
import { Link } from "./global/shared-types/link.types";
|
|
16
17
|
import { Chip, ChipType } from "./components/chip-set/chip.types";
|
|
17
18
|
import { CircularProgressSize } from "./components/circular-progress/circular-progress.types";
|
|
18
19
|
import { ColorScheme, Language } from "./components/code-editor/code-editor.types";
|
|
@@ -25,7 +26,6 @@ import { OfficeViewer } from "./components/file-viewer/file-viewer.types";
|
|
|
25
26
|
import { FlexContainerAlign, FlexContainerDirection, FlexContainerJustify } from "./components/flex-container/flex-container.types";
|
|
26
27
|
import { FormError, FormSchema, ValidationError, ValidationStatus } from "./components/form/form.types";
|
|
27
28
|
import { IconSize } from "./components/icon/icon.types";
|
|
28
|
-
import { Link as Link1 } from "./global/shared-types/link.types";
|
|
29
29
|
import { InfoTileProgress } from "./components/info-tile/info-tile.types";
|
|
30
30
|
import { InputType } from "./components/input-field/input-field.types";
|
|
31
31
|
import { ListType } from "./components/list/list.types";
|
|
@@ -45,7 +45,8 @@ export { BreadcrumbsItem } from "./components/breadcrumbs/breadcrumbs.types";
|
|
|
45
45
|
export { Button } from "./components/button/button.types";
|
|
46
46
|
export { CalloutType } from "./components/callout/callout.types";
|
|
47
47
|
export { DateType, Languages } from "./components/date-picker/date.types";
|
|
48
|
-
export { Icon
|
|
48
|
+
export { Icon } from "./global/shared-types/icon.types";
|
|
49
|
+
export { Link } from "./global/shared-types/link.types";
|
|
49
50
|
export { Chip, ChipType } from "./components/chip-set/chip.types";
|
|
50
51
|
export { CircularProgressSize } from "./components/circular-progress/circular-progress.types";
|
|
51
52
|
export { ColorScheme, Language } from "./components/code-editor/code-editor.types";
|
|
@@ -58,7 +59,6 @@ export { OfficeViewer } from "./components/file-viewer/file-viewer.types";
|
|
|
58
59
|
export { FlexContainerAlign, FlexContainerDirection, FlexContainerJustify } from "./components/flex-container/flex-container.types";
|
|
59
60
|
export { FormError, FormSchema, ValidationError, ValidationStatus } from "./components/form/form.types";
|
|
60
61
|
export { IconSize } from "./components/icon/icon.types";
|
|
61
|
-
export { Link as Link1 } from "./global/shared-types/link.types";
|
|
62
62
|
export { InfoTileProgress } from "./components/info-tile/info-tile.types";
|
|
63
63
|
export { InputType } from "./components/input-field/input-field.types";
|
|
64
64
|
export { ListType } from "./components/list/list.types";
|
|
@@ -443,7 +443,7 @@ export namespace Components {
|
|
|
443
443
|
/**
|
|
444
444
|
* Defines the language for translations. Will translate the translatable strings on the components.
|
|
445
445
|
*/
|
|
446
|
-
"language":
|
|
446
|
+
"language": Languages;
|
|
447
447
|
/**
|
|
448
448
|
* If supplied, the chip will become a clickable link.
|
|
449
449
|
*/
|
|
@@ -1403,7 +1403,7 @@ export namespace Components {
|
|
|
1403
1403
|
/**
|
|
1404
1404
|
* If supplied, the info tile will be a clickable link. Supplying a value also adds an elevated effect using a shadow, as well as `cursor: pointer`, which appears on hover. While we strongly recommend supplying a link whenever the component should act as a link, if this is not possible, and you need to provide interaction through a click handler, you can still get the correct styling by supplying a `Link` object with the `href` property set to `'#'`.
|
|
1405
1405
|
*/
|
|
1406
|
-
"link"?:
|
|
1406
|
+
"link"?: Link;
|
|
1407
1407
|
/**
|
|
1408
1408
|
* Set to `true` to put the component in the `loading` state. This does _not_ disable the link. To do so, the `disabled` property should be set to `true` as well.
|
|
1409
1409
|
*/
|
|
@@ -2037,7 +2037,7 @@ export namespace Components {
|
|
|
2037
2037
|
/**
|
|
2038
2038
|
* If supplied, the shortcut will be a clickable link.
|
|
2039
2039
|
*/
|
|
2040
|
-
"link"?:
|
|
2040
|
+
"link"?: Link;
|
|
2041
2041
|
}
|
|
2042
2042
|
/**
|
|
2043
2043
|
* @exampleComponent limel-example-slider-basic
|
|
@@ -4273,7 +4273,7 @@ declare namespace LocalJSX {
|
|
|
4273
4273
|
/**
|
|
4274
4274
|
* Defines the language for translations. Will translate the translatable strings on the components.
|
|
4275
4275
|
*/
|
|
4276
|
-
"language"?:
|
|
4276
|
+
"language"?: Languages;
|
|
4277
4277
|
/**
|
|
4278
4278
|
* If supplied, the chip will become a clickable link.
|
|
4279
4279
|
*/
|
|
@@ -5329,7 +5329,7 @@ declare namespace LocalJSX {
|
|
|
5329
5329
|
/**
|
|
5330
5330
|
* If supplied, the info tile will be a clickable link. Supplying a value also adds an elevated effect using a shadow, as well as `cursor: pointer`, which appears on hover. While we strongly recommend supplying a link whenever the component should act as a link, if this is not possible, and you need to provide interaction through a click handler, you can still get the correct styling by supplying a `Link` object with the `href` property set to `'#'`.
|
|
5331
5331
|
*/
|
|
5332
|
-
"link"?:
|
|
5332
|
+
"link"?: Link;
|
|
5333
5333
|
/**
|
|
5334
5334
|
* Set to `true` to put the component in the `loading` state. This does _not_ disable the link. To do so, the `disabled` property should be set to `true` as well.
|
|
5335
5335
|
*/
|
|
@@ -6019,7 +6019,7 @@ declare namespace LocalJSX {
|
|
|
6019
6019
|
/**
|
|
6020
6020
|
* If supplied, the shortcut will be a clickable link.
|
|
6021
6021
|
*/
|
|
6022
|
-
"link"?:
|
|
6022
|
+
"link"?: Link;
|
|
6023
6023
|
}
|
|
6024
6024
|
/**
|
|
6025
6025
|
* @exampleComponent limel-example-slider-basic
|