@ng-formworks/core 17.2.7 → 18.0.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/LICENSE +21 -0
- package/README.md +834 -0
- package/esm2022/lib/framework-library/framework-library.service.mjs +175 -0
- package/esm2022/lib/framework-library/framework.mjs +15 -0
- package/esm2022/lib/framework-library/no-framework.component.mjs +18 -0
- package/esm2022/lib/framework-library/no-framework.module.mjs +27 -0
- package/esm2022/lib/framework-library/no.framework.mjs +19 -0
- package/esm2022/lib/json-schema-form.component.mjs +765 -0
- package/esm2022/lib/json-schema-form.module.mjs +26 -0
- package/esm2022/lib/json-schema-form.service.mjs +676 -0
- package/esm2022/lib/locale/de-validation-messages.mjs +60 -0
- package/esm2022/lib/locale/en-validation-messages.mjs +60 -0
- package/esm2022/lib/locale/es-validation-messages.mjs +57 -0
- package/esm2022/lib/locale/fr-validation-messages.mjs +60 -0
- package/esm2022/lib/locale/index.mjs +8 -0
- package/esm2022/lib/locale/it-validation-messages.mjs +60 -0
- package/esm2022/lib/locale/pt-validation-messages.mjs +60 -0
- package/esm2022/lib/locale/zh-validation-messages.mjs +60 -0
- package/esm2022/lib/shared/convert-schema-to-draft6.function.mjs +300 -0
- package/esm2022/lib/shared/form-group.functions.mjs +442 -0
- package/esm2022/lib/shared/format-regex.constants.mjs +54 -0
- package/esm2022/lib/shared/index.mjs +12 -0
- package/esm2022/lib/shared/json-schema.functions.mjs +784 -0
- package/esm2022/lib/shared/json.validators.mjs +884 -0
- package/esm2022/lib/shared/jsonpointer.functions.mjs +1026 -0
- package/esm2022/lib/shared/layout.functions.mjs +1158 -0
- package/esm2022/lib/shared/merge-schemas.function.mjs +345 -0
- package/esm2022/lib/shared/utility.functions.mjs +380 -0
- package/esm2022/lib/shared/validator.functions.mjs +584 -0
- package/esm2022/lib/widget-library/add-reference.component.mjs +61 -0
- package/esm2022/lib/widget-library/button.component.mjs +72 -0
- package/esm2022/lib/widget-library/checkbox.component.mjs +105 -0
- package/esm2022/lib/widget-library/checkboxes.component.mjs +147 -0
- package/esm2022/lib/widget-library/file.component.mjs +35 -0
- package/esm2022/lib/widget-library/hidden.component.mjs +54 -0
- package/esm2022/lib/widget-library/index.mjs +55 -0
- package/esm2022/lib/widget-library/input.component.mjs +119 -0
- package/esm2022/lib/widget-library/message.component.mjs +38 -0
- package/esm2022/lib/widget-library/none.component.mjs +21 -0
- package/esm2022/lib/widget-library/number.component.mjs +123 -0
- package/esm2022/lib/widget-library/one-of.component.mjs +35 -0
- package/esm2022/lib/widget-library/orderable.directive.mjs +123 -0
- package/esm2022/lib/widget-library/radios.component.mjs +153 -0
- package/esm2022/lib/widget-library/root.component.mjs +79 -0
- package/esm2022/lib/widget-library/section.component.mjs +199 -0
- package/esm2022/lib/widget-library/select-framework.component.mjs +51 -0
- package/esm2022/lib/widget-library/select-widget.component.mjs +46 -0
- package/esm2022/lib/widget-library/select.component.mjs +150 -0
- package/esm2022/lib/widget-library/submit.component.mjs +82 -0
- package/esm2022/lib/widget-library/tab.component.mjs +41 -0
- package/esm2022/lib/widget-library/tabs.component.mjs +108 -0
- package/esm2022/lib/widget-library/template.component.mjs +46 -0
- package/esm2022/lib/widget-library/textarea.component.mjs +104 -0
- package/esm2022/lib/widget-library/widget-library.module.mjs +42 -0
- package/esm2022/lib/widget-library/widget-library.service.mjs +226 -0
- package/esm2022/ng-formworks-core.mjs +5 -0
- package/esm2022/public_api.mjs +13 -0
- package/fesm2022/ng-formworks-core.mjs +10151 -0
- package/fesm2022/ng-formworks-core.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/framework-library/framework-library.service.d.ts +55 -0
- package/lib/framework-library/framework.d.ts +13 -0
- package/lib/framework-library/no-framework.component.d.ts +8 -0
- package/lib/framework-library/no-framework.module.d.ts +9 -0
- package/lib/framework-library/no.framework.d.ts +10 -0
- package/lib/json-schema-form.component.d.ts +218 -0
- package/lib/json-schema-form.module.d.ts +11 -0
- package/lib/json-schema-form.service.d.ts +115 -0
- package/lib/locale/de-validation-messages.d.ts +1 -0
- package/lib/locale/en-validation-messages.d.ts +1 -0
- package/lib/locale/es-validation-messages.d.ts +1 -0
- package/lib/locale/fr-validation-messages.d.ts +1 -0
- package/{src/lib/locale/index.ts → lib/locale/index.d.ts} +7 -7
- package/lib/locale/it-validation-messages.d.ts +1 -0
- package/lib/locale/pt-validation-messages.d.ts +1 -0
- package/lib/locale/zh-validation-messages.d.ts +1 -0
- package/lib/shared/convert-schema-to-draft6.function.d.ts +21 -0
- package/lib/shared/form-group.functions.d.ts +100 -0
- package/lib/shared/format-regex.constants.d.ts +19 -0
- package/lib/shared/index.d.ts +9 -0
- package/lib/shared/json-schema.functions.d.ts +193 -0
- package/lib/shared/json.validators.d.ts +441 -0
- package/lib/shared/jsonpointer.functions.d.ts +416 -0
- package/lib/shared/layout.functions.d.ts +83 -0
- package/lib/shared/merge-schemas.function.d.ts +19 -0
- package/lib/shared/utility.functions.d.ts +165 -0
- package/{src/lib/shared/validator.functions.ts → lib/shared/validator.functions.d.ts} +364 -601
- package/lib/widget-library/add-reference.component.d.ts +20 -0
- package/lib/widget-library/button.component.d.ts +21 -0
- package/lib/widget-library/checkbox.component.d.ts +24 -0
- package/lib/widget-library/checkboxes.component.d.ts +24 -0
- package/lib/widget-library/file.component.d.ts +21 -0
- package/lib/widget-library/hidden.component.d.ts +19 -0
- package/{src/lib/widget-library/index.ts → lib/widget-library/index.d.ts} +47 -56
- package/lib/widget-library/input.component.d.ts +22 -0
- package/lib/widget-library/message.component.d.ts +15 -0
- package/lib/widget-library/none.component.d.ts +8 -0
- package/lib/widget-library/number.component.d.ts +25 -0
- package/lib/widget-library/one-of.component.d.ts +21 -0
- package/lib/widget-library/orderable.directive.d.ts +41 -0
- package/lib/widget-library/radios.component.d.ts +23 -0
- package/lib/widget-library/root.component.d.ts +17 -0
- package/lib/widget-library/section.component.d.ts +19 -0
- package/lib/widget-library/select-framework.component.d.ts +18 -0
- package/lib/widget-library/select-widget.component.d.ts +18 -0
- package/lib/widget-library/select.component.d.ts +24 -0
- package/lib/widget-library/submit.component.d.ts +24 -0
- package/lib/widget-library/tab.component.d.ts +14 -0
- package/lib/widget-library/tabs.component.d.ts +20 -0
- package/lib/widget-library/template.component.d.ts +18 -0
- package/lib/widget-library/textarea.component.d.ts +21 -0
- package/lib/widget-library/widget-library.module.d.ts +31 -0
- package/lib/widget-library/widget-library.service.d.ts +22 -0
- package/package.json +66 -53
- package/{src/public_api.ts → public_api.d.ts} +9 -21
- package/karma.conf.js +0 -46
- package/ng-package.json +0 -11
- package/src/lib/framework-library/framework-library.service.ts +0 -195
- package/src/lib/framework-library/framework.ts +0 -11
- package/src/lib/framework-library/no-framework.component.html +0 -2
- package/src/lib/framework-library/no-framework.component.ts +0 -11
- package/src/lib/framework-library/no-framework.module.ts +0 -18
- package/src/lib/framework-library/no.framework.ts +0 -11
- package/src/lib/json-schema-form.component.html +0 -7
- package/src/lib/json-schema-form.component.ts +0 -809
- package/src/lib/json-schema-form.module.ts +0 -17
- package/src/lib/json-schema-form.service.ts +0 -907
- package/src/lib/locale/de-validation-messages.ts +0 -58
- package/src/lib/locale/en-validation-messages.ts +0 -58
- package/src/lib/locale/es-validation-messages.ts +0 -55
- package/src/lib/locale/fr-validation-messages.ts +0 -58
- package/src/lib/locale/it-validation-messages.ts +0 -58
- package/src/lib/locale/pt-validation-messages.ts +0 -58
- package/src/lib/locale/zh-validation-messages.ts +0 -58
- package/src/lib/locale-dates/en-US.ts +0 -5
- package/src/lib/shared/convert-schema-to-draft6.function.ts +0 -321
- package/src/lib/shared/form-group.functions.ts +0 -522
- package/src/lib/shared/format-regex.constants.ts +0 -73
- package/src/lib/shared/index.ts +0 -40
- package/src/lib/shared/json-schema.functions.ts +0 -788
- package/src/lib/shared/json.validators.ts +0 -878
- package/src/lib/shared/jsonpointer.functions.ts +0 -1012
- package/src/lib/shared/jspointer.functions.json.spec.ts +0 -103
- package/src/lib/shared/layout.functions.ts +0 -1233
- package/src/lib/shared/merge-schemas.function.ts +0 -329
- package/src/lib/shared/utility.functions.ts +0 -373
- package/src/lib/shared/validator.functions.spec.ts +0 -55
- package/src/lib/widget-library/add-reference.component.ts +0 -59
- package/src/lib/widget-library/button.component.ts +0 -54
- package/src/lib/widget-library/checkbox.component.ts +0 -74
- package/src/lib/widget-library/checkboxes.component.ts +0 -104
- package/src/lib/widget-library/file.component.ts +0 -36
- package/src/lib/widget-library/hidden.component.ts +0 -39
- package/src/lib/widget-library/input.component.ts +0 -76
- package/src/lib/widget-library/message.component.ts +0 -29
- package/src/lib/widget-library/none.component.ts +0 -12
- package/src/lib/widget-library/number.component.ts +0 -79
- package/src/lib/widget-library/one-of.component.ts +0 -36
- package/src/lib/widget-library/orderable.directive.ts +0 -130
- package/src/lib/widget-library/radios.component.ts +0 -101
- package/src/lib/widget-library/root.component.ts +0 -78
- package/src/lib/widget-library/section.component.ts +0 -133
- package/src/lib/widget-library/select-framework.component.ts +0 -50
- package/src/lib/widget-library/select-widget.component.ts +0 -46
- package/src/lib/widget-library/select.component.ts +0 -96
- package/src/lib/widget-library/submit.component.ts +0 -68
- package/src/lib/widget-library/tab.component.ts +0 -29
- package/src/lib/widget-library/tabs.component.ts +0 -83
- package/src/lib/widget-library/template.component.ts +0 -52
- package/src/lib/widget-library/textarea.component.ts +0 -68
- package/src/lib/widget-library/widget-library.module.ts +0 -13
- package/src/lib/widget-library/widget-library.service.ts +0 -234
- package/src/test.ts +0 -18
- package/tsconfig.lib.json +0 -25
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -17
- package/tslint.json +0 -11
package/index.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { WidgetLibraryService } from '../widget-library/widget-library.service';
|
|
4
|
+
import { Framework } from './framework';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class FrameworkLibraryService {
|
|
7
|
+
private frameworks;
|
|
8
|
+
private widgetLibrary;
|
|
9
|
+
private http;
|
|
10
|
+
activeFramework: Framework;
|
|
11
|
+
stylesheets: (HTMLStyleElement | HTMLLinkElement)[];
|
|
12
|
+
scripts: HTMLScriptElement[];
|
|
13
|
+
loadExternalAssets: boolean;
|
|
14
|
+
defaultFramework: string;
|
|
15
|
+
frameworkLibrary: {
|
|
16
|
+
[name: string]: Framework;
|
|
17
|
+
};
|
|
18
|
+
activeFrameworkName$: Observable<string>;
|
|
19
|
+
private activeFrameworkNameSubject;
|
|
20
|
+
private activeFrameworkName;
|
|
21
|
+
constructor(frameworks: any[], widgetLibrary: WidgetLibraryService, http: HttpClient);
|
|
22
|
+
setLoadExternalAssets(loadExternalAssets?: boolean): void;
|
|
23
|
+
setFramework(framework?: string | Framework, loadExternalAssets?: boolean): boolean;
|
|
24
|
+
registerFrameworkWidgets(framework: Framework): boolean;
|
|
25
|
+
hasFramework(type: string): boolean;
|
|
26
|
+
getFramework(): any;
|
|
27
|
+
getFrameworkList(): {
|
|
28
|
+
name: string;
|
|
29
|
+
text: string;
|
|
30
|
+
}[];
|
|
31
|
+
getFrameworkWidgets(): any;
|
|
32
|
+
getFrameworkStylesheets(load?: boolean): string[];
|
|
33
|
+
getFrameworkScripts(load?: boolean): string[];
|
|
34
|
+
getFrameworkConfig(existingFramework?: any): any;
|
|
35
|
+
getFrameworkAssetConfig(existingFramework?: any, useAssetRelPath?: boolean): Promise<{
|
|
36
|
+
stylesheets: string[];
|
|
37
|
+
scripts: string[];
|
|
38
|
+
}>;
|
|
39
|
+
getFrameworkThemes(): {
|
|
40
|
+
name: string;
|
|
41
|
+
text: string;
|
|
42
|
+
}[];
|
|
43
|
+
requestThemeChange(name: string, validateThemeExists?: boolean, existingFramework?: any): boolean;
|
|
44
|
+
getActiveTheme(existingFramework?: any): {
|
|
45
|
+
name: string;
|
|
46
|
+
text: string;
|
|
47
|
+
};
|
|
48
|
+
registerTheme(newTheme: {
|
|
49
|
+
name: string;
|
|
50
|
+
text: string;
|
|
51
|
+
}, existingFramework?: any): boolean;
|
|
52
|
+
unregisterTheme(name: string, existingFramework?: any): boolean;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FrameworkLibraryService, never>;
|
|
54
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FrameworkLibraryService>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class Framework {
|
|
3
|
+
name: string;
|
|
4
|
+
text: string;
|
|
5
|
+
framework: any;
|
|
6
|
+
widgets?: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
stylesheets?: string[];
|
|
10
|
+
scripts?: string[];
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Framework, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Framework>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class NoFrameworkComponent {
|
|
3
|
+
layoutNode: any;
|
|
4
|
+
layoutIndex: number[];
|
|
5
|
+
dataIndex: number[];
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NoFrameworkComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NoFrameworkComponent, "no-framework", never, { "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./no-framework.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../widget-library/widget-library.module";
|
|
5
|
+
export declare class NoFrameworkModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NoFrameworkModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NoFrameworkModule, [typeof i1.NoFrameworkComponent], [typeof i2.CommonModule, typeof i3.WidgetLibraryModule], [typeof i1.NoFrameworkComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NoFrameworkModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Framework } from './framework';
|
|
2
|
+
import { NoFrameworkComponent } from './no-framework.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NoFramework extends Framework {
|
|
5
|
+
name: string;
|
|
6
|
+
text: string;
|
|
7
|
+
framework: typeof NoFrameworkComponent;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NoFramework, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NoFramework>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import { FrameworkLibraryService } from './framework-library/framework-library.service';
|
|
5
|
+
import { JsonSchemaFormService } from './json-schema-form.service';
|
|
6
|
+
import { WidgetLibraryService } from './widget-library/widget-library.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare const JSON_SCHEMA_FORM_VALUE_ACCESSOR: any;
|
|
9
|
+
/**
|
|
10
|
+
* @module 'JsonSchemaFormComponent' - Angular JSON Schema Form
|
|
11
|
+
*
|
|
12
|
+
* Root module of the Angular JSON Schema Form client-side library,
|
|
13
|
+
* an Angular library which generates an HTML form from a JSON schema
|
|
14
|
+
* structured data model and/or a JSON Schema Form layout description.
|
|
15
|
+
*
|
|
16
|
+
* This library also validates input data by the user, using both validators on
|
|
17
|
+
* individual controls to provide real-time feedback while the user is filling
|
|
18
|
+
* out the form, and then validating the entire input against the schema when
|
|
19
|
+
* the form is submitted to make sure the returned JSON data object is valid.
|
|
20
|
+
*
|
|
21
|
+
* This library is similar to, and mostly API compatible with:
|
|
22
|
+
*
|
|
23
|
+
* - JSON Schema Form's Angular Schema Form library for AngularJs
|
|
24
|
+
* http://schemaform.io
|
|
25
|
+
* http://schemaform.io/examples/bootstrap-example.html (examples)
|
|
26
|
+
*
|
|
27
|
+
* - Mozilla's react-jsonschema-form library for React
|
|
28
|
+
* https://github.com/mozilla-services/react-jsonschema-form
|
|
29
|
+
* https://mozilla-services.github.io/react-jsonschema-form (examples)
|
|
30
|
+
*
|
|
31
|
+
* - Joshfire's JSON Form library for jQuery
|
|
32
|
+
* https://github.com/joshfire/jsonform
|
|
33
|
+
* http://ulion.github.io/jsonform/playground (examples)
|
|
34
|
+
*
|
|
35
|
+
* This library depends on:
|
|
36
|
+
* - Angular (obviously) https://angular.io
|
|
37
|
+
* - lodash, JavaScript utility library https://github.com/lodash/lodash
|
|
38
|
+
* - ajv, Another JSON Schema validator https://github.com/epoberezkin/ajv
|
|
39
|
+
*
|
|
40
|
+
* In addition, the Example Playground also depends on:
|
|
41
|
+
* - brace, Browserified Ace editor http://thlorenz.github.io/brace
|
|
42
|
+
*/
|
|
43
|
+
export declare class JsonSchemaFormComponent implements ControlValueAccessor, OnChanges, OnInit, OnDestroy {
|
|
44
|
+
private changeDetector;
|
|
45
|
+
private frameworkLibrary;
|
|
46
|
+
private widgetLibrary;
|
|
47
|
+
jsf: JsonSchemaFormService;
|
|
48
|
+
private unsubscribeOnActivateForm$;
|
|
49
|
+
debugOutput: any;
|
|
50
|
+
formValueSubscription: any;
|
|
51
|
+
formInitialized: boolean;
|
|
52
|
+
objectWrap: boolean;
|
|
53
|
+
formValuesInput: string;
|
|
54
|
+
previousInputs: {
|
|
55
|
+
schema: any;
|
|
56
|
+
layout: any[];
|
|
57
|
+
data: any;
|
|
58
|
+
options: any;
|
|
59
|
+
framework: any | string;
|
|
60
|
+
widgets: any;
|
|
61
|
+
form: any;
|
|
62
|
+
model: any;
|
|
63
|
+
JSONSchema: any;
|
|
64
|
+
UISchema: any;
|
|
65
|
+
formData: any;
|
|
66
|
+
loadExternalAssets: boolean;
|
|
67
|
+
debug: boolean;
|
|
68
|
+
};
|
|
69
|
+
schema: any;
|
|
70
|
+
layout: any[];
|
|
71
|
+
data: any;
|
|
72
|
+
options: any;
|
|
73
|
+
framework: any | string;
|
|
74
|
+
widgets: any;
|
|
75
|
+
form: any;
|
|
76
|
+
model: any;
|
|
77
|
+
JSONSchema: any;
|
|
78
|
+
UISchema: any;
|
|
79
|
+
formData: any;
|
|
80
|
+
ngModel: any;
|
|
81
|
+
language: string;
|
|
82
|
+
loadExternalAssets: boolean;
|
|
83
|
+
debug: boolean;
|
|
84
|
+
theme: string;
|
|
85
|
+
get value(): any;
|
|
86
|
+
set value(value: any);
|
|
87
|
+
onChanges: EventEmitter<any>;
|
|
88
|
+
onSubmit: EventEmitter<any>;
|
|
89
|
+
isValid: EventEmitter<boolean>;
|
|
90
|
+
validationErrors: EventEmitter<any>;
|
|
91
|
+
formSchema: EventEmitter<any>;
|
|
92
|
+
formLayout: EventEmitter<any>;
|
|
93
|
+
dataChange: EventEmitter<any>;
|
|
94
|
+
modelChange: EventEmitter<any>;
|
|
95
|
+
formDataChange: EventEmitter<any>;
|
|
96
|
+
ngModelChange: EventEmitter<any>;
|
|
97
|
+
onChange: Function;
|
|
98
|
+
onTouched: Function;
|
|
99
|
+
dataChangesSubs: Subscription;
|
|
100
|
+
statusChangesSubs: Subscription;
|
|
101
|
+
isValidChangesSubs: Subscription;
|
|
102
|
+
validationErrorChangesSubs: Subscription;
|
|
103
|
+
constructor(changeDetector: ChangeDetectorRef, frameworkLibrary: FrameworkLibraryService, widgetLibrary: WidgetLibraryService, jsf: JsonSchemaFormService);
|
|
104
|
+
ngOnDestroy(): void;
|
|
105
|
+
private resetScriptsAndStyleSheets;
|
|
106
|
+
private loadScripts;
|
|
107
|
+
private loadStyleSheets;
|
|
108
|
+
private loadAssets;
|
|
109
|
+
ngOnInit(): void;
|
|
110
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
111
|
+
writeValue(value: any): void;
|
|
112
|
+
registerOnChange(fn: Function): void;
|
|
113
|
+
registerOnTouched(fn: Function): void;
|
|
114
|
+
setDisabledState(isDisabled: boolean): void;
|
|
115
|
+
updateForm(): void;
|
|
116
|
+
setFormValues(formValues: any, resetFirst?: boolean): void;
|
|
117
|
+
submitForm(): void;
|
|
118
|
+
/**
|
|
119
|
+
* 'initializeForm' function
|
|
120
|
+
*
|
|
121
|
+
* - Update 'schema', 'layout', and 'formValues', from inputs.
|
|
122
|
+
*
|
|
123
|
+
* - Create 'schemaRefLibrary' and 'schemaRecursiveRefMap'
|
|
124
|
+
* to resolve schema $ref links, including recursive $ref links.
|
|
125
|
+
*
|
|
126
|
+
* - Create 'dataRecursiveRefMap' to resolve recursive links in data
|
|
127
|
+
* and corectly set output formats for recursively nested values.
|
|
128
|
+
*
|
|
129
|
+
* - Create 'layoutRefLibrary' and 'templateRefLibrary' to store
|
|
130
|
+
* new layout nodes and formGroup elements to use when dynamically
|
|
131
|
+
* adding form components to arrays and recursive $ref points.
|
|
132
|
+
*
|
|
133
|
+
* - Create 'dataMap' to map the data to the schema and template.
|
|
134
|
+
*
|
|
135
|
+
* - Create the master 'formGroupTemplate' then from it 'formGroup'
|
|
136
|
+
* the Angular formGroup used to control the reactive form.
|
|
137
|
+
*/
|
|
138
|
+
initializeForm(initialData?: any): void;
|
|
139
|
+
/**
|
|
140
|
+
* 'initializeOptions' function
|
|
141
|
+
*
|
|
142
|
+
* Initialize 'options' (global form options) and set framework
|
|
143
|
+
* Combine available inputs:
|
|
144
|
+
* 1. options - recommended
|
|
145
|
+
* 2. form.options - Single input style
|
|
146
|
+
*/
|
|
147
|
+
private initializeOptions;
|
|
148
|
+
/**
|
|
149
|
+
* 'initializeSchema' function
|
|
150
|
+
*
|
|
151
|
+
* Initialize 'schema'
|
|
152
|
+
* Use first available input:
|
|
153
|
+
* 1. schema - recommended / Angular Schema Form style
|
|
154
|
+
* 2. form.schema - Single input / JSON Form style
|
|
155
|
+
* 3. JSONSchema - React JSON Schema Form style
|
|
156
|
+
* 4. form.JSONSchema - For testing single input React JSON Schema Forms
|
|
157
|
+
* 5. form - For testing single schema-only inputs
|
|
158
|
+
*
|
|
159
|
+
* ... if no schema input found, the 'activateForm' function, below,
|
|
160
|
+
* will make two additional attempts to build a schema
|
|
161
|
+
* 6. If layout input - build schema from layout
|
|
162
|
+
* 7. If data input - build schema from data
|
|
163
|
+
*/
|
|
164
|
+
private initializeSchema;
|
|
165
|
+
/**
|
|
166
|
+
* 'initializeData' function
|
|
167
|
+
*
|
|
168
|
+
* Initialize 'formValues'
|
|
169
|
+
* defulat or previously submitted values used to populate form
|
|
170
|
+
* Use first available input:
|
|
171
|
+
* 1. data - recommended
|
|
172
|
+
* 2. model - Angular Schema Form style
|
|
173
|
+
* 3. form.value - JSON Form style
|
|
174
|
+
* 4. form.data - Single input style
|
|
175
|
+
* 5. formData - React JSON Schema Form style
|
|
176
|
+
* 6. form.formData - For easier testing of React JSON Schema Forms
|
|
177
|
+
* 7. (none) no data - initialize data from schema and layout defaults only
|
|
178
|
+
*/
|
|
179
|
+
private initializeData;
|
|
180
|
+
/**
|
|
181
|
+
* 'initializeLayout' function
|
|
182
|
+
*
|
|
183
|
+
* Initialize 'layout'
|
|
184
|
+
* Use first available array input:
|
|
185
|
+
* 1. layout - recommended
|
|
186
|
+
* 2. form - Angular Schema Form style
|
|
187
|
+
* 3. form.form - JSON Form style
|
|
188
|
+
* 4. form.layout - Single input style
|
|
189
|
+
* 5. (none) no layout - set default layout instead
|
|
190
|
+
* (full layout will be built later from the schema)
|
|
191
|
+
*
|
|
192
|
+
* Also, if alternate layout formats are available,
|
|
193
|
+
* import from 'UISchema' or 'customFormItems'
|
|
194
|
+
* used for React JSON Schema Form and JSON Form API compatibility
|
|
195
|
+
* Use first available input:
|
|
196
|
+
* 1. UISchema - React JSON Schema Form style
|
|
197
|
+
* 2. form.UISchema - For testing single input React JSON Schema Forms
|
|
198
|
+
* 2. form.customFormItems - JSON Form style
|
|
199
|
+
* 3. (none) no input - don't import
|
|
200
|
+
*/
|
|
201
|
+
private initializeLayout;
|
|
202
|
+
/**
|
|
203
|
+
* 'activateForm' function
|
|
204
|
+
*
|
|
205
|
+
* ...continued from 'initializeSchema' function, above
|
|
206
|
+
* If 'schema' has not been initialized (i.e. no schema input found)
|
|
207
|
+
* 6. If layout input - build schema from layout input
|
|
208
|
+
* 7. If data input - build schema from data input
|
|
209
|
+
*
|
|
210
|
+
* Create final layout,
|
|
211
|
+
* build the FormGroup template and the Angular FormGroup,
|
|
212
|
+
* subscribe to changes,
|
|
213
|
+
* and activate the form.
|
|
214
|
+
*/
|
|
215
|
+
private activateForm;
|
|
216
|
+
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>;
|
|
218
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./json-schema-form.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "./widget-library/widget-library.module";
|
|
6
|
+
import * as i5 from "./framework-library/no-framework.module";
|
|
7
|
+
export declare class JsonSchemaFormModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JsonSchemaFormModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<JsonSchemaFormModule, [typeof i1.JsonSchemaFormComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.WidgetLibraryModule, typeof i5.NoFrameworkModule], [typeof i1.JsonSchemaFormComponent, typeof i4.WidgetLibraryModule]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<JsonSchemaFormModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { AbstractControl, UntypedFormArray, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { ErrorObject, Options } from 'ajv';
|
|
4
|
+
import { Subject, Subscription } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export interface TitleMapItem {
|
|
7
|
+
name?: string;
|
|
8
|
+
value?: any;
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
group?: string;
|
|
11
|
+
items?: TitleMapItem[];
|
|
12
|
+
}
|
|
13
|
+
export interface ErrorMessages {
|
|
14
|
+
[control_name: string]: {
|
|
15
|
+
message: string | Function | Object;
|
|
16
|
+
code: string;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
19
|
+
export declare class JsonSchemaFormService implements OnDestroy {
|
|
20
|
+
JsonFormCompatibility: boolean;
|
|
21
|
+
ReactJsonSchemaFormCompatibility: boolean;
|
|
22
|
+
AngularSchemaFormCompatibility: boolean;
|
|
23
|
+
tpldata: any;
|
|
24
|
+
ajvOptions: Options;
|
|
25
|
+
ajv: any;
|
|
26
|
+
validateFormData: any;
|
|
27
|
+
formValues: any;
|
|
28
|
+
data: any;
|
|
29
|
+
schema: any;
|
|
30
|
+
layout: any[];
|
|
31
|
+
formGroupTemplate: any;
|
|
32
|
+
formGroup: any;
|
|
33
|
+
framework: any;
|
|
34
|
+
formOptions: any;
|
|
35
|
+
validData: any;
|
|
36
|
+
isValid: boolean;
|
|
37
|
+
ajvErrors: ErrorObject[];
|
|
38
|
+
validationErrors: any;
|
|
39
|
+
dataErrors: any;
|
|
40
|
+
formValueSubscription: any;
|
|
41
|
+
dataChanges: Subject<any>;
|
|
42
|
+
isValidChanges: Subject<any>;
|
|
43
|
+
validationErrorChanges: Subject<any>;
|
|
44
|
+
arrayMap: Map<string, number>;
|
|
45
|
+
dataMap: Map<string, any>;
|
|
46
|
+
dataRecursiveRefMap: Map<string, string>;
|
|
47
|
+
schemaRecursiveRefMap: Map<string, string>;
|
|
48
|
+
schemaRefLibrary: any;
|
|
49
|
+
layoutRefLibrary: any;
|
|
50
|
+
templateRefLibrary: any;
|
|
51
|
+
hasRootReference: boolean;
|
|
52
|
+
language: string;
|
|
53
|
+
defaultFormOptions: any;
|
|
54
|
+
fcValueChangesSubs: Subscription;
|
|
55
|
+
fcStatusChangesSubs: Subscription;
|
|
56
|
+
constructor();
|
|
57
|
+
ngOnDestroy(): void;
|
|
58
|
+
setLanguage(language?: string): void;
|
|
59
|
+
getData(): any;
|
|
60
|
+
getSchema(): any;
|
|
61
|
+
getLayout(): any[];
|
|
62
|
+
resetAllValues(): void;
|
|
63
|
+
/**
|
|
64
|
+
* 'buildRemoteError' function
|
|
65
|
+
*
|
|
66
|
+
* Example errors:
|
|
67
|
+
* {
|
|
68
|
+
* last_name: [ {
|
|
69
|
+
* message: 'Last name must by start with capital letter.',
|
|
70
|
+
* code: 'capital_letter'
|
|
71
|
+
* } ],
|
|
72
|
+
* email: [ {
|
|
73
|
+
* message: 'Email must be from example.com domain.',
|
|
74
|
+
* code: 'special_domain'
|
|
75
|
+
* }, {
|
|
76
|
+
* message: 'Email must contain an @ symbol.',
|
|
77
|
+
* code: 'at_symbol'
|
|
78
|
+
* } ]
|
|
79
|
+
* }
|
|
80
|
+
* //{ErrorMessages} errors
|
|
81
|
+
*/
|
|
82
|
+
buildRemoteError(errors: ErrorMessages): void;
|
|
83
|
+
validateData(newValue: any, updateSubscriptions?: boolean): void;
|
|
84
|
+
buildFormGroupTemplate(formValues?: any, setValues?: boolean): void;
|
|
85
|
+
buildFormGroup(): void;
|
|
86
|
+
buildLayout(widgetLibrary: any): void;
|
|
87
|
+
setOptions(newOptions: any): void;
|
|
88
|
+
compileAjvSchema(): void;
|
|
89
|
+
buildSchemaFromData(data?: any, requireAllFields?: boolean): any;
|
|
90
|
+
buildSchemaFromLayout(layout?: any): any;
|
|
91
|
+
setTpldata(newTpldata?: any): void;
|
|
92
|
+
parseText(text?: string, value?: any, values?: any, key?: number | string): string;
|
|
93
|
+
parseExpression(expression?: string, value?: any, values?: any, key?: number | string, tpldata?: any): any;
|
|
94
|
+
setArrayItemTitle(parentCtx?: any, childNode?: any, index?: number): string;
|
|
95
|
+
setItemTitle(ctx: any): string;
|
|
96
|
+
evaluateCondition(layoutNode: any, dataIndex: number[]): boolean;
|
|
97
|
+
initializeControl(ctx: any, bind?: boolean): boolean;
|
|
98
|
+
formatErrors(errors: any, validationMessages?: any): string;
|
|
99
|
+
updateValue(ctx: any, value: any): void;
|
|
100
|
+
updateArrayCheckboxList(ctx: any, checkboxList: TitleMapItem[]): void;
|
|
101
|
+
getFormControl(ctx: any): AbstractControl;
|
|
102
|
+
getFormControlValue(ctx: any): AbstractControl;
|
|
103
|
+
getFormControlGroup(ctx: any): UntypedFormArray | UntypedFormGroup;
|
|
104
|
+
getFormControlName(ctx: any): string;
|
|
105
|
+
getLayoutArray(ctx: any): any[];
|
|
106
|
+
getParentNode(ctx: any): any;
|
|
107
|
+
getDataPointer(ctx: any): string;
|
|
108
|
+
getLayoutPointer(ctx: any): string;
|
|
109
|
+
isControlBound(ctx: any): boolean;
|
|
110
|
+
addItem(ctx: any, name?: string): boolean;
|
|
111
|
+
moveArrayItem(ctx: any, oldIndex: number, newIndex: number): boolean;
|
|
112
|
+
removeItem(ctx: any): boolean;
|
|
113
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JsonSchemaFormService, never>;
|
|
114
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<JsonSchemaFormService>;
|
|
115
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const deValidationMessages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const enValidationMessages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const esValidationMessages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const frValidationMessages: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { deValidationMessages } from './de-validation-messages';
|
|
2
|
-
export { enValidationMessages } from './en-validation-messages';
|
|
3
|
-
export { esValidationMessages } from './es-validation-messages';
|
|
4
|
-
export { frValidationMessages } from './fr-validation-messages';
|
|
5
|
-
export { itValidationMessages } from './it-validation-messages';
|
|
6
|
-
export { ptValidationMessages } from './pt-validation-messages';
|
|
7
|
-
export { zhValidationMessages } from './zh-validation-messages';
|
|
1
|
+
export { deValidationMessages } from './de-validation-messages';
|
|
2
|
+
export { enValidationMessages } from './en-validation-messages';
|
|
3
|
+
export { esValidationMessages } from './es-validation-messages';
|
|
4
|
+
export { frValidationMessages } from './fr-validation-messages';
|
|
5
|
+
export { itValidationMessages } from './it-validation-messages';
|
|
6
|
+
export { ptValidationMessages } from './pt-validation-messages';
|
|
7
|
+
export { zhValidationMessages } from './zh-validation-messages';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const itValidationMessages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ptValidationMessages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const zhValidationMessages: any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 'convertSchemaToDraft6' function
|
|
3
|
+
*
|
|
4
|
+
* Converts a JSON Schema from draft 1 through 4 format to draft 6 format
|
|
5
|
+
*
|
|
6
|
+
* Inspired by on geraintluff's JSON Schema 3 to 4 compatibility function:
|
|
7
|
+
* https://github.com/geraintluff/json-schema-compatibility
|
|
8
|
+
* Also uses suggestions from AJV's JSON Schema 4 to 6 migration guide:
|
|
9
|
+
* https://github.com/epoberezkin/ajv/releases/tag/5.0.0
|
|
10
|
+
* And additional details from the official JSON Schema documentation:
|
|
11
|
+
* http://json-schema.org
|
|
12
|
+
*
|
|
13
|
+
* // { object } originalSchema - JSON schema (draft 1, 2, 3, 4, or 6)
|
|
14
|
+
* // { OptionObject = {} } options - options: parent schema changed?, schema draft number?
|
|
15
|
+
* // { object } - JSON schema (draft 6)
|
|
16
|
+
*/
|
|
17
|
+
export interface OptionObject {
|
|
18
|
+
changed?: boolean;
|
|
19
|
+
draft?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function convertSchemaToDraft6(schema: any, options?: OptionObject): any;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import { Pointer } from './jsonpointer.functions';
|
|
3
|
+
/**
|
|
4
|
+
* FormGroup function library:
|
|
5
|
+
*
|
|
6
|
+
* buildFormGroupTemplate: Builds a FormGroupTemplate from schema
|
|
7
|
+
*
|
|
8
|
+
* buildFormGroup: Builds an Angular FormGroup from a FormGroupTemplate
|
|
9
|
+
*
|
|
10
|
+
* mergeValues:
|
|
11
|
+
*
|
|
12
|
+
* setRequiredFields:
|
|
13
|
+
*
|
|
14
|
+
* formatFormData:
|
|
15
|
+
*
|
|
16
|
+
* getControl:
|
|
17
|
+
*
|
|
18
|
+
* ---- TODO: ----
|
|
19
|
+
* TODO: add buildFormGroupTemplateFromLayout function
|
|
20
|
+
* buildFormGroupTemplateFromLayout: Builds a FormGroupTemplate from a form layout
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* 'buildFormGroupTemplate' function
|
|
24
|
+
*
|
|
25
|
+
* Builds a template for an Angular FormGroup from a JSON Schema.
|
|
26
|
+
*
|
|
27
|
+
* TODO: add support for pattern properties
|
|
28
|
+
* https://spacetelescope.github.io/understanding-json-schema/reference/object.html
|
|
29
|
+
*
|
|
30
|
+
* // {any} jsf -
|
|
31
|
+
* // {any = null} nodeValue -
|
|
32
|
+
* // {boolean = true} mapArrays -
|
|
33
|
+
* // {string = ''} schemaPointer -
|
|
34
|
+
* // {string = ''} dataPointer -
|
|
35
|
+
* // {any = ''} templatePointer -
|
|
36
|
+
* // {any} -
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildFormGroupTemplate(jsf: any, nodeValue?: any, setValues?: boolean, schemaPointer?: string, dataPointer?: string, templatePointer?: string): {
|
|
39
|
+
controlType: string;
|
|
40
|
+
controls: any;
|
|
41
|
+
validators: any;
|
|
42
|
+
value?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
controlType: string;
|
|
45
|
+
value: {
|
|
46
|
+
value: any;
|
|
47
|
+
disabled: any;
|
|
48
|
+
};
|
|
49
|
+
validators: any;
|
|
50
|
+
controls?: undefined;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* 'buildFormGroup' function
|
|
54
|
+
*
|
|
55
|
+
* // {any} template -
|
|
56
|
+
* // {AbstractControl}
|
|
57
|
+
*/
|
|
58
|
+
export declare function buildFormGroup(template: any): AbstractControl;
|
|
59
|
+
/**
|
|
60
|
+
* 'mergeValues' function
|
|
61
|
+
*
|
|
62
|
+
* // {any[]} ...valuesToMerge - Multiple values to merge
|
|
63
|
+
* // {any} - Merged values
|
|
64
|
+
*/
|
|
65
|
+
export declare function mergeValues(...valuesToMerge: any[]): any;
|
|
66
|
+
/**
|
|
67
|
+
* 'setRequiredFields' function
|
|
68
|
+
*
|
|
69
|
+
* // {schema} schema - JSON Schema
|
|
70
|
+
* // {object} formControlTemplate - Form Control Template object
|
|
71
|
+
* // {boolean} - true if any fields have been set to required, false if not
|
|
72
|
+
*/
|
|
73
|
+
export declare function setRequiredFields(schema: any, formControlTemplate: any): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* 'formatFormData' function
|
|
76
|
+
*
|
|
77
|
+
* // {any} formData - Angular FormGroup data object
|
|
78
|
+
* // {Map<string, any>} dataMap -
|
|
79
|
+
* // {Map<string, string>} recursiveRefMap -
|
|
80
|
+
* // {Map<string, number>} arrayMap -
|
|
81
|
+
* // {boolean = false} fixErrors - if TRUE, tries to fix data
|
|
82
|
+
* // {any} - formatted data object
|
|
83
|
+
*/
|
|
84
|
+
export declare function formatFormData(formData: any, dataMap: Map<string, any>, recursiveRefMap: Map<string, string>, arrayMap: Map<string, number>, returnEmptyFields?: boolean, fixErrors?: boolean): any;
|
|
85
|
+
/**
|
|
86
|
+
* 'getControl' function
|
|
87
|
+
*
|
|
88
|
+
* Uses a JSON Pointer for a data object to retrieve a control from
|
|
89
|
+
* an Angular formGroup or formGroup template. (Note: though a formGroup
|
|
90
|
+
* template is much simpler, its basic structure is idential to a formGroup).
|
|
91
|
+
*
|
|
92
|
+
* If the optional third parameter 'returnGroup' is set to TRUE, the group
|
|
93
|
+
* containing the control is returned, rather than the control itself.
|
|
94
|
+
*
|
|
95
|
+
* // {FormGroup} formGroup - Angular FormGroup to get value from
|
|
96
|
+
* // {Pointer} dataPointer - JSON Pointer (string or array)
|
|
97
|
+
* // {boolean = false} returnGroup - If true, return group containing control
|
|
98
|
+
* // {group} - Located value (or null, if no control found)
|
|
99
|
+
*/
|
|
100
|
+
export declare function getControl(formGroup: any, dataPointer: Pointer, returnGroup?: boolean): any;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const jsonSchemaFormatTests: {
|
|
2
|
+
date: RegExp;
|
|
3
|
+
time: RegExp;
|
|
4
|
+
'date-time': RegExp;
|
|
5
|
+
email: RegExp;
|
|
6
|
+
hostname: RegExp;
|
|
7
|
+
ipv4: RegExp;
|
|
8
|
+
ipv6: RegExp;
|
|
9
|
+
uri: RegExp;
|
|
10
|
+
'uri-reference': RegExp;
|
|
11
|
+
'uri-template': RegExp;
|
|
12
|
+
url: RegExp;
|
|
13
|
+
uuid: RegExp;
|
|
14
|
+
color: RegExp;
|
|
15
|
+
'json-pointer': RegExp;
|
|
16
|
+
'relative-json-pointer': RegExp;
|
|
17
|
+
regex: (str: any) => boolean;
|
|
18
|
+
};
|
|
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';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { _executeValidators, _executeAsyncValidators, _mergeObjects, _mergeErrors, isDefined, hasValue, isEmpty, isString, isNumber, isInteger, isBoolean, isFunction, isObject, isArray, isDate, isMap, isSet, isPromise, isObservable, getType, isType, isPrimitive, toJavaScriptType, toSchemaType, _toPromise, toObservable, inArray, xor, SchemaPrimitiveType, SchemaType, JavaScriptPrimitiveType, JavaScriptType, PrimitiveValue, PlainObject, IValidatorFn, AsyncIValidatorFn } from './validator.functions';
|
|
2
|
+
export { addClasses, copy, forEach, forEachCopy, hasOwn, mergeFilteredObject, uniqueItems, commonItems, fixTitle, toTitleCase } from './utility.functions';
|
|
3
|
+
export { Pointer, JsonPointer } from './jsonpointer.functions';
|
|
4
|
+
export { JsonValidators } from './json.validators';
|
|
5
|
+
export { buildSchemaFromLayout, buildSchemaFromData, getFromSchema, removeRecursiveReferences, getInputType, checkInlineType, isInputRequired, updateInputOptions, getTitleMapFromOneOf, getControlValidators, resolveSchemaReferences, getSubSchema, combineAllOf, fixRequiredArrayProperties } from './json-schema.functions';
|
|
6
|
+
export { convertSchemaToDraft6 } from './convert-schema-to-draft6.function';
|
|
7
|
+
export { mergeSchemas } from './merge-schemas.function';
|
|
8
|
+
export { buildFormGroupTemplate, buildFormGroup, formatFormData, getControl, setRequiredFields } from './form-group.functions';
|
|
9
|
+
export { buildLayout, buildLayoutFromSchema, mapLayout, getLayoutNode, buildTitleMap } from './layout.functions';
|