@apipass/schemas 0.2.15 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +33 -33
  2. package/assets/css/buttons.scss +118 -118
  3. package/assets/css/colors.scss +34 -34
  4. package/assets/css/fonts.scss +24 -24
  5. package/assets/css/inputs.scss +197 -197
  6. package/assets/css/pt_sans.scss +143 -143
  7. package/assets/css/spacing.scss +28 -28
  8. package/assets/css/texts.scss +18 -18
  9. package/base-schema.component.d.ts +12 -12
  10. package/{esm2015/apipass-schemas.js → esm2020/apipass-schemas.mjs} +4 -4
  11. package/esm2020/base-schema.component.mjs +38 -0
  12. package/{esm2015/public-api.js → esm2020/public-api.mjs} +17 -17
  13. package/esm2020/schema-custom-attributes/schema-custom-attributes.mjs +169 -0
  14. package/esm2020/schema-fields.service.mjs +82 -0
  15. package/esm2020/schema-form/schema-array/array-session/array-session.mjs +143 -0
  16. package/esm2020/schema-form/schema-array/schema-array.mjs +220 -0
  17. package/esm2020/schema-form/schema-form.mjs +107 -0
  18. package/esm2020/schema-form/schema-input/field-render/field-render.mjs +69 -0
  19. package/esm2020/schema-form/schema-input/input-render/boolean-input/boolean-input.component.mjs +46 -0
  20. package/esm2020/schema-form/schema-input/input-render/input-render.mjs +192 -0
  21. package/esm2020/schema-form/schema-input/input-render/number-input/number-input.component.mjs +44 -0
  22. package/esm2020/schema-form/schema-input/schema-input.mjs +96 -0
  23. package/esm2020/schema-form/schema-object/schema-object.mjs +123 -0
  24. package/esm2020/schema-form-render.mjs +126 -0
  25. package/esm2020/schema-form-render.module.mjs +108 -0
  26. package/esm2020/schema-validation-field.mjs +14 -0
  27. package/{esm2015/struct.utils.js → esm2020/struct.utils.mjs} +9 -9
  28. package/esm2020/type-script-compile/type-script-compile.base.mjs +112 -0
  29. package/fesm2015/apipass-schemas.mjs +1803 -0
  30. package/fesm2015/apipass-schemas.mjs.map +1 -0
  31. package/fesm2020/apipass-schemas.mjs +1618 -0
  32. package/fesm2020/apipass-schemas.mjs.map +1 -0
  33. package/{apipass-schemas.d.ts → index.d.ts} +5 -5
  34. package/package.json +32 -19
  35. package/public-api.d.ts +16 -16
  36. package/schema-custom-attributes/schema-custom-attributes.d.ts +21 -21
  37. package/schema-fields.service.d.ts +15 -15
  38. package/schema-form/schema-array/array-session/array-session.d.ts +19 -19
  39. package/schema-form/schema-array/schema-array.d.ts +32 -32
  40. package/schema-form/schema-form.d.ts +31 -31
  41. package/schema-form/schema-input/field-render/field-render.d.ts +16 -16
  42. package/schema-form/schema-input/input-render/boolean-input/boolean-input.component.d.ts +15 -15
  43. package/schema-form/schema-input/input-render/input-render.d.ts +29 -29
  44. package/schema-form/schema-input/input-render/number-input/number-input.component.d.ts +15 -15
  45. package/schema-form/schema-input/schema-input.d.ts +19 -19
  46. package/schema-form/schema-object/schema-object.d.ts +34 -34
  47. package/schema-form-render.d.ts +31 -31
  48. package/schema-form-render.module.d.ts +23 -22
  49. package/schema-validation-field.d.ts +23 -23
  50. package/struct.utils.d.ts +1 -1
  51. package/type-script-compile/type-script-compile.base.d.ts +17 -17
  52. package/bundles/apipass-schemas.umd.js +0 -2312
  53. package/bundles/apipass-schemas.umd.js.map +0 -1
  54. package/bundles/apipass-schemas.umd.min.js +0 -16
  55. package/bundles/apipass-schemas.umd.min.js.map +0 -1
  56. package/esm2015/base-schema.component.js +0 -38
  57. package/esm2015/schema-custom-attributes/schema-custom-attributes.js +0 -192
  58. package/esm2015/schema-fields.service.js +0 -87
  59. package/esm2015/schema-form/schema-array/array-session/array-session.js +0 -161
  60. package/esm2015/schema-form/schema-array/schema-array.js +0 -234
  61. package/esm2015/schema-form/schema-form.js +0 -114
  62. package/esm2015/schema-form/schema-input/field-render/field-render.js +0 -74
  63. package/esm2015/schema-form/schema-input/input-render/boolean-input/boolean-input.component.js +0 -50
  64. package/esm2015/schema-form/schema-input/input-render/input-render.js +0 -179
  65. package/esm2015/schema-form/schema-input/input-render/number-input/number-input.component.js +0 -48
  66. package/esm2015/schema-form/schema-input/schema-input.js +0 -111
  67. package/esm2015/schema-form/schema-object/schema-object.js +0 -134
  68. package/esm2015/schema-form-render.js +0 -136
  69. package/esm2015/schema-form-render.module.js +0 -124
  70. package/esm2015/schema-validation-field.js +0 -15
  71. package/esm2015/type-script-compile/type-script-compile.base.js +0 -112
  72. package/fesm2015/apipass-schemas.js +0 -1725
  73. package/fesm2015/apipass-schemas.js.map +0 -1
