@apipass/schemas 0.2.5 → 0.2.7-alpha.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/bundles/apipass-schemas.umd.js +529 -274
- package/bundles/apipass-schemas.umd.js.map +1 -1
- package/bundles/apipass-schemas.umd.min.js +2 -2
- package/bundles/apipass-schemas.umd.min.js.map +1 -1
- package/esm2015/public-api.js +2 -2
- package/esm2015/schema-custom-attributes/schema-custom-attributes.js +56 -41
- package/esm2015/schema-fields.service.js +18 -10
- package/esm2015/schema-form/schema-array/array-session/array-session.js +39 -37
- package/esm2015/schema-form/schema-array/schema-array.js +70 -31
- package/esm2015/schema-form/schema-form.js +51 -9
- package/esm2015/schema-form/schema-input/field-render/field-render.js +21 -19
- package/esm2015/schema-form/schema-input/input-render/input-render.js +18 -11
- package/esm2015/schema-form/schema-input/schema-input.js +27 -14
- package/esm2015/schema-form/schema-object/schema-object.js +54 -14
- package/esm2015/schema-form-render.js +54 -14
- package/esm2015/schema-form-render.module.js +9 -11
- package/esm2015/schema-validation-field.js +1 -1
- package/esm2015/type-script-compile/type-script-compile.base.js +112 -0
- package/fesm2015/apipass-schemas.js +516 -267
- package/fesm2015/apipass-schemas.js.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/schema-custom-attributes/schema-custom-attributes.d.ts +7 -1
- package/schema-fields.service.d.ts +7 -4
- package/schema-form/schema-array/array-session/array-session.d.ts +4 -2
- package/schema-form/schema-array/schema-array.d.ts +15 -1
- package/schema-form/schema-form.d.ts +15 -1
- package/schema-form/schema-input/field-render/field-render.d.ts +2 -1
- package/schema-form/schema-input/input-render/input-render.d.ts +5 -1
- package/schema-form/schema-input/schema-input.d.ts +6 -1
- package/schema-form/schema-object/schema-object.d.ts +15 -1
- package/schema-form-render.d.ts +15 -1
- package/schema-form-render.module.d.ts +2 -3
- package/schema-validation-field.d.ts +7 -1
- package/type-script-compile/type-script-compile.base.d.ts +17 -0
- package/esm2015/type-script-compile.js +0 -77
- package/type-script-compile.d.ts +0 -10
|
@@ -3,6 +3,20 @@ import { BaseSchemaComponent } from '../../base-schema.component';
|
|
|
3
3
|
import { DndDropEvent } from 'ngx-drag-drop';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SchemaObjectComponent extends BaseSchemaComponent implements AfterContentInit {
|
|
6
|
+
requiredLabel: string;
|
|
7
|
+
addItemLabel: string;
|
|
8
|
+
addLoopLabel: string;
|
|
9
|
+
additionalAttributesLabel: string;
|
|
10
|
+
customAttributeRemoveLabel: string;
|
|
11
|
+
newCustomFieldNameLabel: string;
|
|
12
|
+
newCustomFieldValueLabel: string;
|
|
13
|
+
newCustomFieldAddLabel: string;
|
|
14
|
+
newCustomFieldSaveLabel: string;
|
|
15
|
+
newCustomFieldCancelLabel: string;
|
|
16
|
+
selectPlaceHolderLabel: string;
|
|
17
|
+
selectSearchPlaceHolderLabel: string;
|
|
18
|
+
selectClearLabel: string;
|
|
19
|
+
selectNotFoundLabel: string;
|
|
6
20
|
idPrefix: string | undefined;
|
|
7
21
|
modelPropertiesPath: string | undefined;
|
|
8
22
|
inputId: string | undefined;
|
|
@@ -16,5 +30,5 @@ export declare class SchemaObjectComponent extends BaseSchemaComponent implement
|
|
|
16
30
|
ngAfterContentInit(): void;
|
|
17
31
|
onDrop($event: DndDropEvent, modelElement: any): any;
|
|
18
32
|
static ɵfac: i0.ɵɵFactoryDef<SchemaObjectComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<SchemaObjectComponent, "schema-object", never, { "idPrefix": "idPrefix"; "modelPropertiesPath": "modelPropertiesPath"; "inputId": "inputId"; "editing": "editing"; "index": "index"; }, { "onDropEvent": "onDropEvent"; }, never, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDefWithMeta<SchemaObjectComponent, "schema-object", never, { "requiredLabel": "requiredLabel"; "addItemLabel": "addItemLabel"; "addLoopLabel": "addLoopLabel"; "additionalAttributesLabel": "additionalAttributesLabel"; "customAttributeRemoveLabel": "customAttributeRemoveLabel"; "newCustomFieldNameLabel": "newCustomFieldNameLabel"; "newCustomFieldValueLabel": "newCustomFieldValueLabel"; "newCustomFieldAddLabel": "newCustomFieldAddLabel"; "newCustomFieldSaveLabel": "newCustomFieldSaveLabel"; "newCustomFieldCancelLabel": "newCustomFieldCancelLabel"; "selectPlaceHolderLabel": "selectPlaceHolderLabel"; "selectSearchPlaceHolderLabel": "selectSearchPlaceHolderLabel"; "selectClearLabel": "selectClearLabel"; "selectNotFoundLabel": "selectNotFoundLabel"; "idPrefix": "idPrefix"; "modelPropertiesPath": "modelPropertiesPath"; "inputId": "inputId"; "editing": "editing"; "index": "index"; }, { "onDropEvent": "onDropEvent"; }, never, never>;
|
|
20
34
|
}
|
package/schema-form-render.d.ts
CHANGED
|
@@ -3,6 +3,20 @@ import { BaseSchemaComponent } from './base-schema.component';
|
|
|
3
3
|
import { DndDropEvent } from 'ngx-drag-drop';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SchemaFormRenderComponent extends BaseSchemaComponent implements AfterContentInit {
|
|
6
|
+
requiredLabel: string;
|
|
7
|
+
addItemLabel: string;
|
|
8
|
+
addLoopLabel: string;
|
|
9
|
+
additionalAttributesLabel: string;
|
|
10
|
+
customAttributeRemoveLabel: string;
|
|
11
|
+
newCustomFieldNameLabel: string;
|
|
12
|
+
newCustomFieldValueLabel: string;
|
|
13
|
+
newCustomFieldAddLabel: string;
|
|
14
|
+
newCustomFieldSaveLabel: string;
|
|
15
|
+
newCustomFieldCancelLabel: string;
|
|
16
|
+
selectPlaceHolderLabel: string;
|
|
17
|
+
selectSearchPlaceHolderLabel: string;
|
|
18
|
+
selectClearLabel: string;
|
|
19
|
+
selectNotFoundLabel: string;
|
|
6
20
|
idPrefix: string | undefined;
|
|
7
21
|
schemas: never[];
|
|
8
22
|
customProperties: boolean;
|
|
@@ -13,5 +27,5 @@ export declare class SchemaFormRenderComponent extends BaseSchemaComponent imple
|
|
|
13
27
|
onDrop($event: DndDropEvent, modelElement: any): any;
|
|
14
28
|
getId(index: number): string;
|
|
15
29
|
static ɵfac: i0.ɵɵFactoryDef<SchemaFormRenderComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<SchemaFormRenderComponent, "schema-form-render", never, { "idPrefix": "idPrefix"; "schemas": "schemas"; "customProperties": "customProperties"; "editing": "editing"; "inputType": "inputType"; }, {}, never, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDefWithMeta<SchemaFormRenderComponent, "schema-form-render", never, { "requiredLabel": "requiredLabel"; "addItemLabel": "addItemLabel"; "addLoopLabel": "addLoopLabel"; "additionalAttributesLabel": "additionalAttributesLabel"; "customAttributeRemoveLabel": "customAttributeRemoveLabel"; "newCustomFieldNameLabel": "newCustomFieldNameLabel"; "newCustomFieldValueLabel": "newCustomFieldValueLabel"; "newCustomFieldAddLabel": "newCustomFieldAddLabel"; "newCustomFieldSaveLabel": "newCustomFieldSaveLabel"; "newCustomFieldCancelLabel": "newCustomFieldCancelLabel"; "selectPlaceHolderLabel": "selectPlaceHolderLabel"; "selectSearchPlaceHolderLabel": "selectSearchPlaceHolderLabel"; "selectClearLabel": "selectClearLabel"; "selectNotFoundLabel": "selectNotFoundLabel"; "idPrefix": "idPrefix"; "schemas": "schemas"; "customProperties": "customProperties"; "editing": "editing"; "inputType": "inputType"; }, {}, never, never>;
|
|
17
31
|
}
|
|
@@ -14,9 +14,8 @@ import * as i12 from "@angular/common";
|
|
|
14
14
|
import * as i13 from "ngx-drag-drop";
|
|
15
15
|
import * as i14 from "@angular/forms";
|
|
16
16
|
import * as i15 from "@angular/material/tooltip";
|
|
17
|
-
import * as i16 from "@
|
|
18
|
-
import * as i17 from "@apipass/inputs";
|
|
17
|
+
import * as i16 from "@apipass/inputs";
|
|
19
18
|
export declare class SchemaFormRenderModule {
|
|
20
|
-
static ɵmod: i0.ɵɵNgModuleDefWithMeta<SchemaFormRenderModule, [typeof i1.ArraySessionComponent, typeof i2.SchemaArrayComponent, typeof i3.FieldRenderComponent, typeof i4.InputRenderComponent, typeof i5.BooleanInputComponent, typeof i6.NumberInputComponent, typeof i7.SchemaInputComponent, typeof i8.SchemaObjectComponent, typeof i9.SchemaFormRenderComponent, typeof i10.SchemaFormComponent, typeof i11.SchemaCustomAttributesComponent], [typeof i12.CommonModule, typeof i13.DndModule, typeof i14.FormsModule, typeof i15.MatTooltipModule, typeof i16.
|
|
19
|
+
static ɵmod: i0.ɵɵNgModuleDefWithMeta<SchemaFormRenderModule, [typeof i1.ArraySessionComponent, typeof i2.SchemaArrayComponent, typeof i3.FieldRenderComponent, typeof i4.InputRenderComponent, typeof i5.BooleanInputComponent, typeof i6.NumberInputComponent, typeof i7.SchemaInputComponent, typeof i8.SchemaObjectComponent, typeof i9.SchemaFormRenderComponent, typeof i10.SchemaFormComponent, typeof i11.SchemaCustomAttributesComponent], [typeof i12.CommonModule, typeof i13.DndModule, typeof i14.FormsModule, typeof i15.MatTooltipModule, typeof i16.InputsModule], [typeof i1.ArraySessionComponent, typeof i2.SchemaArrayComponent, typeof i3.FieldRenderComponent, typeof i4.InputRenderComponent, typeof i5.BooleanInputComponent, typeof i6.NumberInputComponent, typeof i7.SchemaInputComponent, typeof i8.SchemaObjectComponent, typeof i9.SchemaFormRenderComponent, typeof i10.SchemaFormComponent, typeof i11.SchemaCustomAttributesComponent]>;
|
|
21
20
|
static ɵinj: i0.ɵɵInjectorDef<SchemaFormRenderModule>;
|
|
22
21
|
}
|
|
@@ -6,11 +6,17 @@ export declare type StructFieldType = Array<{
|
|
|
6
6
|
minLength?: number;
|
|
7
7
|
maxLength?: number;
|
|
8
8
|
}>;
|
|
9
|
+
export declare type ErrorsLabel = Array<{
|
|
10
|
+
type: string;
|
|
11
|
+
fieldName?: string;
|
|
12
|
+
minLength?: number;
|
|
13
|
+
maxLength?: number;
|
|
14
|
+
}>;
|
|
9
15
|
export declare class SchemaValidationField {
|
|
10
16
|
emptyFields: StructFieldType;
|
|
11
17
|
invalidMinLengthFields: StructFieldType;
|
|
12
18
|
invalidMaxLengthFields: StructFieldType;
|
|
13
|
-
validationErrorsLabel:
|
|
19
|
+
validationErrorsLabel: ErrorsLabel | undefined;
|
|
14
20
|
constructor(emptyFields: StructFieldType, invalidMinLengthFields: StructFieldType, invalidMaxLengthFields: StructFieldType);
|
|
15
21
|
isValidSchemaFields(): boolean;
|
|
16
22
|
isInvalidSchemaFields(): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class TypeScriptCompileBase {
|
|
3
|
+
protected getTranslate(text: string): string;
|
|
4
|
+
protected addItemToFormProperties(formProperties: any, item: any, key: string): void;
|
|
5
|
+
compileProperties(input: any): {
|
|
6
|
+
compiledProperties: any;
|
|
7
|
+
formProperties: any;
|
|
8
|
+
inputData: any;
|
|
9
|
+
};
|
|
10
|
+
protected translateProperties(input: any): void;
|
|
11
|
+
protected proccessProperties(item: any, formProperties: {}, key: any): void;
|
|
12
|
+
protected hasProperties(item: any): any;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDef<TypeScriptCompileBase, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDef<TypeScriptCompileBase>;
|
|
15
|
+
}
|
|
16
|
+
export declare function APIPASS_TYPESCRIPT_COMPILE_BASE_PROVIDER_FACTORY(parentIntl: TypeScriptCompileBase): any;
|
|
17
|
+
export declare const APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER: any;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { FormControl, Validators } from '@angular/forms';
|
|
2
|
-
export class TypeScriptCompile {
|
|
3
|
-
static addItemToFormProperties(formProperties, item, key) {
|
|
4
|
-
if (item.minLength && item.minLength > 0) {
|
|
5
|
-
formProperties[key] = new FormControl([null, [Validators.required]]);
|
|
6
|
-
}
|
|
7
|
-
else {
|
|
8
|
-
formProperties[key] = new FormControl([null]);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
static compileProperties(input) {
|
|
12
|
-
const compiledProperties = [];
|
|
13
|
-
const formProperties = {};
|
|
14
|
-
let inputData = {};
|
|
15
|
-
const inputToCompile = JSON.parse(JSON.stringify(input));
|
|
16
|
-
if (inputToCompile.properties) {
|
|
17
|
-
if (inputToCompile.type === 'array') {
|
|
18
|
-
inputData = [];
|
|
19
|
-
}
|
|
20
|
-
if (inputToCompile.type === 'object') {
|
|
21
|
-
inputData = {};
|
|
22
|
-
}
|
|
23
|
-
inputToCompile.id = 'inputData';
|
|
24
|
-
this.proccessProperties(inputToCompile, formProperties, 'inputData');
|
|
25
|
-
compiledProperties.push(inputToCompile);
|
|
26
|
-
}
|
|
27
|
-
else if (inputToCompile.type === 'array') {
|
|
28
|
-
inputToCompile.id = 'inputData';
|
|
29
|
-
inputData = [];
|
|
30
|
-
TypeScriptCompile.addItemToFormProperties(formProperties, inputToCompile, 'inputData');
|
|
31
|
-
compiledProperties.push(inputToCompile);
|
|
32
|
-
}
|
|
33
|
-
else if (!inputToCompile.type) {
|
|
34
|
-
for (let index = 0; index < Object.keys(inputToCompile).length; index++) {
|
|
35
|
-
const key = Object.keys(inputToCompile)[index];
|
|
36
|
-
const item = inputToCompile[key];
|
|
37
|
-
item.id = key;
|
|
38
|
-
if (item.type === 'array') {
|
|
39
|
-
inputData[item.id] = [];
|
|
40
|
-
}
|
|
41
|
-
if (item.type === 'object') {
|
|
42
|
-
inputData[item.id] = {};
|
|
43
|
-
}
|
|
44
|
-
this.proccessProperties(item, formProperties, key);
|
|
45
|
-
compiledProperties.push(item);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
compiledProperties.sort((a, b) => a.propertyOrder - b.propertyOrder);
|
|
49
|
-
return { compiledProperties, formProperties, inputData };
|
|
50
|
-
}
|
|
51
|
-
static proccessProperties(item, formProperties, key) {
|
|
52
|
-
if (this.hasProperties(item)) {
|
|
53
|
-
const arFieldsChild = [];
|
|
54
|
-
for (let indexChild = 0; indexChild < Object.keys(item.properties).length; indexChild++) {
|
|
55
|
-
const keyChild = Object.keys(item.properties)[indexChild];
|
|
56
|
-
const itemChild = item.properties[keyChild];
|
|
57
|
-
itemChild.id = keyChild;
|
|
58
|
-
if (this.hasProperties(itemChild)) {
|
|
59
|
-
this.proccessProperties(itemChild, formProperties, keyChild);
|
|
60
|
-
arFieldsChild.push(itemChild);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
TypeScriptCompile.addItemToFormProperties(formProperties, itemChild, keyChild);
|
|
64
|
-
arFieldsChild.push(itemChild);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
item.properties = arFieldsChild;
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
TypeScriptCompile.addItemToFormProperties(formProperties, item, key);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
static hasProperties(item) {
|
|
74
|
-
return item.type === 'object' || (item.type === 'array' && item.properties);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZS1zY3JpcHQtY29tcGlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL3NjaGVtYXMvc3JjL3R5cGUtc2NyaXB0LWNvbXBpbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFdBQVcsRUFBRSxVQUFVLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUV2RCxNQUFNLE9BQU8saUJBQWlCO0lBRXBCLE1BQU0sQ0FBQyx1QkFBdUIsQ0FBQyxjQUFtQixFQUFFLElBQVMsRUFBRSxHQUFXO1FBQ2hGLElBQUksSUFBSSxDQUFDLFNBQVMsSUFBSSxJQUFJLENBQUMsU0FBUyxHQUFHLENBQUMsRUFBRTtZQUN4QyxjQ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cHJpdmF0ZSBzdGF0aWMgaGFzUHJvcGVydGllcyhpdGVtOiBhbnkpOiBhbnkge1xuICAgIHJldHVybiBpdGVtLnR5cGUgPT09ICdvYmplY3QnIHx8IChpdGVtLnR5cGUgPT09ICdhcnJheScgJiYgaXRlbS5wcm9wZXJ0aWVzKTtcbiAgfVxuXG59XG4iXX0=
|
package/type-script-compile.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class TypeScriptCompile {
|
|
2
|
-
private static addItemToFormProperties;
|
|
3
|
-
static compileProperties(input: any): {
|
|
4
|
-
compiledProperties: any;
|
|
5
|
-
formProperties: any;
|
|
6
|
-
inputData: any;
|
|
7
|
-
};
|
|
8
|
-
private static proccessProperties;
|
|
9
|
-
private static hasProperties;
|
|
10
|
-
}
|