@apipass/schemas 0.2.1-alpha.4 → 0.2.1-test.2

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 +112 -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 +11 -11
  10. package/bundles/apipass-schemas.umd.js +1969 -1921
  11. package/bundles/apipass-schemas.umd.js.map +1 -1
  12. package/bundles/apipass-schemas.umd.min.js +1 -1
  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 +32 -30
  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 +158 -158
  20. package/esm2015/schema-form/schema-array/schema-array.js +196 -195
  21. package/esm2015/schema-form/schema-form.js +104 -72
  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 +45 -45
  24. package/esm2015/schema-form/schema-input/input-render/input-render.js +124 -124
  25. package/esm2015/schema-form/schema-input/input-render/number-input/number-input.component.js +43 -43
  26. package/esm2015/schema-form/schema-input/schema-input.js +100 -98
  27. package/esm2015/schema-form/schema-object/schema-object.js +95 -94
  28. package/esm2015/schema-form-render.js +97 -96
  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 +1398 -1359
  34. package/fesm2015/apipass-schemas.js.map +1 -1
  35. package/package.json +1 -2
  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 +13 -13
  44. package/schema-form/schema-input/input-render/input-render.d.ts +19 -19
  45. package/schema-form/schema-input/input-render/number-input/number-input.component.d.ts +13 -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
@@ -4,1963 +4,2011 @@
4
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
5
  }(this, (function (exports, i0, i1, i3, i7, i4, i2, 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
- property.canRender = (property === null || property === void 0 ? void 0 : property.conditionExpression) ? eval(property.conditionExpression) : true;
318
- return property.canRender;
319
- };
320
- return BaseSchemaComponent;
321
- }());
322
- BaseSchemaComponent.ɵfac = function BaseSchemaComponent_Factory(t) { return new (t || BaseSchemaComponent)(); };
323
- 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 });
324
- /*@__PURE__*/ (function () {
325
- i0.ɵsetClassMetadata(BaseSchemaComponent, [{
326
- type: i0.Component,
327
- args: [{
328
- template: ''
329
- }]
330
- }], null, { model: [{
331
- type: i0.Input
332
- }], schema: [{
333
- type: i0.Input
334
- }], modelChange: [{
335
- type: i0.Output
336
- }] });
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
+ }] });
337
339
  })();
338
340
 
339
- function onDropStruct(event, attr) {
340
- var data = event.data;
341
- if (!attr) {
342
- attr = '';
343
- }
344
- attr += "{{" + data + "}}";
345
- return attr;
341
+ function onDropStruct(event, attr) {
342
+ var data = event.data;
343
+ if (!attr) {
344
+ attr = '';
345
+ }
346
+ attr += "{{" + data + "}}";
347
+ return attr;
346
348
  }
347
349
 
348
- var _c0 = function () { return { standalone: true }; };
349
- function ArraySessionComponent_div_5_div_5_Template(rf, ctx) {
350
- if (rf & 1) {
351
- var _r8_1 = i0.ɵɵgetCurrentView();
352
- i0.ɵɵelementStart(0, "div", 0);
353
- i0.ɵɵelementStart(1, "div", 12);
354
- i0.ɵɵelementStart(2, "label", 13);
355
- i0.ɵɵtext(3, "Loop");
356
- i0.ɵɵelementEnd();
357
- i0.ɵɵelementStart(4, "input", 14);
358
- 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; });
359
- i0.ɵɵelementEnd();
360
- i0.ɵɵelementEnd();
361
- i0.ɵɵelementStart(5, "div", 15);
362
- i0.ɵɵelementStart(6, "label", 13);
363
- i0.ɵɵtext(7, "Alias");
364
- i0.ɵɵelementEnd();
365
- i0.ɵɵelementStart(8, "input", 14);
366
- 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; });
367
- i0.ɵɵelementEnd();
368
- i0.ɵɵelementEnd();
369
- i0.ɵɵelementEnd();
370
- }
371
- if (rf & 2) {
372
- var item_r2 = i0.ɵɵnextContext().$implicit;
373
- i0.ɵɵadvance(4);
374
- i0.ɵɵproperty("ngModel", item_r2.loop)("ngModelOptions", i0.ɵɵpureFunction0(4, _c0));
375
- i0.ɵɵadvance(4);
376
- i0.ɵɵproperty("ngModel", item_r2.alias)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0));
377
- }
378
- }
379
- function ArraySessionComponent_div_5_ng_container_6_Template(rf, ctx) {
380
- if (rf & 1) {
381
- i0.ɵɵelementContainer(0);
382
- }
383
- }
384
- var _c1 = function (a0, a1, a2) { return { items: a0, index: a1, mappingAttributes: a2 }; };
385
- var _c2 = function (a0) { return { $implicit: a0 }; };
386
- function ArraySessionComponent_div_5_Template(rf, ctx) {
387
- if (rf & 1) {
388
- var _r13_1 = i0.ɵɵgetCurrentView();
389
- i0.ɵɵelementStart(0, "div", 7);
390
- i0.ɵɵelementStart(1, "div", 8);
391
- i0.ɵɵtext(2);
392
- i0.ɵɵpipe(3, "translate");
393
- i0.ɵɵelementStart(4, "i", 9);
394
- 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); });
395
- i0.ɵɵelementEnd();
396
- i0.ɵɵelementEnd();
397
- i0.ɵɵtemplate(5, ArraySessionComponent_div_5_div_5_Template, 9, 6, "div", 10);
398
- i0.ɵɵtemplate(6, ArraySessionComponent_div_5_ng_container_6_Template, 1, 0, "ng-container", 11);
399
- i0.ɵɵelementEnd();
400
- }
401
- if (rf & 2) {
402
- var item_r2 = ctx.$implicit;
403
- var index_r3 = ctx.index;
404
- var ctx_r0 = i0.ɵɵnextContext();
405
- i0.ɵɵadvance(2);
406
- i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(3, 5, ctx_r0.removeLabel), " ", index_r3 + 1, " ");
407
- i0.ɵɵadvance(3);
408
- i0.ɵɵproperty("ngIf", item_r2.mappingAttributes || item_r2.mappingAttributes === "");
409
- i0.ɵɵadvance(1);
410
- 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)));
411
- }
412
- }
413
- function ArraySessionComponent_button_11_Template(rf, ctx) {
414
- if (rf & 1) {
415
- var _r15_1 = i0.ɵɵgetCurrentView();
416
- i0.ɵɵelementStart(0, "button", 16);
417
- 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(); });
418
- i0.ɵɵtext(1);
419
- i0.ɵɵpipe(2, "translate");
420
- i0.ɵɵelementEnd();
421
- }
422
- if (rf & 2) {
423
- i0.ɵɵadvance(1);
424
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "ADD_LOOP"));
425
- }
426
- }
427
- var ArraySessionComponent = /** @class */ (function (_super) {
428
- __extends(ArraySessionComponent, _super);
429
- function ArraySessionComponent() {
430
- var _this = _super.apply(this, __spread(arguments)) || this;
431
- _this.label = '';
432
- _this.showAddLoop = true;
433
- _this.removeLabel = '';
434
- _this.onAdd = new i0.EventEmitter();
435
- _this.onAddLoop = new i0.EventEmitter();
436
- return _this;
437
- }
438
- ArraySessionComponent.prototype.add = function () {
439
- this.onAdd.next();
440
- };
441
- ArraySessionComponent.prototype.addLoop = function () {
442
- this.onAddLoop.next();
443
- };
444
- ArraySessionComponent.prototype.remove = function (item) {
445
- var values = this.model;
446
- var index = values.indexOf(item);
447
- values.splice(index, 1);
448
- this.model = values;
449
- };
450
- ArraySessionComponent.prototype.trackByIndex = function (index, obj) {
451
- return index;
452
- };
453
- return ArraySessionComponent;
454
- }(BaseSchemaComponent));
455
- ArraySessionComponent.ɵfac = function ArraySessionComponent_Factory(t) { return ɵArraySessionComponent_BaseFactory(t || ArraySessionComponent); };
456
- ArraySessionComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ArraySessionComponent, selectors: [["array-session"]], contentQueries: function ArraySessionComponent_ContentQueries(rf, ctx, dirIndex) {
457
- if (rf & 1) {
458
- i0.ɵɵcontentQuery(dirIndex, i0.TemplateRef, true, i0.TemplateRef);
459
- }
460
- if (rf & 2) {
461
- var _t;
462
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.subsectionItem = _t.first);
463
- }
464
- }, 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) {
465
- if (rf & 1) {
466
- i0.ɵɵelementStart(0, "div", 0);
467
- i0.ɵɵelementStart(1, "div", 1);
468
- i0.ɵɵelementStart(2, "label", 2);
469
- i0.ɵɵtext(3);
470
- i0.ɵɵpipe(4, "translate");
471
- i0.ɵɵelementEnd();
472
- i0.ɵɵtemplate(5, ArraySessionComponent_div_5_Template, 7, 13, "div", 3);
473
- i0.ɵɵelementEnd();
474
- i0.ɵɵelementEnd();
475
- i0.ɵɵelementStart(6, "div", 4);
476
- i0.ɵɵelementStart(7, "div", 1);
477
- i0.ɵɵelementStart(8, "button", 5);
478
- i0.ɵɵlistener("click", function ArraySessionComponent_Template_button_click_8_listener() { return ctx.add(); });
479
- i0.ɵɵtext(9);
480
- i0.ɵɵpipe(10, "translate");
481
- i0.ɵɵelementEnd();
482
- i0.ɵɵtemplate(11, ArraySessionComponent_button_11_Template, 3, 3, "button", 6);
483
- i0.ɵɵelementEnd();
484
- i0.ɵɵelementEnd();
485
- }
486
- if (rf & 2) {
487
- i0.ɵɵadvance(3);
488
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, ctx.label));
489
- i0.ɵɵadvance(2);
490
- i0.ɵɵproperty("ngForOf", ctx.model)("ngForTrackBy", ctx.trackByIndex);
491
- i0.ɵɵadvance(4);
492
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 7, "ADD_ITEM"));
493
- i0.ɵɵadvance(2);
494
- i0.ɵɵproperty("ngIf", ctx.showAddLoop);
495
- }
496
- }, 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}"] });
497
- var ɵArraySessionComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ArraySessionComponent);
498
- /*@__PURE__*/ (function () {
499
- i0.ɵsetClassMetadata(ArraySessionComponent, [{
500
- type: i0.Component,
501
- args: [{
502
- selector: 'array-session',
503
- templateUrl: 'array-session.html',
504
- styleUrls: ['array-session.scss']
505
- }]
506
- }], null, { label: [{
507
- type: i0.Input
508
- }], showAddLoop: [{
509
- type: i0.Input
510
- }], removeLabel: [{
511
- type: i0.Input
512
- }], onAdd: [{
513
- type: i0.Output
514
- }], onAddLoop: [{
515
- type: i0.Output
516
- }], subsectionItem: [{
517
- type: i0.ContentChild,
518
- args: [i0.TemplateRef, { read: i0.TemplateRef }]
519
- }] });
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
+ }] });
520
522
  })();
