@ng-formworks/core 16.5.8 → 16.6.2
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/esm2022/lib/json-schema-form.component.mjs +25 -6
- package/esm2022/lib/json-schema-form.service.mjs +139 -27
- package/esm2022/lib/locale/de-validation-messages.mjs +4 -2
- package/esm2022/lib/locale/en-validation-messages.mjs +4 -2
- package/esm2022/lib/locale/es-validation-messages.mjs +4 -2
- package/esm2022/lib/locale/fr-validation-messages.mjs +4 -2
- package/esm2022/lib/locale/it-validation-messages.mjs +4 -2
- package/esm2022/lib/locale/pt-validation-messages.mjs +4 -2
- package/esm2022/lib/locale/zh-validation-messages.mjs +4 -2
- package/esm2022/lib/shared/form-group.functions.mjs +326 -14
- package/esm2022/lib/shared/format-regex.constants.mjs +2 -1
- package/esm2022/lib/shared/index.mjs +6 -6
- package/esm2022/lib/shared/json-schema.functions.mjs +96 -4
- package/esm2022/lib/shared/json.validators.mjs +11 -6
- package/esm2022/lib/shared/jsonpointer.functions.mjs +2 -2
- package/esm2022/lib/shared/layout.functions.mjs +172 -14
- package/esm2022/lib/shared/utility.functions.mjs +31 -1
- package/esm2022/lib/widget-library/add-reference.component.mjs +19 -15
- package/esm2022/lib/widget-library/button.component.mjs +4 -1
- package/esm2022/lib/widget-library/checkbox.component.mjs +12 -4
- package/esm2022/lib/widget-library/checkboxes.component.mjs +9 -2
- package/esm2022/lib/widget-library/file.component.mjs +4 -1
- package/esm2022/lib/widget-library/hidden.component.mjs +4 -1
- package/esm2022/lib/widget-library/input.component.mjs +4 -1
- package/esm2022/lib/widget-library/number.component.mjs +4 -1
- package/esm2022/lib/widget-library/one-of.component.mjs +87 -3
- package/esm2022/lib/widget-library/radios.component.mjs +5 -2
- package/esm2022/lib/widget-library/root.component.mjs +74 -1
- package/esm2022/lib/widget-library/select.component.mjs +91 -6
- package/esm2022/lib/widget-library/submit.component.mjs +2 -1
- package/esm2022/lib/widget-library/tabs.component.mjs +76 -28
- package/esm2022/lib/widget-library/textarea.component.mjs +4 -1
- package/esm2022/lib/widget-library/widget-library.module.mjs +15 -3
- package/fesm2022/ng-formworks-core.mjs +1324 -244
- package/fesm2022/ng-formworks-core.mjs.map +1 -1
- package/lib/json-schema-form.component.d.ts +10 -1
- package/lib/json-schema-form.service.d.ts +22 -4
- package/lib/shared/form-group.functions.d.ts +29 -1
- package/lib/shared/format-regex.constants.d.ts +2 -1
- package/lib/shared/index.d.ts +6 -6
- package/lib/shared/json-schema.functions.d.ts +22 -0
- package/lib/shared/json.validators.d.ts +2 -2
- package/lib/shared/layout.functions.d.ts +1 -1
- package/lib/shared/utility.functions.d.ts +15 -0
- package/lib/widget-library/button.component.d.ts +2 -1
- package/lib/widget-library/checkbox.component.d.ts +2 -1
- package/lib/widget-library/checkboxes.component.d.ts +2 -1
- package/lib/widget-library/file.component.d.ts +2 -1
- package/lib/widget-library/hidden.component.d.ts +2 -1
- package/lib/widget-library/input.component.d.ts +1 -0
- package/lib/widget-library/number.component.d.ts +1 -0
- package/lib/widget-library/one-of.component.d.ts +2 -0
- package/lib/widget-library/radios.component.d.ts +2 -1
- package/lib/widget-library/root.component.d.ts +1 -0
- package/lib/widget-library/select.component.d.ts +5 -2
- package/lib/widget-library/textarea.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -65,6 +65,7 @@ export declare class JsonSchemaFormComponent implements ControlValueAccessor, On
|
|
|
65
65
|
formData: any;
|
|
66
66
|
loadExternalAssets: boolean;
|
|
67
67
|
debug: boolean;
|
|
68
|
+
ajvOptions: any;
|
|
68
69
|
};
|
|
69
70
|
schema: any;
|
|
70
71
|
layout: any[];
|
|
@@ -82,6 +83,8 @@ export declare class JsonSchemaFormComponent implements ControlValueAccessor, On
|
|
|
82
83
|
loadExternalAssets: boolean;
|
|
83
84
|
debug: boolean;
|
|
84
85
|
theme: string;
|
|
86
|
+
ajvOptions: any;
|
|
87
|
+
private ajvInstanceName;
|
|
85
88
|
get value(): any;
|
|
86
89
|
set value(value: any);
|
|
87
90
|
onChanges: EventEmitter<any>;
|
|
@@ -136,6 +139,12 @@ export declare class JsonSchemaFormComponent implements ControlValueAccessor, On
|
|
|
136
139
|
* the Angular formGroup used to control the reactive form.
|
|
137
140
|
*/
|
|
138
141
|
initializeForm(initialData?: any): void;
|
|
142
|
+
/**
|
|
143
|
+
* 'initializeAjv' function
|
|
144
|
+
*
|
|
145
|
+
* Initialize ajv from 'ajvOptions'
|
|
146
|
+
*/
|
|
147
|
+
private initializeAjv;
|
|
139
148
|
/**
|
|
140
149
|
* 'initializeOptions' function
|
|
141
150
|
*
|
|
@@ -214,5 +223,5 @@ export declare class JsonSchemaFormComponent implements ControlValueAccessor, On
|
|
|
214
223
|
*/
|
|
215
224
|
private activateForm;
|
|
216
225
|
static ɵfac: i0.ɵɵFactoryDeclaration<JsonSchemaFormComponent, never>;
|
|
217
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<JsonSchemaFormComponent, "json-schema-form", never, { "schema": { "alias": "schema"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "data": { "alias": "data"; "required": false; }; "options": { "alias": "options"; "required": false; }; "framework": { "alias": "framework"; "required": false; }; "widgets": { "alias": "widgets"; "required": false; }; "form": { "alias": "form"; "required": false; }; "model": { "alias": "model"; "required": false; }; "JSONSchema": { "alias": "JSONSchema"; "required": false; }; "UISchema": { "alias": "UISchema"; "required": false; }; "formData": { "alias": "formData"; "required": false; }; "ngModel": { "alias": "ngModel"; "required": false; }; "language": { "alias": "language"; "required": false; }; "loadExternalAssets": { "alias": "loadExternalAssets"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "onChanges": "onChanges"; "onSubmit": "onSubmit"; "isValid": "isValid"; "validationErrors": "validationErrors"; "formSchema": "formSchema"; "formLayout": "formLayout"; "dataChange": "dataChange"; "modelChange": "modelChange"; "formDataChange": "formDataChange"; "ngModelChange": "ngModelChange"; }, never, never, false, never>;
|
|
226
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<JsonSchemaFormComponent, "json-schema-form", never, { "schema": { "alias": "schema"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "data": { "alias": "data"; "required": false; }; "options": { "alias": "options"; "required": false; }; "framework": { "alias": "framework"; "required": false; }; "widgets": { "alias": "widgets"; "required": false; }; "form": { "alias": "form"; "required": false; }; "model": { "alias": "model"; "required": false; }; "JSONSchema": { "alias": "JSONSchema"; "required": false; }; "UISchema": { "alias": "UISchema"; "required": false; }; "formData": { "alias": "formData"; "required": false; }; "ngModel": { "alias": "ngModel"; "required": false; }; "language": { "alias": "language"; "required": false; }; "loadExternalAssets": { "alias": "loadExternalAssets"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "ajvOptions": { "alias": "ajvOptions"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "onChanges": "onChanges"; "onSubmit": "onSubmit"; "isValid": "isValid"; "validationErrors": "validationErrors"; "formSchema": "formSchema"; "formLayout": "formLayout"; "dataChange": "dataChange"; "modelChange": "modelChange"; "formDataChange": "formDataChange"; "ngModelChange": "ngModelChange"; }, never, never, false, never>;
|
|
218
227
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { AbstractControl, UntypedFormArray, UntypedFormGroup } from '@angular/forms';
|
|
3
|
-
import { ErrorObject, Options } from 'ajv/dist/2019';
|
|
3
|
+
import Ajv2019, { ErrorObject, Options, ValidateFunction } from 'ajv/dist/2019';
|
|
4
4
|
import { Subject, Subscription } from 'rxjs';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
export type AJVRegistryItem = {
|
|
7
|
+
[name: string]: {
|
|
8
|
+
name: string;
|
|
9
|
+
ajvInstance: Ajv2019;
|
|
10
|
+
ajvValidator: ValidateFunction;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
6
13
|
export interface TitleMapItem {
|
|
7
14
|
name?: string;
|
|
8
15
|
value?: any;
|
|
@@ -59,6 +66,15 @@ export declare class JsonSchemaFormService implements OnDestroy {
|
|
|
59
66
|
private sortableOptionsSubject;
|
|
60
67
|
sortableOptions$: import("rxjs").Observable<any>;
|
|
61
68
|
setSortableOptions(value: any): void;
|
|
69
|
+
createAjvInstance(ajvOptions: any): Ajv2019;
|
|
70
|
+
createAndRegisterAjvInstance(ajvOptions: any, name?: string): {
|
|
71
|
+
name: string;
|
|
72
|
+
ajvInstance: Ajv2019;
|
|
73
|
+
ajvValidator: ValidateFunction<unknown>;
|
|
74
|
+
};
|
|
75
|
+
ajvRegistry: AJVRegistryItem;
|
|
76
|
+
getAjvInstance(name?: string): Ajv2019;
|
|
77
|
+
getAjvValidator(name?: string): ValidateFunction<unknown>;
|
|
62
78
|
constructor();
|
|
63
79
|
ngOnDestroy(): void;
|
|
64
80
|
setLanguage(language?: string): void;
|
|
@@ -86,12 +102,12 @@ export declare class JsonSchemaFormService implements OnDestroy {
|
|
|
86
102
|
* //{ErrorMessages} errors
|
|
87
103
|
*/
|
|
88
104
|
buildRemoteError(errors: ErrorMessages): void;
|
|
89
|
-
validateData(newValue: any, updateSubscriptions?: boolean): void;
|
|
105
|
+
validateData(newValue: any, updateSubscriptions?: boolean, ajvInstanceName?: string): void;
|
|
90
106
|
buildFormGroupTemplate(formValues?: any, setValues?: boolean): void;
|
|
91
|
-
buildFormGroup(): void;
|
|
107
|
+
buildFormGroup(ajvInstanceName?: string): void;
|
|
92
108
|
buildLayout(widgetLibrary: any): void;
|
|
93
109
|
setOptions(newOptions: any): void;
|
|
94
|
-
compileAjvSchema(): void;
|
|
110
|
+
compileAjvSchema(ajvInstanceName?: string): void;
|
|
95
111
|
buildSchemaFromData(data?: any, requireAllFields?: boolean): any;
|
|
96
112
|
buildSchemaFromLayout(layout?: any): any;
|
|
97
113
|
setTpldata(newTpldata?: any): void;
|
|
@@ -104,7 +120,9 @@ export declare class JsonSchemaFormService implements OnDestroy {
|
|
|
104
120
|
formatErrors(errors: any, validationMessages?: any): string;
|
|
105
121
|
updateValue(ctx: any, value: any): void;
|
|
106
122
|
updateArrayCheckboxList(ctx: any, checkboxList: TitleMapItem[]): void;
|
|
123
|
+
updateArrayMultiSelectList(ctx: any, selectList: TitleMapItem[]): void;
|
|
107
124
|
getFormControl(ctx: any): AbstractControl;
|
|
125
|
+
setFormControl(ctx: any, control: AbstractControl): AbstractControl;
|
|
108
126
|
getFormControlValue(ctx: any): AbstractControl;
|
|
109
127
|
getFormControlGroup(ctx: any): UntypedFormArray | UntypedFormGroup;
|
|
110
128
|
getFormControlName(ctx: any): string;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { AbstractControl } from '@angular/forms';
|
|
2
2
|
import { Pointer } from './jsonpointer.functions';
|
|
3
|
+
/**
|
|
4
|
+
* path2ControlKey takes a datapointer path like /some/pointer/path
|
|
5
|
+
* and returns something like $some$pointer$path
|
|
6
|
+
* used mainly to convert paths so it can be used as keys in FormGroups
|
|
7
|
+
* fot ITE scenarios
|
|
8
|
+
* @param path
|
|
9
|
+
* @returns string
|
|
10
|
+
*/
|
|
11
|
+
export declare function path2ControlKey(path: string): string;
|
|
3
12
|
/**
|
|
4
13
|
* FormGroup function library:
|
|
5
14
|
*
|
|
@@ -39,6 +48,7 @@ export declare function buildFormGroupTemplate(jsf: any, nodeValue?: any, setVal
|
|
|
39
48
|
controlType: string;
|
|
40
49
|
controls: any;
|
|
41
50
|
validators: any;
|
|
51
|
+
schemaPointer: string;
|
|
42
52
|
value?: undefined;
|
|
43
53
|
} | {
|
|
44
54
|
controlType: string;
|
|
@@ -47,6 +57,7 @@ export declare function buildFormGroupTemplate(jsf: any, nodeValue?: any, setVal
|
|
|
47
57
|
disabled: any;
|
|
48
58
|
};
|
|
49
59
|
validators: any;
|
|
60
|
+
schemaPointer: string;
|
|
50
61
|
controls?: undefined;
|
|
51
62
|
};
|
|
52
63
|
/**
|
|
@@ -96,5 +107,22 @@ export declare function formatFormData(formData: any, dataMap: Map<string, any>,
|
|
|
96
107
|
* // {Pointer} dataPointer - JSON Pointer (string or array)
|
|
97
108
|
* // {boolean = false} returnGroup - If true, return group containing control
|
|
98
109
|
* // {group} - Located value (or null, if no control found)
|
|
110
|
+
* // {string} schemaPointer - string used for conditional controls coming from schema if/then/else
|
|
111
|
+
*/
|
|
112
|
+
export declare function getControl(formGroup: any, dataPointer: Pointer, returnGroup?: boolean, schemaPointer?: string): any;
|
|
113
|
+
/**
|
|
114
|
+
* 'setControl' function
|
|
115
|
+
*
|
|
116
|
+
* Uses a JSON Pointer for a data object to retrieve a control from
|
|
117
|
+
* an Angular formGroup or formGroup template. (Note: though a formGroup
|
|
118
|
+
* template is much simpler, its basic structure is idential to a formGroup).
|
|
119
|
+
*
|
|
120
|
+
* If the optional third parameter 'returnGroup' is set to TRUE, the group
|
|
121
|
+
* containing the control is returned, rather than the control itself.
|
|
122
|
+
*
|
|
123
|
+
* // {FormGroup} formGroup - Angular FormGroup to get value from
|
|
124
|
+
* // {Pointer} dataPointer - JSON Pointer (string or array)
|
|
125
|
+
* // {AbstractControl} control - control used to replace existing or add
|
|
126
|
+
* // {targetKey} - optional string used as the new key-not implemented as yet
|
|
99
127
|
*/
|
|
100
|
-
export declare function
|
|
128
|
+
export declare function setControl(formGroup: any, dataPointer: Pointer, control: AbstractControl, targetKey?: string): any;
|
|
@@ -14,6 +14,7 @@ export declare const jsonSchemaFormatTests: {
|
|
|
14
14
|
color: RegExp;
|
|
15
15
|
'json-pointer': RegExp;
|
|
16
16
|
'relative-json-pointer': RegExp;
|
|
17
|
+
duration: RegExp;
|
|
17
18
|
regex: (str: any) => boolean;
|
|
18
19
|
};
|
|
19
|
-
export type JsonSchemaFormatNames = 'date' | 'time' | 'date-time' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'uri-template' | 'url' | 'uuid' | 'color' | 'json-pointer' | 'relative-json-pointer' | 'regex';
|
|
20
|
+
export type JsonSchemaFormatNames = 'date' | 'time' | 'date-time' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'uri-template' | 'url' | 'uuid' | 'color' | 'json-pointer' | 'relative-json-pointer' | 'duration' | 'regex';
|
package/lib/shared/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { _executeValidators,
|
|
2
|
-
export { addClasses, copy, forEach, forEachCopy, hasOwn, mergeFilteredObject,
|
|
3
|
-
export {
|
|
1
|
+
export { _executeAsyncValidators, _executeValidators, _mergeErrors, _mergeObjects, _toPromise, AsyncIValidatorFn, getType, hasValue, inArray, isArray, isBoolean, isDate, isDefined, isEmpty, isFunction, isInteger, isMap, isNumber, isObject, isObservable, isPrimitive, isPromise, isSet, isString, isType, IValidatorFn, JavaScriptPrimitiveType, JavaScriptType, PlainObject, PrimitiveValue, SchemaPrimitiveType, SchemaType, toJavaScriptType, toObservable, toSchemaType, xor } from './validator.functions';
|
|
2
|
+
export { addClasses, commonItems, copy, fixTitle, forEach, forEachCopy, hasNonNullValue, hasOwn, mergeFilteredObject, toTitleCase, uniqueItems } from './utility.functions';
|
|
3
|
+
export { JsonPointer, Pointer } from './jsonpointer.functions';
|
|
4
4
|
export { JsonValidators } from './json.validators';
|
|
5
|
-
export { buildSchemaFromLayout,
|
|
5
|
+
export { buildSchemaFromData, buildSchemaFromLayout, checkInlineType, combineAllOf, fixRequiredArrayProperties, getControlValidators, getFromSchema, getInputType, getSubSchema, getTitleMapFromOneOf, isInputRequired, removeRecursiveReferences, resolveSchemaReferences, updateInputOptions } from './json-schema.functions';
|
|
6
6
|
export { convertSchemaToDraft6 } from './convert-schema-to-draft6.function';
|
|
7
7
|
export { mergeSchemas } from './merge-schemas.function';
|
|
8
|
-
export {
|
|
9
|
-
export { buildLayout, buildLayoutFromSchema,
|
|
8
|
+
export { buildFormGroup, buildFormGroupTemplate, formatFormData, getControl, path2ControlKey, setControl, setRequiredFields } from './form-group.functions';
|
|
9
|
+
export { buildLayout, buildLayoutFromSchema, buildTitleMap, getLayoutNode, mapLayout } from './layout.functions';
|
|
@@ -171,6 +171,8 @@ export declare function resolveSchemaReferences(schema: any, schemaRefLibrary: a
|
|
|
171
171
|
* //
|
|
172
172
|
*/
|
|
173
173
|
export declare function getSubSchema(schema: any, pointer: any, schemaRefLibrary?: any, schemaRecursiveRefMap?: Map<string, string>, usedPointers?: string[]): any;
|
|
174
|
+
export declare function omitKeys<T extends object>(objects: T[], keysToOmit: (keyof T)[]): Omit<T, keyof T>[];
|
|
175
|
+
export declare function combineAllOfITE(schema: any): void;
|
|
174
176
|
/**
|
|
175
177
|
* 'combineAllOf' function
|
|
176
178
|
*
|
|
@@ -191,3 +193,23 @@ export declare function combineAllOf(schema: any): any;
|
|
|
191
193
|
* // - converted schema object
|
|
192
194
|
*/
|
|
193
195
|
export declare function fixRequiredArrayProperties(schema: any): any;
|
|
196
|
+
/**
|
|
197
|
+
* 'convertJSONSchemaIfToCondition' function
|
|
198
|
+
* converts something like
|
|
199
|
+
* "if": {
|
|
200
|
+
* "properties": {
|
|
201
|
+
* "animal": {
|
|
202
|
+
* "const": "Cat"
|
|
203
|
+
* },
|
|
204
|
+
* "habitat":{
|
|
205
|
+
* "const": "City"
|
|
206
|
+
* }
|
|
207
|
+
* }
|
|
208
|
+
* }
|
|
209
|
+
* to "model.animal=='Cat' && habitat=='City" contion
|
|
210
|
+
* @param schema:any
|
|
211
|
+
* @param negate:boolean=false
|
|
212
|
+
* @returns
|
|
213
|
+
|
|
214
|
+
*/
|
|
215
|
+
export declare function convertJSONSchemaIfToCondition(schema: any, layoutNode: any, negate?: boolean): {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AsyncIValidatorFn, IValidatorFn, SchemaPrimitiveType } from './validator.functions';
|
|
2
1
|
import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
3
2
|
import { JsonSchemaFormatNames } from './format-regex.constants';
|
|
3
|
+
import { AsyncIValidatorFn, IValidatorFn, SchemaPrimitiveType } from './validator.functions';
|
|
4
4
|
/**
|
|
5
5
|
* 'JsonValidators' class
|
|
6
6
|
*
|
|
@@ -200,7 +200,7 @@ export declare class JsonValidators {
|
|
|
200
200
|
* This validator currently checks the following formsts:
|
|
201
201
|
* date, time, date-time, email, hostname, ipv4, ipv6,
|
|
202
202
|
* uri, uri-reference, uri-template, url, uuid, color,
|
|
203
|
-
* json-pointer, relative-json-pointer, regex
|
|
203
|
+
* json-pointer, relative-json-pointer,duration, regex
|
|
204
204
|
*
|
|
205
205
|
* Fast format regular expressions copied from AJV:
|
|
206
206
|
* https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js
|
|
@@ -36,7 +36,7 @@ export declare function buildLayout(jsf: any, widgetLibrary: any): any[];
|
|
|
36
36
|
* // { string = '' } dataPointerPrefix -
|
|
37
37
|
* //
|
|
38
38
|
*/
|
|
39
|
-
export declare function buildLayoutFromSchema(jsf: any, widgetLibrary: any, nodeValue?: any, schemaPointer?: string, dataPointer?: string, arrayItem?: boolean, arrayItemType?: string, removable?: boolean, forRefLibrary?: boolean, dataPointerPrefix?: string): any;
|
|
39
|
+
export declare function buildLayoutFromSchema(jsf: any, widgetLibrary: any, nodeValue?: any, schemaPointer?: string, dataPointer?: string, arrayItem?: boolean, arrayItemType?: string, removable?: boolean, forRefLibrary?: boolean, dataPointerPrefix?: string, jsonSchema?: any): any;
|
|
40
40
|
/**
|
|
41
41
|
* 'mapLayout' function
|
|
42
42
|
*
|
|
@@ -163,3 +163,18 @@ export declare function fixTitle(name: string): string;
|
|
|
163
163
|
* // {string} -
|
|
164
164
|
*/
|
|
165
165
|
export declare function toTitleCase(input: string, forceWords?: string | string[]): string;
|
|
166
|
+
/**
|
|
167
|
+
* Recursively checks if at least one property of the given object (including nested objects)
|
|
168
|
+
* has a non-null and non-undefined value.
|
|
169
|
+
*
|
|
170
|
+
* @param obj - The object to check.
|
|
171
|
+
* @returns `true` if at least one property has a non-null and non-undefined value, otherwise `false`.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* const testObj = { a: null, b: { b1: null, b2: undefined } };
|
|
175
|
+
* console.log(hasNonNullValue(testObj)); // Output: false
|
|
176
|
+
*
|
|
177
|
+
* const testObj2 = { a: 1, b: { b1: null, b2: undefined } };
|
|
178
|
+
* console.log(hasNonNullValue(testObj2)); // Output: true
|
|
179
|
+
*/
|
|
180
|
+
export declare function hasNonNullValue(obj: Record<string, any>): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class ButtonComponent implements OnInit {
|
|
@@ -16,6 +16,7 @@ export declare class ButtonComponent implements OnInit {
|
|
|
16
16
|
constructor(jsf: JsonSchemaFormService);
|
|
17
17
|
ngOnInit(): void;
|
|
18
18
|
updateValue(event: any): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
20
21
|
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "button-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
21
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class CheckboxComponent implements OnInit {
|
|
@@ -19,6 +19,7 @@ export declare class CheckboxComponent implements OnInit {
|
|
|
19
19
|
ngOnInit(): void;
|
|
20
20
|
updateValue(event: any): void;
|
|
21
21
|
get isChecked(): boolean;
|
|
22
|
+
ngOnDestroy(): void;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, never>;
|
|
23
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "checkbox-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
24
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService, TitleMapItem } from '../json-schema-form.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class CheckboxesComponent implements OnInit {
|
|
@@ -19,6 +19,7 @@ export declare class CheckboxesComponent implements OnInit {
|
|
|
19
19
|
constructor(jsf: JsonSchemaFormService);
|
|
20
20
|
ngOnInit(): void;
|
|
21
21
|
updateValue(event: any): void;
|
|
22
|
+
ngOnDestroy(): void;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxesComponent, never>;
|
|
23
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxesComponent, "checkboxes-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
24
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FileComponent implements OnInit {
|
|
@@ -16,6 +16,7 @@ export declare class FileComponent implements OnInit {
|
|
|
16
16
|
constructor(jsf: JsonSchemaFormService);
|
|
17
17
|
ngOnInit(): void;
|
|
18
18
|
updateValue(event: any): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileComponent, never>;
|
|
20
21
|
static ɵcmp: i0.ɵɵComponentDeclaration<FileComponent, "file-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
21
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class HiddenComponent implements OnInit {
|
|
@@ -14,6 +14,7 @@ export declare class HiddenComponent implements OnInit {
|
|
|
14
14
|
dataIndex: number[];
|
|
15
15
|
constructor(jsf: JsonSchemaFormService);
|
|
16
16
|
ngOnInit(): void;
|
|
17
|
+
ngOnDestroy(): void;
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<HiddenComponent, never>;
|
|
18
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<HiddenComponent, "hidden-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
19
20
|
}
|
|
@@ -18,6 +18,7 @@ export declare class InputComponent implements OnInit {
|
|
|
18
18
|
get inputAttributes(): any;
|
|
19
19
|
ngOnInit(): void;
|
|
20
20
|
updateValue(event: any): void;
|
|
21
|
+
ngOnDestroy(): void;
|
|
21
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
22
23
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "input-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
23
24
|
}
|
|
@@ -21,6 +21,7 @@ export declare class NumberComponent implements OnInit {
|
|
|
21
21
|
get inputAttributes(): any;
|
|
22
22
|
ngOnInit(): void;
|
|
23
23
|
updateValue(event: any): void;
|
|
24
|
+
ngOnDestroy(): void;
|
|
24
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberComponent, never>;
|
|
25
26
|
static ɵcmp: i0.ɵɵComponentDeclaration<NumberComponent, "number-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
26
27
|
}
|
|
@@ -15,7 +15,9 @@ export declare class OneOfComponent implements OnInit {
|
|
|
15
15
|
dataIndex: number[];
|
|
16
16
|
constructor(jsf: JsonSchemaFormService);
|
|
17
17
|
ngOnInit(): void;
|
|
18
|
+
findSelectedTab(): number;
|
|
18
19
|
updateValue(event: any): void;
|
|
20
|
+
ngOnDestroy(): void;
|
|
19
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<OneOfComponent, never>;
|
|
20
22
|
static ɵcmp: i0.ɵɵComponentDeclaration<OneOfComponent, "one-of-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
21
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class RadiosComponent implements OnInit {
|
|
@@ -18,6 +18,7 @@ export declare class RadiosComponent implements OnInit {
|
|
|
18
18
|
constructor(jsf: JsonSchemaFormService);
|
|
19
19
|
ngOnInit(): void;
|
|
20
20
|
updateValue(event: any): void;
|
|
21
|
+
ngOnDestroy(): void;
|
|
21
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<RadiosComponent, never>;
|
|
22
23
|
static ɵcmp: i0.ɵɵComponentDeclaration<RadiosComponent, "radios-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
23
24
|
}
|
|
@@ -15,6 +15,7 @@ export declare class RootComponent implements OnInit, OnDestroy {
|
|
|
15
15
|
private sortableOptionsSubscription;
|
|
16
16
|
sortableInit(sortable: any): void;
|
|
17
17
|
isDraggable(node: any): boolean;
|
|
18
|
+
isFixed(node: any): boolean;
|
|
18
19
|
getFlexAttribute(node: any, attribute: string): any;
|
|
19
20
|
showWidget(layoutNode: any): boolean;
|
|
20
21
|
ngOnInit(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
|
-
import { isArray } from '../shared';
|
|
3
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
4
3
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
4
|
+
import { isArray } from '../shared';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class SelectComponent implements OnInit {
|
|
7
7
|
private jsf;
|
|
@@ -12,13 +12,16 @@ export declare class SelectComponent implements OnInit {
|
|
|
12
12
|
boundControl: boolean;
|
|
13
13
|
options: any;
|
|
14
14
|
selectList: any[];
|
|
15
|
+
selectListFlatGroup: any[];
|
|
15
16
|
isArray: typeof isArray;
|
|
16
17
|
layoutNode: any;
|
|
17
18
|
layoutIndex: number[];
|
|
18
19
|
dataIndex: number[];
|
|
19
20
|
constructor(jsf: JsonSchemaFormService);
|
|
20
21
|
ngOnInit(): void;
|
|
22
|
+
deselectAll(): void;
|
|
21
23
|
updateValue(event: any): void;
|
|
24
|
+
ngOnDestroy(): void;
|
|
22
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
23
26
|
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "select-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
24
27
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TextareaComponent implements OnInit {
|
|
@@ -16,6 +16,7 @@ export declare class TextareaComponent implements OnInit {
|
|
|
16
16
|
constructor(jsf: JsonSchemaFormService);
|
|
17
17
|
ngOnInit(): void;
|
|
18
18
|
updateValue(event: any): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent, never>;
|
|
20
21
|
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "textarea-widget", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
21
22
|
}
|
package/package.json
CHANGED