@valtimo/layout 13.31.0 → 13.33.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-layout.mjs +91 -34
- package/fesm2022/valtimo-layout.mjs.map +1 -1
- package/lib/components/widget-action-button/widget-action-button.component.d.ts +3 -1
- package/lib/components/widget-action-button/widget-action-button.component.d.ts.map +1 -1
- package/lib/components/widget-block/widget-block.component.d.ts +1 -1
- package/lib/components/widget-block/widget-block.component.d.ts.map +1 -1
- package/lib/components/widget-container/widget-container.component.d.ts +4 -1
- package/lib/components/widget-container/widget-container.component.d.ts.map +1 -1
- package/lib/components/widget-management/management-content/metroline/widget-management-metroline.component.d.ts +9 -0
- package/lib/components/widget-management/management-content/metroline/widget-management-metroline.component.d.ts.map +1 -1
- package/lib/components/widget-metroline/widget-metroline.component.d.ts.map +1 -1
- package/lib/constants/widget.constants.d.ts +1 -1
- package/lib/constants/widget.constants.d.ts.map +1 -1
- package/lib/models/widget-content.model.d.ts +9 -2
- package/lib/models/widget-content.model.d.ts.map +1 -1
- package/lib/services/widget-layout.service.d.ts +4 -0
- package/lib/services/widget-layout.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import { CommonModule, DOCUMENT, DatePipe } from '@angular/common';
|
|
|
11
11
|
import * as i2$2 from '@ngx-translate/core';
|
|
12
12
|
import { TranslateModule, TranslatePipe } from '@ngx-translate/core';
|
|
13
13
|
import * as i1$1 from '@valtimo/components';
|
|
14
|
-
import { ViewType, CarbonListModule, EllipsisPipe, MdiIconViewerComponent, FormIoModule, CARBON_THEME, CurrentCarbonTheme, InputLabelModule, InputModule as InputModule$1, FormModule, SelectModule, ParagraphModule, DateTimePickerComponent, OverflowMenuComponent, OverflowMenuOptionComponent, runAfterCarbonModalClosed, AutoKeyInputComponent, CARBON_CONSTANTS, ValuePathSelectorPrefix, CarbonMultiInputModule, ConfirmationModalModule, JsonEditorComponent, RemoveClassnamesDirective, ValuePathSelectorComponent, MdiIconSelectorComponent, ValuePathType, MenuRoutingModule, TopbarModule, LeftSidebarModule, RightSidebarModule, PageHeaderModule, AlertModule, PromptModule, MultiInputFormModule, RenderInPageHeaderDirective } from '@valtimo/components';
|
|
14
|
+
import { ViewType, CarbonListModule, EllipsisPipe, MdiIconViewerComponent, WIDGET_ROW_HEIGHT_DEFAULT, FormIoModule, CARBON_THEME, CurrentCarbonTheme, InputLabelModule, InputModule as InputModule$1, FormModule, SelectModule, ParagraphModule, DateTimePickerComponent, OverflowMenuComponent, OverflowMenuOptionComponent, resolveWidgetLayout, runAfterCarbonModalClosed, AutoKeyInputComponent, CARBON_CONSTANTS, ValuePathSelectorPrefix, CarbonMultiInputModule, ConfirmationModalModule, JsonEditorComponent, RemoveClassnamesDirective, ValuePathSelectorComponent, MdiIconSelectorComponent, ValuePathType, MenuRoutingModule, TopbarModule, LeftSidebarModule, RightSidebarModule, PageHeaderModule, AlertModule, PromptModule, MultiInputFormModule, RenderInPageHeaderDirective } from '@valtimo/components';
|
|
15
15
|
import * as i3 from 'carbon-components-angular';
|
|
16
16
|
import { ButtonModule, InputModule, LayerModule, SkeletonModule, PaginationModel, PaginationModule, TilesModule, IconModule, TimePickerModule, MenuButtonModule, ContextMenuModule, LoadingModule, ModalModule, TooltipModule, ComboBoxModule, CheckboxModule, DropdownModule, StructuredListModule, ToggleModule, AccordionModule, ProgressIndicatorModule, TabsModule, ToggletipModule, TagModule, Tab, SelectModule as SelectModule$1, RadioModule, PlaceholderModule } from 'carbon-components-angular';
|
|
17
17
|
import { Subscription, BehaviorSubject, combineLatest, map, tap, switchMap, take, filter as filter$1, Subject, debounceTime, of, startWith, merge, delay } from 'rxjs';
|
|
@@ -121,7 +121,7 @@ var WidgetColor;
|
|
|
121
121
|
})(WidgetColor || (WidgetColor = {}));
|
|
122
122
|
|
|
123
123
|
/*
|
|
124
|
-
* Copyright 2015-
|
|
124
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
125
125
|
*
|
|
126
126
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
127
127
|
* you may not use this file except in compliance with the License.
|
|
@@ -524,8 +524,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
524
524
|
* limitations under the License.
|
|
525
525
|
*/
|
|
526
526
|
class WidgetActionButtonComponent {
|
|
527
|
-
constructor(globalNotificationService) {
|
|
527
|
+
constructor(globalNotificationService, router) {
|
|
528
528
|
this.globalNotificationService = globalNotificationService;
|
|
529
|
+
this.router = router;
|
|
529
530
|
}
|
|
530
531
|
onNavigateButtonClick(buttonAction) {
|
|
531
532
|
const navigateTo = this.getNavigateToUrl(buttonAction);
|
|
@@ -540,6 +541,12 @@ class WidgetActionButtonComponent {
|
|
|
540
541
|
if (buttonAction?.openInNewTab) {
|
|
541
542
|
window.open(navigateTo, '_blank', 'noopener,noreferrer');
|
|
542
543
|
}
|
|
544
|
+
else if (navigateTo.startsWith(window.location.origin)) {
|
|
545
|
+
this.router.navigateByUrl(navigateTo.substring(window.location.origin.length));
|
|
546
|
+
}
|
|
547
|
+
else if (navigateTo.startsWith('/')) {
|
|
548
|
+
this.router.navigateByUrl(navigateTo);
|
|
549
|
+
}
|
|
543
550
|
else {
|
|
544
551
|
window.open(navigateTo, '_self');
|
|
545
552
|
}
|
|
@@ -556,13 +563,13 @@ class WidgetActionButtonComponent {
|
|
|
556
563
|
const value = resolved[property];
|
|
557
564
|
return value != null ? String(value) : null;
|
|
558
565
|
}
|
|
559
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WidgetActionButtonComponent, deps: [{ token: i2.GlobalNotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
566
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WidgetActionButtonComponent, deps: [{ token: i2.GlobalNotificationService }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
560
567
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: WidgetActionButtonComponent, isStandalone: true, selector: "valtimo-widget-action-button", inputs: { widgetConfiguration: "widgetConfiguration", resolvedData: "resolvedData" }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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@if (widgetConfiguration.actions?.[0] && getNavigateToUrl(widgetConfiguration.actions[0])) {\n <button\n class=\"action-button\"\n cdsButton=\"ghost\"\n (click)=\"onNavigateButtonClick(widgetConfiguration.actions[0])\"\n >\n {{ widgetConfiguration.actions[0].name }}\n </button>\n}\n", styles: [":host:empty{display:none}.action-button{--cds-layout-size-height-local: 0;--cds-layout-density-padding-inline-local: 0}\n/*!\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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }] }); }
|
|
561
568
|
}
|
|
562
569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WidgetActionButtonComponent, decorators: [{
|
|
563
570
|
type: Component,
|
|
564
571
|
args: [{ selector: 'valtimo-widget-action-button', standalone: true, imports: [CommonModule, ButtonModule], template: "<!--\n ~ Copyright 2015-2026 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@if (widgetConfiguration.actions?.[0] && getNavigateToUrl(widgetConfiguration.actions[0])) {\n <button\n class=\"action-button\"\n cdsButton=\"ghost\"\n (click)=\"onNavigateButtonClick(widgetConfiguration.actions[0])\"\n >\n {{ widgetConfiguration.actions[0].name }}\n </button>\n}\n", styles: [":host:empty{display:none}.action-button{--cds-layout-size-height-local: 0;--cds-layout-density-padding-inline-local: 0}\n/*!\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"] }]
|
|
565
|
-
}], ctorParameters: () => [{ type: i2.GlobalNotificationService }], propDecorators: { widgetConfiguration: [{
|
|
572
|
+
}], ctorParameters: () => [{ type: i2.GlobalNotificationService }, { type: i2$1.Router }], propDecorators: { widgetConfiguration: [{
|
|
566
573
|
type: Input
|
|
567
574
|
}], resolvedData: [{
|
|
568
575
|
type: Input
|
|
@@ -915,7 +922,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
915
922
|
*/
|
|
916
923
|
|
|
917
924
|
/*
|
|
918
|
-
* Copyright 2015-
|
|
925
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
919
926
|
*
|
|
920
927
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
921
928
|
* you may not use this file except in compliance with the License.
|
|
@@ -939,6 +946,9 @@ class WidgetLayoutService {
|
|
|
939
946
|
get amountOfColumns$() {
|
|
940
947
|
return this._containerWidth$.pipe(map(containerWidth => Math.floor(containerWidth / WIDGET_WIDTH_1X)));
|
|
941
948
|
}
|
|
949
|
+
get rowHeightUnit$() {
|
|
950
|
+
return this._rowHeightUnit$.asObservable();
|
|
951
|
+
}
|
|
942
952
|
get _widgets$() {
|
|
943
953
|
return this._widgetsSubject$.pipe(filter$1(widgets => widgets !== null));
|
|
944
954
|
}
|
|
@@ -961,6 +971,8 @@ class WidgetLayoutService {
|
|
|
961
971
|
this._widgetDataLoadedSubject$ = new BehaviorSubject(null);
|
|
962
972
|
this._muuriSubject$ = new BehaviorSubject(null);
|
|
963
973
|
this._triggerMuuriLayout$ = new Subject();
|
|
974
|
+
/** Row-unit height (px) each widget snaps to; depends on the layout algorithm. */
|
|
975
|
+
this._rowHeightUnit$ = new BehaviorSubject(WIDGET_ROW_HEIGHT_DEFAULT);
|
|
964
976
|
this._widgetsWithExternalData$ = new BehaviorSubject([]);
|
|
965
977
|
this._widgetsWithExternalDataReady$ = new BehaviorSubject([]);
|
|
966
978
|
this._subscriptions = new Subscription();
|
|
@@ -991,6 +1003,9 @@ class WidgetLayoutService {
|
|
|
991
1003
|
setContainerWidth(width) {
|
|
992
1004
|
this._containerWidthSubject$.next(width);
|
|
993
1005
|
}
|
|
1006
|
+
setRowHeightUnit(rowHeightUnit) {
|
|
1007
|
+
this._rowHeightUnit$.next(rowHeightUnit);
|
|
1008
|
+
}
|
|
994
1009
|
setWidgetDataLoaded(uuid) {
|
|
995
1010
|
this._widgetDataLoadedSubject$.pipe(take(1)).subscribe(widgetDataLoaded => {
|
|
996
1011
|
if (!(widgetDataLoaded || []).includes(uuid)) {
|
|
@@ -1008,7 +1023,7 @@ class WidgetLayoutService {
|
|
|
1008
1023
|
}
|
|
1009
1024
|
openMuuriSubscription() {
|
|
1010
1025
|
this._subscriptions.add(combineLatest([this._muuri$, this._triggerMuuriLayout$])
|
|
1011
|
-
.pipe(debounceTime(
|
|
1026
|
+
.pipe(debounceTime(400))
|
|
1012
1027
|
.subscribe(([muuri]) => {
|
|
1013
1028
|
muuri.refreshItems();
|
|
1014
1029
|
muuri.layout();
|
|
@@ -2216,8 +2231,9 @@ class WidgetBlockComponent {
|
|
|
2216
2231
|
this._contentHeight$,
|
|
2217
2232
|
this._viewContainerRef$,
|
|
2218
2233
|
this.widget$,
|
|
2219
|
-
|
|
2220
|
-
|
|
2234
|
+
this.widgetLayoutService.rowHeightUnit$,
|
|
2235
|
+
]).pipe(filter$1(([contentHeight]) => contentHeight !== 0), tap(([contentHeight, viewRef, , rowHeightUnit]) => {
|
|
2236
|
+
const blockHeight = Math.ceil((contentHeight + 16) / rowHeightUnit) * rowHeightUnit;
|
|
2221
2237
|
this.renderer.setStyle(viewRef.element.nativeElement, 'height', `${blockHeight}px`);
|
|
2222
2238
|
this.widgetLayoutService.triggerMuuriLayout();
|
|
2223
2239
|
}));
|
|
@@ -2351,6 +2367,10 @@ class WidgetContainerComponent {
|
|
|
2351
2367
|
this.loadingWidgetConfiguration$.next(false);
|
|
2352
2368
|
this.initLayout();
|
|
2353
2369
|
}
|
|
2370
|
+
set widgetLayout(value) {
|
|
2371
|
+
this._resolvedLayout = resolveWidgetLayout(value);
|
|
2372
|
+
this.widgetLayoutService.setRowHeightUnit(this._resolvedLayout.rowHeightUnit);
|
|
2373
|
+
}
|
|
2354
2374
|
get widgetComponentMap$() {
|
|
2355
2375
|
return this._widgetComponentMap$.pipe(filter(componentMap => componentMap !== null));
|
|
2356
2376
|
}
|
|
@@ -2360,6 +2380,7 @@ class WidgetContainerComponent {
|
|
|
2360
2380
|
constructor(widgetLayoutService) {
|
|
2361
2381
|
this.widgetLayoutService = widgetLayoutService;
|
|
2362
2382
|
this.widgetsWithUuids$ = new BehaviorSubject(null);
|
|
2383
|
+
this._resolvedLayout = resolveWidgetLayout(null);
|
|
2363
2384
|
this._widgetComponentMap$ = new BehaviorSubject(DEFAULT_WIDGET_COMPONENT_MAP);
|
|
2364
2385
|
this.widgetParams = {};
|
|
2365
2386
|
this.loadingWidgetConfiguration$ = new BehaviorSubject(true);
|
|
@@ -2401,15 +2422,13 @@ class WidgetContainerComponent {
|
|
|
2401
2422
|
initMuuri() {
|
|
2402
2423
|
this.widgetLayoutService.loaded$.pipe(take(1), delay(300)).subscribe(() => {
|
|
2403
2424
|
this.widgetLayoutService.setMuuri(new Muuri(this._widgetsContainerRef.nativeElement, {
|
|
2404
|
-
layout:
|
|
2405
|
-
fillGaps: true,
|
|
2406
|
-
},
|
|
2425
|
+
layout: this._resolvedLayout.muuriLayout,
|
|
2407
2426
|
layoutOnResize: false,
|
|
2408
2427
|
}));
|
|
2409
2428
|
});
|
|
2410
2429
|
}
|
|
2411
2430
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WidgetContainerComponent, deps: [{ token: WidgetLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2412
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: WidgetContainerComponent, isStandalone: true, selector: "valtimo-widget-container", inputs: { widgets: "widgets", widgetComponentMap: "widgetComponentMap", widgetParams: "widgetParams" }, providers: [WidgetLayoutService], viewQueries: [{ propertyName: "_widgetsContainerRef", first: true, predicate: ["widgetsContainer"], descendants: 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<ng-container\n *ngIf=\"{\n loadingWidgetConfiguration: loadingWidgetConfiguration$ | async,\n widgets: widgetsWithUuids$ | async,\n loaded: loaded$ | async,\n } as obs\"\n>\n <ng-container\n *ngIf=\"{\n noWidgetsConfigured: obs.widgets && obs.widgets.length === 0,\n } as vars\"\n >\n @if (!obs.loaded && !vars.noWidgetsConfigured) {\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n }\n\n @if (vars.noWidgetsConfigured) {\n <valtimo-no-results\n [title]=\"'widgets.noWidgets' | translate\"\n [description]=\"'widgets.noWidgetsDescription' | translate\"\n illustration=\"valtimo-layout/img/no-widgets.svg\"\n ></valtimo-no-results>\n }\n\n <div [style.visibility]=\"!obs.loaded ? 'hidden' : 'visible'\">\n <div #widgetsContainer class=\"widgets-container\">\n @for (widget of (widgetsWithUuids$ | async) || []; track widget.uuid) {\n <valtimo-widget-block\n [widget]=\"widget\"\n [widgetComponentMap]=\"widgetComponentMap$ | async\"\n [widgetParams]=\"widgetParams\"\n ></valtimo-widget-block>\n }\n </div>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".widgets-container{position:relative;width:calc(100% + 16px);margin-left:-8px;margin-top:-8px;padding-bottom:32px;box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:16px 0}\n/*!\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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "component", type: WidgetBlockComponent, selector: "valtimo-widget-block", inputs: ["widget", "widgetComponentMap", "widgetParams"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: i3.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2431
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: WidgetContainerComponent, isStandalone: true, selector: "valtimo-widget-container", inputs: { widgets: "widgets", widgetLayout: "widgetLayout", widgetComponentMap: "widgetComponentMap", widgetParams: "widgetParams" }, providers: [WidgetLayoutService], viewQueries: [{ propertyName: "_widgetsContainerRef", first: true, predicate: ["widgetsContainer"], descendants: 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<ng-container\n *ngIf=\"{\n loadingWidgetConfiguration: loadingWidgetConfiguration$ | async,\n widgets: widgetsWithUuids$ | async,\n loaded: loaded$ | async,\n } as obs\"\n>\n <ng-container\n *ngIf=\"{\n noWidgetsConfigured: obs.widgets && obs.widgets.length === 0,\n } as vars\"\n >\n @if (!obs.loaded && !vars.noWidgetsConfigured) {\n <div class=\"loading-container\">\n <cds-loading></cds-loading>\n </div>\n }\n\n @if (vars.noWidgetsConfigured) {\n <valtimo-no-results\n [title]=\"'widgets.noWidgets' | translate\"\n [description]=\"'widgets.noWidgetsDescription' | translate\"\n illustration=\"valtimo-layout/img/no-widgets.svg\"\n ></valtimo-no-results>\n }\n\n <div [style.visibility]=\"!obs.loaded ? 'hidden' : 'visible'\">\n <div #widgetsContainer class=\"widgets-container\">\n @for (widget of (widgetsWithUuids$ | async) || []; track widget.uuid) {\n <valtimo-widget-block\n [widget]=\"widget\"\n [widgetComponentMap]=\"widgetComponentMap$ | async\"\n [widgetParams]=\"widgetParams\"\n ></valtimo-widget-block>\n }\n </div>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".widgets-container{position:relative;width:calc(100% + 16px);margin-left:-8px;margin-top:-8px;padding-bottom:32px;box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:16px 0}\n/*!\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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "component", type: WidgetBlockComponent, selector: "valtimo-widget-block", inputs: ["widget", "widgetComponentMap", "widgetParams"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: i3.Loading, selector: "cds-loading, ibm-loading", inputs: ["title", "isActive", "size", "overlay"] }, { kind: "ngmodule", type: CarbonListModule }, { kind: "component", type: i1$1.CarbonNoResultsComponent, selector: "valtimo-no-results", inputs: ["action", "description", "illustration", "title", "smallPadding", "collapseVertically", "alwaysRenderVertically"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2413
2432
|
}
|
|
2414
2433
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WidgetContainerComponent, decorators: [{
|
|
2415
2434
|
type: Component,
|
|
@@ -2419,6 +2438,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
2419
2438
|
args: ['widgetsContainer']
|
|
2420
2439
|
}], widgets: [{
|
|
2421
2440
|
type: Input
|
|
2441
|
+
}], widgetLayout: [{
|
|
2442
|
+
type: Input
|
|
2422
2443
|
}], widgetComponentMap: [{
|
|
2423
2444
|
type: Input
|
|
2424
2445
|
}], widgetParams: [{
|
|
@@ -4613,12 +4634,14 @@ class WidgetMetrolineComponent {
|
|
|
4613
4634
|
this.class = 'valtimo-widget-metroline';
|
|
4614
4635
|
this.widgetConfiguration$ = new BehaviorSubject(null);
|
|
4615
4636
|
this.widgetData$ = new BehaviorSubject(null);
|
|
4616
|
-
this.orientation$ = this.widgetConfiguration$.pipe(map(config => config?.properties?.orientation === MetrolineOrientation.VERTICAL
|
|
4637
|
+
this.orientation$ = this.widgetConfiguration$.pipe(map(config => config?.properties?.orientation === MetrolineOrientation.VERTICAL
|
|
4638
|
+
? 'vertical'
|
|
4639
|
+
: 'horizontal'));
|
|
4617
4640
|
this.displayState$ = combineLatest([
|
|
4618
4641
|
this.widgetData$,
|
|
4619
4642
|
this.widgetConfiguration$,
|
|
4620
4643
|
]).pipe(map(([items, config]) => {
|
|
4621
|
-
const mode = config?.properties?.mode ??
|
|
4644
|
+
const mode = config?.properties?.mode ?? null;
|
|
4622
4645
|
return {
|
|
4623
4646
|
steps: this.toSteps(items, mode),
|
|
4624
4647
|
currentStepIndex: this.toCurrentStepIndex(items, mode),
|
|
@@ -4642,30 +4665,30 @@ class WidgetMetrolineComponent {
|
|
|
4642
4665
|
toSteps(items, mode) {
|
|
4643
4666
|
if (!items?.length)
|
|
4644
4667
|
return [];
|
|
4645
|
-
if (mode === MetrolineMode.
|
|
4646
|
-
|
|
4668
|
+
if (mode === MetrolineMode.INTERNAL_CASE_STATUS) {
|
|
4669
|
+
const lastIndex = items.length - 1;
|
|
4670
|
+
return items.map((item, index) => ({
|
|
4647
4671
|
label: item.title,
|
|
4648
4672
|
secondaryLabel: this.formatCompleted(item.completed),
|
|
4649
|
-
complete:
|
|
4673
|
+
complete: index < lastIndex,
|
|
4650
4674
|
itemLabel: item.label,
|
|
4651
4675
|
}));
|
|
4652
4676
|
}
|
|
4653
|
-
|
|
4654
|
-
return items.map((item, index) => ({
|
|
4677
|
+
return items.map(item => ({
|
|
4655
4678
|
label: item.title,
|
|
4656
4679
|
secondaryLabel: this.formatCompleted(item.completed),
|
|
4657
|
-
complete:
|
|
4680
|
+
complete: item.completed != null,
|
|
4658
4681
|
itemLabel: item.label,
|
|
4659
4682
|
}));
|
|
4660
4683
|
}
|
|
4661
4684
|
toCurrentStepIndex(items, mode) {
|
|
4662
4685
|
if (!items?.length)
|
|
4663
4686
|
return 0;
|
|
4664
|
-
if (mode === MetrolineMode.
|
|
4665
|
-
|
|
4666
|
-
return firstNotCompleted === -1 ? items.length : firstNotCompleted;
|
|
4687
|
+
if (mode === MetrolineMode.INTERNAL_CASE_STATUS) {
|
|
4688
|
+
return items.length - 1;
|
|
4667
4689
|
}
|
|
4668
|
-
|
|
4690
|
+
const firstNotCompleted = items.findIndex(item => item.completed == null);
|
|
4691
|
+
return firstNotCompleted === -1 ? items.length : firstNotCompleted;
|
|
4669
4692
|
}
|
|
4670
4693
|
formatCompleted(completed) {
|
|
4671
4694
|
if (!completed)
|
|
@@ -4730,7 +4753,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4730
4753
|
*/
|
|
4731
4754
|
|
|
4732
4755
|
/*
|
|
4733
|
-
* Copyright 2015-
|
|
4756
|
+
* Copyright 2015-2026 Ritense BV, the Netherlands.
|
|
4734
4757
|
*
|
|
4735
4758
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
4736
4759
|
* you may not use this file except in compliance with the License.
|
|
@@ -4745,7 +4768,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4745
4768
|
* limitations under the License.
|
|
4746
4769
|
*/
|
|
4747
4770
|
const WIDGET_WIDTH_1X = 320;
|
|
4748
|
-
const WIDGET_HEIGHT_1X =
|
|
4771
|
+
const WIDGET_HEIGHT_1X = 92;
|
|
4749
4772
|
const DEFAULT_WIDGET_COMPONENT_MAP = {
|
|
4750
4773
|
[WidgetType.FORMIO]: WidgetFormioComponent,
|
|
4751
4774
|
[WidgetType.CUSTOM]: WidgetCustomComponent,
|
|
@@ -6110,12 +6133,20 @@ class WidgetManagementMetrolineComponent {
|
|
|
6110
6133
|
this.class = 'valtimo-widget-management-metroline';
|
|
6111
6134
|
this.testIds = WIDGET_CONTENT_METROLINE_TEST_IDS;
|
|
6112
6135
|
this.orientationOptions = MetrolineOrientation;
|
|
6136
|
+
this.MetrolineMode = MetrolineMode;
|
|
6137
|
+
this.$widgetContext = this.widgetWizardService.$widgetContext;
|
|
6113
6138
|
this._initialContent = this.widgetWizardService.$widgetContent();
|
|
6139
|
+
this._initialCaseContent = this._initialContent;
|
|
6140
|
+
this._initialIkoContent = this._initialContent;
|
|
6114
6141
|
this.form = this.fb.group({
|
|
6115
6142
|
widgetTitle: this.fb.control(this.widgetWizardService.$widgetTitle(), Validators.required),
|
|
6116
6143
|
widgetIcon: this.fb.control(this.widgetWizardService.$widgetIcon()),
|
|
6117
6144
|
orientation: this.fb.control(this._initialContent?.orientation ?? MetrolineOrientation.HORIZONTAL, Validators.required),
|
|
6118
|
-
mode: this.fb.control(this.
|
|
6145
|
+
mode: this.fb.control(this._initialCaseContent?.mode ?? null, Validators.required),
|
|
6146
|
+
source: this.fb.control(this._initialIkoContent?.source ?? ''),
|
|
6147
|
+
titlePath: this.fb.control(this._initialIkoContent?.titlePath ?? ''),
|
|
6148
|
+
labelPath: this.fb.control(this._initialIkoContent?.labelPath ?? null),
|
|
6149
|
+
completedPath: this.fb.control(this._initialIkoContent?.completedPath ?? ''),
|
|
6119
6150
|
});
|
|
6120
6151
|
this.modeItems$ = combineLatest([
|
|
6121
6152
|
this.metrolineWidgetApiService.getAvailableModes(),
|
|
@@ -6124,6 +6155,17 @@ class WidgetManagementMetrolineComponent {
|
|
|
6124
6155
|
this._subscriptions = new Subscription();
|
|
6125
6156
|
}
|
|
6126
6157
|
ngOnInit() {
|
|
6158
|
+
if (this.$widgetContext() === 'iko') {
|
|
6159
|
+
// Mode is irrelevant for IKO widgets: the data shape (per-item completedPath) drives rendering.
|
|
6160
|
+
this.form.controls.mode.clearValidators();
|
|
6161
|
+
this.form.controls.mode.updateValueAndValidity({ emitEvent: false });
|
|
6162
|
+
this.form.controls.source.addValidators(Validators.required);
|
|
6163
|
+
this.form.controls.titlePath.addValidators(Validators.required);
|
|
6164
|
+
this.form.controls.completedPath.addValidators(Validators.required);
|
|
6165
|
+
this.form.controls.source.updateValueAndValidity({ emitEvent: false });
|
|
6166
|
+
this.form.controls.titlePath.updateValueAndValidity({ emitEvent: false });
|
|
6167
|
+
this.form.controls.completedPath.updateValueAndValidity({ emitEvent: false });
|
|
6168
|
+
}
|
|
6127
6169
|
this.syncWizardServiceFromForm();
|
|
6128
6170
|
this.widgetWizardService.$widgetContentValid.set(this.form.valid);
|
|
6129
6171
|
this._subscriptions.add(this.form.valueChanges.pipe(debounceTime(100)).subscribe(() => {
|
|
@@ -6141,14 +6183,28 @@ class WidgetManagementMetrolineComponent {
|
|
|
6141
6183
|
return;
|
|
6142
6184
|
this.form.patchValue({ mode: event.item.id });
|
|
6143
6185
|
}
|
|
6186
|
+
onOrientationChange(value) {
|
|
6187
|
+
this.form.controls.orientation.setValue(value);
|
|
6188
|
+
}
|
|
6144
6189
|
syncWizardServiceFromForm() {
|
|
6145
6190
|
const value = this.form.getRawValue();
|
|
6146
6191
|
this.widgetWizardService.$widgetTitle.set(value.widgetTitle ?? '');
|
|
6147
6192
|
this.widgetWizardService.$widgetIcon.set(value.widgetIcon ?? '');
|
|
6148
|
-
this
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6193
|
+
if (this.$widgetContext() === 'iko') {
|
|
6194
|
+
this.widgetWizardService.$widgetContent.set({
|
|
6195
|
+
orientation: value.orientation ?? MetrolineOrientation.HORIZONTAL,
|
|
6196
|
+
source: value.source ?? '',
|
|
6197
|
+
titlePath: value.titlePath ?? '',
|
|
6198
|
+
labelPath: value.labelPath || null,
|
|
6199
|
+
completedPath: value.completedPath ?? '',
|
|
6200
|
+
});
|
|
6201
|
+
}
|
|
6202
|
+
else {
|
|
6203
|
+
this.widgetWizardService.$widgetContent.set({
|
|
6204
|
+
orientation: value.orientation ?? MetrolineOrientation.HORIZONTAL,
|
|
6205
|
+
mode: value.mode,
|
|
6206
|
+
});
|
|
6207
|
+
}
|
|
6152
6208
|
}
|
|
6153
6209
|
buildModeItems(availableModes) {
|
|
6154
6210
|
const current = this.form.get('mode')?.value;
|
|
@@ -6162,13 +6218,14 @@ class WidgetManagementMetrolineComponent {
|
|
|
6162
6218
|
}));
|
|
6163
6219
|
}
|
|
6164
6220
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WidgetManagementMetrolineComponent, deps: [{ token: i1$3.FormBuilder }, { token: MetrolineWidgetApiService }, { token: i2$2.TranslateService }, { token: WidgetWizardService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6165
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: WidgetManagementMetrolineComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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<form\n [formGroup]=\"form\"\n class=\"valtimo-widget-management-metroline__title-form\"\n>\n <cds-text-label class=\"valtimo-widget-management-metroline__title-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"widgetTitle\"\n cdsText\n [attr.data-test-id]=\"testIds.widgetTitleInput\"\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <valtimo-mdi-icon-selector\n [cdsLayer]=\"1\"\n formControlName=\"widgetIcon\"\n ></valtimo-mdi-icon-selector>\n</form>\n\n<ng-content></ng-content>\n\n<section\n class=\"valtimo-widget-management-metroline__settings\"\n [formGroup]=\"form\"\n>\n <cds-radio-group\n class=\"valtimo-widget-management-metroline__radio-group\"\n orientation=\"horizontal\"\n formControlName=\"orientation\"\n [attr.data-test-id]=\"testIds.displayTypeRadio\"\n [legend]=\"'widgetTabManagement.content.metroline.displayType.label' | translate\"\n >\n <cds-radio [value]=\"orientationOptions.HORIZONTAL\">\n {{ 'widgetTabManagement.content.metroline.displayType.horizontal' | translate }}\n </cds-radio>\n <cds-radio [value]=\"orientationOptions.VERTICAL\">\n {{ 'widgetTabManagement.content.metroline.displayType.vertical' | translate }}\n </cds-radio>\n </cds-radio-group>\n\n <cds-dropdown\n class=\"valtimo-widget-management-metroline__dropdown\"\n [appendInline]=\"false\"\n [dropUp]=\"false\"\n [attr.data-test-id]=\"testIds.statusSourceDropdown\"\n [label]=\"'widgetTabManagement.content.metroline.statusSource.label' | translate\"\n [placeholder]=\"'widgetTabManagement.content.metroline.statusSource.placeholder' | translate\"\n (selected)=\"onModeSelected($event)\"\n >\n <cds-dropdown-list [items]=\"modeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n</section>\n", styles: [".valtimo-widget-management-metroline{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-metroline__title-form{background:var(--cds-layer-02);display:flex;gap:16px}.valtimo-widget-management-metroline__title-input{max-width:300px}.valtimo-widget-management-metroline__title-input input{background:var(--cds-layer-01)}.valtimo-widget-management-metroline__settings{display:flex;flex-wrap:wrap;align-items:stretch;gap:16px;background:var(--cds-layer-02)}.valtimo-widget-management-metroline__settings>*{flex:0 0 auto}.valtimo-widget-management-metroline__radio-group{padding:8px;background:var(--cds-layer-01)}.valtimo-widget-management-metroline__dropdown{width:300px}.valtimo-widget-management-metroline__dropdown .cds--list-box{background:var(--cds-layer-01)}\n/*!\n * Copyright 2015-2026 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: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i7.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "readonly", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp", "fluid"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i7.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i1$1.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i3.TextInputLabelComponent, selector: "cds-text-label, ibm-text-label", inputs: ["labelInputID", "disabled", "skeleton", "labelTemplate", "textInputTemplate", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel", "fluid"] }, { kind: "directive", type: i3.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i3.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "component", type: MdiIconSelectorComponent, selector: "valtimo-mdi-icon-selector", inputs: ["labelTranslationKey", "tooltipTranslationKey", "placeholderTranslationKey", "appendInline", "dropUp"] }, { kind: "ngmodule", type: RadioModule }, { kind: "component", type: i3.Radio, selector: "cds-radio, ibm-radio", inputs: ["checked", "name", "disabled", "labelPlacement", "ariaLabelledby", "ariaLabel", "required", "value", "skeleton", "id"], outputs: ["change"] }, { kind: "component", type: i3.RadioGroup, selector: "cds-radio-group, ibm-radio-group", inputs: ["selected", "value", "name", "disabled", "skeleton", "orientation", "labelPlacement", "legend", "ariaLabel", "ariaLabelledby", "helperText", "invalid", "invalidText", "warn", "warnText"], outputs: ["change"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6221
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: WidgetManagementMetrolineComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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<form\n [formGroup]=\"form\"\n class=\"valtimo-widget-management-metroline__title-form\"\n>\n <cds-text-label class=\"valtimo-widget-management-metroline__title-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"widgetTitle\"\n cdsText\n [attr.data-test-id]=\"testIds.widgetTitleInput\"\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <valtimo-mdi-icon-selector\n [cdsLayer]=\"1\"\n formControlName=\"widgetIcon\"\n ></valtimo-mdi-icon-selector>\n</form>\n\n<ng-content></ng-content>\n\n<section class=\"valtimo-widget-management-metroline__settings\">\n <cds-radio-group\n class=\"valtimo-widget-management-metroline__radio-group\"\n orientation=\"horizontal\"\n [attr.data-test-id]=\"testIds.displayTypeRadio\"\n [legend]=\"'widgetTabManagement.content.metroline.displayType.label' | translate\"\n [ngModel]=\"form.controls.orientation.value\"\n (ngModelChange)=\"onOrientationChange($event)\"\n [ngModelOptions]=\"{standalone: true}\"\n >\n <cds-radio [value]=\"orientationOptions.HORIZONTAL\">\n {{ 'widgetTabManagement.content.metroline.displayType.horizontal' | translate }}\n </cds-radio>\n <cds-radio [value]=\"orientationOptions.VERTICAL\">\n {{ 'widgetTabManagement.content.metroline.displayType.vertical' | translate }}\n </cds-radio>\n </cds-radio-group>\n\n @if ($widgetContext() !== 'iko') {\n <cds-dropdown\n class=\"valtimo-widget-management-metroline__dropdown\"\n [appendInline]=\"false\"\n [dropUp]=\"false\"\n [attr.data-test-id]=\"testIds.statusSourceDropdown\"\n [label]=\"'widgetTabManagement.content.metroline.statusSource.label' | translate\"\n [placeholder]=\"'widgetTabManagement.content.metroline.statusSource.placeholder' | translate\"\n (selected)=\"onModeSelected($event)\"\n >\n <cds-dropdown-list [items]=\"modeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n }\n</section>\n\n@if ($widgetContext() === 'iko') {\n <section\n class=\"valtimo-widget-management-metroline__iko-block\"\n [formGroup]=\"form\"\n >\n <cds-text-label class=\"valtimo-widget-management-metroline__path-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.metroline.iko.source.label' | translate\"\n [tooltip]=\"'widgetTabManagement.content.metroline.iko.source.tooltip' | translate\"\n >\n </v-input-label>\n <input\n formControlName=\"source\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.metroline.iko.source.placeholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label class=\"valtimo-widget-management-metroline__path-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.metroline.iko.titlePath.label' | translate\"\n [tooltip]=\"'widgetTabManagement.content.metroline.iko.titlePath.tooltip' | translate\"\n >\n </v-input-label>\n <input\n formControlName=\"titlePath\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.metroline.iko.titlePath.placeholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label class=\"valtimo-widget-management-metroline__path-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.metroline.iko.labelPath.label' | translate\"\n [tooltip]=\"'widgetTabManagement.content.metroline.iko.labelPath.tooltip' | translate\"\n >\n </v-input-label>\n <input\n formControlName=\"labelPath\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.metroline.iko.labelPath.placeholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label class=\"valtimo-widget-management-metroline__path-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.metroline.iko.completedPath.label' | translate\"\n [tooltip]=\"'widgetTabManagement.content.metroline.iko.completedPath.tooltip' | translate\"\n >\n </v-input-label>\n <input\n formControlName=\"completedPath\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.metroline.iko.completedPath.placeholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n </section>\n}\n", styles: [".valtimo-widget-management-metroline{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-metroline__title-form{background:var(--cds-layer-02);display:flex;gap:16px}.valtimo-widget-management-metroline__title-input{max-width:300px}.valtimo-widget-management-metroline__title-input input{background:var(--cds-layer-01)}.valtimo-widget-management-metroline__settings{display:flex;flex-wrap:wrap;align-items:stretch;gap:16px;background:var(--cds-layer-02)}.valtimo-widget-management-metroline__settings>*{flex:0 0 auto}.valtimo-widget-management-metroline__radio-group{padding:8px;background:var(--cds-layer-01)}.valtimo-widget-management-metroline__dropdown{width:300px}.valtimo-widget-management-metroline__dropdown .cds--list-box{background:var(--cds-layer-01)}.valtimo-widget-management-metroline__iko-block{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-metroline__path-input{max-width:480px}.valtimo-widget-management-metroline__path-input input{background:var(--cds-layer-01)}\n/*!\n * Copyright 2015-2026 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: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i7.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "readonly", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp", "fluid"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i7.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i1$1.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: i3.TextInputLabelComponent, selector: "cds-text-label, ibm-text-label", inputs: ["labelInputID", "disabled", "skeleton", "labelTemplate", "textInputTemplate", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel", "fluid"] }, { kind: "directive", type: i3.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i3.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }, { kind: "component", type: MdiIconSelectorComponent, selector: "valtimo-mdi-icon-selector", inputs: ["labelTranslationKey", "tooltipTranslationKey", "placeholderTranslationKey", "appendInline", "dropUp"] }, { kind: "ngmodule", type: RadioModule }, { kind: "component", type: i3.Radio, selector: "cds-radio, ibm-radio", inputs: ["checked", "name", "disabled", "labelPlacement", "ariaLabelledby", "ariaLabel", "required", "value", "skeleton", "id"], outputs: ["change"] }, { kind: "component", type: i3.RadioGroup, selector: "cds-radio-group, ibm-radio-group", inputs: ["selected", "value", "name", "disabled", "skeleton", "orientation", "labelPlacement", "legend", "ariaLabel", "ariaLabelledby", "helperText", "invalid", "invalidText", "warn", "warnText"], outputs: ["change"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6166
6222
|
}
|
|
6167
6223
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WidgetManagementMetrolineComponent, decorators: [{
|
|
6168
6224
|
type: Component,
|
|
6169
6225
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
|
|
6170
6226
|
CommonModule,
|
|
6171
6227
|
DropdownModule,
|
|
6228
|
+
FormsModule,
|
|
6172
6229
|
InputLabelModule,
|
|
6173
6230
|
InputModule,
|
|
6174
6231
|
LayerModule,
|
|
@@ -6176,7 +6233,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
6176
6233
|
RadioModule,
|
|
6177
6234
|
ReactiveFormsModule,
|
|
6178
6235
|
TranslateModule,
|
|
6179
|
-
], template: "<!--\n ~ Copyright 2015-2026 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<form\n [formGroup]=\"form\"\n class=\"valtimo-widget-management-metroline__title-form\"\n>\n <cds-text-label class=\"valtimo-widget-management-metroline__title-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"widgetTitle\"\n cdsText\n [attr.data-test-id]=\"testIds.widgetTitleInput\"\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <valtimo-mdi-icon-selector\n [cdsLayer]=\"1\"\n formControlName=\"widgetIcon\"\n ></valtimo-mdi-icon-selector>\n</form>\n\n<ng-content></ng-content>\n\n<section
|
|
6236
|
+
], template: "<!--\n ~ Copyright 2015-2026 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<form\n [formGroup]=\"form\"\n class=\"valtimo-widget-management-metroline__title-form\"\n>\n <cds-text-label class=\"valtimo-widget-management-metroline__title-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.widgetTitle' | translate\"\n [tooltip]=\"'widgetTabManagement.content.widgetTitleTooltip' | translate\"\n >\n </v-input-label>\n\n <input\n formControlName=\"widgetTitle\"\n cdsText\n [attr.data-test-id]=\"testIds.widgetTitleInput\"\n [placeholder]=\"'widgetTabManagement.content.widgetTitlePlaceholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <valtimo-mdi-icon-selector\n [cdsLayer]=\"1\"\n formControlName=\"widgetIcon\"\n ></valtimo-mdi-icon-selector>\n</form>\n\n<ng-content></ng-content>\n\n<section class=\"valtimo-widget-management-metroline__settings\">\n <cds-radio-group\n class=\"valtimo-widget-management-metroline__radio-group\"\n orientation=\"horizontal\"\n [attr.data-test-id]=\"testIds.displayTypeRadio\"\n [legend]=\"'widgetTabManagement.content.metroline.displayType.label' | translate\"\n [ngModel]=\"form.controls.orientation.value\"\n (ngModelChange)=\"onOrientationChange($event)\"\n [ngModelOptions]=\"{standalone: true}\"\n >\n <cds-radio [value]=\"orientationOptions.HORIZONTAL\">\n {{ 'widgetTabManagement.content.metroline.displayType.horizontal' | translate }}\n </cds-radio>\n <cds-radio [value]=\"orientationOptions.VERTICAL\">\n {{ 'widgetTabManagement.content.metroline.displayType.vertical' | translate }}\n </cds-radio>\n </cds-radio-group>\n\n @if ($widgetContext() !== 'iko') {\n <cds-dropdown\n class=\"valtimo-widget-management-metroline__dropdown\"\n [appendInline]=\"false\"\n [dropUp]=\"false\"\n [attr.data-test-id]=\"testIds.statusSourceDropdown\"\n [label]=\"'widgetTabManagement.content.metroline.statusSource.label' | translate\"\n [placeholder]=\"'widgetTabManagement.content.metroline.statusSource.placeholder' | translate\"\n (selected)=\"onModeSelected($event)\"\n >\n <cds-dropdown-list [items]=\"modeItems$ | async\"></cds-dropdown-list>\n </cds-dropdown>\n }\n</section>\n\n@if ($widgetContext() === 'iko') {\n <section\n class=\"valtimo-widget-management-metroline__iko-block\"\n [formGroup]=\"form\"\n >\n <cds-text-label class=\"valtimo-widget-management-metroline__path-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.metroline.iko.source.label' | translate\"\n [tooltip]=\"'widgetTabManagement.content.metroline.iko.source.tooltip' | translate\"\n >\n </v-input-label>\n <input\n formControlName=\"source\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.metroline.iko.source.placeholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label class=\"valtimo-widget-management-metroline__path-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.metroline.iko.titlePath.label' | translate\"\n [tooltip]=\"'widgetTabManagement.content.metroline.iko.titlePath.tooltip' | translate\"\n >\n </v-input-label>\n <input\n formControlName=\"titlePath\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.metroline.iko.titlePath.placeholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label class=\"valtimo-widget-management-metroline__path-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.metroline.iko.labelPath.label' | translate\"\n [tooltip]=\"'widgetTabManagement.content.metroline.iko.labelPath.tooltip' | translate\"\n >\n </v-input-label>\n <input\n formControlName=\"labelPath\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.metroline.iko.labelPath.placeholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n\n <cds-text-label class=\"valtimo-widget-management-metroline__path-input\">\n <v-input-label\n [title]=\"'widgetTabManagement.content.metroline.iko.completedPath.label' | translate\"\n [tooltip]=\"'widgetTabManagement.content.metroline.iko.completedPath.tooltip' | translate\"\n >\n </v-input-label>\n <input\n formControlName=\"completedPath\"\n cdsText\n [placeholder]=\"'widgetTabManagement.content.metroline.iko.completedPath.placeholder' | translate\"\n type=\"text\"\n />\n </cds-text-label>\n </section>\n}\n", styles: [".valtimo-widget-management-metroline{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-metroline__title-form{background:var(--cds-layer-02);display:flex;gap:16px}.valtimo-widget-management-metroline__title-input{max-width:300px}.valtimo-widget-management-metroline__title-input input{background:var(--cds-layer-01)}.valtimo-widget-management-metroline__settings{display:flex;flex-wrap:wrap;align-items:stretch;gap:16px;background:var(--cds-layer-02)}.valtimo-widget-management-metroline__settings>*{flex:0 0 auto}.valtimo-widget-management-metroline__radio-group{padding:8px;background:var(--cds-layer-01)}.valtimo-widget-management-metroline__dropdown{width:300px}.valtimo-widget-management-metroline__dropdown .cds--list-box{background:var(--cds-layer-01)}.valtimo-widget-management-metroline__iko-block{display:flex;flex-direction:column;gap:16px}.valtimo-widget-management-metroline__path-input{max-width:480px}.valtimo-widget-management-metroline__path-input input{background:var(--cds-layer-01)}\n/*!\n * Copyright 2015-2026 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"] }]
|
|
6180
6237
|
}], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: MetrolineWidgetApiService }, { type: i2$2.TranslateService }, { type: WidgetWizardService }], propDecorators: { class: [{
|
|
6181
6238
|
type: HostBinding,
|
|
6182
6239
|
args: ['class']
|