521
523
 
522
- function SchemaFormComponent_div_0_Template(rf, ctx) {
523
- if (rf & 1) {
524
- var _r4_1 = i0.ɵɵgetCurrentView();
525
- i0.ɵɵelementStart(0, "div", 1);
526
- i0.ɵɵelementStart(1, "schema-input", 2);
527
- 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; });
528
- i0.ɵɵelementEnd();
529
- i0.ɵɵelementStart(2, "schema-object", 2);
530
- 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; });
531
- i0.ɵɵelementEnd();
532
- i0.ɵɵelementStart(3, "schema-array", 2);
533
- 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; });
534
- i0.ɵɵelementEnd();
535
- i0.ɵɵelementEnd();
536
- }
537
- if (rf & 2) {
538
- var schema_r1 = ctx.$implicit;
539
- var i_r2 = ctx.index;
540
- var ctx_r0 = i0.ɵɵnextContext();
541
- i0.ɵɵadvance(1);
542
- i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
543
- i0.ɵɵadvance(1);
544
- i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
545
- i0.ɵɵadvance(1);
546
- i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schema", schema_r1)("editing", ctx_r0.editing)("index", i_r2);
547
- }
548
- }
549
- var SchemaFormComponent = /** @class */ (function (_super) {
550
- __extends(SchemaFormComponent, _super);
551
- function SchemaFormComponent() {
552
- var _this = _super.apply(this, __spread(arguments)) || this;
553
- _this.schemas = [];
554
- _this.customProperties = false;
555
- _this.editing = false;
556
- _this.loaded = false;
557
- return _this;
558
- }
559
- SchemaFormComponent.prototype.ngAfterContentInit = function () {
560
- this.loaded = true;
561
- };
562
- SchemaFormComponent.prototype.onDrop = function ($event, modelElement) {
563
- return onDropStruct($event, modelElement);
564
- };
565
- SchemaFormComponent.prototype.getId = function (index) {
566
- return this.idPrefix + "-struct-" + index;
567
- };
568
- return SchemaFormComponent;
569
- }(BaseSchemaComponent));
570
- SchemaFormComponent.ɵfac = function SchemaFormComponent_Factory(t) { return ɵSchemaFormComponent_BaseFactory(t || SchemaFormComponent); };
571
- 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) {
572
- if (rf & 1) {
573
- i0.ɵɵtemplate(0, SchemaFormComponent_div_0_Template, 4, 15, "div", 0);
574
- }
575
- if (rf & 2) {
576
- i0.ɵɵproperty("ngForOf", ctx.schemas);
577
- }
578
- }, styles: [""] });
579
- var ɵSchemaFormComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaFormComponent);
580
- /*@__PURE__*/ (function () {
581
- i0.ɵsetClassMetadata(SchemaFormComponent, [{
582
- type: i0.Component,
583
- args: [{
584
- selector: 'schema-form',
585
- templateUrl: 'schema-form.html',
586
- styleUrls: ['./schema-form.scss']
587
- }]
588
- }], null, { idPrefix: [{
589
- type: i0.Input
590
- }], schemas: [{
591
- type: i0.Input
592
- }], customProperties: [{
593
- type: i0.Input
594
- }], editing: [{
595
- type: i0.Input
596
- }], inputType: [{
597
- type: i0.Input
598
- }] });
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
+ }] });
599
642
  })();
600
643
 
601
- var _c0$1 = function () { return { standalone: true }; };
602
- function SchemaCustomAttributesComponent_div_0_Template(rf, ctx) {
603
- if (rf & 1) {
604
- var _r8_1 = i0.ɵɵgetCurrentView();
605
- i0.ɵɵelementStart(0, "div", 6);
606
- i0.ɵɵelementStart(1, "div", 7);
607
- i0.ɵɵelementStart(2, "label", 8);
608
- i0.ɵɵtext(3);
609
- i0.ɵɵelementEnd();
610
- i0.ɵɵelementStart(4, "span", 9);
611
- 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); });
612
- i0.ɵɵelement(5, "i", 10);
613
- i0.ɵɵpipe(6, "translate");
614
- i0.ɵɵelementEnd();
615
- i0.ɵɵelementStart(7, "input", 11);
616
- 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); });
617
- i0.ɵɵelementEnd();
618
- i0.ɵɵelementEnd();
619
- i0.ɵɵelementEnd();
620
- }
621
- if (rf & 2) {
622
- var attribute_r5 = ctx.$implicit;
623
- i0.ɵɵadvance(3);
624
- i0.ɵɵtextInterpolate(attribute_r5.label);
625
- i0.ɵɵadvance(2);
626
- i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(6, 4, "REMOVE"));
627
- i0.ɵɵadvance(2);
628
- i0.ɵɵproperty("ngModel", attribute_r5.value)("ngModelOptions", i0.ɵɵpureFunction0(6, _c0$1));
629
- }
630
- }
631
- function SchemaCustomAttributesComponent_div_1_Template(rf, ctx) {
632
- if (rf & 1) {
633
- var _r12_1 = i0.ɵɵgetCurrentView();
634
- i0.ɵɵelementStart(0, "div", 12);
635
- i0.ɵɵelementStart(1, "div", 13);
636
- i0.ɵɵelementStart(2, "div", 7);
637
- i0.ɵɵelementStart(3, "label", 8);
638
- i0.ɵɵtext(4);
639
- i0.ɵɵpipe(5, "translate");
640
- i0.ɵɵelementStart(6, "strong");
641
- i0.ɵɵtext(7, "*");
642
- i0.ɵɵelementEnd();
643
- i0.ɵɵelementEnd();
644
- i0.ɵɵelementStart(8, "input", 14);
645
- 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; });
646
- i0.ɵɵelementEnd();
647
- i0.ɵɵelementEnd();
648
- i0.ɵɵelementEnd();
649
- i0.ɵɵelementStart(9, "div", 13);
650
- i0.ɵɵelementStart(10, "div", 7);
651
- i0.ɵɵelementStart(11, "label", 8);
652
- i0.ɵɵtext(12);
653
- i0.ɵɵpipe(13, "translate");
654
- i0.ɵɵelementStart(14, "strong");
655
- i0.ɵɵtext(15, "*");
656
- i0.ɵɵelementEnd();
657
- i0.ɵɵelementEnd();
658
- i0.ɵɵelementStart(16, "input", 11);
659
- 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); });
660
- i0.ɵɵelementEnd();
661
- i0.ɵɵelementEnd();
662
- i0.ɵɵelementEnd();
663
- i0.ɵɵelementEnd();
664
- }
665
- if (rf & 2) {
666
- var ctx_r1 = i0.ɵɵnextContext();
667
- i0.ɵɵadvance(4);
668
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 6, "STEP.NAME"));
669
- i0.ɵɵadvance(4);
670
- i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.label)("ngModelOptions", i0.ɵɵpureFunction0(10, _c0$1));
671
- i0.ɵɵadvance(4);
672
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 8, "STEP.VALUE"));
673
- i0.ɵɵadvance(4);
674
- i0.ɵɵproperty("ngModel", ctx_r1.newCustomField.value)("ngModelOptions", i0.ɵɵpureFunction0(11, _c0$1));
675
- }
676
- }
677
- function SchemaCustomAttributesComponent_button_4_Template(rf, ctx) {
678
- if (rf & 1) {
679
- var _r16_1 = i0.ɵɵgetCurrentView();
680
- i0.ɵɵelementStart(0, "button", 15);
681
- 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 = {}; });
682
- i0.ɵɵtext(1);
683
- i0.ɵɵpipe(2, "translate");
684
- i0.ɵɵelementEnd();
685
- }
686
- if (rf & 2) {
687
- i0.ɵɵadvance(1);
688
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "ADD"), " ");
689
- }
690
- }
691
- function SchemaCustomAttributesComponent_button_5_Template(rf, ctx) {
692
- if (rf & 1) {
693
- var _r18_1 = i0.ɵɵgetCurrentView();
694
- i0.ɵɵelementStart(0, "button", 16);
695
- 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; });
696
- i0.ɵɵtext(1);
697
- i0.ɵɵpipe(2, "translate");
698
- i0.ɵɵelementEnd();
699
- }
700
- if (rf & 2) {
701
- i0.ɵɵadvance(1);
702
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "CANCEL"), " ");
703
- }
704
- }
705
- function SchemaCustomAttributesComponent_button_6_Template(rf, ctx) {
706
- if (rf & 1) {
707
- var _r20_1 = i0.ɵɵgetCurrentView();
708
- i0.ɵɵelementStart(0, "button", 15);
709
- 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); });
710
- i0.ɵɵtext(1);
711
- i0.ɵɵpipe(2, "translate");
712
- i0.ɵɵelementEnd();
713
- }
714
- if (rf & 2) {
715
- i0.ɵɵadvance(1);
716
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "SAVE"), " ");
717
- }
718
- }
719
- var SchemaCustomAttributesComponent = /** @class */ (function (_super) {
720
- __extends(SchemaCustomAttributesComponent, _super);
721
- function SchemaCustomAttributesComponent() {
722
- var _this = _super.apply(this, __spread(arguments)) || this;
723
- _this.onSaveAttribute = new i0.EventEmitter();
724
- _this.onDropOnAttribute = new i0.EventEmitter();
725
- return _this;
726
- }
727
- SchemaCustomAttributesComponent.prototype.ngAfterContentInit = function () {
728
- if (!this.model) {
729
- this.model = [];
730
- }
731
- };
732
- SchemaCustomAttributesComponent.prototype.saveNewAttribute = function (newCustomField) {
733
- this.onSaveAttribute.emit(newCustomField);
734
- this.model.push(newCustomField);
735
- this.newCustomField = null;
736
- this.modelChange.emit(this.model);
737
- };
738
- SchemaCustomAttributesComponent.prototype.removeCustomAttribute = function (attributeIndex) {
739
- this.model.splice(attributeIndex, 1);
740
- this.modelChange.emit(this.model);
741
- };
742
- SchemaCustomAttributesComponent.prototype.onDrop = function ($event, attribute) {
743
- if (!attribute.value) {
744
- attribute.value = '';
745
- }
746
- attribute.value += "{{" + $event.data + "}}";
747
- };
748
- return SchemaCustomAttributesComponent;
749
- }(BaseSchemaComponent));
750
- SchemaCustomAttributesComponent.ɵfac = function SchemaCustomAttributesComponent_Factory(t) { return ɵSchemaCustomAttributesComponent_BaseFactory(t || SchemaCustomAttributesComponent); };
751
- 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) {
752
- if (rf & 1) {
753
- i0.ɵɵtemplate(0, SchemaCustomAttributesComponent_div_0_Template, 8, 7, "div", 0);
754
- i0.ɵɵtemplate(1, SchemaCustomAttributesComponent_div_1_Template, 17, 12, "div", 1);
755
- i0.ɵɵelementStart(2, "div", 2);
756
- i0.ɵɵelementStart(3, "div", 3);
757
- i0.ɵɵtemplate(4, SchemaCustomAttributesComponent_button_4_Template, 3, 3, "button", 4);
758
- i0.ɵɵtemplate(5, SchemaCustomAttributesComponent_button_5_Template, 3, 3, "button", 5);
759
- i0.ɵɵtemplate(6, SchemaCustomAttributesComponent_button_6_Template, 3, 3, "button", 4);
760
- i0.ɵɵelementEnd();
761
- i0.ɵɵelementEnd();
762
- }
763
- if (rf & 2) {
764
- i0.ɵɵproperty("ngForOf", ctx.model);
765
- i0.ɵɵadvance(1);
766
- i0.ɵɵproperty("ngIf", ctx.newCustomField);
767
- i0.ɵɵadvance(3);
768
- i0.ɵɵproperty("ngIf", !ctx.newCustomField);
769
- i0.ɵɵadvance(1);
770
- i0.ɵɵproperty("ngIf", ctx.newCustomField);
771
- i0.ɵɵadvance(1);
772
- i0.ɵɵproperty("ngIf", ctx.newCustomField && ctx.newCustomField.label && ctx.newCustomField.value);
773
- }
774
- }, 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}"] });
775
- var ɵSchemaCustomAttributesComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaCustomAttributesComponent);
776
- /*@__PURE__*/ (function () {
777
- i0.ɵsetClassMetadata(SchemaCustomAttributesComponent, [{
778
- type: i0.Component,
779
- args: [{
780
- selector: 'schema-custom-attributes',
781
- templateUrl: 'schema-custom-attributes.html',
782
- styleUrls: ['./schema-custom-attributes.scss']
783
- }]
784
- }], null, { onDropFunction: [{
785
- type: i0.Input
786
- }], onSaveAttribute: [{
787
- type: i0.Output
788
- }], onDropOnAttribute: [{
789
- type: i0.Output
790
- }] });
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
+ }] });
791
834
  })();
