@valtimo/connector-management 4.15.3-next-main.16 → 4.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/bundles/valtimo-connector-management.umd.js +2072 -2054
  2. package/bundles/valtimo-connector-management.umd.js.map +1 -1
  3. package/bundles/valtimo-connector-management.umd.min.js +2 -2
  4. package/bundles/valtimo-connector-management.umd.min.js.map +1 -1
  5. package/esm2015/lib/components/add-connector/add-connector.component.js +83 -83
  6. package/esm2015/lib/components/connector-link-extension/connector-link-extension.component.js +104 -104
  7. package/esm2015/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.js +138 -138
  8. package/esm2015/lib/components/connector-management/connector-management.component.js +103 -103
  9. package/esm2015/lib/components/connector-modal/connector-modal.component.js +58 -58
  10. package/esm2015/lib/components/edit-connector-form/edit-connector-form.component.js +42 -42
  11. package/esm2015/lib/components/edit-connector-properties/edit-connector-properties.component.js +144 -144
  12. package/esm2015/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.js +157 -157
  13. package/esm2015/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.js +500 -500
  14. package/esm2015/lib/components/modify-connector/modify-connector.component.js +75 -75
  15. package/esm2015/lib/components/multi-value-connector-property/multi-value-connector-property.component.js +96 -96
  16. package/esm2015/lib/connector-management-routing.js +41 -41
  17. package/esm2015/lib/connector-management.module.js +74 -74
  18. package/esm2015/lib/extension/connector-management.extension.init.js +39 -39
  19. package/esm2015/lib/models/connector.model.js +1 -0
  20. package/esm2015/lib/models/index.js +20 -0
  21. package/esm2015/lib/models/object-sync.js +1 -0
  22. package/esm2015/lib/services/connector-management/connector-management.service.js +60 -60
  23. package/esm2015/lib/services/connector-management-state/connector-management-state.service.js +83 -83
  24. package/esm2015/lib/services/object-api-sync/object-api-sync.service.js +51 -51
  25. package/esm2015/public-api.js +33 -32
  26. package/esm2015/valtimo-connector-management.js +8 -8
  27. package/fesm2015/valtimo-connector-management.js +1747 -1730
  28. package/fesm2015/valtimo-connector-management.js.map +1 -1
  29. package/lib/components/add-connector/add-connector.component.d.ts +26 -26
  30. package/lib/components/connector-link-extension/connector-link-extension.component.d.ts +25 -25
  31. package/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.d.ts +40 -40
  32. package/lib/components/connector-management/connector-management.component.d.ts +29 -28
  33. package/lib/components/connector-modal/connector-modal.component.d.ts +16 -16
  34. package/lib/components/edit-connector-form/edit-connector-form.component.d.ts +15 -15
  35. package/lib/components/edit-connector-properties/edit-connector-properties.component.d.ts +35 -35
  36. package/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.d.ts +45 -45
  37. package/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.d.ts +225 -225
  38. package/lib/components/modify-connector/modify-connector.component.d.ts +19 -19
  39. package/lib/components/multi-value-connector-property/multi-value-connector-property.component.d.ts +26 -26
  40. package/lib/connector-management-routing.d.ts +2 -2
  41. package/lib/connector-management.module.d.ts +2 -2
  42. package/lib/extension/connector-management.extension.init.d.ts +2 -2
  43. package/lib/models/connector.model.d.ts +36 -0
  44. package/lib/models/index.d.ts +2 -0
  45. package/lib/models/object-sync.d.ts +19 -0
  46. package/lib/services/connector-management/connector-management.service.d.ts +18 -17
  47. package/lib/services/connector-management-state/connector-management-state.service.d.ts +26 -26
  48. package/lib/services/object-api-sync/object-api-sync.service.d.ts +14 -14
  49. package/package.json +1 -1
  50. package/public-api.d.ts +14 -13
  51. package/valtimo-connector-management.d.ts +7 -7
  52. package/valtimo-connector-management.metadata.json +1 -1
@@ -1,2097 +1,2115 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/common'), require('@valtimo/security'), require('@valtimo/contract'), require('rxjs'), require('rxjs/operators'), require('@ngx-translate/core'), require('@angular/common/http'), require('@valtimo/config'), require('@valtimo/components'), require('lodash'), require('@valtimo/form'), require('@valtimo/document'), require('ngx-logger')) :
3
- typeof define === 'function' && define.amd ? define('@valtimo/connector-management', ['exports', '@angular/core', '@angular/router', '@angular/common', '@valtimo/security', '@valtimo/contract', 'rxjs', 'rxjs/operators', '@ngx-translate/core', '@angular/common/http', '@valtimo/config', '@valtimo/components', 'lodash', '@valtimo/form', '@valtimo/document', 'ngx-logger'], factory) :
4
- (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo['connector-management'] = {}), global.ng.core, global.ng.router, global.ng.common, global.security, global.contract, global.rxjs, global.rxjs.operators, global.cpre$1, global.ng.common.http, global.config, global.components, global.lodash, global.form, global.document, global.ngxLogger));
5
- }(this, (function (exports, i0, router, common, security, contract, rxjs, operators, core, i1, i2, components, lodash, form, document, ngxLogger) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@angular/common'), require('@valtimo/security'), require('@valtimo/config'), require('rxjs'), require('rxjs/operators'), require('@ngx-translate/core'), require('@angular/common/http'), require('@valtimo/components'), require('lodash'), require('@valtimo/form'), require('@valtimo/document'), require('ngx-logger')) :
3
+ typeof define === 'function' && define.amd ? define('@valtimo/connector-management', ['exports', '@angular/core', '@angular/router', '@angular/common', '@valtimo/security', '@valtimo/config', 'rxjs', 'rxjs/operators', '@ngx-translate/core', '@angular/common/http', '@valtimo/components', 'lodash', '@valtimo/form', '@valtimo/document', 'ngx-logger'], factory) :
4
+ (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo['connector-management'] = {}), global.ng.core, global.ng.router, global.ng.common, global.security, global.config, global.rxjs, global.rxjs.operators, global.cpre$1, global.ng.common.http, global.components, global.lodash, global.form, global.document, global.ngxLogger));
5
+ }(this, (function (exports, i0, router, common, security, i2, rxjs, operators, core, i1, components, lodash, form, document, ngxLogger) { '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 (Object.prototype.hasOwnProperty.call(b, p))
27
- d[p] = b[p]; };
28
- return extendStatics(d, b);
29
- };
30
- function __extends(d, b) {
31
- if (typeof b !== "function" && b !== null)
32
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33
- extendStatics(d, b);
34
- function __() { this.constructor = d; }
35
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
- }
37
- var __assign = function () {
38
- __assign = Object.assign || function __assign(t) {
39
- for (var s, i = 1, n = arguments.length; i < n; i++) {
40
- s = arguments[i];
41
- for (var p in s)
42
- if (Object.prototype.hasOwnProperty.call(s, p))
43
- t[p] = s[p];
44
- }
45
- return t;
46
- };
47
- return __assign.apply(this, arguments);
48
- };
49
- function __rest(s, e) {
50
- var t = {};
51
- for (var p in s)
52
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
53
- t[p] = s[p];
54
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
55
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
56
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
57
- t[p[i]] = s[p[i]];
58
- }
59
- return t;
60
- }
61
- function __decorate(decorators, target, key, desc) {
62
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
63
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
64
- r = Reflect.decorate(decorators, target, key, desc);
65
- else
66
- for (var i = decorators.length - 1; i >= 0; i--)
67
- if (d = decorators[i])
68
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
69
- return c > 3 && r && Object.defineProperty(target, key, r), r;
70
- }
71
- function __param(paramIndex, decorator) {
72
- return function (target, key) { decorator(target, key, paramIndex); };
73
- }
74
- function __metadata(metadataKey, metadataValue) {
75
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
76
- return Reflect.metadata(metadataKey, metadataValue);
77
- }
78
- function __awaiter(thisArg, _arguments, P, generator) {
79
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
80
- return new (P || (P = Promise))(function (resolve, reject) {
81
- function fulfilled(value) { try {
82
- step(generator.next(value));
83
- }
84
- catch (e) {
85
- reject(e);
86
- } }
87
- function rejected(value) { try {
88
- step(generator["throw"](value));
89
- }
90
- catch (e) {
91
- reject(e);
92
- } }
93
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
94
- step((generator = generator.apply(thisArg, _arguments || [])).next());
95
- });
96
- }
97
- function __generator(thisArg, body) {
98
- var _ = { label: 0, sent: function () { if (t[0] & 1)
99
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
100
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
101
- function verb(n) { return function (v) { return step([n, v]); }; }
102
- function step(op) {
103
- if (f)
104
- throw new TypeError("Generator is already executing.");
105
- while (_)
106
- try {
107
- 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)
108
- return t;
109
- if (y = 0, t)
110
- op = [op[0] & 2, t.value];
111
- switch (op[0]) {
112
- case 0:
113
- case 1:
114
- t = op;
115
- break;
116
- case 4:
117
- _.label++;
118
- return { value: op[1], done: false };
119
- case 5:
120
- _.label++;
121
- y = op[1];
122
- op = [0];
123
- continue;
124
- case 7:
125
- op = _.ops.pop();
126
- _.trys.pop();
127
- continue;
128
- default:
129
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
130
- _ = 0;
131
- continue;
132
- }
133
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
134
- _.label = op[1];
135
- break;
136
- }
137
- if (op[0] === 6 && _.label < t[1]) {
138
- _.label = t[1];
139
- t = op;
140
- break;
141
- }
142
- if (t && _.label < t[2]) {
143
- _.label = t[2];
144
- _.ops.push(op);
145
- break;
146
- }
147
- if (t[2])
148
- _.ops.pop();
149
- _.trys.pop();
150
- continue;
151
- }
152
- op = body.call(thisArg, _);
153
- }
154
- catch (e) {
155
- op = [6, e];
156
- y = 0;
157
- }
158
- finally {
159
- f = t = 0;
160
- }
161
- if (op[0] & 5)
162
- throw op[1];
163
- return { value: op[0] ? op[1] : void 0, done: true };
164
- }
165
- }
166
- var __createBinding = Object.create ? (function (o, m, k, k2) {
167
- if (k2 === undefined)
168
- k2 = k;
169
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
170
- }) : (function (o, m, k, k2) {
171
- if (k2 === undefined)
172
- k2 = k;
173
- o[k2] = m[k];
174
- });
175
- function __exportStar(m, o) {
176
- for (var p in m)
177
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
178
- __createBinding(o, m, p);
179
- }
180
- function __values(o) {
181
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
182
- if (m)
183
- return m.call(o);
184
- if (o && typeof o.length === "number")
185
- return {
186
- next: function () {
187
- if (o && i >= o.length)
188
- o = void 0;
189
- return { value: o && o[i++], done: !o };
190
- }
191
- };
192
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
193
- }
194
- function __read(o, n) {
195
- var m = typeof Symbol === "function" && o[Symbol.iterator];
196
- if (!m)
197
- return o;
198
- var i = m.call(o), r, ar = [], e;
199
- try {
200
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
201
- ar.push(r.value);
202
- }
203
- catch (error) {
204
- e = { error: error };
205
- }
206
- finally {
207
- try {
208
- if (r && !r.done && (m = i["return"]))
209
- m.call(i);
210
- }
211
- finally {
212
- if (e)
213
- throw e.error;
214
- }
215
- }
216
- return ar;
217
- }
218
- /** @deprecated */
219
- function __spread() {
220
- for (var ar = [], i = 0; i < arguments.length; i++)
221
- ar = ar.concat(__read(arguments[i]));
222
- return ar;
223
- }
224
- /** @deprecated */
225
- function __spreadArrays() {
226
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
227
- s += arguments[i].length;
228
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
229
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
230
- r[k] = a[j];
231
- return r;
232
- }
233
- function __spreadArray(to, from, pack) {
234
- if (pack || arguments.length === 2)
235
- for (var i = 0, l = from.length, ar; i < l; i++) {
236
- if (ar || !(i in from)) {
237
- if (!ar)
238
- ar = Array.prototype.slice.call(from, 0, i);
239
- ar[i] = from[i];
240
- }
241
- }
242
- return to.concat(ar || Array.prototype.slice.call(from));
243
- }
244
- function __await(v) {
245
- return this instanceof __await ? (this.v = v, this) : new __await(v);
246
- }
247
- function __asyncGenerator(thisArg, _arguments, generator) {
248
- if (!Symbol.asyncIterator)
249
- throw new TypeError("Symbol.asyncIterator is not defined.");
250
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
251
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
252
- function verb(n) { if (g[n])
253
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
254
- function resume(n, v) { try {
255
- step(g[n](v));
256
- }
257
- catch (e) {
258
- settle(q[0][3], e);
259
- } }
260
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
261
- function fulfill(value) { resume("next", value); }
262
- function reject(value) { resume("throw", value); }
263
- function settle(f, v) { if (f(v), q.shift(), q.length)
264
- resume(q[0][0], q[0][1]); }
265
- }
266
- function __asyncDelegator(o) {
267
- var i, p;
268
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
269
- 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; }
270
- }
271
- function __asyncValues(o) {
272
- if (!Symbol.asyncIterator)
273
- throw new TypeError("Symbol.asyncIterator is not defined.");
274
- var m = o[Symbol.asyncIterator], i;
275
- 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);
276
- 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); }); }; }
277
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
278
- }
279
- function __makeTemplateObject(cooked, raw) {
280
- if (Object.defineProperty) {
281
- Object.defineProperty(cooked, "raw", { value: raw });
282
- }
283
- else {
284
- cooked.raw = raw;
285
- }
286
- return cooked;
287
- }
288
- ;
289
- var __setModuleDefault = Object.create ? (function (o, v) {
290
- Object.defineProperty(o, "default", { enumerable: true, value: v });
291
- }) : function (o, v) {
292
- o["default"] = v;
293
- };
294
- function __importStar(mod) {
295
- if (mod && mod.__esModule)
296
- return mod;
297
- var result = {};
298
- if (mod != null)
299
- for (var k in mod)
300
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
301
- __createBinding(result, mod, k);
302
- __setModuleDefault(result, mod);
303
- return result;
304
- }
305
- function __importDefault(mod) {
306
- return (mod && mod.__esModule) ? mod : { default: mod };
307
- }
308
- function __classPrivateFieldGet(receiver, state, kind, f) {
309
- if (kind === "a" && !f)
310
- throw new TypeError("Private accessor was defined without a getter");
311
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
312
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
313
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
314
- }
315
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
316
- if (kind === "m")
317
- throw new TypeError("Private method is not writable");
318
- if (kind === "a" && !f)
319
- throw new TypeError("Private accessor was defined without a setter");
320
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
321
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
322
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ /*
8
+ *
9
+ * * Copyright 2015-2020 Ritense BV, the Netherlands.
10
+ * *
11
+ * * Licensed under EUPL, Version 1.2 (the "License");
12
+ * * you may not use this file except in compliance with the License.
13
+ * * You may obtain a copy of the License at
14
+ * *
15
+ * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
16
+ * *
17
+ * * Unless required by applicable law or agreed to in writing, software
18
+ * * distributed under the License is distributed on an "AS IS" basis,
19
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * * See the License for the specific language governing permissions and
21
+ * * limitations under the License.
22
+ *
23
+ */
24
+
25
+ /*! *****************************************************************************
26
+ Copyright (c) Microsoft Corporation.
27
+
28
+ Permission to use, copy, modify, and/or distribute this software for any
29
+ purpose with or without fee is hereby granted.
30
+
31
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
32
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
33
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
34
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
35
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
36
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
37
+ PERFORMANCE OF THIS SOFTWARE.
38
+ ***************************************************************************** */
39
+ /* global Reflect, Promise */
40
+ var extendStatics = function (d, b) {
41
+ extendStatics = Object.setPrototypeOf ||
42
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43
+ function (d, b) { for (var p in b)
44
+ if (Object.prototype.hasOwnProperty.call(b, p))
45
+ d[p] = b[p]; };
46
+ return extendStatics(d, b);
47
+ };
48
+ function __extends(d, b) {
49
+ if (typeof b !== "function" && b !== null)
50
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
51
+ extendStatics(d, b);
52
+ function __() { this.constructor = d; }
53
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54
+ }
55
+ var __assign = function () {
56
+ __assign = Object.assign || function __assign(t) {
57
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
58
+ s = arguments[i];
59
+ for (var p in s)
60
+ if (Object.prototype.hasOwnProperty.call(s, p))
61
+ t[p] = s[p];
62
+ }
63
+ return t;
64
+ };
65
+ return __assign.apply(this, arguments);
66
+ };
67
+ function __rest(s, e) {
68
+ var t = {};
69
+ for (var p in s)
70
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
71
+ t[p] = s[p];
72
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
73
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
74
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
75
+ t[p[i]] = s[p[i]];
76
+ }
77
+ return t;
78
+ }
79
+ function __decorate(decorators, target, key, desc) {
80
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
81
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
82
+ r = Reflect.decorate(decorators, target, key, desc);
83
+ else
84
+ for (var i = decorators.length - 1; i >= 0; i--)
85
+ if (d = decorators[i])
86
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
87
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
88
+ }
89
+ function __param(paramIndex, decorator) {
90
+ return function (target, key) { decorator(target, key, paramIndex); };
91
+ }
92
+ function __metadata(metadataKey, metadataValue) {
93
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
94
+ return Reflect.metadata(metadataKey, metadataValue);
95
+ }
96
+ function __awaiter(thisArg, _arguments, P, generator) {
97
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
98
+ return new (P || (P = Promise))(function (resolve, reject) {
99
+ function fulfilled(value) { try {
100
+ step(generator.next(value));
101
+ }
102
+ catch (e) {
103
+ reject(e);
104
+ } }
105
+ function rejected(value) { try {
106
+ step(generator["throw"](value));
107
+ }
108
+ catch (e) {
109
+ reject(e);
110
+ } }
111
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
112
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
113
+ });
114
+ }
115
+ function __generator(thisArg, body) {
116
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
117
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
118
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
119
+ function verb(n) { return function (v) { return step([n, v]); }; }
120
+ function step(op) {
121
+ if (f)
122
+ throw new TypeError("Generator is already executing.");
123
+ while (_)
124
+ try {
125
+ 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)
126
+ return t;
127
+ if (y = 0, t)
128
+ op = [op[0] & 2, t.value];
129
+ switch (op[0]) {
130
+ case 0:
131
+ case 1:
132
+ t = op;
133
+ break;
134
+ case 4:
135
+ _.label++;
136
+ return { value: op[1], done: false };
137
+ case 5:
138
+ _.label++;
139
+ y = op[1];
140
+ op = [0];
141
+ continue;
142
+ case 7:
143
+ op = _.ops.pop();
144
+ _.trys.pop();
145
+ continue;
146
+ default:
147
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
148
+ _ = 0;
149
+ continue;
150
+ }
151
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
152
+ _.label = op[1];
153
+ break;
154
+ }
155
+ if (op[0] === 6 && _.label < t[1]) {
156
+ _.label = t[1];
157
+ t = op;
158
+ break;
159
+ }
160
+ if (t && _.label < t[2]) {
161
+ _.label = t[2];
162
+ _.ops.push(op);
163
+ break;
164
+ }
165
+ if (t[2])
166
+ _.ops.pop();
167
+ _.trys.pop();
168
+ continue;
169
+ }
170
+ op = body.call(thisArg, _);
171
+ }
172
+ catch (e) {
173
+ op = [6, e];
174
+ y = 0;
175
+ }
176
+ finally {
177
+ f = t = 0;
178
+ }
179
+ if (op[0] & 5)
180
+ throw op[1];
181
+ return { value: op[0] ? op[1] : void 0, done: true };
182
+ }
183
+ }
184
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
185
+ if (k2 === undefined)
186
+ k2 = k;
187
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
188
+ }) : (function (o, m, k, k2) {
189
+ if (k2 === undefined)
190
+ k2 = k;
191
+ o[k2] = m[k];
192
+ });
193
+ function __exportStar(m, o) {
194
+ for (var p in m)
195
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
196
+ __createBinding(o, m, p);
197
+ }
198
+ function __values(o) {
199
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
200
+ if (m)
201
+ return m.call(o);
202
+ if (o && typeof o.length === "number")
203
+ return {
204
+ next: function () {
205
+ if (o && i >= o.length)
206
+ o = void 0;
207
+ return { value: o && o[i++], done: !o };
208
+ }
209
+ };
210
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
211
+ }
212
+ function __read(o, n) {
213
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
214
+ if (!m)
215
+ return o;
216
+ var i = m.call(o), r, ar = [], e;
217
+ try {
218
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
219
+ ar.push(r.value);
220
+ }
221
+ catch (error) {
222
+ e = { error: error };
223
+ }
224
+ finally {
225
+ try {
226
+ if (r && !r.done && (m = i["return"]))
227
+ m.call(i);
228
+ }
229
+ finally {
230
+ if (e)
231
+ throw e.error;
232
+ }
233
+ }
234
+ return ar;
235
+ }
236
+ /** @deprecated */
237
+ function __spread() {
238
+ for (var ar = [], i = 0; i < arguments.length; i++)
239
+ ar = ar.concat(__read(arguments[i]));
240
+ return ar;
241
+ }
242
+ /** @deprecated */
243
+ function __spreadArrays() {
244
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
245
+ s += arguments[i].length;
246
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
247
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
248
+ r[k] = a[j];
249
+ return r;
250
+ }
251
+ function __spreadArray(to, from, pack) {
252
+ if (pack || arguments.length === 2)
253
+ for (var i = 0, l = from.length, ar; i < l; i++) {
254
+ if (ar || !(i in from)) {
255
+ if (!ar)
256
+ ar = Array.prototype.slice.call(from, 0, i);
257
+ ar[i] = from[i];
258
+ }
259
+ }
260
+ return to.concat(ar || Array.prototype.slice.call(from));
261
+ }
262
+ function __await(v) {
263
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
264
+ }
265
+ function __asyncGenerator(thisArg, _arguments, generator) {
266
+ if (!Symbol.asyncIterator)
267
+ throw new TypeError("Symbol.asyncIterator is not defined.");
268
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
269
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
270
+ function verb(n) { if (g[n])
271
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
272
+ function resume(n, v) { try {
273
+ step(g[n](v));
274
+ }
275
+ catch (e) {
276
+ settle(q[0][3], e);
277
+ } }
278
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
279
+ function fulfill(value) { resume("next", value); }
280
+ function reject(value) { resume("throw", value); }
281
+ function settle(f, v) { if (f(v), q.shift(), q.length)
282
+ resume(q[0][0], q[0][1]); }
283
+ }
284
+ function __asyncDelegator(o) {
285
+ var i, p;
286
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
287
+ 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; }
288
+ }
289
+ function __asyncValues(o) {
290
+ if (!Symbol.asyncIterator)
291
+ throw new TypeError("Symbol.asyncIterator is not defined.");
292
+ var m = o[Symbol.asyncIterator], i;
293
+ 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);
294
+ 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); }); }; }
295
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
296
+ }
297
+ function __makeTemplateObject(cooked, raw) {
298
+ if (Object.defineProperty) {
299
+ Object.defineProperty(cooked, "raw", { value: raw });
300
+ }
301
+ else {
302
+ cooked.raw = raw;
303
+ }
304
+ return cooked;
305
+ }
306
+ ;
307
+ var __setModuleDefault = Object.create ? (function (o, v) {
308
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
309
+ }) : function (o, v) {
310
+ o["default"] = v;
311
+ };
312
+ function __importStar(mod) {
313
+ if (mod && mod.__esModule)
314
+ return mod;
315
+ var result = {};
316
+ if (mod != null)
317
+ for (var k in mod)
318
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
319
+ __createBinding(result, mod, k);
320
+ __setModuleDefault(result, mod);
321
+ return result;
322
+ }
323
+ function __importDefault(mod) {
324
+ return (mod && mod.__esModule) ? mod : { default: mod };
325
+ }
326
+ function __classPrivateFieldGet(receiver, state, kind, f) {
327
+ if (kind === "a" && !f)
328
+ throw new TypeError("Private accessor was defined without a getter");
329
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
330
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
331
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
332
+ }
333
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
334
+ if (kind === "m")
335
+ throw new TypeError("Private method is not writable");
336
+ if (kind === "a" && !f)
337
+ throw new TypeError("Private accessor was defined without a setter");
338
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
339
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
340
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
323
341
  }
324
342
 
