@valtimo/case 13.14.0 → 13.15.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.
@@ -2263,7 +2263,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
2263
2263
  class CaseWidgetCustomComponent extends WidgetProcess {
2264
2264
  set documentId(value) {
2265
2265
  this.baseDocumentId = value;
2266
- this._documentId$.next(value);
2267
2266
  }
2268
2267
  set widgetConfiguration(value) {
2269
2268
  if (!value)
@@ -2274,41 +2273,23 @@ class CaseWidgetCustomComponent extends WidgetProcess {
2274
2273
  get widgetConfig$() {
2275
2274
  return this._widgetConfigSubject$.pipe(filter(config => config !== null));
2276
2275
  }
2277
- constructor(widgetsService, documentService, permissionService, caseTabService, caseWidgetApiService, widgetLayoutService) {
2276
+ constructor(widgetsService, documentService, permissionService) {
2278
2277
  super(documentService, permissionService);
2279
2278
  this.widgetsService = widgetsService;
2280
2279
  this.documentService = documentService;
2281
2280
  this.permissionService = permissionService;
2282
- this.caseTabService = caseTabService;
2283
- this.caseWidgetApiService = caseWidgetApiService;
2284
- this.widgetLayoutService = widgetLayoutService;
2285
- this._documentId$ = new BehaviorSubject('');
2286
2281
  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
2282
  }
2302
2283
  onProcessStartClick(process) {
2303
2284
  this.widgetsService.startProcess(process.processDefinitionKey);
2304
2285
  }
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 }); }
2286
+ 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 }); }
2287
+ 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
2288
  }
2308
2289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CaseWidgetCustomComponent, decorators: [{
2309
2290
  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: [{
2291
+ 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" }]
2292
+ }], ctorParameters: () => [{ type: WidgetsService }, { type: i2.DocumentService }, { type: i2$3.PermissionService }], propDecorators: { documentId: [{
2312
2293
  type: Input,
2313
2294
  args: [{ required: true }]
2314
2295
  }], widgetConfiguration: [{
@@ -3889,21 +3870,14 @@ class CaseDetailHeaderWidgetComponent {
3889
3870
  identifier: documentId,
3890
3871
  })));
3891
3872
  this._fetchData$ = new Subject();
3892
- this._highContrast$ = new BehaviorSubject(false);
3893
3873
  this.headerWidget$ = this._documentId$.pipe(switchMap(documentId => this.caseHeaderWidgetApiService.getHeaderWidget(documentId)), tap(widget => {
3894
3874
  if (!!widget) {
3895
3875
  this._fetchData$.next(null);
3896
- this._highContrast$.next(widget.highContrast);
3897
3876
  }
3898
3877
  }));
3899
- this.theme$ = combineLatest([
3900
- this.cdsThemeService.currentTheme$,
3901
- this._highContrast$,
3902
- ]).pipe(map(([theme, highContrast]) => {
3878
+ this.theme$ = this.cdsThemeService.currentTheme$.pipe(map(theme => {
3903
3879
  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;
3880
+ return isLight ? CARBON_THEME.G10 : CARBON_THEME.G90;
3907
3881
  }));
3908
3882
  this.headerWidgetData$ = this._fetchData$.pipe(switchMap(() => this._documentId$), switchMap(documentId => this.caseHeaderWidgetApiService.getHeaderWidgetData(documentId)));
3909
3883
  this._documentUpdates$ = combineLatest([