@apipass/schemas 0.2.5-alpha.0 → 0.2.5-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/apipass-schemas.umd.js +407 -192
- package/bundles/apipass-schemas.umd.js.map +1 -1
- package/bundles/apipass-schemas.umd.min.js +2 -2
- package/bundles/apipass-schemas.umd.min.js.map +1 -1
- package/esm2015/schema-custom-attributes/schema-custom-attributes.js +56 -41
- package/esm2015/schema-fields.service.js +18 -10
- package/esm2015/schema-form/schema-array/array-session/array-session.js +39 -37
- package/esm2015/schema-form/schema-array/schema-array.js +70 -31
- package/esm2015/schema-form/schema-form.js +51 -9
- package/esm2015/schema-form/schema-input/field-render/field-render.js +21 -19
- package/esm2015/schema-form/schema-input/input-render/input-render.js +18 -11
- package/esm2015/schema-form/schema-input/schema-input.js +27 -14
- package/esm2015/schema-form/schema-object/schema-object.js +54 -14
- package/esm2015/schema-form-render.js +54 -14
- package/esm2015/schema-form-render.module.js +4 -9
- package/esm2015/schema-validation-field.js +1 -1
- package/fesm2015/apipass-schemas.js +401 -187
- package/fesm2015/apipass-schemas.js.map +1 -1
- package/package.json +1 -1
- package/schema-custom-attributes/schema-custom-attributes.d.ts +7 -1
- package/schema-fields.service.d.ts +7 -4
- package/schema-form/schema-array/array-session/array-session.d.ts +4 -2
- package/schema-form/schema-array/schema-array.d.ts +15 -1
- package/schema-form/schema-form.d.ts +15 -1
- package/schema-form/schema-input/field-render/field-render.d.ts +2 -1
- package/schema-form/schema-input/input-render/input-render.d.ts +5 -1
- package/schema-form/schema-input/schema-input.d.ts +6 -1
- package/schema-form/schema-object/schema-object.d.ts +15 -1
- package/schema-form-render.d.ts +15 -1
- package/schema-form-render.module.d.ts +2 -3
- package/schema-validation-field.d.ts +7 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { EventEmitter, ɵɵdefineComponent, ɵsetClassMetadata, Component, Input, Output, ɵɵgetCurrentView, ɵɵelementStart, ɵɵtext, ɵɵelementEnd, ɵɵlistener, ɵɵrestoreView, ɵɵnextContext, ɵɵadvance, ɵɵproperty, ɵɵpureFunction0, ɵɵelementContainer,
|
|
1
|
+
import { EventEmitter, ɵɵdefineComponent, ɵsetClassMetadata, Component, Input, Output, ɵɵgetCurrentView, ɵɵelementStart, ɵɵtext, ɵɵelementEnd, ɵɵlistener, ɵɵrestoreView, ɵɵnextContext, ɵɵadvance, ɵɵproperty, ɵɵpureFunction0, ɵɵelementContainer, ɵɵtemplate, ɵɵtextInterpolate2, ɵɵpureFunction1, ɵɵpureFunction3, ɵɵtextInterpolate, ɵɵcontentQuery, TemplateRef, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵInheritDefinitionFeature, ɵɵgetInheritedFactory, ContentChild, ɵɵelement, ɵɵtextInterpolate1, ɵɵtemplateRefExtractor, ɵɵreference, ɵɵpropertyInterpolate, ɵɵprojectionDef, ɵɵprojection, ɵɵdefineInjectable, Injectable, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule, ɵɵsetComponentScope } from '@angular/core';
|
|
2
2
|
import { NgForOf, NgIf, NgTemplateOutlet, NgClass, CommonModule, NgComponentOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe } from '@angular/common';
|
|
3
3
|
import { DefaultValueAccessor, NgControlStatus, NgModel, MaxLengthValidator, FormsModule, ɵangular_packages_forms_forms_y, NgSelectOption, ɵangular_packages_forms_forms_x, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatusGroup, RequiredValidator, MinLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator, NgModelGroup, NgForm, FormControl, Validators } from '@angular/forms';
|
|
4
|
-
import { TranslatePipe, TranslateService, TranslateModule, TranslateDirective } from '@ngx-translate/core';
|
|
5
4
|
import { DndDropzoneDirective, DndModule, DndDraggableDirective, DndHandleDirective, DndPlaceholderRefDirective, DndDragImageRefDirective } from 'ngx-drag-drop';
|
|
6
5
|
import { MatTooltip, MatTooltipModule, TooltipComponent } from '@angular/material/tooltip';
|
|
7
6
|
import { SelectBoxComponent, InputsModule, SelectEnumComponent, InputTextComponent, InputPasswordComponent, InputAvatarComponent, InputFileComponent, CustomSelectComponent, FieldComponent } from '@apipass/inputs';
|
|
@@ -55,7 +54,7 @@ function onDropStruct(event, attr) {
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
const _c0 = function () { return { standalone: true }; };
|
|
58
|
-
function
|
|
57
|
+
function ArraySessionComponent_div_4_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
59
58
|
const _r8 = ɵɵgetCurrentView();
|
|
60
59
|
ɵɵelementStart(0, "div", 0);
|
|
61
60
|
ɵɵelementStart(1, "div", 12);
|
|
@@ -63,7 +62,7 @@ function ArraySessionComponent_div_5_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
63
62
|
ɵɵtext(3, "Loop");
|
|
64
63
|
ɵɵelementEnd();
|
|
65
64
|
ɵɵelementStart(4, "input", 14);
|
|
66
|
-
ɵɵlistener("ngModelChange", function
|
|
65
|
+
ɵɵlistener("ngModelChange", function ArraySessionComponent_div_4_div_4_Template_input_ngModelChange_4_listener($event) { ɵɵrestoreView(_r8); const item_r2 = ɵɵnextContext().$implicit; return item_r2.loop = $event; })("dndDrop", function ArraySessionComponent_div_4_div_4_Template_input_dndDrop_4_listener($event) { ɵɵrestoreView(_r8); const item_r2 = ɵɵnextContext().$implicit; const ctx_r9 = ɵɵnextContext(); return item_r2.loop = ctx_r9.onDrop($event, item_r2.loop); });
|
|
67
66
|
ɵɵelementEnd();
|
|
68
67
|
ɵɵelementEnd();
|
|
69
68
|
ɵɵelementStart(5, "div", 15);
|
|
@@ -71,7 +70,7 @@ function ArraySessionComponent_div_5_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
71
70
|
ɵɵtext(7, "Alias");
|
|
72
71
|
ɵɵelementEnd();
|
|
73
72
|
ɵɵelementStart(8, "input", 14);
|
|
74
|
-
ɵɵlistener("ngModelChange", function
|
|
73
|
+
ɵɵlistener("ngModelChange", function ArraySessionComponent_div_4_div_4_Template_input_ngModelChange_8_listener($event) { ɵɵrestoreView(_r8); const item_r2 = ɵɵnextContext().$implicit; return item_r2.alias = $event; })("dndDrop", function ArraySessionComponent_div_4_div_4_Template_input_dndDrop_8_listener($event) { ɵɵrestoreView(_r8); const item_r2 = ɵɵnextContext().$implicit; const ctx_r13 = ɵɵnextContext(); return item_r2.alias = ctx_r13.onDrop($event, item_r2.alias); });
|
|
75
74
|
ɵɵelementEnd();
|
|
76
75
|
ɵɵelementEnd();
|
|
77
76
|
ɵɵelementEnd();
|
|
@@ -82,52 +81,53 @@ function ArraySessionComponent_div_5_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
82
81
|
ɵɵadvance(4);
|
|
83
82
|
ɵɵproperty("ngModel", item_r2.alias)("ngModelOptions", ɵɵpureFunction0(5, _c0));
|
|
84
83
|
} }
|
|
85
|
-
function
|
|
84
|
+
function ArraySessionComponent_div_4_ng_container_5_Template(rf, ctx) { if (rf & 1) {
|
|
86
85
|
ɵɵelementContainer(0);
|
|
87
86
|
} }
|
|
88
87
|
const _c1 = function (a0, a1, a2) { return { items: a0, index: a1, mappingAttributes: a2 }; };
|
|
89
88
|
const _c2 = function (a0) { return { $implicit: a0 }; };
|
|
90
|
-
function
|
|
89
|
+
function ArraySessionComponent_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
91
90
|
const _r17 = ɵɵgetCurrentView();
|
|
92
91
|
ɵɵelementStart(0, "div", 7);
|
|
93
92
|
ɵɵelementStart(1, "div", 8);
|
|
94
93
|
ɵɵtext(2);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
ɵɵlistener("click", function ArraySessionComponent_div_5_Template_i_click_4_listener() { ɵɵrestoreView(_r17); const item_r2 = ctx.$implicit; const ctx_r16 = ɵɵnextContext(); return ctx_r16.remove(item_r2); });
|
|
94
|
+
ɵɵelementStart(3, "i", 9);
|
|
95
|
+
ɵɵlistener("click", function ArraySessionComponent_div_4_Template_i_click_3_listener() { ɵɵrestoreView(_r17); const item_r2 = ctx.$implicit; const ctx_r16 = ɵɵnextContext(); return ctx_r16.remove(item_r2); });
|
|
98
96
|
ɵɵelementEnd();
|
|
99
97
|
ɵɵelementEnd();
|
|
100
|
-
ɵɵtemplate(
|
|
101
|
-
ɵɵtemplate(
|
|
98
|
+
ɵɵtemplate(4, ArraySessionComponent_div_4_div_4_Template, 9, 6, "div", 10);
|
|
99
|
+
ɵɵtemplate(5, ArraySessionComponent_div_4_ng_container_5_Template, 1, 0, "ng-container", 11);
|
|
102
100
|
ɵɵelementEnd();
|
|
103
101
|
} if (rf & 2) {
|
|
104
102
|
const item_r2 = ctx.$implicit;
|
|
105
103
|
const index_r3 = ctx.index;
|
|
106
104
|
const ctx_r0 = ɵɵnextContext();
|
|
107
105
|
ɵɵadvance(2);
|
|
108
|
-
ɵɵtextInterpolate2("",
|
|
109
|
-
ɵɵadvance(
|
|
106
|
+
ɵɵtextInterpolate2("", ctx_r0.removeLabel, " ", index_r3 + 1, " ");
|
|
107
|
+
ɵɵadvance(2);
|
|
110
108
|
ɵɵproperty("ngIf", item_r2.mappingAttributes || item_r2.mappingAttributes === "");
|
|
111
109
|
ɵɵadvance(1);
|
|
112
|
-
ɵɵproperty("ngTemplateOutlet", ctx_r0.subsectionItem)("ngTemplateOutletContext", ɵɵpureFunction1(
|
|
110
|
+
ɵɵproperty("ngTemplateOutlet", ctx_r0.subsectionItem)("ngTemplateOutletContext", ɵɵpureFunction1(9, _c2, ɵɵpureFunction3(5, _c1, ctx_r0.model, index_r3, item_r2.mappingAttributes || item_r2.mappingAttributes === "" ? item_r2.mappingAttributes : item_r2)));
|
|
113
111
|
} }
|
|
114
|
-
function
|
|
112
|
+
function ArraySessionComponent_button_9_Template(rf, ctx) { if (rf & 1) {
|
|
115
113
|
const _r19 = ɵɵgetCurrentView();
|
|
116
114
|
ɵɵelementStart(0, "button", 16);
|
|
117
|
-
ɵɵlistener("click", function
|
|
115
|
+
ɵɵlistener("click", function ArraySessionComponent_button_9_Template_button_click_0_listener() { ɵɵrestoreView(_r19); const ctx_r18 = ɵɵnextContext(); return ctx_r18.addLoop(); });
|
|
118
116
|
ɵɵtext(1);
|
|
119
|
-
ɵɵpipe(2, "translate");
|
|
120
117
|
ɵɵelementEnd();
|
|
121
118
|
} if (rf & 2) {
|
|
119
|
+
const ctx_r1 = ɵɵnextContext();
|
|
122
120
|
ɵɵadvance(1);
|
|
123
|
-
ɵɵtextInterpolate(
|
|
121
|
+
ɵɵtextInterpolate(ctx_r1.addLoopLabel);
|
|
124
122
|
} }
|
|
125
123
|
class ArraySessionComponent extends BaseSchemaComponent {
|
|
126
124
|
constructor() {
|
|
127
125
|
super(...arguments);
|
|
128
126
|
this.label = '';
|
|
127
|
+
this.removeLabel = 'Remove';
|
|
128
|
+
this.addItemLabel = 'Add Item';
|
|
129
|
+
this.addLoopLabel = 'Add Loop';
|
|
129
130
|
this.showAddLoop = true;
|
|
130
|
-
this.removeLabel = '';
|
|
131
131
|
this.onAdd = new EventEmitter();
|
|
132
132
|
this.onAddLoop = new EventEmitter();
|
|
133
133
|
}
|
|
@@ -153,36 +153,34 @@ ArraySessionComponent.ɵcmp = ɵɵdefineComponent({ type: ArraySessionComponent,
|
|
|
153
153
|
} if (rf & 2) {
|
|
154
154
|
var _t;
|
|
155
155
|
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.subsectionItem = _t.first);
|
|
156
|
-
} }, inputs: { label: "label",
|
|
156
|
+
} }, inputs: { label: "label", removeLabel: "removeLabel", addItemLabel: "addItemLabel", addLoopLabel: "addLoopLabel", showAddLoop: "showAddLoop" }, outputs: { onAdd: "onAdd", onAddLoop: "onAddLoop" }, features: [ɵɵInheritDefinitionFeature], decls: 10, vars: 5, consts: [[1, "row"], [1, "col-md-12"], [1, "info-label", "bold"], ["class", "subsection-element", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "row", "add-buttons"], [1, "btn", "btn-outline-primary", "float-left", "btn-personal-edit", 3, "click"], ["class", "btn btn-outline-primary float-left btn-personal-edit ml-2", 3, "click", 4, "ngIf"], [1, "subsection-element"], [1, "subsection-item-title"], [1, "far", "fa-trash-alt", 3, "click"], ["class", "row", 4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "col-md-8"], [1, "info-label"], ["type", "text", "dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange", "dndDrop"], [1, "col-md-4"], [1, "btn", "btn-outline-primary", "float-left", "btn-personal-edit", "ml-2", 3, "click"]], template: function ArraySessionComponent_Template(rf, ctx) { if (rf & 1) {
|
|
157
157
|
ɵɵelementStart(0, "div", 0);
|
|
158
158
|
ɵɵelementStart(1, "div", 1);
|
|
159
159
|
ɵɵelementStart(2, "label", 2);
|
|
160
160
|
ɵɵtext(3);
|
|
161
|
-
ɵɵpipe(4, "translate");
|
|
162
161
|
ɵɵelementEnd();
|
|
163
|
-
ɵɵtemplate(
|
|
162
|
+
ɵɵtemplate(4, ArraySessionComponent_div_4_Template, 6, 11, "div", 3);
|
|
164
163
|
ɵɵelementEnd();
|
|
165
164
|
ɵɵelementEnd();
|
|
166
|
-
ɵɵelementStart(
|
|
167
|
-
ɵɵelementStart(
|
|
168
|
-
ɵɵelementStart(
|
|
169
|
-
ɵɵlistener("click", function
|
|
170
|
-
ɵɵtext(
|
|
171
|
-
ɵɵpipe(10, "translate");
|
|
165
|
+
ɵɵelementStart(5, "div", 4);
|
|
166
|
+
ɵɵelementStart(6, "div", 1);
|
|
167
|
+
ɵɵelementStart(7, "button", 5);
|
|
168
|
+
ɵɵlistener("click", function ArraySessionComponent_Template_button_click_7_listener() { return ctx.add(); });
|
|
169
|
+
ɵɵtext(8);
|
|
172
170
|
ɵɵelementEnd();
|
|
173
|
-
ɵɵtemplate(
|
|
171
|
+
ɵɵtemplate(9, ArraySessionComponent_button_9_Template, 2, 1, "button", 6);
|
|
174
172
|
ɵɵelementEnd();
|
|
175
173
|
ɵɵelementEnd();
|
|
176
174
|
} if (rf & 2) {
|
|
177
175
|
ɵɵadvance(3);
|
|
178
|
-
ɵɵtextInterpolate(
|
|
179
|
-
ɵɵadvance(
|
|
176
|
+
ɵɵtextInterpolate(ctx.label);
|
|
177
|
+
ɵɵadvance(1);
|
|
180
178
|
ɵɵproperty("ngForOf", ctx.model)("ngForTrackBy", ctx.trackByIndex);
|
|
181
179
|
ɵɵadvance(4);
|
|
182
|
-
ɵɵtextInterpolate(
|
|
183
|
-
ɵɵadvance(
|
|
180
|
+
ɵɵtextInterpolate(ctx.addItemLabel);
|
|
181
|
+
ɵɵadvance(1);
|
|
184
182
|
ɵɵproperty("ngIf", ctx.showAddLoop);
|
|
185
|
-
} }, directives: [NgForOf, NgIf, NgTemplateOutlet, DefaultValueAccessor, DndDropzoneDirective, NgControlStatus, NgModel],
|
|
183
|
+
} }, directives: [NgForOf, NgIf, NgTemplateOutlet, DefaultValueAccessor, DndDropzoneDirective, NgControlStatus, NgModel], styles: [".subsection-element[_ngcontent-%COMP%]{background:#fff;border:1px solid #ccc;border-radius:5px;margin-top:10px;padding:5px 15px 15px}.subsection-element[_ngcontent-%COMP%]:first-child{margin-top:0!important}.btn-personal-edit[_ngcontent-%COMP%]{margin:5px 0}.subsection-item-title[_ngcontent-%COMP%]{align-items:center;background:#eee;border-bottom:1px solid #ccc;border-radius:5px 5px 0 0;display:flex;font-weight:700;justify-content:space-between;margin-bottom:5px;margin-left:-15px;margin-top:-5px;padding:7px 10px 7px 14px;width:calc(100% + 30px)}.subsection-item-title[_ngcontent-%COMP%] .fa-trash-alt[_ngcontent-%COMP%]{color:red;cursor:pointer}.subsection-item-title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700}.add-buttons[_ngcontent-%COMP%]{margin-top:5px}"] });
|
|
186
184
|
const ɵArraySessionComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(ArraySessionComponent);
|
|
187
185
|
/*@__PURE__*/ (function () { ɵsetClassMetadata(ArraySessionComponent, [{
|
|
188
186
|
type: Component,
|
|
@@ -193,10 +191,14 @@ const ɵArraySessionComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactor
|
|
|
193
191
|
}]
|
|
194
192
|
}], null, { label: [{
|
|
195
193
|
type: Input
|
|
196
|
-
}], showAddLoop: [{
|
|
197
|
-
type: Input
|
|
198
194
|
}], removeLabel: [{
|
|
199
195
|
type: Input
|
|
196
|
+
}], addItemLabel: [{
|
|
197
|
+
type: Input
|
|
198
|
+
}], addLoopLabel: [{
|
|
199
|
+
type: Input
|
|
200
|
+
}], showAddLoop: [{
|
|
201
|
+
type: Input
|
|
200
202
|
}], onAdd: [{
|
|
201
203
|
type: Output
|
|
202
204
|
}], onAddLoop: [{
|
|
@@ -212,10 +214,10 @@ function SchemaFormComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
212
214
|
ɵɵelementStart(1, "schema-input", 2);
|
|
213
215
|
ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_input_modelChange_1_listener($event) { ɵɵrestoreView(_r4); const ctx_r3 = ɵɵnextContext(); return ctx_r3.model = $event; });
|
|
214
216
|
ɵɵelementEnd();
|
|
215
|
-
ɵɵelementStart(2, "schema-object",
|
|
217
|
+
ɵɵelementStart(2, "schema-object", 3);
|
|
216
218
|
ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_object_modelChange_2_listener($event) { ɵɵrestoreView(_r4); const ctx_r5 = ɵɵnextContext(); return ctx_r5.model = $event; });
|
|
217
219
|
ɵɵelementEnd();
|
|
218
|
-
ɵɵelementStart(3, "schema-array",
|
|
220
|
+
ɵɵelementStart(3, "schema-array", 3);
|
|
219
221
|
ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_array_modelChange_3_listener($event) { ɵɵrestoreView(_r4); const ctx_r6 = ɵɵnextContext(); return ctx_r6.model = $event; });
|
|
220
222
|
ɵɵelementEnd();
|
|
221
223
|
ɵɵelementEnd();
|
|
@@ -224,15 +226,29 @@ function SchemaFormComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
224
226
|
const i_r2 = ctx.index;
|
|
225
227
|
const ctx_r0 = ɵɵnextContext();
|
|
226
228
|
ɵɵadvance(1);
|
|
227
|
-
ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
229
|
+
ɵɵ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);
|
|
228
230
|
ɵɵadvance(1);
|
|
229
|
-
ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
231
|
+
ɵɵ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);
|
|
230
232
|
ɵɵadvance(1);
|
|
231
|
-
ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
|
|
233
|
+
ɵɵ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);
|
|
232
234
|
} }
|
|
233
235
|
class SchemaFormComponent extends BaseSchemaComponent {
|
|
234
236
|
constructor() {
|
|
235
237
|
super(...arguments);
|
|
238
|
+
this.requiredLabel = '(required)';
|
|
239
|
+
this.addItemLabel = 'Add Item';
|
|
240
|
+
this.addLoopLabel = 'Add Loop';
|
|
241
|
+
this.additionalAttributesLabel = 'Additional Fields';
|
|
242
|
+
this.customAttributeRemoveLabel = 'Remove';
|
|
243
|
+
this.newCustomFieldNameLabel = 'Name';
|
|
244
|
+
this.newCustomFieldValueLabel = 'Value';
|
|
245
|
+
this.newCustomFieldAddLabel = 'Add';
|
|
246
|
+
this.newCustomFieldSaveLabel = 'Save';
|
|
247
|
+
this.newCustomFieldCancelLabel = 'Cancel';
|
|
248
|
+
this.selectPlaceHolderLabel = 'Select Item';
|
|
249
|
+
this.selectSearchPlaceHolderLabel = 'Search';
|
|
250
|
+
this.selectClearLabel = 'Clear';
|
|
251
|
+
this.selectNotFoundLabel = 'No Items Found';
|
|
236
252
|
this.schemas = [];
|
|
237
253
|
this.customProperties = false;
|
|
238
254
|
this.editing = false;
|
|
@@ -249,8 +265,8 @@ class SchemaFormComponent extends BaseSchemaComponent {
|
|
|
249
265
|
}
|
|
250
266
|
}
|
|
251
267
|
SchemaFormComponent.ɵfac = function SchemaFormComponent_Factory(t) { return ɵSchemaFormComponent_BaseFactory(t || SchemaFormComponent); };
|
|
252
|
-
SchemaFormComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaFormComponent, selectors: [["schema-form"]], inputs: { idPrefix: "idPrefix", schemas: "schemas", customProperties: "customProperties", editing: "editing", inputType: "inputType" }, features: [ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], [3, "idPrefix", "model", "schema", "editing", "index", "modelChange"]], template: function SchemaFormComponent_Template(rf, ctx) { if (rf & 1) {
|
|
253
|
-
ɵɵtemplate(0, SchemaFormComponent_div_0_Template, 4,
|
|
268
|
+
SchemaFormComponent.ɵcmp = ɵɵ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: [ɵɵ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) {
|
|
269
|
+
ɵɵtemplate(0, SchemaFormComponent_div_0_Template, 4, 48, "div", 0);
|
|
254
270
|
} if (rf & 2) {
|
|
255
271
|
ɵɵproperty("ngForOf", ctx.schemas);
|
|
256
272
|
} }, styles: [""] });
|
|
@@ -262,7 +278,35 @@ const ɵSchemaFormComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(
|
|
|
262
278
|
templateUrl: 'schema-form.html',
|
|
263
279
|
styleUrls: ['./schema-form.scss']
|
|
264
280
|
}]
|
|
265
|
-
}], null, {
|
|
281
|
+
}], null, { requiredLabel: [{
|
|
282
|
+
type: Input
|
|
283
|
+
}], addItemLabel: [{
|
|
284
|
+
type: Input
|
|
285
|
+
}], addLoopLabel: [{
|
|
286
|
+
type: Input
|
|
287
|
+
}], additionalAttributesLabel: [{
|
|
288
|
+
type: Input
|
|
289
|
+
}], customAttributeRemoveLabel: [{
|
|
290
|
+
type: Input
|
|
291
|
+
}], newCustomFieldNameLabel: [{
|
|
292
|
+
type: Input
|
|
293
|
+
}], newCustomFieldValueLabel: [{
|
|
294
|
+
type: Input
|
|
295
|
+
}], newCustomFieldAddLabel: [{
|
|
296
|
+
type: Input
|
|
297
|
+
}], newCustomFieldSaveLabel: [{
|
|
298
|
+
type: Input
|
|
299
|
+
}], newCustomFieldCancelLabel: [{
|
|
300
|
+
type: Input
|
|
301
|
+
}], selectPlaceHolderLabel: [{
|
|
302
|
+
type: Input
|
|
303
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
304
|
+
type: Input
|
|
305
|
+
}], selectClearLabel: [{
|
|
306
|
+
type: Input
|
|
307
|
+
}], selectNotFoundLabel: [{
|
|
308
|
+
type: Input
|
|
309
|
+
}], idPrefix: [{
|
|
266
310
|
type: Input
|
|
267
311
|
}], schemas: [{
|
|
268
312
|
type: Input
|
|
@@ -285,21 +329,21 @@ function SchemaCustomAttributesComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
285
329
|
ɵɵelementStart(4, "span", 9);
|
|
286
330
|
ɵɵlistener("click", function SchemaCustomAttributesComponent_div_0_Template_span_click_4_listener() { ɵɵrestoreView(_r8); const i_r6 = ctx.index; const ctx_r7 = ɵɵnextContext(); return ctx_r7.removeCustomAttribute(i_r6); });
|
|
287
331
|
ɵɵelement(5, "i", 10);
|
|
288
|
-
ɵɵpipe(6, "translate");
|
|
289
332
|
ɵɵelementEnd();
|
|
290
|
-
ɵɵelementStart(
|
|
291
|
-
ɵɵlistener("ngModelChange", function
|
|
333
|
+
ɵɵelementStart(6, "input", 11);
|
|
334
|
+
ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_0_Template_input_ngModelChange_6_listener($event) { ɵɵrestoreView(_r8); const attribute_r5 = ctx.$implicit; return attribute_r5.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_0_Template_input_dndDrop_6_listener($event) { ɵɵrestoreView(_r8); const attribute_r5 = ctx.$implicit; const ctx_r10 = ɵɵnextContext(); return ctx_r10.onDropAttr($event, attribute_r5); });
|
|
292
335
|
ɵɵelementEnd();
|
|
293
336
|
ɵɵelementEnd();
|
|
294
337
|
ɵɵelementEnd();
|
|
295
338
|
} if (rf & 2) {
|
|
296
339
|
const attribute_r5 = ctx.$implicit;
|
|
340
|
+
const ctx_r0 = ɵɵnextContext();
|
|
297
341
|
ɵɵadvance(3);
|
|
298
342
|
ɵɵtextInterpolate(attribute_r5.label);
|
|
299
343
|
ɵɵadvance(2);
|
|
300
|
-
ɵɵproperty("matTooltip",
|
|
301
|
-
ɵɵadvance(
|
|
302
|
-
ɵɵproperty("ngModel", attribute_r5.value)("ngModelOptions", ɵɵpureFunction0(
|
|
344
|
+
ɵɵproperty("matTooltip", ctx_r0.customAttributeRemoveLabel);
|
|
345
|
+
ɵɵadvance(1);
|
|
346
|
+
ɵɵproperty("ngModel", attribute_r5.value)("ngModelOptions", ɵɵpureFunction0(4, _c0$1));
|
|
303
347
|
} }
|
|
304
348
|
function SchemaCustomAttributesComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
305
349
|
const _r12 = ɵɵgetCurrentView();
|
|
@@ -308,27 +352,25 @@ function SchemaCustomAttributesComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
308
352
|
ɵɵelementStart(2, "div", 7);
|
|
309
353
|
ɵɵelementStart(3, "label", 8);
|
|
310
354
|
ɵɵtext(4);
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
ɵɵtext(7, "*");
|
|
355
|
+
ɵɵelementStart(5, "strong");
|
|
356
|
+
ɵɵtext(6, "*");
|
|
314
357
|
ɵɵelementEnd();
|
|
315
358
|
ɵɵelementEnd();
|
|
316
|
-
ɵɵelementStart(
|
|
317
|
-
ɵɵlistener("ngModelChange", function
|
|
359
|
+
ɵɵelementStart(7, "input", 14);
|
|
360
|
+
ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_7_listener($event) { ɵɵrestoreView(_r12); const ctx_r11 = ɵɵnextContext(); return ctx_r11.newCustomField.label = $event; });
|
|
318
361
|
ɵɵelementEnd();
|
|
319
362
|
ɵɵelementEnd();
|
|
320
363
|
ɵɵelementEnd();
|
|
321
|
-
ɵɵelementStart(
|
|
322
|
-
ɵɵelementStart(
|
|
323
|
-
ɵɵelementStart(
|
|
324
|
-
ɵɵtext(
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
ɵɵtext(15, "*");
|
|
364
|
+
ɵɵelementStart(8, "div", 13);
|
|
365
|
+
ɵɵelementStart(9, "div", 7);
|
|
366
|
+
ɵɵelementStart(10, "label", 8);
|
|
367
|
+
ɵɵtext(11);
|
|
368
|
+
ɵɵelementStart(12, "strong");
|
|
369
|
+
ɵɵtext(13, "*");
|
|
328
370
|
ɵɵelementEnd();
|
|
329
371
|
ɵɵelementEnd();
|
|
330
|
-
ɵɵelementStart(
|
|
331
|
-
ɵɵlistener("ngModelChange", function
|
|
372
|
+
ɵɵelementStart(14, "input", 11);
|
|
373
|
+
ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_14_listener($event) { ɵɵrestoreView(_r12); const ctx_r13 = ɵɵnextContext(); return ctx_r13.newCustomField.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_14_listener($event) { ɵɵrestoreView(_r12); const ctx_r14 = ɵɵnextContext(); return ctx_r14.onDropAttr($event, ctx_r14.newCustomField); });
|
|
332
374
|
ɵɵelementEnd();
|
|
333
375
|
ɵɵelementEnd();
|
|
334
376
|
ɵɵelementEnd();
|
|
@@ -336,50 +378,56 @@ function SchemaCustomAttributesComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
336
378
|
} if (rf & 2) {
|
|
337
379
|
const ctx_r1 = ɵɵnextContext();
|
|
338
380
|
ɵɵadvance(4);
|
|
339
|
-
ɵɵtextInterpolate(
|
|
340
|
-
ɵɵadvance(
|
|
341
|
-
ɵɵproperty("ngModel", ctx_r1.newCustomField.label)("ngModelOptions", ɵɵpureFunction0(
|
|
342
|
-
ɵɵadvance(4);
|
|
343
|
-
ɵɵtextInterpolate(ɵɵpipeBind1(13, 8, "STEP.VALUE"));
|
|
381
|
+
ɵɵtextInterpolate(ctx_r1.newCustomFieldNameLabel);
|
|
382
|
+
ɵɵadvance(3);
|
|
383
|
+
ɵɵproperty("ngModel", ctx_r1.newCustomField.label)("ngModelOptions", ɵɵpureFunction0(6, _c0$1));
|
|
344
384
|
ɵɵadvance(4);
|
|
345
|
-
|
|
385
|
+
ɵɵtextInterpolate(ctx_r1.newCustomFieldValueLabel);
|
|
386
|
+
ɵɵadvance(3);
|
|
387
|
+
ɵɵproperty("ngModel", ctx_r1.newCustomField.value)("ngModelOptions", ɵɵpureFunction0(7, _c0$1));
|
|
346
388
|
} }
|
|
347
389
|
function SchemaCustomAttributesComponent_button_4_Template(rf, ctx) { if (rf & 1) {
|
|
348
390
|
const _r16 = ɵɵgetCurrentView();
|
|
349
391
|
ɵɵelementStart(0, "button", 15);
|
|
350
392
|
ɵɵlistener("click", function SchemaCustomAttributesComponent_button_4_Template_button_click_0_listener() { ɵɵrestoreView(_r16); const ctx_r15 = ɵɵnextContext(); return ctx_r15.newCustomField = {}; });
|
|
351
393
|
ɵɵtext(1);
|
|
352
|
-
ɵɵpipe(2, "translate");
|
|
353
394
|
ɵɵelementEnd();
|
|
354
395
|
} if (rf & 2) {
|
|
396
|
+
const ctx_r2 = ɵɵnextContext();
|
|
355
397
|
ɵɵadvance(1);
|
|
356
|
-
ɵɵtextInterpolate1(" ",
|
|
398
|
+
ɵɵtextInterpolate1(" ", ctx_r2.newCustomFieldAddLabel, " ");
|
|
357
399
|
} }
|
|
358
400
|
function SchemaCustomAttributesComponent_button_5_Template(rf, ctx) { if (rf & 1) {
|
|
359
401
|
const _r18 = ɵɵgetCurrentView();
|
|
360
402
|
ɵɵelementStart(0, "button", 16);
|
|
361
403
|
ɵɵlistener("click", function SchemaCustomAttributesComponent_button_5_Template_button_click_0_listener() { ɵɵrestoreView(_r18); const ctx_r17 = ɵɵnextContext(); return ctx_r17.newCustomField = null; });
|
|
362
404
|
ɵɵtext(1);
|
|
363
|
-
ɵɵpipe(2, "translate");
|
|
364
405
|
ɵɵelementEnd();
|
|
365
406
|
} if (rf & 2) {
|
|
407
|
+
const ctx_r3 = ɵɵnextContext();
|
|
366
408
|
ɵɵadvance(1);
|
|
367
|
-
ɵɵtextInterpolate1(" ",
|
|
409
|
+
ɵɵtextInterpolate1(" ", ctx_r3.newCustomFieldCancelLabel, " ");
|
|
368
410
|
} }
|
|
369
411
|
function SchemaCustomAttributesComponent_button_6_Template(rf, ctx) { if (rf & 1) {
|
|
370
412
|
const _r20 = ɵɵgetCurrentView();
|
|
371
413
|
ɵɵelementStart(0, "button", 15);
|
|
372
414
|
ɵɵlistener("click", function SchemaCustomAttributesComponent_button_6_Template_button_click_0_listener() { ɵɵrestoreView(_r20); const ctx_r19 = ɵɵnextContext(); return ctx_r19.saveNewAttribute(ctx_r19.newCustomField); });
|
|
373
415
|
ɵɵtext(1);
|
|
374
|
-
ɵɵpipe(2, "translate");
|
|
375
416
|
ɵɵelementEnd();
|
|
376
417
|
} if (rf & 2) {
|
|
418
|
+
const ctx_r4 = ɵɵnextContext();
|
|
377
419
|
ɵɵadvance(1);
|
|
378
|
-
ɵɵtextInterpolate1(" ",
|
|
420
|
+
ɵɵtextInterpolate1(" ", ctx_r4.newCustomFieldSaveLabel, " ");
|
|
379
421
|
} }
|
|
380
422
|
class SchemaCustomAttributesComponent extends BaseSchemaComponent {
|
|
381
423
|
constructor() {
|
|
382
424
|
super(...arguments);
|
|
425
|
+
this.customAttributeRemoveLabel = 'Remove';
|
|
426
|
+
this.newCustomFieldNameLabel = 'Name';
|
|
427
|
+
this.newCustomFieldValueLabel = 'Value';
|
|
428
|
+
this.newCustomFieldAddLabel = 'Add';
|
|
429
|
+
this.newCustomFieldSaveLabel = 'Save';
|
|
430
|
+
this.newCustomFieldCancelLabel = 'Cancel';
|
|
383
431
|
this.onSaveAttribute = new EventEmitter();
|
|
384
432
|
this.onDropOnAttribute = new EventEmitter();
|
|
385
433
|
}
|
|
@@ -406,14 +454,14 @@ class SchemaCustomAttributesComponent extends BaseSchemaComponent {
|
|
|
406
454
|
}
|
|
407
455
|
}
|
|
408
456
|
SchemaCustomAttributesComponent.ɵfac = function SchemaCustomAttributesComponent_Factory(t) { return ɵSchemaCustomAttributesComponent_BaseFactory(t || SchemaCustomAttributesComponent); };
|
|
409
|
-
SchemaCustomAttributesComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaCustomAttributesComponent, selectors: [["schema-custom-attributes"]], inputs: { onDropFunction: "onDropFunction" }, outputs: { onSaveAttribute: "onSaveAttribute", onDropOnAttribute: "onDropOnAttribute" }, features: [ɵɵInheritDefinitionFeature], decls: 7, vars: 5, consts: [["class", "row custom-attributes", 4, "ngFor", "ngForOf"], ["class", "struct-custom-field", 4, "ngIf"], [1, "row", "actions-buttons"], [1, "col-md-12", "pull-right"], ["class", "btn btn-outline-primary float-left", 3, "click", 4, "ngIf"], ["class", "btn btn-outline-danger float-left ml-2", 3, "click", 4, "ngIf"], [1, "row", "custom-attributes"], [1, "col-md-12"], [1, "info-label"], [1, "customAttributeDeleteIcon", 3, "click"], [1, "far", "fa-trash-alt", 3, "matTooltip"], ["dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange", "dndDrop"], [1, "struct-custom-field"], [1, "row"], [1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange"], [1, "btn", "btn-outline-primary", "float-left", 3, "click"], [1, "btn", "btn-outline-danger", "float-left", "ml-2", 3, "click"]], template: function SchemaCustomAttributesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
410
|
-
ɵɵtemplate(0, SchemaCustomAttributesComponent_div_0_Template,
|
|
411
|
-
ɵɵtemplate(1, SchemaCustomAttributesComponent_div_1_Template,
|
|
457
|
+
SchemaCustomAttributesComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaCustomAttributesComponent, selectors: [["schema-custom-attributes"]], inputs: { onDropFunction: "onDropFunction", customAttributeRemoveLabel: "customAttributeRemoveLabel", newCustomFieldNameLabel: "newCustomFieldNameLabel", newCustomFieldValueLabel: "newCustomFieldValueLabel", newCustomFieldAddLabel: "newCustomFieldAddLabel", newCustomFieldSaveLabel: "newCustomFieldSaveLabel", newCustomFieldCancelLabel: "newCustomFieldCancelLabel" }, outputs: { onSaveAttribute: "onSaveAttribute", onDropOnAttribute: "onDropOnAttribute" }, features: [ɵɵInheritDefinitionFeature], decls: 7, vars: 5, consts: [["class", "row custom-attributes", 4, "ngFor", "ngForOf"], ["class", "struct-custom-field", 4, "ngIf"], [1, "row", "actions-buttons"], [1, "col-md-12", "pull-right"], ["class", "btn btn-outline-primary float-left", 3, "click", 4, "ngIf"], ["class", "btn btn-outline-danger float-left ml-2", 3, "click", 4, "ngIf"], [1, "row", "custom-attributes"], [1, "col-md-12"], [1, "info-label"], [1, "customAttributeDeleteIcon", 3, "click"], [1, "far", "fa-trash-alt", 3, "matTooltip"], ["dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange", "dndDrop"], [1, "struct-custom-field"], [1, "row"], [1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange"], [1, "btn", "btn-outline-primary", "float-left", 3, "click"], [1, "btn", "btn-outline-danger", "float-left", "ml-2", 3, "click"]], template: function SchemaCustomAttributesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
458
|
+
ɵɵtemplate(0, SchemaCustomAttributesComponent_div_0_Template, 7, 5, "div", 0);
|
|
459
|
+
ɵɵtemplate(1, SchemaCustomAttributesComponent_div_1_Template, 15, 8, "div", 1);
|
|
412
460
|
ɵɵelementStart(2, "div", 2);
|
|
413
461
|
ɵɵelementStart(3, "div", 3);
|
|
414
|
-
ɵɵtemplate(4, SchemaCustomAttributesComponent_button_4_Template,
|
|
415
|
-
ɵɵtemplate(5, SchemaCustomAttributesComponent_button_5_Template,
|
|
416
|
-
ɵɵtemplate(6, SchemaCustomAttributesComponent_button_6_Template,
|
|
462
|
+
ɵɵtemplate(4, SchemaCustomAttributesComponent_button_4_Template, 2, 1, "button", 4);
|
|
463
|
+
ɵɵtemplate(5, SchemaCustomAttributesComponent_button_5_Template, 2, 1, "button", 5);
|
|
464
|
+
ɵɵtemplate(6, SchemaCustomAttributesComponent_button_6_Template, 2, 1, "button", 4);
|
|
417
465
|
ɵɵelementEnd();
|
|
418
466
|
ɵɵelementEnd();
|
|
419
467
|
} if (rf & 2) {
|
|
@@ -426,7 +474,7 @@ SchemaCustomAttributesComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaCustom
|
|
|
426
474
|
ɵɵproperty("ngIf", ctx.newCustomField);
|
|
427
475
|
ɵɵadvance(1);
|
|
428
476
|
ɵɵproperty("ngIf", ctx.newCustomField && ctx.newCustomField.label && ctx.newCustomField.value);
|
|
429
|
-
} }, directives: [NgForOf, NgIf, MatTooltip, DefaultValueAccessor, DndDropzoneDirective, NgControlStatus, NgModel],
|
|
477
|
+
} }, directives: [NgForOf, NgIf, MatTooltip, DefaultValueAccessor, DndDropzoneDirective, NgControlStatus, NgModel], styles: [".customAttributeDeleteIcon[_ngcontent-%COMP%]{color:red;cursor:pointer;font-size:16px;position:absolute;right:15px;top:4px}.customAttributeDeleteIcon[_ngcontent-%COMP%]:hover{color:#777}.struct-custom-field[_ngcontent-%COMP%]{background-color:#ececec;margin-top:16px;padding:8px 16px 16px}"] });
|
|
430
478
|
const ɵSchemaCustomAttributesComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(SchemaCustomAttributesComponent);
|
|
431
479
|
/*@__PURE__*/ (function () { ɵsetClassMetadata(SchemaCustomAttributesComponent, [{
|
|
432
480
|
type: Component,
|
|
@@ -437,6 +485,18 @@ const ɵSchemaCustomAttributesComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInher
|
|
|
437
485
|
}]
|
|
438
486
|
}], null, { onDropFunction: [{
|
|
439
487
|
type: Input
|
|
488
|
+
}], customAttributeRemoveLabel: [{
|
|
489
|
+
type: Input
|
|
490
|
+
}], newCustomFieldNameLabel: [{
|
|
491
|
+
type: Input
|
|
492
|
+
}], newCustomFieldValueLabel: [{
|
|
493
|
+
type: Input
|
|
494
|
+
}], newCustomFieldAddLabel: [{
|
|
495
|
+
type: Input
|
|
496
|
+
}], newCustomFieldSaveLabel: [{
|
|
497
|
+
type: Input
|
|
498
|
+
}], newCustomFieldCancelLabel: [{
|
|
499
|
+
type: Input
|
|
440
500
|
}], onSaveAttribute: [{
|
|
441
501
|
type: Output
|
|
442
502
|
}], onDropOnAttribute: [{
|
|
@@ -451,7 +511,7 @@ function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template(rf, ctx
|
|
|
451
511
|
} if (rf & 2) {
|
|
452
512
|
const item_r3 = ɵɵnextContext().$implicit;
|
|
453
513
|
const ctx_r4 = ɵɵnextContext(2);
|
|
454
|
-
ɵɵproperty("idPrefix", ctx_r4.idPrefix)("model", ctx_r4.model[ctx_r4.schema.id][item_r3.index].mappingAttributes)("schemas", ctx_r4.getSchemaProperties())("editing", ctx_r4.editing);
|
|
514
|
+
ɵɵ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);
|
|
455
515
|
} }
|
|
456
516
|
function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template(rf, ctx) { if (rf & 1) {
|
|
457
517
|
const _r12 = ɵɵgetCurrentView();
|
|
@@ -461,7 +521,7 @@ function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template(rf, ctx
|
|
|
461
521
|
} if (rf & 2) {
|
|
462
522
|
const item_r3 = ɵɵnextContext().$implicit;
|
|
463
523
|
const ctx_r5 = ɵɵnextContext(2);
|
|
464
|
-
ɵɵproperty("idPrefix", ctx_r5.idPrefix)("model", ctx_r5.model[ctx_r5.schema.id][item_r3.index])("schemas", ctx_r5.getSchemaProperties())("editing", ctx_r5.editing);
|
|
524
|
+
ɵɵ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);
|
|
465
525
|
} }
|
|
466
526
|
function SchemaArrayComponent_div_0_ng_template_2_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
467
527
|
const _r16 = ɵɵgetCurrentView();
|
|
@@ -469,10 +529,9 @@ function SchemaArrayComponent_div_0_ng_template_2_div_2_Template(rf, ctx) { if (
|
|
|
469
529
|
ɵɵelementStart(1, "div", 6);
|
|
470
530
|
ɵɵelementStart(2, "label", 7);
|
|
471
531
|
ɵɵtext(3);
|
|
472
|
-
ɵɵpipe(4, "translate");
|
|
473
532
|
ɵɵelementEnd();
|
|
474
|
-
ɵɵelementStart(
|
|
475
|
-
ɵɵlistener("modelChange", function
|
|
533
|
+
ɵɵelementStart(4, "schema-custom-attributes", 8);
|
|
534
|
+
ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_div_2_Template_schema_custom_attributes_modelChange_4_listener($event) { ɵɵrestoreView(_r16); const item_r3 = ɵɵnextContext().$implicit; const ctx_r15 = ɵɵnextContext(2); return ctx_r15.model[ctx_r15.schema.id][item_r3.index].customAttributes = $event; });
|
|
476
535
|
ɵɵelementEnd();
|
|
477
536
|
ɵɵelementEnd();
|
|
478
537
|
ɵɵelementEnd();
|
|
@@ -480,14 +539,14 @@ function SchemaArrayComponent_div_0_ng_template_2_div_2_Template(rf, ctx) { if (
|
|
|
480
539
|
const item_r3 = ɵɵnextContext().$implicit;
|
|
481
540
|
const ctx_r6 = ɵɵnextContext(2);
|
|
482
541
|
ɵɵadvance(3);
|
|
483
|
-
ɵɵtextInterpolate(
|
|
484
|
-
ɵɵadvance(
|
|
485
|
-
ɵɵproperty("model", ctx_r6.model[ctx_r6.schema.id][item_r3.index].customAttributes)("onDropFunction", ctx_r6.onDrop);
|
|
542
|
+
ɵɵtextInterpolate(ctx_r6.additionalAttributesLabel);
|
|
543
|
+
ɵɵadvance(1);
|
|
544
|
+
ɵɵ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);
|
|
486
545
|
} }
|
|
487
546
|
function SchemaArrayComponent_div_0_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
488
|
-
ɵɵtemplate(0, SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template, 1,
|
|
489
|
-
ɵɵtemplate(1, SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template, 1,
|
|
490
|
-
ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_div_2_Template,
|
|
547
|
+
ɵɵtemplate(0, SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template, 1, 18, "schema-form", 2);
|
|
548
|
+
ɵɵtemplate(1, SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template, 1, 18, "schema-form", 2);
|
|
549
|
+
ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_div_2_Template, 5, 9, "div", 3);
|
|
491
550
|
} if (rf & 2) {
|
|
492
551
|
const item_r3 = ctx.$implicit;
|
|
493
552
|
const ctx_r2 = ɵɵnextContext(2);
|
|
@@ -508,23 +567,23 @@ function SchemaArrayComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
508
567
|
} if (rf & 2) {
|
|
509
568
|
const ctx_r0 = ɵɵnextContext();
|
|
510
569
|
ɵɵadvance(1);
|
|
511
|
-
ɵɵproperty("label", ctx_r0.schema.title)("removeLabel", ctx_r0.schema.title)("model", ctx_r0.model[ctx_r0.schema.id])("showAddLoop", ctx_r0.schema.withoutLoop !== true);
|
|
570
|
+
ɵɵ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);
|
|
512
571
|
} }
|
|
513
572
|
const _c0$2 = function () { return { standalone: true }; };
|
|
514
|
-
function
|
|
573
|
+
function SchemaArrayComponent_div_1_ng_template_2_input_2_Template(rf, ctx) { if (rf & 1) {
|
|
515
574
|
const _r30 = ɵɵgetCurrentView();
|
|
516
575
|
ɵɵelementStart(0, "input", 12);
|
|
517
|
-
ɵɵlistener("ngModelChange", function
|
|
576
|
+
ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_input_2_Template_input_ngModelChange_0_listener($event) { ɵɵrestoreView(_r30); const item_r24 = ɵɵnextContext().$implicit; return item_r24.items[item_r24.index].mappingAttributes = $event; })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_input_2_Template_input_dndDrop_0_listener($event) { ɵɵrestoreView(_r30); const item_r24 = ɵɵnextContext().$implicit; const ctx_r31 = ɵɵnextContext(2); return item_r24.items[item_r24.index].mappingAttributes = ctx_r31.onDrop($event, item_r24.items[item_r24.index].mappingAttributes); });
|
|
518
577
|
ɵɵelementEnd();
|
|
519
578
|
} if (rf & 2) {
|
|
520
579
|
const item_r24 = ɵɵnextContext().$implicit;
|
|
521
580
|
const ctx_r25 = ɵɵnextContext(2);
|
|
522
581
|
ɵɵproperty("ngModel", item_r24.items[item_r24.index].mappingAttributes)("ngModelOptions", ɵɵpureFunction0(3, _c0$2))("id", ctx_r25.getId(ctx_r25.index) + "-" + item_r24.index);
|
|
523
582
|
} }
|
|
524
|
-
function
|
|
583
|
+
function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
525
584
|
const _r36 = ɵɵgetCurrentView();
|
|
526
585
|
ɵɵelementStart(0, "input", 12);
|
|
527
|
-
ɵɵlistener("ngModelChange", function
|
|
586
|
+
ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template_input_ngModelChange_0_listener($event) { ɵɵrestoreView(_r36); const item_r24 = ɵɵnextContext().$implicit; return (item_r24.items[item_r24.index] = $event); })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template_input_dndDrop_0_listener($event) { ɵɵrestoreView(_r36); const item_r24 = ɵɵnextContext().$implicit; const ctx_r37 = ɵɵnextContext(2); return (item_r24.items[item_r24.index] = ctx_r37.onDrop($event, item_r24.items[item_r24.index])); });
|
|
528
587
|
ɵɵelementEnd();
|
|
529
588
|
} if (rf & 2) {
|
|
530
589
|
const item_r24 = ɵɵnextContext().$implicit;
|
|
@@ -534,18 +593,17 @@ function SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template(rf, ctx
|
|
|
534
593
|
function SchemaArrayComponent_div_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
535
594
|
ɵɵelementStart(0, "label", 9);
|
|
536
595
|
ɵɵtext(1);
|
|
537
|
-
ɵɵpipe(2, "translate");
|
|
538
596
|
ɵɵelementEnd();
|
|
539
|
-
ɵɵtemplate(
|
|
540
|
-
ɵɵtemplate(
|
|
597
|
+
ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_input_2_Template, 1, 4, "input", 10);
|
|
598
|
+
ɵɵtemplate(3, SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template, 1, 4, "ng-template", null, 11, ɵɵtemplateRefExtractor);
|
|
541
599
|
} if (rf & 2) {
|
|
542
600
|
const item_r24 = ctx.$implicit;
|
|
543
|
-
const _r26 = ɵɵreference(
|
|
601
|
+
const _r26 = ɵɵreference(4);
|
|
544
602
|
const ctx_r23 = ɵɵnextContext(2);
|
|
545
603
|
ɵɵproperty("htmlFor", ctx_r23.getId(ctx_r23.index) + "-" + item_r24.index);
|
|
546
604
|
ɵɵadvance(1);
|
|
547
|
-
ɵɵtextInterpolate(
|
|
548
|
-
ɵɵadvance(
|
|
605
|
+
ɵɵtextInterpolate(ctx_r23.schema.title);
|
|
606
|
+
ɵɵadvance(1);
|
|
549
607
|
ɵɵproperty("ngIf", item_r24.items[item_r24.index].mappingAttributes || item_r24.items[item_r24.index].mappingAttributes === "")("ngIfElse", _r26);
|
|
550
608
|
} }
|
|
551
609
|
function SchemaArrayComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -553,17 +611,31 @@ function SchemaArrayComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
553
611
|
ɵɵelementStart(0, "div");
|
|
554
612
|
ɵɵelementStart(1, "array-session", 1);
|
|
555
613
|
ɵɵlistener("modelChange", function SchemaArrayComponent_div_1_Template_array_session_modelChange_1_listener($event) { ɵɵrestoreView(_r41); const ctx_r40 = ɵɵnextContext(); return (ctx_r40.model[ctx_r40.schema.id] = $event); })("onAdd", function SchemaArrayComponent_div_1_Template_array_session_onAdd_1_listener() { ɵɵrestoreView(_r41); const ctx_r42 = ɵɵnextContext(); return ctx_r42.addArrayItem(ctx_r42.schema.id, ""); })("onAddLoop", function SchemaArrayComponent_div_1_Template_array_session_onAddLoop_1_listener() { ɵɵrestoreView(_r41); const ctx_r43 = ɵɵnextContext(); return ctx_r43.addArrayLoop(ctx_r43.schema.id, ""); });
|
|
556
|
-
ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_Template,
|
|
614
|
+
ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_Template, 5, 4, "ng-template");
|
|
557
615
|
ɵɵelementEnd();
|
|
558
616
|
ɵɵelementEnd();
|
|
559
617
|
} if (rf & 2) {
|
|
560
618
|
const ctx_r1 = ɵɵnextContext();
|
|
561
619
|
ɵɵadvance(1);
|
|
562
|
-
ɵɵproperty("label", ctx_r1.schema.title)("removeLabel", ctx_r1.schema.title)("model", ctx_r1.model[ctx_r1.schema.id])("showAddLoop", ctx_r1.schema.withoutLoop !== true);
|
|
620
|
+
ɵɵ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);
|
|
563
621
|
} }
|
|
564
622
|
class SchemaArrayComponent extends BaseSchemaComponent {
|
|
565
623
|
constructor() {
|
|
566
624
|
super(...arguments);
|
|
625
|
+
this.requiredLabel = '(required)';
|
|
626
|
+
this.addItemLabel = 'Add Item';
|
|
627
|
+
this.addLoopLabel = 'Add Loop';
|
|
628
|
+
this.additionalAttributesLabel = 'Additional Fields';
|
|
629
|
+
this.customAttributeRemoveLabel = 'Remove';
|
|
630
|
+
this.newCustomFieldNameLabel = 'Name';
|
|
631
|
+
this.newCustomFieldValueLabel = 'Value';
|
|
632
|
+
this.newCustomFieldAddLabel = 'Add';
|
|
633
|
+
this.newCustomFieldSaveLabel = 'Save';
|
|
634
|
+
this.newCustomFieldCancelLabel = 'Cancel';
|
|
635
|
+
this.selectPlaceHolderLabel = 'Select Item';
|
|
636
|
+
this.selectSearchPlaceHolderLabel = 'Search';
|
|
637
|
+
this.selectClearLabel = 'Clear';
|
|
638
|
+
this.selectNotFoundLabel = 'No Items Found';
|
|
567
639
|
this.editing = false;
|
|
568
640
|
}
|
|
569
641
|
ngAfterContentInit() {
|
|
@@ -601,14 +673,14 @@ class SchemaArrayComponent extends BaseSchemaComponent {
|
|
|
601
673
|
}
|
|
602
674
|
}
|
|
603
675
|
SchemaArrayComponent.ɵfac = function SchemaArrayComponent_Factory(t) { return ɵSchemaArrayComponent_BaseFactory(t || SchemaArrayComponent); };
|
|
604
|
-
SchemaArrayComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaArrayComponent, selectors: [["schema-array"]], inputs: { idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "label", "removeLabel", "model", "showAddLoop", "modelChange", "onAdd", "onAddLoop"], [3, "idPrefix", "model", "schemas", "editing", "modelChange", 4, "ngIf"], ["class", "row struct-custom-properties", 4, "ngIf"], [3, "idPrefix", "model", "schemas", "editing", "modelChange"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "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) {
|
|
605
|
-
ɵɵtemplate(0, SchemaArrayComponent_div_0_Template, 3,
|
|
606
|
-
ɵɵtemplate(1, SchemaArrayComponent_div_1_Template, 3,
|
|
676
|
+
SchemaArrayComponent.ɵcmp = ɵɵ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: [ɵɵ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) {
|
|
677
|
+
ɵɵtemplate(0, SchemaArrayComponent_div_0_Template, 3, 6, "div", 0);
|
|
678
|
+
ɵɵtemplate(1, SchemaArrayComponent_div_1_Template, 3, 6, "div", 0);
|
|
607
679
|
} if (rf & 2) {
|
|
608
680
|
ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && ctx.schema.properties);
|
|
609
681
|
ɵɵadvance(1);
|
|
610
682
|
ɵɵproperty("ngIf", ctx.schema && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && !ctx.schema.properties);
|
|
611
|
-
} }, directives: [NgIf, ArraySessionComponent, SchemaFormComponent, SchemaCustomAttributesComponent, DefaultValueAccessor, DndDropzoneDirective, NgControlStatus, NgModel],
|
|
683
|
+
} }, directives: [NgIf, ArraySessionComponent, SchemaFormComponent, SchemaCustomAttributesComponent, DefaultValueAccessor, DndDropzoneDirective, NgControlStatus, NgModel], styles: [""] });
|
|
612
684
|
const ɵSchemaArrayComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(SchemaArrayComponent);
|
|
613
685
|
/*@__PURE__*/ (function () { ɵsetClassMetadata(SchemaArrayComponent, [{
|
|
614
686
|
type: Component,
|
|
@@ -617,7 +689,35 @@ const ɵSchemaArrayComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory
|
|
|
617
689
|
templateUrl: 'schema-array.html',
|
|
618
690
|
styleUrls: ['./schema-array.scss']
|
|
619
691
|
}]
|
|
620
|
-
}], null, {
|
|
692
|
+
}], null, { requiredLabel: [{
|
|
693
|
+
type: Input
|
|
694
|
+
}], addItemLabel: [{
|
|
695
|
+
type: Input
|
|
696
|
+
}], addLoopLabel: [{
|
|
697
|
+
type: Input
|
|
698
|
+
}], additionalAttributesLabel: [{
|
|
699
|
+
type: Input
|
|
700
|
+
}], customAttributeRemoveLabel: [{
|
|
701
|
+
type: Input
|
|
702
|
+
}], newCustomFieldNameLabel: [{
|
|
703
|
+
type: Input
|
|
704
|
+
}], newCustomFieldValueLabel: [{
|
|
705
|
+
type: Input
|
|
706
|
+
}], newCustomFieldAddLabel: [{
|
|
707
|
+
type: Input
|
|
708
|
+
}], newCustomFieldSaveLabel: [{
|
|
709
|
+
type: Input
|
|
710
|
+
}], newCustomFieldCancelLabel: [{
|
|
711
|
+
type: Input
|
|
712
|
+
}], selectPlaceHolderLabel: [{
|
|
713
|
+
type: Input
|
|
714
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
715
|
+
type: Input
|
|
716
|
+
}], selectClearLabel: [{
|
|
717
|
+
type: Input
|
|
718
|
+
}], selectNotFoundLabel: [{
|
|
719
|
+
type: Input
|
|
720
|
+
}], idPrefix: [{
|
|
621
721
|
type: Input
|
|
622
722
|
}], schema: [{
|
|
623
723
|
type: Input
|
|
@@ -628,53 +728,54 @@ const ɵSchemaArrayComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory
|
|
|
628
728
|
}] }); })();
|
|
629
729
|
|
|
630
730
|
const _c0$3 = function (a0) { return { "has-error": a0 }; };
|
|
631
|
-
function
|
|
731
|
+
function FieldRenderComponent_small_3_Template(rf, ctx) { if (rf & 1) {
|
|
632
732
|
ɵɵelementStart(0, "small", 0);
|
|
633
|
-
ɵɵtext(1
|
|
733
|
+
ɵɵtext(1);
|
|
634
734
|
ɵɵelementEnd();
|
|
635
735
|
} if (rf & 2) {
|
|
636
736
|
const ctx_r0 = ɵɵnextContext();
|
|
637
|
-
ɵɵproperty("ngClass", ɵɵpureFunction1(
|
|
737
|
+
ɵɵproperty("ngClass", ɵɵpureFunction1(2, _c0$3, ctx_r0.state && !ctx_r0.state.valid && ctx_r0.state.errors));
|
|
738
|
+
ɵɵadvance(1);
|
|
739
|
+
ɵɵtextInterpolate(ctx_r0.requiredLabel);
|
|
638
740
|
} }
|
|
639
|
-
function
|
|
741
|
+
function FieldRenderComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
640
742
|
ɵɵelementStart(0, "span", 4);
|
|
641
|
-
|
|
642
|
-
ɵɵelement(2, "i", 5);
|
|
743
|
+
ɵɵelement(1, "i", 5);
|
|
643
744
|
ɵɵelementEnd();
|
|
644
745
|
} if (rf & 2) {
|
|
645
746
|
const ctx_r1 = ɵɵnextContext();
|
|
646
|
-
ɵɵpropertyInterpolate("matTooltip",
|
|
747
|
+
ɵɵpropertyInterpolate("matTooltip", ctx_r1.tooltip);
|
|
647
748
|
} }
|
|
648
749
|
const _c1$1 = ["*"];
|
|
649
750
|
class FieldRenderComponent {
|
|
650
751
|
constructor() {
|
|
752
|
+
this.requiredLabel = '(required)';
|
|
651
753
|
this.label = '';
|
|
652
754
|
this.required = true;
|
|
653
755
|
}
|
|
654
756
|
}
|
|
655
757
|
FieldRenderComponent.ɵfac = function FieldRenderComponent_Factory(t) { return new (t || FieldRenderComponent)(); };
|
|
656
|
-
FieldRenderComponent.ɵcmp = ɵɵdefineComponent({ type: FieldRenderComponent, selectors: [["field-render"]], inputs: { label: "label", inputId: "inputId", tooltip: "tooltip", required: "required", state: "state" }, ngContentSelectors: _c1$1, decls:
|
|
758
|
+
FieldRenderComponent.ɵcmp = ɵɵdefineComponent({ type: FieldRenderComponent, selectors: [["field-render"]], inputs: { requiredLabel: "requiredLabel", label: "label", inputId: "inputId", tooltip: "tooltip", required: "required", state: "state" }, ngContentSelectors: _c1$1, 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) {
|
|
657
759
|
ɵɵprojectionDef();
|
|
658
760
|
ɵɵelementStart(0, "div", 0);
|
|
659
761
|
ɵɵelementStart(1, "label", 1);
|
|
660
762
|
ɵɵtext(2);
|
|
661
|
-
|
|
662
|
-
ɵɵtemplate(4,
|
|
663
|
-
ɵɵtemplate(5, FieldRenderComponent_span_5_Template, 3, 3, "span", 3);
|
|
763
|
+
ɵɵtemplate(3, FieldRenderComponent_small_3_Template, 2, 4, "small", 2);
|
|
764
|
+
ɵɵtemplate(4, FieldRenderComponent_span_4_Template, 2, 1, "span", 3);
|
|
664
765
|
ɵɵelementEnd();
|
|
665
|
-
ɵɵprojection(
|
|
766
|
+
ɵɵprojection(5);
|
|
666
767
|
ɵɵelementEnd();
|
|
667
768
|
} if (rf & 2) {
|
|
668
|
-
ɵɵproperty("ngClass", ɵɵpureFunction1(
|
|
769
|
+
ɵɵproperty("ngClass", ɵɵpureFunction1(5, _c0$3, ctx.state && !ctx.state.valid && (!ctx.state.pristine || ctx.state.touched) && ctx.state.errors));
|
|
669
770
|
ɵɵadvance(1);
|
|
670
771
|
ɵɵproperty("htmlFor", ctx.inputId);
|
|
671
772
|
ɵɵadvance(1);
|
|
672
|
-
ɵɵtextInterpolate1(" ",
|
|
673
|
-
ɵɵadvance(
|
|
773
|
+
ɵɵtextInterpolate1(" ", ctx.label, " ");
|
|
774
|
+
ɵɵadvance(1);
|
|
674
775
|
ɵɵproperty("ngIf", ctx.required);
|
|
675
776
|
ɵɵadvance(1);
|
|
676
777
|
ɵɵproperty("ngIf", ctx.tooltip);
|
|
677
|
-
} }, directives: [NgClass, NgIf, MatTooltip],
|
|
778
|
+
} }, directives: [NgClass, NgIf, MatTooltip], styles: [".info-icon[_ngcontent-%COMP%]{color:#222d57;float:right;font-size:13px;margin-left:4px}"] });
|
|
678
779
|
/*@__PURE__*/ (function () { ɵsetClassMetadata(FieldRenderComponent, [{
|
|
679
780
|
type: Component,
|
|
680
781
|
args: [{
|
|
@@ -682,7 +783,9 @@ FieldRenderComponent.ɵcmp = ɵɵdefineComponent({ type: FieldRenderComponent, s
|
|
|
682
783
|
templateUrl: 'field-render.html',
|
|
683
784
|
styleUrls: ['field-render.scss']
|
|
684
785
|
}]
|
|
685
|
-
}], null, {
|
|
786
|
+
}], null, { requiredLabel: [{
|
|
787
|
+
type: Input
|
|
788
|
+
}], label: [{
|
|
686
789
|
type: Input
|
|
687
790
|
}], inputId: [{
|
|
688
791
|
type: Input
|
|
@@ -797,14 +900,10 @@ function InputRenderComponent_select_box_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
797
900
|
const _r9 = ɵɵgetCurrentView();
|
|
798
901
|
ɵɵelementStart(0, "select-box", 5);
|
|
799
902
|
ɵɵlistener("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { ɵɵrestoreView(_r9); const ctx_r8 = ɵɵnextContext(); return ctx_r8.value = $event; })("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { ɵɵrestoreView(_r9); const ctx_r10 = ɵɵnextContext(); return ctx_r10.onChange($event.key); });
|
|
800
|
-
ɵɵpipe(1, "translate");
|
|
801
|
-
ɵɵpipe(2, "translate");
|
|
802
|
-
ɵɵpipe(3, "translate");
|
|
803
|
-
ɵɵpipe(4, "translate");
|
|
804
903
|
ɵɵelementEnd();
|
|
805
904
|
} if (rf & 2) {
|
|
806
905
|
const ctx_r1 = ɵɵnextContext();
|
|
807
|
-
ɵɵproperty("id", ctx_r1.inputId)("ngModel", ctx_r1.value)("ngModelOptions", ɵɵpureFunction0(
|
|
906
|
+
ɵɵproperty("id", ctx_r1.inputId)("ngModel", ctx_r1.value)("ngModelOptions", ɵɵpureFunction0(12, _c0$6))("placeholder", ctx_r1.schema.description || ctx_r1.selectPlaceHolderLabel)("searchPlaceHolder", ctx_r1.selectSearchPlaceHolderLabel)("clearText", ctx_r1.selectClearLabel)("notFoundText", ctx_r1.selectNotFoundLabel)("bindKey", "key")("bindValue", "value")("enabledSearch", true)("limitItens", 30)("data", ctx_r1.schema.options);
|
|
808
907
|
} }
|
|
809
908
|
function InputRenderComponent_number_input_3_Template(rf, ctx) { if (rf & 1) {
|
|
810
909
|
const _r12 = ɵɵgetCurrentView();
|
|
@@ -827,6 +926,10 @@ function InputRenderComponent_boolean_input_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
827
926
|
class InputRenderComponent extends BaseSchemaComponent {
|
|
828
927
|
constructor() {
|
|
829
928
|
super(...arguments);
|
|
929
|
+
this.selectPlaceHolderLabel = 'Select Item';
|
|
930
|
+
this.selectSearchPlaceHolderLabel = 'Search';
|
|
931
|
+
this.selectClearLabel = 'Clear';
|
|
932
|
+
this.selectNotFoundLabel = 'No Items Found';
|
|
830
933
|
this.schema = {};
|
|
831
934
|
this.editing = false;
|
|
832
935
|
this.onDropEvent = new EventEmitter();
|
|
@@ -863,10 +966,10 @@ class InputRenderComponent extends BaseSchemaComponent {
|
|
|
863
966
|
}
|
|
864
967
|
}
|
|
865
968
|
InputRenderComponent.ɵfac = function InputRenderComponent_Factory(t) { return ɵInputRenderComponent_BaseFactory(t || InputRenderComponent); };
|
|
866
|
-
InputRenderComponent.ɵcmp = ɵɵdefineComponent({ type: InputRenderComponent, selectors: [["input-render"]], inputs: { schema: "schema", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing" }, outputs: { onDropEvent: "onDropEvent" }, features: [ɵɵInheritDefinitionFeature], decls: 5, vars: 4, consts: [[1, "schema-input-container"], ["class", "form-control", "dndDropzone", "", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop", 4, "ngIf"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange", 4, "ngIf"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange", 4, "ngIf"], ["dndDropzone", "", 1, "form-control", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange"]], template: function InputRenderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
969
|
+
InputRenderComponent.ɵcmp = ɵɵdefineComponent({ type: InputRenderComponent, selectors: [["input-render"]], inputs: { selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", schema: "schema", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing" }, outputs: { onDropEvent: "onDropEvent" }, features: [ɵɵInheritDefinitionFeature], decls: 5, vars: 4, consts: [[1, "schema-input-container"], ["class", "form-control", "dndDropzone", "", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop", 4, "ngIf"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange", 4, "ngIf"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange", 4, "ngIf"], ["dndDropzone", "", 1, "form-control", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange"]], template: function InputRenderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
867
970
|
ɵɵelementStart(0, "div", 0);
|
|
868
971
|
ɵɵtemplate(1, InputRenderComponent_input_1_Template, 1, 7, "input", 1);
|
|
869
|
-
ɵɵtemplate(2, InputRenderComponent_select_box_2_Template,
|
|
972
|
+
ɵɵtemplate(2, InputRenderComponent_select_box_2_Template, 1, 13, "select-box", 2);
|
|
870
973
|
ɵɵtemplate(3, InputRenderComponent_number_input_3_Template, 1, 4, "number-input", 3);
|
|
871
974
|
ɵɵtemplate(4, InputRenderComponent_boolean_input_4_Template, 1, 4, "boolean-input", 3);
|
|
872
975
|
ɵɵelementEnd();
|
|
@@ -879,7 +982,7 @@ InputRenderComponent.ɵcmp = ɵɵdefineComponent({ type: InputRenderComponent, s
|
|
|
879
982
|
ɵɵproperty("ngIf", ctx.schema.type === "number");
|
|
880
983
|
ɵɵadvance(1);
|
|
881
984
|
ɵɵproperty("ngIf", ctx.schema.type === "boolean");
|
|
882
|
-
} }, directives: [NgIf, DefaultValueAccessor, DndDropzoneDirective, NgControlStatus, NgModel, MaxLengthValidator, SelectBoxComponent, NumberInputComponent, BooleanInputComponent],
|
|
985
|
+
} }, directives: [NgIf, DefaultValueAccessor, DndDropzoneDirective, NgControlStatus, NgModel, MaxLengthValidator, SelectBoxComponent, NumberInputComponent, BooleanInputComponent], styles: [""] });
|
|
883
986
|
const ɵInputRenderComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(InputRenderComponent);
|
|
884
987
|
/*@__PURE__*/ (function () { ɵsetClassMetadata(InputRenderComponent, [{
|
|
885
988
|
type: Component,
|
|
@@ -888,7 +991,15 @@ const ɵInputRenderComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory
|
|
|
888
991
|
templateUrl: 'input-render.html',
|
|
889
992
|
styleUrls: ['./input-render.scss']
|
|
890
993
|
}]
|
|
891
|
-
}], null, {
|
|
994
|
+
}], null, { selectPlaceHolderLabel: [{
|
|
995
|
+
type: Input
|
|
996
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
997
|
+
type: Input
|
|
998
|
+
}], selectClearLabel: [{
|
|
999
|
+
type: Input
|
|
1000
|
+
}], selectNotFoundLabel: [{
|
|
1001
|
+
type: Input
|
|
1002
|
+
}], schema: [{
|
|
892
1003
|
type: Input
|
|
893
1004
|
}], modelPropertiesPath: [{
|
|
894
1005
|
type: Input
|
|
@@ -914,18 +1025,17 @@ function SchemaInputComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
914
1025
|
} if (rf & 2) {
|
|
915
1026
|
const ctx_r0 = ɵɵnextContext();
|
|
916
1027
|
ɵɵadvance(2);
|
|
917
|
-
ɵɵproperty("label", ctx_r0.schema.title)("tooltip", ctx_r0.schema.help)("inputId", ctx_r0.getId(ctx_r0.index));
|
|
1028
|
+
ɵɵproperty("requiredLabel", ctx_r0.requiredLabel)("label", ctx_r0.schema.title)("tooltip", ctx_r0.schema.help)("inputId", ctx_r0.getId(ctx_r0.index));
|
|
918
1029
|
ɵɵadvance(1);
|
|
919
|
-
ɵɵproperty("inputId", ctx_r0.getId(ctx_r0.index))("schema", ctx_r0.schema)("model", ctx_r0.model[ctx_r0.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r0.schema.id)("editing", ctx_r0.editing);
|
|
1030
|
+
ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("inputId", ctx_r0.getId(ctx_r0.index))("schema", ctx_r0.schema)("model", ctx_r0.model[ctx_r0.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r0.schema.id)("editing", ctx_r0.editing);
|
|
920
1031
|
} }
|
|
921
1032
|
function SchemaInputComponent_div_1_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
922
1033
|
ɵɵelementStart(0, "span", 7);
|
|
923
|
-
|
|
924
|
-
ɵɵtext(2, "?");
|
|
1034
|
+
ɵɵtext(1, "?");
|
|
925
1035
|
ɵɵelementEnd();
|
|
926
1036
|
} if (rf & 2) {
|
|
927
1037
|
const ctx_r4 = ɵɵnextContext(2);
|
|
928
|
-
ɵɵpropertyInterpolate("matTooltip",
|
|
1038
|
+
ɵɵpropertyInterpolate("matTooltip", ctx_r4.schema.help);
|
|
929
1039
|
} }
|
|
930
1040
|
function SchemaInputComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
931
1041
|
const _r6 = ɵɵgetCurrentView();
|
|
@@ -933,7 +1043,7 @@ function SchemaInputComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
933
1043
|
ɵɵelementStart(1, "div", 2);
|
|
934
1044
|
ɵɵelementStart(2, "label", 5);
|
|
935
1045
|
ɵɵtext(3);
|
|
936
|
-
ɵɵtemplate(4, SchemaInputComponent_div_1_span_4_Template,
|
|
1046
|
+
ɵɵtemplate(4, SchemaInputComponent_div_1_span_4_Template, 2, 1, "span", 6);
|
|
937
1047
|
ɵɵelementEnd();
|
|
938
1048
|
ɵɵelementStart(5, "input-render", 4);
|
|
939
1049
|
ɵɵlistener("modelChange", function SchemaInputComponent_div_1_Template_input_render_modelChange_5_listener($event) { ɵɵrestoreView(_r6); const ctx_r5 = ɵɵnextContext(); return (ctx_r5.model[ctx_r5.schema.id] = $event); });
|
|
@@ -949,11 +1059,16 @@ function SchemaInputComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
949
1059
|
ɵɵadvance(1);
|
|
950
1060
|
ɵɵproperty("ngIf", ctx_r1.schema.help);
|
|
951
1061
|
ɵɵadvance(1);
|
|
952
|
-
ɵɵproperty("inputId", ctx_r1.getId(ctx_r1.index))("schema", ctx_r1.schema)("model", ctx_r1.model[ctx_r1.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r1.schema.id)("editing", ctx_r1.editing);
|
|
1062
|
+
ɵɵproperty("selectPlaceHolderLabel", ctx_r1.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r1.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r1.selectClearLabel)("selectNotFoundLabel", ctx_r1.selectNotFoundLabel)("inputId", ctx_r1.getId(ctx_r1.index))("schema", ctx_r1.schema)("model", ctx_r1.model[ctx_r1.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r1.schema.id)("editing", ctx_r1.editing);
|
|
953
1063
|
} }
|
|
954
1064
|
class SchemaInputComponent extends BaseSchemaComponent {
|
|
955
1065
|
constructor() {
|
|
956
1066
|
super(...arguments);
|
|
1067
|
+
this.requiredLabel = '(required)';
|
|
1068
|
+
this.selectPlaceHolderLabel = 'Select Item';
|
|
1069
|
+
this.selectSearchPlaceHolderLabel = 'Search';
|
|
1070
|
+
this.selectClearLabel = 'Clear';
|
|
1071
|
+
this.selectNotFoundLabel = 'No Items Found';
|
|
957
1072
|
this.editing = false;
|
|
958
1073
|
}
|
|
959
1074
|
ngAfterContentInit() {
|
|
@@ -964,14 +1079,14 @@ class SchemaInputComponent extends BaseSchemaComponent {
|
|
|
964
1079
|
}
|
|
965
1080
|
}
|
|
966
1081
|
SchemaInputComponent.ɵfac = function SchemaInputComponent_Factory(t) { return ɵSchemaInputComponent_BaseFactory(t || SchemaInputComponent); };
|
|
967
|
-
SchemaInputComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaInputComponent, selectors: [["schema-input"]], inputs: { idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "row schema-input", 4, "ngIf"], [1, "row", "schema-input"], [1, "col-md-12"], [3, "label", "tooltip", "inputId"], [3, "inputId", "schema", "model", "modelPropertiesPath", "editing", "modelChange"], [1, "info-label", "bold", 3, "htmlFor"], ["class", "config-tooltip", 3, "matTooltip", 4, "ngIf"], [1, "config-tooltip", 3, "matTooltip"]], template: function SchemaInputComponent_Template(rf, ctx) { if (rf & 1) {
|
|
968
|
-
ɵɵtemplate(0, SchemaInputComponent_div_0_Template, 4,
|
|
969
|
-
ɵɵtemplate(1, SchemaInputComponent_div_1_Template, 6,
|
|
1082
|
+
SchemaInputComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaInputComponent, selectors: [["schema-input"]], inputs: { requiredLabel: "requiredLabel", selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "row schema-input", 4, "ngIf"], [1, "row", "schema-input"], [1, "col-md-12"], [3, "requiredLabel", "label", "tooltip", "inputId"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "inputId", "schema", "model", "modelPropertiesPath", "editing", "modelChange"], [1, "info-label", "bold", 3, "htmlFor"], ["class", "config-tooltip", 3, "matTooltip", 4, "ngIf"], [1, "config-tooltip", 3, "matTooltip"]], template: function SchemaInputComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1083
|
+
ɵɵtemplate(0, SchemaInputComponent_div_0_Template, 4, 13, "div", 0);
|
|
1084
|
+
ɵɵtemplate(1, SchemaInputComponent_div_1_Template, 6, 12, "div", 0);
|
|
970
1085
|
} if (rf & 2) {
|
|
971
1086
|
ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && ctx.schema.minLength && ctx.schema.minLength > 0);
|
|
972
1087
|
ɵɵadvance(1);
|
|
973
1088
|
ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && (!ctx.schema.minLength || ctx.schema.minLength === 0));
|
|
974
|
-
} }, directives: [NgIf, FieldRenderComponent, InputRenderComponent, MatTooltip],
|
|
1089
|
+
} }, directives: [NgIf, FieldRenderComponent, InputRenderComponent, MatTooltip], styles: [""] });
|
|
975
1090
|
const ɵSchemaInputComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(SchemaInputComponent);
|
|
976
1091
|
/*@__PURE__*/ (function () { ɵsetClassMetadata(SchemaInputComponent, [{
|
|
977
1092
|
type: Component,
|
|
@@ -980,7 +1095,17 @@ const ɵSchemaInputComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory
|
|
|
980
1095
|
templateUrl: 'schema-input.html',
|
|
981
1096
|
styleUrls: ['./schema-input.scss']
|
|
982
1097
|
}]
|
|
983
|
-
}], null, {
|
|
1098
|
+
}], null, { requiredLabel: [{
|
|
1099
|
+
type: Input
|
|
1100
|
+
}], selectPlaceHolderLabel: [{
|
|
1101
|
+
type: Input
|
|
1102
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
1103
|
+
type: Input
|
|
1104
|
+
}], selectClearLabel: [{
|
|
1105
|
+
type: Input
|
|
1106
|
+
}], selectNotFoundLabel: [{
|
|
1107
|
+
type: Input
|
|
1108
|
+
}], idPrefix: [{
|
|
984
1109
|
type: Input
|
|
985
1110
|
}], schema: [{
|
|
986
1111
|
type: Input
|
|
@@ -996,19 +1121,18 @@ function SchemaObjectComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
996
1121
|
ɵɵelementStart(1, "div", 6);
|
|
997
1122
|
ɵɵelementStart(2, "label", 7);
|
|
998
1123
|
ɵɵtext(3);
|
|
999
|
-
ɵɵpipe(4, "translate");
|
|
1000
1124
|
ɵɵelementEnd();
|
|
1001
|
-
ɵɵelementStart(
|
|
1002
|
-
ɵɵlistener("modelChange", function
|
|
1125
|
+
ɵɵelementStart(4, "schema-custom-attributes", 8);
|
|
1126
|
+
ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_div_4_Template_schema_custom_attributes_modelChange_4_listener($event) { ɵɵrestoreView(_r3); const ctx_r2 = ɵɵnextContext(2); return ctx_r2.model[ctx_r2.schema.id].customAttributes = $event; });
|
|
1003
1127
|
ɵɵelementEnd();
|
|
1004
1128
|
ɵɵelementEnd();
|
|
1005
1129
|
ɵɵelementEnd();
|
|
1006
1130
|
} if (rf & 2) {
|
|
1007
1131
|
const ctx_r1 = ɵɵnextContext(2);
|
|
1008
1132
|
ɵɵadvance(3);
|
|
1009
|
-
ɵɵtextInterpolate(
|
|
1010
|
-
ɵɵadvance(
|
|
1011
|
-
ɵɵproperty("model", ctx_r1.model[ctx_r1.schema.id].customAttributes)("onDropFunction", ctx_r1.onDrop);
|
|
1133
|
+
ɵɵtextInterpolate(ctx_r1.additionalAttributesLabel);
|
|
1134
|
+
ɵɵadvance(1);
|
|
1135
|
+
ɵɵproperty("customAttributeRemoveLabel", ctx_r1.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r1.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r1.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r1.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r1.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r1.newCustomFieldCancelLabel)("model", ctx_r1.model[ctx_r1.schema.id].customAttributes)("onDropFunction", ctx_r1.onDrop);
|
|
1012
1136
|
} }
|
|
1013
1137
|
function SchemaObjectComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
1014
1138
|
const _r5 = ɵɵgetCurrentView();
|
|
@@ -1019,20 +1143,34 @@ function SchemaObjectComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
1019
1143
|
ɵɵelementStart(3, "schema-form", 3);
|
|
1020
1144
|
ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_Template_schema_form_modelChange_3_listener($event) { ɵɵrestoreView(_r5); const ctx_r4 = ɵɵnextContext(); return (ctx_r4.model[ctx_r4.schema.id] = $event); });
|
|
1021
1145
|
ɵɵelementEnd();
|
|
1022
|
-
ɵɵtemplate(4, SchemaObjectComponent_div_0_div_4_Template,
|
|
1146
|
+
ɵɵtemplate(4, SchemaObjectComponent_div_0_div_4_Template, 5, 9, "div", 4);
|
|
1023
1147
|
ɵɵelementEnd();
|
|
1024
1148
|
} if (rf & 2) {
|
|
1025
1149
|
const ctx_r0 = ɵɵnextContext();
|
|
1026
1150
|
ɵɵadvance(2);
|
|
1027
1151
|
ɵɵtextInterpolate(ctx_r0.schema.title);
|
|
1028
1152
|
ɵɵadvance(1);
|
|
1029
|
-
ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model[ctx_r0.schema.id])("schemas", ctx_r0.getSchemaProperties())("editing", ctx_r0.editing);
|
|
1153
|
+
ɵɵ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[ctx_r0.schema.id])("schemas", ctx_r0.getSchemaProperties())("editing", ctx_r0.editing);
|
|
1030
1154
|
ɵɵadvance(1);
|
|
1031
1155
|
ɵɵproperty("ngIf", ctx_r0.model[ctx_r0.schema.id] && ctx_r0.schema.customProperties);
|
|
1032
1156
|
} }
|
|
1033
1157
|
class SchemaObjectComponent extends BaseSchemaComponent {
|
|
1034
1158
|
constructor() {
|
|
1035
1159
|
super(...arguments);
|
|
1160
|
+
this.requiredLabel = '(required)';
|
|
1161
|
+
this.addItemLabel = 'Add Item';
|
|
1162
|
+
this.addLoopLabel = 'Add Loop';
|
|
1163
|
+
this.additionalAttributesLabel = 'Additional Fields';
|
|
1164
|
+
this.customAttributeRemoveLabel = 'Remove';
|
|
1165
|
+
this.newCustomFieldNameLabel = 'Name';
|
|
1166
|
+
this.newCustomFieldValueLabel = 'Value';
|
|
1167
|
+
this.newCustomFieldAddLabel = 'Add';
|
|
1168
|
+
this.newCustomFieldSaveLabel = 'Save';
|
|
1169
|
+
this.newCustomFieldCancelLabel = 'Cancel';
|
|
1170
|
+
this.selectPlaceHolderLabel = 'Select Item';
|
|
1171
|
+
this.selectSearchPlaceHolderLabel = 'Search';
|
|
1172
|
+
this.selectClearLabel = 'Clear';
|
|
1173
|
+
this.selectNotFoundLabel = 'No Items Found';
|
|
1036
1174
|
this.editing = false;
|
|
1037
1175
|
this.onDropEvent = new EventEmitter();
|
|
1038
1176
|
this.loaded = false;
|
|
@@ -1049,11 +1187,11 @@ class SchemaObjectComponent extends BaseSchemaComponent {
|
|
|
1049
1187
|
}
|
|
1050
1188
|
}
|
|
1051
1189
|
SchemaObjectComponent.ɵfac = function SchemaObjectComponent_Factory(t) { return ɵSchemaObjectComponent_BaseFactory(t || SchemaObjectComponent); };
|
|
1052
|
-
SchemaObjectComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaObjectComponent, selectors: [["schema-object"]], inputs: { idPrefix: "idPrefix", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing", index: "index" }, outputs: { onDropEvent: "onDropEvent" }, features: [ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema-object-container", 4, "ngIf"], [1, "schema-object-container"], [1, "schema-object-title"], [3, "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"]], template: function SchemaObjectComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1053
|
-
ɵɵtemplate(0, SchemaObjectComponent_div_0_Template, 5,
|
|
1190
|
+
SchemaObjectComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaObjectComponent, selectors: [["schema-object"]], 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", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing", index: "index" }, outputs: { onDropEvent: "onDropEvent" }, features: [ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema-object-container", 4, "ngIf"], [1, "schema-object-container"], [1, "schema-object-title"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "model", "onDropFunction", "modelChange"]], template: function SchemaObjectComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1191
|
+
ɵɵtemplate(0, SchemaObjectComponent_div_0_Template, 5, 20, "div", 0);
|
|
1054
1192
|
} if (rf & 2) {
|
|
1055
1193
|
ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type == "object");
|
|
1056
|
-
} }, directives: [NgIf, SchemaFormComponent, SchemaCustomAttributesComponent],
|
|
1194
|
+
} }, directives: [NgIf, SchemaFormComponent, SchemaCustomAttributesComponent], styles: [".schema-object-container[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:5px;margin-bottom:10px;margin-top:10px;padding:10px}.schema-object-container[_ngcontent-%COMP%] .schema-object-title[_ngcontent-%COMP%]{background:#eee;border-bottom:1px solid #ddd;font-weight:700;margin-left:-10px;margin-top:-10px;padding:10px;width:calc(100% + 20px)}"] });
|
|
1057
1195
|
const ɵSchemaObjectComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(SchemaObjectComponent);
|
|
1058
1196
|
/*@__PURE__*/ (function () { ɵsetClassMetadata(SchemaObjectComponent, [{
|
|
1059
1197
|
type: Component,
|
|
@@ -1062,7 +1200,35 @@ const ɵSchemaObjectComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactor
|
|
|
1062
1200
|
templateUrl: 'schema-object.html',
|
|
1063
1201
|
styleUrls: ['./schema-object.scss']
|
|
1064
1202
|
}]
|
|
1065
|
-
}], null, {
|
|
1203
|
+
}], null, { requiredLabel: [{
|
|
1204
|
+
type: Input
|
|
1205
|
+
}], addItemLabel: [{
|
|
1206
|
+
type: Input
|
|
1207
|
+
}], addLoopLabel: [{
|
|
1208
|
+
type: Input
|
|
1209
|
+
}], additionalAttributesLabel: [{
|
|
1210
|
+
type: Input
|
|
1211
|
+
}], customAttributeRemoveLabel: [{
|
|
1212
|
+
type: Input
|
|
1213
|
+
}], newCustomFieldNameLabel: [{
|
|
1214
|
+
type: Input
|
|
1215
|
+
}], newCustomFieldValueLabel: [{
|
|
1216
|
+
type: Input
|
|
1217
|
+
}], newCustomFieldAddLabel: [{
|
|
1218
|
+
type: Input
|
|
1219
|
+
}], newCustomFieldSaveLabel: [{
|
|
1220
|
+
type: Input
|
|
1221
|
+
}], newCustomFieldCancelLabel: [{
|
|
1222
|
+
type: Input
|
|
1223
|
+
}], selectPlaceHolderLabel: [{
|
|
1224
|
+
type: Input
|
|
1225
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
1226
|
+
type: Input
|
|
1227
|
+
}], selectClearLabel: [{
|
|
1228
|
+
type: Input
|
|
1229
|
+
}], selectNotFoundLabel: [{
|
|
1230
|
+
type: Input
|
|
1231
|
+
}], idPrefix: [{
|
|
1066
1232
|
type: Input
|
|
1067
1233
|
}], modelPropertiesPath: [{
|
|
1068
1234
|
type: Input
|
|
@@ -1092,8 +1258,7 @@ class SchemaValidationField {
|
|
|
1092
1258
|
}
|
|
1093
1259
|
|
|
1094
1260
|
class SchemaFieldsService {
|
|
1095
|
-
constructor(
|
|
1096
|
-
this.translate = translate;
|
|
1261
|
+
constructor() {
|
|
1097
1262
|
}
|
|
1098
1263
|
validateSchemaFields(propertiesRendered, model) {
|
|
1099
1264
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1142,25 +1307,36 @@ class SchemaFieldsService {
|
|
|
1142
1307
|
const errors = [];
|
|
1143
1308
|
for (const field of structValidation.emptyFields) {
|
|
1144
1309
|
const fieldName = field.title || field.id;
|
|
1145
|
-
errors.push(
|
|
1310
|
+
errors.push({
|
|
1311
|
+
type: 'emptyFields',
|
|
1312
|
+
fieldName
|
|
1313
|
+
});
|
|
1146
1314
|
}
|
|
1147
1315
|
for (const field of structValidation.invalidMinLengthFields) {
|
|
1148
1316
|
const fieldName = field.title || field.id;
|
|
1149
|
-
errors.push(
|
|
1317
|
+
errors.push({
|
|
1318
|
+
type: 'invalidMinLengthFields',
|
|
1319
|
+
fieldName,
|
|
1320
|
+
minLength: field.minLength
|
|
1321
|
+
});
|
|
1150
1322
|
}
|
|
1151
1323
|
for (const field of structValidation.invalidMaxLengthFields) {
|
|
1152
1324
|
const fieldName = field.title || field.id;
|
|
1153
|
-
errors.push(
|
|
1325
|
+
errors.push({
|
|
1326
|
+
type: 'invalidMaxLengthFields',
|
|
1327
|
+
fieldName,
|
|
1328
|
+
maxLength: field.maxLength
|
|
1329
|
+
});
|
|
1154
1330
|
}
|
|
1155
1331
|
return errors;
|
|
1156
1332
|
});
|
|
1157
1333
|
}
|
|
1158
1334
|
}
|
|
1159
|
-
SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(
|
|
1335
|
+
SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(); };
|
|
1160
1336
|
SchemaFieldsService.ɵprov = ɵɵdefineInjectable({ token: SchemaFieldsService, factory: SchemaFieldsService.ɵfac });
|
|
1161
1337
|
/*@__PURE__*/ (function () { ɵsetClassMetadata(SchemaFieldsService, [{
|
|
1162
1338
|
type: Injectable
|
|
1163
|
-
}], function () { return [
|
|
1339
|
+
}], function () { return []; }, null); })();
|
|
1164
1340
|
|
|
1165
1341
|
function SchemaFormRenderComponent_div_0_div_2_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1166
1342
|
const _r6 = ɵɵgetCurrentView();
|
|
@@ -1168,23 +1344,22 @@ function SchemaFormRenderComponent_div_0_div_2_div_1_Template(rf, ctx) { if (rf
|
|
|
1168
1344
|
ɵɵelementStart(1, "div", 7);
|
|
1169
1345
|
ɵɵelementStart(2, "label", 8);
|
|
1170
1346
|
ɵɵtext(3);
|
|
1171
|
-
ɵɵpipe(4, "translate");
|
|
1172
1347
|
ɵɵelementEnd();
|
|
1173
|
-
ɵɵelementStart(
|
|
1174
|
-
ɵɵlistener("modelChange", function
|
|
1348
|
+
ɵɵelementStart(4, "schema-custom-attributes", 9);
|
|
1349
|
+
ɵɵlistener("modelChange", function SchemaFormRenderComponent_div_0_div_2_div_1_Template_schema_custom_attributes_modelChange_4_listener($event) { ɵɵrestoreView(_r6); const ctx_r5 = ɵɵnextContext(3); return ctx_r5.model.customAttributes = $event; });
|
|
1175
1350
|
ɵɵelementEnd();
|
|
1176
1351
|
ɵɵelementEnd();
|
|
1177
1352
|
ɵɵelementEnd();
|
|
1178
1353
|
} if (rf & 2) {
|
|
1179
1354
|
const ctx_r4 = ɵɵnextContext(3);
|
|
1180
1355
|
ɵɵadvance(3);
|
|
1181
|
-
ɵɵtextInterpolate(
|
|
1182
|
-
ɵɵadvance(
|
|
1183
|
-
ɵɵproperty("model", ctx_r4.model.customAttributes)("onDropFunction", ctx_r4.onDrop);
|
|
1356
|
+
ɵɵtextInterpolate(ctx_r4.additionalAttributesLabel);
|
|
1357
|
+
ɵɵadvance(1);
|
|
1358
|
+
ɵɵproperty("customAttributeRemoveLabel", ctx_r4.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r4.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r4.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r4.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r4.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r4.newCustomFieldCancelLabel)("model", ctx_r4.model.customAttributes)("onDropFunction", ctx_r4.onDrop);
|
|
1184
1359
|
} }
|
|
1185
1360
|
function SchemaFormRenderComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
1186
1361
|
ɵɵelementStart(0, "div", 4);
|
|
1187
|
-
ɵɵtemplate(1, SchemaFormRenderComponent_div_0_div_2_div_1_Template,
|
|
1362
|
+
ɵɵtemplate(1, SchemaFormRenderComponent_div_0_div_2_div_1_Template, 5, 9, "div", 5);
|
|
1188
1363
|
ɵɵelementEnd();
|
|
1189
1364
|
} if (rf & 2) {
|
|
1190
1365
|
const ctx_r1 = ɵɵnextContext(2);
|
|
@@ -1202,13 +1377,27 @@ function SchemaFormRenderComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
1202
1377
|
} if (rf & 2) {
|
|
1203
1378
|
const ctx_r0 = ɵɵnextContext();
|
|
1204
1379
|
ɵɵadvance(1);
|
|
1205
|
-
ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schemas", ctx_r0.schemas)("editing", ctx_r0.editing);
|
|
1380
|
+
ɵɵ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)("schemas", ctx_r0.schemas)("editing", ctx_r0.editing);
|
|
1206
1381
|
ɵɵadvance(1);
|
|
1207
1382
|
ɵɵproperty("ngForOf", ctx_r0.schemas);
|
|
1208
1383
|
} }
|
|
1209
1384
|
class SchemaFormRenderComponent extends BaseSchemaComponent {
|
|
1210
1385
|
constructor() {
|
|
1211
1386
|
super(...arguments);
|
|
1387
|
+
this.requiredLabel = '(required)';
|
|
1388
|
+
this.addItemLabel = 'Add Item';
|
|
1389
|
+
this.addLoopLabel = 'Add Loop';
|
|
1390
|
+
this.additionalAttributesLabel = 'Additional Fields';
|
|
1391
|
+
this.customAttributeRemoveLabel = 'Remove';
|
|
1392
|
+
this.newCustomFieldNameLabel = 'Name';
|
|
1393
|
+
this.newCustomFieldValueLabel = 'Value';
|
|
1394
|
+
this.newCustomFieldAddLabel = 'Add';
|
|
1395
|
+
this.newCustomFieldSaveLabel = 'Save';
|
|
1396
|
+
this.newCustomFieldCancelLabel = 'Cancel';
|
|
1397
|
+
this.selectPlaceHolderLabel = 'Select Item';
|
|
1398
|
+
this.selectSearchPlaceHolderLabel = 'Search';
|
|
1399
|
+
this.selectClearLabel = 'Clear';
|
|
1400
|
+
this.selectNotFoundLabel = 'No Items Found';
|
|
1212
1401
|
this.schemas = [];
|
|
1213
1402
|
this.customProperties = false;
|
|
1214
1403
|
this.editing = false;
|
|
@@ -1225,11 +1414,11 @@ class SchemaFormRenderComponent extends BaseSchemaComponent {
|
|
|
1225
1414
|
}
|
|
1226
1415
|
}
|
|
1227
1416
|
SchemaFormRenderComponent.ɵfac = function SchemaFormRenderComponent_Factory(t) { return ɵSchemaFormRenderComponent_BaseFactory(t || SchemaFormRenderComponent); };
|
|
1228
|
-
SchemaFormRenderComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaFormRenderComponent, selectors: [["schema-form-render"]], inputs: { idPrefix: "idPrefix", schemas: "schemas", customProperties: "customProperties", editing: "editing", inputType: "inputType" }, features: [ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema", 4, "ngIf"], [1, "schema"], [3, "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"]], template: function SchemaFormRenderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1229
|
-
ɵɵtemplate(0, SchemaFormRenderComponent_div_0_Template, 3,
|
|
1417
|
+
SchemaFormRenderComponent.ɵcmp = ɵɵdefineComponent({ type: SchemaFormRenderComponent, selectors: [["schema-form-render"]], 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: [ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema", 4, "ngIf"], [1, "schema"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "model", "onDropFunction", "modelChange"]], template: function SchemaFormRenderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1418
|
+
ɵɵtemplate(0, SchemaFormRenderComponent_div_0_Template, 3, 19, "div", 0);
|
|
1230
1419
|
} if (rf & 2) {
|
|
1231
1420
|
ɵɵproperty("ngIf", ctx.loaded);
|
|
1232
|
-
} }, directives: [NgIf, SchemaFormComponent, NgForOf, SchemaCustomAttributesComponent],
|
|
1421
|
+
} }, directives: [NgIf, SchemaFormComponent, NgForOf, SchemaCustomAttributesComponent], styles: [".schema[_ngcontent-%COMP%] .info-label{display:block}.schema[_ngcontent-%COMP%] input.form-control{background:#fff;border:1px solid #ddd;border-radius:3px;padding:11px;width:100%}.schema[_ngcontent-%COMP%] select.form-control{border:1px solid #ddd;border-radius:4px;color:#777;cursor:pointer;padding:11px;width:100%}.schema[_ngcontent-%COMP%] .ng-select-container{height:38px!important;min-height:38px!important}.schema[_ngcontent-%COMP%] .btn-outline-primary{background:var(--color-primary);border:1px solid var(--color-secondary);border-radius:4px;color:var(--color-secondary);cursor:pointer;padding:5px 15px}.schema[_ngcontent-%COMP%] .btn-outline-primary:hover{background:var(--color-primary-hover)}.schema[_ngcontent-%COMP%] .subsection-item-title, .schema[_ngcontent-%COMP%] array-session .subsection-element{color:var(--color-primary)}"] });
|
|
1233
1422
|
const ɵSchemaFormRenderComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(SchemaFormRenderComponent);
|
|
1234
1423
|
/*@__PURE__*/ (function () { ɵsetClassMetadata(SchemaFormRenderComponent, [{
|
|
1235
1424
|
type: Component,
|
|
@@ -1238,7 +1427,35 @@ const ɵSchemaFormRenderComponent_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFa
|
|
|
1238
1427
|
templateUrl: 'schema-form-render.html',
|
|
1239
1428
|
styleUrls: ['./schema-form-render.scss']
|
|
1240
1429
|
}]
|
|
1241
|
-
}], null, {
|
|
1430
|
+
}], null, { requiredLabel: [{
|
|
1431
|
+
type: Input
|
|
1432
|
+
}], addItemLabel: [{
|
|
1433
|
+
type: Input
|
|
1434
|
+
}], addLoopLabel: [{
|
|
1435
|
+
type: Input
|
|
1436
|
+
}], additionalAttributesLabel: [{
|
|
1437
|
+
type: Input
|
|
1438
|
+
}], customAttributeRemoveLabel: [{
|
|
1439
|
+
type: Input
|
|
1440
|
+
}], newCustomFieldNameLabel: [{
|
|
1441
|
+
type: Input
|
|
1442
|
+
}], newCustomFieldValueLabel: [{
|
|
1443
|
+
type: Input
|
|
1444
|
+
}], newCustomFieldAddLabel: [{
|
|
1445
|
+
type: Input
|
|
1446
|
+
}], newCustomFieldSaveLabel: [{
|
|
1447
|
+
type: Input
|
|
1448
|
+
}], newCustomFieldCancelLabel: [{
|
|
1449
|
+
type: Input
|
|
1450
|
+
}], selectPlaceHolderLabel: [{
|
|
1451
|
+
type: Input
|
|
1452
|
+
}], selectSearchPlaceHolderLabel: [{
|
|
1453
|
+
type: Input
|
|
1454
|
+
}], selectClearLabel: [{
|
|
1455
|
+
type: Input
|
|
1456
|
+
}], selectNotFoundLabel: [{
|
|
1457
|
+
type: Input
|
|
1458
|
+
}], idPrefix: [{
|
|
1242
1459
|
type: Input
|
|
1243
1460
|
}], schemas: [{
|
|
1244
1461
|
type: Input
|
|
@@ -1260,7 +1477,6 @@ SchemaFormRenderModule.ɵinj = ɵɵdefineInjector({ factory: function SchemaForm
|
|
|
1260
1477
|
DndModule,
|
|
1261
1478
|
FormsModule,
|
|
1262
1479
|
MatTooltipModule,
|
|
1263
|
-
TranslateModule,
|
|
1264
1480
|
InputsModule
|
|
1265
1481
|
]] });
|
|
1266
1482
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(SchemaFormRenderModule, { declarations: [ArraySessionComponent,
|
|
@@ -1277,7 +1493,6 @@ SchemaFormRenderModule.ɵinj = ɵɵdefineInjector({ factory: function SchemaForm
|
|
|
1277
1493
|
DndModule,
|
|
1278
1494
|
FormsModule,
|
|
1279
1495
|
MatTooltipModule,
|
|
1280
|
-
TranslateModule,
|
|
1281
1496
|
InputsModule], exports: [ArraySessionComponent,
|
|
1282
1497
|
SchemaArrayComponent,
|
|
1283
1498
|
FieldRenderComponent,
|
|
@@ -1297,7 +1512,6 @@ SchemaFormRenderModule.ɵinj = ɵɵdefineInjector({ factory: function SchemaForm
|
|
|
1297
1512
|
DndModule,
|
|
1298
1513
|
FormsModule,
|
|
1299
1514
|
MatTooltipModule,
|
|
1300
|
-
TranslateModule,
|
|
1301
1515
|
InputsModule
|
|
1302
1516
|
],
|
|
1303
1517
|
declarations: [
|
|
@@ -1331,7 +1545,7 @@ SchemaFormRenderModule.ɵinj = ɵɵdefineInjector({ factory: function SchemaForm
|
|
|
1331
1545
|
]
|
|
1332
1546
|
}]
|
|
1333
1547
|
}], null, null); })();
|
|
1334
|
-
ɵɵsetComponentScope(SchemaFormComponent, [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, DndDraggableDirective, DndDropzoneDirective, DndHandleDirective, DndPlaceholderRefDirective, DndDragImageRefDirective, ɵangular_packages_forms_forms_y, NgSelectOption, ɵangular_packages_forms_forms_x, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator, NgModel, NgModelGroup, NgForm, MatTooltip, TooltipComponent, Dir, CdkScrollable,
|
|
1548
|
+
ɵɵsetComponentScope(SchemaFormComponent, [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, DndDraggableDirective, DndDropzoneDirective, DndHandleDirective, DndPlaceholderRefDirective, DndDragImageRefDirective, ɵangular_packages_forms_forms_y, NgSelectOption, ɵangular_packages_forms_forms_x, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator, NgModel, NgModelGroup, NgForm, MatTooltip, TooltipComponent, Dir, CdkScrollable, SelectBoxComponent, SelectEnumComponent, InputTextComponent, InputPasswordComponent, InputAvatarComponent, InputFileComponent, CustomSelectComponent, FieldComponent, ArraySessionComponent,
|
|
1335
1549
|
SchemaArrayComponent,
|
|
1336
1550
|
FieldRenderComponent,
|
|
1337
1551
|
InputRenderComponent,
|
|
@@ -1341,7 +1555,7 @@ SchemaFormRenderModule.ɵinj = ɵɵdefineInjector({ factory: function SchemaForm
|
|
|
1341
1555
|
SchemaObjectComponent,
|
|
1342
1556
|
SchemaFormRenderComponent,
|
|
1343
1557
|
SchemaFormComponent,
|
|
1344
|
-
SchemaCustomAttributesComponent], [AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe
|
|
1558
|
+
SchemaCustomAttributesComponent], [AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe]);
|
|
1345
1559
|
|
|
1346
1560
|
class TypeScriptCompile {
|
|
1347
1561
|
static addItemToFormProperties(formProperties, item, key) {
|