@valtimo/zgw 12.7.0 → 12.9.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/esm2022/lib/modules/documenten-api/components/documenten-api-documents/documenten-api-documents.component.mjs +58 -10
- package/esm2022/lib/modules/documenten-api/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.mjs +5 -3
- package/fesm2022/valtimo-zgw.mjs +61 -12
- package/fesm2022/valtimo-zgw.mjs.map +1 -1
- package/lib/modules/documenten-api/components/documenten-api-documents/documenten-api-documents.component.d.ts +17 -1
- package/lib/modules/documenten-api/components/documenten-api-documents/documenten-api-documents.component.d.ts.map +1 -1
- package/lib/modules/documenten-api/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts +1 -0
- package/lib/modules/documenten-api/components/documenten-api-metadata-modal/documenten-api-metadata-modal.component.d.ts.map +1 -1
- package/package.json +1 -1
package/fesm2022/valtimo-zgw.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter,
|
|
2
|
+
import { Injectable, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, ViewChild, signal, NgModule, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import * as i6 from 'carbon-components-angular';
|
|
4
4
|
import { ModalModule, InputModule, ButtonModule, DropdownModule, RadioModule, NotificationModule, TagModule, IconModule, DatePickerInputModule, DatePickerModule, ComboBoxModule, TooltipModule, DialogModule, ToggleModule, CheckboxModule, LoadingModule, TabsModule } from 'carbon-components-angular';
|
|
5
5
|
import * as i3 from '@ngx-translate/core';
|
|
@@ -18,16 +18,17 @@ import { HttpParams } from '@angular/common/http';
|
|
|
18
18
|
import * as i1$2 from '@angular/router';
|
|
19
19
|
import { RouterModule } from '@angular/router';
|
|
20
20
|
import { TrashCan16, Filter16, TagGroup16, Upload16 } from '@carbon/icons';
|
|
21
|
+
import * as i2$1 from '@valtimo/resource';
|
|
22
|
+
import { CAN_CREATE_RESOURCE_PERMISSION, RESOURCE_PERMISSION_RESOURCE, CAN_DELETE_RESOURCE_PERMISSION, CAN_MODIFY_RESOURCE_PERMISSION, CAN_VIEW_RESOURCE_PERMISSION, ResourceModule } from '@valtimo/resource';
|
|
21
23
|
import { tap as tap$1, map as map$1, filter as filter$1, switchMap as switchMap$1, catchError, take as take$1, debounceTime as debounceTime$1 } from 'rxjs/operators';
|
|
22
24
|
import flatpickr from 'flatpickr';
|
|
23
25
|
import * as i1$3 from '@valtimo/document';
|
|
24
26
|
import { DocumentModule } from '@valtimo/document';
|
|
25
27
|
import moment from 'moment';
|
|
26
28
|
import * as i5 from 'keycloak-angular';
|
|
27
|
-
import * as i2$1 from '@valtimo/resource';
|
|
28
|
-
import { ResourceModule } from '@valtimo/resource';
|
|
29
29
|
import * as i5$1 from '@valtimo/security';
|
|
30
30
|
import { AuthGuardService } from '@valtimo/security';
|
|
31
|
+
import * as i9 from '@valtimo/access-control';
|
|
31
32
|
import * as i4$1 from 'ngx-toastr';
|
|
32
33
|
import { FormioModule } from '@formio/angular';
|
|
33
34
|
|
|
@@ -1184,6 +1185,7 @@ class DocumentenApiMetadataModalComponent {
|
|
|
1184
1185
|
ngOnDestroy() {
|
|
1185
1186
|
this._subscriptions.unsubscribe();
|
|
1186
1187
|
this._fileSubscription?.unsubscribe();
|
|
1188
|
+
this._fileNameAndAuthorSubscription?.unsubscribe();
|
|
1187
1189
|
this.isDefinitiveStatus$.next(false);
|
|
1188
1190
|
}
|
|
1189
1191
|
languageSelected(event) {
|
|
@@ -1262,7 +1264,8 @@ class DocumentenApiMetadataModalComponent {
|
|
|
1262
1264
|
this.documentenApiMetadataForm.reset();
|
|
1263
1265
|
}
|
|
1264
1266
|
prefillFilenameAndAuthor() {
|
|
1265
|
-
this.
|
|
1267
|
+
this._fileNameAndAuthorSubscription?.unsubscribe();
|
|
1268
|
+
this._fileNameAndAuthorSubscription = combineLatest([this.file$, this.userEmail$])
|
|
1266
1269
|
.pipe(tap$1(([file, userEmail]) => {
|
|
1267
1270
|
const filename = file?.bestandsnaam || this.defaultValues.bestandsnaam || file?.name;
|
|
1268
1271
|
this.filenameExtension = filename?.split('.')?.pop() || '';
|
|
@@ -1281,7 +1284,7 @@ class DocumentenApiMetadataModalComponent {
|
|
|
1281
1284
|
this.save();
|
|
1282
1285
|
}
|
|
1283
1286
|
}))
|
|
1284
|
-
.subscribe()
|
|
1287
|
+
.subscribe();
|
|
1285
1288
|
}
|
|
1286
1289
|
filenameToTitle(filename) {
|
|
1287
1290
|
if (!filename) {
|
|
@@ -1439,7 +1442,7 @@ class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
|
1439
1442
|
get sortState$() {
|
|
1440
1443
|
return this._sort$.pipe(map$1(sortValue => this.getSortStateFromSortString(sortValue?.sort)));
|
|
1441
1444
|
}
|
|
1442
|
-
constructor(route, router, uploadProviderService, downloadService, translateService, configService, userProviderService, iconService, documentenApiDocumentService, documentenApiColumnService, documentenApiVersionService) {
|
|
1445
|
+
constructor(route, router, uploadProviderService, downloadService, translateService, configService, userProviderService, iconService, documentenApiDocumentService, documentenApiColumnService, documentenApiVersionService, permissionService) {
|
|
1443
1446
|
this.route = route;
|
|
1444
1447
|
this.router = router;
|
|
1445
1448
|
this.uploadProviderService = uploadProviderService;
|
|
@@ -1451,6 +1454,7 @@ class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
|
1451
1454
|
this.documentenApiDocumentService = documentenApiDocumentService;
|
|
1452
1455
|
this.documentenApiColumnService = documentenApiColumnService;
|
|
1453
1456
|
this.documentenApiVersionService = documentenApiVersionService;
|
|
1457
|
+
this.permissionService = permissionService;
|
|
1454
1458
|
this._documentDefinitionName$ = this.route.params.pipe(map$1(params => params?.documentDefinitionName), filter$1(caseDefinitionName => !!caseDefinitionName));
|
|
1455
1459
|
this.supportedDocumentenApiFeatures$ = new BehaviorSubject(null);
|
|
1456
1460
|
this._supportedDocumentenApiFeatures$ = this._documentDefinitionName$.pipe(switchMap$1(caseDefinitionName => this.documentenApiVersionService.getSupportedApiFeatures(caseDefinitionName)), tap$1(supportedDocumentenApiFeatures => this.supportedDocumentenApiFeatures$.next(supportedDocumentenApiFeatures)));
|
|
@@ -1481,6 +1485,7 @@ class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
|
1481
1485
|
{
|
|
1482
1486
|
label: 'document.download',
|
|
1483
1487
|
callback: this.onDownloadActionClick.bind(this),
|
|
1488
|
+
disabledCallback: this.downloadDisabled.bind(this),
|
|
1484
1489
|
type: 'normal',
|
|
1485
1490
|
},
|
|
1486
1491
|
{
|
|
@@ -1492,6 +1497,7 @@ class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
|
1492
1497
|
{
|
|
1493
1498
|
label: 'document.delete',
|
|
1494
1499
|
callback: this.onDeleteActionClick.bind(this),
|
|
1500
|
+
disabledCallback: this.deleteDisabled.bind(this),
|
|
1495
1501
|
type: 'danger',
|
|
1496
1502
|
},
|
|
1497
1503
|
];
|
|
@@ -1575,6 +1581,12 @@ class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
|
1575
1581
|
this._itemsLoading$.next(false);
|
|
1576
1582
|
return of([]);
|
|
1577
1583
|
}));
|
|
1584
|
+
this.enablePbacDocumentenApiDocuments$ = this.configService.getFeatureToggleObservable('enablePbacDocumentenApiDocuments');
|
|
1585
|
+
this.filePermissions = {};
|
|
1586
|
+
this.canCreateResource$ = this.documentId$.pipe(switchMap$1(documentId => this.getPermission(CAN_CREATE_RESOURCE_PERMISSION, {
|
|
1587
|
+
resource: RESOURCE_PERMISSION_RESOURCE.jsonSchemaDocument,
|
|
1588
|
+
identifier: documentId,
|
|
1589
|
+
})));
|
|
1578
1590
|
this._subscriptions = new Subscription();
|
|
1579
1591
|
this.iconService.register(Filter16);
|
|
1580
1592
|
this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
@@ -1584,6 +1596,21 @@ class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
|
1584
1596
|
this.setUploadProcessLinked();
|
|
1585
1597
|
this.isUserAdmin();
|
|
1586
1598
|
this.iconService.registerAll([Filter16, TagGroup16, Upload16]);
|
|
1599
|
+
this.registerPermissionSubscriptions();
|
|
1600
|
+
}
|
|
1601
|
+
registerPermissionSubscriptions() {
|
|
1602
|
+
this._subscriptions.add(this.relatedFiles$
|
|
1603
|
+
.pipe(switchMap$1(files => combineLatest({
|
|
1604
|
+
files: of(files),
|
|
1605
|
+
canView: this.getPermissions(files, CAN_VIEW_RESOURCE_PERMISSION),
|
|
1606
|
+
canModify: this.getPermissions(files, CAN_MODIFY_RESOURCE_PERMISSION),
|
|
1607
|
+
canDelete: this.getPermissions(files, CAN_DELETE_RESOURCE_PERMISSION),
|
|
1608
|
+
})))
|
|
1609
|
+
.subscribe(permissions => permissions.files.map(file => (this.filePermissions[file.fileId] = {
|
|
1610
|
+
canView: permissions.canView[file.fileId],
|
|
1611
|
+
canModify: permissions.canModify[file.fileId],
|
|
1612
|
+
canDelete: permissions.canDelete[file.fileId],
|
|
1613
|
+
}))));
|
|
1587
1614
|
}
|
|
1588
1615
|
ngOnDestroy() {
|
|
1589
1616
|
this._subscriptions.unsubscribe();
|
|
@@ -1680,7 +1707,9 @@ class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
|
1680
1707
|
});
|
|
1681
1708
|
}
|
|
1682
1709
|
onRowClick(event) {
|
|
1683
|
-
this.
|
|
1710
|
+
if (this.filePermissions[event.fileId]?.canView) {
|
|
1711
|
+
this.downloadDocument(event, false);
|
|
1712
|
+
}
|
|
1684
1713
|
}
|
|
1685
1714
|
onPaginationClicked(page) {
|
|
1686
1715
|
this.pagination$.next({ ...this.pagination$.getValue(), page });
|
|
@@ -1707,8 +1736,14 @@ class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
|
1707
1736
|
refetchDocuments() {
|
|
1708
1737
|
this._refetch$.next(null);
|
|
1709
1738
|
}
|
|
1739
|
+
downloadDisabled(file) {
|
|
1740
|
+
return !this.filePermissions[file.fileId]?.canView;
|
|
1741
|
+
}
|
|
1710
1742
|
editDisabled(file) {
|
|
1711
|
-
return file.status === 'definitief';
|
|
1743
|
+
return file.status === 'definitief' || !this.filePermissions[file.fileId]?.canModify;
|
|
1744
|
+
}
|
|
1745
|
+
deleteDisabled(file) {
|
|
1746
|
+
return !this.filePermissions[file.fileId]?.canDelete;
|
|
1712
1747
|
}
|
|
1713
1748
|
downloadDocument(relatedFile, forceDownload) {
|
|
1714
1749
|
this.downloadService.downloadFile(`${this.valtimoEndpointUri}v1/documenten-api/${relatedFile.pluginConfigurationId}/files/${relatedFile.fileId}/download`, relatedFile.bestandsnaam ?? '', forceDownload);
|
|
@@ -1769,8 +1804,22 @@ class DossierDetailTabDocumentenApiDocumentsComponent {
|
|
|
1769
1804
|
}
|
|
1770
1805
|
return null;
|
|
1771
1806
|
}
|
|
1772
|
-
|
|
1773
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: DossierDetailTabDocumentenApiDocumentsComponent, isStandalone: true, selector: "valtimo-dossier-detail-tab-documenten-api-documents", viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }, { propertyName: "translationTemplate", first: true, predicate: ["translationTemplate"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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<div\n class=\"carbon-document-table-wrapper\"\n *ngIf=\"{\n loading: loading$ | async,\n fieldsLoading: fieldsLoading$ | async,\n uploading: uploading$ | async,\n relatedFiles: relatedFiles$ | async,\n fields: fields$ | async,\n supportedDocumentenApiFeatures: supportedDocumentenApiFeatures$ | async,\n pagination: pagination$ | async,\n sortState: sortState$ | async,\n uploadFields: uploadFields$ | async,\n defaultValues: defaultValues$ | async,\n hideFields: hideFields$ | async,\n } as obs\"\n>\n @if ((!obs.fieldsLoading && obs.fields.length) || obs.fieldsLoading) {\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [items]=\"obs.relatedFiles\"\n [fields]=\"obs.fields\"\n [initialSortState]=\"obs.sortState\"\n [loading]=\"obs.loading\"\n [pagination]=\"obs.pagination\"\n [paginatorConfig]=\"paginatorConfig\"\n paginationIdentifier=\"documentenApi\"\n (rowClicked)=\"onRowClick($event)\"\n (sortChanged)=\"\n obs?.supportedDocumentenApiFeatures?.supportsSortableColumns && onSortChanged($event)\n \"\n (paginationClicked)=\"onPaginationClicked($event)\"\n (paginationSet)=\"onPaginationSet($event)\"\n hideColumnHeader\n >\n <div carbonToolbarContent>\n <input\n [accept]=\"acceptedFiles\"\n (change)=\"onFileSelected($event)\"\n hidden\n type=\"file\"\n #fileInput\n />\n\n <button\n *ngIf=\"obs?.supportedDocumentenApiFeatures?.supportsFilterableColumns\"\n [cdsOverflowMenu]=\"overflowFilter\"\n [customPane]=\"true\"\n [iconOnly]=\"true\"\n [flip]=\"true\"\n [offset]=\"{x: 0, y: 47}\"\n cdsButton=\"ghost\"\n placement=\"bottom\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"filter\" size=\"16\"></svg>\n </button>\n\n <ng-container *ngTemplateOutlet=\"uploadButton\"></ng-container>\n </div>\n\n <ng-container *ngTemplateOutlet=\"noResults\"></ng-container>\n </valtimo-carbon-list>\n } @else {\n <valtimo-no-results\n [action]=\"navigateToCaseAdminButton\"\n [description]=\"'zgw.documents.noColumns.description' | translate\"\n [title]=\"'zgw.documents.noColumns.title' | translate\"\n ></valtimo-no-results>\n }\n\n <valtimo-documenten-api-metadata-modal\n [defaultValues]=\"obs.defaultValues\"\n [disableAuthor]=\"obs.uploadFields?.auteur?.readonly\"\n [disableConfidentialityLevel]=\"obs.uploadFields?.vertrouwelijkheidaanduiding?.readonly\"\n [disableCreationDate]=\"obs.uploadFields?.creatiedatum?.readonly\"\n [disableDescription]=\"obs.uploadFields?.beschrijving?.readonly\"\n [disableDocumentTitle]=\"obs.uploadFields?.titel?.readonly\"\n [disableDocumentType]=\"obs.uploadFields?.informatieobjecttype?.readonly\"\n [disableFilename]=\"obs.uploadFields?.bestandsnaam?.readonly\"\n [disableLanguage]=\"obs.uploadFields?.taal?.readonly\"\n [disableStatus]=\"obs.uploadFields?.status?.readonly\"\n [hideFields]=\"obs.hideFields\"\n [open]=\"showUploadModal$ | async\"\n [disabled$]=\"modalDisabled$\"\n [file$]=\"fileToBeUploaded$\"\n [isEditMode]=\"isEditMode$ | async\"\n [supportsTrefwoorden]=\"obs?.supportedDocumentenApiFeatures?.supportsTrefwoorden\"\n (modalClose)=\"closeMetadataModal()\"\n (metadata)=\"metadataSet($event)\"\n ></valtimo-documenten-api-metadata-modal>\n</div>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"dashboardManagement.deleteModal.confirm\"\n contentTranslationKey=\"dossier.documenten.deleteConfirmationModal.content\"\n confirmButtonType=\"danger\"\n titleTranslationKey=\"dossier.documenten.deleteConfirmationModal.title\"\n [showModalSubject$]=\"showDeleteConfirmationModal$\"\n (confirmEvent)=\"deleteDocument()\"\n>\n</valtimo-confirmation-modal>\n\n<ng-template #downloadButton let-index=\"index\" let-item=\"item\">\n <div\n *ngIf=\"{isDownloading: indexesIncludeIndex(downloadingFileIndexes$ | async, index)} as vars\"\n class=\"download-button-container\"\n >\n <button\n *ngIf=\"!vars.isDownloading\"\n cdsButton=\"primary\"\n size=\"sm\"\n (click)=\"downloadDocument(item, index)\"\n >\n {{ 'interface.download' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"download\" size=\"16\"></svg>\n </button>\n\n <cds-loading size=\"sm\" *ngIf=\"vars.isDownloading\"></cds-loading>\n </div>\n</ng-template>\n\n<ng-template #noResults>\n @if ((filter$ | async | keyvalue)?.length) {\n <valtimo-no-results\n [action]=\"resetFilterButton\"\n [description]=\"'zgw.documents.noResults.filterDescription' | translate\"\n [title]=\"'zgw.documents.noResults.filterTitle' | translate\"\n ></valtimo-no-results>\n } @else if (showZaakLinkWarning && isAdmin) {\n <valtimo-no-results\n [action]=\"navigateToCaseAdminButton\"\n [description]=\"'dossier.documenten.noZaakFound' | translate\"\n [title]=\"'dossier.documenten.noZaakFoundTitle' | translate\"\n ></valtimo-no-results>\n } @else {\n <valtimo-no-results\n [action]=\"uploadButton\"\n [description]=\"'dossier.documenten.noFiles' | translate\"\n [title]=\"'dossier.documenten.noFilesTitle' | translate\"\n ></valtimo-no-results>\n }\n</ng-template>\n\n<ng-template #overflowFilter>\n <valtimo-dossier-detail-tab-documenten-api-filter\n [prefillFilter]=\"filter$ | async\"\n (filterEvent)=\"onFilterEvent($event)\"\n ></valtimo-dossier-detail-tab-documenten-api-filter>\n</ng-template>\n\n<ng-template #resetFilterButton>\n <button cdsButton=\"primary\" (click)=\"onFilterEvent(null)\">\n {{ 'Reset filter' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #uploadButton let-disabled=\"disabled\">\n <button\n [disabled]=\"(uploadProcessLinkedSet && !uploadProcessLinked) || showZaakLinkWarning || disabled\"\n [vTooltip]=\"getUploadButtonTooltip() | translate\"\n (click)=\"onUploadButtonClick()\"\n cdsButton=\"primary\"\n >\n {{ 'Upload' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #translationTemplate let-data=\"data\">\n @if (data.item[data.key]) {\n {{ 'document.' + data.item[data.key] | translate }}\n } @else {\n -\n }\n</ng-template>\n\n<ng-template #navigateToCaseAdminButton>\n <button (click)=\"onNavigateToCaseAdminClick()\" cdsButton=\"primary\">\n {{ 'dossier.documenten.navigateToCaseAdmin' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"settings\" size=\"16\"></svg>\n </button>\n</ng-template>\n", styles: [".hidden{display:none}.loading-container{padding:var(--cds-grid-margin);display:flex;align-items:center;justify-content:center}.carbon-document-table-wrapper{margin:0}.documenten-api-documents-filesize-template{text-align:right}::ng-deep .cds--overflow-menu-options.cds--overflow-menu-options--open{max-width:max-content!important;width:max-content!important}\n/*!\n * Copyright 2015-2024 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3$1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "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$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "component", type: DocumentenApiMetadataModalComponent, selector: "valtimo-documenten-api-metadata-modal", inputs: ["disabled$", "file$", "hideFields", "defaultValues", "disableAuthor", "disableConfidentialityLevel", "disableDescription", "disableDocumentTitle", "disableDocumentType", "disableFilename", "disableLanguage", "disableStatus", "supportsTrefwoorden", "disableCreationDate", "isEditMode", "open"], outputs: ["metadata", "modalClose"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: DocumentenApiFilterComponent, selector: "valtimo-dossier-detail-tab-documenten-api-filter", outputs: ["filterEvent"] }, { kind: "ngmodule", type: DialogModule }, { kind: "directive", type: i6.OverflowMenuDirective, selector: "[cdsOverflowMenu], [ibmOverflowMenu]", inputs: ["ibmOverflowMenu", "cdsOverflowMenu", "flip", "offset", "wrapperClass", "customPane"], exportAs: ["overflowMenu"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3$1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }] }); }
|
|
1807
|
+
getPermissions(files, permissionRequest) {
|
|
1808
|
+
return combineLatest(files.map(file => this.getPermission(permissionRequest, {
|
|
1809
|
+
resource: RESOURCE_PERMISSION_RESOURCE.resourcePermission,
|
|
1810
|
+
identifier: file.fileId,
|
|
1811
|
+
}).pipe(map$1(available => ({ [file.fileId]: available }))))).pipe(map$1(permissions => permissions.reduce((acc, permission) => ({ ...acc, ...permission }), {})));
|
|
1812
|
+
}
|
|
1813
|
+
getPermission(permissionRequest, context) {
|
|
1814
|
+
return this.enablePbacDocumentenApiDocuments$.pipe(switchMap$1(enabled => {
|
|
1815
|
+
if (!enabled) {
|
|
1816
|
+
return of(true);
|
|
1817
|
+
}
|
|
1818
|
+
return this.permissionService.requestPermission(permissionRequest, context);
|
|
1819
|
+
}));
|
|
1820
|
+
}
|
|
1821
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DossierDetailTabDocumentenApiDocumentsComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1$2.Router }, { token: i2$1.UploadProviderService }, { token: i2$1.DownloadService }, { token: i3.TranslateService }, { token: i2.ConfigService }, { token: i5$1.UserProviderService }, { token: i6.IconService }, { token: DocumentenApiDocumentService }, { token: DocumentenApiColumnService }, { token: DocumentenApiVersionService }, { token: i9.PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1822
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: DossierDetailTabDocumentenApiDocumentsComponent, isStandalone: true, selector: "valtimo-dossier-detail-tab-documenten-api-documents", viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }, { propertyName: "translationTemplate", first: true, predicate: ["translationTemplate"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2024 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<div\n class=\"carbon-document-table-wrapper\"\n *ngIf=\"{\n loading: loading$ | async,\n fieldsLoading: fieldsLoading$ | async,\n uploading: uploading$ | async,\n relatedFiles: relatedFiles$ | async,\n fields: fields$ | async,\n supportedDocumentenApiFeatures: supportedDocumentenApiFeatures$ | async,\n pagination: pagination$ | async,\n sortState: sortState$ | async,\n uploadFields: uploadFields$ | async,\n defaultValues: defaultValues$ | async,\n hideFields: hideFields$ | async,\n } as obs\"\n>\n @if ((!obs.fieldsLoading && obs.fields.length) || obs.fieldsLoading) {\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [items]=\"obs.relatedFiles\"\n [fields]=\"obs.fields\"\n [initialSortState]=\"obs.sortState\"\n [loading]=\"obs.loading\"\n [pagination]=\"obs.pagination\"\n [paginatorConfig]=\"paginatorConfig\"\n paginationIdentifier=\"documentenApi\"\n (rowClicked)=\"onRowClick($event)\"\n (sortChanged)=\"\n obs?.supportedDocumentenApiFeatures?.supportsSortableColumns && onSortChanged($event)\n \"\n (paginationClicked)=\"onPaginationClicked($event)\"\n (paginationSet)=\"onPaginationSet($event)\"\n hideColumnHeader\n >\n <div carbonToolbarContent>\n <input\n [accept]=\"acceptedFiles\"\n (change)=\"onFileSelected($event)\"\n hidden\n type=\"file\"\n #fileInput\n />\n\n <button\n *ngIf=\"obs?.supportedDocumentenApiFeatures?.supportsFilterableColumns\"\n [cdsOverflowMenu]=\"overflowFilter\"\n [customPane]=\"true\"\n [iconOnly]=\"true\"\n [flip]=\"true\"\n [offset]=\"{x: 0, y: 47}\"\n cdsButton=\"ghost\"\n placement=\"bottom\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"filter\" size=\"16\"></svg>\n </button>\n\n <ng-container *ngTemplateOutlet=\"uploadButton\"></ng-container>\n </div>\n\n <ng-container *ngTemplateOutlet=\"noResults\"></ng-container>\n </valtimo-carbon-list>\n } @else {\n <valtimo-no-results\n [action]=\"navigateToCaseAdminButton\"\n [description]=\"'zgw.documents.noColumns.description' | translate\"\n [title]=\"'zgw.documents.noColumns.title' | translate\"\n ></valtimo-no-results>\n }\n\n <valtimo-documenten-api-metadata-modal\n [defaultValues]=\"obs.defaultValues\"\n [disableAuthor]=\"obs.uploadFields?.auteur?.readonly\"\n [disableConfidentialityLevel]=\"obs.uploadFields?.vertrouwelijkheidaanduiding?.readonly\"\n [disableCreationDate]=\"obs.uploadFields?.creatiedatum?.readonly\"\n [disableDescription]=\"obs.uploadFields?.beschrijving?.readonly\"\n [disableDocumentTitle]=\"obs.uploadFields?.titel?.readonly\"\n [disableDocumentType]=\"obs.uploadFields?.informatieobjecttype?.readonly\"\n [disableFilename]=\"obs.uploadFields?.bestandsnaam?.readonly\"\n [disableLanguage]=\"obs.uploadFields?.taal?.readonly\"\n [disableStatus]=\"obs.uploadFields?.status?.readonly\"\n [hideFields]=\"obs.hideFields\"\n [open]=\"showUploadModal$ | async\"\n [disabled$]=\"modalDisabled$\"\n [file$]=\"fileToBeUploaded$\"\n [isEditMode]=\"isEditMode$ | async\"\n [supportsTrefwoorden]=\"obs?.supportedDocumentenApiFeatures?.supportsTrefwoorden\"\n (modalClose)=\"closeMetadataModal()\"\n (metadata)=\"metadataSet($event)\"\n ></valtimo-documenten-api-metadata-modal>\n</div>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"dashboardManagement.deleteModal.confirm\"\n contentTranslationKey=\"dossier.documenten.deleteConfirmationModal.content\"\n confirmButtonType=\"danger\"\n titleTranslationKey=\"dossier.documenten.deleteConfirmationModal.title\"\n [showModalSubject$]=\"showDeleteConfirmationModal$\"\n (confirmEvent)=\"deleteDocument()\"\n>\n</valtimo-confirmation-modal>\n\n<ng-template #noResults>\n @if ((filter$ | async | keyvalue)?.length) {\n <valtimo-no-results\n [action]=\"resetFilterButton\"\n [description]=\"'zgw.documents.noResults.filterDescription' | translate\"\n [title]=\"'zgw.documents.noResults.filterTitle' | translate\"\n ></valtimo-no-results>\n } @else if (showZaakLinkWarning && isAdmin) {\n <valtimo-no-results\n [action]=\"navigateToCaseAdminButton\"\n [description]=\"'dossier.documenten.noZaakFound' | translate\"\n [title]=\"'dossier.documenten.noZaakFoundTitle' | translate\"\n ></valtimo-no-results>\n } @else {\n <valtimo-no-results\n [action]=\"uploadButton\"\n [description]=\"'dossier.documenten.noFiles' | translate\"\n [title]=\"'dossier.documenten.noFilesTitle' | translate\"\n ></valtimo-no-results>\n }\n</ng-template>\n\n<ng-template #overflowFilter>\n <valtimo-dossier-detail-tab-documenten-api-filter\n [prefillFilter]=\"filter$ | async\"\n (filterEvent)=\"onFilterEvent($event)\"\n ></valtimo-dossier-detail-tab-documenten-api-filter>\n</ng-template>\n\n<ng-template #resetFilterButton>\n <button cdsButton=\"primary\" (click)=\"onFilterEvent(null)\">\n {{ 'Reset filter' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #uploadButton let-disabled=\"disabled\">\n <button\n [disabled]=\"\n (uploadProcessLinkedSet && !uploadProcessLinked) ||\n showZaakLinkWarning ||\n disabled ||\n (canCreateResource$ | async) === false\n \"\n [vTooltip]=\"getUploadButtonTooltip() | translate\"\n (click)=\"onUploadButtonClick()\"\n cdsButton=\"primary\"\n >\n {{ 'Upload' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #translationTemplate let-data=\"data\">\n @if (data.item[data.key]) {\n {{ 'document.' + data.item[data.key] | translate }}\n } @else {\n -\n }\n</ng-template>\n\n<ng-template #navigateToCaseAdminButton>\n <button (click)=\"onNavigateToCaseAdminClick()\" cdsButton=\"primary\">\n {{ 'dossier.documenten.navigateToCaseAdmin' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"settings\" size=\"16\"></svg>\n </button>\n</ng-template>\n", styles: [".hidden{display:none}.loading-container{padding:var(--cds-grid-margin);display:flex;align-items:center;justify-content:center}.carbon-document-table-wrapper{margin:0}.documenten-api-documents-filesize-template{text-align:right}::ng-deep .cds--overflow-menu-options.cds--overflow-menu-options--open{max-width:max-content!important;width:max-content!important}\n/*!\n * Copyright 2015-2024 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i3$1.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "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$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "component", type: DocumentenApiMetadataModalComponent, selector: "valtimo-documenten-api-metadata-modal", inputs: ["disabled$", "file$", "hideFields", "defaultValues", "disableAuthor", "disableConfidentialityLevel", "disableDescription", "disableDocumentTitle", "disableDocumentType", "disableFilename", "disableLanguage", "disableStatus", "supportsTrefwoorden", "disableCreationDate", "isEditMode", "open"], outputs: ["metadata", "modalClose"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i6.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: DocumentenApiFilterComponent, selector: "valtimo-dossier-detail-tab-documenten-api-filter", outputs: ["filterEvent"] }, { kind: "ngmodule", type: DialogModule }, { kind: "directive", type: i6.OverflowMenuDirective, selector: "[cdsOverflowMenu], [ibmOverflowMenu]", inputs: ["ibmOverflowMenu", "cdsOverflowMenu", "flip", "offset", "wrapperClass", "customPane"], exportAs: ["overflowMenu"] }, { kind: "ngmodule", type: ConfirmationModalModule }, { kind: "component", type: i3$1.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }] }); }
|
|
1774
1823
|
}
|
|
1775
1824
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DossierDetailTabDocumentenApiDocumentsComponent, decorators: [{
|
|
1776
1825
|
type: Component,
|
|
@@ -1784,8 +1833,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1784
1833
|
DocumentenApiFilterComponent,
|
|
1785
1834
|
DialogModule,
|
|
1786
1835
|
ConfirmationModalModule,
|
|
1787
|
-
], template: "<!--\n ~ Copyright 2015-2024 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<div\n class=\"carbon-document-table-wrapper\"\n *ngIf=\"{\n loading: loading$ | async,\n fieldsLoading: fieldsLoading$ | async,\n uploading: uploading$ | async,\n relatedFiles: relatedFiles$ | async,\n fields: fields$ | async,\n supportedDocumentenApiFeatures: supportedDocumentenApiFeatures$ | async,\n pagination: pagination$ | async,\n sortState: sortState$ | async,\n uploadFields: uploadFields$ | async,\n defaultValues: defaultValues$ | async,\n hideFields: hideFields$ | async,\n } as obs\"\n>\n @if ((!obs.fieldsLoading && obs.fields.length) || obs.fieldsLoading) {\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [items]=\"obs.relatedFiles\"\n [fields]=\"obs.fields\"\n [initialSortState]=\"obs.sortState\"\n [loading]=\"obs.loading\"\n [pagination]=\"obs.pagination\"\n [paginatorConfig]=\"paginatorConfig\"\n paginationIdentifier=\"documentenApi\"\n (rowClicked)=\"onRowClick($event)\"\n (sortChanged)=\"\n obs?.supportedDocumentenApiFeatures?.supportsSortableColumns && onSortChanged($event)\n \"\n (paginationClicked)=\"onPaginationClicked($event)\"\n (paginationSet)=\"onPaginationSet($event)\"\n hideColumnHeader\n >\n <div carbonToolbarContent>\n <input\n [accept]=\"acceptedFiles\"\n (change)=\"onFileSelected($event)\"\n hidden\n type=\"file\"\n #fileInput\n />\n\n <button\n *ngIf=\"obs?.supportedDocumentenApiFeatures?.supportsFilterableColumns\"\n [cdsOverflowMenu]=\"overflowFilter\"\n [customPane]=\"true\"\n [iconOnly]=\"true\"\n [flip]=\"true\"\n [offset]=\"{x: 0, y: 47}\"\n cdsButton=\"ghost\"\n placement=\"bottom\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"filter\" size=\"16\"></svg>\n </button>\n\n <ng-container *ngTemplateOutlet=\"uploadButton\"></ng-container>\n </div>\n\n <ng-container *ngTemplateOutlet=\"noResults\"></ng-container>\n </valtimo-carbon-list>\n } @else {\n <valtimo-no-results\n [action]=\"navigateToCaseAdminButton\"\n [description]=\"'zgw.documents.noColumns.description' | translate\"\n [title]=\"'zgw.documents.noColumns.title' | translate\"\n ></valtimo-no-results>\n }\n\n <valtimo-documenten-api-metadata-modal\n [defaultValues]=\"obs.defaultValues\"\n [disableAuthor]=\"obs.uploadFields?.auteur?.readonly\"\n [disableConfidentialityLevel]=\"obs.uploadFields?.vertrouwelijkheidaanduiding?.readonly\"\n [disableCreationDate]=\"obs.uploadFields?.creatiedatum?.readonly\"\n [disableDescription]=\"obs.uploadFields?.beschrijving?.readonly\"\n [disableDocumentTitle]=\"obs.uploadFields?.titel?.readonly\"\n [disableDocumentType]=\"obs.uploadFields?.informatieobjecttype?.readonly\"\n [disableFilename]=\"obs.uploadFields?.bestandsnaam?.readonly\"\n [disableLanguage]=\"obs.uploadFields?.taal?.readonly\"\n [disableStatus]=\"obs.uploadFields?.status?.readonly\"\n [hideFields]=\"obs.hideFields\"\n [open]=\"showUploadModal$ | async\"\n [disabled$]=\"modalDisabled$\"\n [file$]=\"fileToBeUploaded$\"\n [isEditMode]=\"isEditMode$ | async\"\n [supportsTrefwoorden]=\"obs?.supportedDocumentenApiFeatures?.supportsTrefwoorden\"\n (modalClose)=\"closeMetadataModal()\"\n (metadata)=\"metadataSet($event)\"\n ></valtimo-documenten-api-metadata-modal>\n</div>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"dashboardManagement.deleteModal.confirm\"\n contentTranslationKey=\"dossier.documenten.deleteConfirmationModal.content\"\n confirmButtonType=\"danger\"\n titleTranslationKey=\"dossier.documenten.deleteConfirmationModal.title\"\n [showModalSubject$]=\"showDeleteConfirmationModal$\"\n (confirmEvent)=\"deleteDocument()\"\n>\n</valtimo-confirmation-modal>\n\n<ng-template #
|
|
1788
|
-
}], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: i2$1.UploadProviderService }, { type: i2$1.DownloadService }, { type: i3.TranslateService }, { type: i2.ConfigService }, { type: i5$1.UserProviderService }, { type: i6.IconService }, { type: DocumentenApiDocumentService }, { type: DocumentenApiColumnService }, { type: DocumentenApiVersionService }], propDecorators: { fileInput: [{
|
|
1836
|
+
], template: "<!--\n ~ Copyright 2015-2024 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<div\n class=\"carbon-document-table-wrapper\"\n *ngIf=\"{\n loading: loading$ | async,\n fieldsLoading: fieldsLoading$ | async,\n uploading: uploading$ | async,\n relatedFiles: relatedFiles$ | async,\n fields: fields$ | async,\n supportedDocumentenApiFeatures: supportedDocumentenApiFeatures$ | async,\n pagination: pagination$ | async,\n sortState: sortState$ | async,\n uploadFields: uploadFields$ | async,\n defaultValues: defaultValues$ | async,\n hideFields: hideFields$ | async,\n } as obs\"\n>\n @if ((!obs.fieldsLoading && obs.fields.length) || obs.fieldsLoading) {\n <valtimo-carbon-list\n [actionItems]=\"actionItems\"\n [items]=\"obs.relatedFiles\"\n [fields]=\"obs.fields\"\n [initialSortState]=\"obs.sortState\"\n [loading]=\"obs.loading\"\n [pagination]=\"obs.pagination\"\n [paginatorConfig]=\"paginatorConfig\"\n paginationIdentifier=\"documentenApi\"\n (rowClicked)=\"onRowClick($event)\"\n (sortChanged)=\"\n obs?.supportedDocumentenApiFeatures?.supportsSortableColumns && onSortChanged($event)\n \"\n (paginationClicked)=\"onPaginationClicked($event)\"\n (paginationSet)=\"onPaginationSet($event)\"\n hideColumnHeader\n >\n <div carbonToolbarContent>\n <input\n [accept]=\"acceptedFiles\"\n (change)=\"onFileSelected($event)\"\n hidden\n type=\"file\"\n #fileInput\n />\n\n <button\n *ngIf=\"obs?.supportedDocumentenApiFeatures?.supportsFilterableColumns\"\n [cdsOverflowMenu]=\"overflowFilter\"\n [customPane]=\"true\"\n [iconOnly]=\"true\"\n [flip]=\"true\"\n [offset]=\"{x: 0, y: 47}\"\n cdsButton=\"ghost\"\n placement=\"bottom\"\n >\n <svg class=\"cds--btn__icon\" cdsIcon=\"filter\" size=\"16\"></svg>\n </button>\n\n <ng-container *ngTemplateOutlet=\"uploadButton\"></ng-container>\n </div>\n\n <ng-container *ngTemplateOutlet=\"noResults\"></ng-container>\n </valtimo-carbon-list>\n } @else {\n <valtimo-no-results\n [action]=\"navigateToCaseAdminButton\"\n [description]=\"'zgw.documents.noColumns.description' | translate\"\n [title]=\"'zgw.documents.noColumns.title' | translate\"\n ></valtimo-no-results>\n }\n\n <valtimo-documenten-api-metadata-modal\n [defaultValues]=\"obs.defaultValues\"\n [disableAuthor]=\"obs.uploadFields?.auteur?.readonly\"\n [disableConfidentialityLevel]=\"obs.uploadFields?.vertrouwelijkheidaanduiding?.readonly\"\n [disableCreationDate]=\"obs.uploadFields?.creatiedatum?.readonly\"\n [disableDescription]=\"obs.uploadFields?.beschrijving?.readonly\"\n [disableDocumentTitle]=\"obs.uploadFields?.titel?.readonly\"\n [disableDocumentType]=\"obs.uploadFields?.informatieobjecttype?.readonly\"\n [disableFilename]=\"obs.uploadFields?.bestandsnaam?.readonly\"\n [disableLanguage]=\"obs.uploadFields?.taal?.readonly\"\n [disableStatus]=\"obs.uploadFields?.status?.readonly\"\n [hideFields]=\"obs.hideFields\"\n [open]=\"showUploadModal$ | async\"\n [disabled$]=\"modalDisabled$\"\n [file$]=\"fileToBeUploaded$\"\n [isEditMode]=\"isEditMode$ | async\"\n [supportsTrefwoorden]=\"obs?.supportedDocumentenApiFeatures?.supportsTrefwoorden\"\n (modalClose)=\"closeMetadataModal()\"\n (metadata)=\"metadataSet($event)\"\n ></valtimo-documenten-api-metadata-modal>\n</div>\n\n<valtimo-confirmation-modal\n confirmButtonTextTranslationKey=\"dashboardManagement.deleteModal.confirm\"\n contentTranslationKey=\"dossier.documenten.deleteConfirmationModal.content\"\n confirmButtonType=\"danger\"\n titleTranslationKey=\"dossier.documenten.deleteConfirmationModal.title\"\n [showModalSubject$]=\"showDeleteConfirmationModal$\"\n (confirmEvent)=\"deleteDocument()\"\n>\n</valtimo-confirmation-modal>\n\n<ng-template #noResults>\n @if ((filter$ | async | keyvalue)?.length) {\n <valtimo-no-results\n [action]=\"resetFilterButton\"\n [description]=\"'zgw.documents.noResults.filterDescription' | translate\"\n [title]=\"'zgw.documents.noResults.filterTitle' | translate\"\n ></valtimo-no-results>\n } @else if (showZaakLinkWarning && isAdmin) {\n <valtimo-no-results\n [action]=\"navigateToCaseAdminButton\"\n [description]=\"'dossier.documenten.noZaakFound' | translate\"\n [title]=\"'dossier.documenten.noZaakFoundTitle' | translate\"\n ></valtimo-no-results>\n } @else {\n <valtimo-no-results\n [action]=\"uploadButton\"\n [description]=\"'dossier.documenten.noFiles' | translate\"\n [title]=\"'dossier.documenten.noFilesTitle' | translate\"\n ></valtimo-no-results>\n }\n</ng-template>\n\n<ng-template #overflowFilter>\n <valtimo-dossier-detail-tab-documenten-api-filter\n [prefillFilter]=\"filter$ | async\"\n (filterEvent)=\"onFilterEvent($event)\"\n ></valtimo-dossier-detail-tab-documenten-api-filter>\n</ng-template>\n\n<ng-template #resetFilterButton>\n <button cdsButton=\"primary\" (click)=\"onFilterEvent(null)\">\n {{ 'Reset filter' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"trash-can\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #uploadButton let-disabled=\"disabled\">\n <button\n [disabled]=\"\n (uploadProcessLinkedSet && !uploadProcessLinked) ||\n showZaakLinkWarning ||\n disabled ||\n (canCreateResource$ | async) === false\n \"\n [vTooltip]=\"getUploadButtonTooltip() | translate\"\n (click)=\"onUploadButtonClick()\"\n cdsButton=\"primary\"\n >\n {{ 'Upload' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"upload\" size=\"16\"></svg>\n </button>\n</ng-template>\n\n<ng-template #translationTemplate let-data=\"data\">\n @if (data.item[data.key]) {\n {{ 'document.' + data.item[data.key] | translate }}\n } @else {\n -\n }\n</ng-template>\n\n<ng-template #navigateToCaseAdminButton>\n <button (click)=\"onNavigateToCaseAdminClick()\" cdsButton=\"primary\">\n {{ 'dossier.documenten.navigateToCaseAdmin' | translate }}\n\n <svg class=\"cds--btn__icon\" cdsIcon=\"settings\" size=\"16\"></svg>\n </button>\n</ng-template>\n", styles: [".hidden{display:none}.loading-container{padding:var(--cds-grid-margin);display:flex;align-items:center;justify-content:center}.carbon-document-table-wrapper{margin:0}.documenten-api-documents-filesize-template{text-align:right}::ng-deep .cds--overflow-menu-options.cds--overflow-menu-options--open{max-width:max-content!important;width:max-content!important}\n/*!\n * Copyright 2015-2024 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"] }]
|
|
1837
|
+
}], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: i2$1.UploadProviderService }, { type: i2$1.DownloadService }, { type: i3.TranslateService }, { type: i2.ConfigService }, { type: i5$1.UserProviderService }, { type: i6.IconService }, { type: DocumentenApiDocumentService }, { type: DocumentenApiColumnService }, { type: DocumentenApiVersionService }, { type: i9.PermissionService }], propDecorators: { fileInput: [{
|
|
1789
1838
|
type: ViewChild,
|
|
1790
1839
|
args: ['fileInput']
|
|
1791
1840
|
}], translationTemplate: [{
|