@valtimo/case 13.14.0 → 13.16.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.
@@ -1159,7 +1159,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
1159
1159
  }], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: i2.DocumentService }] });
1160
1160
 
1161
1161
  /*
1162
- * Copyright 2015-2025 Ritense BV, the Netherlands.
1162
+ * Copyright 2015-2026 Ritense BV, the Netherlands.
1163
1163
  *
1164
1164
  * Licensed under EUPL, Version 1.2 (the "License");
1165
1165
  * you may not use this file except in compliance with the License.
@@ -1198,6 +1198,16 @@ class CaseDetailTabAuditComponent {
1198
1198
  this.documentService.getAuditLog(this.documentId, pageNumber).subscribe(page => {
1199
1199
  const timelineItems = [];
1200
1200
  page.content.forEach(auditRecord => {
1201
+ if (auditRecord.auditEvent.className ===
1202
+ 'com.ritense.document.event.DocumentRetentionPeriodSetEvent') {
1203
+ const rawRetentionDate = auditRecord.auditEvent['retentionDate'];
1204
+ if (rawRetentionDate) {
1205
+ const retentionMoment = moment(rawRetentionDate);
1206
+ if (retentionMoment.isValid()) {
1207
+ auditRecord.auditEvent['retentionDate'] = retentionMoment.format('DD MMM YYYY HH:mm');
1208
+ }
1209
+ }
1210
+ }
1201
1211
  const occurredOn = moment(auditRecord.metaData.occurredOn);
1202
1212
  const fromNow = occurredOn.fromNow();
1203
1213
  timelineItems.push(new TimelineItemImpl(occurredOn.format('DD MMM YYYY'), occurredOn.format('HH:mm'), auditRecord.metaData.user, fromNow, CaseDetailTabAuditComponent.getTranslationKey(auditRecord.auditEvent), auditRecord.auditEvent, { id: `${auditRecord.metaData.user}-${auditRecord.metaData.occurredOn}` }));
@@ -1899,6 +1909,7 @@ const CASE_WITHOUT_STATUS_STATUS = {
1899
1909
  key: CASES_WITHOUT_STATUS_KEY,
1900
1910
  documentDefinitionName: '',
1901
1911
  title: '',
1912
+ retentionPeriodInDays: 0,
1902
1913
  color: TagColor.Gray,
1903
1914
  visibleInCaseListByDefault: false,
1904
1915
  };
@@ -2263,7 +2274,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
2263
2274
  class CaseWidgetCustomComponent extends WidgetProcess {
2264
2275
  set documentId(value) {
2265
2276
  this.baseDocumentId = value;
2266
- this._documentId$.next(value);
2267
2277
  }
2268
2278
  set widgetConfiguration(value) {
2269
2279
  if (!value)
@@ -2274,41 +2284,23 @@ class CaseWidgetCustomComponent extends WidgetProcess {
2274
2284
  get widgetConfig$() {
2275
2285
  return this._widgetConfigSubject$.pipe(filter(config => config !== null));
2276
2286
  }
2277
- constructor(widgetsService, documentService, permissionService, caseTabService, caseWidgetApiService, widgetLayoutService) {
2287
+ constructor(widgetsService, documentService, permissionService) {
2278
2288
  super(documentService, permissionService);
2279
2289
  this.widgetsService = widgetsService;
2280
2290
  this.documentService = documentService;
2281
2291
  this.permissionService = permissionService;
2282
- this.caseTabService = caseTabService;
2283
- this.caseWidgetApiService = caseWidgetApiService;
2284
- this.widgetLayoutService = widgetLayoutService;
2285
- this._documentId$ = new BehaviorSubject('');
2286
2292
  this._widgetConfigSubject$ = new BehaviorSubject(null);
2287
- this._tabKey$ = this.caseTabService.activeTabKey$;
2288
- this._refresh$ = this.widgetsService.refreshWidgets$.pipe(startWith(null));
2289
- this.widgetData$ = combineLatest([
2290
- this.widgetConfig$,
2291
- this._tabKey$,
2292
- this._documentId$,
2293
- this._refresh$,
2294
- ]).pipe(switchMap(([widget, tabKey, documentId]) => this.caseWidgetApiService.getWidgetData(documentId, tabKey, widget.key, undefined)), tap(() => {
2295
- this.widgetLayoutService.setWidgetDataLoaded(this.widgetUuid);
2296
- }), catchError$1((error) => {
2297
- if (error.status === 404)
2298
- this.widgetLayoutService.setWidgetDataLoaded(this.widgetUuid);
2299
- return of(null);
2300
- }));
2301
2293
  }
2302
2294
  onProcessStartClick(process) {
2303
2295
  this.widgetsService.startProcess(process.processDefinitionKey);
2304
2296
  }
2305
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CaseWidgetCustomComponent, deps: [{ token: WidgetsService }, { token: i2.DocumentService }, { token: i2$3.PermissionService }, { token: CaseTabService }, { token: CaseWidgetsApiService }, { token: i5$1.WidgetLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
2306
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: CaseWidgetCustomComponent, isStandalone: true, selector: "valtimo-case-widget-custom", inputs: { documentId: "documentId", widgetConfiguration: "widgetConfiguration", widgetUuid: "widgetUuid" }, usesInheritance: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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<valtimo-widget-custom\n *ngIf=\"{\n widgetConfiguration: widgetConfig$ | async,\n widgetData: widgetData$ | async,\n } as obs\"\n [widgetConfiguration]=\"obs.widgetConfiguration\"\n [widgetData]=\"obs.widgetData\"\n [widgetUuid]=\"widgetUuid\"\n>\n @if (obs.widgetConfiguration?.actions?.length === 1) {\n @if (obs.widgetConfiguration.actions[0].processDefinitionKey) {\n <button\n *ngIf=\"canCreateCamundaExecution$ | async\"\n cdsButton=\"ghost\"\n (click)=\"onProcessStartClick(obs.widgetConfiguration.actions[0])\"\n >\n {{ obs.widgetConfiguration.actions[0].name }}\n </button>\n }\n }\n</valtimo-widget-custom>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: WidgetCustomComponent, selector: "valtimo-widget-custom", inputs: ["widgetConfiguration", "widgetData", "widgetUuid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2297
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CaseWidgetCustomComponent, deps: [{ token: WidgetsService }, { token: i2.DocumentService }, { token: i2$3.PermissionService }], target: i0.ɵɵFactoryTarget.Component }); }
2298
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: CaseWidgetCustomComponent, isStandalone: true, selector: "valtimo-case-widget-custom", inputs: { documentId: "documentId", widgetConfiguration: "widgetConfiguration", widgetUuid: "widgetUuid" }, usesInheritance: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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<valtimo-widget-custom\n *ngIf=\"{\n widgetConfiguration: widgetConfig$ | async\n } as obs\"\n [widgetConfiguration]=\"obs.widgetConfiguration\"\n [widgetUuid]=\"widgetUuid\"\n>\n @if (obs.widgetConfiguration?.actions?.length === 1) {\n @if (obs.widgetConfiguration.actions[0].processDefinitionKey) {\n <button\n *ngIf=\"canCreateCamundaExecution$ | async\"\n cdsButton=\"ghost\"\n (click)=\"onProcessStartClick(obs.widgetConfiguration.actions[0])\"\n >\n {{ obs.widgetConfiguration.actions[0].name }}\n </button>\n }\n }\n</valtimo-widget-custom>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "ngmodule", type: CarbonListModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4$1.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "component", type: WidgetCustomComponent, selector: "valtimo-widget-custom", inputs: ["widgetConfiguration", "widgetData", "widgetUuid"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2307
2299
  }
2308
2300
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CaseWidgetCustomComponent, decorators: [{
2309
2301
  type: Component,
2310
- args: [{ selector: 'valtimo-case-widget-custom', standalone: true, imports: [CommonModule, CarbonListModule, TranslateModule, ButtonModule, WidgetCustomComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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<valtimo-widget-custom\n *ngIf=\"{\n widgetConfiguration: widgetConfig$ | async,\n widgetData: widgetData$ | async,\n } as obs\"\n [widgetConfiguration]=\"obs.widgetConfiguration\"\n [widgetData]=\"obs.widgetData\"\n [widgetUuid]=\"widgetUuid\"\n>\n @if (obs.widgetConfiguration?.actions?.length === 1) {\n @if (obs.widgetConfiguration.actions[0].processDefinitionKey) {\n <button\n *ngIf=\"canCreateCamundaExecution$ | async\"\n cdsButton=\"ghost\"\n (click)=\"onProcessStartClick(obs.widgetConfiguration.actions[0])\"\n >\n {{ obs.widgetConfiguration.actions[0].name }}\n </button>\n }\n }\n</valtimo-widget-custom>\n" }]
2311
- }], ctorParameters: () => [{ type: WidgetsService }, { type: i2.DocumentService }, { type: i2$3.PermissionService }, { type: CaseTabService }, { type: CaseWidgetsApiService }, { type: i5$1.WidgetLayoutService }], propDecorators: { documentId: [{
2302
+ args: [{ selector: 'valtimo-case-widget-custom', standalone: true, imports: [CommonModule, CarbonListModule, TranslateModule, ButtonModule, WidgetCustomComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n ~ Copyright 2015-2025 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<valtimo-widget-custom\n *ngIf=\"{\n widgetConfiguration: widgetConfig$ | async\n } as obs\"\n [widgetConfiguration]=\"obs.widgetConfiguration\"\n [widgetUuid]=\"widgetUuid\"\n>\n @if (obs.widgetConfiguration?.actions?.length === 1) {\n @if (obs.widgetConfiguration.actions[0].processDefinitionKey) {\n <button\n *ngIf=\"canCreateCamundaExecution$ | async\"\n cdsButton=\"ghost\"\n (click)=\"onProcessStartClick(obs.widgetConfiguration.actions[0])\"\n >\n {{ obs.widgetConfiguration.actions[0].name }}\n </button>\n }\n }\n</valtimo-widget-custom>\n" }]
2303
+ }], ctorParameters: () => [{ type: WidgetsService }, { type: i2.DocumentService }, { type: i2$3.PermissionService }], propDecorators: { documentId: [{
2312
2304
  type: Input,
2313
2305
  args: [{ required: true }]
2314
2306
  }], widgetConfiguration: [{
@@ -3889,21 +3881,14 @@ class CaseDetailHeaderWidgetComponent {
3889
3881
  identifier: documentId,
3890
3882
  })));
3891
3883
  this._fetchData$ = new Subject();
3892
- this._highContrast$ = new BehaviorSubject(false);
3893
3884
  this.headerWidget$ = this._documentId$.pipe(switchMap(documentId => this.caseHeaderWidgetApiService.getHeaderWidget(documentId)), tap(widget => {
3894
3885
  if (!!widget) {
3895
3886
  this._fetchData$.next(null);
3896
- this._highContrast$.next(widget.highContrast);
3897
3887
  }
3898
3888
  }));
3899
- this.theme$ = combineLatest([
3900
- this.cdsThemeService.currentTheme$,
3901
- this._highContrast$,
3902
- ]).pipe(map(([theme, highContrast]) => {
3889
+ this.theme$ = this.cdsThemeService.currentTheme$.pipe(map(theme => {
3903
3890
  const isLight = theme === CurrentCarbonTheme.WHITE || theme === CurrentCarbonTheme.G10;
3904
- const normalTheme = isLight ? CARBON_THEME.G10 : CARBON_THEME.G90;
3905
- const invertedTheme = normalTheme === CARBON_THEME.G10 ? CARBON_THEME.G90 : CARBON_THEME.G10;
3906
- return highContrast ? invertedTheme : normalTheme;
3891
+ return isLight ? CARBON_THEME.G10 : CARBON_THEME.G90;
3907
3892
  }));
3908
3893
  this.headerWidgetData$ = this._fetchData$.pipe(switchMap(() => this._documentId$), switchMap(documentId => this.caseHeaderWidgetApiService.getHeaderWidgetData(documentId)));
3909
3894
  this._documentUpdates$ = combineLatest([