@@ -0,0 +1,1803 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output, TemplateRef, ContentChild, Injectable, Optional, SkipSelf, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i3 from '@angular/forms';
6
+ import { FormControl, Validators, FormsModule } from '@angular/forms';
7
+ import * as i2 from 'ngx-drag-drop';
8
+ import { DndModule } from 'ngx-drag-drop';
9
+ import * as i2$1 from '@angular/material/tooltip';
10
+ import { MatTooltipModule } from '@angular/material/tooltip';
11
+ import * as i4 from '@apipass/inputs';
12
+ import { InputsModule } from '@apipass/inputs';
13
+ import * as i5 from '@apipass/icons';
14
+ import { IconsModule } from '@apipass/icons';
15
+ import { __awaiter } from 'tslib';
16
+
17
+ class BaseSchemaComponent {
18
+ constructor() {
19
+ this.modelChange = new EventEmitter();
20
+ }
21
+ getSchemaProperties() {
22
+ return this.schema.properties instanceof Array ? this.schema.properties : [this.schema.properties];
23
+ }
24
+ canRender(property) {
25
+ // tslint:disable-next-line:no-eval
26
+ property.canRender = (property === null || property === void 0 ? void 0 : property.conditionExpression) ? eval(property.conditionExpression) : true;
27
+ return property.canRender;
28
+ }
29
+ onDrop(event, attr) {
30
+ const data = event.data;
31
+ if (!attr) {
32
+ attr = '';
33
+ }
34
+ attr += `{{${data}}}`;
35
+ return attr;
36
+ }
37
+ }
38
+ BaseSchemaComponent.ɵfac = function BaseSchemaComponent_Factory(t) { return new (t || BaseSchemaComponent)(); };
39
+ BaseSchemaComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BaseSchemaComponent, selectors: [["ng-component"]], inputs: { model: "model", schema: "schema" }, outputs: { modelChange: "modelChange" }, decls: 0, vars: 0, template: function BaseSchemaComponent_Template(rf, ctx) { }, encapsulation: 2 });
40
+ (function () {
41
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseSchemaComponent, [{
42
+ type: Component,
43
+ args: [{
44
+ template: ''
45
+ }]
46
+ }], null, { model: [{
47
+ type: Input
48
+ }], schema: [{
49
+ type: Input
50
+ }], modelChange: [{
51
+ type: Output
52
+ }] });
53
+ })();
54
+
55
+ function onDropStruct(event, attr) {
56
+ const data = event.data;
57
+ if (!attr) {
58
+ attr = '';
59
+ }
60
+ attr += `{{${data}}}`;
61
+ return attr;
62
+ }
63
+
64
+ const _c0$6 = function () { return { standalone: true }; };
65
+ function ArraySessionComponent_div_4_div_4_Template(rf, ctx) {
66
+ if (rf & 1) {
67
+ const _r8 = i0.ɵɵgetCurrentView();
68
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 12)(2, "label", 13);
69
+ i0.ɵɵtext(3, "Loop");
70
+ i0.ɵɵelementEnd();
71
+ i0.ɵɵelementStart(4, "input", 14);
72
+ i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_4_div_4_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r8); const item_r2 = i0.ɵɵnextContext().$implicit; return i0.ɵɵresetView(item_r2.loop = $event); })("dndDrop", function ArraySessionComponent_div_4_div_4_Template_input_dndDrop_4_listener($event) { i0.ɵɵrestoreView(_r8); const item_r2 = i0.ɵɵnextContext().$implicit; const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(item_r2.loop = ctx_r9.onDrop($event, item_r2.loop)); });
73
+ i0.ɵɵelementEnd()();
74
+ i0.ɵɵelementStart(5, "div", 15)(6, "label", 13);
75
+ i0.ɵɵtext(7, "Alias");
76
+ i0.ɵɵelementEnd();
77
+ i0.ɵɵelementStart(8, "input", 14);
78
+ i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_4_div_4_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r8); const item_r2 = i0.ɵɵnextContext().$implicit; return i0.ɵɵresetView(item_r2.alias = $event); })("dndDrop", function ArraySessionComponent_div_4_div_4_Template_input_dndDrop_8_listener($event) { i0.ɵɵrestoreView(_r8); const item_r2 = i0.ɵɵnextContext().$implicit; const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(item_r2.alias = ctx_r13.onDrop($event, item_r2.alias)); });
79
+ i0.ɵɵelementEnd()()();
80
+ }
81
+ if (rf & 2) {
82
+ const item_r2 = i0.ɵɵnextContext().$implicit;
83
+ i0.ɵɵadvance(4);
84
+ i0.ɵɵproperty("ngModel", item_r2.loop)("ngModelOptions", i0.ɵɵpureFunction0(4, _c0$6));
85
+ i0.ɵɵadvance(4);
86
+ i0.ɵɵproperty("ngModel", item_r2.alias)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0$6));
87
+ }
88
+ }
89
+ function ArraySessionComponent_div_4_ng_container_5_Template(rf, ctx) {
90
+ if (rf & 1) {
91
+ i0.ɵɵelementContainer(0);
92
+ }
93
+ }
94
+ const _c1$2 = function (a0, a1, a2) { return { items: a0, index: a1, mappingAttributes: a2 }; };
95
+ const _c2 = function (a0) { return { $implicit: a0 }; };
96
+ function ArraySessionComponent_div_4_Template(rf, ctx) {
97
+ if (rf & 1) {
98
+ const _r17 = i0.ɵɵgetCurrentView();
99
+ i0.ɵɵelementStart(0, "div", 7)(1, "div", 8);
100
+ i0.ɵɵtext(2);
101
+ i0.ɵɵelementStart(3, "i", 9);
102
+ i0.ɵɵlistener("click", function ArraySessionComponent_div_4_Template_i_click_3_listener() { const restoredCtx = i0.ɵɵrestoreView(_r17); const item_r2 = restoredCtx.$implicit; const ctx_r16 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r16.remove(item_r2)); });
103
+ i0.ɵɵelementEnd()();
104
+ i0.ɵɵtemplate(4, ArraySessionComponent_div_4_div_4_Template, 9, 6, "div", 10);
105
+ i0.ɵɵtemplate(5, ArraySessionComponent_div_4_ng_container_5_Template, 1, 0, "ng-container", 11);
106
+ i0.ɵɵelementEnd();
107
+ }
108
+ if (rf & 2) {
109
+ const item_r2 = ctx.$implicit;
110
+ const index_r3 = ctx.index;
111
+ const ctx_r0 = i0.ɵɵnextContext();
112
+ i0.ɵɵadvance(2);
113
+ i0.ɵɵtextInterpolate2("", ctx_r0.removeLabel, " ", index_r3 + 1, " ");
114
+ i0.ɵɵadvance(2);
115
+ i0.ɵɵproperty("ngIf", item_r2.mappingAttributes || item_r2.mappingAttributes === "");
116
+ i0.ɵɵadvance(1);
117
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.subsectionItem)("ngTemplateOutletContext", i0.ɵɵpureFunction1(9, _c2, i0.ɵɵpureFunction3(5, _c1$2, ctx_r0.model, index_r3, item_r2.mappingAttributes || item_r2.mappingAttributes === "" ? item_r2.mappingAttributes : item_r2)));
118
+ }
119
+ }
120
+ function ArraySessionComponent_button_9_Template(rf, ctx) {
121
+ if (rf & 1) {
122
+ const _r19 = i0.ɵɵgetCurrentView();
123
+ i0.ɵɵelementStart(0, "button", 16);
124
+ i0.ɵɵlistener("click", function ArraySessionComponent_button_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r18.addLoop()); });
125
+ i0.ɵɵtext(1);
126
+ i0.ɵɵelementEnd();
127
+ }
128
+ if (rf & 2) {
129
+ const ctx_r1 = i0.ɵɵnextContext();
130
+ i0.ɵɵadvance(1);
131
+ i0.ɵɵtextInterpolate(ctx_r1.addLoopLabel);
132
+ }
133
+ }
134
+ class ArraySessionComponent extends BaseSchemaComponent {
135
+ constructor() {
136
+ super(...arguments);
137
+ this.label = '';
138
+ this.removeLabel = 'Remove';
139
+ this.addItemLabel = 'Add Item';
140
+ this.addLoopLabel = 'Add Loop';
141
+ this.showAddLoop = true;
142
+ this.onAdd = new EventEmitter();
143
+ this.onAddLoop = new EventEmitter();
144
+ this.subsectionItem = null;
145
+ }
146
+ add() {
147
+ this.onAdd.next();
148
+ }
149
+ addLoop() {
150
+ this.onAddLoop.next();
151
+ }
152
+ remove(item) {
153
+ const values = this.model;
154
+ const index = values.indexOf(item);
155
+ values.splice(index, 1);
156
+ this.model = values;
157
+ }
158
+ trackByIndex(index, obj) {
159
+ return index;
160
+ }
161
+ }
162
+ ArraySessionComponent.ɵfac = /*@__PURE__*/ function () { let ɵArraySessionComponent_BaseFactory; return function ArraySessionComponent_Factory(t) { return (ɵArraySessionComponent_BaseFactory || (ɵArraySessionComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ArraySessionComponent)))(t || ArraySessionComponent); }; }();
163
+ ArraySessionComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ArraySessionComponent, selectors: [["array-session"]], contentQueries: function ArraySessionComponent_ContentQueries(rf, ctx, dirIndex) {
164
+ if (rf & 1) {
165
+ i0.ɵɵcontentQuery(dirIndex, TemplateRef, 5, TemplateRef);
166
+ }
167
+ if (rf & 2) {
168
+ let _t;
169
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subsectionItem = _t.first);
170
+ }
171
+ }, inputs: { label: "label", removeLabel: "removeLabel", addItemLabel: "addItemLabel", addLoopLabel: "addLoopLabel", showAddLoop: "showAddLoop" }, outputs: { onAdd: "onAdd", onAddLoop: "onAddLoop" }, features: [i0.ɵɵ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) {
172
+ if (rf & 1) {
173
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "label", 2);
174
+ i0.ɵɵtext(3);
175
+ i0.ɵɵelementEnd();
176
+ i0.ɵɵtemplate(4, ArraySessionComponent_div_4_Template, 6, 11, "div", 3);
177
+ i0.ɵɵelementEnd()();
178
+ i0.ɵɵelementStart(5, "div", 4)(6, "div", 1)(7, "button", 5);
179
+ i0.ɵɵlistener("click", function ArraySessionComponent_Template_button_click_7_listener() { return ctx.add(); });
180
+ i0.ɵɵtext(8);
181
+ i0.ɵɵelementEnd();
182
+ i0.ɵɵtemplate(9, ArraySessionComponent_button_9_Template, 2, 1, "button", 6);
183
+ i0.ɵɵelementEnd()();
184
+ }
185
+ if (rf & 2) {
186
+ i0.ɵɵadvance(3);
187
+ i0.ɵɵtextInterpolate(ctx.label);
188
+ i0.ɵɵadvance(1);
189
+ i0.ɵɵproperty("ngForOf", ctx.model)("ngForTrackBy", ctx.trackByIndex);
190
+ i0.ɵɵadvance(4);
191
+ i0.ɵɵtextInterpolate(ctx.addItemLabel);
192
+ i0.ɵɵadvance(1);
193
+ i0.ɵɵproperty("ngIf", ctx.showAddLoop);
194
+ }
195
+ }, dependencies: [i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i2.DndDropzoneDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel], styles: [".subsection-element[_ngcontent-%COMP%]{padding:5px 15px 15px;margin-top:10px;border:1px solid #CCC;border-radius:5px;background:#FFF}.subsection-element[_ngcontent-%COMP%]:first-child{margin-top:0!important}.btn-personal-edit[_ngcontent-%COMP%]{margin:5px 0}.subsection-item-title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:calc(100% + 30px);padding:7px 10px 7px 14px;margin-top:-5px;margin-bottom:5px;margin-left:-15px;background:#EEE;border-radius:5px 5px 0 0;font-weight:700;border-bottom:1px solid #CCC}.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}"] });
196
+ (function () {
197
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArraySessionComponent, [{
198
+ type: Component,
199
+ args: [{ selector: 'array-session', template: "<div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <label class=\"info-label bold\">{{ label }}</label>\r\n <div class=\"subsection-element\" *ngFor=\"let item of model; let index = index; trackBy:trackByIndex;\">\r\n <div class=\"subsection-item-title\">{{ removeLabel }} {{ index + 1 }}\r\n <i class=\"far fa-trash-alt\" (click)=\"remove(item)\"></i>\r\n </div>\r\n <div class=\"row\" *ngIf=\"item.mappingAttributes || item.mappingAttributes === ''\">\r\n <div class=\"col-md-8\">\r\n <label class=\"info-label\">Loop</label>\r\n <input class=\"form-control\" type=\"text\" [(ngModel)]=\"item.loop\" [ngModelOptions]=\"{standalone: true}\"\r\n dndDropzone (dndDrop)=\"item.loop = this.onDrop($event, item.loop)\" />\r\n </div>\r\n <div class=\"col-md-4\">\r\n <label class=\"info-label\">Alias</label>\r\n <input class=\"form-control\" type=\"text\" [(ngModel)]=\"item.alias\" [ngModelOptions]=\"{standalone: true}\"\r\n dndDropzone (dndDrop)=\"item.alias = this.onDrop($event, item.alias)\" />\r\n </div>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"subsectionItem, context: {\r\n $implicit: {\r\n items: model, index: index,\r\n mappingAttributes: (item.mappingAttributes || item.mappingAttributes === '') ? item.mappingAttributes : item\r\n }\r\n }\"></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"row add-buttons\">\r\n <div class=\"col-md-12\">\r\n <button class=\"btn btn-outline-primary float-left btn-personal-edit\" (click)=\"add()\">{{ this.addItemLabel }}</button>\r\n <button class=\"btn btn-outline-primary float-left btn-personal-edit ml-2\" *ngIf=\"showAddLoop\" (click)=\"addLoop()\">{{ this.addLoopLabel }}</button>\r\n </div>\r\n</div>\r\n", styles: [".subsection-element{padding:5px 15px 15px;margin-top:10px;border:1px solid #CCC;border-radius:5px;background:#FFF}.subsection-element:first-child{margin-top:0!important}.btn-personal-edit{margin:5px 0}.subsection-item-title{display:flex;justify-content:space-between;align-items:center;width:calc(100% + 30px);padding:7px 10px 7px 14px;margin-top:-5px;margin-bottom:5px;margin-left:-15px;background:#EEE;border-radius:5px 5px 0 0;font-weight:700;border-bottom:1px solid #CCC}.subsection-item-title .fa-trash-alt{color:red;cursor:pointer}.subsection-item-title label{font-weight:700}.add-buttons{margin-top:5px}\n"] }]
200
+ }], null, { label: [{
201
+ type: Input
202
+ }], removeLabel: [{
203
+ type: Input
204
+ }], addItemLabel: [{
205
+ type: Input
206
+ }], addLoopLabel: [{
207
+ type: Input
208
+ }], showAddLoop: [{
209
+ type: Input
210
+ }], onAdd: [{
211
+ type: Output
212
+ }], onAddLoop: [{
213
+ type: Output
214
+ }], subsectionItem: [{
215
+ type: ContentChild,
216
+ args: [TemplateRef, { read: TemplateRef }]
217
+ }] });
218
+ })();
219
+
220
+ function SchemaFormComponent_div_0_Template(rf, ctx) {
221
+ if (rf & 1) {
222
+ const _r4 = i0.ɵɵgetCurrentView();
223
+ i0.ɵɵelementStart(0, "div", 1)(1, "schema-input", 2);
224
+ i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_input_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.model = $event); });
225
+ i0.ɵɵelementEnd();
226
+ i0.ɵɵelementStart(2, "schema-object", 3);
227
+ i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_object_modelChange_2_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.model = $event); });
228
+ i0.ɵɵelementEnd();
229
+ i0.ɵɵelementStart(3, "schema-array", 3);
230
+ i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_array_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.model = $event); });
231
+ i0.ɵɵelementEnd()();
232
+ }
233
+ if (rf & 2) {
234
+ const schema_r1 = ctx.$implicit;
235
+ const i_r2 = ctx.index;
236
+ const ctx_r0 = i0.ɵɵnextContext();
237
+ i0.ɵɵadvance(1);
238
+ i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
239
+ i0.ɵɵadvance(1);
240
+ i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
241
+ i0.ɵɵadvance(1);
242
+ i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
243
+ }
244
+ }
245
+ class SchemaFormComponent extends BaseSchemaComponent {
246
+ constructor() {
247
+ super(...arguments);
248
+ this.requiredLabel = '(required)';
249
+ this.addItemLabel = 'Add Item';
250
+ this.addLoopLabel = 'Add Loop';
251
+ this.additionalAttributesLabel = 'Additional Fields';
252
+ this.customAttributeRemoveLabel = 'Remove';
253
+ this.newCustomFieldNameLabel = 'Name';
254
+ this.newCustomFieldValueLabel = 'Value';
255
+ this.newCustomFieldAddLabel = 'Add';
256
+ this.newCustomFieldSaveLabel = 'Save';
257
+ this.newCustomFieldCancelLabel = 'Cancel';
258
+ this.selectPlaceHolderLabel = 'Select Item';
259
+ this.selectSearchPlaceHolderLabel = 'Search';
260
+ this.selectClearLabel = 'Clear';
261
+ this.selectNotFoundLabel = 'No Items Found';
262
+ this.schemas = [];
263
+ this.customProperties = false;
264
+ this.editing = false;
265
+ this.loaded = false;
266
+ }
267
+ ngAfterContentInit() {
268
+ this.loaded = true;
269
+ }
270
+ onDrop($event, modelElement) {
271
+ return onDropStruct($event, modelElement);
272
+ }
273
+ getId(index) {
274
+ return `${this.idPrefix}-struct-${index}`;
275
+ }
276
+ }
277
+ SchemaFormComponent.ɵfac = /*@__PURE__*/ function () { let ɵSchemaFormComponent_BaseFactory; return function SchemaFormComponent_Factory(t) { return (ɵSchemaFormComponent_BaseFactory || (ɵSchemaFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(SchemaFormComponent)))(t || SchemaFormComponent); }; }();
278
+ SchemaFormComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SchemaFormComponent, selectors: [["schema-form"]], inputs: { requiredLabel: "requiredLabel", addItemLabel: "addItemLabel", addLoopLabel: "addLoopLabel", additionalAttributesLabel: "additionalAttributesLabel", customAttributeRemoveLabel: "customAttributeRemoveLabel", newCustomFieldNameLabel: "newCustomFieldNameLabel", newCustomFieldValueLabel: "newCustomFieldValueLabel", newCustomFieldAddLabel: "newCustomFieldAddLabel", newCustomFieldSaveLabel: "newCustomFieldSaveLabel", newCustomFieldCancelLabel: "newCustomFieldCancelLabel", selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", idPrefix: "idPrefix", schemas: "schemas", customProperties: "customProperties", editing: "editing", inputType: "inputType" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "idPrefix", "model", "schema", "editing", "index", "modelChange"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schema", "editing", "index", "modelChange"]], template: function SchemaFormComponent_Template(rf, ctx) {
279
+ if (rf & 1) {
280
+ i0.ɵɵtemplate(0, SchemaFormComponent_div_0_Template, 4, 48, "div", 0);
281
+ }
282
+ if (rf & 2) {
283
+ i0.ɵɵproperty("ngForOf", ctx.schemas);
284
+ }
285
+ } });
286
+ (function () {
287
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaFormComponent, [{
288
+ type: Component,
289
+ args: [{ selector: 'schema-form', template: "<div class=\"schema-properties\" *ngFor=\"let schema of schemas; let i = index\">\r\n <schema-input\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"model\"\r\n [schema]=\"schema\"\r\n [editing]=\"this.editing\"\r\n [index]=\"i\">\r\n </schema-input>\r\n <schema-object\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"model\"\r\n [schema]=\"schema\"\r\n [editing]=\"this.editing\"\r\n [index]=\"i\">\r\n </schema-object>\r\n <schema-array\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"model\"\r\n [schema]=\"schema\"\r\n [editing]=\"this.editing\"\r\n [index]=\"i\">\r\n </schema-array>\r\n</div>\r\n" }]
290
+ }], null, { requiredLabel: [{
291
+ type: Input
292
+ }], addItemLabel: [{
293
+ type: Input
294
+ }], addLoopLabel: [{
295
+ type: Input
296
+ }], additionalAttributesLabel: [{
297
+ type: Input
298
+ }], customAttributeRemoveLabel: [{
299
+ type: Input
300
+ }], newCustomFieldNameLabel: [{
301
+ type: Input
302
+ }], newCustomFieldValueLabel: [{
303
+ type: Input
304
+ }], newCustomFieldAddLabel: [{
305
+ type: Input
306
+ }], newCustomFieldSaveLabel: [{
307
+ type: Input
308
+ }], newCustomFieldCancelLabel: [{
309
+ type: Input
310
+ }], selectPlaceHolderLabel: [{
311
+ type: Input
312
+ }], selectSearchPlaceHolderLabel: [{
313
+ type: Input
314
+ }], selectClearLabel: [{
315
+ type: Input
316
+ }], selectNotFoundLabel: [{
317
+ type: Input
318
+ }], idPrefix: [{
319
+ type: Input
320
+ }], schemas: [{
321
+ type: Input
322
+ }], customProperties: [{
323
+ type: Input
324
+ }], editing: [{
325
+ type: Input
326
+ }], inputType: [{
327
+ type: Input
328
+ }] });
329
+ })();
330
+
331
+ const _c0$5 = function () { return { standalone: true }; };
332
+ function SchemaCustomAttributesComponent_div_0_Template(rf, ctx) {
333
+ if (rf & 1) {
334
+ const _r8 = i0.ɵɵgetCurrentView();
335
+ i0.ɵɵelementStart(0, "div", 6)(1, "div", 7)(2, "label", 8);
336
+ i0.ɵɵtext(3);
337
+ i0.ɵɵelementEnd();
338
+ i0.ɵɵelementStart(4, "span", 9);
339
+ i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_div_0_Template_span_click_4_listener() { const restoredCtx = i0.ɵɵrestoreView(_r8); const i_r6 = restoredCtx.index; const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.removeCustomAttribute(i_r6)); });
340
+ i0.ɵɵelement(5, "i", 10);
341
+ i0.ɵɵelementEnd();
342
+ i0.ɵɵelementStart(6, "input", 11);
343
+ i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_0_Template_input_ngModelChange_6_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r8); const attribute_r5 = restoredCtx.$implicit; return i0.ɵɵresetView(attribute_r5.value = $event); })("dndDrop", function SchemaCustomAttributesComponent_div_0_Template_input_dndDrop_6_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r8); const attribute_r5 = restoredCtx.$implicit; const ctx_r10 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r10.onDropAttr($event, "value", attribute_r5)); });
344
+ i0.ɵɵelementEnd()()();
345
+ }
346
+ if (rf & 2) {
347
+ const attribute_r5 = ctx.$implicit;
348
+ const ctx_r0 = i0.ɵɵnextContext();
349
+ i0.ɵɵadvance(3);
350
+ i0.ɵɵtextInterpolate(attribute_r5.label);
351
+ i0.ɵɵadvance(2);
352
+ i0.ɵɵproperty("matTooltip", ctx_r0.customAttributeRemoveLabel);
353
+ i0.ɵɵadvance(1);
354
+ i0.ɵɵproperty("ngModel", attribute_r5.value)("ngModelOptions", i0.ɵɵpureFunction0(4, _c0$5));
355
+ }
356
+ }
357
+ function SchemaCustomAttributesComponent_div_1_Template(rf, ctx) {
358
+ if (rf & 1) {
359
+ const _r12 = i0.ɵɵgetCurrentView();
360
+ i0.ɵɵelementStart(0, "div", 12)(1, "div", 13)(2, "div", 7)(3, "label", 8);
361
+ i0.ɵɵtext(4);
362
+ i0.ɵɵelementStart(5, "strong");
363
+ i0.ɵɵtext(6, "*");
364
+ i0.ɵɵelementEnd()();
365
+ i0.ɵɵelementStart(7, "input", 11);
366
+ i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.newCustomField.label = $event); })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_7_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r13.onDropAttr($event, "label", ctx_r13.newCustomField)); });
367
+ i0.ɵɵelementEnd()()();
368
+ i0.ɵɵelementStart(8, "div", 13)(9, "div", 7)(10, "label", 8);
369
+ i0.ɵɵtext(11);
370
+ i0.ɵɵelementStart(12, "strong");
371
+ i0.ɵɵtext(13, "*");
372
+ i0.ɵɵelementEnd()();
373
+ i0.ɵɵelementStart(14, "input", 11);
374
+ i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_14_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r14 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r14.newCustomField.value = $event); })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_14_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r15 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r15.onDropAttr($event, "value", ctx_r15.newCustomField)); });
375
+ i0.ɵɵelementEnd()()()();
376
+ }
377
+ if (rf & 2) {
378
+ const ctx_r1 = i0.ɵɵnextContext();
379
+ i0.ɵɵadvance(4);
380
+ i0.ɵɵtextInterpolate(ctx_r1.newCustomFieldNameLabel);
381
+ i0.ɵɵadvance(3);
382
+ i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.label)("ngModelOptions", i0.ɵɵpureFunction0(6, _c0$5));
383
+ i0.ɵɵadvance(4);
384
+ i0.ɵɵtextInterpolate(ctx_r1.newCustomFieldValueLabel);
385
+ i0.ɵɵadvance(3);
386
+ i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.value)("ngModelOptions", i0.ɵɵpureFunction0(7, _c0$5));
387
+ }
388
+ }
389
+ function SchemaCustomAttributesComponent_button_4_Template(rf, ctx) {
390
+ if (rf & 1) {
391
+ const _r17 = i0.ɵɵgetCurrentView();
392
+ i0.ɵɵelementStart(0, "button", 14);
393
+ i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r16.newCustomField = {}); });
394
+ i0.ɵɵtext(1);
395
+ i0.ɵɵelementEnd();
396
+ }
397
+ if (rf & 2) {
398
+ const ctx_r2 = i0.ɵɵnextContext();
399
+ i0.ɵɵadvance(1);
400
+ i0.ɵɵtextInterpolate1(" ", ctx_r2.newCustomFieldAddLabel, " ");
401
+ }
402
+ }
403
+ function SchemaCustomAttributesComponent_button_5_Template(rf, ctx) {
404
+ if (rf & 1) {
405
+ const _r19 = i0.ɵɵgetCurrentView();
406
+ i0.ɵɵelementStart(0, "button", 15);
407
+ i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r18.newCustomField = null); });
408
+ i0.ɵɵtext(1);
409
+ i0.ɵɵelementEnd();
410
+ }
411
+ if (rf & 2) {
412
+ const ctx_r3 = i0.ɵɵnextContext();
413
+ i0.ɵɵadvance(1);
414
+ i0.ɵɵtextInterpolate1(" ", ctx_r3.newCustomFieldCancelLabel, " ");
415
+ }
416
+ }
417
+ function SchemaCustomAttributesComponent_button_6_Template(rf, ctx) {
418
+ if (rf & 1) {
419
+ const _r21 = i0.ɵɵgetCurrentView();
420
+ i0.ɵɵelementStart(0, "button", 14);
421
+ i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r21); const ctx_r20 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r20.saveNewAttribute(ctx_r20.newCustomField)); });
422
+ i0.ɵɵtext(1);
423
+ i0.ɵɵelementEnd();
424
+ }
425
+ if (rf & 2) {
426
+ const ctx_r4 = i0.ɵɵnextContext();
427
+ i0.ɵɵadvance(1);
428
+ i0.ɵɵtextInterpolate1(" ", ctx_r4.newCustomFieldSaveLabel, " ");
429
+ }
430
+ }
431
+ class SchemaCustomAttributesComponent extends BaseSchemaComponent {
432
+ constructor() {
433
+ super(...arguments);
434
+ this.customAttributeRemoveLabel = 'Remove';
435
+ this.newCustomFieldNameLabel = 'Name';
436
+ this.newCustomFieldValueLabel = 'Value';
437
+ this.newCustomFieldAddLabel = 'Add';
438
+ this.newCustomFieldSaveLabel = 'Save';
439
+ this.newCustomFieldCancelLabel = 'Cancel';
440
+ this.onSaveAttribute = new EventEmitter();
441
+ this.onDropOnAttribute = new EventEmitter();
442
+ }
443
+ ngAfterContentInit() {
444
+ if (!this.model) {
445
+ this.model = [];
446
+ }
447
+ }
448
+ saveNewAttribute(newCustomField) {
449
+ this.onSaveAttribute.emit(newCustomField);
450
+ this.model.push(newCustomField);
451
+ this.newCustomField = null;
452
+ this.modelChange.emit(this.model);
453
+ }
454
+ removeCustomAttribute(attributeIndex) {
455
+ this.model.splice(attributeIndex, 1);
456
+ this.modelChange.emit(this.model);
457
+ }
458
+ onDropAttr($event, value, newCustomField) {
459
+ if (!newCustomField[value]) {
460
+ newCustomField[value] = '';
461
+ }
462
+ newCustomField[value] += `{{${$event.data}}}`;
463
+ }
464
+ }
465
+ SchemaCustomAttributesComponent.ɵfac = /*@__PURE__*/ function () { let ɵSchemaCustomAttributesComponent_BaseFactory; return function SchemaCustomAttributesComponent_Factory(t) { return (ɵSchemaCustomAttributesComponent_BaseFactory || (ɵSchemaCustomAttributesComponent_BaseFactory = i0.ɵɵgetInheritedFactory(SchemaCustomAttributesComponent)))(t || SchemaCustomAttributesComponent); }; }();
466
+ SchemaCustomAttributesComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵ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: [i0.ɵɵ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, "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) {
467
+ if (rf & 1) {
468
+ i0.ɵɵtemplate(0, SchemaCustomAttributesComponent_div_0_Template, 7, 5, "div", 0);
469
+ i0.ɵɵtemplate(1, SchemaCustomAttributesComponent_div_1_Template, 15, 8, "div", 1);
470
+ i0.ɵɵelementStart(2, "div", 2)(3, "div", 3);
471
+ i0.ɵɵtemplate(4, SchemaCustomAttributesComponent_button_4_Template, 2, 1, "button", 4);
472
+ i0.ɵɵtemplate(5, SchemaCustomAttributesComponent_button_5_Template, 2, 1, "button", 5);
473
+ i0.ɵɵtemplate(6, SchemaCustomAttributesComponent_button_6_Template, 2, 1, "button", 4);
474
+ i0.ɵɵelementEnd()();
475
+ }
476
+ if (rf & 2) {
477
+ i0.ɵɵproperty("ngForOf", ctx.model);
478
+ i0.ɵɵadvance(1);
479
+ i0.ɵɵproperty("ngIf", ctx.newCustomField);
480
+ i0.ɵɵadvance(3);
481
+ i0.ɵɵproperty("ngIf", !ctx.newCustomField);
482
+ i0.ɵɵadvance(1);
483
+ i0.ɵɵproperty("ngIf", ctx.newCustomField);
484
+ i0.ɵɵadvance(1);
485
+ i0.ɵɵproperty("ngIf", ctx.newCustomField && ctx.newCustomField.label && ctx.newCustomField.value);
486
+ }
487
+ }, dependencies: [i1.NgForOf, i1.NgIf, i2.DndDropzoneDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i2$1.MatTooltip], styles: [".customAttributeDeleteIcon[_ngcontent-%COMP%]{position:absolute;right:15px;top:4px;cursor:pointer;font-size:16px;color:red}.customAttributeDeleteIcon[_ngcontent-%COMP%]:hover{color:#777}.struct-custom-field[_ngcontent-%COMP%]{margin-top:16px;padding:8px 16px 16px;background-color:#ececec}"] });
488
+ (function () {
489
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaCustomAttributesComponent, [{
490
+ type: Component,
491
+ args: [{ selector: 'schema-custom-attributes', template: "<div class=\"row custom-attributes\" *ngFor=\"let attribute of model; let i = index\">\r\n <div class=\"col-md-12\">\r\n <label class=\"info-label\">{{ attribute.label }}</label>\r\n <span (click)=\"removeCustomAttribute(i)\" class=\"customAttributeDeleteIcon\">\r\n <i class=\"far fa-trash-alt\" [matTooltip]=\"this.customAttributeRemoveLabel\"></i>\r\n </span>\r\n\r\n <input\r\n class=\"form-control\"\r\n [(ngModel)]=\"attribute.value\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n dndDropzone\r\n (dndDrop)=\"onDropAttr($event, 'value', attribute)\"\r\n />\r\n </div>\r\n</div>\r\n<div *ngIf=\"newCustomField\" class=\"struct-custom-field\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <label class=\"info-label\">{{ this.newCustomFieldNameLabel }}<strong>*</strong></label>\r\n <input \r\n class=\"form-control\" \r\n [(ngModel)]=\"newCustomField.label\" \r\n [ngModelOptions]=\"{standalone: true}\"\r\n dndDropzone\r\n (dndDrop)=\"onDropAttr($event, 'label', newCustomField)\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <label class=\"info-label\">{{ this.newCustomFieldValueLabel }}<strong>*</strong></label>\r\n <input\r\n class=\"form-control\"\r\n [(ngModel)]=\"newCustomField.value\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n dndDropzone\r\n (dndDrop)=\"onDropAttr($event, 'value', newCustomField)\"\r\n />\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"row actions-buttons\">\r\n <div class=\"col-md-12 pull-right\">\r\n <button class=\"btn btn-outline-primary float-left\" *ngIf=\"!newCustomField\" (click)=\"newCustomField = {}\">\r\n {{ this.newCustomFieldAddLabel }}\r\n </button>\r\n <button\r\n class=\"btn btn-outline-danger float-left ml-2\"\r\n *ngIf=\"newCustomField\"\r\n (click)=\"newCustomField = null\"\r\n >\r\n {{ this.newCustomFieldCancelLabel }}\r\n </button>\r\n <button\r\n class=\"btn btn-outline-primary float-left\"\r\n *ngIf=\"newCustomField && newCustomField.label && newCustomField.value\"\r\n (click)=\"saveNewAttribute(newCustomField)\"\r\n >\r\n {{ this.newCustomFieldSaveLabel }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".customAttributeDeleteIcon{position:absolute;right:15px;top:4px;cursor:pointer;font-size:16px;color:red}.customAttributeDeleteIcon:hover{color:#777}.struct-custom-field{margin-top:16px;padding:8px 16px 16px;background-color:#ececec}\n"] }]
492
+ }], null, { onDropFunction: [{
493
+ type: Input
494
+ }], customAttributeRemoveLabel: [{
495
+ type: Input
496
+ }], newCustomFieldNameLabel: [{
497
+ type: Input
498
+ }], newCustomFieldValueLabel: [{
499
+ type: Input
500
+ }], newCustomFieldAddLabel: [{
501
+ type: Input
502
+ }], newCustomFieldSaveLabel: [{
503
+ type: Input
504
+ }], newCustomFieldCancelLabel: [{
505
+ type: Input
506
+ }], onSaveAttribute: [{
507
+ type: Output
508
+ }], onDropOnAttribute: [{
509
+ type: Output
510
+ }] });
511
+ })();
512
+
513
+ function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template(rf, ctx) {
514
+ if (rf & 1) {
515
+ const _r8 = i0.ɵɵgetCurrentView();
516
+ i0.ɵɵelementStart(0, "schema-form", 4);
517
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template_schema_form_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r8); const item_r3 = i0.ɵɵnextContext().$implicit; const ctx_r7 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r7.model[ctx_r7.schema.id][item_r3.index].mappingAttributes = $event); });
518
+ i0.ɵɵelementEnd();
519
+ }
520
+ if (rf & 2) {
521
+ const item_r3 = i0.ɵɵnextContext().$implicit;
522
+ const ctx_r4 = i0.ɵɵnextContext(2);
523
+ i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r4.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r4.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r4.selectClearLabel)("selectNotFoundLabel", ctx_r4.selectNotFoundLabel)("requiredLabel", ctx_r4.requiredLabel)("addItemLabel", ctx_r4.addItemLabel)("addLoopLabel", ctx_r4.addLoopLabel)("additionalAttributesLabel", ctx_r4.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r4.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r4.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r4.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r4.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r4.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r4.newCustomFieldCancelLabel)("idPrefix", ctx_r4.idPrefix)("model", ctx_r4.model[ctx_r4.schema.id][item_r3.index].mappingAttributes)("schemas", ctx_r4.getSchemaProperties())("editing", ctx_r4.editing);
524
+ }
525
+ }
526
+ function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template(rf, ctx) {
527
+ if (rf & 1) {
528
+ const _r12 = i0.ɵɵgetCurrentView();
529
+ i0.ɵɵelementStart(0, "schema-form", 4);
530
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template_schema_form_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r12); const item_r3 = i0.ɵɵnextContext().$implicit; const ctx_r11 = i0.ɵɵnextContext(2); return i0.ɵɵresetView((ctx_r11.model[ctx_r11.schema.id][item_r3.index] = $event)); });
531
+ i0.ɵɵelementEnd();
532
+ }
533
+ if (rf & 2) {
534
+ const item_r3 = i0.ɵɵnextContext().$implicit;
535
+ const ctx_r5 = i0.ɵɵnextContext(2);
536
+ i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r5.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r5.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r5.selectClearLabel)("selectNotFoundLabel", ctx_r5.selectNotFoundLabel)("requiredLabel", ctx_r5.requiredLabel)("addItemLabel", ctx_r5.addItemLabel)("addLoopLabel", ctx_r5.addLoopLabel)("additionalAttributesLabel", ctx_r5.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r5.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r5.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r5.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r5.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r5.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r5.newCustomFieldCancelLabel)("idPrefix", ctx_r5.idPrefix)("model", ctx_r5.model[ctx_r5.schema.id][item_r3.index])("schemas", ctx_r5.getSchemaProperties())("editing", ctx_r5.editing);
537
+ }
538
+ }
539
+ function SchemaArrayComponent_div_0_ng_template_2_div_2_Template(rf, ctx) {
540
+ if (rf & 1) {
541
+ const _r16 = i0.ɵɵgetCurrentView();
542
+ i0.ɵɵelementStart(0, "div", 5)(1, "div", 6)(2, "label", 7);
543
+ i0.ɵɵtext(3);
544
+ i0.ɵɵelementEnd();
545
+ i0.ɵɵelementStart(4, "schema-custom-attributes", 8);
546
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_div_2_Template_schema_custom_attributes_modelChange_4_listener($event) { i0.ɵɵrestoreView(_r16); const item_r3 = i0.ɵɵnextContext().$implicit; const ctx_r15 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r15.model[ctx_r15.schema.id][item_r3.index].customAttributes = $event); });
547
+ i0.ɵɵelementEnd()()();
548
+ }
549
+ if (rf & 2) {
550
+ const item_r3 = i0.ɵɵnextContext().$implicit;
551
+ const ctx_r6 = i0.ɵɵnextContext(2);
552
+ i0.ɵɵadvance(3);
553
+ i0.ɵɵtextInterpolate(ctx_r6.additionalAttributesLabel);
554
+ i0.ɵɵadvance(1);
555
+ i0.ɵɵproperty("customAttributeRemoveLabel", ctx_r6.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r6.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r6.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r6.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r6.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r6.newCustomFieldCancelLabel)("model", ctx_r6.model[ctx_r6.schema.id][item_r3.index].customAttributes)("onDropFunction", ctx_r6.onDrop);
556
+ }
557
+ }
558
+ function SchemaArrayComponent_div_0_ng_template_2_Template(rf, ctx) {
559
+ if (rf & 1) {
560
+ i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template, 1, 18, "schema-form", 2);
561
+ i0.ɵɵtemplate(1, SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template, 1, 18, "schema-form", 2);
562
+ i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_div_2_Template, 5, 9, "div", 3);
563
+ }
564
+ if (rf & 2) {
565
+ const item_r3 = ctx.$implicit;
566
+ const ctx_r2 = i0.ɵɵnextContext(2);
567
+ i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop !== undefined);
568
+ i0.ɵɵadvance(1);
569
+ i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop == undefined);
570
+ i0.ɵɵadvance(1);
571
+ i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index] && ctx_r2.schema.customProperties);
572
+ }
573
+ }
574
+ function SchemaArrayComponent_div_0_Template(rf, ctx) {
575
+ if (rf & 1) {
576
+ const _r20 = i0.ɵɵgetCurrentView();
577
+ i0.ɵɵelementStart(0, "div")(1, "array-session", 1);
578
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_Template_array_session_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(); return i0.ɵɵresetView((ctx_r19.model[ctx_r19.schema.id] = $event)); })("onAdd", function SchemaArrayComponent_div_0_Template_array_session_onAdd_1_listener() { i0.ɵɵrestoreView(_r20); const ctx_r21 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r21.addArrayItem(ctx_r21.schema.id, {})); })("onAddLoop", function SchemaArrayComponent_div_0_Template_array_session_onAddLoop_1_listener() { i0.ɵɵrestoreView(_r20); const ctx_r22 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r22.addArrayLoop(ctx_r22.schema.id, {})); });
579
+ i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_Template, 3, 3, "ng-template");
580
+ i0.ɵɵelementEnd()();
581
+ }
582
+ if (rf & 2) {
583
+ const ctx_r0 = i0.ɵɵnextContext();
584
+ i0.ɵɵadvance(1);
585
+ i0.ɵɵproperty("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("label", ctx_r0.schema.title)("removeLabel", ctx_r0.schema.title)("model", ctx_r0.model[ctx_r0.schema.id])("showAddLoop", ctx_r0.schema.withoutLoop !== true);
586
+ }
587
+ }
588
+ const _c0$4 = function () { return { standalone: true }; };
589
+ function SchemaArrayComponent_div_1_ng_template_2_input_2_Template(rf, ctx) {
590
+ if (rf & 1) {
591
+ const _r30 = i0.ɵɵgetCurrentView();
592
+ i0.ɵɵelementStart(0, "input", 12);
593
+ i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_input_2_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r30); const item_r24 = i0.ɵɵnextContext().$implicit; return i0.ɵɵresetView(item_r24.items[item_r24.index].mappingAttributes = $event); })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_input_2_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r30); const item_r24 = i0.ɵɵnextContext().$implicit; const ctx_r31 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(item_r24.items[item_r24.index].mappingAttributes = ctx_r31.onDrop($event, item_r24.items[item_r24.index].mappingAttributes)); });
594
+ i0.ɵɵelementEnd();
595
+ }
596
+ if (rf & 2) {
597
+ const item_r24 = i0.ɵɵnextContext().$implicit;
598
+ const ctx_r25 = i0.ɵɵnextContext(2);
599
+ i0.ɵɵproperty("ngModel", item_r24.items[item_r24.index].mappingAttributes)("ngModelOptions", i0.ɵɵpureFunction0(3, _c0$4))("id", ctx_r25.getId(ctx_r25.index) + "-" + item_r24.index);
600
+ }
601
+ }
602
+ function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template(rf, ctx) {
603
+ if (rf & 1) {
604
+ const _r36 = i0.ɵɵgetCurrentView();
605
+ i0.ɵɵelementStart(0, "input", 12);
606
+ i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r36); const item_r24 = i0.ɵɵnextContext().$implicit; return i0.ɵɵresetView((item_r24.items[item_r24.index] = $event)); })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r36); const item_r24 = i0.ɵɵnextContext().$implicit; const ctx_r37 = i0.ɵɵnextContext(2); return i0.ɵɵresetView((item_r24.items[item_r24.index] = ctx_r37.onDrop($event, item_r24.items[item_r24.index]))); });
607
+ i0.ɵɵelementEnd();
608
+ }
609
+ if (rf & 2) {
610
+ const item_r24 = i0.ɵɵnextContext().$implicit;
611
+ const ctx_r27 = i0.ɵɵnextContext(2);
612
+ i0.ɵɵproperty("ngModel", item_r24.items[item_r24.index])("ngModelOptions", i0.ɵɵpureFunction0(3, _c0$4))("id", ctx_r27.getId(ctx_r27.index) + "-" + item_r24.index);
613
+ }
614
+ }
615
+ function SchemaArrayComponent_div_1_ng_template_2_Template(rf, ctx) {
616
+ if (rf & 1) {
617
+ i0.ɵɵelementStart(0, "label", 9);
618
+ i0.ɵɵtext(1);
619
+ i0.ɵɵelementEnd();
620
+ i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_input_2_Template, 1, 4, "input", 10);
621
+ i0.ɵɵtemplate(3, SchemaArrayComponent_div_1_ng_template_2_ng_template_3_Template, 1, 4, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
622
+ }
623
+ if (rf & 2) {
624
+ const item_r24 = ctx.$implicit;
625
+ const _r26 = i0.ɵɵreference(4);
626
+ const ctx_r23 = i0.ɵɵnextContext(2);
627
+ i0.ɵɵproperty("htmlFor", ctx_r23.getId(ctx_r23.index) + "-" + item_r24.index);
628
+ i0.ɵɵadvance(1);
629
+ i0.ɵɵtextInterpolate(ctx_r23.schema.title);
630
+ i0.ɵɵadvance(1);
631
+ i0.ɵɵproperty("ngIf", item_r24.items[item_r24.index].mappingAttributes || item_r24.items[item_r24.index].mappingAttributes === "")("ngIfElse", _r26);
632
+ }
633
+ }
634
+ function SchemaArrayComponent_div_1_Template(rf, ctx) {
635
+ if (rf & 1) {
636
+ const _r41 = i0.ɵɵgetCurrentView();
637
+ i0.ɵɵelementStart(0, "div")(1, "array-session", 1);
638
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_1_Template_array_session_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView((ctx_r40.model[ctx_r40.schema.id] = $event)); })("onAdd", function SchemaArrayComponent_div_1_Template_array_session_onAdd_1_listener() { i0.ɵɵrestoreView(_r41); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.addArrayItem(ctx_r42.schema.id, "")); })("onAddLoop", function SchemaArrayComponent_div_1_Template_array_session_onAddLoop_1_listener() { i0.ɵɵrestoreView(_r41); const ctx_r43 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r43.addArrayLoop(ctx_r43.schema.id, "")); });
639
+ i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_Template, 5, 4, "ng-template");
640
+ i0.ɵɵelementEnd()();
641
+ }
642
+ if (rf & 2) {
643
+ const ctx_r1 = i0.ɵɵnextContext();
644
+ i0.ɵɵadvance(1);
645
+ i0.ɵɵproperty("addItemLabel", ctx_r1.addItemLabel)("addLoopLabel", ctx_r1.addLoopLabel)("label", ctx_r1.schema.title)("removeLabel", ctx_r1.schema.title)("model", ctx_r1.model[ctx_r1.schema.id])("showAddLoop", ctx_r1.schema.withoutLoop !== true);
646
+ }
647
+ }
648
+ class SchemaArrayComponent extends BaseSchemaComponent {
649
+ constructor() {
650
+ super(...arguments);
651
+ this.requiredLabel = '(required)';
652
+ this.addItemLabel = 'Add Item';
653
+ this.addLoopLabel = 'Add Loop';
654
+ this.additionalAttributesLabel = 'Additional Fields';
655
+ this.customAttributeRemoveLabel = 'Remove';
656
+ this.newCustomFieldNameLabel = 'Name';
657
+ this.newCustomFieldValueLabel = 'Value';
658
+ this.newCustomFieldAddLabel = 'Add';
659
+ this.newCustomFieldSaveLabel = 'Save';
660
+ this.newCustomFieldCancelLabel = 'Cancel';
661
+ this.selectPlaceHolderLabel = 'Select Item';
662
+ this.selectSearchPlaceHolderLabel = 'Search';
663
+ this.selectClearLabel = 'Clear';
664
+ this.selectNotFoundLabel = 'No Items Found';
665
+ this.editing = false;
666
+ }
667
+ ngAfterContentInit() {
668
+ var _a;
669
+ if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'array' && this.model && !this.model[this.schema.id]) {
670
+ this.model[this.schema.id] = [];
671
+ }
672
+ this.loaded = true;
673
+ }
674
+ onDrop($event, modelElement) {
675
+ return onDropStruct($event, modelElement);
676
+ }
677
+ getId(index) {
678
+ return `${this.idPrefix}-struct-${index}`;
679
+ }
680
+ addArrayItem(id, param) {
681
+ this.model[id] = this.model[id] || [];
682
+ if (this.schema.properties) {
683
+ param = {};
684
+ Object.keys(this.schema.properties).forEach(key => {
685
+ const schemaProperty = this.schema.properties[key];
686
+ if (schemaProperty.type === 'object') {
687
+ param[schemaProperty.id] = {};
688
+ }
689
+ else if (schemaProperty.type === 'array') {
690
+ param[schemaProperty.id] = [];
691
+ }
692
+ });
693
+ }
694
+ this.model[id].push(param);
695
+ }
696
+ addArrayLoop(id, mappingAttributes) {
697
+ this.model[id] = this.model[id] || [];
698
+ this.model[id].push({ loop: '', alias: '', mappingAttributes });
699
+ }
700
+ }
701
+ SchemaArrayComponent.ɵfac = /*@__PURE__*/ function () { let ɵSchemaArrayComponent_BaseFactory; return function SchemaArrayComponent_Factory(t) { return (ɵSchemaArrayComponent_BaseFactory || (ɵSchemaArrayComponent_BaseFactory = i0.ɵɵgetInheritedFactory(SchemaArrayComponent)))(t || SchemaArrayComponent); }; }();
702
+ SchemaArrayComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SchemaArrayComponent, selectors: [["schema-array"]], inputs: { requiredLabel: "requiredLabel", addItemLabel: "addItemLabel", addLoopLabel: "addLoopLabel", additionalAttributesLabel: "additionalAttributesLabel", customAttributeRemoveLabel: "customAttributeRemoveLabel", newCustomFieldNameLabel: "newCustomFieldNameLabel", newCustomFieldValueLabel: "newCustomFieldValueLabel", newCustomFieldAddLabel: "newCustomFieldAddLabel", newCustomFieldSaveLabel: "newCustomFieldSaveLabel", newCustomFieldCancelLabel: "newCustomFieldCancelLabel", selectPlaceHolderLabel: "selectPlaceHolderLabel", selectSearchPlaceHolderLabel: "selectSearchPlaceHolderLabel", selectClearLabel: "selectClearLabel", selectNotFoundLabel: "selectNotFoundLabel", idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "addItemLabel", "addLoopLabel", "label", "removeLabel", "model", "showAddLoop", "modelChange", "onAdd", "onAddLoop"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange", 4, "ngIf"], ["class", "row struct-custom-properties", 4, "ngIf"], [3, "selectPlaceHolderLabel", "selectSearchPlaceHolderLabel", "selectClearLabel", "selectNotFoundLabel", "requiredLabel", "addItemLabel", "addLoopLabel", "additionalAttributesLabel", "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "idPrefix", "model", "schemas", "editing", "modelChange"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "customAttributeRemoveLabel", "newCustomFieldNameLabel", "newCustomFieldValueLabel", "newCustomFieldAddLabel", "newCustomFieldSaveLabel", "newCustomFieldCancelLabel", "model", "onDropFunction", "modelChange"], [1, "info-label", 3, "htmlFor"], ["class", "form-control", "type", "text", "dndDropzone", "", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop", 4, "ngIf", "ngIfElse"], ["elseBlock", ""], ["type", "text", "dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop"]], template: function SchemaArrayComponent_Template(rf, ctx) {
703
+ if (rf & 1) {
704
+ i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_Template, 3, 6, "div", 0);
705
+ i0.ɵɵtemplate(1, SchemaArrayComponent_div_1_Template, 3, 6, "div", 0);
706
+ }
707
+ if (rf & 2) {
708
+ i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && ctx.schema.properties);
709
+ i0.ɵɵadvance(1);
710
+ i0.ɵɵproperty("ngIf", ctx.schema && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && !ctx.schema.properties);
711
+ }
712
+ }, dependencies: [i1.NgIf, i2.DndDropzoneDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, ArraySessionComponent, SchemaFormComponent, SchemaCustomAttributesComponent] });
713
+ (function () {
714
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaArrayComponent, [{
715
+ type: Component,
716
+ args: [{ selector: 'schema-array', template: "<div *ngIf=\"loaded && canRender(schema) && schema.type === 'array' && schema.properties\">\r\n <array-session\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [label]=\"schema.title\"\r\n [removeLabel]=\"schema.title\"\r\n [(model)]=\"this.model[schema.id]\"\r\n [showAddLoop]=\"schema.withoutLoop !== true\"\r\n (onAdd)=\"addArrayItem(schema.id, {})\"\r\n (onAddLoop)=\"addArrayLoop(schema.id, {})\">\r\n <ng-template let-item>\r\n <schema-form\r\n *ngIf=\"this.model[schema.id][item.index].loop !== undefined\"\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"this.model[schema.id][item.index].mappingAttributes\"\r\n [schemas]=\"getSchemaProperties()\"\r\n [editing]=\"this.editing\">\r\n </schema-form>\r\n <schema-form\r\n *ngIf=\"this.model[schema.id][item.index].loop == undefined\"\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"this.model[schema.id][item.index]\"\r\n [schemas]=\"getSchemaProperties()\"\r\n [editing]=\"this.editing\">\r\n </schema-form>\r\n\r\n <div class=\"row struct-custom-properties\" *ngIf=\"this.model[schema.id][item.index] && schema.customProperties\">\r\n <div class=\"col-md-12\">\r\n <label class=\"info-label bold\">{{ this.additionalAttributesLabel }}</label>\r\n <schema-custom-attributes\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [(model)]=\"this.model[schema.id][item.index].customAttributes\"\r\n [onDropFunction]=\"onDrop\">\r\n </schema-custom-attributes>\r\n </div>\r\n </div>\r\n\r\n </ng-template>\r\n </array-session>\r\n</div>\r\n<div *ngIf=\"schema && canRender(schema) && schema.type === 'array' && !schema.properties\">\r\n <array-session\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [label]=\"schema.title\"\r\n [removeLabel]=\"schema.title\"\r\n [(model)]=\"this.model[schema.id]\"\r\n [showAddLoop]=\"schema.withoutLoop !== true\"\r\n (onAdd)=\"addArrayItem(schema.id, '')\"\r\n (onAddLoop)=\"addArrayLoop(schema.id, '')\"\r\n >\r\n <ng-template let-item>\r\n <label class=\"info-label\" [htmlFor]=\"getId(index)+'-'+item.index\">{{ schema.title }}</label>\r\n <input class=\"form-control\" type=\"text\" [(ngModel)]=\"item.items[item.index].mappingAttributes\"\r\n [ngModelOptions]=\"{standalone: true}\" dndDropzone\r\n (dndDrop)=\"item.items[item.index].mappingAttributes = this.onDrop($event, item.items[item.index].mappingAttributes)\"\r\n *ngIf=\"item.items[item.index].mappingAttributes || item.items[item.index].mappingAttributes === ''; else elseBlock\"\r\n [id]=\"getId(index)+'-'+item.index\"/>\r\n <ng-template #elseBlock>\r\n <input class=\"form-control\" type=\"text\" [(ngModel)]=\"item.items[item.index]\"\r\n [ngModelOptions]=\"{standalone: true}\" dndDropzone\r\n (dndDrop)=\"item.items[item.index] = this.onDrop($event, item.items[item.index])\"\r\n [id]=\"getId(index)+'-'+item.index\"/>\r\n </ng-template>\r\n </ng-template>\r\n </array-session>\r\n</div>\r\n" }]
717
+ }], null, { requiredLabel: [{
718
+ type: Input
719
+ }], addItemLabel: [{
720
+ type: Input
721
+ }], addLoopLabel: [{
722
+ type: Input
723
+ }], additionalAttributesLabel: [{
724
+ type: Input
725
+ }], customAttributeRemoveLabel: [{
726
+ type: Input
727
+ }], newCustomFieldNameLabel: [{
728
+ type: Input
729
+ }], newCustomFieldValueLabel: [{
730
+ type: Input
731
+ }], newCustomFieldAddLabel: [{
732
+ type: Input
733
+ }], newCustomFieldSaveLabel: [{
734
+ type: Input
735
+ }], newCustomFieldCancelLabel: [{
736
+ type: Input
737
+ }], selectPlaceHolderLabel: [{
738
+ type: Input
739
+ }], selectSearchPlaceHolderLabel: [{
740
+ type: Input
741
+ }], selectClearLabel: [{
742
+ type: Input
743
+ }], selectNotFoundLabel: [{
744
+ type: Input
745
+ }], idPrefix: [{
746
+ type: Input
747
+ }], schema: [{
748
+ type: Input
749
+ }], editing: [{
750
+ type: Input
751
+ }], index: [{
752
+ type: Input
753
+ }] });
754
+ })();
755
+
756
+ const _c0$3 = function (a0) { return { "has-error": a0 }; };
757
+ function FieldRenderComponent_small_3_Template(rf, ctx) {
758
+ if (rf & 1) {
759
+ i0.ɵɵelementStart(0, "small", 0);
760
+ i0.ɵɵtext(1);
761
+ i0.ɵɵelementEnd();
762
+ }
763
+ if (rf & 2) {
764
+ const ctx_r0 = i0.ɵɵnextContext();
765
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$3, ctx_r0.state && !ctx_r0.state.valid && ctx_r0.state.errors));
766
+ i0.ɵɵadvance(1);
767
+ i0.ɵɵtextInterpolate(ctx_r0.requiredLabel);
768
+ }
769
+ }
770
+ function FieldRenderComponent_span_4_Template(rf, ctx) {
771
+ if (rf & 1) {
772
+ i0.ɵɵelementStart(0, "span", 4);
773
+ i0.ɵɵelement(1, "i", 5);
774
+ i0.ɵɵelementEnd();
775
+ }
776
+ if (rf & 2) {
777
+ const ctx_r1 = i0.ɵɵnextContext();
778
+ i0.ɵɵpropertyInterpolate("matTooltip", ctx_r1.tooltip);
779
+ }
780
+ }
781
+ const _c1$1 = ["*"];
782
+ class FieldRenderComponent {
783
+ constructor() {
784
+ this.requiredLabel = '(required)';
785
+ this.label = '';
786
+ this.required = true;
787
+ }
788
+ }
789
+ FieldRenderComponent.ɵfac = function FieldRenderComponent_Factory(t) { return new (t || FieldRenderComponent)(); };
790
+ FieldRenderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FieldRenderComponent, selectors: [["field-render"]], inputs: { requiredLabel: "requiredLabel", label: "label", inputId: "inputId", tooltip: "tooltip", required: "required", state: "state" }, ngContentSelectors: _c1$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) {
791
+ if (rf & 1) {
792
+ i0.ɵɵprojectionDef();
793
+ i0.ɵɵelementStart(0, "div", 0)(1, "label", 1);
794
+ i0.ɵɵtext(2);
795
+ i0.ɵɵtemplate(3, FieldRenderComponent_small_3_Template, 2, 4, "small", 2);
796
+ i0.ɵɵtemplate(4, FieldRenderComponent_span_4_Template, 2, 1, "span", 3);
797
+ i0.ɵɵelementEnd();
798
+ i0.ɵɵprojection(5);
799
+ i0.ɵɵelementEnd();
800
+ }
801
+ if (rf & 2) {
802
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$3, ctx.state && !ctx.state.valid && (!ctx.state.pristine || ctx.state.touched) && ctx.state.errors));
803
+ i0.ɵɵadvance(1);
804
+ i0.ɵɵproperty("htmlFor", ctx.inputId);
805
+ i0.ɵɵadvance(1);
806
+ i0.ɵɵtextInterpolate1(" ", ctx.label, " ");
807
+ i0.ɵɵadvance(1);
808
+ i0.ɵɵproperty("ngIf", ctx.required);
809
+ i0.ɵɵadvance(1);
810
+ i0.ɵɵproperty("ngIf", ctx.tooltip);
811
+ }
812
+ }, dependencies: [i1.NgClass, i1.NgIf, i2$1.MatTooltip], styles: [".info-icon[_ngcontent-%COMP%]{color:#222d57;font-size:13px;float:right;margin-left:4px}"] });
813
+ (function () {
814
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FieldRenderComponent, [{
815
+ type: Component,
816
+ args: [{ selector: 'field-render', template: "<div [ngClass]=\"{'has-error':state && !state.valid && (!state.pristine || state.touched) && state.errors}\">\r\n <label class=\"info-label bold\" [htmlFor]=\"inputId\">\r\n {{ label }}\r\n <small [ngClass]=\"{'has-error':state && !state.valid && state.errors}\" *ngIf=\"required\">{{this.requiredLabel}}</small>\r\n <span class=\"info-icon\" matTooltip=\"{{ tooltip }}\" *ngIf=\"tooltip\">\r\n <i class=\"far fa-question-circle\"></i>\r\n </span>\r\n </label>\r\n\r\n <!-- Input, textarea or select -->\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".info-icon{color:#222d57;font-size:13px;float:right;margin-left:4px}\n"] }]
817
+ }], null, { requiredLabel: [{
818
+ type: Input
819
+ }], label: [{
820
+ type: Input
821
+ }], inputId: [{
822
+ type: Input
823
+ }], tooltip: [{
824
+ type: Input
825
+ }], required: [{
826
+ type: Input
827
+ }], state: [{
828
+ type: Input
829
+ }] });
830
+ })();
831
+
832
+ const _c0$2 = function () { return { standalone: true }; };
833
+ class BooleanInputComponent extends BaseSchemaComponent {
834
+ ngAfterContentInit() {
835
+ this.value = this.model;
836
+ }
837
+ onDropCallBack($event, value) {
838
+ this.value = value = super.onDrop($event, value);
839
+ this.changeValue(value);
840
+ }
841
+ changeValue($event) {
842
+ if ($event && ($event === 'true' || $event === 'false')) {
843
+ this.model = $event === 'true';
844
+ this.value = this.model;
845
+ this.modelChange.emit(this.model);
846
+ }
847
+ else {
848
+ this.model = $event;
849
+ this.value = this.model;
850
+ this.modelChange.emit(this.model);
851
+ }
852
+ }
853
+ }
854
+ BooleanInputComponent.ɵfac = /*@__PURE__*/ function () { let ɵBooleanInputComponent_BaseFactory; return function BooleanInputComponent_Factory(t) { return (ɵBooleanInputComponent_BaseFactory || (ɵBooleanInputComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BooleanInputComponent)))(t || BooleanInputComponent); }; }();
855
+ BooleanInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BooleanInputComponent, selectors: [["boolean-input"]], inputs: { placeholder: "placeholder", inputId: "inputId", maxLength: "maxLength" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 6, consts: [["dndDropzone", "", 1, "form-control", 3, "id", "placeholder", "ngModel", "ngModelOptions", "maxlength", "ngModelChange", "dndDrop"]], template: function BooleanInputComponent_Template(rf, ctx) {
856
+ if (rf & 1) {
857
+ i0.ɵɵelementStart(0, "input", 0);
858
+ i0.ɵɵlistener("ngModelChange", function BooleanInputComponent_Template_input_ngModelChange_0_listener($event) { return ctx.value = $event; })("ngModelChange", function BooleanInputComponent_Template_input_ngModelChange_0_listener($event) { return ctx.changeValue($event); })("dndDrop", function BooleanInputComponent_Template_input_dndDrop_0_listener($event) { return ctx.onDropCallBack($event, ctx.value); });
859
+ i0.ɵɵelementEnd();
860
+ }
861
+ if (rf & 2) {
862
+ i0.ɵɵproperty("id", ctx.inputId)("placeholder", ctx.placeholder)("ngModel", ctx.value)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0$2))("maxlength", ctx.maxLength);
863
+ }
864
+ }, dependencies: [i2.DndDropzoneDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.MaxLengthValidator, i3.NgModel], encapsulation: 2 });
865
+ (function () {
866
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BooleanInputComponent, [{
867
+ type: Component,
868
+ args: [{ selector: 'boolean-input', template: "<input class=\"form-control\"\r\n [id]=\"inputId\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"value\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"changeValue($event)\"\r\n dndDropzone (dndDrop)=\"onDropCallBack($event, value)\"\r\n [maxlength]=\"maxLength\">\r\n" }]
869
+ }], null, { placeholder: [{
870
+ type: Input
871
+ }], inputId: [{
872
+ type: Input
873
+ }], maxLength: [{
874
+ type: Input
875
+ }] });
876
+ })();
877
+
878
+ const _c0$1 = function () { return { standalone: true }; };
879
+ class NumberInputComponent extends BaseSchemaComponent {
880
+ ngAfterContentInit() {
881
+ this.value = this.model;
882
+ }
883
+ onDropCallBack($event, value) {
884
+ this.value = value = super.onDrop($event, value);
885
+ this.changeValue(value);
886
+ }
887
+ changeValue($event) {
888
+ if ($event && !isNaN($event)) {
889
+ this.model = Number($event);
890
+ this.modelChange.emit(this.model);
891
+ }
892
+ else {
893
+ this.model = $event;
894
+ this.modelChange.emit(this.model);
895
+ }
896
+ }
897
+ }
898
+ NumberInputComponent.ɵfac = /*@__PURE__*/ function () { let ɵNumberInputComponent_BaseFactory; return function NumberInputComponent_Factory(t) { return (ɵNumberInputComponent_BaseFactory || (ɵNumberInputComponent_BaseFactory = i0.ɵɵgetInheritedFactory(NumberInputComponent)))(t || NumberInputComponent); }; }();
899
+ NumberInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NumberInputComponent, selectors: [["number-input"]], inputs: { placeholder: "placeholder", inputId: "inputId", maxLength: "maxLength" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 6, consts: [["dndDropzone", "", 1, "form-control", "number-input", 3, "id", "placeholder", "ngModel", "ngModelOptions", "maxlength", "ngModelChange", "dndDrop"]], template: function NumberInputComponent_Template(rf, ctx) {
900
+ if (rf & 1) {
901
+ i0.ɵɵelementStart(0, "input", 0);
902
+ i0.ɵɵlistener("ngModelChange", function NumberInputComponent_Template_input_ngModelChange_0_listener($event) { return ctx.value = $event; })("ngModelChange", function NumberInputComponent_Template_input_ngModelChange_0_listener($event) { return ctx.changeValue($event); })("dndDrop", function NumberInputComponent_Template_input_dndDrop_0_listener($event) { return ctx.onDropCallBack($event, ctx.value); });
903
+ i0.ɵɵelementEnd();
904
+ }
905
+ if (rf & 2) {
906
+ i0.ɵɵproperty("id", ctx.inputId)("placeholder", ctx.placeholder)("ngModel", ctx.value)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0$1))("maxlength", ctx.maxLength);
907
+ }
908
+ }, dependencies: [i2.DndDropzoneDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.MaxLengthValidator, i3.NgModel], encapsulation: 2 });
909
+ (function () {
910
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NumberInputComponent, [{
911
+ type: Component,
912
+ args: [{ selector: 'number-input', template: "<input class=\"form-control number-input\"\r\n [id]=\"inputId\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"value\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"changeValue($event)\"\r\n dndDropzone (dndDrop)=\"onDropCallBack($event, value)\"\r\n [maxlength]=\"maxLength\">\r\n" }]
913
+ }], null, { placeholder: [{
914
+ type: Input
915
+ }], inputId: [{
916
+ type: Input
917
+ }], maxLength: [{
918
+ type: Input
919
+ }] });
920
+ })();
921
+
922
+ function InputRenderComponent_div_1_icon_1_Template(rf, ctx) {
923
+ if (rf & 1) {
924
+ const _r8 = i0.ɵɵgetCurrentView();
925
+ i0.ɵɵelementStart(0, "icon", 8);
926
+ i0.ɵɵlistener("onClick", function InputRenderComponent_div_1_icon_1_Template_icon_onClick_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r7.editPassword()); });
927
+ i0.ɵɵelementEnd();
928
+ }
929
+ if (rf & 2) {
930
+ i0.ɵɵproperty("name", "fas fa-pencil-alt");
931
+ }
932
+ }
933
+ function InputRenderComponent_div_1_icon_2_Template(rf, ctx) {
934
+ if (rf & 1) {
935
+ const _r10 = i0.ɵɵgetCurrentView();
936
+ i0.ɵɵelementStart(0, "icon", 9);
937
+ i0.ɵɵlistener("mousedown", function InputRenderComponent_div_1_icon_2_Template_icon_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(2); ctx_r9.cancelEditPassword(); return i0.ɵɵresetView($event.stopPropagation()); });
938
+ i0.ɵɵelementEnd();
939
+ }
940
+ if (rf & 2) {
941
+ i0.ɵɵproperty("name", "fas fa-ban");
942
+ }
943
+ }
944
+ function InputRenderComponent_div_1_Template(rf, ctx) {
945
+ if (rf & 1) {
946
+ i0.ɵɵelementStart(0, "div", 5);
947
+ i0.ɵɵtemplate(1, InputRenderComponent_div_1_icon_1_Template, 1, 1, "icon", 6);
948
+ i0.ɵɵtemplate(2, InputRenderComponent_div_1_icon_2_Template, 1, 1, "icon", 7);
949
+ i0.ɵɵelementEnd();
950
+ }
951
+ if (rf & 2) {
952
+ const ctx_r0 = i0.ɵɵnextContext();
953
+ i0.ɵɵadvance(1);
954
+ i0.ɵɵproperty("ngIf", ctx_r0.schema.readOnlyPassword);
955
+ i0.ɵɵadvance(1);
956
+ i0.ɵɵproperty("ngIf", !ctx_r0.schema.readOnlyPassword);
957
+ }
958
+ }
959
+ const _c0 = function () { return { standalone: true }; };
960
+ function InputRenderComponent_input_2_Template(rf, ctx) {
961
+ if (rf & 1) {
962
+ const _r12 = i0.ɵɵgetCurrentView();
963
+ i0.ɵɵelementStart(0, "input", 10);
964
+ i0.ɵɵlistener("blur", function InputRenderComponent_input_2_Template_input_blur_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.onInputBlur()); })("ngModelChange", function InputRenderComponent_input_2_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r13.value = $event); })("ngModelChange", function InputRenderComponent_input_2_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r14 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r14.onChange($event)); })("dndDrop", function InputRenderComponent_input_2_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r15 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r15.onDropCallBack($event, ctx_r15.value)); });
965
+ i0.ɵɵelementEnd();
966
+ }
967
+ if (rf & 2) {
968
+ const ctx_r1 = i0.ɵɵnextContext();
969
+ i0.ɵɵpropertyInterpolate("placeholder", ctx_r1.schema.type === "password" && ctx_r1.schema.readOnlyPassword ? "*****" : ctx_r1.schema.description);
970
+ i0.ɵɵproperty("disabled", ctx_r1.schema.readOnlyPassword)("type", ctx_r1.schema.type === "password" ? "password" : "text")("ngModel", ctx_r1.value)("ngModelOptions", i0.ɵɵpureFunction0(7, _c0))("id", ctx_r1.inputId)("maxlength", ctx_r1.schema.maxLength);
971
+ }
972
+ }
973
+ function InputRenderComponent_select_box_3_Template(rf, ctx) {
974
+ if (rf & 1) {
975
+ const _r17 = i0.ɵɵgetCurrentView();
976
+ i0.ɵɵelementStart(0, "select-box", 11);
977
+ i0.ɵɵlistener("ngModelChange", function InputRenderComponent_select_box_3_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r16.value = $event); })("ngModelChange", function InputRenderComponent_select_box_3_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r18 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r18.onChange($event.key)); });
978
+ i0.ɵɵelementEnd();
979
+ }
980
+ if (rf & 2) {
981
+ const ctx_r2 = i0.ɵɵnextContext();
982
+ i0.ɵɵproperty("id", ctx_r2.inputId)("ngModel", ctx_r2.value)("ngModelOptions", i0.ɵɵpureFunction0(12, _c0))("placeholder", ctx_r2.schema.description || ctx_r2.selectPlaceHolderLabel)("searchPlaceHolder", ctx_r2.selectSearchPlaceHolderLabel)("clearText", ctx_r2.selectClearLabel)("notFoundText", ctx_r2.selectNotFoundLabel)("bindKey", "key")("bindValue", "value")("enabledSearch", true)("limitItens", 30)("data", ctx_r2.schema.options);
983
+ }
984
+ }
985
+ function InputRenderComponent_number_input_4_Template(rf, ctx) {
986
+ if (rf & 1) {
987
+ const _r20 = i0.ɵɵgetCurrentView();
988
+ i0.ɵɵelementStart(0, "number-input", 12);
989
+ i0.ɵɵlistener("modelChange", function InputRenderComponent_number_input_4_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r19.value = $event); })("modelChange", function InputRenderComponent_number_input_4_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r21 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r21.onChange($event)); });
990
+ i0.ɵɵelementEnd();
991
+ }
992
+ if (rf & 2) {
993
+ const ctx_r3 = i0.ɵɵnextContext();
994
+ i0.ɵɵproperty("model", ctx_r3.value)("inputId", ctx_r3.inputId)("placeholder", ctx_r3.schema.description)("maxLength", ctx_r3.schema.maxLength);
995
+ }
996
+ }
997
+ function InputRenderComponent_boolean_input_5_Template(rf, ctx) {
998
+ if (rf & 1) {
999
+ const _r23 = i0.ɵɵgetCurrentView();
1000
+ i0.ɵɵelementStart(0, "boolean-input", 12);
1001
+ i0.ɵɵlistener("modelChange", function InputRenderComponent_boolean_input_5_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r22 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r22.value = $event); })("modelChange", function InputRenderComponent_boolean_input_5_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r24 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r24.onChange($event)); });
1002
+ i0.ɵɵelementEnd();
1003
+ }
1004
+ if (rf & 2) {
1005
+ const ctx_r4 = i0.ɵɵnextContext();
1006
+ i0.ɵɵproperty("model", ctx_r4.value)("inputId", ctx_r4.inputId)("placeholder", ctx_r4.schema.description)("maxLength", ctx_r4.schema.maxLength);
1007
+ }
1008
+ }
1009
+ const _c1 = function (a0) { return { "schema-input-container-password": a0 }; };
1010
+ class InputRenderComponent extends BaseSchemaComponent {
1011
+ constructor() {
1012
+ super(...arguments);
1013
+ this.selectPlaceHolderLabel = 'Select Item';
1014
+ this.selectSearchPlaceHolderLabel = 'Search';
1015
+ this.selectClearLabel = 'Clear';
1016
+ this.selectNotFoundLabel = 'No Items Found';
1017
+ this.schema = {};
1018
+ this.editing = false;
1019
+ this.onDropEvent = new EventEmitter();
1020
+ }
1021
+ ngAfterContentInit() {
1022
+ var _a, _b, _c;
1023
+ if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) !== 'object' && ((_b = this.schema) === null || _b === void 0 ? void 0 : _b.type) !== 'array') {
1024
+ if (!this.editing && this.schema.options) {
1025
+ const $event = this.schema.options.filter((item) => item.selected === true);
1026
+ if ($event[0]) {
1027
+ this.onChange($event[0].key);
1028
+ this.value = $event[0];
1029
+ }
1030
+ }
1031
+ else if (this.editing && this.schema.options && this.model) {
1032
+ const $event = this.schema.options.filter((item) => item.key === this.model);
1033
+ if ($event[0]) {
1034
+ this.onChange($event[0].key);
1035
+ this.value = $event[0];
1036
+ }
1037
+ }
1038
+ else {
1039
+ this.value = this.model;
1040
+ }
1041
+ }
1042
+ if (this.editing && ((_c = this.schema) === null || _c === void 0 ? void 0 : _c.type) === 'password') {
1043
+ this.schema.readOnlyPassword = true;
1044
+ }
1045
+ }
1046
+ onDropCallBack($event, value) {
1047
+ this.value = value = super.onDrop($event, value);
1048
+ this.onChange(value);
1049
+ }
1050
+ onChange($event) {
1051
+ if (this.schema.type !== 'password' || !this.editing) {
1052
+ this.model = $event;
1053
+ this.modelChange.emit(this.model);
1054
+ }
1055
+ }
1056
+ onInputBlur() {
1057
+ var _a;
1058
+ if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'password') {
1059
+ this.savePassword();
1060
+ }
1061
+ }
1062
+ savePassword() {
1063
+ this.model = this.value || '';
1064
+ this.modelChange.emit(this.model);
1065
+ this.setReadOnlyPassword(true);
1066
+ }
1067
+ cancelEditPassword() {
1068
+ setTimeout(() => {
1069
+ this.value = undefined;
1070
+ this.model = undefined;
1071
+ this.modelChange.emit(this.model);
1072
+ this.setReadOnlyPassword(true);
1073
+ }, 100);
1074
+ }
1075
+ editPassword() {
1076
+ this.setReadOnlyPassword(false);
1077
+ }
1078
+ setReadOnlyPassword(value) {
1079
+ this.schema.readOnlyPassword = value;
1080
+ }
1081
+ }
1082
+ InputRenderComponent.ɵfac = /*@__PURE__*/ function () { let ɵInputRenderComponent_BaseFactory; return function InputRenderComponent_Factory(t) { return (ɵInputRenderComponent_BaseFactory || (ɵInputRenderComponent_BaseFactory = i0.ɵɵgetInheritedFactory(InputRenderComponent)))(t || InputRenderComponent); }; }();
1083
+ InputRenderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵ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: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 8, consts: [[1, "schema-input-container", 3, "ngClass"], ["class", "edit-icon", 4, "ngIf"], ["class", "form-control", "dndDropzone", "", 3, "disabled", "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "blur", "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"], [1, "edit-icon"], ["size", "15", "type", "primary", 3, "name", "onClick", 4, "ngIf"], ["size", "15", "type", "primary clickable", 3, "name", "mousedown", 4, "ngIf"], ["size", "15", "type", "primary", 3, "name", "onClick"], ["size", "15", "type", "primary clickable", 3, "name", "mousedown"], ["dndDropzone", "", 1, "form-control", 3, "disabled", "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "blur", "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) {
1084
+ if (rf & 1) {
1085
+ i0.ɵɵelementStart(0, "div", 0);
1086
+ i0.ɵɵtemplate(1, InputRenderComponent_div_1_Template, 3, 2, "div", 1);
1087
+ i0.ɵɵtemplate(2, InputRenderComponent_input_2_Template, 1, 8, "input", 2);
1088
+ i0.ɵɵtemplate(3, InputRenderComponent_select_box_3_Template, 1, 13, "select-box", 3);
1089
+ i0.ɵɵtemplate(4, InputRenderComponent_number_input_4_Template, 1, 4, "number-input", 4);
1090
+ i0.ɵɵtemplate(5, InputRenderComponent_boolean_input_5_Template, 1, 4, "boolean-input", 4);
1091
+ i0.ɵɵelementEnd();
1092
+ }
1093
+ if (rf & 2) {
1094
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1, ctx.schema.type === "password"));
1095
+ i0.ɵɵadvance(1);
1096
+ i0.ɵɵproperty("ngIf", ctx.schema.type === "password" && ctx.editing);
1097
+ i0.ɵɵadvance(1);
1098
+ i0.ɵɵproperty("ngIf", (ctx.schema.type === "string" || ctx.schema.type === "password") && !ctx.schema.options);
1099
+ i0.ɵɵadvance(1);
1100
+ i0.ɵɵproperty("ngIf", ctx.schema.type === "string" && ctx.schema.options);
1101
+ i0.ɵɵadvance(1);
1102
+ i0.ɵɵproperty("ngIf", ctx.schema.type === "number");
1103
+ i0.ɵɵadvance(1);
1104
+ i0.ɵɵproperty("ngIf", ctx.schema.type === "boolean");
1105
+ }
1106
+ }, dependencies: [i1.NgClass, i1.NgIf, i2.DndDropzoneDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.MaxLengthValidator, i3.NgModel, i4.SelectBoxComponent, i5.IconComponent, BooleanInputComponent, NumberInputComponent], styles: [".schema-input-container-password[_ngcontent-%COMP%]{position:relative}.schema-input-container-password[_ngcontent-%COMP%] .edit-icon[_ngcontent-%COMP%]{position:absolute;width:30px;right:-5px;top:10px;z-index:1}.schema-input-container-password[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{display:block;padding-right:40px!important}"] });
1107
+ (function () {
1108
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InputRenderComponent, [{
1109
+ type: Component,
1110
+ args: [{ selector: 'input-render', template: "<div class=\"schema-input-container\" [ngClass]=\"{'schema-input-container-password' : schema.type === 'password' }\" >\r\n <div *ngIf=\"schema.type === 'password' && editing\" class=\"edit-icon\">\r\n <icon *ngIf=\"this.schema.readOnlyPassword\" size=\"15\" type=\"primary\" [name]=\"'fas fa-pencil-alt'\"\r\n (onClick)=\"editPassword()\">\r\n </icon>\r\n <icon *ngIf=\"!this.schema.readOnlyPassword\" size=\"15\" type=\"primary clickable\" [name]=\"'fas fa-ban'\"\r\n (mousedown)=\"cancelEditPassword(); $event.stopPropagation()\">\r\n </icon>\r\n </div>\r\n <input (blur)=\"onInputBlur()\"\r\n [disabled]=\"schema.readOnlyPassword\" class=\"form-control\"\r\n [type]=\"schema.type === 'password' ? 'password' : 'text'\"\r\n placeholder=\"{{schema.type === 'password' && this.schema.readOnlyPassword ? '*****' : schema.description}}\"\r\n *ngIf=\"(schema.type === 'string' || schema.type === 'password') && !schema.options\"\r\n [(ngModel)]=\"value\" [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"onChange($event)\"\r\n dndDropzone (dndDrop)=\"onDropCallBack($event, value)\" [id]=\"inputId\" [maxlength]=\"schema.maxLength\"/>\r\n\r\n <select-box\r\n [id]=\"inputId\"\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"onChange($event.key)\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n *ngIf=\"schema.type === 'string' && schema.options\"\r\n [placeholder]=\"schema.description || this.selectPlaceHolderLabel\"\r\n [searchPlaceHolder]=\"selectSearchPlaceHolderLabel\"\r\n [clearText]=\"this.selectClearLabel\"\r\n [notFoundText]=\"this.selectNotFoundLabel\"\r\n [bindKey]=\"'key'\"\r\n [bindValue]=\"'value'\"\r\n [enabledSearch]=\"true\"\r\n [limitItens]=\"30\"\r\n [data]=\"schema.options\">\r\n </select-box>\r\n\r\n <number-input [(model)]=\"value\" [inputId]=\"inputId\"\r\n *ngIf=\"schema.type === 'number'\"\r\n [placeholder]=\"schema.description\" [maxLength]=\"schema.maxLength\"\r\n (modelChange)=\"onChange($event)\"></number-input>\r\n\r\n <boolean-input [(model)]=\"value\" [inputId]=\"inputId\"\r\n *ngIf=\"schema.type === 'boolean'\"\r\n [placeholder]=\"schema.description\" [maxLength]=\"schema.maxLength\"\r\n (modelChange)=\"onChange($event)\"></boolean-input>\r\n</div>\r\n", styles: [".schema-input-container-password{position:relative}.schema-input-container-password .edit-icon{position:absolute;width:30px;right:-5px;top:10px;z-index:1}.schema-input-container-password input{display:block;padding-right:40px!important}\n"] }]
1111
+ }], null, { selectPlaceHolderLabel: [{
1112
+ type: Input
1113
+ }], selectSearchPlaceHolderLabel: [{
1114
+ type: Input
1115
+ }], selectClearLabel: [{
1116
+ type: Input
1117
+ }], selectNotFoundLabel: [{
1118
+ type: Input
1119
+ }], schema: [{
1120
+ type: Input
1121
+ }], modelPropertiesPath: [{
1122
+ type: Input
1123
+ }], inputId: [{
1124
+ type: Input
1125
+ }], editing: [{
1126
+ type: Input
1127
+ }], onDropEvent: [{
1128
+ type: Output
1129
+ }] });
1130
+ })();
1131
+
1132
+ function SchemaInputComponent_div_0_Template(rf, ctx) {
1133
+ if (rf & 1) {
1134
+ const _r3 = i0.ɵɵgetCurrentView();
1135
+ i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "field-render", 3)(3, "input-render", 4);
1136
+ i0.ɵɵlistener("modelChange", function SchemaInputComponent_div_0_Template_input_render_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView((ctx_r2.model[ctx_r2.schema.id] = $event)); });
1137
+ i0.ɵɵelementEnd()()()();
1138
+ }
1139
+ if (rf & 2) {
1140
+ const ctx_r0 = i0.ɵɵnextContext();
1141
+ i0.ɵɵadvance(2);
1142
+ i0.ɵɵproperty("requiredLabel", ctx_r0.requiredLabel)("label", ctx_r0.schema.title)("tooltip", ctx_r0.schema.help)("inputId", ctx_r0.getId(ctx_r0.index));
1143
+ i0.ɵɵadvance(1);
1144
+ i0.ɵɵ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);
1145
+ }
1146
+ }
1147
+ function SchemaInputComponent_div_1_span_4_Template(rf, ctx) {
1148
+ if (rf & 1) {
1149
+ i0.ɵɵelementStart(0, "span", 7);
1150
+ i0.ɵɵtext(1, "?");
1151
+ i0.ɵɵelementEnd();
1152
+ }
1153
+ if (rf & 2) {
1154
+ const ctx_r4 = i0.ɵɵnextContext(2);
1155
+ i0.ɵɵpropertyInterpolate("matTooltip", ctx_r4.schema.help);
1156
+ }
1157
+ }
1158
+ function SchemaInputComponent_div_1_Template(rf, ctx) {
1159
+ if (rf & 1) {
1160
+ const _r6 = i0.ɵɵgetCurrentView();
1161
+ i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "label", 5);
1162
+ i0.ɵɵtext(3);
1163
+ i0.ɵɵtemplate(4, SchemaInputComponent_div_1_span_4_Template, 2, 1, "span", 6);
1164
+ i0.ɵɵelementEnd();
1165
+ i0.ɵɵelementStart(5, "input-render", 4);
1166
+ i0.ɵɵlistener("modelChange", function SchemaInputComponent_div_1_Template_input_render_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView((ctx_r5.model[ctx_r5.schema.id] = $event)); });
1167
+ i0.ɵɵelementEnd()()();
1168
+ }
1169
+ if (rf & 2) {
1170
+ const ctx_r1 = i0.ɵɵnextContext();
1171
+ i0.ɵɵadvance(2);
1172
+ i0.ɵɵproperty("htmlFor", ctx_r1.getId(ctx_r1.index));
1173
+ i0.ɵɵadvance(1);
1174
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.schema.title, " ");
1175
+ i0.ɵɵadvance(1);
1176
+ i0.ɵɵproperty("ngIf", ctx_r1.schema.help);
1177
+ i0.ɵɵadvance(1);
1178
+ i0.ɵɵ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);
1179
+ }
1180
+ }
1181
+ class SchemaInputComponent extends BaseSchemaComponent {
1182
+ constructor() {
1183
+ super(...arguments);
1184
+ this.requiredLabel = '(required)';
1185
+ this.selectPlaceHolderLabel = 'Select Item';
1186
+ this.selectSearchPlaceHolderLabel = 'Search';
1187
+ this.selectClearLabel = 'Clear';
1188
+ this.selectNotFoundLabel = 'No Items Found';
1189
+ this.editing = false;
1190
+ }
1191
+ ngAfterContentInit() {
1192
+ this.loaded = true;
1193
+ }
1194
+ getId(index) {
1195
+ return `${this.idPrefix}-struct-${index}`;
1196
+ }
1197
+ }
1198
+ SchemaInputComponent.ɵfac = /*@__PURE__*/ function () { let ɵSchemaInputComponent_BaseFactory; return function SchemaInputComponent_Factory(t) { return (ɵSchemaInputComponent_BaseFactory || (ɵSchemaInputComponent_BaseFactory = i0.ɵɵgetInheritedFactory(SchemaInputComponent)))(t || SchemaInputComponent); }; }();
1199
+ SchemaInputComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵ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: [i0.ɵɵ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) {
1200
+ if (rf & 1) {
1201
+ i0.ɵɵtemplate(0, SchemaInputComponent_div_0_Template, 4, 13, "div", 0);
1202
+ i0.ɵɵtemplate(1, SchemaInputComponent_div_1_Template, 6, 12, "div", 0);
1203
+ }
1204
+ if (rf & 2) {
1205
+ i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && ctx.schema.minLength && ctx.schema.minLength > 0);
1206
+ i0.ɵɵadvance(1);
1207
+ i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && (!ctx.schema.minLength || ctx.schema.minLength === 0));
1208
+ }
1209
+ }, dependencies: [i1.NgIf, i2$1.MatTooltip, FieldRenderComponent, InputRenderComponent] });
1210
+ (function () {
1211
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaInputComponent, [{
1212
+ type: Component,
1213
+ args: [{ selector: 'schema-input', template: "<div class=\"row schema-input\"\r\n *ngIf=\"loaded && canRender(schema) && schema.type !== 'array' && schema.type !== 'object' && schema.minLength && schema.minLength > 0\">\r\n <div class=\"col-md-12\">\r\n <field-render [requiredLabel]=\"requiredLabel\" [label]=\"schema.title\" [tooltip]=\"schema.help\" [inputId]=\"getId(index)\">\r\n <input-render\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [inputId]=\"getId(index)\"\r\n [schema]=\"schema\"\r\n [(model)]=\"this.model[schema.id]\"\r\n [modelPropertiesPath]=\"'mappingAttributes.' + schema.id\"\r\n [editing]=\"this.editing\"></input-render>\r\n </field-render>\r\n </div>\r\n</div>\r\n<div class=\"row schema-input\"\r\n *ngIf=\"loaded && canRender(schema) && schema.type !== 'array' && schema.type !== 'object' && (!schema.minLength || schema.minLength === 0)\">\r\n <div class=\"col-md-12\">\r\n <label class=\"info-label bold\" [htmlFor]=\"getId(index)\">\r\n {{schema.title}}\r\n <span class=\"config-tooltip\" matTooltip=\"{{ schema.help }}\" *ngIf=\"schema.help\">?</span>\r\n </label>\r\n <input-render\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [inputId]=\"getId(index)\"\r\n [schema]=\"schema\"\r\n [(model)]=\"this.model[schema.id]\"\r\n [modelPropertiesPath]=\"'mappingAttributes.' + schema.id\"\r\n [editing]=\"this.editing\"></input-render>\r\n </div>\r\n</div>\r\n" }]
1214
+ }], null, { requiredLabel: [{
1215
+ type: Input
1216
+ }], selectPlaceHolderLabel: [{
1217
+ type: Input
1218
+ }], selectSearchPlaceHolderLabel: [{
1219
+ type: Input
1220
+ }], selectClearLabel: [{
1221
+ type: Input
1222
+ }], selectNotFoundLabel: [{
1223
+ type: Input
1224
+ }], idPrefix: [{
1225
+ type: Input
1226
+ }], schema: [{
1227
+ type: Input
1228
+ }], editing: [{
1229
+ type: Input
1230
+ }], index: [{
1231
+ type: Input
1232
+ }] });
1233
+ })();
1234
+
1235
+ function SchemaObjectComponent_div_0_div_4_Template(rf, ctx) {
1236
+ if (rf & 1) {
1237
+ const _r3 = i0.ɵɵgetCurrentView();
1238
+ i0.ɵɵelementStart(0, "div", 5)(1, "div", 6)(2, "label", 7);
1239
+ i0.ɵɵtext(3);
1240
+ i0.ɵɵelementEnd();
1241
+ i0.ɵɵelementStart(4, "schema-custom-attributes", 8);
1242
+ i0.ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_div_4_Template_schema_custom_attributes_modelChange_4_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.model[ctx_r2.schema.id].customAttributes = $event); });
1243
+ i0.ɵɵelementEnd()()();
1244
+ }
1245
+ if (rf & 2) {
1246
+ const ctx_r1 = i0.ɵɵnextContext(2);
1247
+ i0.ɵɵadvance(3);
1248
+ i0.ɵɵtextInterpolate(ctx_r1.additionalAttributesLabel);
1249
+ i0.ɵɵadvance(1);
1250
+ i0.ɵɵ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);
1251
+ }
1252
+ }
1253
+ function SchemaObjectComponent_div_0_Template(rf, ctx) {
1254
+ if (rf & 1) {
1255
+ const _r5 = i0.ɵɵgetCurrentView();
1256
+ i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
1257
+ i0.ɵɵtext(2);
1258
+ i0.ɵɵelementEnd();
1259
+ i0.ɵɵelementStart(3, "schema-form", 3);
1260
+ i0.ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_Template_schema_form_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView((ctx_r4.model[ctx_r4.schema.id] = $event)); });
1261
+ i0.ɵɵelementEnd();
1262
+ i0.ɵɵtemplate(4, SchemaObjectComponent_div_0_div_4_Template, 5, 9, "div", 4);
1263
+ i0.ɵɵelementEnd();
1264
+ }
1265
+ if (rf & 2) {
1266
+ const ctx_r0 = i0.ɵɵnextContext();
1267
+ i0.ɵɵadvance(2);
1268
+ i0.ɵɵtextInterpolate(ctx_r0.schema.title);
1269
+ i0.ɵɵadvance(1);
1270
+ i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model[ctx_r0.schema.id])("schemas", ctx_r0.getSchemaProperties())("editing", ctx_r0.editing);
1271
+ i0.ɵɵadvance(1);
1272
+ i0.ɵɵproperty("ngIf", ctx_r0.model[ctx_r0.schema.id] && ctx_r0.schema.customProperties);
1273
+ }
1274
+ }
1275
+ class SchemaObjectComponent extends BaseSchemaComponent {
1276
+ constructor() {
1277
+ super(...arguments);
1278
+ this.requiredLabel = '(required)';
1279
+ this.addItemLabel = 'Add Item';
1280
+ this.addLoopLabel = 'Add Loop';
1281
+ this.additionalAttributesLabel = 'Additional Fields';
1282
+ this.customAttributeRemoveLabel = 'Remove';
1283
+ this.newCustomFieldNameLabel = 'Name';
1284
+ this.newCustomFieldValueLabel = 'Value';
1285
+ this.newCustomFieldAddLabel = 'Add';
1286
+ this.newCustomFieldSaveLabel = 'Save';
1287
+ this.newCustomFieldCancelLabel = 'Cancel';
1288
+ this.selectPlaceHolderLabel = 'Select Item';
1289
+ this.selectSearchPlaceHolderLabel = 'Search';
1290
+ this.selectClearLabel = 'Clear';
1291
+ this.selectNotFoundLabel = 'No Items Found';
1292
+ this.editing = false;
1293
+ this.onDropEvent = new EventEmitter();
1294
+ this.loaded = false;
1295
+ }
1296
+ ngAfterContentInit() {
1297
+ var _a;
1298
+ if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'object' && this.model) {
1299
+ this.model[this.schema.id] = this.model[this.schema.id] || {};
1300
+ }
1301
+ this.loaded = true;
1302
+ }
1303
+ onDrop($event, modelElement) {
1304
+ return onDropStruct($event, modelElement);
1305
+ }
1306
+ }
1307
+ SchemaObjectComponent.ɵfac = /*@__PURE__*/ function () { let ɵSchemaObjectComponent_BaseFactory; return function SchemaObjectComponent_Factory(t) { return (ɵSchemaObjectComponent_BaseFactory || (ɵSchemaObjectComponent_BaseFactory = i0.ɵɵgetInheritedFactory(SchemaObjectComponent)))(t || SchemaObjectComponent); }; }();
1308
+ SchemaObjectComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵ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: [i0.ɵɵ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) {
1309
+ if (rf & 1) {
1310
+ i0.ɵɵtemplate(0, SchemaObjectComponent_div_0_Template, 5, 20, "div", 0);
1311
+ }
1312
+ if (rf & 2) {
1313
+ i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type == "object");
1314
+ }
1315
+ }, dependencies: [i1.NgIf, SchemaFormComponent, SchemaCustomAttributesComponent], styles: [".schema-object-container[_ngcontent-%COMP%]{border:1px solid #ddd;padding:10px;margin-top:10px;margin-bottom:10px;border-radius:5px}.schema-object-container[_ngcontent-%COMP%] .schema-object-title[_ngcontent-%COMP%]{background:#EEEEEE;font-weight:700;border-bottom:1px solid #ddd;padding:10px;margin-top:-10px;margin-left:-10px;width:calc(100% + 20px)}"] });
1316
+ (function () {
1317
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaObjectComponent, [{
1318
+ type: Component,
1319
+ args: [{ selector: 'schema-object', template: "<div class=\"schema-object-container\" *ngIf=\"loaded && canRender(schema) && schema.type == 'object'\">\r\n <div class=\"schema-object-title\">{{schema.title}}</div>\r\n <schema-form\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"model[schema.id]\"\r\n [schemas]=\"getSchemaProperties()\"\r\n [editing]=\"this.editing\">\r\n </schema-form>\r\n\r\n <div class=\"row struct-custom-properties\" *ngIf=\"this.model[schema.id] && schema.customProperties\">\r\n <div class=\"col-md-12\">\r\n <label class=\"info-label bold\">{{ this.additionalAttributesLabel }}</label>\r\n <schema-custom-attributes\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [(model)]=\"this.model[schema.id].customAttributes\"\r\n [onDropFunction]=\"onDrop\">\r\n </schema-custom-attributes>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n", styles: [".schema-object-container{border:1px solid #ddd;padding:10px;margin-top:10px;margin-bottom:10px;border-radius:5px}.schema-object-container .schema-object-title{background:#EEEEEE;font-weight:700;border-bottom:1px solid #ddd;padding:10px;margin-top:-10px;margin-left:-10px;width:calc(100% + 20px)}\n"] }]
1320
+ }], null, { requiredLabel: [{
1321
+ type: Input
1322
+ }], addItemLabel: [{
1323
+ type: Input
1324
+ }], addLoopLabel: [{
1325
+ type: Input
1326
+ }], additionalAttributesLabel: [{
1327
+ type: Input
1328
+ }], customAttributeRemoveLabel: [{
1329
+ type: Input
1330
+ }], newCustomFieldNameLabel: [{
1331
+ type: Input
1332
+ }], newCustomFieldValueLabel: [{
1333
+ type: Input
1334
+ }], newCustomFieldAddLabel: [{
1335
+ type: Input
1336
+ }], newCustomFieldSaveLabel: [{
1337
+ type: Input
1338
+ }], newCustomFieldCancelLabel: [{
1339
+ type: Input
1340
+ }], selectPlaceHolderLabel: [{
1341
+ type: Input
1342
+ }], selectSearchPlaceHolderLabel: [{
1343
+ type: Input
1344
+ }], selectClearLabel: [{
1345
+ type: Input
1346
+ }], selectNotFoundLabel: [{
1347
+ type: Input
1348
+ }], idPrefix: [{
1349
+ type: Input
1350
+ }], modelPropertiesPath: [{
1351
+ type: Input
1352
+ }], inputId: [{
1353
+ type: Input
1354
+ }], editing: [{
1355
+ type: Input
1356
+ }], index: [{
1357
+ type: Input
1358
+ }], onDropEvent: [{
1359
+ type: Output
1360
+ }] });
1361
+ })();
1362
+
1363
+ class SchemaValidationField {
1364
+ constructor(emptyFields, invalidMinLengthFields, invalidMaxLengthFields) {
1365
+ this.emptyFields = emptyFields;
1366
+ this.invalidMinLengthFields = invalidMinLengthFields;
1367
+ this.invalidMaxLengthFields = invalidMaxLengthFields;
1368
+ }
1369
+ isValidSchemaFields() {
1370
+ var _a, _b, _c;
1371
+ return ((_a = this.emptyFields) === null || _a === void 0 ? void 0 : _a.length) < 1 && ((_b = this.invalidMinLengthFields) === null || _b === void 0 ? void 0 : _b.length) < 1 && ((_c = this.invalidMaxLengthFields) === null || _c === void 0 ? void 0 : _c.length) < 1;
1372
+ }
1373
+ isInvalidSchemaFields() {
1374
+ return !this.isValidSchemaFields();
1375
+ }
1376
+ }
1377
+
1378
+ class SchemaFieldsService {
1379
+ constructor() {
1380
+ }
1381
+ validateSchemaFields(propertiesRendered, model, editing) {
1382
+ return __awaiter(this, void 0, void 0, function* () {
1383
+ if (!propertiesRendered) {
1384
+ return new SchemaValidationField([], [], []);
1385
+ }
1386
+ const emptyFields = [];
1387
+ const invalidMinLengthFields = [];
1388
+ const invalidMaxLengthFields = [];
1389
+ this.processProperties(propertiesRendered, model, editing, emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1390
+ const structValidationField = new SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1391
+ structValidationField.validationErrorsLabel = yield this.getErrorsStringArray(structValidationField);
1392
+ return structValidationField;
1393
+ });
1394
+ }
1395
+ processProperties(propertiesRendered, model, editing, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, recursive) {
1396
+ for (const property of propertiesRendered) {
1397
+ if ((property.type === 'object' || property.type === 'array') && property.properties) {
1398
+ this.processProperties(property.properties, model[property.id], editing, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1399
+ }
1400
+ else if (property.type === 'array' && !property.properties) {
1401
+ const newProperty = Object.assign({}, property);
1402
+ newProperty.type = 'string';
1403
+ this.processProperties([newProperty], model[property.id], editing, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1404
+ }
1405
+ else {
1406
+ const validateModel = recursive ? model : model[property.id];
1407
+ if (property.type !== 'password' || !editing || validateModel !== undefined) {
1408
+ if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0
1409
+ && (validateModel === undefined || validateModel === '' || validateModel === null)) {
1410
+ emptyFields.push(property);
1411
+ }
1412
+ else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) < property.minLength)) {
1413
+ invalidMinLengthFields.push(property);
1414
+ }
1415
+ else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.maxLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) > property.maxLength)) {
1416
+ invalidMaxLengthFields.push(property);
1417
+ }
1418
+ }
1419
+ }
1420
+ }
1421
+ }
1422
+ getErrorsStringArray(structValidation) {
1423
+ return __awaiter(this, void 0, void 0, function* () {
1424
+ if (!structValidation.isInvalidSchemaFields()) {
1425
+ return [];
1426
+ }
1427
+ const errors = [];
1428
+ for (const field of structValidation.emptyFields) {
1429
+ const fieldName = field.title || field.id;
1430
+ errors.push({
1431
+ type: 'emptyFields',
1432
+ fieldName
1433
+ });
1434
+ }
1435
+ for (const field of structValidation.invalidMinLengthFields) {
1436
+ const fieldName = field.title || field.id;
1437
+ errors.push({
1438
+ type: 'invalidMinLengthFields',
1439
+ fieldName,
1440
+ minLength: field.minLength
1441
+ });
1442
+ }
1443
+ for (const field of structValidation.invalidMaxLengthFields) {
1444
+ const fieldName = field.title || field.id;
1445
+ errors.push({
1446
+ type: 'invalidMaxLengthFields',
1447
+ fieldName,
1448
+ maxLength: field.maxLength
1449
+ });
1450
+ }
1451
+ return errors;
1452
+ });
1453
+ }
1454
+ }
1455
+ SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(); };
1456
+ SchemaFieldsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SchemaFieldsService, factory: SchemaFieldsService.ɵfac });
1457
+ (function () {
1458
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaFieldsService, [{
1459
+ type: Injectable
1460
+ }], function () { return []; }, null);
1461
+ })();
1462
+
1463
+ function SchemaFormRenderComponent_div_0_div_2_div_1_Template(rf, ctx) {
1464
+ if (rf & 1) {
1465
+ const _r6 = i0.ɵɵgetCurrentView();
1466
+ i0.ɵɵelementStart(0, "div", 6)(1, "div", 7)(2, "label", 8);
1467
+ i0.ɵɵtext(3);
1468
+ i0.ɵɵelementEnd();
1469
+ i0.ɵɵelementStart(4, "schema-custom-attributes", 9);
1470
+ i0.ɵɵlistener("modelChange", function SchemaFormRenderComponent_div_0_div_2_div_1_Template_schema_custom_attributes_modelChange_4_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r5.model.customAttributes = $event); });
1471
+ i0.ɵɵelementEnd()()();
1472
+ }
1473
+ if (rf & 2) {
1474
+ const ctx_r4 = i0.ɵɵnextContext(3);
1475
+ i0.ɵɵadvance(3);
1476
+ i0.ɵɵtextInterpolate(ctx_r4.additionalAttributesLabel);
1477
+ i0.ɵɵadvance(1);
1478
+ i0.ɵɵ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);
1479
+ }
1480
+ }
1481
+ function SchemaFormRenderComponent_div_0_div_2_Template(rf, ctx) {
1482
+ if (rf & 1) {
1483
+ i0.ɵɵelementStart(0, "div", 4);
1484
+ i0.ɵɵtemplate(1, SchemaFormRenderComponent_div_0_div_2_div_1_Template, 5, 9, "div", 5);
1485
+ i0.ɵɵelementEnd();
1486
+ }
1487
+ if (rf & 2) {
1488
+ const ctx_r1 = i0.ɵɵnextContext(2);
1489
+ i0.ɵɵadvance(1);
1490
+ i0.ɵɵproperty("ngIf", ctx_r1.model && ctx_r1.customProperties);
1491
+ }
1492
+ }
1493
+ function SchemaFormRenderComponent_div_0_Template(rf, ctx) {
1494
+ if (rf & 1) {
1495
+ const _r8 = i0.ɵɵgetCurrentView();
1496
+ i0.ɵɵelementStart(0, "div", 1)(1, "schema-form", 2);
1497
+ i0.ɵɵlistener("modelChange", function SchemaFormRenderComponent_div_0_Template_schema_form_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.model = $event); });
1498
+ i0.ɵɵelementEnd();
1499
+ i0.ɵɵtemplate(2, SchemaFormRenderComponent_div_0_div_2_Template, 2, 1, "div", 3);
1500
+ i0.ɵɵelementEnd();
1501
+ }
1502
+ if (rf & 2) {
1503
+ const ctx_r0 = i0.ɵɵnextContext();
1504
+ i0.ɵɵadvance(1);
1505
+ i0.ɵɵproperty("selectPlaceHolderLabel", ctx_r0.selectPlaceHolderLabel)("selectSearchPlaceHolderLabel", ctx_r0.selectSearchPlaceHolderLabel)("selectClearLabel", ctx_r0.selectClearLabel)("selectNotFoundLabel", ctx_r0.selectNotFoundLabel)("requiredLabel", ctx_r0.requiredLabel)("addItemLabel", ctx_r0.addItemLabel)("addLoopLabel", ctx_r0.addLoopLabel)("additionalAttributesLabel", ctx_r0.additionalAttributesLabel)("customAttributeRemoveLabel", ctx_r0.customAttributeRemoveLabel)("newCustomFieldNameLabel", ctx_r0.newCustomFieldNameLabel)("newCustomFieldValueLabel", ctx_r0.newCustomFieldValueLabel)("newCustomFieldAddLabel", ctx_r0.newCustomFieldAddLabel)("newCustomFieldSaveLabel", ctx_r0.newCustomFieldSaveLabel)("newCustomFieldCancelLabel", ctx_r0.newCustomFieldCancelLabel)("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schemas", ctx_r0.schemas)("editing", ctx_r0.editing);
1506
+ i0.ɵɵadvance(1);
1507
+ i0.ɵɵproperty("ngForOf", ctx_r0.schemas);
1508
+ }
1509
+ }
1510
+ class SchemaFormRenderComponent extends BaseSchemaComponent {
1511
+ constructor() {
1512
+ super(...arguments);
1513
+ this.requiredLabel = '(required)';
1514
+ this.addItemLabel = 'Add Item';
1515
+ this.addLoopLabel = 'Add Loop';
1516
+ this.additionalAttributesLabel = 'Additional Fields';
1517
+ this.customAttributeRemoveLabel = 'Remove';
1518
+ this.newCustomFieldNameLabel = 'Name';
1519
+ this.newCustomFieldValueLabel = 'Value';
1520
+ this.newCustomFieldAddLabel = 'Add';
1521
+ this.newCustomFieldSaveLabel = 'Save';
1522
+ this.newCustomFieldCancelLabel = 'Cancel';
1523
+ this.selectPlaceHolderLabel = 'Select Item';
1524
+ this.selectSearchPlaceHolderLabel = 'Search';
1525
+ this.selectClearLabel = 'Clear';
1526
+ this.selectNotFoundLabel = 'No Items Found';
1527
+ this.schemas = [];
1528
+ this.customProperties = false;
1529
+ this.editing = false;
1530
+ this.loaded = false;
1531
+ }
1532
+ ngAfterContentInit() {
1533
+ this.loaded = true;
1534
+ }
1535
+ onDrop($event, modelElement) {
1536
+ return onDropStruct($event, modelElement);
1537
+ }
1538
+ getId(index) {
1539
+ return `${this.idPrefix}-struct-${index}`;
1540
+ }
1541
+ }
1542
+ SchemaFormRenderComponent.ɵfac = /*@__PURE__*/ function () { let ɵSchemaFormRenderComponent_BaseFactory; return function SchemaFormRenderComponent_Factory(t) { return (ɵSchemaFormRenderComponent_BaseFactory || (ɵSchemaFormRenderComponent_BaseFactory = i0.ɵɵgetInheritedFactory(SchemaFormRenderComponent)))(t || SchemaFormRenderComponent); }; }();
1543
+ SchemaFormRenderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵ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: [i0.ɵɵ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) {
1544
+ if (rf & 1) {
1545
+ i0.ɵɵtemplate(0, SchemaFormRenderComponent_div_0_Template, 3, 19, "div", 0);
1546
+ }
1547
+ if (rf & 2) {
1548
+ i0.ɵɵproperty("ngIf", ctx.loaded);
1549
+ }
1550
+ }, dependencies: [i1.NgForOf, i1.NgIf, SchemaFormComponent, SchemaCustomAttributesComponent], styles: [".schema[_ngcontent-%COMP%] .info-label{display:block}.schema[_ngcontent-%COMP%] input.form-control{width:100%;padding:11px;border:1px solid #DDD;border-radius:3px;background:#FFF}.schema[_ngcontent-%COMP%] input.form-control:disabled{background:#ccc}.schema[_ngcontent-%COMP%] select.form-control{width:100%;padding:11px;border-radius:4px;border:1px solid #DDD;color:#777;cursor:pointer}.schema[_ngcontent-%COMP%] .ng-select-container{height:38px!important;min-height:38px!important}.schema[_ngcontent-%COMP%] .btn-outline-primary{padding:5px 15px;background:var(--color-primary);border:1px solid var(--color-secondary);color:var(--color-secondary);border-radius:4px;cursor:pointer}.schema[_ngcontent-%COMP%] .btn-outline-primary:hover{background:var(--color-primary-hover)}.schema[_ngcontent-%COMP%] .subsection-item-title{color:var(--color-primary)}.schema[_ngcontent-%COMP%] array-session .subsection-element{color:var(--color-primary)}"] });
1551
+ (function () {
1552
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaFormRenderComponent, [{
1553
+ type: Component,
1554
+ args: [{ selector: 'schema-form-render', template: "<div class=\"schema\" *ngIf=\"loaded\">\r\n <schema-form\r\n [selectPlaceHolderLabel]=\"selectPlaceHolderLabel\"\r\n [selectSearchPlaceHolderLabel]=\"selectSearchPlaceHolderLabel\"\r\n [selectClearLabel]=\"selectClearLabel\"\r\n [selectNotFoundLabel]=\"selectNotFoundLabel\"\r\n [requiredLabel]=\"requiredLabel\"\r\n [addItemLabel]=\"addItemLabel\"\r\n [addLoopLabel]=\"addLoopLabel\"\r\n [additionalAttributesLabel]=\"additionalAttributesLabel\"\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [idPrefix]=\"idPrefix\"\r\n [(model)]=\"model\"\r\n [schemas]=\"schemas\"\r\n [editing]=\"this.editing\"></schema-form>\r\n\r\n <div class=\"schema-properties\" *ngFor=\"let schema of schemas; let i = index\">\r\n <div class=\"row struct-custom-properties\" *ngIf=\"this.model && customProperties\">\r\n <div class=\"col-md-12\">\r\n <label class=\"info-label bold\">{{ this.additionalAttributesLabel }}</label>\r\n <schema-custom-attributes\r\n [customAttributeRemoveLabel]=\"customAttributeRemoveLabel\"\r\n [newCustomFieldNameLabel]=\"newCustomFieldNameLabel\"\r\n [newCustomFieldValueLabel]=\"newCustomFieldValueLabel\"\r\n [newCustomFieldAddLabel]=\"newCustomFieldAddLabel\"\r\n [newCustomFieldSaveLabel]=\"newCustomFieldSaveLabel\"\r\n [newCustomFieldCancelLabel]=\"newCustomFieldCancelLabel\"\r\n [(model)]=\"model.customAttributes\"\r\n [onDropFunction]=\"onDrop\">\r\n </schema-custom-attributes>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n", styles: [".schema ::ng-deep .info-label{display:block}.schema ::ng-deep input.form-control{width:100%;padding:11px;border:1px solid #DDD;border-radius:3px;background:#FFF}.schema ::ng-deep input.form-control:disabled{background:#ccc}.schema ::ng-deep select.form-control{width:100%;padding:11px;border-radius:4px;border:1px solid #DDD;color:#777;cursor:pointer}.schema ::ng-deep .ng-select-container{height:38px!important;min-height:38px!important}.schema ::ng-deep .btn-outline-primary{padding:5px 15px;background:var(--color-primary);border:1px solid var(--color-secondary);color:var(--color-secondary);border-radius:4px;cursor:pointer}.schema ::ng-deep .btn-outline-primary:hover{background:var(--color-primary-hover)}.schema ::ng-deep .subsection-item-title{color:var(--color-primary)}.schema ::ng-deep array-session .subsection-element{color:var(--color-primary)}\n"] }]
1555
+ }], null, { requiredLabel: [{
1556
+ type: Input
1557
+ }], addItemLabel: [{
1558
+ type: Input
1559
+ }], addLoopLabel: [{
1560
+ type: Input
1561
+ }], additionalAttributesLabel: [{
1562
+ type: Input
1563
+ }], customAttributeRemoveLabel: [{
1564
+ type: Input
1565
+ }], newCustomFieldNameLabel: [{
1566
+ type: Input
1567
+ }], newCustomFieldValueLabel: [{
1568
+ type: Input
1569
+ }], newCustomFieldAddLabel: [{
1570
+ type: Input
1571
+ }], newCustomFieldSaveLabel: [{
1572
+ type: Input
1573
+ }], newCustomFieldCancelLabel: [{
1574
+ type: Input
1575
+ }], selectPlaceHolderLabel: [{
1576
+ type: Input
1577
+ }], selectSearchPlaceHolderLabel: [{
1578
+ type: Input
1579
+ }], selectClearLabel: [{
1580
+ type: Input
1581
+ }], selectNotFoundLabel: [{
1582
+ type: Input
1583
+ }], idPrefix: [{
1584
+ type: Input
1585
+ }], schemas: [{
1586
+ type: Input
1587
+ }], customProperties: [{
1588
+ type: Input
1589
+ }], editing: [{
1590
+ type: Input
1591
+ }], inputType: [{
1592
+ type: Input
1593
+ }] });
1594
+ })();
1595
+
1596
+ class TypeScriptCompileBase {
1597
+ getTranslate(text) {
1598
+ return text;
1599
+ }
1600
+ addItemToFormProperties(formProperties, item, key) {
1601
+ this.translateProperties(item);
1602
+ if (item.minLength && item.minLength > 0) {
1603
+ formProperties[key] = new FormControl([null, [Validators.required]]);
1604
+ }
1605
+ else {
1606
+ formProperties[key] = new FormControl([null]);
1607
+ }
1608
+ }
1609
+ compileProperties(input) {
1610
+ const compiledProperties = [];
1611
+ const formProperties = {};
1612
+ let inputData = {};
1613
+ const inputToCompile = JSON.parse(JSON.stringify(input));
1614
+ this.translateProperties(inputToCompile);
1615
+ if (inputToCompile.properties) {
1616
+ if (inputToCompile.type === 'array') {
1617
+ inputData = [];
1618
+ }
1619
+ if (inputToCompile.type === 'object') {
1620
+ inputData = {};
1621
+ }
1622
+ inputToCompile.id = 'inputData';
1623
+ this.proccessProperties(inputToCompile, formProperties, 'inputData');
1624
+ this.translateProperties(inputToCompile);
1625
+ compiledProperties.push(inputToCompile);
1626
+ }
1627
+ else if (inputToCompile.type === 'array') {
1628
+ inputToCompile.id = 'inputData';
1629
+ inputData = [];
1630
+ this.addItemToFormProperties(formProperties, inputToCompile, 'inputData');
1631
+ compiledProperties.push(inputToCompile);
1632
+ }
1633
+ else if (!inputToCompile.type) {
1634
+ for (let index = 0; index < Object.keys(inputToCompile).length; index++) {
1635
+ const key = Object.keys(inputToCompile)[index];
1636
+ const item = inputToCompile[key];
1637
+ item.id = key;
1638
+ if (item.type === 'array') {
1639
+ inputData[item.id] = [];
1640
+ }
1641
+ if (item.type === 'object') {
1642
+ inputData[item.id] = {};
1643
+ }
1644
+ this.proccessProperties(item, formProperties, key);
1645
+ this.translateProperties(item);
1646
+ compiledProperties.push(item);
1647
+ }
1648
+ }
1649
+ compiledProperties.sort((a, b) => a.propertyOrder - b.propertyOrder);
1650
+ return { compiledProperties, formProperties, inputData };
1651
+ }
1652
+ translateProperties(input) {
1653
+ if (input === null || input === void 0 ? void 0 : input.title) {
1654
+ input.title = this.getTranslate(input.title);
1655
+ }
1656
+ if (input === null || input === void 0 ? void 0 : input.description) {
1657
+ input.description = this.getTranslate(input.description);
1658
+ }
1659
+ if ((input === null || input === void 0 ? void 0 : input.options) instanceof Array) {
1660
+ input === null || input === void 0 ? void 0 : input.options.forEach((option) => option.value = this.getTranslate(option.value));
1661
+ }
1662
+ }
1663
+ proccessProperties(item, formProperties, key) {
1664
+ this.translateProperties(item);
1665
+ if (this.hasProperties(item)) {
1666
+ const arFieldsChild = [];
1667
+ for (let indexChild = 0; indexChild < Object.keys(item.properties).length; indexChild++) {
1668
+ const keyChild = Object.keys(item.properties)[indexChild];
1669
+ const itemChild = item.properties[keyChild];
1670
+ itemChild.id = keyChild;
1671
+ if (this.hasProperties(itemChild)) {
1672
+ this.proccessProperties(itemChild, formProperties, keyChild);
1673
+ arFieldsChild.push(itemChild);
1674
+ }
1675
+ else {
1676
+ this.addItemToFormProperties(formProperties, itemChild, keyChild);
1677
+ arFieldsChild.push(itemChild);
1678
+ }
1679
+ }
1680
+ item.properties = arFieldsChild;
1681
+ }
1682
+ else {
1683
+ this.addItemToFormProperties(formProperties, item, key);
1684
+ }
1685
+ }
1686
+ hasProperties(item) {
1687
+ return item.type === 'object' || (item.type === 'array' && item.properties);
1688
+ }
1689
+ }
1690
+ TypeScriptCompileBase.ɵfac = function TypeScriptCompileBase_Factory(t) { return new (t || TypeScriptCompileBase)(); };
1691
+ TypeScriptCompileBase.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: TypeScriptCompileBase, factory: TypeScriptCompileBase.ɵfac, providedIn: 'root' });
1692
+ (function () {
1693
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TypeScriptCompileBase, [{
1694
+ type: Injectable,
1695
+ args: [{ providedIn: 'root' }]
1696
+ }], null, null);
1697
+ })();
1698
+ function APIPASS_TYPESCRIPT_COMPILE_BASE_PROVIDER_FACTORY(parentIntl) {
1699
+ return parentIntl || new TypeScriptCompileBase();
1700
+ }
1701
+ const APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER = {
1702
+ provide: TypeScriptCompileBase,
1703
+ deps: [[new Optional(), new SkipSelf(), TypeScriptCompileBase]],
1704
+ useFactory: APIPASS_TYPESCRIPT_COMPILE_BASE_PROVIDER_FACTORY,
1705
+ };
1706
+
1707
+ class SchemaFormRenderModule {
1708
+ }
1709
+ SchemaFormRenderModule.ɵfac = function SchemaFormRenderModule_Factory(t) { return new (t || SchemaFormRenderModule)(); };
1710
+ SchemaFormRenderModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: SchemaFormRenderModule });
1711
+ SchemaFormRenderModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
1712
+ SchemaFieldsService,
1713
+ APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER
1714
+ ], imports: [CommonModule,
1715
+ DndModule,
1716
+ FormsModule,
1717
+ MatTooltipModule,
1718
+ InputsModule,
1719
+ IconsModule] });
1720
+ (function () {
1721
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SchemaFormRenderModule, [{
1722
+ type: NgModule,
1723
+ args: [{
1724
+ imports: [
1725
+ CommonModule,
1726
+ DndModule,
1727
+ FormsModule,
1728
+ MatTooltipModule,
1729
+ InputsModule,
1730
+ IconsModule
1731
+ ],
1732
+ declarations: [
1733
+ ArraySessionComponent,
1734
+ SchemaArrayComponent,
1735
+ FieldRenderComponent,
1736
+ InputRenderComponent,
1737
+ BooleanInputComponent,
1738
+ NumberInputComponent,
1739
+ SchemaInputComponent,
1740
+ SchemaObjectComponent,
1741
+ SchemaFormRenderComponent,
1742
+ SchemaFormComponent,
1743
+ SchemaCustomAttributesComponent
1744
+ ],
1745
+ exports: [
1746
+ ArraySessionComponent,
1747
+ SchemaArrayComponent,
1748
+ FieldRenderComponent,
1749
+ InputRenderComponent,
1750
+ BooleanInputComponent,
1751
+ NumberInputComponent,
1752
+ SchemaInputComponent,
1753
+ SchemaObjectComponent,
1754
+ SchemaFormRenderComponent,
1755
+ SchemaFormComponent,
1756
+ SchemaCustomAttributesComponent
1757
+ ],
1758
+ providers: [
1759
+ SchemaFieldsService,
1760
+ APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER
1761
+ ]
1762
+ }]
1763
+ }], null, null);
1764
+ })();
1765
+ (function () {
1766
+ (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SchemaFormRenderModule, { declarations: [ArraySessionComponent,
1767
+ SchemaArrayComponent,
1768
+ FieldRenderComponent,
1769
+ InputRenderComponent,
1770
+ BooleanInputComponent,
1771
+ NumberInputComponent,
1772
+ SchemaInputComponent,
1773
+ SchemaObjectComponent,
1774
+ SchemaFormRenderComponent,
1775
+ SchemaFormComponent,
1776
+ SchemaCustomAttributesComponent], imports: [CommonModule,
1777
+ DndModule,
1778
+ FormsModule,
1779
+ MatTooltipModule,
1780
+ InputsModule,
1781
+ IconsModule], exports: [ArraySessionComponent,
1782
+ SchemaArrayComponent,
1783
+ FieldRenderComponent,
1784
+ InputRenderComponent,
1785
+ BooleanInputComponent,
1786
+ NumberInputComponent,
1787
+ SchemaInputComponent,
1788
+ SchemaObjectComponent,
1789
+ SchemaFormRenderComponent,
1790
+ SchemaFormComponent,
1791
+ SchemaCustomAttributesComponent] });
1792
+ })();
1793
+ i0.ɵɵsetComponentScope(SchemaFormComponent, [i1.NgForOf, SchemaArrayComponent,
1794
+ SchemaInputComponent,
1795
+ SchemaObjectComponent], []);
1796
+
1797
+ /**
1798
+ * Generated bundle index. Do not edit.
1799
+ */
1800
+
1801
+ export { APIPASS_TYPESCRIPT_COMPILE_BASE_PROVIDER_FACTORY, APIPASS_TYPESCRIPT_COMPILE_INTL_PROVIDER, ArraySessionComponent, BaseSchemaComponent, BooleanInputComponent, FieldRenderComponent, InputRenderComponent, NumberInputComponent, SchemaArrayComponent, SchemaCustomAttributesComponent, SchemaFieldsService, SchemaFormComponent, SchemaFormRenderComponent, SchemaFormRenderModule, SchemaInputComponent, SchemaObjectComponent, SchemaValidationField, TypeScriptCompileBase };
1802
+ //# sourceMappingURL=apipass-schemas.mjs.map
1803
+ //# sourceMappingURL=apipass-schemas.mjs.map