@apipass/schemas 0.2.1-test.2 → 0.2.3-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/apipass-schemas.d.ts +5 -5
  2. package/assets/css/buttons.scss +118 -112
  3. package/assets/css/colors.scss +34 -34
  4. package/assets/css/fonts.scss +24 -24
  5. package/assets/css/inputs.scss +197 -197
  6. package/assets/css/pt_sans.scss +143 -143
  7. package/assets/css/spacing.scss +28 -28
  8. package/assets/css/texts.scss +18 -18
  9. package/base-schema.component.d.ts +12 -11
  10. package/bundles/apipass-schemas.umd.js +1945 -1973
  11. package/bundles/apipass-schemas.umd.js.map +1 -1
  12. package/bundles/apipass-schemas.umd.min.js +2 -2
  13. package/bundles/apipass-schemas.umd.min.js.map +1 -1
  14. package/esm2015/apipass-schemas.js +4 -4
  15. package/esm2015/base-schema.component.js +38 -32
  16. package/esm2015/public-api.js +17 -17
  17. package/esm2015/schema-custom-attributes/schema-custom-attributes.js +177 -177
  18. package/esm2015/schema-fields.service.js +77 -77
  19. package/esm2015/schema-form/schema-array/array-session/array-session.js +159 -158
  20. package/esm2015/schema-form/schema-array/schema-array.js +195 -196
  21. package/esm2015/schema-form/schema-form.js +72 -104
  22. package/esm2015/schema-form/schema-input/field-render/field-render.js +72 -72
  23. package/esm2015/schema-form/schema-input/input-render/boolean-input/boolean-input.component.js +50 -45
  24. package/esm2015/schema-form/schema-input/input-render/input-render.js +128 -124
  25. package/esm2015/schema-form/schema-input/input-render/number-input/number-input.component.js +48 -43
  26. package/esm2015/schema-form/schema-input/schema-input.js +98 -100
  27. package/esm2015/schema-form/schema-object/schema-object.js +94 -95
  28. package/esm2015/schema-form-render.js +96 -97
  29. package/esm2015/schema-form-render.module.js +121 -121
  30. package/esm2015/schema-validation-field.js +15 -15
  31. package/esm2015/struct.utils.js +9 -9
  32. package/esm2015/type-script-compile.js +77 -77
  33. package/fesm2015/apipass-schemas.js +1380 -1399
  34. package/fesm2015/apipass-schemas.js.map +1 -1
  35. package/package.json +2 -1
  36. package/public-api.d.ts +16 -16
  37. package/schema-custom-attributes/schema-custom-attributes.d.ts +15 -15
  38. package/schema-fields.service.d.ts +12 -12
  39. package/schema-form/schema-array/array-session/array-session.d.ts +17 -17
  40. package/schema-form/schema-array/schema-array.d.ts +18 -18
  41. package/schema-form/schema-form.d.ts +17 -17
  42. package/schema-form/schema-input/field-render/field-render.d.ts +15 -15
  43. package/schema-form/schema-input/input-render/boolean-input/boolean-input.component.d.ts +15 -13
  44. package/schema-form/schema-input/input-render/input-render.d.ts +20 -19
  45. package/schema-form/schema-input/input-render/number-input/number-input.component.d.ts +15 -13
  46. package/schema-form/schema-input/schema-input.d.ts +14 -14
  47. package/schema-form/schema-object/schema-object.d.ts +20 -20
  48. package/schema-form-render.d.ts +17 -17
  49. package/schema-form-render.module.d.ts +22 -22
  50. package/schema-validation-field.d.ts +17 -17
  51. package/struct.utils.d.ts +1 -1
  52. package/type-script-compile.d.ts +10 -10
@@ -1,2014 +1,1986 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@ngx-translate/core'), require('@angular/material/tooltip'), require('ngx-drag-drop'), require('@apipass/inputs'), require('@angular/cdk/bidi'), require('@angular/cdk/scrolling')) :
3
- typeof define === 'function' && define.amd ? define('@apipass/schemas', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@ngx-translate/core', '@angular/material/tooltip', 'ngx-drag-drop', '@apipass/inputs', '@angular/cdk/bidi', '@angular/cdk/scrolling'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.apipass = global.apipass || {}, global.apipass.schemas = {}), global.ng.core, global.ng.common, global.ng.forms, global.i7, global.ng.material.tooltip, global.i2, global.i8, global.ng.cdk.bidi, global.ng.cdk.scrolling));
5
- }(this, (function (exports, i0, i1, i3, i7, i4, i2, i8, i5, i6) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@ngx-translate/core'), require('ngx-drag-drop'), require('@angular/material/tooltip'), require('@apipass/inputs'), require('@angular/cdk/bidi'), require('@angular/cdk/scrolling')) :
3
+ typeof define === 'function' && define.amd ? define('@apipass/schemas', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@ngx-translate/core', 'ngx-drag-drop', '@angular/material/tooltip', '@apipass/inputs', '@angular/cdk/bidi', '@angular/cdk/scrolling'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.apipass = global.apipass || {}, global.apipass.schemas = {}), global.ng.core, global.ng.common, global.ng.forms, global.i7, global.i2, global.ng.material.tooltip, global.i8, global.ng.cdk.bidi, global.ng.cdk.scrolling));
5
+ }(this, (function (exports, i0, i1, i3, i7, i2, i4, i8, i5, i6) { 'use strict';
6
6
 
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
- var extendStatics = function (d, b) {
23
- extendStatics = Object.setPrototypeOf ||
24
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25
- function (d, b) { for (var p in b)
26
- if (b.hasOwnProperty(p))
27
- d[p] = b[p]; };
28
- return extendStatics(d, b);
29
- };
30
- function __extends(d, b) {
31
- extendStatics(d, b);
32
- function __() { this.constructor = d; }
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
- var __assign = function () {
36
- __assign = Object.assign || function __assign(t) {
37
- for (var s, i = 1, n = arguments.length; i < n; i++) {
38
- s = arguments[i];
39
- for (var p in s)
40
- if (Object.prototype.hasOwnProperty.call(s, p))
41
- t[p] = s[p];
42
- }
43
- return t;
44
- };
45
- return __assign.apply(this, arguments);
46
- };
47
- function __rest(s, e) {
48
- var t = {};
49
- for (var p in s)
50
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
- t[p] = s[p];
52
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
- t[p[i]] = s[p[i]];
56
- }
57
- return t;
58
- }
59
- function __decorate(decorators, target, key, desc) {
60
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
62
- r = Reflect.decorate(decorators, target, key, desc);
63
- else
64
- for (var i = decorators.length - 1; i >= 0; i--)
65
- if (d = decorators[i])
66
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
67
- return c > 3 && r && Object.defineProperty(target, key, r), r;
68
- }
69
- function __param(paramIndex, decorator) {
70
- return function (target, key) { decorator(target, key, paramIndex); };
71
- }
72
- function __metadata(metadataKey, metadataValue) {
73
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
74
- return Reflect.metadata(metadataKey, metadataValue);
75
- }
76
- function __awaiter(thisArg, _arguments, P, generator) {
77
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
78
- return new (P || (P = Promise))(function (resolve, reject) {
79
- function fulfilled(value) { try {
80
- step(generator.next(value));
81
- }
82
- catch (e) {
83
- reject(e);
84
- } }
85
- function rejected(value) { try {
86
- step(generator["throw"](value));
87
- }
88
- catch (e) {
89
- reject(e);
90
- } }
91
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
92
- step((generator = generator.apply(thisArg, _arguments || [])).next());
93
- });
94
- }
95
- function __generator(thisArg, body) {
96
- var _ = { label: 0, sent: function () { if (t[0] & 1)
97
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
98
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
99
- function verb(n) { return function (v) { return step([n, v]); }; }
100
- function step(op) {
101
- if (f)
102
- throw new TypeError("Generator is already executing.");
103
- while (_)
104
- try {
105
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
106
- return t;
107
- if (y = 0, t)
108
- op = [op[0] & 2, t.value];
109
- switch (op[0]) {
110
- case 0:
111
- case 1:
112
- t = op;
113
- break;
114
- case 4:
115
- _.label++;
116
- return { value: op[1], done: false };
117
- case 5:
118
- _.label++;
119
- y = op[1];
120
- op = [0];
121
- continue;
122
- case 7:
123
- op = _.ops.pop();
124
- _.trys.pop();
125
- continue;
126
- default:
127
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
128
- _ = 0;
129
- continue;
130
- }
131
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
132
- _.label = op[1];
133
- break;
134
- }
135
- if (op[0] === 6 && _.label < t[1]) {
136
- _.label = t[1];
137
- t = op;
138
- break;
139
- }
140
- if (t && _.label < t[2]) {
141
- _.label = t[2];
142
- _.ops.push(op);
143
- break;
144
- }
145
- if (t[2])
146
- _.ops.pop();
147
- _.trys.pop();
148
- continue;
149
- }
150
- op = body.call(thisArg, _);
151
- }
152
- catch (e) {
153
- op = [6, e];
154
- y = 0;
155
- }
156
- finally {
157
- f = t = 0;
158
- }
159
- if (op[0] & 5)
160
- throw op[1];
161
- return { value: op[0] ? op[1] : void 0, done: true };
162
- }
163
- }
164
- var __createBinding = Object.create ? (function (o, m, k, k2) {
165
- if (k2 === undefined)
166
- k2 = k;
167
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
168
- }) : (function (o, m, k, k2) {
169
- if (k2 === undefined)
170
- k2 = k;
171
- o[k2] = m[k];
172
- });
173
- function __exportStar(m, exports) {
174
- for (var p in m)
175
- if (p !== "default" && !exports.hasOwnProperty(p))
176
- __createBinding(exports, m, p);
177
- }
178
- function __values(o) {
179
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
180
- if (m)
181
- return m.call(o);
182
- if (o && typeof o.length === "number")
183
- return {
184
- next: function () {
185
- if (o && i >= o.length)
186
- o = void 0;
187
- return { value: o && o[i++], done: !o };
188
- }
189
- };
190
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
191
- }
192
- function __read(o, n) {
193
- var m = typeof Symbol === "function" && o[Symbol.iterator];
194
- if (!m)
195
- return o;
196
- var i = m.call(o), r, ar = [], e;
197
- try {
198
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
199
- ar.push(r.value);
200
- }
201
- catch (error) {
202
- e = { error: error };
203
- }
204
- finally {
205
- try {
206
- if (r && !r.done && (m = i["return"]))
207
- m.call(i);
208
- }
209
- finally {
210
- if (e)
211
- throw e.error;
212
- }
213
- }
214
- return ar;
215
- }
216
- function __spread() {
217
- for (var ar = [], i = 0; i < arguments.length; i++)
218
- ar = ar.concat(__read(arguments[i]));
219
- return ar;
220
- }
221
- function __spreadArrays() {
222
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
223
- s += arguments[i].length;
224
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
225
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
226
- r[k] = a[j];
227
- return r;
228
- }
229
- ;
230
- function __await(v) {
231
- return this instanceof __await ? (this.v = v, this) : new __await(v);
232
- }
233
- function __asyncGenerator(thisArg, _arguments, generator) {
234
- if (!Symbol.asyncIterator)
235
- throw new TypeError("Symbol.asyncIterator is not defined.");
236
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
237
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
238
- function verb(n) { if (g[n])
239
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
240
- function resume(n, v) { try {
241
- step(g[n](v));
242
- }
243
- catch (e) {
244
- settle(q[0][3], e);
245
- } }
246
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
247
- function fulfill(value) { resume("next", value); }
248
- function reject(value) { resume("throw", value); }
249
- function settle(f, v) { if (f(v), q.shift(), q.length)
250
- resume(q[0][0], q[0][1]); }
251
- }
252
- function __asyncDelegator(o) {
253
- var i, p;
254
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
255
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
256
- }
257
- function __asyncValues(o) {
258
- if (!Symbol.asyncIterator)
259
- throw new TypeError("Symbol.asyncIterator is not defined.");
260
- var m = o[Symbol.asyncIterator], i;
261
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
262
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
263
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
264
- }
265
- function __makeTemplateObject(cooked, raw) {
266
- if (Object.defineProperty) {
267
- Object.defineProperty(cooked, "raw", { value: raw });
268
- }
269
- else {
270
- cooked.raw = raw;
271
- }
272
- return cooked;
273
- }
274
- ;
275
- var __setModuleDefault = Object.create ? (function (o, v) {
276
- Object.defineProperty(o, "default", { enumerable: true, value: v });
277
- }) : function (o, v) {
278
- o["default"] = v;
279
- };
280
- function __importStar(mod) {
281
- if (mod && mod.__esModule)
282
- return mod;
283
- var result = {};
284
- if (mod != null)
285
- for (var k in mod)
286
- if (Object.hasOwnProperty.call(mod, k))
287
- __createBinding(result, mod, k);
288
- __setModuleDefault(result, mod);
289
- return result;
290
- }
291
- function __importDefault(mod) {
292
- return (mod && mod.__esModule) ? mod : { default: mod };
293
- }
294
- function __classPrivateFieldGet(receiver, privateMap) {
295
- if (!privateMap.has(receiver)) {
296
- throw new TypeError("attempted to get private field on non-instance");
297
- }
298
- return privateMap.get(receiver);
299
- }
300
- function __classPrivateFieldSet(receiver, privateMap, value) {
301
- if (!privateMap.has(receiver)) {
302
- throw new TypeError("attempted to set private field on non-instance");
303
- }
304
- privateMap.set(receiver, value);
305
- return value;
7
+ /*! *****************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+ /* global Reflect, Promise */
22
+ var extendStatics = function (d, b) {
23
+ extendStatics = Object.setPrototypeOf ||
24
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25
+ function (d, b) { for (var p in b)
26
+ if (b.hasOwnProperty(p))
27
+ d[p] = b[p]; };
28
+ return extendStatics(d, b);
29
+ };
30
+ function __extends(d, b) {
31
+ extendStatics(d, b);
32
+ function __() { this.constructor = d; }
33
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
+ }
35
+ var __assign = function () {
36
+ __assign = Object.assign || function __assign(t) {
37
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
38
+ s = arguments[i];
39
+ for (var p in s)
40
+ if (Object.prototype.hasOwnProperty.call(s, p))
41
+ t[p] = s[p];
42
+ }
43
+ return t;
44
+ };
45
+ return __assign.apply(this, arguments);
46
+ };
47
+ function __rest(s, e) {
48
+ var t = {};
49
+ for (var p in s)
50
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
+ t[p] = s[p];
52
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
+ t[p[i]] = s[p[i]];
56
+ }
57
+ return t;
58
+ }
59
+ function __decorate(decorators, target, key, desc) {
60
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
62
+ r = Reflect.decorate(decorators, target, key, desc);
63
+ else
64
+ for (var i = decorators.length - 1; i >= 0; i--)
65
+ if (d = decorators[i])
66
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
67
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
68
+ }
69
+ function __param(paramIndex, decorator) {
70
+ return function (target, key) { decorator(target, key, paramIndex); };
71
+ }
72
+ function __metadata(metadataKey, metadataValue) {
73
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
74
+ return Reflect.metadata(metadataKey, metadataValue);
75
+ }
76
+ function __awaiter(thisArg, _arguments, P, generator) {
77
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
78
+ return new (P || (P = Promise))(function (resolve, reject) {
79
+ function fulfilled(value) { try {
80
+ step(generator.next(value));
81
+ }
82
+ catch (e) {
83
+ reject(e);
84
+ } }
85
+ function rejected(value) { try {
86
+ step(generator["throw"](value));
87
+ }
88
+ catch (e) {
89
+ reject(e);
90
+ } }
91
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
92
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
93
+ });
94
+ }
95
+ function __generator(thisArg, body) {
96
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
97
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
98
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
99
+ function verb(n) { return function (v) { return step([n, v]); }; }
100
+ function step(op) {
101
+ if (f)
102
+ throw new TypeError("Generator is already executing.");
103
+ while (_)
104
+ try {
105
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
106
+ return t;
107
+ if (y = 0, t)
108
+ op = [op[0] & 2, t.value];
109
+ switch (op[0]) {
110
+ case 0:
111
+ case 1:
112
+ t = op;
113
+ break;
114
+ case 4:
115
+ _.label++;
116
+ return { value: op[1], done: false };
117
+ case 5:
118
+ _.label++;
119
+ y = op[1];
120
+ op = [0];
121
+ continue;
122
+ case 7:
123
+ op = _.ops.pop();
124
+ _.trys.pop();
125
+ continue;
126
+ default:
127
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
128
+ _ = 0;
129
+ continue;
130
+ }
131
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
132
+ _.label = op[1];
133
+ break;
134
+ }
135
+ if (op[0] === 6 && _.label < t[1]) {
136
+ _.label = t[1];
137
+ t = op;
138
+ break;
139
+ }
140
+ if (t && _.label < t[2]) {
141
+ _.label = t[2];
142
+ _.ops.push(op);
143
+ break;
144
+ }
145
+ if (t[2])
146
+ _.ops.pop();
147
+ _.trys.pop();
148
+ continue;
149
+ }
150
+ op = body.call(thisArg, _);
151
+ }
152
+ catch (e) {
153
+ op = [6, e];
154
+ y = 0;
155
+ }
156
+ finally {
157
+ f = t = 0;
158
+ }
159
+ if (op[0] & 5)
160
+ throw op[1];
161
+ return { value: op[0] ? op[1] : void 0, done: true };
162
+ }
163
+ }
164
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
165
+ if (k2 === undefined)
166
+ k2 = k;
167
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
168
+ }) : (function (o, m, k, k2) {
169
+ if (k2 === undefined)
170
+ k2 = k;
171
+ o[k2] = m[k];
172
+ });
173
+ function __exportStar(m, exports) {
174
+ for (var p in m)
175
+ if (p !== "default" && !exports.hasOwnProperty(p))
176
+ __createBinding(exports, m, p);
177
+ }
178
+ function __values(o) {
179
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
180
+ if (m)
181
+ return m.call(o);
182
+ if (o && typeof o.length === "number")
183
+ return {
184
+ next: function () {
185
+ if (o && i >= o.length)
186
+ o = void 0;
187
+ return { value: o && o[i++], done: !o };
188
+ }
189
+ };
190
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
191
+ }
192
+ function __read(o, n) {
193
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
194
+ if (!m)
195
+ return o;
196
+ var i = m.call(o), r, ar = [], e;
197
+ try {
198
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
199
+ ar.push(r.value);
200
+ }
201
+ catch (error) {
202
+ e = { error: error };
203
+ }
204
+ finally {
205
+ try {
206
+ if (r && !r.done && (m = i["return"]))
207
+ m.call(i);
208
+ }
209
+ finally {
210
+ if (e)
211
+ throw e.error;
212
+ }
213
+ }
214
+ return ar;
215
+ }
216
+ function __spread() {
217
+ for (var ar = [], i = 0; i < arguments.length; i++)
218
+ ar = ar.concat(__read(arguments[i]));
219
+ return ar;
220
+ }
221
+ function __spreadArrays() {
222
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
223
+ s += arguments[i].length;
224
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
225
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
226
+ r[k] = a[j];
227
+ return r;
228
+ }
229
+ ;
230
+ function __await(v) {
231
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
232
+ }
233
+ function __asyncGenerator(thisArg, _arguments, generator) {
234
+ if (!Symbol.asyncIterator)
235
+ throw new TypeError("Symbol.asyncIterator is not defined.");
236
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
237
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
238
+ function verb(n) { if (g[n])
239
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
240
+ function resume(n, v) { try {
241
+ step(g[n](v));
242
+ }
243
+ catch (e) {
244
+ settle(q[0][3], e);
245
+ } }
246
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
247
+ function fulfill(value) { resume("next", value); }
248
+ function reject(value) { resume("throw", value); }
249
+ function settle(f, v) { if (f(v), q.shift(), q.length)
250
+ resume(q[0][0], q[0][1]); }
251
+ }
252
+ function __asyncDelegator(o) {
253
+ var i, p;
254
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
255
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
256
+ }
257
+ function __asyncValues(o) {
258
+ if (!Symbol.asyncIterator)
259
+ throw new TypeError("Symbol.asyncIterator is not defined.");
260
+ var m = o[Symbol.asyncIterator], i;
261
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
262
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
263
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
264
+ }
265
+ function __makeTemplateObject(cooked, raw) {
266
+ if (Object.defineProperty) {
267
+ Object.defineProperty(cooked, "raw", { value: raw });
268
+ }
269
+ else {
270
+ cooked.raw = raw;
271
+ }
272
+ return cooked;
273
+ }
274
+ ;
275
+ var __setModuleDefault = Object.create ? (function (o, v) {
276
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
277
+ }) : function (o, v) {
278
+ o["default"] = v;
279
+ };
280
+ function __importStar(mod) {
281
+ if (mod && mod.__esModule)
282
+ return mod;
283
+ var result = {};
284
+ if (mod != null)
285
+ for (var k in mod)
286
+ if (Object.hasOwnProperty.call(mod, k))
287
+ __createBinding(result, mod, k);
288
+ __setModuleDefault(result, mod);
289
+ return result;
290
+ }
291
+ function __importDefault(mod) {
292
+ return (mod && mod.__esModule) ? mod : { default: mod };
293
+ }
294
+ function __classPrivateFieldGet(receiver, privateMap) {
295
+ if (!privateMap.has(receiver)) {
296
+ throw new TypeError("attempted to get private field on non-instance");
297
+ }
298
+ return privateMap.get(receiver);
299
+ }
300
+ function __classPrivateFieldSet(receiver, privateMap, value) {
301
+ if (!privateMap.has(receiver)) {
302
+ throw new TypeError("attempted to set private field on non-instance");
303
+ }
304
+ privateMap.set(receiver, value);
305
+ return value;
306
306
  }
307
307
 
308
- var BaseSchemaComponent = /** @class */ (function () {
309
- function BaseSchemaComponent() {
310
- this.modelChange = new i0.EventEmitter();
311
- }
312
- BaseSchemaComponent.prototype.getSchemaProperties = function () {
313
- return this.schema.properties instanceof Array ? this.schema.properties : [this.schema.properties];
314
- };
315
- BaseSchemaComponent.prototype.canRender = function (property) {
316
- // tslint:disable-next-line:no-eval
317
- console.log('property', property);
318
- property.canRender = (property === null || property === void 0 ? void 0 : property.conditionExpression) ? eval(property.conditionExpression) : true;
319
- console.log('property.canRender', property.canRender);
320
- return property.canRender;
321
- };
322
- return BaseSchemaComponent;
323
- }());
324
- BaseSchemaComponent.ɵfac = function BaseSchemaComponent_Factory(t) { return new (t || BaseSchemaComponent)(); };
325
- BaseSchemaComponent.ɵcmp = 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 });
326
- /*@__PURE__*/ (function () {
327
- i0.ɵsetClassMetadata(BaseSchemaComponent, [{
328
- type: i0.Component,
329
- args: [{
330
- template: ''
331
- }]
332
- }], null, { model: [{
333
- type: i0.Input
334
- }], schema: [{
335
- type: i0.Input
336
- }], modelChange: [{
337
- type: i0.Output
338
- }] });
308
+ var BaseSchemaComponent = /** @class */ (function () {
309
+ function BaseSchemaComponent() {
310
+ this.modelChange = new i0.EventEmitter();
311
+ }
312
+ BaseSchemaComponent.prototype.getSchemaProperties = function () {
313
+ return this.schema.properties instanceof Array ? this.schema.properties : [this.schema.properties];
314
+ };
315
+ BaseSchemaComponent.prototype.canRender = function (property) {
316
+ // tslint:disable-next-line:no-eval
317
+ property.canRender = (property === null || property === void 0 ? void 0 : property.conditionExpression) ? eval(property.conditionExpression) : true;
318
+ return property.canRender;
319
+ };
320
+ BaseSchemaComponent.prototype.onDrop = function (event, attr) {
321
+ var data = event.data;
322
+ if (!attr) {
323
+ attr = '';
324
+ }
325
+ attr += "{{" + data + "}}";
326
+ return attr;
327
+ };
328
+ return BaseSchemaComponent;
329
+ }());
330
+ BaseSchemaComponent.ɵfac = function BaseSchemaComponent_Factory(t) { return new (t || BaseSchemaComponent)(); };
331
+ BaseSchemaComponent.ɵcmp = 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 });
332
+ /*@__PURE__*/ (function () {
333
+ i0.ɵsetClassMetadata(BaseSchemaComponent, [{
334
+ type: i0.Component,
335
+ args: [{
336
+ template: ''
337
+ }]
338
+ }], null, { model: [{
339
+ type: i0.Input
340
+ }], schema: [{
341
+ type: i0.Input
342
+ }], modelChange: [{
343
+ type: i0.Output
344
+ }] });
339
345
  })();
340
346
 
