@jsonforms/core 3.3.0-beta.0 → 3.3.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.
Files changed (52) hide show
  1. package/lib/Helpers.d.ts +5 -5
  2. package/lib/actions/actions.d.ts +198 -198
  3. package/lib/actions/index.d.ts +1 -1
  4. package/lib/configDefault.d.ts +6 -6
  5. package/lib/generators/Generate.d.ts +6 -6
  6. package/lib/generators/index.d.ts +3 -3
  7. package/lib/generators/schema.d.ts +8 -8
  8. package/lib/generators/uischema.d.ts +12 -12
  9. package/lib/i18n/arrayTranslations.d.ts +24 -24
  10. package/lib/i18n/combinatorTranslations.d.ts +14 -14
  11. package/lib/i18n/i18nTypes.d.ts +16 -16
  12. package/lib/i18n/i18nUtil.d.ts +28 -28
  13. package/lib/i18n/index.d.ts +4 -4
  14. package/lib/index.d.ts +11 -11
  15. package/lib/models/draft4.d.ts +198 -198
  16. package/lib/models/index.d.ts +5 -5
  17. package/lib/models/jsonSchema.d.ts +3 -3
  18. package/lib/models/jsonSchema4.d.ts +110 -110
  19. package/lib/models/jsonSchema7.d.ts +119 -119
  20. package/lib/models/uischema.d.ts +231 -231
  21. package/lib/reducers/cells.d.ts +11 -11
  22. package/lib/reducers/config.d.ts +3 -3
  23. package/lib/reducers/core.d.ts +26 -26
  24. package/lib/reducers/default-data.d.ts +10 -10
  25. package/lib/reducers/i18n.d.ts +8 -8
  26. package/lib/reducers/index.d.ts +10 -10
  27. package/lib/reducers/middleware.d.ts +6 -6
  28. package/lib/reducers/reducers.d.ts +29 -29
  29. package/lib/reducers/renderers.d.ts +10 -10
  30. package/lib/reducers/selectors.d.ts +15 -15
  31. package/lib/reducers/uischemas.d.ts +10 -10
  32. package/lib/store.d.ts +53 -53
  33. package/lib/testers/index.d.ts +1 -1
  34. package/lib/testers/testers.d.ts +220 -220
  35. package/lib/util/Formatted.d.ts +19 -19
  36. package/lib/util/array.d.ts +3 -3
  37. package/lib/util/cell.d.ts +78 -78
  38. package/lib/util/combinators.d.ts +9 -9
  39. package/lib/util/defaultDateFormat.d.ts +3 -3
  40. package/lib/util/ids.d.ts +3 -3
  41. package/lib/util/index.d.ts +16 -16
  42. package/lib/util/label.d.ts +21 -21
  43. package/lib/util/path.d.ts +38 -38
  44. package/lib/util/renderer.d.ts +429 -429
  45. package/lib/util/resolvers.d.ts +25 -25
  46. package/lib/util/runtime.d.ts +17 -17
  47. package/lib/util/schema.d.ts +10 -10
  48. package/lib/util/type.d.ts +174 -174
  49. package/lib/util/uischema.d.ts +18 -18
  50. package/lib/util/util.d.ts +57 -57
  51. package/lib/util/validator.d.ts +3 -3
  52. package/package.json +2 -2
