@valtimo/connector-management 4.15.2-next-main.14 → 4.15.3-next-main.15

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 (41) hide show
  1. package/bundles/valtimo-connector-management.umd.js +1997 -1997
  2. package/esm2015/lib/components/add-connector/add-connector.component.js +78 -78
  3. package/esm2015/lib/components/connector-link-extension/connector-link-extension.component.js +94 -94
  4. package/esm2015/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.js +135 -135
  5. package/esm2015/lib/components/connector-management/connector-management.component.js +94 -94
  6. package/esm2015/lib/components/connector-modal/connector-modal.component.js +57 -57
  7. package/esm2015/lib/components/edit-connector-form/edit-connector-form.component.js +41 -41
  8. package/esm2015/lib/components/edit-connector-properties/edit-connector-properties.component.js +139 -139
  9. package/esm2015/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.js +149 -149
  10. package/esm2015/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.js +499 -499
  11. package/esm2015/lib/components/modify-connector/modify-connector.component.js +72 -72
  12. package/esm2015/lib/components/multi-value-connector-property/multi-value-connector-property.component.js +91 -91
  13. package/esm2015/lib/connector-management-routing.js +43 -43
  14. package/esm2015/lib/connector-management.module.js +75 -75
  15. package/esm2015/lib/extension/connector-management.extension.init.js +38 -38
  16. package/esm2015/lib/services/connector-management/connector-management.service.js +59 -59
  17. package/esm2015/lib/services/connector-management-state/connector-management-state.service.js +82 -82
  18. package/esm2015/lib/services/object-api-sync/object-api-sync.service.js +50 -50
  19. package/esm2015/public-api.js +31 -31
  20. package/esm2015/valtimo-connector-management.js +7 -7
  21. package/fesm2015/valtimo-connector-management.js +1693 -1693
  22. package/lib/components/add-connector/add-connector.component.d.ts +26 -26
  23. package/lib/components/connector-link-extension/connector-link-extension.component.d.ts +25 -25
  24. package/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.d.ts +40 -40
  25. package/lib/components/connector-management/connector-management.component.d.ts +28 -28
  26. package/lib/components/connector-modal/connector-modal.component.d.ts +16 -16
  27. package/lib/components/edit-connector-form/edit-connector-form.component.d.ts +15 -15
  28. package/lib/components/edit-connector-properties/edit-connector-properties.component.d.ts +35 -35
  29. package/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.d.ts +45 -45
  30. package/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.d.ts +225 -225
  31. package/lib/components/modify-connector/modify-connector.component.d.ts +19 -19
  32. package/lib/components/multi-value-connector-property/multi-value-connector-property.component.d.ts +26 -26
  33. package/lib/connector-management-routing.d.ts +2 -2
  34. package/lib/connector-management.module.d.ts +2 -2
  35. package/lib/extension/connector-management.extension.init.d.ts +2 -2
  36. package/lib/services/connector-management/connector-management.service.d.ts +17 -17
  37. package/lib/services/connector-management-state/connector-management-state.service.d.ts +26 -26
  38. package/lib/services/object-api-sync/object-api-sync.service.d.ts +14 -14
  39. package/package.json +1 -1
  40. package/public-api.d.ts +13 -13
  41. package/valtimo-connector-management.d.ts +7 -7
@@ -4,2041 +4,2041 @@
4
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
5
  }(this, (function (exports, i0, router, common, security, contract, rxjs, operators, core, i1, i2, components, lodash, form, document, ngxLogger) { 'use strict';
6
6
 
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
- var extendStatics = function (d, b) {
23
- extendStatics = Object.setPrototypeOf ||
24
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25
- function (d, b) { for (var p in b)
26
- if (Object.prototype.hasOwnProperty.call(b, p))
27
- d[p] = b[p]; };
28
- return extendStatics(d, b);
29
- };
30
- function __extends(d, b) {
31
- 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;
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
306
  }
307
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 }
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
361
  ]; };
362
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
- },] }
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
466
  ];
467
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 }
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
555
  ]; };
556
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
- },] }
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
595
  ];
596
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 }
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
641
  ]; };
642
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',] }]
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
765
  };
766
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 }
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
840
  ]; };
841
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 }
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
910
  ]; };
911
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 }]
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
967
  };
968
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 }]
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
1094
  };
1095
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 card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{obs.syncConfig.title}}\n </div>\n <div class=\"controls\">\n <button 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 class=\"card-body\">\n <div class=\"setting-row\">\n Automatisch zaakdetails synchroniseren\n <div class=\"controls\">\n <div class=\"switch-button switch-button-success\">\n <input 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 </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<valtimo-connector-link-extension-modal></valtimo-connector-link-extension-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"openModal()\" [disabled]=\"disabled$ | async\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp;\n {{'connectorManagement.extension.buttonText' | translate}}\n </button>\n </div>\n</ng-template>\n",
1160
- styles: [".card-header,.setting-row{flex-direction:row;justify-content:space-between}.card-header,.controls,.setting-row{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 }
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 card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{obs.syncConfig.title}}\n </div>\n <div class=\"controls\">\n <button 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 class=\"card-body\">\n <div class=\"setting-row\">\n Automatisch zaakdetails synchroniseren\n <div class=\"controls\">\n <div class=\"switch-button switch-button-success\">\n <input 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 </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<valtimo-connector-link-extension-modal></valtimo-connector-link-extension-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"openModal()\" [disabled]=\"disabled$ | async\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp;\n {{'connectorManagement.extension.buttonText' | translate}}\n </button>\n </div>\n</ng-template>\n",
1160
+ styles: [".card-header,.setting-row{flex-direction:row;justify-content:space-between}.card-header,.controls,.setting-row{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
1170
  ]; };
1171
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 }]
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
1252
  };
1253
1253
 