341
- function onDropStruct(event, attr) {
342
- var data = event.data;
343
- if (!attr) {
344
- attr = '';
345
- }
346
- attr += "{{" + data + "}}";
347
- return attr;
347
+ function onDropStruct(event, attr) {
348
+ var data = event.data;
349
+ if (!attr) {
350
+ attr = '';
351
+ }
352
+ attr += "{{" + data + "}}";
353
+ return attr;
348
354
  }
349
355
 
350
- var _c0 = function () { return { standalone: true }; };
351
- function ArraySessionComponent_div_5_div_5_Template(rf, ctx) {
352
- if (rf & 1) {
353
- var _r8_1 = i0.ɵɵgetCurrentView();
354
- i0.ɵɵelementStart(0, "div", 0);
355
- i0.ɵɵelementStart(1, "div", 12);
356
- i0.ɵɵelementStart(2, "label", 13);
357
- i0.ɵɵtext(3, "Loop");
358
- i0.ɵɵelementEnd();
359
- i0.ɵɵelementStart(4, "input", 14);
360
- i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_5_div_5_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.loop = $event; });
361
- i0.ɵɵelementEnd();
362
- i0.ɵɵelementEnd();
363
- i0.ɵɵelementStart(5, "div", 15);
364
- i0.ɵɵelementStart(6, "label", 13);
365
- i0.ɵɵtext(7, "Alias");
366
- i0.ɵɵelementEnd();
367
- i0.ɵɵelementStart(8, "input", 14);
368
- i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_5_div_5_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.alias = $event; });
369
- i0.ɵɵelementEnd();
370
- i0.ɵɵelementEnd();
371
- i0.ɵɵelementEnd();
372
- }
373
- if (rf & 2) {
374
- var item_r2 = i0.ɵɵnextContext().$implicit;
375
- i0.ɵɵadvance(4);
376
- i0.ɵɵproperty("ngModel", item_r2.loop)("ngModelOptions", i0.ɵɵpureFunction0(4, _c0));
377
- i0.ɵɵadvance(4);
378
- i0.ɵɵproperty("ngModel", item_r2.alias)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0));
379
- }
380
- }
381
- function ArraySessionComponent_div_5_ng_container_6_Template(rf, ctx) {
382
- if (rf & 1) {
383
- i0.ɵɵelementContainer(0);
384
- }
385
- }
386
- var _c1 = function (a0, a1, a2) { return { items: a0, index: a1, mappingAttributes: a2 }; };
387
- var _c2 = function (a0) { return { $implicit: a0 }; };
388
- function ArraySessionComponent_div_5_Template(rf, ctx) {
389
- if (rf & 1) {
390
- var _r13_1 = i0.ɵɵgetCurrentView();
391
- i0.ɵɵelementStart(0, "div", 7);
392
- i0.ɵɵelementStart(1, "div", 8);
393
- i0.ɵɵtext(2);
394
- i0.ɵɵpipe(3, "translate");
395
- i0.ɵɵelementStart(4, "i", 9);
396
- i0.ɵɵlistener("click", function ArraySessionComponent_div_5_Template_i_click_4_listener() { i0.ɵɵrestoreView(_r13_1); var item_r2 = ctx.$implicit; var ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.remove(item_r2); });
397
- i0.ɵɵelementEnd();
398
- i0.ɵɵelementEnd();
399
- i0.ɵɵtemplate(5, ArraySessionComponent_div_5_div_5_Template, 9, 6, "div", 10);
400
- i0.ɵɵtemplate(6, ArraySessionComponent_div_5_ng_container_6_Template, 1, 0, "ng-container", 11);
401
- i0.ɵɵelementEnd();
402
- }
403
- if (rf & 2) {
404
- var item_r2 = ctx.$implicit;
405
- var index_r3 = ctx.index;
406
- var ctx_r0 = i0.ɵɵnextContext();
407
- i0.ɵɵadvance(2);
408
- i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(3, 5, ctx_r0.removeLabel), " ", index_r3 + 1, " ");
409
- i0.ɵɵadvance(3);
410
- i0.ɵɵproperty("ngIf", item_r2.mappingAttributes || item_r2.mappingAttributes === "");
411
- i0.ɵɵadvance(1);
412
- i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.subsectionItem)("ngTemplateOutletContext", i0.ɵɵpureFunction1(11, _c2, i0.ɵɵpureFunction3(7, _c1, ctx_r0.model, index_r3, item_r2.mappingAttributes || item_r2.mappingAttributes === "" ? item_r2.mappingAttributes : item_r2)));
413
- }
414
- }
415
- function ArraySessionComponent_button_11_Template(rf, ctx) {
416
- if (rf & 1) {
417
- var _r15_1 = i0.ɵɵgetCurrentView();
418
- i0.ɵɵelementStart(0, "button", 16);
419
- i0.ɵɵlistener("click", function ArraySessionComponent_button_11_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.addLoop(); });
420
- i0.ɵɵtext(1);
421
- i0.ɵɵpipe(2, "translate");
422
- i0.ɵɵelementEnd();
423
- }
424
- if (rf & 2) {
425
- i0.ɵɵadvance(1);
426
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "ADD_LOOP"));
427
- }
428
- }
429
- var ArraySessionComponent = /** @class */ (function (_super) {
430
- __extends(ArraySessionComponent, _super);
431
- function ArraySessionComponent() {
432
- var _this = _super.apply(this, __spread(arguments)) || this;
433
- _this.label = '';
434
- _this.showAddLoop = true;
435
- _this.removeLabel = '';
436
- _this.onAdd = new i0.EventEmitter();
437
- _this.onAddLoop = new i0.EventEmitter();
438
- return _this;
439
- }
440
- ArraySessionComponent.prototype.add = function () {
441
- this.onAdd.next();
442
- };
443
- ArraySessionComponent.prototype.addLoop = function () {
444
- this.onAddLoop.next();
445
- };
446
- ArraySessionComponent.prototype.remove = function (item) {
447
- var values = this.model;
448
- var index = values.indexOf(item);
449
- values.splice(index, 1);
450
- this.model = values;
451
- };
452
- ArraySessionComponent.prototype.trackByIndex = function (index, obj) {
453
- return index;
454
- };
455
- return ArraySessionComponent;
456
- }(BaseSchemaComponent));
457
- ArraySessionComponent.ɵfac = function ArraySessionComponent_Factory(t) { return ɵArraySessionComponent_BaseFactory(t || ArraySessionComponent); };
458
- ArraySessionComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ArraySessionComponent, selectors: [["array-session"]], contentQueries: function ArraySessionComponent_ContentQueries(rf, ctx, dirIndex) {
459
- if (rf & 1) {
460
- i0.ɵɵcontentQuery(dirIndex, i0.TemplateRef, true, i0.TemplateRef);
461
- }
462
- if (rf & 2) {
463
- var _t;
464
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subsectionItem = _t.first);
465
- }
466
- }, inputs: { label: "label", showAddLoop: "showAddLoop", removeLabel: "removeLabel" }, outputs: { onAdd: "onAdd", onAddLoop: "onAddLoop" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 9, 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", 1, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange"], [1, "col-md-4"], [1, "btn", "btn-outline-primary", "float-left", "btn-personal-edit", "ml-2", 3, "click"]], template: function ArraySessionComponent_Template(rf, ctx) {
467
- if (rf & 1) {
468
- i0.ɵɵelementStart(0, "div", 0);
469
- i0.ɵɵelementStart(1, "div", 1);
470
- i0.ɵɵelementStart(2, "label", 2);
471
- i0.ɵɵtext(3);
472
- i0.ɵɵpipe(4, "translate");
473
- i0.ɵɵelementEnd();
474
- i0.ɵɵtemplate(5, ArraySessionComponent_div_5_Template, 7, 13, "div", 3);
475
- i0.ɵɵelementEnd();
476
- i0.ɵɵelementEnd();
477
- i0.ɵɵelementStart(6, "div", 4);
478
- i0.ɵɵelementStart(7, "div", 1);
479
- i0.ɵɵelementStart(8, "button", 5);
480
- i0.ɵɵlistener("click", function ArraySessionComponent_Template_button_click_8_listener() { return ctx.add(); });
481
- i0.ɵɵtext(9);
482
- i0.ɵɵpipe(10, "translate");
483
- i0.ɵɵelementEnd();
484
- i0.ɵɵtemplate(11, ArraySessionComponent_button_11_Template, 3, 3, "button", 6);
485
- i0.ɵɵelementEnd();
486
- i0.ɵɵelementEnd();
487
- }
488
- if (rf & 2) {
489
- i0.ɵɵadvance(3);
490
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, ctx.label));
491
- i0.ɵɵadvance(2);
492
- i0.ɵɵproperty("ngForOf", ctx.model)("ngForTrackBy", ctx.trackByIndex);
493
- i0.ɵɵadvance(4);
494
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 7, "ADD_ITEM"));
495
- i0.ɵɵadvance(2);
496
- i0.ɵɵproperty("ngIf", ctx.showAddLoop);
497
- }
498
- }, directives: [i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel], pipes: [i7.TranslatePipe], styles: [".subsection-element[_ngcontent-%COMP%]{background:#fff;border:1px solid #ccc;border-radius:5px;margin-top:10px;padding:5px 15px 15px}.subsection-element[_ngcontent-%COMP%]:first-child{margin-top:0!important}.btn-personal-edit[_ngcontent-%COMP%]{margin:5px 0}.subsection-item-title[_ngcontent-%COMP%]{align-items:center;background:#eee;border-bottom:1px solid #ccc;border-radius:5px 5px 0 0;display:flex;font-weight:700;justify-content:space-between;margin-bottom:5px;margin-left:-15px;margin-top:-5px;padding:7px 10px 7px 14px;width:calc(100% + 30px)}.subsection-item-title[_ngcontent-%COMP%] .fa-trash-alt[_ngcontent-%COMP%]{color:red;cursor:pointer}.subsection-item-title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700}.add-buttons[_ngcontent-%COMP%]{margin-top:5px}"] });
499
- var ɵArraySessionComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ArraySessionComponent);
500
- /*@__PURE__*/ (function () {
501
- i0.ɵsetClassMetadata(ArraySessionComponent, [{
502
- type: i0.Component,
503
- args: [{
504
- selector: 'array-session',
505
- templateUrl: 'array-session.html',
506
- styleUrls: ['array-session.scss']
507
- }]
508
- }], null, { label: [{
509
- type: i0.Input
510
- }], showAddLoop: [{
511
- type: i0.Input
512
- }], removeLabel: [{
513
- type: i0.Input
514
- }], onAdd: [{
515
- type: i0.Output
516
- }], onAddLoop: [{
517
- type: i0.Output
518
- }], subsectionItem: [{
519
- type: i0.ContentChild,
520
- args: [i0.TemplateRef, { read: i0.TemplateRef }]
521
- }] });
356
+ var _c0 = function () { return { standalone: true }; };
357
+ function ArraySessionComponent_div_5_div_5_Template(rf, ctx) {
358
+ if (rf & 1) {
359
+ var _r8_1 = i0.ɵɵgetCurrentView();
360
+ i0.ɵɵelementStart(0, "div", 0);
361
+ i0.ɵɵelementStart(1, "div", 12);
362
+ i0.ɵɵelementStart(2, "label", 13);
363
+ i0.ɵɵtext(3, "Loop");
364
+ i0.ɵɵelementEnd();
365
+ i0.ɵɵelementStart(4, "input", 14);
366
+ i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_5_div_5_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.loop = $event; })("dndDrop", function ArraySessionComponent_div_5_div_5_Template_input_dndDrop_4_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; var ctx_r9 = i0.ɵɵnextContext(); return item_r2.loop = ctx_r9.onDrop($event, item_r2.loop); });
367
+ i0.ɵɵelementEnd();
368
+ i0.ɵɵelementEnd();
369
+ i0.ɵɵelementStart(5, "div", 15);
370
+ i0.ɵɵelementStart(6, "label", 13);
371
+ i0.ɵɵtext(7, "Alias");
372
+ i0.ɵɵelementEnd();
373
+ i0.ɵɵelementStart(8, "input", 14);
374
+ i0.ɵɵlistener("ngModelChange", function ArraySessionComponent_div_5_div_5_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.alias = $event; })("dndDrop", function ArraySessionComponent_div_5_div_5_Template_input_dndDrop_8_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r2 = i0.ɵɵnextContext().$implicit; var ctx_r13 = i0.ɵɵnextContext(); return item_r2.alias = ctx_r13.onDrop($event, item_r2.alias); });
375
+ i0.ɵɵelementEnd();
376
+ i0.ɵɵelementEnd();
377
+ i0.ɵɵelementEnd();
378
+ }
379
+ if (rf & 2) {
380
+ var item_r2 = i0.ɵɵnextContext().$implicit;
381
+ i0.ɵɵadvance(4);
382
+ i0.ɵɵproperty("ngModel", item_r2.loop)("ngModelOptions", i0.ɵɵpureFunction0(4, _c0));
383
+ i0.ɵɵadvance(4);
384
+ i0.ɵɵproperty("ngModel", item_r2.alias)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0));
385
+ }
386
+ }
387
+ function ArraySessionComponent_div_5_ng_container_6_Template(rf, ctx) {
388
+ if (rf & 1) {
389
+ i0.ɵɵelementContainer(0);
390
+ }
391
+ }
392
+ var _c1 = function (a0, a1, a2) { return { items: a0, index: a1, mappingAttributes: a2 }; };
393
+ var _c2 = function (a0) { return { $implicit: a0 }; };
394
+ function ArraySessionComponent_div_5_Template(rf, ctx) {
395
+ if (rf & 1) {
396
+ var _r17_1 = i0.ɵɵgetCurrentView();
397
+ i0.ɵɵelementStart(0, "div", 7);
398
+ i0.ɵɵelementStart(1, "div", 8);
399
+ i0.ɵɵtext(2);
400
+ i0.ɵɵpipe(3, "translate");
401
+ i0.ɵɵelementStart(4, "i", 9);
402
+ i0.ɵɵlistener("click", function ArraySessionComponent_div_5_Template_i_click_4_listener() { i0.ɵɵrestoreView(_r17_1); var item_r2 = ctx.$implicit; var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.remove(item_r2); });
403
+ i0.ɵɵelementEnd();
404
+ i0.ɵɵelementEnd();
405
+ i0.ɵɵtemplate(5, ArraySessionComponent_div_5_div_5_Template, 9, 6, "div", 10);
406
+ i0.ɵɵtemplate(6, ArraySessionComponent_div_5_ng_container_6_Template, 1, 0, "ng-container", 11);
407
+ i0.ɵɵelementEnd();
408
+ }
409
+ if (rf & 2) {
410
+ var item_r2 = ctx.$implicit;
411
+ var index_r3 = ctx.index;
412
+ var ctx_r0 = i0.ɵɵnextContext();
413
+ i0.ɵɵadvance(2);
414
+ i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(3, 5, ctx_r0.removeLabel), " ", index_r3 + 1, " ");
415
+ i0.ɵɵadvance(3);
416
+ i0.ɵɵproperty("ngIf", item_r2.mappingAttributes || item_r2.mappingAttributes === "");
417
+ i0.ɵɵadvance(1);
418
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.subsectionItem)("ngTemplateOutletContext", i0.ɵɵpureFunction1(11, _c2, i0.ɵɵpureFunction3(7, _c1, ctx_r0.model, index_r3, item_r2.mappingAttributes || item_r2.mappingAttributes === "" ? item_r2.mappingAttributes : item_r2)));
419
+ }
420
+ }
421
+ function ArraySessionComponent_button_11_Template(rf, ctx) {
422
+ if (rf & 1) {
423
+ var _r19_1 = i0.ɵɵgetCurrentView();
424
+ i0.ɵɵelementStart(0, "button", 16);
425
+ i0.ɵɵlistener("click", function ArraySessionComponent_button_11_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r19_1); var ctx_r18 = i0.ɵɵnextContext(); return ctx_r18.addLoop(); });
426
+ i0.ɵɵtext(1);
427
+ i0.ɵɵpipe(2, "translate");
428
+ i0.ɵɵelementEnd();
429
+ }
430
+ if (rf & 2) {
431
+ i0.ɵɵadvance(1);
432
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "ADD_LOOP"));
433
+ }
434
+ }
435
+ var ArraySessionComponent = /** @class */ (function (_super) {
436
+ __extends(ArraySessionComponent, _super);
437
+ function ArraySessionComponent() {
438
+ var _this = _super.apply(this, __spread(arguments)) || this;
439
+ _this.label = '';
440
+ _this.showAddLoop = true;
441
+ _this.removeLabel = '';
442
+ _this.onAdd = new i0.EventEmitter();
443
+ _this.onAddLoop = new i0.EventEmitter();
444
+ return _this;
445
+ }
446
+ ArraySessionComponent.prototype.add = function () {
447
+ this.onAdd.next();
448
+ };
449
+ ArraySessionComponent.prototype.addLoop = function () {
450
+ this.onAddLoop.next();
451
+ };
452
+ ArraySessionComponent.prototype.remove = function (item) {
453
+ var values = this.model;
454
+ var index = values.indexOf(item);
455
+ values.splice(index, 1);
456
+ this.model = values;
457
+ };
458
+ ArraySessionComponent.prototype.trackByIndex = function (index, obj) {
459
+ return index;
460
+ };
461
+ return ArraySessionComponent;
462
+ }(BaseSchemaComponent));
463
+ ArraySessionComponent.ɵfac = function ArraySessionComponent_Factory(t) { return ɵArraySessionComponent_BaseFactory(t || ArraySessionComponent); };
464
+ ArraySessionComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ArraySessionComponent, selectors: [["array-session"]], contentQueries: function ArraySessionComponent_ContentQueries(rf, ctx, dirIndex) {
465
+ if (rf & 1) {
466
+ i0.ɵɵcontentQuery(dirIndex, i0.TemplateRef, true, i0.TemplateRef);
467
+ }
468
+ if (rf & 2) {
469
+ var _t;
470
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subsectionItem = _t.first);
471
+ }
472
+ }, inputs: { label: "label", showAddLoop: "showAddLoop", removeLabel: "removeLabel" }, outputs: { onAdd: "onAdd", onAddLoop: "onAddLoop" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 9, 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) {
473
+ if (rf & 1) {
474
+ i0.ɵɵelementStart(0, "div", 0);
475
+ i0.ɵɵelementStart(1, "div", 1);
476
+ i0.ɵɵelementStart(2, "label", 2);
477
+ i0.ɵɵtext(3);
478
+ i0.ɵɵpipe(4, "translate");
479
+ i0.ɵɵelementEnd();
480
+ i0.ɵɵtemplate(5, ArraySessionComponent_div_5_Template, 7, 13, "div", 3);
481
+ i0.ɵɵelementEnd();
482
+ i0.ɵɵelementEnd();
483
+ i0.ɵɵelementStart(6, "div", 4);
484
+ i0.ɵɵelementStart(7, "div", 1);
485
+ i0.ɵɵelementStart(8, "button", 5);
486
+ i0.ɵɵlistener("click", function ArraySessionComponent_Template_button_click_8_listener() { return ctx.add(); });
487
+ i0.ɵɵtext(9);
488
+ i0.ɵɵpipe(10, "translate");
489
+ i0.ɵɵelementEnd();
490
+ i0.ɵɵtemplate(11, ArraySessionComponent_button_11_Template, 3, 3, "button", 6);
491
+ i0.ɵɵelementEnd();
492
+ i0.ɵɵelementEnd();
493
+ }
494
+ if (rf & 2) {
495
+ i0.ɵɵadvance(3);
496
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, ctx.label));
497
+ i0.ɵɵadvance(2);
498
+ i0.ɵɵproperty("ngForOf", ctx.model)("ngForTrackBy", ctx.trackByIndex);
499
+ i0.ɵɵadvance(4);
500
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 7, "ADD_ITEM"));
501
+ i0.ɵɵadvance(2);
502
+ i0.ɵɵproperty("ngIf", ctx.showAddLoop);
503
+ }
504
+ }, directives: [i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel], pipes: [i7.TranslatePipe], styles: [".subsection-element[_ngcontent-%COMP%]{background:#fff;border:1px solid #ccc;border-radius:5px;margin-top:10px;padding:5px 15px 15px}.subsection-element[_ngcontent-%COMP%]:first-child{margin-top:0!important}.btn-personal-edit[_ngcontent-%COMP%]{margin:5px 0}.subsection-item-title[_ngcontent-%COMP%]{align-items:center;background:#eee;border-bottom:1px solid #ccc;border-radius:5px 5px 0 0;display:flex;font-weight:700;justify-content:space-between;margin-bottom:5px;margin-left:-15px;margin-top:-5px;padding:7px 10px 7px 14px;width:calc(100% + 30px)}.subsection-item-title[_ngcontent-%COMP%] .fa-trash-alt[_ngcontent-%COMP%]{color:red;cursor:pointer}.subsection-item-title[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700}.add-buttons[_ngcontent-%COMP%]{margin-top:5px}"] });
505
+ var ɵArraySessionComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ArraySessionComponent);
506
+ /*@__PURE__*/ (function () {
507
+ i0.ɵsetClassMetadata(ArraySessionComponent, [{
508
+ type: i0.Component,
509
+ args: [{
510
+ selector: 'array-session',
511
+ templateUrl: 'array-session.html',
512
+ styleUrls: ['array-session.scss']
513
+ }]
514
+ }], null, { label: [{
515
+ type: i0.Input
516
+ }], showAddLoop: [{
517
+ type: i0.Input
518
+ }], removeLabel: [{
519
+ type: i0.Input
520
+ }], onAdd: [{
521
+ type: i0.Output
522
+ }], onAddLoop: [{
523
+ type: i0.Output
524
+ }], subsectionItem: [{
525
+ type: i0.ContentChild,
526
+ args: [i0.TemplateRef, { read: i0.TemplateRef }]
527
+ }] });
522
528
  })();
523
529
 
524
- function SchemaFormComponent_div_2_schema_input_1_Template(rf, ctx) {
525
- if (rf & 1) {
526
- var _r7_1 = i0.ɵɵgetCurrentView();
527
- i0.ɵɵelementStart(0, "schema-input", 3);
528
- i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_2_schema_input_1_Template_schema_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r7_1); var ctx_r6 = i0.ɵɵnextContext(2); return ctx_r6.model = $event; });
529
- i0.ɵɵelementEnd();
530
- }
531
- if (rf & 2) {
532
- var ctx_r8 = i0.ɵɵnextContext();
533
- var schema_r1 = ctx_r8.$implicit;
534
- var i_r2 = ctx_r8.index;
535
- var ctx_r3 = i0.ɵɵnextContext();
536
- i0.ɵɵproperty("idPrefix", ctx_r3.idPrefix)("model", ctx_r3.model)("schema", schema_r1)("editing", ctx_r3.editing)("index", i_r2);
537
- }
538
- }
539
- function SchemaFormComponent_div_2_schema_object_2_Template(rf, ctx) {
540
- if (rf & 1) {
541
- var _r10_1 = i0.ɵɵgetCurrentView();
542
- i0.ɵɵelementStart(0, "schema-object", 3);
543
- i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_2_schema_object_2_Template_schema_object_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r10_1); var ctx_r9 = i0.ɵɵnextContext(2); return ctx_r9.model = $event; });
544
- i0.ɵɵelementEnd();
545
- }
546
- if (rf & 2) {
547
- var ctx_r11 = i0.ɵɵnextContext();
548
- var schema_r1 = ctx_r11.$implicit;
549
- var i_r2 = ctx_r11.index;
550
- var ctx_r4 = i0.ɵɵnextContext();
551
- i0.ɵɵproperty("idPrefix", ctx_r4.idPrefix)("model", ctx_r4.model)("schema", schema_r1)("editing", ctx_r4.editing)("index", i_r2);
552
- }
553
- }
554
- function SchemaFormComponent_div_2_schema_array_3_Template(rf, ctx) {
555
- if (rf & 1) {
556
- var _r13_1 = i0.ɵɵgetCurrentView();
557
- i0.ɵɵelementStart(0, "schema-array", 3);
558
- i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_2_schema_array_3_Template_schema_array_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r13_1); var ctx_r12 = i0.ɵɵnextContext(2); return ctx_r12.model = $event; });
559
- i0.ɵɵelementEnd();
560
- }
561
- if (rf & 2) {
562
- var ctx_r14 = i0.ɵɵnextContext();
563
- var schema_r1 = ctx_r14.$implicit;
564
- var i_r2 = ctx_r14.index;
565
- var ctx_r5 = i0.ɵɵnextContext();
566
- i0.ɵɵproperty("idPrefix", ctx_r5.idPrefix)("model", ctx_r5.model)("schema", schema_r1)("editing", ctx_r5.editing)("index", i_r2);
567
- }
568
- }
569
- function SchemaFormComponent_div_2_Template(rf, ctx) {
570
- if (rf & 1) {
571
- i0.ɵɵelementStart(0, "div", 1);
572
- i0.ɵɵtemplate(1, SchemaFormComponent_div_2_schema_input_1_Template, 1, 5, "schema-input", 2);
573
- i0.ɵɵtemplate(2, SchemaFormComponent_div_2_schema_object_2_Template, 1, 5, "schema-object", 2);
574
- i0.ɵɵtemplate(3, SchemaFormComponent_div_2_schema_array_3_Template, 1, 5, "schema-array", 2);
575
- i0.ɵɵelementEnd();
576
- }
577
- if (rf & 2) {
578
- var ctx_r0 = i0.ɵɵnextContext();
579
- i0.ɵɵadvance(1);
580
- i0.ɵɵproperty("ngIf", ctx_r0.loaded);
581
- i0.ɵɵadvance(1);
582
- i0.ɵɵproperty("ngIf", ctx_r0.loaded);
583
- i0.ɵɵadvance(1);
584
- i0.ɵɵproperty("ngIf", ctx_r0.loaded);
585
- }
586
- }
587
- var SchemaFormComponent = /** @class */ (function (_super) {
588
- __extends(SchemaFormComponent, _super);
589
- function SchemaFormComponent() {
590
- var _this = _super.apply(this, __spread(arguments)) || this;
591
- _this.schemas = [];
592
- _this.customProperties = false;
593
- _this.editing = false;
594
- _this.loaded = false;
595
- return _this;
596
- }
597
- SchemaFormComponent.prototype.ngAfterContentInit = function () {
598
- this.loaded = true;
599
- console.log('SchemaFormComponent schemas', this.schemas);
600
- };
601
- SchemaFormComponent.prototype.onDrop = function ($event, modelElement) {
602
- return onDropStruct($event, modelElement);
603
- };
604
- SchemaFormComponent.prototype.getId = function (index) {
605
- return this.idPrefix + "-struct-" + index;
606
- };
607
- return SchemaFormComponent;
608
- }(BaseSchemaComponent));
609
- SchemaFormComponent.ɵfac = function SchemaFormComponent_Factory(t) { return ɵSchemaFormComponent_BaseFactory(t || SchemaFormComponent); };
610
- SchemaFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaFormComponent, selectors: [["schema-form"]], inputs: { idPrefix: "idPrefix", schemas: "schemas", customProperties: "customProperties", editing: "editing", inputType: "inputType" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], [3, "idPrefix", "model", "schema", "editing", "index", "modelChange", 4, "ngIf"], [3, "idPrefix", "model", "schema", "editing", "index", "modelChange"]], template: function SchemaFormComponent_Template(rf, ctx) {
611
- if (rf & 1) {
612
- i0.ɵɵtext(0);
613
- i0.ɵɵpipe(1, "json");
614
- i0.ɵɵtemplate(2, SchemaFormComponent_div_2_Template, 4, 3, "div", 0);
615
- }
616
- if (rf & 2) {
617
- i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(1, 2, ctx.schemas), "\n");
618
- i0.ɵɵadvance(2);
619
- i0.ɵɵproperty("ngForOf", ctx.schemas);
620
- }
621
- }, styles: [""] });
622
- var ɵSchemaFormComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaFormComponent);
623
- /*@__PURE__*/ (function () {
624
- i0.ɵsetClassMetadata(SchemaFormComponent, [{
625
- type: i0.Component,
626
- args: [{
627
- selector: 'schema-form',
628
- templateUrl: 'schema-form.html',
629
- styleUrls: ['./schema-form.scss']
630
- }]
631
- }], null, { idPrefix: [{
632
- type: i0.Input
633
- }], schemas: [{
634
- type: i0.Input
635
- }], customProperties: [{
636
- type: i0.Input
637
- }], editing: [{
638
- type: i0.Input
639
- }], inputType: [{
640
- type: i0.Input
641
- }] });
530
+ function SchemaFormComponent_div_0_Template(rf, ctx) {
531
+ if (rf & 1) {
532
+ var _r4_1 = i0.ɵɵgetCurrentView();
533
+ i0.ɵɵelementStart(0, "div", 1);
534
+ i0.ɵɵelementStart(1, "schema-input", 2);
535
+ i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_input_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r4_1); var ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.model = $event; });
536
+ i0.ɵɵelementEnd();
537
+ i0.ɵɵelementStart(2, "schema-object", 2);
538
+ i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_object_modelChange_2_listener($event) { i0.ɵɵrestoreView(_r4_1); var ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.model = $event; });
539
+ i0.ɵɵelementEnd();
540
+ i0.ɵɵelementStart(3, "schema-array", 2);
541
+ i0.ɵɵlistener("modelChange", function SchemaFormComponent_div_0_Template_schema_array_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r4_1); var ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.model = $event; });
542
+ i0.ɵɵelementEnd();
543
+ i0.ɵɵelementEnd();
544
+ }
545
+ if (rf & 2) {
546
+ var schema_r1 = ctx.$implicit;
547
+ var i_r2 = ctx.index;
548
+ var ctx_r0 = i0.ɵɵnextContext();
549
+ i0.ɵɵadvance(1);
550
+ i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
551
+ i0.ɵɵadvance(1);
552
+ i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
553
+ i0.ɵɵadvance(1);
554
+ i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
555
+ }
556
+ }
557
+ var SchemaFormComponent = /** @class */ (function (_super) {
558
+ __extends(SchemaFormComponent, _super);
559
+ function SchemaFormComponent() {
560
+ var _this = _super.apply(this, __spread(arguments)) || this;
561
+ _this.schemas = [];
562
+ _this.customProperties = false;
563
+ _this.editing = false;
564
+ _this.loaded = false;
565
+ return _this;
566
+ }
567
+ SchemaFormComponent.prototype.ngAfterContentInit = function () {
568
+ this.loaded = true;
569
+ };
570
+ SchemaFormComponent.prototype.onDrop = function ($event, modelElement) {
571
+ return onDropStruct($event, modelElement);
572
+ };
573
+ SchemaFormComponent.prototype.getId = function (index) {
574
+ return this.idPrefix + "-struct-" + index;
575
+ };
576
+ return SchemaFormComponent;
577
+ }(BaseSchemaComponent));
578
+ SchemaFormComponent.ɵfac = function SchemaFormComponent_Factory(t) { return ɵSchemaFormComponent_BaseFactory(t || SchemaFormComponent); };
579
+ SchemaFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaFormComponent, selectors: [["schema-form"]], inputs: { 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, "idPrefix", "model", "schema", "editing", "index", "modelChange"]], template: function SchemaFormComponent_Template(rf, ctx) {
580
+ if (rf & 1) {
581
+ i0.ɵɵtemplate(0, SchemaFormComponent_div_0_Template, 4, 15, "div", 0);
582
+ }
583
+ if (rf & 2) {
584
+ i0.ɵɵproperty("ngForOf", ctx.schemas);
585
+ }
586
+ }, styles: [""] });
587
+ var ɵSchemaFormComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaFormComponent);
588
+ /*@__PURE__*/ (function () {
589
+ i0.ɵsetClassMetadata(SchemaFormComponent, [{
590
+ type: i0.Component,
591
+ args: [{
592
+ selector: 'schema-form',
593
+ templateUrl: 'schema-form.html',
594
+ styleUrls: ['./schema-form.scss']
595
+ }]
596
+ }], null, { idPrefix: [{
597
+ type: i0.Input
598
+ }], schemas: [{
599
+ type: i0.Input
600
+ }], customProperties: [{
601
+ type: i0.Input
602
+ }], editing: [{
603
+ type: i0.Input
604
+ }], inputType: [{
605
+ type: i0.Input
606
+ }] });
642
607
  })();
