@onecx/angular-accelerator 4.32.1 → 4.33.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.
- package/esm2020/lib/angular-accelerator.module.mjs +8 -39
- package/esm2020/lib/components/page-header/page-header.component.mjs +31 -3
- package/esm2020/lib/components/search-header/search-header.component.mjs +1 -1
- package/fesm2015/onecx-angular-accelerator.mjs +115 -115
- package/fesm2015/onecx-angular-accelerator.mjs.map +1 -1
- package/fesm2020/onecx-angular-accelerator.mjs +115 -115
- package/fesm2020/onecx-angular-accelerator.mjs.map +1 -1
- package/lib/angular-accelerator.module.d.ts +0 -4
- package/lib/components/page-header/page-header.component.d.ts +20 -1
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Directive, Optional, Input, HostListener, EventEmitter, Output, Component, Injectable, Injector, LOCALE_ID, Pipe, Inject, ViewEncapsulation, ContentChild, ViewChild, NgModule, inject } from '@angular/core';
|
|
3
3
|
import * as i3 from '@onecx/angular-integration-interface';
|
|
4
|
-
import { UserService
|
|
4
|
+
import { UserService } from '@onecx/angular-integration-interface';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
|
-
import { HttpClient } from '@angular/common/http';
|
|
7
6
|
import * as i3$1 from '@angular/common';
|
|
8
7
|
import { CurrencyPipe, DecimalPipe, DatePipe, Location, CommonModule } from '@angular/common';
|
|
9
8
|
import * as i6 from 'primeng/button';
|
|
@@ -13,7 +12,7 @@ import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angul
|
|
|
13
12
|
import * as i2 from 'primeng/dropdown';
|
|
14
13
|
import { DropdownModule } from 'primeng/dropdown';
|
|
15
14
|
import * as i1$1 from '@ngx-translate/core';
|
|
16
|
-
import { TranslatePipe, TranslateModule
|
|
15
|
+
import { TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
|
17
16
|
import * as i2$1 from 'primeng/api';
|
|
18
17
|
import { PrimeIcons } from 'primeng/api';
|
|
19
18
|
import { BehaviorSubject, filter, concat, of, map, combineLatest, mergeMap, withLatestFrom, tap, race, first, firstValueFrom, defaultIfEmpty, forkJoin } from 'rxjs';
|
|
@@ -380,6 +379,12 @@ class PageHeaderComponent {
|
|
|
380
379
|
this.overflowActions = [];
|
|
381
380
|
this.dd = new Date();
|
|
382
381
|
this.figureImageLoadError = false;
|
|
382
|
+
this.objectPanelGridLayoutClasses = 'grid row-gap-2 m-0';
|
|
383
|
+
this.objectPanelColumnLayoutClasses = 'flex flex-row justify-content-between overflow-x-auto';
|
|
384
|
+
this.objectPanelDefaultLayoutClasses = 'flex flex-column row-gap-2 md:flex-row md:justify-content-between';
|
|
385
|
+
this.objectInfoGridLayoutClasses = 'col-12 flex gap-4 md:col-6 align-items-center p-0';
|
|
386
|
+
this.objectInfoColumnLayoutClasses = 'flex flex-column align-items-center gap-2 min-w-120';
|
|
387
|
+
this.objectInfoDefaultLayoutClasses = 'flex flex-row md:flex-column md:align-items-center md:gap-2';
|
|
383
388
|
this.breadcrumbs = breadcrumbs;
|
|
384
389
|
this.home$ = concat(of({ menuItem: { icon: PrimeIcons.HOME, routerLink: '/' } }), this.appStateService.currentPortal$.pipe(map((portal) => ({
|
|
385
390
|
menuItem: {
|
|
@@ -425,6 +430,24 @@ class PageHeaderComponent {
|
|
|
425
430
|
style = style.concat(style, ' ', item.valueCssClass);
|
|
426
431
|
return style;
|
|
427
432
|
}
|
|
433
|
+
getObjectPanelLayoutClasses() {
|
|
434
|
+
if (this.enableGridView) {
|
|
435
|
+
return this.objectPanelGridLayoutClasses;
|
|
436
|
+
}
|
|
437
|
+
if (this.enableGridView === false) {
|
|
438
|
+
return this.objectPanelColumnLayoutClasses;
|
|
439
|
+
}
|
|
440
|
+
return this.objectPanelDefaultLayoutClasses;
|
|
441
|
+
}
|
|
442
|
+
getObjectInfoLayoutClasses() {
|
|
443
|
+
if (this.enableGridView) {
|
|
444
|
+
return `${this.objectInfoGridLayoutClasses} lg:col-${this.gridLayoutDesktopColumns ? 12 / this.gridLayoutDesktopColumns : 4}`;
|
|
445
|
+
}
|
|
446
|
+
if (this.enableGridView === false) {
|
|
447
|
+
return this.objectInfoColumnLayoutClasses;
|
|
448
|
+
}
|
|
449
|
+
return this.objectInfoDefaultLayoutClasses;
|
|
450
|
+
}
|
|
428
451
|
/**
|
|
429
452
|
* Generates a list of actions that should be rendered in an overflow menu
|
|
430
453
|
*/
|
|
@@ -507,10 +530,10 @@ class PageHeaderComponent {
|
|
|
507
530
|
}
|
|
508
531
|
}
|
|
509
532
|
PageHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PageHeaderComponent, deps: [{ token: BreadcrumbService }, { token: i1$1.TranslateService }, { token: i3.AppStateService }, { token: i3.UserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
510
|
-
PageHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PageHeaderComponent, selector: "ocx-page-header", inputs: { header: "header", loading: "loading", figureBackground: "figureBackground", showFigure: "showFigure", figureImage: "figureImage", disableDefaultActions: "disableDefaultActions", subheader: "subheader", actions: "actions", objectDetails: "objectDetails", showBreadcrumbs: "showBreadcrumbs", manualBreadcrumbs: "manualBreadcrumbs" }, outputs: { save: "save" }, queries: [{ propertyName: "additionalToolbarContent", first: true, predicate: ["additionalToolbarContent"], descendants: true }, { propertyName: "additionalToolbarContentLeft", first: true, predicate: ["additionalToolbarContentLeft"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"onecx-page-header\" name=\"ocx-page-header-wrapper\">\n <ng-container *ngIf=\"showBreadcrumbs\">\n <p-breadcrumb\n [model]=\"items\"\n *ngIf=\"breadcrumbs$ | async as items\"\n [home]=\"(home$ | async)?.menuItem ?? {}\"\n [homeAriaLabel]=\"(home$ | async)?.page ? ('OCX_PAGE_HEADER.HOME_ARIA_LABEL' | translate: { page: (home$ | async)?.page}) : ('OCX_PAGE_HEADER.HOME_DEFAULT_ARIA_LABEL' | translate)\"\n [attr.manual]=\"manualBreadcrumbs\"\n ></p-breadcrumb>\n </ng-container>\n <div class=\"title-bar flex flex-row md:justify-content-between p-2 md:p-3\">\n <div class=\"title-wrap\">\n <div class=\"figure flex h-2rem w-2rem md:h-3rem md:w-3rem\" *ngIf=\"showFigure\">\n <div #previewImage class=\"figure-image absolute top-0 left-0 right-0 bottom-0\">\n <ng-content select=\"[figureImage]\"></ng-content>\n <img\n *ngIf=\"figureImage && !figureImageLoadError\"\n [ocxSrc]=\"figureImage\"\n alt=\"Figure image\"\n class=\"w-full\"\n (error)=\"handleImageError()\"\n />\n </div>\n <div\n class=\"colorblob flex-1 border-round\"\n *ngIf=\"previewImage.children.length === 0 || figureImageLoadError\"\n ></div>\n </div>\n <ng-template #skeletonBar>\n <div class=\"header justify-content-evenly\">\n <p-skeleton width=\"10rem\"></p-skeleton>\n <p-skeleton width=\"10rem\"></p-skeleton>\n </div>\n </ng-template>\n <div class=\"header\" *ngIf=\"!loading; else skeletonBar\">\n <h1 id=\"page-header\" *ngIf=\"!!header\">{{ header }}</h1>\n <h2 id=\"page-subheader\" *ngIf=\"!!subheader\">{{ subheader }}</h2>\n </div>\n </div>\n <div class=\"action-items-wrap mt-2 md:mt-0\">\n <ng-container *ngIf=\"additionalToolbarContentLeft\" [ngTemplateOutlet]=\"additionalToolbarContentLeft\">\n </ng-container>\n\n <ng-container *ngIf=\"!disableDefaultActions\"> </ng-container>\n <ng-template #skeletonActions>\n <div class=\"flex\">\n <p-skeleton width=\"5rem\" height=\"2rem\" styleClass=\"mr-2\"></p-skeleton>\n <p-skeleton width=\"2rem\" height=\"2rem\" styleClass=\"mb-2\"></p-skeleton>\n </div>\n </ng-template>\n <ng-container *ngIf=\"!loading; else skeletonActions\">\n <div *ngIf=\"inlineActions && inlineActions.length > 0\" class=\"toolbar flex flex-wrap gap-1 sm:gap-2\">\n <ng-container *ngFor=\"let action of inlineActions\">\n <p-button\n id=\"{{ action.id }}\"\n [icon]=\"action.icon ?? ''\"\n type=\"button\"\n class=\"action-button\"\n [label]=\"action.labelKey ? (action.labelKey | translate) : action.label\"\n (onClick)=\"action.actionCallback()\"\n [title]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n [disabled]=\"action.disabled ? action.disabled : false\"\n [attr.name]=\"action.icon ? 'ocx-page-header-inline-action-icon-button' : 'ocx-page-header-inline-action-button'\"\n [ariaLabel]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n ></p-button>\n </ng-container>\n </div>\n <ng-content select=\"[toolbarItems]\"></ng-content>\n <ng-container>\n <div *ngIf=\"overflowActions.length !== 0\">\n <button\n id=\"pageHeaderMenuButton\"\n type=\"button\"\n pButton\n icon=\"pi pi-ellipsis-v\"\n title=\"{{ 'OCX_PAGE_HEADER.MORE_ACTIONS' | translate }}\"\n class=\"more-actions-menu-button action-button ml-2\"\n (click)=\"menu.toggle($event)\"\n name=\"ocx-page-header-overflow-action-button\"\n [ariaLabel]=\"('OCX_PAGE_HEADER.MORE_ACTIONS' | translate)\"\n ></button>\n <p-menu #menu [popup]=\"true\" [model]=\"overflowActions\" appendTo=\"body\"></p-menu>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"additionalToolbarContent\" [ngTemplateOutlet]=\"additionalToolbarContent\"> </ng-container>\n </div>\n </div>\n\n <div\n class=\"object-panel flex-column md:flex-row\"\n [class.justify-content-evenly]=\"objectDetails\"\n [class.justify-content-start]=\"!objectDetails\"\n >\n <ng-container *ngIf=\"objectDetails\">\n <div\n class=\"object-info flex flex-row md:flex-column align-items-baseline md:align-items-center justify-content-between\"\n *ngFor=\"let item of objectDetails\"\n >\n <label class=\"flex font-medium text-600\" name=\"object-detail-label\"\n >{{ item.label | dynamicPipe:item.labelPipe }}</label\n >\n <span\n *ngIf=\"item.icon || item.value\"\n class=\"flex text-900 mt-2\"\n [ngClass]=\"generateItemStyle(item)\"\n [title]=\"item.tooltip || ''\"\n name=\"object-detail-value\"\n >\n <i *ngIf=\"item.icon\" class=\"{{item.icon}}\" name=\"object-detail-icon\"></i>\n {{ item.value | dynamicPipe:item.valuePipe:item.valuePipeArgs}}</span\n >\n </div>\n </ng-container>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host(.p-button-label){font-weight:400}:host ::ng-deep .action-button{padding:.5rem;font-weight:400}.onecx-page-header{display:flex;flex-flow:column;border-radius:.25rem;overflow:hidden;background:#fff;box-shadow:0 2px 2px #0000001a;border:1px solid #cdd0d3}.onecx-page-header .title-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;background-color:#f8f9fa;border-top-right-radius:inherit;border-top-left-radius:inherit}.onecx-page-header .title-bar .figure{width:3rem;height:3rem;margin-right:.5rem;position:relative}.onecx-page-header .title-bar .figure .figure-image img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.onecx-page-header .title-bar .figure .colorblob{background-color:var(--primary-color);position:absolute;inset:0}.onecx-page-header .title-bar .title-wrap{display:flex;flex-flow:row;align-items:center;gap:.25rem}.onecx-page-header .title-bar .title-wrap .header{display:flex;align-items:flex-start;justify-content:center;flex-direction:column}.onecx-page-header .title-bar .title-wrap h1{font-size:1em;font-weight:700;margin:0;padding:0}.onecx-page-header .title-bar .title-wrap h2{font-size:1em;font-weight:400;margin:0;padding:0}.onecx-page-header .title-bar .action-items-wrap{display:flex;height:-moz-fit-content;height:fit-content;gap:.5rem;align-items:center;justify-content:space-between}.onecx-page-header .title-bar .action-items-wrap button{padding:.5rem}.onecx-page-header .object-panel{border-top:1px solid #cdd0d3;padding:1rem;display:flex}.onecx-page-header .object-panel:empty{display:none}.badge-container{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.scale{transform:scale(2)}\n"], dependencies: [{ kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i6.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i7.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i8.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: SrcDirective, selector: "[ocxSrc]", inputs: ["ocxSrc"], outputs: ["error"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: DynamicPipe, name: "dynamicPipe" }], encapsulation: i0.ViewEncapsulation.None });
|
|
533
|
+
PageHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PageHeaderComponent, selector: "ocx-page-header", inputs: { header: "header", loading: "loading", figureBackground: "figureBackground", showFigure: "showFigure", figureImage: "figureImage", disableDefaultActions: "disableDefaultActions", subheader: "subheader", actions: "actions", objectDetails: "objectDetails", showBreadcrumbs: "showBreadcrumbs", manualBreadcrumbs: "manualBreadcrumbs", enableGridView: "enableGridView", gridLayoutDesktopColumns: "gridLayoutDesktopColumns" }, outputs: { save: "save" }, queries: [{ propertyName: "additionalToolbarContent", first: true, predicate: ["additionalToolbarContent"], descendants: true }, { propertyName: "additionalToolbarContentLeft", first: true, predicate: ["additionalToolbarContentLeft"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"onecx-page-header\" name=\"ocx-page-header-wrapper\">\n <ng-container *ngIf=\"showBreadcrumbs\">\n <p-breadcrumb\n [model]=\"items\"\n *ngIf=\"breadcrumbs$ | async as items\"\n [home]=\"(home$ | async)?.menuItem ?? {}\"\n [homeAriaLabel]=\"(home$ | async)?.page ? ('OCX_PAGE_HEADER.HOME_ARIA_LABEL' | translate: { page: (home$ | async)?.page}) : ('OCX_PAGE_HEADER.HOME_DEFAULT_ARIA_LABEL' | translate)\"\n [attr.manual]=\"manualBreadcrumbs\"\n ></p-breadcrumb>\n </ng-container>\n <div class=\"title-bar flex flex-row md:justify-content-between p-2 md:p-3\">\n <div class=\"title-wrap\">\n <div class=\"figure flex h-2rem w-2rem md:h-3rem md:w-3rem\" *ngIf=\"showFigure\">\n <div #previewImage class=\"figure-image absolute top-0 left-0 right-0 bottom-0\">\n <ng-content select=\"[figureImage]\"></ng-content>\n <img\n *ngIf=\"figureImage && !figureImageLoadError\"\n [ocxSrc]=\"figureImage\"\n alt=\"Figure image\"\n class=\"w-full\"\n (error)=\"handleImageError()\"\n />\n </div>\n <div\n class=\"colorblob flex-1 border-round\"\n *ngIf=\"previewImage.children.length === 0 || figureImageLoadError\"\n ></div>\n </div>\n <ng-template #skeletonBar>\n <div class=\"header justify-content-evenly\">\n <p-skeleton width=\"10rem\"></p-skeleton>\n <p-skeleton width=\"10rem\"></p-skeleton>\n </div>\n </ng-template>\n <div class=\"header\" *ngIf=\"!loading; else skeletonBar\">\n <h1 id=\"page-header\" *ngIf=\"!!header\">{{ header }}</h1>\n <h2 id=\"page-subheader\" *ngIf=\"!!subheader\">{{ subheader }}</h2>\n </div>\n </div>\n <div class=\"action-items-wrap mt-2 md:mt-0\">\n <ng-container *ngIf=\"additionalToolbarContentLeft\" [ngTemplateOutlet]=\"additionalToolbarContentLeft\">\n </ng-container>\n\n <ng-container *ngIf=\"!disableDefaultActions\"> </ng-container>\n <ng-template #skeletonActions>\n <div class=\"flex\">\n <p-skeleton width=\"5rem\" height=\"2rem\" styleClass=\"mr-2\"></p-skeleton>\n <p-skeleton width=\"2rem\" height=\"2rem\" styleClass=\"mb-2\"></p-skeleton>\n </div>\n </ng-template>\n <ng-container *ngIf=\"!loading; else skeletonActions\">\n <div *ngIf=\"inlineActions && inlineActions.length > 0\" class=\"toolbar flex flex-wrap gap-1 sm:gap-2\">\n <ng-container *ngFor=\"let action of inlineActions\">\n <p-button\n id=\"{{ action.id }}\"\n [icon]=\"action.icon ?? ''\"\n type=\"button\"\n class=\"action-button\"\n [label]=\"action.labelKey ? (action.labelKey | translate) : action.label\"\n (onClick)=\"action.actionCallback()\"\n [title]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n [disabled]=\"action.disabled ? action.disabled : false\"\n [attr.name]=\"action.icon ? 'ocx-page-header-inline-action-icon-button' : 'ocx-page-header-inline-action-button'\"\n [ariaLabel]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n ></p-button>\n </ng-container>\n </div>\n <ng-content select=\"[toolbarItems]\"></ng-content>\n <ng-container>\n <div *ngIf=\"overflowActions.length !== 0\">\n <button\n id=\"pageHeaderMenuButton\"\n type=\"button\"\n pButton\n icon=\"pi pi-ellipsis-v\"\n title=\"{{ 'OCX_PAGE_HEADER.MORE_ACTIONS' | translate }}\"\n class=\"more-actions-menu-button action-button ml-2\"\n (click)=\"menu.toggle($event)\"\n name=\"ocx-page-header-overflow-action-button\"\n [ariaLabel]=\"('OCX_PAGE_HEADER.MORE_ACTIONS' | translate)\"\n ></button>\n <p-menu #menu [popup]=\"true\" [model]=\"overflowActions\" appendTo=\"body\"></p-menu>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"additionalToolbarContent\" [ngTemplateOutlet]=\"additionalToolbarContent\"> </ng-container>\n </div>\n </div>\n\n <div\n class=\"object-panel\"\n [ngClass]=\"getObjectPanelLayoutClasses()\"\n >\n <ng-container *ngIf=\"objectDetails\">\n <div\n class=\"object-info\"\n [ngClass]=\"getObjectInfoLayoutClasses()\"\n *ngFor=\"let item of objectDetails\"\n >\n <span\n class=\"flex font-medium text-600 object-info-grid-label\"\n name=\"object-detail-label\"\n [title]=\"item.labelTooltip || ''\"\n >{{ item.label | dynamicPipe:item.labelPipe }}</span\n >\n <span\n *ngIf=\"item.icon || item.value\"\n class=\"flex text-900 align-items-center gap-2 object-info-grid-value\"\n [ngClass]=\"generateItemStyle(item)\"\n [title]=\"item.valueTooltip || item.tooltip || ''\"\n name=\"object-detail-value\"\n >\n <i *ngIf=\"item.icon\" class=\"{{item.icon}}\" name=\"object-detail-icon\"></i>\n {{ item.value | dynamicPipe:item.valuePipe:item.valuePipeArgs}}\n <p-button\n *ngIf=\"item.actionItemIcon && item.actionItemCallback\"\n [icon]=\"item.actionItemIcon\"\n styleClass=\"p-button-text p-0 w-full\"\n [title]=\"item.actionItemTooltip || ''\"\n (onClick)=\"item.actionItemCallback()\"\n ></p-button>\n </span>\n </div>\n </ng-container>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host(.p-button-label){font-weight:400}:host ::ng-deep .action-button{padding:.5rem;font-weight:400}.onecx-page-header{display:flex;flex-flow:column;border-radius:.25rem;overflow:hidden;background:#fff;box-shadow:0 2px 2px #0000001a;border:1px solid #cdd0d3}.onecx-page-header .title-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;background-color:#f8f9fa;border-top-right-radius:inherit;border-top-left-radius:inherit}.onecx-page-header .title-bar .figure{width:3rem;height:3rem;margin-right:.5rem;position:relative}.onecx-page-header .title-bar .figure .figure-image img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.onecx-page-header .title-bar .figure .colorblob{background-color:var(--primary-color);position:absolute;inset:0}.onecx-page-header .title-bar .title-wrap{display:flex;flex-flow:row;align-items:center;gap:.25rem}.onecx-page-header .title-bar .title-wrap .header{display:flex;align-items:flex-start;justify-content:center;flex-direction:column}.onecx-page-header .title-bar .title-wrap h1{font-size:1em;font-weight:700;margin:0;padding:0}.onecx-page-header .title-bar .title-wrap h2{font-size:1em;font-weight:400;margin:0;padding:0}.onecx-page-header .title-bar .action-items-wrap{display:flex;height:-moz-fit-content;height:fit-content;gap:.5rem;align-items:center;justify-content:space-between}.onecx-page-header .title-bar .action-items-wrap button{padding:.5rem}.onecx-page-header .object-panel{border-top:1px solid #cdd0d3;padding:1rem}.onecx-page-header .object-panel:empty{display:none}.badge-container{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.scale{transform:scale(2)}.object-info-grid-label{flex:1}.object-info-grid-value{flex:3}.min-w-120{min-width:120px!important}\n"], dependencies: [{ kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i6.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i7.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i8.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: SrcDirective, selector: "[ocxSrc]", inputs: ["ocxSrc"], outputs: ["error"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: DynamicPipe, name: "dynamicPipe" }], encapsulation: i0.ViewEncapsulation.None });
|
|
511
534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PageHeaderComponent, decorators: [{
|
|
512
535
|
type: Component,
|
|
513
|
-
args: [{ selector: 'ocx-page-header', encapsulation: ViewEncapsulation.None, template: "<div class=\"onecx-page-header\" name=\"ocx-page-header-wrapper\">\n <ng-container *ngIf=\"showBreadcrumbs\">\n <p-breadcrumb\n [model]=\"items\"\n *ngIf=\"breadcrumbs$ | async as items\"\n [home]=\"(home$ | async)?.menuItem ?? {}\"\n [homeAriaLabel]=\"(home$ | async)?.page ? ('OCX_PAGE_HEADER.HOME_ARIA_LABEL' | translate: { page: (home$ | async)?.page}) : ('OCX_PAGE_HEADER.HOME_DEFAULT_ARIA_LABEL' | translate)\"\n [attr.manual]=\"manualBreadcrumbs\"\n ></p-breadcrumb>\n </ng-container>\n <div class=\"title-bar flex flex-row md:justify-content-between p-2 md:p-3\">\n <div class=\"title-wrap\">\n <div class=\"figure flex h-2rem w-2rem md:h-3rem md:w-3rem\" *ngIf=\"showFigure\">\n <div #previewImage class=\"figure-image absolute top-0 left-0 right-0 bottom-0\">\n <ng-content select=\"[figureImage]\"></ng-content>\n <img\n *ngIf=\"figureImage && !figureImageLoadError\"\n [ocxSrc]=\"figureImage\"\n alt=\"Figure image\"\n class=\"w-full\"\n (error)=\"handleImageError()\"\n />\n </div>\n <div\n class=\"colorblob flex-1 border-round\"\n *ngIf=\"previewImage.children.length === 0 || figureImageLoadError\"\n ></div>\n </div>\n <ng-template #skeletonBar>\n <div class=\"header justify-content-evenly\">\n <p-skeleton width=\"10rem\"></p-skeleton>\n <p-skeleton width=\"10rem\"></p-skeleton>\n </div>\n </ng-template>\n <div class=\"header\" *ngIf=\"!loading; else skeletonBar\">\n <h1 id=\"page-header\" *ngIf=\"!!header\">{{ header }}</h1>\n <h2 id=\"page-subheader\" *ngIf=\"!!subheader\">{{ subheader }}</h2>\n </div>\n </div>\n <div class=\"action-items-wrap mt-2 md:mt-0\">\n <ng-container *ngIf=\"additionalToolbarContentLeft\" [ngTemplateOutlet]=\"additionalToolbarContentLeft\">\n </ng-container>\n\n <ng-container *ngIf=\"!disableDefaultActions\"> </ng-container>\n <ng-template #skeletonActions>\n <div class=\"flex\">\n <p-skeleton width=\"5rem\" height=\"2rem\" styleClass=\"mr-2\"></p-skeleton>\n <p-skeleton width=\"2rem\" height=\"2rem\" styleClass=\"mb-2\"></p-skeleton>\n </div>\n </ng-template>\n <ng-container *ngIf=\"!loading; else skeletonActions\">\n <div *ngIf=\"inlineActions && inlineActions.length > 0\" class=\"toolbar flex flex-wrap gap-1 sm:gap-2\">\n <ng-container *ngFor=\"let action of inlineActions\">\n <p-button\n id=\"{{ action.id }}\"\n [icon]=\"action.icon ?? ''\"\n type=\"button\"\n class=\"action-button\"\n [label]=\"action.labelKey ? (action.labelKey | translate) : action.label\"\n (onClick)=\"action.actionCallback()\"\n [title]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n [disabled]=\"action.disabled ? action.disabled : false\"\n [attr.name]=\"action.icon ? 'ocx-page-header-inline-action-icon-button' : 'ocx-page-header-inline-action-button'\"\n [ariaLabel]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n ></p-button>\n </ng-container>\n </div>\n <ng-content select=\"[toolbarItems]\"></ng-content>\n <ng-container>\n <div *ngIf=\"overflowActions.length !== 0\">\n <button\n id=\"pageHeaderMenuButton\"\n type=\"button\"\n pButton\n icon=\"pi pi-ellipsis-v\"\n title=\"{{ 'OCX_PAGE_HEADER.MORE_ACTIONS' | translate }}\"\n class=\"more-actions-menu-button action-button ml-2\"\n (click)=\"menu.toggle($event)\"\n name=\"ocx-page-header-overflow-action-button\"\n [ariaLabel]=\"('OCX_PAGE_HEADER.MORE_ACTIONS' | translate)\"\n ></button>\n <p-menu #menu [popup]=\"true\" [model]=\"overflowActions\" appendTo=\"body\"></p-menu>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"additionalToolbarContent\" [ngTemplateOutlet]=\"additionalToolbarContent\"> </ng-container>\n </div>\n </div>\n\n <div\n class=\"object-panel
|
|
536
|
+
args: [{ selector: 'ocx-page-header', encapsulation: ViewEncapsulation.None, template: "<div class=\"onecx-page-header\" name=\"ocx-page-header-wrapper\">\n <ng-container *ngIf=\"showBreadcrumbs\">\n <p-breadcrumb\n [model]=\"items\"\n *ngIf=\"breadcrumbs$ | async as items\"\n [home]=\"(home$ | async)?.menuItem ?? {}\"\n [homeAriaLabel]=\"(home$ | async)?.page ? ('OCX_PAGE_HEADER.HOME_ARIA_LABEL' | translate: { page: (home$ | async)?.page}) : ('OCX_PAGE_HEADER.HOME_DEFAULT_ARIA_LABEL' | translate)\"\n [attr.manual]=\"manualBreadcrumbs\"\n ></p-breadcrumb>\n </ng-container>\n <div class=\"title-bar flex flex-row md:justify-content-between p-2 md:p-3\">\n <div class=\"title-wrap\">\n <div class=\"figure flex h-2rem w-2rem md:h-3rem md:w-3rem\" *ngIf=\"showFigure\">\n <div #previewImage class=\"figure-image absolute top-0 left-0 right-0 bottom-0\">\n <ng-content select=\"[figureImage]\"></ng-content>\n <img\n *ngIf=\"figureImage && !figureImageLoadError\"\n [ocxSrc]=\"figureImage\"\n alt=\"Figure image\"\n class=\"w-full\"\n (error)=\"handleImageError()\"\n />\n </div>\n <div\n class=\"colorblob flex-1 border-round\"\n *ngIf=\"previewImage.children.length === 0 || figureImageLoadError\"\n ></div>\n </div>\n <ng-template #skeletonBar>\n <div class=\"header justify-content-evenly\">\n <p-skeleton width=\"10rem\"></p-skeleton>\n <p-skeleton width=\"10rem\"></p-skeleton>\n </div>\n </ng-template>\n <div class=\"header\" *ngIf=\"!loading; else skeletonBar\">\n <h1 id=\"page-header\" *ngIf=\"!!header\">{{ header }}</h1>\n <h2 id=\"page-subheader\" *ngIf=\"!!subheader\">{{ subheader }}</h2>\n </div>\n </div>\n <div class=\"action-items-wrap mt-2 md:mt-0\">\n <ng-container *ngIf=\"additionalToolbarContentLeft\" [ngTemplateOutlet]=\"additionalToolbarContentLeft\">\n </ng-container>\n\n <ng-container *ngIf=\"!disableDefaultActions\"> </ng-container>\n <ng-template #skeletonActions>\n <div class=\"flex\">\n <p-skeleton width=\"5rem\" height=\"2rem\" styleClass=\"mr-2\"></p-skeleton>\n <p-skeleton width=\"2rem\" height=\"2rem\" styleClass=\"mb-2\"></p-skeleton>\n </div>\n </ng-template>\n <ng-container *ngIf=\"!loading; else skeletonActions\">\n <div *ngIf=\"inlineActions && inlineActions.length > 0\" class=\"toolbar flex flex-wrap gap-1 sm:gap-2\">\n <ng-container *ngFor=\"let action of inlineActions\">\n <p-button\n id=\"{{ action.id }}\"\n [icon]=\"action.icon ?? ''\"\n type=\"button\"\n class=\"action-button\"\n [label]=\"action.labelKey ? (action.labelKey | translate) : action.label\"\n (onClick)=\"action.actionCallback()\"\n [title]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n [disabled]=\"action.disabled ? action.disabled : false\"\n [attr.name]=\"action.icon ? 'ocx-page-header-inline-action-icon-button' : 'ocx-page-header-inline-action-button'\"\n [ariaLabel]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n ></p-button>\n </ng-container>\n </div>\n <ng-content select=\"[toolbarItems]\"></ng-content>\n <ng-container>\n <div *ngIf=\"overflowActions.length !== 0\">\n <button\n id=\"pageHeaderMenuButton\"\n type=\"button\"\n pButton\n icon=\"pi pi-ellipsis-v\"\n title=\"{{ 'OCX_PAGE_HEADER.MORE_ACTIONS' | translate }}\"\n class=\"more-actions-menu-button action-button ml-2\"\n (click)=\"menu.toggle($event)\"\n name=\"ocx-page-header-overflow-action-button\"\n [ariaLabel]=\"('OCX_PAGE_HEADER.MORE_ACTIONS' | translate)\"\n ></button>\n <p-menu #menu [popup]=\"true\" [model]=\"overflowActions\" appendTo=\"body\"></p-menu>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"additionalToolbarContent\" [ngTemplateOutlet]=\"additionalToolbarContent\"> </ng-container>\n </div>\n </div>\n\n <div\n class=\"object-panel\"\n [ngClass]=\"getObjectPanelLayoutClasses()\"\n >\n <ng-container *ngIf=\"objectDetails\">\n <div\n class=\"object-info\"\n [ngClass]=\"getObjectInfoLayoutClasses()\"\n *ngFor=\"let item of objectDetails\"\n >\n <span\n class=\"flex font-medium text-600 object-info-grid-label\"\n name=\"object-detail-label\"\n [title]=\"item.labelTooltip || ''\"\n >{{ item.label | dynamicPipe:item.labelPipe }}</span\n >\n <span\n *ngIf=\"item.icon || item.value\"\n class=\"flex text-900 align-items-center gap-2 object-info-grid-value\"\n [ngClass]=\"generateItemStyle(item)\"\n [title]=\"item.valueTooltip || item.tooltip || ''\"\n name=\"object-detail-value\"\n >\n <i *ngIf=\"item.icon\" class=\"{{item.icon}}\" name=\"object-detail-icon\"></i>\n {{ item.value | dynamicPipe:item.valuePipe:item.valuePipeArgs}}\n <p-button\n *ngIf=\"item.actionItemIcon && item.actionItemCallback\"\n [icon]=\"item.actionItemIcon\"\n styleClass=\"p-button-text p-0 w-full\"\n [title]=\"item.actionItemTooltip || ''\"\n (onClick)=\"item.actionItemCallback()\"\n ></p-button>\n </span>\n </div>\n </ng-container>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host(.p-button-label){font-weight:400}:host ::ng-deep .action-button{padding:.5rem;font-weight:400}.onecx-page-header{display:flex;flex-flow:column;border-radius:.25rem;overflow:hidden;background:#fff;box-shadow:0 2px 2px #0000001a;border:1px solid #cdd0d3}.onecx-page-header .title-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;background-color:#f8f9fa;border-top-right-radius:inherit;border-top-left-radius:inherit}.onecx-page-header .title-bar .figure{width:3rem;height:3rem;margin-right:.5rem;position:relative}.onecx-page-header .title-bar .figure .figure-image img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.onecx-page-header .title-bar .figure .colorblob{background-color:var(--primary-color);position:absolute;inset:0}.onecx-page-header .title-bar .title-wrap{display:flex;flex-flow:row;align-items:center;gap:.25rem}.onecx-page-header .title-bar .title-wrap .header{display:flex;align-items:flex-start;justify-content:center;flex-direction:column}.onecx-page-header .title-bar .title-wrap h1{font-size:1em;font-weight:700;margin:0;padding:0}.onecx-page-header .title-bar .title-wrap h2{font-size:1em;font-weight:400;margin:0;padding:0}.onecx-page-header .title-bar .action-items-wrap{display:flex;height:-moz-fit-content;height:fit-content;gap:.5rem;align-items:center;justify-content:space-between}.onecx-page-header .title-bar .action-items-wrap button{padding:.5rem}.onecx-page-header .object-panel{border-top:1px solid #cdd0d3;padding:1rem}.onecx-page-header .object-panel:empty{display:none}.badge-container{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.scale{transform:scale(2)}.object-info-grid-label{flex:1}.object-info-grid-value{flex:3}.min-w-120{min-width:120px!important}\n"] }]
|
|
514
537
|
}], ctorParameters: function () { return [{ type: BreadcrumbService }, { type: i1$1.TranslateService }, { type: i3.AppStateService }, { type: i3.UserService }]; }, propDecorators: { header: [{
|
|
515
538
|
type: Input
|
|
516
539
|
}], loading: [{
|
|
@@ -533,6 +556,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
533
556
|
type: Input
|
|
534
557
|
}], manualBreadcrumbs: [{
|
|
535
558
|
type: Input
|
|
559
|
+
}], enableGridView: [{
|
|
560
|
+
type: Input
|
|
561
|
+
}], gridLayoutDesktopColumns: [{
|
|
562
|
+
type: Input
|
|
536
563
|
}], save: [{
|
|
537
564
|
type: Output
|
|
538
565
|
}], additionalToolbarContent: [{
|
|
@@ -635,7 +662,7 @@ class SearchHeaderComponent {
|
|
|
635
662
|
}
|
|
636
663
|
}
|
|
637
664
|
SearchHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SearchHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
638
|
-
SearchHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SearchHeaderComponent, selector: "ocx-search-header", inputs: { searchConfigs: "searchConfigs", header: "header", headline: "headline", subheader: "subheader", viewMode: "viewMode", manualBreadcrumbs: "manualBreadcrumbs", actions: "actions" }, outputs: { searched: "searched", resetted: "resetted", selectedSearchConfigChanged: "selectedSearchConfigChanged", viewModeChanged: "viewModeChanged" }, queries: [{ propertyName: "additionalToolbarContent", first: true, predicate: ["additionalToolbarContent"], descendants: true }, { propertyName: "additionalToolbarContentLeft", first: true, predicate: ["additionalToolbarContentLeft"], descendants: true }], viewQueries: [{ propertyName: "searchParameterFields", first: true, predicate: ["searchParameterFields"], descendants: true }], ngImport: i0, template: "<ocx-page-header\n [header]=\"header || ('OCX_SEARCH_HEADER.HEADER' | translate)\"\n [subheader]=\"subheader\"\n [manualBreadcrumbs]=\"manualBreadcrumbs\"\n [actions]=\"headerActions\"\n>\n <ng-template #additionalToolbarContentLeft>\n <ocx-search-config [searchConfigs]=\"searchConfigs\" (selectedSearchConfigChanged)=\"confirmSearchConfig($event)\">\n </ocx-search-config>\n <ng-container *ngIf=\"_additionalToolbarContentLeft\" [ngTemplateOutlet]=\"_additionalToolbarContentLeft\"></ng-container>\n </ng-template>\n <ng-template #additionalToolbarContent>\n <ng-container *ngIf=\"_additionalToolbarContent\" [ngTemplateOutlet]=\"_additionalToolbarContent\"></ng-container>\n </ng-template>\n <div class=\"search-criteria-container\">\n <div #searchParameterFields>\n <ng-content></ng-content>\n <div class=\"search-criteria-buttons\">\n <p-button\n id=\"resetButton\"\n *ngIf=\"resetted.observed\"\n (onClick)=\"onResetClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-eraser\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n\n <p-button\n id=\"searchButton\"\n (onClick)=\"onSearchClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-search\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n </div>\n </div>\n </div>\n</ocx-page-header>\n", styles: [".search-criteria-buttons{display:flex;flex-flow:row;align-items:flex-start;gap:.5rem;margin-top:.5rem}.search-criteria-container{width:100%;display:flex}\n"], dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SearchConfigComponent, selector: "ocx-search-config", inputs: ["searchConfigs", "placeholderKey"], outputs: ["selectedSearchConfigChanged"] }, { kind: "component", type: PageHeaderComponent, selector: "ocx-page-header", inputs: ["header", "loading", "figureBackground", "showFigure", "figureImage", "disableDefaultActions", "subheader", "actions", "objectDetails", "showBreadcrumbs", "manualBreadcrumbs"], outputs: ["save"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
665
|
+
SearchHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SearchHeaderComponent, selector: "ocx-search-header", inputs: { searchConfigs: "searchConfigs", header: "header", headline: "headline", subheader: "subheader", viewMode: "viewMode", manualBreadcrumbs: "manualBreadcrumbs", actions: "actions" }, outputs: { searched: "searched", resetted: "resetted", selectedSearchConfigChanged: "selectedSearchConfigChanged", viewModeChanged: "viewModeChanged" }, queries: [{ propertyName: "additionalToolbarContent", first: true, predicate: ["additionalToolbarContent"], descendants: true }, { propertyName: "additionalToolbarContentLeft", first: true, predicate: ["additionalToolbarContentLeft"], descendants: true }], viewQueries: [{ propertyName: "searchParameterFields", first: true, predicate: ["searchParameterFields"], descendants: true }], ngImport: i0, template: "<ocx-page-header\n [header]=\"header || ('OCX_SEARCH_HEADER.HEADER' | translate)\"\n [subheader]=\"subheader\"\n [manualBreadcrumbs]=\"manualBreadcrumbs\"\n [actions]=\"headerActions\"\n>\n <ng-template #additionalToolbarContentLeft>\n <ocx-search-config [searchConfigs]=\"searchConfigs\" (selectedSearchConfigChanged)=\"confirmSearchConfig($event)\">\n </ocx-search-config>\n <ng-container *ngIf=\"_additionalToolbarContentLeft\" [ngTemplateOutlet]=\"_additionalToolbarContentLeft\"></ng-container>\n </ng-template>\n <ng-template #additionalToolbarContent>\n <ng-container *ngIf=\"_additionalToolbarContent\" [ngTemplateOutlet]=\"_additionalToolbarContent\"></ng-container>\n </ng-template>\n <div class=\"search-criteria-container\">\n <div #searchParameterFields>\n <ng-content></ng-content>\n <div class=\"search-criteria-buttons\">\n <p-button\n id=\"resetButton\"\n *ngIf=\"resetted.observed\"\n (onClick)=\"onResetClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-eraser\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n\n <p-button\n id=\"searchButton\"\n (onClick)=\"onSearchClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-search\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n </div>\n </div>\n </div>\n</ocx-page-header>\n", styles: [".search-criteria-buttons{display:flex;flex-flow:row;align-items:flex-start;gap:.5rem;margin-top:.5rem}.search-criteria-container{width:100%;display:flex}\n"], dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i6.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SearchConfigComponent, selector: "ocx-search-config", inputs: ["searchConfigs", "placeholderKey"], outputs: ["selectedSearchConfigChanged"] }, { kind: "component", type: PageHeaderComponent, selector: "ocx-page-header", inputs: ["header", "loading", "figureBackground", "showFigure", "figureImage", "disableDefaultActions", "subheader", "actions", "objectDetails", "showBreadcrumbs", "manualBreadcrumbs", "enableGridView", "gridLayoutDesktopColumns"], outputs: ["save"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
639
666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SearchHeaderComponent, decorators: [{
|
|
640
667
|
type: Component,
|
|
641
668
|
args: [{ selector: 'ocx-search-header', template: "<ocx-page-header\n [header]=\"header || ('OCX_SEARCH_HEADER.HEADER' | translate)\"\n [subheader]=\"subheader\"\n [manualBreadcrumbs]=\"manualBreadcrumbs\"\n [actions]=\"headerActions\"\n>\n <ng-template #additionalToolbarContentLeft>\n <ocx-search-config [searchConfigs]=\"searchConfigs\" (selectedSearchConfigChanged)=\"confirmSearchConfig($event)\">\n </ocx-search-config>\n <ng-container *ngIf=\"_additionalToolbarContentLeft\" [ngTemplateOutlet]=\"_additionalToolbarContentLeft\"></ng-container>\n </ng-template>\n <ng-template #additionalToolbarContent>\n <ng-container *ngIf=\"_additionalToolbarContent\" [ngTemplateOutlet]=\"_additionalToolbarContent\"></ng-container>\n </ng-template>\n <div class=\"search-criteria-container\">\n <div #searchParameterFields>\n <ng-content></ng-content>\n <div class=\"search-criteria-buttons\">\n <p-button\n id=\"resetButton\"\n *ngIf=\"resetted.observed\"\n (onClick)=\"onResetClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-eraser\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n\n <p-button\n id=\"searchButton\"\n (onClick)=\"onSearchClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-search\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n </div>\n </div>\n </div>\n</ocx-page-header>\n", styles: [".search-criteria-buttons{display:flex;flex-flow:row;align-items:flex-start;gap:.5rem;margin-top:.5rem}.search-criteria-container{width:100%;display:flex}\n"] }]
|
|
@@ -3063,88 +3090,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3063
3090
|
}]
|
|
3064
3091
|
}] });
|
|
3065
3092
|
|
|
3066
|
-
class AsyncTranslateLoader {
|
|
3067
|
-
constructor(translateLoader$) {
|
|
3068
|
-
this.translateLoader$ = translateLoader$;
|
|
3069
|
-
this.timerId = AsyncTranslateLoader.lastTimerId++;
|
|
3070
|
-
}
|
|
3071
|
-
getTranslation(lang) {
|
|
3072
|
-
return this.translateLoader$.pipe(tap(() => console.time('AsyncTranslateLoader_' + this.timerId)), defaultIfEmpty(undefined), first(), mergeMap((translateLoader) => translateLoader?.getTranslation(lang) ?? of({})), tap(() => console.timeEnd('AsyncTranslateLoader_' + this.timerId)));
|
|
3073
|
-
}
|
|
3074
|
-
}
|
|
3075
|
-
AsyncTranslateLoader.lastTimerId = 0;
|
|
3076
|
-
|
|
3077
|
-
class CachingTranslateLoader {
|
|
3078
|
-
constructor(translationCache, http, prefix, suffix) {
|
|
3079
|
-
this.translationCache = translationCache;
|
|
3080
|
-
this.http = http;
|
|
3081
|
-
this.prefix = prefix;
|
|
3082
|
-
this.suffix = suffix;
|
|
3083
|
-
this.translateLoader = new TranslateHttpLoader(this.http, this.prefix, this.suffix);
|
|
3084
|
-
}
|
|
3085
|
-
getTranslation(lang) {
|
|
3086
|
-
const url = `${this.prefix}${lang}${this.suffix}`;
|
|
3087
|
-
return this.translationCache.getTranslationFile(url, () => this.translateLoader.getTranslation(lang));
|
|
3088
|
-
}
|
|
3089
|
-
}
|
|
3090
|
-
|
|
3091
|
-
class TranslateCombinedLoader {
|
|
3092
|
-
constructor(...loaders) {
|
|
3093
|
-
this._loaders = loaders;
|
|
3094
|
-
}
|
|
3095
|
-
getTranslation(lang) {
|
|
3096
|
-
return forkJoin(this._loaders.map((l) => l.getTranslation(lang))).pipe(map((allTranslations) => {
|
|
3097
|
-
let result = {};
|
|
3098
|
-
allTranslations.forEach((translations) => {
|
|
3099
|
-
result = this.mergeDeep(result, translations);
|
|
3100
|
-
});
|
|
3101
|
-
return result;
|
|
3102
|
-
}));
|
|
3103
|
-
}
|
|
3104
|
-
isObject(item) {
|
|
3105
|
-
return item && typeof item === 'object' && !Array.isArray(item);
|
|
3106
|
-
}
|
|
3107
|
-
mergeDeep(target, source) {
|
|
3108
|
-
const output = Object.assign({}, target);
|
|
3109
|
-
if (this.isObject(target) && this.isObject(source)) {
|
|
3110
|
-
Object.keys(source).forEach((key) => {
|
|
3111
|
-
if (this.isObject(source[key])) {
|
|
3112
|
-
if (!(key in target))
|
|
3113
|
-
Object.assign(output, { [key]: source[key] });
|
|
3114
|
-
else
|
|
3115
|
-
output[key] = this.mergeDeep(target[key], source[key]);
|
|
3116
|
-
}
|
|
3117
|
-
else {
|
|
3118
|
-
Object.assign(output, { [key]: source[key] });
|
|
3119
|
-
}
|
|
3120
|
-
});
|
|
3121
|
-
}
|
|
3122
|
-
return output;
|
|
3123
|
-
}
|
|
3124
|
-
}
|
|
3125
|
-
|
|
3126
|
-
let lastTranslateLoaderTimerId$1 = 0;
|
|
3127
|
-
function createTranslateLoader(http, appStateService, translationCacheService) {
|
|
3128
|
-
const ts = translationCacheService ?? inject(TranslationCacheService);
|
|
3129
|
-
const timerId = lastTranslateLoaderTimerId$1++;
|
|
3130
|
-
console.time('createTranslateLoader_' + timerId);
|
|
3131
|
-
return new AsyncTranslateLoader(combineLatest([appStateService.currentMfe$.asObservable(), appStateService.globalLoading$.asObservable()]).pipe(filter(([, isLoading]) => !isLoading), map(([currentMfe]) => {
|
|
3132
|
-
return new TranslateCombinedLoader(
|
|
3133
|
-
// translations of shell or of app in standalone mode
|
|
3134
|
-
new CachingTranslateLoader(ts, http, `./assets/i18n/`, '.json'),
|
|
3135
|
-
// translations of portal-integration-angular of app
|
|
3136
|
-
new CachingTranslateLoader(ts, http, Location.joinWithSlash(currentMfe.remoteBaseUrl, `onecx-portal-lib/assets/i18n/`), '.json'),
|
|
3137
|
-
// translations of the app
|
|
3138
|
-
new CachingTranslateLoader(ts, http, Location.joinWithSlash(currentMfe.remoteBaseUrl, `assets/i18n/`), '.json'));
|
|
3139
|
-
}), tap(() => console.timeEnd('createTranslateLoader_' + timerId))));
|
|
3140
|
-
}
|
|
3141
|
-
|
|
3142
|
-
class AngularAcceleratorMissingTranslationHandler {
|
|
3143
|
-
handle(params) {
|
|
3144
|
-
console.log(`Missing translation for ${params.key}`, params);
|
|
3145
|
-
return params.key;
|
|
3146
|
-
}
|
|
3147
|
-
}
|
|
3148
3093
|
class AngularAcceleratorModule {
|
|
3149
3094
|
}
|
|
3150
3095
|
AngularAcceleratorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AngularAcceleratorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -3168,7 +3113,9 @@ AngularAcceleratorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0"
|
|
|
3168
3113
|
OcxTimeAgoPipe,
|
|
3169
3114
|
SrcDirective,
|
|
3170
3115
|
AdvancedDirective], imports: [CommonModule,
|
|
3171
|
-
AngularAcceleratorPrimeNgModule,
|
|
3116
|
+
AngularAcceleratorPrimeNgModule,
|
|
3117
|
+
TranslateModule,
|
|
3118
|
+
FormsModule,
|
|
3172
3119
|
RouterModule,
|
|
3173
3120
|
ReactiveFormsModule], exports: [ColumnGroupSelectionComponent,
|
|
3174
3121
|
CustomGroupColumnSelectorComponent,
|
|
@@ -3199,18 +3146,7 @@ AngularAcceleratorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0"
|
|
|
3199
3146
|
AppConfigService,
|
|
3200
3147
|
], imports: [CommonModule,
|
|
3201
3148
|
AngularAcceleratorPrimeNgModule,
|
|
3202
|
-
TranslateModule
|
|
3203
|
-
isolate: true,
|
|
3204
|
-
loader: {
|
|
3205
|
-
provide: TranslateLoader,
|
|
3206
|
-
useFactory: createTranslateLoader,
|
|
3207
|
-
deps: [HttpClient, AppStateService, TranslationCacheService],
|
|
3208
|
-
},
|
|
3209
|
-
missingTranslationHandler: {
|
|
3210
|
-
provide: MissingTranslationHandler,
|
|
3211
|
-
useClass: AngularAcceleratorMissingTranslationHandler,
|
|
3212
|
-
},
|
|
3213
|
-
}),
|
|
3149
|
+
TranslateModule,
|
|
3214
3150
|
FormsModule,
|
|
3215
3151
|
RouterModule,
|
|
3216
3152
|
ReactiveFormsModule] });
|
|
@@ -3220,18 +3156,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3220
3156
|
imports: [
|
|
3221
3157
|
CommonModule,
|
|
3222
3158
|
AngularAcceleratorPrimeNgModule,
|
|
3223
|
-
TranslateModule
|
|
3224
|
-
isolate: true,
|
|
3225
|
-
loader: {
|
|
3226
|
-
provide: TranslateLoader,
|
|
3227
|
-
useFactory: createTranslateLoader,
|
|
3228
|
-
deps: [HttpClient, AppStateService, TranslationCacheService],
|
|
3229
|
-
},
|
|
3230
|
-
missingTranslationHandler: {
|
|
3231
|
-
provide: MissingTranslationHandler,
|
|
3232
|
-
useClass: AngularAcceleratorMissingTranslationHandler,
|
|
3233
|
-
},
|
|
3234
|
-
}),
|
|
3159
|
+
TranslateModule,
|
|
3235
3160
|
FormsModule,
|
|
3236
3161
|
RouterModule,
|
|
3237
3162
|
ReactiveFormsModule,
|
|
@@ -3287,11 +3212,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3287
3212
|
OcxTimeAgoPipe,
|
|
3288
3213
|
SrcDirective,
|
|
3289
3214
|
AdvancedDirective,
|
|
3290
|
-
// DataListGridSortingComponent,
|
|
3291
3215
|
],
|
|
3292
3216
|
}]
|
|
3293
3217
|
}] });
|
|
3294
3218
|
|
|
3219
|
+
class AsyncTranslateLoader {
|
|
3220
|
+
constructor(translateLoader$) {
|
|
3221
|
+
this.translateLoader$ = translateLoader$;
|
|
3222
|
+
this.timerId = AsyncTranslateLoader.lastTimerId++;
|
|
3223
|
+
}
|
|
3224
|
+
getTranslation(lang) {
|
|
3225
|
+
return this.translateLoader$.pipe(tap(() => console.time('AsyncTranslateLoader_' + this.timerId)), defaultIfEmpty(undefined), first(), mergeMap((translateLoader) => translateLoader?.getTranslation(lang) ?? of({})), tap(() => console.timeEnd('AsyncTranslateLoader_' + this.timerId)));
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3228
|
+
AsyncTranslateLoader.lastTimerId = 0;
|
|
3229
|
+
|
|
3230
|
+
class CachingTranslateLoader {
|
|
3231
|
+
constructor(translationCache, http, prefix, suffix) {
|
|
3232
|
+
this.translationCache = translationCache;
|
|
3233
|
+
this.http = http;
|
|
3234
|
+
this.prefix = prefix;
|
|
3235
|
+
this.suffix = suffix;
|
|
3236
|
+
this.translateLoader = new TranslateHttpLoader(this.http, this.prefix, this.suffix);
|
|
3237
|
+
}
|
|
3238
|
+
getTranslation(lang) {
|
|
3239
|
+
const url = `${this.prefix}${lang}${this.suffix}`;
|
|
3240
|
+
return this.translationCache.getTranslationFile(url, () => this.translateLoader.getTranslation(lang));
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3244
|
+
class TranslateCombinedLoader {
|
|
3245
|
+
constructor(...loaders) {
|
|
3246
|
+
this._loaders = loaders;
|
|
3247
|
+
}
|
|
3248
|
+
getTranslation(lang) {
|
|
3249
|
+
return forkJoin(this._loaders.map((l) => l.getTranslation(lang))).pipe(map((allTranslations) => {
|
|
3250
|
+
let result = {};
|
|
3251
|
+
allTranslations.forEach((translations) => {
|
|
3252
|
+
result = this.mergeDeep(result, translations);
|
|
3253
|
+
});
|
|
3254
|
+
return result;
|
|
3255
|
+
}));
|
|
3256
|
+
}
|
|
3257
|
+
isObject(item) {
|
|
3258
|
+
return item && typeof item === 'object' && !Array.isArray(item);
|
|
3259
|
+
}
|
|
3260
|
+
mergeDeep(target, source) {
|
|
3261
|
+
const output = Object.assign({}, target);
|
|
3262
|
+
if (this.isObject(target) && this.isObject(source)) {
|
|
3263
|
+
Object.keys(source).forEach((key) => {
|
|
3264
|
+
if (this.isObject(source[key])) {
|
|
3265
|
+
if (!(key in target))
|
|
3266
|
+
Object.assign(output, { [key]: source[key] });
|
|
3267
|
+
else
|
|
3268
|
+
output[key] = this.mergeDeep(target[key], source[key]);
|
|
3269
|
+
}
|
|
3270
|
+
else {
|
|
3271
|
+
Object.assign(output, { [key]: source[key] });
|
|
3272
|
+
}
|
|
3273
|
+
});
|
|
3274
|
+
}
|
|
3275
|
+
return output;
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
|
|
3279
|
+
let lastTranslateLoaderTimerId$1 = 0;
|
|
3280
|
+
function createTranslateLoader(http, appStateService, translationCacheService) {
|
|
3281
|
+
const ts = translationCacheService ?? inject(TranslationCacheService);
|
|
3282
|
+
const timerId = lastTranslateLoaderTimerId$1++;
|
|
3283
|
+
console.time('createTranslateLoader_' + timerId);
|
|
3284
|
+
return new AsyncTranslateLoader(combineLatest([appStateService.currentMfe$.asObservable(), appStateService.globalLoading$.asObservable()]).pipe(filter(([, isLoading]) => !isLoading), map(([currentMfe]) => {
|
|
3285
|
+
return new TranslateCombinedLoader(
|
|
3286
|
+
// translations of shell or of app in standalone mode
|
|
3287
|
+
new CachingTranslateLoader(ts, http, `./assets/i18n/`, '.json'),
|
|
3288
|
+
// translations of portal-integration-angular of app
|
|
3289
|
+
new CachingTranslateLoader(ts, http, Location.joinWithSlash(currentMfe.remoteBaseUrl, `onecx-portal-lib/assets/i18n/`), '.json'),
|
|
3290
|
+
// translations of the app
|
|
3291
|
+
new CachingTranslateLoader(ts, http, Location.joinWithSlash(currentMfe.remoteBaseUrl, `assets/i18n/`), '.json'));
|
|
3292
|
+
}), tap(() => console.timeEnd('createTranslateLoader_' + timerId))));
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
3295
|
class DateUtils {
|
|
3296
3296
|
constructor(locale) {
|
|
3297
3297
|
this.locale = locale;
|
|
@@ -3351,5 +3351,5 @@ function enumToDropdownOptions(translateService, enumType, translationKeyPrefix)
|
|
|
3351
3351
|
* Generated bundle index. Do not edit.
|
|
3352
3352
|
*/
|
|
3353
3353
|
|
|
3354
|
-
export { AdvancedDirective,
|
|
3354
|
+
export { AdvancedDirective, AngularAcceleratorModule, AngularAcceleratorPrimeNgModule, AppConfigService, AsyncTranslateLoader, BreadcrumbService, CachingTranslateLoader, ColorUtils, ColumnGroupSelectionComponent, ColumnType, CustomGroupColumnSelectorComponent, DataLayoutSelectionComponent, DataListGridComponent, DataListGridSortingComponent, DataTableComponent, DataViewComponent, DateUtils, DiagramComponent, DynamicPipe, GroupByCountDiagramComponent, IfBreakpointDirective, IfPermissionDirective, InteractiveDataViewComponent, ObjectUtils, OcxTimeAgoPipe, PageHeaderComponent, SearchConfigComponent, SearchHeaderComponent, SrcDirective, TranslateCombinedLoader, TranslationCacheService, createRemoteComponentTranslateLoader, createTranslateLoader, enumToDropdownOptions, flattenObject };
|
|
3355
3355
|
//# sourceMappingURL=onecx-angular-accelerator.mjs.map
|