792
835
 
793
- function SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template(rf, ctx) {
794
- if (rf & 1) {
795
- var _r8_1 = i0.ɵɵgetCurrentView();
796
- i0.ɵɵelementStart(0, "schema-form", 4);
797
- 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; });
798
- i0.ɵɵelementEnd();
799
- }
800
- if (rf & 2) {
801
- var item_r3 = i0.ɵɵnextContext().$implicit;
802
- var ctx_r4 = i0.ɵɵnextContext(2);
803
- 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);
804
- }
805
- }
806
- function SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template(rf, ctx) {
807
- if (rf & 1) {
808
- var _r12_1 = i0.ɵɵgetCurrentView();
809
- i0.ɵɵelementStart(0, "schema-form", 4);
810
- 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); });
811
- i0.ɵɵelementEnd();
812
- }
813
- if (rf & 2) {
814
- var item_r3 = i0.ɵɵnextContext().$implicit;
815
- var ctx_r5 = i0.ɵɵnextContext(2);
816
- 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);
817
- }
818
- }
819
- function SchemaArrayComponent_div_0_ng_template_2_div_2_Template(rf, ctx) {
820
- if (rf & 1) {
821
- var _r16_1 = i0.ɵɵgetCurrentView();
822
- i0.ɵɵelementStart(0, "div", 5);
823
- i0.ɵɵelementStart(1, "div", 6);
824
- i0.ɵɵelementStart(2, "label", 7);
825
- i0.ɵɵtext(3);
826
- i0.ɵɵpipe(4, "translate");
827
- i0.ɵɵelementEnd();
828
- i0.ɵɵelementStart(5, "schema-custom-attributes", 8);
829
- 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; });
830
- i0.ɵɵelementEnd();
831
- i0.ɵɵelementEnd();
832
- i0.ɵɵelementEnd();
833
- }
834
- if (rf & 2) {
835
- var item_r3 = i0.ɵɵnextContext().$implicit;
836
- var ctx_r6 = i0.ɵɵnextContext(2);
837
- i0.ɵɵadvance(3);
838
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "STEP.ADDITIONAL_ATTRIBUTES"));
839
- i0.ɵɵadvance(2);
840
- i0.ɵɵproperty("model", ctx_r6.model[ctx_r6.schema.id][item_r3.index].customAttributes)("onDropFunction", ctx_r6.onDrop);
841
- }
842
- }
843
- function SchemaArrayComponent_div_0_ng_template_2_Template(rf, ctx) {
844
- if (rf & 1) {
845
- i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_ng_template_2_schema_form_0_Template, 1, 4, "schema-form", 2);
846
- i0.ɵɵtemplate(1, SchemaArrayComponent_div_0_ng_template_2_schema_form_1_Template, 1, 4, "schema-form", 2);
847
- i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_div_2_Template, 6, 5, "div", 3);
848
- }
849
- if (rf & 2) {
850
- var item_r3 = ctx.$implicit;
851
- var ctx_r2 = i0.ɵɵnextContext(2);
852
- i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop !== undefined);
853
- i0.ɵɵadvance(1);
854
- i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index].loop == undefined);
855
- i0.ɵɵadvance(1);
856
- i0.ɵɵproperty("ngIf", ctx_r2.model[ctx_r2.schema.id][item_r3.index] && ctx_r2.schema.customProperties);
857
- }
858
- }
859
- function SchemaArrayComponent_div_0_Template(rf, ctx) {
860
- if (rf & 1) {
861
- var _r20_1 = i0.ɵɵgetCurrentView();
862
- i0.ɵɵelementStart(0, "div");
863
- i0.ɵɵelementStart(1, "array-session", 1);
864
- 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, {}); });
865
- i0.ɵɵtemplate(2, SchemaArrayComponent_div_0_ng_template_2_Template, 3, 3, "ng-template");
866
- i0.ɵɵelementEnd();
867
- i0.ɵɵelementEnd();
868
- }
869
- if (rf & 2) {
870
- var ctx_r0 = i0.ɵɵnextContext();
871
- i0.ɵɵadvance(1);
872
- 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);
873
- }
874
- }
875
- var _c0$2 = function () { return { standalone: true }; };
876
- function SchemaArrayComponent_div_1_ng_template_2_input_3_Template(rf, ctx) {
877
- if (rf & 1) {
878
- var _r30_1 = i0.ɵɵgetCurrentView();
879
- i0.ɵɵelementStart(0, "input", 12);
880
- 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); });
881
- i0.ɵɵelementEnd();
882
- }
883
- if (rf & 2) {
884
- var item_r24 = i0.ɵɵnextContext().$implicit;
885
- var ctx_r25 = i0.ɵɵnextContext(2);
886
- 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);
887
- }
888
- }
889
- function SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template(rf, ctx) {
890
- if (rf & 1) {
891
- var _r36_1 = i0.ɵɵgetCurrentView();
892
- i0.ɵɵelementStart(0, "input", 12);
893
- 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])); });
894
- i0.ɵɵelementEnd();
895
- }
896
- if (rf & 2) {
897
- var item_r24 = i0.ɵɵnextContext().$implicit;
898
- var ctx_r27 = i0.ɵɵnextContext(2);
899
- 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);
900
- }
901
- }
902
- function SchemaArrayComponent_div_1_ng_template_2_Template(rf, ctx) {
903
- if (rf & 1) {
904
- i0.ɵɵelementStart(0, "label", 9);
905
- i0.ɵɵtext(1);
906
- i0.ɵɵpipe(2, "translate");
907
- i0.ɵɵelementEnd();
908
- i0.ɵɵtemplate(3, SchemaArrayComponent_div_1_ng_template_2_input_3_Template, 1, 4, "input", 10);
909
- i0.ɵɵtemplate(4, SchemaArrayComponent_div_1_ng_template_2_ng_template_4_Template, 1, 4, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
910
- }
911
- if (rf & 2) {
912
- var item_r24 = ctx.$implicit;
913
- var _r26 = i0.ɵɵreference(5);
914
- var ctx_r23 = i0.ɵɵnextContext(2);
915
- i0.ɵɵproperty("htmlFor", ctx_r23.getId(ctx_r23.index) + "-" + item_r24.index);
916
- i0.ɵɵadvance(1);
917
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 4, ctx_r23.schema.title));
918
- i0.ɵɵadvance(2);
919
- i0.ɵɵproperty("ngIf", item_r24.items[item_r24.index].mappingAttributes || item_r24.items[item_r24.index].mappingAttributes === "")("ngIfElse", _r26);
920
- }
921
- }
922
- function SchemaArrayComponent_div_1_Template(rf, ctx) {
923
- if (rf & 1) {
924
- var _r41_1 = i0.ɵɵgetCurrentView();
925
- i0.ɵɵelementStart(0, "div");
926
- i0.ɵɵelementStart(1, "array-session", 1);
927
- 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, ""); });
928
- i0.ɵɵtemplate(2, SchemaArrayComponent_div_1_ng_template_2_Template, 6, 6, "ng-template");
929
- i0.ɵɵelementEnd();
930
- i0.ɵɵelementEnd();
931
- }
932
- if (rf & 2) {
933
- var ctx_r1 = i0.ɵɵnextContext();
934
- i0.ɵɵadvance(1);
935
- 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);
936
- }
937
- }
938
- var SchemaArrayComponent = /** @class */ (function (_super) {
939
- __extends(SchemaArrayComponent, _super);
940
- function SchemaArrayComponent() {
941
- var _this = _super.apply(this, __spread(arguments)) || this;
942
- _this.editing = false;
943
- return _this;
944
- }
945
- SchemaArrayComponent.prototype.ngAfterContentInit = function () {
946
- var _a;
947
- if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'array' && this.model && !this.model[this.schema.id]) {
948
- this.model[this.schema.id] = [];
949
- }
950
- this.loaded = true;
951
- };
952
- SchemaArrayComponent.prototype.onDrop = function ($event, modelElement) {
953
- return onDropStruct($event, modelElement);
954
- };
955
- SchemaArrayComponent.prototype.getId = function (index) {
956
- return this.idPrefix + "-struct-" + index;
957
- };
958
- SchemaArrayComponent.prototype.addArrayItem = function (id, param) {
959
- var _this = this;
960
- this.model[id] = this.model[id] || [];
961
- if (this.schema.properties) {
962
- param = {};
963
- Object.keys(this.schema.properties).forEach(function (key) {
964
- var schemaProperty = _this.schema.properties[key];
965
- if (schemaProperty.type === 'object') {
966
- param[schemaProperty.id] = {};
967
- }
968
- else if (schemaProperty.type === 'array') {
969
- param[schemaProperty.id] = [];
970
- }
971
- });
972
- }
973
- this.model[id].push(param);
974
- };
975
- SchemaArrayComponent.prototype.addArrayLoop = function (id, mappingAttributes) {
976
- this.model[id] = this.model[id] || [];
977
- this.model[id].push({ loop: '', alias: '', mappingAttributes: mappingAttributes });
978
- };
979
- return SchemaArrayComponent;
980
- }(BaseSchemaComponent));
981
- SchemaArrayComponent.ɵfac = function SchemaArrayComponent_Factory(t) { return ɵSchemaArrayComponent_BaseFactory(t || SchemaArrayComponent); };
982
- 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) {
983
- if (rf & 1) {
984
- i0.ɵɵtemplate(0, SchemaArrayComponent_div_0_Template, 3, 4, "div", 0);
985
- i0.ɵɵtemplate(1, SchemaArrayComponent_div_1_Template, 3, 4, "div", 0);
986
- }
987
- if (rf & 2) {
988
- i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && ctx.schema.properties);
989
- i0.ɵɵadvance(1);
990
- i0.ɵɵproperty("ngIf", ctx.schema && ctx.canRender(ctx.schema) && ctx.schema.type === "array" && !ctx.schema.properties);
991
- }
992
- }, directives: [i1.NgIf, ArraySessionComponent, SchemaFormComponent, SchemaCustomAttributesComponent, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel], pipes: [i7.TranslatePipe], styles: [""] });
993
- var ɵSchemaArrayComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaArrayComponent);
994
- /*@__PURE__*/ (function () {
995
- i0.ɵsetClassMetadata(SchemaArrayComponent, [{
996
- type: i0.Component,
997
- args: [{
998
- selector: 'schema-array',
999
- templateUrl: 'schema-array.html',
1000
- styleUrls: ['./schema-array.scss']
1001
- }]
1002
- }], null, { idPrefix: [{
1003
- type: i0.Input
1004
- }], schema: [{
1005
- type: i0.Input
1006
- }], editing: [{
1007
- type: i0.Input
1008
- }], index: [{
1009
- type: i0.Input
1010
- }] });
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
+ }] });
1011
1055
  })();