643
608
 
644
- var _c0$1 = function () { return { standalone: true }; };
645
- function SchemaCustomAttributesComponent_div_0_Template(rf, ctx) {
646
- if (rf & 1) {
647
- var _r8_1 = i0.ɵɵgetCurrentView();
648
- i0.ɵɵelementStart(0, "div", 6);
649
- i0.ɵɵelementStart(1, "div", 7);
650
- i0.ɵɵelementStart(2, "label", 8);
651
- i0.ɵɵtext(3);
652
- i0.ɵɵelementEnd();
653
- i0.ɵɵelementStart(4, "span", 9);
654
- i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_div_0_Template_span_click_4_listener() { i0.ɵɵrestoreView(_r8_1); var i_r6 = ctx.index; var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.removeCustomAttribute(i_r6); });
655
- i0.ɵɵelement(5, "i", 10);
656
- i0.ɵɵpipe(6, "translate");
657
- i0.ɵɵelementEnd();
658
- i0.ɵɵelementStart(7, "input", 11);
659
- i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_0_Template_input_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; return attribute_r5.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_0_Template_input_dndDrop_7_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onDrop($event, attribute_r5); });
660
- i0.ɵɵelementEnd();
661
- i0.ɵɵelementEnd();
662
- i0.ɵɵelementEnd();
663
- }
664
- if (rf & 2) {
665
- var attribute_r5 = ctx.$implicit;
666
- i0.ɵɵadvance(3);
667
- i0.ɵɵtextInterpolate(attribute_r5.label);
668
- i0.ɵɵadvance(2);
669
- i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(6, 4, "REMOVE"));
670
- i0.ɵɵadvance(2);
671
- i0.ɵɵproperty("ngModel", attribute_r5.value)("ngModelOptions", i0.ɵɵpureFunction0(6, _c0$1));
672
- }
673
- }
674
- function SchemaCustomAttributesComponent_div_1_Template(rf, ctx) {
675
- if (rf & 1) {
676
- var _r12_1 = i0.ɵɵgetCurrentView();
677
- i0.ɵɵelementStart(0, "div", 12);
678
- i0.ɵɵelementStart(1, "div", 13);
679
- i0.ɵɵelementStart(2, "div", 7);
680
- i0.ɵɵelementStart(3, "label", 8);
681
- i0.ɵɵtext(4);
682
- i0.ɵɵpipe(5, "translate");
683
- i0.ɵɵelementStart(6, "strong");
684
- i0.ɵɵtext(7, "*");
685
- i0.ɵɵelementEnd();
686
- i0.ɵɵelementEnd();
687
- i0.ɵɵelementStart(8, "input", 14);
688
- i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.newCustomField.label = $event; });
689
- i0.ɵɵelementEnd();
690
- i0.ɵɵelementEnd();
691
- i0.ɵɵelementEnd();
692
- i0.ɵɵelementStart(9, "div", 13);
693
- i0.ɵɵelementStart(10, "div", 7);
694
- i0.ɵɵelementStart(11, "label", 8);
695
- i0.ɵɵtext(12);
696
- i0.ɵɵpipe(13, "translate");
697
- i0.ɵɵelementStart(14, "strong");
698
- i0.ɵɵtext(15, "*");
699
- i0.ɵɵelementEnd();
700
- i0.ɵɵelementEnd();
701
- i0.ɵɵelementStart(16, "input", 11);
702
- i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_16_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.newCustomField.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_16_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.onDrop($event, ctx_r14.newCustomField); });
703
- i0.ɵɵelementEnd();
704
- i0.ɵɵelementEnd();
705
- i0.ɵɵelementEnd();
706
- i0.ɵɵelementEnd();
707
- }
708
- if (rf & 2) {
709
- var ctx_r1 = i0.ɵɵnextContext();
710
- i0.ɵɵadvance(4);
711
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 6, "STEP.NAME"));
712
- i0.ɵɵadvance(4);
713
- i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.label)("ngModelOptions", i0.ɵɵpureFunction0(10, _c0$1));
714
- i0.ɵɵadvance(4);
715
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 8, "STEP.VALUE"));
716
- i0.ɵɵadvance(4);
717
- i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.value)("ngModelOptions", i0.ɵɵpureFunction0(11, _c0$1));
718
- }
719
- }
720
- function SchemaCustomAttributesComponent_button_4_Template(rf, ctx) {
721
- if (rf & 1) {
722
- var _r16_1 = i0.ɵɵgetCurrentView();
723
- i0.ɵɵelementStart(0, "button", 15);
724
- i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.newCustomField = {}; });
725
- i0.ɵɵtext(1);
726
- i0.ɵɵpipe(2, "translate");
727
- i0.ɵɵelementEnd();
728
- }
729
- if (rf & 2) {
730
- i0.ɵɵadvance(1);
731
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "ADD"), " ");
732
- }
733
- }
734
- function SchemaCustomAttributesComponent_button_5_Template(rf, ctx) {
735
- if (rf & 1) {
736
- var _r18_1 = i0.ɵɵgetCurrentView();
737
- i0.ɵɵelementStart(0, "button", 16);
738
- i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r18_1); var ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.newCustomField = null; });
739
- i0.ɵɵtext(1);
740
- i0.ɵɵpipe(2, "translate");
741
- i0.ɵɵelementEnd();
742
- }
743
- if (rf & 2) {
744
- i0.ɵɵadvance(1);
745
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "CANCEL"), " ");
746
- }
747
- }
748
- function SchemaCustomAttributesComponent_button_6_Template(rf, ctx) {
749
- if (rf & 1) {
750
- var _r20_1 = i0.ɵɵgetCurrentView();
751
- i0.ɵɵelementStart(0, "button", 15);
752
- i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r20_1); var ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.saveNewAttribute(ctx_r19.newCustomField); });
753
- i0.ɵɵtext(1);
754
- i0.ɵɵpipe(2, "translate");
755
- i0.ɵɵelementEnd();
756
- }
757
- if (rf & 2) {
758
- i0.ɵɵadvance(1);
759
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "SAVE"), " ");
760
- }
761
- }
762
- var SchemaCustomAttributesComponent = /** @class */ (function (_super) {
763
- __extends(SchemaCustomAttributesComponent, _super);
764
- function SchemaCustomAttributesComponent() {
765
- var _this = _super.apply(this, __spread(arguments)) || this;
766
- _this.onSaveAttribute = new i0.EventEmitter();
767
- _this.onDropOnAttribute = new i0.EventEmitter();
768
- return _this;
769
- }
770
- SchemaCustomAttributesComponent.prototype.ngAfterContentInit = function () {
771
- if (!this.model) {
772
- this.model = [];
773
- }
774
- };
775
- SchemaCustomAttributesComponent.prototype.saveNewAttribute = function (newCustomField) {
776
- this.onSaveAttribute.emit(newCustomField);
777
- this.model.push(newCustomField);
778
- this.newCustomField = null;
779
- this.modelChange.emit(this.model);
780
- };
781
- SchemaCustomAttributesComponent.prototype.removeCustomAttribute = function (attributeIndex) {
782
- this.model.splice(attributeIndex, 1);
783
- this.modelChange.emit(this.model);
784
- };
785
- SchemaCustomAttributesComponent.prototype.onDrop = function ($event, attribute) {
786
- if (!attribute.value) {
787
- attribute.value = '';
788
- }
789
- attribute.value += "{{" + $event.data + "}}";
790
- };
791
- return SchemaCustomAttributesComponent;
792
- }(BaseSchemaComponent));
793
- SchemaCustomAttributesComponent.ɵfac = function SchemaCustomAttributesComponent_Factory(t) { return ɵSchemaCustomAttributesComponent_BaseFactory(t || SchemaCustomAttributesComponent); };
794
- SchemaCustomAttributesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaCustomAttributesComponent, selectors: [["schema-custom-attributes"]], inputs: { onDropFunction: "onDropFunction" }, 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, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange"], [1, "btn", "btn-outline-primary", "float-left", 3, "click"], [1, "btn", "btn-outline-danger", "float-left", "ml-2", 3, "click"]], template: function SchemaCustomAttributesComponent_Template(rf, ctx) {
795
- if (rf & 1) {
796
- i0.ɵɵtemplate(0, SchemaCustomAttributesComponent_div_0_Template, 8, 7, "div", 0);
797
- i0.ɵɵtemplate(1, SchemaCustomAttributesComponent_div_1_Template, 17, 12, "div", 1);
798
- i0.ɵɵelementStart(2, "div", 2);
799
- i0.ɵɵelementStart(3, "div", 3);
800
- i0.ɵɵtemplate(4, SchemaCustomAttributesComponent_button_4_Template, 3, 3, "button", 4);
801
- i0.ɵɵtemplate(5, SchemaCustomAttributesComponent_button_5_Template, 3, 3, "button", 5);
802
- i0.ɵɵtemplate(6, SchemaCustomAttributesComponent_button_6_Template, 3, 3, "button", 4);
803
- i0.ɵɵelementEnd();
804
- i0.ɵɵelementEnd();
805
- }
806
- if (rf & 2) {
807
- i0.ɵɵproperty("ngForOf", ctx.model);
808
- i0.ɵɵadvance(1);
809
- i0.ɵɵproperty("ngIf", ctx.newCustomField);
810
- i0.ɵɵadvance(3);
811
- i0.ɵɵproperty("ngIf", !ctx.newCustomField);
812
- i0.ɵɵadvance(1);
813
- i0.ɵɵproperty("ngIf", ctx.newCustomField);
814
- i0.ɵɵadvance(1);
815
- i0.ɵɵproperty("ngIf", ctx.newCustomField && ctx.newCustomField.label && ctx.newCustomField.value);
816
- }
817
- }, directives: [i1.NgForOf, i1.NgIf, i4.MatTooltip, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel], pipes: [i7.TranslatePipe], styles: [".customAttributeDeleteIcon[_ngcontent-%COMP%]{color:red;cursor:pointer;font-size:16px;position:absolute;right:15px;top:4px}.customAttributeDeleteIcon[_ngcontent-%COMP%]:hover{color:#777}.struct-custom-field[_ngcontent-%COMP%]{background-color:#ececec;margin-top:16px;padding:8px 16px 16px}"] });
818
- var ɵSchemaCustomAttributesComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaCustomAttributesComponent);
819
- /*@__PURE__*/ (function () {
820
- i0.ɵsetClassMetadata(SchemaCustomAttributesComponent, [{
821
- type: i0.Component,
822
- args: [{
823
- selector: 'schema-custom-attributes',
824
- templateUrl: 'schema-custom-attributes.html',
825
- styleUrls: ['./schema-custom-attributes.scss']
826
- }]
827
- }], null, { onDropFunction: [{
828
- type: i0.Input
829
- }], onSaveAttribute: [{
830
- type: i0.Output
831
- }], onDropOnAttribute: [{
832
- type: i0.Output
833
- }] });
609
+ var _c0$1 = function () { return { standalone: true }; };
610
+ function SchemaCustomAttributesComponent_div_0_Template(rf, ctx) {
611
+ if (rf & 1) {
612
+ var _r8_1 = i0.ɵɵgetCurrentView();
613
+ i0.ɵɵelementStart(0, "div", 6);
614
+ i0.ɵɵelementStart(1, "div", 7);
615
+ i0.ɵɵelementStart(2, "label", 8);
616
+ i0.ɵɵtext(3);
617
+ i0.ɵɵelementEnd();
618
+ i0.ɵɵelementStart(4, "span", 9);
619
+ i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_div_0_Template_span_click_4_listener() { i0.ɵɵrestoreView(_r8_1); var i_r6 = ctx.index; var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.removeCustomAttribute(i_r6); });
620
+ i0.ɵɵelement(5, "i", 10);
621
+ i0.ɵɵpipe(6, "translate");
622
+ i0.ɵɵelementEnd();
623
+ i0.ɵɵelementStart(7, "input", 11);
624
+ i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_0_Template_input_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; return attribute_r5.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_0_Template_input_dndDrop_7_listener($event) { i0.ɵɵrestoreView(_r8_1); var attribute_r5 = ctx.$implicit; var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onDropAttr($event, attribute_r5); });
625
+ i0.ɵɵelementEnd();
626
+ i0.ɵɵelementEnd();
627
+ i0.ɵɵelementEnd();
628
+ }
629
+ if (rf & 2) {
630
+ var attribute_r5 = ctx.$implicit;
631
+ i0.ɵɵadvance(3);
632
+ i0.ɵɵtextInterpolate(attribute_r5.label);
633
+ i0.ɵɵadvance(2);
634
+ i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(6, 4, "REMOVE"));
635
+ i0.ɵɵadvance(2);
636
+ i0.ɵɵproperty("ngModel", attribute_r5.value)("ngModelOptions", i0.ɵɵpureFunction0(6, _c0$1));
637
+ }
638
+ }
639
+ function SchemaCustomAttributesComponent_div_1_Template(rf, ctx) {
640
+ if (rf & 1) {
641
+ var _r12_1 = i0.ɵɵgetCurrentView();
642
+ i0.ɵɵelementStart(0, "div", 12);
643
+ i0.ɵɵelementStart(1, "div", 13);
644
+ i0.ɵɵelementStart(2, "div", 7);
645
+ i0.ɵɵelementStart(3, "label", 8);
646
+ i0.ɵɵtext(4);
647
+ i0.ɵɵpipe(5, "translate");
648
+ i0.ɵɵelementStart(6, "strong");
649
+ i0.ɵɵtext(7, "*");
650
+ i0.ɵɵelementEnd();
651
+ i0.ɵɵelementEnd();
652
+ i0.ɵɵelementStart(8, "input", 14);
653
+ i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.newCustomField.label = $event; });
654
+ i0.ɵɵelementEnd();
655
+ i0.ɵɵelementEnd();
656
+ i0.ɵɵelementEnd();
657
+ i0.ɵɵelementStart(9, "div", 13);
658
+ i0.ɵɵelementStart(10, "div", 7);
659
+ i0.ɵɵelementStart(11, "label", 8);
660
+ i0.ɵɵtext(12);
661
+ i0.ɵɵpipe(13, "translate");
662
+ i0.ɵɵelementStart(14, "strong");
663
+ i0.ɵɵtext(15, "*");
664
+ i0.ɵɵelementEnd();
665
+ i0.ɵɵelementEnd();
666
+ i0.ɵɵelementStart(16, "input", 11);
667
+ i0.ɵɵlistener("ngModelChange", function SchemaCustomAttributesComponent_div_1_Template_input_ngModelChange_16_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.newCustomField.value = $event; })("dndDrop", function SchemaCustomAttributesComponent_div_1_Template_input_dndDrop_16_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.onDropAttr($event, ctx_r14.newCustomField); });
668
+ i0.ɵɵelementEnd();
669
+ i0.ɵɵelementEnd();
670
+ i0.ɵɵelementEnd();
671
+ i0.ɵɵelementEnd();
672
+ }
673
+ if (rf & 2) {
674
+ var ctx_r1 = i0.ɵɵnextContext();
675
+ i0.ɵɵadvance(4);
676
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 6, "STEP.NAME"));
677
+ i0.ɵɵadvance(4);
678
+ i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.label)("ngModelOptions", i0.ɵɵpureFunction0(10, _c0$1));
679
+ i0.ɵɵadvance(4);
680
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 8, "STEP.VALUE"));
681
+ i0.ɵɵadvance(4);
682
+ i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.value)("ngModelOptions", i0.ɵɵpureFunction0(11, _c0$1));
683
+ }
684
+ }
685
+ function SchemaCustomAttributesComponent_button_4_Template(rf, ctx) {
686
+ if (rf & 1) {
687
+ var _r16_1 = i0.ɵɵgetCurrentView();
688
+ i0.ɵɵelementStart(0, "button", 15);
689
+ i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.newCustomField = {}; });
690
+ i0.ɵɵtext(1);
691
+ i0.ɵɵpipe(2, "translate");
692
+ i0.ɵɵelementEnd();
693
+ }
694
+ if (rf & 2) {
695
+ i0.ɵɵadvance(1);
696
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "ADD"), " ");
697
+ }
698
+ }
699
+ function SchemaCustomAttributesComponent_button_5_Template(rf, ctx) {
700
+ if (rf & 1) {
701
+ var _r18_1 = i0.ɵɵgetCurrentView();
702
+ i0.ɵɵelementStart(0, "button", 16);
703
+ i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r18_1); var ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.newCustomField = null; });
704
+ i0.ɵɵtext(1);
705
+ i0.ɵɵpipe(2, "translate");
706
+ i0.ɵɵelementEnd();
707
+ }
708
+ if (rf & 2) {
709
+ i0.ɵɵadvance(1);
710
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "CANCEL"), " ");
711
+ }
712
+ }
713
+ function SchemaCustomAttributesComponent_button_6_Template(rf, ctx) {
714
+ if (rf & 1) {
715
+ var _r20_1 = i0.ɵɵgetCurrentView();
716
+ i0.ɵɵelementStart(0, "button", 15);
717
+ i0.ɵɵlistener("click", function SchemaCustomAttributesComponent_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r20_1); var ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.saveNewAttribute(ctx_r19.newCustomField); });
718
+ i0.ɵɵtext(1);
719
+ i0.ɵɵpipe(2, "translate");
720
+ i0.ɵɵelementEnd();
721
+ }
722
+ if (rf & 2) {
723
+ i0.ɵɵadvance(1);
724
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "SAVE"), " ");
725
+ }
726
+ }
727
+ var SchemaCustomAttributesComponent = /** @class */ (function (_super) {
728
+ __extends(SchemaCustomAttributesComponent, _super);
729
+ function SchemaCustomAttributesComponent() {
730
+ var _this = _super.apply(this, __spread(arguments)) || this;
731
+ _this.onSaveAttribute = new i0.EventEmitter();
732
+ _this.onDropOnAttribute = new i0.EventEmitter();
733
+ return _this;
734
+ }
735
+ SchemaCustomAttributesComponent.prototype.ngAfterContentInit = function () {
736
+ if (!this.model) {
737
+ this.model = [];
738
+ }
739
+ };
740
+ SchemaCustomAttributesComponent.prototype.saveNewAttribute = function (newCustomField) {
741
+ this.onSaveAttribute.emit(newCustomField);
742
+ this.model.push(newCustomField);
743
+ this.newCustomField = null;
744
+ this.modelChange.emit(this.model);
745
+ };
746
+ SchemaCustomAttributesComponent.prototype.removeCustomAttribute = function (attributeIndex) {
747
+ this.model.splice(attributeIndex, 1);
748
+ this.modelChange.emit(this.model);
749
+ };
750
+ SchemaCustomAttributesComponent.prototype.onDropAttr = function ($event, attribute) {
751
+ if (!attribute.value) {
752
+ attribute.value = '';
753
+ }
754
+ attribute.value += "{{" + $event.data + "}}";
755
+ };
756
+ return SchemaCustomAttributesComponent;
757
+ }(BaseSchemaComponent));
758
+ SchemaCustomAttributesComponent.ɵfac = function SchemaCustomAttributesComponent_Factory(t) { return ɵSchemaCustomAttributesComponent_BaseFactory(t || SchemaCustomAttributesComponent); };
759
+ SchemaCustomAttributesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaCustomAttributesComponent, selectors: [["schema-custom-attributes"]], inputs: { onDropFunction: "onDropFunction" }, 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, "form-control", 3, "ngModel", "ngModelOptions", "ngModelChange"], [1, "btn", "btn-outline-primary", "float-left", 3, "click"], [1, "btn", "btn-outline-danger", "float-left", "ml-2", 3, "click"]], template: function SchemaCustomAttributesComponent_Template(rf, ctx) {
760
+ if (rf & 1) {
761
+ i0.ɵɵtemplate(0, SchemaCustomAttributesComponent_div_0_Template, 8, 7, "div", 0);
762
+ i0.ɵɵtemplate(1, SchemaCustomAttributesComponent_div_1_Template, 17, 12, "div", 1);
763
+ i0.ɵɵelementStart(2, "div", 2);
764
+ i0.ɵɵelementStart(3, "div", 3);
765
+ i0.ɵɵtemplate(4, SchemaCustomAttributesComponent_button_4_Template, 3, 3, "button", 4);
766
+ i0.ɵɵtemplate(5, SchemaCustomAttributesComponent_button_5_Template, 3, 3, "button", 5);
767
+ i0.ɵɵtemplate(6, SchemaCustomAttributesComponent_button_6_Template, 3, 3, "button", 4);
768
+ i0.ɵɵelementEnd();
769
+ i0.ɵɵelementEnd();
770
+ }
771
+ if (rf & 2) {
772
+ i0.ɵɵproperty("ngForOf", ctx.model);
773
+ i0.ɵɵadvance(1);
774
+ i0.ɵɵproperty("ngIf", ctx.newCustomField);
775
+ i0.ɵɵadvance(3);
776
+ i0.ɵɵproperty("ngIf", !ctx.newCustomField);
777
+ i0.ɵɵadvance(1);
778
+ i0.ɵɵproperty("ngIf", ctx.newCustomField);
779
+ i0.ɵɵadvance(1);
780
+ i0.ɵɵproperty("ngIf", ctx.newCustomField && ctx.newCustomField.label && ctx.newCustomField.value);
781
+ }
782
+ }, directives: [i1.NgForOf, i1.NgIf, i4.MatTooltip, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel], pipes: [i7.TranslatePipe], styles: [".customAttributeDeleteIcon[_ngcontent-%COMP%]{color:red;cursor:pointer;font-size:16px;position:absolute;right:15px;top:4px}.customAttributeDeleteIcon[_ngcontent-%COMP%]:hover{color:#777}.struct-custom-field[_ngcontent-%COMP%]{background-color:#ececec;margin-top:16px;padding:8px 16px 16px}"] });
783
+ var ɵSchemaCustomAttributesComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaCustomAttributesComponent);
784
+ /*@__PURE__*/ (function () {
785
+ i0.ɵsetClassMetadata(SchemaCustomAttributesComponent, [{
786
+ type: i0.Component,
787
+ args: [{
788
+ selector: 'schema-custom-attributes',
789
+ templateUrl: 'schema-custom-attributes.html',
790
+ styleUrls: ['./schema-custom-attributes.scss']
791
+ }]
792
+ }], null, { onDropFunction: [{
793
+ type: i0.Input
794
+ }], onSaveAttribute: [{
795
+ type: i0.Output
796
+ }], onDropOnAttribute: [{
797
+ type: i0.Output
798
+ }] });
834
799
  })();
835
800
 