325
- /*
326
- * Copyright 2020 Dimpact.
327
- *
328
- * Licensed under EUPL, Version 1.2 (the "License");
329
- * you may not use this file except in compliance with the License.
330
- * You may obtain a copy of the License at
331
- *
332
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
333
- *
334
- * Unless required by applicable law or agreed to in writing, software
335
- * distributed under the License is distributed on an "AS IS" basis,
336
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
337
- * See the License for the specific language governing permissions and
338
- * limitations under the License.
339
- */
340
- var ConnectorManagementService = /** @class */ (function () {
341
- function ConnectorManagementService(http, configService) {
342
- this.http = http;
343
- this.configService = configService;
344
- this.valtimoApiConfig = configService.config.valtimoApi;
345
- }
346
- ConnectorManagementService.prototype.getConnectorInstances = function (params) {
347
- return this.http.get(this.valtimoApiConfig.endpointUri + "connector/instance", { params: params });
348
- };
349
- ConnectorManagementService.prototype.getConnectorInstancesByType = function (typeId, params) {
350
- return this.http.get(this.valtimoApiConfig.endpointUri + "connector/instance/" + typeId, { params: params });
351
- };
352
- ConnectorManagementService.prototype.getConnectorInstanceById = function (instanceId) {
353
- return this.http.get(this.valtimoApiConfig.endpointUri + "connector/instance?instanceId=" + instanceId);
354
- };
355
- ConnectorManagementService.prototype.getConnectorTypes = function () {
356
- return this.http.get(this.valtimoApiConfig.endpointUri + "connector/type");
357
- };
358
- ConnectorManagementService.prototype.createConnectorInstance = function (request) {
359
- return this.http.post(this.valtimoApiConfig.endpointUri + "connector/instance", request);
360
- };
361
- ConnectorManagementService.prototype.updateConnectorInstance = function (request) {
362
- return this.http.put(this.valtimoApiConfig.endpointUri + "connector/instance", request);
363
- };
364
- ConnectorManagementService.prototype.deleteConnectorInstance = function (connectorInstanceId) {
365
- return this.http.delete(this.valtimoApiConfig.endpointUri + "connector/instance/" + connectorInstanceId);
366
- };
367
- return ConnectorManagementService;
368
- }());
369
- ConnectorManagementService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConnectorManagementService_Factory() { return new ConnectorManagementService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: ConnectorManagementService, providedIn: "root" });
370
- ConnectorManagementService.decorators = [
371
- { type: i0.Injectable, args: [{
372
- providedIn: 'root',
373
- },] }
374
- ];
375
- ConnectorManagementService.ctorParameters = function () { return [
376
- { type: i1.HttpClient },
377
- { type: i2.ConfigService }
343
+ /*
344
+ * Copyright 2020 Dimpact.
345
+ *
346
+ * Licensed under EUPL, Version 1.2 (the "License");
347
+ * you may not use this file except in compliance with the License.
348
+ * You may obtain a copy of the License at
349
+ *
350
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
351
+ *
352
+ * Unless required by applicable law or agreed to in writing, software
353
+ * distributed under the License is distributed on an "AS IS" basis,
354
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
355
+ * See the License for the specific language governing permissions and
356
+ * limitations under the License.
357
+ */
358
+ var ConnectorManagementService = /** @class */ (function () {
359
+ function ConnectorManagementService(http, configService) {
360
+ this.http = http;
361
+ this.configService = configService;
362
+ this.valtimoApiConfig = configService.config.valtimoApi;
363
+ }
364
+ ConnectorManagementService.prototype.getConnectorInstances = function (params) {
365
+ return this.http.get(this.valtimoApiConfig.endpointUri + "connector/instance", { params: params });
366
+ };
367
+ ConnectorManagementService.prototype.getConnectorInstancesByType = function (typeId, params) {
368
+ return this.http.get(this.valtimoApiConfig.endpointUri + "connector/instance/" + typeId, { params: params });
369
+ };
370
+ ConnectorManagementService.prototype.getConnectorInstanceById = function (instanceId) {
371
+ return this.http.get(this.valtimoApiConfig.endpointUri + "connector/instance?instanceId=" + instanceId);
372
+ };
373
+ ConnectorManagementService.prototype.getConnectorTypes = function () {
374
+ return this.http.get(this.valtimoApiConfig.endpointUri + "connector/type");
375
+ };
376
+ ConnectorManagementService.prototype.createConnectorInstance = function (request) {
377
+ return this.http.post(this.valtimoApiConfig.endpointUri + "connector/instance", request);
378
+ };
379
+ ConnectorManagementService.prototype.updateConnectorInstance = function (request) {
380
+ return this.http.put(this.valtimoApiConfig.endpointUri + "connector/instance", request);
381
+ };
382
+ ConnectorManagementService.prototype.deleteConnectorInstance = function (connectorInstanceId) {
383
+ return this.http.delete(this.valtimoApiConfig.endpointUri + "connector/instance/" + connectorInstanceId);
384
+ };
385
+ return ConnectorManagementService;
386
+ }());
387
+ ConnectorManagementService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConnectorManagementService_Factory() { return new ConnectorManagementService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: ConnectorManagementService, providedIn: "root" });
388
+ ConnectorManagementService.decorators = [
389
+ { type: i0.Injectable, args: [{
390
+ providedIn: 'root',
391
+ },] }
392
+ ];
393
+ ConnectorManagementService.ctorParameters = function () { return [
394
+ { type: i1.HttpClient },
395
+ { type: i2.ConfigService }
378
396
  ]; };
379
397
 
380
- /*
381
- * Copyright 2020 Dimpact.
382
- *
383
- * Licensed under EUPL, Version 1.2 (the "License");
384
- * you may not use this file except in compliance with the License.
385
- * You may obtain a copy of the License at
386
- *
387
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
388
- *
389
- * Unless required by applicable law or agreed to in writing, software
390
- * distributed under the License is distributed on an "AS IS" basis,
391
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
392
- * See the License for the specific language governing permissions and
393
- * limitations under the License.
394
- */
395
- var ConnectorManagementStateService = /** @class */ (function () {
396
- function ConnectorManagementStateService() {
397
- this._showModal$ = new rxjs.BehaviorSubject(false);
398
- this._showExtensionModal$ = new rxjs.BehaviorSubject(false);
399
- this._inputDisabled$ = new rxjs.BehaviorSubject(false);
400
- this._refresh$ = new rxjs.BehaviorSubject('refresh');
401
- this._selectedInstance$ = new rxjs.BehaviorSubject(undefined);
402
- this._lastConfigIdAdded$ = new rxjs.BehaviorSubject('');
403
- }
404
- Object.defineProperty(ConnectorManagementStateService.prototype, "showModal$", {
405
- get: function () {
406
- return this._showModal$.asObservable();
407
- },
408
- enumerable: false,
409
- configurable: true
410
- });
411
- Object.defineProperty(ConnectorManagementStateService.prototype, "showExtensionModal$", {
412
- get: function () {
413
- return this._showExtensionModal$.asObservable();
414
- },
415
- enumerable: false,
416
- configurable: true
417
- });
418
- Object.defineProperty(ConnectorManagementStateService.prototype, "inputDisabled$", {
419
- get: function () {
420
- return this._inputDisabled$.asObservable();
421
- },
422
- enumerable: false,
423
- configurable: true
424
- });
425
- Object.defineProperty(ConnectorManagementStateService.prototype, "refresh$", {
426
- get: function () {
427
- return this._refresh$.asObservable();
428
- },
429
- enumerable: false,
430
- configurable: true
431
- });
432
- Object.defineProperty(ConnectorManagementStateService.prototype, "selectedInstance$", {
433
- get: function () {
434
- return this._selectedInstance$.asObservable();
435
- },
436
- enumerable: false,
437
- configurable: true
438
- });
439
- Object.defineProperty(ConnectorManagementStateService.prototype, "lastConfigIdAdded$", {
440
- get: function () {
441
- return this._lastConfigIdAdded$.asObservable();
442
- },
443
- enumerable: false,
444
- configurable: true
445
- });
446
- ConnectorManagementStateService.prototype.showModal = function () {
447
- this._showModal$.next(true);
448
- };
449
- ConnectorManagementStateService.prototype.hideModal = function () {
450
- this._showModal$.next(false);
451
- };
452
- ConnectorManagementStateService.prototype.showExtensionModal = function () {
453
- this._showExtensionModal$.next(true);
454
- };
455
- ConnectorManagementStateService.prototype.hideExtensionModal = function () {
456
- this._showExtensionModal$.next(false);
457
- };
458
- ConnectorManagementStateService.prototype.disableInput = function () {
459
- this._inputDisabled$.next(true);
460
- };
461
- ConnectorManagementStateService.prototype.enableInput = function () {
462
- this._inputDisabled$.next(false);
463
- };
464
- ConnectorManagementStateService.prototype.refresh = function () {
465
- this._refresh$.next('refresh');
466
- };
467
- ConnectorManagementStateService.prototype.setConnectorInstance = function (instance) {
468
- this._selectedInstance$.next(instance);
469
- };
470
- ConnectorManagementStateService.prototype.setLastConfigIdAdded = function (id) {
471
- this._lastConfigIdAdded$.next(id);
472
- };
473
- ConnectorManagementStateService.prototype.clearLastConfigIdAdded = function () {
474
- this._lastConfigIdAdded$.next('');
475
- };
476
- return ConnectorManagementStateService;
477
- }());
478
- ConnectorManagementStateService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConnectorManagementStateService_Factory() { return new ConnectorManagementStateService(); }, token: ConnectorManagementStateService, providedIn: "root" });
479
- ConnectorManagementStateService.decorators = [
480
- { type: i0.Injectable, args: [{
481
- providedIn: 'root',
482
- },] }
398
+ /*
399
+ * Copyright 2020 Dimpact.
400
+ *
401
+ * Licensed under EUPL, Version 1.2 (the "License");
402
+ * you may not use this file except in compliance with the License.
403
+ * You may obtain a copy of the License at
404
+ *
405
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
406
+ *
407
+ * Unless required by applicable law or agreed to in writing, software
408
+ * distributed under the License is distributed on an "AS IS" basis,
409
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
410
+ * See the License for the specific language governing permissions and
411
+ * limitations under the License.
412
+ */
413
+ var ConnectorManagementStateService = /** @class */ (function () {
414
+ function ConnectorManagementStateService() {
415
+ this._showModal$ = new rxjs.BehaviorSubject(false);
416
+ this._showExtensionModal$ = new rxjs.BehaviorSubject(false);
417
+ this._inputDisabled$ = new rxjs.BehaviorSubject(false);
418
+ this._refresh$ = new rxjs.BehaviorSubject('refresh');
419
+ this._selectedInstance$ = new rxjs.BehaviorSubject(undefined);
420
+ this._lastConfigIdAdded$ = new rxjs.BehaviorSubject('');
421
+ }
422
+ Object.defineProperty(ConnectorManagementStateService.prototype, "showModal$", {
423
+ get: function () {
424
+ return this._showModal$.asObservable();
425
+ },
426
+ enumerable: false,
427
+ configurable: true
428
+ });
429
+ Object.defineProperty(ConnectorManagementStateService.prototype, "showExtensionModal$", {
430
+ get: function () {
431
+ return this._showExtensionModal$.asObservable();
432
+ },
433
+ enumerable: false,
434
+ configurable: true
435
+ });
436
+ Object.defineProperty(ConnectorManagementStateService.prototype, "inputDisabled$", {
437
+ get: function () {
438
+ return this._inputDisabled$.asObservable();
439
+ },
440
+ enumerable: false,
441
+ configurable: true
442
+ });
443
+ Object.defineProperty(ConnectorManagementStateService.prototype, "refresh$", {
444
+ get: function () {
445
+ return this._refresh$.asObservable();
446
+ },
447
+ enumerable: false,
448
+ configurable: true
449
+ });
450
+ Object.defineProperty(ConnectorManagementStateService.prototype, "selectedInstance$", {
451
+ get: function () {
452
+ return this._selectedInstance$.asObservable();
453
+ },
454
+ enumerable: false,
455
+ configurable: true
456
+ });
457
+ Object.defineProperty(ConnectorManagementStateService.prototype, "lastConfigIdAdded$", {
458
+ get: function () {
459
+ return this._lastConfigIdAdded$.asObservable();
460
+ },
461
+ enumerable: false,
462
+ configurable: true
463
+ });
464
+ ConnectorManagementStateService.prototype.showModal = function () {
465
+ this._showModal$.next(true);
466
+ };
467
+ ConnectorManagementStateService.prototype.hideModal = function () {
468
+ this._showModal$.next(false);
469
+ };
470
+ ConnectorManagementStateService.prototype.showExtensionModal = function () {
471
+ this._showExtensionModal$.next(true);
472
+ };
473
+ ConnectorManagementStateService.prototype.hideExtensionModal = function () {
474
+ this._showExtensionModal$.next(false);
475
+ };
476
+ ConnectorManagementStateService.prototype.disableInput = function () {
477
+ this._inputDisabled$.next(true);
478
+ };
479
+ ConnectorManagementStateService.prototype.enableInput = function () {
480
+ this._inputDisabled$.next(false);
481
+ };
482
+ ConnectorManagementStateService.prototype.refresh = function () {
483
+ this._refresh$.next('refresh');
484
+ };
485
+ ConnectorManagementStateService.prototype.setConnectorInstance = function (instance) {
486
+ this._selectedInstance$.next(instance);
487
+ };
488
+ ConnectorManagementStateService.prototype.setLastConfigIdAdded = function (id) {
489
+ this._lastConfigIdAdded$.next(id);
490
+ };
491
+ ConnectorManagementStateService.prototype.clearLastConfigIdAdded = function () {
492
+ this._lastConfigIdAdded$.next('');
493
+ };
494
+ return ConnectorManagementStateService;
495
+ }());
496
+ ConnectorManagementStateService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConnectorManagementStateService_Factory() { return new ConnectorManagementStateService(); }, token: ConnectorManagementStateService, providedIn: "root" });
497
+ ConnectorManagementStateService.decorators = [
498
+ { type: i0.Injectable, args: [{
499
+ providedIn: 'root',
500
+ },] }
483
501
  ];
484
502
 