1012
1056
 
1013
- var _c0$3 = function (a0) { return { "has-error": a0 }; };
1014
- function FieldRenderComponent_small_4_Template(rf, ctx) {
1015
- if (rf & 1) {
1016
- i0.ɵɵelementStart(0, "small", 0);
1017
- i0.ɵɵtext(1, "(obrigat\u00F3rio)");
1018
- i0.ɵɵelementEnd();
1019
- }
1020
- if (rf & 2) {
1021
- var ctx_r0 = i0.ɵɵnextContext();
1022
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(1, _c0$3, ctx_r0.state && !ctx_r0.state.valid && ctx_r0.state.errors));
1023
- }
1024
- }
1025
- function FieldRenderComponent_span_5_Template(rf, ctx) {
1026
- if (rf & 1) {
1027
- i0.ɵɵelementStart(0, "span", 4);
1028
- i0.ɵɵpipe(1, "translate");
1029
- i0.ɵɵelement(2, "i", 5);
1030
- i0.ɵɵelementEnd();
1031
- }
1032
- if (rf & 2) {
1033
- var ctx_r1 = i0.ɵɵnextContext();
1034
- i0.ɵɵpropertyInterpolate("matTooltip", i0.ɵɵpipeBind1(1, 1, ctx_r1.tooltip));
1035
- }
1036
- }
1037
- var _c1$1 = ["*"];
1038
- var FieldRenderComponent = /** @class */ (function () {
1039
- function FieldRenderComponent() {
1040
- this.label = '';
1041
- this.required = true;
1042
- }
1043
- return FieldRenderComponent;
1044
- }());
1045
- FieldRenderComponent.ɵfac = function FieldRenderComponent_Factory(t) { return new (t || FieldRenderComponent)(); };
1046
- 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) {
1047
- if (rf & 1) {
1048
- i0.ɵɵprojectionDef();
1049
- i0.ɵɵelementStart(0, "div", 0);
1050
- i0.ɵɵelementStart(1, "label", 1);
1051
- i0.ɵɵtext(2);
1052
- i0.ɵɵpipe(3, "translate");
1053
- i0.ɵɵtemplate(4, FieldRenderComponent_small_4_Template, 2, 3, "small", 2);
1054
- i0.ɵɵtemplate(5, FieldRenderComponent_span_5_Template, 3, 3, "span", 3);
1055
- i0.ɵɵelementEnd();
1056
- i0.ɵɵprojection(6);
1057
- i0.ɵɵelementEnd();
1058
- }
1059
- if (rf & 2) {
1060
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$3, ctx.state && !ctx.state.valid && (!ctx.state.pristine || ctx.state.touched) && ctx.state.errors));
1061
- i0.ɵɵadvance(1);
1062
- i0.ɵɵproperty("htmlFor", ctx.inputId);
1063
- i0.ɵɵadvance(1);
1064
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 5, ctx.label), " ");
1065
- i0.ɵɵadvance(2);
1066
- i0.ɵɵproperty("ngIf", ctx.required);
1067
- i0.ɵɵadvance(1);
1068
- i0.ɵɵproperty("ngIf", ctx.tooltip);
1069
- }
1070
- }, 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}"] });
1071
- /*@__PURE__*/ (function () {
1072
- i0.ɵsetClassMetadata(FieldRenderComponent, [{
1073
- type: i0.Component,
1074
- args: [{
1075
- selector: 'field-render',
1076
- templateUrl: 'field-render.html',
1077
- styleUrls: ['field-render.scss']
1078
- }]
1079
- }], null, { label: [{
1080
- type: i0.Input
1081
- }], inputId: [{
1082
- type: i0.Input
1083
- }], tooltip: [{
1084
- type: i0.Input
1085
- }], required: [{
1086
- type: i0.Input
1087
- }], state: [{
1088
- type: i0.Input
1089
- }] });
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
+ }] });
1090
1134
  })();
1091
1135
 
1092
- var _c0$4 = function () { return { standalone: true }; };
1093
- var NumberInputComponent = /** @class */ (function (_super) {
1094
- __extends(NumberInputComponent, _super);
1095
- function NumberInputComponent() {
1096
- return _super !== null && _super.apply(this, arguments) || this;
1097
- }
1098
- NumberInputComponent.prototype.ngAfterContentInit = function () {
1099
- this.value = this.model;
1100
- };
1101
- NumberInputComponent.prototype.changeValue = function ($event) {
1102
- if ($event && !isNaN($event)) {
1103
- this.model = Number($event);
1104
- this.modelChange.emit(this.model);
1105
- }
1106
- else {
1107
- this.model = $event;
1108
- this.modelChange.emit(this.model);
1109
- }
1110
- };
1111
- return NumberInputComponent;
1112
- }(BaseSchemaComponent));
1113
- NumberInputComponent.ɵfac = function NumberInputComponent_Factory(t) { return ɵNumberInputComponent_BaseFactory(t || NumberInputComponent); };
1114
- 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) {
1115
- if (rf & 1) {
1116
- i0.ɵɵelementStart(0, "input", 0);
1117
- 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); });
1118
- i0.ɵɵelementEnd();
1119
- }
1120
- if (rf & 2) {
1121
- i0.ɵɵproperty("id", ctx.inputId)("placeholder", ctx.placeholder)("ngModel", ctx.value)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0$4))("maxlength", ctx.maxLength);
1122
- }
1123
- }, directives: [i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator], encapsulation: 2 });
1124
- var ɵNumberInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(NumberInputComponent);
1125
- /*@__PURE__*/ (function () {
1126
- i0.ɵsetClassMetadata(NumberInputComponent, [{
1127
- type: i0.Component,
1128
- args: [{
1129
- selector: 'number-input',
1130
- templateUrl: 'number-input.component.html'
1131
- }]
1132
- }], null, { placeholder: [{
1133
- type: i0.Input
1134
- }], inputId: [{
1135
- type: i0.Input
1136
- }], maxLength: [{
1137
- type: i0.Input
1138
- }] });
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
+ }] });
1139
1183
  })();