836
- function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template(rf, ctx) {
837
- if (rf & 1) {
838
- var _r8_1 = i0.ɵɵgetCurrentView();
839
- i0.ɵɵelementStart(0, "schema-form", 4);
840
- i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template_schema_form_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r3 = i0.ɵɵnextContext().$implicit; var ctx_r7 = i0.ɵɵnextContext(2); return ctx_r7.model[ctx_r7.schema.id][item_r3.index].mappingAttributes = $event; });
841
- i0.ɵɵelementEnd();
842
- }
843
- if (rf & 2) {
844
- var item_r3 = i0.ɵɵnextContext().$implicit;
845
- var ctx_r4 = i0.ɵɵnextContext(2);
846
- i0.ɵɵproperty("idPrefix", ctx_r4.idPrefix)("model", ctx_r4.model[ctx_r4.schema.id][item_r3.index].mappingAttributes)("schemas", ctx_r4.getSchemaProperties())("editing", ctx_r4.editing);
847
- }
848
- }
849
- function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template(rf, ctx) {
850
- if (rf & 1) {
851
- var _r12_1 = i0.ɵɵgetCurrentView();
852
- i0.ɵɵelementStart(0, "schema-form", 4);
853
- i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template_schema_form_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var item_r3 = i0.ɵɵnextContext().$implicit; var ctx_r11 = i0.ɵɵnextContext(2); return (ctx_r11.model[ctx_r11.schema.id][item_r3.index] = $event); });
854
- i0.ɵɵelementEnd();
855
- }
856
- if (rf & 2) {
857
- var item_r3 = i0.ɵɵnextContext().$implicit;
858
- var ctx_r5 = i0.ɵɵnextContext(2);
859
- i0.ɵɵproperty("idPrefix", ctx_r5.idPrefix)("model", ctx_r5.model[ctx_r5.schema.id][item_r3.index])("schemas", ctx_r5.getSchemaProperties())("editing", ctx_r5.editing);
860
- }
861
- }
862
- function SchemaArrayComponent_div_0_ng_template_2_div_2_Template(rf, ctx) {
863
- if (rf & 1) {
864
- var _r16_1 = i0.ɵɵgetCurrentView();
865
- i0.ɵɵelementStart(0, "div", 5);
866
- i0.ɵɵelementStart(1, "div", 6);
867
- i0.ɵɵelementStart(2, "label", 7);
868
- i0.ɵɵtext(3);
869
- i0.ɵɵpipe(4, "translate");
870
- i0.ɵɵelementEnd();
871
- i0.ɵɵelementStart(5, "schema-custom-attributes", 8);
872
- i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_div_2_Template_schema_custom_attributes_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r16_1); var item_r3 = i0.ɵɵnextContext().$implicit; var ctx_r15 = i0.ɵɵnextContext(2); return ctx_r15.model[ctx_r15.schema.id][item_r3.index].customAttributes = $event; });
873
- i0.ɵɵelementEnd();
874
- i0.ɵɵelementEnd();
875
- i0.ɵɵelementEnd();
876
- }
877
- if (rf & 2) {
878
- var item_r3 = i0.ɵɵnextContext().$implicit;
879
- var ctx_r6 = i0.ɵɵnextContext(2);
880
- i0.ɵɵadvance(3);
881
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "STEP.ADDITIONAL_ATTRIBUTES"));
882
- i0.ɵɵadvance(2);
883
- i0.ɵɵproperty("model", ctx_r6.model[ctx_r6.schema.id][item_r3.index].customAttributes)("onDropFunction", ctx_r6.onDrop);
884
- }
885
- }
886
- function SchemaArrayComponent_div_0_ng_template_2_Template(rf, ctx) {
887
- if (rf & 1) {
888
- i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template, 1, 4, "schema-form", 2);
889
- i0.ɵɵtemplate(1, SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template, 1, 4, "schema-form", 2);
890
- i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_div_2_Template, 6, 5, "div", 3);
891
- }
892
- if (rf & 2) {
893
- var item_r3 = ctx.$implicit;
894
- var ctx_r2 = i0.ɵɵnextContext(2);
895
- i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop !== undefined);
896
- i0.ɵɵadvance(1);
897
- i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop == undefined);
898
- i0.ɵɵadvance(1);
899
- i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index] && ctx_r2.schema.customProperties);
900
- }
901
- }
902
- function SchemaArrayComponent_div_0_Template(rf, ctx) {
903
- if (rf & 1) {
904
- var _r20_1 = i0.ɵɵgetCurrentView();
905
- i0.ɵɵelementStart(0, "div");
906
- i0.ɵɵelementStart(1, "array-session", 1);
907
- i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_Template_array_session_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r20_1); var ctx_r19 = i0.ɵɵnextContext(); return (ctx_r19.model[ctx_r19.schema.id] = $event); })("onAdd", function SchemaArrayComponent_div_0_Template_array_session_onAdd_1_listener() { i0.ɵɵrestoreView(_r20_1); var ctx_r21 = i0.ɵɵnextContext(); return ctx_r21.addArrayItem(ctx_r21.schema.id, {}); })("onAddLoop", function SchemaArrayComponent_div_0_Template_array_session_onAddLoop_1_listener() { i0.ɵɵrestoreView(_r20_1); var ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.addArrayLoop(ctx_r22.schema.id, {}); });
908
- i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_Template, 3, 3, "ng-template");
909
- i0.ɵɵelementEnd();
910
- i0.ɵɵelementEnd();
911
- }
912
- if (rf & 2) {
913
- var ctx_r0 = i0.ɵɵnextContext();
914
- i0.ɵɵadvance(1);
915
- i0.ɵɵproperty("label", ctx_r0.schema.title)("removeLabel", ctx_r0.schema.title)("model", ctx_r0.model[ctx_r0.schema.id])("showAddLoop", ctx_r0.schema.withoutLoop !== true);
916
- }
917
- }
918
- var _c0$2 = function () { return { standalone: true }; };
919
- function SchemaArrayComponent_div_1_ng_template_2_input_3_Template(rf, ctx) {
920
- if (rf & 1) {
921
- var _r30_1 = i0.ɵɵgetCurrentView();
922
- i0.ɵɵelementStart(0, "input", 12);
923
- i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_input_3_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r30_1); var item_r24 = i0.ɵɵnextContext().$implicit; return item_r24.items[item_r24.index].mappingAttributes = $event; })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_input_3_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r30_1); var item_r24 = i0.ɵɵnextContext().$implicit; var ctx_r31 = i0.ɵɵnextContext(2); return item_r24.items[item_r24.index].mappingAttributes = ctx_r31.onDrop($event, item_r24.items[item_r24.index].mappingAttributes); });
924
- i0.ɵɵelementEnd();
925
- }
926
- if (rf & 2) {
927
- var item_r24 = i0.ɵɵnextContext().$implicit;
928
- var ctx_r25 = i0.ɵɵnextContext(2);
929
- i0.ɵɵproperty("ngModel", item_r24.items[item_r24.index].mappingAttributes)("ngModelOptions", i0.ɵɵpureFunction0(3, _c0$2))("id", ctx_r25.getId(ctx_r25.index) + "-" + item_r24.index);
930
- }
931
- }
932
- function SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template(rf, ctx) {
933
- if (rf & 1) {
934
- var _r36_1 = i0.ɵɵgetCurrentView();
935
- i0.ɵɵelementStart(0, "input", 12);
936
- i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r36_1); var item_r24 = i0.ɵɵnextContext().$implicit; return (item_r24.items[item_r24.index] = $event); })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r36_1); var item_r24 = i0.ɵɵnextContext().$implicit; var ctx_r37 = i0.ɵɵnextContext(2); return (item_r24.items[item_r24.index] = ctx_r37.onDrop($event, item_r24.items[item_r24.index])); });
937
- i0.ɵɵelementEnd();
938
- }
939
- if (rf & 2) {
940
- var item_r24 = i0.ɵɵnextContext().$implicit;
941
- var ctx_r27 = i0.ɵɵnextContext(2);
942
- i0.ɵɵproperty("ngModel", item_r24.items[item_r24.index])("ngModelOptions", i0.ɵɵpureFunction0(3, _c0$2))("id", ctx_r27.getId(ctx_r27.index) + "-" + item_r24.index);
943
- }
944
- }
945
- function SchemaArrayComponent_div_1_ng_template_2_Template(rf, ctx) {
946
- if (rf & 1) {
947
- i0.ɵɵelementStart(0, "label", 9);
948
- i0.ɵɵtext(1);
949
- i0.ɵɵpipe(2, "translate");
950
- i0.ɵɵelementEnd();
951
- i0.ɵɵtemplate(3, SchemaArrayComponent_div_1_ng_template_2_input_3_Template, 1, 4, "input", 10);
952
- i0.ɵɵtemplate(4, SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template, 1, 4, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
953
- }
954
- if (rf & 2) {
955
- var item_r24 = ctx.$implicit;
956
- var _r26 = i0.ɵɵreference(5);
957
- var ctx_r23 = i0.ɵɵnextContext(2);
958
- i0.ɵɵproperty("htmlFor", ctx_r23.getId(ctx_r23.index) + "-" + item_r24.index);
959
- i0.ɵɵadvance(1);
960
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 4, ctx_r23.schema.title));
961
- i0.ɵɵadvance(2);
962
- i0.ɵɵproperty("ngIf", item_r24.items[item_r24.index].mappingAttributes || item_r24.items[item_r24.index].mappingAttributes === "")("ngIfElse", _r26);
963
- }
964
- }
965
- function SchemaArrayComponent_div_1_Template(rf, ctx) {
966
- if (rf & 1) {
967
- var _r41_1 = i0.ɵɵgetCurrentView();
968
- i0.ɵɵelementStart(0, "div");
969
- i0.ɵɵelementStart(1, "array-session", 1);
970
- i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_1_Template_array_session_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r41_1); var ctx_r40 = i0.ɵɵnextContext(); return (ctx_r40.model[ctx_r40.schema.id] = $event); })("onAdd", function SchemaArrayComponent_div_1_Template_array_session_onAdd_1_listener() { i0.ɵɵrestoreView(_r41_1); var ctx_r42 = i0.ɵɵnextContext(); return ctx_r42.addArrayItem(ctx_r42.schema.id, ""); })("onAddLoop", function SchemaArrayComponent_div_1_Template_array_session_onAddLoop_1_listener() { i0.ɵɵrestoreView(_r41_1); var ctx_r43 = i0.ɵɵnextContext(); return ctx_r43.addArrayLoop(ctx_r43.schema.id, ""); });
971
- i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_Template, 6, 6, "ng-template");
972
- i0.ɵɵelementEnd();
973
- i0.ɵɵelementEnd();
974
- }
975
- if (rf & 2) {
976
- var ctx_r1 = i0.ɵɵnextContext();
977
- i0.ɵɵadvance(1);
978
- i0.ɵɵproperty("label", ctx_r1.schema.title)("removeLabel", ctx_r1.schema.title)("model", ctx_r1.model[ctx_r1.schema.id])("showAddLoop", ctx_r1.schema.withoutLoop !== true);
979
- }
980
- }
981
- var SchemaArrayComponent = /** @class */ (function (_super) {
982
- __extends(SchemaArrayComponent, _super);
983
- function SchemaArrayComponent() {
984
- var _this = _super.apply(this, __spread(arguments)) || this;
985
- _this.editing = false;
986
- return _this;
987
- }
988
- SchemaArrayComponent.prototype.ngAfterContentInit = function () {
989
- var _a;
990
- if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'array' && this.model && !this.model[this.schema.id]) {
991
- this.model[this.schema.id] = [];
992
- }
993
- this.loaded = true;
994
- console.log('SchemaArrayComponent schema', this.schema);
995
- };
996
- SchemaArrayComponent.prototype.onDrop = function ($event, modelElement) {
997
- return onDropStruct($event, modelElement);
998
- };
999
- SchemaArrayComponent.prototype.getId = function (index) {
1000
- return this.idPrefix + "-struct-" + index;
1001
- };
1002
- SchemaArrayComponent.prototype.addArrayItem = function (id, param) {
1003
- var _this = this;
1004
- this.model[id] = this.model[id] || [];
1005
- if (this.schema.properties) {
1006
- param = {};
1007
- Object.keys(this.schema.properties).forEach(function (key) {
1008
- var schemaProperty = _this.schema.properties[key];
1009
- if (schemaProperty.type === 'object') {
1010
- param[schemaProperty.id] = {};
1011
- }
1012
- else if (schemaProperty.type === 'array') {
1013
- param[schemaProperty.id] = [];
1014
- }
1015
- });
1016
- }
1017
- this.model[id].push(param);
1018
- };
1019
- SchemaArrayComponent.prototype.addArrayLoop = function (id, mappingAttributes) {
1020
- this.model[id] = this.model[id] || [];
1021
- this.model[id].push({ loop: '', alias: '', mappingAttributes: mappingAttributes });
1022
- };
1023
- return SchemaArrayComponent;
1024
- }(BaseSchemaComponent));
1025
- SchemaArrayComponent.ɵfac = function SchemaArrayComponent_Factory(t) { return ɵSchemaArrayComponent_BaseFactory(t || SchemaArrayComponent); };
1026
- SchemaArrayComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaArrayComponent, selectors: [["schema-array"]], inputs: { idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "label", "removeLabel", "model", "showAddLoop", "modelChange", "onAdd", "onAddLoop"], [3, "idPrefix", "model", "schemas", "editing", "modelChange", 4, "ngIf"], ["class", "row struct-custom-properties", 4, "ngIf"], [3, "idPrefix", "model", "schemas", "editing", "modelChange"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"], [1, "info-label", 3, "htmlFor"], ["class", "form-control", "type", "text", "dndDropzone", "", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop", 4, "ngIf", "ngIfElse"], ["elseBlock", ""], ["type", "text", "dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop"]], template: function SchemaArrayComponent_Template(rf, ctx) {
1027
- if (rf & 1) {
1028
- i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_Template, 3, 4, "div", 0);
1029
- i0.ɵɵtemplate(1, SchemaArrayComponent_div_1_Template, 3, 4, "div", 0);
1030
- }
1031
- if (rf & 2) {
1032
- i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && ctx.schema.properties);
1033
- i0.ɵɵadvance(1);
1034
- i0.ɵɵproperty("ngIf", ctx.schema && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && !ctx.schema.properties);
1035
- }
1036
- }, directives: [i1.NgIf, ArraySessionComponent, SchemaFormComponent, SchemaCustomAttributesComponent, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel], pipes: [i7.TranslatePipe], styles: [""] });
1037
- var ɵSchemaArrayComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaArrayComponent);
1038
- /*@__PURE__*/ (function () {
1039
- i0.ɵsetClassMetadata(SchemaArrayComponent, [{
1040
- type: i0.Component,
1041
- args: [{
1042
- selector: 'schema-array',
1043
- templateUrl: 'schema-array.html',
1044
- styleUrls: ['./schema-array.scss']
1045
- }]
1046
- }], null, { idPrefix: [{
1047
- type: i0.Input
1048
- }], schema: [{
1049
- type: i0.Input
1050
- }], editing: [{
1051
- type: i0.Input
1052
- }], index: [{
1053
- type: i0.Input
1054
- }] });
801
+ function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template(rf, ctx) {
802
+ if (rf & 1) {
803
+ var _r8_1 = i0.ɵɵgetCurrentView();
804
+ i0.ɵɵelementStart(0, "schema-form", 4);
805
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template_schema_form_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r8_1); var item_r3 = i0.ɵɵnextContext().$implicit; var ctx_r7 = i0.ɵɵnextContext(2); return ctx_r7.model[ctx_r7.schema.id][item_r3.index].mappingAttributes = $event; });
806
+ i0.ɵɵelementEnd();
807
+ }
808
+ if (rf & 2) {
809
+ var item_r3 = i0.ɵɵnextContext().$implicit;
810
+ var ctx_r4 = i0.ɵɵnextContext(2);
811
+ i0.ɵɵproperty("idPrefix", ctx_r4.idPrefix)("model", ctx_r4.model[ctx_r4.schema.id][item_r3.index].mappingAttributes)("schemas", ctx_r4.getSchemaProperties())("editing", ctx_r4.editing);
812
+ }
813
+ }
814
+ function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template(rf, ctx) {
815
+ if (rf & 1) {
816
+ var _r12_1 = i0.ɵɵgetCurrentView();
817
+ i0.ɵɵelementStart(0, "schema-form", 4);
818
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template_schema_form_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var item_r3 = i0.ɵɵnextContext().$implicit; var ctx_r11 = i0.ɵɵnextContext(2); return (ctx_r11.model[ctx_r11.schema.id][item_r3.index] = $event); });
819
+ i0.ɵɵelementEnd();
820
+ }
821
+ if (rf & 2) {
822
+ var item_r3 = i0.ɵɵnextContext().$implicit;
823
+ var ctx_r5 = i0.ɵɵnextContext(2);
824
+ i0.ɵɵproperty("idPrefix", ctx_r5.idPrefix)("model", ctx_r5.model[ctx_r5.schema.id][item_r3.index])("schemas", ctx_r5.getSchemaProperties())("editing", ctx_r5.editing);
825
+ }
826
+ }
827
+ function SchemaArrayComponent_div_0_ng_template_2_div_2_Template(rf, ctx) {
828
+ if (rf & 1) {
829
+ var _r16_1 = i0.ɵɵgetCurrentView();
830
+ i0.ɵɵelementStart(0, "div", 5);
831
+ i0.ɵɵelementStart(1, "div", 6);
832
+ i0.ɵɵelementStart(2, "label", 7);
833
+ i0.ɵɵtext(3);
834
+ i0.ɵɵpipe(4, "translate");
835
+ i0.ɵɵelementEnd();
836
+ i0.ɵɵelementStart(5, "schema-custom-attributes", 8);
837
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_ng_template_2_div_2_Template_schema_custom_attributes_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r16_1); var item_r3 = i0.ɵɵnextContext().$implicit; var ctx_r15 = i0.ɵɵnextContext(2); return ctx_r15.model[ctx_r15.schema.id][item_r3.index].customAttributes = $event; });
838
+ i0.ɵɵelementEnd();
839
+ i0.ɵɵelementEnd();
840
+ i0.ɵɵelementEnd();
841
+ }
842
+ if (rf & 2) {
843
+ var item_r3 = i0.ɵɵnextContext().$implicit;
844
+ var ctx_r6 = i0.ɵɵnextContext(2);
845
+ i0.ɵɵadvance(3);
846
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "STEP.ADDITIONAL_ATTRIBUTES"));
847
+ i0.ɵɵadvance(2);
848
+ i0.ɵɵproperty("model", ctx_r6.model[ctx_r6.schema.id][item_r3.index].customAttributes)("onDropFunction", ctx_r6.onDrop);
849
+ }
850
+ }
851
+ function SchemaArrayComponent_div_0_ng_template_2_Template(rf, ctx) {
852
+ if (rf & 1) {
853
+ i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template, 1, 4, "schema-form", 2);
854
+ i0.ɵɵtemplate(1, SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template, 1, 4, "schema-form", 2);
855
+ i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_div_2_Template, 6, 5, "div", 3);
856
+ }
857
+ if (rf & 2) {
858
+ var item_r3 = ctx.$implicit;
859
+ var ctx_r2 = i0.ɵɵnextContext(2);
860
+ i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop !== undefined);
861
+ i0.ɵɵadvance(1);
862
+ i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop == undefined);
863
+ i0.ɵɵadvance(1);
864
+ i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index] && ctx_r2.schema.customProperties);
865
+ }
866
+ }
867
+ function SchemaArrayComponent_div_0_Template(rf, ctx) {
868
+ if (rf & 1) {
869
+ var _r20_1 = i0.ɵɵgetCurrentView();
870
+ i0.ɵɵelementStart(0, "div");
871
+ i0.ɵɵelementStart(1, "array-session", 1);
872
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_0_Template_array_session_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r20_1); var ctx_r19 = i0.ɵɵnextContext(); return (ctx_r19.model[ctx_r19.schema.id] = $event); })("onAdd", function SchemaArrayComponent_div_0_Template_array_session_onAdd_1_listener() { i0.ɵɵrestoreView(_r20_1); var ctx_r21 = i0.ɵɵnextContext(); return ctx_r21.addArrayItem(ctx_r21.schema.id, {}); })("onAddLoop", function SchemaArrayComponent_div_0_Template_array_session_onAddLoop_1_listener() { i0.ɵɵrestoreView(_r20_1); var ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.addArrayLoop(ctx_r22.schema.id, {}); });
873
+ i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_Template, 3, 3, "ng-template");
874
+ i0.ɵɵelementEnd();
875
+ i0.ɵɵelementEnd();
876
+ }
877
+ if (rf & 2) {
878
+ var ctx_r0 = i0.ɵɵnextContext();
879
+ i0.ɵɵadvance(1);
880
+ i0.ɵɵproperty("label", ctx_r0.schema.title)("removeLabel", ctx_r0.schema.title)("model", ctx_r0.model[ctx_r0.schema.id])("showAddLoop", ctx_r0.schema.withoutLoop !== true);
881
+ }
882
+ }
883
+ var _c0$2 = function () { return { standalone: true }; };
884
+ function SchemaArrayComponent_div_1_ng_template_2_input_3_Template(rf, ctx) {
885
+ if (rf & 1) {
886
+ var _r30_1 = i0.ɵɵgetCurrentView();
887
+ i0.ɵɵelementStart(0, "input", 12);
888
+ i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_input_3_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r30_1); var item_r24 = i0.ɵɵnextContext().$implicit; return item_r24.items[item_r24.index].mappingAttributes = $event; })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_input_3_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r30_1); var item_r24 = i0.ɵɵnextContext().$implicit; var ctx_r31 = i0.ɵɵnextContext(2); return item_r24.items[item_r24.index].mappingAttributes = ctx_r31.onDrop($event, item_r24.items[item_r24.index].mappingAttributes); });
889
+ i0.ɵɵelementEnd();
890
+ }
891
+ if (rf & 2) {
892
+ var item_r24 = i0.ɵɵnextContext().$implicit;
893
+ var ctx_r25 = i0.ɵɵnextContext(2);
894
+ i0.ɵɵproperty("ngModel", item_r24.items[item_r24.index].mappingAttributes)("ngModelOptions", i0.ɵɵpureFunction0(3, _c0$2))("id", ctx_r25.getId(ctx_r25.index) + "-" + item_r24.index);
895
+ }
896
+ }
897
+ function SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template(rf, ctx) {
898
+ if (rf & 1) {
899
+ var _r36_1 = i0.ɵɵgetCurrentView();
900
+ i0.ɵɵelementStart(0, "input", 12);
901
+ i0.ɵɵlistener("ngModelChange", function SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r36_1); var item_r24 = i0.ɵɵnextContext().$implicit; return (item_r24.items[item_r24.index] = $event); })("dndDrop", function SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r36_1); var item_r24 = i0.ɵɵnextContext().$implicit; var ctx_r37 = i0.ɵɵnextContext(2); return (item_r24.items[item_r24.index] = ctx_r37.onDrop($event, item_r24.items[item_r24.index])); });
902
+ i0.ɵɵelementEnd();
903
+ }
904
+ if (rf & 2) {
905
+ var item_r24 = i0.ɵɵnextContext().$implicit;
906
+ var ctx_r27 = i0.ɵɵnextContext(2);
907
+ i0.ɵɵproperty("ngModel", item_r24.items[item_r24.index])("ngModelOptions", i0.ɵɵpureFunction0(3, _c0$2))("id", ctx_r27.getId(ctx_r27.index) + "-" + item_r24.index);
908
+ }
909
+ }
910
+ function SchemaArrayComponent_div_1_ng_template_2_Template(rf, ctx) {
911
+ if (rf & 1) {
912
+ i0.ɵɵelementStart(0, "label", 9);
913
+ i0.ɵɵtext(1);
914
+ i0.ɵɵpipe(2, "translate");
915
+ i0.ɵɵelementEnd();
916
+ i0.ɵɵtemplate(3, SchemaArrayComponent_div_1_ng_template_2_input_3_Template, 1, 4, "input", 10);
917
+ i0.ɵɵtemplate(4, SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template, 1, 4, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
918
+ }
919
+ if (rf & 2) {
920
+ var item_r24 = ctx.$implicit;
921
+ var _r26 = i0.ɵɵreference(5);
922
+ var ctx_r23 = i0.ɵɵnextContext(2);
923
+ i0.ɵɵproperty("htmlFor", ctx_r23.getId(ctx_r23.index) + "-" + item_r24.index);
924
+ i0.ɵɵadvance(1);
925
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 4, ctx_r23.schema.title));
926
+ i0.ɵɵadvance(2);
927
+ i0.ɵɵproperty("ngIf", item_r24.items[item_r24.index].mappingAttributes || item_r24.items[item_r24.index].mappingAttributes === "")("ngIfElse", _r26);
928
+ }
929
+ }
930
+ function SchemaArrayComponent_div_1_Template(rf, ctx) {
931
+ if (rf & 1) {
932
+ var _r41_1 = i0.ɵɵgetCurrentView();
933
+ i0.ɵɵelementStart(0, "div");
934
+ i0.ɵɵelementStart(1, "array-session", 1);
935
+ i0.ɵɵlistener("modelChange", function SchemaArrayComponent_div_1_Template_array_session_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r41_1); var ctx_r40 = i0.ɵɵnextContext(); return (ctx_r40.model[ctx_r40.schema.id] = $event); })("onAdd", function SchemaArrayComponent_div_1_Template_array_session_onAdd_1_listener() { i0.ɵɵrestoreView(_r41_1); var ctx_r42 = i0.ɵɵnextContext(); return ctx_r42.addArrayItem(ctx_r42.schema.id, ""); })("onAddLoop", function SchemaArrayComponent_div_1_Template_array_session_onAddLoop_1_listener() { i0.ɵɵrestoreView(_r41_1); var ctx_r43 = i0.ɵɵnextContext(); return ctx_r43.addArrayLoop(ctx_r43.schema.id, ""); });
936
+ i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_Template, 6, 6, "ng-template");
937
+ i0.ɵɵelementEnd();
938
+ i0.ɵɵelementEnd();
939
+ }
940
+ if (rf & 2) {
941
+ var ctx_r1 = i0.ɵɵnextContext();
942
+ i0.ɵɵadvance(1);
943
+ i0.ɵɵproperty("label", ctx_r1.schema.title)("removeLabel", ctx_r1.schema.title)("model", ctx_r1.model[ctx_r1.schema.id])("showAddLoop", ctx_r1.schema.withoutLoop !== true);
944
+ }
945
+ }
946
+ var SchemaArrayComponent = /** @class */ (function (_super) {
947
+ __extends(SchemaArrayComponent, _super);
948
+ function SchemaArrayComponent() {
949
+ var _this = _super.apply(this, __spread(arguments)) || this;
950
+ _this.editing = false;
951
+ return _this;
952
+ }
953
+ SchemaArrayComponent.prototype.ngAfterContentInit = function () {
954
+ var _a;
955
+ if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'array' && this.model && !this.model[this.schema.id]) {
956
+ this.model[this.schema.id] = [];
957
+ }
958
+ this.loaded = true;
959
+ };
960
+ SchemaArrayComponent.prototype.onDrop = function ($event, modelElement) {
961
+ return onDropStruct($event, modelElement);
962
+ };
963
+ SchemaArrayComponent.prototype.getId = function (index) {
964
+ return this.idPrefix + "-struct-" + index;
965
+ };
966
+ SchemaArrayComponent.prototype.addArrayItem = function (id, param) {
967
+ var _this = this;
968
+ this.model[id] = this.model[id] || [];
969
+ if (this.schema.properties) {
970
+ param = {};
971
+ Object.keys(this.schema.properties).forEach(function (key) {
972
+ var schemaProperty = _this.schema.properties[key];
973
+ if (schemaProperty.type === 'object') {
974
+ param[schemaProperty.id] = {};
975
+ }
976
+ else if (schemaProperty.type === 'array') {
977
+ param[schemaProperty.id] = [];
978
+ }
979
+ });
980
+ }
981
+ this.model[id].push(param);
982
+ };
983
+ SchemaArrayComponent.prototype.addArrayLoop = function (id, mappingAttributes) {
984
+ this.model[id] = this.model[id] || [];
985
+ this.model[id].push({ loop: '', alias: '', mappingAttributes: mappingAttributes });
986
+ };
987
+ return SchemaArrayComponent;
988
+ }(BaseSchemaComponent));
989
+ SchemaArrayComponent.ɵfac = function SchemaArrayComponent_Factory(t) { return ɵSchemaArrayComponent_BaseFactory(t || SchemaArrayComponent); };
990
+ SchemaArrayComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaArrayComponent, selectors: [["schema-array"]], inputs: { idPrefix: "idPrefix", schema: "schema", editing: "editing", index: "index" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "label", "removeLabel", "model", "showAddLoop", "modelChange", "onAdd", "onAddLoop"], [3, "idPrefix", "model", "schemas", "editing", "modelChange", 4, "ngIf"], ["class", "row struct-custom-properties", 4, "ngIf"], [3, "idPrefix", "model", "schemas", "editing", "modelChange"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"], [1, "info-label", 3, "htmlFor"], ["class", "form-control", "type", "text", "dndDropzone", "", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop", 4, "ngIf", "ngIfElse"], ["elseBlock", ""], ["type", "text", "dndDropzone", "", 1, "form-control", 3, "ngModel", "ngModelOptions", "id", "ngModelChange", "dndDrop"]], template: function SchemaArrayComponent_Template(rf, ctx) {
991
+ if (rf & 1) {
992
+ i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_Template, 3, 4, "div", 0);
993
+ i0.ɵɵtemplate(1, SchemaArrayComponent_div_1_Template, 3, 4, "div", 0);
994
+ }
995
+ if (rf & 2) {
996
+ i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && ctx.schema.properties);
997
+ i0.ɵɵadvance(1);
998
+ i0.ɵɵproperty("ngIf", ctx.schema && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && !ctx.schema.properties);
999
+ }
1000
+ }, directives: [i1.NgIf, ArraySessionComponent, SchemaFormComponent, SchemaCustomAttributesComponent, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel], pipes: [i7.TranslatePipe], styles: [""] });
1001
+ var ɵSchemaArrayComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaArrayComponent);
1002
+ /*@__PURE__*/ (function () {
1003
+ i0.ɵsetClassMetadata(SchemaArrayComponent, [{
1004
+ type: i0.Component,
1005
+ args: [{
1006
+ selector: 'schema-array',
1007
+ templateUrl: 'schema-array.html',
1008
+ styleUrls: ['./schema-array.scss']
1009
+ }]
1010
+ }], null, { idPrefix: [{
1011
+ type: i0.Input
1012
+ }], schema: [{
1013
+ type: i0.Input
1014
+ }], editing: [{
1015
+ type: i0.Input
1016
+ }], index: [{
1017
+ type: i0.Input
1018
+ }] });
1055
1019
  })();
