@apipass/schemas 0.2.15 → 1.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/README.md +33 -33
- package/assets/css/buttons.scss +118 -118
- package/assets/css/colors.scss +34 -34
- package/assets/css/fonts.scss +24 -24
- package/assets/css/inputs.scss +197 -197
- package/assets/css/pt_sans.scss +143 -143
- package/assets/css/spacing.scss +28 -28
- package/assets/css/texts.scss +18 -18
- package/base-schema.component.d.ts +12 -12
- package/{esm2015/apipass-schemas.js → esm2020/apipass-schemas.mjs} +4 -4
- package/esm2020/base-schema.component.mjs +38 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +17 -17
- package/esm2020/schema-custom-attributes/schema-custom-attributes.mjs +169 -0
- package/esm2020/schema-fields.service.mjs +82 -0
- package/esm2020/schema-form/schema-array/array-session/array-session.mjs +143 -0
- package/esm2020/schema-form/schema-array/schema-array.mjs +220 -0
- package/esm2020/schema-form/schema-form.mjs +107 -0
- package/esm2020/schema-form/schema-input/field-render/field-render.mjs +69 -0
- package/esm2020/schema-form/schema-input/input-render/boolean-input/boolean-input.component.mjs +46 -0
- package/esm2020/schema-form/schema-input/input-render/input-render.mjs +192 -0
- package/esm2020/schema-form/schema-input/input-render/number-input/number-input.component.mjs +44 -0
- package/esm2020/schema-form/schema-input/schema-input.mjs +96 -0
- package/esm2020/schema-form/schema-object/schema-object.mjs +123 -0
- package/esm2020/schema-form-render.mjs +126 -0
- package/esm2020/schema-form-render.module.mjs +108 -0
- package/esm2020/schema-validation-field.mjs +14 -0
- package/{esm2015/struct.utils.js → esm2020/struct.utils.mjs} +9 -9
- package/esm2020/type-script-compile/type-script-compile.base.mjs +112 -0
- package/fesm2015/apipass-schemas.mjs +1803 -0
- package/fesm2015/apipass-schemas.mjs.map +1 -0
- package/fesm2020/apipass-schemas.mjs +1618 -0
- package/fesm2020/apipass-schemas.mjs.map +1 -0
- package/{apipass-schemas.d.ts → index.d.ts} +5 -5
- package/package.json +32 -19
- package/public-api.d.ts +16 -16
- package/schema-custom-attributes/schema-custom-attributes.d.ts +21 -21
- package/schema-fields.service.d.ts +15 -15
- package/schema-form/schema-array/array-session/array-session.d.ts +19 -19
- package/schema-form/schema-array/schema-array.d.ts +32 -32
- package/schema-form/schema-form.d.ts +31 -31
- package/schema-form/schema-input/field-render/field-render.d.ts +16 -16
- package/schema-form/schema-input/input-render/boolean-input/boolean-input.component.d.ts +15 -15
- package/schema-form/schema-input/input-render/input-render.d.ts +29 -29
- package/schema-form/schema-input/input-render/number-input/number-input.component.d.ts +15 -15
- package/schema-form/schema-input/schema-input.d.ts +19 -19
- package/schema-form/schema-object/schema-object.d.ts +34 -34
- package/schema-form-render.d.ts +31 -31
- package/schema-form-render.module.d.ts +23 -22
- package/schema-validation-field.d.ts +23 -23
- package/struct.utils.d.ts +1 -1
- package/type-script-compile/type-script-compile.base.d.ts +17 -17
- package/bundles/apipass-schemas.umd.js +0 -2312
- package/bundles/apipass-schemas.umd.js.map +0 -1
- package/bundles/apipass-schemas.umd.min.js +0 -16
- package/bundles/apipass-schemas.umd.min.js.map +0 -1
- package/esm2015/base-schema.component.js +0 -38
- package/esm2015/schema-custom-attributes/schema-custom-attributes.js +0 -192
- package/esm2015/schema-fields.service.js +0 -87
- package/esm2015/schema-form/schema-array/array-session/array-session.js +0 -161
- package/esm2015/schema-form/schema-array/schema-array.js +0 -234
- package/esm2015/schema-form/schema-form.js +0 -114
- package/esm2015/schema-form/schema-input/field-render/field-render.js +0 -74
- package/esm2015/schema-form/schema-input/input-render/boolean-input/boolean-input.component.js +0 -50
- package/esm2015/schema-form/schema-input/input-render/input-render.js +0 -179
- package/esm2015/schema-form/schema-input/input-render/number-input/number-input.component.js +0 -48
- package/esm2015/schema-form/schema-input/schema-input.js +0 -111
- package/esm2015/schema-form/schema-object/schema-object.js +0 -134
- package/esm2015/schema-form-render.js +0 -136
- package/esm2015/schema-form-render.module.js +0 -124
- package/esm2015/schema-validation-field.js +0 -15
- package/esm2015/type-script-compile/type-script-compile.base.js +0 -112
- package/fesm2015/apipass-schemas.js +0 -1725
- package/fesm2015/apipass-schemas.js.map +0 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { BaseSchemaComponent } from '../../base-schema.component';
|
|
3
|
+
import { onDropStruct } from '../../struct.utils';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
import * as i2 from "ngx-drag-drop";
|
|
7
|
+
import * as i3 from "@angular/forms";
|
|
8
|
+
import * as i4 from "./array-session/array-session";
|
|
9
|
+
import * as i5 from "../schema-form";
|
|
10
|
+
import * as i6 from "../../schema-custom-attributes/schema-custom-attributes";
|
|
11
|
+
function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template(rf, ctx) { if (rf & 1) {
|
|
12
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
13
|
+
i0.ɵɵelementStart(0, "schema-form", 4);
|
|
14
|
+
i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template_schema_form_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r8); const item_r3 = i0.ɵɵnextContext().$implicit; const ctx_r7 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r7.model[ctx_r7.schema.id][item_r3.index].mappingAttributes = $event); });
|
|
15
|
+
i0.ɵɵelementEnd();
|
|
16
|
+
} if (rf & 2) {
|
|
17
|
+
const item_r3 = i0.ɵɵnextContext().$implicit;
|
|
18
|
+
const ctx_r4 = i0.ɵɵnextContext(2);
|
|
19
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r4.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r4.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r4.selectClearLabel)("selectNotFoundLabel", ctx_r4.selectNotFoundLabel)("requiredLabel", ctx_r4.requiredLabel)("addItemLabel", ctx_r4.addItemLabel)("addLoopLabel", ctx_r4.addLoopLabel)("additionalAttributesLabel", ctx_r4.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r4.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r4.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r4.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r4.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r4.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r4.newCustomFieldCancelLabel)("idPrefix", ctx_r4.idPrefix)("model", ctx_r4.model[ctx_r4.schema.id][item_r3.index].mappingAttributes)("schemas", ctx_r4.getSchemaProperties())("editing", ctx_r4.editing);
|
|
20
|
+
} }
|
|
21
|
+
function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
23
|
+
i0.ɵɵelementStart(0, "schema-form", 4);
|
|
24
|
+
i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template_schema_form_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r12); const item_r3 = i0.ɵɵnextContext().$implicit; const ctx_r11 = i0.ɵɵnextContext(2); return i0.ɵɵresetView((ctx_r11.model[ctx_r11.schema.id][item_r3.index] = $event)); });
|
|
25
|
+
i0.ɵɵelementEnd();
|
|
26
|
+
} if (rf & 2) {
|
|
27
|
+
const item_r3 = i0.ɵɵnextContext().$implicit;
|
|
28
|
+
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
29
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r5.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r5.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r5.selectClearLabel)("selectNotFoundLabel", ctx_r5.selectNotFoundLabel)("requiredLabel", ctx_r5.requiredLabel)("addItemLabel", ctx_r5.addItemLabel)("addLoopLabel", ctx_r5.addLoopLabel)("additionalAttributesLabel", ctx_r5.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r5.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r5.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r5.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r5.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r5.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r5.newCustomFieldCancelLabel)("idPrefix", ctx_r5.idPrefix)("model", ctx_r5.model[ctx_r5.schema.id][item_r3.index])("schemas", ctx_r5.getSchemaProperties())("editing", ctx_r5.editing);
|
|
30
|
+
} }
|
|
31
|
+
function SchemaArrayComponent_div_0_ng_template_2_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
33
|
+
i0.ɵɵelementStart(0, "div", 5)(1, "div", 6)(2, "label", 7);
|
|
34
|
+
i0.ɵɵtext(3);
|
|
35
|
+
i0.ɵɵelementEnd();
|
|
36
|
+
i0.ɵɵelementStart(4, "schema-custom-attributes", 8);
|
|
37
|
+
i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_div_2_Template_schema_custom_attributes_modelChange_4_listener($event) { i0.ɵɵrestoreView(_r16); const item_r3 = i0.ɵɵnextContext().$implicit; const ctx_r15 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r15.model[ctx_r15.schema.id][item_r3.index].customAttributes = $event); });
|
|
38
|
+
i0.ɵɵelementEnd()()();
|
|
39
|
+
} if (rf & 2) {
|
|
40
|
+
const item_r3 = i0.ɵɵnextContext().$implicit;
|
|
41
|
+
const ctx_r6 = i0.ɵɵnextContext(2);
|
|
42
|
+
i0.ɵɵadvance(3);
|
|
43
|
+
i0.ɵɵtextInterpolate(ctx_r6.additionalAttributesLabel);
|
|
44
|
+
i0.ɵɵadvance(1);
|
|
45
|
+
i0.ɵɵproperty("customAttributeRemoveLabel", ctx_r6.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r6.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r6.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r6.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r6.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r6.newCustomFieldCancelLabel)("model", ctx_r6.model[ctx_r6.schema.id][item_r3.index].customAttributes)("onDropFunction", ctx_r6.onDrop);
|
|
46
|
+
} }
|
|
47
|
+
function SchemaArrayComponent_div_0_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
48
|
+
i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template, 1, 18, "schema-form", 2);
|
|
49
|
+
i0.ɵɵtemplate(1, SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template, 1, 18, "schema-form", 2);
|
|
50
|
+
i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_div_2_Template, 5, 9, "div", 3);
|
|
51
|
+
} if (rf & 2) {
|
|
52
|
+
const item_r3 = ctx.$implicit;
|
|
53
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
54
|
+
i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop !== undefined);
|
|
55
|
+
i0.ɵɵadvance(1);
|
|
56
|
+
i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop == undefined);
|
|
57
|
+
i0.ɵɵadvance(1);
|
|
58
|
+
i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index] && ctx_r2.schema.customProperties);
|
|
59
|
+
} }
|
|
60
|
+
function SchemaArrayComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
62
|
+
i0.ɵɵelementStart(0, "div")(1, "array-session", 1);
|
|
63
|
+
i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_Template_array_session_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(); return i0.ɵɵresetView((ctx_r19.model[ctx_r19.schema.id] = $event)); })("onAdd", function SchemaArrayComponent_div_0_Template_array_session_onAdd_1_listener() { i0.ɵɵrestoreView(_r20); const ctx_r21 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r21.addArrayItem(ctx_r21.schema.id, {})); })("onAddLoop", function SchemaArrayComponent_div_0_Template_array_session_onAddLoop_1_listener() { i0.ɵɵrestoreView(_r20); const ctx_r22 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r22.addArrayLoop(ctx_r22.schema.id, {})); });
|
|
64
|
+
i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_Template, 3, 3, "ng-template");
|
|
65
|
+
i0.ɵɵelementEnd()();
|
|
66
|
+
} if (rf & 2) {
|
|
67
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
68
|
+
i0.ɵɵadvance(1);
|
|
69
|
+
i0.ɵɵproperty("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("label", ctx_r0.schema.title)("removeLabel", ctx_r0.schema.title)("model", ctx_r0.model[ctx_r0.schema.id])("showAddLoop", ctx_r0.schema.withoutLoop !== true);
|
|
70
|
+
} }
|
|
71
|
+
const _c0 = function () { return { standalone: true }; };
|
|
72
|
+
function SchemaArrayComponent_div_1_ng_template_2_input_2_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
+
const _r30 = i0.ɵɵgetCurrentView();
|
|
74
|
+
i0.ɵɵelementStart(0, "input", 12);
|
|
75
|
+
i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_input_2_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r30); const item_r24 = i0.ɵɵnextContext().$implicit; return i0.ɵɵresetView(item_r24.items[item_r24.index].mappingAttributes = $event); })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_input_2_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r30); const item_r24 = i0.ɵɵnextContext().$implicit; const ctx_r31 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(item_r24.items[item_r24.index].mappingAttributes = ctx_r31.onDrop($event, item_r24.items[item_r24.index].mappingAttributes)); });
|
|
76
|
+
i0.ɵɵelementEnd();
|
|
77
|
+
} if (rf & 2) {
|
|
78
|
+
const item_r24 = i0.ɵɵnextContext().$implicit;
|
|
79
|
+
const ctx_r25 = i0.ɵɵnextContext(2);
|
|
80
|
+
i0.ɵɵproperty("ngModel", item_r24.items[item_r24.index].mappingAttributes)("ngModelOptions", i0.ɵɵpureFunction0(3, _c0))("id", ctx_r25.getId(ctx_r25.index) + "-" + item_r24.index);
|
|
81
|
+
} }
|
|
82
|
+
function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
83
|
+
const _r36 = i0.ɵɵgetCurrentView();
|
|
84
|
+
i0.ɵɵelementStart(0, "input", 12);
|
|
85
|
+
i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r36); const item_r24 = i0.ɵɵnextContext().$implicit; return i0.ɵɵresetView((item_r24.items[item_r24.index] = $event)); })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r36); const item_r24 = i0.ɵɵnextContext().$implicit; const ctx_r37 = i0.ɵɵnextContext(2); return i0.ɵɵresetView((item_r24.items[item_r24.index] = ctx_r37.onDrop($event, item_r24.items[item_r24.index]))); });
|
|
86
|
+
i0.ɵɵelementEnd();
|
|
87
|
+
} if (rf & 2) {
|
|
88
|
+
const item_r24 = i0.ɵɵnextContext().$implicit;
|
|
89
|
+
const ctx_r27 = i0.ɵɵnextContext(2);
|
|
90
|
+
i0.ɵɵproperty("ngModel", item_r24.items[item_r24.index])("ngModelOptions", i0.ɵɵpureFunction0(3, _c0))("id", ctx_r27.getId(ctx_r27.index) + "-" + item_r24.index);
|
|
91
|
+
} }
|
|
92
|
+
function SchemaArrayComponent_div_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
93
|
+
i0.ɵɵelementStart(0, "label", 9);
|
|
94
|
+
i0.ɵɵtext(1);
|
|
95
|
+
i0.ɵɵelementEnd();
|
|
96
|
+
i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_input_2_Template, 1, 4, "input", 10);
|
|
97
|
+
i0.ɵɵtemplate(3, SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template, 1, 4, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
|
|
98
|
+
} if (rf & 2) {
|
|
99
|
+
const item_r24 = ctx.$implicit;
|
|
100
|
+
const _r26 = i0.ɵɵreference(4);
|
|
101
|
+
const ctx_r23 = i0.ɵɵnextContext(2);
|
|
102
|
+
i0.ɵɵproperty("htmlFor", ctx_r23.getId(ctx_r23.index) + "-" + item_r24.index);
|
|
103
|
+
i0.ɵɵadvance(1);
|
|
104
|
+
i0.ɵɵtextInterpolate(ctx_r23.schema.title);
|
|
105
|
+
i0.ɵɵadvance(1);
|
|
106
|
+
i0.ɵɵproperty("ngIf", item_r24.items[item_r24.index].mappingAttributes || item_r24.items[item_r24.index].mappingAttributes === "")("ngIfElse", _r26);
|
|
107
|
+
} }
|
|
108
|
+
function SchemaArrayComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
109
|
+
const _r41 = i0.ɵɵgetCurrentView();
|
|
110
|
+
i0.ɵɵelementStart(0, "div")(1, "array-session", 1);
|
|
111
|
+
i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_1_Template_array_session_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView((ctx_r40.model[ctx_r40.schema.id] = $event)); })("onAdd", function SchemaArrayComponent_div_1_Template_array_session_onAdd_1_listener() { i0.ɵɵrestoreView(_r41); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.addArrayItem(ctx_r42.schema.id, "")); })("onAddLoop", function SchemaArrayComponent_div_1_Template_array_session_onAddLoop_1_listener() { i0.ɵɵrestoreView(_r41); const ctx_r43 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r43.addArrayLoop(ctx_r43.schema.id, "")); });
|
|
112
|
+
i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_Template, 5, 4, "ng-template");
|
|
113
|
+
i0.ɵɵelementEnd()();
|
|
114
|
+
} if (rf & 2) {
|
|
115
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
116
|
+
i0.ɵɵadvance(1);
|
|
117
|
+
i0.ɵɵproperty("addItemLabel", ctx_r1.addItemLabel)("addLoopLabel", ctx_r1.addLoopLabel)("label", ctx_r1.schema.title)("removeLabel", ctx_r1.schema.title)("model", ctx_r1.model[ctx_r1.schema.id])("showAddLoop", ctx_r1.schema.withoutLoop !== true);
|
|
118
|
+
} }
|
|
119
|
+
export class SchemaArrayComponent extends BaseSchemaComponent {
|
|
120
|
+
constructor() {
|
|
121
|
+
super(...arguments);
|
|
122
|
+
this.requiredLabel = '(required)';
|
|
123
|
+
this.addItemLabel = 'Add Item';
|
|
124
|
+
this.addLoopLabel = 'Add Loop';
|
|
125
|
+
this.additionalAttributesLabel = 'Additional Fields';
|
|
126
|
+
this.customAttributeRemoveLabel = 'Remove';
|
|
127
|
+
this.newCustomFieldNameLabel = 'Name';
|
|
128
|
+
this.newCustomFieldValueLabel = 'Value';
|
|
129
|
+
this.newCustomFieldAddLabel = 'Add';
|
|
130
|
+
this.newCustomFieldSaveLabel = 'Save';
|
|
131
|
+
this.newCustomFieldCancelLabel = 'Cancel';
|
|
132
|
+
this.selectPlaceHolderLabel = 'Select Item';
|
|
133
|
+
this.selectSearchPlaceHolderLabel = 'Search';
|
|
134
|
+
this.selectClearLabel = 'Clear';
|
|
135
|
+
this.selectNotFoundLabel = 'No Items Found';
|
|
136
|
+
this.editing = false;
|
|
137
|
+
}
|
|
138
|
+
ngAfterContentInit() {
|
|
139
|
+
if (this.schema?.type === 'array' && this.model && !this.model[this.schema.id]) {
|
|
140
|
+
this.model[this.schema.id] = [];
|
|
141
|
+
}
|
|
142
|
+
this.loaded = true;
|
|
143
|
+
}
|
|
144
|
+
onDrop($event, modelElement) {
|
|
145
|
+
return onDropStruct($event, modelElement);
|
|
146
|
+
}
|
|
147
|
+
getId(index) {
|
|
148
|
+
return `${this.idPrefix}-struct-${index}`;
|
|
149
|
+
}
|
|
150
|
+
addArrayItem(id, param) {
|
|
151
|
+
this.model[id] = this.model[id] || [];
|
|
152
|
+
if (this.schema.properties) {
|
|
153
|
+
param = {};
|
|
154
|
+
Object.keys(this.schema.properties).forEach(key => {
|
|
155
|
+
const schemaProperty = this.schema.properties[key];
|
|
156
|
+
if (schemaProperty.type === 'object') {
|
|
157
|
+
param[schemaProperty.id] = {};
|
|
158
|
+
}
|
|
159
|
+
else if (schemaProperty.type === 'array') {
|
|
160
|
+
param[schemaProperty.id] = [];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
this.model[id].push(param);
|
|
165
|
+
}
|
|
166
|
+
addArrayLoop(id, mappingAttributes) {
|
|
167
|
+
this.model[id] = this.model[id] || [];
|
|
168
|
+
this.model[id].push({ loop: '', alias: '', mappingAttributes });
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
SchemaArrayComponent.ɵfac = /*@__PURE__*/ function () { let ɵSchemaArrayComponent_BaseFactory; return function SchemaArrayComponent_Factory(t) { return (ɵSchemaArrayComponent_BaseFactory || (ɵSchemaArrayComponent_BaseFactory = i0.ɵɵgetInheritedFactory(SchemaArrayComponent)))(t || SchemaArrayComponent); }; }();
|
|
172
|
+
SchemaArrayComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SchemaArrayComponent, selectors: [["schema-array"]], inputs: { 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", schema: "schema", editing: "editing", index: "index" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "addItemLabel", "addLoopLabel", "label", "removeLabel", "model", "showAddLoop", "modelChange", "onAdd", "onAddLoop"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange", 4, "ngIf"], ["class", "row struct-custom-properties", 4, "ngIf"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "model", "onDropFunction", "modelChange"], [1, "info-label", 3, "htmlFor"], ["class", "form-control", "type", "text", "dndDropzone", "", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop", 4, "ngIf", "ngIfElse"], ["elseBlock", ""], ["type", "text", "dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop"]], template: function SchemaArrayComponent_Template(rf, ctx) { if (rf & 1) {
|
|
173
|
+
i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_Template, 3, 6, "div", 0);
|
|
174
|
+
i0.ɵɵtemplate(1, SchemaArrayComponent_div_1_Template, 3, 6, "div", 0);
|
|
175
|
+
} if (rf & 2) {
|
|
176
|
+
i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && ctx.schema.properties);
|
|
177
|
+
i0.ɵɵadvance(1);
|
|
178
|
+
i0.ɵɵproperty("ngIf", ctx.schema && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && !ctx.schema.properties);
|
|
179
|
+
} }, dependencies: [i1.NgIf, i2.DndDropzoneDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i4.ArraySessionComponent, i5.SchemaFormComponent, i6.SchemaCustomAttributesComponent] });
|
|
180
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaArrayComponent, [{
|
|
181
|
+
type: Component,
|
|
182
|
+
args: [{ selector: 'schema-array', template: "<div *ngIf=\"loaded && canRender(schema) && schema.type === 'array' && schema.properties\">\r\n <array-session\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [label]=\"schema.title\"\r\n [removeLabel]=\"schema.title\"\r\n [(model)]=\"this.model[schema.id]\"\r\n [showAddLoop]=\"schema.withoutLoop !== true\"\r\n (onAdd)=\"addArrayItem(schema.id, {})\"\r\n (onAddLoop)=\"addArrayLoop(schema.id, {})\">\r\n <ng-template let-item>\r\n <schema-form\r\n *ngIf=\"this.model[schema.id][item.index].loop !== undefined\"\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"this.model[schema.id][item.index].mappingAttributes\"\r\n [schemas]=\"getSchemaProperties()\"\r\n [editing]=\"this.editing\">\r\n </schema-form>\r\n <schema-form\r\n *ngIf=\"this.model[schema.id][item.index].loop == undefined\"\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"this.model[schema.id][item.index]\"\r\n [schemas]=\"getSchemaProperties()\"\r\n [editing]=\"this.editing\">\r\n </schema-form>\r\n\r\n <div class=\"row struct-custom-properties\" *ngIf=\"this.model[schema.id][item.index] && schema.customProperties\">\r\n <div class=\"col-md-12\">\r\n <label class=\"info-label bold\">{{ this.additionalAttributesLabel }}</label>\r\n <schema-custom-attributes\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [(model)]=\"this.model[schema.id][item.index].customAttributes\"\r\n [onDropFunction]=\"onDrop\">\r\n </schema-custom-attributes>\r\n </div>\r\n </div>\r\n\r\n </ng-template>\r\n </array-session>\r\n</div>\r\n<div *ngIf=\"schema && canRender(schema) && schema.type === 'array' && !schema.properties\">\r\n <array-session\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [label]=\"schema.title\"\r\n [removeLabel]=\"schema.title\"\r\n [(model)]=\"this.model[schema.id]\"\r\n [showAddLoop]=\"schema.withoutLoop !== true\"\r\n (onAdd)=\"addArrayItem(schema.id, '')\"\r\n (onAddLoop)=\"addArrayLoop(schema.id, '')\"\r\n >\r\n <ng-template let-item>\r\n <label class=\"info-label\" [htmlFor]=\"getId(index)+'-'+item.index\">{{ schema.title }}</label>\r\n <input class=\"form-control\" type=\"text\" [(ngModel)]=\"item.items[item.index].mappingAttributes\"\r\n [ngModelOptions]=\"{standalone: true}\" dndDropzone\r\n (dndDrop)=\"item.items[item.index].mappingAttributes = this.onDrop($event, item.items[item.index].mappingAttributes)\"\r\n *ngIf=\"item.items[item.index].mappingAttributes || item.items[item.index].mappingAttributes === ''; else elseBlock\"\r\n [id]=\"getId(index)+'-'+item.index\"/>\r\n <ng-template #elseBlock>\r\n <input class=\"form-control\" type=\"text\" [(ngModel)]=\"item.items[item.index]\"\r\n [ngModelOptions]=\"{standalone: true}\" dndDropzone\r\n (dndDrop)=\"item.items[item.index] = this.onDrop($event, item.items[item.index])\"\r\n [id]=\"getId(index)+'-'+item.index\"/>\r\n </ng-template>\r\n </ng-template>\r\n </array-session>\r\n</div>\r\n" }]
|
|
183
|
+
}], null, { requiredLabel: [{
|
|
184
|
+
type: Input
|
|
185
|
+
}], addItemLabel: [{
|
|
186
|
+
type: Input
|
|
187
|
+
}], addLoopLabel: [{
|
|
188
|
+
type: Input
|
|
189
|
+
}], additionalAttributesLabel: [{
|
|
190
|
+
type: Input
|
|
191
|
+
}], customAttributeRemoveLabel: [{
|
|
192
|
+
type: Input
|
|
193
|
+
}], newCustomFieldNameLabel: [{
|
|
194
|
+
type: Input
|
|
195
|
+
}], newCustomFieldValueLabel: [{
|
|
196
|
+
type: Input
|
|
197
|
+
}], newCustomFieldAddLabel: [{
|
|
198
|
+
type: Input
|
|
199
|
+
}], newCustomFieldSaveLabel: [{
|
|
200
|
+
type: Input
|
|
201
|
+
}], newCustomFieldCancelLabel: [{
|
|
202
|
+
type: Input
|
|
203
|
+
}], selectPlaceHolderLabel: [{
|
|
204
|
+
type: Input
|
|
205
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
206
|
+
type: Input
|
|
207
|
+
}], selectClearLabel: [{
|
|
208
|
+
type: Input
|
|
209
|
+
}], selectNotFoundLabel: [{
|
|
210
|
+
type: Input
|
|
211
|
+
}], idPrefix: [{
|
|
212
|
+
type: Input
|
|
213
|
+
}], schema: [{
|
|
214
|
+
type: Input
|
|
215
|
+
}], editing: [{
|
|
216
|
+
type: Input
|
|
217
|
+
}], index: [{
|
|
218
|
+
type: Input
|
|
219
|
+
}] }); })();
|
|
220
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hLWFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2NoZW1hcy9zcmMvc2NoZW1hLWZvcm0vc2NoZW1hLWFycmF5L3NjaGVtYS1hcnJheS50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NjaGVtYXMvc3JjL3NjaGVtYS1mb3JtL3NjaGVtYS1hcnJheS9zY2hlbWEtYXJyYXkuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQW1CLFNBQVMsRUFBRSxLQUFLLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDakUsT0FBTyxFQUFDLG1CQUFtQixFQUFDLE1BQU0sNkJBQTZCLENBQUM7QUFDaEUsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLG9CQUFvQixDQUFDOzs7Ozs7Ozs7O0lDUzFDLHNDQW1CMkI7SUFGekIsbVFBQVcsd0ZBQ2QsSUFEa0U7SUFHakUsaUJBQWM7Ozs7SUFsQlosc0VBQWlELHFFQUFBLDZDQUFBLG1EQUFBLHVDQUFBLHFDQUFBLHFDQUFBLCtEQUFBLGlFQUFBLDJEQUFBLDZEQUFBLHlEQUFBLDJEQUFBLCtEQUFBLDZCQUFBLDBFQUFBLHlDQUFBLDJCQUFBOzs7O0lBbUJuRCxzQ0FtQjJCO0lBRnpCLG1WQUE2QztJQUcvQyxpQkFBYzs7OztJQWxCWixzRUFBaUQscUVBQUEsNkNBQUEsbURBQUEsdUNBQUEscUNBQUEscUNBQUEsK0RBQUEsaUVBQUEsMkR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ICAgICBbaWRdPVwiZ2V0SWQoaW5kZXgpKyctJytpdGVtLmluZGV4XCIvPlxyXG4gICAgICA8L25nLXRlbXBsYXRlPlxyXG4gICAgPC9uZy10ZW1wbGF0ZT5cclxuICA8L2FycmF5LXNlc3Npb24+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { BaseSchemaComponent } from '../base-schema.component';
|
|
3
|
+
import { onDropStruct } from '../struct.utils';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
function SchemaFormComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
6
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
7
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "schema-input", 2);
|
|
8
|
+
i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_input_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.model = $event); });
|
|
9
|
+
i0.ɵɵelementEnd();
|
|
10
|
+
i0.ɵɵelementStart(2, "schema-object", 3);
|
|
11
|
+
i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_object_modelChange_2_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.model = $event); });
|
|
12
|
+
i0.ɵɵelementEnd();
|
|
13
|
+
i0.ɵɵelementStart(3, "schema-array", 3);
|
|
14
|
+
i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_array_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.model = $event); });
|
|
15
|
+
i0.ɵɵelementEnd()();
|
|
16
|
+
} if (rf & 2) {
|
|
17
|
+
const schema_r1 = ctx.$implicit;
|
|
18
|
+
const i_r2 = ctx.index;
|
|
19
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
20
|
+
i0.ɵɵadvance(1);
|
|
21
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
22
|
+
i0.ɵɵadvance(1);
|
|
23
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
24
|
+
i0.ɵɵadvance(1);
|
|
25
|
+
i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
26
|
+
} }
|
|
27
|
+
export class SchemaFormComponent extends BaseSchemaComponent {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
this.requiredLabel = '(required)';
|
|
31
|
+
this.addItemLabel = 'Add Item';
|
|
32
|
+
this.addLoopLabel = 'Add Loop';
|
|
33
|
+
this.additionalAttributesLabel = 'Additional Fields';
|
|
34
|
+
this.customAttributeRemoveLabel = 'Remove';
|
|
35
|
+
this.newCustomFieldNameLabel = 'Name';
|
|
36
|
+
this.newCustomFieldValueLabel = 'Value';
|
|
37
|
+
this.newCustomFieldAddLabel = 'Add';
|
|
38
|
+
this.newCustomFieldSaveLabel = 'Save';
|
|
39
|
+
this.newCustomFieldCancelLabel = 'Cancel';
|
|
40
|
+
this.selectPlaceHolderLabel = 'Select Item';
|
|
41
|
+
this.selectSearchPlaceHolderLabel = 'Search';
|
|
42
|
+
this.selectClearLabel = 'Clear';
|
|
43
|
+
this.selectNotFoundLabel = 'No Items Found';
|
|
44
|
+
this.schemas = [];
|
|
45
|
+
this.customProperties = false;
|
|
46
|
+
this.editing = false;
|
|
47
|
+
this.loaded = false;
|
|
48
|
+
}
|
|
49
|
+
ngAfterContentInit() {
|
|
50
|
+
this.loaded = true;
|
|
51
|
+
}
|
|
52
|
+
onDrop($event, modelElement) {
|
|
53
|
+
return onDropStruct($event, modelElement);
|
|
54
|
+
}
|
|
55
|
+
getId(index) {
|
|
56
|
+
return `${this.idPrefix}-struct-${index}`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
SchemaFormComponent.ɵfac = /*@__PURE__*/ function () { let ɵSchemaFormComponent_BaseFactory; return function SchemaFormComponent_Factory(t) { return (ɵSchemaFormComponent_BaseFactory || (ɵSchemaFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(SchemaFormComponent)))(t || SchemaFormComponent); }; }();
|
|
60
|
+
SchemaFormComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SchemaFormComponent, selectors: [["schema-form"]], inputs: { 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" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "idPrefix", "model", "schema", "editing", "index", "modelChange"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schema", "editing", "index", "modelChange"]], template: function SchemaFormComponent_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
i0.ɵɵtemplate(0, SchemaFormComponent_div_0_Template, 4, 48, "div", 0);
|
|
62
|
+
} if (rf & 2) {
|
|
63
|
+
i0.ɵɵproperty("ngForOf", ctx.schemas);
|
|
64
|
+
} } });
|
|
65
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaFormComponent, [{
|
|
66
|
+
type: Component,
|
|
67
|
+
args: [{ selector: 'schema-form', template: "<div class=\"schema-properties\" *ngFor=\"let schema of schemas; let i = index\">\r\n <schema-input\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"model\"\r\n [schema]=\"schema\"\r\n [editing]=\"this.editing\"\r\n [index]=\"i\">\r\n </schema-input>\r\n <schema-object\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"model\"\r\n [schema]=\"schema\"\r\n [editing]=\"this.editing\"\r\n [index]=\"i\">\r\n </schema-object>\r\n <schema-array\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"model\"\r\n [schema]=\"schema\"\r\n [editing]=\"this.editing\"\r\n [index]=\"i\">\r\n </schema-array>\r\n</div>\r\n" }]
|
|
68
|
+
}], null, { requiredLabel: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], addItemLabel: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], addLoopLabel: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], additionalAttributesLabel: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], customAttributeRemoveLabel: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], newCustomFieldNameLabel: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], newCustomFieldValueLabel: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}], newCustomFieldAddLabel: [{
|
|
83
|
+
type: Input
|
|
84
|
+
}], newCustomFieldSaveLabel: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], newCustomFieldCancelLabel: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], selectPlaceHolderLabel: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], selectClearLabel: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], selectNotFoundLabel: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}], idPrefix: [{
|
|
97
|
+
type: Input
|
|
98
|
+
}], schemas: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], customProperties: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], editing: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], inputType: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}] }); })();
|
|
107
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hLWZvcm0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9zY2hlbWFzL3NyYy9zY2hlbWEtZm9ybS9zY2hlbWEtZm9ybS50cyIsIi4uLy4uLy4uLy4uL3Byb2plY3RzL3NjaGVtYXMvc3JjL3NjaGVtYS1mb3JtL3NjaGVtYS1mb3JtLmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFtQixTQUFTLEVBQUUsS0FBSyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ2pFLE9BQU8sRUFBQyxtQkFBbUIsRUFBQyxNQUFNLDBCQUEwQixDQUFDO0FBQzdELE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQzs7OztJQ0Y3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tQXR0cmlidXRlUmVtb3ZlTGFiZWxcIlxyXG4gICAgW25ld0N1c3RvbUZpZWxkTmFtZUxhYmVsXT1cIm5ld0N1c3RvbUZpZWxkTmFtZUxhYmVsXCJcclxuICAgIFtuZXdDdXN0b21GaWVsZFZhbHVlTGFiZWxdPVwibmV3Q3VzdG9tRmllbGRWYWx1ZUxhYmVsXCJcclxuICAgIFtuZXdDdXN0b21GaWVsZEFkZExhYmVsXT1cIm5ld0N1c3RvbUZpZWxkQWRkTGFiZWxcIlxyXG4gICAgW25ld0N1c3RvbUZpZWxkU2F2ZUxhYmVsXT1cIm5ld0N1c3RvbUZpZWxkU2F2ZUxhYmVsXCJcclxuICAgIFtuZXdDdXN0b21GaWVsZENhbmNlbExhYmVsXT1cIm5ld0N1c3RvbUZpZWxkQ2FuY2VsTGFiZWxcIlxyXG4gICAgW2lkUHJlZml4XT1cImlkUHJlZml4XCJcclxuICAgIFsobW9kZWwpXT1cIm1vZGVsXCJcclxuICAgIFtzY2hlbWFdPVwic2NoZW1hXCJcclxuICAgIFtlZGl0aW5nXT1cInRoaXMuZWRpdGluZ1wiXHJcbiAgICBbaW5kZXhdPVwiaVwiPlxyXG4gIDwvc2NoZW1hLWFycmF5PlxyXG48L2Rpdj5cclxuIl19
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
import * as i2 from "@angular/material/tooltip";
|
|
5
|
+
const _c0 = function (a0) { return { "has-error": a0 }; };
|
|
6
|
+
function FieldRenderComponent_small_3_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
+
i0.ɵɵelementStart(0, "small", 0);
|
|
8
|
+
i0.ɵɵtext(1);
|
|
9
|
+
i0.ɵɵelementEnd();
|
|
10
|
+
} if (rf & 2) {
|
|
11
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
12
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0, ctx_r0.state && !ctx_r0.state.valid && ctx_r0.state.errors));
|
|
13
|
+
i0.ɵɵadvance(1);
|
|
14
|
+
i0.ɵɵtextInterpolate(ctx_r0.requiredLabel);
|
|
15
|
+
} }
|
|
16
|
+
function FieldRenderComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
17
|
+
i0.ɵɵelementStart(0, "span", 4);
|
|
18
|
+
i0.ɵɵelement(1, "i", 5);
|
|
19
|
+
i0.ɵɵelementEnd();
|
|
20
|
+
} if (rf & 2) {
|
|
21
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
22
|
+
i0.ɵɵpropertyInterpolate("matTooltip", ctx_r1.tooltip);
|
|
23
|
+
} }
|
|
24
|
+
const _c1 = ["*"];
|
|
25
|
+
export class FieldRenderComponent {
|
|
26
|
+
constructor() {
|
|
27
|
+
this.requiredLabel = '(required)';
|
|
28
|
+
this.label = '';
|
|
29
|
+
this.required = true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
FieldRenderComponent.ɵfac = function FieldRenderComponent_Factory(t) { return new (t || FieldRenderComponent)(); };
|
|
33
|
+
FieldRenderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FieldRenderComponent, selectors: [["field-render"]], inputs: { requiredLabel: "requiredLabel", label: "label", inputId: "inputId", tooltip: "tooltip", required: "required", state: "state" }, ngContentSelectors: _c1, decls: 6, vars: 7, consts: [[3, "ngClass"], [1, "info-label", "bold", 3, "htmlFor"], [3, "ngClass", 4, "ngIf"], ["class", "info-icon", 3, "matTooltip", 4, "ngIf"], [1, "info-icon", 3, "matTooltip"], [1, "far", "fa-question-circle"]], template: function FieldRenderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
+
i0.ɵɵprojectionDef();
|
|
35
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "label", 1);
|
|
36
|
+
i0.ɵɵtext(2);
|
|
37
|
+
i0.ɵɵtemplate(3, FieldRenderComponent_small_3_Template, 2, 4, "small", 2);
|
|
38
|
+
i0.ɵɵtemplate(4, FieldRenderComponent_span_4_Template, 2, 1, "span", 3);
|
|
39
|
+
i0.ɵɵelementEnd();
|
|
40
|
+
i0.ɵɵprojection(5);
|
|
41
|
+
i0.ɵɵelementEnd();
|
|
42
|
+
} if (rf & 2) {
|
|
43
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0, ctx.state && !ctx.state.valid && (!ctx.state.pristine || ctx.state.touched) && ctx.state.errors));
|
|
44
|
+
i0.ɵɵadvance(1);
|
|
45
|
+
i0.ɵɵproperty("htmlFor", ctx.inputId);
|
|
46
|
+
i0.ɵɵadvance(1);
|
|
47
|
+
i0.ɵɵtextInterpolate1(" ", ctx.label, " ");
|
|
48
|
+
i0.ɵɵadvance(1);
|
|
49
|
+
i0.ɵɵproperty("ngIf", ctx.required);
|
|
50
|
+
i0.ɵɵadvance(1);
|
|
51
|
+
i0.ɵɵproperty("ngIf", ctx.tooltip);
|
|
52
|
+
} }, dependencies: [i1.NgClass, i1.NgIf, i2.MatTooltip], styles: [".info-icon[_ngcontent-%COMP%]{color:#222d57;font-size:13px;float:right;margin-left:4px}"] });
|
|
53
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FieldRenderComponent, [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{ selector: 'field-render', template: "<div [ngClass]=\"{'has-error':state && !state.valid && (!state.pristine || state.touched) && state.errors}\">\r\n <label class=\"info-label bold\" [htmlFor]=\"inputId\">\r\n {{ label }}\r\n <small [ngClass]=\"{'has-error':state && !state.valid && state.errors}\" *ngIf=\"required\">{{this.requiredLabel}}</small>\r\n <span class=\"info-icon\" matTooltip=\"{{ tooltip }}\" *ngIf=\"tooltip\">\r\n <i class=\"far fa-question-circle\"></i>\r\n </span>\r\n </label>\r\n\r\n <!-- Input, textarea or select -->\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".info-icon{color:#222d57;font-size:13px;float:right;margin-left:4px}\n"] }]
|
|
56
|
+
}], null, { requiredLabel: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], label: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], inputId: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], tooltip: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], required: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], state: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}] }); })();
|
|
69
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmllbGQtcmVuZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2NoZW1hcy9zcmMvc2NoZW1hLWZvcm0vc2NoZW1hLWlucHV0L2ZpZWxkLXJlbmRlci9maWVsZC1yZW5kZXIudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9zY2hlbWFzL3NyYy9zY2hlbWEtZm9ybS9zY2hlbWEtaW5wdXQvZmllbGQtcmVuZGVyL2ZpZWxkLXJlbmRlci5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsS0FBSyxFQUFDLE1BQU0sZUFBZSxDQUFDOzs7Ozs7SUNHdkMsZ0NBQXdGO0lBQUEsWUFBc0I7SUFBQSxpQkFBUTs7O0lBQS9HLGdIQUErRDtJQUFrQixlQUFzQjtJQUF0QiwwQ0FBc0I7OztJQUM5RywrQkFBbUU7SUFDL0QsdUJBQXNDO0lBQzFDLGlCQUFPOzs7SUFGaUIsc0RBQTBCOzs7QURJMUQsTUFBTSxPQUFPLG9CQUFvQjtJQUxqQztRQU9XLGtCQUFhLEdBQUcsWUFBWSxDQUFDO1FBQzdCLFVBQUssR0FBRyxFQUFFLENBQUM7UUFHWCxhQUFRLEdBQUc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QsIHRleHRhcmVhIG9yIHNlbGVjdCAtLT5cclxuICAgIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cclxuPC9kaXY+XHJcbiJdfQ==
|
package/esm2020/schema-form/schema-input/input-render/boolean-input/boolean-input.component.mjs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { BaseSchemaComponent } from '../../../../base-schema.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "ngx-drag-drop";
|
|
5
|
+
import * as i2 from "@angular/forms";
|
|
6
|
+
const _c0 = function () { return { standalone: true }; };
|
|
7
|
+
export class BooleanInputComponent extends BaseSchemaComponent {
|
|
8
|
+
ngAfterContentInit() {
|
|
9
|
+
this.value = this.model;
|
|
10
|
+
}
|
|
11
|
+
onDropCallBack($event, value) {
|
|
12
|
+
this.value = value = super.onDrop($event, value);
|
|
13
|
+
this.changeValue(value);
|
|
14
|
+
}
|
|
15
|
+
changeValue($event) {
|
|
16
|
+
if ($event && ($event === 'true' || $event === 'false')) {
|
|
17
|
+
this.model = $event === 'true';
|
|
18
|
+
this.value = this.model;
|
|
19
|
+
this.modelChange.emit(this.model);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this.model = $event;
|
|
23
|
+
this.value = this.model;
|
|
24
|
+
this.modelChange.emit(this.model);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
BooleanInputComponent.ɵfac = /*@__PURE__*/ function () { let ɵBooleanInputComponent_BaseFactory; return function BooleanInputComponent_Factory(t) { return (ɵBooleanInputComponent_BaseFactory || (ɵBooleanInputComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BooleanInputComponent)))(t || BooleanInputComponent); }; }();
|
|
29
|
+
BooleanInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BooleanInputComponent, selectors: [["boolean-input"]], inputs: { placeholder: "placeholder", inputId: "inputId", maxLength: "maxLength" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 6, consts: [["dndDropzone", "", 1, "form-control", 3, "id", "placeholder", "ngModel", "ngModelOptions", "maxlength", "ngModelChange", "dndDrop"]], template: function BooleanInputComponent_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
+
i0.ɵɵelementStart(0, "input", 0);
|
|
31
|
+
i0.ɵɵlistener("ngModelChange", function BooleanInputComponent_Template_input_ngModelChange_0_listener($event) { return ctx.value = $event; })("ngModelChange", function BooleanInputComponent_Template_input_ngModelChange_0_listener($event) { return ctx.changeValue($event); })("dndDrop", function BooleanInputComponent_Template_input_dndDrop_0_listener($event) { return ctx.onDropCallBack($event, ctx.value); });
|
|
32
|
+
i0.ɵɵelementEnd();
|
|
33
|
+
} if (rf & 2) {
|
|
34
|
+
i0.ɵɵproperty("id", ctx.inputId)("placeholder", ctx.placeholder)("ngModel", ctx.value)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0))("maxlength", ctx.maxLength);
|
|
35
|
+
} }, dependencies: [i1.DndDropzoneDirective, i2.DefaultValueAccessor, i2.NgControlStatus, i2.MaxLengthValidator, i2.NgModel], encapsulation: 2 });
|
|
36
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BooleanInputComponent, [{
|
|
37
|
+
type: Component,
|
|
38
|
+
args: [{ selector: 'boolean-input', template: "<input class=\"form-control\"\r\n [id]=\"inputId\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"value\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"changeValue($event)\"\r\n dndDropzone (dndDrop)=\"onDropCallBack($event, value)\"\r\n [maxlength]=\"maxLength\">\r\n" }]
|
|
39
|
+
}], null, { placeholder: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], inputId: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], maxLength: [{
|
|
44
|
+
type: Input
|
|
45
|
+
}] }); })();
|
|
46
|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