1140
1184
 
1141
- var _c0$5 = function () { return { standalone: true }; };
1142
- var BooleanInputComponent = /** @class */ (function (_super) {
1143
- __extends(BooleanInputComponent, _super);
1144
- function BooleanInputComponent() {
1145
- return _super !== null && _super.apply(this, arguments) || this;
1146
- }
1147
- BooleanInputComponent.prototype.ngAfterContentInit = function () {
1148
- this.value = this.model;
1149
- };
1150
- BooleanInputComponent.prototype.changeValue = function ($event) {
1151
- if ($event && ($event === 'true' || $event === 'false')) {
1152
- this.model = $event === 'true';
1153
- this.value = this.model;
1154
- this.modelChange.emit(this.model);
1155
- }
1156
- else {
1157
- this.model = $event;
1158
- this.value = this.model;
1159
- this.modelChange.emit(this.model);
1160
- }
1161
- };
1162
- return BooleanInputComponent;
1163
- }(BaseSchemaComponent));
1164
- BooleanInputComponent.ɵfac = function BooleanInputComponent_Factory(t) { return ɵBooleanInputComponent_BaseFactory(t || BooleanInputComponent); };
1165
- 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) {
1166
- if (rf & 1) {
1167
- i0.ɵɵelementStart(0, "input", 0);
1168
- 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); });
1169
- i0.ɵɵelementEnd();
1170
- }
1171
- if (rf & 2) {
1172
- i0.ɵɵproperty("id", ctx.inputId)("placeholder", ctx.placeholder)("ngModel", ctx.value)("ngModelOptions", i0.ɵɵpureFunction0(5, _c0$5))("maxlength", ctx.maxLength);
1173
- }
1174
- }, directives: [i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator], encapsulation: 2 });
1175
- var ɵBooleanInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(BooleanInputComponent);
1176
- /*@__PURE__*/ (function () {
1177
- i0.ɵsetClassMetadata(BooleanInputComponent, [{
1178
- type: i0.Component,
1179
- args: [{
1180
- selector: 'boolean-input',
1181
- templateUrl: 'boolean-input.component.html',
1182
- }]
1183
- }], null, { placeholder: [{
1184
- type: i0.Input
1185
- }], inputId: [{
1186
- type: i0.Input
1187
- }], maxLength: [{
1188
- type: i0.Input
1189
- }] });
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
+ }] });
1190
1234
  })();
1191
1235
 
1192
- var _c0$6 = function () { return { standalone: true }; };
1193
- function InputRenderComponent_input_1_Template(rf, ctx) {
1194
- if (rf & 1) {
1195
- var _r5_1 = i0.ɵɵgetCurrentView();
1196
- i0.ɵɵelementStart(0, "input", 4);
1197
- 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); });
1198
- i0.ɵɵelementEnd();
1199
- }
1200
- if (rf & 2) {
1201
- var ctx_r0 = i0.ɵɵnextContext();
1202
- i0.ɵɵpropertyInterpolate("placeholder", ctx_r0.schema.description);
1203
- 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);
1204
- }
1205
- }
1206
- function InputRenderComponent_select_box_2_Template(rf, ctx) {
1207
- if (rf & 1) {
1208
- var _r8_1 = i0.ɵɵgetCurrentView();
1209
- i0.ɵɵelementStart(0, "select-box", 5);
1210
- 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); });
1211
- i0.ɵɵpipe(1, "translate");
1212
- i0.ɵɵpipe(2, "translate");
1213
- i0.ɵɵpipe(3, "translate");
1214
- i0.ɵɵpipe(4, "translate");
1215
- i0.ɵɵelementEnd();
1216
- }
1217
- if (rf & 2) {
1218
- var ctx_r1 = i0.ɵɵnextContext();
1219
- 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);
1220
- }
1221
- }
1222
- function InputRenderComponent_number_input_3_Template(rf, ctx) {
1223
- if (rf & 1) {
1224
- var _r11_1 = i0.ɵɵgetCurrentView();
1225
- i0.ɵɵelementStart(0, "number-input", 6);
1226
- 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); });
1227
- i0.ɵɵelementEnd();
1228
- }
1229
- if (rf & 2) {
1230
- var ctx_r2 = i0.ɵɵnextContext();
1231
- i0.ɵɵproperty("model", ctx_r2.value)("inputId", ctx_r2.inputId)("placeholder", ctx_r2.schema.description)("maxLength", ctx_r2.schema.maxLength);
1232
- }
1233
- }
1234
- function InputRenderComponent_boolean_input_4_Template(rf, ctx) {
1235
- if (rf & 1) {
1236
- var _r14_1 = i0.ɵɵgetCurrentView();
1237
- i0.ɵɵelementStart(0, "boolean-input", 6);
1238
- 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); });
1239
- i0.ɵɵelementEnd();
1240
- }
1241
- if (rf & 2) {
1242
- var ctx_r3 = i0.ɵɵnextContext();
1243
- i0.ɵɵproperty("model", ctx_r3.value)("inputId", ctx_r3.inputId)("placeholder", ctx_r3.schema.description)("maxLength", ctx_r3.schema.maxLength);
1244
- }
1245
- }
1246
- var InputRenderComponent = /** @class */ (function (_super) {
1247
- __extends(InputRenderComponent, _super);
1248
- function InputRenderComponent() {
1249
- var _this = _super.apply(this, __spread(arguments)) || this;
1250
- _this.schema = {};
1251
- _this.editing = false;
1252
- _this.onDropEvent = new i0.EventEmitter();
1253
- return _this;
1254
- }
1255
- InputRenderComponent.prototype.ngAfterContentInit = function () {
1256
- var _this = this;
1257
- var _a, _b;
1258
- 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') {
1259
- if (!this.editing && this.schema.options) {
1260
- var $event = this.schema.options.filter(function (item) { return item.selected === true; });
1261
- if ($event[0]) {
1262
- this.onChange($event[0].key);
1263
- this.value = $event[0];
1264
- }
1265
- }
1266
- else if (this.editing && this.schema.options && this.model) {
1267
- var $event = this.schema.options.filter(function (item) { return item.key === _this.model; });
1268
- if ($event[0]) {
1269
- this.onChange($event[0].key);
1270
- this.value = $event[0];
1271
- }
1272
- }
1273
- else {
1274
- this.value = this.model;
1275
- }
1276
- }
1277
- };
1278
- InputRenderComponent.prototype.onChange = function ($event) {
1279
- this.model = $event;
1280
- this.modelChange.emit(this.model);
1281
- };
1282
- return InputRenderComponent;
1283
- }(BaseSchemaComponent));
1284
- InputRenderComponent.ɵfac = function InputRenderComponent_Factory(t) { return ɵInputRenderComponent_BaseFactory(t || InputRenderComponent); };
1285
- 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) {
1286
- if (rf & 1) {
1287
- i0.ɵɵelementStart(0, "div", 0);
1288
- i0.ɵɵtemplate(1, InputRenderComponent_input_1_Template, 1, 7, "input", 1);
1289
- i0.ɵɵtemplate(2, InputRenderComponent_select_box_2_Template, 5, 21, "select-box", 2);
1290
- i0.ɵɵtemplate(3, InputRenderComponent_number_input_3_Template, 1, 4, "number-input", 3);
1291
- i0.ɵɵtemplate(4, InputRenderComponent_boolean_input_4_Template, 1, 4, "boolean-input", 3);
1292
- i0.ɵɵelementEnd();
1293
- }
1294
- if (rf & 2) {
1295
- i0.ɵɵadvance(1);
1296
- i0.ɵɵproperty("ngIf", (ctx.schema.type === "string" || ctx.schema.type === "password") && !ctx.schema.options);
1297
- i0.ɵɵadvance(1);
1298
- i0.ɵɵproperty("ngIf", ctx.schema.type === "string" && ctx.schema.options);
1299
- i0.ɵɵadvance(1);
1300
- i0.ɵɵproperty("ngIf", ctx.schema.type === "number");
1301
- i0.ɵɵadvance(1);
1302
- i0.ɵɵproperty("ngIf", ctx.schema.type === "boolean");
1303
- }
1304
- }, directives: [i1.NgIf, i3.DefaultValueAccessor, i2.DndDropzoneDirective, i3.NgControlStatus, i3.NgModel, i3.MaxLengthValidator, i8.SelectBoxComponent, NumberInputComponent, BooleanInputComponent], pipes: [i7.TranslatePipe], styles: [""] });
1305
- var ɵInputRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(InputRenderComponent);
1306
- /*@__PURE__*/ (function () {
1307
- i0.ɵsetClassMetadata(InputRenderComponent, [{
1308
- type: i0.Component,
1309
- args: [{
1310
- selector: 'input-render',
1311
- templateUrl: 'input-render.html',
1312
- styleUrls: ['./input-render.scss']
1313
- }]
1314
- }], null, { schema: [{
1315
- type: i0.Input
1316
- }], modelPropertiesPath: [{
1317
- type: i0.Input
1318
- }], inputId: [{
1319
- type: i0.Input
1320
- }], editing: [{
1321
- type: i0.Input
1322
- }], onDropEvent: [{
1323
- type: i0.Output
1324
- }] });
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
+ }] });
1325
1369
  })();
1326
1370
 