1056
1020
 
1057
- var _c0$3 = function (a0) { return { "has-error": a0 }; };
1058
- function FieldRenderComponent_small_4_Template(rf, ctx) {
1059
- if (rf & 1) {
1060
- i0.ɵɵelementStart(0, "small", 0);
1061
- i0.ɵɵtext(1, "(obrigat\u00F3rio)");
1062
- i0.ɵɵelementEnd();
1063
- }
1064
- if (rf & 2) {
1065
- var ctx_r0 = i0.ɵɵnextContext();
1066
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(1, _c0$3, ctx_r0.state && !ctx_r0.state.valid && ctx_r0.state.errors));
1067
- }
1068
- }
1069
- function FieldRenderComponent_span_5_Template(rf, ctx) {
1070
- if (rf & 1) {
1071
- i0.ɵɵelementStart(0, "span", 4);
1072
- i0.ɵɵpipe(1, "translate");
1073
- i0.ɵɵelement(2, "i", 5);
1074
- i0.ɵɵelementEnd();
1075
- }
1076
- if (rf & 2) {
1077
- var ctx_r1 = i0.ɵɵnextContext();
1078
- i0.ɵɵpropertyInterpolate("matTooltip", i0.ɵɵpipeBind1(1, 1, ctx_r1.tooltip));
1079
- }
1080
- }
1081
- var _c1$1 = ["*"];
1082
- var FieldRenderComponent = /** @class */ (function () {
1083
- function FieldRenderComponent() {
1084
- this.label = '';
1085
- this.required = true;
1086
- }
1087
- return FieldRenderComponent;
1088
- }());
1089
- FieldRenderComponent.ɵfac = function FieldRenderComponent_Factory(t) { return new (t || FieldRenderComponent)(); };
1090
- FieldRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldRenderComponent, selectors: [["field-render"]], inputs: { label: "label", inputId: "inputId", tooltip: "tooltip", required: "required", state: "state" }, ngContentSelectors: _c1$1, decls: 7, vars: 9, 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) {
1091
- if (rf & 1) {
1092
- i0.ɵɵprojectionDef();
1093
- i0.ɵɵelementStart(0, "div", 0);
1094
- i0.ɵɵelementStart(1, "label", 1);
1095
- i0.ɵɵtext(2);
1096
- i0.ɵɵpipe(3, "translate");
1097
- i0.ɵɵtemplate(4, FieldRenderComponent_small_4_Template, 2, 3, "small", 2);
1098
- i0.ɵɵtemplate(5, FieldRenderComponent_span_5_Template, 3, 3, "span", 3);
1099
- i0.ɵɵelementEnd();
1100
- i0.ɵɵprojection(6);
1101
- i0.ɵɵelementEnd();
1102
- }
1103
- if (rf & 2) {
1104
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$3, ctx.state && !ctx.state.valid && (!ctx.state.pristine || ctx.state.touched) && ctx.state.errors));
1105
- i0.ɵɵadvance(1);
1106
- i0.ɵɵproperty("htmlFor", ctx.inputId);
1107
- i0.ɵɵadvance(1);
1108
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 5, ctx.label), " ");
1109
- i0.ɵɵadvance(2);
1110
- i0.ɵɵproperty("ngIf", ctx.required);
1111
- i0.ɵɵadvance(1);
1112
- i0.ɵɵproperty("ngIf", ctx.tooltip);
1113
- }
1114
- }, directives: [i1.NgClass, i1.NgIf, i4.MatTooltip], pipes: [i7.TranslatePipe], styles: [".info-icon[_ngcontent-%COMP%]{color:#222d57;float:right;font-size:13px;margin-left:4px}"] });
1115
- /*@__PURE__*/ (function () {
1116
- i0.ɵsetClassMetadata(FieldRenderComponent, [{
1117
- type: i0.Component,
1118
- args: [{
1119
- selector: 'field-render',
1120
- templateUrl: 'field-render.html',
1121
- styleUrls: ['field-render.scss']
1122
- }]
1123
- }], null, { label: [{
1124
- type: i0.Input
1125
- }], inputId: [{
1126
- type: i0.Input
1127
- }], tooltip: [{
1128
- type: i0.Input
1129
- }], required: [{
1130
- type: i0.Input
1131
- }], state: [{
1132
- type: i0.Input
1133
- }] });
1021
+ var _c0$3 = function (a0) { return { "has-error": a0 }; };
1022
+ function FieldRenderComponent_small_4_Template(rf, ctx) {
1023
+ if (rf & 1) {
1024
+ i0.ɵɵelementStart(0, "small", 0);
1025
+ i0.ɵɵtext(1, "(obrigat\u00F3rio)");
1026
+ i0.ɵɵelementEnd();
1027
+ }
1028
+ if (rf & 2) {
1029
+ var ctx_r0 = i0.ɵɵnextContext();
1030
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(1, _c0$3, ctx_r0.state && !ctx_r0.state.valid && ctx_r0.state.errors));
1031
+ }
1032
+ }
1033
+ function FieldRenderComponent_span_5_Template(rf, ctx) {
1034
+ if (rf & 1) {
1035
+ i0.ɵɵelementStart(0, "span", 4);
1036
+ i0.ɵɵpipe(1, "translate");
1037
+ i0.ɵɵelement(2, "i", 5);
1038
+ i0.ɵɵelementEnd();
1039
+ }
1040
+ if (rf & 2) {
1041
+ var ctx_r1 = i0.ɵɵnextContext();
1042
+ i0.ɵɵpropertyInterpolate("matTooltip", i0.ɵɵpipeBind1(1, 1, ctx_r1.tooltip));
1043
+ }
1044
+ }
1045
+ var _c1$1 = ["*"];
1046
+ var FieldRenderComponent = /** @class */ (function () {
1047
+ function FieldRenderComponent() {
1048
+ this.label = '';
1049
+ this.required = true;
1050
+ }
1051
+ return FieldRenderComponent;
1052
+ }());
1053
+ FieldRenderComponent.ɵfac = function FieldRenderComponent_Factory(t) { return new (t || FieldRenderComponent)(); };
1054
+ FieldRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldRenderComponent, selectors: [["field-render"]], inputs: { label: "label", inputId: "inputId", tooltip: "tooltip", required: "required", state: "state" }, ngContentSelectors: _c1$1, decls: 7, vars: 9, 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) {
1055
+ if (rf & 1) {
1056
+ i0.ɵɵprojectionDef();
1057
+ i0.ɵɵelementStart(0, "div", 0);
1058
+ i0.ɵɵelementStart(1, "label", 1);
1059
+ i0.ɵɵtext(2);
1060
+ i0.ɵɵpipe(3, "translate");
1061
+ i0.ɵɵtemplate(4, FieldRenderComponent_small_4_Template, 2, 3, "small", 2);
1062
+ i0.ɵɵtemplate(5, FieldRenderComponent_span_5_Template, 3, 3, "span", 3);
1063
+ i0.ɵɵelementEnd();
1064
+ i0.ɵɵprojection(6);
1065
+ i0.ɵɵelementEnd();
1066
+ }
1067
+ if (rf & 2) {
1068
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$3, ctx.state && !ctx.state.valid && (!ctx.state.pristine || ctx.state.touched) && ctx.state.errors));
1069
+ i0.ɵɵadvance(1);
1070
+ i0.ɵɵproperty("htmlFor", ctx.inputId);
1071
+ i0.ɵɵadvance(1);
1072
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 5, ctx.label), " ");
1073
+ i0.ɵɵadvance(2);
1074
+ i0.ɵɵproperty("ngIf", ctx.required);
1075
+ i0.ɵɵadvance(1);
1076
+ i0.ɵɵproperty("ngIf", ctx.tooltip);
1077
+ }
1078
+ }, directives: [i1.NgClass, i1.NgIf, i4.MatTooltip], pipes: [i7.TranslatePipe], styles: [".info-icon[_ngcontent-%COMP%]{color:#222d57;float:right;font-size:13px;margin-left:4px}"] });
1079
+ /*@__PURE__*/ (function () {
1080
+ i0.ɵsetClassMetadata(FieldRenderComponent, [{
1081
+ type: i0.Component,
1082
+ args: [{
1083
+ selector: 'field-render',
1084
+ templateUrl: 'field-render.html',
1085
+ styleUrls: ['field-render.scss']
1086
+ }]
1087
+ }], null, { label: [{
1088
+ type: i0.Input
1089
+ }], inputId: [{
1090
+ type: i0.Input
1091
+ }], tooltip: [{
1092
+ type: i0.Input
1093
+ }], required: [{
1094
+ type: i0.Input
1095
+ }], state: [{
1096
+ type: i0.Input
1097
+ }] });
1134
1098
  })();
1135
1099
 
1136
- var _c0$4 = function () { return { standalone: true }; };
1137
- var NumberInputComponent = /** @class */ (function (_super) {
1138
- __extends(NumberInputComponent, _super);
1139
- function NumberInputComponent() {
1140
- return _super !== null && _super.apply(this, arguments) || this;
1141
- }
1142
- NumberInputComponent.prototype.ngAfterContentInit = function () {
1143
- this.value = this.model;
1144
- };
1145
- NumberInputComponent.prototype.changeValue = function ($event) {
1146
- if ($event && !isNaN($event)) {
1147
- this.model = Number($event);
1148
- this.modelChange.emit(this.model);
1149
- }
1150
- else {
1151
- this.model = $event;
1152
- this.modelChange.emit(this.model);
1153
- }
1154
- };
1155
- return NumberInputComponent;
1156
- }(BaseSchemaComponent));
1157
- NumberInputComponent.ɵfac = function NumberInputComponent_Factory(t) { return ɵNumberInputComponent_BaseFactory(t || NumberInputComponent); };
1158
- NumberInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NumberInputComponent, selectors: [["number-input"]], inputs: { placeholder: "placeholder", inputId: "inputId", maxLength: "maxLength" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 6, consts: [[1, "form-control", "number-input", 3, "id", "placeholder", "ngModel", "ngModelOptions", "maxlength", "ngModelChange"]], template: function NumberInputComponent_Template(rf, ctx) {
1159
- if (rf & 1) {
1160
- i0.ɵɵelementStart(0, "input", 0);
1161
- 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); });
1162
- i0.ɵɵelementEnd();
1163
- }
1164
- if (rf & 2) {
1165
- i0.ɵɵproperty("id", ctx.inputId)("placeholder", ctx.placeholder)("ngModel", ctx.value)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0$4))("maxlength", ctx.maxLength);
1166
- }
1167
- }, directives: [i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator], encapsulation: 2 });
1168
- var ɵNumberInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(NumberInputComponent);
1169
- /*@__PURE__*/ (function () {
1170
- i0.ɵsetClassMetadata(NumberInputComponent, [{
1171
- type: i0.Component,
1172
- args: [{
1173
- selector: 'number-input',
1174
- templateUrl: 'number-input.component.html'
1175
- }]
1176
- }], null, { placeholder: [{
1177
- type: i0.Input
1178
- }], inputId: [{
1179
- type: i0.Input
1180
- }], maxLength: [{
1181
- type: i0.Input
1182
- }] });
1100
+ var _c0$4 = function () { return { standalone: true }; };
1101
+ var NumberInputComponent = /** @class */ (function (_super) {
1102
+ __extends(NumberInputComponent, _super);
1103
+ function NumberInputComponent() {
1104
+ return _super !== null && _super.apply(this, arguments) || this;
1105
+ }
1106
+ NumberInputComponent.prototype.ngAfterContentInit = function () {
1107
+ this.value = this.model;
1108
+ };
1109
+ NumberInputComponent.prototype.onDropCallBack = function ($event, value) {
1110
+ this.value = value = _super.prototype.onDrop.call(this, $event, value);
1111
+ this.changeValue(value);
1112
+ };
1113
+ NumberInputComponent.prototype.changeValue = function ($event) {
1114
+ if ($event && !isNaN($event)) {
1115
+ this.model = Number($event);
1116
+ this.modelChange.emit(this.model);
1117
+ }
1118
+ else {
1119
+ this.model = $event;
1120
+ this.modelChange.emit(this.model);
1121
+ }
1122
+ };
1123
+ return NumberInputComponent;
1124
+ }(BaseSchemaComponent));
1125
+ NumberInputComponent.ɵfac = function NumberInputComponent_Factory(t) { return ɵNumberInputComponent_BaseFactory(t || NumberInputComponent); };
1126
+ NumberInputComponent.ɵcmp = 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) {
1127
+ if (rf & 1) {
1128
+ i0.ɵɵelementStart(0, "input", 0);
1129
+ 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); });
1130
+ i0.ɵɵelementEnd();
1131
+ }
1132
+ if (rf & 2) {
1133
+ i0.ɵɵproperty("id", ctx.inputId)("placeholder", ctx.placeholder)("ngModel", ctx.value)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0$4))("maxlength", ctx.maxLength);
1134
+ }
1135
+ }, directives: [i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator], encapsulation: 2 });
1136
+ var ɵNumberInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(NumberInputComponent);
1137
+ /*@__PURE__*/ (function () {
1138
+ i0.ɵsetClassMetadata(NumberInputComponent, [{
1139
+ type: i0.Component,
1140
+ args: [{
1141
+ selector: 'number-input',
1142
+ templateUrl: 'number-input.component.html'
1143
+ }]
1144
+ }], null, { placeholder: [{
1145
+ type: i0.Input
1146
+ }], inputId: [{
1147
+ type: i0.Input
1148
+ }], maxLength: [{
1149
+ type: i0.Input
1150
+ }] });
1183
1151
  })();
1184
1152
 
1185
- var _c0$5 = function () { return { standalone: true }; };
1186
- var BooleanInputComponent = /** @class */ (function (_super) {
1187
- __extends(BooleanInputComponent, _super);
1188
- function BooleanInputComponent() {
1189
- return _super !== null && _super.apply(this, arguments) || this;
1190
- }
1191
- BooleanInputComponent.prototype.ngAfterContentInit = function () {
1192
- this.value = this.model;
1193
- };
1194
- BooleanInputComponent.prototype.changeValue = function ($event) {
1195
- if ($event && ($event === 'true' || $event === 'false')) {
1196
- this.model = $event === 'true';
1197
- this.value = this.model;
1198
- this.modelChange.emit(this.model);
1199
- }
1200
- else {
1201
- this.model = $event;
1202
- this.value = this.model;
1203
- this.modelChange.emit(this.model);
1204
- }
1205
- };
1206
- return BooleanInputComponent;
1207
- }(BaseSchemaComponent));
1208
- BooleanInputComponent.ɵfac = function BooleanInputComponent_Factory(t) { return ɵBooleanInputComponent_BaseFactory(t || BooleanInputComponent); };
1209
- BooleanInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BooleanInputComponent, selectors: [["boolean-input"]], inputs: { placeholder: "placeholder", inputId: "inputId", maxLength: "maxLength" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 6, consts: [[1, "form-control", 3, "id", "placeholder", "ngModel", "ngModelOptions", "maxlength", "ngModelChange"]], template: function BooleanInputComponent_Template(rf, ctx) {
1210
- if (rf & 1) {
1211
- i0.ɵɵelementStart(0, "input", 0);
1212
- 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); });
1213
- i0.ɵɵelementEnd();
1214
- }
1215
- if (rf & 2) {
1216
- i0.ɵɵproperty("id", ctx.inputId)("placeholder", ctx.placeholder)("ngModel", ctx.value)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0$5))("maxlength", ctx.maxLength);
1217
- }
1218
- }, directives: [i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator], encapsulation: 2 });
1219
- var ɵBooleanInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(BooleanInputComponent);
1220
- /*@__PURE__*/ (function () {
1221
- i0.ɵsetClassMetadata(BooleanInputComponent, [{
1222
- type: i0.Component,
1223
- args: [{
1224
- selector: 'boolean-input',
1225
- templateUrl: 'boolean-input.component.html',
1226
- }]
1227
- }], null, { placeholder: [{
1228
- type: i0.Input
1229
- }], inputId: [{
1230
- type: i0.Input
1231
- }], maxLength: [{
1232
- type: i0.Input
1233
- }] });
1153
+ var _c0$5 = function () { return { standalone: true }; };
1154
+ var BooleanInputComponent = /** @class */ (function (_super) {
1155
+ __extends(BooleanInputComponent, _super);
1156
+ function BooleanInputComponent() {
1157
+ return _super !== null && _super.apply(this, arguments) || this;
1158
+ }
1159
+ BooleanInputComponent.prototype.ngAfterContentInit = function () {
1160
+ this.value = this.model;
1161
+ };
1162
+ BooleanInputComponent.prototype.onDropCallBack = function ($event, value) {
1163
+ this.value = value = _super.prototype.onDrop.call(this, $event, value);
1164
+ this.changeValue(value);
1165
+ };
1166
+ BooleanInputComponent.prototype.changeValue = function ($event) {
1167
+ if ($event && ($event === 'true' || $event === 'false')) {
1168
+ this.model = $event === 'true';
1169
+ this.value = this.model;
1170
+ this.modelChange.emit(this.model);
1171
+ }
1172
+ else {
1173
+ this.model = $event;
1174
+ this.value = this.model;
1175
+ this.modelChange.emit(this.model);
1176
+ }
1177
+ };
1178
+ return BooleanInputComponent;
1179
+ }(BaseSchemaComponent));
1180
+ BooleanInputComponent.ɵfac = function BooleanInputComponent_Factory(t) { return ɵBooleanInputComponent_BaseFactory(t || BooleanInputComponent); };
1181
+ BooleanInputComponent.ɵcmp = 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) {
1182
+ if (rf & 1) {
1183
+ i0.ɵɵelementStart(0, "input", 0);
1184
+ 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); });
1185
+ i0.ɵɵelementEnd();
1186
+ }
1187
+ if (rf & 2) {
1188
+ i0.ɵɵproperty("id", ctx.inputId)("placeholder", ctx.placeholder)("ngModel", ctx.value)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0$5))("maxlength", ctx.maxLength);
1189
+ }
1190
+ }, directives: [i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator], encapsulation: 2 });
1191
+ var ɵBooleanInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(BooleanInputComponent);
1192
+ /*@__PURE__*/ (function () {
1193
+ i0.ɵsetClassMetadata(BooleanInputComponent, [{
1194
+ type: i0.Component,
1195
+ args: [{
1196
+ selector: 'boolean-input',
1197
+ templateUrl: 'boolean-input.component.html',
1198
+ }]
1199
+ }], null, { placeholder: [{
1200
+ type: i0.Input
1201
+ }], inputId: [{
1202
+ type: i0.Input
1203
+ }], maxLength: [{
1204
+ type: i0.Input
1205
+ }] });
1234
1206
  })();
1235
1207
 