@@ -1,29 +1,29 @@
1
- import type { ControlElement, UISchemaElement } from '../models';
2
- import type { JsonFormsState } from '../store';
3
- import type { JsonFormsUISchemaRegistryEntry } from './uischemas';
4
- import type { JsonSchema } from '../models/jsonSchema';
5
- import type { ErrorTranslator, Translator } from '../i18n';
6
- export declare const jsonFormsReducerConfig: {
7
- core: import("..").Reducer<import("./core").JsonFormsCore, import("..").CoreActions>;
8
- renderers: import("..").Reducer<import("./renderers").JsonFormsRendererRegistryEntry[], import("..").AddRendererAction | import("..").RemoveRendererAction>;
9
- cells: import("..").Reducer<import("./cells").JsonFormsCellRendererRegistryState, import("..").AddCellRendererAction | import("..").RemoveCellRendererAction>;
10
- config: import("..").Reducer<any, import("..").SetConfigAction>;
11
- uischemas: import("..").Reducer<JsonFormsUISchemaRegistryEntry[], import("..").UISchemaActions>;
12
- defaultData: import("..").Reducer<import("./default-data").JsonFormsDefaultDataRegistryEntry[], import("..").RegisterDefaultDataAction | import("..").UnregisterDefaultDataAction>;
13
- i18n: import("..").Reducer<import("../i18n").JsonFormsI18nState, import("..").I18nActions>;
14
- };
15
- /**
16
- * Finds a registered UI schema to use, if any.
17
- * @param schema the JSON schema describing the data to be rendered
18
- * @param schemaPath the according schema path
19
- * @param path the instance path
20
- * @param fallback the type of the layout to use or a UI-schema-generator function
21
- * @param control may be checked for embedded inline uischema options
22
- */
23
- export declare const findUISchema: (uischemas: JsonFormsUISchemaRegistryEntry[], schema: JsonSchema, schemaPath: string, path: string, fallback?: string | (() => UISchemaElement), control?: ControlElement, rootSchema?: JsonSchema) => UISchemaElement;
24
- export declare const getErrorAt: (instancePath: string, schema: JsonSchema) => (state: JsonFormsState) => import("ajv").ErrorObject<string, Record<string, any>, unknown>[];
25
- export declare const getSubErrorsAt: (instancePath: string, schema: JsonSchema) => (state: JsonFormsState) => import("ajv").ErrorObject<string, Record<string, any>, unknown>[];
26
- export declare const getConfig: (state: JsonFormsState) => any;
27
- export declare const getLocale: (state: JsonFormsState) => string;
28
- export declare const getTranslator: () => (state: JsonFormsState) => Translator;
29
- export declare const getErrorTranslator: () => (state: JsonFormsState) => ErrorTranslator;
1
+ import type { ControlElement, UISchemaElement } from '../models';
2
+ import type { JsonFormsState } from '../store';
3
+ import type { JsonFormsUISchemaRegistryEntry } from './uischemas';
4
+ import type { JsonSchema } from '../models/jsonSchema';
5
+ import type { ErrorTranslator, Translator } from '../i18n';
6
+ export declare const jsonFormsReducerConfig: {
7
+ core: import("..").Reducer<import("./core").JsonFormsCore, import("..").CoreActions>;
8
+ renderers: import("..").Reducer<import("./renderers").JsonFormsRendererRegistryEntry[], import("..").AddRendererAction | import("..").RemoveRendererAction>;
9
+ cells: import("..").Reducer<import("./cells").JsonFormsCellRendererRegistryState, import("..").AddCellRendererAction | import("..").RemoveCellRendererAction>;
10
+ config: import("..").Reducer<any, import("..").SetConfigAction>;
11
+ uischemas: import("..").Reducer<JsonFormsUISchemaRegistryEntry[], import("..").UISchemaActions>;
12
+ defaultData: import("..").Reducer<import("./default-data").JsonFormsDefaultDataRegistryEntry[], import("..").RegisterDefaultDataAction | import("..").UnregisterDefaultDataAction>;
13
+ i18n: import("..").Reducer<import("../i18n").JsonFormsI18nState, import("..").I18nActions>;
14
+ };
15
+ /**
16
+ * Finds a registered UI schema to use, if any.
17
+ * @param schema the JSON schema describing the data to be rendered
18
+ * @param schemaPath the according schema path
19
+ * @param path the instance path
20
+ * @param fallback the type of the layout to use or a UI-schema-generator function
21
+ * @param control may be checked for embedded inline uischema options
22
+ */
23
+ export declare const findUISchema: (uischemas: JsonFormsUISchemaRegistryEntry[], schema: JsonSchema, schemaPath: string, path: string, fallback?: string | (() => UISchemaElement), control?: ControlElement, rootSchema?: JsonSchema) => UISchemaElement;
24
+ export declare const getErrorAt: (instancePath: string, schema: JsonSchema) => (state: JsonFormsState) => import("ajv").ErrorObject<string, Record<string, any>, unknown>[];
25
+ export declare const getSubErrorsAt: (instancePath: string, schema: JsonSchema) => (state: JsonFormsState) => import("ajv").ErrorObject<string, Record<string, any>, unknown>[];
26
+ export declare const getConfig: (state: JsonFormsState) => any;
27
+ export declare const getLocale: (state: JsonFormsState) => string;
28
+ export declare const getTranslator: () => (state: JsonFormsState) => Translator;
29
+ export declare const getErrorTranslator: () => (state: JsonFormsState) => ErrorTranslator;
@@ -1,10 +1,10 @@
1
- import type { RankedTester } from '../testers';
2
- import { AddRendererAction, RemoveRendererAction } from '../actions';
3
- import type { Reducer } from '../util';
4
- export interface JsonFormsRendererRegistryEntry {
5
- tester: RankedTester;
6
- renderer: any;
7
- }
8
- type ValidRendererReducerActions = AddRendererAction | RemoveRendererAction;
9
- export declare const rendererReducer: Reducer<JsonFormsRendererRegistryEntry[], ValidRendererReducerActions>;
10
- export {};
1
+ import type { RankedTester } from '../testers';
2
+ import { AddRendererAction, RemoveRendererAction } from '../actions';
3
+ import type { Reducer } from '../util';
4
+ export interface JsonFormsRendererRegistryEntry {
5
+ tester: RankedTester;
6
+ renderer: any;
7
+ }
8
+ type ValidRendererReducerActions = AddRendererAction | RemoveRendererAction;
9
+ export declare const rendererReducer: Reducer<JsonFormsRendererRegistryEntry[], ValidRendererReducerActions>;
10
+ export {};
@@ -1,15 +1,15 @@
1
- import type Ajv from 'ajv';
2
- import type { JsonFormsState } from '../store';
3
- import type { JsonSchema, UISchemaElement } from '../models';
4
- import { JsonFormsDefaultDataRegistryEntry } from './default-data';
5
- import type { JsonFormsRendererRegistryEntry } from './renderers';
6
- import type { JsonFormsCellRendererRegistryEntry } from './cells';
7
- import type { JsonFormsUISchemaRegistryEntry } from './uischemas';
8
- export declare const getData: (state: JsonFormsState) => any;
9
- export declare const getSchema: (state: JsonFormsState) => JsonSchema;
10
- export declare const getUiSchema: (state: JsonFormsState) => UISchemaElement;
11
- export declare const getAjv: (state: JsonFormsState) => Ajv;
12
- export declare const getDefaultData: (state: JsonFormsState) => JsonFormsDefaultDataRegistryEntry[];
13
- export declare const getRenderers: (state: JsonFormsState) => JsonFormsRendererRegistryEntry[];
14
- export declare const getCells: (state: JsonFormsState) => JsonFormsCellRendererRegistryEntry[];
15
- export declare const getUISchemas: (state: JsonFormsState) => JsonFormsUISchemaRegistryEntry[];
1
+ import type Ajv from 'ajv';
2
+ import type { JsonFormsState } from '../store';
3
+ import type { JsonSchema, UISchemaElement } from '../models';
4
+ import { JsonFormsDefaultDataRegistryEntry } from './default-data';
5
+ import type { JsonFormsRendererRegistryEntry } from './renderers';
6
+ import type { JsonFormsCellRendererRegistryEntry } from './cells';
7
+ import type { JsonFormsUISchemaRegistryEntry } from './uischemas';
8
+ export declare const getData: (state: JsonFormsState) => any;
9
+ export declare const getSchema: (state: JsonFormsState) => JsonSchema;
10
+ export declare const getUiSchema: (state: JsonFormsState) => UISchemaElement;
11
+ export declare const getAjv: (state: JsonFormsState) => Ajv;
12
+ export declare const getDefaultData: (state: JsonFormsState) => JsonFormsDefaultDataRegistryEntry[];
13
+ export declare const getRenderers: (state: JsonFormsState) => JsonFormsRendererRegistryEntry[];
14
+ export declare const getCells: (state: JsonFormsState) => JsonFormsCellRendererRegistryEntry[];
15
+ export declare const getUISchemas: (state: JsonFormsState) => JsonFormsUISchemaRegistryEntry[];
@@ -1,10 +1,10 @@
1
- import { UISchemaActions } from '../actions';
2
- import type { JsonSchema, UISchemaElement } from '../models';
3
- import type { Reducer } from '../util';
4
- export type UISchemaTester = (schema: JsonSchema, schemaPath: string, path: string) => number;
5
- export interface JsonFormsUISchemaRegistryEntry {
6
- tester: UISchemaTester;
7
- uischema: UISchemaElement;
8
- }
9
- export declare const uischemaRegistryReducer: Reducer<JsonFormsUISchemaRegistryEntry[], UISchemaActions>;
10
- export declare const findMatchingUISchema: (state: JsonFormsUISchemaRegistryEntry[]) => (jsonSchema: JsonSchema, schemaPath: string, path: string) => UISchemaElement;
1
+ import { UISchemaActions } from '../actions';
2
+ import type { JsonSchema, UISchemaElement } from '../models';
3
+ import type { Reducer } from '../util';
4
+ export type UISchemaTester = (schema: JsonSchema, schemaPath: string, path: string) => number;
5
+ export interface JsonFormsUISchemaRegistryEntry {
6
+ tester: UISchemaTester;
7
+ uischema: UISchemaElement;
8
+ }
9
+ export declare const uischemaRegistryReducer: Reducer<JsonFormsUISchemaRegistryEntry[], UISchemaActions>;
10
+ export declare const findMatchingUISchema: (state: JsonFormsUISchemaRegistryEntry[]) => (jsonSchema: JsonSchema, schemaPath: string, path: string) => UISchemaElement;
package/lib/store.d.ts CHANGED
@@ -1,53 +1,53 @@
1
- import type { Store } from './util';
2
- import type { JsonFormsCore, JsonFormsCellRendererRegistryEntry, JsonFormsRendererRegistryEntry, JsonFormsUISchemaRegistryEntry } from './reducers';
3
- import type { JsonFormsI18nState } from './i18n';
4
- /**
5
- * JSONForms store.
6
- */
7
- export interface JsonFormsStore extends Store<JsonFormsState> {
8
- }
9
- /**
10
- * The state shape of JSONForms.
11
- */
12
- export interface JsonFormsState {
13
- /**
14
- * Represents JSONForm's sub-state.
15
- */
16
- jsonforms: JsonFormsSubStates;
17
- }
18
- export interface JsonFormsSubStates {
19
- /**
20
- * Substate for storing mandatory sub-state.
21
- */
22
- core?: JsonFormsCore;
23
- /**
24
- * Global configuration options.
25
- */
26
- config?: any;
27
- /**
28
- * All available renderers.
29
- */
30
- renderers?: JsonFormsRendererRegistryEntry[];
31
- /**
32
- * All available cell renderers.
33
- */
34
- cells?: JsonFormsCellRendererRegistryEntry[];
35
- /**
36
- * I18n settings.
37
- */
38
- i18n?: JsonFormsI18nState;
39
- /**
40
- * The UI schema registry used in detail renderers.
41
- */
42
- uischemas?: JsonFormsUISchemaRegistryEntry[];
43
- /**
44
- * If true, sets all controls to read-only.
45
- */
46
- readonly?: boolean;
47
- [additionalState: string]: any;
48
- }
49
- export interface JsonFormsExtendedState<T> extends JsonFormsState {
50
- jsonforms: {
51
- [subState: string]: T;
52
- };
53
- }
1
+ import type { Store } from './util';
2
+ import type { JsonFormsCore, JsonFormsCellRendererRegistryEntry, JsonFormsRendererRegistryEntry, JsonFormsUISchemaRegistryEntry } from './reducers';
3
+ import type { JsonFormsI18nState } from './i18n';
4
+ /**
5
+ * JSONForms store.
6
+ */
7
+ export interface JsonFormsStore extends Store<JsonFormsState> {
8
+ }
9
+ /**
10
+ * The state shape of JSONForms.
11
+ */
12
+ export interface JsonFormsState {
13
+ /**
14
+ * Represents JSONForm's sub-state.
15
+ */
16
+ jsonforms: JsonFormsSubStates;
17
+ }
18
+ export interface JsonFormsSubStates {
19
+ /**
20
+ * Substate for storing mandatory sub-state.
21
+ */
22
+ core?: JsonFormsCore;
23
+ /**
24
+ * Global configuration options.
25
+ */
26
+ config?: any;
27
+ /**
28
+ * All available renderers.
29
+ */
30
+ renderers?: JsonFormsRendererRegistryEntry[];
31
+ /**
32
+ * All available cell renderers.
33
+ */
34
+ cells?: JsonFormsCellRendererRegistryEntry[];
35
+ /**
36
+ * I18n settings.
37
+ */
38
+ i18n?: JsonFormsI18nState;
39
+ /**
40
+ * The UI schema registry used in detail renderers.
41
+ */
42
+ uischemas?: JsonFormsUISchemaRegistryEntry[];
43
+ /**
44
+ * If true, sets all controls to read-only.
45
+ */
46
+ readonly?: boolean;
47
+ [additionalState: string]: any;
48
+ }
49
+ export interface JsonFormsExtendedState<T> extends JsonFormsState {
50
+ jsonforms: {
51
+ [subState: string]: T;
52
+ };
53
+ }
@@ -1 +1 @@
1
- export * from './testers';
1
+ export * from './testers';