@json-layout/vocabulary 0.11.0 → 0.12.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 +4 -0
- package/src/normalized-layout/schema.js +5 -0
- package/src/normalized-layout/schema.json +5 -0
- package/src/normalized-layout/types.ts +1 -0
- package/src/normalized-layout/validate.js +1 -1
- package/types/normalized-layout/index.d.ts +1 -0
- package/types/normalized-layout/index.d.ts.map +1 -1
- package/types/normalized-layout/schema.d.ts +5 -0
- package/types/normalized-layout/types.d.ts +1 -0
- 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.12.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', 'initialValidation', 'defaultOn', 'readOnlyPropertiesMode']
|
|
465
|
+
const defaultOptionsKeys = ['readOnly', 'summary', 'titleDepth', 'density', 'removeAdditional', 'validateOn', 'initialValidation', 'defaultOn', 'readOnlyPropertiesMode', 'debounceInputMs']
|
|
466
466
|
|
|
467
467
|
/**
|
|
468
468
|
* @param {SchemaFragment} schemaFragment
|
|
@@ -69,6 +69,10 @@ export function isSectionLayout (layout) {
|
|
|
69
69
|
|
|
70
70
|
export const compositeCompNames = ['section', 'tabs', 'vertical-tabs', 'expansion-panels', 'stepper']
|
|
71
71
|
|
|
72
|
+
// these components can received keybord inputs and emit blur events
|
|
73
|
+
// they will be debounced and validateOn=blur is applicable
|
|
74
|
+
export const editableCompNames = ['text-field', 'number-field', 'textarea', 'markdown']
|
|
75
|
+
|
|
72
76
|
/** @type {(layout: CompObject) => layout is CompositeCompObject} */
|
|
73
77
|
export function isCompositeLayout (layout) {
|
|
74
78
|
return compositeCompNames.includes(layout.comp)
|
|
@@ -60,6 +60,7 @@ export type StateNodeOptionsBase = StateNodeOptionsBaseLib & {
|
|
|
60
60
|
defaultOn?: "missing" | "empty" | "never";
|
|
61
61
|
autofocus?: boolean;
|
|
62
62
|
readOnlyPropertiesMode?: "remove" | "hide" | "show";
|
|
63
|
+
debounceInputMs?: number;
|
|
63
64
|
[k: string]: unknown;
|
|
64
65
|
};
|
|
65
66
|
export type Cols = number;
|