1236
- var _c0$6 = function () { return { standalone: true }; };
1237
- function InputRenderComponent_input_1_Template(rf, ctx) {
1238
- if (rf & 1) {
1239
- var _r5_1 = i0.ɵɵgetCurrentView();
1240
- i0.ɵɵelementStart(0, "input", 4);
1241
- i0.ɵɵlistener("ngModelChange", function InputRenderComponent_input_1_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.value = $event; })("ngModelChange", function InputRenderComponent_input_1_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.onChange($event); });
1242
- i0.ɵɵelementEnd();
1243
- }
1244
- if (rf & 2) {
1245
- var ctx_r0 = i0.ɵɵnextContext();
1246
- i0.ɵɵpropertyInterpolate("placeholder", ctx_r0.schema.description);
1247
- i0.ɵɵproperty("type", ctx_r0.schema.type === "password" ? "password" : "text")("ngModel", ctx_r0.value)("ngModelOptions", i0.ɵɵpureFunction0(6, _c0$6))("id", ctx_r0.inputId)("maxlength", ctx_r0.schema.maxLength);
1248
- }
1249
- }
1250
- function InputRenderComponent_select_box_2_Template(rf, ctx) {
1251
- if (rf & 1) {
1252
- var _r8_1 = i0.ɵɵgetCurrentView();
1253
- i0.ɵɵelementStart(0, "select-box", 5);
1254
- i0.ɵɵlistener("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.value = $event; })("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.onChange($event.key); });
1255
- i0.ɵɵpipe(1, "translate");
1256
- i0.ɵɵpipe(2, "translate");
1257
- i0.ɵɵpipe(3, "translate");
1258
- i0.ɵɵpipe(4, "translate");
1259
- i0.ɵɵelementEnd();
1260
- }
1261
- if (rf & 2) {
1262
- var ctx_r1 = i0.ɵɵnextContext();
1263
- i0.ɵɵproperty("id", ctx_r1.inputId)("ngModel", ctx_r1.value)("ngModelOptions", i0.ɵɵpureFunction0(20, _c0$6))("placeholder", i0.ɵɵpipeBind1(1, 12, ctx_r1.schema.description || "COMPONENTS.SCHEMA.SELECT.PLACEHOLDER"))("searchPlaceHolder", i0.ɵɵpipeBind1(2, 14, "COMPONENTS.SCHEMA.SELECT.SEARCH"))("clearText", i0.ɵɵpipeBind1(3, 16, "COMPONENTS.SCHEMA.SELECT.CLEAR"))("notFoundText", i0.ɵɵpipeBind1(4, 18, "COMPONENTS.SCHEMA.SELECT.NOT_FOUND"))("bindKey", "key")("bindValue", "value")("enabledSearch", true)("limitItens", 30)("data", ctx_r1.schema.options);
1264
- }
1265
- }
1266
- function InputRenderComponent_number_input_3_Template(rf, ctx) {
1267
- if (rf & 1) {
1268
- var _r11_1 = i0.ɵɵgetCurrentView();
1269
- i0.ɵɵelementStart(0, "number-input", 6);
1270
- i0.ɵɵlistener("modelChange", function InputRenderComponent_number_input_3_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r11_1); var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.value = $event; })("modelChange", function InputRenderComponent_number_input_3_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r11_1); var ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.onChange($event); });
1271
- i0.ɵɵelementEnd();
1272
- }
1273
- if (rf & 2) {
1274
- var ctx_r2 = i0.ɵɵnextContext();
1275
- i0.ɵɵproperty("model", ctx_r2.value)("inputId", ctx_r2.inputId)("placeholder", ctx_r2.schema.description)("maxLength", ctx_r2.schema.maxLength);
1276
- }
1277
- }
1278
- function InputRenderComponent_boolean_input_4_Template(rf, ctx) {
1279
- if (rf & 1) {
1280
- var _r14_1 = i0.ɵɵgetCurrentView();
1281
- i0.ɵɵelementStart(0, "boolean-input", 6);
1282
- i0.ɵɵlistener("modelChange", function InputRenderComponent_boolean_input_4_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r14_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.value = $event; })("modelChange", function InputRenderComponent_boolean_input_4_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r14_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.onChange($event); });
1283
- i0.ɵɵelementEnd();
1284
- }
1285
- if (rf & 2) {
1286
- var ctx_r3 = i0.ɵɵnextContext();
1287
- i0.ɵɵproperty("model", ctx_r3.value)("inputId", ctx_r3.inputId)("placeholder", ctx_r3.schema.description)("maxLength", ctx_r3.schema.maxLength);
1288
- }
1289
- }
1290
- var InputRenderComponent = /** @class */ (function (_super) {
1291
- __extends(InputRenderComponent, _super);
1292
- function InputRenderComponent() {
1293
- var _this = _super.apply(this, __spread(arguments)) || this;
1294
- _this.schema = {};
1295
- _this.editing = false;
1296
- _this.onDropEvent = new i0.EventEmitter();
1297
- return _this;
1298
- }
1299
- InputRenderComponent.prototype.ngAfterContentInit = function () {
1300
- var _this = this;
1301
- var _a, _b;
1302
- if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) !== 'object' && ((_b = this.schema) === null || _b === void 0 ? void 0 : _b.type) !== 'array') {
1303
- if (!this.editing && this.schema.options) {
1304
- var $event = this.schema.options.filter(function (item) { return item.selected === true; });
1305
- if ($event[0]) {
1306
- this.onChange($event[0].key);
1307
- this.value = $event[0];
1308
- }
1309
- }
1310
- else if (this.editing && this.schema.options && this.model) {
1311
- var $event = this.schema.options.filter(function (item) { return item.key === _this.model; });
1312
- if ($event[0]) {
1313
- this.onChange($event[0].key);
1314
- this.value = $event[0];
1315
- }
1316
- }
1317
- else {
1318
- this.value = this.model;
1319
- }
1320
- }
1321
- };
1322
- InputRenderComponent.prototype.onChange = function ($event) {
1323
- this.model = $event;
1324
- this.modelChange.emit(this.model);
1325
- };
1326
- return InputRenderComponent;
1327
- }(BaseSchemaComponent));
1328
- InputRenderComponent.ɵfac = function InputRenderComponent_Factory(t) { return ɵInputRenderComponent_BaseFactory(t || InputRenderComponent); };
1329
- InputRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: InputRenderComponent, selectors: [["input-render"]], inputs: { schema: "schema", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing" }, outputs: { onDropEvent: "onDropEvent" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 4, consts: [[1, "schema-input-container"], ["class", "form-control", "dndDropzone", "", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", 4, "ngIf"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange", 4, "ngIf"], ["dndDropzone", "", 3, "model", "inputId", "placeholder", "maxLength", "modelChange", 4, "ngIf"], ["dndDropzone", "", 1, "form-control", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange"], ["dndDropzone", "", 3, "model", "inputId", "placeholder", "maxLength", "modelChange"]], template: function InputRenderComponent_Template(rf, ctx) {
1330
- if (rf & 1) {
1331
- i0.ɵɵelementStart(0, "div", 0);
1332
- i0.ɵɵtemplate(1, InputRenderComponent_input_1_Template, 1, 7, "input", 1);
1333
- i0.ɵɵtemplate(2, InputRenderComponent_select_box_2_Template, 5, 21, "select-box", 2);
1334
- i0.ɵɵtemplate(3, InputRenderComponent_number_input_3_Template, 1, 4, "number-input", 3);
1335
- i0.ɵɵtemplate(4, InputRenderComponent_boolean_input_4_Template, 1, 4, "boolean-input", 3);
1336
- i0.ɵɵelementEnd();
1337
- }
1338
- if (rf & 2) {
1339
- i0.ɵɵadvance(1);
1340
- i0.ɵɵproperty("ngIf", (ctx.schema.type === "string" || ctx.schema.type === "password") && !ctx.schema.options);
1341
- i0.ɵɵadvance(1);
1342
- i0.ɵɵproperty("ngIf", ctx.schema.type === "string" && ctx.schema.options);
1343
- i0.ɵɵadvance(1);
1344
- i0.ɵɵproperty("ngIf", ctx.schema.type === "number");
1345
- i0.ɵɵadvance(1);
1346
- i0.ɵɵproperty("ngIf", ctx.schema.type === "boolean");
1347
- }
1348
- }, directives: [i1.NgIf, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator, i8.SelectBoxComponent, NumberInputComponent, BooleanInputComponent], pipes: [i7.TranslatePipe], styles: [""] });
1349
- var ɵInputRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(InputRenderComponent);
1350
- /*@__PURE__*/ (function () {
1351
- i0.ɵsetClassMetadata(InputRenderComponent, [{
1352
- type: i0.Component,
1353
- args: [{
1354
- selector: 'input-render',
1355
- templateUrl: 'input-render.html',
1356
- styleUrls: ['./input-render.scss']
1357
- }]
1358
- }], null, { schema: [{
1359
- type: i0.Input
1360
- }], modelPropertiesPath: [{
1361
- type: i0.Input
1362
- }], inputId: [{
1363
- type: i0.Input
1364
- }], editing: [{
1365
- type: i0.Input
1366
- }], onDropEvent: [{
1367
- type: i0.Output
1368
- }] });
1208
+ var _c0$6 = function () { return { standalone: true }; };
1209
+ function InputRenderComponent_input_1_Template(rf, ctx) {
1210
+ if (rf & 1) {
1211
+ var _r5_1 = i0.ɵɵgetCurrentView();
1212
+ i0.ɵɵelementStart(0, "input", 4);
1213
+ i0.ɵɵlistener("ngModelChange", function InputRenderComponent_input_1_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.value = $event; })("ngModelChange", function InputRenderComponent_input_1_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.onChange($event); })("dndDrop", function InputRenderComponent_input_1_Template_input_dndDrop_0_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onDropCallBack($event, ctx_r7.value); });
1214
+ i0.ɵɵelementEnd();
1215
+ }
1216
+ if (rf & 2) {
1217
+ var ctx_r0 = i0.ɵɵnextContext();
1218
+ i0.ɵɵpropertyInterpolate("placeholder", ctx_r0.schema.description);
1219
+ i0.ɵɵproperty("type", ctx_r0.schema.type === "password" ? "password" : "text")("ngModel", ctx_r0.value)("ngModelOptions", i0.ɵɵpureFunction0(6, _c0$6))("id", ctx_r0.inputId)("maxlength", ctx_r0.schema.maxLength);
1220
+ }
1221
+ }
1222
+ function InputRenderComponent_select_box_2_Template(rf, ctx) {
1223
+ if (rf & 1) {
1224
+ var _r9_1 = i0.ɵɵgetCurrentView();
1225
+ i0.ɵɵelementStart(0, "select-box", 5);
1226
+ i0.ɵɵlistener("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9_1); var ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.value = $event; })("ngModelChange", function InputRenderComponent_select_box_2_Template_select_box_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9_1); var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onChange($event.key); });
1227
+ i0.ɵɵpipe(1, "translate");
1228
+ i0.ɵɵpipe(2, "translate");
1229
+ i0.ɵɵpipe(3, "translate");
1230
+ i0.ɵɵpipe(4, "translate");
1231
+ i0.ɵɵelementEnd();
1232
+ }
1233
+ if (rf & 2) {
1234
+ var ctx_r1 = i0.ɵɵnextContext();
1235
+ i0.ɵɵproperty("id", ctx_r1.inputId)("ngModel", ctx_r1.value)("ngModelOptions", i0.ɵɵpureFunction0(20, _c0$6))("placeholder", i0.ɵɵpipeBind1(1, 12, ctx_r1.schema.description || "COMPONENTS.SCHEMA.SELECT.PLACEHOLDER"))("searchPlaceHolder", i0.ɵɵpipeBind1(2, 14, "COMPONENTS.SCHEMA.SELECT.SEARCH"))("clearText", i0.ɵɵpipeBind1(3, 16, "COMPONENTS.SCHEMA.SELECT.CLEAR"))("notFoundText", i0.ɵɵpipeBind1(4, 18, "COMPONENTS.SCHEMA.SELECT.NOT_FOUND"))("bindKey", "key")("bindValue", "value")("enabledSearch", true)("limitItens", 30)("data", ctx_r1.schema.options);
1236
+ }
1237
+ }
1238
+ function InputRenderComponent_number_input_3_Template(rf, ctx) {
1239
+ if (rf & 1) {
1240
+ var _r12_1 = i0.ɵɵgetCurrentView();
1241
+ i0.ɵɵelementStart(0, "number-input", 6);
1242
+ i0.ɵɵlistener("modelChange", function InputRenderComponent_number_input_3_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.value = $event; })("modelChange", function InputRenderComponent_number_input_3_Template_number_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.onChange($event); });
1243
+ i0.ɵɵelementEnd();
1244
+ }
1245
+ if (rf & 2) {
1246
+ var ctx_r2 = i0.ɵɵnextContext();
1247
+ i0.ɵɵproperty("model", ctx_r2.value)("inputId", ctx_r2.inputId)("placeholder", ctx_r2.schema.description)("maxLength", ctx_r2.schema.maxLength);
1248
+ }
1249
+ }
1250
+ function InputRenderComponent_boolean_input_4_Template(rf, ctx) {
1251
+ if (rf & 1) {
1252
+ var _r15_1 = i0.ɵɵgetCurrentView();
1253
+ i0.ɵɵelementStart(0, "boolean-input", 6);
1254
+ i0.ɵɵlistener("modelChange", function InputRenderComponent_boolean_input_4_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r15_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.value = $event; })("modelChange", function InputRenderComponent_boolean_input_4_Template_boolean_input_modelChange_0_listener($event) { i0.ɵɵrestoreView(_r15_1); var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onChange($event); });
1255
+ i0.ɵɵelementEnd();
1256
+ }
1257
+ if (rf & 2) {
1258
+ var ctx_r3 = i0.ɵɵnextContext();
1259
+ i0.ɵɵproperty("model", ctx_r3.value)("inputId", ctx_r3.inputId)("placeholder", ctx_r3.schema.description)("maxLength", ctx_r3.schema.maxLength);
1260
+ }
1261
+ }
1262
+ var InputRenderComponent = /** @class */ (function (_super) {
1263
+ __extends(InputRenderComponent, _super);
1264
+ function InputRenderComponent() {
1265
+ var _this = _super.apply(this, __spread(arguments)) || this;
1266
+ _this.schema = {};
1267
+ _this.editing = false;
1268
+ _this.onDropEvent = new i0.EventEmitter();
1269
+ return _this;
1270
+ }
1271
+ InputRenderComponent.prototype.ngAfterContentInit = function () {
1272
+ var _this = this;
1273
+ var _a, _b;
1274
+ if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) !== 'object' && ((_b = this.schema) === null || _b === void 0 ? void 0 : _b.type) !== 'array') {
1275
+ if (!this.editing && this.schema.options) {
1276
+ var $event = this.schema.options.filter(function (item) { return item.selected === true; });
1277
+ if ($event[0]) {
1278
+ this.onChange($event[0].key);
1279
+ this.value = $event[0];
1280
+ }
1281
+ }
1282
+ else if (this.editing && this.schema.options && this.model) {
1283
+ var $event = this.schema.options.filter(function (item) { return item.key === _this.model; });
1284
+ if ($event[0]) {
1285
+ this.onChange($event[0].key);
1286
+ this.value = $event[0];
1287
+ }
1288
+ }
1289
+ else {
1290
+ this.value = this.model;
1291
+ }
1292
+ }
1293
+ };
1294
+ InputRenderComponent.prototype.onDropCallBack = function ($event, value) {
1295
+ this.value = value = _super.prototype.onDrop.call(this, $event, value);
1296
+ this.onChange(value);
1297
+ };
1298
+ InputRenderComponent.prototype.onChange = function ($event) {
1299
+ this.model = $event;
1300
+ this.modelChange.emit(this.model);
1301
+ };
1302
+ return InputRenderComponent;
1303
+ }(BaseSchemaComponent));
1304
+ InputRenderComponent.ɵfac = function InputRenderComponent_Factory(t) { return ɵInputRenderComponent_BaseFactory(t || InputRenderComponent); };
1305
+ InputRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: InputRenderComponent, selectors: [["input-render"]], inputs: { schema: "schema", modelPropertiesPath: "modelPropertiesPath", inputId: "inputId", editing: "editing" }, outputs: { onDropEvent: "onDropEvent" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 4, consts: [[1, "schema-input-container"], ["class", "form-control", "dndDropzone", "", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop", 4, "ngIf"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange", 4, "ngIf"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange", 4, "ngIf"], ["dndDropzone", "", 1, "form-control", 3, "type", "placeholder", "ngModel", "ngModelOptions", "id", "maxlength", "ngModelChange", "dndDrop"], [3, "id", "ngModel", "ngModelOptions", "placeholder", "searchPlaceHolder", "clearText", "notFoundText", "bindKey", "bindValue", "enabledSearch", "limitItens", "data", "ngModelChange"], [3, "model", "inputId", "placeholder", "maxLength", "modelChange"]], template: function InputRenderComponent_Template(rf, ctx) {
1306
+ if (rf & 1) {
1307
+ i0.ɵɵelementStart(0, "div", 0);
1308
+ i0.ɵɵtemplate(1, InputRenderComponent_input_1_Template, 1, 7, "input", 1);
1309
+ i0.ɵɵtemplate(2, InputRenderComponent_select_box_2_Template, 5, 21, "select-box", 2);
1310
+ i0.ɵɵtemplate(3, InputRenderComponent_number_input_3_Template, 1, 4, "number-input", 3);
1311
+ i0.ɵɵtemplate(4, InputRenderComponent_boolean_input_4_Template, 1, 4, "boolean-input", 3);
1312
+ i0.ɵɵelementEnd();
1313
+ }
1314
+ if (rf & 2) {
1315
+ i0.ɵɵadvance(1);
1316
+ i0.ɵɵproperty("ngIf", (ctx.schema.type === "string" || ctx.schema.type === "password") && !ctx.schema.options);
1317
+ i0.ɵɵadvance(1);
1318
+ i0.ɵɵproperty("ngIf", ctx.schema.type === "string" && ctx.schema.options);
1319
+ i0.ɵɵadvance(1);
1320
+ i0.ɵɵproperty("ngIf", ctx.schema.type === "number");
1321
+ i0.ɵɵadvance(1);
1322
+ i0.ɵɵproperty("ngIf", ctx.schema.type === "boolean");
1323
+ }
1324
+ }, directives: [i1.NgIf, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator, i8.SelectBoxComponent, NumberInputComponent, BooleanInputComponent], pipes: [i7.TranslatePipe], styles: [""] });
1325
+ var ɵInputRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(InputRenderComponent);
1326
+ /*@__PURE__*/ (function () {
1327
+ i0.ɵsetClassMetadata(InputRenderComponent, [{
1328
+ type: i0.Component,
1329
+ args: [{
1330
+ selector: 'input-render',
1331
+ templateUrl: 'input-render.html',
1332
+ styleUrls: ['./input-render.scss']
1333
+ }]
1334
+ }], null, { schema: [{
1335
+ type: i0.Input
1336
+ }], modelPropertiesPath: [{
1337
+ type: i0.Input
1338
+ }], inputId: [{
1339
+ type: i0.Input
1340
+ }], editing: [{
1341
+ type: i0.Input
1342
+ }], onDropEvent: [{
1343
+ type: i0.Output
1344
+ }] });
1369
1345
  })();
1370
1346
 
1371
- function SchemaInputComponent_div_0_Template(rf, ctx) {
1372
- if (rf & 1) {
1373
- var _r3_1 = i0.ɵɵgetCurrentView();
1374
- i0.ɵɵelementStart(0, "div", 1);
1375
- i0.ɵɵelementStart(1, "div", 2);
1376
- i0.ɵɵelementStart(2, "field-render", 3);
1377
- i0.ɵɵelementStart(3, "input-render", 4);
1378
- i0.ɵɵlistener("modelChange", function SchemaInputComponent_div_0_Template_input_render_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r3_1); var ctx_r2 = i0.ɵɵnextContext(); return (ctx_r2.model[ctx_r2.schema.id] = $event); });
1379
- i0.ɵɵelementEnd();
1380
- i0.ɵɵelementEnd();
1381
- i0.ɵɵelementEnd();
1382
- i0.ɵɵelementEnd();
1383
- }
1384
- if (rf & 2) {
1385
- var ctx_r0 = i0.ɵɵnextContext();
1386
- i0.ɵɵadvance(2);
1387
- i0.ɵɵproperty("label", ctx_r0.schema.title)("tooltip", ctx_r0.schema.help)("inputId", ctx_r0.getId(ctx_r0.index));
1388
- i0.ɵɵadvance(1);
1389
- i0.ɵɵproperty("inputId", ctx_r0.getId(ctx_r0.index))("schema", ctx_r0.schema)("model", ctx_r0.model[ctx_r0.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r0.schema.id)("editing", ctx_r0.editing);
1390
- }
1391
- }
1392
- function SchemaInputComponent_div_1_span_4_Template(rf, ctx) {
1393
- if (rf & 1) {
1394
- i0.ɵɵelementStart(0, "span", 7);
1395
- i0.ɵɵpipe(1, "translate");
1396
- i0.ɵɵtext(2, "?");
1397
- i0.ɵɵelementEnd();
1398
- }
1399
- if (rf & 2) {
1400
- var ctx_r4 = i0.ɵɵnextContext(2);
1401
- i0.ɵɵpropertyInterpolate("matTooltip", i0.ɵɵpipeBind1(1, 1, ctx_r4.schema.help));
1402
- }
1403
- }
1404
- function SchemaInputComponent_div_1_Template(rf, ctx) {
1405
- if (rf & 1) {
1406
- var _r6_1 = i0.ɵɵgetCurrentView();
1407
- i0.ɵɵelementStart(0, "div", 1);
1408
- i0.ɵɵelementStart(1, "div", 2);
1409
- i0.ɵɵelementStart(2, "label", 5);
1410
- i0.ɵɵtext(3);
1411
- i0.ɵɵtemplate(4, SchemaInputComponent_div_1_span_4_Template, 3, 3, "span", 6);
1412
- i0.ɵɵelementEnd();
1413
- i0.ɵɵelementStart(5, "input-render", 4);
1414
- i0.ɵɵlistener("modelChange", function SchemaInputComponent_div_1_Template_input_render_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r6_1); var ctx_r5 = i0.ɵɵnextContext(); return (ctx_r5.model[ctx_r5.schema.id] = $event); });
1415
- i0.ɵɵelementEnd();
1416
- i0.ɵɵelementEnd();
1417
- i0.ɵɵelementEnd();
1418
- }
1419
- if (rf & 2) {
1420
- var ctx_r1 = i0.ɵɵnextContext();
1421
- i0.ɵɵadvance(2);
1422
- i0.ɵɵproperty("htmlFor", ctx_r1.getId(ctx_r1.index));
1423
- i0.ɵɵadvance(1);
1424
- i0.ɵɵtextInterpolate1(" ", ctx_r1.schema.title, " ");
1425
- i0.ɵɵadvance(1);
1426
- i0.ɵɵproperty("ngIf", ctx_r1.schema.help);
1427
- i0.ɵɵadvance(1);
1428
- i0.ɵɵproperty("inputId", ctx_r1.getId(ctx_r1.index))("schema", ctx_r1.schema)("model", ctx_r1.model[ctx_r1.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r1.schema.id)("editing", ctx_r1.editing);
1429
- }
1430
- }
1431
- var SchemaInputComponent = /** @class */ (function (_super) {
1432
- __extends(SchemaInputComponent, _super);
1433
- function SchemaInputComponent() {
1434
- var _this = _super.apply(this, __spread(arguments)) || this;
1435
- _this.editing = false;
1436
- _this.loaded = false;
1437
- return _this;
1438
- }
1439
- SchemaInputComponent.prototype.ngAfterContentInit = function () {
1440
- this.loaded = true;
1441
- console.log('SchemaInputComponent schema', this.schema);
1442
- };
1443
- SchemaInputComponent.prototype.getId = function (index) {
1444
- return this.idPrefix + "-struct-" + index;
1445
- };
1446
- return SchemaInputComponent;
1447
- }(BaseSchemaComponent));
1448
- SchemaInputComponent.ɵfac = function SchemaInputComponent_Factory(t) { return ɵSchemaInputComponent_BaseFactory(t || SchemaInputComponent); };
1449
- SchemaInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaInputComponent, selectors: [["schema-input"]], inputs: { 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, "label", "tooltip", "inputId"], [3, "inputId", "schema", "model", "modelPropertiesPath", "editing", "modelChange"], [1, "info-label", "bold", 3, "htmlFor"], ["class", "config-tooltip", 3, "matTooltip", 4, "ngIf"], [1, "config-tooltip", 3, "matTooltip"]], template: function SchemaInputComponent_Template(rf, ctx) {
1450
- if (rf & 1) {
1451
- i0.ɵɵtemplate(0, SchemaInputComponent_div_0_Template, 4, 8, "div", 0);
1452
- i0.ɵɵtemplate(1, SchemaInputComponent_div_1_Template, 6, 8, "div", 0);
1453
- }
1454
- if (rf & 2) {
1455
- i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && ctx.schema.minLength && ctx.schema.minLength > 0);
1456
- i0.ɵɵadvance(1);
1457
- i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && (!ctx.schema.minLength || ctx.schema.minLength === 0));
1458
- }
1459
- }, directives: [i1.NgIf, FieldRenderComponent, InputRenderComponent, i4.MatTooltip], pipes: [i7.TranslatePipe], styles: [""] });
1460
- var ɵSchemaInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaInputComponent);
1461
- /*@__PURE__*/ (function () {
1462
- i0.ɵsetClassMetadata(SchemaInputComponent, [{
1463
- type: i0.Component,
1464
- args: [{
1465
- selector: 'schema-input',
1466
- templateUrl: 'schema-input.html',
1467
- styleUrls: ['./schema-input.scss']
1468
- }]
1469
- }], null, { idPrefix: [{
1470
- type: i0.Input
1471
- }], schema: [{
1472
- type: i0.Input
1473
- }], editing: [{
1474
- type: i0.Input
1475
- }], index: [{
1476
- type: i0.Input
1477
- }] });
1347
+ function SchemaInputComponent_div_0_Template(rf, ctx) {
1348
+ if (rf & 1) {
1349
+ var _r3_1 = i0.ɵɵgetCurrentView();
1350
+ i0.ɵɵelementStart(0, "div", 1);
1351
+ i0.ɵɵelementStart(1, "div", 2);
1352
+ i0.ɵɵelementStart(2, "field-render", 3);
1353
+ i0.ɵɵelementStart(3, "input-render", 4);
1354
+ i0.ɵɵlistener("modelChange", function SchemaInputComponent_div_0_Template_input_render_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r3_1); var ctx_r2 = i0.ɵɵnextContext(); return (ctx_r2.model[ctx_r2.schema.id] = $event); });
1355
+ i0.ɵɵelementEnd();
1356
+ i0.ɵɵelementEnd();
1357
+ i0.ɵɵelementEnd();
1358
+ i0.ɵɵelementEnd();
1359
+ }
1360
+ if (rf & 2) {
1361
+ var ctx_r0 = i0.ɵɵnextContext();
1362
+ i0.ɵɵadvance(2);
1363
+ i0.ɵɵproperty("label", ctx_r0.schema.title)("tooltip", ctx_r0.schema.help)("inputId", ctx_r0.getId(ctx_r0.index));
1364
+ i0.ɵɵadvance(1);
1365
+ i0.ɵɵproperty("inputId", ctx_r0.getId(ctx_r0.index))("schema", ctx_r0.schema)("model", ctx_r0.model[ctx_r0.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r0.schema.id)("editing", ctx_r0.editing);
1366
+ }
1367
+ }
1368
+ function SchemaInputComponent_div_1_span_4_Template(rf, ctx) {
1369
+ if (rf & 1) {
1370
+ i0.ɵɵelementStart(0, "span", 7);
1371
+ i0.ɵɵpipe(1, "translate");
1372
+ i0.ɵɵtext(2, "?");
1373
+ i0.ɵɵelementEnd();
1374
+ }
1375
+ if (rf & 2) {
1376
+ var ctx_r4 = i0.ɵɵnextContext(2);
1377
+ i0.ɵɵpropertyInterpolate("matTooltip", i0.ɵɵpipeBind1(1, 1, ctx_r4.schema.help));
1378
+ }
1379
+ }
1380
+ function SchemaInputComponent_div_1_Template(rf, ctx) {
1381
+ if (rf & 1) {
1382
+ var _r6_1 = i0.ɵɵgetCurrentView();
1383
+ i0.ɵɵelementStart(0, "div", 1);
1384
+ i0.ɵɵelementStart(1, "div", 2);
1385
+ i0.ɵɵelementStart(2, "label", 5);
1386
+ i0.ɵɵtext(3);
1387
+ i0.ɵɵtemplate(4, SchemaInputComponent_div_1_span_4_Template, 3, 3, "span", 6);
1388
+ i0.ɵɵelementEnd();
1389
+ i0.ɵɵelementStart(5, "input-render", 4);
1390
+ i0.ɵɵlistener("modelChange", function SchemaInputComponent_div_1_Template_input_render_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r6_1); var ctx_r5 = i0.ɵɵnextContext(); return (ctx_r5.model[ctx_r5.schema.id] = $event); });
1391
+ i0.ɵɵelementEnd();
1392
+ i0.ɵɵelementEnd();
1393
+ i0.ɵɵelementEnd();
1394
+ }
1395
+ if (rf & 2) {
1396
+ var ctx_r1 = i0.ɵɵnextContext();
1397
+ i0.ɵɵadvance(2);
1398
+ i0.ɵɵproperty("htmlFor", ctx_r1.getId(ctx_r1.index));
1399
+ i0.ɵɵadvance(1);
1400
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.schema.title, " ");
1401
+ i0.ɵɵadvance(1);
1402
+ i0.ɵɵproperty("ngIf", ctx_r1.schema.help);
1403
+ i0.ɵɵadvance(1);
1404
+ i0.ɵɵproperty("inputId", ctx_r1.getId(ctx_r1.index))("schema", ctx_r1.schema)("model", ctx_r1.model[ctx_r1.schema.id])("modelPropertiesPath", "mappingAttributes." + ctx_r1.schema.id)("editing", ctx_r1.editing);
1405
+ }
1406
+ }
1407
+ var SchemaInputComponent = /** @class */ (function (_super) {
1408
+ __extends(SchemaInputComponent, _super);
1409
+ function SchemaInputComponent() {
1410
+ var _this = _super.apply(this, __spread(arguments)) || this;
1411
+ _this.editing = false;
1412
+ return _this;
1413
+ }
1414
+ SchemaInputComponent.prototype.ngAfterContentInit = function () {
1415
+ this.loaded = true;
1416
+ };
1417
+ SchemaInputComponent.prototype.getId = function (index) {
1418
+ return this.idPrefix + "-struct-" + index;
1419
+ };
1420
+ return SchemaInputComponent;
1421
+ }(BaseSchemaComponent));
1422
+ SchemaInputComponent.ɵfac = function SchemaInputComponent_Factory(t) { return ɵSchemaInputComponent_BaseFactory(t || SchemaInputComponent); };
1423
+ SchemaInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaInputComponent, selectors: [["schema-input"]], inputs: { 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, "label", "tooltip", "inputId"], [3, "inputId", "schema", "model", "modelPropertiesPath", "editing", "modelChange"], [1, "info-label", "bold", 3, "htmlFor"], ["class", "config-tooltip", 3, "matTooltip", 4, "ngIf"], [1, "config-tooltip", 3, "matTooltip"]], template: function SchemaInputComponent_Template(rf, ctx) {
1424
+ if (rf & 1) {
1425
+ i0.ɵɵtemplate(0, SchemaInputComponent_div_0_Template, 4, 8, "div", 0);
1426
+ i0.ɵɵtemplate(1, SchemaInputComponent_div_1_Template, 6, 8, "div", 0);
1427
+ }
1428
+ if (rf & 2) {
1429
+ i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && ctx.schema.minLength && ctx.schema.minLength > 0);
1430
+ i0.ɵɵadvance(1);
1431
+ i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && (!ctx.schema.minLength || ctx.schema.minLength === 0));
1432
+ }
1433
+ }, directives: [i1.NgIf, FieldRenderComponent, InputRenderComponent, i4.MatTooltip], pipes: [i7.TranslatePipe], styles: [""] });
1434
+ var ɵSchemaInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaInputComponent);
1435
+ /*@__PURE__*/ (function () {
1436
+ i0.ɵsetClassMetadata(SchemaInputComponent, [{
1437
+ type: i0.Component,
1438
+ args: [{
1439
+ selector: 'schema-input',
1440
+ templateUrl: 'schema-input.html',
1441
+ styleUrls: ['./schema-input.scss']
1442
+ }]
1443
+ }], null, { idPrefix: [{
1444
+ type: i0.Input
1445
+ }], schema: [{
1446
+ type: i0.Input
1447
+ }], editing: [{
1448
+ type: i0.Input
1449
+ }], index: [{
1450
+ type: i0.Input
1451
+ }] });
1478
1452
  })();
1479
1453
 