1327
- function SchemaInputComponent_div_0_Template(rf, ctx) {
1328
- if (rf & 1) {
1329
- var _r3_1 = i0.ɵɵgetCurrentView();
1330
- i0.ɵɵelementStart(0, "div", 1);
1331
- i0.ɵɵelementStart(1, "div", 2);
1332
- i0.ɵɵelementStart(2, "field-render", 3);
1333
- i0.ɵɵelementStart(3, "input-render", 4);
1334
- 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); });
1335
- i0.ɵɵelementEnd();
1336
- i0.ɵɵelementEnd();
1337
- i0.ɵɵelementEnd();
1338
- i0.ɵɵelementEnd();
1339
- }
1340
- if (rf & 2) {
1341
- var ctx_r0 = i0.ɵɵnextContext();
1342
- i0.ɵɵadvance(2);
1343
- i0.ɵɵproperty("label", ctx_r0.schema.title)("tooltip", ctx_r0.schema.help)("inputId", ctx_r0.getId(ctx_r0.index));
1344
- i0.ɵɵadvance(1);
1345
- 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);
1346
- }
1347
- }
1348
- function SchemaInputComponent_div_1_span_4_Template(rf, ctx) {
1349
- if (rf & 1) {
1350
- i0.ɵɵelementStart(0, "span", 7);
1351
- i0.ɵɵpipe(1, "translate");
1352
- i0.ɵɵtext(2, "?");
1353
- i0.ɵɵelementEnd();
1354
- }
1355
- if (rf & 2) {
1356
- var ctx_r4 = i0.ɵɵnextContext(2);
1357
- i0.ɵɵpropertyInterpolate("matTooltip", i0.ɵɵpipeBind1(1, 1, ctx_r4.schema.help));
1358
- }
1359
- }
1360
- function SchemaInputComponent_div_1_Template(rf, ctx) {
1361
- if (rf & 1) {
1362
- var _r6_1 = i0.ɵɵgetCurrentView();
1363
- i0.ɵɵelementStart(0, "div", 1);
1364
- i0.ɵɵelementStart(1, "div", 2);
1365
- i0.ɵɵelementStart(2, "label", 5);
1366
- i0.ɵɵtext(3);
1367
- i0.ɵɵtemplate(4, SchemaInputComponent_div_1_span_4_Template, 3, 3, "span", 6);
1368
- i0.ɵɵelementEnd();
1369
- i0.ɵɵelementStart(5, "input-render", 4);
1370
- 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); });
1371
- i0.ɵɵelementEnd();
1372
- i0.ɵɵelementEnd();
1373
- i0.ɵɵelementEnd();
1374
- }
1375
- if (rf & 2) {
1376
- var ctx_r1 = i0.ɵɵnextContext();
1377
- i0.ɵɵadvance(2);
1378
- i0.ɵɵproperty("htmlFor", ctx_r1.getId(ctx_r1.index));
1379
- i0.ɵɵadvance(1);
1380
- i0.ɵɵtextInterpolate1(" ", ctx_r1.schema.title, " ");
1381
- i0.ɵɵadvance(1);
1382
- i0.ɵɵproperty("ngIf", ctx_r1.schema.help);
1383
- i0.ɵɵadvance(1);
1384
- 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);
1385
- }
1386
- }
1387
- var SchemaInputComponent = /** @class */ (function (_super) {
1388
- __extends(SchemaInputComponent, _super);
1389
- function SchemaInputComponent() {
1390
- var _this = _super.apply(this, __spread(arguments)) || this;
1391
- _this.editing = false;
1392
- return _this;
1393
- }
1394
- SchemaInputComponent.prototype.ngAfterContentInit = function () {
1395
- this.loaded = true;
1396
- };
1397
- SchemaInputComponent.prototype.getId = function (index) {
1398
- return this.idPrefix + "-struct-" + index;
1399
- };
1400
- return SchemaInputComponent;
1401
- }(BaseSchemaComponent));
1402
- SchemaInputComponent.ɵfac = function SchemaInputComponent_Factory(t) { return ɵSchemaInputComponent_BaseFactory(t || SchemaInputComponent); };
1403
- 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) {
1404
- if (rf & 1) {
1405
- i0.ɵɵtemplate(0, SchemaInputComponent_div_0_Template, 4, 8, "div", 0);
1406
- i0.ɵɵtemplate(1, SchemaInputComponent_div_1_Template, 6, 8, "div", 0);
1407
- }
1408
- if (rf & 2) {
1409
- i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && ctx.schema.minLength && ctx.schema.minLength > 0);
1410
- i0.ɵɵadvance(1);
1411
- i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type !== "array" && ctx.schema.type !== "object" && (!ctx.schema.minLength || ctx.schema.minLength === 0));
1412
- }
1413
- }, directives: [i1.NgIf, FieldRenderComponent, InputRenderComponent, i4.MatTooltip], pipes: [i7.TranslatePipe], styles: [""] });
1414
- var ɵSchemaInputComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaInputComponent);
1415
- /*@__PURE__*/ (function () {
1416
- i0.ɵsetClassMetadata(SchemaInputComponent, [{
1417
- type: i0.Component,
1418
- args: [{
1419
- selector: 'schema-input',
1420
- templateUrl: 'schema-input.html',
1421
- styleUrls: ['./schema-input.scss']
1422
- }]
1423
- }], null, { idPrefix: [{
1424
- type: i0.Input
1425
- }], schema: [{
1426
- type: i0.Input
1427
- }], editing: [{
1428
- type: i0.Input
1429
- }], index: [{
1430
- type: i0.Input
1431
- }] });
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
+ }] });
1432
1478
  })();
1433
1479
 
1434
- function SchemaObjectComponent_div_0_div_4_Template(rf, ctx) {
1435
- if (rf & 1) {
1436
- var _r3_1 = i0.ɵɵgetCurrentView();
1437
- i0.ɵɵelementStart(0, "div", 5);
1438
- i0.ɵɵelementStart(1, "div", 6);
1439
- i0.ɵɵelementStart(2, "label", 7);
1440
- i0.ɵɵtext(3);
1441
- i0.ɵɵpipe(4, "translate");
1442
- i0.ɵɵelementEnd();
1443
- i0.ɵɵelementStart(5, "schema-custom-attributes", 8);
1444
- 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; });
1445
- i0.ɵɵelementEnd();
1446
- i0.ɵɵelementEnd();
1447
- i0.ɵɵelementEnd();
1448
- }
1449
- if (rf & 2) {
1450
- var ctx_r1 = i0.ɵɵnextContext(2);
1451
- i0.ɵɵadvance(3);
1452
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "STEP.ADDITIONAL_ATTRIBUTES"));
1453
- i0.ɵɵadvance(2);
1454
- i0.ɵɵproperty("model", ctx_r1.model[ctx_r1.schema.id].customAttributes)("onDropFunction", ctx_r1.onDrop);
1455
- }
1456
- }
1457
- function SchemaObjectComponent_div_0_Template(rf, ctx) {
1458
- if (rf & 1) {
1459
- var _r5_1 = i0.ɵɵgetCurrentView();
1460
- i0.ɵɵelementStart(0, "div", 1);
1461
- i0.ɵɵelementStart(1, "div", 2);
1462
- i0.ɵɵtext(2);
1463
- i0.ɵɵelementEnd();
1464
- i0.ɵɵelementStart(3, "schema-form", 3);
1465
- 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); });
1466
- i0.ɵɵelementEnd();
1467
- i0.ɵɵtemplate(4, SchemaObjectComponent_div_0_div_4_Template, 6, 5, "div", 4);
1468
- i0.ɵɵelementEnd();
1469
- }
1470
- if (rf & 2) {
1471
- var ctx_r0 = i0.ɵɵnextContext();
1472
- i0.ɵɵadvance(2);
1473
- i0.ɵɵtextInterpolate(ctx_r0.schema.title);
1474
- i0.ɵɵadvance(1);
1475
- i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model[ctx_r0.schema.id])("schemas", ctx_r0.getSchemaProperties())("editing", ctx_r0.editing);
1476
- i0.ɵɵadvance(1);
1477
- i0.ɵɵproperty("ngIf", ctx_r0.model[ctx_r0.schema.id] && ctx_r0.schema.customProperties);
1478
- }
1479
- }
1480
- var SchemaObjectComponent = /** @class */ (function (_super) {
1481
- __extends(SchemaObjectComponent, _super);
1482
- function SchemaObjectComponent() {
1483
- var _this = _super.apply(this, __spread(arguments)) || this;
1484
- _this.editing = false;
1485
- _this.onDropEvent = new i0.EventEmitter();
1486
- _this.loaded = false;
1487
- return _this;
1488
- }
1489
- SchemaObjectComponent.prototype.ngAfterContentInit = function () {
1490
- var _a;
1491
- if (((_a = this.schema) === null || _a === void 0 ? void 0 : _a.type) === 'object' && this.model) {
1492
- this.model[this.schema.id] = this.model[this.schema.id] || {};
1493
- }
1494
- this.loaded = true;
1495
- };
1496
- SchemaObjectComponent.prototype.onDrop = function ($event, modelElement) {
1497
- return onDropStruct($event, modelElement);
1498
- };
1499
- return SchemaObjectComponent;
1500
- }(BaseSchemaComponent));
1501
- SchemaObjectComponent.ɵfac = function SchemaObjectComponent_Factory(t) { return ɵSchemaObjectComponent_BaseFactory(t || SchemaObjectComponent); };
1502
- 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) {
1503
- if (rf & 1) {
1504
- i0.ɵɵtemplate(0, SchemaObjectComponent_div_0_Template, 5, 6, "div", 0);
1505
- }
1506
- if (rf & 2) {
1507
- i0.ɵɵproperty("ngIf", ctx.loaded && ctx.canRender(ctx.schema) && ctx.schema.type == "object");
1508
- }
1509
- }, 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)}"] });
1510
- var ɵSchemaObjectComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaObjectComponent);
1511
- /*@__PURE__*/ (function () {
1512
- i0.ɵsetClassMetadata(SchemaObjectComponent, [{
1513
- type: i0.Component,
1514
- args: [{
1515
- selector: 'schema-object',
1516
- templateUrl: 'schema-object.html',
1517
- styleUrls: ['./schema-object.scss']
1518
- }]
1519
- }], null, { idPrefix: [{
1520
- type: i0.Input
1521
- }], modelPropertiesPath: [{
1522
- type: i0.Input
1523
- }], inputId: [{
1524
- type: i0.Input
1525
- }], editing: [{
1526
- type: i0.Input
1527
- }], index: [{
1528
- type: i0.Input
1529
- }], onDropEvent: [{
1530
- type: i0.Output
1531
- }] });
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
+ }] });
1532
1579
  })();
