@apipass/schemas 0.2.16 → 1.0.7
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/base-schema.component.d.ts +12 -12
- package/{esm2015/apipass-schemas.js → esm2020/apipass-schemas.mjs} +4 -4
- package/esm2020/base-schema.component.mjs +37 -0
- package/esm2020/public-api.mjs +17 -0
- package/esm2020/schema-custom-attributes/schema-custom-attributes.mjs +169 -0
- package/esm2020/schema-fields.service.mjs +80 -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/esm2020/struct.utils.mjs +9 -0
- package/esm2020/type-script-compile/type-script-compile.base.mjs +114 -0
- package/fesm2015/apipass-schemas.mjs +1801 -0
- package/fesm2015/apipass-schemas.mjs.map +1 -0
- package/fesm2020/apipass-schemas.mjs +1616 -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 +14 -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/assets/css/buttons.scss +0 -118
- package/assets/css/colors.scss +0 -34
- package/assets/css/fonts.scss +0 -24
- package/assets/css/inputs.scss +0 -197
- package/assets/css/pt_sans.scss +0 -144
- package/assets/css/spacing.scss +0 -28
- package/assets/css/texts.scss +0 -18
- package/bundles/apipass-schemas.umd.js +0 -2339
- 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/public-api.js +0 -17
- 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 -199
- 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/struct.utils.js +0 -9
- package/esm2015/type-script-compile/type-script-compile.base.js +0 -112
- package/fesm2015/apipass-schemas.js +0 -1745
- 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hLWFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2NoZW1hcy9zcmMvc2NoZW1hLWZvcm0vc2NoZW1hLWFycmF5L3NjaGVtYS1hcnJheS50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NjaGVtYXMvc3JjL3NjaGVtYS1mb3JtL3NjaGVtYS1hcnJheS9zY2hlbWEtYXJyYXkuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQW9CLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUE7QUFDbEUsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sNkJBQTZCLENBQUE7QUFDakUsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQixDQUFBOzs7Ozs7Ozs7O0lDUzNDLHNDQW1CMkI7SUFGekIsbVFBQVcsd0ZBQ2QsSUFEa0U7SUFHakUsaUJBQWM7Ozs7SUFsQlosc0VBQWlELHFFQUFBLDZDQUFBLG1EQUFBLHVDQUFBLHFDQUFBLHFDQUFBLCtEQUFBLGlFQUFBLDJEQUFBLDZEQUFBLHlEQUFBLDJEQUFBLCtEQUFBLDZCQUFBLDBFQUFBLHlDQUFBLDJCQUFBOzs7O0lBbUJuRCxzQ0FtQjJCO0lBRnpCLG1WQUE2QztJQUcvQyxpQkFBYzs7OztJQWxCWixzRUFBaUQscUVBQUEsNkNBQUEsbURBQUEsdUNBQUEscUNBQUEscUNBQUEsK0RBQUE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V0SWQoaW5kZXgpKyctJytpdGVtLmluZGV4XCIvPlxyXG4gICAgICA8L25nLXRlbXBsYXRlPlxyXG4gICAgPC9uZy10ZW1wbGF0ZT5cclxuICA8L2FycmF5LXNlc3Npb24+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hLWZvcm0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9zY2hlbWFzL3NyYy9zY2hlbWEtZm9ybS9zY2hlbWEtZm9ybS50cyIsIi4uLy4uLy4uLy4uL3Byb2plY3RzL3NjaGVtYXMvc3JjL3NjaGVtYS1mb3JtL3NjaGVtYS1mb3JtLmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFvQixTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQ2xFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLDBCQUEwQixDQUFBO0FBQzlELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQTs7OztJQ0Y5Qyw4QkFBNkUsc0JB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dXN0b21GaWVsZE5hbWVMYWJlbFwiXHJcbiAgICBbbmV3Q3VzdG9tRmllbGRWYWx1ZUxhYmVsXT1cIm5ld0N1c3RvbUZpZWxkVmFsdWVMYWJlbFwiXHJcbiAgICBbbmV3Q3VzdG9tRmllbGRBZGRMYWJlbF09XCJuZXdDdXN0b21GaWVsZEFkZExhYmVsXCJcclxuICAgIFtuZXdDdXN0b21GaWVsZFNhdmVMYWJlbF09XCJuZXdDdXN0b21GaWVsZFNhdmVMYWJlbFwiXHJcbiAgICBbbmV3Q3VzdG9tRmllbGRDYW5jZWxMYWJlbF09XCJuZXdDdXN0b21GaWVsZENhbmNlbExhYmVsXCJcclxuICAgIFtpZFByZWZpeF09XCJpZFByZWZpeFwiXHJcbiAgICBbKG1vZGVsKV09XCJtb2RlbFwiXHJcbiAgICBbc2NoZW1hXT1cInNjaGVtYVwiXHJcbiAgICBbZWRpdGluZ109XCJ0aGlzLmVkaXRpbmdcIlxyXG4gICAgW2luZGV4XT1cImlcIj5cclxuICA8L3NjaGVtYS1hcnJheT5cclxuPC9kaXY+XHJcbiJdfQ==
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmllbGQtcmVuZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2NoZW1hcy9zcmMvc2NoZW1hLWZvcm0vc2NoZW1hLWlucHV0L2ZpZWxkLXJlbmRlci9maWVsZC1yZW5kZXIudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9zY2hlbWFzL3NyYy9zY2hlbWEtZm9ybS9zY2hlbWEtaW5wdXQvZmllbGQtcmVuZGVyL2ZpZWxkLXJlbmRlci5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFBOzs7Ozs7SUNHeEMsZ0NBQXdGO0lBQUEsWUFBc0I7SUFBQSxpQkFBUTs7O0lBQS9HLGdIQUErRDtJQUFrQixlQUFzQjtJQUF0QiwwQ0FBc0I7OztJQUM5RywrQkFBbUU7SUFDL0QsdUJBQXNDO0lBQzFDLGlCQUFPOzs7SUFGaUIsc0RBQTBCOzs7QURJMUQsTUFBTSxPQUFPLG9CQUFvQjtJQUxqQztRQU1XLGtCQUFhLEdBQUcsWUFBWSxDQUFBO1FBQzVCLFVBQUssR0FBRyxFQUFFLENBQUE7UUFHVixhQUFRLEdBQUcsSUFBSSxDQUFBO0tBT3pCOzt3RkFaWSxvQkFBb0I7dUVBQXBCLG9CQUFvQjs7UUNSakMsOEJBQTJHLGVBQUE7U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cclxuIl19
|
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
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vbGVhbi1pbnB1dC5jb21wb25lbnQuanMi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