@json-layout/vocabulary 0.13.0 → 0.14.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 +1 -1
- package/src/normalize.js +1 -1
- package/src/normalized-layout/index.js +1 -1
- package/src/normalized-layout/schema.js +13 -5
- package/src/normalized-layout/schema.json +10 -5
- package/src/normalized-layout/types.ts +2 -1
- package/src/normalized-layout/validate.js +1 -1
- package/types/normalized-layout/schema.d.ts +10 -5
- package/types/normalized-layout/types.d.ts +2 -1
- package/types/normalized-layout/types.d.ts.map +1 -1
- package/types/normalized-layout/validate.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@json-layout/vocabulary",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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": {
|
package/src/normalize.js
CHANGED
|
@@ -462,7 +462,7 @@ function lighterValidationErrors (errors) {
|
|
|
462
462
|
return errors.map(e => e.message ?? e.keyword)
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
-
const defaultOptionsKeys = ['readOnly', 'summary', 'titleDepth', 'density', 'removeAdditional', 'validateOn', '
|
|
465
|
+
const defaultOptionsKeys = ['readOnly', 'summary', 'titleDepth', 'density', 'removeAdditional', 'validateOn', 'updateOne', 'debounceInputMs', 'initialValidation', 'defaultOn', 'readOnlyPropertiesMode']
|
|
466
466
|
|
|
467
467
|
/**
|
|
468
468
|
* @param {SchemaFragment} schemaFragment
|
|
@@ -70,7 +70,7 @@ export function isSectionLayout (layout) {
|
|
|
70
70
|
export const compositeCompNames = ['section', 'tabs', 'vertical-tabs', 'expansion-panels', 'stepper']
|
|
71
71
|
|
|
72
72
|
// these components can received keybord inputs and emit blur events
|
|
73
|
-
// they will be debounced
|
|
73
|
+
// they will be debounced when validateOn=blur is applicable and data binding will be updated on blur
|
|
74
74
|
export const editableCompNames = ['text-field', 'number-field', 'textarea', 'markdown']
|
|
75
75
|
|
|
76
76
|
/** @type {(layout: CompObject) => layout is CompositeCompObject} */
|
|
@@ -1071,6 +1071,19 @@ export default {
|
|
|
1071
1071
|
],
|
|
1072
1072
|
"default": "input"
|
|
1073
1073
|
},
|
|
1074
|
+
"updateOn": {
|
|
1075
|
+
"type": "string",
|
|
1076
|
+
"enum": [
|
|
1077
|
+
"input",
|
|
1078
|
+
"blur"
|
|
1079
|
+
],
|
|
1080
|
+
"default": "input"
|
|
1081
|
+
},
|
|
1082
|
+
"debounceInputMs": {
|
|
1083
|
+
"type": "integer",
|
|
1084
|
+
"minimum": 0,
|
|
1085
|
+
"default": 300
|
|
1086
|
+
},
|
|
1074
1087
|
"initialValidation": {
|
|
1075
1088
|
"type": "string",
|
|
1076
1089
|
"enum": [
|
|
@@ -1101,11 +1114,6 @@ export default {
|
|
|
1101
1114
|
"show"
|
|
1102
1115
|
],
|
|
1103
1116
|
"default": "show"
|
|
1104
|
-
},
|
|
1105
|
-
"debounceInputMs": {
|
|
1106
|
-
"type": "integer",
|
|
1107
|
-
"minimum": 0,
|
|
1108
|
-
"default": 300
|
|
1109
1117
|
}
|
|
1110
1118
|
}
|
|
1111
1119
|
}
|
|
@@ -507,6 +507,16 @@
|
|
|
507
507
|
"enum": ["input", "blur", "submit"],
|
|
508
508
|
"default": "input"
|
|
509
509
|
},
|
|
510
|
+
"updateOn": {
|
|
511
|
+
"type": "string",
|
|
512
|
+
"enum": ["input", "blur"],
|
|
513
|
+
"default": "input"
|
|
514
|
+
},
|
|
515
|
+
"debounceInputMs": {
|
|
516
|
+
"type": "integer",
|
|
517
|
+
"minimum": 0,
|
|
518
|
+
"default": 300
|
|
519
|
+
},
|
|
510
520
|
"initialValidation": {
|
|
511
521
|
"type": "string",
|
|
512
522
|
"enum": ["never", "always", "withData"],
|
|
@@ -522,11 +532,6 @@
|
|
|
522
532
|
"type": "string",
|
|
523
533
|
"enum": ["remove", "hide", "show"],
|
|
524
534
|
"default": "show"
|
|
525
|
-
},
|
|
526
|
-
"debounceInputMs": {
|
|
527
|
-
"type": "integer",
|
|
528
|
-
"minimum": 0,
|
|
529
|
-
"default": 300
|
|
530
535
|
}
|
|
531
536
|
}
|
|
532
537
|
}
|
|
@@ -56,11 +56,12 @@ export type StateNodeOptionsBase = StateNodeOptionsBaseLib & {
|
|
|
56
56
|
*/
|
|
57
57
|
removeAdditional?: boolean | ("unknown" | "error" | "none");
|
|
58
58
|
validateOn?: "input" | "blur" | "submit";
|
|
59
|
+
updateOn?: "input" | "blur";
|
|
60
|
+
debounceInputMs?: number;
|
|
59
61
|
initialValidation?: "never" | "always" | "withData";
|
|
60
62
|
defaultOn?: "missing" | "empty" | "never";
|
|
61
63
|
autofocus?: boolean;
|
|
62
64
|
readOnlyPropertiesMode?: "remove" | "hide" | "show";
|
|
63
|
-
debounceInputMs?: number;
|
|
64
65
|
[k: string]: unknown;
|
|
65
66
|
};
|
|
66
67
|
export type Cols = number;
|