@limetech/lime-elements 37.7.1 → 37.8.1
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/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.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-input-field_3.cjs.entry.js +1 -0
- package/dist/cjs/limel-input-field_3.cjs.entry.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/list/list.js +1 -0
- package/dist/collection/components/list/list.js.map +1 -1
- package/dist/collection/interface.js +1 -1
- package/dist/collection/interface.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.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-input-field_3.entry.js +1 -0
- package/dist/esm/limel-input-field_3.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-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-dfa06174.entry.js → p-f6138133.entry.js} +2 -2
- package/dist/lime-elements/{p-dfa06174.entry.js.map → p-f6138133.entry.js.map} +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 +337 -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/interface.d.ts +1 -1
- package/package.json +3 -3
- package/dist/lime-elements/p-64e352ec.entry.js.map +0 -1
|
@@ -181,8 +181,8 @@ export interface LimeSchemaOptions {
|
|
|
181
181
|
help?: string | Partial<Help>;
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
|
-
* @public
|
|
185
184
|
* Options for a layout to be used in a form
|
|
185
|
+
* @public
|
|
186
186
|
*/
|
|
187
187
|
export type LimeLayoutOptions = GridLayoutOptions & RowLayoutOptions;
|
|
188
188
|
/**
|
|
@@ -211,8 +211,8 @@ export interface FormLayoutOptions<T extends FormLayoutType | `${FormLayoutType}
|
|
|
211
211
|
type: T;
|
|
212
212
|
}
|
|
213
213
|
/**
|
|
214
|
-
* @public
|
|
215
214
|
* Layout options for a grid layout
|
|
215
|
+
* @public
|
|
216
216
|
*/
|
|
217
217
|
export interface GridLayoutOptions extends FormLayoutOptions<FormLayoutType | `${FormLayoutType}`> {
|
|
218
218
|
/**
|
|
@@ -237,8 +237,8 @@ export interface GridLayoutOptions extends FormLayoutOptions<FormLayoutType | `$
|
|
|
237
237
|
dense?: boolean;
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
240
|
-
* @public
|
|
241
240
|
* Layout options for a row layout
|
|
241
|
+
* @public
|
|
242
242
|
*/
|
|
243
243
|
export interface RowLayoutOptions extends FormLayoutOptions<FormLayoutType | `${FormLayoutType}`> {
|
|
244
244
|
/**
|
|
@@ -248,8 +248,8 @@ export interface RowLayoutOptions extends FormLayoutOptions<FormLayoutType | `${
|
|
|
248
248
|
icon?: string;
|
|
249
249
|
}
|
|
250
250
|
/**
|
|
251
|
-
* @public
|
|
252
251
|
* Represents the layout types for a form.
|
|
252
|
+
* @public
|
|
253
253
|
*/
|
|
254
254
|
export declare enum FormLayoutType {
|
|
255
255
|
/**
|
|
@@ -270,9 +270,340 @@ export declare enum FormLayoutType {
|
|
|
270
270
|
Row = "row"
|
|
271
271
|
}
|
|
272
272
|
/**
|
|
273
|
-
* @public
|
|
274
273
|
* Represents the JSON schema with Lime specific options
|
|
274
|
+
* @public
|
|
275
275
|
*/
|
|
276
|
-
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>;
|
|
277
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
|
+
}>;
|
|
278
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;
|
|
@@ -11,7 +11,7 @@ export * from './components/dialog/dialog.types';
|
|
|
11
11
|
export * from './components/dock/dock.types';
|
|
12
12
|
export * from './components/file/file.types';
|
|
13
13
|
export * from './components/flex-container/flex-container.types';
|
|
14
|
-
export
|
|
14
|
+
export { EventEmitter, ValidationStatus, FormError, ValidationError, FormComponent, FormInfo, LimeSchemaOptions, LimeLayoutOptions, FormComponentOptions, FormLayoutOptions, GridLayoutOptions, RowLayoutOptions, FormLayoutType, ReplaceObjectType, FormSchemaArrayItem, FormSubKeySchema, } from './components/form/form.types';
|
|
15
15
|
export * from './components/help/help.types';
|
|
16
16
|
export * from './components/icon/icon.types';
|
|
17
17
|
export * from './components/info-tile/info-tile.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-elements",
|
|
3
|
-
"version": "37.
|
|
3
|
+
"version": "37.8.1",
|
|
4
4
|
"description": "Lime Elements",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"@types/html-escaper": "^3.0.2",
|
|
55
55
|
"@types/jest": "^27.4.0",
|
|
56
56
|
"@types/lodash-es": "^4.17.12",
|
|
57
|
-
"@types/react": "^18.2.
|
|
58
|
-
"@types/react-dom": "^18.2.
|
|
57
|
+
"@types/react": "^18.2.63",
|
|
58
|
+
"@types/react-dom": "^18.2.20",
|
|
59
59
|
"@types/tabulator-tables": "^4.9.4",
|
|
60
60
|
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
|
61
61
|
"@typescript-eslint/parser": "^7.1.1",
|