1533
1580
 
1534
- var SchemaValidationField = /** @class */ (function () {
1535
- function SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields) {
1536
- this.emptyFields = emptyFields;
1537
- this.invalidMinLengthFields = invalidMinLengthFields;
1538
- this.invalidMaxLengthFields = invalidMaxLengthFields;
1539
- }
1540
- SchemaValidationField.prototype.isValidSchemaFields = function () {
1541
- var _a, _b, _c;
1542
- 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;
1543
- };
1544
- SchemaValidationField.prototype.isInvalidSchemaFields = function () {
1545
- return !this.isValidSchemaFields();
1546
- };
1547
- return SchemaValidationField;
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;
1548
1595
  }());
1549
1596
 
1550
- var SchemaFieldsService = /** @class */ (function () {
1551
- function SchemaFieldsService(translate) {
1552
- this.translate = translate;
1553
- }
1554
- SchemaFieldsService.prototype.validateSchemaFields = function (propertiesRendered, model) {
1555
- return __awaiter(this, void 0, void 0, function () {
1556
- var emptyFields, invalidMinLengthFields, invalidMaxLengthFields, structValidationField, _a;
1557
- return __generator(this, function (_b) {
1558
- switch (_b.label) {
1559
- case 0:
1560
- if (!propertiesRendered) {
1561
- return [2 /*return*/, new SchemaValidationField([], [], [])];
1562
- }
1563
- emptyFields = [];
1564
- invalidMinLengthFields = [];
1565
- invalidMaxLengthFields = [];
1566
- this.processProperties(propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1567
- structValidationField = new SchemaValidationField(emptyFields, invalidMinLengthFields, invalidMaxLengthFields);
1568
- _a = structValidationField;
1569
- return [4 /*yield*/, this.getErrorsStringArray(structValidationField)];
1570
- case 1:
1571
- _a.validationErrorsLabel = _b.sent();
1572
- return [2 /*return*/, structValidationField];
1573
- }
1574
- });
1575
- });
1576
- };
1577
- SchemaFieldsService.prototype.processProperties = function (propertiesRendered, model, emptyFields, invalidMinLengthFields, invalidMaxLengthFields, recursive) {
1578
- var e_1, _a;
1579
- try {
1580
- for (var propertiesRendered_1 = __values(propertiesRendered), propertiesRendered_1_1 = propertiesRendered_1.next(); !propertiesRendered_1_1.done; propertiesRendered_1_1 = propertiesRendered_1.next()) {
1581
- var property = propertiesRendered_1_1.value;
1582
- if ((property.type === 'object' || property.type === 'array') && property.properties) {
1583
- this.processProperties(property.properties, model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1584
- }
1585
- else if (property.type === 'array' && !property.properties) {
1586
- var newProperty = Object.assign({}, property);
1587
- newProperty.type = 'string';
1588
- this.processProperties([newProperty], model[property.id], emptyFields, invalidMinLengthFields, invalidMaxLengthFields, true);
1589
- }
1590
- else {
1591
- var validateModel = recursive ? model : model[property.id];
1592
- if ((property === null || property === void 0 ? void 0 : property.canRender) && (property === null || property === void 0 ? void 0 : property.minLength) > 0
1593
- && (validateModel === undefined || validateModel === '' || validateModel === null)) {
1594
- emptyFields.push(property);
1595
- }
1596
- 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)) {
1597
- invalidMinLengthFields.push(property);
1598
- }
1599
- 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)) {
1600
- invalidMaxLengthFields.push(property);
1601
- }
1602
- }
1603
- }
1604
- }
1605
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1606
- finally {
1607
- try {
1608
- if (propertiesRendered_1_1 && !propertiesRendered_1_1.done && (_a = propertiesRendered_1.return)) _a.call(propertiesRendered_1);
1609
- }
1610
- finally { if (e_1) throw e_1.error; }
1611
- }
1612
- };
1613
- SchemaFieldsService.prototype.getErrorsStringArray = function (structValidation) {
1614
- return __awaiter(this, void 0, void 0, function () {
1615
- var errors, _a, _b, field, fieldName, _c, _d, field, fieldName, _e, _f, field, fieldName;
1616
- var e_2, _g, e_3, _h, e_4, _j;
1617
- return __generator(this, function (_k) {
1618
- if (!structValidation.isInvalidSchemaFields()) {
1619
- return [2 /*return*/, []];
1620
- }
1621
- errors = [];
1622
- try {
1623
- for (_a = __values(structValidation.emptyFields), _b = _a.next(); !_b.done; _b = _a.next()) {
1624
- field = _b.value;
1625
- fieldName = field.title || field.id;
1626
- errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.REQUIRED_FIELD_ERROR', { fieldName: fieldName }));
1627
- }
1628
- }
1629
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1630
- finally {
1631
- try {
1632
- if (_b && !_b.done && (_g = _a.return)) _g.call(_a);
1633
- }
1634
- finally { if (e_2) throw e_2.error; }
1635
- }
1636
- try {
1637
- for (_c = __values(structValidation.invalidMinLengthFields), _d = _c.next(); !_d.done; _d = _c.next()) {
1638
- field = _d.value;
1639
- fieldName = field.title || field.id;
1640
- errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MINLENGTH_FIELD_ERROR', { fieldName: fieldName, minLength: field.minLength }));
1641
- }
1642
- }
1643
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
1644
- finally {
1645
- try {
1646
- if (_d && !_d.done && (_h = _c.return)) _h.call(_c);
1647
- }
1648
- finally { if (e_3) throw e_3.error; }
1649
- }
1650
- try {
1651
- for (_e = __values(structValidation.invalidMaxLengthFields), _f = _e.next(); !_f.done; _f = _e.next()) {
1652
- field = _f.value;
1653
- fieldName = field.title || field.id;
1654
- errors.push(this.translate.instant('COMPONENTS.STRUCT.VALIDATION_FIELDS.MAXLENGTH_FIELD_ERROR', { fieldName: fieldName, maxLength: field.maxLength }));
1655
- }
1656
- }
1657
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
1658
- finally {
1659
- try {
1660
- if (_f && !_f.done && (_j = _e.return)) _j.call(_e);
1661
- }
1662
- finally { if (e_4) throw e_4.error; }
1663
- }
1664
- return [2 /*return*/, errors];
1665
- });
1666
- });
1667
- };
1668
- return SchemaFieldsService;
1669
- }());
1670
- SchemaFieldsService.ɵfac = function SchemaFieldsService_Factory(t) { return new (t || SchemaFieldsService)(i0.ɵɵinject(i7.TranslateService)); };
1671
- SchemaFieldsService.ɵprov = i0.ɵɵdefineInjectable({ token: SchemaFieldsService, factory: SchemaFieldsService.ɵfac });
1672
- /*@__PURE__*/ (function () {
1673
- i0.ɵsetClassMetadata(SchemaFieldsService, [{
1674
- type: i0.Injectable
1675
- }], function () { return [{ type: i7.TranslateService }]; }, null);
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);
1676
1723
  })();
1677
1724
 
1678
- function SchemaFormRenderComponent_div_0_div_2_div_1_Template(rf, ctx) {
1679
- if (rf & 1) {
1680
- var _r6_1 = i0.ɵɵgetCurrentView();
1681
- i0.ɵɵelementStart(0, "div", 6);
1682
- i0.ɵɵelementStart(1, "div", 7);
1683
- i0.ɵɵelementStart(2, "label", 8);
1684
- i0.ɵɵtext(3);
1685
- i0.ɵɵpipe(4, "translate");
1686
- i0.ɵɵelementEnd();
1687
- i0.ɵɵelementStart(5, "schema-custom-attributes", 9);
1688
- 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; });
1689
- i0.ɵɵelementEnd();
1690
- i0.ɵɵelementEnd();
1691
- i0.ɵɵelementEnd();
1692
- }
1693
- if (rf & 2) {
1694
- var ctx_r4 = i0.ɵɵnextContext(3);
1695
- i0.ɵɵadvance(3);
1696
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 3, "STEP.ADDITIONAL_ATTRIBUTES"));
1697
- i0.ɵɵadvance(2);
1698
- i0.ɵɵproperty("model", ctx_r4.model.customAttributes)("onDropFunction", ctx_r4.onDrop);
1699
- }
1700
- }
1701
- function SchemaFormRenderComponent_div_0_div_2_Template(rf, ctx) {
1702
- if (rf & 1) {
1703
- i0.ɵɵelementStart(0, "div", 4);
1704
- i0.ɵɵtemplate(1, SchemaFormRenderComponent_div_0_div_2_div_1_Template, 6, 5, "div", 5);
1705
- i0.ɵɵelementEnd();
1706
- }
1707
- if (rf & 2) {
1708
- var ctx_r1 = i0.ɵɵnextContext(2);
1709
- i0.ɵɵadvance(1);
1710
- i0.ɵɵproperty("ngIf", ctx_r1.model && ctx_r1.customProperties);
1711
- }
1712
- }
1713
- function SchemaFormRenderComponent_div_0_Template(rf, ctx) {
1714
- if (rf & 1) {
1715
- var _r8_1 = i0.ɵɵgetCurrentView();
1716
- i0.ɵɵelementStart(0, "div", 1);
1717
- i0.ɵɵelementStart(1, "schema-form", 2);
1718
- 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; });
1719
- i0.ɵɵelementEnd();
1720
- i0.ɵɵtemplate(2, SchemaFormRenderComponent_div_0_div_2_Template, 2, 1, "div", 3);
1721
- i0.ɵɵelementEnd();
1722
- }
1723
- if (rf & 2) {
1724
- var ctx_r0 = i0.ɵɵnextContext();
1725
- i0.ɵɵadvance(1);
1726
- i0.ɵɵproperty("idPrefix", ctx_r0.idPrefix)("model", ctx_r0.model)("schemas", ctx_r0.schemas)("editing", ctx_r0.editing);
1727
- i0.ɵɵadvance(1);
1728
- i0.ɵɵproperty("ngForOf", ctx_r0.schemas);
1729
- }
1730
- }
1731
- var SchemaFormRenderComponent = /** @class */ (function (_super) {
1732
- __extends(SchemaFormRenderComponent, _super);
1733
- function SchemaFormRenderComponent() {
1734
- var _this = _super.apply(this, __spread(arguments)) || this;
1735
- _this.schemas = [];
1736
- _this.customProperties = false;
1737
- _this.editing = false;
1738
- _this.loaded = false;
1739
- return _this;
1740
- }
1741
- SchemaFormRenderComponent.prototype.ngAfterContentInit = function () {
1742
- this.loaded = true;
1743
- };
1744
- SchemaFormRenderComponent.prototype.onDrop = function ($event, modelElement) {
1745
- return onDropStruct($event, modelElement);
1746
- };
1747
- SchemaFormRenderComponent.prototype.getId = function (index) {
1748
- return this.idPrefix + "-struct-" + index;
1749
- };
1750
- return SchemaFormRenderComponent;
1751
- }(BaseSchemaComponent));
1752
- SchemaFormRenderComponent.ɵfac = function SchemaFormRenderComponent_Factory(t) { return ɵSchemaFormRenderComponent_BaseFactory(t || SchemaFormRenderComponent); };
1753
- 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) {
1754
- if (rf & 1) {
1755
- i0.ɵɵtemplate(0, SchemaFormRenderComponent_div_0_Template, 3, 5, "div", 0);
1756
- }
1757
- if (rf & 2) {
1758
- i0.ɵɵproperty("ngIf", ctx.loaded);
1759
- }
1760
- }, 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)}"] });
1761
- var ɵSchemaFormRenderComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(SchemaFormRenderComponent);
1762
- /*@__PURE__*/ (function () {
1763
- i0.ɵsetClassMetadata(SchemaFormRenderComponent, [{
1764
- type: i0.Component,
1765
- args: [{
1766
- selector: 'schema-form-render',
1767
- templateUrl: 'schema-form-render.html',
1768
- styleUrls: ['./schema-form-render.scss']
1769
- }]
1770
- }], null, { idPrefix: [{
1771
- type: i0.Input
1772
- }], schemas: [{
1773
- type: i0.Input
1774
- }], customProperties: [{
1775
- type: i0.Input
1776
- }], editing: [{
1777
- type: i0.Input
1778
- }], inputType: [{
1779
- type: i0.Input
1780
- }] });
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
+ }] });
1781
1829
  })();