1480
- function SchemaObjectComponent_div_0_div_4_Template(rf, ctx) {
1481
- if (rf & 1) {
1482
- var _r3_1 = i0.ɵɵgetCurrentView();
1483
- i0.ɵɵelementStart(0, "div", 5);
1484
- i0.ɵɵelementStart(1, "div", 6);
1485
- i0.ɵɵelementStart(2, "label", 7);
1486
- i0.ɵɵtext(3);
1487
- i0.ɵɵpipe(4, "translate");
1488
- i0.ɵɵelementEnd();
1489
- i0.ɵɵelementStart(5, "schema-custom-attributes", 8);
1490
- i0.ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_div_4_Template_schema_custom_attributes_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r3_1); var ctx_r2 = i0.ɵɵnextContext(2); return ctx_r2.model[ctx_r2.schema.id].customAttributes = $event; });
1491
- i0.ɵɵelementEnd();
1492
- i0.ɵɵelementEnd();
1493
- i0.ɵɵelementEnd();
1494
- }
1495
- if (rf & 2) {
1496
- var ctx_r1 = i0.ɵɵnextContext(2);
1497
- i0.ɵɵadvance(3);
1498
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "STEP.ADDITIONAL_ATTRIBUTES"));
1499
- i0.ɵɵadvance(2);
1500
- i0.ɵɵproperty("model", ctx_r1.model[ctx_r1.schema.id].customAttributes)("onDropFunction", ctx_r1.onDrop);
1501
- }
1502
- }
1503
- function SchemaObjectComponent_div_0_Template(rf, ctx) {
1504
- if (rf & 1) {
1505
- var _r5_1 = i0.ɵɵgetCurrentView();
1506
- i0.ɵɵelementStart(0, "div", 1);
1507
- i0.ɵɵelementStart(1, "div", 2);
1508
- i0.ɵɵtext(2);
1509
- i0.ɵɵelementEnd();
1510
- i0.ɵɵelementStart(3, "schema-form", 3);
1511
- i0.ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_Template_schema_form_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r4 = i0.ɵɵnextContext(); return (ctx_r4.model[ctx_r4.schema.id] = $event); });
1512
- i0.ɵɵelementEnd();
1513
- i0.ɵɵtemplate(4, SchemaObjectComponent_div_0_div_4_Template, 6, 5, "div", 4);
1514
- i0.ɵɵelementEnd();
1515
- }
1516
- if (rf & 2) {
1517
- var ctx_r0 = i0.ɵɵnextContext();
1518
- i0.ɵɵadvance(2);
1519
- i0.ɵɵtextInterpolate(ctx_r0.schema.title);
1520
- i0.ɵɵadvance(1);
1521
- i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model[ctx_r0.schema.id])("schemas", ctx_r0.getSchemaProperties())("editing", ctx_r0.editing);
1522
- i0.ɵɵadvance(1);
1523
- i0.ɵɵproperty("ngIf", ctx_r0.model[ctx_r0.schema.id] && ctx_r0.schema.customProperties);
1524
- }
1525
- }
1526
- var SchemaObjectComponent = /** @class */ (function (_super) {
1527
- __extends(SchemaObjectComponent, _super);
1528
- function SchemaObjectComponent() {
1529
- var _this = _super.apply(this, __spread(arguments)) || this;
1530
- _this.editing = false;
1531
- _this.onDropEvent = new i0.EventEmitter();
1532
- _this.loaded = false;
1533
- return _this;
1534
- }
1535
- SchemaObjectComponent.prototype.ngAfterContentInit = function () {
1536
- var _a;
1537
- if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'object' && this.model) {
1538
- this.model[this.schema.id] = this.model[this.schema.id] || {};
1539
- }
1540
- this.loaded = true;
1541
- console.log('SchemaObjectComponent schema', this.schema);
1542
- };
1543
- SchemaObjectComponent.prototype.onDrop = function ($event, modelElement) {
1544
- return onDropStruct($event, modelElement);
1545
- };
1546
- return SchemaObjectComponent;
1547
- }(BaseSchemaComponent));
1548
- SchemaObjectComponent.ɵfac = function SchemaObjectComponent_Factory(t) { return ɵSchemaObjectComponent_BaseFactory(t || SchemaObjectComponent); };
1549
- SchemaObjectComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaObjectComponent, selectors: [["schema-object"]], inputs: { 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, "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"]], template: function SchemaObjectComponent_Template(rf, ctx) {
1550
- if (rf & 1) {
1551
- i0.ɵɵtemplate(0, SchemaObjectComponent_div_0_Template, 5, 6, "div", 0);
1552
- }
1553
- if (rf & 2) {
1554
- i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type == "object");
1555
- }
1556
- }, directives: [i1.NgIf, SchemaFormComponent, SchemaCustomAttributesComponent], pipes: [i7.TranslatePipe], styles: [".schema-object-container[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:5px;margin-bottom:10px;margin-top:10px;padding:10px}.schema-object-container[_ngcontent-%COMP%] .schema-object-title[_ngcontent-%COMP%]{background:#eee;border-bottom:1px solid #ddd;font-weight:700;margin-left:-10px;margin-top:-10px;padding:10px;width:calc(100% + 20px)}"] });
1557
- var ɵSchemaObjectComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaObjectComponent);
1558
- /*@__PURE__*/ (function () {
1559
- i0.ɵsetClassMetadata(SchemaObjectComponent, [{
1560
- type: i0.Component,
1561
- args: [{
1562
- selector: 'schema-object',
1563
- templateUrl: 'schema-object.html',
1564
- styleUrls: ['./schema-object.scss']
1565
- }]
1566
- }], null, { idPrefix: [{
1567
- type: i0.Input
1568
- }], modelPropertiesPath: [{
1569
- type: i0.Input
1570
- }], inputId: [{
1571
- type: i0.Input
1572
- }], editing: [{
1573
- type: i0.Input
1574
- }], index: [{
1575
- type: i0.Input
1576
- }], onDropEvent: [{
1577
- type: i0.Output
1578
- }] });
1454
+ function SchemaObjectComponent_div_0_div_4_Template(rf, ctx) {
1455
+ if (rf & 1) {
1456
+ var _r3_1 = i0.ɵɵgetCurrentView();
1457
+ i0.ɵɵelementStart(0, "div", 5);
1458
+ i0.ɵɵelementStart(1, "div", 6);
1459
+ i0.ɵɵelementStart(2, "label", 7);
1460
+ i0.ɵɵtext(3);
1461
+ i0.ɵɵpipe(4, "translate");
1462
+ i0.ɵɵelementEnd();
1463
+ i0.ɵɵelementStart(5, "schema-custom-attributes", 8);
1464
+ i0.ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_div_4_Template_schema_custom_attributes_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r3_1); var ctx_r2 = i0.ɵɵnextContext(2); return ctx_r2.model[ctx_r2.schema.id].customAttributes = $event; });
1465
+ i0.ɵɵelementEnd();
1466
+ i0.ɵɵelementEnd();
1467
+ i0.ɵɵelementEnd();
1468
+ }
1469
+ if (rf & 2) {
1470
+ var ctx_r1 = i0.ɵɵnextContext(2);
1471
+ i0.ɵɵadvance(3);
1472
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "STEP.ADDITIONAL_ATTRIBUTES"));
1473
+ i0.ɵɵadvance(2);
1474
+ i0.ɵɵproperty("model", ctx_r1.model[ctx_r1.schema.id].customAttributes)("onDropFunction", ctx_r1.onDrop);
1475
+ }
1476
+ }
1477
+ function SchemaObjectComponent_div_0_Template(rf, ctx) {
1478
+ if (rf & 1) {
1479
+ var _r5_1 = i0.ɵɵgetCurrentView();
1480
+ i0.ɵɵelementStart(0, "div", 1);
1481
+ i0.ɵɵelementStart(1, "div", 2);
1482
+ i0.ɵɵtext(2);
1483
+ i0.ɵɵelementEnd();
1484
+ i0.ɵɵelementStart(3, "schema-form", 3);
1485
+ i0.ɵɵlistener("modelChange", function SchemaObjectComponent_div_0_Template_schema_form_modelChange_3_listener($event) { i0.ɵɵrestoreView(_r5_1); var ctx_r4 = i0.ɵɵnextContext(); return (ctx_r4.model[ctx_r4.schema.id] = $event); });
1486
+ i0.ɵɵelementEnd();
1487
+ i0.ɵɵtemplate(4, SchemaObjectComponent_div_0_div_4_Template, 6, 5, "div", 4);
1488
+ i0.ɵɵelementEnd();
1489
+ }
1490
+ if (rf & 2) {
1491
+ var ctx_r0 = i0.ɵɵnextContext();
1492
+ i0.ɵɵadvance(2);
1493
+ i0.ɵɵtextInterpolate(ctx_r0.schema.title);
1494
+ i0.ɵɵadvance(1);
1495
+ i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model[ctx_r0.schema.id])("schemas", ctx_r0.getSchemaProperties())("editing", ctx_r0.editing);
1496
+ i0.ɵɵadvance(1);
1497
+ i0.ɵɵproperty("ngIf", ctx_r0.model[ctx_r0.schema.id] && ctx_r0.schema.customProperties);
1498
+ }
1499
+ }
1500
+ var SchemaObjectComponent = /** @class */ (function (_super) {
1501
+ __extends(SchemaObjectComponent, _super);
1502
+ function SchemaObjectComponent() {
1503
+ var _this = _super.apply(this, __spread(arguments)) || this;
1504
+ _this.editing = false;
1505
+ _this.onDropEvent = new i0.EventEmitter();
1506
+ _this.loaded = false;
1507
+ return _this;
1508
+ }
1509
+ SchemaObjectComponent.prototype.ngAfterContentInit = function () {
1510
+ var _a;
1511
+ if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'object' && this.model) {
1512
+ this.model[this.schema.id] = this.model[this.schema.id] || {};
1513
+ }
1514
+ this.loaded = true;
1515
+ };
1516
+ SchemaObjectComponent.prototype.onDrop = function ($event, modelElement) {
1517
+ return onDropStruct($event, modelElement);
1518
+ };
1519
+ return SchemaObjectComponent;
1520
+ }(BaseSchemaComponent));
1521
+ SchemaObjectComponent.ɵfac = function SchemaObjectComponent_Factory(t) { return ɵSchemaObjectComponent_BaseFactory(t || SchemaObjectComponent); };
1522
+ SchemaObjectComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaObjectComponent, selectors: [["schema-object"]], inputs: { 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, "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"]], template: function SchemaObjectComponent_Template(rf, ctx) {
1523
+ if (rf & 1) {
1524
+ i0.ɵɵtemplate(0, SchemaObjectComponent_div_0_Template, 5, 6, "div", 0);
1525
+ }
1526
+ if (rf & 2) {
1527
+ i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type == "object");
1528
+ }
1529
+ }, directives: [i1.NgIf, SchemaFormComponent, SchemaCustomAttributesComponent], pipes: [i7.TranslatePipe], styles: [".schema-object-container[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:5px;margin-bottom:10px;margin-top:10px;padding:10px}.schema-object-container[_ngcontent-%COMP%] .schema-object-title[_ngcontent-%COMP%]{background:#eee;border-bottom:1px solid #ddd;font-weight:700;margin-left:-10px;margin-top:-10px;padding:10px;width:calc(100% + 20px)}"] });
1530
+ var ɵSchemaObjectComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaObjectComponent);
1531
+ /*@__PURE__*/ (function () {
1532
+ i0.ɵsetClassMetadata(SchemaObjectComponent, [{
1533
+ type: i0.Component,
1534
+ args: [{
1535
+ selector: 'schema-object',
1536
+ templateUrl: 'schema-object.html',
1537
+ styleUrls: ['./schema-object.scss']
1538
+ }]
1539
+ }], null, { idPrefix: [{
1540
+ type: i0.Input
1541
+ }], modelPropertiesPath: [{
1542
+ type: i0.Input
1543
+ }], inputId: [{
1544
+ type: i0.Input
1545
+ }], editing: [{
1546
+ type: i0.Input
1547
+ }], index: [{
1548
+ type: i0.Input
1549
+ }], onDropEvent: [{
1550
+ type: i0.Output
1551
+ }] });
1579
1552
  })();
1580
1553
 
1581
- var SchemaValidationField = /** @class */ (function () {
1582
- function SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields) {
1583
- this.emptyFields = emptyFields;
1584
- this.invalidMinLengthFields = invalidMinLengthFields;
1585
- this.invalidMaxLengthFields = invalidMaxLengthFields;
1586
- }
1587
- SchemaValidationField.prototype.isValidSchemaFields = function () {
1588
- var _a, _b, _c;
1589
- return ((_a = this.emptyFields) === null || _a === void 0 ? void 0 : _a.length) < 1 && ((_b = this.invalidMinLengthFields) === null || _b === void 0 ? void 0 : _b.length) < 1 && ((_c = this.invalidMaxLengthFields) === null || _c === void 0 ? void 0 : _c.length) < 1;
1590
- };
1591
- SchemaValidationField.prototype.isInvalidSchemaFields = function () {
1592
- return !this.isValidSchemaFields();
1593
- };
1594
- return SchemaValidationField;
1554
+ var SchemaValidationField = /** @class */ (function () {
1555
+ function SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields) {
1556
+ this.emptyFields = emptyFields;
1557
+ this.invalidMinLengthFields = invalidMinLengthFields;
1558
+ this.invalidMaxLengthFields = invalidMaxLengthFields;
1559
+ }
1560
+ SchemaValidationField.prototype.isValidSchemaFields = function () {
1561
+ var _a, _b, _c;
1562
+ return ((_a = this.emptyFields) === null || _a === void 0 ? void 0 : _a.length) < 1 && ((_b = this.invalidMinLengthFields) === null || _b === void 0 ? void 0 : _b.length) < 1 && ((_c = this.invalidMaxLengthFields) === null || _c === void 0 ? void 0 : _c.length) < 1;
1563
+ };
1564
+ SchemaValidationField.prototype.isInvalidSchemaFields = function () {
1565
+ return !this.isValidSchemaFields();
1566
+ };
1567
+ return SchemaValidationField;
1595
1568
  }());
1596
1569
 
1597
- var SchemaFieldsService = /** @class */ (function () {
1598
- function SchemaFieldsService(translate) {
1599
- this.translate = translate;
1600
- }
1601
- SchemaFieldsService.prototype.validateSchemaFields = function (propertiesRendered, model) {
1602
- return __awaiter(this, void 0, void 0, function () {
1603
- var emptyFields, invalidMinLengthFields, invalidMaxLengthFields, structValidationField, _a;
1604
- return __generator(this, function (_b) {
1605
- switch (_b.label) {
1606
- case 0:
1607
- if (!propertiesRendered) {
1608
- return [2 /*return*/, new SchemaValidationField([], [], [])];
1609
- }
1610
- emptyFields = [];
1611
- invalidMinLengthFields = [];
1612
- invalidMaxLengthFields = [];
1613
- this.processProperties(propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1614
- structValidationField = new SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1615
- _a = structValidationField;
1616
- return [4 /*yield*/, this.getErrorsStringArray(structValidationField)];
1617
- case 1:
1618
- _a.validationErrorsLabel = _b.sent();
1619
- return [2 /*return*/, structValidationField];
1620
- }
1621
- });
1622
- });
1623
- };
1624
- SchemaFieldsService.prototype.processProperties = function (propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, recursive) {
1625
- var e_1, _a;
1626
- try {
1627
- for (var propertiesRendered_1 = __values(propertiesRendered), propertiesRendered_1_1 = propertiesRendered_1.next(); !propertiesRendered_1_1.done; propertiesRendered_1_1 = propertiesRendered_1.next()) {
1628
- var property = propertiesRendered_1_1.value;
1629
- if ((property.type === 'object' || property.type === 'array') && property.properties) {
1630
- this.processProperties(property.properties, model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1631
- }
1632
- else if (property.type === 'array' && !property.properties) {
1633
- var newProperty = Object.assign({}, property);
1634
- newProperty.type = 'string';
1635
- this.processProperties([newProperty], model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1636
- }
1637
- else {
1638
- var validateModel = recursive ? model : model[property.id];
1639
- if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0
1640
- && (validateModel === undefined || validateModel === '' || validateModel === null)) {
1641
- emptyFields.push(property);
1642
- }
1643
- else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) < property.minLength)) {
1644
- invalidMinLengthFields.push(property);
1645
- }
1646
- else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.maxLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) > property.maxLength)) {
1647
- invalidMaxLengthFields.push(property);
1648
- }
1649
- }
1650
- }
1651
- }
1652
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1653
- finally {
1654
- try {
1655
- if (propertiesRendered_1_1 && !propertiesRendered_1_1.done && (_a = propertiesRendered_1.return)) _a.call(propertiesRendered_1);
1656
- }
1657
- finally { if (e_1) throw e_1.error; }
1658
- }
1659
- };
1660
- SchemaFieldsService.prototype.getErrorsStringArray = function (structValidation) {
1661
- return __awaiter(this, void 0, void 0, function () {
1662
- var errors, _a, _b, field, fieldName, _c, _d, field, fieldName, _e, _f, field, fieldName;
1663
- var e_2, _g, e_3, _h, e_4, _j;
1664
- return __generator(this, function (_k) {
1665
- if (!structValidation.isInvalidSchemaFields()) {
1666
- return [2 /*return*/, []];
1667
- }
1668
- errors = [];
1669
- try {
1670
- for (_a = __values(structValidation.emptyFields), _b = _a.next(); !_b.done; _b = _a.next()) {
1671
- field = _b.value;
1672
- fieldName = field.title || field.id;
1673
- errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.REQUIRED_FIELD_ERROR', { fieldName: fieldName }));
1674
- }
1675
- }
1676
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1677
- finally {
1678
- try {
1679
- if (_b && !_b.done && (_g = _a.return)) _g.call(_a);
1680
- }
1681
- finally { if (e_2) throw e_2.error; }
1682
- }
1683
- try {
1684
- for (_c = __values(structValidation.invalidMinLengthFields), _d = _c.next(); !_d.done; _d = _c.next()) {
1685
- field = _d.value;
1686
- fieldName = field.title || field.id;
1687
- errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MINLENGTH_FIELD_ERROR', { fieldName: fieldName, minLength: field.minLength }));
1688
- }
1689
- }
1690
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
1691
- finally {
1692
- try {
1693
- if (_d && !_d.done && (_h = _c.return)) _h.call(_c);
1694
- }
1695
- finally { if (e_3) throw e_3.error; }
1696
- }
1697
- try {
1698
- for (_e = __values(structValidation.invalidMaxLengthFields), _f = _e.next(); !_f.done; _f = _e.next()) {
1699
- field = _f.value;
1700
- fieldName = field.title || field.id;
1701
- errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MAXLENGTH_FIELD_ERROR', { fieldName: fieldName, maxLength: field.maxLength }));
1702
- }
1703
- }
1704
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
1705
- finally {
1706
- try {
1707
- if (_f && !_f.done && (_j = _e.return)) _j.call(_e);
1708
- }
1709
- finally { if (e_4) throw e_4.error; }
1710
- }
1711
- return [2 /*return*/, errors];
1712
- });
1713
- });
1714
- };
1715
- return SchemaFieldsService;
1716
- }());
1717
- SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(i0.ɵɵinject(i7.TranslateService)); };
1718
- SchemaFieldsService.ɵprov = i0.ɵɵdefineInjectable({ token: SchemaFieldsService, factory: SchemaFieldsService.ɵfac });
1719
- /*@__PURE__*/ (function () {
1720
- i0.ɵsetClassMetadata(SchemaFieldsService, [{
1721
- type: i0.Injectable
1722
- }], function () { return [{ type: i7.TranslateService }]; }, null);
1570
+ var SchemaFieldsService = /** @class */ (function () {
1571
+ function SchemaFieldsService(translate) {
1572
+ this.translate = translate;
1573
+ }
1574
+ SchemaFieldsService.prototype.validateSchemaFields = function (propertiesRendered, model) {
1575
+ return __awaiter(this, void 0, void 0, function () {
1576
+ var emptyFields, invalidMinLengthFields, invalidMaxLengthFields, structValidationField, _a;
1577
+ return __generator(this, function (_b) {
1578
+ switch (_b.label) {
1579
+ case 0:
1580
+ if (!propertiesRendered) {
1581
+ return [2 /*return*/, new SchemaValidationField([], [], [])];
1582
+ }
1583
+ emptyFields = [];
1584
+ invalidMinLengthFields = [];
1585
+ invalidMaxLengthFields = [];
1586
+ this.processProperties(propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1587
+ structValidationField = new SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1588
+ _a = structValidationField;
1589
+ return [4 /*yield*/, this.getErrorsStringArray(structValidationField)];
1590
+ case 1:
1591
+ _a.validationErrorsLabel = _b.sent();
1592
+ return [2 /*return*/, structValidationField];
1593
+ }
1594
+ });
1595
+ });
1596
+ };
1597
+ SchemaFieldsService.prototype.processProperties = function (propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, recursive) {
1598
+ var e_1, _a;
1599
+ try {
1600
+ for (var propertiesRendered_1 = __values(propertiesRendered), propertiesRendered_1_1 = propertiesRendered_1.next(); !propertiesRendered_1_1.done; propertiesRendered_1_1 = propertiesRendered_1.next()) {
1601
+ var property = propertiesRendered_1_1.value;
1602
+ if ((property.type === 'object' || property.type === 'array') && property.properties) {
1603
+ this.processProperties(property.properties, model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1604
+ }
1605
+ else if (property.type === 'array' && !property.properties) {
1606
+ var newProperty = Object.assign({}, property);
1607
+ newProperty.type = 'string';
1608
+ this.processProperties([newProperty], model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1609
+ }
1610
+ else {
1611
+ var validateModel = recursive ? model : model[property.id];
1612
+ if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0
1613
+ && (validateModel === undefined || validateModel === '' || validateModel === null)) {
1614
+ emptyFields.push(property);
1615
+ }
1616
+ else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) < property.minLength)) {
1617
+ invalidMinLengthFields.push(property);
1618
+ }
1619
+ else if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.maxLength) > 0 && ((validateModel === null || validateModel === void 0 ? void 0 : validateModel.length) > property.maxLength)) {
1620
+ invalidMaxLengthFields.push(property);
1621
+ }
1622
+ }
1623
+ }
1624
+ }
1625
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1626
+ finally {
1627
+ try {
1628
+ if (propertiesRendered_1_1 && !propertiesRendered_1_1.done && (_a = propertiesRendered_1.return)) _a.call(propertiesRendered_1);
1629
+ }
1630
+ finally { if (e_1) throw e_1.error; }
1631
+ }
1632
+ };
1633
+ SchemaFieldsService.prototype.getErrorsStringArray = function (structValidation) {
1634
+ return __awaiter(this, void 0, void 0, function () {
1635
+ var errors, _a, _b, field, fieldName, _c, _d, field, fieldName, _e, _f, field, fieldName;
1636
+ var e_2, _g, e_3, _h, e_4, _j;
1637
+ return __generator(this, function (_k) {
1638
+ if (!structValidation.isInvalidSchemaFields()) {
1639
+ return [2 /*return*/, []];
1640
+ }
1641
+ errors = [];
1642
+ try {
1643
+ for (_a = __values(structValidation.emptyFields), _b = _a.next(); !_b.done; _b = _a.next()) {
1644
+ field = _b.value;
1645
+ fieldName = field.title || field.id;
1646
+ errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.REQUIRED_FIELD_ERROR', { fieldName: fieldName }));
1647
+ }
1648
+ }
1649
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1650
+ finally {
1651
+ try {
1652
+ if (_b && !_b.done && (_g = _a.return)) _g.call(_a);
1653
+ }
1654
+ finally { if (e_2) throw e_2.error; }
1655
+ }
1656
+ try {
1657
+ for (_c = __values(structValidation.invalidMinLengthFields), _d = _c.next(); !_d.done; _d = _c.next()) {
1658
+ field = _d.value;
1659
+ fieldName = field.title || field.id;
1660
+ errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MINLENGTH_FIELD_ERROR', { fieldName: fieldName, minLength: field.minLength }));
1661
+ }
1662
+ }
1663
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
1664
+ finally {
1665
+ try {
1666
+ if (_d && !_d.done && (_h = _c.return)) _h.call(_c);
1667
+ }
1668
+ finally { if (e_3) throw e_3.error; }
1669
+ }
1670
+ try {
1671
+ for (_e = __values(structValidation.invalidMaxLengthFields), _f = _e.next(); !_f.done; _f = _e.next()) {
1672
+ field = _f.value;
1673
+ fieldName = field.title || field.id;
1674
+ errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MAXLENGTH_FIELD_ERROR', { fieldName: fieldName, maxLength: field.maxLength }));
1675
+ }
1676
+ }
1677
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
1678
+ finally {
1679
+ try {
1680
+ if (_f && !_f.done && (_j = _e.return)) _j.call(_e);
1681
+ }
1682
+ finally { if (e_4) throw e_4.error; }
1683
+ }
1684
+ return [2 /*return*/, errors];
1685
+ });
1686
+ });
1687
+ };
1688
+ return SchemaFieldsService;
1689
+ }());
1690
+ SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(i0.ɵɵinject(i7.TranslateService)); };
1691
+ SchemaFieldsService.ɵprov = i0.ɵɵdefineInjectable({ token: SchemaFieldsService, factory: SchemaFieldsService.ɵfac });
1692
+ /*@__PURE__*/ (function () {
1693
+ i0.ɵsetClassMetadata(SchemaFieldsService, [{
1694
+ type: i0.Injectable
1695
+ }], function () { return [{ type: i7.TranslateService }]; }, null);
1723
1696
  })();
1724
1697
 