1254
- var ɵ0$1 = {
1255
- 'custom': 'values = window[\'productRequestDefinitions\'][row.caseDefinitionKey] || []'
1256
- };
1257
- var editProductAanvragenConnectorForm = {
1258
- display: 'wizard',
1259
- settings: {
1260
- pdf: {
1261
- id: '1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
1262
- src: 'https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0'
1263
- }
1264
- },
1265
- components: [
1266
- {
1267
- title: 'connectorForm.productaanvraag.step0.title',
1268
- breadcrumbClickable: true,
1269
- buttonSettings: {
1270
- previous: true,
1271
- cancel: true,
1272
- next: true
1273
- },
1274
- navigateOnEnter: false,
1275
- saveOnEnter: false,
1276
- scrollToTop: false,
1277
- collapsible: false,
1278
- key: 'page0',
1279
- type: 'panel',
1280
- label: 'Page 0',
1281
- input: false,
1282
- tableView: false,
1283
- components: [
1284
- {
1285
- label: 'HTML',
1286
- attrs: [
1287
- {
1288
- attr: '',
1289
- value: ''
1290
- }
1291
- ],
1292
- content: 'connectorForm.productaanvraag.step0.tip',
1293
- refreshOnChange: false,
1294
- key: 'html4',
1295
- type: 'htmlelement',
1296
- input: false,
1297
- tableView: false
1298
- },
1299
- {
1300
- key: 'productAanvraagTypes',
1301
- type: 'editgrid',
1302
- input: true,
1303
- validate: {
1304
- minLength: 1,
1305
- },
1306
- customClass: 'edit-grid-component',
1307
- components: [
1308
- {
1309
- label: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.label',
1310
- tooltip: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.tooltip',
1311
- tableView: true,
1312
- validate: {
1313
- required: true
1314
- },
1315
- key: 'productAanvraagType',
1316
- type: 'textfield',
1317
- input: true,
1318
- },
1319
- {
1320
- label: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.label',
1321
- widget: 'choicesjs',
1322
- placeholder: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.placeholder',
1323
- tableView: true,
1324
- validate: {
1325
- required: true
1326
- },
1327
- key: 'caseDefinitionKey',
1328
- type: 'select',
1329
- input: true
1330
- },
1331
- {
1332
- label: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.label',
1333
- widget: 'choicesjs',
1334
- tableView: true,
1335
- dataSrc: 'custom',
1336
- data: ɵ0$1,
1337
- dataType: 'string',
1338
- refreshOn: 'row.caseDefinitionKey',
1339
- clearOnRefresh: true,
1340
- key: 'processDefinitionKey',
1341
- type: 'select',
1342
- input: true,
1343
- validate: {
1344
- required: true
1345
- },
1346
- placeholder: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.placeholder',
1347
- }
1348
- ]
1349
- }
1350
- ]
1351
- },
1352
- {
1353
- title: 'connectorForm.productaanvraag.step1.title',
1354
- breadcrumbClickable: true,
1355
- buttonSettings: {
1356
- previous: true,
1357
- cancel: true,
1358
- next: true
1359
- },
1360
- navigateOnEnter: false,
1361
- saveOnEnter: false,
1362
- scrollToTop: false,
1363
- collapsible: false,
1364
- key: 'page1',
1365
- type: 'panel',
1366
- label: 'Page 1',
1367
- input: false,
1368
- tableView: false,
1369
- components: [
1370
- {
1371
- label: 'HTML',
1372
- attrs: [
1373
- {
1374
- attr: '',
1375
- value: ''
1376
- }
1377
- ],
1378
- content: 'connectorForm.productaanvraag.step1.tip',
1379
- refreshOnChange: false,
1380
- key: 'html',
1381
- type: 'htmlelement',
1382
- input: false,
1383
- tableView: false
1384
- },
1385
- {
1386
- title: 'connectorForm.productaanvraag.step1.objectsApi.panelTitle',
1387
- collapsible: false,
1388
- key: 'connectorFormProductaanvraagStep1ObjectsApiPanelTitle',
1389
- type: 'panel',
1390
- label: 'Panel',
1391
- input: false,
1392
- tableView: false,
1393
- components: [
1394
- {
1395
- label: 'connectorForm.productaanvraag.step1.objectsApi.url.label',
1396
- tooltip: 'connectorForm.productaanvraag.step1.objectsApi.url.tooltip',
1397
- tableView: true,
1398
- validate: {
1399
- required: true
1400
- },
1401
- key: 'objectsApiUrl',
1402
- type: 'textfield',
1403
- input: true
1404
- },
1405
- {
1406
- label: 'connectorForm.productaanvraag.step1.objectsApi.token.label',
1407
- tooltip: 'connectorForm.productaanvraag.step1.objectsApi.token.tooltip',
1408
- tableView: true,
1409
- validate: {
1410
- required: true
1411
- },
1412
- key: 'objectsApiToken',
1413
- type: 'textfield',
1414
- input: true
1415
- }
1416
- ]
1417
- },
1418
- {
1419
- title: 'connectorForm.productaanvraag.step1.objectTypesApi.panelTitle',
1420
- collapsible: false,
1421
- key: 'connectorFormProductaanvraagStep1ObjectTypesApiPanelTitle',
1422
- type: 'panel',
1423
- label: 'Panel',
1424
- input: false,
1425
- tableView: false,
1426
- components: [
1427
- {
1428
- label: 'connectorForm.productaanvraag.step1.objectTypesApi.url.label',
1429
- tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.url.tooltip',
1430
- tableView: true,
1431
- validate: {
1432
- required: true
1433
- },
1434
- key: 'objectTypesApiUrl',
1435
- type: 'textfield',
1436
- input: true
1437
- },
1438
- {
1439
- label: 'connectorForm.productaanvraag.step1.objectTypesApi.token.label',
1440
- tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.token.tooltip',
1441
- tableView: true,
1442
- validate: {
1443
- required: true
1444
- },
1445
- key: 'objectTypesApiToken',
1446
- type: 'textfield',
1447
- input: true
1448
- }
1449
- ]
1450
- }
1451
- ]
1452
- },
1453
- {
1454
- title: 'connectorForm.productaanvraag.step2.title',
1455
- breadcrumbClickable: true,
1456
- buttonSettings: {
1457
- previous: true,
1458
- cancel: true,
1459
- next: true
1460
- },
1461
- navigateOnEnter: false,
1462
- saveOnEnter: false,
1463
- scrollToTop: false,
1464
- collapsible: false,
1465
- key: 'page2',
1466
- type: 'panel',
1467
- label: 'Page 2',
1468
- input: false,
1469
- tableView: false,
1470
- components: [
1471
- {
1472
- label: 'HTML',
1473
- attrs: [
1474
- {
1475
- attr: '',
1476
- value: ''
1477
- }
1478
- ],
1479
- content: 'connectorForm.productaanvraag.step2.tip',
1480
- refreshOnChange: false,
1481
- key: 'html2',
1482
- type: 'htmlelement',
1483
- input: false,
1484
- tableView: false
1485
- },
1486
- {
1487
- title: 'connectorForm.productaanvraag.step2.objectType.panelTitle',
1488
- collapsible: false,
1489
- key: 'connectorFormProductaanvraagStep2ObjectTypePanelTitle',
1490
- type: 'panel',
1491
- label: 'Panel',
1492
- input: false,
1493
- tableView: false,
1494
- components: [
1495
- {
1496
- label: 'connectorForm.productaanvraag.step2.objectType.name.label',
1497
- tooltip: 'connectorForm.productaanvraag.step2.objectType.name.tooltip',
1498
- tableView: true,
1499
- validate: {
1500
- required: true
1501
- },
1502
- key: 'objectTypeName',
1503
- type: 'textfield',
1504
- input: true
1505
- },
1506
- {
1507
- label: 'connectorForm.productaanvraag.step2.objectType.title.label',
1508
- tooltip: 'connectorForm.productaanvraag.step2.objectType.title.tooltip',
1509
- tableView: true,
1510
- validate: {
1511
- required: true
1512
- },
1513
- key: 'objectTypeTitle',
1514
- type: 'textfield',
1515
- input: true
1516
- },
1517
- {
1518
- label: 'connectorForm.productaanvraag.step2.objectType.url.label',
1519
- tooltip: 'connectorForm.productaanvraag.step2.objectType.url.tooltip',
1520
- tableView: true,
1521
- validate: {
1522
- required: true
1523
- },
1524
- key: 'objectTypeUrl',
1525
- type: 'textfield',
1526
- input: true
1527
- },
1528
- {
1529
- label: 'connectorForm.productaanvraag.step2.objectType.typeVersion.label',
1530
- tooltip: 'connectorForm.productaanvraag.step2.objectType.typeVersion.tooltip',
1531
- tableView: true,
1532
- validate: {
1533
- required: true
1534
- },
1535
- key: 'objectTypeVersion',
1536
- type: 'textfield',
1537
- input: true
1538
- }
1539
- ]
1540
- }
1541
- ]
1542
- },
1543
- {
1544
- title: 'connectorForm.productaanvraag.step3.title',
1545
- breadcrumbClickable: true,
1546
- buttonSettings: {
1547
- previous: true,
1548
- cancel: true,
1549
- next: true
1550
- },
1551
- navigateOnEnter: false,
1552
- saveOnEnter: false,
1553
- scrollToTop: false,
1554
- collapsible: false,
1555
- key: 'page3',
1556
- type: 'panel',
1557
- label: 'Page 3',
1558
- input: false,
1559
- tableView: false,
1560
- components: [
1561
- {
1562
- label: 'HTML',
1563
- attrs: [
1564
- {
1565
- attr: '',
1566
- value: ''
1567
- }
1568
- ],
1569
- content: 'connectorForm.productaanvraag.step3.tip',
1570
- refreshOnChange: false,
1571
- key: 'html1',
1572
- type: 'htmlelement',
1573
- input: false,
1574
- tableView: false
1575
- },
1576
- {
1577
- title: 'connectorForm.productaanvraag.step3.openNotifications.panelTitle',
1578
- collapsible: false,
1579
- key: 'connectorFormProductaanvraagStep3OpenNotificationsPanelTitle',
1580
- type: 'panel',
1581
- label: 'Panel',
1582
- input: false,
1583
- tableView: false,
1584
- components: [
1585
- {
1586
- label: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.label',
1587
- tooltip: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.tooltip',
1588
- tableView: true,
1589
- validate: {
1590
- required: true
1591
- },
1592
- key: 'openNotificationsBaseUrl',
1593
- type: 'textfield',
1594
- input: true
1595
- },
1596
- {
1597
- label: 'connectorForm.productaanvraag.step3.openNotifications.clientId.label',
1598
- tooltip: 'connectorForm.productaanvraag.step3.openNotifications.clientId.tooltip',
1599
- tableView: true,
1600
- validate: {
1601
- required: true
1602
- },
1603
- key: 'openNotificationsClientId',
1604
- type: 'textfield',
1605
- input: true
1606
- },
1607
- {
1608
- label: 'connectorForm.productaanvraag.step3.openNotifications.secret.label',
1609
- tooltip: 'connectorForm.productaanvraag.step3.openNotifications.secret.tooltip',
1610
- tableView: true,
1611
- validate: {
1612
- required: true
1613
- },
1614
- key: 'openNotificationsSecret',
1615
- type: 'textfield',
1616
- input: true
1617
- },
1618
- {
1619
- label: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.label',
1620
- tooltip: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.tooltip',
1621
- tableView: true,
1622
- validate: {
1623
- required: true
1624
- },
1625
- key: 'openNotificationsCallbackBaseUrl',
1626
- type: 'textfield',
1627
- input: true
1628
- }
1629
- ]
1630
- }
1631
- ]
1632
- },
1633
- {
1634
- title: 'connectorForm.productaanvraag.step4.title',
1635
- breadcrumbClickable: true,
1636
- buttonSettings: {
1637
- previous: true,
1638
- cancel: true,
1639
- next: true
1640
- },
1641
- navigateOnEnter: false,
1642
- saveOnEnter: false,
1643
- scrollToTop: false,
1644
- collapsible: false,
1645
- key: 'page4',
1646
- type: 'panel',
1647
- label: 'Page 4',
1648
- input: false,
1649
- tableView: false,
1650
- components: [
1651
- {
1652
- label: 'HTML',
1653
- attrs: [
1654
- {
1655
- attr: '',
1656
- value: ''
1657
- }
1658
- ],
1659
- content: 'connectorForm.productaanvraag.step4.tip',
1660
- refreshOnChange: false,
1661
- key: 'html3',
1662
- type: 'htmlelement',
1663
- input: false,
1664
- tableView: false
1665
- },
1666
- {
1667
- title: 'connectorForm.productaanvraag.step4.applicant.panelTitle',
1668
- collapsible: false,
1669
- key: 'connectorFormProductaanvraagStep4ApplicantPanelTitle',
1670
- type: 'panel',
1671
- label: 'Panel',
1672
- input: false,
1673
- tableView: false,
1674
- components: [
1675
- {
1676
- label: 'HTML',
1677
- attrs: [
1678
- {
1679
- attr: '',
1680
- value: ''
1681
- }
1682
- ],
1683
- content: 'connectorForm.productaanvraag.step4.applicant.tip',
1684
- refreshOnChange: false,
1685
- key: 'html5',
1686
- type: 'htmlelement',
1687
- input: false,
1688
- tableView: false
1689
- },
1690
- {
1691
- label: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.label',
1692
- tooltip: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.tooltip',
1693
- tableView: true,
1694
- validate: {
1695
- required: true
1696
- },
1697
- key: 'applicantRoleTypeUrl',
1698
- type: 'textfield',
1699
- input: true
1700
- }
1701
- ]
1702
- }
1703
- ]
1704
- },
1705
- {
1706
- title: 'connectorForm.productaanvraag.step5.title',
1707
- breadcrumbClickable: true,
1708
- buttonSettings: {
1709
- previous: true,
1710
- cancel: true,
1711
- next: true
1712
- },
1713
- navigateOnEnter: false,
1714
- saveOnEnter: false,
1715
- scrollToTop: false,
1716
- collapsible: false,
1717
- key: 'page6',
1718
- type: 'panel',
1719
- label: 'Page 5',
1720
- input: false,
1721
- tableView: false,
1722
- components: [
1723
- {
1724
- label: 'HTML',
1725
- attrs: [
1726
- {
1727
- attr: '',
1728
- value: ''
1729
- }
1730
- ],
1731
- content: 'connectorForm.productaanvraag.step5.tip',
1732
- refreshOnChange: false,
1733
- key: 'html6',
1734
- type: 'htmlelement',
1735
- input: false,
1736
- tableView: false
1737
- },
1738
- {
1739
- label: 'connectorForm.productaanvraag.step5.name',
1740
- tableView: true,
1741
- validate: {
1742
- required: true
1743
- },
1744
- key: 'connectorName',
1745
- type: 'textfield',
1746
- input: true
1747
- }
1748
- ]
1749
- }
1750
- ]
1254
+ var ɵ0$1 = {
1255
+ 'custom': 'values = window[\'productRequestDefinitions\'][row.caseDefinitionKey] || []'
1256
+ };
1257
+ var editProductAanvragenConnectorForm = {
1258
+ display: 'wizard',
1259
+ settings: {
1260
+ pdf: {
1261
+ id: '1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
1262
+ src: 'https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0'
1263
+ }
1264
+ },
1265
+ components: [
1266
+ {
1267
+ title: 'connectorForm.productaanvraag.step0.title',
1268
+ breadcrumbClickable: true,
1269
+ buttonSettings: {
1270
+ previous: true,
1271
+ cancel: true,
1272
+ next: true
1273
+ },
1274
+ navigateOnEnter: false,
1275
+ saveOnEnter: false,
1276
+ scrollToTop: false,
1277
+ collapsible: false,
1278
+ key: 'page0',
1279
+ type: 'panel',
1280
+ label: 'Page 0',
1281
+ input: false,
1282
+ tableView: false,
1283
+ components: [
1284
+ {
1285
+ label: 'HTML',
1286
+ attrs: [
1287
+ {
1288
+ attr: '',
1289
+ value: ''
1290
+ }
1291
+ ],
1292
+ content: 'connectorForm.productaanvraag.step0.tip',
1293
+ refreshOnChange: false,
1294
+ key: 'html4',
1295
+ type: 'htmlelement',
1296
+ input: false,
1297
+ tableView: false
1298
+ },
1299
+ {
1300
+ key: 'productAanvraagTypes',
1301
+ type: 'editgrid',
1302
+ input: true,
1303
+ validate: {
1304
+ minLength: 1,
1305
+ },
1306
+ customClass: 'edit-grid-component',
1307
+ components: [
1308
+ {
1309
+ label: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.label',
1310
+ tooltip: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.tooltip',
1311
+ tableView: true,
1312
+ validate: {
1313
+ required: true
1314
+ },
1315
+ key: 'productAanvraagType',
1316
+ type: 'textfield',
1317
+ input: true,
1318
+ },
1319
+ {
1320
+ label: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.label',
1321
+ widget: 'choicesjs',
1322
+ placeholder: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.placeholder',
1323
+ tableView: true,
1324
+ validate: {
1325
+ required: true
1326
+ },
1327
+ key: 'caseDefinitionKey',
1328
+ type: 'select',
1329
+ input: true
1330
+ },
1331
+ {
1332
+ label: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.label',
1333
+ widget: 'choicesjs',
1334
+ tableView: true,
1335
+ dataSrc: 'custom',
1336
+ data: ɵ0$1,
1337
+ dataType: 'string',
1338
+ refreshOn: 'row.caseDefinitionKey',
1339
+ clearOnRefresh: true,
1340
+ key: 'processDefinitionKey',
1341
+ type: 'select',
1342
+ input: true,
1343
+ validate: {
1344
+ required: true
1345
+ },
1346
+ placeholder: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.placeholder',
1347
+ }
1348
+ ]
1349
+ }
1350
+ ]
1351
+ },
1352
+ {
1353
+ title: 'connectorForm.productaanvraag.step1.title',
1354
+ breadcrumbClickable: true,
1355
+ buttonSettings: {
1356
+ previous: true,
1357
+ cancel: true,
1358
+ next: true
1359
+ },
1360
+ navigateOnEnter: false,
1361
+ saveOnEnter: false,
1362
+ scrollToTop: false,
1363
+ collapsible: false,
1364
+ key: 'page1',
1365
+ type: 'panel',
1366
+ label: 'Page 1',
1367
+ input: false,
1368
+ tableView: false,
1369
+ components: [
1370
+ {
1371
+ label: 'HTML',
1372
+ attrs: [
1373
+ {
1374
+ attr: '',
1375
+ value: ''
1376
+ }
1377
+ ],
1378
+ content: 'connectorForm.productaanvraag.step1.tip',
1379
+ refreshOnChange: false,
1380
+ key: 'html',
1381
+ type: 'htmlelement',
1382
+ input: false,
1383
+ tableView: false
1384
+ },
1385
+ {
1386
+ title: 'connectorForm.productaanvraag.step1.objectsApi.panelTitle',
1387
+ collapsible: false,
1388
+ key: 'connectorFormProductaanvraagStep1ObjectsApiPanelTitle',
1389
+ type: 'panel',
1390
+ label: 'Panel',
1391
+ input: false,
1392
+ tableView: false,
1393
+ components: [
1394
+ {
1395
+ label: 'connectorForm.productaanvraag.step1.objectsApi.url.label',
1396
+ tooltip: 'connectorForm.productaanvraag.step1.objectsApi.url.tooltip',
1397
+ tableView: true,
1398
+ validate: {
1399
+ required: true
1400
+ },
1401
+ key: 'objectsApiUrl',
1402
+ type: 'textfield',
1403
+ input: true
1404
+ },
1405
+ {
1406
+ label: 'connectorForm.productaanvraag.step1.objectsApi.token.label',
1407
+ tooltip: 'connectorForm.productaanvraag.step1.objectsApi.token.tooltip',
1408
+ tableView: true,
1409
+ validate: {
1410
+ required: true
1411
+ },
1412
+ key: 'objectsApiToken',
1413
+ type: 'textfield',
1414
+ input: true
1415
+ }
1416
+ ]
1417
+ },
1418
+ {
1419
+ title: 'connectorForm.productaanvraag.step1.objectTypesApi.panelTitle',
1420
+ collapsible: false,
1421
+ key: 'connectorFormProductaanvraagStep1ObjectTypesApiPanelTitle',
1422
+ type: 'panel',
1423
+ label: 'Panel',
1424
+ input: false,
1425
+ tableView: false,
1426
+ components: [
1427
+ {
1428
+ label: 'connectorForm.productaanvraag.step1.objectTypesApi.url.label',
1429
+ tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.url.tooltip',
1430
+ tableView: true,
1431
+ validate: {
1432
+ required: true
1433
+ },
1434
+ key: 'objectTypesApiUrl',
1435
+ type: 'textfield',
1436
+ input: true
1437
+ },
1438
+ {
1439
+ label: 'connectorForm.productaanvraag.step1.objectTypesApi.token.label',
1440
+ tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.token.tooltip',
1441
+ tableView: true,
1442
+ validate: {
1443
+ required: true
1444
+ },
1445
+ key: 'objectTypesApiToken',
1446
+ type: 'textfield',
1447
+ input: true
1448
+ }
1449
+ ]
1450
+ }
1451
+ ]
1452
+ },
1453
+ {
1454
+ title: 'connectorForm.productaanvraag.step2.title',
1455
+ breadcrumbClickable: true,
1456
+ buttonSettings: {
1457
+ previous: true,
1458
+ cancel: true,
1459
+ next: true
1460
+ },
1461
+ navigateOnEnter: false,
1462
+ saveOnEnter: false,
1463
+ scrollToTop: false,
1464
+ collapsible: false,
1465
+ key: 'page2',
1466
+ type: 'panel',
1467
+ label: 'Page 2',
1468
+ input: false,
1469
+ tableView: false,
1470
+ components: [
1471
+ {
1472
+ label: 'HTML',
1473
+ attrs: [
1474
+ {
1475
+ attr: '',
1476
+ value: ''
1477
+ }
1478
+ ],
1479
+ content: 'connectorForm.productaanvraag.step2.tip',
1480
+ refreshOnChange: false,
1481
+ key: 'html2',
1482
+ type: 'htmlelement',
1483
+ input: false,
1484
+ tableView: false
1485
+ },
1486
+ {
1487
+ title: 'connectorForm.productaanvraag.step2.objectType.panelTitle',
1488
+ collapsible: false,
1489
+ key: 'connectorFormProductaanvraagStep2ObjectTypePanelTitle',
1490
+ type: 'panel',
1491
+ label: 'Panel',
1492
+ input: false,
1493
+ tableView: false,
1494
+ components: [
1495
+ {
1496
+ label: 'connectorForm.productaanvraag.step2.objectType.name.label',
1497
+ tooltip: 'connectorForm.productaanvraag.step2.objectType.name.tooltip',
1498
+ tableView: true,
1499
+ validate: {
1500
+ required: true
1501
+ },
1502
+ key: 'objectTypeName',
1503
+ type: 'textfield',
1504
+ input: true
1505
+ },
1506
+ {
1507
+ label: 'connectorForm.productaanvraag.step2.objectType.title.label',
1508
+ tooltip: 'connectorForm.productaanvraag.step2.objectType.title.tooltip',
1509
+ tableView: true,
1510
+ validate: {
1511
+ required: true
1512
+ },
1513
+ key: 'objectTypeTitle',
1514
+ type: 'textfield',
1515
+ input: true
1516
+ },
1517
+ {
1518
+ label: 'connectorForm.productaanvraag.step2.objectType.url.label',
1519
+ tooltip: 'connectorForm.productaanvraag.step2.objectType.url.tooltip',
1520
+ tableView: true,
1521
+ validate: {
1522
+ required: true
1523
+ },
1524
+ key: 'objectTypeUrl',
1525
+ type: 'textfield',
1526
+ input: true
1527
+ },
1528
+ {
1529
+ label: 'connectorForm.productaanvraag.step2.objectType.typeVersion.label',
1530
+ tooltip: 'connectorForm.productaanvraag.step2.objectType.typeVersion.tooltip',
1531
+ tableView: true,
1532
+ validate: {
1533
+ required: true
1534
+ },
1535
+ key: 'objectTypeVersion',
1536
+ type: 'textfield',
1537
+ input: true
1538
+ }
1539
+ ]
1540
+ }
1541
+ ]
1542
+ },
1543
+ {
1544
+ title: 'connectorForm.productaanvraag.step3.title',
1545
+ breadcrumbClickable: true,
1546
+ buttonSettings: {
1547
+ previous: true,
1548
+ cancel: true,
1549
+ next: true
1550
+ },
1551
+ navigateOnEnter: false,
1552
+ saveOnEnter: false,
1553
+ scrollToTop: false,
1554
+ collapsible: false,
1555
+ key: 'page3',
1556
+ type: 'panel',
1557
+ label: 'Page 3',
1558
+ input: false,
1559
+ tableView: false,
1560
+ components: [
1561
+ {
1562
+ label: 'HTML',
1563
+ attrs: [
1564
+ {
1565
+ attr: '',
1566
+ value: ''
1567
+ }
1568
+ ],
1569
+ content: 'connectorForm.productaanvraag.step3.tip',
1570
+ refreshOnChange: false,
1571
+ key: 'html1',
1572
+ type: 'htmlelement',
1573
+ input: false,
1574
+ tableView: false
1575
+ },
1576
+ {
1577
+ title: 'connectorForm.productaanvraag.step3.openNotifications.panelTitle',
1578
+ collapsible: false,
1579
+ key: 'connectorFormProductaanvraagStep3OpenNotificationsPanelTitle',
1580
+ type: 'panel',
1581
+ label: 'Panel',
1582
+ input: false,
1583
+ tableView: false,
1584
+ components: [
1585
+ {
1586
+ label: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.label',
1587
+ tooltip: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.tooltip',
1588
+ tableView: true,
1589
+ validate: {
1590
+ required: true
1591
+ },
1592
+ key: 'openNotificationsBaseUrl',
1593
+ type: 'textfield',
1594
+ input: true
1595
+ },
1596
+ {
1597
+ label: 'connectorForm.productaanvraag.step3.openNotifications.clientId.label',
1598
+ tooltip: 'connectorForm.productaanvraag.step3.openNotifications.clientId.tooltip',
1599
+ tableView: true,
1600
+ validate: {
1601
+ required: true
1602
+ },
1603
+ key: 'openNotificationsClientId',
1604
+ type: 'textfield',
1605
+ input: true
1606
+ },
1607
+ {
1608
+ label: 'connectorForm.productaanvraag.step3.openNotifications.secret.label',
1609
+ tooltip: 'connectorForm.productaanvraag.step3.openNotifications.secret.tooltip',
1610
+ tableView: true,
1611
+ validate: {
1612
+ required: true
1613
+ },
1614
+ key: 'openNotificationsSecret',
1615
+ type: 'textfield',
1616
+ input: true
1617
+ },
1618
+ {
1619
+ label: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.label',
1620
+ tooltip: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.tooltip',
1621
+ tableView: true,
1622
+ validate: {
1623
+ required: true
1624
+ },
1625
+ key: 'openNotificationsCallbackBaseUrl',
1626
+ type: 'textfield',
1627
+ input: true
1628
+ }
1629
+ ]
1630
+ }
1631
+ ]
1632
+ },
1633
+ {
1634
+ title: 'connectorForm.productaanvraag.step4.title',
1635
+ breadcrumbClickable: true,
1636
+ buttonSettings: {
1637
+ previous: true,
1638
+ cancel: true,
1639
+ next: true
1640
+ },
1641
+ navigateOnEnter: false,
1642
+ saveOnEnter: false,
1643
+ scrollToTop: false,
1644
+ collapsible: false,
1645
+ key: 'page4',
1646
+ type: 'panel',
1647
+ label: 'Page 4',
1648
+ input: false,
1649
+ tableView: false,
1650
+ components: [
1651
+ {
1652
+ label: 'HTML',
1653
+ attrs: [
1654
+ {
1655
+ attr: '',
1656
+ value: ''
1657
+ }
1658
+ ],
1659
+ content: 'connectorForm.productaanvraag.step4.tip',
1660
+ refreshOnChange: false,
1661
+ key: 'html3',
1662
+ type: 'htmlelement',
1663
+ input: false,
1664
+ tableView: false
1665
+ },
1666
+ {
1667
+ title: 'connectorForm.productaanvraag.step4.applicant.panelTitle',
1668
+ collapsible: false,
1669
+ key: 'connectorFormProductaanvraagStep4ApplicantPanelTitle',
1670
+ type: 'panel',
1671
+ label: 'Panel',
1672
+ input: false,
1673
+ tableView: false,
1674
+ components: [
1675
+ {
1676
+ label: 'HTML',
1677
+ attrs: [
1678
+ {
1679
+ attr: '',
1680
+ value: ''
1681
+ }
1682
+ ],
1683
+ content: 'connectorForm.productaanvraag.step4.applicant.tip',
1684
+ refreshOnChange: false,
1685
+ key: 'html5',
1686
+ type: 'htmlelement',
1687
+ input: false,
1688
+ tableView: false
1689
+ },
1690
+ {
1691
+ label: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.label',
1692
+ tooltip: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.tooltip',
1693
+ tableView: true,
1694
+ validate: {
1695
+ required: true
1696
+ },
1697
+ key: 'applicantRoleTypeUrl',
1698
+ type: 'textfield',
1699
+ input: true
1700
+ }
1701
+ ]
1702
+ }
1703
+ ]
1704
+ },
1705
+ {
1706
+ title: 'connectorForm.productaanvraag.step5.title',
1707
+ breadcrumbClickable: true,
1708
+ buttonSettings: {
1709
+ previous: true,
1710
+ cancel: true,
1711
+ next: true
1712
+ },
1713
+ navigateOnEnter: false,
1714
+ saveOnEnter: false,
1715
+ scrollToTop: false,
1716
+ collapsible: false,
1717
+ key: 'page6',
1718
+ type: 'panel',
1719
+ label: 'Page 5',
1720
+ input: false,
1721
+ tableView: false,
1722
+ components: [
1723
+ {
1724
+ label: 'HTML',
1725
+ attrs: [
1726
+ {
1727
+ attr: '',
1728
+ value: ''
1729
+ }
1730
+ ],
1731
+ content: 'connectorForm.productaanvraag.step5.tip',
1732
+ refreshOnChange: false,
1733
+ key: 'html6',
1734
+ type: 'htmlelement',
1735
+ input: false,
1736
+ tableView: false
1737
+ },
1738
+ {
1739
+ label: 'connectorForm.productaanvraag.step5.name',
1740
+ tableView: true,
1741
+ validate: {
1742
+ required: true
1743
+ },
1744
+ key: 'connectorName',
1745
+ type: 'textfield',
1746
+ input: true
1747
+ }
1748
+ ]
1749
+ }
1750
+ ]
1751
1751
  };
1752
1752
 
1753
- var EditProductAanvragenConnectorComponent = /** @class */ (function () {
1754
- function EditProductAanvragenConnectorComponent(formTranslationService, formMappingService, documentService, translateService) {
1755
- var _this = this;
1756
- this.formTranslationService = formTranslationService;
1757
- this.formMappingService = formMappingService;
1758
- this.documentService = documentService;
1759
- this.translateService = translateService;
1760
- this.showDeleteButton = false;
1761
- this.propertiesSave = new i0.EventEmitter();
1762
- this.connectorDelete = new i0.EventEmitter();
1763
- this.formRefresh$ = new rxjs.Subject();
1764
- this.formDefinition$ = new rxjs.BehaviorSubject(undefined);
1765
- this.translatedFormDefinition$ = this.formDefinition$.pipe(operators.map(function (definition) { return _this.formTranslationService.translateForm(definition); }));
1766
- this.caseDefinitionOptions = [];
1767
- this.processDocumentDefinitionOptions = {};
1768
- this.options = {
1769
- disableAlerts: true
1770
- };
1771
- this.mapCaseDefinitionKeyComponent = function (component) {
1772
- if (component.key === 'caseDefinitionKey') {
1773
- return Object.assign(Object.assign({}, component), { disabled: false, data: { values: _this.caseDefinitionOptions } });
1774
- }
1775
- return component;
1776
- };
1777
- }
1778
- EditProductAanvragenConnectorComponent.prototype.ngOnInit = function () {
1779
- window['productRequestDefinitions'] = {};
1780
- this.openFormDefinitionSubscription();
1781
- this.formDefinition$.next(editProductAanvragenConnectorForm);
1782
- this.loadDefinitions();
1783
- };
1784
- EditProductAanvragenConnectorComponent.prototype.ngOnDestroy = function () {
1785
- var _a, _b;
1786
- (_a = this.formDefinitionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1787
- (_b = this.translateSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
1788
- };
1789
- EditProductAanvragenConnectorComponent.prototype.onSubmit = function (event) {
1790
- var submission = event.data;
1791
- var properties = lodash.cloneDeep(this.properties);
1792
- properties.objectsApiProperties.objectsApi.url = submission.objectsApiUrl;
1793
- properties.objectsApiProperties.objectsApi.token = submission.objectsApiToken;
1794
- properties.objectsApiProperties.objectsTypeApi.url = submission.objectTypesApiUrl;
1795
- properties.objectsApiProperties.objectsTypeApi.token = submission.objectTypesApiToken;
1796
- properties.objectsApiProperties.objectType.name = submission.objectTypeName;
1797
- properties.objectsApiProperties.objectType.title = submission.objectTypeTitle;
1798
- properties.objectsApiProperties.objectType.url = submission.objectTypeUrl;
1799
- properties.objectsApiProperties.objectType.typeVersion = submission.objectTypeVersion;
1800
- properties.openNotificatieProperties.baseUrl = submission.openNotificationsBaseUrl;
1801
- properties.openNotificatieProperties.clientId = submission.openNotificationsClientId;
1802
- properties.openNotificatieProperties.secret = submission.openNotificationsSecret;
1803
- properties.openNotificatieProperties.callbackBaseUrl = submission.openNotificationsCallbackBaseUrl;
1804
- properties.aanvragerRolTypeUrl = submission.applicantRoleTypeUrl;
1805
- properties.typeMapping = submission.productAanvraagTypes;
1806
- this.propertiesSave.emit({ properties: properties, name: submission.connectorName });
1807
- };
1808
- EditProductAanvragenConnectorComponent.prototype.onDelete = function () {
1809
- this.connectorDelete.emit();
1810
- };
1811
- EditProductAanvragenConnectorComponent.prototype.openFormDefinitionSubscription = function () {
1812
- var _this = this;
1813
- this.formDefinitionSubscription = rxjs.combineLatest([this.formDefinition$, this.translateService.stream('key')])
1814
- .subscribe(function (_c) {
1815
- var _d = __read(_c, 1), form = _d[0];
1816
- var translatedForm = _this.formTranslationService.translateForm(form);
1817
- _this.refreshForm({ form: translatedForm });
1818
- });
1819
- };
1820
- EditProductAanvragenConnectorComponent.prototype.prefillForm = function () {
1821
- var properties = lodash.cloneDeep(this.properties);
1822
- var submission = {};
1823
- submission.objectsApiUrl = properties.objectsApiProperties.objectsApi.url;
1824
- submission.objectsApiToken = properties.objectsApiProperties.objectsApi.token;
1825
- submission.objectTypesApiUrl = properties.objectsApiProperties.objectsTypeApi.url;
1826
- submission.objectTypesApiToken = properties.objectsApiProperties.objectsTypeApi.token;
1827
- submission.objectTypeName = properties.objectsApiProperties.objectType.name;
1828
- submission.objectTypeTitle = properties.objectsApiProperties.objectType.title;
1829
- submission.objectTypeUrl = properties.objectsApiProperties.objectType.url;
1830
- submission.objectTypeVersion = properties.objectsApiProperties.objectType.typeVersion;
1831
- submission.openNotificationsBaseUrl = properties.openNotificatieProperties.baseUrl;
1832
- submission.openNotificationsClientId = properties.openNotificatieProperties.clientId;
1833
- submission.openNotificationsSecret = properties.openNotificatieProperties.secret;
1834
- submission.openNotificationsCallbackBaseUrl = properties.openNotificatieProperties.callbackBaseUrl;
1835
- submission.applicantRoleTypeUrl = properties.aanvragerRolTypeUrl;
1836
- submission.productAanvraagTypes = properties.typeMapping;
1837
- submission.connectorName = this.defaultName;
1838
- this.refreshForm({ submission: { data: submission } });
1839
- };
1840
- EditProductAanvragenConnectorComponent.prototype.refreshForm = function (refreshValue) {
1841
- this.formRefresh$.next(refreshValue);
1842
- };
1843
- EditProductAanvragenConnectorComponent.prototype.loadDefinitions = function () {
1844
- var _this = this;
1845
- var documentDefinitions;
1846
- this.documentService.getAllDefinitions().pipe(operators.tap(function (resDocumentDefinitions) { return documentDefinitions = resDocumentDefinitions.content; }), operators.switchMap(function (resDocumentDefinitions) { return rxjs.combineLatest(resDocumentDefinitions.content.map(function (definition) { return _this.documentService.findProcessDocumentDefinitions(definition.id.name); })); }), operators.tap(function (res) {
1847
- var _a;
1848
- _this.caseDefinitionOptions = documentDefinitions.map(function (documentDefinition) {
1849
- return { label: documentDefinition.id.name, value: documentDefinition.id.name };
1850
- });
1851
- documentDefinitions.forEach(function (documentDefinition, index) {
1852
- _this.processDocumentDefinitionOptions[documentDefinition.id.name] = res[index].map(function (processDocumentDefinition) { return processDocumentDefinition.id.processDefinitionKey; });
1853
- });
1854
- window['productRequestDefinitions'] = _this.processDocumentDefinitionOptions;
1855
- var definitionWithCaseDefinitionOptions = _this.formMappingService.mapComponents(_this.formDefinition$.getValue(), _this.mapCaseDefinitionKeyComponent);
1856
- _this.formDefinition$.next(definitionWithCaseDefinitionOptions);
1857
- if ((_a = _this.properties) === null || _a === void 0 ? void 0 : _a.aanvragerRolTypeUrl) {
1858
- _this.prefillForm();
1859
- }
1860
- })).subscribe();
1861
- };
1862
- return EditProductAanvragenConnectorComponent;
1863
- }());
1864
- EditProductAanvragenConnectorComponent.decorators = [
1865
- { type: i0.Component, args: [{
1866
- selector: 'valtimo-edit-product-aanvragen-connector',
1867
- template: "<!--\n ~ Copyright 2015-2021 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n *ngIf=\"translatedFormDefinition$ | async as definition\"\n class=\"edit-product-request\"\n [ngClass]=\"{'has-delete': showDeleteButton}\"\n>\n <valtimo-form-io\n [form]=\"definition\"\n [formRefresh$]=\"formRefresh$\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{'connectorManagement.remove' | translate}}\n </button>\n</div>\n\n",
1868
- styles: ["/*!\n * Copyright 2015-2021 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.edit-product-request ::ng-deep .btn-wizard-nav-cancel{display:none}.edit-product-request ::ng-deep .list-inline{display:flex;flex-direction:row;justify-content:flex-end}.edit-product-request ::ng-deep .col-sm-2{flex:0 0 25%;max-width:25%}.edit-product-request ::ng-deep .edit-grid-component>label{display:none}.edit-product-request.has-delete ::ng-deep .list-inline{margin-bottom:-30px}.edit-product-request .btn-danger{position:relative}"]
1869
- },] }
1870
- ];
1871
- EditProductAanvragenConnectorComponent.ctorParameters = function () { return [
1872
- { type: form.FormTranslationService },
1873
- { type: form.FormMappingService },
1874
- { type: document.DocumentService },
1875
- { type: core.TranslateService }
1876
- ]; };
1877
- EditProductAanvragenConnectorComponent.propDecorators = {
1878
- properties: [{ type: i0.Input }],
1879
- defaultName: [{ type: i0.Input }],
1880
- showDeleteButton: [{ type: i0.Input }],
1881
- propertiesSave: [{ type: i0.Output }],
1882
- connectorDelete: [{ type: i0.Output }]
1753
+ var EditProductAanvragenConnectorComponent = /** @class */ (function () {
1754
+ function EditProductAanvragenConnectorComponent(formTranslationService, formMappingService, documentService, translateService) {
1755
+ var _this = this;
1756
+ this.formTranslationService = formTranslationService;
1757
+ this.formMappingService = formMappingService;
1758
+ this.documentService = documentService;
1759
+ this.translateService = translateService;
1760
+ this.showDeleteButton = false;
1761
+ this.propertiesSave = new i0.EventEmitter();
1762
+ this.connectorDelete = new i0.EventEmitter();
1763
+ this.formRefresh$ = new rxjs.Subject();
1764
+ this.formDefinition$ = new rxjs.BehaviorSubject(undefined);
1765
+ this.translatedFormDefinition$ = this.formDefinition$.pipe(operators.map(function (definition) { return _this.formTranslationService.translateForm(definition); }));
1766
+ this.caseDefinitionOptions = [];
1767
+ this.processDocumentDefinitionOptions = {};
1768
+ this.options = {
1769
+ disableAlerts: true
1770
+ };
1771
+ this.mapCaseDefinitionKeyComponent = function (component) {
1772
+ if (component.key === 'caseDefinitionKey') {
1773
+ return Object.assign(Object.assign({}, component), { disabled: false, data: { values: _this.caseDefinitionOptions } });
1774
+ }
1775
+ return component;
1776
+ };
1777
+ }
1778
+ EditProductAanvragenConnectorComponent.prototype.ngOnInit = function () {
1779
+ window['productRequestDefinitions'] = {};
1780
+ this.openFormDefinitionSubscription();
1781
+ this.formDefinition$.next(editProductAanvragenConnectorForm);
1782
+ this.loadDefinitions();
1783
+ };
1784
+ EditProductAanvragenConnectorComponent.prototype.ngOnDestroy = function () {
1785
+ var _a, _b;
1786
+ (_a = this.formDefinitionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1787
+ (_b = this.translateSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
1788
+ };
1789
+ EditProductAanvragenConnectorComponent.prototype.onSubmit = function (event) {
1790
+ var submission = event.data;
1791
+ var properties = lodash.cloneDeep(this.properties);
1792
+ properties.objectsApiProperties.objectsApi.url = submission.objectsApiUrl;
1793
+ properties.objectsApiProperties.objectsApi.token = submission.objectsApiToken;
1794
+ properties.objectsApiProperties.objectsTypeApi.url = submission.objectTypesApiUrl;
1795
+ properties.objectsApiProperties.objectsTypeApi.token = submission.objectTypesApiToken;
1796
+ properties.objectsApiProperties.objectType.name = submission.objectTypeName;
1797
+ properties.objectsApiProperties.objectType.title = submission.objectTypeTitle;
1798
+ properties.objectsApiProperties.objectType.url = submission.objectTypeUrl;
1799
+ properties.objectsApiProperties.objectType.typeVersion = submission.objectTypeVersion;
1800
+ properties.openNotificatieProperties.baseUrl = submission.openNotificationsBaseUrl;
1801
+ properties.openNotificatieProperties.clientId = submission.openNotificationsClientId;
1802
+ properties.openNotificatieProperties.secret = submission.openNotificationsSecret;
1803
+ properties.openNotificatieProperties.callbackBaseUrl = submission.openNotificationsCallbackBaseUrl;
1804
+ properties.aanvragerRolTypeUrl = submission.applicantRoleTypeUrl;
1805
+ properties.typeMapping = submission.productAanvraagTypes;
1806
+ this.propertiesSave.emit({ properties: properties, name: submission.connectorName });
1807
+ };
1808
+ EditProductAanvragenConnectorComponent.prototype.onDelete = function () {
1809
+ this.connectorDelete.emit();
1810
+ };
1811
+ EditProductAanvragenConnectorComponent.prototype.openFormDefinitionSubscription = function () {
1812
+ var _this = this;
1813
+ this.formDefinitionSubscription = rxjs.combineLatest([this.formDefinition$, this.translateService.stream('key')])
1814
+ .subscribe(function (_c) {
1815
+ var _d = __read(_c, 1), form = _d[0];
1816
+ var translatedForm = _this.formTranslationService.translateForm(form);
1817
+ _this.refreshForm({ form: translatedForm });
1818
+ });
1819
+ };
1820
+ EditProductAanvragenConnectorComponent.prototype.prefillForm = function () {
1821
+ var properties = lodash.cloneDeep(this.properties);
1822
+ var submission = {};
1823
+ submission.objectsApiUrl = properties.objectsApiProperties.objectsApi.url;
1824
+ submission.objectsApiToken = properties.objectsApiProperties.objectsApi.token;
1825
+ submission.objectTypesApiUrl = properties.objectsApiProperties.objectsTypeApi.url;
1826
+ submission.objectTypesApiToken = properties.objectsApiProperties.objectsTypeApi.token;
1827
+ submission.objectTypeName = properties.objectsApiProperties.objectType.name;
1828
+ submission.objectTypeTitle = properties.objectsApiProperties.objectType.title;
1829
+ submission.objectTypeUrl = properties.objectsApiProperties.objectType.url;
1830
+ submission.objectTypeVersion = properties.objectsApiProperties.objectType.typeVersion;
1831
+ submission.openNotificationsBaseUrl = properties.openNotificatieProperties.baseUrl;
1832
+ submission.openNotificationsClientId = properties.openNotificatieProperties.clientId;
1833
+ submission.openNotificationsSecret = properties.openNotificatieProperties.secret;
1834
+ submission.openNotificationsCallbackBaseUrl = properties.openNotificatieProperties.callbackBaseUrl;
1835
+ submission.applicantRoleTypeUrl = properties.aanvragerRolTypeUrl;
1836
+ submission.productAanvraagTypes = properties.typeMapping;
1837
+ submission.connectorName = this.defaultName;
1838
+ this.refreshForm({ submission: { data: submission } });
1839
+ };
1840
+ EditProductAanvragenConnectorComponent.prototype.refreshForm = function (refreshValue) {
1841
+ this.formRefresh$.next(refreshValue);
1842
+ };
1843
+ EditProductAanvragenConnectorComponent.prototype.loadDefinitions = function () {
1844
+ var _this = this;
1845
+ var documentDefinitions;
1846
+ this.documentService.getAllDefinitions().pipe(operators.tap(function (resDocumentDefinitions) { return documentDefinitions = resDocumentDefinitions.content; }), operators.switchMap(function (resDocumentDefinitions) { return rxjs.combineLatest(resDocumentDefinitions.content.map(function (definition) { return _this.documentService.findProcessDocumentDefinitions(definition.id.name); })); }), operators.tap(function (res) {
1847
+ var _a;
1848
+ _this.caseDefinitionOptions = documentDefinitions.map(function (documentDefinition) {
1849
+ return { label: documentDefinition.id.name, value: documentDefinition.id.name };
1850
+ });
1851
+ documentDefinitions.forEach(function (documentDefinition, index) {
1852
+ _this.processDocumentDefinitionOptions[documentDefinition.id.name] = res[index].map(function (processDocumentDefinition) { return processDocumentDefinition.id.processDefinitionKey; });
1853
+ });
1854
+ window['productRequestDefinitions'] = _this.processDocumentDefinitionOptions;
1855
+ var definitionWithCaseDefinitionOptions = _this.formMappingService.mapComponents(_this.formDefinition$.getValue(), _this.mapCaseDefinitionKeyComponent);
1856
+ _this.formDefinition$.next(definitionWithCaseDefinitionOptions);
1857
+ if ((_a = _this.properties) === null || _a === void 0 ? void 0 : _a.aanvragerRolTypeUrl) {
1858
+ _this.prefillForm();
1859
+ }
1860
+ })).subscribe();
1861
+ };
1862
+ return EditProductAanvragenConnectorComponent;
1863
+ }());
1864
+ EditProductAanvragenConnectorComponent.decorators = [
1865
+ { type: i0.Component, args: [{
1866
+ selector: 'valtimo-edit-product-aanvragen-connector',
1867
+ template: "<!--\n ~ Copyright 2015-2021 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n *ngIf=\"translatedFormDefinition$ | async as definition\"\n class=\"edit-product-request\"\n [ngClass]=\"{'has-delete': showDeleteButton}\"\n>\n <valtimo-form-io\n [form]=\"definition\"\n [formRefresh$]=\"formRefresh$\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n\n <button *ngIf=\"showDeleteButton\" class=\"btn btn-danger btn-space\" (click)=\"onDelete()\">\n <i class=\"icon mdi mdi-delete mr-1\"></i>\n {{'connectorManagement.remove' | translate}}\n </button>\n</div>\n\n",
1868
+ styles: ["/*!\n * Copyright 2015-2021 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.edit-product-request ::ng-deep .btn-wizard-nav-cancel{display:none}.edit-product-request ::ng-deep .list-inline{display:flex;flex-direction:row;justify-content:flex-end}.edit-product-request ::ng-deep .col-sm-2{flex:0 0 25%;max-width:25%}.edit-product-request ::ng-deep .edit-grid-component>label{display:none}.edit-product-request.has-delete ::ng-deep .list-inline{margin-bottom:-30px}.edit-product-request .btn-danger{position:relative}"]
1869
+ },] }
1870
+ ];
1871
+ EditProductAanvragenConnectorComponent.ctorParameters = function () { return [
1872
+ { type: form.FormTranslationService },
1873
+ { type: form.FormMappingService },
1874
+ { type: document.DocumentService },
1875
+ { type: core.TranslateService }
1876
+ ]; };
1877
+ EditProductAanvragenConnectorComponent.propDecorators = {
1878
+ properties: [{ type: i0.Input }],
1879
+ defaultName: [{ type: i0.Input }],
1880
+ showDeleteButton: [{ type: i0.Input }],
1881
+ propertiesSave: [{ type: i0.Output }],
1882
+ connectorDelete: [{ type: i0.Output }]
1883
1883
  };
1884
1884
 
1885
- /*
1886
- * Copyright 2015-2020 Ritense BV, the Netherlands.
1887
- *
1888
- * Licensed under EUPL, Version 1.2 (the "License");
1889
- * you may not use this file except in compliance with the License.
1890
- * You may obtain a copy of the License at
1891
- *
1892
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1893
- *
1894
- * Unless required by applicable law or agreed to in writing, software
1895
- * distributed under the License is distributed on an "AS IS" basis,
1896
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1897
- * See the License for the specific language governing permissions and
1898
- * limitations under the License.
1899
- */
1900
- var EditConnectorFormComponent = /** @class */ (function () {
1901
- function EditConnectorFormComponent() {
1902
- this.withDefaults = false;
1903
- this.showDeleteButton = false;
1904
- this.propertiesSave = new i0.EventEmitter();
1905
- this.connectorDelete = new i0.EventEmitter();
1906
- this.productAanvragenName = 'ProductAanvragen';
1907
- }
1908
- return EditConnectorFormComponent;
1909
- }());
1910
- EditConnectorFormComponent.decorators = [
1911
- { type: i0.Component, args: [{
1912
- selector: 'valtimo-edit-connector-form',
1913
- 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",
1914
- 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 */"]
1915
- },] }
1916
- ];
1917
- EditConnectorFormComponent.propDecorators = {
1918
- properties: [{ type: i0.Input }],
1919
- withDefaults: [{ type: i0.Input }],
1920
- showDeleteButton: [{ type: i0.Input }],
1921
- defaultName: [{ type: i0.Input }],
1922
- connectorName: [{ type: i0.Input }],
1923
- propertiesSave: [{ type: i0.Output }],
1924
- connectorDelete: [{ type: i0.Output }]
1885
+ /*
1886
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1887
+ *
1888
+ * Licensed under EUPL, Version 1.2 (the "License");
1889
+ * you may not use this file except in compliance with the License.
1890
+ * You may obtain a copy of the License at
1891
+ *
1892
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1893
+ *
1894
+ * Unless required by applicable law or agreed to in writing, software
1895
+ * distributed under the License is distributed on an "AS IS" basis,
1896
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1897
+ * See the License for the specific language governing permissions and
1898
+ * limitations under the License.
1899
+ */
1900
+ var EditConnectorFormComponent = /** @class */ (function () {
1901
+ function EditConnectorFormComponent() {
1902
+ this.withDefaults = false;
1903
+ this.showDeleteButton = false;
1904
+ this.propertiesSave = new i0.EventEmitter();
1905
+ this.connectorDelete = new i0.EventEmitter();
1906
+ this.productAanvragenName = 'ProductAanvragen';
1907
+ }
1908
+ return EditConnectorFormComponent;
1909
+ }());
1910
+ EditConnectorFormComponent.decorators = [
1911
+ { type: i0.Component, args: [{
1912
+ selector: 'valtimo-edit-connector-form',
1913
+ 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",
1914
+ 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 */"]
1915
+ },] }
1916
+ ];
1917
+ EditConnectorFormComponent.propDecorators = {
1918
+ properties: [{ type: i0.Input }],
1919
+ withDefaults: [{ type: i0.Input }],
1920
+ showDeleteButton: [{ type: i0.Input }],
1921
+ defaultName: [{ type: i0.Input }],
1922
+ connectorName: [{ type: i0.Input }],
1923
+ propertiesSave: [{ type: i0.Output }],
1924
+ connectorDelete: [{ type: i0.Output }]
1925
1925
  };
1926
1926
 
1927
- /*
1928
- * Copyright 2015-2020 Ritense BV, the Netherlands.
1929
- *
1930
- * Licensed under EUPL, Version 1.2 (the "License");
1931
- * you may not use this file except in compliance with the License.
1932
- * You may obtain a copy of the License at
1933
- *
1934
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1935
- *
1936
- * Unless required by applicable law or agreed to in writing, software
1937
- * distributed under the License is distributed on an "AS IS" basis,
1938
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1939
- * See the License for the specific language governing permissions and
1940
- * limitations under the License.
1941
- */
1942
- var ConnectorManagementModule = /** @class */ (function () {
1943
- function ConnectorManagementModule() {
1944
- }
1945
- return ConnectorManagementModule;
1946
- }());
1947
- ConnectorManagementModule.decorators = [
1948
- { type: i0.NgModule, args: [{
1949
- providers: [ConnectorManagementStateService],
1950
- declarations: [
1951
- ConnectorManagementComponent,
1952
- AddConnectorComponent,
1953
- ConnectorModalComponent,
1954
- ModifyConnectorComponent,
1955
- EditConnectorPropertiesComponent,
1956
- MultiValueConnectorPropertyComponent,
1957
- ConnectorLinkExtensionComponent,
1958
- ConnectorLinkExtensionModalComponent,
1959
- EditProductAanvragenConnectorComponent,
1960
- EditConnectorFormComponent
1961
- ],
1962
- imports: [
1963
- common.CommonModule,
1964
- ConnectorManagementRoutingModule,
1965
- core.TranslateModule,
1966
- components.WidgetModule,
1967
- components.ListModule,
1968
- components.SpinnerModule,
1969
- components.ModalModule,
1970
- components.FormIoModule
1971
- ],
1972
- exports: [
1973
- ConnectorManagementComponent,
1974
- AddConnectorComponent,
1975
- ConnectorModalComponent,
1976
- ModifyConnectorComponent,
1977
- EditConnectorPropertiesComponent,
1978
- MultiValueConnectorPropertyComponent,
1979
- ConnectorLinkExtensionComponent,
1980
- ConnectorLinkExtensionModalComponent,
1981
- EditProductAanvragenConnectorComponent
1982
- ],
1983
- entryComponents: [
1984
- ConnectorLinkExtensionComponent,
1985
- ]
1986
- },] }
1927
+ /*
1928
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1929
+ *
1930
+ * Licensed under EUPL, Version 1.2 (the "License");
1931
+ * you may not use this file except in compliance with the License.
1932
+ * You may obtain a copy of the License at
1933
+ *
1934
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1935
+ *
1936
+ * Unless required by applicable law or agreed to in writing, software
1937
+ * distributed under the License is distributed on an "AS IS" basis,
1938
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1939
+ * See the License for the specific language governing permissions and
1940
+ * limitations under the License.
1941
+ */
1942
+ var ConnectorManagementModule = /** @class */ (function () {
1943
+ function ConnectorManagementModule() {
1944
+ }
1945
+ return ConnectorManagementModule;
1946
+ }());
1947
+ ConnectorManagementModule.decorators = [
1948
+ { type: i0.NgModule, args: [{
1949
+ providers: [ConnectorManagementStateService],
1950
+ declarations: [
1951
+ ConnectorManagementComponent,
1952
+ AddConnectorComponent,
1953
+ ConnectorModalComponent,
1954
+ ModifyConnectorComponent,
1955
+ EditConnectorPropertiesComponent,
1956
+ MultiValueConnectorPropertyComponent,
1957
+ ConnectorLinkExtensionComponent,
1958
+ ConnectorLinkExtensionModalComponent,
1959
+ EditProductAanvragenConnectorComponent,
1960
+ EditConnectorFormComponent
1961
+ ],
1962
+ imports: [
1963
+ common.CommonModule,
1964
+ ConnectorManagementRoutingModule,
1965
+ core.TranslateModule,
1966
+ components.WidgetModule,
1967
+ components.ListModule,
1968
+ components.SpinnerModule,
1969
+ components.ModalModule,
1970
+ components.FormIoModule
1971
+ ],
1972
+ exports: [
1973
+ ConnectorManagementComponent,
1974
+ AddConnectorComponent,
1975
+ ConnectorModalComponent,
1976
+ ModifyConnectorComponent,
1977
+ EditConnectorPropertiesComponent,
1978
+ MultiValueConnectorPropertyComponent,
1979
+ ConnectorLinkExtensionComponent,
1980
+ ConnectorLinkExtensionModalComponent,
1981
+ EditProductAanvragenConnectorComponent
1982
+ ],
1983
+ entryComponents: [
1984
+ ConnectorLinkExtensionComponent,
1985
+ ]
1986
+ },] }
1987
1987
  ];
1988
1988
 
1989
- /*
1990
- * Copyright 2015-2020 Ritense BV, the Netherlands.
1991
- *
1992
- * Licensed under EUPL, Version 1.2 (the "License");
1993
- * you may not use this file except in compliance with the License.
1994
- * You may obtain a copy of the License at
1995
- *
1996
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1997
- *
1998
- * Unless required by applicable law or agreed to in writing, software
1999
- * distributed under the License is distributed on an "AS IS" basis,
2000
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2001
- * See the License for the specific language governing permissions and
2002
- * limitations under the License.
2003
- */
2004
- function connectorLinkExtensionInitializer(injector) {
2005
- var configService = injector.get(i2.ConfigService);
2006
- var logger = injector.get(ngxLogger.NGXLogger);
2007
- return function () {
2008
- return new Promise(function (resolve, reject) {
2009
- try {
2010
- logger.debug('connector link extension initializer before init');
2011
- var extension = new contract.Extension('ConnectorLink', new contract.BasicExtensionPoint('dossier-management', 'dossier', 'right-panel', ConnectorLinkExtensionComponent));
2012
- configService.addExtension(extension);
2013
- logger.debug('connector link extension initializer after init');
2014
- resolve();
2015
- }
2016
- catch (error) {
2017
- logger.debug('connector link extension initializer error', error);
2018
- reject(error);
2019
- }
2020
- });
2021
- };
1989
+ /*
1990
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1991
+ *
1992
+ * Licensed under EUPL, Version 1.2 (the "License");
1993
+ * you may not use this file except in compliance with the License.
1994
+ * You may obtain a copy of the License at
1995
+ *
1996
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1997
+ *
1998
+ * Unless required by applicable law or agreed to in writing, software
1999
+ * distributed under the License is distributed on an "AS IS" basis,
2000
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2001
+ * See the License for the specific language governing permissions and
2002
+ * limitations under the License.
2003
+ */
2004
+ function connectorLinkExtensionInitializer(injector) {
2005
+ var configService = injector.get(i2.ConfigService);
2006
+ var logger = injector.get(ngxLogger.NGXLogger);
2007
+ return function () {
2008
+ return new Promise(function (resolve, reject) {
2009
+ try {
2010
+ logger.debug('connector link extension initializer before init');
2011
+ var extension = new contract.Extension('ConnectorLink', new contract.BasicExtensionPoint('dossier-management', 'dossier', 'right-panel', ConnectorLinkExtensionComponent));
2012
+ configService.addExtension(extension);
2013
+ logger.debug('connector link extension initializer after init');
2014
+ resolve();
2015
+ }
2016
+ catch (error) {
2017
+ logger.debug('connector link extension initializer error', error);
2018
+ reject(error);
2019
+ }
2020
+ });
2021
+ };
2022
2022
  }
2023
2023
 
2024
- /*
2025
- * Copyright 2015-2020 Ritense BV, the Netherlands.
2026
- *
2027
- * Licensed under EUPL, Version 1.2 (the "License");
2028
- * you may not use this file except in compliance with the License.
2029
- * You may obtain a copy of the License at
2030
- *
2031
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2032
- *
2033
- * Unless required by applicable law or agreed to in writing, software
2034
- * distributed under the License is distributed on an "AS IS" basis,
2035
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2036
- * See the License for the specific language governing permissions and
2037
- * limitations under the License.
2024
+ /*
2025
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
2026
+ *
2027
+ * Licensed under EUPL, Version 1.2 (the "License");
2028
+ * you may not use this file except in compliance with the License.
2029
+ * You may obtain a copy of the License at
2030
+ *
2031
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
2032
+ *
2033
+ * Unless required by applicable law or agreed to in writing, software
2034
+ * distributed under the License is distributed on an "AS IS" basis,
2035
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2036
+ * See the License for the specific language governing permissions and
2037
+ * limitations under the License.
2038
2038
  */
2039
2039
 
2040
- /**
2041
- * Generated bundle index. Do not edit.
2040
+ /**
2041
+ * Generated bundle index. Do not edit.
2042
2042
  */
2043
2043
 
2044
2044
  exports.AddConnectorComponent = AddConnectorComponent;