1782
1830
 
1783
- var SchemaFormRenderModule = /** @class */ (function () {
1784
- function SchemaFormRenderModule() {
1785
- }
1786
- return SchemaFormRenderModule;
1787
- }());
1788
- SchemaFormRenderModule.ɵmod = i0.ɵɵdefineNgModule({ type: SchemaFormRenderModule });
1789
- SchemaFormRenderModule.ɵinj = i0.ɵɵdefineInjector({ factory: function SchemaFormRenderModule_Factory(t) { return new (t || SchemaFormRenderModule)(); }, providers: [
1790
- SchemaFieldsService
1791
- ], imports: [[
1792
- i1.CommonModule,
1793
- i2.DndModule,
1794
- i3.FormsModule,
1795
- i4.MatTooltipModule,
1796
- i7.TranslateModule,
1797
- i8.InputsModule
1798
- ]] });
1799
- (function () {
1800
- (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SchemaFormRenderModule, { declarations: [ArraySessionComponent,
1801
- SchemaArrayComponent,
1802
- FieldRenderComponent,
1803
- InputRenderComponent,
1804
- BooleanInputComponent,
1805
- NumberInputComponent,
1806
- SchemaInputComponent,
1807
- SchemaObjectComponent,
1808
- SchemaFormRenderComponent,
1809
- SchemaFormComponent,
1810
- SchemaCustomAttributesComponent], imports: [i1.CommonModule,
1811
- i2.DndModule,
1812
- i3.FormsModule,
1813
- i4.MatTooltipModule,
1814
- i7.TranslateModule,
1815
- i8.InputsModule], exports: [ArraySessionComponent,
1816
- SchemaArrayComponent,
1817
- FieldRenderComponent,
1818
- InputRenderComponent,
1819
- BooleanInputComponent,
1820
- NumberInputComponent,
1821
- SchemaInputComponent,
1822
- SchemaObjectComponent,
1823
- SchemaFormRenderComponent,
1824
- SchemaFormComponent,
1825
- SchemaCustomAttributesComponent] });
1826
- })();
1827
- /*@__PURE__*/ (function () {
1828
- i0.ɵsetClassMetadata(SchemaFormRenderModule, [{
1829
- type: i0.NgModule,
1830
- args: [{
1831
- imports: [
1832
- i1.CommonModule,
1833
- i2.DndModule,
1834
- i3.FormsModule,
1835
- i4.MatTooltipModule,
1836
- i7.TranslateModule,
1837
- i8.InputsModule
1838
- ],
1839
- declarations: [
1840
- ArraySessionComponent,
1841
- SchemaArrayComponent,
1842
- FieldRenderComponent,
1843
- InputRenderComponent,
1844
- BooleanInputComponent,
1845
- NumberInputComponent,
1846
- SchemaInputComponent,
1847
- SchemaObjectComponent,
1848
- SchemaFormRenderComponent,
1849
- SchemaFormComponent,
1850
- SchemaCustomAttributesComponent
1851
- ],
1852
- exports: [
1853
- ArraySessionComponent,
1854
- SchemaArrayComponent,
1855
- FieldRenderComponent,
1856
- InputRenderComponent,
1857
- BooleanInputComponent,
1858
- NumberInputComponent,
1859
- SchemaInputComponent,
1860
- SchemaObjectComponent,
1861
- SchemaFormRenderComponent,
1862
- SchemaFormComponent,
1863
- SchemaCustomAttributesComponent
1864
- ],
1865
- providers: [
1866
- SchemaFieldsService
1867
- ]
1868
- }]
1869
- }], null, null);
1870
- })();
1871
- 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,
1872
- SchemaArrayComponent,
1873
- FieldRenderComponent,
1874
- InputRenderComponent,
1875
- BooleanInputComponent,
1876
- NumberInputComponent,
1877
- SchemaInputComponent,
1878
- SchemaObjectComponent,
1879
- SchemaFormRenderComponent,
1880
- SchemaFormComponent,
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,
1881
1929
  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]);
1882
1930
 
1883
- var TypeScriptCompile = /** @class */ (function () {
1884
- function TypeScriptCompile() {
1885
- }
1886
- TypeScriptCompile.addItemToFormProperties = function (formProperties, item, key) {
1887
- if (item.minLength && item.minLength > 0) {
1888
- formProperties[key] = new i3.FormControl([null, [i3.Validators.required]]);
1889
- }
1890
- else {
1891
- formProperties[key] = new i3.FormControl([null]);
1892
- }
1893
- };
1894
- TypeScriptCompile.compileProperties = function (input) {
1895
- var compiledProperties = [];
1896
- var formProperties = {};
1897
- var inputData = {};
1898
- var inputToCompile = JSON.parse(JSON.stringify(input));
1899
- if (inputToCompile.properties) {
1900
- if (inputToCompile.type === 'array') {
1901
- inputData = [];
1902
- }
1903
- if (inputToCompile.type === 'object') {
1904
- inputData = {};
1905
- }
1906
- inputToCompile.id = 'inputData';
1907
- this.proccessProperties(inputToCompile, formProperties, 'inputData');
1908
- compiledProperties.push(inputToCompile);
1909
- }
1910
- else if (inputToCompile.type === 'array') {
1911
- inputToCompile.id = 'inputData';
1912
- inputData = [];
1913
- TypeScriptCompile.addItemToFormProperties(formProperties, inputToCompile, 'inputData');
1914
- compiledProperties.push(inputToCompile);
1915
- }
1916
- else if (!inputToCompile.type) {
1917
- for (var index = 0; index < Object.keys(inputToCompile).length; index++) {
1918
- var key = Object.keys(inputToCompile)[index];
1919
- var item = inputToCompile[key];
1920
- item.id = key;
1921
- if (item.type === 'array') {
1922
- inputData[item.id] = [];
1923
- }
1924
- if (item.type === 'object') {
1925
- inputData[item.id] = {};
1926
- }
1927
- this.proccessProperties(item, formProperties, key);
1928
- compiledProperties.push(item);
1929
- }
1930
- }
1931
- compiledProperties.sort(function (a, b) { return a.propertyOrder - b.propertyOrder; });
1932
- return { compiledProperties: compiledProperties, formProperties: formProperties, inputData: inputData };
1933
- };
1934
- TypeScriptCompile.proccessProperties = function (item, formProperties, key) {
1935
- if (this.hasProperties(item)) {
1936
- var arFieldsChild = [];
1937
- for (var indexChild = 0; indexChild < Object.keys(item.properties).length; indexChild++) {
1938
- var keyChild = Object.keys(item.properties)[indexChild];
1939
- var itemChild = item.properties[keyChild];
1940
- itemChild.id = keyChild;
1941
- if (this.hasProperties(itemChild)) {
1942
- this.proccessProperties(itemChild, formProperties, keyChild);
1943
- arFieldsChild.push(itemChild);
1944
- }
1945
- else {
1946
- TypeScriptCompile.addItemToFormProperties(formProperties, itemChild, keyChild);
1947
- arFieldsChild.push(itemChild);
1948
- }
1949
- }
1950
- item.properties = arFieldsChild;
1951
- }
1952
- else {
1953
- TypeScriptCompile.addItemToFormProperties(formProperties, item, key);
1954
- }
1955
- };
1956
- TypeScriptCompile.hasProperties = function (item) {
1957
- return item.type === 'object' || (item.type === 'array' && item.properties);
1958
- };
1959
- return TypeScriptCompile;
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;
1960
2008
  }());
1961
2009
 
1962
- /**
1963
- * Generated bundle index. Do not edit.
2010
+ /**
2011
+ * Generated bundle index. Do not edit.
1964
2012
  */
1965
2013
 
1966
2014
  exports.ArraySessionComponent = ArraySessionComponent;