1725
- function SchemaFormRenderComponent_div_0_div_2_div_1_Template(rf, ctx) {
1726
- if (rf & 1) {
1727
- var _r6_1 = i0.ɵɵgetCurrentView();
1728
- i0.ɵɵelementStart(0, "div", 6);
1729
- i0.ɵɵelementStart(1, "div", 7);
1730
- i0.ɵɵelementStart(2, "label", 8);
1731
- i0.ɵɵtext(3);
1732
- i0.ɵɵpipe(4, "translate");
1733
- i0.ɵɵelementEnd();
1734
- i0.ɵɵelementStart(5, "schema-custom-attributes", 9);
1735
- i0.ɵɵlistener("modelChange", function SchemaFormRenderComponent_div_0_div_2_div_1_Template_schema_custom_attributes_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r6_1); var ctx_r5 = i0.ɵɵnextContext(3); return ctx_r5.model.customAttributes = $event; });
1736
- i0.ɵɵelementEnd();
1737
- i0.ɵɵelementEnd();
1738
- i0.ɵɵelementEnd();
1739
- }
1740
- if (rf & 2) {
1741
- var ctx_r4 = i0.ɵɵnextContext(3);
1742
- i0.ɵɵadvance(3);
1743
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "STEP.ADDITIONAL_ATTRIBUTES"));
1744
- i0.ɵɵadvance(2);
1745
- i0.ɵɵproperty("model", ctx_r4.model.customAttributes)("onDropFunction", ctx_r4.onDrop);
1746
- }
1747
- }
1748
- function SchemaFormRenderComponent_div_0_div_2_Template(rf, ctx) {
1749
- if (rf & 1) {
1750
- i0.ɵɵelementStart(0, "div", 4);
1751
- i0.ɵɵtemplate(1, SchemaFormRenderComponent_div_0_div_2_div_1_Template, 6, 5, "div", 5);
1752
- i0.ɵɵelementEnd();
1753
- }
1754
- if (rf & 2) {
1755
- var ctx_r1 = i0.ɵɵnextContext(2);
1756
- i0.ɵɵadvance(1);
1757
- i0.ɵɵproperty("ngIf", ctx_r1.model && ctx_r1.customProperties);
1758
- }
1759
- }
1760
- function SchemaFormRenderComponent_div_0_Template(rf, ctx) {
1761
- if (rf & 1) {
1762
- var _r8_1 = i0.ɵɵgetCurrentView();
1763
- i0.ɵɵelementStart(0, "div", 1);
1764
- i0.ɵɵelementStart(1, "schema-form", 2);
1765
- i0.ɵɵlistener("modelChange", function SchemaFormRenderComponent_div_0_Template_schema_form_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.model = $event; });
1766
- i0.ɵɵelementEnd();
1767
- i0.ɵɵtemplate(2, SchemaFormRenderComponent_div_0_div_2_Template, 2, 1, "div", 3);
1768
- i0.ɵɵelementEnd();
1769
- }
1770
- if (rf & 2) {
1771
- var ctx_r0 = i0.ɵɵnextContext();
1772
- i0.ɵɵadvance(1);
1773
- i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schemas", ctx_r0.schemas)("editing", ctx_r0.editing);
1774
- i0.ɵɵadvance(1);
1775
- i0.ɵɵproperty("ngForOf", ctx_r0.schemas);
1776
- }
1777
- }
1778
- var SchemaFormRenderComponent = /** @class */ (function (_super) {
1779
- __extends(SchemaFormRenderComponent, _super);
1780
- function SchemaFormRenderComponent() {
1781
- var _this = _super.apply(this, __spread(arguments)) || this;
1782
- _this.schemas = [];
1783
- _this.customProperties = false;
1784
- _this.editing = false;
1785
- _this.loaded = false;
1786
- return _this;
1787
- }
1788
- SchemaFormRenderComponent.prototype.ngAfterContentInit = function () {
1789
- this.loaded = true;
1790
- console.log('SchemaFormRenderComponent schemas', this.schemas);
1791
- };
1792
- SchemaFormRenderComponent.prototype.onDrop = function ($event, modelElement) {
1793
- return onDropStruct($event, modelElement);
1794
- };
1795
- SchemaFormRenderComponent.prototype.getId = function (index) {
1796
- return this.idPrefix + "-struct-" + index;
1797
- };
1798
- return SchemaFormRenderComponent;
1799
- }(BaseSchemaComponent));
1800
- SchemaFormRenderComponent.ɵfac = function SchemaFormRenderComponent_Factory(t) { return ɵSchemaFormRenderComponent_BaseFactory(t || SchemaFormRenderComponent); };
1801
- SchemaFormRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaFormRenderComponent, selectors: [["schema-form-render"]], inputs: { 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, "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"]], template: function SchemaFormRenderComponent_Template(rf, ctx) {
1802
- if (rf & 1) {
1803
- i0.ɵɵtemplate(0, SchemaFormRenderComponent_div_0_Template, 3, 5, "div", 0);
1804
- }
1805
- if (rf & 2) {
1806
- i0.ɵɵproperty("ngIf", ctx.loaded);
1807
- }
1808
- }, directives: [i1.NgIf, SchemaFormComponent, i1.NgForOf, SchemaCustomAttributesComponent], pipes: [i7.TranslatePipe], styles: [".schema[_ngcontent-%COMP%] .info-label{display:block}.schema[_ngcontent-%COMP%] input.form-control{background:#fff;border:1px solid #ddd;border-radius:3px;padding:11px;width:100%}.schema[_ngcontent-%COMP%] select.form-control{border:1px solid #ddd;border-radius:4px;color:#777;cursor:pointer;padding:11px;width:100%}.schema[_ngcontent-%COMP%] .ng-select-container{height:38px!important;min-height:38px!important}.schema[_ngcontent-%COMP%] .btn-outline-primary{background:var(--color-primary);border:1px solid var(--color-secondary);border-radius:4px;color:var(--color-secondary);cursor:pointer;padding:5px 15px}.schema[_ngcontent-%COMP%] .btn-outline-primary:hover{background:var(--color-primary-hover)}.schema[_ngcontent-%COMP%] .subsection-item-title, .schema[_ngcontent-%COMP%] array-session .subsection-element{color:var(--color-primary)}"] });
1809
- var ɵSchemaFormRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaFormRenderComponent);
1810
- /*@__PURE__*/ (function () {
1811
- i0.ɵsetClassMetadata(SchemaFormRenderComponent, [{
1812
- type: i0.Component,
1813
- args: [{
1814
- selector: 'schema-form-render',
1815
- templateUrl: 'schema-form-render.html',
1816
- styleUrls: ['./schema-form-render.scss']
1817
- }]
1818
- }], null, { idPrefix: [{
1819
- type: i0.Input
1820
- }], schemas: [{
1821
- type: i0.Input
1822
- }], customProperties: [{
1823
- type: i0.Input
1824
- }], editing: [{
1825
- type: i0.Input
1826
- }], inputType: [{
1827
- type: i0.Input
1828
- }] });
1698
+ function SchemaFormRenderComponent_div_0_div_2_div_1_Template(rf, ctx) {
1699
+ if (rf & 1) {
1700
+ var _r6_1 = i0.ɵɵgetCurrentView();
1701
+ i0.ɵɵelementStart(0, "div", 6);
1702
+ i0.ɵɵelementStart(1, "div", 7);
1703
+ i0.ɵɵelementStart(2, "label", 8);
1704
+ i0.ɵɵtext(3);
1705
+ i0.ɵɵpipe(4, "translate");
1706
+ i0.ɵɵelementEnd();
1707
+ i0.ɵɵelementStart(5, "schema-custom-attributes", 9);
1708
+ i0.ɵɵlistener("modelChange", function SchemaFormRenderComponent_div_0_div_2_div_1_Template_schema_custom_attributes_modelChange_5_listener($event) { i0.ɵɵrestoreView(_r6_1); var ctx_r5 = i0.ɵɵnextContext(3); return ctx_r5.model.customAttributes = $event; });
1709
+ i0.ɵɵelementEnd();
1710
+ i0.ɵɵelementEnd();
1711
+ i0.ɵɵelementEnd();
1712
+ }
1713
+ if (rf & 2) {
1714
+ var ctx_r4 = i0.ɵɵnextContext(3);
1715
+ i0.ɵɵadvance(3);
1716
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "STEP.ADDITIONAL_ATTRIBUTES"));
1717
+ i0.ɵɵadvance(2);
1718
+ i0.ɵɵproperty("model", ctx_r4.model.customAttributes)("onDropFunction", ctx_r4.onDrop);
1719
+ }
1720
+ }
1721
+ function SchemaFormRenderComponent_div_0_div_2_Template(rf, ctx) {
1722
+ if (rf & 1) {
1723
+ i0.ɵɵelementStart(0, "div", 4);
1724
+ i0.ɵɵtemplate(1, SchemaFormRenderComponent_div_0_div_2_div_1_Template, 6, 5, "div", 5);
1725
+ i0.ɵɵelementEnd();
1726
+ }
1727
+ if (rf & 2) {
1728
+ var ctx_r1 = i0.ɵɵnextContext(2);
1729
+ i0.ɵɵadvance(1);
1730
+ i0.ɵɵproperty("ngIf", ctx_r1.model && ctx_r1.customProperties);
1731
+ }
1732
+ }
1733
+ function SchemaFormRenderComponent_div_0_Template(rf, ctx) {
1734
+ if (rf & 1) {
1735
+ var _r8_1 = i0.ɵɵgetCurrentView();
1736
+ i0.ɵɵelementStart(0, "div", 1);
1737
+ i0.ɵɵelementStart(1, "schema-form", 2);
1738
+ i0.ɵɵlistener("modelChange", function SchemaFormRenderComponent_div_0_Template_schema_form_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.model = $event; });
1739
+ i0.ɵɵelementEnd();
1740
+ i0.ɵɵtemplate(2, SchemaFormRenderComponent_div_0_div_2_Template, 2, 1, "div", 3);
1741
+ i0.ɵɵelementEnd();
1742
+ }
1743
+ if (rf & 2) {
1744
+ var ctx_r0 = i0.ɵɵnextContext();
1745
+ i0.ɵɵadvance(1);
1746
+ i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schemas", ctx_r0.schemas)("editing", ctx_r0.editing);
1747
+ i0.ɵɵadvance(1);
1748
+ i0.ɵɵproperty("ngForOf", ctx_r0.schemas);
1749
+ }
1750
+ }
1751
+ var SchemaFormRenderComponent = /** @class */ (function (_super) {
1752
+ __extends(SchemaFormRenderComponent, _super);
1753
+ function SchemaFormRenderComponent() {
1754
+ var _this = _super.apply(this, __spread(arguments)) || this;
1755
+ _this.schemas = [];
1756
+ _this.customProperties = false;
1757
+ _this.editing = false;
1758
+ _this.loaded = false;
1759
+ return _this;
1760
+ }
1761
+ SchemaFormRenderComponent.prototype.ngAfterContentInit = function () {
1762
+ this.loaded = true;
1763
+ };
1764
+ SchemaFormRenderComponent.prototype.onDrop = function ($event, modelElement) {
1765
+ return onDropStruct($event, modelElement);
1766
+ };
1767
+ SchemaFormRenderComponent.prototype.getId = function (index) {
1768
+ return this.idPrefix + "-struct-" + index;
1769
+ };
1770
+ return SchemaFormRenderComponent;
1771
+ }(BaseSchemaComponent));
1772
+ SchemaFormRenderComponent.ɵfac = function SchemaFormRenderComponent_Factory(t) { return ɵSchemaFormRenderComponent_BaseFactory(t || SchemaFormRenderComponent); };
1773
+ SchemaFormRenderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SchemaFormRenderComponent, selectors: [["schema-form-render"]], inputs: { 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, "idPrefix", "model", "schemas", "editing", "modelChange"], ["class", "schema-properties", 4, "ngFor", "ngForOf"], [1, "schema-properties"], ["class", "row struct-custom-properties", 4, "ngIf"], [1, "row", "struct-custom-properties"], [1, "col-md-12"], [1, "info-label", "bold"], [3, "model", "onDropFunction", "modelChange"]], template: function SchemaFormRenderComponent_Template(rf, ctx) {
1774
+ if (rf & 1) {
1775
+ i0.ɵɵtemplate(0, SchemaFormRenderComponent_div_0_Template, 3, 5, "div", 0);
1776
+ }
1777
+ if (rf & 2) {
1778
+ i0.ɵɵproperty("ngIf", ctx.loaded);
1779
+ }
1780
+ }, directives: [i1.NgIf, SchemaFormComponent, i1.NgForOf, SchemaCustomAttributesComponent], pipes: [i7.TranslatePipe], styles: [".schema[_ngcontent-%COMP%] .info-label{display:block}.schema[_ngcontent-%COMP%] input.form-control{background:#fff;border:1px solid #ddd;border-radius:3px;padding:11px;width:100%}.schema[_ngcontent-%COMP%] select.form-control{border:1px solid #ddd;border-radius:4px;color:#777;cursor:pointer;padding:11px;width:100%}.schema[_ngcontent-%COMP%] .ng-select-container{height:38px!important;min-height:38px!important}.schema[_ngcontent-%COMP%] .btn-outline-primary{background:var(--color-primary);border:1px solid var(--color-secondary);border-radius:4px;color:var(--color-secondary);cursor:pointer;padding:5px 15px}.schema[_ngcontent-%COMP%] .btn-outline-primary:hover{background:var(--color-primary-hover)}.schema[_ngcontent-%COMP%] .subsection-item-title, .schema[_ngcontent-%COMP%] array-session .subsection-element{color:var(--color-primary)}"] });
1781
+ var ɵSchemaFormRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaFormRenderComponent);
1782
+ /*@__PURE__*/ (function () {
1783
+ i0.ɵsetClassMetadata(SchemaFormRenderComponent, [{
1784
+ type: i0.Component,
1785
+ args: [{
1786
+ selector: 'schema-form-render',
1787
+ templateUrl: 'schema-form-render.html',
1788
+ styleUrls: ['./schema-form-render.scss']
1789
+ }]
1790
+ }], null, { idPrefix: [{
1791
+ type: i0.Input
1792
+ }], schemas: [{
1793
+ type: i0.Input
1794
+ }], customProperties: [{
1795
+ type: i0.Input
1796
+ }], editing: [{
1797
+ type: i0.Input
1798
+ }], inputType: [{
1799
+ type: i0.Input
1800
+ }] });
1829
1801
  })();
1830
1802
 
1831
- var SchemaFormRenderModule = /** @class */ (function () {
1832
- function SchemaFormRenderModule() {
1833
- }
1834
- return SchemaFormRenderModule;
1835
- }());
1836
- SchemaFormRenderModule.ɵmod = i0.ɵɵdefineNgModule({ type: SchemaFormRenderModule });
1837
- SchemaFormRenderModule.ɵinj = i0.ɵɵdefineInjector({ factory: function SchemaFormRenderModule_Factory(t) { return new (t || SchemaFormRenderModule)(); }, providers: [
1838
- SchemaFieldsService
1839
- ], imports: [[
1840
- i1.CommonModule,
1841
- i2.DndModule,
1842
- i3.FormsModule,
1843
- i4.MatTooltipModule,
1844
- i7.TranslateModule,
1845
- i8.InputsModule
1846
- ]] });
1847
- (function () {
1848
- (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SchemaFormRenderModule, { declarations: [ArraySessionComponent,
1849
- SchemaArrayComponent,
1850
- FieldRenderComponent,
1851
- InputRenderComponent,
1852
- BooleanInputComponent,
1853
- NumberInputComponent,
1854
- SchemaInputComponent,
1855
- SchemaObjectComponent,
1856
- SchemaFormRenderComponent,
1857
- SchemaFormComponent,
1858
- SchemaCustomAttributesComponent], imports: [i1.CommonModule,
1859
- i2.DndModule,
1860
- i3.FormsModule,
1861
- i4.MatTooltipModule,
1862
- i7.TranslateModule,
1863
- i8.InputsModule], exports: [ArraySessionComponent,
1864
- SchemaArrayComponent,
1865
- FieldRenderComponent,
1866
- InputRenderComponent,
1867
- BooleanInputComponent,
1868
- NumberInputComponent,
1869
- SchemaInputComponent,
1870
- SchemaObjectComponent,
1871
- SchemaFormRenderComponent,
1872
- SchemaFormComponent,
1873
- SchemaCustomAttributesComponent] });
1874
- })();
1875
- /*@__PURE__*/ (function () {
1876
- i0.ɵsetClassMetadata(SchemaFormRenderModule, [{
1877
- type: i0.NgModule,
1878
- args: [{
1879
- imports: [
1880
- i1.CommonModule,
1881
- i2.DndModule,
1882
- i3.FormsModule,
1883
- i4.MatTooltipModule,
1884
- i7.TranslateModule,
1885
- i8.InputsModule
1886
- ],
1887
- declarations: [
1888
- ArraySessionComponent,
1889
- SchemaArrayComponent,
1890
- FieldRenderComponent,
1891
- InputRenderComponent,
1892
- BooleanInputComponent,
1893
- NumberInputComponent,
1894
- SchemaInputComponent,
1895
- SchemaObjectComponent,
1896
- SchemaFormRenderComponent,
1897
- SchemaFormComponent,
1898
- SchemaCustomAttributesComponent
1899
- ],
1900
- exports: [
1901
- ArraySessionComponent,
1902
- SchemaArrayComponent,
1903
- FieldRenderComponent,
1904
- InputRenderComponent,
1905
- BooleanInputComponent,
1906
- NumberInputComponent,
1907
- SchemaInputComponent,
1908
- SchemaObjectComponent,
1909
- SchemaFormRenderComponent,
1910
- SchemaFormComponent,
1911
- SchemaCustomAttributesComponent
1912
- ],
1913
- providers: [
1914
- SchemaFieldsService
1915
- ]
1916
- }]
1917
- }], null, null);
1918
- })();
1919
- i0.ɵɵsetComponentScope(SchemaFormComponent, [i1.NgClass, i1.NgComponentOutlet, i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, i1.NgSwitch, i1.NgSwitchCase, i1.NgSwitchDefault, i1.NgPlural, i1.NgPluralCase, i2.DndDraggableDirective, i2.DndDropzoneDirective, i2.DndHandleDirective, i2.DndPlaceholderRefDirective, i2.DndDragImageRefDirective, i3.ɵangular_packages_forms_forms_y, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.RangeValueAccessor, i3.CheckboxControlValueAccessor, i3.SelectControlValueAccessor, i3.SelectMultipleControlValueAccessor, i3.RadioControlValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.RequiredValidator, i3.MinLengthValidator, i3.MaxLengthValidator, i3.PatternValidator, i3.CheckboxRequiredValidator, i3.EmailValidator, i3.NgModel, i3.NgModelGroup, i3.NgForm, i4.MatTooltip, i4.TooltipComponent, i5.Dir, i6.CdkScrollable, i7.TranslateDirective, i8.SelectBoxComponent, i8.SelectEnumComponent, i8.InputTextComponent, i8.InputPasswordComponent, i8.InputAvatarComponent, i8.InputFileComponent, i8.CustomSelectComponent, i8.FieldComponent, ArraySessionComponent,
1920
- SchemaArrayComponent,
1921
- FieldRenderComponent,
1922
- InputRenderComponent,
1923
- BooleanInputComponent,
1924
- NumberInputComponent,
1925
- SchemaInputComponent,
1926
- SchemaObjectComponent,
1927
- SchemaFormRenderComponent,
1928
- SchemaFormComponent,
1803
+ var SchemaFormRenderModule = /** @class */ (function () {
1804
+ function SchemaFormRenderModule() {
1805
+ }
1806
+ return SchemaFormRenderModule;
1807
+ }());
1808
+ SchemaFormRenderModule.ɵmod = i0.ɵɵdefineNgModule({ type: SchemaFormRenderModule });
1809
+ SchemaFormRenderModule.ɵinj = i0.ɵɵdefineInjector({ factory: function SchemaFormRenderModule_Factory(t) { return new (t || SchemaFormRenderModule)(); }, providers: [
1810
+ SchemaFieldsService
1811
+ ], imports: [[
1812
+ i1.CommonModule,
1813
+ i2.DndModule,
1814
+ i3.FormsModule,
1815
+ i4.MatTooltipModule,
1816
+ i7.TranslateModule,
1817
+ i8.InputsModule
1818
+ ]] });
1819
+ (function () {
1820
+ (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SchemaFormRenderModule, { declarations: [ArraySessionComponent,
1821
+ SchemaArrayComponent,
1822
+ FieldRenderComponent,
1823
+ InputRenderComponent,
1824
+ BooleanInputComponent,
1825
+ NumberInputComponent,
1826
+ SchemaInputComponent,
1827
+ SchemaObjectComponent,
1828
+ SchemaFormRenderComponent,
1829
+ SchemaFormComponent,
1830
+ SchemaCustomAttributesComponent], imports: [i1.CommonModule,
1831
+ i2.DndModule,
1832
+ i3.FormsModule,
1833
+ i4.MatTooltipModule,
1834
+ i7.TranslateModule,
1835
+ i8.InputsModule], exports: [ArraySessionComponent,
1836
+ SchemaArrayComponent,
1837
+ FieldRenderComponent,
1838
+ InputRenderComponent,
1839
+ BooleanInputComponent,
1840
+ NumberInputComponent,
1841
+ SchemaInputComponent,
1842
+ SchemaObjectComponent,
1843
+ SchemaFormRenderComponent,
1844
+ SchemaFormComponent,
1845
+ SchemaCustomAttributesComponent] });
1846
+ })();
1847
+ /*@__PURE__*/ (function () {
1848
+ i0.ɵsetClassMetadata(SchemaFormRenderModule, [{
1849
+ type: i0.NgModule,
1850
+ args: [{
1851
+ imports: [
1852
+ i1.CommonModule,
1853
+ i2.DndModule,
1854
+ i3.FormsModule,
1855
+ i4.MatTooltipModule,
1856
+ i7.TranslateModule,
1857
+ i8.InputsModule
1858
+ ],
1859
+ declarations: [
1860
+ ArraySessionComponent,
1861
+ SchemaArrayComponent,
1862
+ FieldRenderComponent,
1863
+ InputRenderComponent,
1864
+ BooleanInputComponent,
1865
+ NumberInputComponent,
1866
+ SchemaInputComponent,
1867
+ SchemaObjectComponent,
1868
+ SchemaFormRenderComponent,
1869
+ SchemaFormComponent,
1870
+ SchemaCustomAttributesComponent
1871
+ ],
1872
+ exports: [
1873
+ ArraySessionComponent,
1874
+ SchemaArrayComponent,
1875
+ FieldRenderComponent,
1876
+ InputRenderComponent,
1877
+ BooleanInputComponent,
1878
+ NumberInputComponent,
1879
+ SchemaInputComponent,
1880
+ SchemaObjectComponent,
1881
+ SchemaFormRenderComponent,
1882
+ SchemaFormComponent,
1883
+ SchemaCustomAttributesComponent
1884
+ ],
1885
+ providers: [
1886
+ SchemaFieldsService
1887
+ ]
1888
+ }]
1889
+ }], null, null);
1890
+ })();
1891
+ i0.ɵɵsetComponentScope(SchemaFormComponent, [i1.NgClass, i1.NgComponentOutlet, i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, i1.NgSwitch, i1.NgSwitchCase, i1.NgSwitchDefault, i1.NgPlural, i1.NgPluralCase, i2.DndDraggableDirective, i2.DndDropzoneDirective, i2.DndHandleDirective, i2.DndPlaceholderRefDirective, i2.DndDragImageRefDirective, i3.ɵangular_packages_forms_forms_y, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.RangeValueAccessor, i3.CheckboxControlValueAccessor, i3.SelectControlValueAccessor, i3.SelectMultipleControlValueAccessor, i3.RadioControlValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.RequiredValidator, i3.MinLengthValidator, i3.MaxLengthValidator, i3.PatternValidator, i3.CheckboxRequiredValidator, i3.EmailValidator, i3.NgModel, i3.NgModelGroup, i3.NgForm, i4.MatTooltip, i4.TooltipComponent, i5.Dir, i6.CdkScrollable, i7.TranslateDirective, i8.SelectBoxComponent, i8.SelectEnumComponent, i8.InputTextComponent, i8.InputPasswordComponent, i8.InputAvatarComponent, i8.InputFileComponent, i8.CustomSelectComponent, i8.FieldComponent, ArraySessionComponent,
1892
+ SchemaArrayComponent,
1893
+ FieldRenderComponent,
1894
+ InputRenderComponent,
1895
+ BooleanInputComponent,
1896
+ NumberInputComponent,
1897
+ SchemaInputComponent,
1898
+ SchemaObjectComponent,
1899
+ SchemaFormRenderComponent,
1900
+ SchemaFormComponent,
1929
1901
  SchemaCustomAttributesComponent], [i1.AsyncPipe, i1.UpperCasePipe, i1.LowerCasePipe, i1.JsonPipe, i1.SlicePipe, i1.DecimalPipe, i1.PercentPipe, i1.TitleCasePipe, i1.CurrencyPipe, i1.DatePipe, i1.I18nPluralPipe, i1.I18nSelectPipe, i1.KeyValuePipe, i7.TranslatePipe]);
1930
1902
 
1931
- var TypeScriptCompile = /** @class */ (function () {
1932
- function TypeScriptCompile() {
1933
- }
1934
- TypeScriptCompile.addItemToFormProperties = function (formProperties, item, key) {
1935
- if (item.minLength && item.minLength > 0) {
1936
- formProperties[key] = new i3.FormControl([null, [i3.Validators.required]]);
1937
- }
1938
- else {
1939
- formProperties[key] = new i3.FormControl([null]);
1940
- }
1941
- };
1942
- TypeScriptCompile.compileProperties = function (input) {
1943
- var compiledProperties = [];
1944
- var formProperties = {};
1945
- var inputData = {};
1946
- var inputToCompile = JSON.parse(JSON.stringify(input));
1947
- if (inputToCompile.properties) {
1948
- if (inputToCompile.type === 'array') {
1949
- inputData = [];
1950
- }
1951
- if (inputToCompile.type === 'object') {
1952
- inputData = {};
1953
- }
1954
- inputToCompile.id = 'inputData';
1955
- this.proccessProperties(inputToCompile, formProperties, 'inputData');
1956
- compiledProperties.push(inputToCompile);
1957
- }
1958
- else if (inputToCompile.type === 'array') {
1959
- inputToCompile.id = 'inputData';
1960
- inputData = [];
1961
- TypeScriptCompile.addItemToFormProperties(formProperties, inputToCompile, 'inputData');
1962
- compiledProperties.push(inputToCompile);
1963
- }
1964
- else if (!inputToCompile.type) {
1965
- for (var index = 0; index < Object.keys(inputToCompile).length; index++) {
1966
- var key = Object.keys(inputToCompile)[index];
1967
- var item = inputToCompile[key];
1968
- item.id = key;
1969
- if (item.type === 'array') {
1970
- inputData[item.id] = [];
1971
- }
1972
- if (item.type === 'object') {
1973
- inputData[item.id] = {};
1974
- }
1975
- this.proccessProperties(item, formProperties, key);
1976
- compiledProperties.push(item);
1977
- }
1978
- }
1979
- compiledProperties.sort(function (a, b) { return a.propertyOrder - b.propertyOrder; });
1980
- return { compiledProperties: compiledProperties, formProperties: formProperties, inputData: inputData };
1981
- };
1982
- TypeScriptCompile.proccessProperties = function (item, formProperties, key) {
1983
- if (this.hasProperties(item)) {
1984
- var arFieldsChild = [];
1985
- for (var indexChild = 0; indexChild < Object.keys(item.properties).length; indexChild++) {
1986
- var keyChild = Object.keys(item.properties)[indexChild];
1987
- var itemChild = item.properties[keyChild];
1988
- itemChild.id = keyChild;
1989
- if (this.hasProperties(itemChild)) {
1990
- this.proccessProperties(itemChild, formProperties, keyChild);
1991
- arFieldsChild.push(itemChild);
1992
- }
1993
- else {
1994
- TypeScriptCompile.addItemToFormProperties(formProperties, itemChild, keyChild);
1995
- arFieldsChild.push(itemChild);
1996
- }
1997
- }
1998
- item.properties = arFieldsChild;
1999
- }
2000
- else {
2001
- TypeScriptCompile.addItemToFormProperties(formProperties, item, key);
2002
- }
2003
- };
2004
- TypeScriptCompile.hasProperties = function (item) {
2005
- return item.type === 'object' || (item.type === 'array' && item.properties);
2006
- };
2007
- return TypeScriptCompile;
1903
+ var TypeScriptCompile = /** @class */ (function () {
1904
+ function TypeScriptCompile() {
1905
+ }
1906
+ TypeScriptCompile.addItemToFormProperties = function (formProperties, item, key) {
1907
+ if (item.minLength && item.minLength > 0) {
1908
+ formProperties[key] = new i3.FormControl([null, [i3.Validators.required]]);
1909
+ }
1910
+ else {
1911
+ formProperties[key] = new i3.FormControl([null]);
1912
+ }
1913
+ };
1914
+ TypeScriptCompile.compileProperties = function (input) {
1915
+ var compiledProperties = [];
1916
+ var formProperties = {};
1917
+ var inputData = {};
1918
+ var inputToCompile = JSON.parse(JSON.stringify(input));
1919
+ if (inputToCompile.properties) {
1920
+ if (inputToCompile.type === 'array') {
1921
+ inputData = [];
1922
+ }
1923
+ if (inputToCompile.type === 'object') {
1924
+ inputData = {};
1925
+ }
1926
+ inputToCompile.id = 'inputData';
1927
+ this.proccessProperties(inputToCompile, formProperties, 'inputData');
1928
+ compiledProperties.push(inputToCompile);
1929
+ }
1930
+ else if (inputToCompile.type === 'array') {
1931
+ inputToCompile.id = 'inputData';
1932
+ inputData = [];
1933
+ TypeScriptCompile.addItemToFormProperties(formProperties, inputToCompile, 'inputData');
1934
+ compiledProperties.push(inputToCompile);
1935
+ }
1936
+ else if (!inputToCompile.type) {
1937
+ for (var index = 0; index < Object.keys(inputToCompile).length; index++) {
1938
+ var key = Object.keys(inputToCompile)[index];
1939
+ var item = inputToCompile[key];
1940
+ item.id = key;
1941
+ if (item.type === 'array') {
1942
+ inputData[item.id] = [];
1943
+ }
1944
+ if (item.type === 'object') {
1945
+ inputData[item.id] = {};
1946
+ }
1947
+ this.proccessProperties(item, formProperties, key);
1948
+ compiledProperties.push(item);
1949
+ }
1950
+ }
1951
+ compiledProperties.sort(function (a, b) { return a.propertyOrder - b.propertyOrder; });
1952
+ return { compiledProperties: compiledProperties, formProperties: formProperties, inputData: inputData };
1953
+ };
1954
+ TypeScriptCompile.proccessProperties = function (item, formProperties, key) {
1955
+ if (this.hasProperties(item)) {
1956
+ var arFieldsChild = [];
1957
+ for (var indexChild = 0; indexChild < Object.keys(item.properties).length; indexChild++) {
1958
+ var keyChild = Object.keys(item.properties)[indexChild];
1959
+ var itemChild = item.properties[keyChild];
1960
+ itemChild.id = keyChild;
1961
+ if (this.hasProperties(itemChild)) {
1962
+ this.proccessProperties(itemChild, formProperties, keyChild);
1963
+ arFieldsChild.push(itemChild);
1964
+ }
1965
+ else {
1966
+ TypeScriptCompile.addItemToFormProperties(formProperties, itemChild, keyChild);
1967
+ arFieldsChild.push(itemChild);
1968
+ }
1969
+ }
1970
+ item.properties = arFieldsChild;
1971
+ }
1972
+ else {
1973
+ TypeScriptCompile.addItemToFormProperties(formProperties, item, key);
1974
+ }
1975
+ };
1976
+ TypeScriptCompile.hasProperties = function (item) {
1977
+ return item.type === 'object' || (item.type === 'array' && item.properties);
1978
+ };
1979
+ return TypeScriptCompile;
2008
1980
  }());
2009
1981
 
2010
- /**
2011
- * Generated bundle index. Do not edit.
1982
+ /**
1983
+ * Generated bundle index. Do not edit.
2012
1984
  */
2013
1985
 
2014
1986
  exports.ArraySessionComponent = ArraySessionComponent;