@valtimo/connector-management 4.15.3-next-main.15 → 4.15.3-next-main.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -7
- package/bundles/valtimo-connector-management.umd.js +220 -167
- package/bundles/valtimo-connector-management.umd.js.map +1 -1
- package/bundles/valtimo-connector-management.umd.min.js +1 -1
- 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 +20 -11
- 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 +19 -12
- package/esm2015/lib/components/edit-product-aanvragen-connector/edit-product-aanvragen-connector.form.js +89 -89
- 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 +4 -7
- package/esm2015/lib/connector-management.module.js +5 -7
- package/esm2015/lib/extension/connector-management.extension.init.js +1 -1
- 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 +1 -1
- package/esm2015/valtimo-connector-management.js +1 -1
- package/fesm2015/valtimo-connector-management.js +225 -190
- package/fesm2015/valtimo-connector-management.js.map +1 -1
- package/package.json +1 -1
- package/valtimo-connector-management.metadata.json +1 -1
|
@@ -60,7 +60,7 @@ class ConnectorManagementService {
|
|
|
60
60
|
ConnectorManagementService.ɵprov = ɵɵdefineInjectable({ factory: function ConnectorManagementService_Factory() { return new ConnectorManagementService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: ConnectorManagementService, providedIn: "root" });
|
|
61
61
|
ConnectorManagementService.decorators = [
|
|
62
62
|
{ type: Injectable, args: [{
|
|
63
|
-
providedIn: 'root'
|
|
63
|
+
providedIn: 'root',
|
|
64
64
|
},] }
|
|
65
65
|
];
|
|
66
66
|
ConnectorManagementService.ctorParameters = () => [
|
|
@@ -144,7 +144,7 @@ class ConnectorManagementStateService {
|
|
|
144
144
|
ConnectorManagementStateService.ɵprov = ɵɵdefineInjectable({ factory: function ConnectorManagementStateService_Factory() { return new ConnectorManagementStateService(); }, token: ConnectorManagementStateService, providedIn: "root" });
|
|
145
145
|
ConnectorManagementStateService.decorators = [
|
|
146
146
|
{ type: Injectable, args: [{
|
|
147
|
-
providedIn: 'root'
|
|
147
|
+
providedIn: 'root',
|
|
148
148
|
},] }
|
|
149
149
|
];
|
|
150
150
|
|
|
@@ -176,21 +176,29 @@ class ConnectorManagementComponent {
|
|
|
176
176
|
});
|
|
177
177
|
this.pageSizes$ = new BehaviorSubject({
|
|
178
178
|
collectionSize: 0,
|
|
179
|
-
maxPaginationItemSize: 5
|
|
179
|
+
maxPaginationItemSize: 5,
|
|
180
180
|
});
|
|
181
|
-
this.pagination$ = combineLatest([
|
|
182
|
-
.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
this.
|
|
181
|
+
this.pagination$ = combineLatest([
|
|
182
|
+
this.currentPageAndSize$,
|
|
183
|
+
this.pageSizes$,
|
|
184
|
+
]).pipe(map(([currentPage, sizes]) => (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }))));
|
|
185
|
+
this.connectorInstances$ = combineLatest([
|
|
186
|
+
this.currentPageAndSize$,
|
|
187
|
+
this.translateService.stream('key'),
|
|
188
|
+
this.stateService.refresh$,
|
|
189
|
+
]).pipe(tap(() => this.setFields()), switchMap(([currentPage]) => combineLatest([
|
|
190
|
+
this.connectorManagementService.getConnectorInstances({
|
|
191
|
+
page: currentPage.page,
|
|
192
|
+
size: currentPage.size,
|
|
193
|
+
}),
|
|
194
|
+
this.connectorManagementService.getConnectorTypes(),
|
|
187
195
|
])), tap(([instanceRes]) => {
|
|
188
|
-
this.pageSizes$.pipe(take(1)).subscribe(
|
|
196
|
+
this.pageSizes$.pipe(take(1)).subscribe(sizes => {
|
|
189
197
|
this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
|
|
190
198
|
});
|
|
191
|
-
}), map(([instanceRes, typesRes]) => instanceRes.content.map(
|
|
199
|
+
}), map(([instanceRes, typesRes]) => instanceRes.content.map(instance => {
|
|
192
200
|
var _a;
|
|
193
|
-
return Object.assign(Object.assign({}, instance), { typeName: (_a = typesRes.find(
|
|
201
|
+
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
202
|
})), tap(() => this.loading$.next(false)));
|
|
195
203
|
this.modalType$ = new BehaviorSubject('add');
|
|
196
204
|
}
|
|
@@ -198,13 +206,13 @@ class ConnectorManagementComponent {
|
|
|
198
206
|
this.stateService.hideModal();
|
|
199
207
|
}
|
|
200
208
|
paginationClicked(newPageNumber) {
|
|
201
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(
|
|
209
|
+
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
202
210
|
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
|
|
203
211
|
});
|
|
204
212
|
}
|
|
205
213
|
paginationSet(newPageSize) {
|
|
206
214
|
if (newPageSize) {
|
|
207
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(
|
|
215
|
+
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
208
216
|
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
|
|
209
217
|
});
|
|
210
218
|
}
|
|
@@ -221,13 +229,13 @@ class ConnectorManagementComponent {
|
|
|
221
229
|
setFields() {
|
|
222
230
|
const getTranslatedLabel = (key) => this.translateService.instant(`connectorManagement.labels.${key}`);
|
|
223
231
|
const keys = ['name', 'typeName'];
|
|
224
|
-
this.fields$.next(keys.map(
|
|
232
|
+
this.fields$.next(keys.map(key => ({ label: getTranslatedLabel(key), key })));
|
|
225
233
|
}
|
|
226
234
|
}
|
|
227
235
|
ConnectorManagementComponent.decorators = [
|
|
228
236
|
{ type: Component, args: [{
|
|
229
237
|
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
|
|
238
|
+
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
239
|
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
240
|
},] }
|
|
233
241
|
];
|
|
@@ -258,7 +266,7 @@ const routes = [
|
|
|
258
266
|
path: 'connectors',
|
|
259
267
|
component: ConnectorManagementComponent,
|
|
260
268
|
canActivate: [AuthGuardService],
|
|
261
|
-
data: ɵ0
|
|
269
|
+
data: ɵ0,
|
|
262
270
|
},
|
|
263
271
|
];
|
|
264
272
|
class ConnectorManagementRoutingModule {
|
|
@@ -266,11 +274,8 @@ class ConnectorManagementRoutingModule {
|
|
|
266
274
|
ConnectorManagementRoutingModule.decorators = [
|
|
267
275
|
{ type: NgModule, args: [{
|
|
268
276
|
declarations: [],
|
|
269
|
-
imports: [
|
|
270
|
-
|
|
271
|
-
RouterModule.forChild(routes),
|
|
272
|
-
],
|
|
273
|
-
exports: [RouterModule]
|
|
277
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
278
|
+
exports: [RouterModule],
|
|
274
279
|
},] }
|
|
275
280
|
];
|
|
276
281
|
|
|
@@ -311,7 +316,7 @@ class ObjectApiSyncService {
|
|
|
311
316
|
ObjectApiSyncService.ɵprov = ɵɵdefineInjectable({ factory: function ObjectApiSyncService_Factory() { return new ObjectApiSyncService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: ObjectApiSyncService, providedIn: "root" });
|
|
312
317
|
ObjectApiSyncService.decorators = [
|
|
313
318
|
{ type: Injectable, args: [{
|
|
314
|
-
providedIn: 'root'
|
|
319
|
+
providedIn: 'root',
|
|
315
320
|
},] }
|
|
316
321
|
];
|
|
317
322
|
ObjectApiSyncService.ctorParameters = () => [
|
|
@@ -350,26 +355,27 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
350
355
|
});
|
|
351
356
|
this.pageSizes$ = new BehaviorSubject({
|
|
352
357
|
collectionSize: 0,
|
|
353
|
-
maxPaginationItemSize: 5
|
|
358
|
+
maxPaginationItemSize: 5,
|
|
354
359
|
});
|
|
355
|
-
this.pagination$ = combineLatest([
|
|
356
|
-
.
|
|
360
|
+
this.pagination$ = combineLatest([
|
|
361
|
+
this.currentPageAndSize$,
|
|
362
|
+
this.pageSizes$,
|
|
363
|
+
]).pipe(map(([currentPage, sizes]) => (Object.assign(Object.assign(Object.assign({}, currentPage), sizes), { page: currentPage.page + 1 }))));
|
|
357
364
|
this.connectorInstances$ = combineLatest([
|
|
358
365
|
this.currentPageAndSize$,
|
|
359
366
|
this.connectorManagementService.getConnectorTypes(),
|
|
360
367
|
this.translateService.stream('key'),
|
|
361
|
-
this.stateService.refresh
|
|
362
|
-
])
|
|
363
|
-
.pipe(
|
|
364
|
-
this.pageSizes$.pipe(take(1)).subscribe((sizes) => {
|
|
368
|
+
this.stateService.refresh$,
|
|
369
|
+
]).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 => {
|
|
370
|
+
this.pageSizes$.pipe(take(1)).subscribe(sizes => {
|
|
365
371
|
this.pageSizes$.next(Object.assign(Object.assign({}, sizes), { collectionSize: instanceRes.totalElements }));
|
|
366
372
|
});
|
|
367
|
-
}), map(
|
|
368
|
-
this.noObjectsApiConnectors$ = this.connectorInstances$.pipe(map(
|
|
373
|
+
}), map(res => res.content), tap(() => this.loading$.next(false)));
|
|
374
|
+
this.noObjectsApiConnectors$ = this.connectorInstances$.pipe(map(instances => !instances || instances.length === 0));
|
|
369
375
|
this.disabled$ = this.stateService.inputDisabled$;
|
|
370
376
|
}
|
|
371
377
|
ngAfterViewInit() {
|
|
372
|
-
this.showSubscription = this.stateService.showExtensionModal$.subscribe(
|
|
378
|
+
this.showSubscription = this.stateService.showExtensionModal$.subscribe(show => {
|
|
373
379
|
if (show) {
|
|
374
380
|
this.show();
|
|
375
381
|
}
|
|
@@ -383,13 +389,13 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
383
389
|
(_a = this.showSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
384
390
|
}
|
|
385
391
|
paginationClicked(newPageNumber) {
|
|
386
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(
|
|
392
|
+
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
387
393
|
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { page: newPageNumber - 1 }));
|
|
388
394
|
});
|
|
389
395
|
}
|
|
390
396
|
paginationSet(newPageSize) {
|
|
391
397
|
if (newPageSize) {
|
|
392
|
-
this.currentPageAndSize$.pipe(take(1)).subscribe(
|
|
398
|
+
this.currentPageAndSize$.pipe(take(1)).subscribe(currentPage => {
|
|
393
399
|
this.currentPageAndSize$.next(Object.assign(Object.assign({}, currentPage), { size: newPageSize }));
|
|
394
400
|
});
|
|
395
401
|
}
|
|
@@ -403,8 +409,9 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
403
409
|
const splitObjectTypeUrl = objectTypeUrl === null || objectTypeUrl === void 0 ? void 0 : objectTypeUrl.split('/');
|
|
404
410
|
const objectTypeId = splitObjectTypeUrl[splitObjectTypeUrl.length - 1];
|
|
405
411
|
this.stateService.disableInput();
|
|
406
|
-
this.objectApiSyncService
|
|
407
|
-
.
|
|
412
|
+
this.objectApiSyncService
|
|
413
|
+
.createObjectSyncConfig({ connectorInstanceId, enabled, documentDefinitionName, objectTypeId })
|
|
414
|
+
.subscribe(res => {
|
|
408
415
|
this.alertService.success(this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
|
|
409
416
|
this.stateService.hideExtensionModal();
|
|
410
417
|
this.stateService.enableInput();
|
|
@@ -417,7 +424,7 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
417
424
|
setFields() {
|
|
418
425
|
const getTranslatedLabel = (key) => this.translateService.instant(`connectorManagement.labels.${key}`);
|
|
419
426
|
const keys = ['name'];
|
|
420
|
-
this.fields$.next(keys.map(
|
|
427
|
+
this.fields$.next(keys.map(key => ({ label: getTranslatedLabel(key), key })));
|
|
421
428
|
}
|
|
422
429
|
show() {
|
|
423
430
|
this.modal.show();
|
|
@@ -429,7 +436,7 @@ class ConnectorLinkExtensionModalComponent {
|
|
|
429
436
|
ConnectorLinkExtensionModalComponent.decorators = [
|
|
430
437
|
{ type: Component, args: [{
|
|
431
438
|
selector: 'valtimo-connector-link-extension-modal',
|
|
432
|
-
template: "<valtimo-modal #modal [title]=\"'connectorManagement.extension.buttonText'| translate\">\n <div
|
|
439
|
+
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
440
|
styles: [".disabled{filter:grayscale(1);opacity:.8;pointer-events:none}"]
|
|
434
441
|
},] }
|
|
435
442
|
];
|
|
@@ -471,8 +478,10 @@ class AddConnectorComponent {
|
|
|
471
478
|
this.disabled$ = this.stateService.inputDisabled$;
|
|
472
479
|
}
|
|
473
480
|
ngOnInit() {
|
|
474
|
-
this.refreshSubscription = combineLatest([
|
|
475
|
-
.
|
|
481
|
+
this.refreshSubscription = combineLatest([
|
|
482
|
+
this.stateService.showModal$,
|
|
483
|
+
this.stateService.refresh$,
|
|
484
|
+
]).subscribe(() => {
|
|
476
485
|
this.goBack();
|
|
477
486
|
});
|
|
478
487
|
}
|
|
@@ -487,12 +496,14 @@ class AddConnectorComponent {
|
|
|
487
496
|
this.selectedConnector$.next(undefined);
|
|
488
497
|
}
|
|
489
498
|
onSave(event) {
|
|
490
|
-
this.selectedConnector$.pipe(take(1)).subscribe(
|
|
491
|
-
this.connectorManagementService
|
|
499
|
+
this.selectedConnector$.pipe(take(1)).subscribe(selectedConnectorType => {
|
|
500
|
+
this.connectorManagementService
|
|
501
|
+
.createConnectorInstance({
|
|
492
502
|
name: event.name,
|
|
493
503
|
typeId: selectedConnectorType.id,
|
|
494
|
-
connectorProperties: event.properties
|
|
495
|
-
})
|
|
504
|
+
connectorProperties: event.properties,
|
|
505
|
+
})
|
|
506
|
+
.subscribe(() => {
|
|
496
507
|
this.alertService.success(this.translateService.instant('connectorManagement.messages.addSuccess'));
|
|
497
508
|
this.stateService.hideModal();
|
|
498
509
|
this.stateService.enableInput();
|
|
@@ -506,7 +517,7 @@ class AddConnectorComponent {
|
|
|
506
517
|
AddConnectorComponent.decorators = [
|
|
507
518
|
{ type: Component, args: [{
|
|
508
519
|
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.'
|
|
520
|
+
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
521
|
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
522
|
},] }
|
|
512
523
|
];
|
|
@@ -541,13 +552,15 @@ class ModifyConnectorComponent {
|
|
|
541
552
|
this.instance$ = this.stateService.selectedInstance$;
|
|
542
553
|
}
|
|
543
554
|
onSave(event) {
|
|
544
|
-
this.instance$.pipe(take(1)).subscribe(
|
|
545
|
-
this.connectorManagementService
|
|
555
|
+
this.instance$.pipe(take(1)).subscribe(instance => {
|
|
556
|
+
this.connectorManagementService
|
|
557
|
+
.updateConnectorInstance({
|
|
546
558
|
name: event.name,
|
|
547
559
|
typeId: instance.type.id,
|
|
548
560
|
id: instance.id,
|
|
549
|
-
connectorProperties: event.properties
|
|
550
|
-
})
|
|
561
|
+
connectorProperties: event.properties,
|
|
562
|
+
})
|
|
563
|
+
.subscribe(() => {
|
|
551
564
|
this.alertService.success(this.translateService.instant('connectorManagement.messages.modifySuccess'));
|
|
552
565
|
this.stateService.hideModal();
|
|
553
566
|
this.stateService.enableInput();
|
|
@@ -558,7 +571,7 @@ class ModifyConnectorComponent {
|
|
|
558
571
|
});
|
|
559
572
|
}
|
|
560
573
|
onDelete() {
|
|
561
|
-
this.instance$.pipe(take(1)).subscribe(
|
|
574
|
+
this.instance$.pipe(take(1)).subscribe(instance => {
|
|
562
575
|
this.connectorManagementService.deleteConnectorInstance(instance.id).subscribe(() => {
|
|
563
576
|
this.alertService.success(this.translateService.instant('connectorManagement.messages.deleteSuccess'));
|
|
564
577
|
this.stateService.hideModal();
|
|
@@ -573,7 +586,7 @@ class ModifyConnectorComponent {
|
|
|
573
586
|
ModifyConnectorComponent.decorators = [
|
|
574
587
|
{ type: Component, args: [{
|
|
575
588
|
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",
|
|
589
|
+
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
590
|
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
591
|
},] }
|
|
579
592
|
];
|
|
@@ -604,7 +617,7 @@ class ConnectorModalComponent {
|
|
|
604
617
|
this.stateService = stateService;
|
|
605
618
|
}
|
|
606
619
|
ngAfterViewInit() {
|
|
607
|
-
this.showSubscription = this.stateService.showModal$.subscribe(
|
|
620
|
+
this.showSubscription = this.stateService.showModal$.subscribe(show => {
|
|
608
621
|
if (show) {
|
|
609
622
|
this.show();
|
|
610
623
|
}
|
|
@@ -664,10 +677,14 @@ class EditConnectorPropertiesComponent {
|
|
|
664
677
|
this.modifiedProperties$ = new BehaviorSubject(undefined);
|
|
665
678
|
this.editFields$ = new BehaviorSubject([]);
|
|
666
679
|
this.connectorName$ = new BehaviorSubject('');
|
|
667
|
-
this.saveButtonDisabled$ = combineLatest([
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
680
|
+
this.saveButtonDisabled$ = combineLatest([
|
|
681
|
+
this.editFields$,
|
|
682
|
+
this.modifiedProperties$,
|
|
683
|
+
this.connectorName$,
|
|
684
|
+
]).pipe(map(([editFields, modifiedProperties, connectorName]) => {
|
|
685
|
+
const values = editFields.map(field => get(modifiedProperties, field.key));
|
|
686
|
+
const validValues = values.filter(value => Array.isArray(value) ? value.length > 0 : value === 0 || value);
|
|
687
|
+
return editFields.length !== validValues.length || !connectorName;
|
|
671
688
|
}));
|
|
672
689
|
this.disabled$ = this.stateService.inputDisabled$;
|
|
673
690
|
}
|
|
@@ -680,13 +697,13 @@ class EditConnectorPropertiesComponent {
|
|
|
680
697
|
this.setName();
|
|
681
698
|
}
|
|
682
699
|
multiFieldValuesSet(event) {
|
|
683
|
-
this.modifiedProperties$.pipe(take(1)).subscribe(
|
|
700
|
+
this.modifiedProperties$.pipe(take(1)).subscribe(properties => {
|
|
684
701
|
set(properties, event.editFieldKey, event.values);
|
|
685
702
|
this.modifiedProperties$.next(properties);
|
|
686
703
|
});
|
|
687
704
|
}
|
|
688
705
|
onSingleValueChange(value, editField) {
|
|
689
|
-
this.modifiedProperties$.pipe(take(1)).subscribe(
|
|
706
|
+
this.modifiedProperties$.pipe(take(1)).subscribe(properties => {
|
|
690
707
|
set(properties, editField.key, editField.editType === 'string' ? value.trim() : parseInt(value, 10));
|
|
691
708
|
this.modifiedProperties$.next(properties);
|
|
692
709
|
});
|
|
@@ -697,7 +714,8 @@ class EditConnectorPropertiesComponent {
|
|
|
697
714
|
onSave() {
|
|
698
715
|
this.stateService.disableInput();
|
|
699
716
|
combineLatest([this.modifiedProperties$, this.connectorName$])
|
|
700
|
-
.pipe(take(1))
|
|
717
|
+
.pipe(take(1))
|
|
718
|
+
.subscribe(([properties, name]) => {
|
|
701
719
|
this.propertiesSave.emit({ properties, name });
|
|
702
720
|
});
|
|
703
721
|
}
|
|
@@ -716,7 +734,7 @@ class EditConnectorPropertiesComponent {
|
|
|
716
734
|
setModifiedProperties(editFields) {
|
|
717
735
|
const propertiesCopy = cloneDeep(this.properties);
|
|
718
736
|
if (!this.withDefaults) {
|
|
719
|
-
editFields.forEach(
|
|
737
|
+
editFields.forEach(editField => {
|
|
720
738
|
set(propertiesCopy, editField.key, undefined);
|
|
721
739
|
});
|
|
722
740
|
}
|
|
@@ -726,9 +744,8 @@ class EditConnectorPropertiesComponent {
|
|
|
726
744
|
const editFields = [];
|
|
727
745
|
const keysToFilter = ['className'];
|
|
728
746
|
const handlePropertyLevel = (propertyLevel, previousKeys) => {
|
|
729
|
-
const propertyLevelKeys = Object.keys(propertyLevel)
|
|
730
|
-
|
|
731
|
-
propertyLevelKeys.forEach((key) => {
|
|
747
|
+
const propertyLevelKeys = Object.keys(propertyLevel).filter(key => !keysToFilter.includes(key));
|
|
748
|
+
propertyLevelKeys.forEach(key => {
|
|
732
749
|
const propertyValue = propertyLevel[key];
|
|
733
750
|
const baseEditField = Object.assign({ key: previousKeys + key }, (this.withDefaults && { defaultValue: propertyValue }));
|
|
734
751
|
if (typeof propertyValue === 'number') {
|
|
@@ -758,7 +775,7 @@ class EditConnectorPropertiesComponent {
|
|
|
758
775
|
EditConnectorPropertiesComponent.decorators = [
|
|
759
776
|
{ type: Component, args: [{
|
|
760
777
|
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
|
|
778
|
+
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
779
|
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
780
|
},] }
|
|
764
781
|
];
|
|
@@ -798,16 +815,23 @@ class ConnectorLinkExtensionComponent {
|
|
|
798
815
|
this.alertService = alertService;
|
|
799
816
|
this.connectorManagementService = connectorManagementService;
|
|
800
817
|
this.loading$ = new BehaviorSubject(true);
|
|
801
|
-
this.objectApiSyncConfig$ = combineLatest([
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
818
|
+
this.objectApiSyncConfig$ = combineLatest([
|
|
819
|
+
this.route.params,
|
|
820
|
+
this.translateService.stream('key'),
|
|
821
|
+
this.stateService.refresh$,
|
|
822
|
+
]).pipe(switchMap(([params]) => this.objectApiSyncService.getObjectSyncConfigs(params.name)), switchMap(configs => combineLatest([
|
|
823
|
+
of(configs),
|
|
824
|
+
...configs.map(config => this.connectorManagementService
|
|
825
|
+
.getConnectorInstanceById(config.connectorInstanceId)
|
|
826
|
+
.pipe(catchError(() => of('')))),
|
|
827
|
+
])), map(results => {
|
|
828
|
+
const [, ...instances] = results.filter(result => result);
|
|
829
|
+
return results[0].map(syncConfig => {
|
|
807
830
|
var _a;
|
|
808
|
-
return (Object.assign(Object.assign({}, syncConfig), { title: ((_a = instances.find(
|
|
831
|
+
return (Object.assign(Object.assign({}, syncConfig), { title: ((_a = instances.find(instance => instance.id === syncConfig.connectorInstanceId)) === null || _a === void 0 ? void 0 : _a.name) ||
|
|
832
|
+
'Objects API' }));
|
|
809
833
|
});
|
|
810
|
-
}), map(
|
|
834
|
+
}), map(results => (Array.isArray(results) && results.length > 0 ? results[0] : null)), tap(() => {
|
|
811
835
|
this.loading$.next(false);
|
|
812
836
|
}));
|
|
813
837
|
this.disabled$ = this.stateService.inputDisabled$;
|
|
@@ -820,7 +844,9 @@ class ConnectorLinkExtensionComponent {
|
|
|
820
844
|
}
|
|
821
845
|
toggleSync(config) {
|
|
822
846
|
this.stateService.disableInput();
|
|
823
|
-
this.objectApiSyncService
|
|
847
|
+
this.objectApiSyncService
|
|
848
|
+
.modifyObjectSyncConfig(Object.assign(Object.assign({}, config), { enabled: !config.enabled }))
|
|
849
|
+
.subscribe(() => {
|
|
824
850
|
if (!config.enabled) {
|
|
825
851
|
this.alertService.success(this.translateService.instant('connectorManagement.extension.addSyncSuccess'));
|
|
826
852
|
}
|
|
@@ -847,7 +873,7 @@ class ConnectorLinkExtensionComponent {
|
|
|
847
873
|
ConnectorLinkExtensionComponent.decorators = [
|
|
848
874
|
{ type: Component, args: [{
|
|
849
875
|
selector: 'valtimo-connector-link-extension',
|
|
850
|
-
template: "<h2 class=\"mb-4 mt-6\">{{'connectorManagement.extension.title' | translate}}</h2>\n\n<ng-container
|
|
876
|
+
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",
|
|
851
877
|
styles: [".card-header,.setting-row{flex-direction:row;justify-content:space-between}.card-header,.controls,.setting-row{align-items:center;display:flex}"]
|
|
852
878
|
},] }
|
|
853
879
|
];
|
|
@@ -879,11 +905,11 @@ class MultiValueConnectorPropertyComponent {
|
|
|
879
905
|
constructor() {
|
|
880
906
|
this.valuesSet = new EventEmitter();
|
|
881
907
|
this.amountOfValues$ = new BehaviorSubject([null]);
|
|
882
|
-
this.removeButtonDisabled$ = this.amountOfValues$.pipe(map(
|
|
908
|
+
this.removeButtonDisabled$ = this.amountOfValues$.pipe(map(amountOfValues => amountOfValues.length === 1));
|
|
883
909
|
this.values$ = new BehaviorSubject({});
|
|
884
910
|
this.addButtonDisabled$ = combineLatest([this.values$, this.amountOfValues$]).pipe(map(([values, amountOfValues]) => {
|
|
885
911
|
const objectValues = Object.values(values);
|
|
886
|
-
const validObjectValues = objectValues.filter(
|
|
912
|
+
const validObjectValues = objectValues.filter(value => value === 0 || value);
|
|
887
913
|
return amountOfValues.length !== validObjectValues.length;
|
|
888
914
|
}));
|
|
889
915
|
}
|
|
@@ -896,17 +922,21 @@ class MultiValueConnectorPropertyComponent {
|
|
|
896
922
|
(_a = this.valuesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
897
923
|
}
|
|
898
924
|
onValueChange(value, editField, index) {
|
|
899
|
-
this.values$.pipe(take(1)).subscribe(
|
|
900
|
-
this.values$.next(Object.assign(Object.assign({}, values), { [index]: editField.editType === 'string[]'
|
|
925
|
+
this.values$.pipe(take(1)).subscribe(values => {
|
|
926
|
+
this.values$.next(Object.assign(Object.assign({}, values), { [index]: editField.editType === 'string[]'
|
|
927
|
+
? value.trim()
|
|
928
|
+
: parseInt(value, 10) }));
|
|
901
929
|
});
|
|
902
930
|
}
|
|
903
931
|
addRow() {
|
|
904
|
-
this.amountOfValues$.pipe(take(1)).subscribe(
|
|
932
|
+
this.amountOfValues$.pipe(take(1)).subscribe(amountOfValues => {
|
|
905
933
|
this.amountOfValues$.next([...amountOfValues, null]);
|
|
906
934
|
});
|
|
907
935
|
}
|
|
908
936
|
removeRow() {
|
|
909
|
-
combineLatest([this.values$, this.amountOfValues$])
|
|
937
|
+
combineLatest([this.values$, this.amountOfValues$])
|
|
938
|
+
.pipe(take(1))
|
|
939
|
+
.subscribe(([values, amountOfValues]) => {
|
|
910
940
|
const lastValueIndex = amountOfValues.length - 1;
|
|
911
941
|
const valuesCopy = Object.assign({}, values);
|
|
912
942
|
delete valuesCopy[lastValueIndex];
|
|
@@ -915,16 +945,16 @@ class MultiValueConnectorPropertyComponent {
|
|
|
915
945
|
});
|
|
916
946
|
}
|
|
917
947
|
openValuesSubscription() {
|
|
918
|
-
this.valuesSubscription = this.values$.subscribe(
|
|
948
|
+
this.valuesSubscription = this.values$.subscribe(values => {
|
|
919
949
|
this.valuesSet.emit({
|
|
920
950
|
editFieldKey: this.editField.key,
|
|
921
|
-
values: Object.values(values).filter(
|
|
951
|
+
values: Object.values(values).filter(value => value === 0 || value),
|
|
922
952
|
});
|
|
923
953
|
});
|
|
924
954
|
}
|
|
925
955
|
setDefaults() {
|
|
926
956
|
const defaultValue = this.defaultValue;
|
|
927
|
-
const validValues = Array.isArray(defaultValue) && defaultValue.filter(
|
|
957
|
+
const validValues = Array.isArray(defaultValue) && defaultValue.filter(value => value === 0 || value);
|
|
928
958
|
if (validValues && validValues.length > 0) {
|
|
929
959
|
const valuesObject = {};
|
|
930
960
|
validValues.forEach((value, index) => {
|
|
@@ -938,7 +968,7 @@ class MultiValueConnectorPropertyComponent {
|
|
|
938
968
|
MultiValueConnectorPropertyComponent.decorators = [
|
|
939
969
|
{ type: Component, args: [{
|
|
940
970
|
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
|
|
971
|
+
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
972
|
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
973
|
},] }
|
|
944
974
|
];
|
|
@@ -950,15 +980,15 @@ MultiValueConnectorPropertyComponent.propDecorators = {
|
|
|
950
980
|
};
|
|
951
981
|
|
|
952
982
|
const ɵ0$1 = {
|
|
953
|
-
|
|
983
|
+
custom: "values = window['productRequestDefinitions'][row.caseDefinitionKey] || []",
|
|
954
984
|
};
|
|
955
985
|
const editProductAanvragenConnectorForm = {
|
|
956
986
|
display: 'wizard',
|
|
957
987
|
settings: {
|
|
958
988
|
pdf: {
|
|
959
989
|
id: '1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
|
|
960
|
-
src: 'https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0'
|
|
961
|
-
}
|
|
990
|
+
src: 'https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0',
|
|
991
|
+
},
|
|
962
992
|
},
|
|
963
993
|
components: [
|
|
964
994
|
{
|
|
@@ -967,7 +997,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
967
997
|
buttonSettings: {
|
|
968
998
|
previous: true,
|
|
969
999
|
cancel: true,
|
|
970
|
-
next: true
|
|
1000
|
+
next: true,
|
|
971
1001
|
},
|
|
972
1002
|
navigateOnEnter: false,
|
|
973
1003
|
saveOnEnter: false,
|
|
@@ -984,15 +1014,15 @@ const editProductAanvragenConnectorForm = {
|
|
|
984
1014
|
attrs: [
|
|
985
1015
|
{
|
|
986
1016
|
attr: '',
|
|
987
|
-
value: ''
|
|
988
|
-
}
|
|
1017
|
+
value: '',
|
|
1018
|
+
},
|
|
989
1019
|
],
|
|
990
1020
|
content: 'connectorForm.productaanvraag.step0.tip',
|
|
991
1021
|
refreshOnChange: false,
|
|
992
1022
|
key: 'html4',
|
|
993
1023
|
type: 'htmlelement',
|
|
994
1024
|
input: false,
|
|
995
|
-
tableView: false
|
|
1025
|
+
tableView: false,
|
|
996
1026
|
},
|
|
997
1027
|
{
|
|
998
1028
|
key: 'productAanvraagTypes',
|
|
@@ -1008,7 +1038,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1008
1038
|
tooltip: 'connectorForm.productaanvraag.step0.typeMapping.productAanvraagType.tooltip',
|
|
1009
1039
|
tableView: true,
|
|
1010
1040
|
validate: {
|
|
1011
|
-
required: true
|
|
1041
|
+
required: true,
|
|
1012
1042
|
},
|
|
1013
1043
|
key: 'productAanvraagType',
|
|
1014
1044
|
type: 'textfield',
|
|
@@ -1020,11 +1050,11 @@ const editProductAanvragenConnectorForm = {
|
|
|
1020
1050
|
placeholder: 'connectorForm.productaanvraag.step0.typeMapping.caseDefinitionKey.placeholder',
|
|
1021
1051
|
tableView: true,
|
|
1022
1052
|
validate: {
|
|
1023
|
-
required: true
|
|
1053
|
+
required: true,
|
|
1024
1054
|
},
|
|
1025
1055
|
key: 'caseDefinitionKey',
|
|
1026
1056
|
type: 'select',
|
|
1027
|
-
input: true
|
|
1057
|
+
input: true,
|
|
1028
1058
|
},
|
|
1029
1059
|
{
|
|
1030
1060
|
label: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.label',
|
|
@@ -1039,13 +1069,13 @@ const editProductAanvragenConnectorForm = {
|
|
|
1039
1069
|
type: 'select',
|
|
1040
1070
|
input: true,
|
|
1041
1071
|
validate: {
|
|
1042
|
-
required: true
|
|
1072
|
+
required: true,
|
|
1043
1073
|
},
|
|
1044
1074
|
placeholder: 'connectorForm.productaanvraag.step0.typeMapping.processDefinitionKey.placeholder',
|
|
1045
|
-
}
|
|
1046
|
-
]
|
|
1047
|
-
}
|
|
1048
|
-
]
|
|
1075
|
+
},
|
|
1076
|
+
],
|
|
1077
|
+
},
|
|
1078
|
+
],
|
|
1049
1079
|
},
|
|
1050
1080
|
{
|
|
1051
1081
|
title: 'connectorForm.productaanvraag.step1.title',
|
|
@@ -1053,7 +1083,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1053
1083
|
buttonSettings: {
|
|
1054
1084
|
previous: true,
|
|
1055
1085
|
cancel: true,
|
|
1056
|
-
next: true
|
|
1086
|
+
next: true,
|
|
1057
1087
|
},
|
|
1058
1088
|
navigateOnEnter: false,
|
|
1059
1089
|
saveOnEnter: false,
|
|
@@ -1070,15 +1100,15 @@ const editProductAanvragenConnectorForm = {
|
|
|
1070
1100
|
attrs: [
|
|
1071
1101
|
{
|
|
1072
1102
|
attr: '',
|
|
1073
|
-
value: ''
|
|
1074
|
-
}
|
|
1103
|
+
value: '',
|
|
1104
|
+
},
|
|
1075
1105
|
],
|
|
1076
1106
|
content: 'connectorForm.productaanvraag.step1.tip',
|
|
1077
1107
|
refreshOnChange: false,
|
|
1078
1108
|
key: 'html',
|
|
1079
1109
|
type: 'htmlelement',
|
|
1080
1110
|
input: false,
|
|
1081
|
-
tableView: false
|
|
1111
|
+
tableView: false,
|
|
1082
1112
|
},
|
|
1083
1113
|
{
|
|
1084
1114
|
title: 'connectorForm.productaanvraag.step1.objectsApi.panelTitle',
|
|
@@ -1094,24 +1124,24 @@ const editProductAanvragenConnectorForm = {
|
|
|
1094
1124
|
tooltip: 'connectorForm.productaanvraag.step1.objectsApi.url.tooltip',
|
|
1095
1125
|
tableView: true,
|
|
1096
1126
|
validate: {
|
|
1097
|
-
required: true
|
|
1127
|
+
required: true,
|
|
1098
1128
|
},
|
|
1099
1129
|
key: 'objectsApiUrl',
|
|
1100
1130
|
type: 'textfield',
|
|
1101
|
-
input: true
|
|
1131
|
+
input: true,
|
|
1102
1132
|
},
|
|
1103
1133
|
{
|
|
1104
1134
|
label: 'connectorForm.productaanvraag.step1.objectsApi.token.label',
|
|
1105
1135
|
tooltip: 'connectorForm.productaanvraag.step1.objectsApi.token.tooltip',
|
|
1106
1136
|
tableView: true,
|
|
1107
1137
|
validate: {
|
|
1108
|
-
required: true
|
|
1138
|
+
required: true,
|
|
1109
1139
|
},
|
|
1110
1140
|
key: 'objectsApiToken',
|
|
1111
1141
|
type: 'textfield',
|
|
1112
|
-
input: true
|
|
1113
|
-
}
|
|
1114
|
-
]
|
|
1142
|
+
input: true,
|
|
1143
|
+
},
|
|
1144
|
+
],
|
|
1115
1145
|
},
|
|
1116
1146
|
{
|
|
1117
1147
|
title: 'connectorForm.productaanvraag.step1.objectTypesApi.panelTitle',
|
|
@@ -1127,26 +1157,26 @@ const editProductAanvragenConnectorForm = {
|
|
|
1127
1157
|
tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.url.tooltip',
|
|
1128
1158
|
tableView: true,
|
|
1129
1159
|
validate: {
|
|
1130
|
-
required: true
|
|
1160
|
+
required: true,
|
|
1131
1161
|
},
|
|
1132
1162
|
key: 'objectTypesApiUrl',
|
|
1133
1163
|
type: 'textfield',
|
|
1134
|
-
input: true
|
|
1164
|
+
input: true,
|
|
1135
1165
|
},
|
|
1136
1166
|
{
|
|
1137
1167
|
label: 'connectorForm.productaanvraag.step1.objectTypesApi.token.label',
|
|
1138
1168
|
tooltip: 'connectorForm.productaanvraag.step1.objectTypesApi.token.tooltip',
|
|
1139
1169
|
tableView: true,
|
|
1140
1170
|
validate: {
|
|
1141
|
-
required: true
|
|
1171
|
+
required: true,
|
|
1142
1172
|
},
|
|
1143
1173
|
key: 'objectTypesApiToken',
|
|
1144
1174
|
type: 'textfield',
|
|
1145
|
-
input: true
|
|
1146
|
-
}
|
|
1147
|
-
]
|
|
1148
|
-
}
|
|
1149
|
-
]
|
|
1175
|
+
input: true,
|
|
1176
|
+
},
|
|
1177
|
+
],
|
|
1178
|
+
},
|
|
1179
|
+
],
|
|
1150
1180
|
},
|
|
1151
1181
|
{
|
|
1152
1182
|
title: 'connectorForm.productaanvraag.step2.title',
|
|
@@ -1154,7 +1184,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1154
1184
|
buttonSettings: {
|
|
1155
1185
|
previous: true,
|
|
1156
1186
|
cancel: true,
|
|
1157
|
-
next: true
|
|
1187
|
+
next: true,
|
|
1158
1188
|
},
|
|
1159
1189
|
navigateOnEnter: false,
|
|
1160
1190
|
saveOnEnter: false,
|
|
@@ -1171,15 +1201,15 @@ const editProductAanvragenConnectorForm = {
|
|
|
1171
1201
|
attrs: [
|
|
1172
1202
|
{
|
|
1173
1203
|
attr: '',
|
|
1174
|
-
value: ''
|
|
1175
|
-
}
|
|
1204
|
+
value: '',
|
|
1205
|
+
},
|
|
1176
1206
|
],
|
|
1177
1207
|
content: 'connectorForm.productaanvraag.step2.tip',
|
|
1178
1208
|
refreshOnChange: false,
|
|
1179
1209
|
key: 'html2',
|
|
1180
1210
|
type: 'htmlelement',
|
|
1181
1211
|
input: false,
|
|
1182
|
-
tableView: false
|
|
1212
|
+
tableView: false,
|
|
1183
1213
|
},
|
|
1184
1214
|
{
|
|
1185
1215
|
title: 'connectorForm.productaanvraag.step2.objectType.panelTitle',
|
|
@@ -1195,48 +1225,48 @@ const editProductAanvragenConnectorForm = {
|
|
|
1195
1225
|
tooltip: 'connectorForm.productaanvraag.step2.objectType.name.tooltip',
|
|
1196
1226
|
tableView: true,
|
|
1197
1227
|
validate: {
|
|
1198
|
-
required: true
|
|
1228
|
+
required: true,
|
|
1199
1229
|
},
|
|
1200
1230
|
key: 'objectTypeName',
|
|
1201
1231
|
type: 'textfield',
|
|
1202
|
-
input: true
|
|
1232
|
+
input: true,
|
|
1203
1233
|
},
|
|
1204
1234
|
{
|
|
1205
1235
|
label: 'connectorForm.productaanvraag.step2.objectType.title.label',
|
|
1206
1236
|
tooltip: 'connectorForm.productaanvraag.step2.objectType.title.tooltip',
|
|
1207
1237
|
tableView: true,
|
|
1208
1238
|
validate: {
|
|
1209
|
-
required: true
|
|
1239
|
+
required: true,
|
|
1210
1240
|
},
|
|
1211
1241
|
key: 'objectTypeTitle',
|
|
1212
1242
|
type: 'textfield',
|
|
1213
|
-
input: true
|
|
1243
|
+
input: true,
|
|
1214
1244
|
},
|
|
1215
1245
|
{
|
|
1216
1246
|
label: 'connectorForm.productaanvraag.step2.objectType.url.label',
|
|
1217
1247
|
tooltip: 'connectorForm.productaanvraag.step2.objectType.url.tooltip',
|
|
1218
1248
|
tableView: true,
|
|
1219
1249
|
validate: {
|
|
1220
|
-
required: true
|
|
1250
|
+
required: true,
|
|
1221
1251
|
},
|
|
1222
1252
|
key: 'objectTypeUrl',
|
|
1223
1253
|
type: 'textfield',
|
|
1224
|
-
input: true
|
|
1254
|
+
input: true,
|
|
1225
1255
|
},
|
|
1226
1256
|
{
|
|
1227
1257
|
label: 'connectorForm.productaanvraag.step2.objectType.typeVersion.label',
|
|
1228
1258
|
tooltip: 'connectorForm.productaanvraag.step2.objectType.typeVersion.tooltip',
|
|
1229
1259
|
tableView: true,
|
|
1230
1260
|
validate: {
|
|
1231
|
-
required: true
|
|
1261
|
+
required: true,
|
|
1232
1262
|
},
|
|
1233
1263
|
key: 'objectTypeVersion',
|
|
1234
1264
|
type: 'textfield',
|
|
1235
|
-
input: true
|
|
1236
|
-
}
|
|
1237
|
-
]
|
|
1238
|
-
}
|
|
1239
|
-
]
|
|
1265
|
+
input: true,
|
|
1266
|
+
},
|
|
1267
|
+
],
|
|
1268
|
+
},
|
|
1269
|
+
],
|
|
1240
1270
|
},
|
|
1241
1271
|
{
|
|
1242
1272
|
title: 'connectorForm.productaanvraag.step3.title',
|
|
@@ -1244,7 +1274,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1244
1274
|
buttonSettings: {
|
|
1245
1275
|
previous: true,
|
|
1246
1276
|
cancel: true,
|
|
1247
|
-
next: true
|
|
1277
|
+
next: true,
|
|
1248
1278
|
},
|
|
1249
1279
|
navigateOnEnter: false,
|
|
1250
1280
|
saveOnEnter: false,
|
|
@@ -1261,15 +1291,15 @@ const editProductAanvragenConnectorForm = {
|
|
|
1261
1291
|
attrs: [
|
|
1262
1292
|
{
|
|
1263
1293
|
attr: '',
|
|
1264
|
-
value: ''
|
|
1265
|
-
}
|
|
1294
|
+
value: '',
|
|
1295
|
+
},
|
|
1266
1296
|
],
|
|
1267
1297
|
content: 'connectorForm.productaanvraag.step3.tip',
|
|
1268
1298
|
refreshOnChange: false,
|
|
1269
1299
|
key: 'html1',
|
|
1270
1300
|
type: 'htmlelement',
|
|
1271
1301
|
input: false,
|
|
1272
|
-
tableView: false
|
|
1302
|
+
tableView: false,
|
|
1273
1303
|
},
|
|
1274
1304
|
{
|
|
1275
1305
|
title: 'connectorForm.productaanvraag.step3.openNotifications.panelTitle',
|
|
@@ -1285,48 +1315,48 @@ const editProductAanvragenConnectorForm = {
|
|
|
1285
1315
|
tooltip: 'connectorForm.productaanvraag.step3.openNotifications.baseUrl.tooltip',
|
|
1286
1316
|
tableView: true,
|
|
1287
1317
|
validate: {
|
|
1288
|
-
required: true
|
|
1318
|
+
required: true,
|
|
1289
1319
|
},
|
|
1290
1320
|
key: 'openNotificationsBaseUrl',
|
|
1291
1321
|
type: 'textfield',
|
|
1292
|
-
input: true
|
|
1322
|
+
input: true,
|
|
1293
1323
|
},
|
|
1294
1324
|
{
|
|
1295
1325
|
label: 'connectorForm.productaanvraag.step3.openNotifications.clientId.label',
|
|
1296
1326
|
tooltip: 'connectorForm.productaanvraag.step3.openNotifications.clientId.tooltip',
|
|
1297
1327
|
tableView: true,
|
|
1298
1328
|
validate: {
|
|
1299
|
-
required: true
|
|
1329
|
+
required: true,
|
|
1300
1330
|
},
|
|
1301
1331
|
key: 'openNotificationsClientId',
|
|
1302
1332
|
type: 'textfield',
|
|
1303
|
-
input: true
|
|
1333
|
+
input: true,
|
|
1304
1334
|
},
|
|
1305
1335
|
{
|
|
1306
1336
|
label: 'connectorForm.productaanvraag.step3.openNotifications.secret.label',
|
|
1307
1337
|
tooltip: 'connectorForm.productaanvraag.step3.openNotifications.secret.tooltip',
|
|
1308
1338
|
tableView: true,
|
|
1309
1339
|
validate: {
|
|
1310
|
-
required: true
|
|
1340
|
+
required: true,
|
|
1311
1341
|
},
|
|
1312
1342
|
key: 'openNotificationsSecret',
|
|
1313
1343
|
type: 'textfield',
|
|
1314
|
-
input: true
|
|
1344
|
+
input: true,
|
|
1315
1345
|
},
|
|
1316
1346
|
{
|
|
1317
1347
|
label: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.label',
|
|
1318
1348
|
tooltip: 'connectorForm.productaanvraag.step3.openNotifications.callbackBaseUrl.tooltip',
|
|
1319
1349
|
tableView: true,
|
|
1320
1350
|
validate: {
|
|
1321
|
-
required: true
|
|
1351
|
+
required: true,
|
|
1322
1352
|
},
|
|
1323
1353
|
key: 'openNotificationsCallbackBaseUrl',
|
|
1324
1354
|
type: 'textfield',
|
|
1325
|
-
input: true
|
|
1326
|
-
}
|
|
1327
|
-
]
|
|
1328
|
-
}
|
|
1329
|
-
]
|
|
1355
|
+
input: true,
|
|
1356
|
+
},
|
|
1357
|
+
],
|
|
1358
|
+
},
|
|
1359
|
+
],
|
|
1330
1360
|
},
|
|
1331
1361
|
{
|
|
1332
1362
|
title: 'connectorForm.productaanvraag.step4.title',
|
|
@@ -1334,7 +1364,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1334
1364
|
buttonSettings: {
|
|
1335
1365
|
previous: true,
|
|
1336
1366
|
cancel: true,
|
|
1337
|
-
next: true
|
|
1367
|
+
next: true,
|
|
1338
1368
|
},
|
|
1339
1369
|
navigateOnEnter: false,
|
|
1340
1370
|
saveOnEnter: false,
|
|
@@ -1351,15 +1381,15 @@ const editProductAanvragenConnectorForm = {
|
|
|
1351
1381
|
attrs: [
|
|
1352
1382
|
{
|
|
1353
1383
|
attr: '',
|
|
1354
|
-
value: ''
|
|
1355
|
-
}
|
|
1384
|
+
value: '',
|
|
1385
|
+
},
|
|
1356
1386
|
],
|
|
1357
1387
|
content: 'connectorForm.productaanvraag.step4.tip',
|
|
1358
1388
|
refreshOnChange: false,
|
|
1359
1389
|
key: 'html3',
|
|
1360
1390
|
type: 'htmlelement',
|
|
1361
1391
|
input: false,
|
|
1362
|
-
tableView: false
|
|
1392
|
+
tableView: false,
|
|
1363
1393
|
},
|
|
1364
1394
|
{
|
|
1365
1395
|
title: 'connectorForm.productaanvraag.step4.applicant.panelTitle',
|
|
@@ -1375,30 +1405,30 @@ const editProductAanvragenConnectorForm = {
|
|
|
1375
1405
|
attrs: [
|
|
1376
1406
|
{
|
|
1377
1407
|
attr: '',
|
|
1378
|
-
value: ''
|
|
1379
|
-
}
|
|
1408
|
+
value: '',
|
|
1409
|
+
},
|
|
1380
1410
|
],
|
|
1381
1411
|
content: 'connectorForm.productaanvraag.step4.applicant.tip',
|
|
1382
1412
|
refreshOnChange: false,
|
|
1383
1413
|
key: 'html5',
|
|
1384
1414
|
type: 'htmlelement',
|
|
1385
1415
|
input: false,
|
|
1386
|
-
tableView: false
|
|
1416
|
+
tableView: false,
|
|
1387
1417
|
},
|
|
1388
1418
|
{
|
|
1389
1419
|
label: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.label',
|
|
1390
1420
|
tooltip: 'connectorForm.productaanvraag.step4.applicant.roleTypeUrl.tooltip',
|
|
1391
1421
|
tableView: true,
|
|
1392
1422
|
validate: {
|
|
1393
|
-
required: true
|
|
1423
|
+
required: true,
|
|
1394
1424
|
},
|
|
1395
1425
|
key: 'applicantRoleTypeUrl',
|
|
1396
1426
|
type: 'textfield',
|
|
1397
|
-
input: true
|
|
1398
|
-
}
|
|
1399
|
-
]
|
|
1400
|
-
}
|
|
1401
|
-
]
|
|
1427
|
+
input: true,
|
|
1428
|
+
},
|
|
1429
|
+
],
|
|
1430
|
+
},
|
|
1431
|
+
],
|
|
1402
1432
|
},
|
|
1403
1433
|
{
|
|
1404
1434
|
title: 'connectorForm.productaanvraag.step5.title',
|
|
@@ -1406,7 +1436,7 @@ const editProductAanvragenConnectorForm = {
|
|
|
1406
1436
|
buttonSettings: {
|
|
1407
1437
|
previous: true,
|
|
1408
1438
|
cancel: true,
|
|
1409
|
-
next: true
|
|
1439
|
+
next: true,
|
|
1410
1440
|
},
|
|
1411
1441
|
navigateOnEnter: false,
|
|
1412
1442
|
saveOnEnter: false,
|
|
@@ -1423,29 +1453,29 @@ const editProductAanvragenConnectorForm = {
|
|
|
1423
1453
|
attrs: [
|
|
1424
1454
|
{
|
|
1425
1455
|
attr: '',
|
|
1426
|
-
value: ''
|
|
1427
|
-
}
|
|
1456
|
+
value: '',
|
|
1457
|
+
},
|
|
1428
1458
|
],
|
|
1429
1459
|
content: 'connectorForm.productaanvraag.step5.tip',
|
|
1430
1460
|
refreshOnChange: false,
|
|
1431
1461
|
key: 'html6',
|
|
1432
1462
|
type: 'htmlelement',
|
|
1433
1463
|
input: false,
|
|
1434
|
-
tableView: false
|
|
1464
|
+
tableView: false,
|
|
1435
1465
|
},
|
|
1436
1466
|
{
|
|
1437
1467
|
label: 'connectorForm.productaanvraag.step5.name',
|
|
1438
1468
|
tableView: true,
|
|
1439
1469
|
validate: {
|
|
1440
|
-
required: true
|
|
1470
|
+
required: true,
|
|
1441
1471
|
},
|
|
1442
1472
|
key: 'connectorName',
|
|
1443
1473
|
type: 'textfield',
|
|
1444
|
-
input: true
|
|
1445
|
-
}
|
|
1446
|
-
]
|
|
1447
|
-
}
|
|
1448
|
-
]
|
|
1474
|
+
input: true,
|
|
1475
|
+
},
|
|
1476
|
+
],
|
|
1477
|
+
},
|
|
1478
|
+
],
|
|
1449
1479
|
};
|
|
1450
1480
|
|
|
1451
1481
|
/*
|
|
@@ -1474,11 +1504,11 @@ class EditProductAanvragenConnectorComponent {
|
|
|
1474
1504
|
this.connectorDelete = new EventEmitter();
|
|
1475
1505
|
this.formRefresh$ = new Subject();
|
|
1476
1506
|
this.formDefinition$ = new BehaviorSubject(undefined);
|
|
1477
|
-
this.translatedFormDefinition$ = this.formDefinition$.pipe(map(
|
|
1507
|
+
this.translatedFormDefinition$ = this.formDefinition$.pipe(map(definition => this.formTranslationService.translateForm(definition)));
|
|
1478
1508
|
this.caseDefinitionOptions = [];
|
|
1479
1509
|
this.processDocumentDefinitionOptions = {};
|
|
1480
1510
|
this.options = {
|
|
1481
|
-
disableAlerts: true
|
|
1511
|
+
disableAlerts: true,
|
|
1482
1512
|
};
|
|
1483
1513
|
this.mapCaseDefinitionKeyComponent = (component) => {
|
|
1484
1514
|
if (component.key === 'caseDefinitionKey') {
|
|
@@ -1512,7 +1542,8 @@ class EditProductAanvragenConnectorComponent {
|
|
|
1512
1542
|
properties.openNotificatieProperties.baseUrl = submission.openNotificationsBaseUrl;
|
|
1513
1543
|
properties.openNotificatieProperties.clientId = submission.openNotificationsClientId;
|
|
1514
1544
|
properties.openNotificatieProperties.secret = submission.openNotificationsSecret;
|
|
1515
|
-
properties.openNotificatieProperties.callbackBaseUrl =
|
|
1545
|
+
properties.openNotificatieProperties.callbackBaseUrl =
|
|
1546
|
+
submission.openNotificationsCallbackBaseUrl;
|
|
1516
1547
|
properties.aanvragerRolTypeUrl = submission.applicantRoleTypeUrl;
|
|
1517
1548
|
properties.typeMapping = submission.productAanvraagTypes;
|
|
1518
1549
|
this.propertiesSave.emit({ properties, name: submission.connectorName });
|
|
@@ -1521,8 +1552,10 @@ class EditProductAanvragenConnectorComponent {
|
|
|
1521
1552
|
this.connectorDelete.emit();
|
|
1522
1553
|
}
|
|
1523
1554
|
openFormDefinitionSubscription() {
|
|
1524
|
-
this.formDefinitionSubscription = combineLatest([
|
|
1525
|
-
.
|
|
1555
|
+
this.formDefinitionSubscription = combineLatest([
|
|
1556
|
+
this.formDefinition$,
|
|
1557
|
+
this.translateService.stream('key'),
|
|
1558
|
+
]).subscribe(([form]) => {
|
|
1526
1559
|
const translatedForm = this.formTranslationService.translateForm(form);
|
|
1527
1560
|
this.refreshForm({ form: translatedForm });
|
|
1528
1561
|
});
|
|
@@ -1541,7 +1574,8 @@ class EditProductAanvragenConnectorComponent {
|
|
|
1541
1574
|
submission.openNotificationsBaseUrl = properties.openNotificatieProperties.baseUrl;
|
|
1542
1575
|
submission.openNotificationsClientId = properties.openNotificatieProperties.clientId;
|
|
1543
1576
|
submission.openNotificationsSecret = properties.openNotificatieProperties.secret;
|
|
1544
|
-
submission.openNotificationsCallbackBaseUrl =
|
|
1577
|
+
submission.openNotificationsCallbackBaseUrl =
|
|
1578
|
+
properties.openNotificatieProperties.callbackBaseUrl;
|
|
1545
1579
|
submission.applicantRoleTypeUrl = properties.aanvragerRolTypeUrl;
|
|
1546
1580
|
submission.productAanvraagTypes = properties.typeMapping;
|
|
1547
1581
|
submission.connectorName = this.defaultName;
|
|
@@ -1552,13 +1586,15 @@ class EditProductAanvragenConnectorComponent {
|
|
|
1552
1586
|
}
|
|
1553
1587
|
loadDefinitions() {
|
|
1554
1588
|
let documentDefinitions;
|
|
1555
|
-
this.documentService
|
|
1589
|
+
this.documentService
|
|
1590
|
+
.getAllDefinitions()
|
|
1591
|
+
.pipe(tap(resDocumentDefinitions => (documentDefinitions = resDocumentDefinitions.content)), switchMap(resDocumentDefinitions => combineLatest(resDocumentDefinitions.content.map(definition => this.documentService.findProcessDocumentDefinitions(definition.id.name)))), tap(res => {
|
|
1556
1592
|
var _a;
|
|
1557
|
-
this.caseDefinitionOptions = documentDefinitions.map(
|
|
1593
|
+
this.caseDefinitionOptions = documentDefinitions.map(documentDefinition => {
|
|
1558
1594
|
return { label: documentDefinition.id.name, value: documentDefinition.id.name };
|
|
1559
1595
|
});
|
|
1560
1596
|
documentDefinitions.forEach((documentDefinition, index) => {
|
|
1561
|
-
this.processDocumentDefinitionOptions[documentDefinition.id.name] = res[index].map(
|
|
1597
|
+
this.processDocumentDefinitionOptions[documentDefinition.id.name] = res[index].map(processDocumentDefinition => processDocumentDefinition.id.processDefinitionKey);
|
|
1562
1598
|
});
|
|
1563
1599
|
window['productRequestDefinitions'] = this.processDocumentDefinitionOptions;
|
|
1564
1600
|
const definitionWithCaseDefinitionOptions = this.formMappingService.mapComponents(this.formDefinition$.getValue(), this.mapCaseDefinitionKeyComponent);
|
|
@@ -1566,13 +1602,14 @@ class EditProductAanvragenConnectorComponent {
|
|
|
1566
1602
|
if ((_a = this.properties) === null || _a === void 0 ? void 0 : _a.aanvragerRolTypeUrl) {
|
|
1567
1603
|
this.prefillForm();
|
|
1568
1604
|
}
|
|
1569
|
-
}))
|
|
1605
|
+
}))
|
|
1606
|
+
.subscribe();
|
|
1570
1607
|
}
|
|
1571
1608
|
}
|
|
1572
1609
|
EditProductAanvragenConnectorComponent.decorators = [
|
|
1573
1610
|
{ type: Component, args: [{
|
|
1574
1611
|
selector: 'valtimo-edit-product-aanvragen-connector',
|
|
1575
|
-
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
|
|
1612
|
+
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",
|
|
1576
1613
|
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}"]
|
|
1577
1614
|
},] }
|
|
1578
1615
|
];
|
|
@@ -1661,7 +1698,7 @@ ConnectorManagementModule.decorators = [
|
|
|
1661
1698
|
ConnectorLinkExtensionComponent,
|
|
1662
1699
|
ConnectorLinkExtensionModalComponent,
|
|
1663
1700
|
EditProductAanvragenConnectorComponent,
|
|
1664
|
-
EditConnectorFormComponent
|
|
1701
|
+
EditConnectorFormComponent,
|
|
1665
1702
|
],
|
|
1666
1703
|
imports: [
|
|
1667
1704
|
CommonModule,
|
|
@@ -1671,7 +1708,7 @@ ConnectorManagementModule.decorators = [
|
|
|
1671
1708
|
ListModule,
|
|
1672
1709
|
SpinnerModule,
|
|
1673
1710
|
ModalModule,
|
|
1674
|
-
FormIoModule
|
|
1711
|
+
FormIoModule,
|
|
1675
1712
|
],
|
|
1676
1713
|
exports: [
|
|
1677
1714
|
ConnectorManagementComponent,
|
|
@@ -1682,11 +1719,9 @@ ConnectorManagementModule.decorators = [
|
|
|
1682
1719
|
MultiValueConnectorPropertyComponent,
|
|
1683
1720
|
ConnectorLinkExtensionComponent,
|
|
1684
1721
|
ConnectorLinkExtensionModalComponent,
|
|
1685
|
-
EditProductAanvragenConnectorComponent
|
|
1722
|
+
EditProductAanvragenConnectorComponent,
|
|
1686
1723
|
],
|
|
1687
|
-
entryComponents: [
|
|
1688
|
-
ConnectorLinkExtensionComponent,
|
|
1689
|
-
]
|
|
1724
|
+
entryComponents: [ConnectorLinkExtensionComponent],
|
|
1690
1725
|
},] }
|
|
1691
1726
|
];
|
|
1692
1727
|
|