@yuuvis/material 2.17.0 → 2.18.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.
@@ -137,8 +137,8 @@ class MasterDetailsLayoutComponent {
137
137
  #router = inject(Router);
138
138
  #dRef = inject(DestroyRef);
139
139
  #DEFAULT_GUTTER_SIZE_PX = 16;
140
- masterPaneRef = viewChild('masterPane');
141
- detailsPaneRef = viewChild('detailsPane');
140
+ masterPaneRef = viewChild.required('masterPane');
141
+ detailsPaneRef = viewChild.required('detailsPane');
142
142
  isDragging = signal(false);
143
143
  panes = contentChildren(YmtLayoutPaneDirective);
144
144
  _panes = computed(() => {
@@ -302,7 +302,7 @@ class MasterDetailsLayoutComponent {
302
302
  }
303
303
  }
304
304
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: MasterDetailsLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
305
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: MasterDetailsLayoutComponent, isStandalone: true, selector: "ymt-master-details-layout", inputs: { layoutSettingsID: { classPropertyName: "layoutSettingsID", publicName: "layoutSettingsID", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, gutterSize: { classPropertyName: "gutterSize", publicName: "gutterSize", isSignal: true, isRequired: false, transformFunction: null }, detailsActive: { classPropertyName: "detailsActive", publicName: "detailsActive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { detailsActive: "detailsActiveChange" }, queries: [{ propertyName: "panes", predicate: YmtLayoutPaneDirective, isSignal: true }], viewQueries: [{ propertyName: "masterPaneRef", first: true, predicate: ["masterPane"], descendants: true, isSignal: true }, { propertyName: "detailsPaneRef", first: true, predicate: ["detailsPane"], descendants: true, isSignal: true }, { propertyName: "detailsPaneTemplateRef", first: true, predicate: ["tplDetailsPanel"], descendants: true, isSignal: true }], ngImport: i0, template: "@let mp = _panes().master;\n@let dp = _panes().details;\n@if (!smallScreenLayout()) {\n <as-split\n [direction]=\"direction()\"\n unit=\"percent\"\n [gutterSize]=\"_gutterSize()\"\n [gutterStep]=\"1\"\n [useTransition]=\"false\"\n (dragStart)=\"onDragStart()\"\n (dragEnd)=\"onDragEnd($event)\"\n >\n @if (gutterSize() === 1) {\n <div *asSplitGutter=\"let isDragged = isDragged\" class=\"shade-gutter\" [class.dragged]=\"isDragged\">\n <div\n class=\"shade-gutter-icon\"\n [class.vertical]=\"direction() === 'vertical'\"\n [class.horizontal]=\"direction() === 'horizontal'\"\n ></div>\n </div>\n } @else {\n <div *asSplitGutter class=\"split-gutter\">\n <div\n asSplitGutterDragHandle\n class=\"split-gutter-handle\"\n [class.vertical]=\"direction() === 'vertical'\"\n [class.horizontal]=\"direction() === 'horizontal'\"\n ></div>\n </div>\n }\n\n <!-- master pane -->\n @if (mp) {\n <as-split-area\n [yuvSplitAreaCover]=\"isDragging()\"\n [maxSize]=\"mp.areaProperties().maxSize\"\n [minSize]=\"mp.areaProperties().minSize\"\n [lockSize]=\"mp.areaProperties().lockSize\"\n [size]=\"mp.areaProperties().size\"\n [visible]=\"mp.areaProperties().visible\"\n >\n <ymt-pane #masterPane [topBarActions]=\"mp.topBarActions()\" [plain]=\"!!options().plainMode\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n <!-- details pane -->\n @if (dp) {\n <as-split-area\n [yuvSplitAreaCover]=\"isDragging()\"\n [maxSize]=\"dp.areaProperties().maxSize\"\n [minSize]=\"dp.areaProperties().minSize\"\n [lockSize]=\"dp.areaProperties().lockSize\"\n [size]=\"dp.areaProperties().size\"\n [visible]=\"dp.areaProperties().visible\"\n >\n <ymt-pane #detailsPane [topBarActions]=\"dp.topBarActions()\" [plain]=\"!!options().plainMode\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n </as-split>\n} @else {\n <ymt-pane #masterPane [topBarActions]=\"mp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n}\n\n<ng-template #tplDetailsPanel>\n <ymt-pane #detailsPane class=\"fullscreen\" [topBarActions]=\"detailsBackAction\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n</ng-template>\n\n<ng-template #detailsBackAction>\n <button align=\"start\" ymt-icon-button icon-button-size=\"small\" (click)=\"detailsActive.set(false)\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n @if (dp.topBarActions(); as dta) {\n <ng-container *ngTemplateOutlet=\"dta\"></ng-container>\n }\n</ng-template>\n", styles: [":host{--_split-gutter-background-color: var(--split-gutter-background-color, transparent);--_split-gutter-handle-border-radius: var(--split-gutter-handle-border-radius, 2px);--_split-gutter-handle-width: var(--split-gutter-handle-width, 2px);--_split-gutter-handle-height: var(--split-gutter-handle-height, var(--ymt-spacing-3xl));--_split-gutter-shade-background: var(--split-gutter-shade-background, var(--ymt-outline-variant));--_split-gutter-shade-hover-background: var(--split-gutter-shade-hover-background, currentColor);--_split-gutter-shade-size: var(--split-gutter-shade-size, 16px);overflow:hidden}:host as-split{--as-gutter-background-color: var(--_split-gutter-background-color)}:host .split-gutter{width:100%;height:100%}:host .split-gutter .split-gutter-handle{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host .split-gutter .split-gutter-handle:after{content:\"\";transition:background-color .3s ease-in-out;background-color:rgb(from var(--ymt-text-color) r g b/.2);display:block;width:var(--_split-gutter-handle-width);height:var(--_split-gutter-handle-height);border-radius:var(--_split-gutter-handle-border-radius)}:host .split-gutter .split-gutter-handle.vertical:after{width:var(--_split-gutter-handle-height);height:var(--_split-gutter-handle-width)}:host .split-gutter:hover .split-gutter-handle:after{background-color:rgb(from var(--ymt-text-color) r g b/.9)}:host .shade-gutter{width:100%;height:100%;background-color:var(--_split-gutter-shade-background);position:relative}:host .shade-gutter-icon{height:100%;width:100%;background-color:var(--_split-gutter-shade-hover-background);transition:opacity .3s;opacity:0;position:absolute;z-index:500}.dragged :host .shade-gutter-icon,:host .shade-gutter-icon:hover{opacity:.1}:host .shade-gutter-icon.horizontal{width:calc(var(--_split-gutter-shade-size) + 1px);inset-inline-start:calc(var(--_split-gutter-shade-size) / -2);inset-inline-end:var(--_split-gutter-shade-size)}:host .shade-gutter-icon.vertical{height:calc(var(--_split-gutter-shade-size) + 1px);inset-block-start:calc(var(--_split-gutter-shade-size) / -2);inset-block-end:var(--_split-gutter-shade-size)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AngularSplitModule }, { kind: "component", type: i2.SplitComponent, selector: "as-split", inputs: ["gutterSize", "gutterStep", "disabled", "gutterClickDeltaPx", "direction", "dir", "unit", "gutterAriaLabel", "restrictMove", "useTransition", "gutterDblClickDuration"], outputs: ["gutterClick", "gutterDblClick", "dragStart", "dragEnd", "transitionEnd"], exportAs: ["asSplit"] }, { kind: "component", type: i2.SplitAreaComponent, selector: "as-split-area", inputs: ["size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: i2.SplitGutterDirective, selector: "[asSplitGutter]" }, { kind: "directive", type: i2.SplitGutterDragHandleDirective, selector: "[asSplitGutterDragHandle]" }, { kind: "ngmodule", type: YmtPanesModule }, { kind: "component", type: i3.YmtPaneComponent, selector: "ymt-pane", inputs: ["topBarActions", "plain"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: YmtIconButtonDirective, selector: "button[ymtIconButton],button[ymt-icon-button],a[ymtIconButton],a[ymt-icon-button]", inputs: ["disabled", "disableRipple", "aria-disabled", "disabledInteractive", "icon-button-size"] }, { kind: "directive", type: AreaCoverDirective, selector: "[yuvSplitAreaCover]", inputs: ["yuvSplitAreaCover"] }] });
305
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: MasterDetailsLayoutComponent, isStandalone: true, selector: "ymt-master-details-layout", inputs: { layoutSettingsID: { classPropertyName: "layoutSettingsID", publicName: "layoutSettingsID", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, gutterSize: { classPropertyName: "gutterSize", publicName: "gutterSize", isSignal: true, isRequired: false, transformFunction: null }, detailsActive: { classPropertyName: "detailsActive", publicName: "detailsActive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { detailsActive: "detailsActiveChange" }, queries: [{ propertyName: "panes", predicate: YmtLayoutPaneDirective, isSignal: true }], viewQueries: [{ propertyName: "masterPaneRef", first: true, predicate: ["masterPane"], descendants: true, isSignal: true }, { propertyName: "detailsPaneRef", first: true, predicate: ["detailsPane"], descendants: true, isSignal: true }, { propertyName: "detailsPaneTemplateRef", first: true, predicate: ["tplDetailsPanel"], descendants: true, isSignal: true }], ngImport: i0, template: "@let mp = _panes().master;\n@let dp = _panes().details;\n@if (!smallScreenLayout()) {\n <as-split\n [direction]=\"direction()\"\n unit=\"percent\"\n [gutterSize]=\"_gutterSize()\"\n [gutterStep]=\"1\"\n [useTransition]=\"false\"\n (dragStart)=\"onDragStart()\"\n (dragEnd)=\"onDragEnd($event)\"\n >\n @if (gutterSize() === 1) {\n <div *asSplitGutter=\"let isDragged = isDragged\" class=\"shade-gutter\" [class.dragged]=\"isDragged\">\n <div\n class=\"shade-gutter-icon\"\n [class.vertical]=\"direction() === 'vertical'\"\n [class.horizontal]=\"direction() === 'horizontal'\"\n ></div>\n </div>\n } @else {\n <div *asSplitGutter class=\"split-gutter\">\n <div\n asSplitGutterDragHandle\n class=\"split-gutter-handle\"\n [class.vertical]=\"direction() === 'vertical'\"\n [class.horizontal]=\"direction() === 'horizontal'\"\n ></div>\n </div>\n }\n\n <!-- master pane -->\n @if (mp) {\n <as-split-area\n [yuvSplitAreaCover]=\"isDragging()\"\n [maxSize]=\"mp.areaProperties().maxSize\"\n [minSize]=\"mp.areaProperties().minSize\"\n [lockSize]=\"mp.areaProperties().lockSize\"\n [size]=\"mp.areaProperties().size\"\n [visible]=\"mp.areaProperties().visible\"\n >\n <ymt-pane #masterPane [topBarActions]=\"mp.topBarActions()\" [plain]=\"!!options().plainMode\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n <!-- details pane -->\n @if (dp) {\n <as-split-area\n [yuvSplitAreaCover]=\"isDragging()\"\n [maxSize]=\"dp.areaProperties().maxSize\"\n [minSize]=\"dp.areaProperties().minSize\"\n [lockSize]=\"dp.areaProperties().lockSize\"\n [size]=\"dp.areaProperties().size\"\n [visible]=\"dp.areaProperties().visible\"\n >\n <ymt-pane #detailsPane [topBarActions]=\"dp.topBarActions()\" [plain]=\"!!options().plainMode\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n </as-split>\n} @else {\n <ymt-pane #masterPane [topBarActions]=\"mp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n}\n\n<ng-template #tplDetailsPanel>\n <ymt-pane #detailsPane class=\"fullscreen\" [topBarActions]=\"detailsBackAction\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n</ng-template>\n\n<ng-template #detailsBackAction>\n <button align=\"start\" ymt-icon-button icon-button-size=\"small\" (click)=\"detailsActive.set(false)\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n @if (dp.topBarActions(); as dta) {\n <ng-container *ngTemplateOutlet=\"dta\"></ng-container>\n }\n</ng-template>\n", styles: [":host{--_split-gutter-background-color: var(--split-gutter-background-color, transparent);--_split-gutter-handle-border-radius: var(--split-gutter-handle-border-radius, 2px);--_split-gutter-handle-width: var(--split-gutter-handle-width, 2px);--_split-gutter-handle-height: var(--split-gutter-handle-height, var(--ymt-spacing-3xl));--_split-gutter-shade-background: var(--split-gutter-shade-background, var(--ymt-outline-variant));--_split-gutter-shade-hover-background: var(--split-gutter-shade-hover-background, currentColor);--_split-gutter-shade-size: var(--split-gutter-shade-size, 16px);overflow:hidden}:host as-split{--as-gutter-background-color: var(--_split-gutter-background-color)}:host .split-gutter{width:100%;height:100%}:host .split-gutter .split-gutter-handle{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host .split-gutter .split-gutter-handle:after{content:\"\";transition:background-color .3s ease-in-out;background-color:rgb(from var(--ymt-text-color) r g b/.2);display:block;width:var(--_split-gutter-handle-width);height:var(--_split-gutter-handle-height);border-radius:var(--_split-gutter-handle-border-radius)}:host .split-gutter .split-gutter-handle.vertical:after{width:var(--_split-gutter-handle-height);height:var(--_split-gutter-handle-width)}:host .split-gutter:hover .split-gutter-handle:after{background-color:rgb(from var(--ymt-text-color) r g b/.9)}:host .shade-gutter{width:100%;height:100%;background-color:var(--_split-gutter-shade-background);position:relative}:host .shade-gutter-icon{height:100%;width:100%;background-color:var(--_split-gutter-shade-hover-background);transition:opacity .3s;opacity:0;position:absolute;z-index:500}.dragged :host .shade-gutter-icon,:host .shade-gutter-icon:hover{opacity:.1}:host .shade-gutter-icon.horizontal{width:calc(var(--_split-gutter-shade-size) + 1px);inset-inline-start:calc(var(--_split-gutter-shade-size) / -2);inset-inline-end:var(--_split-gutter-shade-size)}:host .shade-gutter-icon.vertical{height:calc(var(--_split-gutter-shade-size) + 1px);inset-block-start:calc(var(--_split-gutter-shade-size) / -2);inset-block-end:var(--_split-gutter-shade-size)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AngularSplitModule }, { kind: "component", type: i2.SplitComponent, selector: "as-split", inputs: ["gutterSize", "gutterStep", "disabled", "gutterClickDeltaPx", "direction", "dir", "unit", "gutterAriaLabel", "restrictMove", "useTransition", "gutterDblClickDuration"], outputs: ["gutterClick", "gutterDblClick", "dragStart", "dragEnd", "transitionEnd"], exportAs: ["asSplit"] }, { kind: "component", type: i2.SplitAreaComponent, selector: "as-split-area", inputs: ["size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: i2.SplitGutterDirective, selector: "[asSplitGutter]" }, { kind: "directive", type: i2.SplitGutterDragHandleDirective, selector: "[asSplitGutterDragHandle]" }, { kind: "ngmodule", type: YmtPanesModule }, { kind: "component", type: i3.YmtPaneComponent, selector: "ymt-pane", inputs: ["topBarActions", "busy", "noAnimation", "plain"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: YmtIconButtonDirective, selector: "button[ymtIconButton],button[ymt-icon-button],a[ymtIconButton],a[ymt-icon-button]", inputs: ["disabled", "disableRipple", "aria-disabled", "disabledInteractive", "icon-button-size"] }, { kind: "directive", type: AreaCoverDirective, selector: "[yuvSplitAreaCover]", inputs: ["yuvSplitAreaCover"] }] });
306
306
  }
307
307
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: MasterDetailsLayoutComponent, decorators: [{
308
308
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"yuuvis-material-layout.mjs","sources":["../../../../../libs/yuuvis/material/layout/src/lib/directives/area-cover.directive.ts","../../../../../libs/yuuvis/material/layout/src/lib/directives/layout-pane.directive.ts","../../../../../libs/yuuvis/material/layout/src/lib/services/layout.service.ts","../../../../../libs/yuuvis/material/layout/src/lib/components/master-details-layout/master-details-layout.component.ts","../../../../../libs/yuuvis/material/layout/src/lib/components/master-details-layout/master-details-layout.component.html","../../../../../libs/yuuvis/material/layout/src/lib/layout.module.ts","../../../../../libs/yuuvis/material/layout/src/yuuvis-material-layout.ts"],"sourcesContent":["import { Directive, effect, ElementRef, inject, input } from '@angular/core';\n\n/**\n * TODO: This directive is currently used in the MasterDetailsLayoutComponent to add a cover element during dragging of the split area,\n * to prevent iframes in the panes from capturing the drag events.\n * However, this directive is very generic and can be used in any component that needs to add a cover element during dragging.\n * Therefore, it should be moved to @yuuvis/client-components and then replaced with the SplitAreaCoverDirective from the client-framework/split-view library.\n */\n@Directive({\n selector: '[yuvSplitAreaCover]'\n})\nexport class AreaCoverDirective {\n #elRef = inject(ElementRef);\n\n yuvSplitAreaCover = input<boolean>(false);\n #draggingEffect = effect(() => {\n this.#toggleCover(this.yuvSplitAreaCover());\n });\n\n #coverElement?: HTMLElement;\n\n #toggleCover(active: boolean) {\n const el: HTMLElement = this.#elRef.nativeElement as HTMLElement;\n\n if (this.#coverElement) {\n el.style.position = 'initial';\n this.#coverElement.remove();\n this.#coverElement = undefined;\n }\n if (active) {\n el.style.position = 'relative';\n this.#coverElement = this.#createCoverElement();\n el.append(this.#coverElement);\n }\n }\n\n #createCoverElement(): HTMLElement {\n const coverElement = document.createElement('div');\n coverElement.classList.add('yuv-split-area-cover');\n coverElement.style.position = 'absolute';\n coverElement.style.zIndex = '500';\n coverElement.style.inset = '0';\n return coverElement;\n }\n}\n","import { Directive, inject, input, signal, TemplateRef } from '@angular/core';\nimport { LayoutPaneRole, PaneLayoutSettings } from '../layout.interface';\n\n/**\n * Directive to mark a layout pane.\n */\n@Directive({\n selector: '[ymtLayoutPane]'\n})\nexport class YmtLayoutPaneDirective {\n template = inject(TemplateRef<unknown>);\n // Role the pane takes in the layout\n role = input.required<LayoutPaneRole>();\n // template holding the actions shown in the top bar of the pane\n topBarActions = input<TemplateRef<unknown>>();\n areaProperties = signal<PaneLayoutSettings>({ visible: true });\n\n updateSettings(settings: PaneLayoutSettings): void {\n this.areaProperties.set({ ...this.areaProperties(), ...settings });\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Service to store and retrieve layout settings. Those\n * settings are stored on the users device because in\n * general layout settings like panel widths are highly\n * dependent on the current device.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class LayoutService {\n #STORAGE_PREFIX = 'ymt.layout:';\n\n DEFAULT_SPLIT_VIEW_GUTTER_SIZE = 16;\n\n saveSettings(key: string, settings: unknown): boolean {\n if (typeof settings === 'object') {\n localStorage.setItem(this.#getKey(key), JSON.stringify(settings));\n return true;\n } else return false;\n }\n\n getSettings(key: string): unknown | undefined {\n try {\n const v = localStorage.getItem(this.#getKey(key));\n return v ? JSON.parse(v) : undefined;\n } catch (e) {\n console.error('Error while parsing layout settings', e);\n return undefined;\n }\n }\n\n #getKey(key: string) {\n return `${this.#STORAGE_PREFIX}${key}`;\n }\n\n /**\n * Clears all layout settings.\n */\n clearSettings(): void {\n Object.keys(localStorage).forEach((key) => {\n if (key.startsWith(this.#STORAGE_PREFIX)) {\n localStorage.removeItem(key);\n }\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n Component,\n computed,\n contentChildren,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n model,\n signal,\n TemplateRef,\n untracked,\n viewChild\n} from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Router } from '@angular/router';\nimport { DeviceService, YmtIconButtonDirective } from '@yuuvis/material';\nimport { YmtPaneComponent, YmtPanesModule } from '@yuuvis/material/panes';\nimport { AngularSplitModule, SplitAreaSize, SplitDirection } from 'angular-split';\nimport { AreaCoverDirective } from '../../directives/area-cover.directive';\nimport { YmtLayoutPaneDirective } from '../../directives/layout-pane.directive';\nimport {\n LayoutOutputData,\n LayoutSettings,\n MasterDetailsPaneLayoutOptions,\n PaneLayoutSettings\n} from '../../layout.interface';\nimport { LayoutService } from '../../services/layout.service';\n\n@Component({\n selector: 'ymt-master-details-layout',\n imports: [\n CommonModule,\n AngularSplitModule,\n YmtPanesModule,\n MatIconModule,\n YmtIconButtonDirective,\n CommonModule,\n AngularSplitModule,\n YmtPanesModule,\n AreaCoverDirective\n ],\n templateUrl: './master-details-layout.component.html',\n styleUrl: './master-details-layout.component.scss'\n})\nexport class MasterDetailsLayoutComponent {\n #elRef = inject(ElementRef);\n #layoutService = inject(LayoutService);\n #dialog = inject(MatDialog);\n #device = inject(DeviceService);\n #router = inject(Router);\n #dRef = inject(DestroyRef);\n\n #DEFAULT_GUTTER_SIZE_PX = 16;\n\n masterPaneRef = viewChild<YmtPaneComponent>('masterPane');\n detailsPaneRef = viewChild<YmtPaneComponent>('detailsPane');\n\n isDragging = signal(false);\n\n panes = contentChildren<YmtLayoutPaneDirective>(YmtLayoutPaneDirective);\n _panes = computed<{\n master: YmtLayoutPaneDirective;\n details: YmtLayoutPaneDirective;\n }>(() => {\n const _panes = this.panes();\n const _options = this.options();\n untracked(() => {\n _panes.forEach((p) =>\n p.updateSettings({\n size: _options[`${p.role()}Size` as keyof MasterDetailsPaneLayoutOptions] as SplitAreaSize,\n minSize: _options[`${p.role()}MinSize` as keyof MasterDetailsPaneLayoutOptions] as number,\n maxSize: _options[`${p.role()}MaxSize` as keyof MasterDetailsPaneLayoutOptions] as number\n })\n );\n });\n\n const res = {\n master: _panes.find((p) => p.role() === 'master')!,\n details: _panes.find((p) => p.role() === 'details')!\n };\n if (!res.master || !res.details)\n console.error('Both master and details panes are required in MasterDetailsLayoutComponent');\n return res;\n });\n\n #detailsPaneDialogRef: MatDialogRef<any> | null = null;\n detailsPaneTemplateRef = viewChild.required<TemplateRef<any>>('tplDetailsPanel');\n\n /**\n * Setting ID for persisting layout settings. If not set, layout settings won't be persisted.\n */\n layoutSettingsID = input<string | undefined>(undefined);\n\n options = input<MasterDetailsPaneLayoutOptions>({\n resizable: true\n });\n #optionsEffect = computed(() => {\n const o = this.options();\n // if(o.m)\n });\n\n /**\n * The split views direction. Could be 'horizontal' or 'vertical'. Defaults to 'horizontal'.\n */\n direction = input<SplitDirection>('horizontal');\n\n /**\n * Size of the gutter in Pixel.\n */\n gutterSize = input<number>(this.#DEFAULT_GUTTER_SIZE_PX);\n _gutterSize = signal<number>(this.#DEFAULT_GUTTER_SIZE_PX);\n #gutterSizeEffect = effect(() => {\n this._gutterSize.set(this.gutterSize());\n });\n\n /**\n * Enable/disable details pane (also use as two-way-bound variable: [(detailsActive)])\n */\n detailsActive = model<boolean>(false);\n #detailsActiveEffect = effect(() => {\n const da = this.detailsActive();\n untracked(() => {\n if (this.#detailsPaneDialogRef) this.#detailsPaneDialogRef.close();\n if (this.smallScreenLayout() && da) {\n this.#detailsPaneDialogRef = this.#dialog.open(this.detailsPaneTemplateRef(), {\n width: '100vw',\n height: '100vh',\n maxWidth: '100vw',\n panelClass: 'ymt-dialog-fullscreen'\n });\n this.#detailsPaneDialogRef.afterClosed().subscribe((silent: boolean) => {\n if (!silent) {\n this.detailsActive.set(false);\n }\n this.#detailsPaneDialogRef = null;\n });\n }\n });\n });\n\n smallScreenLayout = this.#device.smallScreenLayout;\n #smallScreenLayoutEffect = effect(() => {\n const ssl = this.smallScreenLayout();\n if (this.#detailsPaneDialogRef) this.#detailsPaneDialogRef.close(true);\n untracked(() => {\n const detailsActive = this.detailsActive();\n if (ssl && detailsActive) this.detailsActive.set(false);\n });\n });\n\n onDragStart(): void {\n this.isDragging.set(true);\n }\n\n onDragEnd(event: LayoutOutputData): void {\n this.#updateLayoutSettings(event.sizes);\n this.isDragging.set(false);\n }\n\n hideArea(role: 'master' | 'details'): void {\n const pane = this._panes()[role];\n pane.updateSettings({ visible: false });\n }\n\n showArea(role: 'master' | 'details'): void {\n const pane = this._panes()[role];\n pane.updateSettings({ visible: true });\n }\n\n toggleArea(role: 'master' | 'details'): void {\n const pane = this._panes()[role];\n pane.updateSettings({ visible: !pane.areaProperties().visible });\n }\n\n isAreaVisible(role: 'master' | 'details'): boolean {\n const pane = this._panes()[role];\n return pane.areaProperties().visible !== false;\n }\n\n toggleFullscreen(role: 'master' | 'details'): void {\n const pane = role === 'master' ? this.masterPaneRef() : this.detailsPaneRef();\n if (pane) {\n if (pane.fullscreenActive()) {\n pane.exitFullscreen();\n } else {\n pane.enterFullscreen();\n }\n }\n }\n\n fullscreenActive(role: 'master' | 'details'): boolean {\n const pane = role === 'master' ? this.masterPaneRef() : this.detailsPaneRef();\n return pane ? pane.fullscreenActive() : false;\n }\n\n #updateLayoutSettings(sizes: SplitAreaSize[]): void {\n const layoutSettings: LayoutSettings = {\n areas: this.panes().map((area: YmtLayoutPaneDirective, idx: number) => ({\n visible: area.areaProperties().visible === false ? false : true,\n size: sizes[idx]\n }))\n };\n // save layout settings if persistence is enabled\n const lsid = this.layoutSettingsID();\n if (lsid) {\n this.#layoutService.saveSettings(lsid, layoutSettings);\n }\n }\n\n #calculateGutterSize() {\n const computedStyle = getComputedStyle(this.#elRef.nativeElement);\n const spacing = computedStyle.getPropertyValue('--ymt-spacing-m').trim();\n const fontSize = parseFloat(computedStyle.fontSize.trim());\n const spacingPx = spacing.endsWith('rem')\n ? parseFloat(spacing) * fontSize\n : spacing.endsWith('px')\n ? parseFloat(spacing)\n : this.#DEFAULT_GUTTER_SIZE_PX;\n if (this._gutterSize() === this.#DEFAULT_GUTTER_SIZE_PX) this._gutterSize.set(spacingPx);\n }\n\n applyLayoutSettings(settings: LayoutSettings) {\n if (!this.#isLayoutSettingsObject(settings)) return;\n settings.areas.forEach((a: PaneLayoutSettings, index: number) => {\n this.panes()[index].updateSettings(a);\n });\n }\n\n #isLayoutSettingsObject(v: any): boolean {\n return v && 'areas' in v;\n }\n\n ngAfterViewInit(): void {\n this.#calculateGutterSize();\n // try to load layout settings if persistence is enabled\n const lsid = this.layoutSettingsID();\n if (lsid) {\n this.applyLayoutSettings(this.#layoutService.getSettings(lsid) as LayoutSettings);\n }\n }\n}\n","@let mp = _panes().master;\n@let dp = _panes().details;\n@if (!smallScreenLayout()) {\n <as-split\n [direction]=\"direction()\"\n unit=\"percent\"\n [gutterSize]=\"_gutterSize()\"\n [gutterStep]=\"1\"\n [useTransition]=\"false\"\n (dragStart)=\"onDragStart()\"\n (dragEnd)=\"onDragEnd($event)\"\n >\n @if (gutterSize() === 1) {\n <div *asSplitGutter=\"let isDragged = isDragged\" class=\"shade-gutter\" [class.dragged]=\"isDragged\">\n <div\n class=\"shade-gutter-icon\"\n [class.vertical]=\"direction() === 'vertical'\"\n [class.horizontal]=\"direction() === 'horizontal'\"\n ></div>\n </div>\n } @else {\n <div *asSplitGutter class=\"split-gutter\">\n <div\n asSplitGutterDragHandle\n class=\"split-gutter-handle\"\n [class.vertical]=\"direction() === 'vertical'\"\n [class.horizontal]=\"direction() === 'horizontal'\"\n ></div>\n </div>\n }\n\n <!-- master pane -->\n @if (mp) {\n <as-split-area\n [yuvSplitAreaCover]=\"isDragging()\"\n [maxSize]=\"mp.areaProperties().maxSize\"\n [minSize]=\"mp.areaProperties().minSize\"\n [lockSize]=\"mp.areaProperties().lockSize\"\n [size]=\"mp.areaProperties().size\"\n [visible]=\"mp.areaProperties().visible\"\n >\n <ymt-pane #masterPane [topBarActions]=\"mp.topBarActions()\" [plain]=\"!!options().plainMode\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n <!-- details pane -->\n @if (dp) {\n <as-split-area\n [yuvSplitAreaCover]=\"isDragging()\"\n [maxSize]=\"dp.areaProperties().maxSize\"\n [minSize]=\"dp.areaProperties().minSize\"\n [lockSize]=\"dp.areaProperties().lockSize\"\n [size]=\"dp.areaProperties().size\"\n [visible]=\"dp.areaProperties().visible\"\n >\n <ymt-pane #detailsPane [topBarActions]=\"dp.topBarActions()\" [plain]=\"!!options().plainMode\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n </as-split>\n} @else {\n <ymt-pane #masterPane [topBarActions]=\"mp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n}\n\n<ng-template #tplDetailsPanel>\n <ymt-pane #detailsPane class=\"fullscreen\" [topBarActions]=\"detailsBackAction\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n</ng-template>\n\n<ng-template #detailsBackAction>\n <button align=\"start\" ymt-icon-button icon-button-size=\"small\" (click)=\"detailsActive.set(false)\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n @if (dp.topBarActions(); as dta) {\n <ng-container *ngTemplateOutlet=\"dta\"></ng-container>\n }\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { MasterDetailsLayoutComponent } from './components/master-details-layout/master-details-layout.component';\nimport { YmtLayoutPaneDirective } from './directives/layout-pane.directive';\n\nconst cmp = [MasterDetailsLayoutComponent, YmtLayoutPaneDirective]\n\n@NgModule({\n imports: cmp,\n exports: cmp\n})\nexport class YmtLayoutModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA;;;;;AAKG;MAIU,kBAAkB,CAAA;AAC7B,IAAA,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;AAE3B,IAAA,iBAAiB,GAAG,KAAK,CAAU,KAAK,CAAC;AACzC,IAAA,eAAe,GAAG,MAAM,CAAC,MAAK;QAC5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAC7C,IAAA,CAAC,CAAC;AAEF,IAAA,aAAa;AAEb,IAAA,YAAY,CAAC,MAAe,EAAA;AAC1B,QAAA,MAAM,EAAE,GAAgB,IAAI,CAAC,MAAM,CAAC,aAA4B;AAEhE,QAAA,IAAI,IAAI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,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YANf,4BAA4B,CAAA,EAAA,CAAA;;4FAM5B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"yuuvis-material-layout.mjs","sources":["../../../../../libs/yuuvis/material/layout/src/lib/directives/area-cover.directive.ts","../../../../../libs/yuuvis/material/layout/src/lib/directives/layout-pane.directive.ts","../../../../../libs/yuuvis/material/layout/src/lib/services/layout.service.ts","../../../../../libs/yuuvis/material/layout/src/lib/components/master-details-layout/master-details-layout.component.ts","../../../../../libs/yuuvis/material/layout/src/lib/components/master-details-layout/master-details-layout.component.html","../../../../../libs/yuuvis/material/layout/src/lib/layout.module.ts","../../../../../libs/yuuvis/material/layout/src/yuuvis-material-layout.ts"],"sourcesContent":["import { Directive, effect, ElementRef, inject, input } from '@angular/core';\n\n/**\n * TODO: This directive is currently used in the MasterDetailsLayoutComponent to add a cover element during dragging of the split area,\n * to prevent iframes in the panes from capturing the drag events.\n * However, this directive is very generic and can be used in any component that needs to add a cover element during dragging.\n * Therefore, it should be moved to @yuuvis/client-components and then replaced with the SplitAreaCoverDirective from the client-framework/split-view library.\n */\n@Directive({\n selector: '[yuvSplitAreaCover]'\n})\nexport class AreaCoverDirective {\n #elRef = inject(ElementRef);\n\n yuvSplitAreaCover = input<boolean>(false);\n #draggingEffect = effect(() => {\n this.#toggleCover(this.yuvSplitAreaCover());\n });\n\n #coverElement?: HTMLElement;\n\n #toggleCover(active: boolean) {\n const el: HTMLElement = this.#elRef.nativeElement as HTMLElement;\n\n if (this.#coverElement) {\n el.style.position = 'initial';\n this.#coverElement.remove();\n this.#coverElement = undefined;\n }\n if (active) {\n el.style.position = 'relative';\n this.#coverElement = this.#createCoverElement();\n el.append(this.#coverElement);\n }\n }\n\n #createCoverElement(): HTMLElement {\n const coverElement = document.createElement('div');\n coverElement.classList.add('yuv-split-area-cover');\n coverElement.style.position = 'absolute';\n coverElement.style.zIndex = '500';\n coverElement.style.inset = '0';\n return coverElement;\n }\n}\n","import { Directive, inject, input, signal, TemplateRef } from '@angular/core';\nimport { LayoutPaneRole, PaneLayoutSettings } from '../layout.interface';\n\n/**\n * Directive to mark a layout pane.\n */\n@Directive({\n selector: '[ymtLayoutPane]'\n})\nexport class YmtLayoutPaneDirective {\n template = inject(TemplateRef<unknown>);\n // Role the pane takes in the layout\n role = input.required<LayoutPaneRole>();\n // template holding the actions shown in the top bar of the pane\n topBarActions = input<TemplateRef<unknown>>();\n areaProperties = signal<PaneLayoutSettings>({ visible: true });\n\n updateSettings(settings: PaneLayoutSettings): void {\n this.areaProperties.set({ ...this.areaProperties(), ...settings });\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Service to store and retrieve layout settings. Those\n * settings are stored on the users device because in\n * general layout settings like panel widths are highly\n * dependent on the current device.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class LayoutService {\n #STORAGE_PREFIX = 'ymt.layout:';\n\n DEFAULT_SPLIT_VIEW_GUTTER_SIZE = 16;\n\n saveSettings(key: string, settings: unknown): boolean {\n if (typeof settings === 'object') {\n localStorage.setItem(this.#getKey(key), JSON.stringify(settings));\n return true;\n } else return false;\n }\n\n getSettings(key: string): unknown | undefined {\n try {\n const v = localStorage.getItem(this.#getKey(key));\n return v ? JSON.parse(v) : undefined;\n } catch (e) {\n console.error('Error while parsing layout settings', e);\n return undefined;\n }\n }\n\n #getKey(key: string) {\n return `${this.#STORAGE_PREFIX}${key}`;\n }\n\n /**\n * Clears all layout settings.\n */\n clearSettings(): void {\n Object.keys(localStorage).forEach((key) => {\n if (key.startsWith(this.#STORAGE_PREFIX)) {\n localStorage.removeItem(key);\n }\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n Component,\n computed,\n contentChildren,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n model,\n signal,\n TemplateRef,\n untracked,\n viewChild\n} from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Router } from '@angular/router';\nimport { DeviceService, YmtIconButtonDirective } from '@yuuvis/material';\nimport { YmtPaneComponent, YmtPanesModule } from '@yuuvis/material/panes';\nimport { AngularSplitModule, SplitAreaSize, SplitDirection } from 'angular-split';\nimport { AreaCoverDirective } from '../../directives/area-cover.directive';\nimport { YmtLayoutPaneDirective } from '../../directives/layout-pane.directive';\nimport {\n LayoutOutputData,\n LayoutSettings,\n MasterDetailsPaneLayoutOptions,\n PaneLayoutSettings\n} from '../../layout.interface';\nimport { LayoutService } from '../../services/layout.service';\n\n@Component({\n selector: 'ymt-master-details-layout',\n imports: [\n CommonModule,\n AngularSplitModule,\n YmtPanesModule,\n MatIconModule,\n YmtIconButtonDirective,\n CommonModule,\n AngularSplitModule,\n YmtPanesModule,\n AreaCoverDirective\n ],\n templateUrl: './master-details-layout.component.html',\n styleUrl: './master-details-layout.component.scss'\n})\nexport class MasterDetailsLayoutComponent {\n #elRef = inject(ElementRef);\n #layoutService = inject(LayoutService);\n #dialog = inject(MatDialog);\n #device = inject(DeviceService);\n #router = inject(Router);\n #dRef = inject(DestroyRef);\n\n #DEFAULT_GUTTER_SIZE_PX = 16;\n\n masterPaneRef = viewChild.required<YmtPaneComponent>('masterPane');\n detailsPaneRef = viewChild.required<YmtPaneComponent>('detailsPane');\n\n isDragging = signal(false);\n\n panes = contentChildren<YmtLayoutPaneDirective>(YmtLayoutPaneDirective);\n _panes = computed<{\n master: YmtLayoutPaneDirective;\n details: YmtLayoutPaneDirective;\n }>(() => {\n const _panes = this.panes();\n const _options = this.options();\n untracked(() => {\n _panes.forEach((p) =>\n p.updateSettings({\n size: _options[`${p.role()}Size` as keyof MasterDetailsPaneLayoutOptions] as SplitAreaSize,\n minSize: _options[`${p.role()}MinSize` as keyof MasterDetailsPaneLayoutOptions] as number,\n maxSize: _options[`${p.role()}MaxSize` as keyof MasterDetailsPaneLayoutOptions] as number\n })\n );\n });\n\n const res = {\n master: _panes.find((p) => p.role() === 'master')!,\n details: _panes.find((p) => p.role() === 'details')!\n };\n if (!res.master || !res.details)\n console.error('Both master and details panes are required in MasterDetailsLayoutComponent');\n return res;\n });\n\n #detailsPaneDialogRef: MatDialogRef<any> | null = null;\n detailsPaneTemplateRef = viewChild.required<TemplateRef<any>>('tplDetailsPanel');\n\n /**\n * Setting ID for persisting layout settings. If not set, layout settings won't be persisted.\n */\n layoutSettingsID = input<string | undefined>(undefined);\n\n options = input<MasterDetailsPaneLayoutOptions>({\n resizable: true\n });\n #optionsEffect = computed(() => {\n const o = this.options();\n // if(o.m)\n });\n\n /**\n * The split views direction. Could be 'horizontal' or 'vertical'. Defaults to 'horizontal'.\n */\n direction = input<SplitDirection>('horizontal');\n\n /**\n * Size of the gutter in Pixel.\n */\n gutterSize = input<number>(this.#DEFAULT_GUTTER_SIZE_PX);\n _gutterSize = signal<number>(this.#DEFAULT_GUTTER_SIZE_PX);\n #gutterSizeEffect = effect(() => {\n this._gutterSize.set(this.gutterSize());\n });\n\n /**\n * Enable/disable details pane (also use as two-way-bound variable: [(detailsActive)])\n */\n detailsActive = model<boolean>(false);\n #detailsActiveEffect = effect(() => {\n const da = this.detailsActive();\n untracked(() => {\n if (this.#detailsPaneDialogRef) this.#detailsPaneDialogRef.close();\n if (this.smallScreenLayout() && da) {\n this.#detailsPaneDialogRef = this.#dialog.open(this.detailsPaneTemplateRef(), {\n width: '100vw',\n height: '100vh',\n maxWidth: '100vw',\n panelClass: 'ymt-dialog-fullscreen'\n });\n this.#detailsPaneDialogRef.afterClosed().subscribe((silent: boolean) => {\n if (!silent) {\n this.detailsActive.set(false);\n }\n this.#detailsPaneDialogRef = null;\n });\n }\n });\n });\n\n smallScreenLayout = this.#device.smallScreenLayout;\n #smallScreenLayoutEffect = effect(() => {\n const ssl = this.smallScreenLayout();\n if (this.#detailsPaneDialogRef) this.#detailsPaneDialogRef.close(true);\n untracked(() => {\n const detailsActive = this.detailsActive();\n if (ssl && detailsActive) this.detailsActive.set(false);\n });\n });\n\n onDragStart(): void {\n this.isDragging.set(true);\n }\n\n onDragEnd(event: LayoutOutputData): void {\n this.#updateLayoutSettings(event.sizes);\n this.isDragging.set(false);\n }\n\n hideArea(role: 'master' | 'details'): void {\n const pane = this._panes()[role];\n pane.updateSettings({ visible: false });\n }\n\n showArea(role: 'master' | 'details'): void {\n const pane = this._panes()[role];\n pane.updateSettings({ visible: true });\n }\n\n toggleArea(role: 'master' | 'details'): void {\n const pane = this._panes()[role];\n pane.updateSettings({ visible: !pane.areaProperties().visible });\n }\n\n isAreaVisible(role: 'master' | 'details'): boolean {\n const pane = this._panes()[role];\n return pane.areaProperties().visible !== false;\n }\n\n toggleFullscreen(role: 'master' | 'details'): void {\n const pane = role === 'master' ? this.masterPaneRef() : this.detailsPaneRef();\n if (pane) {\n if (pane.fullscreenActive()) {\n pane.exitFullscreen();\n } else {\n pane.enterFullscreen();\n }\n }\n }\n\n fullscreenActive(role: 'master' | 'details'): boolean {\n const pane = role === 'master' ? this.masterPaneRef() : this.detailsPaneRef();\n return pane ? pane.fullscreenActive() : false;\n }\n\n #updateLayoutSettings(sizes: SplitAreaSize[]): void {\n const layoutSettings: LayoutSettings = {\n areas: this.panes().map((area: YmtLayoutPaneDirective, idx: number) => ({\n visible: area.areaProperties().visible === false ? false : true,\n size: sizes[idx]\n }))\n };\n // save layout settings if persistence is enabled\n const lsid = this.layoutSettingsID();\n if (lsid) {\n this.#layoutService.saveSettings(lsid, layoutSettings);\n }\n }\n\n #calculateGutterSize() {\n const computedStyle = getComputedStyle(this.#elRef.nativeElement);\n const spacing = computedStyle.getPropertyValue('--ymt-spacing-m').trim();\n const fontSize = parseFloat(computedStyle.fontSize.trim());\n const spacingPx = spacing.endsWith('rem')\n ? parseFloat(spacing) * fontSize\n : spacing.endsWith('px')\n ? parseFloat(spacing)\n : this.#DEFAULT_GUTTER_SIZE_PX;\n if (this._gutterSize() === this.#DEFAULT_GUTTER_SIZE_PX) this._gutterSize.set(spacingPx);\n }\n\n applyLayoutSettings(settings: LayoutSettings) {\n if (!this.#isLayoutSettingsObject(settings)) return;\n settings.areas.forEach((a: PaneLayoutSettings, index: number) => {\n this.panes()[index].updateSettings(a);\n });\n }\n\n #isLayoutSettingsObject(v: any): boolean {\n return v && 'areas' in v;\n }\n\n ngAfterViewInit(): void {\n this.#calculateGutterSize();\n // try to load layout settings if persistence is enabled\n const lsid = this.layoutSettingsID();\n if (lsid) {\n this.applyLayoutSettings(this.#layoutService.getSettings(lsid) as LayoutSettings);\n }\n }\n}\n","@let mp = _panes().master;\n@let dp = _panes().details;\n@if (!smallScreenLayout()) {\n <as-split\n [direction]=\"direction()\"\n unit=\"percent\"\n [gutterSize]=\"_gutterSize()\"\n [gutterStep]=\"1\"\n [useTransition]=\"false\"\n (dragStart)=\"onDragStart()\"\n (dragEnd)=\"onDragEnd($event)\"\n >\n @if (gutterSize() === 1) {\n <div *asSplitGutter=\"let isDragged = isDragged\" class=\"shade-gutter\" [class.dragged]=\"isDragged\">\n <div\n class=\"shade-gutter-icon\"\n [class.vertical]=\"direction() === 'vertical'\"\n [class.horizontal]=\"direction() === 'horizontal'\"\n ></div>\n </div>\n } @else {\n <div *asSplitGutter class=\"split-gutter\">\n <div\n asSplitGutterDragHandle\n class=\"split-gutter-handle\"\n [class.vertical]=\"direction() === 'vertical'\"\n [class.horizontal]=\"direction() === 'horizontal'\"\n ></div>\n </div>\n }\n\n <!-- master pane -->\n @if (mp) {\n <as-split-area\n [yuvSplitAreaCover]=\"isDragging()\"\n [maxSize]=\"mp.areaProperties().maxSize\"\n [minSize]=\"mp.areaProperties().minSize\"\n [lockSize]=\"mp.areaProperties().lockSize\"\n [size]=\"mp.areaProperties().size\"\n [visible]=\"mp.areaProperties().visible\"\n >\n <ymt-pane #masterPane [topBarActions]=\"mp.topBarActions()\" [plain]=\"!!options().plainMode\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n <!-- details pane -->\n @if (dp) {\n <as-split-area\n [yuvSplitAreaCover]=\"isDragging()\"\n [maxSize]=\"dp.areaProperties().maxSize\"\n [minSize]=\"dp.areaProperties().minSize\"\n [lockSize]=\"dp.areaProperties().lockSize\"\n [size]=\"dp.areaProperties().size\"\n [visible]=\"dp.areaProperties().visible\"\n >\n <ymt-pane #detailsPane [topBarActions]=\"dp.topBarActions()\" [plain]=\"!!options().plainMode\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n </as-split>\n} @else {\n <ymt-pane #masterPane [topBarActions]=\"mp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n}\n\n<ng-template #tplDetailsPanel>\n <ymt-pane #detailsPane class=\"fullscreen\" [topBarActions]=\"detailsBackAction\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n</ng-template>\n\n<ng-template #detailsBackAction>\n <button align=\"start\" ymt-icon-button icon-button-size=\"small\" (click)=\"detailsActive.set(false)\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n @if (dp.topBarActions(); as dta) {\n <ng-container *ngTemplateOutlet=\"dta\"></ng-container>\n }\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { MasterDetailsLayoutComponent } from './components/master-details-layout/master-details-layout.component';\nimport { YmtLayoutPaneDirective } from './directives/layout-pane.directive';\n\nconst cmp = [MasterDetailsLayoutComponent, YmtLayoutPaneDirective]\n\n@NgModule({\n imports: cmp,\n exports: cmp\n})\nexport class YmtLayoutModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;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AA;;;AExCH,MAAM,GAAG,GAAG,CAAC,4BAA4B,EAAE,sBAAsB,CAAC;MAMrD,eAAe,CAAA;wGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YANf,4BAA4B,EAAE,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAApD,4BAA4B,EAAE,sBAAsB,CAAA,EAAA,CAAA;AAMpD,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YANf,4BAA4B,CAAA,EAAA,CAAA;;4FAM5B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, input, contentChild, inject, ElementRef, Renderer2, output, signal, computed, Directive, NgModule } from '@angular/core';
2
+ import { Component, input, contentChild, inject, ElementRef, Renderer2, output, signal, computed, Directive, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2 from '@angular/material/icon';
@@ -229,80 +229,190 @@ class YmtPaneTopBarComponent {
229
229
  */
230
230
  actions = input();
231
231
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: YmtPaneTopBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
232
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: YmtPaneTopBarComponent, isStandalone: true, selector: "ymt-pane-top-bar", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let ta = actions();\n@if (ta) {\n <div class=\"top-bar\">\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n </div>\n}\n", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host .top-bar{flex:0 0 auto;padding:var(--ymt-spacing-4xs) var(--ymt-spacing-2xs);display:flex;align-items:center}:host .top-bar .actions{display:flex;flex:1;gap:var(--ymt-spacing-xs);align-items:center;justify-content:end}:host .top-bar .actions ::ng-deep>[align=start]{margin-inline-end:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
232
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: YmtPaneTopBarComponent, isStandalone: true, selector: "ymt-pane-top-bar", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let ta = actions();\n@if (ta) {\n <div class=\"top-bar\">\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n </div>\n}\n", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host .top-bar{flex:0 0 auto;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-xs);display:flex;align-items:center}:host .top-bar .actions{display:flex;flex:1;gap:var(--ymt-spacing-xs);align-items:center;justify-content:end}:host .top-bar .actions ::ng-deep>[align=start]{margin-inline-end:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
233
233
  }
234
234
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: YmtPaneTopBarComponent, decorators: [{
235
235
  type: Component,
236
- args: [{ selector: 'ymt-pane-top-bar', imports: [CommonModule], template: "@let ta = actions();\n@if (ta) {\n <div class=\"top-bar\">\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n </div>\n}\n", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host .top-bar{flex:0 0 auto;padding:var(--ymt-spacing-4xs) var(--ymt-spacing-2xs);display:flex;align-items:center}:host .top-bar .actions{display:flex;flex:1;gap:var(--ymt-spacing-xs);align-items:center;justify-content:end}:host .top-bar .actions ::ng-deep>[align=start]{margin-inline-end:auto}\n"] }]
236
+ args: [{ selector: 'ymt-pane-top-bar', imports: [CommonModule], template: "@let ta = actions();\n@if (ta) {\n <div class=\"top-bar\">\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n </div>\n}\n", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host .top-bar{flex:0 0 auto;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-xs);display:flex;align-items:center}:host .top-bar .actions{display:flex;flex:1;gap:var(--ymt-spacing-xs);align-items:center;justify-content:end}:host .top-bar .actions ::ng-deep>[align=start]{margin-inline-end:auto}\n"] }]
237
237
  }] });
238
238
 
239
239
  /**
240
- * Pane component.
240
+ * A pane is a container component that unifies the appearance and behavior of
241
+ * content areas in an app. It renders as a bordered, rounded card with a grid
242
+ * layout for its sub-components.
241
243
  *
242
- * A pane has a header and a main area. You may choose to not show a header at all:
244
+ * ## Structure
245
+ *
246
+ * A pane uses a vertical grid layout with four areas. All sub-components are optional:
247
+ *
248
+ * | Area | Component | Description |
249
+ * |----------|--------------------|----------------------------------------------------|
250
+ * | top-bar | *(internal)* | Rendered automatically when `topBarActions` is set. |
251
+ * | header | `ymt-pane-header` | Title, subtitle, icon, and custom header actions. |
252
+ * | main | `ymt-pane-body` | Scrollable main content area. |
253
+ * | footer | `ymt-pane-footer` | Right-aligned action bar with a top border. |
243
254
  *
244
255
  * ```html
245
256
  * <ymt-pane>
246
- * Pane content goes here.
257
+ * <ymt-pane-header title="Users" subtitle="3 selected" [actions]="headerActions" />
258
+ * <ymt-pane-body>Main content</ymt-pane-body>
259
+ * <ymt-pane-footer>
260
+ * <button ymt-button>Save</button>
261
+ * </ymt-pane-footer>
247
262
  * </ymt-pane>
248
263
  * ```
249
264
  *
250
- * There are other components to be used within a pane:
251
- * - `ymt-pane-header`: Renders a pre-styled header area for the pane.
252
- * - `ymt-pane-body`: The main content area of the pane.
253
- * - `ymt-pane-footer`: A footer component to be used as footer area of the pane.
265
+ * ### `ymt-pane-header`
254
266
  *
255
- * You can change the appearance of the header area via CSS variables:
256
- * ```css
257
- * ymt-pane {
258
- * --header-area-background: var(--ymt-surface-container-low);
259
- * --header-area-border-color: var(--ymt-outline-variant);
260
- * }
261
- * ```
267
+ * Accepts `title`, `subtitle`, and `icon` as string inputs. For richer content,
268
+ * use the `#yuvPaneHeaderTitle` and `#yuvPaneHeaderSubtitle` template refs:
262
269
  *
263
- * The main area has a padding by default. You can customize or remove the padding via
264
- * CSS variables:
265
- * ```css
266
- * ymt-pane {
267
- * --main-area-padding: 0;
268
- * }
270
+ * ```html
271
+ * <ymt-pane-header>
272
+ * <ng-template #yuvPaneHeaderTitle><h2>Custom title</h2></ng-template>
273
+ * <ng-template #yuvPaneHeaderSubtitle><ymt-badge severity="warning">locked</ymt-badge></ng-template>
274
+ * </ymt-pane-header>
269
275
  * ```
270
276
  *
271
- * Add actions to a pane:
277
+ * Header actions can be projected via the `[actions]` input (TemplateRef).
278
+ *
279
+ * ### Top bar actions
280
+ *
281
+ * Pass a `TemplateRef` to the `[topBarActions]` input to render icon buttons
282
+ * in a slim top bar above the header:
283
+ *
272
284
  * ```html
273
- * <ymt-pane title="My Pane" subTitle="Pane Subtitle">
274
- * <ng-template #yuvPaneActions>
275
- * <button ymt-icon-button><mat-icon>settings</mat-icon></button>
276
- * <button ymt-icon-button><mat-icon>more</mat-icon></button>
277
- * </ng-template>
285
+ * <ymt-pane [topBarActions]="actions">
286
+ * <ymt-pane-body>Content</ymt-pane-body>
278
287
  * </ymt-pane>
288
+ *
289
+ * <ng-template #actions>
290
+ * <button ymt-icon-button icon-button-size="small"><mat-icon>settings</mat-icon></button>
291
+ * </ng-template>
279
292
  * ```
280
293
  *
281
- * Toggle fullscreen mode:
294
+ * ## Fullscreen
295
+ *
296
+ * Every pane supports fullscreen mode. The pane expands to fill the viewport,
297
+ * background content becomes inert, and pressing <kbd>Escape</kbd> exits.
298
+ *
282
299
  * ```html
283
300
  * <ymt-pane #pane>
284
301
  * <ymt-pane-body>
285
- * <button (click)="pane.toggleFullscreen()">Fullscreen</button>
302
+ * <button (click)="pane.toggleFullscreen()">Toggle fullscreen</button>
286
303
  * </ymt-pane-body>
287
304
  * </ymt-pane>
288
305
  * ```
289
306
  *
307
+ * Programmatic API: `enterFullscreen()`, `exitFullscreen()`, `toggleFullscreen()`.
308
+ * Read the current state via the `fullscreenActive` signal.
309
+ * Listen to transitions via the `(fullscreenEnter)` and `(fullscreenExit)` outputs.
310
+ *
311
+ * ## Busy state
312
+ *
313
+ * Set `[busy]="true"` to replace the static border with a rotating
314
+ * conic-gradient border that signals a loading state:
315
+ *
316
+ * ```html
317
+ * <ymt-pane [busy]="isLoading()">
318
+ * <ymt-pane-body>Content</ymt-pane-body>
319
+ * </ymt-pane>
320
+ * ```
321
+ *
322
+ * ## Enter animation
323
+ *
324
+ * Panes fade in on creation (0.15 s ease-out by default). Customize or delay
325
+ * the animation via CSS variables, or disable it entirely with the
326
+ * `[noAnimation]` input:
327
+ *
328
+ * ```css
329
+ * ymt-pane {
330
+ * --enter-animation-duration: 0.3s;
331
+ * --enter-animation-delay: 0.1s;
332
+ * }
333
+ * ```
334
+ *
335
+ * ```html
336
+ * <ymt-pane [noAnimation]="true"> ... </ymt-pane>
337
+ * ```
338
+ *
339
+ * ## Plain mode
340
+ *
341
+ * Set `[plain]="true"` to strip the border, border-radius, and background
342
+ * while keeping the inner grid structure. Useful when embedding a pane inside
343
+ * another styled container.
344
+ *
345
+ * ## CSS custom properties
346
+ *
347
+ * | Property | Default | Description |
348
+ * |-------------------------------|-------------------------------|--------------------------------------|
349
+ * | `--header-area-padding` | `var(--ymt-spacing-xl)` | Padding of the header area. |
350
+ * | `--header-area-background` | `transparent` | Background of the header area. |
351
+ * | `--header-area-border-color` | `transparent` | Bottom border of the header area. |
352
+ * | `--main-area-padding` | `0` | Padding of the body area. |
353
+ * | `--pane-background-color` | `var(--ymt-surface)` | Background of the pane. |
354
+ * | `--busy-border-width` | `2px` | Width of the busy indicator border. |
355
+ * | `--busy-border-color` | `var(--ymt-primary)` | Color of the busy indicator border. |
356
+ * | `--enter-animation-duration` | `0.15s` | Duration of the fade-in animation. |
357
+ * | `--enter-animation-delay` | `0s` | Delay before the fade-in starts. |
290
358
  */
291
359
  class YmtPaneComponent {
360
+ /**
361
+ * This static block runs once when the class is first loaded (not per instance).
362
+ * It registers a custom CSS property (--busy-angle) with the browser's CSS engine via
363
+ * CSS.registerProperty().
364
+ * Why it's needed: Normally, CSS custom properties (e.g. --busy-angle) are just
365
+ * strings — the browser can't interpolate them in animations. By registering the
366
+ * property with syntax: '<angle>', the browser knows it's an angle value and can
367
+ * smoothly animate it from 0deg to 360deg in the keyframe.
368
+ * Why it's in JS instead of CSS: The standard CSS way is @property --busy-angle { ... }
369
+ * (which was in the original SCSS). But Angular's emulated view encapsulation doesn't
370
+ * pass @property at-rules through to the document correctly, so the property never got
371
+ * registered and the animation was static. CSS.registerProperty() is the JavaScript
372
+ * equivalent and works globally regardless of Angular's style scoping.
373
+ * The try/catch: CSS.registerProperty() throws if the same property name is registered
374
+ * twice. Since this component could be bundled in multiple chunks or the module re-evaluated,
375
+ * the catch silently ignores the duplicate registration error.
376
+ */
377
+ static {
378
+ try {
379
+ CSS.registerProperty({
380
+ name: '--busy-angle',
381
+ syntax: '<angle>',
382
+ initialValue: '0deg',
383
+ inherits: false
384
+ });
385
+ }
386
+ catch {
387
+ // Already registered or unsupported
388
+ }
389
+ }
292
390
  #fullscreen = inject(FullscreenDirective);
293
391
  /**
294
- * TemplateRef for actions area in the top bar. These actions will be placed at the end of
295
- * the top bar.
392
+ * Template for action buttons rendered in the top bar area of the pane.
393
+ * Use `icon-button-size="small"` or `icon-button-size="extra-small"` on icon
394
+ * buttons for proper alignment.
296
395
  *
297
396
  * ```html
298
- * <ymt-pane title="My Pane" subTitle="Pane Subtitle" [topBarActions]="topBarActions"></ymt-pane>
299
- * <ng-template #topBarActions>
397
+ * <ymt-pane [topBarActions]="actions">
398
+ * <ymt-pane-body>Content</ymt-pane-body>
399
+ * </ymt-pane>
400
+ *
401
+ * <ng-template #actions>
300
402
  * <button ymt-icon-button icon-button-size="small"><mat-icon>settings</mat-icon></button>
301
403
  * </ng-template>
302
404
  * ```
303
- * Make sure to set the `icon-button-size="small"` for proper alignment in the top bar.
304
405
  */
305
406
  topBarActions = input();
407
+ /**
408
+ * When set to true, the pane border will be replaced with an animated
409
+ * conic-gradient border to indicate a busy/loading state.
410
+ */
411
+ busy = input(false);
412
+ /**
413
+ * Disable the default fade-in enter animation.
414
+ */
415
+ noAnimation = input(false);
306
416
  /**
307
417
  * Setting this to true will remove the default styles for the pane. So it will
308
418
  * render without border-radius, border and background color, but keep the inner
@@ -325,7 +435,7 @@ class YmtPaneComponent {
325
435
  this.#fullscreen.exit();
326
436
  }
327
437
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: YmtPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
328
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: YmtPaneComponent, isStandalone: true, selector: "ymt-pane", inputs: { topBarActions: { classPropertyName: "topBarActions", publicName: "topBarActions", isSignal: true, isRequired: false, transformFunction: null }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.plain": "plain()" } }, hostDirectives: [{ directive: FullscreenDirective, outputs: ["fullscreenEnter", "fullscreenEnter", "fullscreenExit", "fullscreenExit"] }], ngImport: i0, template: "@if (topBarActions()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\"></ymt-pane-top-bar>\n}\n<ng-content></ng-content>\n", styles: [":host{--_header-area-padding: var(--header-area-padding, var(--ymt-spacing-xl));--_header-area-background: var(--header-area-background, transparent);--_header-area-border-color: var(--header-area-border-color, transparent);--_main-area-padding: var(--main-area-padding, 0);--_pane-background-color: var(--pane-background-color, var(--ymt-surface));background-color:var(--_pane-background-color);color:var(--ymt-on-surface);display:grid;grid-template-rows:auto auto 1fr auto;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\" \"footer\";height:100%;overflow:hidden}:host.plain{--pane-background-color: transparent}:host:not(.fullscreen,.plain){border-radius:var(--ymt-corner-m);border:1px solid var(--ymt-outline-variant)}:host ymt-pane-top-bar{grid-area:top-bar}:host ::ng-deep ymt-pane-header{--header-padding: var(--_header-area-padding);--header-background: var(--_header-area-background);--header-border-color: var(--_header-area-border-color);grid-area:header}:host ::ng-deep ymt-pane-body{grid-area:main;overflow-y:auto;padding:var(--_main-area-padding)}:host ::ng-deep ymt-pane-footer{grid-area:footer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: YmtPaneTopBarComponent, selector: "ymt-pane-top-bar", inputs: ["actions"] }] });
438
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: YmtPaneComponent, isStandalone: true, selector: "ymt-pane", inputs: { topBarActions: { classPropertyName: "topBarActions", publicName: "topBarActions", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null }, noAnimation: { classPropertyName: "noAnimation", publicName: "noAnimation", isSignal: true, isRequired: false, transformFunction: null }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.plain": "plain()", "class.busy": "busy()", "class.no-animation": "noAnimation()" } }, hostDirectives: [{ directive: FullscreenDirective, outputs: ["fullscreenEnter", "fullscreenEnter", "fullscreenExit", "fullscreenExit"] }], ngImport: i0, template: "@if (topBarActions()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\"></ymt-pane-top-bar>\n}\n<ng-content></ng-content>\n", styles: [":host{--_header-area-padding: var(--header-area-padding, var(--ymt-spacing-xl));--_header-area-background: var(--header-area-background, transparent);--_header-area-border-color: var(--header-area-border-color, transparent);--_main-area-padding: var(--main-area-padding, 0);--_pane-background-color: var(--pane-background-color, var(--ymt-surface));--_busy-border-width: var(--busy-border-width, 2px);--_busy-border-color: var(--busy-border-color, var(--ymt-primary));--_enter-animation-duration: var(--enter-animation-duration, .15s);--_enter-animation-delay: var(--enter-animation-delay, 0s);position:relative;background-color:var(--_pane-background-color);color:var(--ymt-on-surface);display:grid;animation:pane-fade-in var(--_enter-animation-duration) ease-out var(--_enter-animation-delay) backwards;grid-template-rows:auto auto 1fr auto;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\" \"footer\";height:100%;overflow:hidden}:host.no-animation{animation:none}:host.plain{--pane-background-color: transparent}:host:not(.fullscreen,.plain){border-radius:var(--ymt-corner-m);border:1px solid var(--ymt-outline-variant);transition:border-color .3s ease}:host:not(.fullscreen,.plain):before{content:\"\";position:absolute;inset:0;padding:var(--_busy-border-width);border-radius:calc(var(--ymt-corner-m) - 1px);background:conic-gradient(from var(--busy-angle),var(--ymt-outline-variant),var(--_busy-border-color),var(--ymt-outline-variant));mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;opacity:0;transition:opacity .3s ease}:host:not(.fullscreen,.plain).busy{border-color:transparent}:host:not(.fullscreen,.plain).busy:before{opacity:1;animation:rotate-busy-gradient 2s linear infinite}:host ymt-pane-top-bar{grid-area:top-bar}:host ::ng-deep ymt-pane-header{--header-padding: var(--_header-area-padding);--header-background: var(--_header-area-background);--header-border-color: var(--_header-area-border-color);grid-area:header}:host ::ng-deep ymt-pane-body{grid-area:main;overflow-y:auto;padding:var(--_main-area-padding)}:host ::ng-deep ymt-pane-footer{grid-area:footer}@keyframes pane-fade-in{0%{opacity:0}to{opacity:1}}@keyframes rotate-busy-gradient{to{--busy-angle: 360deg}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: YmtPaneTopBarComponent, selector: "ymt-pane-top-bar", inputs: ["actions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
329
439
  }
330
440
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: YmtPaneComponent, decorators: [{
331
441
  type: Component,
@@ -335,8 +445,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
335
445
  outputs: ['fullscreenEnter', 'fullscreenExit']
336
446
  }
337
447
  ], host: {
338
- '[class.plain]': 'plain()'
339
- }, template: "@if (topBarActions()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\"></ymt-pane-top-bar>\n}\n<ng-content></ng-content>\n", styles: [":host{--_header-area-padding: var(--header-area-padding, var(--ymt-spacing-xl));--_header-area-background: var(--header-area-background, transparent);--_header-area-border-color: var(--header-area-border-color, transparent);--_main-area-padding: var(--main-area-padding, 0);--_pane-background-color: var(--pane-background-color, var(--ymt-surface));background-color:var(--_pane-background-color);color:var(--ymt-on-surface);display:grid;grid-template-rows:auto auto 1fr auto;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\" \"footer\";height:100%;overflow:hidden}:host.plain{--pane-background-color: transparent}:host:not(.fullscreen,.plain){border-radius:var(--ymt-corner-m);border:1px solid var(--ymt-outline-variant)}:host ymt-pane-top-bar{grid-area:top-bar}:host ::ng-deep ymt-pane-header{--header-padding: var(--_header-area-padding);--header-background: var(--_header-area-background);--header-border-color: var(--_header-area-border-color);grid-area:header}:host ::ng-deep ymt-pane-body{grid-area:main;overflow-y:auto;padding:var(--_main-area-padding)}:host ::ng-deep ymt-pane-footer{grid-area:footer}\n"] }]
448
+ '[class.plain]': 'plain()',
449
+ '[class.busy]': 'busy()',
450
+ '[class.no-animation]': 'noAnimation()'
451
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (topBarActions()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\"></ymt-pane-top-bar>\n}\n<ng-content></ng-content>\n", styles: [":host{--_header-area-padding: var(--header-area-padding, var(--ymt-spacing-xl));--_header-area-background: var(--header-area-background, transparent);--_header-area-border-color: var(--header-area-border-color, transparent);--_main-area-padding: var(--main-area-padding, 0);--_pane-background-color: var(--pane-background-color, var(--ymt-surface));--_busy-border-width: var(--busy-border-width, 2px);--_busy-border-color: var(--busy-border-color, var(--ymt-primary));--_enter-animation-duration: var(--enter-animation-duration, .15s);--_enter-animation-delay: var(--enter-animation-delay, 0s);position:relative;background-color:var(--_pane-background-color);color:var(--ymt-on-surface);display:grid;animation:pane-fade-in var(--_enter-animation-duration) ease-out var(--_enter-animation-delay) backwards;grid-template-rows:auto auto 1fr auto;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\" \"footer\";height:100%;overflow:hidden}:host.no-animation{animation:none}:host.plain{--pane-background-color: transparent}:host:not(.fullscreen,.plain){border-radius:var(--ymt-corner-m);border:1px solid var(--ymt-outline-variant);transition:border-color .3s ease}:host:not(.fullscreen,.plain):before{content:\"\";position:absolute;inset:0;padding:var(--_busy-border-width);border-radius:calc(var(--ymt-corner-m) - 1px);background:conic-gradient(from var(--busy-angle),var(--ymt-outline-variant),var(--_busy-border-color),var(--ymt-outline-variant));mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;opacity:0;transition:opacity .3s ease}:host:not(.fullscreen,.plain).busy{border-color:transparent}:host:not(.fullscreen,.plain).busy:before{opacity:1;animation:rotate-busy-gradient 2s linear infinite}:host ymt-pane-top-bar{grid-area:top-bar}:host ::ng-deep ymt-pane-header{--header-padding: var(--_header-area-padding);--header-background: var(--_header-area-background);--header-border-color: var(--_header-area-border-color);grid-area:header}:host ::ng-deep ymt-pane-body{grid-area:main;overflow-y:auto;padding:var(--_main-area-padding)}:host ::ng-deep ymt-pane-footer{grid-area:footer}@keyframes pane-fade-in{0%{opacity:0}to{opacity:1}}@keyframes rotate-busy-gradient{to{--busy-angle: 360deg}}\n"] }]
340
452
  }] });
341
453
 
342
454
  class YmtPaneFooterComponent {