@valtimo/connector-management 4.15.2 → 4.16.0-next-main.19
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.
- package/README.md +16 -7
- package/bundles/valtimo-connector-management.umd.js +282 -234
- package/bundles/valtimo-connector-management.umd.js.map +1 -1
- package/bundles/valtimo-connector-management.umd.min.js +2 -2
- package/bundles/valtimo-connector-management.umd.min.js.map +1 -1
- package/esm2015/lib/components/add-connector/add-connector.component.js +12 -8
- package/esm2015/lib/components/connector-link-extension/connector-link-extension.component.js +21 -12
- package/esm2015/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.js +19 -17
- package/esm2015/lib/components/connector-management/connector-management.component.js +23 -15
- package/esm2015/lib/components/connector-modal/connector-modal.component.js +2 -2
- package/esm2015/lib/components/edit-connector-form/edit-connector-form.component.js +1 -1
- package/esm2015/lib/components/edit-connector-properties/edit-connector-properties.component.js +17 -13
- package/esm2015/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.js +39 -59
- package/esm2015/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.js +108 -102
- package/esm2015/lib/components/modify-connector/modify-connector.component.js +9 -7
- package/esm2015/lib/components/multi-value-connector-property/multi-value-connector-property.component.js +15 -11
- package/esm2015/lib/connector-management-routing.js +5 -8
- package/esm2015/lib/connector-management.module.js +5 -7
- package/esm2015/lib/extension/connector-management.extension.init.js +3 -3
- package/esm2015/lib/models/connector.model.js +1 -0
- package/esm2015/lib/models/index.js +20 -0
- package/esm2015/lib/models/object-sync.js +1 -0
- package/esm2015/lib/services/connector-management/connector-management.service.js +2 -2
- package/esm2015/lib/services/connector-management-state/connector-management-state.service.js +2 -2
- package/esm2015/lib/services/object-api-sync/object-api-sync.service.js +2 -2
- package/esm2015/public-api.js +2 -1
- package/esm2015/valtimo-connector-management.js +1 -1
- package/fesm2015/valtimo-connector-management.js +281 -251
- package/fesm2015/valtimo-connector-management.js.map +1 -1
- package/lib/components/add-connector/add-connector.component.d.ts +1 -1
- package/lib/components/connector-link-extension/connector-link-extension.component.d.ts +1 -1
- package/lib/components/connector-link-extension-modal/connector-link-extension-modal.component.d.ts +2 -2
- package/lib/components/connector-management/connector-management.component.d.ts +2 -1
- package/lib/components/connector-modal/connector-modal.component.d.ts +1 -1
- package/lib/components/edit-connector-form/edit-connector-form.component.d.ts +1 -1
- package/lib/components/edit-connector-properties/edit-connector-properties.component.d.ts +1 -1
- package/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.component.d.ts +10 -8
- package/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.d.ts +24 -14
- package/lib/components/modify-connector/modify-connector.component.d.ts +1 -1
- package/lib/components/multi-value-connector-property/multi-value-connector-property.component.d.ts +1 -1
- package/lib/models/connector.model.d.ts +36 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/object-sync.d.ts +19 -0
- package/lib/services/connector-management/connector-management.service.d.ts +2 -1
- package/lib/services/connector-management-state/connector-management-state.service.d.ts +1 -1
- package/lib/services/object-api-sync/object-api-sync.service.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/valtimo-connector-management.metadata.json +1 -1
|
@@ -2,18 +2,35 @@ import { ɵɵdefineInjectable, ɵɵinject, Injectable, Component, NgModule, View
|
|
|
2
2
|
import { RouterModule, ActivatedRoute } from '@angular/router';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { AuthGuardService } from '@valtimo/security';
|
|
5
|
-
import { ROLE_ADMIN, Extension, BasicExtensionPoint } from '@valtimo/
|
|
5
|
+
import { ConfigService, ROLE_ADMIN, Extension, BasicExtensionPoint } from '@valtimo/config';
|
|
6
6
|
import { BehaviorSubject, combineLatest, of, Subject } from 'rxjs';
|
|
7
7
|
import { map, tap, switchMap, take, catchError } from 'rxjs/operators';
|
|
8
8
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
9
9
|
import { HttpClient } from '@angular/common/http';
|
|
10
|
-
import { ConfigService } from '@valtimo/config';
|
|
11
10
|
import { AlertService, WidgetModule, ListModule, SpinnerModule, ModalModule, FormIoModule } from '@valtimo/components';
|
|
12
11
|
import { get, set, cloneDeep } from 'lodash';
|
|
13
12
|
import { FormTranslationService, FormMappingService } from '@valtimo/form';
|
|
14
13
|
import { DocumentService } from '@valtimo/document';
|
|
15
14
|
import { NGXLogger } from 'ngx-logger';
|
|
16
15
|
|
|
16
|
+
/*
|
|
17
|
+
*
|
|
18
|
+
* * Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
19
|
+
* *
|
|
20
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
21
|
+
* * you may not use this file except in compliance with the License.
|
|
22
|
+
* * You may obtain a copy of the License at
|
|
23
|
+
* *
|
|
24
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
25
|
+
* *
|
|
26
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
27
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
28
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
+
* * See the License for the specific language governing permissions and
|
|
30
|
+
* * limitations under the License.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
|
|
17
34
|
/*
|
|
18
35
|
* Copyright 2020 Dimpact.
|
|
19
36
|
*
|
|
@@ -60,7 +77,7 @@ class ConnectorManagementService {
|
|
|
60
77
|
ConnectorManagementService.ɵprov = ɵɵdefineInjectable({ factory: function ConnectorManagementService_Factory() { return new ConnectorManagementService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: ConnectorManagementService, providedIn: "root" });
|
|
61
78
|
ConnectorManagementService.decorators = [
|
|
62
79
|
{ type: Injectable, args: [{
|
|
63
|
-
providedIn: 'root'
|
|
80
|
+
providedIn: 'root',
|
|
64
81
|
},] }
|
|
65
82
|
];
|
|
66
83
|
ConnectorManagementService.ctorParameters = () => [
|
|
@@ -144,7 +161,7 @@ class ConnectorManagementStateService {
|
|
|
144
161
|
ConnectorManagementStateService.ɵprov = ɵɵdefineInjectable({ factory: function ConnectorManagementStateService_Factory() { return new ConnectorManagementStateService(); }, token: ConnectorManagementStateService, providedIn: "root" });
|
|
145
162
|
ConnectorManagementStateService.decorators = [
|
|
146
163
|
{ type: Injectable, args: [{
|
|
147
|
-
providedIn: 'root'
|
|
164
|
+
providedIn: 'root',
|
|
148
165
|
},] }
|
|
149
166
|
];
|
|
150
167
|
|
|
@@ -176,21 +193,29 @@ class ConnectorManagementComponent {
|
|
|
176
193
|
});
|
|
177
194
|
this.pageSizes$ = new BehaviorSubject({
|
|
178
195
|
collectionSize: 0,
|
|
179
|
-
maxPaginationItemSize: 5
|
|
196
|
+
maxPaginationItemSize: 5,
|
|
180
197
|
});
|
|
181
|
-
this.pagination$ = combineLatest([
|
|
182
|
-
.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
this.
|
|
198
|
+
this.pagination$ = combineLatest([
|
|
199
|
+
this.currentPageAndSize$,
|
|
200
|
+
this.pageSizes$,
|
|
201
|
+
]).pipe(map(([currentPage, sizes]) => (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }))));
|
|
202
|
+
this.connectorInstances$ = combineLatest([
|
|
203
|
+
this.currentPageAndSize$,
|
|
204
|
+
this.translateService.stream('key'),
|
|
205
|
+
this.stateService.refresh$,
|
|
206
|
+
]).pipe(tap(() => this.setFields()), switchMap(([currentPage]) => combineLatest([
|
|
207
|
+
this.connectorManagementService.getConnectorInstances({
|
|
208
|
+
page: currentPage.page,
|
|
209
|
+
size: currentPage.size,
|
|
210
|
+
}),
|
|
211
|
+
this.connectorManagementService.getConnectorTypes(),
|
|
187
212
|
])), tap(([instanceRes]) => {
|
|
188
|
-
this.pageSizes$.pipe(take(1)).subscribe(
|
|
213
|
+
this.pageSizes$.pipe(take(1)).subscribe(sizes => {
|
|
189
214
|
this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
|
|
190
215
|
});
|
|
191
|
-
}), map(([instanceRes, typesRes]) => instanceRes.content.map(
|
|
216
|
+
}), map(([instanceRes, typesRes]) => instanceRes.content.map(instance => {
|
|
192
217
|
var _a;
|
|
193
|
-
return Object.assign(Object.assign({}, instance), { typeName: (_a = typesRes.find(
|
|
218
|
+
return Object.assign(Object.assign({}, instance), { typeName: (_a = typesRes.find(type => type.id === instance.type.id)) === null || _a === void 0 ? void 0 : _a.name });
|
|
194
219
|
})), tap(() => this.loading$.next(false)));
|
|
195
220
|
this.modalType$ = new BehaviorSubject('add');
|
|
196
221
|
}
|
|
@@ -198,13 +223,13 @@ class ConnectorManagementComponent {
|
|
|
198
223
|
this.stateService.hideModal();
|
|
199
224
|
}
|
|
200
225
|
paginationClicked(newPageNumber) {
|
|
201
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(
|
|
226
|
+
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
202
227
|
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
|
|
203
228
|
});
|
|
204
229
|
}
|
|
205
230
|
paginationSet(newPageSize) {
|
|
206
231
|
if (newPageSize) {
|
|
207
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(
|
|
232
|
+
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
208
233
|
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
|
|
209
234
|
});
|
|
210
235
|
}
|
|
@@ -221,13 +246,13 @@ class ConnectorManagementComponent {
|
|
|
221
246
|
setFields() {
|
|
222
247
|
const getTranslatedLabel = (key) => this.translateService.instant(`connectorManagement.labels.${key}`);
|
|
223
248
|
const keys = ['name', 'typeName'];
|
|
224
|
-
this.fields$.next(keys.map(
|
|
249
|
+
this.fields$.next(keys.map(key => ({ label: getTranslatedLabel(key), key })));
|
|
225
250
|
}
|
|
226
251
|
}
|
|
227
252
|
ConnectorManagementComponent.decorators = [
|
|
228
253
|
{ type: Component, args: [{
|
|
229
254
|
selector: 'valtimo-connector-management',
|
|
230
|
-
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
|
|
255
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div\n class=\"main-content pt-0\"\n *ngIf=\"{\n connectorInstances: connectorInstances$ | async,\n fields: fields$ | async,\n pagination: pagination$ | async,\n loading: loading$ | async\n } as obs\"\n>\n <div class=\"container-fluid\">\n <ng-container *ngTemplateOutlet=\"buttons; context: {loading: obs.loading}\"></ng-container>\n <valtimo-widget *ngIf=\"obs.loading === false; else loading\">\n <valtimo-list\n [items]=\"obs.connectorInstances\"\n [fields]=\"obs.fields\"\n [header]=\"true\"\n [viewMode]=\"true\"\n [isSearchable]=\"false\"\n [pagination]=\"obs.pagination\"\n paginationIdentifier=\"connectorManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet($event)\"\n (rowClicked)=\"rowClicked($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'connectorManagement.title' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'connectorManagement.subtitle' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-connector-modal [modalType]=\"modalType$ | async\"> </valtimo-connector-modal>\n\n<ng-template #buttons let-loading=\"loading\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space mr-0\" [disabled]=\"loading\" (click)=\"showAddModal()\">\n <i class=\"icon mdi mdi-plus\"></i> \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",
|
|
231
256
|
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 */"]
|
|
232
257
|
},] }
|
|
233
258
|
];
|
|
@@ -258,7 +283,7 @@ const routes = [
|
|
|
258
283
|
path: 'connectors',
|
|
259
284
|
component: ConnectorManagementComponent,
|
|
260
285
|
canActivate: [AuthGuardService],
|
|
261
|
-
data: ɵ0
|
|
286
|
+
data: ɵ0,
|
|
262
287
|
},
|
|
263
288
|
];
|
|
264
289
|
class ConnectorManagementRoutingModule {
|
|
@@ -266,11 +291,8 @@ class ConnectorManagementRoutingModule {
|
|
|
266
291
|
ConnectorManagementRoutingModule.decorators = [
|
|
267
292
|
{ type: NgModule, args: [{
|
|
268
293
|
declarations: [],
|
|
269
|
-
imports: [
|
|
270
|
-
|
|
271
|
-
RouterModule.forChild(routes),
|
|
272
|
-
],
|
|
273
|
-
exports: [RouterModule]
|
|
294
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
295
|
+
exports: [RouterModule],
|
|
274
296
|
},] }
|
|
275
297
|
];
|
|
276
298
|
|
|
@@ -311,7 +333,7 @@ class ObjectApiSyncService {
|
|
|
311
333
|
ObjectApiSyncService.ɵprov = ɵɵdefineInjectable({ factory: function ObjectApiSyncService_Factory() { return new ObjectApiSyncService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: ObjectApiSyncService, providedIn: "root" });
|
|
312
334
|
ObjectApiSyncService.decorators = [
|
|
313
335
|
{ type: Injectable, args: [{
|
|
314
|
-
providedIn: 'root'
|
|
336
|
+
providedIn: 'root',
|
|
315
337
|
},] }
|
|
316
338
|
];
|
|
317
339
|
ObjectApiSyncService.ctorParameters = () => [
|
|
@@ -350,26 +372,27 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
350
372
|
});
|
|
351
373
|
this.pageSizes$ = new BehaviorSubject({
|
|
352
374
|
collectionSize: 0,
|
|
353
|
-
maxPaginationItemSize: 5
|
|
375
|
+
maxPaginationItemSize: 5,
|
|
354
376
|
});
|
|
355
|
-
this.pagination$ = combineLatest([
|
|
356
|
-
.
|
|
377
|
+
this.pagination$ = combineLatest([
|
|
378
|
+
this.currentPageAndSize$,
|
|
379
|
+
this.pageSizes$,
|
|
380
|
+
]).pipe(map(([currentPage, sizes]) => (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }))));
|
|
357
381
|
this.connectorInstances$ = combineLatest([
|
|
358
382
|
this.currentPageAndSize$,
|
|
359
383
|
this.connectorManagementService.getConnectorTypes(),
|
|
360
384
|
this.translateService.stream('key'),
|
|
361
|
-
this.stateService.refresh
|
|
362
|
-
])
|
|
363
|
-
.pipe(
|
|
364
|
-
this.pageSizes$.pipe(take(1)).subscribe((sizes) => {
|
|
385
|
+
this.stateService.refresh$,
|
|
386
|
+
]).pipe(tap(() => this.setFields()), switchMap(([currentPage, types]) => this.connectorManagementService.getConnectorInstancesByType(types.find(type => type.name.toLowerCase().includes('objectsapi')).id, { page: currentPage.page, size: currentPage.size })), tap(instanceRes => {
|
|
387
|
+
this.pageSizes$.pipe(take(1)).subscribe(sizes => {
|
|
365
388
|
this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
|
|
366
389
|
});
|
|
367
|
-
}), map(
|
|
368
|
-
this.noObjectsApiConnectors$ = this.connectorInstances$.pipe(map(
|
|
390
|
+
}), map(res => res.content), tap(() => this.loading$.next(false)));
|
|
391
|
+
this.noObjectsApiConnectors$ = this.connectorInstances$.pipe(map(instances => !instances || instances.length === 0));
|
|
369
392
|
this.disabled$ = this.stateService.inputDisabled$;
|
|
370
393
|
}
|
|
371
394
|
ngAfterViewInit() {
|
|
372
|
-
this.showSubscription = this.stateService.showExtensionModal$.subscribe(
|
|
395
|
+
this.showSubscription = this.stateService.showExtensionModal$.subscribe(show => {
|
|
373
396
|
if (show) {
|
|
374
397
|
this.show();
|
|
375
398
|
}
|
|
@@ -383,13 +406,13 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
383
406
|
(_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
384
407
|
}
|
|
385
408
|
paginationClicked(newPageNumber) {
|
|
386
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(
|
|
409
|
+
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
387
410
|
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
|
|
388
411
|
});
|
|
389
412
|
}
|
|
390
413
|
paginationSet(newPageSize) {
|
|
391
414
|
if (newPageSize) {
|
|
392
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(
|
|
415
|
+
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
393
416
|
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
|
|
394
417
|
});
|
|
395
418
|
}
|
|
@@ -403,8 +426,9 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
403
426
|
const splitObjectTypeUrl = objectTypeUrl === null || objectTypeUrl === void 0 ? void 0 : objectTypeUrl.split('/');
|
|
404
427
|
const objectTypeId = splitObjectTypeUrl[splitObjectTypeUrl.length - 1];
|
|
405
428
|
this.stateService.disableInput();
|
|
406
|
-
this.objectApiSyncService
|
|
407
|
-
.
|
|
429
|
+
this.objectApiSyncService
|
|
430
|
+
.createObjectSyncConfig({ connectorInstanceId, enabled, documentDefinitionName, objectTypeId })
|
|
431
|
+
.subscribe(res => {
|
|
408
432
|
this.alertService.success(this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
|
|
409
433
|
this.stateService.hideExtensionModal();
|
|
410
434
|
this.stateService.enableInput();
|
|
@@ -417,7 +441,7 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
417
441
|
setFields() {
|
|
418
442
|
const getTranslatedLabel = (key) => this.translateService.instant(`connectorManagement.labels.${key}`);
|
|
419
443
|
const keys = ['name'];
|
|
420
|
-
this.fields$.next(keys.map(
|
|
444
|
+
this.fields$.next(keys.map(key => ({ label: getTranslatedLabel(key), key })));
|
|
421
445
|
}
|
|
422
446
|
show() {
|
|
423
447
|
this.modal.show();
|
|
@@ -429,7 +453,7 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
429
453
|
ConnectorLinkExtensionModalComponent.decorators = [
|
|
430
454
|
{ type: Component, args: [{
|
|
431
455
|
selector: 'valtimo-connector-link-extension-modal',
|
|
432
|
-
template: "<valtimo-modal #modal [title]=\"'connectorManagement.extension.buttonText'| translate\">\n <div
|
|
456
|
+
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",
|
|
433
457
|
styles: [".disabled{filter:grayscale(1);opacity:.8;pointer-events:none}"]
|
|
434
458
|
},] }
|
|
435
459
|
];
|
|
@@ -471,8 +495,10 @@ class AddConnectorComponent {
|
|
|
471
495
|
this.disabled$ = this.stateService.inputDisabled$;
|
|
472
496
|
}
|
|
473
497
|
ngOnInit() {
|
|
474
|
-
this.refreshSubscription = combineLatest([
|
|
475
|
-
.
|
|
498
|
+
this.refreshSubscription = combineLatest([
|
|
499
|
+
this.stateService.showModal$,
|
|
500
|
+
this.stateService.refresh$,
|
|
501
|
+
]).subscribe(() => {
|
|
476
502
|
this.goBack();
|
|
477
503
|
});
|
|
478
504
|
}
|
|
@@ -487,12 +513,14 @@ class AddConnectorComponent {
|
|
|
487
513
|
this.selectedConnector$.next(undefined);
|
|
488
514
|
}
|
|
489
515
|
onSave(event) {
|
|
490
|
-
this.selectedConnector$.pipe(take(1)).subscribe(
|
|
491
|
-
this.connectorManagementService
|
|
516
|
+
this.selectedConnector$.pipe(take(1)).subscribe(selectedConnectorType => {
|
|
517
|
+
this.connectorManagementService
|
|
518
|
+
.createConnectorInstance({
|
|
492
519
|
name: event.name,
|
|
493
520
|
typeId: selectedConnectorType.id,
|
|
494
|
-
connectorProperties: event.properties
|
|
495
|
-
})
|
|
521
|
+
connectorProperties: event.properties,
|
|
522
|
+
})
|
|
523
|
+
.subscribe(() => {
|
|
496
524
|
this.alertService.success(this.translateService.instant('connectorManagement.messages.addSuccess'));
|
|
497
525
|
this.stateService.hideModal();
|
|
498
526
|
this.stateService.enableInput();
|
|
@@ -506,7 +534,7 @@ class AddConnectorComponent {
|
|
|
506
534
|
AddConnectorComponent.decorators = [
|
|
507
535
|
{ type: Component, args: [{
|
|
508
536
|
selector: 'valtimo-add-connector',
|
|
509
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container *ngIf=\"connectorTypes$ | async as connectorTypes; else loading\">\n <ng-container *ngIf=\"(selectedConnector$ | async) === undefined; else configure\">\n <p class=\"lead\">\n {{'connectorManagement.'
|
|
537
|
+
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",
|
|
510
538
|
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}"]
|
|
511
539
|
},] }
|
|
512
540
|
];
|
|
@@ -541,13 +569,15 @@ class ModifyConnectorComponent {
|
|
|
541
569
|
this.instance$ = this.stateService.selectedInstance$;
|
|
542
570
|
}
|
|
543
571
|
onSave(event) {
|
|
544
|
-
this.instance$.pipe(take(1)).subscribe(
|
|
545
|
-
this.connectorManagementService
|
|
572
|
+
this.instance$.pipe(take(1)).subscribe(instance => {
|
|
573
|
+
this.connectorManagementService
|
|
574
|
+
.updateConnectorInstance({
|
|
546
575
|
name: event.name,
|
|
547
576
|
typeId: instance.type.id,
|
|
548
577
|
id: instance.id,
|
|
549
|
-
connectorProperties: event.properties
|
|
550
|
-
})
|
|
578
|
+
connectorProperties: event.properties,
|
|
579
|
+
})
|
|
580
|
+
.subscribe(() => {
|
|
551
581
|
this.alertService.success(this.translateService.instant('connectorManagement.messages.modifySuccess'));
|
|
552
582
|
this.stateService.hideModal();
|
|
553
583
|
this.stateService.enableInput();
|
|
@@ -558,7 +588,7 @@ class ModifyConnectorComponent {
|
|
|
558
588
|
});
|
|
559
589
|
}
|
|
560
590
|
onDelete() {
|
|
561
|
-
this.instance$.pipe(take(1)).subscribe(
|
|
591
|
+
this.instance$.pipe(take(1)).subscribe(instance => {
|
|
562
592
|
this.connectorManagementService.deleteConnectorInstance(instance.id).subscribe(() => {
|
|
563
593
|
this.alertService.success(this.translateService.instant('connectorManagement.messages.deleteSuccess'));
|
|
564
594
|
this.stateService.hideModal();
|
|
@@ -573,7 +603,7 @@ class ModifyConnectorComponent {
|
|
|
573
603
|
ModifyConnectorComponent.decorators = [
|
|
574
604
|
{ type: Component, args: [{
|
|
575
605
|
selector: 'valtimo-modify-connector',
|
|
576
|
-
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",
|
|
606
|
+
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",
|
|
577
607
|
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 */"]
|
|
578
608
|
},] }
|
|
579
609
|
];
|
|
@@ -604,7 +634,7 @@ class ConnectorModalComponent {
|
|
|
604
634
|
this.stateService = stateService;
|
|
605
635
|
}
|
|
606
636
|
ngAfterViewInit() {
|
|
607
|
-
this.showSubscription = this.stateService.showModal$.subscribe(
|
|
637
|
+
this.showSubscription = this.stateService.showModal$.subscribe(show => {
|
|
608
638
|
if (show) {
|
|
609
639
|
this.show();
|
|
610
640
|
}
|
|
@@ -664,10 +694,14 @@ class EditConnectorPropertiesComponent {
|
|
|
664
694
|
this.modifiedProperties$ = new BehaviorSubject(undefined);
|
|
665
695
|
this.editFields$ = new BehaviorSubject([]);
|
|
666
696
|
this.connectorName$ = new BehaviorSubject('');
|
|
667
|
-
this.saveButtonDisabled$ = combineLatest([
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
697
|
+
this.saveButtonDisabled$ = combineLatest([
|
|
698
|
+
this.editFields$,
|
|
699
|
+
this.modifiedProperties$,
|
|
700
|
+
this.connectorName$,
|
|
701
|
+
]).pipe(map(([editFields, modifiedProperties, connectorName]) => {
|
|
702
|
+
const values = editFields.map(field => get(modifiedProperties, field.key));
|
|
703
|
+
const validValues = values.filter(value => Array.isArray(value) ? value.length > 0 : value === 0 || value);
|
|
704
|
+
return editFields.length !== validValues.length || !connectorName;
|
|
671
705
|
}));
|
|
672
706
|
this.disabled$ = this.stateService.inputDisabled$;
|
|
673
707
|
}
|
|
@@ -680,13 +714,13 @@ class EditConnectorPropertiesComponent {
|
|
|
680
714
|
this.setName();
|
|
681
715
|
}
|
|
682
716
|
multiFieldValuesSet(event) {
|
|
683
|
-
this.modifiedProperties$.pipe(take(1)).subscribe(
|
|
717
|
+
this.modifiedProperties$.pipe(take(1)).subscribe(properties => {
|
|
684
718
|
set(properties, event.editFieldKey, event.values);
|
|
685
719
|
this.modifiedProperties$.next(properties);
|
|
686
720
|
});
|
|
687
721
|
}
|
|
688
722
|
onSingleValueChange(value, editField) {
|
|
689
|
-
this.modifiedProperties$.pipe(take(1)).subscribe(
|
|
723
|
+
this.modifiedProperties$.pipe(take(1)).subscribe(properties => {
|
|
690
724
|
set(properties, editField.key, editField.editType === 'string' ? value.trim() : parseInt(value, 10));
|
|
691
725
|
this.modifiedProperties$.next(properties);
|
|
692
726
|
});
|
|
@@ -697,7 +731,8 @@ class EditConnectorPropertiesComponent {
|
|
|
697
731
|
onSave() {
|
|
698
732
|
this.stateService.disableInput();
|
|
699
733
|
combineLatest([this.modifiedProperties$, this.connectorName$])
|
|
700
|
-
.pipe(take(1))
|
|
734
|
+
.pipe(take(1))
|
|
735
|
+
.subscribe(([properties, name]) => {
|
|
701
736
|
this.propertiesSave.emit({ properties, name });
|
|
702
737
|
});
|
|
703
738
|
}
|
|
@@ -716,7 +751,7 @@ class EditConnectorPropertiesComponent {
|
|
|
716
751
|
setModifiedProperties(editFields) {
|
|
717
752
|
const propertiesCopy = cloneDeep(this.properties);
|
|
718
753
|
if (!this.withDefaults) {
|
|
719
|
-
editFields.forEach(
|
|
754
|
+
editFields.forEach(editField => {
|
|
720
755
|
set(propertiesCopy, editField.key, undefined);
|
|
721
756
|
});
|
|
722
757
|
}
|
|
@@ -726,9 +761,8 @@ class EditConnectorPropertiesComponent {
|
|
|
726
761
|
const editFields = [];
|
|
727
762
|
const keysToFilter = ['className'];
|
|
728
763
|
const handlePropertyLevel = (propertyLevel, previousKeys) => {
|
|
729
|
-
const propertyLevelKeys = Object.keys(propertyLevel)
|
|
730
|
-
|
|
731
|
-
propertyLevelKeys.forEach((key) => {
|
|
764
|
+
const propertyLevelKeys = Object.keys(propertyLevel).filter(key => !keysToFilter.includes(key));
|
|
765
|
+
propertyLevelKeys.forEach(key => {
|
|
732
766
|
const propertyValue = propertyLevel[key];
|
|
733
767
|
const baseEditField = Object.assign({ key: previousKeys + key }, (this.withDefaults && { defaultValue: propertyValue }));
|
|
734
768
|
if (typeof propertyValue === 'number') {
|
|
@@ -758,7 +792,7 @@ class EditConnectorPropertiesComponent {
|
|
|
758
792
|
EditConnectorPropertiesComponent.decorators = [
|
|
759
793
|
{ type: Component, args: [{
|
|
760
794
|
selector: 'valtimo-edit-connector-properties',
|
|
761
|
-
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
|
|
795
|
+
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",
|
|
762
796
|
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%}"]
|
|
763
797
|
},] }
|
|
764
798
|
];
|
|
@@ -798,16 +832,23 @@ class ConnectorLinkExtensionComponent {
|
|
|
798
832
|
this.alertService = alertService;
|
|
799
833
|
this.connectorManagementService = connectorManagementService;
|
|
800
834
|
this.loading$ = new BehaviorSubject(true);
|
|
801
|
-
this.objectApiSyncConfig$ = combineLatest([
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
835
|
+
this.objectApiSyncConfig$ = combineLatest([
|
|
836
|
+
this.route.params,
|
|
837
|
+
this.translateService.stream('key'),
|
|
838
|
+
this.stateService.refresh$,
|
|
839
|
+
]).pipe(switchMap(([params]) => this.objectApiSyncService.getObjectSyncConfigs(params.name)), switchMap(configs => combineLatest([
|
|
840
|
+
of(configs),
|
|
841
|
+
...configs.map(config => this.connectorManagementService
|
|
842
|
+
.getConnectorInstanceById(config.connectorInstanceId)
|
|
843
|
+
.pipe(catchError(() => of('')))),
|
|
844
|
+
])), map(results => {
|
|
845
|
+
const [, ...instances] = results.filter(result => result);
|
|
846
|
+
return results[0].map(syncConfig => {
|
|
807
847
|
var _a;
|
|
808
|
-
return (Object.assign(Object.assign({}, syncConfig), { title: ((_a = instances.find(
|
|
848
|
+
return (Object.assign(Object.assign({}, syncConfig), { title: ((_a = instances.find(instance => instance.id === syncConfig.connectorInstanceId)) === null || _a === void 0 ? void 0 : _a.name) ||
|
|
849
|
+
'Objects API' }));
|
|
809
850
|
});
|
|
810
|
-
}), map(
|
|
851
|
+
}), map(results => (Array.isArray(results) && results.length > 0 ? results[0] : null)), tap(() => {
|
|
811
852
|
this.loading$.next(false);
|
|
812
853
|
}));
|
|
813
854
|
this.disabled$ = this.stateService.inputDisabled$;
|
|
@@ -820,7 +861,9 @@ class ConnectorLinkExtensionComponent {
|
|
|
820
861
|
}
|
|
821
862
|
toggleSync(config) {
|
|
822
863
|
this.stateService.disableInput();
|
|
823
|
-
this.objectApiSyncService
|
|
864
|
+
this.objectApiSyncService
|
|
865
|
+
.modifyObjectSyncConfig(Object.assign(Object.assign({}, config), { enabled: !config.enabled }))
|
|
866
|
+
.subscribe(() => {
|
|
824
867
|
if (!config.enabled) {
|
|
825
868
|
this.alertService.success(this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
|
|
826
869
|
}
|
|
@@ -847,8 +890,8 @@ class ConnectorLinkExtensionComponent {
|
|
|
847
890
|
ConnectorLinkExtensionComponent.decorators = [
|
|
848
891
|
{ type: Component, args: [{
|
|
849
892
|
selector: 'valtimo-connector-link-extension',
|
|
850
|
-
template: "<h2 class=\"mb-4 mt-6\">{{'connectorManagement.extension.title' | translate}}</h2>\n\n<ng-container
|
|
851
|
-
styles: [".card-
|
|
893
|
+
template: "<h2 class=\"mb-4 mt-6\">{{ 'connectorManagement.extension.title' | translate }}</h2>\n\n<ng-container\n *ngIf=\"{\n syncConfig: objectApiSyncConfig$ | async,\n loading: loading$ | async,\n disabled: disabled$ | async\n } as obs\"\n>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <ng-container *ngIf=\"obs.syncConfig; else addSync\">\n <div class=\"card card-border card-contrast\">\n <div class=\"card-header card-header-contrast card-header-featured\">\n <div>\n {{ obs.syncConfig.title }}\n </div>\n <div class=\"controls\">\n <button\n class=\"btn btn-danger ml-3\"\n [disabled]=\"obs.disabled\"\n (click)=\"deleteSync(obs.syncConfig.id)\"\n >\n <i class=\"fa fa-trash\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <div class=\"setting-row\">\n Automatisch zaakdetails synchroniseren\n <div class=\"controls\">\n <div class=\"switch-button switch-button-success\">\n <input\n type=\"checkbox\"\n [checked]=\"obs.syncConfig.enabled\"\n [disabled]=\"obs.disabled\"\n name=\"sync\"\n id=\"sync\"\n (click)=\"toggleSync(obs.syncConfig)\"\n />\n <span><label for=\"sync\"></label></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<valtimo-connector-link-extension-modal></valtimo-connector-link-extension-modal>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n\n<ng-template #addSync>\n <div class=\"text-right mt-5\">\n <button class=\"btn btn-primary\" (click)=\"openModal()\" [disabled]=\"disabled$ | async\">\n <i class=\"icon mdi mdi-plus\"></i> \n {{ 'connectorManagement.extension.buttonText' | translate }}\n </button>\n </div>\n</ng-template>\n",
|
|
894
|
+
styles: [".card-header,.setting-row{flex-direction:row;justify-content:space-between}.card-header,.controls,.setting-row{align-items:center;display:flex}"]
|
|
852
895
|
},] }
|
|
853
896
|
];
|
|
854
897
|
ConnectorLinkExtensionComponent.ctorParameters = () => [
|
|
@@ -879,11 +922,11 @@ class MultiValueConnectorPropertyComponent {
|
|
|
879
922
|
constructor() {
|
|
880
923
|
this.valuesSet = new EventEmitter();
|
|
881
924
|
this.amountOfValues$ = new BehaviorSubject([null]);
|
|
882
|
-
this.removeButtonDisabled$ = this.amountOfValues$.pipe(map(
|
|
925
|
+
this.removeButtonDisabled$ = this.amountOfValues$.pipe(map(amountOfValues => amountOfValues.length === 1));
|
|
883
926
|
this.values$ = new BehaviorSubject({});
|
|
884
927
|
this.addButtonDisabled$ = combineLatest([this.values$, this.amountOfValues$]).pipe(map(([values, amountOfValues]) => {
|
|
885
928
|
const objectValues = Object.values(values);
|
|
886
|
-
const validObjectValues = objectValues.filter(
|
|
929
|
+
const validObjectValues = objectValues.filter(value => value === 0 || value);
|
|
887
930
|
return amountOfValues.length !== validObjectValues.length;
|
|
888
931
|
}));
|
|
889
932
|
}
|
|
@@ -896,17 +939,21 @@ class MultiValueConnectorPropertyComponent {
|
|
|
896
939
|
(_a = this.valuesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
897
940
|
}
|
|
898
941
|
onValueChange(value, editField, index) {
|
|
899
|
-
this.values$.pipe(take(1)).subscribe(
|
|
900
|
-
this.values$.next(Object.assign(Object.assign({}, values), { [index]: editField.editType === 'string[]'
|
|
942
|
+
this.values$.pipe(take(1)).subscribe(values => {
|
|
943
|
+
this.values$.next(Object.assign(Object.assign({}, values), { [index]: editField.editType === 'string[]'
|
|
944
|
+
? value.trim()
|
|
945
|
+
: parseInt(value, 10) }));
|
|
901
946
|
});
|
|
902
947
|
}
|
|
903
948
|
addRow() {
|
|
904
|
-
this.amountOfValues$.pipe(take(1)).subscribe(
|
|
949
|
+
this.amountOfValues$.pipe(take(1)).subscribe(amountOfValues => {
|
|
905
950
|
this.amountOfValues$.next([...amountOfValues, null]);
|
|
906
951
|
});
|
|
907
952
|
}
|
|
908
953
|
removeRow() {
|
|
909
|
-
combineLatest([this.values$, this.amountOfValues$])
|
|
954
|
+
combineLatest([this.values$, this.amountOfValues$])
|
|
955
|
+
.pipe(take(1))
|
|
956
|
+
.subscribe(([values, amountOfValues]) => {
|
|
910
957
|
const lastValueIndex = amountOfValues.length - 1;
|
|
911
958
|
const valuesCopy = Object.assign({}, values);
|
|
912
959
|
delete valuesCopy[lastValueIndex];
|
|
@@ -915,16 +962,16 @@ class MultiValueConnectorPropertyComponent {
|
|
|
915
962
|
});
|
|
916
963
|
}
|
|
917
964
|
openValuesSubscription() {
|
|
918
|
-
this.valuesSubscription = this.values$.subscribe(
|
|
965
|
+
this.valuesSubscription = this.values$.subscribe(values => {
|
|
919
966
|
this.valuesSet.emit({
|
|
920
967
|
editFieldKey: this.editField.key,
|
|
921
|
-
values: Object.values(values).filter(
|
|
968
|
+
values: Object.values(values).filter(value => value === 0 || value),
|
|
922
969
|
});
|
|
923
970
|
});
|
|
924
971
|
}
|
|
925
972
|
setDefaults() {
|
|
926
973
|
const defaultValue = this.defaultValue;
|
|
927
|
-
const validValues = Array.isArray(defaultValue) && defaultValue.filter(
|
|
974
|
+
const validValues = Array.isArray(defaultValue) && defaultValue.filter(value => value === 0 || value);
|
|
928
975
|
if (validValues && validValues.length > 0) {
|
|
929
976
|
const valuesObject = {};
|
|
930
977
|
validValues.forEach((value, index) => {
|
|
@@ -938,7 +985,7 @@ class MultiValueConnectorPropertyComponent {
|
|
|
938
985
|
MultiValueConnectorPropertyComponent.decorators = [
|
|
939
986
|
{ type: Component, args: [{
|
|
940
987
|
selector: 'valtimo-multi-value-connector-property',
|
|
941
|
-
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
|
|
988
|
+
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",
|
|
942
989
|
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%}"]
|
|
943
990
|
},] }
|
|
944
991
|
];
|
|
@@ -949,13 +996,16 @@ MultiValueConnectorPropertyComponent.propDecorators = {
|
|
|
949
996
|
valuesSet: [{ type: Output }]
|
|
950
997
|
};
|
|
951
998
|
|
|
999
|
+
const ɵ0$1 = {
|
|
1000
|
+
custom: "values = window['productRequestDefinitions'][row.caseDefinitionKey] || []",
|
|
1001
|
+
};
|
|
952
1002
|
const editProductAanvragenConnectorForm = {
|
|
953
1003
|
display: 'wizard',
|
|
954
1004
|
settings: {
|
|
955
1005
|
pdf: {
|
|
956
1006
|
id: '1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
|
|
957
|
-
src: 'https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0'
|
|
958
|
-
}
|
|
1007
|
+
src: 'https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
|
|
1008
|
+
},
|
|
959
1009
|
},
|
|
960
1010
|
components: [
|
|
961
1011
|
{
|
|
@@ -964,7 +1014,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
964
1014
|
buttonSettings: {
|
|
965
1015
|
previous: true,
|
|
966
1016
|
cancel: true,
|
|
967
|
-
next: true
|
|
1017
|
+
next: true,
|
|
968
1018
|
},
|
|
969
1019
|
navigateOnEnter: false,
|
|
970
1020
|
saveOnEnter: false,
|
|
@@ -981,35 +1031,35 @@ const editProductAanvragenConnectorForm = {
|
|
|
981
1031
|
attrs: [
|
|
982
1032
|
{
|
|
983
1033
|
attr: '',
|
|
984
|
-
value: ''
|
|
985
|
-
}
|
|
1034
|
+
value: '',
|
|
1035
|
+
},
|
|
986
1036
|
],
|
|
987
1037
|
content: 'connectorForm.productaanvraag.step0.tip',
|
|
988
1038
|
refreshOnChange: false,
|
|
989
1039
|
key: 'html4',
|
|
990
1040
|
type: 'htmlelement',
|
|
991
1041
|
input: false,
|
|
992
|
-
tableView: false
|
|
1042
|
+
tableView: false,
|
|
993
1043
|
},
|
|
994
1044
|
{
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1045
|
+
key: 'productAanvraagTypes',
|
|
1046
|
+
type: 'editgrid',
|
|
1047
|
+
input: true,
|
|
1048
|
+
validate: {
|
|
1049
|
+
minLength: 1,
|
|
1050
|
+
},
|
|
1051
|
+
customClass: 'edit-grid-component',
|
|
1002
1052
|
components: [
|
|
1003
1053
|
{
|
|
1004
1054
|
label: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.label',
|
|
1005
1055
|
tooltip: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.tooltip',
|
|
1006
1056
|
tableView: true,
|
|
1007
1057
|
validate: {
|
|
1008
|
-
required: true
|
|
1058
|
+
required: true,
|
|
1009
1059
|
},
|
|
1010
1060
|
key: 'productAanvraagType',
|
|
1011
1061
|
type: 'textfield',
|
|
1012
|
-
input: true
|
|
1062
|
+
input: true,
|
|
1013
1063
|
},
|
|
1014
1064
|
{
|
|
1015
1065
|
label: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.label',
|
|
@@ -1017,30 +1067,32 @@ const editProductAanvragenConnectorForm = {
|
|
|
1017
1067
|
placeholder: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.placeholder',
|
|
1018
1068
|
tableView: true,
|
|
1019
1069
|
validate: {
|
|
1020
|
-
required: true
|
|
1070
|
+
required: true,
|
|
1021
1071
|
},
|
|
1022
1072
|
key: 'caseDefinitionKey',
|
|
1023
1073
|
type: 'select',
|
|
1024
|
-
input: true
|
|
1074
|
+
input: true,
|
|
1025
1075
|
},
|
|
1026
1076
|
{
|
|
1027
1077
|
label: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.label',
|
|
1028
1078
|
widget: 'choicesjs',
|
|
1029
|
-
placeholder: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.placeholder',
|
|
1030
1079
|
tableView: true,
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1080
|
+
dataSrc: 'custom',
|
|
1081
|
+
data: ɵ0$1,
|
|
1082
|
+
dataType: 'string',
|
|
1083
|
+
refreshOn: 'row.caseDefinitionKey',
|
|
1084
|
+
clearOnRefresh: true,
|
|
1034
1085
|
key: 'processDefinitionKey',
|
|
1035
1086
|
type: 'select',
|
|
1036
1087
|
input: true,
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1088
|
+
validate: {
|
|
1089
|
+
required: true,
|
|
1090
|
+
},
|
|
1091
|
+
placeholder: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.placeholder',
|
|
1092
|
+
},
|
|
1093
|
+
],
|
|
1094
|
+
},
|
|
1095
|
+
],
|
|
1044
1096
|
},
|
|
1045
1097
|
{
|
|
1046
1098
|
title: 'connectorForm.productaanvraag.step1.title',
|
|
@@ -1048,7 +1100,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1048
1100
|
buttonSettings: {
|
|
1049
1101
|
previous: true,
|
|
1050
1102
|
cancel: true,
|
|
1051
|
-
next: true
|
|
1103
|
+
next: true,
|
|
1052
1104
|
},
|
|
1053
1105
|
navigateOnEnter: false,
|
|
1054
1106
|
saveOnEnter: false,
|
|
@@ -1065,15 +1117,15 @@ const editProductAanvragenConnectorForm = {
|
|
|
1065
1117
|
attrs: [
|
|
1066
1118
|
{
|
|
1067
1119
|
attr: '',
|
|
1068
|
-
value: ''
|
|
1069
|
-
}
|
|
1120
|
+
value: '',
|
|
1121
|
+
},
|
|
1070
1122
|
],
|
|
1071
1123
|
content: 'connectorForm.productaanvraag.step1.tip',
|
|
1072
1124
|
refreshOnChange: false,
|
|
1073
1125
|
key: 'html',
|
|
1074
1126
|
type: 'htmlelement',
|
|
1075
1127
|
input: false,
|
|
1076
|
-
tableView: false
|
|
1128
|
+
tableView: false,
|
|
1077
1129
|
},
|
|
1078
1130
|
{
|
|
1079
1131
|
title: 'connectorForm.productaanvraag.step1.objectsApi.panelTitle',
|
|
@@ -1089,24 +1141,24 @@ const editProductAanvragenConnectorForm = {
|
|
|
1089
1141
|
tooltip: 'connectorForm.productaanvraag.step1.objectsApi.url.tooltip',
|
|
1090
1142
|
tableView: true,
|
|
1091
1143
|
validate: {
|
|
1092
|
-
required: true
|
|
1144
|
+
required: true,
|
|
1093
1145
|
},
|
|
1094
1146
|
key: 'objectsApiUrl',
|
|
1095
1147
|
type: 'textfield',
|
|
1096
|
-
input: true
|
|
1148
|
+
input: true,
|
|
1097
1149
|
},
|
|
1098
1150
|
{
|
|
1099
1151
|
label: 'connectorForm.productaanvraag.step1.objectsApi.token.label',
|
|
1100
1152
|
tooltip: 'connectorForm.productaanvraag.step1.objectsApi.token.tooltip',
|
|
1101
1153
|
tableView: true,
|
|
1102
1154
|
validate: {
|
|
1103
|
-
required: true
|
|
1155
|
+
required: true,
|
|
1104
1156
|
},
|
|
1105
1157
|
key: 'objectsApiToken',
|
|
1106
1158
|
type: 'textfield',
|
|
1107
|
-
input: true
|
|
1108
|
-
}
|
|
1109
|
-
]
|
|
1159
|
+
input: true,
|
|
1160
|
+
},
|
|
1161
|
+
],
|
|
1110
1162
|
},
|
|
1111
1163
|
{
|
|
1112
1164
|
title: 'connectorForm.productaanvraag.step1.objectTypesApi.panelTitle',
|
|
@@ -1122,26 +1174,26 @@ const editProductAanvragenConnectorForm = {
|
|
|
1122
1174
|
tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.url.tooltip',
|
|
1123
1175
|
tableView: true,
|
|
1124
1176
|
validate: {
|
|
1125
|
-
required: true
|
|
1177
|
+
required: true,
|
|
1126
1178
|
},
|
|
1127
1179
|
key: 'objectTypesApiUrl',
|
|
1128
1180
|
type: 'textfield',
|
|
1129
|
-
input: true
|
|
1181
|
+
input: true,
|
|
1130
1182
|
},
|
|
1131
1183
|
{
|
|
1132
1184
|
label: 'connectorForm.productaanvraag.step1.objectTypesApi.token.label',
|
|
1133
1185
|
tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.token.tooltip',
|
|
1134
1186
|
tableView: true,
|
|
1135
1187
|
validate: {
|
|
1136
|
-
required: true
|
|
1188
|
+
required: true,
|
|
1137
1189
|
},
|
|
1138
1190
|
key: 'objectTypesApiToken',
|
|
1139
1191
|
type: 'textfield',
|
|
1140
|
-
input: true
|
|
1141
|
-
}
|
|
1142
|
-
]
|
|
1143
|
-
}
|
|
1144
|
-
]
|
|
1192
|
+
input: true,
|
|
1193
|
+
},
|
|
1194
|
+
],
|
|
1195
|
+
},
|
|
1196
|
+
],
|
|
1145
1197
|
},
|
|
1146
1198
|
{
|
|
1147
1199
|
title: 'connectorForm.productaanvraag.step2.title',
|
|
@@ -1149,7 +1201,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1149
1201
|
buttonSettings: {
|
|
1150
1202
|
previous: true,
|
|
1151
1203
|
cancel: true,
|
|
1152
|
-
next: true
|
|
1204
|
+
next: true,
|
|
1153
1205
|
},
|
|
1154
1206
|
navigateOnEnter: false,
|
|
1155
1207
|
saveOnEnter: false,
|
|
@@ -1166,15 +1218,15 @@ const editProductAanvragenConnectorForm = {
|
|
|
1166
1218
|
attrs: [
|
|
1167
1219
|
{
|
|
1168
1220
|
attr: '',
|
|
1169
|
-
value: ''
|
|
1170
|
-
}
|
|
1221
|
+
value: '',
|
|
1222
|
+
},
|
|
1171
1223
|
],
|
|
1172
1224
|
content: 'connectorForm.productaanvraag.step2.tip',
|
|
1173
1225
|
refreshOnChange: false,
|
|
1174
1226
|
key: 'html2',
|
|
1175
1227
|
type: 'htmlelement',
|
|
1176
1228
|
input: false,
|
|
1177
|
-
tableView: false
|
|
1229
|
+
tableView: false,
|
|
1178
1230
|
},
|
|
1179
1231
|
{
|
|
1180
1232
|
title: 'connectorForm.productaanvraag.step2.objectType.panelTitle',
|
|
@@ -1190,48 +1242,48 @@ const editProductAanvragenConnectorForm = {
|
|
|
1190
1242
|
tooltip: 'connectorForm.productaanvraag.step2.objectType.name.tooltip',
|
|
1191
1243
|
tableView: true,
|
|
1192
1244
|
validate: {
|
|
1193
|
-
required: true
|
|
1245
|
+
required: true,
|
|
1194
1246
|
},
|
|
1195
1247
|
key: 'objectTypeName',
|
|
1196
1248
|
type: 'textfield',
|
|
1197
|
-
input: true
|
|
1249
|
+
input: true,
|
|
1198
1250
|
},
|
|
1199
1251
|
{
|
|
1200
1252
|
label: 'connectorForm.productaanvraag.step2.objectType.title.label',
|
|
1201
1253
|
tooltip: 'connectorForm.productaanvraag.step2.objectType.title.tooltip',
|
|
1202
1254
|
tableView: true,
|
|
1203
1255
|
validate: {
|
|
1204
|
-
required: true
|
|
1256
|
+
required: true,
|
|
1205
1257
|
},
|
|
1206
1258
|
key: 'objectTypeTitle',
|
|
1207
1259
|
type: 'textfield',
|
|
1208
|
-
input: true
|
|
1260
|
+
input: true,
|
|
1209
1261
|
},
|
|
1210
1262
|
{
|
|
1211
1263
|
label: 'connectorForm.productaanvraag.step2.objectType.url.label',
|
|
1212
1264
|
tooltip: 'connectorForm.productaanvraag.step2.objectType.url.tooltip',
|
|
1213
1265
|
tableView: true,
|
|
1214
1266
|
validate: {
|
|
1215
|
-
required: true
|
|
1267
|
+
required: true,
|
|
1216
1268
|
},
|
|
1217
1269
|
key: 'objectTypeUrl',
|
|
1218
1270
|
type: 'textfield',
|
|
1219
|
-
input: true
|
|
1271
|
+
input: true,
|
|
1220
1272
|
},
|
|
1221
1273
|
{
|
|
1222
1274
|
label: 'connectorForm.productaanvraag.step2.objectType.typeVersion.label',
|
|
1223
1275
|
tooltip: 'connectorForm.productaanvraag.step2.objectType.typeVersion.tooltip',
|
|
1224
1276
|
tableView: true,
|
|
1225
1277
|
validate: {
|
|
1226
|
-
required: true
|
|
1278
|
+
required: true,
|
|
1227
1279
|
},
|
|
1228
1280
|
key: 'objectTypeVersion',
|
|
1229
1281
|
type: 'textfield',
|
|
1230
|
-
input: true
|
|
1231
|
-
}
|
|
1232
|
-
]
|
|
1233
|
-
}
|
|
1234
|
-
]
|
|
1282
|
+
input: true,
|
|
1283
|
+
},
|
|
1284
|
+
],
|
|
1285
|
+
},
|
|
1286
|
+
],
|
|
1235
1287
|
},
|
|
1236
1288
|
{
|
|
1237
1289
|
title: 'connectorForm.productaanvraag.step3.title',
|
|
@@ -1239,7 +1291,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1239
1291
|
buttonSettings: {
|
|
1240
1292
|
previous: true,
|
|
1241
1293
|
cancel: true,
|
|
1242
|
-
next: true
|
|
1294
|
+
next: true,
|
|
1243
1295
|
},
|
|
1244
1296
|
navigateOnEnter: false,
|
|
1245
1297
|
saveOnEnter: false,
|
|
@@ -1256,15 +1308,15 @@ const editProductAanvragenConnectorForm = {
|
|
|
1256
1308
|
attrs: [
|
|
1257
1309
|
{
|
|
1258
1310
|
attr: '',
|
|
1259
|
-
value: ''
|
|
1260
|
-
}
|
|
1311
|
+
value: '',
|
|
1312
|
+
},
|
|
1261
1313
|
],
|
|
1262
1314
|
content: 'connectorForm.productaanvraag.step3.tip',
|
|
1263
1315
|
refreshOnChange: false,
|
|
1264
1316
|
key: 'html1',
|
|
1265
1317
|
type: 'htmlelement',
|
|
1266
1318
|
input: false,
|
|
1267
|
-
tableView: false
|
|
1319
|
+
tableView: false,
|
|
1268
1320
|
},
|
|
1269
1321
|
{
|
|
1270
1322
|
title: 'connectorForm.productaanvraag.step3.openNotifications.panelTitle',
|
|
@@ -1280,48 +1332,48 @@ const editProductAanvragenConnectorForm = {
|
|
|
1280
1332
|
tooltip: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.tooltip',
|
|
1281
1333
|
tableView: true,
|
|
1282
1334
|
validate: {
|
|
1283
|
-
required: true
|
|
1335
|
+
required: true,
|
|
1284
1336
|
},
|
|
1285
1337
|
key: 'openNotificationsBaseUrl',
|
|
1286
1338
|
type: 'textfield',
|
|
1287
|
-
input: true
|
|
1339
|
+
input: true,
|
|
1288
1340
|
},
|
|
1289
1341
|
{
|
|
1290
1342
|
label: 'connectorForm.productaanvraag.step3.openNotifications.clientId.label',
|
|
1291
1343
|
tooltip: 'connectorForm.productaanvraag.step3.openNotifications.clientId.tooltip',
|
|
1292
1344
|
tableView: true,
|
|
1293
1345
|
validate: {
|
|
1294
|
-
required: true
|
|
1346
|
+
required: true,
|
|
1295
1347
|
},
|
|
1296
1348
|
key: 'openNotificationsClientId',
|
|
1297
1349
|
type: 'textfield',
|
|
1298
|
-
input: true
|
|
1350
|
+
input: true,
|
|
1299
1351
|
},
|
|
1300
1352
|
{
|
|
1301
1353
|
label: 'connectorForm.productaanvraag.step3.openNotifications.secret.label',
|
|
1302
1354
|
tooltip: 'connectorForm.productaanvraag.step3.openNotifications.secret.tooltip',
|
|
1303
1355
|
tableView: true,
|
|
1304
1356
|
validate: {
|
|
1305
|
-
required: true
|
|
1357
|
+
required: true,
|
|
1306
1358
|
},
|
|
1307
1359
|
key: 'openNotificationsSecret',
|
|
1308
1360
|
type: 'textfield',
|
|
1309
|
-
input: true
|
|
1361
|
+
input: true,
|
|
1310
1362
|
},
|
|
1311
1363
|
{
|
|
1312
1364
|
label: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.label',
|
|
1313
1365
|
tooltip: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.tooltip',
|
|
1314
1366
|
tableView: true,
|
|
1315
1367
|
validate: {
|
|
1316
|
-
required: true
|
|
1368
|
+
required: true,
|
|
1317
1369
|
},
|
|
1318
1370
|
key: 'openNotificationsCallbackBaseUrl',
|
|
1319
1371
|
type: 'textfield',
|
|
1320
|
-
input: true
|
|
1321
|
-
}
|
|
1322
|
-
]
|
|
1323
|
-
}
|
|
1324
|
-
]
|
|
1372
|
+
input: true,
|
|
1373
|
+
},
|
|
1374
|
+
],
|
|
1375
|
+
},
|
|
1376
|
+
],
|
|
1325
1377
|
},
|
|
1326
1378
|
{
|
|
1327
1379
|
title: 'connectorForm.productaanvraag.step4.title',
|
|
@@ -1329,7 +1381,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1329
1381
|
buttonSettings: {
|
|
1330
1382
|
previous: true,
|
|
1331
1383
|
cancel: true,
|
|
1332
|
-
next: true
|
|
1384
|
+
next: true,
|
|
1333
1385
|
},
|
|
1334
1386
|
navigateOnEnter: false,
|
|
1335
1387
|
saveOnEnter: false,
|
|
@@ -1346,15 +1398,15 @@ const editProductAanvragenConnectorForm = {
|
|
|
1346
1398
|
attrs: [
|
|
1347
1399
|
{
|
|
1348
1400
|
attr: '',
|
|
1349
|
-
value: ''
|
|
1350
|
-
}
|
|
1401
|
+
value: '',
|
|
1402
|
+
},
|
|
1351
1403
|
],
|
|
1352
1404
|
content: 'connectorForm.productaanvraag.step4.tip',
|
|
1353
1405
|
refreshOnChange: false,
|
|
1354
1406
|
key: 'html3',
|
|
1355
1407
|
type: 'htmlelement',
|
|
1356
1408
|
input: false,
|
|
1357
|
-
tableView: false
|
|
1409
|
+
tableView: false,
|
|
1358
1410
|
},
|
|
1359
1411
|
{
|
|
1360
1412
|
title: 'connectorForm.productaanvraag.step4.applicant.panelTitle',
|
|
@@ -1370,30 +1422,30 @@ const editProductAanvragenConnectorForm = {
|
|
|
1370
1422
|
attrs: [
|
|
1371
1423
|
{
|
|
1372
1424
|
attr: '',
|
|
1373
|
-
value: ''
|
|
1374
|
-
}
|
|
1425
|
+
value: '',
|
|
1426
|
+
},
|
|
1375
1427
|
],
|
|
1376
1428
|
content: 'connectorForm.productaanvraag.step4.applicant.tip',
|
|
1377
1429
|
refreshOnChange: false,
|
|
1378
1430
|
key: 'html5',
|
|
1379
1431
|
type: 'htmlelement',
|
|
1380
1432
|
input: false,
|
|
1381
|
-
tableView: false
|
|
1433
|
+
tableView: false,
|
|
1382
1434
|
},
|
|
1383
1435
|
{
|
|
1384
1436
|
label: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.label',
|
|
1385
1437
|
tooltip: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.tooltip',
|
|
1386
1438
|
tableView: true,
|
|
1387
1439
|
validate: {
|
|
1388
|
-
required: true
|
|
1440
|
+
required: true,
|
|
1389
1441
|
},
|
|
1390
1442
|
key: 'applicantRoleTypeUrl',
|
|
1391
1443
|
type: 'textfield',
|
|
1392
|
-
input: true
|
|
1393
|
-
}
|
|
1394
|
-
]
|
|
1395
|
-
}
|
|
1396
|
-
]
|
|
1444
|
+
input: true,
|
|
1445
|
+
},
|
|
1446
|
+
],
|
|
1447
|
+
},
|
|
1448
|
+
],
|
|
1397
1449
|
},
|
|
1398
1450
|
{
|
|
1399
1451
|
title: 'connectorForm.productaanvraag.step5.title',
|
|
@@ -1401,7 +1453,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1401
1453
|
buttonSettings: {
|
|
1402
1454
|
previous: true,
|
|
1403
1455
|
cancel: true,
|
|
1404
|
-
next: true
|
|
1456
|
+
next: true,
|
|
1405
1457
|
},
|
|
1406
1458
|
navigateOnEnter: false,
|
|
1407
1459
|
saveOnEnter: false,
|
|
@@ -1418,29 +1470,29 @@ const editProductAanvragenConnectorForm = {
|
|
|
1418
1470
|
attrs: [
|
|
1419
1471
|
{
|
|
1420
1472
|
attr: '',
|
|
1421
|
-
value: ''
|
|
1422
|
-
}
|
|
1473
|
+
value: '',
|
|
1474
|
+
},
|
|
1423
1475
|
],
|
|
1424
1476
|
content: 'connectorForm.productaanvraag.step5.tip',
|
|
1425
1477
|
refreshOnChange: false,
|
|
1426
1478
|
key: 'html6',
|
|
1427
1479
|
type: 'htmlelement',
|
|
1428
1480
|
input: false,
|
|
1429
|
-
tableView: false
|
|
1481
|
+
tableView: false,
|
|
1430
1482
|
},
|
|
1431
1483
|
{
|
|
1432
1484
|
label: 'connectorForm.productaanvraag.step5.name',
|
|
1433
1485
|
tableView: true,
|
|
1434
1486
|
validate: {
|
|
1435
|
-
required: true
|
|
1487
|
+
required: true,
|
|
1436
1488
|
},
|
|
1437
1489
|
key: 'connectorName',
|
|
1438
1490
|
type: 'textfield',
|
|
1439
|
-
input: true
|
|
1440
|
-
}
|
|
1441
|
-
]
|
|
1442
|
-
}
|
|
1443
|
-
]
|
|
1491
|
+
input: true,
|
|
1492
|
+
},
|
|
1493
|
+
],
|
|
1494
|
+
},
|
|
1495
|
+
],
|
|
1444
1496
|
};
|
|
1445
1497
|
|
|
1446
1498
|
/*
|
|
@@ -1469,56 +1521,30 @@ class EditProductAanvragenConnectorComponent {
|
|
|
1469
1521
|
this.connectorDelete = new EventEmitter();
|
|
1470
1522
|
this.formRefresh$ = new Subject();
|
|
1471
1523
|
this.formDefinition$ = new BehaviorSubject(undefined);
|
|
1472
|
-
this.translatedFormDefinition$ = this.formDefinition$.pipe(map(
|
|
1473
|
-
this.
|
|
1524
|
+
this.translatedFormDefinition$ = this.formDefinition$.pipe(map(definition => this.formTranslationService.translateForm(definition)));
|
|
1525
|
+
this.caseDefinitionOptions = [];
|
|
1526
|
+
this.processDocumentDefinitionOptions = {};
|
|
1474
1527
|
this.options = {
|
|
1475
|
-
disableAlerts: true
|
|
1528
|
+
disableAlerts: true,
|
|
1476
1529
|
};
|
|
1477
1530
|
this.mapCaseDefinitionKeyComponent = (component) => {
|
|
1478
|
-
var _a;
|
|
1479
1531
|
if (component.key === 'caseDefinitionKey') {
|
|
1480
|
-
|
|
1481
|
-
return Object.assign(Object.assign({}, component), { disabled: false, data: { values: definitionOptions } });
|
|
1482
|
-
}
|
|
1483
|
-
return component;
|
|
1484
|
-
};
|
|
1485
|
-
this.mapProcessDefinitionKeyComponent = (component) => {
|
|
1486
|
-
var _a;
|
|
1487
|
-
if (component.key === 'processDefinitionKey') {
|
|
1488
|
-
const processOptions = this.processDocumentDefinitions.map((definition) => ({ label: definition.processName, value: definition.id.processDefinitionKey }));
|
|
1489
|
-
if (((_a = this.processDocumentDefinitions) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
1490
|
-
return Object.assign(Object.assign({}, component), { disabled: false, data: { values: processOptions } });
|
|
1491
|
-
}
|
|
1492
|
-
else {
|
|
1493
|
-
return Object.assign(Object.assign({}, component), { disabled: true, data: { values: [] } });
|
|
1494
|
-
}
|
|
1532
|
+
return Object.assign(Object.assign({}, component), { disabled: false, data: { values: this.caseDefinitionOptions } });
|
|
1495
1533
|
}
|
|
1496
1534
|
return component;
|
|
1497
1535
|
};
|
|
1498
1536
|
}
|
|
1499
1537
|
ngOnInit() {
|
|
1538
|
+
window['productRequestDefinitions'] = {};
|
|
1500
1539
|
this.openFormDefinitionSubscription();
|
|
1501
1540
|
this.formDefinition$.next(editProductAanvragenConnectorForm);
|
|
1502
|
-
this.
|
|
1541
|
+
this.loadDefinitions();
|
|
1503
1542
|
}
|
|
1504
1543
|
ngOnDestroy() {
|
|
1505
1544
|
var _a, _b;
|
|
1506
1545
|
(_a = this.formDefinitionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1507
1546
|
(_b = this.translateSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
1508
1547
|
}
|
|
1509
|
-
onChange(object) {
|
|
1510
|
-
var _a;
|
|
1511
|
-
const caseDefinitionKeyValue = (_a = object === null || object === void 0 ? void 0 : object.data) === null || _a === void 0 ? void 0 : _a.caseDefinitionKey;
|
|
1512
|
-
const currentCaseDefinitionId = this.caseDefinitionId$.getValue();
|
|
1513
|
-
if (caseDefinitionKeyValue && caseDefinitionKeyValue !== currentCaseDefinitionId) {
|
|
1514
|
-
this.documentService.findProcessDocumentDefinitions(caseDefinitionKeyValue).subscribe((processDocumentDefinitions) => {
|
|
1515
|
-
this.processDocumentDefinitions = processDocumentDefinitions;
|
|
1516
|
-
const definitionWithProcessDefinitionKeyValues = this.formMappingService.mapComponents(this.formDefinition$.getValue(), this.mapProcessDefinitionKeyComponent);
|
|
1517
|
-
this.formDefinition$.next(definitionWithProcessDefinitionKeyValues);
|
|
1518
|
-
this.caseDefinitionId$.next(caseDefinitionKeyValue);
|
|
1519
|
-
});
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1522
1548
|
onSubmit(event) {
|
|
1523
1549
|
const submission = event.data;
|
|
1524
1550
|
const properties = cloneDeep(this.properties);
|
|
@@ -1533,23 +1559,20 @@ class EditProductAanvragenConnectorComponent {
|
|
|
1533
1559
|
properties.openNotificatieProperties.baseUrl = submission.openNotificationsBaseUrl;
|
|
1534
1560
|
properties.openNotificatieProperties.clientId = submission.openNotificationsClientId;
|
|
1535
1561
|
properties.openNotificatieProperties.secret = submission.openNotificationsSecret;
|
|
1536
|
-
properties.openNotificatieProperties.callbackBaseUrl =
|
|
1562
|
+
properties.openNotificatieProperties.callbackBaseUrl =
|
|
1563
|
+
submission.openNotificationsCallbackBaseUrl;
|
|
1537
1564
|
properties.aanvragerRolTypeUrl = submission.applicantRoleTypeUrl;
|
|
1538
|
-
properties.typeMapping =
|
|
1539
|
-
{
|
|
1540
|
-
productAanvraagType: submission.productAanvraagType,
|
|
1541
|
-
caseDefinitionKey: submission.caseDefinitionKey,
|
|
1542
|
-
processDefinitionKey: submission.processDefinitionKey
|
|
1543
|
-
}
|
|
1544
|
-
];
|
|
1565
|
+
properties.typeMapping = submission.productAanvraagTypes;
|
|
1545
1566
|
this.propertiesSave.emit({ properties, name: submission.connectorName });
|
|
1546
1567
|
}
|
|
1547
1568
|
onDelete() {
|
|
1548
1569
|
this.connectorDelete.emit();
|
|
1549
1570
|
}
|
|
1550
1571
|
openFormDefinitionSubscription() {
|
|
1551
|
-
this.formDefinitionSubscription = combineLatest([
|
|
1552
|
-
.
|
|
1572
|
+
this.formDefinitionSubscription = combineLatest([
|
|
1573
|
+
this.formDefinition$,
|
|
1574
|
+
this.translateService.stream('key'),
|
|
1575
|
+
]).subscribe(([form]) => {
|
|
1553
1576
|
const translatedForm = this.formTranslationService.translateForm(form);
|
|
1554
1577
|
this.refreshForm({ form: translatedForm });
|
|
1555
1578
|
});
|
|
@@ -1568,34 +1591,43 @@ class EditProductAanvragenConnectorComponent {
|
|
|
1568
1591
|
submission.openNotificationsBaseUrl = properties.openNotificatieProperties.baseUrl;
|
|
1569
1592
|
submission.openNotificationsClientId = properties.openNotificatieProperties.clientId;
|
|
1570
1593
|
submission.openNotificationsSecret = properties.openNotificatieProperties.secret;
|
|
1571
|
-
submission.openNotificationsCallbackBaseUrl =
|
|
1594
|
+
submission.openNotificationsCallbackBaseUrl =
|
|
1595
|
+
properties.openNotificatieProperties.callbackBaseUrl;
|
|
1572
1596
|
submission.applicantRoleTypeUrl = properties.aanvragerRolTypeUrl;
|
|
1573
|
-
submission.
|
|
1574
|
-
submission.caseDefinitionKey = properties.typeMapping[0].caseDefinitionKey;
|
|
1575
|
-
submission.processDefinitionKey = properties.typeMapping[0].processDefinitionKey;
|
|
1597
|
+
submission.productAanvraagTypes = properties.typeMapping;
|
|
1576
1598
|
submission.connectorName = this.defaultName;
|
|
1577
1599
|
this.refreshForm({ submission: { data: submission } });
|
|
1578
1600
|
}
|
|
1579
1601
|
refreshForm(refreshValue) {
|
|
1580
1602
|
this.formRefresh$.next(refreshValue);
|
|
1581
1603
|
}
|
|
1582
|
-
|
|
1583
|
-
|
|
1604
|
+
loadDefinitions() {
|
|
1605
|
+
let documentDefinitions;
|
|
1606
|
+
this.documentService
|
|
1607
|
+
.getAllDefinitions()
|
|
1608
|
+
.pipe(tap(resDocumentDefinitions => (documentDefinitions = resDocumentDefinitions.content)), switchMap(resDocumentDefinitions => combineLatest(resDocumentDefinitions.content.map(definition => this.documentService.findProcessDocumentDefinitions(definition.id.name)))), tap(res => {
|
|
1584
1609
|
var _a;
|
|
1585
|
-
this.
|
|
1586
|
-
|
|
1587
|
-
|
|
1610
|
+
this.caseDefinitionOptions = documentDefinitions.map(documentDefinition => {
|
|
1611
|
+
return { label: documentDefinition.id.name, value: documentDefinition.id.name };
|
|
1612
|
+
});
|
|
1613
|
+
documentDefinitions.forEach((documentDefinition, index) => {
|
|
1614
|
+
this.processDocumentDefinitionOptions[documentDefinition.id.name] = res[index].map(processDocumentDefinition => processDocumentDefinition.id.processDefinitionKey);
|
|
1615
|
+
});
|
|
1616
|
+
window['productRequestDefinitions'] = this.processDocumentDefinitionOptions;
|
|
1617
|
+
const definitionWithCaseDefinitionOptions = this.formMappingService.mapComponents(this.formDefinition$.getValue(), this.mapCaseDefinitionKeyComponent);
|
|
1618
|
+
this.formDefinition$.next(definitionWithCaseDefinitionOptions);
|
|
1588
1619
|
if ((_a = this.properties) === null || _a === void 0 ? void 0 : _a.aanvragerRolTypeUrl) {
|
|
1589
1620
|
this.prefillForm();
|
|
1590
1621
|
}
|
|
1591
|
-
})
|
|
1622
|
+
}))
|
|
1623
|
+
.subscribe();
|
|
1592
1624
|
}
|
|
1593
1625
|
}
|
|
1594
1626
|
EditProductAanvragenConnectorComponent.decorators = [
|
|
1595
1627
|
{ type: Component, args: [{
|
|
1596
1628
|
selector: 'valtimo-edit-product-aanvragen-connector',
|
|
1597
|
-
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 [
|
|
1598
|
-
styles: ["/*!\n * Copyright 2015-2021 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.edit-product-request ::ng-deep .btn-wizard-nav-cancel{display:none}.edit-product-request ::ng-deep .list-inline{display:flex;flex-direction:row;justify-content:flex-end}.edit-product-request.has-delete ::ng-deep .list-inline{margin-bottom:-30px}.edit-product-request .btn-danger{position:relative}"]
|
|
1629
|
+
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",
|
|
1630
|
+
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}"]
|
|
1599
1631
|
},] }
|
|
1600
1632
|
];
|
|
1601
1633
|
EditProductAanvragenConnectorComponent.ctorParameters = () => [
|
|
@@ -1683,7 +1715,7 @@ ConnectorManagementModule.decorators = [
|
|
|
1683
1715
|
ConnectorLinkExtensionComponent,
|
|
1684
1716
|
ConnectorLinkExtensionModalComponent,
|
|
1685
1717
|
EditProductAanvragenConnectorComponent,
|
|
1686
|
-
EditConnectorFormComponent
|
|
1718
|
+
EditConnectorFormComponent,
|
|
1687
1719
|
],
|
|
1688
1720
|
imports: [
|
|
1689
1721
|
CommonModule,
|
|
@@ -1693,7 +1725,7 @@ ConnectorManagementModule.decorators = [
|
|
|
1693
1725
|
ListModule,
|
|
1694
1726
|
SpinnerModule,
|
|
1695
1727
|
ModalModule,
|
|
1696
|
-
FormIoModule
|
|
1728
|
+
FormIoModule,
|
|
1697
1729
|
],
|
|
1698
1730
|
exports: [
|
|
1699
1731
|
ConnectorManagementComponent,
|
|
@@ -1704,11 +1736,9 @@ ConnectorManagementModule.decorators = [
|
|
|
1704
1736
|
MultiValueConnectorPropertyComponent,
|
|
1705
1737
|
ConnectorLinkExtensionComponent,
|
|
1706
1738
|
ConnectorLinkExtensionModalComponent,
|
|
1707
|
-
EditProductAanvragenConnectorComponent
|
|
1739
|
+
EditProductAanvragenConnectorComponent,
|
|
1708
1740
|
],
|
|
1709
|
-
entryComponents: [
|
|
1710
|
-
ConnectorLinkExtensionComponent,
|
|
1711
|
-
]
|
|
1741
|
+
entryComponents: [ConnectorLinkExtensionComponent],
|
|
1712
1742
|
},] }
|
|
1713
1743
|
];
|
|
1714
1744
|
|
|
@@ -1734,7 +1764,7 @@ function connectorLinkExtensionInitializer(injector) {
|
|
|
1734
1764
|
return new Promise((resolve, reject) => {
|
|
1735
1765
|
try {
|
|
1736
1766
|
logger.debug('connector link extension initializer before init');
|
|
1737
|
-
const extension = new Extension('ConnectorLink', new BasicExtensionPoint('dossier-management', 'dossier', '
|
|
1767
|
+
const extension = new Extension('ConnectorLink', new BasicExtensionPoint('dossier-management', 'dossier', 'right-panel', ConnectorLinkExtensionComponent));
|
|
1738
1768
|
configService.addExtension(extension);
|
|
1739
1769
|
logger.debug('connector link extension initializer after init');
|
|
1740
1770
|
resolve();
|