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