@valtimo/connector-management 4.15.2-next-main.8

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