@valtimo/zgw 13.35.0 → 13.36.1

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.
@@ -6,7 +6,7 @@ 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, InterceptorSkipHeader, 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';
9
+ import { BaseApiService, InterceptorSkipHeader, getCaseManagementRouteParams, UploadProvider, ROLE_ADMIN, zgwFeaturesGuard, ConfigService, 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 i6 from 'carbon-components-angular';
11
11
  import { ModalModule, InputModule, ButtonModule, DropdownModule, RadioModule, NotificationModule, LayerModule, TagModule, IconModule, DatePickerInputModule, DatePickerModule, ComboBoxModule, TooltipModule, ToggleModule, LoadingModule, ToggletipModule, CheckboxModule, TilesModule, SelectModule as SelectModule$1, TabsModule, AccordionModule, StructuredListModule } from 'carbon-components-angular';
12
12
  import { catchError, of, BehaviorSubject, combineLatest, map, Subscription, switchMap, filter, tap, startWith, debounceTime, Subject, take as take$1, from, ReplaySubject, EMPTY, finalize, distinctUntilChanged, forkJoin } from 'rxjs';
@@ -1619,8 +1619,10 @@ class DocumentenApiPreviewModalComponent {
1619
1619
  this.modalClose.emit();
1620
1620
  }
1621
1621
  onDownload() {
1622
- this.relatedFile$.pipe(take(1)).subscribe(document => {
1623
- this.downloadService.downloadFile(`${this._valtimoEndpointUri}v1/zaken-api/${document.pluginConfigurationId}/case-document/${document.fileId}/files/${document.fileId}/download`, document.bestandsnaam ?? '', true);
1622
+ combineLatest([this.relatedFile$, this.caseDocumentId$])
1623
+ .pipe(take(1))
1624
+ .subscribe(([document, caseDocumentId]) => {
1625
+ this.downloadService.downloadFile(`${this._valtimoEndpointUri}v1/zaken-api/${document.pluginConfigurationId}/case-document/${caseDocumentId}/files/${document.fileId}/download`, document.bestandsnaam ?? '', true);
1624
1626
  });
1625
1627
  }
1626
1628
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DocumentenApiPreviewModalComponent, deps: [{ token: i2.ConfigService }, { token: i4$2.DownloadService }, { token: i3$1.DomSanitizer }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
@@ -2213,9 +2215,10 @@ class CaseManagementLinkProcessComponent {
2213
2215
  });
2214
2216
  }
2215
2217
  setDocumentenApiUploaderProvider(config) {
2216
- const hasDocumentenApiUploadProvider = config.uploadProvider === UploadProvider.DOCUMENTEN_API;
2217
- this.documentenApiUploadProviders$.next(hasDocumentenApiUploadProvider);
2218
- if (hasDocumentenApiUploadProvider)
2218
+ const supportsUploadProcessLink = config.uploadProvider === UploadProvider.DOCUMENTEN_API ||
2219
+ config.uploadProvider === UploadProvider.S3;
2220
+ this.documentenApiUploadProviders$.next(supportsUploadProcessLink);
2221
+ if (supportsUploadProcessLink)
2219
2222
  this.getDefaultSelection();
2220
2223
  }
2221
2224
  getDefaultSelection() {
@@ -5162,7 +5165,7 @@ const routes = [
5162
5165
  {
5163
5166
  path: 'notifications-api/notifications/failed',
5164
5167
  component: FailedNotificationsPageComponent,
5165
- canActivate: [AuthGuardService],
5168
+ canActivate: [AuthGuardService, zgwFeaturesGuard],
5166
5169
  data: {
5167
5170
  title: 'zgw.notifications.failed.pageTitle',
5168
5171
  roles: [ROLE_ADMIN],
@@ -5620,12 +5623,14 @@ class ZgwModule {
5620
5623
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ZgwModule, providers: [
5621
5624
  {
5622
5625
  provide: CASE_MANAGEMENT_TAB_TOKEN,
5623
- useValue: {
5626
+ useFactory: (configService) => ({
5624
5627
  translationKey: 'caseManagement.tabs.zgw',
5625
5628
  component: CaseManagementZgwComponent,
5626
5629
  tabRoute: 'zgw',
5627
5630
  issueTypes: ['zaak-type-link', 'zaakdetail-sync'],
5628
- },
5631
+ enabled$: configService.getFeatureToggleObservable('enableZgwFeatures', true),
5632
+ }),
5633
+ deps: [ConfigService],
5629
5634
  multi: true,
5630
5635
  },
5631
5636
  {
@@ -5675,12 +5680,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
5675
5680
  providers: [
5676
5681
  {
5677
5682
  provide: CASE_MANAGEMENT_TAB_TOKEN,
5678
- useValue: {
5683
+ useFactory: (configService) => ({
5679
5684
  translationKey: 'caseManagement.tabs.zgw',
5680
5685
  component: CaseManagementZgwComponent,
5681
5686
  tabRoute: 'zgw',
5682
5687
  issueTypes: ['zaak-type-link', 'zaakdetail-sync'],
5683
- },
5688
+ enabled$: configService.getFeatureToggleObservable('enableZgwFeatures', true),
5689
+ }),
5690
+ deps: [ConfigService],
5684
5691
  multi: true,
5685
5692
  },
5686
5693
  {