@valtimo/connector-management 4.23.0 → 5.0.0

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