@valtimo/zgw 13.4.1 → 13.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/valtimo-zgw.mjs +311 -7
- package/fesm2022/valtimo-zgw.mjs.map +1 -1
- package/lib/modules/documenten-api/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts +2 -2
- package/lib/modules/documenten-api/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts.map +1 -1
- package/lib/modules/index.d.ts +1 -0
- package/lib/modules/index.d.ts.map +1 -1
- package/lib/modules/notificaties-api/components/failed-notification-detail/failed-notification-detail.component.d.ts +17 -0
- package/lib/modules/notificaties-api/components/failed-notification-detail/failed-notification-detail.component.d.ts.map +1 -0
- package/lib/modules/notificaties-api/components/failed-notifications-page/failed-notifications-page.component.d.ts +32 -0
- package/lib/modules/notificaties-api/components/failed-notifications-page/failed-notifications-page.component.d.ts.map +1 -0
- package/lib/modules/notificaties-api/components/index.d.ts +3 -0
- package/lib/modules/notificaties-api/components/index.d.ts.map +1 -0
- package/lib/modules/notificaties-api/index.d.ts +5 -0
- package/lib/modules/notificaties-api/index.d.ts.map +1 -0
- package/lib/modules/notificaties-api/models/failed-notification.model.d.ts +22 -0
- package/lib/modules/notificaties-api/models/failed-notification.model.d.ts.map +1 -0
- package/lib/modules/notificaties-api/models/index.d.ts +2 -0
- package/lib/modules/notificaties-api/models/index.d.ts.map +1 -0
- package/lib/modules/notificaties-api/notificaties-api-routing.module.d.ts +9 -0
- package/lib/modules/notificaties-api/notificaties-api-routing.module.d.ts.map +1 -0
- package/lib/modules/notificaties-api/services/failed-notifications.service.d.ts +16 -0
- package/lib/modules/notificaties-api/services/failed-notifications.service.d.ts.map +1 -0
- package/lib/modules/notificaties-api/services/index.d.ts +2 -0
- package/lib/modules/notificaties-api/services/index.d.ts.map +1 -0
- package/lib/zgw.module.d.ts +2 -1
- package/lib/zgw.module.d.ts.map +1 -1
- package/package.json +1 -1
package/fesm2022/valtimo-zgw.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i4 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, ViewChild, HostListener, signal,
|
|
4
|
+
import { Injectable, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, ViewChild, HostListener, signal, NgModule, ViewContainerRef } from '@angular/core';
|
|
5
5
|
import * as i5 from '@ngx-translate/core';
|
|
6
6
|
import { TranslateModule } from '@ngx-translate/core';
|
|
7
7
|
import { CaseManagementDraftWarningComponent } from '@valtimo/case-management';
|
|
8
8
|
import * as i2 from '@valtimo/shared';
|
|
9
|
-
import { BaseApiService, getCaseManagementRouteParams, UploadProvider, CASE_MANAGEMENT_TAB_TOKEN, ZGW_OBJECT_TYPE_COMPONENT_TOKEN, ZGW_DOCUMENTEN_API_DOCUMENTS_COMPONENT_TOKEN, CASE_CONFIGURATION_EXTENSIONS_TOKEN } from '@valtimo/shared';
|
|
9
|
+
import { BaseApiService, getCaseManagementRouteParams, UploadProvider, ROLE_ADMIN, CASE_MANAGEMENT_TAB_TOKEN, ZGW_OBJECT_TYPE_COMPONENT_TOKEN, ZGW_DOCUMENTEN_API_DOCUMENTS_COMPONENT_TOKEN, CASE_CONFIGURATION_EXTENSIONS_TOKEN } from '@valtimo/shared';
|
|
10
10
|
import * as i5$1 from 'carbon-components-angular';
|
|
11
11
|
import { ModalModule, InputModule, ButtonModule, DropdownModule, RadioModule, NotificationModule, LayerModule, TagModule, IconModule, DatePickerInputModule, DatePickerModule, ComboBoxModule, TooltipModule, DialogModule, ToggleModule, CheckboxModule, LoadingModule, TilesModule, SelectModule as SelectModule$1, TabsModule } from 'carbon-components-angular';
|
|
12
12
|
import { BehaviorSubject, combineLatest, map, Subscription, switchMap, filter, tap, startWith, debounceTime, Subject, take as take$1, of, from, ReplaySubject, EMPTY, finalize, distinctUntilChanged } from 'rxjs';
|
|
@@ -29,6 +29,7 @@ import moment from 'moment';
|
|
|
29
29
|
import * as i5$2 from 'keycloak-angular';
|
|
30
30
|
import * as i7 from '@valtimo/access-control';
|
|
31
31
|
import * as i10 from '@valtimo/security';
|
|
32
|
+
import { AuthGuardService } from '@valtimo/security';
|
|
32
33
|
import { FormioModule } from '@formio/angular';
|
|
33
34
|
|
|
34
35
|
/*
|
|
@@ -1189,7 +1190,10 @@ class DocumentenApiMetadataModalComponent {
|
|
|
1189
1190
|
selected: currentLanguage === language,
|
|
1190
1191
|
}));
|
|
1191
1192
|
}));
|
|
1192
|
-
this.documentId$ =
|
|
1193
|
+
this.documentId$ = combineLatest([
|
|
1194
|
+
this.formioStateService.documentId$,
|
|
1195
|
+
this.route.params.pipe(map(params => params?.documentId ?? null)),
|
|
1196
|
+
]).pipe(map(([formIoDocumentId, routeDocumentId]) => formIoDocumentId || routeDocumentId));
|
|
1193
1197
|
this.documentTypeItems$ = combineLatest([
|
|
1194
1198
|
this.documentId$,
|
|
1195
1199
|
this.informatieobjecttypeFormControl.valueChanges.pipe(startWith(this.informatieobjecttypeFormControl.value)),
|
|
@@ -1323,7 +1327,7 @@ class DocumentenApiMetadataModalComponent {
|
|
|
1323
1327
|
if (!filename) {
|
|
1324
1328
|
return null;
|
|
1325
1329
|
}
|
|
1326
|
-
filename = filename.replace(/\.[^/.]+$/, '').replace(/[
|
|
1330
|
+
filename = filename.replace(/\.[^/.]+$/, '').replace(/[._]/g, ' ');
|
|
1327
1331
|
return filename.charAt(0).toUpperCase() + filename.slice(1);
|
|
1328
1332
|
}
|
|
1329
1333
|
formatDate(controlName) {
|
|
@@ -4333,6 +4337,303 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
4333
4337
|
* limitations under the License.
|
|
4334
4338
|
*/
|
|
4335
4339
|
|
|
4340
|
+
/*
|
|
4341
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
4342
|
+
*
|
|
4343
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4344
|
+
* you may not use this file except in compliance with the License.
|
|
4345
|
+
* You may obtain a copy of the License at
|
|
4346
|
+
*
|
|
4347
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4348
|
+
*
|
|
4349
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4350
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
4351
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4352
|
+
* See the License for the specific language governing permissions and
|
|
4353
|
+
* limitations under the License.
|
|
4354
|
+
*/
|
|
4355
|
+
class FailedNotificationDetailComponent {
|
|
4356
|
+
constructor() {
|
|
4357
|
+
this.open = false;
|
|
4358
|
+
this.notification = null;
|
|
4359
|
+
this.retryInProgress = false;
|
|
4360
|
+
this.closeModalEvent = new EventEmitter();
|
|
4361
|
+
this.retryEvent = new EventEmitter();
|
|
4362
|
+
}
|
|
4363
|
+
onClose() {
|
|
4364
|
+
this.closeModalEvent.emit();
|
|
4365
|
+
}
|
|
4366
|
+
onRetry() {
|
|
4367
|
+
if (!this.retryInProgress)
|
|
4368
|
+
this.retryEvent.emit();
|
|
4369
|
+
}
|
|
4370
|
+
get formattedPayload() {
|
|
4371
|
+
if (!this.notification?.payload)
|
|
4372
|
+
return '';
|
|
4373
|
+
try {
|
|
4374
|
+
return JSON.stringify(JSON.parse(this.notification.payload), null, 2);
|
|
4375
|
+
}
|
|
4376
|
+
catch (error) {
|
|
4377
|
+
return this.notification.payload;
|
|
4378
|
+
}
|
|
4379
|
+
}
|
|
4380
|
+
formatDateValue(value) {
|
|
4381
|
+
if (!value)
|
|
4382
|
+
return '-';
|
|
4383
|
+
try {
|
|
4384
|
+
return moment(value)
|
|
4385
|
+
.locale(localStorage.getItem('langKey') ?? 'nl')
|
|
4386
|
+
.format('DD-MM-YYYY, HH:mm:ss');
|
|
4387
|
+
}
|
|
4388
|
+
catch (error) {
|
|
4389
|
+
return value;
|
|
4390
|
+
}
|
|
4391
|
+
}
|
|
4392
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FailedNotificationDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4393
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FailedNotificationDetailComponent, isStandalone: true, selector: "valtimo-notificaties-api-failed-notification-detail", inputs: { open: "open", notification: "notification", retryInProgress: "retryInProgress" }, outputs: { closeModalEvent: "closeModalEvent", retryEvent: "retryEvent" }, ngImport: i0, template: "<cds-modal [open]=\"open\" size=\"lg\" valtimoCdsModal>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onClose()\">\n {{ 'zgw.notifications.failed.detail.title' | translate }}\n </cds-modal-header>\n\n <section cdsModalContent class=\"failed-notification-detail__content\">\n <h4 class=\"detail-heading\">\n {{ 'zgw.notifications.failed.detail.metadataTitle' | translate }}\n </h4>\n\n <dl class=\"detail-metadata\">\n <div>\n <dt>{{ 'zgw.notifications.failed.detail.status' | translate }}</dt>\n <dd>{{ notification?.status || '-' }}</dd>\n </div>\n <div>\n <dt>{{ 'zgw.notifications.failed.detail.pendingRetries' | translate }}</dt>\n <dd>{{ notification?.pendingRetries ?? '-' }}</dd>\n </div>\n <div>\n <dt>{{ 'zgw.notifications.failed.detail.receivedAt' | translate }}</dt>\n <dd>{{ formatDateValue(notification?.receivedAt) }}</dd>\n </div>\n <div>\n <dt>{{ 'zgw.notifications.failed.detail.lastProcessedAt' | translate }}</dt>\n <dd>{{ formatDateValue(notification?.lastProcessedAt) }}</dd>\n </div>\n </dl>\n\n <h4 class=\"detail-heading\">\n {{ 'zgw.notifications.failed.detail.payloadTitle' | translate }}\n </h4>\n <div class=\"detail-block\" *ngIf=\"formattedPayload; else noPayload\">\n <pre class=\"detail-pre\">{{ formattedPayload }}</pre>\n </div>\n <ng-template #noPayload>\n <div class=\"detail-block detail-block--empty\">\n {{ 'zgw.notifications.failed.detail.noPayload' | translate }}\n </div>\n </ng-template>\n\n <h4 class=\"detail-heading\">\n {{ 'zgw.notifications.failed.detail.errorTitle' | translate }}\n </h4>\n <div class=\"detail-block\" *ngIf=\"notification?.lastErrorMessage; else noError\">\n <pre class=\"detail-pre\">{{ notification?.lastErrorMessage }}</pre>\n </div>\n <ng-template #noError>\n <div class=\"detail-block detail-block--empty\">\n {{ 'zgw.notifications.failed.detail.noError' | translate }}\n </div>\n </ng-template>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" type=\"button\" (click)=\"onClose()\">\n {{ 'interface.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n type=\"button\"\n (click)=\"onRetry()\"\n [disabled]=\"retryInProgress || !notification\"\n >\n {{ 'zgw.notifications.failed.detail.retry' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".failed-notification-detail__content{padding:32px}.detail-heading{padding-top:24px;padding-bottom:12px;color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}.detail-metadata{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px 24px;margin:0}.detail-metadata div{background-color:var(--cds-layer-01);border-radius:4px;padding:12px}.detail-metadata dt{color:var(--cds-text-secondary)}.detail-metadata dd{color:var(--cds-text-primary);word-break:break-word}.detail-block{background-color:var(--cds-layer-01);border-radius:4px;padding:16px;color:var(--cds-text-primary);max-height:none;overflow:visible}.detail-block--empty{color:var(--cds-text-disabled);font-style:italic}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ModalModule }, { kind: "component", type: i5$1.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i5$1.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i5$1.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "directive", type: i5$1.ModalContent, selector: "[cdsModalContent], [ibmModalContent]", inputs: ["hasForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4394
|
+
}
|
|
4395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FailedNotificationDetailComponent, decorators: [{
|
|
4396
|
+
type: Component,
|
|
4397
|
+
args: [{ selector: 'valtimo-notificaties-api-failed-notification-detail', standalone: true, imports: [CommonModule, TranslateModule, ModalModule, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<cds-modal [open]=\"open\" size=\"lg\" valtimoCdsModal>\n <cds-modal-header [showCloseButton]=\"true\" (closeSelect)=\"onClose()\">\n {{ 'zgw.notifications.failed.detail.title' | translate }}\n </cds-modal-header>\n\n <section cdsModalContent class=\"failed-notification-detail__content\">\n <h4 class=\"detail-heading\">\n {{ 'zgw.notifications.failed.detail.metadataTitle' | translate }}\n </h4>\n\n <dl class=\"detail-metadata\">\n <div>\n <dt>{{ 'zgw.notifications.failed.detail.status' | translate }}</dt>\n <dd>{{ notification?.status || '-' }}</dd>\n </div>\n <div>\n <dt>{{ 'zgw.notifications.failed.detail.pendingRetries' | translate }}</dt>\n <dd>{{ notification?.pendingRetries ?? '-' }}</dd>\n </div>\n <div>\n <dt>{{ 'zgw.notifications.failed.detail.receivedAt' | translate }}</dt>\n <dd>{{ formatDateValue(notification?.receivedAt) }}</dd>\n </div>\n <div>\n <dt>{{ 'zgw.notifications.failed.detail.lastProcessedAt' | translate }}</dt>\n <dd>{{ formatDateValue(notification?.lastProcessedAt) }}</dd>\n </div>\n </dl>\n\n <h4 class=\"detail-heading\">\n {{ 'zgw.notifications.failed.detail.payloadTitle' | translate }}\n </h4>\n <div class=\"detail-block\" *ngIf=\"formattedPayload; else noPayload\">\n <pre class=\"detail-pre\">{{ formattedPayload }}</pre>\n </div>\n <ng-template #noPayload>\n <div class=\"detail-block detail-block--empty\">\n {{ 'zgw.notifications.failed.detail.noPayload' | translate }}\n </div>\n </ng-template>\n\n <h4 class=\"detail-heading\">\n {{ 'zgw.notifications.failed.detail.errorTitle' | translate }}\n </h4>\n <div class=\"detail-block\" *ngIf=\"notification?.lastErrorMessage; else noError\">\n <pre class=\"detail-pre\">{{ notification?.lastErrorMessage }}</pre>\n </div>\n <ng-template #noError>\n <div class=\"detail-block detail-block--empty\">\n {{ 'zgw.notifications.failed.detail.noError' | translate }}\n </div>\n </ng-template>\n </section>\n\n <cds-modal-footer>\n <button cdsButton=\"ghost\" type=\"button\" (click)=\"onClose()\">\n {{ 'interface.close' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n type=\"button\"\n (click)=\"onRetry()\"\n [disabled]=\"retryInProgress || !notification\"\n >\n {{ 'zgw.notifications.failed.detail.retry' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: [".failed-notification-detail__content{padding:32px}.detail-heading{padding-top:24px;padding-bottom:12px;color:var(--cds-text-primary);font-weight:600;font-size:16px;line-height:24px}.detail-metadata{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px 24px;margin:0}.detail-metadata div{background-color:var(--cds-layer-01);border-radius:4px;padding:12px}.detail-metadata dt{color:var(--cds-text-secondary)}.detail-metadata dd{color:var(--cds-text-primary);word-break:break-word}.detail-block{background-color:var(--cds-layer-01);border-radius:4px;padding:16px;color:var(--cds-text-primary);max-height:none;overflow:visible}.detail-block--empty{color:var(--cds-text-disabled);font-style:italic}\n"] }]
|
|
4398
|
+
}], propDecorators: { open: [{
|
|
4399
|
+
type: Input
|
|
4400
|
+
}], notification: [{
|
|
4401
|
+
type: Input
|
|
4402
|
+
}], retryInProgress: [{
|
|
4403
|
+
type: Input
|
|
4404
|
+
}], closeModalEvent: [{
|
|
4405
|
+
type: Output
|
|
4406
|
+
}], retryEvent: [{
|
|
4407
|
+
type: Output
|
|
4408
|
+
}] } });
|
|
4409
|
+
|
|
4410
|
+
/*
|
|
4411
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
4412
|
+
*
|
|
4413
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4414
|
+
* you may not use this file except in compliance with the License.
|
|
4415
|
+
* You may obtain a copy of the License at
|
|
4416
|
+
*
|
|
4417
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4418
|
+
*
|
|
4419
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4420
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
4421
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4422
|
+
* See the License for the specific language governing permissions and
|
|
4423
|
+
* limitations under the License.
|
|
4424
|
+
*/
|
|
4425
|
+
class FailedNotificationsService extends BaseApiService {
|
|
4426
|
+
constructor(httpClient, configService) {
|
|
4427
|
+
super(httpClient, configService);
|
|
4428
|
+
this.httpClient = httpClient;
|
|
4429
|
+
this.configService = configService;
|
|
4430
|
+
}
|
|
4431
|
+
getFailedNotifications(request) {
|
|
4432
|
+
const params = new HttpParams({
|
|
4433
|
+
fromObject: {
|
|
4434
|
+
page: request.page,
|
|
4435
|
+
size: request.size,
|
|
4436
|
+
...(request.sort ? { sort: request.sort } : {}),
|
|
4437
|
+
},
|
|
4438
|
+
});
|
|
4439
|
+
return this.httpClient.get(this.getApiUrl('management/v1/notificatiesapi/inbound-events/failed'), { params });
|
|
4440
|
+
}
|
|
4441
|
+
retryFailedNotification(id) {
|
|
4442
|
+
return this.httpClient.post(this.getApiUrl(`management/v1/notificatiesapi/inbound-events/${id}/retry`), {});
|
|
4443
|
+
}
|
|
4444
|
+
getFailedNotificationCount() {
|
|
4445
|
+
return this.httpClient
|
|
4446
|
+
.get(this.getApiUrl('management/v1/notificatiesapi/inbound-events/failed/count'))
|
|
4447
|
+
.pipe(map(response => response.count ?? 0));
|
|
4448
|
+
}
|
|
4449
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FailedNotificationsService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4450
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FailedNotificationsService, providedIn: 'root' }); }
|
|
4451
|
+
}
|
|
4452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FailedNotificationsService, decorators: [{
|
|
4453
|
+
type: Injectable,
|
|
4454
|
+
args: [{
|
|
4455
|
+
providedIn: 'root',
|
|
4456
|
+
}]
|
|
4457
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
|
|
4458
|
+
|
|
4459
|
+
/*
|
|
4460
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
4461
|
+
*
|
|
4462
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4463
|
+
* you may not use this file except in compliance with the License.
|
|
4464
|
+
* You may obtain a copy of the License at
|
|
4465
|
+
*
|
|
4466
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4467
|
+
*
|
|
4468
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4469
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4470
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4471
|
+
* See the License for the specific language governing permissions and
|
|
4472
|
+
* limitations under the License.
|
|
4473
|
+
*/
|
|
4474
|
+
class FailedNotificationsPageComponent {
|
|
4475
|
+
constructor(failedNotificationsService, globalNotificationService, translateService) {
|
|
4476
|
+
this.failedNotificationsService = failedNotificationsService;
|
|
4477
|
+
this.globalNotificationService = globalNotificationService;
|
|
4478
|
+
this.translateService = translateService;
|
|
4479
|
+
this._DEFAULT_SORT = 'receivedAt,desc';
|
|
4480
|
+
this.loading$ = new BehaviorSubject(false);
|
|
4481
|
+
this.pagination$ = new BehaviorSubject({ ...DEFAULT_PAGINATION });
|
|
4482
|
+
this.retryInProgress$ = new BehaviorSubject(false);
|
|
4483
|
+
this.selectedNotification$ = new BehaviorSubject(null);
|
|
4484
|
+
this._pageRequest$ = new BehaviorSubject({
|
|
4485
|
+
page: 0,
|
|
4486
|
+
size: DEFAULT_PAGINATION.size,
|
|
4487
|
+
sort: this._DEFAULT_SORT,
|
|
4488
|
+
});
|
|
4489
|
+
this.notifications$ = this._pageRequest$.pipe(tap(() => this.loading$.next(true)), switchMap(request => this.failedNotificationsService.getFailedNotifications(request).pipe(tap(page => {
|
|
4490
|
+
this.pagination$.next({
|
|
4491
|
+
...this.pagination$.getValue(),
|
|
4492
|
+
page: request.page + 1,
|
|
4493
|
+
size: request.size,
|
|
4494
|
+
collectionSize: page.totalElements,
|
|
4495
|
+
});
|
|
4496
|
+
}), map(page => page.content), finalize(() => this.loading$.next(false)))));
|
|
4497
|
+
this.FIELDS = [
|
|
4498
|
+
{
|
|
4499
|
+
key: 'receivedAt',
|
|
4500
|
+
label: 'zgw.notifications.failed.columns.receivedAt',
|
|
4501
|
+
viewType: ViewType.DATE_TIME,
|
|
4502
|
+
},
|
|
4503
|
+
{
|
|
4504
|
+
key: 'pendingRetries',
|
|
4505
|
+
label: 'zgw.notifications.failed.columns.pendingRetries',
|
|
4506
|
+
viewType: ViewType.NUMBER,
|
|
4507
|
+
},
|
|
4508
|
+
{
|
|
4509
|
+
key: 'lastProcessedAt',
|
|
4510
|
+
label: 'zgw.notifications.failed.columns.lastProcessedAt',
|
|
4511
|
+
viewType: ViewType.DATE_TIME,
|
|
4512
|
+
},
|
|
4513
|
+
{
|
|
4514
|
+
key: 'lastErrorMessage',
|
|
4515
|
+
label: 'zgw.notifications.failed.columns.lastErrorMessage',
|
|
4516
|
+
viewType: ViewType.TEXT,
|
|
4517
|
+
tooltipCharLimit: 160,
|
|
4518
|
+
},
|
|
4519
|
+
];
|
|
4520
|
+
}
|
|
4521
|
+
onPaginationClicked(page) {
|
|
4522
|
+
const current = this._pageRequest$.getValue();
|
|
4523
|
+
this._pageRequest$.next({ ...current, page: Math.max(0, page - 1) });
|
|
4524
|
+
}
|
|
4525
|
+
onPaginationSet(size) {
|
|
4526
|
+
const current = this._pageRequest$.getValue();
|
|
4527
|
+
const updated = {
|
|
4528
|
+
...current,
|
|
4529
|
+
size,
|
|
4530
|
+
page: 0,
|
|
4531
|
+
};
|
|
4532
|
+
this._pageRequest$.next(updated);
|
|
4533
|
+
}
|
|
4534
|
+
onRowClicked(row) {
|
|
4535
|
+
const { ctrlClick: _ctrl, tags: _tags, ...notification } = row;
|
|
4536
|
+
this.selectedNotification$.next(notification);
|
|
4537
|
+
}
|
|
4538
|
+
onCloseModal() {
|
|
4539
|
+
this.selectedNotification$.next(null);
|
|
4540
|
+
}
|
|
4541
|
+
onRetry() {
|
|
4542
|
+
const notification = this.selectedNotification$.getValue();
|
|
4543
|
+
if (!notification)
|
|
4544
|
+
return;
|
|
4545
|
+
this.retryInProgress$.next(true);
|
|
4546
|
+
this.failedNotificationsService
|
|
4547
|
+
.retryFailedNotification(notification.id)
|
|
4548
|
+
.pipe(finalize(() => this.retryInProgress$.next(false)))
|
|
4549
|
+
.subscribe({
|
|
4550
|
+
next: () => {
|
|
4551
|
+
const message = this.translateService.instant('zgw.notifications.failed.retrySuccess');
|
|
4552
|
+
this.globalNotificationService.showToast({
|
|
4553
|
+
title: message,
|
|
4554
|
+
type: 'success',
|
|
4555
|
+
});
|
|
4556
|
+
this.selectedNotification$.next(null);
|
|
4557
|
+
this._pageRequest$.next({ ...this._pageRequest$.getValue() });
|
|
4558
|
+
},
|
|
4559
|
+
error: () => {
|
|
4560
|
+
const message = this.translateService.instant('zgw.notifications.failed.retryError');
|
|
4561
|
+
this.globalNotificationService.showToast({
|
|
4562
|
+
title: message,
|
|
4563
|
+
type: 'error',
|
|
4564
|
+
});
|
|
4565
|
+
},
|
|
4566
|
+
});
|
|
4567
|
+
}
|
|
4568
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FailedNotificationsPageComponent, deps: [{ token: FailedNotificationsService }, { token: i2.GlobalNotificationService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4569
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FailedNotificationsPageComponent, isStandalone: true, selector: "valtimo-notificaties-api-failed-notifications-page", ngImport: i0, template: "<div class=\"failed-notifications-page\">\n <valtimo-carbon-list\n *ngIf=\"{items: notifications$ | async} as obs\"\n [items]=\"obs.items || []\"\n [fields]=\"FIELDS\"\n [loading]=\"loading$ | async\"\n [pagination]=\"pagination$ | async\"\n paginationIdentifier=\"zgw-notificaties-api-failed\"\n (paginationClicked)=\"onPaginationClicked($event)\"\n (paginationSet)=\"onPaginationSet($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n >\n <valtimo-no-results\n [title]=\"'zgw.notifications.failed.noResults.title' | translate\"\n [description]=\"'zgw.notifications.failed.noResults.description' | translate\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-notificaties-api-failed-notification-detail\n [open]=\"(selectedNotification$ | async) !== null\"\n [notification]=\"selectedNotification$ | async\"\n [retryInProgress]=\"retryInProgress$ | async\"\n (closeModalEvent)=\"onCloseModal()\"\n (retryEvent)=\"onRetry()\"\n ></valtimo-notificaties-api-failed-notification-detail>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }, { kind: "component", type: i3.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "component", type: FailedNotificationDetailComponent, selector: "valtimo-notificaties-api-failed-notification-detail", inputs: ["open", "notification", "retryInProgress"], outputs: ["closeModalEvent", "retryEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4570
|
+
}
|
|
4571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FailedNotificationsPageComponent, decorators: [{
|
|
4572
|
+
type: Component,
|
|
4573
|
+
args: [{ selector: 'valtimo-notificaties-api-failed-notifications-page', standalone: true, imports: [CommonModule, TranslateModule, CarbonListModule, FailedNotificationDetailComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"failed-notifications-page\">\n <valtimo-carbon-list\n *ngIf=\"{items: notifications$ | async} as obs\"\n [items]=\"obs.items || []\"\n [fields]=\"FIELDS\"\n [loading]=\"loading$ | async\"\n [pagination]=\"pagination$ | async\"\n paginationIdentifier=\"zgw-notificaties-api-failed\"\n (paginationClicked)=\"onPaginationClicked($event)\"\n (paginationSet)=\"onPaginationSet($event)\"\n (rowClicked)=\"onRowClicked($event)\"\n >\n <valtimo-no-results\n [title]=\"'zgw.notifications.failed.noResults.title' | translate\"\n [description]=\"'zgw.notifications.failed.noResults.description' | translate\"\n ></valtimo-no-results>\n </valtimo-carbon-list>\n\n <valtimo-notificaties-api-failed-notification-detail\n [open]=\"(selectedNotification$ | async) !== null\"\n [notification]=\"selectedNotification$ | async\"\n [retryInProgress]=\"retryInProgress$ | async\"\n (closeModalEvent)=\"onCloseModal()\"\n (retryEvent)=\"onRetry()\"\n ></valtimo-notificaties-api-failed-notification-detail>\n</div>\n" }]
|
|
4574
|
+
}], ctorParameters: () => [{ type: FailedNotificationsService }, { type: i2.GlobalNotificationService }, { type: i5.TranslateService }] });
|
|
4575
|
+
|
|
4576
|
+
/*
|
|
4577
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
4578
|
+
*
|
|
4579
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4580
|
+
* you may not use this file except in compliance with the License.
|
|
4581
|
+
* You may obtain a copy of the License at
|
|
4582
|
+
*
|
|
4583
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4584
|
+
*
|
|
4585
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4586
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
4587
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4588
|
+
* See the License for the specific language governing permissions and
|
|
4589
|
+
* limitations under the License.
|
|
4590
|
+
*/
|
|
4591
|
+
var NotificatiesApiInboundEventStatus;
|
|
4592
|
+
(function (NotificatiesApiInboundEventStatus) {
|
|
4593
|
+
NotificatiesApiInboundEventStatus["RECEIVED"] = "RECEIVED";
|
|
4594
|
+
NotificatiesApiInboundEventStatus["PROCESSED"] = "PROCESSED";
|
|
4595
|
+
NotificatiesApiInboundEventStatus["FAILED"] = "FAILED";
|
|
4596
|
+
})(NotificatiesApiInboundEventStatus || (NotificatiesApiInboundEventStatus = {}));
|
|
4597
|
+
|
|
4598
|
+
/*
|
|
4599
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
4600
|
+
*
|
|
4601
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4602
|
+
* you may not use this file except in compliance with the License.
|
|
4603
|
+
* You may obtain a copy of the License at
|
|
4604
|
+
*
|
|
4605
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
4606
|
+
*
|
|
4607
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4608
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4609
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4610
|
+
* See the License for the specific language governing permissions and
|
|
4611
|
+
* limitations under the License.
|
|
4612
|
+
*/
|
|
4613
|
+
const routes = [
|
|
4614
|
+
{
|
|
4615
|
+
path: 'notifications-api/notifications/failed',
|
|
4616
|
+
component: FailedNotificationsPageComponent,
|
|
4617
|
+
canActivate: [AuthGuardService],
|
|
4618
|
+
data: {
|
|
4619
|
+
title: 'zgw.notifications.failed.pageTitle',
|
|
4620
|
+
roles: [ROLE_ADMIN],
|
|
4621
|
+
},
|
|
4622
|
+
},
|
|
4623
|
+
];
|
|
4624
|
+
class NotificatiesApiRoutingModule {
|
|
4625
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: NotificatiesApiRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4626
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: NotificatiesApiRoutingModule, imports: [CommonModule, i1$2.RouterModule], exports: [RouterModule] }); }
|
|
4627
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: NotificatiesApiRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
|
|
4628
|
+
}
|
|
4629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: NotificatiesApiRoutingModule, decorators: [{
|
|
4630
|
+
type: NgModule,
|
|
4631
|
+
args: [{
|
|
4632
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
4633
|
+
exports: [RouterModule],
|
|
4634
|
+
}]
|
|
4635
|
+
}] });
|
|
4636
|
+
|
|
4336
4637
|
/*
|
|
4337
4638
|
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
4338
4639
|
*
|
|
@@ -4572,7 +4873,8 @@ class ZgwModule {
|
|
|
4572
4873
|
FileSizeModule,
|
|
4573
4874
|
ResourceModule,
|
|
4574
4875
|
RouterModule,
|
|
4575
|
-
DocumentenApiMetadataModalComponent
|
|
4876
|
+
DocumentenApiMetadataModalComponent,
|
|
4877
|
+
NotificatiesApiRoutingModule], exports: [DocumentenApiUploaderComponent] }); }
|
|
4576
4878
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ZgwModule, providers: [
|
|
4577
4879
|
{
|
|
4578
4880
|
provide: CASE_MANAGEMENT_TAB_TOKEN,
|
|
@@ -4603,7 +4905,8 @@ class ZgwModule {
|
|
|
4603
4905
|
FileSizeModule,
|
|
4604
4906
|
ResourceModule,
|
|
4605
4907
|
RouterModule,
|
|
4606
|
-
DocumentenApiMetadataModalComponent
|
|
4908
|
+
DocumentenApiMetadataModalComponent,
|
|
4909
|
+
NotificatiesApiRoutingModule] }); }
|
|
4607
4910
|
}
|
|
4608
4911
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ZgwModule, decorators: [{
|
|
4609
4912
|
type: NgModule,
|
|
@@ -4618,6 +4921,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
4618
4921
|
ResourceModule,
|
|
4619
4922
|
RouterModule,
|
|
4620
4923
|
DocumentenApiMetadataModalComponent,
|
|
4924
|
+
NotificatiesApiRoutingModule,
|
|
4621
4925
|
],
|
|
4622
4926
|
declarations: [DocumentenApiUploaderComponent],
|
|
4623
4927
|
exports: [DocumentenApiUploaderComponent],
|
|
@@ -4670,5 +4974,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
4670
4974
|
* Generated bundle index. Do not edit.
|
|
4671
4975
|
*/
|
|
4672
4976
|
|
|
4673
|
-
export { COLUMN_VIEW_TYPES, CONFIDENTIALITY_LEVELS, CaseDetailTabDocumentenApiDocumentsComponent, CaseDetailTabObjectTypeComponent, CaseDetailTabZaakobjectenComponent, CaseManagementLinkProcessComponent, CaseManagementZgwComponent, CaseManagementZgwService, DOCUMENTEN_COLUMN_KEYS, DocumentObjectenApiSyncComponent, DocumentObjectenApiSyncService, DocumentenApiColumnModalComponent, DocumentenApiColumnService, DocumentenApiColumnsComponent, DocumentenApiDocumentService, DocumentenApiFilterComponent, DocumentenApiLinkProcessService, DocumentenApiMetadataModalComponent, DocumentenApiTagModalComponent, DocumentenApiTagService, DocumentenApiTagsComponent, DocumentenApiUploadFieldModalComponent, DocumentenApiUploadFieldsComponent, DocumentenApiUploaderComponent, DocumentenApiVersionComponent, DocumentenApiVersionService, LANGUAGE_ITEMS, STATUS_ITEMS, ZaakobjectenService, ZakenApiZaaktypeLinkComponent, ZakenApiZaaktypeLinkService, ZgwModule, ZgwTabEnum, customDocumentApiUploaderType, documentenApiUploaderEditForm, registerDocumentenApiFormioUploadComponent };
|
|
4977
|
+
export { COLUMN_VIEW_TYPES, CONFIDENTIALITY_LEVELS, CaseDetailTabDocumentenApiDocumentsComponent, CaseDetailTabObjectTypeComponent, CaseDetailTabZaakobjectenComponent, CaseManagementLinkProcessComponent, CaseManagementZgwComponent, CaseManagementZgwService, DOCUMENTEN_COLUMN_KEYS, DocumentObjectenApiSyncComponent, DocumentObjectenApiSyncService, DocumentenApiColumnModalComponent, DocumentenApiColumnService, DocumentenApiColumnsComponent, DocumentenApiDocumentService, DocumentenApiFilterComponent, DocumentenApiLinkProcessService, DocumentenApiMetadataModalComponent, DocumentenApiTagModalComponent, DocumentenApiTagService, DocumentenApiTagsComponent, DocumentenApiUploadFieldModalComponent, DocumentenApiUploadFieldsComponent, DocumentenApiUploaderComponent, DocumentenApiVersionComponent, DocumentenApiVersionService, FailedNotificationDetailComponent, FailedNotificationsPageComponent, FailedNotificationsService, LANGUAGE_ITEMS, NotificatiesApiInboundEventStatus, NotificatiesApiRoutingModule, STATUS_ITEMS, ZaakobjectenService, ZakenApiZaaktypeLinkComponent, ZakenApiZaaktypeLinkService, ZgwModule, ZgwTabEnum, customDocumentApiUploaderType, documentenApiUploaderEditForm, registerDocumentenApiFormioUploadComponent };
|
|
4674
4978
|
//# sourceMappingURL=valtimo-zgw.mjs.map
|