485
- var ConnectorManagementComponent = /** @class */ (function () {
486
- function ConnectorManagementComponent(connectorManagementService, translateService, stateService) {
487
- var _this = this;
488
- this.connectorManagementService = connectorManagementService;
489
- this.translateService = translateService;
490
- this.stateService = stateService;
491
- this.loading$ = new rxjs.BehaviorSubject(true);
492
- this.fields$ = new rxjs.BehaviorSubject([]);
493
- this.currentPageAndSize$ = new rxjs.BehaviorSubject({
494
- page: 0,
495
- size: 10,
496
- });
497
- this.pageSizes$ = new rxjs.BehaviorSubject({
498
- collectionSize: 0,
499
- maxPaginationItemSize: 5,
500
- });
501
- this.pagination$ = rxjs.combineLatest([
502
- this.currentPageAndSize$,
503
- this.pageSizes$,
504
- ]).pipe(operators.map(function (_b) {
505
- var _c = __read(_b, 2), currentPage = _c[0], sizes = _c[1];
506
- return (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }));
507
- }));
508
- this.connectorInstances$ = rxjs.combineLatest([
509
- this.currentPageAndSize$,
510
- this.translateService.stream('key'),
511
- this.stateService.refresh$,
512
- ]).pipe(operators.tap(function () { return _this.setFields(); }), operators.switchMap(function (_b) {
513
- var _c = __read(_b, 1), currentPage = _c[0];
514
- return rxjs.combineLatest([
515
- _this.connectorManagementService.getConnectorInstances({
516
- page: currentPage.page,
517
- size: currentPage.size,
518
- }),
519
- _this.connectorManagementService.getConnectorTypes(),
520
- ]);
521
- }), operators.tap(function (_b) {
522
- var _c = __read(_b, 1), instanceRes = _c[0];
523
- _this.pageSizes$.pipe(operators.take(1)).subscribe(function (sizes) {
524
- _this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
525
- });
526
- }), operators.map(function (_b) {
527
- var _c = __read(_b, 2), instanceRes = _c[0], typesRes = _c[1];
528
- return instanceRes.content.map(function (instance) {
529
- var _a;
530
- return Object.assign(Object.assign({}, instance), { typeName: (_a = typesRes.find(function (type) { return type.id === instance.type.id; })) === null || _a === void 0 ? void 0 : _a.name });
531
- });
532
- }), operators.tap(function () { return _this.loading$.next(false); }));
533
- this.modalType$ = new rxjs.BehaviorSubject('add');
534
- }
535
- ConnectorManagementComponent.prototype.ngOnDestroy = function () {
536
- this.stateService.hideModal();
537
- };
538
- ConnectorManagementComponent.prototype.paginationClicked = function (newPageNumber) {
539
- var _this = this;
540
- this.currentPageAndSize$.pipe(operators.take(1)).subscribe(function (currentPage) {
541
- _this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
542
- });
543
- };
544
- ConnectorManagementComponent.prototype.paginationSet = function (newPageSize) {
545
- var _this = this;
546
- if (newPageSize) {
547
- this.currentPageAndSize$.pipe(operators.take(1)).subscribe(function (currentPage) {
548
- _this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
549
- });
550
- }
551
- };
552
- ConnectorManagementComponent.prototype.rowClicked = function (instance) {
553
- this.modalType$.next('modify');
554
- this.stateService.setConnectorInstance(instance);
555
- this.stateService.showModal();
556
- };
557
- ConnectorManagementComponent.prototype.showAddModal = function () {
558
- this.modalType$.next('add');
559
- this.stateService.showModal();
560
- };
561
- ConnectorManagementComponent.prototype.setFields = function () {
562
- var _this = this;
563
- var getTranslatedLabel = function (key) { return _this.translateService.instant("connectorManagement.labels." + key); };
564
- var keys = ['name', 'typeName'];
565
- this.fields$.next(keys.map(function (key) { return ({ label: getTranslatedLabel(key), key: key }); }));
566
- };
567
- return ConnectorManagementComponent;
568
- }());
569
- ConnectorManagementComponent.decorators = [
570
- { type: i0.Component, args: [{
571
- selector: 'valtimo-connector-management',
572
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"main-content pt-0\"\n *ngIf=\"{\n connectorInstances: connectorInstances$ | async,\n fields: fields$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {loading: obs.loading}\"></ng-container>\n <valtimo-widget *ngIf=\"obs.loading === false; else loading\">\n <valtimo-list\n [items]=\"obs.connectorInstances\"\n [fields]=\"obs.fields\"\n [header]=\"true\"\n [viewMode]=\"true\"\n [isSearchable]=\"false\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"connectorManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowClicked($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'connectorManagement.title' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'connectorManagement.subtitle' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-connector-modal [modalType]=\"modalType$ | async\"> </valtimo-connector-modal>\n\n<ng-template #buttons let-loading=\"loading\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space mr-0\" [disabled]=\"loading\" (click)=\"showAddModal()\">\n <i class=\"icon mdi mdi-plus\"></i>&nbsp;\n {{ 'connectorManagement.add' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n",
573
- styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
574
- },] }
575
- ];
576
- ConnectorManagementComponent.ctorParameters = function () { return [
577
- { type: ConnectorManagementService },
578
- { type: core.TranslateService },
579
- { type: ConnectorManagementStateService }
503
+ var ConnectorManagementComponent = /** @class */ (function () {
504
+ function ConnectorManagementComponent(connectorManagementService, translateService, stateService) {
505
+ var _this = this;
506
+ this.connectorManagementService = connectorManagementService;
507
+ this.translateService = translateService;
508
+ this.stateService = stateService;
509
+ this.loading$ = new rxjs.BehaviorSubject(true);
510
+ this.fields$ = new rxjs.BehaviorSubject([]);
511
+ this.currentPageAndSize$ = new rxjs.BehaviorSubject({
512
+ page: 0,
513
+ size: 10,
514
+ });
515
+ this.pageSizes$ = new rxjs.BehaviorSubject({
516
+ collectionSize: 0,
517
+ maxPaginationItemSize: 5,
518
+ });
519
+ this.pagination$ = rxjs.combineLatest([
520
+ this.currentPageAndSize$,
521
+ this.pageSizes$,
522
+ ]).pipe(operators.map(function (_b) {
523
+ var _c = __read(_b, 2), currentPage = _c[0], sizes = _c[1];
524
+ return (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }));
525
+ }));
526
+ this.connectorInstances$ = rxjs.combineLatest([
527
+ this.currentPageAndSize$,
528
+ this.translateService.stream('key'),
529
+ this.stateService.refresh$,
530
+ ]).pipe(operators.tap(function () { return _this.setFields(); }), operators.switchMap(function (_b) {
531
+ var _c = __read(_b, 1), currentPage = _c[0];
532
+ return rxjs.combineLatest([
533
+ _this.connectorManagementService.getConnectorInstances({
534
+ page: currentPage.page,
535
+ size: currentPage.size,
536
+ }),
537
+ _this.connectorManagementService.getConnectorTypes(),
538
+ ]);
539
+ }), operators.tap(function (_b) {
540
+ var _c = __read(_b, 1), instanceRes = _c[0];
541
+ _this.pageSizes$.pipe(operators.take(1)).subscribe(function (sizes) {
542
+ _this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
543
+ });
544
+ }), operators.map(function (_b) {
545
+ var _c = __read(_b, 2), instanceRes = _c[0], typesRes = _c[1];
546
+ return instanceRes.content.map(function (instance) {
547
+ var _a;
548
+ return Object.assign(Object.assign({}, instance), { typeName: (_a = typesRes.find(function (type) { return type.id === instance.type.id; })) === null || _a === void 0 ? void 0 : _a.name });
549
+ });
550
+ }), operators.tap(function () { return _this.loading$.next(false); }));
551
+ this.modalType$ = new rxjs.BehaviorSubject('add');
552
+ }
553
+ ConnectorManagementComponent.prototype.ngOnDestroy = function () {
554
+ this.stateService.hideModal();
555
+ };
556
+ ConnectorManagementComponent.prototype.paginationClicked = function (newPageNumber) {
557
+ var _this = this;
558
+ this.currentPageAndSize$.pipe(operators.take(1)).subscribe(function (currentPage) {
559
+ _this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
560
+ });
561
+ };
562
+ ConnectorManagementComponent.prototype.paginationSet = function (newPageSize) {
563
+ var _this = this;
564
+ if (newPageSize) {
565
+ this.currentPageAndSize$.pipe(operators.take(1)).subscribe(function (currentPage) {
566
+ _this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
567
+ });
568
+ }
569
+ };
570
+ ConnectorManagementComponent.prototype.rowClicked = function (instance) {
571
+ this.modalType$.next('modify');
572
+ this.stateService.setConnectorInstance(instance);
573
+ this.stateService.showModal();
574
+ };
575
+ ConnectorManagementComponent.prototype.showAddModal = function () {
576
+ this.modalType$.next('add');
577
+ this.stateService.showModal();
578
+ };
579
+ ConnectorManagementComponent.prototype.setFields = function () {
580
+ var _this = this;
581
+ var getTranslatedLabel = function (key) { return _this.translateService.instant("connectorManagement.labels." + key); };
582
+ var keys = ['name', 'typeName'];
583
+ this.fields$.next(keys.map(function (key) { return ({ label: getTranslatedLabel(key), key: key }); }));
584
+ };
585
+ return ConnectorManagementComponent;
586
+ }());
587
+ ConnectorManagementComponent.decorators = [
588
+ { type: i0.Component, args: [{
589
+ selector: 'valtimo-connector-management',
590
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"main-content pt-0\"\n *ngIf=\"{\n connectorInstances: connectorInstances$ | async,\n fields: fields$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {loading: obs.loading}\"></ng-container>\n <valtimo-widget *ngIf=\"obs.loading === false; else loading\">\n <valtimo-list\n [items]=\"obs.connectorInstances\"\n [fields]=\"obs.fields\"\n [header]=\"true\"\n [viewMode]=\"true\"\n [isSearchable]=\"false\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"connectorManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowClicked($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'connectorManagement.title' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'connectorManagement.subtitle' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-connector-modal [modalType]=\"modalType$ | async\"> </valtimo-connector-modal>\n\n<ng-template #buttons let-loading=\"loading\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space mr-0\" [disabled]=\"loading\" (click)=\"showAddModal()\">\n <i class=\"icon mdi mdi-plus\"></i>&nbsp;\n {{ 'connectorManagement.add' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n",
591
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
592
+ },] }
593
+ ];
594
+ ConnectorManagementComponent.ctorParameters = function () { return [
595
+ { type: ConnectorManagementService },
596
+ { type: core.TranslateService },
597
+ { type: ConnectorManagementStateService }
580
598
  ]; };
581
599
 
582
- /*
583
- * Copyright 2015-2020 Ritense BV, the Netherlands.
584
- *
585
- * Licensed under EUPL, Version 1.2 (the "License");
586
- * you may not use this file except in compliance with the License.
587
- * You may obtain a copy of the License at
588
- *
589
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
590
- *
591
- * Unless required by applicable law or agreed to in writing, software
592
- * distributed under the License is distributed on an "AS IS" basis,
593
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
594
- * See the License for the specific language governing permissions and
595
- * limitations under the License.
596
- */
597
- var ɵ0 = { title: 'Connectors', roles: [contract.ROLE_ADMIN] };
598
- var routes = [
599
- {
600
- path: 'connectors',
601
- component: ConnectorManagementComponent,
602
- canActivate: [security.AuthGuardService],
603
- data: ɵ0,
604
- },
605
- ];
606
- var ConnectorManagementRoutingModule = /** @class */ (function () {
607
- function ConnectorManagementRoutingModule() {
608
- }
609
- return ConnectorManagementRoutingModule;
610
- }());
611
- ConnectorManagementRoutingModule.decorators = [
612
- { type: i0.NgModule, args: [{
613
- declarations: [],
614
- imports: [common.CommonModule, router.RouterModule.forChild(routes)],
615
- exports: [router.RouterModule],
616
- },] }
600
+ /*
601
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
602
+ *
603
+ * Licensed under EUPL, Version 1.2 (the "License");
604
+ * you may not use this file except in compliance with the License.
605
+ * You may obtain a copy of the License at
606
+ *
607
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
608
+ *
609
+ * Unless required by applicable law or agreed to in writing, software
610
+ * distributed under the License is distributed on an "AS IS" basis,
611
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
612
+ * See the License for the specific language governing permissions and
613
+ * limitations under the License.
614
+ */
615
+ var ɵ0 = { title: 'Connectors', roles: [i2.ROLE_ADMIN] };
616
+ var routes = [
617
+ {
618
+ path: 'connectors',
619
+ component: ConnectorManagementComponent,
620
+ canActivate: [security.AuthGuardService],
621
+ data: ɵ0,
622
+ },
623
+ ];
624
+ var ConnectorManagementRoutingModule = /** @class */ (function () {
625
+ function ConnectorManagementRoutingModule() {
626
+ }
627
+ return ConnectorManagementRoutingModule;
628
+ }());
629
+ ConnectorManagementRoutingModule.decorators = [
630
+ { type: i0.NgModule, args: [{
631
+ declarations: [],
632
+ imports: [common.CommonModule, router.RouterModule.forChild(routes)],
633
+ exports: [router.RouterModule],
634
+ },] }
617
635
  ];
618
636
 
619
- /*
620
- * Copyright 2015-2020 Ritense BV, the Netherlands.
621
- *
622
- * Licensed under EUPL, Version 1.2 (the "License");
623
- * you may not use this file except in compliance with the License.
624
- * You may obtain a copy of the License at
625
- *
626
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
627
- *
628
- * Unless required by applicable law or agreed to in writing, software
629
- * distributed under the License is distributed on an "AS IS" basis,
630
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
631
- * See the License for the specific language governing permissions and
632
- * limitations under the License.
633
- */
634
- var ObjectApiSyncService = /** @class */ (function () {
635
- function ObjectApiSyncService(http, configService) {
636
- this.http = http;
637
- this.configService = configService;
638
- this.valtimoApiConfig = configService.config.valtimoApi;
639
- }
640
- ObjectApiSyncService.prototype.getObjectSyncConfigs = function (documentDefinitionName) {
641
- return this.http.get(this.valtimoApiConfig.endpointUri + "object/sync/config", { params: { documentDefinitionName: documentDefinitionName } });
642
- };
643
- ObjectApiSyncService.prototype.createObjectSyncConfig = function (request) {
644
- return this.http.post(this.valtimoApiConfig.endpointUri + "object/sync/config", request);
645
- };
646
- ObjectApiSyncService.prototype.modifyObjectSyncConfig = function (request) {
647
- return this.http.put(this.valtimoApiConfig.endpointUri + "object/sync/config", request);
648
- };
649
- ObjectApiSyncService.prototype.deleteObjectSyncConfig = function (configId) {
650
- return this.http.delete(this.valtimoApiConfig.endpointUri + "object/sync/config/" + configId);
651
- };
652
- return ObjectApiSyncService;
653
- }());
654
- ObjectApiSyncService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ObjectApiSyncService_Factory() { return new ObjectApiSyncService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: ObjectApiSyncService, providedIn: "root" });
655
- ObjectApiSyncService.decorators = [
656
- { type: i0.Injectable, args: [{
657
- providedIn: 'root',
658
- },] }
659
- ];
660
- ObjectApiSyncService.ctorParameters = function () { return [
661
- { type: i1.HttpClient },
662
- { type: i2.ConfigService }
637
+ /*
638
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
639
+ *
640
+ * Licensed under EUPL, Version 1.2 (the "License");
641
+ * you may not use this file except in compliance with the License.
642
+ * You may obtain a copy of the License at
643
+ *
644
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
645
+ *
646
+ * Unless required by applicable law or agreed to in writing, software
647
+ * distributed under the License is distributed on an "AS IS" basis,
648
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
649
+ * See the License for the specific language governing permissions and
650
+ * limitations under the License.
651
+ */
652
+ var ObjectApiSyncService = /** @class */ (function () {
653
+ function ObjectApiSyncService(http, configService) {
654
+ this.http = http;
655
+ this.configService = configService;
656
+ this.valtimoApiConfig = configService.config.valtimoApi;
657
+ }
658
+ ObjectApiSyncService.prototype.getObjectSyncConfigs = function (documentDefinitionName) {
659
+ return this.http.get(this.valtimoApiConfig.endpointUri + "object/sync/config", { params: { documentDefinitionName: documentDefinitionName } });
660
+ };
661
+ ObjectApiSyncService.prototype.createObjectSyncConfig = function (request) {
662
+ return this.http.post(this.valtimoApiConfig.endpointUri + "object/sync/config", request);
663
+ };
664
+ ObjectApiSyncService.prototype.modifyObjectSyncConfig = function (request) {
665
+ return this.http.put(this.valtimoApiConfig.endpointUri + "object/sync/config", request);
666
+ };
667
+ ObjectApiSyncService.prototype.deleteObjectSyncConfig = function (configId) {
668
+ return this.http.delete(this.valtimoApiConfig.endpointUri + "object/sync/config/" + configId);
669
+ };
670
+ return ObjectApiSyncService;
671
+ }());
672
+ ObjectApiSyncService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ObjectApiSyncService_Factory() { return new ObjectApiSyncService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: ObjectApiSyncService, providedIn: "root" });
673
+ ObjectApiSyncService.decorators = [
674
+ { type: i0.Injectable, args: [{
675
+ providedIn: 'root',
676
+ },] }
677
+ ];
678
+ ObjectApiSyncService.ctorParameters = function () { return [
679
+ { type: i1.HttpClient },
680
+ { type: i2.ConfigService }
663
681
  ]; };
664
682
 
665
- var ConnectorLinkExtensionModalComponent = /** @class */ (function () {
666
- function ConnectorLinkExtensionModalComponent(connectorManagementService, translateService, stateService, objectApiSyncService, route, alertService) {
667
- var _this = this;
668
- this.connectorManagementService = connectorManagementService;
669
- this.translateService = translateService;
670
- this.stateService = stateService;
671
- this.objectApiSyncService = objectApiSyncService;
672
- this.route = route;
673
- this.alertService = alertService;
674
- this.loading$ = new rxjs.BehaviorSubject(true);
675
- this.fields$ = new rxjs.BehaviorSubject([]);
676
- this.currentPageAndSize$ = new rxjs.BehaviorSubject({
677
- page: 0,
678
- size: 10,
679
- });
680
- this.pageSizes$ = new rxjs.BehaviorSubject({
681
- collectionSize: 0,
682
- maxPaginationItemSize: 5,
683
- });
684
- this.pagination$ = rxjs.combineLatest([
685
- this.currentPageAndSize$,
686
- this.pageSizes$,
687
- ]).pipe(operators.map(function (_c) {
688
- var _d = __read(_c, 2), currentPage = _d[0], sizes = _d[1];
689
- return (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }));
690
- }));
691
- this.connectorInstances$ = rxjs.combineLatest([
692
- this.currentPageAndSize$,
693
- this.connectorManagementService.getConnectorTypes(),
694
- this.translateService.stream('key'),
695
- this.stateService.refresh$,
696
- ]).pipe(operators.tap(function () { return _this.setFields(); }), operators.switchMap(function (_c) {
697
- var _d = __read(_c, 2), currentPage = _d[0], types = _d[1];
698
- return _this.connectorManagementService.getConnectorInstancesByType(types.find(function (type) { return type.name.toLowerCase().includes('objectsapi'); }).id, { page: currentPage.page, size: currentPage.size });
699
- }), operators.tap(function (instanceRes) {
700
- _this.pageSizes$.pipe(operators.take(1)).subscribe(function (sizes) {
701
- _this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
702
- });
703
- }), operators.map(function (res) { return res.content; }), operators.tap(function () { return _this.loading$.next(false); }));
704
- this.noObjectsApiConnectors$ = this.connectorInstances$.pipe(operators.map(function (instances) { return !instances || instances.length === 0; }));
705
- this.disabled$ = this.stateService.inputDisabled$;
706
- }
707
- ConnectorLinkExtensionModalComponent.prototype.ngAfterViewInit = function () {
708
- var _this = this;
709
- this.showSubscription = this.stateService.showExtensionModal$.subscribe(function (show) {
710
- if (show) {
711
- _this.show();
712
- }
713
- else {
714
- _this.hide();
715
- }
716
- });
717
- };
718
- ConnectorLinkExtensionModalComponent.prototype.ngOnDestroy = function () {
719
- var _a;
720
- (_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
721
- };
722
- ConnectorLinkExtensionModalComponent.prototype.paginationClicked = function (newPageNumber) {
723
- var _this = this;
724
- this.currentPageAndSize$.pipe(operators.take(1)).subscribe(function (currentPage) {
725
- _this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
726
- });
727
- };
728
- ConnectorLinkExtensionModalComponent.prototype.paginationSet = function (newPageSize) {
729
- var _this = this;
730
- if (newPageSize) {
731
- this.currentPageAndSize$.pipe(operators.take(1)).subscribe(function (currentPage) {
732
- _this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
733
- });
734
- }
735
- };
736
- ConnectorLinkExtensionModalComponent.prototype.rowClicked = function (instance) {
737
- var _this = this;
738
- var _a, _b;
739
- var connectorInstanceId = instance.id;
740
- var enabled = true;
741
- var documentDefinitionName = this.route.snapshot.paramMap.get('name');
742
- var objectTypeUrl = (_b = (_a = instance.properties) === null || _a === void 0 ? void 0 : _a.objectType) === null || _b === void 0 ? void 0 : _b.url;
743
- var splitObjectTypeUrl = objectTypeUrl === null || objectTypeUrl === void 0 ? void 0 : objectTypeUrl.split('/');
744
- var objectTypeId = splitObjectTypeUrl[splitObjectTypeUrl.length - 1];
745
- this.stateService.disableInput();
746
- this.objectApiSyncService
747
- .createObjectSyncConfig({ connectorInstanceId: connectorInstanceId, enabled: enabled, documentDefinitionName: documentDefinitionName, objectTypeId: objectTypeId })
748
- .subscribe(function (res) {
749
- _this.alertService.success(_this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
750
- _this.stateService.hideExtensionModal();
751
- _this.stateService.enableInput();
752
- _this.stateService.refresh();
753
- _this.stateService.setLastConfigIdAdded(res.objectSyncConfig.id);
754
- }, function () {
755
- _this.stateService.enableInput();
756
- });
757
- };
758
- ConnectorLinkExtensionModalComponent.prototype.setFields = function () {
759
- var _this = this;
760
- var getTranslatedLabel = function (key) { return _this.translateService.instant("connectorManagement.labels." + key); };
761
- var keys = ['name'];
762
- this.fields$.next(keys.map(function (key) { return ({ label: getTranslatedLabel(key), key: key }); }));
763
- };
764
- ConnectorLinkExtensionModalComponent.prototype.show = function () {
765
- this.modal.show();
766
- };
767
- ConnectorLinkExtensionModalComponent.prototype.hide = function () {
768
- this.modal.hide();
769
- };
770
- return ConnectorLinkExtensionModalComponent;
771
- }());
772
- ConnectorLinkExtensionModalComponent.decorators = [
773
- { type: i0.Component, args: [{
774
- selector: 'valtimo-connector-link-extension-modal',
775
- template: "<valtimo-modal #modal [title]=\"'connectorManagement.extension.buttonText' | translate\">\n <div\n class=\"mt-2\"\n body\n *ngIf=\"{\n connectorInstances: connectorInstances$ | async,\n fields: fields$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n noConnectors: noObjectsApiConnectors$ | async\n } as obs\"\n >\n <div *ngIf=\"obs.loading === false; else loading\" [ngClass]=\"{disabled: obs.disabled}\">\n <ng-container *ngIf=\"!obs.noConnectors; else noConnectors\">\n <p class=\"lead\">{{ 'connectorManagement.extension.clickToSync' | translate }}</p>\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.connectorInstances\"\n [fields]=\"obs.fields\"\n [header]=\"false\"\n [viewMode]=\"false\"\n [isSearchable]=\"false\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"connectorManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowClicked($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'connectorManagement.title' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'connectorManagement.subtitle' | translate }}\n </h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #noConnectors>\n <p class=\"lead\">{{ 'connectorManagement.extension.noConnectors' | translate }}</p>\n</ng-template>\n",
776
- styles: [".disabled{filter:grayscale(1);opacity:.8;pointer-events:none}"]
777
- },] }
778
- ];
779
- ConnectorLinkExtensionModalComponent.ctorParameters = function () { return [
780
- { type: ConnectorManagementService },
781
- { type: core.TranslateService },
782
- { type: ConnectorManagementStateService },
783
- { type: ObjectApiSyncService },
784
- { type: router.ActivatedRoute },
785
- { type: components.AlertService }
786
- ]; };
787
- ConnectorLinkExtensionModalComponent.propDecorators = {
788
- modal: [{ type: i0.ViewChild, args: ['modal',] }]
683
+ var ConnectorLinkExtensionModalComponent = /** @class */ (function () {
684
+ function ConnectorLinkExtensionModalComponent(connectorManagementService, translateService, stateService, objectApiSyncService, route, alertService) {
685
+ var _this = this;
686
+ this.connectorManagementService = connectorManagementService;
687
+ this.translateService = translateService;
688
+ this.stateService = stateService;
689
+ this.objectApiSyncService = objectApiSyncService;
690
+ this.route = route;
691
+ this.alertService = alertService;
692
+ this.loading$ = new rxjs.BehaviorSubject(true);
693
+ this.fields$ = new rxjs.BehaviorSubject([]);
694
+ this.currentPageAndSize$ = new rxjs.BehaviorSubject({
695
+ page: 0,
696
+ size: 10,
697
+ });
698
+ this.pageSizes$ = new rxjs.BehaviorSubject({
699
+ collectionSize: 0,
700
+ maxPaginationItemSize: 5,
701
+ });
702
+ this.pagination$ = rxjs.combineLatest([
703
+ this.currentPageAndSize$,
704
+ this.pageSizes$,
705
+ ]).pipe(operators.map(function (_c) {
706
+ var _d = __read(_c, 2), currentPage = _d[0], sizes = _d[1];
707
+ return (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }));
708
+ }));
709
+ this.connectorInstances$ = rxjs.combineLatest([
710
+ this.currentPageAndSize$,
711
+ this.connectorManagementService.getConnectorTypes(),
712
+ this.translateService.stream('key'),
713
+ this.stateService.refresh$,
714
+ ]).pipe(operators.tap(function () { return _this.setFields(); }), operators.switchMap(function (_c) {
715
+ var _d = __read(_c, 2), currentPage = _d[0], types = _d[1];
716
+ return _this.connectorManagementService.getConnectorInstancesByType(types.find(function (type) { return type.name.toLowerCase().includes('objectsapi'); }).id, { page: currentPage.page, size: currentPage.size });
717
+ }), operators.tap(function (instanceRes) {
718
+ _this.pageSizes$.pipe(operators.take(1)).subscribe(function (sizes) {
719
+ _this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
720
+ });
721
+ }), operators.map(function (res) { return res.content; }), operators.tap(function () { return _this.loading$.next(false); }));
722
+ this.noObjectsApiConnectors$ = this.connectorInstances$.pipe(operators.map(function (instances) { return !instances || instances.length === 0; }));
723
+ this.disabled$ = this.stateService.inputDisabled$;
724
+ }
725
+ ConnectorLinkExtensionModalComponent.prototype.ngAfterViewInit = function () {
726
+ var _this = this;
727
+ this.showSubscription = this.stateService.showExtensionModal$.subscribe(function (show) {
728
+ if (show) {
729
+ _this.show();
730
+ }
731
+ else {
732
+ _this.hide();
733
+ }
734
+ });
735
+ };
736
+ ConnectorLinkExtensionModalComponent.prototype.ngOnDestroy = function () {
737
+ var _a;
738
+ (_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
739
+ };
740
+ ConnectorLinkExtensionModalComponent.prototype.paginationClicked = function (newPageNumber) {
741
+ var _this = this;
742
+ this.currentPageAndSize$.pipe(operators.take(1)).subscribe(function (currentPage) {
743
+ _this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
744
+ });
745
+ };
746
+ ConnectorLinkExtensionModalComponent.prototype.paginationSet = function (newPageSize) {
747
+ var _this = this;
748
+ if (newPageSize) {
749
+ this.currentPageAndSize$.pipe(operators.take(1)).subscribe(function (currentPage) {
750
+ _this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
751
+ });
752
+ }
753
+ };
754
+ ConnectorLinkExtensionModalComponent.prototype.rowClicked = function (instance) {
755
+ var _this = this;
756
+ var _a, _b;
757
+ var connectorInstanceId = instance.id;
758
+ var enabled = true;
759
+ var documentDefinitionName = this.route.snapshot.paramMap.get('name');
760
+ var objectTypeUrl = (_b = (_a = instance.properties) === null || _a === void 0 ? void 0 : _a.objectType) === null || _b === void 0 ? void 0 : _b.url;
761
+ var splitObjectTypeUrl = objectTypeUrl === null || objectTypeUrl === void 0 ? void 0 : objectTypeUrl.split('/');
762
+ var objectTypeId = splitObjectTypeUrl[splitObjectTypeUrl.length - 1];
763
+ this.stateService.disableInput();
764
+ this.objectApiSyncService
765
+ .createObjectSyncConfig({ connectorInstanceId: connectorInstanceId, enabled: enabled, documentDefinitionName: documentDefinitionName, objectTypeId: objectTypeId })
766
+ .subscribe(function (res) {
767
+ _this.alertService.success(_this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
768
+ _this.stateService.hideExtensionModal();
769
+ _this.stateService.enableInput();
770
+ _this.stateService.refresh();
771
+ _this.stateService.setLastConfigIdAdded(res.objectSyncConfig.id);
772
+ }, function () {
773
+ _this.stateService.enableInput();
774
+ });
775
+ };
776
+ ConnectorLinkExtensionModalComponent.prototype.setFields = function () {
777
+ var _this = this;
778
+ var getTranslatedLabel = function (key) { return _this.translateService.instant("connectorManagement.labels." + key); };
779
+ var keys = ['name'];
780
+ this.fields$.next(keys.map(function (key) { return ({ label: getTranslatedLabel(key), key: key }); }));
781
+ };
782
+ ConnectorLinkExtensionModalComponent.prototype.show = function () {
783
+ this.modal.show();
784
+ };
785
+ ConnectorLinkExtensionModalComponent.prototype.hide = function () {
786
+ this.modal.hide();
787
+ };
788
+ return ConnectorLinkExtensionModalComponent;
789
+ }());
790
+ ConnectorLinkExtensionModalComponent.decorators = [
791
+ { type: i0.Component, args: [{
792
+ selector: 'valtimo-connector-link-extension-modal',
793
+ template: "<valtimo-modal #modal [title]=\"'connectorManagement.extension.buttonText' | translate\">\n <div\n class=\"mt-2\"\n body\n *ngIf=\"{\n connectorInstances: connectorInstances$ | async,\n fields: fields$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async,\n noConnectors: noObjectsApiConnectors$ | async\n } as obs\"\n >\n <div *ngIf=\"obs.loading === false; else loading\" [ngClass]=\"{disabled: obs.disabled}\">\n <ng-container *ngIf=\"!obs.noConnectors; else noConnectors\">\n <p class=\"lead\">{{ 'connectorManagement.extension.clickToSync' | translate }}</p>\n <valtimo-widget>\n <valtimo-list\n [items]=\"obs.connectorInstances\"\n [fields]=\"obs.fields\"\n [header]=\"false\"\n [viewMode]=\"false\"\n [isSearchable]=\"false\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"connectorManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowClicked($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'connectorManagement.title' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'connectorManagement.subtitle' | translate }}\n </h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </ng-container>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #noConnectors>\n <p class=\"lead\">{{ 'connectorManagement.extension.noConnectors' | translate }}</p>\n</ng-template>\n",
794
+ styles: [".disabled{filter:grayscale(1);opacity:.8;pointer-events:none}"]
795
+ },] }
796
+ ];
797
+ ConnectorLinkExtensionModalComponent.ctorParameters = function () { return [
798
+ { type: ConnectorManagementService },
799
+ { type: core.TranslateService },
800
+ { type: ConnectorManagementStateService },
801
+ { type: ObjectApiSyncService },
802
+ { type: router.ActivatedRoute },
803
+ { type: components.AlertService }
804
+ ]; };
805
+ ConnectorLinkExtensionModalComponent.propDecorators = {
806
+ modal: [{ type: i0.ViewChild, args: ['modal',] }]
789
807
  };
790
808
 
791
- /*
792
- * Copyright 2015-2020 Ritense BV, the Netherlands.
793
- *
794
- * Licensed under EUPL, Version 1.2 (the "License");
795
- * you may not use this file except in compliance with the License.
796
- * You may obtain a copy of the License at
797
- *
798
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
799
- *
800
- * Unless required by applicable law or agreed to in writing, software
801
- * distributed under the License is distributed on an "AS IS" basis,
802
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
803
- * See the License for the specific language governing permissions and
804
- * limitations under the License.
805
- */
806
- var AddConnectorComponent = /** @class */ (function () {
807
- function AddConnectorComponent(connectorManagementService, stateService, alertService, translateService) {
808
- this.connectorManagementService = connectorManagementService;
809
- this.stateService = stateService;
810
- this.alertService = alertService;
811
- this.translateService = translateService;
812
- this.connectorTypes$ = this.connectorManagementService.getConnectorTypes();
813
- this.selectedConnector$ = new rxjs.BehaviorSubject(undefined);
814
- this.disabled$ = this.stateService.inputDisabled$;
815
- }
816
- AddConnectorComponent.prototype.ngOnInit = function () {
817
- var _this = this;
818
- this.refreshSubscription = rxjs.combineLatest([
819
- this.stateService.showModal$,
820
- this.stateService.refresh$,
821
- ]).subscribe(function () {
822
- _this.goBack();
823
- });
824
- };
825
- AddConnectorComponent.prototype.ngOnDestroy = function () {
826
- var _a;
827
- (_a = this.refreshSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
828
- };
829
- AddConnectorComponent.prototype.selectConnector = function (connectorType) {
830
- this.selectedConnector$.next(connectorType);
831
- };
832
- AddConnectorComponent.prototype.goBack = function () {
833
- this.selectedConnector$.next(undefined);
834
- };
835
- AddConnectorComponent.prototype.onSave = function (event) {
836
- var _this = this;
837
- this.selectedConnector$.pipe(operators.take(1)).subscribe(function (selectedConnectorType) {
838
- _this.connectorManagementService
839
- .createConnectorInstance({
840
- name: event.name,
841
- typeId: selectedConnectorType.id,
842
- connectorProperties: event.properties,
843
- })
844
- .subscribe(function () {
845
- _this.alertService.success(_this.translateService.instant('connectorManagement.messages.addSuccess'));
846
- _this.stateService.hideModal();
847
- _this.stateService.enableInput();
848
- _this.stateService.refresh();
849
- }, function () {
850
- _this.stateService.enableInput();
851
- });
852
- });
853
- };
854
- return AddConnectorComponent;
855
- }());
856
- AddConnectorComponent.decorators = [
857
- { type: i0.Component, args: [{
858
- selector: 'valtimo-add-connector',
859
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"connectorTypes$ | async as connectorTypes; else loading\">\n <ng-container *ngIf=\"(selectedConnector$ | async) === undefined; else configure\">\n <p class=\"lead\">\n {{\n 'connectorManagement.' +\n (connectorTypes?.length > 0 ? 'addHeader' : 'noConnectorsAvailable') | translate\n }}\n </p>\n <div class=\"cards-container mt-3\">\n <div *ngFor=\"let connectorType of connectorTypes\" class=\"card card-border text-center\">\n <div class=\"card-header\">{{ connectorType.name }}</div>\n <div class=\"card-body\">\n <button class=\"btn btn-primary\" (click)=\"selectConnector(connectorType)\">\n {{ 'connectorManagement.configureButton' | translate }}\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #configure>\n <ng-container *ngIf=\"selectedConnector$ | async as connector\">\n <button\n class=\"btn btn-outline-secondary btn-sm btn-back\"\n (click)=\"goBack()\"\n [disabled]=\"disabled$ | async\"\n >\n <i class=\"icon mdi mdi-arrow-left mr-1\"></i>\n {{ 'connectorManagement.goBack' | translate }}\n </button>\n <p class=\"lead text-center mb-3 pb-3 border-bottom\">\n {{ ('connectorManagement.configureWith' | translate) + ' ' + connector.name }}\n </p>\n <valtimo-edit-connector-form\n [connectorName]=\"connector.name\"\n [properties]=\"(selectedConnector$ | async).properties\"\n (propertiesSave)=\"onSave($event)\"\n >\n </valtimo-edit-connector-form>\n </ng-container>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n",
860
- styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.btn-back{position:absolute}.cards-container{display:flex;flex-flow:row wrap;width:100%}.card{margin-right:30px;width:calc(33.3% - 20px)}.card:nth-child(3n+3){margin-right:0}.card-header{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]
861
- },] }
862
- ];
863
- AddConnectorComponent.ctorParameters = function () { return [
864
- { type: ConnectorManagementService },
865
- { type: ConnectorManagementStateService },
866
- { type: components.AlertService },
867
- { type: core.TranslateService }
809
+ /*
810
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
811
+ *
812
+ * Licensed under EUPL, Version 1.2 (the "License");
813
+ * you may not use this file except in compliance with the License.
814
+ * You may obtain a copy of the License at
815
+ *
816
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
817
+ *
818
+ * Unless required by applicable law or agreed to in writing, software
819
+ * distributed under the License is distributed on an "AS IS" basis,
820
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
821
+ * See the License for the specific language governing permissions and
822
+ * limitations under the License.
823
+ */
824
+ var AddConnectorComponent = /** @class */ (function () {
825
+ function AddConnectorComponent(connectorManagementService, stateService, alertService, translateService) {
826
+ this.connectorManagementService = connectorManagementService;
827
+ this.stateService = stateService;
828
+ this.alertService = alertService;
829
+ this.translateService = translateService;
830
+ this.connectorTypes$ = this.connectorManagementService.getConnectorTypes();
831
+ this.selectedConnector$ = new rxjs.BehaviorSubject(undefined);
832
+ this.disabled$ = this.stateService.inputDisabled$;
833
+ }
834
+ AddConnectorComponent.prototype.ngOnInit = function () {
835
+ var _this = this;
836
+ this.refreshSubscription = rxjs.combineLatest([
837
+ this.stateService.showModal$,
838
+ this.stateService.refresh$,
839
+ ]).subscribe(function () {
840
+ _this.goBack();
841
+ });
842
+ };
843
+ AddConnectorComponent.prototype.ngOnDestroy = function () {
844
+ var _a;
845
+ (_a = this.refreshSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
846
+ };
847
+ AddConnectorComponent.prototype.selectConnector = function (connectorType) {
848
+ this.selectedConnector$.next(connectorType);
849
+ };
850
+ AddConnectorComponent.prototype.goBack = function () {
851
+ this.selectedConnector$.next(undefined);
852
+ };
853
+ AddConnectorComponent.prototype.onSave = function (event) {
854
+ var _this = this;
855
+ this.selectedConnector$.pipe(operators.take(1)).subscribe(function (selectedConnectorType) {
856
+ _this.connectorManagementService
857
+ .createConnectorInstance({
858
+ name: event.name,
859
+ typeId: selectedConnectorType.id,
860
+ connectorProperties: event.properties,
861
+ })
862
+ .subscribe(function () {
863
+ _this.alertService.success(_this.translateService.instant('connectorManagement.messages.addSuccess'));
864
+ _this.stateService.hideModal();
865
+ _this.stateService.enableInput();
866
+ _this.stateService.refresh();
867
+ }, function () {
868
+ _this.stateService.enableInput();
869
+ });
870
+ });
871
+ };
872
+ return AddConnectorComponent;
873
+ }());
874
+ AddConnectorComponent.decorators = [
875
+ { type: i0.Component, args: [{
876
+ selector: 'valtimo-add-connector',
877
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"connectorTypes$ | async as connectorTypes; else loading\">\n <ng-container *ngIf=\"(selectedConnector$ | async) === undefined; else configure\">\n <p class=\"lead\">\n {{\n 'connectorManagement.' +\n (connectorTypes?.length > 0 ? 'addHeader' : 'noConnectorsAvailable') | translate\n }}\n </p>\n <div class=\"cards-container mt-3\">\n <div *ngFor=\"let connectorType of connectorTypes\" class=\"card card-border text-center\">\n <div class=\"card-header\">{{ connectorType.name }}</div>\n <div class=\"card-body\">\n <button class=\"btn btn-primary\" (click)=\"selectConnector(connectorType)\">\n {{ 'connectorManagement.configureButton' | translate }}\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #configure>\n <ng-container *ngIf=\"selectedConnector$ | async as connector\">\n <button\n class=\"btn btn-outline-secondary btn-sm btn-back\"\n (click)=\"goBack()\"\n [disabled]=\"disabled$ | async\"\n >\n <i class=\"icon mdi mdi-arrow-left mr-1\"></i>\n {{ 'connectorManagement.goBack' | translate }}\n </button>\n <p class=\"lead text-center mb-3 pb-3 border-bottom\">\n {{ ('connectorManagement.configureWith' | translate) + ' ' + connector.name }}\n </p>\n <valtimo-edit-connector-form\n [connectorName]=\"connector.name\"\n [properties]=\"(selectedConnector$ | async).properties\"\n (propertiesSave)=\"onSave($event)\"\n >\n </valtimo-edit-connector-form>\n </ng-container>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n",
878
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.btn-back{position:absolute}.cards-container{display:flex;flex-flow:row wrap;width:100%}.card{margin-right:30px;width:calc(33.3% - 20px)}.card:nth-child(3n+3){margin-right:0}.card-header{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]
879
+ },] }
880
+ ];
881
+ AddConnectorComponent.ctorParameters = function () { return [
882
+ { type: ConnectorManagementService },
883
+ { type: ConnectorManagementStateService },
884
+ { type: components.AlertService },
885
+ { type: core.TranslateService }
868
886
  ]; };
869
887
 
870
- /*
871
- * Copyright 2015-2020 Ritense BV, the Netherlands.
872
- *
873
- * Licensed under EUPL, Version 1.2 (the "License");
874
- * you may not use this file except in compliance with the License.
875
- * You may obtain a copy of the License at
876
- *
877
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
878
- *
879
- * Unless required by applicable law or agreed to in writing, software
880
- * distributed under the License is distributed on an "AS IS" basis,
881
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
882
- * See the License for the specific language governing permissions and
883
- * limitations under the License.
884
- */
885
- var ModifyConnectorComponent = /** @class */ (function () {
886
- function ModifyConnectorComponent(connectorManagementService, stateService, alertService, translateService) {
887
- this.connectorManagementService = connectorManagementService;
888
- this.stateService = stateService;
889
- this.alertService = alertService;
890
- this.translateService = translateService;
891
- this.instance$ = this.stateService.selectedInstance$;
892
- }
893
- ModifyConnectorComponent.prototype.onSave = function (event) {
894
- var _this = this;
895
- this.instance$.pipe(operators.take(1)).subscribe(function (instance) {
896
- _this.connectorManagementService
897
- .updateConnectorInstance({
898
- name: event.name,
899
- typeId: instance.type.id,
900
- id: instance.id,
901
- connectorProperties: event.properties,
902
- })
903
- .subscribe(function () {
904
- _this.alertService.success(_this.translateService.instant('connectorManagement.messages.modifySuccess'));
905
- _this.stateService.hideModal();
906
- _this.stateService.enableInput();
907
- _this.stateService.refresh();
908
- }, function () {
909
- _this.stateService.enableInput();
910
- });
911
- });
912
- };
913
- ModifyConnectorComponent.prototype.onDelete = function () {
914
- var _this = this;
915
- this.instance$.pipe(operators.take(1)).subscribe(function (instance) {
916
- _this.connectorManagementService.deleteConnectorInstance(instance.id).subscribe(function () {
917
- _this.alertService.success(_this.translateService.instant('connectorManagement.messages.deleteSuccess'));
918
- _this.stateService.hideModal();
919
- _this.stateService.enableInput();
920
- _this.stateService.refresh();
921
- }, function () {
922
- _this.stateService.enableInput();
923
- });
924
- });
925
- };
926
- return ModifyConnectorComponent;
927
- }());
928
- ModifyConnectorComponent.decorators = [
929
- { type: i0.Component, args: [{
930
- selector: 'valtimo-modify-connector',
931
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"instance$ | async as instance\">\n <p class=\"lead text-center mb-3 pb-3 border-bottom\">\n {{ ('connectorManagement.modifyWith' | translate) + ' ' + instance.type.name }}\n </p>\n <valtimo-edit-connector-form\n [properties]=\"instance.properties\"\n [withDefaults]=\"true\"\n [defaultName]=\"instance.name\"\n [showDeleteButton]=\"true\"\n [connectorName]=\"instance.type.name\"\n (propertiesSave)=\"onSave($event)\"\n (connectorDelete)=\"onDelete()\"\n >\n </valtimo-edit-connector-form>\n</ng-container>\n",
932
- styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
933
- },] }
934
- ];
935
- ModifyConnectorComponent.ctorParameters = function () { return [
936
- { type: ConnectorManagementService },
937
- { type: ConnectorManagementStateService },
938
- { type: components.AlertService },
939
- { type: core.TranslateService }
888
+ /*
889
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
890
+ *
891
+ * Licensed under EUPL, Version 1.2 (the "License");
892
+ * you may not use this file except in compliance with the License.
893
+ * You may obtain a copy of the License at
894
+ *
895
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
896
+ *
897
+ * Unless required by applicable law or agreed to in writing, software
898
+ * distributed under the License is distributed on an "AS IS" basis,
899
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
900
+ * See the License for the specific language governing permissions and
901
+ * limitations under the License.
902
+ */
903
+ var ModifyConnectorComponent = /** @class */ (function () {
904
+ function ModifyConnectorComponent(connectorManagementService, stateService, alertService, translateService) {
905
+ this.connectorManagementService = connectorManagementService;
906
+ this.stateService = stateService;
907
+ this.alertService = alertService;
908
+ this.translateService = translateService;
909
+ this.instance$ = this.stateService.selectedInstance$;
910
+ }
911
+ ModifyConnectorComponent.prototype.onSave = function (event) {
912
+ var _this = this;
913
+ this.instance$.pipe(operators.take(1)).subscribe(function (instance) {
914
+ _this.connectorManagementService
915
+ .updateConnectorInstance({
916
+ name: event.name,
917
+ typeId: instance.type.id,
918
+ id: instance.id,
919
+ connectorProperties: event.properties,
920
+ })
921
+ .subscribe(function () {
922
+ _this.alertService.success(_this.translateService.instant('connectorManagement.messages.modifySuccess'));
923
+ _this.stateService.hideModal();
924
+ _this.stateService.enableInput();
925
+ _this.stateService.refresh();
926
+ }, function () {
927
+ _this.stateService.enableInput();
928
+ });
929
+ });
930
+ };
931
+ ModifyConnectorComponent.prototype.onDelete = function () {
932
+ var _this = this;
933
+ this.instance$.pipe(operators.take(1)).subscribe(function (instance) {
934
+ _this.connectorManagementService.deleteConnectorInstance(instance.id).subscribe(function () {
935
+ _this.alertService.success(_this.translateService.instant('connectorManagement.messages.deleteSuccess'));
936
+ _this.stateService.hideModal();
937
+ _this.stateService.enableInput();
938
+ _this.stateService.refresh();
939
+ }, function () {
940
+ _this.stateService.enableInput();
941
+ });
942
+ });
943
+ };
944
+ return ModifyConnectorComponent;
945
+ }());
946
+ ModifyConnectorComponent.decorators = [
947
+ { type: i0.Component, args: [{
948
+ selector: 'valtimo-modify-connector',
949
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"instance$ | async as instance\">\n <p class=\"lead text-center mb-3 pb-3 border-bottom\">\n {{ ('connectorManagement.modifyWith' | translate) + ' ' + instance.type.name }}\n </p>\n <valtimo-edit-connector-form\n [properties]=\"instance.properties\"\n [withDefaults]=\"true\"\n [defaultName]=\"instance.name\"\n [showDeleteButton]=\"true\"\n [connectorName]=\"instance.type.name\"\n (propertiesSave)=\"onSave($event)\"\n (connectorDelete)=\"onDelete()\"\n >\n </valtimo-edit-connector-form>\n</ng-container>\n",
950
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
951
+ },] }
952
+ ];
953
+ ModifyConnectorComponent.ctorParameters = function () { return [
954
+ { type: ConnectorManagementService },
955
+ { type: ConnectorManagementStateService },
956
+ { type: components.AlertService },
957
+ { type: core.TranslateService }
940
958
  ]; };
941
959
 
942
- /*
943
- * Copyright 2015-2020 Ritense BV, the Netherlands.
944
- *
945
- * Licensed under EUPL, Version 1.2 (the "License");
946
- * you may not use this file except in compliance with the License.
947
- * You may obtain a copy of the License at
948
- *
949
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
950
- *
951
- * Unless required by applicable law or agreed to in writing, software
952
- * distributed under the License is distributed on an "AS IS" basis,
953
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
954
- * See the License for the specific language governing permissions and
955
- * limitations under the License.
956
- */
957
- var ConnectorModalComponent = /** @class */ (function () {
958
- function ConnectorModalComponent(stateService) {
959
- this.stateService = stateService;
960
- }
961
- ConnectorModalComponent.prototype.ngAfterViewInit = function () {
962
- var _this = this;
963
- this.showSubscription = this.stateService.showModal$.subscribe(function (show) {
964
- if (show) {
965
- _this.show();
966
- }
967
- else {
968
- _this.hide();
969
- }
970
- });
971
- };
972
- ConnectorModalComponent.prototype.ngOnDestroy = function () {
973
- var _a;
974
- (_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
975
- };
976
- ConnectorModalComponent.prototype.show = function () {
977
- this.modal.show();
978
- };
979
- ConnectorModalComponent.prototype.hide = function () {
980
- this.modal.hide();
981
- };
982
- return ConnectorModalComponent;
983
- }());
984
- ConnectorModalComponent.decorators = [
985
- { type: i0.Component, args: [{
986
- selector: 'valtimo-connector-modal',
987
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal #modal [title]=\"'connectorManagement.' + modalType | translate\">\n <div class=\"mt-2\" body>\n <valtimo-add-connector *ngIf=\"modalType === 'add'\"></valtimo-add-connector>\n <valtimo-modify-connector *ngIf=\"modalType === 'modify'\"></valtimo-modify-connector>\n </div>\n</valtimo-modal>\n",
988
- styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
989
- },] }
990
- ];
991
- ConnectorModalComponent.ctorParameters = function () { return [
992
- { type: ConnectorManagementStateService }
993
- ]; };
994
- ConnectorModalComponent.propDecorators = {
995
- modal: [{ type: i0.ViewChild, args: ['modal',] }],
996
- modalType: [{ type: i0.Input }]
960
+ /*
961
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
962
+ *
963
+ * Licensed under EUPL, Version 1.2 (the "License");
964
+ * you may not use this file except in compliance with the License.
965
+ * You may obtain a copy of the License at
966
+ *
967
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
968
+ *
969
+ * Unless required by applicable law or agreed to in writing, software
970
+ * distributed under the License is distributed on an "AS IS" basis,
971
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
972
+ * See the License for the specific language governing permissions and
973
+ * limitations under the License.
974
+ */
975
+ var ConnectorModalComponent = /** @class */ (function () {
976
+ function ConnectorModalComponent(stateService) {
977
+ this.stateService = stateService;
978
+ }
979
+ ConnectorModalComponent.prototype.ngAfterViewInit = function () {
980
+ var _this = this;
981
+ this.showSubscription = this.stateService.showModal$.subscribe(function (show) {
982
+ if (show) {
983
+ _this.show();
984
+ }
985
+ else {
986
+ _this.hide();
987
+ }
988
+ });
989
+ };
990
+ ConnectorModalComponent.prototype.ngOnDestroy = function () {
991
+ var _a;
992
+ (_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
993
+ };
994
+ ConnectorModalComponent.prototype.show = function () {
995
+ this.modal.show();
996
+ };
997
+ ConnectorModalComponent.prototype.hide = function () {
998
+ this.modal.hide();
999
+ };
1000
+ return ConnectorModalComponent;
1001
+ }());
1002
+ ConnectorModalComponent.decorators = [
1003
+ { type: i0.Component, args: [{
1004
+ selector: 'valtimo-connector-modal',
1005
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal #modal [title]=\"'connectorManagement.' + modalType | translate\">\n <div class=\"mt-2\" body>\n <valtimo-add-connector *ngIf=\"modalType === 'add'\"></valtimo-add-connector>\n <valtimo-modify-connector *ngIf=\"modalType === 'modify'\"></valtimo-modify-connector>\n </div>\n</valtimo-modal>\n",
1006
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
1007
+ },] }
1008
+ ];
1009
+ ConnectorModalComponent.ctorParameters = function () { return [
1010
+ { type: ConnectorManagementStateService }
1011
+ ]; };
1012
+ ConnectorModalComponent.propDecorators = {
1013
+ modal: [{ type: i0.ViewChild, args: ['modal',] }],
1014
+ modalType: [{ type: i0.Input }]
997
1015
  };
998
1016
 
999
- var EditConnectorPropertiesComponent = /** @class */ (function () {
1000
- function EditConnectorPropertiesComponent(stateService) {
1001
- this.stateService = stateService;
1002
- this.withDefaults = false;
1003
- this.showDeleteButton = false;
1004
- this.propertiesSave = new i0.EventEmitter();
1005
- this.connectorDelete = new i0.EventEmitter();
1006
- this.modifiedProperties$ = new rxjs.BehaviorSubject(undefined);
1007
- this.editFields$ = new rxjs.BehaviorSubject([]);
1008
- this.connectorName$ = new rxjs.BehaviorSubject('');
1009
- this.saveButtonDisabled$ = rxjs.combineLatest([
1010
- this.editFields$,
1011
- this.modifiedProperties$,
1012
- this.connectorName$,
1013
- ]).pipe(operators.map(function (_a) {
1014
- var _b = __read(_a, 3), editFields = _b[0], modifiedProperties = _b[1], connectorName = _b[2];
1015
- var values = editFields.map(function (field) { return lodash.get(modifiedProperties, field.key); });
1016
- var validValues = values.filter(function (value) { return Array.isArray(value) ? value.length > 0 : value === 0 || value; });
1017
- return editFields.length !== validValues.length || !connectorName;
1018
- }));
1019
- this.disabled$ = this.stateService.inputDisabled$;
1020
- }
1021
- EditConnectorPropertiesComponent.prototype.ngOnInit = function () {
1022
- this.setEditFields();
1023
- this.setName();
1024
- };
1025
- EditConnectorPropertiesComponent.prototype.ngOnChanges = function () {
1026
- this.setEditFields();
1027
- this.setName();
1028
- };
1029
- EditConnectorPropertiesComponent.prototype.multiFieldValuesSet = function (event) {
1030
- var _this = this;
1031
- this.modifiedProperties$.pipe(operators.take(1)).subscribe(function (properties) {
1032
- lodash.set(properties, event.editFieldKey, event.values);
1033
- _this.modifiedProperties$.next(properties);
1034
- });
1035
- };
1036
- EditConnectorPropertiesComponent.prototype.onSingleValueChange = function (value, editField) {
1037
- var _this = this;
1038
- this.modifiedProperties$.pipe(operators.take(1)).subscribe(function (properties) {
1039
- lodash.set(properties, editField.key, editField.editType === 'string' ? value.trim() : parseInt(value, 10));
1040
- _this.modifiedProperties$.next(properties);
1041
- });
1042
- };
1043
- EditConnectorPropertiesComponent.prototype.onNameValueChange = function (value) {
1044
- this.connectorName$.next(value.trim());
1045
- };
1046
- EditConnectorPropertiesComponent.prototype.onSave = function () {
1047
- var _this = this;
1048
- this.stateService.disableInput();
1049
- rxjs.combineLatest([this.modifiedProperties$, this.connectorName$])
1050
- .pipe(operators.take(1))
1051
- .subscribe(function (_a) {
1052
- var _b = __read(_a, 2), properties = _b[0], name = _b[1];
1053
- _this.propertiesSave.emit({ properties: properties, name: name });
1054
- });
1055
- };
1056
- EditConnectorPropertiesComponent.prototype.onDelete = function () {
1057
- this.stateService.disableInput();
1058
- this.connectorDelete.emit();
1059
- };
1060
- EditConnectorPropertiesComponent.prototype.setName = function () {
1061
- if (this.withDefaults && this.defaultName) {
1062
- this.connectorName$.next(this.defaultName);
1063
- }
1064
- else {
1065
- this.connectorName$.next('');
1066
- }
1067
- };
1068
- EditConnectorPropertiesComponent.prototype.setModifiedProperties = function (editFields) {
1069
- var propertiesCopy = lodash.cloneDeep(this.properties);
1070
- if (!this.withDefaults) {
1071
- editFields.forEach(function (editField) {
1072
- lodash.set(propertiesCopy, editField.key, undefined);
1073
- });
1074
- }
1075
- this.modifiedProperties$.next(propertiesCopy);
1076
- };
1077
- EditConnectorPropertiesComponent.prototype.setEditFields = function () {
1078
- var _this = this;
1079
- var editFields = [];
1080
- var keysToFilter = ['className'];
1081
- var handlePropertyLevel = function (propertyLevel, previousKeys) {
1082
- var propertyLevelKeys = Object.keys(propertyLevel).filter(function (key) { return !keysToFilter.includes(key); });
1083
- propertyLevelKeys.forEach(function (key) {
1084
- var propertyValue = propertyLevel[key];
1085
- var baseEditField = Object.assign({ key: previousKeys + key }, (_this.withDefaults && { defaultValue: propertyValue }));
1086
- if (typeof propertyValue === 'number') {
1087
- editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number' }));
1088
- }
1089
- else if (Array.isArray(propertyValue)) {
1090
- if (propertyValue[0] && typeof propertyValue[0] === 'number') {
1091
- editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number[]' }));
1092
- }
1093
- else {
1094
- editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string[]' }));
1095
- }
1096
- }
1097
- else if (typeof propertyValue === 'string') {
1098
- editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string' }));
1099
- }
1100
- else if (typeof propertyValue === 'object') {
1101
- handlePropertyLevel(propertyValue, "" + previousKeys + key + ".");
1102
- }
1103
- });
1104
- };
1105
- handlePropertyLevel(this.properties, '');
1106
- this.editFields$.next(editFields);
1107
- this.setModifiedProperties(editFields);
1108
- };
1109
- return EditConnectorPropertiesComponent;
1110
- }());
1111
- EditConnectorPropertiesComponent.decorators = [
1112
- { type: i0.Component, args: [{
1113
- selector: 'valtimo-edit-connector-properties',
1114
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"edit-fields\"\n *ngIf=\"{editFields: editFields$ | async, disabled: disabled$ | async} as obs\"\n>\n <ng-container *ngTemplateOutlet=\"nameInput; context: {disabled: obs.disabled}\"></ng-container>\n <ng-container *ngFor=\"let editField of obs.editFields\">\n <ng-container *ngIf=\"editField.editType === 'string' || editField.editType === 'number'\">\n <ng-container\n *ngTemplateOutlet=\"singleInput; context: {editField: editField, disabled: obs.disabled}\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"editField.editType === 'string[]' || editField.editType === 'number[]'\">\n <valtimo-multi-value-connector-property\n [editField]=\"editField\"\n (valuesSet)=\"multiFieldValuesSet($event)\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"withDefaults && editField.defaultValue\"\n >\n </valtimo-multi-value-connector-property>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons; context: {disabled: obs.disabled}\"></ng-container>\n</div>\n\n<ng-template #nameInput let-disabled=\"disabled\">\n <div class=\"form-group row\">\n <label class=\"col-3 col-form-label text-sm-right\">\n {{ 'connectorManagement.inputLabels.connectorName' | translate }}\n </label>\n <div class=\"col-7\">\n <input\n class=\"form-control\"\n type=\"text\"\n (input)=\"onNameValueChange($event.target.value)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults && defaultName ? defaultName : ''\"\n />\n </div>\n </div>\n</ng-template>\n\n<ng-template #singleInput let-editField=\"editField\" let-disabled=\"disabled\">\n <div class=\"form-group row\">\n <label class=\"col-3 col-form-label text-sm-right\">\n {{ 'connectorManagement.inputLabels.' + editField.key | translate }}\n </label>\n <div class=\"col-7\">\n <input\n *ngIf=\"editField.editType === 'string'\"\n class=\"form-control\"\n type=\"text\"\n (input)=\"onSingleValueChange($event.target.value, editField)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults ? editField.defaultValue : ''\"\n />\n <input\n *ngIf=\"editField.editType === 'number'\"\n class=\"form-control\"\n type=\"number\"\n step=\"1\"\n min=\"0\"\n oninput=\"validity.valid||(value='');\"\n (input)=\"onSingleValueChange($event.target.value, editField)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults ? editField.defaultValue : ''\"\n />\n </div>\n </div>\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"border-top mt-3 pt-6\">\n <div class=\"button-container\">\n <button\n class=\"btn btn-primary\"\n [disabled]=\"disabled || (saveButtonDisabled$ | async)\"\n (click)=\"onSave()\"\n >\n <i class=\"icon mdi mdi-save mr-1\"></i>\n {{ 'connectorManagement.save' | translate }}\n </button>\n <button\n *ngIf=\"showDeleteButton\"\n class=\"btn btn-danger btn-space\"\n (click)=\"onDelete()\"\n [disabled]=\"disabled\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n",
1115
- styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.button-container{display:flex;flex-flow:row-reverse;justify-content:space-between;width:100%}"]
1116
- },] }
1117
- ];
1118
- EditConnectorPropertiesComponent.ctorParameters = function () { return [
1119
- { type: ConnectorManagementStateService }
1120
- ]; };
1121
- EditConnectorPropertiesComponent.propDecorators = {
1122
- properties: [{ type: i0.Input }],
1123
- withDefaults: [{ type: i0.Input }],
1124
- showDeleteButton: [{ type: i0.Input }],
1125
- defaultName: [{ type: i0.Input }],
1126
- propertiesSave: [{ type: i0.Output }],
1127
- connectorDelete: [{ type: i0.Output }]
1017
+ var EditConnectorPropertiesComponent = /** @class */ (function () {
1018
+ function EditConnectorPropertiesComponent(stateService) {
1019
+ this.stateService = stateService;
1020
+ this.withDefaults = false;
1021
+ this.showDeleteButton = false;
1022
+ this.propertiesSave = new i0.EventEmitter();
1023
+ this.connectorDelete = new i0.EventEmitter();
1024
+ this.modifiedProperties$ = new rxjs.BehaviorSubject(undefined);
1025
+ this.editFields$ = new rxjs.BehaviorSubject([]);
1026
+ this.connectorName$ = new rxjs.BehaviorSubject('');
1027
+ this.saveButtonDisabled$ = rxjs.combineLatest([
1028
+ this.editFields$,
1029
+ this.modifiedProperties$,
1030
+ this.connectorName$,
1031
+ ]).pipe(operators.map(function (_a) {
1032
+ var _b = __read(_a, 3), editFields = _b[0], modifiedProperties = _b[1], connectorName = _b[2];
1033
+ var values = editFields.map(function (field) { return lodash.get(modifiedProperties, field.key); });
1034
+ var validValues = values.filter(function (value) { return Array.isArray(value) ? value.length > 0 : value === 0 || value; });
1035
+ return editFields.length !== validValues.length || !connectorName;
1036
+ }));
1037
+ this.disabled$ = this.stateService.inputDisabled$;
1038
+ }
1039
+ EditConnectorPropertiesComponent.prototype.ngOnInit = function () {
1040
+ this.setEditFields();
1041
+ this.setName();
1042
+ };
1043
+ EditConnectorPropertiesComponent.prototype.ngOnChanges = function () {
1044
+ this.setEditFields();
1045
+ this.setName();
1046
+ };
1047
+ EditConnectorPropertiesComponent.prototype.multiFieldValuesSet = function (event) {
1048
+ var _this = this;
1049
+ this.modifiedProperties$.pipe(operators.take(1)).subscribe(function (properties) {
1050
+ lodash.set(properties, event.editFieldKey, event.values);
1051
+ _this.modifiedProperties$.next(properties);
1052
+ });
1053
+ };
1054
+ EditConnectorPropertiesComponent.prototype.onSingleValueChange = function (value, editField) {
1055
+ var _this = this;
1056
+ this.modifiedProperties$.pipe(operators.take(1)).subscribe(function (properties) {
1057
+ lodash.set(properties, editField.key, editField.editType === 'string' ? value.trim() : parseInt(value, 10));
1058
+ _this.modifiedProperties$.next(properties);
1059
+ });
1060
+ };
1061
+ EditConnectorPropertiesComponent.prototype.onNameValueChange = function (value) {
1062
+ this.connectorName$.next(value.trim());
1063
+ };
1064
+ EditConnectorPropertiesComponent.prototype.onSave = function () {
1065
+ var _this = this;
1066
+ this.stateService.disableInput();
1067
+ rxjs.combineLatest([this.modifiedProperties$, this.connectorName$])
1068
+ .pipe(operators.take(1))
1069
+ .subscribe(function (_a) {
1070
+ var _b = __read(_a, 2), properties = _b[0], name = _b[1];
1071
+ _this.propertiesSave.emit({ properties: properties, name: name });
1072
+ });
1073
+ };
1074
+ EditConnectorPropertiesComponent.prototype.onDelete = function () {
1075
+ this.stateService.disableInput();
1076
+ this.connectorDelete.emit();
1077
+ };
1078
+ EditConnectorPropertiesComponent.prototype.setName = function () {
1079
+ if (this.withDefaults && this.defaultName) {
1080
+ this.connectorName$.next(this.defaultName);
1081
+ }
1082
+ else {
1083
+ this.connectorName$.next('');
1084
+ }
1085
+ };
1086
+ EditConnectorPropertiesComponent.prototype.setModifiedProperties = function (editFields) {
1087
+ var propertiesCopy = lodash.cloneDeep(this.properties);
1088
+ if (!this.withDefaults) {
1089
+ editFields.forEach(function (editField) {
1090
+ lodash.set(propertiesCopy, editField.key, undefined);
1091
+ });
1092
+ }
1093
+ this.modifiedProperties$.next(propertiesCopy);
1094
+ };
1095
+ EditConnectorPropertiesComponent.prototype.setEditFields = function () {
1096
+ var _this = this;
1097
+ var editFields = [];
1098
+ var keysToFilter = ['className'];
1099
+ var handlePropertyLevel = function (propertyLevel, previousKeys) {
1100
+ var propertyLevelKeys = Object.keys(propertyLevel).filter(function (key) { return !keysToFilter.includes(key); });
1101
+ propertyLevelKeys.forEach(function (key) {
1102
+ var propertyValue = propertyLevel[key];
1103
+ var baseEditField = Object.assign({ key: previousKeys + key }, (_this.withDefaults && { defaultValue: propertyValue }));
1104
+ if (typeof propertyValue === 'number') {
1105
+ editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number' }));
1106
+ }
1107
+ else if (Array.isArray(propertyValue)) {
1108
+ if (propertyValue[0] && typeof propertyValue[0] === 'number') {
1109
+ editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'number[]' }));
1110
+ }
1111
+ else {
1112
+ editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string[]' }));
1113
+ }
1114
+ }
1115
+ else if (typeof propertyValue === 'string') {
1116
+ editFields.push(Object.assign(Object.assign({}, baseEditField), { editType: 'string' }));
1117
+ }
1118
+ else if (typeof propertyValue === 'object') {
1119
+ handlePropertyLevel(propertyValue, "" + previousKeys + key + ".");
1120
+ }
1121
+ });
1122
+ };
1123
+ handlePropertyLevel(this.properties, '');
1124
+ this.editFields$.next(editFields);
1125
+ this.setModifiedProperties(editFields);
1126
+ };
1127
+ return EditConnectorPropertiesComponent;
1128
+ }());
1129
+ EditConnectorPropertiesComponent.decorators = [
1130
+ { type: i0.Component, args: [{
1131
+ selector: 'valtimo-edit-connector-properties',
1132
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"edit-fields\"\n *ngIf=\"{editFields: editFields$ | async, disabled: disabled$ | async} as obs\"\n>\n <ng-container *ngTemplateOutlet=\"nameInput; context: {disabled: obs.disabled}\"></ng-container>\n <ng-container *ngFor=\"let editField of obs.editFields\">\n <ng-container *ngIf=\"editField.editType === 'string' || editField.editType === 'number'\">\n <ng-container\n *ngTemplateOutlet=\"singleInput; context: {editField: editField, disabled: obs.disabled}\"\n ></ng-container>\n </ng-container>\n <ng-container *ngIf=\"editField.editType === 'string[]' || editField.editType === 'number[]'\">\n <valtimo-multi-value-connector-property\n [editField]=\"editField\"\n (valuesSet)=\"multiFieldValuesSet($event)\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"withDefaults && editField.defaultValue\"\n >\n </valtimo-multi-value-connector-property>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons; context: {disabled: obs.disabled}\"></ng-container>\n</div>\n\n<ng-template #nameInput let-disabled=\"disabled\">\n <div class=\"form-group row\">\n <label class=\"col-3 col-form-label text-sm-right\">\n {{ 'connectorManagement.inputLabels.connectorName' | translate }}\n </label>\n <div class=\"col-7\">\n <input\n class=\"form-control\"\n type=\"text\"\n (input)=\"onNameValueChange($event.target.value)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults && defaultName ? defaultName : ''\"\n />\n </div>\n </div>\n</ng-template>\n\n<ng-template #singleInput let-editField=\"editField\" let-disabled=\"disabled\">\n <div class=\"form-group row\">\n <label class=\"col-3 col-form-label text-sm-right\">\n {{ 'connectorManagement.inputLabels.' + editField.key | translate }}\n </label>\n <div class=\"col-7\">\n <input\n *ngIf=\"editField.editType === 'string'\"\n class=\"form-control\"\n type=\"text\"\n (input)=\"onSingleValueChange($event.target.value, editField)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults ? editField.defaultValue : ''\"\n />\n <input\n *ngIf=\"editField.editType === 'number'\"\n class=\"form-control\"\n type=\"number\"\n step=\"1\"\n min=\"0\"\n oninput=\"validity.valid||(value='');\"\n (input)=\"onSingleValueChange($event.target.value, editField)\"\n [disabled]=\"disabled\"\n [value]=\"withDefaults ? editField.defaultValue : ''\"\n />\n </div>\n </div>\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"border-top mt-3 pt-6\">\n <div class=\"button-container\">\n <button\n class=\"btn btn-primary\"\n [disabled]=\"disabled || (saveButtonDisabled$ | async)\"\n (click)=\"onSave()\"\n >\n <i class=\"icon mdi mdi-save mr-1\"></i>\n {{ 'connectorManagement.save' | translate }}\n </button>\n <button\n *ngIf=\"showDeleteButton\"\n class=\"btn btn-danger btn-space\"\n (click)=\"onDelete()\"\n [disabled]=\"disabled\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n",
1133
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.button-container{display:flex;flex-flow:row-reverse;justify-content:space-between;width:100%}"]
1134
+ },] }
1135
+ ];
1136
+ EditConnectorPropertiesComponent.ctorParameters = function () { return [
1137
+ { type: ConnectorManagementStateService }
1138
+ ]; };
1139
+ EditConnectorPropertiesComponent.propDecorators = {
1140
+ properties: [{ type: i0.Input }],
1141
+ withDefaults: [{ type: i0.Input }],
1142
+ showDeleteButton: [{ type: i0.Input }],
1143
+ defaultName: [{ type: i0.Input }],
1144
+ propertiesSave: [{ type: i0.Output }],
1145
+ connectorDelete: [{ type: i0.Output }]
1128
1146
  };
1129
1147
 
1130
- var ConnectorLinkExtensionComponent = /** @class */ (function () {
1131
- function ConnectorLinkExtensionComponent(stateService, objectApiSyncService, translateService, route, alertService, connectorManagementService) {
1132
- var _this = this;
1133
- this.stateService = stateService;
1134
- this.objectApiSyncService = objectApiSyncService;
1135
- this.translateService = translateService;
1136
- this.route = route;
1137
- this.alertService = alertService;
1138
- this.connectorManagementService = connectorManagementService;
1139
- this.loading$ = new rxjs.BehaviorSubject(true);
1140
- this.objectApiSyncConfig$ = rxjs.combineLatest([
1141
- this.route.params,
1142
- this.translateService.stream('key'),
1143
- this.stateService.refresh$,
1144
- ]).pipe(operators.switchMap(function (_b) {
1145
- var _c = __read(_b, 1), params = _c[0];
1146
- return _this.objectApiSyncService.getObjectSyncConfigs(params.name);
1147
- }), operators.switchMap(function (configs) { return rxjs.combineLatest(__spread([
1148
- rxjs.of(configs)
1149
- ], configs.map(function (config) { return _this.connectorManagementService
1150
- .getConnectorInstanceById(config.connectorInstanceId)
1151
- .pipe(operators.catchError(function () { return rxjs.of(''); })); }))); }), operators.map(function (results) {
1152
- var _b = __read(results.filter(function (result) { return result; })), instances = _b.slice(1);
1153
- return results[0].map(function (syncConfig) {
1154
- var _a;
1155
- return (Object.assign(Object.assign({}, syncConfig), { title: ((_a = instances.find(function (instance) { return instance.id === syncConfig.connectorInstanceId; })) === null || _a === void 0 ? void 0 : _a.name) ||
1156
- 'Objects API' }));
1157
- });
1158
- }), operators.map(function (results) { return (Array.isArray(results) && results.length > 0 ? results[0] : null); }), operators.tap(function () {
1159
- _this.loading$.next(false);
1160
- }));
1161
- this.disabled$ = this.stateService.inputDisabled$;
1162
- }
1163
- ConnectorLinkExtensionComponent.prototype.ngOnDestroy = function () {
1164
- this.stateService.hideExtensionModal();
1165
- };
1166
- ConnectorLinkExtensionComponent.prototype.openModal = function () {
1167
- this.stateService.showExtensionModal();
1168
- };
1169
- ConnectorLinkExtensionComponent.prototype.toggleSync = function (config) {
1170
- var _this = this;
1171
- this.stateService.disableInput();
1172
- this.objectApiSyncService
1173
- .modifyObjectSyncConfig(Object.assign(Object.assign({}, config), { enabled: !config.enabled }))
1174
- .subscribe(function () {
1175
- if (!config.enabled) {
1176
- _this.alertService.success(_this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
1177
- }
1178
- else {
1179
- _this.alertService.success(_this.translateService.instant('connectorManagement.extension.disableSyncSuccess'));
1180
- }
1181
- _this.stateService.enableInput();
1182
- _this.stateService.refresh();
1183
- }, function () {
1184
- _this.stateService.enableInput();
1185
- });
1186
- };
1187
- ConnectorLinkExtensionComponent.prototype.deleteSync = function (configId) {
1188
- var _this = this;
1189
- this.stateService.disableInput();
1190
- this.objectApiSyncService.deleteObjectSyncConfig(configId).subscribe(function () {
1191
- _this.alertService.success(_this.translateService.instant('connectorManagement.extension.deleteSyncSuccess'));
1192
- _this.stateService.enableInput();
1193
- _this.stateService.refresh();
1194
- }, function () {
1195
- _this.stateService.enableInput();
1196
- });
1197
- };
1198
- return ConnectorLinkExtensionComponent;
1199
- }());
1200
- ConnectorLinkExtensionComponent.decorators = [
1201
- { type: i0.Component, args: [{
1202
- selector: 'valtimo-connector-link-extension',
1203
- template: "<h2 class=\"mb-4 mt-6\">{{ 'connectorManagement.extension.title' | translate }}</h2>\n\n<ng-container\n *ngIf=\"{\n syncConfig: objectApiSyncConfig$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngIf=\"obs.syncConfig; else addSync\">\n <div class=\"card card-border card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{ obs.syncConfig.title }}\n </div>\n <div class=\"controls\">\n <button\n class=\"btn btn-danger ml-3\"\n [disabled]=\"obs.disabled\"\n (click)=\"deleteSync(obs.syncConfig.id)\"\n >\n <i class=\"fa fa-trash\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <div class=\"setting-row\">\n Automatisch zaakdetails synchroniseren\n <div class=\"controls\">\n <div class=\"switch-button switch-button-success\">\n <input\n type=\"checkbox\"\n [checked]=\"obs.syncConfig.enabled\"\n [disabled]=\"obs.disabled\"\n name=\"sync\"\n id=\"sync\"\n (click)=\"toggleSync(obs.syncConfig)\"\n />\n <span><label for=\"sync\"></label></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<valtimo-connector-link-extension-modal></valtimo-connector-link-extension-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"openModal()\" [disabled]=\"disabled$ | async\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp;\n {{ 'connectorManagement.extension.buttonText' | translate }}\n </button>\n </div>\n</ng-template>\n",
1204
- styles: [".card-header,.setting-row{flex-direction:row;justify-content:space-between}.card-header,.controls,.setting-row{align-items:center;display:flex}"]
1205
- },] }
1206
- ];
1207
- ConnectorLinkExtensionComponent.ctorParameters = function () { return [
1208
- { type: ConnectorManagementStateService },
1209
- { type: ObjectApiSyncService },
1210
- { type: core.TranslateService },
1211
- { type: router.ActivatedRoute },
1212
- { type: components.AlertService },
1213
- { type: ConnectorManagementService }
1148
+ var ConnectorLinkExtensionComponent = /** @class */ (function () {
1149
+ function ConnectorLinkExtensionComponent(stateService, objectApiSyncService, translateService, route, alertService, connectorManagementService) {
1150
+ var _this = this;
1151
+ this.stateService = stateService;
1152
+ this.objectApiSyncService = objectApiSyncService;
1153
+ this.translateService = translateService;
1154
+ this.route = route;
1155
+ this.alertService = alertService;
1156
+ this.connectorManagementService = connectorManagementService;
1157
+ this.loading$ = new rxjs.BehaviorSubject(true);
1158
+ this.objectApiSyncConfig$ = rxjs.combineLatest([
1159
+ this.route.params,
1160
+ this.translateService.stream('key'),
1161
+ this.stateService.refresh$,
1162
+ ]).pipe(operators.switchMap(function (_b) {
1163
+ var _c = __read(_b, 1), params = _c[0];
1164
+ return _this.objectApiSyncService.getObjectSyncConfigs(params.name);
1165
+ }), operators.switchMap(function (configs) { return rxjs.combineLatest(__spread([
1166
+ rxjs.of(configs)
1167
+ ], configs.map(function (config) { return _this.connectorManagementService
1168
+ .getConnectorInstanceById(config.connectorInstanceId)
1169
+ .pipe(operators.catchError(function () { return rxjs.of(''); })); }))); }), operators.map(function (results) {
1170
+ var _b = __read(results.filter(function (result) { return result; })), instances = _b.slice(1);
1171
+ return results[0].map(function (syncConfig) {
1172
+ var _a;
1173
+ return (Object.assign(Object.assign({}, syncConfig), { title: ((_a = instances.find(function (instance) { return instance.id === syncConfig.connectorInstanceId; })) === null || _a === void 0 ? void 0 : _a.name) ||
1174
+ 'Objects API' }));
1175
+ });
1176
+ }), operators.map(function (results) { return (Array.isArray(results) && results.length > 0 ? results[0] : null); }), operators.tap(function () {
1177
+ _this.loading$.next(false);
1178
+ }));
1179
+ this.disabled$ = this.stateService.inputDisabled$;
1180
+ }
1181
+ ConnectorLinkExtensionComponent.prototype.ngOnDestroy = function () {
1182
+ this.stateService.hideExtensionModal();
1183
+ };
1184
+ ConnectorLinkExtensionComponent.prototype.openModal = function () {
1185
+ this.stateService.showExtensionModal();
1186
+ };
1187
+ ConnectorLinkExtensionComponent.prototype.toggleSync = function (config) {
1188
+ var _this = this;
1189
+ this.stateService.disableInput();
1190
+ this.objectApiSyncService
1191
+ .modifyObjectSyncConfig(Object.assign(Object.assign({}, config), { enabled: !config.enabled }))
1192
+ .subscribe(function () {
1193
+ if (!config.enabled) {
1194
+ _this.alertService.success(_this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
1195
+ }
1196
+ else {
1197
+ _this.alertService.success(_this.translateService.instant('connectorManagement.extension.disableSyncSuccess'));
1198
+ }
1199
+ _this.stateService.enableInput();
1200
+ _this.stateService.refresh();
1201
+ }, function () {
1202
+ _this.stateService.enableInput();
1203
+ });
1204
+ };
1205
+ ConnectorLinkExtensionComponent.prototype.deleteSync = function (configId) {
1206
+ var _this = this;
1207
+ this.stateService.disableInput();
1208
+ this.objectApiSyncService.deleteObjectSyncConfig(configId).subscribe(function () {
1209
+ _this.alertService.success(_this.translateService.instant('connectorManagement.extension.deleteSyncSuccess'));
1210
+ _this.stateService.enableInput();
1211
+ _this.stateService.refresh();
1212
+ }, function () {
1213
+ _this.stateService.enableInput();
1214
+ });
1215
+ };
1216
+ return ConnectorLinkExtensionComponent;
1217
+ }());
1218
+ ConnectorLinkExtensionComponent.decorators = [
1219
+ { type: i0.Component, args: [{
1220
+ selector: 'valtimo-connector-link-extension',
1221
+ template: "<h2 class=\"mb-4 mt-6\">{{ 'connectorManagement.extension.title' | translate }}</h2>\n\n<ng-container\n *ngIf=\"{\n syncConfig: objectApiSyncConfig$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngIf=\"obs.syncConfig; else addSync\">\n <div class=\"card card-border card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{ obs.syncConfig.title }}\n </div>\n <div class=\"controls\">\n <button\n class=\"btn btn-danger ml-3\"\n [disabled]=\"obs.disabled\"\n (click)=\"deleteSync(obs.syncConfig.id)\"\n >\n <i class=\"fa fa-trash\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <div class=\"setting-row\">\n Automatisch zaakdetails synchroniseren\n <div class=\"controls\">\n <div class=\"switch-button switch-button-success\">\n <input\n type=\"checkbox\"\n [checked]=\"obs.syncConfig.enabled\"\n [disabled]=\"obs.disabled\"\n name=\"sync\"\n id=\"sync\"\n (click)=\"toggleSync(obs.syncConfig)\"\n />\n <span><label for=\"sync\"></label></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<valtimo-connector-link-extension-modal></valtimo-connector-link-extension-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"openModal()\" [disabled]=\"disabled$ | async\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp;\n {{ 'connectorManagement.extension.buttonText' | translate }}\n </button>\n </div>\n</ng-template>\n",
1222
+ styles: [".card-header,.setting-row{flex-direction:row;justify-content:space-between}.card-header,.controls,.setting-row{align-items:center;display:flex}"]
1223
+ },] }
1224
+ ];
1225
+ ConnectorLinkExtensionComponent.ctorParameters = function () { return [
1226
+ { type: ConnectorManagementStateService },
1227
+ { type: ObjectApiSyncService },
1228
+ { type: core.TranslateService },
1229
+ { type: router.ActivatedRoute },
1230
+ { type: components.AlertService },
1231
+ { type: ConnectorManagementService }
1214
1232
  ]; };
1215
1233
 
1216
- var MultiValueConnectorPropertyComponent = /** @class */ (function () {
1217
- function MultiValueConnectorPropertyComponent() {
1218
- this.valuesSet = new i0.EventEmitter();
1219
- this.amountOfValues$ = new rxjs.BehaviorSubject([null]);
1220
- this.removeButtonDisabled$ = this.amountOfValues$.pipe(operators.map(function (amountOfValues) { return amountOfValues.length === 1; }));
1221
- this.values$ = new rxjs.BehaviorSubject({});
1222
- this.addButtonDisabled$ = rxjs.combineLatest([this.values$, this.amountOfValues$]).pipe(operators.map(function (_b) {
1223
- var _c = __read(_b, 2), values = _c[0], amountOfValues = _c[1];
1224
- var objectValues = Object.values(values);
1225
- var validObjectValues = objectValues.filter(function (value) { return value === 0 || value; });
1226
- return amountOfValues.length !== validObjectValues.length;
1227
- }));
1228
- }
1229
- MultiValueConnectorPropertyComponent.prototype.ngOnInit = function () {
1230
- this.openValuesSubscription();
1231
- this.setDefaults();
1232
- };
1233
- MultiValueConnectorPropertyComponent.prototype.ngOnDestroy = function () {
1234
- var _a;
1235
- (_a = this.valuesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1236
- };
1237
- MultiValueConnectorPropertyComponent.prototype.onValueChange = function (value, editField, index) {
1238
- var _this = this;
1239
- this.values$.pipe(operators.take(1)).subscribe(function (values) {
1240
- var _b;
1241
- _this.values$.next(Object.assign(Object.assign({}, values), (_b = {}, _b[index] = editField.editType === 'string[]'
1242
- ? value.trim()
1243
- : parseInt(value, 10), _b)));
1244
- });
1245
- };
1246
- MultiValueConnectorPropertyComponent.prototype.addRow = function () {
1247
- var _this = this;
1248
- this.amountOfValues$.pipe(operators.take(1)).subscribe(function (amountOfValues) {
1249
- _this.amountOfValues$.next(__spread(amountOfValues, [null]));
1250
- });
1251
- };
1252
- MultiValueConnectorPropertyComponent.prototype.removeRow = function () {
1253
- var _this = this;
1254
- rxjs.combineLatest([this.values$, this.amountOfValues$])
1255
- .pipe(operators.take(1))
1256
- .subscribe(function (_b) {
1257
- var _c = __read(_b, 2), values = _c[0], amountOfValues = _c[1];
1258
- var lastValueIndex = amountOfValues.length - 1;
1259
- var valuesCopy = Object.assign({}, values);
1260
- delete valuesCopy[lastValueIndex];
1261
- _this.values$.next(valuesCopy);
1262
- _this.amountOfValues$.next(amountOfValues.filter(function (curr, index) { return index !== lastValueIndex; }));
1263
- });
1264
- };
1265
- MultiValueConnectorPropertyComponent.prototype.openValuesSubscription = function () {
1266
- var _this = this;
1267
- this.valuesSubscription = this.values$.subscribe(function (values) {
1268
- _this.valuesSet.emit({
1269
- editFieldKey: _this.editField.key,
1270
- values: Object.values(values).filter(function (value) { return value === 0 || value; }),
1271
- });
1272
- });
1273
- };
1274
- MultiValueConnectorPropertyComponent.prototype.setDefaults = function () {
1275
- var defaultValue = this.defaultValue;
1276
- var validValues = Array.isArray(defaultValue) && defaultValue.filter(function (value) { return value === 0 || value; });
1277
- if (validValues && validValues.length > 0) {
1278
- var valuesObject_1 = {};
1279
- validValues.forEach(function (value, index) {
1280
- valuesObject_1[index] = value;
1281
- });
1282
- this.values$.next(valuesObject_1);
1283
- this.amountOfValues$.next(validValues.map(function () { return null; }));
1284
- }
1285
- };
1286
- return MultiValueConnectorPropertyComponent;
1287
- }());
1288
- MultiValueConnectorPropertyComponent.decorators = [
1289
- { type: i0.Component, args: [{
1290
- selector: 'valtimo-multi-value-connector-property',
1291
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"form-group row\"\n *ngIf=\"{amountOfValues: amountOfValues$ | async, values: values$ | async} as obs\"\n>\n <label class=\"col-3 col-form-label text-sm-right\">\n {{ 'connectorManagement.inputLabels.' + editField.key | translate }}\n </label>\n <div class=\"col-7\">\n <ng-container *ngFor=\"let value of obs.amountOfValues; let index = index\">\n <ng-container\n *ngTemplateOutlet=\"input; context: {index: index, disabled: disabled, values: obs.values}\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons; context: {disabled: disabled}\"></ng-container>\n </div>\n</div>\n\n<ng-template #input let-index=\"index\" let-disabled=\"disabled\" let-values=\"values\">\n <input\n *ngIf=\"editField.editType === 'string[]'\"\n class=\"form-control mb-2\"\n type=\"text\"\n (input)=\"onValueChange($event.target.value, editField, index)\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue && values[index] ? values[index] : ''\"\n />\n <input\n *ngIf=\"editField.editType === 'number[]'\"\n class=\"form-control mb-2\"\n type=\"number\"\n step=\"1\"\n min=\"0\"\n oninput=\"validity.valid||(value='');\"\n (input)=\"onValueChange($event.target.value, editField, index)\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue && values[index] ? values[index] : ''\"\n />\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"button-container mt-1\">\n <button\n class=\"btn btn-danger btn-space btn-sm\"\n (click)=\"removeRow()\"\n [disabled]=\"disabled || (removeButtonDisabled$ | async)\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.removeValue' | translate }}\n </button>\n <button\n class=\"btn btn-secondary btn-space mr-0 btn-sm\"\n (click)=\"addRow()\"\n [disabled]=\"disabled || (addButtonDisabled$ | async)\"\n >\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'connectorManagement.addValue' | translate }}\n </button>\n </div>\n</ng-template>\n",
1292
- styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.button-container{display:flex;justify-content:flex-end;width:100%}"]
1293
- },] }
1294
- ];
1295
- MultiValueConnectorPropertyComponent.propDecorators = {
1296
- editField: [{ type: i0.Input }],
1297
- disabled: [{ type: i0.Input }],
1298
- defaultValue: [{ type: i0.Input }],
1299
- valuesSet: [{ type: i0.Output }]
1234
+ var MultiValueConnectorPropertyComponent = /** @class */ (function () {
1235
+ function MultiValueConnectorPropertyComponent() {
1236
+ this.valuesSet = new i0.EventEmitter();
1237
+ this.amountOfValues$ = new rxjs.BehaviorSubject([null]);
1238
+ this.removeButtonDisabled$ = this.amountOfValues$.pipe(operators.map(function (amountOfValues) { return amountOfValues.length === 1; }));
1239
+ this.values$ = new rxjs.BehaviorSubject({});
1240
+ this.addButtonDisabled$ = rxjs.combineLatest([this.values$, this.amountOfValues$]).pipe(operators.map(function (_b) {
1241
+ var _c = __read(_b, 2), values = _c[0], amountOfValues = _c[1];
1242
+ var objectValues = Object.values(values);
1243
+ var validObjectValues = objectValues.filter(function (value) { return value === 0 || value; });
1244
+ return amountOfValues.length !== validObjectValues.length;
1245
+ }));
1246
+ }
1247
+ MultiValueConnectorPropertyComponent.prototype.ngOnInit = function () {
1248
+ this.openValuesSubscription();
1249
+ this.setDefaults();
1250
+ };
1251
+ MultiValueConnectorPropertyComponent.prototype.ngOnDestroy = function () {
1252
+ var _a;
1253
+ (_a = this.valuesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1254
+ };
1255
+ MultiValueConnectorPropertyComponent.prototype.onValueChange = function (value, editField, index) {
1256
+ var _this = this;
1257
+ this.values$.pipe(operators.take(1)).subscribe(function (values) {
1258
+ var _b;
1259
+ _this.values$.next(Object.assign(Object.assign({}, values), (_b = {}, _b[index] = editField.editType === 'string[]'
1260
+ ? value.trim()
1261
+ : parseInt(value, 10), _b)));
1262
+ });
1263
+ };
1264
+ MultiValueConnectorPropertyComponent.prototype.addRow = function () {
1265
+ var _this = this;
1266
+ this.amountOfValues$.pipe(operators.take(1)).subscribe(function (amountOfValues) {
1267
+ _this.amountOfValues$.next(__spread(amountOfValues, [null]));
1268
+ });
1269
+ };
1270
+ MultiValueConnectorPropertyComponent.prototype.removeRow = function () {
1271
+ var _this = this;
1272
+ rxjs.combineLatest([this.values$, this.amountOfValues$])
1273
+ .pipe(operators.take(1))
1274
+ .subscribe(function (_b) {
1275
+ var _c = __read(_b, 2), values = _c[0], amountOfValues = _c[1];
1276
+ var lastValueIndex = amountOfValues.length - 1;
1277
+ var valuesCopy = Object.assign({}, values);
1278
+ delete valuesCopy[lastValueIndex];
1279
+ _this.values$.next(valuesCopy);
1280
+ _this.amountOfValues$.next(amountOfValues.filter(function (curr, index) { return index !== lastValueIndex; }));
1281
+ });
1282
+ };
1283
+ MultiValueConnectorPropertyComponent.prototype.openValuesSubscription = function () {
1284
+ var _this = this;
1285
+ this.valuesSubscription = this.values$.subscribe(function (values) {
1286
+ _this.valuesSet.emit({
1287
+ editFieldKey: _this.editField.key,
1288
+ values: Object.values(values).filter(function (value) { return value === 0 || value; }),
1289
+ });
1290
+ });
1291
+ };
1292
+ MultiValueConnectorPropertyComponent.prototype.setDefaults = function () {
1293
+ var defaultValue = this.defaultValue;
1294
+ var validValues = Array.isArray(defaultValue) && defaultValue.filter(function (value) { return value === 0 || value; });
1295
+ if (validValues && validValues.length > 0) {
1296
+ var valuesObject_1 = {};
1297
+ validValues.forEach(function (value, index) {
1298
+ valuesObject_1[index] = value;
1299
+ });
1300
+ this.values$.next(valuesObject_1);
1301
+ this.amountOfValues$.next(validValues.map(function () { return null; }));
1302
+ }
1303
+ };
1304
+ return MultiValueConnectorPropertyComponent;
1305
+ }());
1306
+ MultiValueConnectorPropertyComponent.decorators = [
1307
+ { type: i0.Component, args: [{
1308
+ selector: 'valtimo-multi-value-connector-property',
1309
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"form-group row\"\n *ngIf=\"{amountOfValues: amountOfValues$ | async, values: values$ | async} as obs\"\n>\n <label class=\"col-3 col-form-label text-sm-right\">\n {{ 'connectorManagement.inputLabels.' + editField.key | translate }}\n </label>\n <div class=\"col-7\">\n <ng-container *ngFor=\"let value of obs.amountOfValues; let index = index\">\n <ng-container\n *ngTemplateOutlet=\"input; context: {index: index, disabled: disabled, values: obs.values}\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"buttons; context: {disabled: disabled}\"></ng-container>\n </div>\n</div>\n\n<ng-template #input let-index=\"index\" let-disabled=\"disabled\" let-values=\"values\">\n <input\n *ngIf=\"editField.editType === 'string[]'\"\n class=\"form-control mb-2\"\n type=\"text\"\n (input)=\"onValueChange($event.target.value, editField, index)\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue && values[index] ? values[index] : ''\"\n />\n <input\n *ngIf=\"editField.editType === 'number[]'\"\n class=\"form-control mb-2\"\n type=\"number\"\n step=\"1\"\n min=\"0\"\n oninput=\"validity.valid||(value='');\"\n (input)=\"onValueChange($event.target.value, editField, index)\"\n [disabled]=\"disabled\"\n [value]=\"defaultValue && values[index] ? values[index] : ''\"\n />\n</ng-template>\n\n<ng-template #buttons let-disabled=\"disabled\">\n <div class=\"button-container mt-1\">\n <button\n class=\"btn btn-danger btn-space btn-sm\"\n (click)=\"removeRow()\"\n [disabled]=\"disabled || (removeButtonDisabled$ | async)\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.removeValue' | translate }}\n </button>\n <button\n class=\"btn btn-secondary btn-space mr-0 btn-sm\"\n (click)=\"addRow()\"\n [disabled]=\"disabled || (addButtonDisabled$ | async)\"\n >\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n {{ 'connectorManagement.addValue' | translate }}\n </button>\n </div>\n</ng-template>\n",
1310
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.button-container{display:flex;justify-content:flex-end;width:100%}"]
1311
+ },] }
1312
+ ];
1313
+ MultiValueConnectorPropertyComponent.propDecorators = {
1314
+ editField: [{ type: i0.Input }],
1315
+ disabled: [{ type: i0.Input }],
1316
+ defaultValue: [{ type: i0.Input }],
1317
+ valuesSet: [{ type: i0.Output }]
1300
1318
  };
1301
1319
 
1302
- var ɵ0$1 = {
1303
- custom: "values = window['productRequestDefinitions'][row.caseDefinitionKey] || []",
1304
- };
1305
- var editProductAanvragenConnectorForm = {
1306
- display: 'wizard',
1307
- settings: {
1308
- pdf: {
1309
- id: '1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
1310
- src: 'https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
1311
- },
1312
- },
1313
- components: [
1314
- {
1315
- title: 'connectorForm.productaanvraag.step0.title',
1316
- breadcrumbClickable: true,
1317
- buttonSettings: {
1318
- previous: true,
1319
- cancel: true,
1320
- next: true,
1321
- },
1322
- navigateOnEnter: false,
1323
- saveOnEnter: false,
1324
- scrollToTop: false,
1325
- collapsible: false,
1326
- key: 'page0',
1327
- type: 'panel',
1328
- label: 'Page 0',
1329
- input: false,
1330
- tableView: false,
1331
- components: [
1332
- {
1333
- label: 'HTML',
1334
- attrs: [
1335
- {
1336
- attr: '',
1337
- value: '',
1338
- },
1339
- ],
1340
- content: 'connectorForm.productaanvraag.step0.tip',
1341
- refreshOnChange: false,
1342
- key: 'html4',
1343
- type: 'htmlelement',
1344
- input: false,
1345
- tableView: false,
1346
- },
1347
- {
1348
- key: 'productAanvraagTypes',
1349
- type: 'editgrid',
1350
- input: true,
1351
- validate: {
1352
- minLength: 1,
1353
- },
1354
- customClass: 'edit-grid-component',
1355
- components: [
1356
- {
1357
- label: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.label',
1358
- tooltip: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.tooltip',
1359
- tableView: true,
1360
- validate: {
1361
- required: true,
1362
- },
1363
- key: 'productAanvraagType',
1364
- type: 'textfield',
1365
- input: true,
1366
- },
1367
- {
1368
- label: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.label',
1369
- widget: 'choicesjs',
1370
- placeholder: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.placeholder',
1371
- tableView: true,
1372
- validate: {
1373
- required: true,
1374
- },
1375
- key: 'caseDefinitionKey',
1376
- type: 'select',
1377
- input: true,
1378
- },
1379
- {
1380
- label: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.label',
1381
- widget: 'choicesjs',
1382
- tableView: true,
1383
- dataSrc: 'custom',
1384
- data: ɵ0$1,
1385
- dataType: 'string',
1386
- refreshOn: 'row.caseDefinitionKey',
1387
- clearOnRefresh: true,
1388
- key: 'processDefinitionKey',
1389
- type: 'select',
1390
- input: true,
1391
- validate: {
1392
- required: true,
1393
- },
1394
- placeholder: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.placeholder',
1395
- },
1396
- ],
1397
- },
1398
- ],
1399
- },
1400
- {
1401
- title: 'connectorForm.productaanvraag.step1.title',
1402
- breadcrumbClickable: true,
1403
- buttonSettings: {
1404
- previous: true,
1405
- cancel: true,
1406
- next: true,
1407
- },
1408
- navigateOnEnter: false,
1409
- saveOnEnter: false,
1410
- scrollToTop: false,
1411
- collapsible: false,
1412
- key: 'page1',
1413
- type: 'panel',
1414
- label: 'Page 1',
1415
- input: false,
1416
- tableView: false,
1417
- components: [
1418
- {
1419
- label: 'HTML',
1420
- attrs: [
1421
- {
1422
- attr: '',
1423
- value: '',
1424
- },
1425
- ],
1426
- content: 'connectorForm.productaanvraag.step1.tip',
1427
- refreshOnChange: false,
1428
- key: 'html',
1429
- type: 'htmlelement',
1430
- input: false,
1431
- tableView: false,
1432
- },
1433
- {
1434
- title: 'connectorForm.productaanvraag.step1.objectsApi.panelTitle',
1435
- collapsible: false,
1436
- key: 'connectorFormProductaanvraagStep1ObjectsApiPanelTitle',
1437
- type: 'panel',
1438
- label: 'Panel',
1439
- input: false,
1440
- tableView: false,
1441
- components: [
1442
- {
1443
- label: 'connectorForm.productaanvraag.step1.objectsApi.url.label',
1444
- tooltip: 'connectorForm.productaanvraag.step1.objectsApi.url.tooltip',
1445
- tableView: true,
1446
- validate: {
1447
- required: true,
1448
- },
1449
- key: 'objectsApiUrl',
1450
- type: 'textfield',
1451
- input: true,
1452
- },
1453
- {
1454
- label: 'connectorForm.productaanvraag.step1.objectsApi.token.label',
1455
- tooltip: 'connectorForm.productaanvraag.step1.objectsApi.token.tooltip',
1456
- tableView: true,
1457
- validate: {
1458
- required: true,
1459
- },
1460
- key: 'objectsApiToken',
1461
- type: 'textfield',
1462
- input: true,
1463
- },
1464
- ],
1465
- },
1466
- {
1467
- title: 'connectorForm.productaanvraag.step1.objectTypesApi.panelTitle',
1468
- collapsible: false,
1469
- key: 'connectorFormProductaanvraagStep1ObjectTypesApiPanelTitle',
1470
- type: 'panel',
1471
- label: 'Panel',
1472
- input: false,
1473
- tableView: false,
1474
- components: [
1475
- {
1476
- label: 'connectorForm.productaanvraag.step1.objectTypesApi.url.label',
1477
- tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.url.tooltip',
1478
- tableView: true,
1479
- validate: {
1480
- required: true,
1481
- },
1482
- key: 'objectTypesApiUrl',
1483
- type: 'textfield',
1484
- input: true,
1485
- },
1486
- {
1487
- label: 'connectorForm.productaanvraag.step1.objectTypesApi.token.label',
1488
- tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.token.tooltip',
1489
- tableView: true,
1490
- validate: {
1491
- required: true,
1492
- },
1493
- key: 'objectTypesApiToken',
1494
- type: 'textfield',
1495
- input: true,
1496
- },
1497
- ],
1498
- },
1499
- ],
1500
- },
1501
- {
1502
- title: 'connectorForm.productaanvraag.step2.title',
1503
- breadcrumbClickable: true,
1504
- buttonSettings: {
1505
- previous: true,
1506
- cancel: true,
1507
- next: true,
1508
- },
1509
- navigateOnEnter: false,
1510
- saveOnEnter: false,
1511
- scrollToTop: false,
1512
- collapsible: false,
1513
- key: 'page2',
1514
- type: 'panel',
1515
- label: 'Page 2',
1516
- input: false,
1517
- tableView: false,
1518
- components: [
1519
- {
1520
- label: 'HTML',
1521
- attrs: [
1522
- {
1523
- attr: '',
1524
- value: '',
1525
- },
1526
- ],
1527
- content: 'connectorForm.productaanvraag.step2.tip',
1528
- refreshOnChange: false,
1529
- key: 'html2',
1530
- type: 'htmlelement',
1531
- input: false,
1532
- tableView: false,
1533
- },
1534
- {
1535
- title: 'connectorForm.productaanvraag.step2.objectType.panelTitle',
1536
- collapsible: false,
1537
- key: 'connectorFormProductaanvraagStep2ObjectTypePanelTitle',
1538
- type: 'panel',
1539
- label: 'Panel',
1540
- input: false,
1541
- tableView: false,
1542
- components: [
1543
- {
1544
- label: 'connectorForm.productaanvraag.step2.objectType.name.label',
1545
- tooltip: 'connectorForm.productaanvraag.step2.objectType.name.tooltip',
1546
- tableView: true,
1547
- validate: {
1548
- required: true,
1549
- },
1550
- key: 'objectTypeName',
1551
- type: 'textfield',
1552
- input: true,
1553
- },
1554
- {
1555
- label: 'connectorForm.productaanvraag.step2.objectType.title.label',
1556
- tooltip: 'connectorForm.productaanvraag.step2.objectType.title.tooltip',
1557
- tableView: true,
1558
- validate: {
1559
- required: true,
1560
- },
1561
- key: 'objectTypeTitle',
1562
- type: 'textfield',
1563
- input: true,
1564
- },
1565
- {
1566
- label: 'connectorForm.productaanvraag.step2.objectType.url.label',
1567
- tooltip: 'connectorForm.productaanvraag.step2.objectType.url.tooltip',
1568
- tableView: true,
1569
- validate: {
1570
- required: true,
1571
- },
1572
- key: 'objectTypeUrl',
1573
- type: 'textfield',
1574
- input: true,
1575
- },
1576
- {
1577
- label: 'connectorForm.productaanvraag.step2.objectType.typeVersion.label',
1578
- tooltip: 'connectorForm.productaanvraag.step2.objectType.typeVersion.tooltip',
1579
- tableView: true,
1580
- validate: {
1581
- required: true,
1582
- },
1583
- key: 'objectTypeVersion',
1584
- type: 'textfield',
1585
- input: true,
1586
- },
1587
- ],
1588
- },
1589
- ],
1590
- },
1591
- {
1592
- title: 'connectorForm.productaanvraag.step3.title',
1593
- breadcrumbClickable: true,
1594
- buttonSettings: {
1595
- previous: true,
1596
- cancel: true,
1597
- next: true,
1598
- },
1599
- navigateOnEnter: false,
1600
- saveOnEnter: false,
1601
- scrollToTop: false,
1602
- collapsible: false,
1603
- key: 'page3',
1604
- type: 'panel',
1605
- label: 'Page 3',
1606
- input: false,
1607
- tableView: false,
1608
- components: [
1609
- {
1610
- label: 'HTML',
1611
- attrs: [
1612
- {
1613
- attr: '',
1614
- value: '',
1615
- },
1616
- ],
1617
- content: 'connectorForm.productaanvraag.step3.tip',
1618
- refreshOnChange: false,
1619
- key: 'html1',
1620
- type: 'htmlelement',
1621
- input: false,
1622
- tableView: false,
1623
- },
1624
- {
1625
- title: 'connectorForm.productaanvraag.step3.openNotifications.panelTitle',
1626
- collapsible: false,
1627
- key: 'connectorFormProductaanvraagStep3OpenNotificationsPanelTitle',
1628
- type: 'panel',
1629
- label: 'Panel',
1630
- input: false,
1631
- tableView: false,
1632
- components: [
1633
- {
1634
- label: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.label',
1635
- tooltip: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.tooltip',
1636
- tableView: true,
1637
- validate: {
1638
- required: true,
1639
- },
1640
- key: 'openNotificationsBaseUrl',
1641
- type: 'textfield',
1642
- input: true,
1643
- },
1644
- {
1645
- label: 'connectorForm.productaanvraag.step3.openNotifications.clientId.label',
1646
- tooltip: 'connectorForm.productaanvraag.step3.openNotifications.clientId.tooltip',
1647
- tableView: true,
1648
- validate: {
1649
- required: true,
1650
- },
1651
- key: 'openNotificationsClientId',
1652
- type: 'textfield',
1653
- input: true,
1654
- },
1655
- {
1656
- label: 'connectorForm.productaanvraag.step3.openNotifications.secret.label',
1657
- tooltip: 'connectorForm.productaanvraag.step3.openNotifications.secret.tooltip',
1658
- tableView: true,
1659
- validate: {
1660
- required: true,
1661
- },
1662
- key: 'openNotificationsSecret',
1663
- type: 'textfield',
1664
- input: true,
1665
- },
1666
- {
1667
- label: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.label',
1668
- tooltip: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.tooltip',
1669
- tableView: true,
1670
- validate: {
1671
- required: true,
1672
- },
1673
- key: 'openNotificationsCallbackBaseUrl',
1674
- type: 'textfield',
1675
- input: true,
1676
- },
1677
- ],
1678
- },
1679
- ],
1680
- },
1681
- {
1682
- title: 'connectorForm.productaanvraag.step4.title',
1683
- breadcrumbClickable: true,
1684
- buttonSettings: {
1685
- previous: true,
1686
- cancel: true,
1687
- next: true,
1688
- },
1689
- navigateOnEnter: false,
1690
- saveOnEnter: false,
1691
- scrollToTop: false,
1692
- collapsible: false,
1693
- key: 'page4',
1694
- type: 'panel',
1695
- label: 'Page 4',
1696
- input: false,
1697
- tableView: false,
1698
- components: [
1699
- {
1700
- label: 'HTML',
1701
- attrs: [
1702
- {
1703
- attr: '',
1704
- value: '',
1705
- },
1706
- ],
1707
- content: 'connectorForm.productaanvraag.step4.tip',
1708
- refreshOnChange: false,
1709
- key: 'html3',
1710
- type: 'htmlelement',
1711
- input: false,
1712
- tableView: false,
1713
- },
1714
- {
1715
- title: 'connectorForm.productaanvraag.step4.applicant.panelTitle',
1716
- collapsible: false,
1717
- key: 'connectorFormProductaanvraagStep4ApplicantPanelTitle',
1718
- type: 'panel',
1719
- label: 'Panel',
1720
- input: false,
1721
- tableView: false,
1722
- components: [
1723
- {
1724
- label: 'HTML',
1725
- attrs: [
1726
- {
1727
- attr: '',
1728
- value: '',
1729
- },
1730
- ],
1731
- content: 'connectorForm.productaanvraag.step4.applicant.tip',
1732
- refreshOnChange: false,
1733
- key: 'html5',
1734
- type: 'htmlelement',
1735
- input: false,
1736
- tableView: false,
1737
- },
1738
- {
1739
- label: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.label',
1740
- tooltip: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.tooltip',
1741
- tableView: true,
1742
- validate: {
1743
- required: true,
1744
- },
1745
- key: 'applicantRoleTypeUrl',
1746
- type: 'textfield',
1747
- input: true,
1748
- },
1749
- ],
1750
- },
1751
- ],
1752
- },
1753
- {
1754
- title: 'connectorForm.productaanvraag.step5.title',
1755
- breadcrumbClickable: true,
1756
- buttonSettings: {
1757
- previous: true,
1758
- cancel: true,
1759
- next: true,
1760
- },
1761
- navigateOnEnter: false,
1762
- saveOnEnter: false,
1763
- scrollToTop: false,
1764
- collapsible: false,
1765
- key: 'page6',
1766
- type: 'panel',
1767
- label: 'Page 5',
1768
- input: false,
1769
- tableView: false,
1770
- components: [
1771
- {
1772
- label: 'HTML',
1773
- attrs: [
1774
- {
1775
- attr: '',
1776
- value: '',
1777
- },
1778
- ],
1779
- content: 'connectorForm.productaanvraag.step5.tip',
1780
- refreshOnChange: false,
1781
- key: 'html6',
1782
- type: 'htmlelement',
1783
- input: false,
1784
- tableView: false,
1785
- },
1786
- {
1787
- label: 'connectorForm.productaanvraag.step5.name',
1788
- tableView: true,
1789
- validate: {
1790
- required: true,
1791
- },
1792
- key: 'connectorName',
1793
- type: 'textfield',
1794
- input: true,
1795
- },
1796
- ],
1797
- },
1798
- ],
1320
+ var ɵ0$1 = {
1321
+ custom: "values = window['productRequestDefinitions'][row.caseDefinitionKey] || []",
1322
+ };
1323
+ var editProductAanvragenConnectorForm = {
1324
+ display: 'wizard',
1325
+ settings: {
1326
+ pdf: {
1327
+ id: '1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
1328
+ src: 'https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
1329
+ },
1330
+ },
1331
+ components: [
1332
+ {
1333
+ title: 'connectorForm.productaanvraag.step0.title',
1334
+ breadcrumbClickable: true,
1335
+ buttonSettings: {
1336
+ previous: true,
1337
+ cancel: true,
1338
+ next: true,
1339
+ },
1340
+ navigateOnEnter: false,
1341
+ saveOnEnter: false,
1342
+ scrollToTop: false,
1343
+ collapsible: false,
1344
+ key: 'page0',
1345
+ type: 'panel',
1346
+ label: 'Page 0',
1347
+ input: false,
1348
+ tableView: false,
1349
+ components: [
1350
+ {
1351
+ label: 'HTML',
1352
+ attrs: [
1353
+ {
1354
+ attr: '',
1355
+ value: '',
1356
+ },
1357
+ ],
1358
+ content: 'connectorForm.productaanvraag.step0.tip',
1359
+ refreshOnChange: false,
1360
+ key: 'html4',
1361
+ type: 'htmlelement',
1362
+ input: false,
1363
+ tableView: false,
1364
+ },
1365
+ {
1366
+ key: 'productAanvraagTypes',
1367
+ type: 'editgrid',
1368
+ input: true,
1369
+ validate: {
1370
+ minLength: 1,
1371
+ },
1372
+ customClass: 'edit-grid-component',
1373
+ components: [
1374
+ {
1375
+ label: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.label',
1376
+ tooltip: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.tooltip',
1377
+ tableView: true,
1378
+ validate: {
1379
+ required: true,
1380
+ },
1381
+ key: 'productAanvraagType',
1382
+ type: 'textfield',
1383
+ input: true,
1384
+ },
1385
+ {
1386
+ label: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.label',
1387
+ widget: 'choicesjs',
1388
+ placeholder: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.placeholder',
1389
+ tableView: true,
1390
+ validate: {
1391
+ required: true,
1392
+ },
1393
+ key: 'caseDefinitionKey',
1394
+ type: 'select',
1395
+ input: true,
1396
+ },
1397
+ {
1398
+ label: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.label',
1399
+ widget: 'choicesjs',
1400
+ tableView: true,
1401
+ dataSrc: 'custom',
1402
+ data: ɵ0$1,
1403
+ dataType: 'string',
1404
+ refreshOn: 'row.caseDefinitionKey',
1405
+ clearOnRefresh: true,
1406
+ key: 'processDefinitionKey',
1407
+ type: 'select',
1408
+ input: true,
1409
+ validate: {
1410
+ required: true,
1411
+ },
1412
+ placeholder: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.placeholder',
1413
+ },
1414
+ ],
1415
+ },
1416
+ ],
1417
+ },
1418
+ {
1419
+ title: 'connectorForm.productaanvraag.step1.title',
1420
+ breadcrumbClickable: true,
1421
+ buttonSettings: {
1422
+ previous: true,
1423
+ cancel: true,
1424
+ next: true,
1425
+ },
1426
+ navigateOnEnter: false,
1427
+ saveOnEnter: false,
1428
+ scrollToTop: false,
1429
+ collapsible: false,
1430
+ key: 'page1',
1431
+ type: 'panel',
1432
+ label: 'Page 1',
1433
+ input: false,
1434
+ tableView: false,
1435
+ components: [
1436
+ {
1437
+ label: 'HTML',
1438
+ attrs: [
1439
+ {
1440
+ attr: '',
1441
+ value: '',
1442
+ },
1443
+ ],
1444
+ content: 'connectorForm.productaanvraag.step1.tip',
1445
+ refreshOnChange: false,
1446
+ key: 'html',
1447
+ type: 'htmlelement',
1448
+ input: false,
1449
+ tableView: false,
1450
+ },
1451
+ {
1452
+ title: 'connectorForm.productaanvraag.step1.objectsApi.panelTitle',
1453
+ collapsible: false,
1454
+ key: 'connectorFormProductaanvraagStep1ObjectsApiPanelTitle',
1455
+ type: 'panel',
1456
+ label: 'Panel',
1457
+ input: false,
1458
+ tableView: false,
1459
+ components: [
1460
+ {
1461
+ label: 'connectorForm.productaanvraag.step1.objectsApi.url.label',
1462
+ tooltip: 'connectorForm.productaanvraag.step1.objectsApi.url.tooltip',
1463
+ tableView: true,
1464
+ validate: {
1465
+ required: true,
1466
+ },
1467
+ key: 'objectsApiUrl',
1468
+ type: 'textfield',
1469
+ input: true,
1470
+ },
1471
+ {
1472
+ label: 'connectorForm.productaanvraag.step1.objectsApi.token.label',
1473
+ tooltip: 'connectorForm.productaanvraag.step1.objectsApi.token.tooltip',
1474
+ tableView: true,
1475
+ validate: {
1476
+ required: true,
1477
+ },
1478
+ key: 'objectsApiToken',
1479
+ type: 'textfield',
1480
+ input: true,
1481
+ },
1482
+ ],
1483
+ },
1484
+ {
1485
+ title: 'connectorForm.productaanvraag.step1.objectTypesApi.panelTitle',
1486
+ collapsible: false,
1487
+ key: 'connectorFormProductaanvraagStep1ObjectTypesApiPanelTitle',
1488
+ type: 'panel',
1489
+ label: 'Panel',
1490
+ input: false,
1491
+ tableView: false,
1492
+ components: [
1493
+ {
1494
+ label: 'connectorForm.productaanvraag.step1.objectTypesApi.url.label',
1495
+ tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.url.tooltip',
1496
+ tableView: true,
1497
+ validate: {
1498
+ required: true,
1499
+ },
1500
+ key: 'objectTypesApiUrl',
1501
+ type: 'textfield',
1502
+ input: true,
1503
+ },
1504
+ {
1505
+ label: 'connectorForm.productaanvraag.step1.objectTypesApi.token.label',
1506
+ tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.token.tooltip',
1507
+ tableView: true,
1508
+ validate: {
1509
+ required: true,
1510
+ },
1511
+ key: 'objectTypesApiToken',
1512
+ type: 'textfield',
1513
+ input: true,
1514
+ },
1515
+ ],
1516
+ },
1517
+ ],
1518
+ },
1519
+ {
1520
+ title: 'connectorForm.productaanvraag.step2.title',
1521
+ breadcrumbClickable: true,
1522
+ buttonSettings: {
1523
+ previous: true,
1524
+ cancel: true,
1525
+ next: true,
1526
+ },
1527
+ navigateOnEnter: false,
1528
+ saveOnEnter: false,
1529
+ scrollToTop: false,
1530
+ collapsible: false,
1531
+ key: 'page2',
1532
+ type: 'panel',
1533
+ label: 'Page 2',
1534
+ input: false,
1535
+ tableView: false,
1536
+ components: [
1537
+ {
1538
+ label: 'HTML',
1539
+ attrs: [
1540
+ {
1541
+ attr: '',
1542
+ value: '',
1543
+ },
1544
+ ],
1545
+ content: 'connectorForm.productaanvraag.step2.tip',
1546
+ refreshOnChange: false,
1547
+ key: 'html2',
1548
+ type: 'htmlelement',
1549
+ input: false,
1550
+ tableView: false,
1551
+ },
1552
+ {
1553
+ title: 'connectorForm.productaanvraag.step2.objectType.panelTitle',
1554
+ collapsible: false,
1555
+ key: 'connectorFormProductaanvraagStep2ObjectTypePanelTitle',
1556
+ type: 'panel',
1557
+ label: 'Panel',
1558
+ input: false,
1559
+ tableView: false,
1560
+ components: [
1561
+ {
1562
+ label: 'connectorForm.productaanvraag.step2.objectType.name.label',
1563
+ tooltip: 'connectorForm.productaanvraag.step2.objectType.name.tooltip',
1564
+ tableView: true,
1565
+ validate: {
1566
+ required: true,
1567
+ },
1568
+ key: 'objectTypeName',
1569
+ type: 'textfield',
1570
+ input: true,
1571
+ },
1572
+ {
1573
+ label: 'connectorForm.productaanvraag.step2.objectType.title.label',
1574
+ tooltip: 'connectorForm.productaanvraag.step2.objectType.title.tooltip',
1575
+ tableView: true,
1576
+ validate: {
1577
+ required: true,
1578
+ },
1579
+ key: 'objectTypeTitle',
1580
+ type: 'textfield',
1581
+ input: true,
1582
+ },
1583
+ {
1584
+ label: 'connectorForm.productaanvraag.step2.objectType.url.label',
1585
+ tooltip: 'connectorForm.productaanvraag.step2.objectType.url.tooltip',
1586
+ tableView: true,
1587
+ validate: {
1588
+ required: true,
1589
+ },
1590
+ key: 'objectTypeUrl',
1591
+ type: 'textfield',
1592
+ input: true,
1593
+ },
1594
+ {
1595
+ label: 'connectorForm.productaanvraag.step2.objectType.typeVersion.label',
1596
+ tooltip: 'connectorForm.productaanvraag.step2.objectType.typeVersion.tooltip',
1597
+ tableView: true,
1598
+ validate: {
1599
+ required: true,
1600
+ },
1601
+ key: 'objectTypeVersion',
1602
+ type: 'textfield',
1603
+ input: true,
1604
+ },
1605
+ ],
1606
+ },
1607
+ ],
1608
+ },
1609
+ {
1610
+ title: 'connectorForm.productaanvraag.step3.title',
1611
+ breadcrumbClickable: true,
1612
+ buttonSettings: {
1613
+ previous: true,
1614
+ cancel: true,
1615
+ next: true,
1616
+ },
1617
+ navigateOnEnter: false,
1618
+ saveOnEnter: false,
1619
+ scrollToTop: false,
1620
+ collapsible: false,
1621
+ key: 'page3',
1622
+ type: 'panel',
1623
+ label: 'Page 3',
1624
+ input: false,
1625
+ tableView: false,
1626
+ components: [
1627
+ {
1628
+ label: 'HTML',
1629
+ attrs: [
1630
+ {
1631
+ attr: '',
1632
+ value: '',
1633
+ },
1634
+ ],
1635
+ content: 'connectorForm.productaanvraag.step3.tip',
1636
+ refreshOnChange: false,
1637
+ key: 'html1',
1638
+ type: 'htmlelement',
1639
+ input: false,
1640
+ tableView: false,
1641
+ },
1642
+ {
1643
+ title: 'connectorForm.productaanvraag.step3.openNotifications.panelTitle',
1644
+ collapsible: false,
1645
+ key: 'connectorFormProductaanvraagStep3OpenNotificationsPanelTitle',
1646
+ type: 'panel',
1647
+ label: 'Panel',
1648
+ input: false,
1649
+ tableView: false,
1650
+ components: [
1651
+ {
1652
+ label: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.label',
1653
+ tooltip: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.tooltip',
1654
+ tableView: true,
1655
+ validate: {
1656
+ required: true,
1657
+ },
1658
+ key: 'openNotificationsBaseUrl',
1659
+ type: 'textfield',
1660
+ input: true,
1661
+ },
1662
+ {
1663
+ label: 'connectorForm.productaanvraag.step3.openNotifications.clientId.label',
1664
+ tooltip: 'connectorForm.productaanvraag.step3.openNotifications.clientId.tooltip',
1665
+ tableView: true,
1666
+ validate: {
1667
+ required: true,
1668
+ },
1669
+ key: 'openNotificationsClientId',
1670
+ type: 'textfield',
1671
+ input: true,
1672
+ },
1673
+ {
1674
+ label: 'connectorForm.productaanvraag.step3.openNotifications.secret.label',
1675
+ tooltip: 'connectorForm.productaanvraag.step3.openNotifications.secret.tooltip',
1676
+ tableView: true,
1677
+ validate: {
1678
+ required: true,
1679
+ },
1680
+ key: 'openNotificationsSecret',
1681
+ type: 'textfield',
1682
+ input: true,
1683
+ },
1684
+ {
1685
+ label: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.label',
1686
+ tooltip: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.tooltip',
1687
+ tableView: true,
1688
+ validate: {
1689
+ required: true,
1690
+ },
1691
+ key: 'openNotificationsCallbackBaseUrl',
1692
+ type: 'textfield',
1693
+ input: true,
1694
+ },
1695
+ ],
1696
+ },
1697
+ ],
1698
+ },
1699
+ {
1700
+ title: 'connectorForm.productaanvraag.step4.title',
1701
+ breadcrumbClickable: true,
1702
+ buttonSettings: {
1703
+ previous: true,
1704
+ cancel: true,
1705
+ next: true,
1706
+ },
1707
+ navigateOnEnter: false,
1708
+ saveOnEnter: false,
1709
+ scrollToTop: false,
1710
+ collapsible: false,
1711
+ key: 'page4',
1712
+ type: 'panel',
1713
+ label: 'Page 4',
1714
+ input: false,
1715
+ tableView: false,
1716
+ components: [
1717
+ {
1718
+ label: 'HTML',
1719
+ attrs: [
1720
+ {
1721
+ attr: '',
1722
+ value: '',
1723
+ },
1724
+ ],
1725
+ content: 'connectorForm.productaanvraag.step4.tip',
1726
+ refreshOnChange: false,
1727
+ key: 'html3',
1728
+ type: 'htmlelement',
1729
+ input: false,
1730
+ tableView: false,
1731
+ },
1732
+ {
1733
+ title: 'connectorForm.productaanvraag.step4.applicant.panelTitle',
1734
+ collapsible: false,
1735
+ key: 'connectorFormProductaanvraagStep4ApplicantPanelTitle',
1736
+ type: 'panel',
1737
+ label: 'Panel',
1738
+ input: false,
1739
+ tableView: false,
1740
+ components: [
1741
+ {
1742
+ label: 'HTML',
1743
+ attrs: [
1744
+ {
1745
+ attr: '',
1746
+ value: '',
1747
+ },
1748
+ ],
1749
+ content: 'connectorForm.productaanvraag.step4.applicant.tip',
1750
+ refreshOnChange: false,
1751
+ key: 'html5',
1752
+ type: 'htmlelement',
1753
+ input: false,
1754
+ tableView: false,
1755
+ },
1756
+ {
1757
+ label: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.label',
1758
+ tooltip: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.tooltip',
1759
+ tableView: true,
1760
+ validate: {
1761
+ required: true,
1762
+ },
1763
+ key: 'applicantRoleTypeUrl',
1764
+ type: 'textfield',
1765
+ input: true,
1766
+ },
1767
+ ],
1768
+ },
1769
+ ],
1770
+ },
1771
+ {
1772
+ title: 'connectorForm.productaanvraag.step5.title',
1773
+ breadcrumbClickable: true,
1774
+ buttonSettings: {
1775
+ previous: true,
1776
+ cancel: true,
1777
+ next: true,
1778
+ },
1779
+ navigateOnEnter: false,
1780
+ saveOnEnter: false,
1781
+ scrollToTop: false,
1782
+ collapsible: false,
1783
+ key: 'page6',
1784
+ type: 'panel',
1785
+ label: 'Page 5',
1786
+ input: false,
1787
+ tableView: false,
1788
+ components: [
1789
+ {
1790
+ label: 'HTML',
1791
+ attrs: [
1792
+ {
1793
+ attr: '',
1794
+ value: '',
1795
+ },
1796
+ ],
1797
+ content: 'connectorForm.productaanvraag.step5.tip',
1798
+ refreshOnChange: false,
1799
+ key: 'html6',
1800
+ type: 'htmlelement',
1801
+ input: false,
1802
+ tableView: false,
1803
+ },
1804
+ {
1805
+ label: 'connectorForm.productaanvraag.step5.name',
1806
+ tableView: true,
1807
+ validate: {
1808
+ required: true,
1809
+ },
1810
+ key: 'connectorName',
1811
+ type: 'textfield',
1812
+ input: true,
1813
+ },
1814
+ ],
1815
+ },
1816
+ ],
1799
1817
  };
1800
1818
 
1801
- var EditProductAanvragenConnectorComponent = /** @class */ (function () {
1802
- function EditProductAanvragenConnectorComponent(formTranslationService, formMappingService, documentService, translateService) {
1803
- var _this = this;
1804
- this.formTranslationService = formTranslationService;
1805
- this.formMappingService = formMappingService;
1806
- this.documentService = documentService;
1807
- this.translateService = translateService;
1808
- this.showDeleteButton = false;
1809
- this.propertiesSave = new i0.EventEmitter();
1810
- this.connectorDelete = new i0.EventEmitter();
1811
- this.formRefresh$ = new rxjs.Subject();
1812
- this.formDefinition$ = new rxjs.BehaviorSubject(undefined);
1813
- this.translatedFormDefinition$ = this.formDefinition$.pipe(operators.map(function (definition) { return _this.formTranslationService.translateForm(definition); }));
1814
- this.caseDefinitionOptions = [];
1815
- this.processDocumentDefinitionOptions = {};
1816
- this.options = {
1817
- disableAlerts: true,
1818
- };
1819
- this.mapCaseDefinitionKeyComponent = function (component) {
1820
- if (component.key === 'caseDefinitionKey') {
1821
- return Object.assign(Object.assign({}, component), { disabled: false, data: { values: _this.caseDefinitionOptions } });
1822
- }
1823
- return component;
1824
- };
1825
- }
1826
- EditProductAanvragenConnectorComponent.prototype.ngOnInit = function () {
1827
- window['productRequestDefinitions'] = {};
1828
- this.openFormDefinitionSubscription();
1829
- this.formDefinition$.next(editProductAanvragenConnectorForm);
1830
- this.loadDefinitions();
1831
- };
1832
- EditProductAanvragenConnectorComponent.prototype.ngOnDestroy = function () {
1833
- var _a, _b;
1834
- (_a = this.formDefinitionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1835
- (_b = this.translateSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
1836
- };
1837
- EditProductAanvragenConnectorComponent.prototype.onSubmit = function (event) {
1838
- var submission = event.data;
1839
- var properties = lodash.cloneDeep(this.properties);
1840
- properties.objectsApiProperties.objectsApi.url = submission.objectsApiUrl;
1841
- properties.objectsApiProperties.objectsApi.token = submission.objectsApiToken;
1842
- properties.objectsApiProperties.objectsTypeApi.url = submission.objectTypesApiUrl;
1843
- properties.objectsApiProperties.objectsTypeApi.token = submission.objectTypesApiToken;
1844
- properties.objectsApiProperties.objectType.name = submission.objectTypeName;
1845
- properties.objectsApiProperties.objectType.title = submission.objectTypeTitle;
1846
- properties.objectsApiProperties.objectType.url = submission.objectTypeUrl;
1847
- properties.objectsApiProperties.objectType.typeVersion = submission.objectTypeVersion;
1848
- properties.openNotificatieProperties.baseUrl = submission.openNotificationsBaseUrl;
1849
- properties.openNotificatieProperties.clientId = submission.openNotificationsClientId;
1850
- properties.openNotificatieProperties.secret = submission.openNotificationsSecret;
1851
- properties.openNotificatieProperties.callbackBaseUrl =
1852
- submission.openNotificationsCallbackBaseUrl;
1853
- properties.aanvragerRolTypeUrl = submission.applicantRoleTypeUrl;
1854
- properties.typeMapping = submission.productAanvraagTypes;
1855
- this.propertiesSave.emit({ properties: properties, name: submission.connectorName });
1856
- };
1857
- EditProductAanvragenConnectorComponent.prototype.onDelete = function () {
1858
- this.connectorDelete.emit();
1859
- };
1860
- EditProductAanvragenConnectorComponent.prototype.openFormDefinitionSubscription = function () {
1861
- var _this = this;
1862
- this.formDefinitionSubscription = rxjs.combineLatest([
1863
- this.formDefinition$,
1864
- this.translateService.stream('key'),
1865
- ]).subscribe(function (_c) {
1866
- var _d = __read(_c, 1), form = _d[0];
1867
- var translatedForm = _this.formTranslationService.translateForm(form);
1868
- _this.refreshForm({ form: translatedForm });
1869
- });
1870
- };
1871
- EditProductAanvragenConnectorComponent.prototype.prefillForm = function () {
1872
- var properties = lodash.cloneDeep(this.properties);
1873
- var submission = {};
1874
- submission.objectsApiUrl = properties.objectsApiProperties.objectsApi.url;
1875
- submission.objectsApiToken = properties.objectsApiProperties.objectsApi.token;
1876
- submission.objectTypesApiUrl = properties.objectsApiProperties.objectsTypeApi.url;
1877
- submission.objectTypesApiToken = properties.objectsApiProperties.objectsTypeApi.token;
1878
- submission.objectTypeName = properties.objectsApiProperties.objectType.name;
1879
- submission.objectTypeTitle = properties.objectsApiProperties.objectType.title;
1880
- submission.objectTypeUrl = properties.objectsApiProperties.objectType.url;
1881
- submission.objectTypeVersion = properties.objectsApiProperties.objectType.typeVersion;
1882
- submission.openNotificationsBaseUrl = properties.openNotificatieProperties.baseUrl;
1883
- submission.openNotificationsClientId = properties.openNotificatieProperties.clientId;
1884
- submission.openNotificationsSecret = properties.openNotificatieProperties.secret;
1885
- submission.openNotificationsCallbackBaseUrl =
1886
- properties.openNotificatieProperties.callbackBaseUrl;
1887
- submission.applicantRoleTypeUrl = properties.aanvragerRolTypeUrl;
1888
- submission.productAanvraagTypes = properties.typeMapping;
1889
- submission.connectorName = this.defaultName;
1890
- this.refreshForm({ submission: { data: submission } });
1891
- };
1892
- EditProductAanvragenConnectorComponent.prototype.refreshForm = function (refreshValue) {
1893
- this.formRefresh$.next(refreshValue);
1894
- };
1895
- EditProductAanvragenConnectorComponent.prototype.loadDefinitions = function () {
1896
- var _this = this;
1897
- var documentDefinitions;
1898
- this.documentService
1899
- .getAllDefinitions()
1900
- .pipe(operators.tap(function (resDocumentDefinitions) { return (documentDefinitions = resDocumentDefinitions.content); }), operators.switchMap(function (resDocumentDefinitions) { return rxjs.combineLatest(resDocumentDefinitions.content.map(function (definition) { return _this.documentService.findProcessDocumentDefinitions(definition.id.name); })); }), operators.tap(function (res) {
1901
- var _a;
1902
- _this.caseDefinitionOptions = documentDefinitions.map(function (documentDefinition) {
1903
- return { label: documentDefinition.id.name, value: documentDefinition.id.name };
1904
- });
1905
- documentDefinitions.forEach(function (documentDefinition, index) {
1906
- _this.processDocumentDefinitionOptions[documentDefinition.id.name] = res[index].map(function (processDocumentDefinition) { return processDocumentDefinition.id.processDefinitionKey; });
1907
- });
1908
- window['productRequestDefinitions'] = _this.processDocumentDefinitionOptions;
1909
- var definitionWithCaseDefinitionOptions = _this.formMappingService.mapComponents(_this.formDefinition$.getValue(), _this.mapCaseDefinitionKeyComponent);
1910
- _this.formDefinition$.next(definitionWithCaseDefinitionOptions);
1911
- if ((_a = _this.properties) === null || _a === void 0 ? void 0 : _a.aanvragerRolTypeUrl) {
1912
- _this.prefillForm();
1913
- }
1914
- }))
1915
- .subscribe();
1916
- };
1917
- return EditProductAanvragenConnectorComponent;
1918
- }());
1919
- EditProductAanvragenConnectorComponent.decorators = [
1920
- { type: i0.Component, args: [{
1921
- selector: 'valtimo-edit-product-aanvragen-connector',
1922
- template: "<!--\n ~ Copyright 2015-2021 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n *ngIf=\"translatedFormDefinition$ | async as definition\"\n class=\"edit-product-request\"\n [ngClass]=\"{'has-delete': showDeleteButton}\"\n>\n <valtimo-form-io\n [form]=\"definition\"\n [formRefresh$]=\"formRefresh$\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n</div>\n",
1923
- styles: ["/*!\n * Copyright 2015-2021 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.edit-product-request ::ng-deep .btn-wizard-nav-cancel{display:none}.edit-product-request ::ng-deep .list-inline{display:flex;flex-direction:row;justify-content:flex-end}.edit-product-request ::ng-deep .col-sm-2{flex:0 0 25%;max-width:25%}.edit-product-request ::ng-deep .edit-grid-component>label{display:none}.edit-product-request.has-delete ::ng-deep .list-inline{margin-bottom:-30px}.edit-product-request .btn-danger{position:relative}"]
1924
- },] }
1925
- ];
1926
- EditProductAanvragenConnectorComponent.ctorParameters = function () { return [
1927
- { type: form.FormTranslationService },
1928
- { type: form.FormMappingService },
1929
- { type: document.DocumentService },
1930
- { type: core.TranslateService }
1931
- ]; };
1932
- EditProductAanvragenConnectorComponent.propDecorators = {
1933
- properties: [{ type: i0.Input }],
1934
- defaultName: [{ type: i0.Input }],
1935
- showDeleteButton: [{ type: i0.Input }],
1936
- propertiesSave: [{ type: i0.Output }],
1937
- connectorDelete: [{ type: i0.Output }]
1819
+ var EditProductAanvragenConnectorComponent = /** @class */ (function () {
1820
+ function EditProductAanvragenConnectorComponent(formTranslationService, formMappingService, documentService, translateService) {
1821
+ var _this = this;
1822
+ this.formTranslationService = formTranslationService;
1823
+ this.formMappingService = formMappingService;
1824
+ this.documentService = documentService;
1825
+ this.translateService = translateService;
1826
+ this.showDeleteButton = false;
1827
+ this.propertiesSave = new i0.EventEmitter();
1828
+ this.connectorDelete = new i0.EventEmitter();
1829
+ this.formRefresh$ = new rxjs.Subject();
1830
+ this.formDefinition$ = new rxjs.BehaviorSubject(undefined);
1831
+ this.translatedFormDefinition$ = this.formDefinition$.pipe(operators.map(function (definition) { return _this.formTranslationService.translateForm(definition); }));
1832
+ this.caseDefinitionOptions = [];
1833
+ this.processDocumentDefinitionOptions = {};
1834
+ this.options = {
1835
+ disableAlerts: true,
1836
+ };
1837
+ this.mapCaseDefinitionKeyComponent = function (component) {
1838
+ if (component.key === 'caseDefinitionKey') {
1839
+ return Object.assign(Object.assign({}, component), { disabled: false, data: { values: _this.caseDefinitionOptions } });
1840
+ }
1841
+ return component;
1842
+ };
1843
+ }
1844
+ EditProductAanvragenConnectorComponent.prototype.ngOnInit = function () {
1845
+ window['productRequestDefinitions'] = {};
1846
+ this.openFormDefinitionSubscription();
1847
+ this.formDefinition$.next(editProductAanvragenConnectorForm);
1848
+ this.loadDefinitions();
1849
+ };
1850
+ EditProductAanvragenConnectorComponent.prototype.ngOnDestroy = function () {
1851
+ var _a, _b;
1852
+ (_a = this.formDefinitionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1853
+ (_b = this.translateSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
1854
+ };
1855
+ EditProductAanvragenConnectorComponent.prototype.onSubmit = function (event) {
1856
+ var submission = event.data;
1857
+ var properties = lodash.cloneDeep(this.properties);
1858
+ properties.objectsApiProperties.objectsApi.url = submission.objectsApiUrl;
1859
+ properties.objectsApiProperties.objectsApi.token = submission.objectsApiToken;
1860
+ properties.objectsApiProperties.objectsTypeApi.url = submission.objectTypesApiUrl;
1861
+ properties.objectsApiProperties.objectsTypeApi.token = submission.objectTypesApiToken;
1862
+ properties.objectsApiProperties.objectType.name = submission.objectTypeName;
1863
+ properties.objectsApiProperties.objectType.title = submission.objectTypeTitle;
1864
+ properties.objectsApiProperties.objectType.url = submission.objectTypeUrl;
1865
+ properties.objectsApiProperties.objectType.typeVersion = submission.objectTypeVersion;
1866
+ properties.openNotificatieProperties.baseUrl = submission.openNotificationsBaseUrl;
1867
+ properties.openNotificatieProperties.clientId = submission.openNotificationsClientId;
1868
+ properties.openNotificatieProperties.secret = submission.openNotificationsSecret;
1869
+ properties.openNotificatieProperties.callbackBaseUrl =
1870
+ submission.openNotificationsCallbackBaseUrl;
1871
+ properties.aanvragerRolTypeUrl = submission.applicantRoleTypeUrl;
1872
+ properties.typeMapping = submission.productAanvraagTypes;
1873
+ this.propertiesSave.emit({ properties: properties, name: submission.connectorName });
1874
+ };
1875
+ EditProductAanvragenConnectorComponent.prototype.onDelete = function () {
1876
+ this.connectorDelete.emit();
1877
+ };
1878
+ EditProductAanvragenConnectorComponent.prototype.openFormDefinitionSubscription = function () {
1879
+ var _this = this;
1880
+ this.formDefinitionSubscription = rxjs.combineLatest([
1881
+ this.formDefinition$,
1882
+ this.translateService.stream('key'),
1883
+ ]).subscribe(function (_c) {
1884
+ var _d = __read(_c, 1), form = _d[0];
1885
+ var translatedForm = _this.formTranslationService.translateForm(form);
1886
+ _this.refreshForm({ form: translatedForm });
1887
+ });
1888
+ };
1889
+ EditProductAanvragenConnectorComponent.prototype.prefillForm = function () {
1890
+ var properties = lodash.cloneDeep(this.properties);
1891
+ var submission = {};
1892
+ submission.objectsApiUrl = properties.objectsApiProperties.objectsApi.url;
1893
+ submission.objectsApiToken = properties.objectsApiProperties.objectsApi.token;
1894
+ submission.objectTypesApiUrl = properties.objectsApiProperties.objectsTypeApi.url;
1895
+ submission.objectTypesApiToken = properties.objectsApiProperties.objectsTypeApi.token;
1896
+ submission.objectTypeName = properties.objectsApiProperties.objectType.name;
1897
+ submission.objectTypeTitle = properties.objectsApiProperties.objectType.title;
1898
+ submission.objectTypeUrl = properties.objectsApiProperties.objectType.url;
1899
+ submission.objectTypeVersion = properties.objectsApiProperties.objectType.typeVersion;
1900
+ submission.openNotificationsBaseUrl = properties.openNotificatieProperties.baseUrl;
1901
+ submission.openNotificationsClientId = properties.openNotificatieProperties.clientId;
1902
+ submission.openNotificationsSecret = properties.openNotificatieProperties.secret;
1903
+ submission.openNotificationsCallbackBaseUrl =
1904
+ properties.openNotificatieProperties.callbackBaseUrl;
1905
+ submission.applicantRoleTypeUrl = properties.aanvragerRolTypeUrl;
1906
+ submission.productAanvraagTypes = properties.typeMapping;
1907
+ submission.connectorName = this.defaultName;
1908
+ this.refreshForm({ submission: { data: submission } });
1909
+ };
1910
+ EditProductAanvragenConnectorComponent.prototype.refreshForm = function (refreshValue) {
1911
+ this.formRefresh$.next(refreshValue);
1912
+ };
1913
+ EditProductAanvragenConnectorComponent.prototype.loadDefinitions = function () {
1914
+ var _this = this;
1915
+ var documentDefinitions;
1916
+ this.documentService
1917
+ .getAllDefinitions()
1918
+ .pipe(operators.tap(function (resDocumentDefinitions) { return (documentDefinitions = resDocumentDefinitions.content); }), operators.switchMap(function (resDocumentDefinitions) { return rxjs.combineLatest(resDocumentDefinitions.content.map(function (definition) { return _this.documentService.findProcessDocumentDefinitions(definition.id.name); })); }), operators.tap(function (res) {
1919
+ var _a;
1920
+ _this.caseDefinitionOptions = documentDefinitions.map(function (documentDefinition) {
1921
+ return { label: documentDefinition.id.name, value: documentDefinition.id.name };
1922
+ });
1923
+ documentDefinitions.forEach(function (documentDefinition, index) {
1924
+ _this.processDocumentDefinitionOptions[documentDefinition.id.name] = res[index].map(function (processDocumentDefinition) { return processDocumentDefinition.id.processDefinitionKey; });
1925
+ });
1926
+ window['productRequestDefinitions'] = _this.processDocumentDefinitionOptions;
1927
+ var definitionWithCaseDefinitionOptions = _this.formMappingService.mapComponents(_this.formDefinition$.getValue(), _this.mapCaseDefinitionKeyComponent);
1928
+ _this.formDefinition$.next(definitionWithCaseDefinitionOptions);
1929
+ if ((_a = _this.properties) === null || _a === void 0 ? void 0 : _a.aanvragerRolTypeUrl) {
1930
+ _this.prefillForm();
1931
+ }
1932
+ }))
1933
+ .subscribe();
1934
+ };
1935
+ return EditProductAanvragenConnectorComponent;
1936
+ }());
1937
+ EditProductAanvragenConnectorComponent.decorators = [
1938
+ { type: i0.Component, args: [{
1939
+ selector: 'valtimo-edit-product-aanvragen-connector',
1940
+ template: "<!--\n ~ Copyright 2015-2021 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n *ngIf=\"translatedFormDefinition$ | async as definition\"\n class=\"edit-product-request\"\n [ngClass]=\"{'has-delete': showDeleteButton}\"\n>\n <valtimo-form-io\n [form]=\"definition\"\n [formRefresh$]=\"formRefresh$\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{ 'connectorManagement.remove' | translate }}\n </button>\n</div>\n",
1941
+ styles: ["/*!\n * Copyright 2015-2021 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.edit-product-request ::ng-deep .btn-wizard-nav-cancel{display:none}.edit-product-request ::ng-deep .list-inline{display:flex;flex-direction:row;justify-content:flex-end}.edit-product-request ::ng-deep .col-sm-2{flex:0 0 25%;max-width:25%}.edit-product-request ::ng-deep .edit-grid-component>label{display:none}.edit-product-request.has-delete ::ng-deep .list-inline{margin-bottom:-30px}.edit-product-request .btn-danger{position:relative}"]
1942
+ },] }
1943
+ ];
1944
+ EditProductAanvragenConnectorComponent.ctorParameters = function () { return [
1945
+ { type: form.FormTranslationService },
1946
+ { type: form.FormMappingService },
1947
+ { type: document.DocumentService },
1948
+ { type: core.TranslateService }
1949
+ ]; };
1950
+ EditProductAanvragenConnectorComponent.propDecorators = {
1951
+ properties: [{ type: i0.Input }],
1952
+ defaultName: [{ type: i0.Input }],
1953
+ showDeleteButton: [{ type: i0.Input }],
1954
+ propertiesSave: [{ type: i0.Output }],
1955
+ connectorDelete: [{ type: i0.Output }]
1938
1956
  };
1939
1957
 
1940
- /*
1941
- * Copyright 2015-2020 Ritense BV, the Netherlands.
1942
- *
1943
- * Licensed under EUPL, Version 1.2 (the "License");
1944
- * you may not use this file except in compliance with the License.
1945
- * You may obtain a copy of the License at
1946
- *
1947
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1948
- *
1949
- * Unless required by applicable law or agreed to in writing, software
1950
- * distributed under the License is distributed on an "AS IS" basis,
1951
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1952
- * See the License for the specific language governing permissions and
1953
- * limitations under the License.
1954
- */
1955
- var EditConnectorFormComponent = /** @class */ (function () {
1956
- function EditConnectorFormComponent() {
1957
- this.withDefaults = false;
1958
- this.showDeleteButton = false;
1959
- this.propertiesSave = new i0.EventEmitter();
1960
- this.connectorDelete = new i0.EventEmitter();
1961
- this.productAanvragenName = 'ProductAanvragen';
1962
- }
1963
- return EditConnectorFormComponent;
1964
- }());
1965
- EditConnectorFormComponent.decorators = [
1966
- { type: i0.Component, args: [{
1967
- selector: 'valtimo-edit-connector-form',
1968
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-edit-connector-properties\n *ngIf=\"connectorName !== productAanvragenName\"\n [properties]=\"properties\"\n [withDefaults]=\"withDefaults\"\n [defaultName]=\"defaultName\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-connector-properties>\n\n<valtimo-edit-product-aanvragen-connector\n *ngIf=\"connectorName === productAanvragenName\"\n [defaultName]=\"defaultName\"\n [properties]=\"properties\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-product-aanvragen-connector>\n",
1969
- styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
1970
- },] }
1971
- ];
1972
- EditConnectorFormComponent.propDecorators = {
1973
- properties: [{ type: i0.Input }],
1974
- withDefaults: [{ type: i0.Input }],
1975
- showDeleteButton: [{ type: i0.Input }],
1976
- defaultName: [{ type: i0.Input }],
1977
- connectorName: [{ type: i0.Input }],
1978
- propertiesSave: [{ type: i0.Output }],
1979
- connectorDelete: [{ type: i0.Output }]
1958
+ /*
1959
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1960
+ *
1961
+ * Licensed under EUPL, Version 1.2 (the "License");
1962
+ * you may not use this file except in compliance with the License.
1963
+ * You may obtain a copy of the License at
1964
+ *
1965
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1966
+ *
1967
+ * Unless required by applicable law or agreed to in writing, software
1968
+ * distributed under the License is distributed on an "AS IS" basis,
1969
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1970
+ * See the License for the specific language governing permissions and
1971
+ * limitations under the License.
1972
+ */
1973
+ var EditConnectorFormComponent = /** @class */ (function () {
1974
+ function EditConnectorFormComponent() {
1975
+ this.withDefaults = false;
1976
+ this.showDeleteButton = false;
1977
+ this.propertiesSave = new i0.EventEmitter();
1978
+ this.connectorDelete = new i0.EventEmitter();
1979
+ this.productAanvragenName = 'ProductAanvragen';
1980
+ }
1981
+ return EditConnectorFormComponent;
1982
+ }());
1983
+ EditConnectorFormComponent.decorators = [
1984
+ { type: i0.Component, args: [{
1985
+ selector: 'valtimo-edit-connector-form',
1986
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-edit-connector-properties\n *ngIf=\"connectorName !== productAanvragenName\"\n [properties]=\"properties\"\n [withDefaults]=\"withDefaults\"\n [defaultName]=\"defaultName\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-connector-properties>\n\n<valtimo-edit-product-aanvragen-connector\n *ngIf=\"connectorName === productAanvragenName\"\n [defaultName]=\"defaultName\"\n [properties]=\"properties\"\n [showDeleteButton]=\"showDeleteButton\"\n (propertiesSave)=\"propertiesSave.emit($event)\"\n (connectorDelete)=\"connectorDelete.emit()\"\n>\n</valtimo-edit-product-aanvragen-connector>\n",
1987
+ styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
1988
+ },] }
1989
+ ];
1990
+ EditConnectorFormComponent.propDecorators = {
1991
+ properties: [{ type: i0.Input }],
1992
+ withDefaults: [{ type: i0.Input }],
1993
+ showDeleteButton: [{ type: i0.Input }],
1994
+ defaultName: [{ type: i0.Input }],
1995
+ connectorName: [{ type: i0.Input }],
1996
+ propertiesSave: [{ type: i0.Output }],
1997
+ connectorDelete: [{ type: i0.Output }]
1980
1998
  };
1981
1999
 
1982
- /*
1983
- * Copyright 2015-2020 Ritense BV, the Netherlands.
1984
- *
1985
- * Licensed under EUPL, Version 1.2 (the "License");
1986
- * you may not use this file except in compliance with the License.
1987
- * You may obtain a copy of the License at
1988
- *
1989
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1990
- *
1991
- * Unless required by applicable law or agreed to in writing, software
1992
- * distributed under the License is distributed on an "AS IS" basis,
1993
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1994
- * See the License for the specific language governing permissions and
1995
- * limitations under the License.
1996
- */
1997
- var ConnectorManagementModule = /** @class */ (function () {
1998
- function ConnectorManagementModule() {
1999
- }
2000
- return ConnectorManagementModule;
2001
- }());
2002
- ConnectorManagementModule.decorators = [
2003
- { type: i0.NgModule, args: [{
2004
- providers: [ConnectorManagementStateService],
2005
- declarations: [
2006
- ConnectorManagementComponent,
2007
- AddConnectorComponent,
2008
- ConnectorModalComponent,
2009
- ModifyConnectorComponent,
2010
- EditConnectorPropertiesComponent,
2011
- MultiValueConnectorPropertyComponent,
2012
- ConnectorLinkExtensionComponent,
2013
- ConnectorLinkExtensionModalComponent,
2014
- EditProductAanvragenConnectorComponent,
2015
- EditConnectorFormComponent,
2016
- ],
2017
- imports: [
2018
- common.CommonModule,
2019
- ConnectorManagementRoutingModule,
2020
- core.TranslateModule,
2021
- components.WidgetModule,
2022
- components.ListModule,
2023
- components.SpinnerModule,
2024
- components.ModalModule,
2025
- components.FormIoModule,
2026
- ],
2027
- exports: [
2028
- ConnectorManagementComponent,
2029
- AddConnectorComponent,
2030
- ConnectorModalComponent,
2031
- ModifyConnectorComponent,
2032
- EditConnectorPropertiesComponent,
2033
- MultiValueConnectorPropertyComponent,
2034
- ConnectorLinkExtensionComponent,
2035
- ConnectorLinkExtensionModalComponent,
2036
- EditProductAanvragenConnectorComponent,
2037
- ],
2038
- entryComponents: [ConnectorLinkExtensionComponent],
2039
- },] }
2000
+ /*
2001
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
2002
+ *
2003
+ * Licensed under EUPL, Version 1.2 (the "License");
2004
+ * you may not use this file except in compliance with the License.
2005
+ * You may obtain a copy of the License at
2006
+ *
2007
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2008
+ *
2009
+ * Unless required by applicable law or agreed to in writing, software
2010
+ * distributed under the License is distributed on an "AS IS" basis,
2011
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2012
+ * See the License for the specific language governing permissions and
2013
+ * limitations under the License.
2014
+ */
2015
+ var ConnectorManagementModule = /** @class */ (function () {
2016
+ function ConnectorManagementModule() {
2017
+ }
2018
+ return ConnectorManagementModule;
2019
+ }());
2020
+ ConnectorManagementModule.decorators = [
2021
+ { type: i0.NgModule, args: [{
2022
+ providers: [ConnectorManagementStateService],
2023
+ declarations: [
2024
+ ConnectorManagementComponent,
2025
+ AddConnectorComponent,
2026
+ ConnectorModalComponent,
2027
+ ModifyConnectorComponent,
2028
+ EditConnectorPropertiesComponent,
2029
+ MultiValueConnectorPropertyComponent,
2030
+ ConnectorLinkExtensionComponent,
2031
+ ConnectorLinkExtensionModalComponent,
2032
+ EditProductAanvragenConnectorComponent,
2033
+ EditConnectorFormComponent,
2034
+ ],
2035
+ imports: [
2036
+ common.CommonModule,
2037
+ ConnectorManagementRoutingModule,
2038
+ core.TranslateModule,
2039
+ components.WidgetModule,
2040
+ components.ListModule,
2041
+ components.SpinnerModule,
2042
+ components.ModalModule,
2043
+ components.FormIoModule,
2044
+ ],
2045
+ exports: [
2046
+ ConnectorManagementComponent,
2047
+ AddConnectorComponent,
2048
+ ConnectorModalComponent,
2049
+ ModifyConnectorComponent,
2050
+ EditConnectorPropertiesComponent,
2051
+ MultiValueConnectorPropertyComponent,
2052
+ ConnectorLinkExtensionComponent,
2053
+ ConnectorLinkExtensionModalComponent,
2054
+ EditProductAanvragenConnectorComponent,
2055
+ ],
2056
+ entryComponents: [ConnectorLinkExtensionComponent],
2057
+ },] }
2040
2058
  ];
2041
2059
 
2042
- /*
2043
- * Copyright 2015-2020 Ritense BV, the Netherlands.
2044
- *
2045
- * Licensed under EUPL, Version 1.2 (the "License");
2046
- * you may not use this file except in compliance with the License.
2047
- * You may obtain a copy of the License at
2048
- *
2049
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2050
- *
2051
- * Unless required by applicable law or agreed to in writing, software
2052
- * distributed under the License is distributed on an "AS IS" basis,
2053
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2054
- * See the License for the specific language governing permissions and
2055
- * limitations under the License.
2056
- */
2057
- function connectorLinkExtensionInitializer(injector) {
2058
- var configService = injector.get(i2.ConfigService);
2059
- var logger = injector.get(ngxLogger.NGXLogger);
2060
- return function () {
2061
- return new Promise(function (resolve, reject) {
2062
- try {
2063
- logger.debug('connector link extension initializer before init');
2064
- var extension = new contract.Extension('ConnectorLink', new contract.BasicExtensionPoint('dossier-management', 'dossier', 'right-panel', ConnectorLinkExtensionComponent));
2065
- configService.addExtension(extension);
2066
- logger.debug('connector link extension initializer after init');
2067
- resolve();
2068
- }
2069
- catch (error) {
2070
- logger.debug('connector link extension initializer error', error);
2071
- reject(error);
2072
- }
2073
- });
2074
- };
2060
+ /*
2061
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
2062
+ *
2063
+ * Licensed under EUPL, Version 1.2 (the "License");
2064
+ * you may not use this file except in compliance with the License.
2065
+ * You may obtain a copy of the License at
2066
+ *
2067
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2068
+ *
2069
+ * Unless required by applicable law or agreed to in writing, software
2070
+ * distributed under the License is distributed on an "AS IS" basis,
2071
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2072
+ * See the License for the specific language governing permissions and
2073
+ * limitations under the License.
2074
+ */
2075
+ function connectorLinkExtensionInitializer(injector) {
2076
+ var configService = injector.get(i2.ConfigService);
2077
+ var logger = injector.get(ngxLogger.NGXLogger);
2078
+ return function () {
2079
+ return new Promise(function (resolve, reject) {
2080
+ try {
2081
+ logger.debug('connector link extension initializer before init');
2082
+ var extension = new i2.Extension('ConnectorLink', new i2.BasicExtensionPoint('dossier-management', 'dossier', 'right-panel', ConnectorLinkExtensionComponent));
2083
+ configService.addExtension(extension);
2084
+ logger.debug('connector link extension initializer after init');
2085
+ resolve();
2086
+ }
2087
+ catch (error) {
2088
+ logger.debug('connector link extension initializer error', error);
2089
+ reject(error);
2090
+ }
2091
+ });
2092
+ };
2075
2093
  }
2076
2094
 
2077
- /*
2078
- * Copyright 2015-2020 Ritense BV, the Netherlands.
2079
- *
2080
- * Licensed under EUPL, Version 1.2 (the "License");
2081
- * you may not use this file except in compliance with the License.
2082
- * You may obtain a copy of the License at
2083
- *
2084
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2085
- *
2086
- * Unless required by applicable law or agreed to in writing, software
2087
- * distributed under the License is distributed on an "AS IS" basis,
2088
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2089
- * See the License for the specific language governing permissions and
2090
- * limitations under the License.
2095
+ /*
2096
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
2097
+ *
2098
+ * Licensed under EUPL, Version 1.2 (the "License");
2099
+ * you may not use this file except in compliance with the License.
2100
+ * You may obtain a copy of the License at
2101
+ *
2102
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2103
+ *
2104
+ * Unless required by applicable law or agreed to in writing, software
2105
+ * distributed under the License is distributed on an "AS IS" basis,
2106
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2107
+ * See the License for the specific language governing permissions and
2108
+ * limitations under the License.
2091
2109
  */
2092
2110
 
2093
- /**
2094
- * Generated bundle index. Do not edit.
2111
+ /**
2112
+ * Generated bundle index. Do not edit.
2095
2113
  */
2096
2114
 
2097
2115
  exports.AddConnectorComponent = AddConnectorComponent;