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

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