@yuuvis/material 2.3.16 → 2.3.17

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.
@@ -0,0 +1,240 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, TemplateRef, input, signal, Directive, Injectable, ElementRef, contentChildren, computed, untracked, viewChild, effect, model, Component, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i2 from 'angular-split';
6
+ import { AngularSplitModule } from 'angular-split';
7
+ import * as i3 from '@yuuvis/material/panes';
8
+ import { YmtPanesModule } from '@yuuvis/material/panes';
9
+ import { MatDialog } from '@angular/material/dialog';
10
+ import { DeviceService } from '@yuuvis/material';
11
+
12
+ /**
13
+ * Directive to mark a layout pane.
14
+ */
15
+ class YmtLayoutPaneDirective {
16
+ template = inject((TemplateRef));
17
+ // Role the pane takes in the layout
18
+ role = input.required();
19
+ // template holding the actions shown in the top bar of the pane
20
+ topBarActions = input();
21
+ updateSettings(s) {
22
+ this.areaProperties.set({ ...this.areaProperties(), ...s });
23
+ }
24
+ areaProperties = signal({ visible: true });
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtLayoutPaneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
26
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.14", type: YmtLayoutPaneDirective, isStandalone: true, selector: "[ymtLayoutPane]", inputs: { role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: true, transformFunction: null }, topBarActions: { classPropertyName: "topBarActions", publicName: "topBarActions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
27
+ }
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtLayoutPaneDirective, decorators: [{
29
+ type: Directive,
30
+ args: [{
31
+ selector: '[ymtLayoutPane]'
32
+ }]
33
+ }] });
34
+
35
+ /**
36
+ * Service to store and retrieve layout settings. Those
37
+ * settings are stored on the users device because in
38
+ * general layout settings like panel widths are highly
39
+ * dependent on the current device.
40
+ */
41
+ class LayoutService {
42
+ #STORAGE_PREFIX = 'ymt.layout:';
43
+ DEFAULT_SPLIT_VIEW_GUTTER_SIZE = 16;
44
+ saveSettings(key, settings) {
45
+ if (typeof settings === 'object') {
46
+ localStorage.setItem(this.#getKey(key), JSON.stringify(settings));
47
+ return true;
48
+ }
49
+ else
50
+ return false;
51
+ }
52
+ getSettings(key) {
53
+ try {
54
+ const v = localStorage.getItem(this.#getKey(key));
55
+ return v ? JSON.parse(v) : undefined;
56
+ }
57
+ catch (e) {
58
+ console.error('Error while parsing layout settings', e);
59
+ return undefined;
60
+ }
61
+ }
62
+ #getKey(key) {
63
+ return `${this.#STORAGE_PREFIX}${key}`;
64
+ }
65
+ /**
66
+ * Clears all layout settings.
67
+ */
68
+ clearSettings() {
69
+ Object.keys(localStorage).forEach((key) => {
70
+ if (key.startsWith(this.#STORAGE_PREFIX)) {
71
+ localStorage.removeItem(key);
72
+ }
73
+ });
74
+ }
75
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
76
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutService, providedIn: 'root' });
77
+ }
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LayoutService, decorators: [{
79
+ type: Injectable,
80
+ args: [{
81
+ providedIn: 'root'
82
+ }]
83
+ }] });
84
+
85
+ class MasterDetailsLayoutComponent {
86
+ #elRef = inject(ElementRef);
87
+ #layoutService = inject(LayoutService);
88
+ #dialog = inject(MatDialog);
89
+ #device = inject(DeviceService);
90
+ #DEFAULT_GUTTER_SIZE_PX = 16;
91
+ panes = contentChildren(YmtLayoutPaneDirective);
92
+ _panes = computed(() => {
93
+ const _panes = this.panes();
94
+ const _options = this.options();
95
+ untracked(() => {
96
+ _panes.forEach((p) => p.updateSettings({
97
+ size: _options[`${p.role()}Size`],
98
+ minSize: _options[`${p.role()}MinSize`],
99
+ maxSize: _options[`${p.role()}MaxSize`]
100
+ }));
101
+ });
102
+ const res = {
103
+ master: _panes.find((p) => p.role() === 'master'),
104
+ details: _panes.find((p) => p.role() === 'details')
105
+ };
106
+ if (!res.master || !res.details)
107
+ console.error('Both master and details panes are required in MasterDetailsLayoutComponent');
108
+ return res;
109
+ });
110
+ #detailsPaneDialogRef = null;
111
+ detailsPaneTemplateRef = viewChild.required('tplDetailsPanel');
112
+ /**
113
+ * Setting ID for persisting layout settings. If not set, layout settings won't be persisted.
114
+ */
115
+ layoutSettingsID = input(undefined);
116
+ options = input({
117
+ resizable: true
118
+ });
119
+ #optionsEffect = computed(() => {
120
+ const o = this.options();
121
+ // if(o.m)
122
+ });
123
+ /**
124
+ * The split views direction. Could be 'horizontal' or 'vertical'. Defaults to 'horizontal'.
125
+ */
126
+ direction = input('horizontal');
127
+ /**
128
+ * Size of the gutter in Pixel.
129
+ */
130
+ gutterSize = input(this.#DEFAULT_GUTTER_SIZE_PX);
131
+ _gutterSize = signal(this.#DEFAULT_GUTTER_SIZE_PX);
132
+ #gutterSizeEffect = effect(() => {
133
+ this._gutterSize.set(this.gutterSize());
134
+ });
135
+ /**
136
+ * Enable/disable details pane (also use as two-way-bound variable: [(detailsActive)])
137
+ */
138
+ detailsActive = model(false);
139
+ #detailsActiveEffect = effect(() => {
140
+ const da = this.detailsActive();
141
+ untracked(() => {
142
+ if (this.#detailsPaneDialogRef)
143
+ this.#detailsPaneDialogRef.close();
144
+ if (this.smallScreenLayout() && da) {
145
+ this.#detailsPaneDialogRef = this.#dialog.open(this.detailsPaneTemplateRef(), {
146
+ width: '100vw',
147
+ height: '100vh',
148
+ maxWidth: '100vw',
149
+ panelClass: 'ymt-dialog-fullscreen'
150
+ });
151
+ this.#detailsPaneDialogRef.afterClosed().subscribe((silent) => {
152
+ if (!silent) {
153
+ this.detailsActive.set(false);
154
+ }
155
+ this.#detailsPaneDialogRef = null;
156
+ });
157
+ }
158
+ });
159
+ });
160
+ smallScreenLayout = this.#device.smallScreenLayout;
161
+ #smallScreenLayoutEffect = effect(() => {
162
+ const ssl = this.smallScreenLayout();
163
+ if (this.#detailsPaneDialogRef)
164
+ this.#detailsPaneDialogRef.close(true);
165
+ untracked(() => {
166
+ const da = this.detailsActive();
167
+ if (ssl && da)
168
+ this.detailsActive.set(false);
169
+ });
170
+ });
171
+ onDragEnd(e) {
172
+ this.#updateLayoutSettings(e.sizes);
173
+ }
174
+ #updateLayoutSettings(sizes) {
175
+ const layoutSettings = {
176
+ areas: this.panes().map((a, idx) => ({
177
+ visible: a.areaProperties().visible === false ? false : true,
178
+ size: sizes[idx]
179
+ }))
180
+ };
181
+ // save layout settings if persistence is enabled
182
+ const lsid = this.layoutSettingsID();
183
+ if (lsid) {
184
+ this.#layoutService.saveSettings(lsid, layoutSettings);
185
+ }
186
+ }
187
+ #calculateGutterSize() {
188
+ const computedStyle = getComputedStyle(this.#elRef.nativeElement);
189
+ const spacing = computedStyle.getPropertyValue('--ymt-spacing-m').trim();
190
+ const fontSize = parseFloat(computedStyle.fontSize.trim());
191
+ const spacingPx = spacing.endsWith('rem') ? parseFloat(spacing) * fontSize : spacing.endsWith('px') ? parseFloat(spacing) : this.#DEFAULT_GUTTER_SIZE_PX;
192
+ if (this._gutterSize() === this.#DEFAULT_GUTTER_SIZE_PX)
193
+ this._gutterSize.set(spacingPx);
194
+ }
195
+ applyLayoutSettings(settings) {
196
+ if (!this.#isLayoutSettingsObject(settings))
197
+ return;
198
+ settings.areas.forEach((a, index) => {
199
+ this.panes()[index].updateSettings(a);
200
+ });
201
+ }
202
+ #isLayoutSettingsObject(v) {
203
+ return v && 'areas' in v;
204
+ }
205
+ ngAfterViewInit() {
206
+ this.#calculateGutterSize();
207
+ // try to load layout settings if persistence is enabled
208
+ const lsid = this.layoutSettingsID();
209
+ if (lsid) {
210
+ this.applyLayoutSettings(this.#layoutService.getSettings(lsid));
211
+ }
212
+ }
213
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MasterDetailsLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
214
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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: "detailsPaneTemplateRef", first: true, predicate: ["tplDetailsPanel"], descendants: true, isSignal: true }], ngImport: i0, template: "@let mp = _panes().master;\n@let dp = _panes().details;\n\n@if (!smallScreenLayout()) {\n <as-split [direction]=\"direction()\" [unit]=\"'percent'\" [gutterSize]=\"_gutterSize()\" [gutterStep]=\"1\" [useTransition]=\"false\" (dragEnd)=\"onDragEnd($event)\">\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 <!-- master pane -->\n @if (mp) {\n <as-split-area\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 [topBarActions]=\"mp.topBarActions()\">\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 [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 [topBarActions]=\"dp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n </as-split>\n} @else {\n <ymt-pane [topBarActions]=\"mp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n}\n\n<ng-template #tplDetailsPanel>\n <ymt-pane class=\"fullscreen\" [topBarActions]=\"dp.topBarActions()\" [mode]=\"'navigation'\" (navigationClicked)=\"detailsActive.set(false)\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\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, currentColor);--_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)}\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", "mode", "modeAlign"], outputs: ["paneToggled", "navigationClicked"] }] });
215
+ }
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MasterDetailsLayoutComponent, decorators: [{
217
+ type: Component,
218
+ args: [{ selector: 'ymt-master-details-layout', imports: [CommonModule, AngularSplitModule, YmtPanesModule], template: "@let mp = _panes().master;\n@let dp = _panes().details;\n\n@if (!smallScreenLayout()) {\n <as-split [direction]=\"direction()\" [unit]=\"'percent'\" [gutterSize]=\"_gutterSize()\" [gutterStep]=\"1\" [useTransition]=\"false\" (dragEnd)=\"onDragEnd($event)\">\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 <!-- master pane -->\n @if (mp) {\n <as-split-area\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 [topBarActions]=\"mp.topBarActions()\">\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 [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 [topBarActions]=\"dp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n </as-split>\n} @else {\n <ymt-pane [topBarActions]=\"mp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n}\n\n<ng-template #tplDetailsPanel>\n <ymt-pane class=\"fullscreen\" [topBarActions]=\"dp.topBarActions()\" [mode]=\"'navigation'\" (navigationClicked)=\"detailsActive.set(false)\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\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, currentColor);--_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)}\n"] }]
219
+ }] });
220
+
221
+ const cmp = [MasterDetailsLayoutComponent, YmtLayoutPaneDirective];
222
+ class YmtLayoutModule {
223
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
224
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: YmtLayoutModule, imports: [MasterDetailsLayoutComponent, YmtLayoutPaneDirective], exports: [MasterDetailsLayoutComponent, YmtLayoutPaneDirective] });
225
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtLayoutModule, imports: [MasterDetailsLayoutComponent] });
226
+ }
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtLayoutModule, decorators: [{
228
+ type: NgModule,
229
+ args: [{
230
+ imports: cmp,
231
+ exports: cmp
232
+ }]
233
+ }] });
234
+
235
+ /**
236
+ * Generated bundle index. Do not edit.
237
+ */
238
+
239
+ export { MasterDetailsLayoutComponent, YmtLayoutModule, YmtLayoutPaneDirective };
240
+ //# sourceMappingURL=yuuvis-material-layout.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yuuvis-material-layout.mjs","sources":["../../../../../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, 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<any>);\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<any>>();\n\n updateSettings(s: PaneLayoutSettings) {\n this.areaProperties.set({ ...this.areaProperties(), ...s });\n }\n\n areaProperties = signal<PaneLayoutSettings>({ visible: true });\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 { Component, computed, contentChildren, effect, ElementRef, inject, input, model, signal, TemplateRef, untracked, viewChild } from '@angular/core';\nimport { AngularSplitModule, SplitAreaSize, SplitDirection } from 'angular-split';\nimport { YmtLayoutPaneDirective } from '../../directives/layout-pane.directive';\nimport { LayoutOutputData, LayoutSettings, MasterDetailsPaneLayoutOptions, PaneLayoutSettings } from '../../layout.interface';\nimport { LayoutService } from '../../services/layout.service';\nimport { YmtPanesModule } from '@yuuvis/material/panes';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { DeviceService } from '@yuuvis/material';\n\n@Component({\n selector: 'ymt-master-details-layout',\n imports: [CommonModule, AngularSplitModule, YmtPanesModule],\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\n #DEFAULT_GUTTER_SIZE_PX = 16;\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\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) 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 da = this.detailsActive();\n if (ssl && da) this.detailsActive.set(false);\n });\n });\n\n onDragEnd(e: LayoutOutputData) {\n this.#updateLayoutSettings(e.sizes);\n }\n\n #updateLayoutSettings(sizes: SplitAreaSize[]) {\n const layoutSettings: LayoutSettings = {\n areas: this.panes().map((a: YmtLayoutPaneDirective, idx: number) => ({\n visible: a.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') ? parseFloat(spacing) * fontSize : spacing.endsWith('px') ? parseFloat(spacing) : 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\n@if (!smallScreenLayout()) {\n <as-split [direction]=\"direction()\" [unit]=\"'percent'\" [gutterSize]=\"_gutterSize()\" [gutterStep]=\"1\" [useTransition]=\"false\" (dragEnd)=\"onDragEnd($event)\">\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 <!-- master pane -->\n @if (mp) {\n <as-split-area\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 [topBarActions]=\"mp.topBarActions()\">\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 [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 [topBarActions]=\"dp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\n </as-split-area>\n }\n </as-split>\n} @else {\n <ymt-pane [topBarActions]=\"mp.topBarActions()\">\n <ng-template [ngTemplateOutlet]=\"mp.template\"></ng-template>\n </ymt-pane>\n}\n\n<ng-template #tplDetailsPanel>\n <ymt-pane class=\"fullscreen\" [topBarActions]=\"dp.topBarActions()\" [mode]=\"'navigation'\" (navigationClicked)=\"detailsActive.set(false)\">\n <ng-template [ngTemplateOutlet]=\"dp.template\"></ng-template>\n </ymt-pane>\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":";;;;;;;;;;;AAGA;;AAEG;MAI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,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -1,11 +1,29 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, Component, output, signal, effect, contentChild, NgModule } from '@angular/core';
2
+ import { Component, input, output, signal, effect, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i1$1 from '@angular/material/icon';
6
6
  import { MatIconModule } from '@angular/material/icon';
7
7
  import { YmtIconButtonDirective } from '@yuuvis/material';
8
8
 
9
+ class YmtPaneAsideComponent {
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneAsideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: YmtPaneAsideComponent, isStandalone: true, selector: "ymt-pane-aside", ngImport: i0, template: "<p>pane-aside works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneAsideComponent, decorators: [{
14
+ type: Component,
15
+ args: [{ selector: 'ymt-pane-aside', imports: [CommonModule], template: "<p>pane-aside works!</p>\n" }]
16
+ }] });
17
+
18
+ class YmtPaneBodyComponent {
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: YmtPaneBodyComponent, isStandalone: true, selector: "ymt-pane-body", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
21
+ }
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneBodyComponent, decorators: [{
23
+ type: Component,
24
+ args: [{ selector: 'ymt-pane-body', imports: [CommonModule], template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"] }]
25
+ }] });
26
+
9
27
  class YmtPaneHeaderComponent {
10
28
  /**
11
29
  * Title of the pane
@@ -32,15 +50,13 @@ class YmtPaneTopBarComponent {
32
50
  * TemplateRef for actions area in the top bar.
33
51
  */
34
52
  actions = input();
35
- /**
36
- * Position of the pane toggle button (default: 'none')
37
- * Set to 'none' the pane toggle button in the top bar is hidden.
38
- */
39
- paneToggle = input('none');
53
+ modeAlign = input('start');
54
+ mode = input(undefined);
40
55
  /**
41
56
  * Event emitted when the pane toggle button is clicked.
42
57
  */
43
58
  paneToggled = output();
59
+ navigationClicked = output();
44
60
  paneCollapsed = signal(false);
45
61
  #paneCollapsedEffect = effect(() => {
46
62
  this.paneToggled.emit(this.paneCollapsed());
@@ -48,24 +64,18 @@ class YmtPaneTopBarComponent {
48
64
  togglePane() {
49
65
  this.paneCollapsed.set(!this.paneCollapsed());
50
66
  }
67
+ navClick() {
68
+ this.navigationClicked.emit(true);
69
+ }
51
70
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneTopBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
52
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: YmtPaneTopBarComponent, isStandalone: true, selector: "ymt-pane-top-bar", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, paneToggle: { classPropertyName: "paneToggle", publicName: "paneToggle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paneToggled: "paneToggled" }, host: { properties: { "class.inverse": "paneToggle() === \"end\"", "class.pane-toggle": "paneToggle() !== \"none\"" } }, ngImport: i0, template: " @let ta = actions();\n <div class=\"top-bar\">\n @if (paneToggle() != 'none') {\n <button class=\"pane-toggle\" ymt-icon-button icon-button-size=\"small\" (click)=\"togglePane()\">\n <mat-icon>{{ paneCollapsed() ? 'right_panel_open' : 'right_panel_close' }}</mat-icon>\n </button>\n }\n @if (ta) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n }\n </div>", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host.inverse .top-bar{--flow: row-reverse}:host.inverse .top-bar button.pane-toggle{rotate:180deg}:host.pane-toggle .top-bar{justify-content:space-between}:host .top-bar{--flow: row;flex:0 0 auto;flex-flow:var(--flow);padding:var(--ymt-spacing-xs) var(--ymt-spacing-s);display:flex;justify-content:end;align-items:center}:host .top-bar .actions{display:flex;flex-flow:var(--flow);gap:var(--ymt-spacing-xs);align-items:center;justify-self:end}\n"], dependencies: [{ 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: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
71
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: YmtPaneTopBarComponent, isStandalone: true, selector: "ymt-pane-top-bar", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, modeAlign: { classPropertyName: "modeAlign", publicName: "modeAlign", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paneToggled: "paneToggled", navigationClicked: "navigationClicked" }, host: { properties: { "class.inverse": "modeAlign() === \"end\"", "class.has-mode": "mode() !== undefined" } }, ngImport: i0, template: " @let ta = actions();\n <div class=\"top-bar\">\n @let m = mode();\n @if (m === 'toggle') {\n <button class=\"pane-toggle\" ymt-icon-button icon-button-size=\"small\" (click)=\"togglePane()\">\n <mat-icon>{{ paneCollapsed() ? 'right_panel_open' : 'right_panel_close' }}</mat-icon>\n </button>\n } @else if (m === 'navigation') {\n <button class=\"pane-nav\" ymt-icon-button icon-button-size=\"small\" (click)=\"navClick()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n @if (ta) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n }\n </div>", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host.inverse .top-bar{--flow: row-reverse}:host.inverse .top-bar button.pane-toggle{rotate:180deg}:host.has-mode .top-bar{justify-content:space-between}:host .top-bar{--flow: row;flex:0 0 auto;flex-flow:var(--flow);padding:var(--ymt-spacing-xs) var(--ymt-spacing-s);display:flex;justify-content:end;align-items:center}:host .top-bar .actions{display:flex;flex-flow:var(--flow);gap:var(--ymt-spacing-xs);align-items:center;justify-self:end}\n"], dependencies: [{ 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: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
53
72
  }
54
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneTopBarComponent, decorators: [{
55
74
  type: Component,
56
75
  args: [{ selector: 'ymt-pane-top-bar', imports: [YmtIconButtonDirective, MatIconModule, CommonModule], host: {
57
- '[class.inverse]': 'paneToggle() === "end"',
58
- '[class.pane-toggle]': 'paneToggle() !== "none"'
59
- }, template: " @let ta = actions();\n <div class=\"top-bar\">\n @if (paneToggle() != 'none') {\n <button class=\"pane-toggle\" ymt-icon-button icon-button-size=\"small\" (click)=\"togglePane()\">\n <mat-icon>{{ paneCollapsed() ? 'right_panel_open' : 'right_panel_close' }}</mat-icon>\n </button>\n }\n @if (ta) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n }\n </div>", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host.inverse .top-bar{--flow: row-reverse}:host.inverse .top-bar button.pane-toggle{rotate:180deg}:host.pane-toggle .top-bar{justify-content:space-between}:host .top-bar{--flow: row;flex:0 0 auto;flex-flow:var(--flow);padding:var(--ymt-spacing-xs) var(--ymt-spacing-s);display:flex;justify-content:end;align-items:center}:host .top-bar .actions{display:flex;flex-flow:var(--flow);gap:var(--ymt-spacing-xs);align-items:center;justify-self:end}\n"] }]
60
- }] });
61
-
62
- class YmtPaneAsideComponent {
63
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneAsideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
64
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: YmtPaneAsideComponent, isStandalone: true, selector: "ymt-pane-aside", ngImport: i0, template: "<p>pane-aside works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
65
- }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneAsideComponent, decorators: [{
67
- type: Component,
68
- args: [{ selector: 'ymt-pane-aside', imports: [CommonModule], template: "<p>pane-aside works!</p>\n" }]
76
+ '[class.inverse]': 'modeAlign() === "end"',
77
+ '[class.has-mode]': 'mode() !== undefined'
78
+ }, template: " @let ta = actions();\n <div class=\"top-bar\">\n @let m = mode();\n @if (m === 'toggle') {\n <button class=\"pane-toggle\" ymt-icon-button icon-button-size=\"small\" (click)=\"togglePane()\">\n <mat-icon>{{ paneCollapsed() ? 'right_panel_open' : 'right_panel_close' }}</mat-icon>\n </button>\n } @else if (m === 'navigation') {\n <button class=\"pane-nav\" ymt-icon-button icon-button-size=\"small\" (click)=\"navClick()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n @if (ta) {\n <div class=\"actions\">\n <ng-container *ngTemplateOutlet=\"ta\"></ng-container>\n </div>\n }\n </div>", styles: [":host{border-block-end:1px solid var(--ymt-outline-variant)}:host.inverse .top-bar{--flow: row-reverse}:host.inverse .top-bar button.pane-toggle{rotate:180deg}:host.has-mode .top-bar{justify-content:space-between}:host .top-bar{--flow: row;flex:0 0 auto;flex-flow:var(--flow);padding:var(--ymt-spacing-xs) var(--ymt-spacing-s);display:flex;justify-content:end;align-items:center}:host .top-bar .actions{display:flex;flex-flow:var(--flow);gap:var(--ymt-spacing-xs);align-items:center;justify-self:end}\n"] }]
69
79
  }] });
70
80
 
71
81
  /**
@@ -79,6 +89,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
79
89
  * </ymt-pane>
80
90
  * ```
81
91
  *
92
+ * There are other components to be used within a pane:
93
+ * - `ymt-pane-header`: Renders a pre-styled header area for the pane.
94
+ * - `ymt-pane-body`: The main content area of the pane.
95
+ * - `ymt-pane-footer`: A footer component to be used as footer area of the pane.
96
+ *
82
97
  * You can change the appearance of the header area via CSS variables:
83
98
  * ```css
84
99
  * ymt-pane {
@@ -107,11 +122,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
107
122
  *
108
123
  */
109
124
  class YmtPaneComponent {
110
- // paneHeader = contentChild(YmtPaneHeaderComponent);
111
- // paneBody = contentChild(YmtPaneBodyComponent);
112
- paneAside = contentChild(YmtPaneAsideComponent);
113
125
  /**
114
- * TemplateRef for actions area in the top bar.
126
+ * TemplateRef for actions area in the top bar. These actions will be placed at the end of
127
+ * the top bar.
128
+ *
115
129
  * ```html
116
130
  * <ymt-pane title="My Pane" subTitle="Pane Subtitle" [topBarActions]="topBarActions"></ymt-pane>
117
131
  * <ng-template #topBarActions>
@@ -122,46 +136,61 @@ class YmtPaneComponent {
122
136
  */
123
137
  topBarActions = input();
124
138
  /**
125
- * Whether to show the top bar (default: true)
139
+ * Setting this to true will remove the default styles for the pane. So it will
140
+ * render without border-radius, border and background color, but keep the inner
141
+ * structure. This is useful when you want to use the pane inside another container
142
+ * and want to apply custom styles to the pane.
126
143
  */
127
- topBar = input(true);
144
+ plain = input(false);
128
145
  /**
129
- * Position of the pane toggle button (default: 'none')
130
- * Set to 'none' the pane toggle button in the top bar is hidden.
146
+ * A pane may have different modes to control the behavior of the top bar.
147
+ * - `navigation`: Shows a back button on the left side of the top bar to close the pane or navigate back.
148
+ * - `toggle`: Shows a toggle button on the left side of the top bar to collapse/expand the pane.
131
149
  */
132
- paneToggle = input('none');
150
+ mode = input(undefined);
151
+ modeAlign = input('start');
133
152
  /**
134
- * Event emitted when the pane toggle button is clicked.
153
+ * Event emitted when the pane toggle button is clicked. This toggle button is shown
154
+ * when mode is set to 'toggle'.
135
155
  */
136
156
  paneToggled = output();
157
+ /**
158
+ * Event emitted when the navigation button is clicked. Navigation button is shown when
159
+ * mode is set to 'navigation'.
160
+ */
161
+ navigationClicked = output();
162
+ /**
163
+ * Collapsed state of the pane. Only relevant when mode is set to 'toggle'.
164
+ */
137
165
  collapsed = signal(false);
138
166
  togglePane(collapsed) {
139
167
  this.collapsed.set(collapsed);
140
168
  this.paneToggled.emit(collapsed);
141
169
  }
142
170
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
143
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: YmtPaneComponent, isStandalone: true, selector: "ymt-pane", inputs: { topBarActions: { classPropertyName: "topBarActions", publicName: "topBarActions", isSignal: true, isRequired: false, transformFunction: null }, topBar: { classPropertyName: "topBar", publicName: "topBar", isSignal: true, isRequired: false, transformFunction: null }, paneToggle: { classPropertyName: "paneToggle", publicName: "paneToggle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paneToggled: "paneToggled" }, host: { properties: { "class.collapsed": "collapsed()" } }, queries: [{ propertyName: "paneAside", first: true, predicate: YmtPaneAsideComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (topBar()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\" [paneToggle]=\"paneToggle()\" \n (paneToggled)=\"togglePane($event)\"></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, var(--ymt-spacing-xl));background-color:var(--ymt-surface);color:var(--ymt-on-surface);border:1px solid var(--ymt-outline-variant);display:grid;grid-template-rows:auto auto 1fr;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\";height:100%;border-radius:var(--ymt-corner-m)}:host.collapsed{overflow:hidden}:host.collapsed ::ng-deep ymt-pane-header,:host.collapsed ::ng-deep ymt-pane-body{display:none!important}:host.collapsed ::ng-deep ymt-pane-top-bar .actions{display:none!important}:host ymt-pane-top-bar{grid-area:top-bar}:host 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 ymt-pane-body{grid-area:main;overflow:hidden;padding:var(--_main-area-padding)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: YmtPaneTopBarComponent, selector: "ymt-pane-top-bar", inputs: ["actions", "paneToggle"], outputs: ["paneToggled"] }, { kind: "ngmodule", type: MatIconModule }] });
171
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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 }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, modeAlign: { classPropertyName: "modeAlign", publicName: "modeAlign", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paneToggled: "paneToggled", navigationClicked: "navigationClicked" }, host: { properties: { "class.collapsed": "collapsed()", "class.plain": "plain()" } }, ngImport: i0, template: "@let topBarVisible = mode() || topBarActions();\n@if (topBarVisible) {\n <ymt-pane-top-bar\n [actions]=\"topBarActions()\"\n [modeAlign]=\"modeAlign()\"\n [mode]=\"mode()\"\n (navigationClicked)=\"navigationClicked.emit(true)\"\n (paneToggled)=\"togglePane($event)\"\n ></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, var(--ymt-spacing-xl));--_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;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\";height:100%}:host.plain{--_pane-background-color: transparent}:host:not(.fullscreen,.plain){border-radius:var(--ymt-corner-m);border:1px solid var(--ymt-outline-variant)}:host.collapsed{overflow:hidden}:host.collapsed ::ng-deep ymt-pane-header,:host.collapsed ::ng-deep ymt-pane-body{display:none!important}:host.collapsed ::ng-deep ymt-pane-top-bar .actions{display:none!important}:host ymt-pane-top-bar{grid-area:top-bar}:host 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 ymt-pane-body{grid-area:main;overflow:hidden;padding:var(--_main-area-padding)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: YmtPaneTopBarComponent, selector: "ymt-pane-top-bar", inputs: ["actions", "modeAlign", "mode"], outputs: ["paneToggled", "navigationClicked"] }, { kind: "ngmodule", type: MatIconModule }] });
144
172
  }
145
173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneComponent, decorators: [{
146
174
  type: Component,
147
175
  args: [{ selector: 'ymt-pane', imports: [CommonModule, YmtPaneTopBarComponent, MatIconModule], host: {
148
- '[class.collapsed]': 'collapsed()'
149
- }, template: "@if (topBar()) {\n <ymt-pane-top-bar [actions]=\"topBarActions()\" [paneToggle]=\"paneToggle()\" \n (paneToggled)=\"togglePane($event)\"></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, var(--ymt-spacing-xl));background-color:var(--ymt-surface);color:var(--ymt-on-surface);border:1px solid var(--ymt-outline-variant);display:grid;grid-template-rows:auto auto 1fr;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\";height:100%;border-radius:var(--ymt-corner-m)}:host.collapsed{overflow:hidden}:host.collapsed ::ng-deep ymt-pane-header,:host.collapsed ::ng-deep ymt-pane-body{display:none!important}:host.collapsed ::ng-deep ymt-pane-top-bar .actions{display:none!important}:host ymt-pane-top-bar{grid-area:top-bar}:host 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 ymt-pane-body{grid-area:main;overflow:hidden;padding:var(--_main-area-padding)}\n"] }]
176
+ '[class.collapsed]': 'collapsed()',
177
+ '[class.plain]': 'plain()'
178
+ }, template: "@let topBarVisible = mode() || topBarActions();\n@if (topBarVisible) {\n <ymt-pane-top-bar\n [actions]=\"topBarActions()\"\n [modeAlign]=\"modeAlign()\"\n [mode]=\"mode()\"\n (navigationClicked)=\"navigationClicked.emit(true)\"\n (paneToggled)=\"togglePane($event)\"\n ></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, var(--ymt-spacing-xl));--_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;grid-template-columns:1fr;grid-template-areas:\"top-bar\" \"header\" \"main\";height:100%}:host.plain{--_pane-background-color: transparent}:host:not(.fullscreen,.plain){border-radius:var(--ymt-corner-m);border:1px solid var(--ymt-outline-variant)}:host.collapsed{overflow:hidden}:host.collapsed ::ng-deep ymt-pane-header,:host.collapsed ::ng-deep ymt-pane-body{display:none!important}:host.collapsed ::ng-deep ymt-pane-top-bar .actions{display:none!important}:host ymt-pane-top-bar{grid-area:top-bar}:host 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 ymt-pane-body{grid-area:main;overflow:hidden;padding:var(--_main-area-padding)}\n"] }]
150
179
  }] });
151
180
 
152
- class YmtPaneBodyComponent {
153
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
154
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: YmtPaneBodyComponent, isStandalone: true, selector: "ymt-pane-body", ngImport: i0, template: "!<ng-content></ng-content>!\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
181
+ class YmtPaneFooterComponent {
182
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
183
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: YmtPaneFooterComponent, isStandalone: true, selector: "ymt-pane-footer", ngImport: i0, template: "<footer><ng-content></ng-content></footer>\n", styles: [":host footer{padding:var(--ymt-spacing-m) var(--ymt-spacing-xl);border-block-start:1px solid var(--ymt-outline-variant);background-color:var(--ymt-surface-variant);display:flex;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
155
184
  }
156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneBodyComponent, decorators: [{
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPaneFooterComponent, decorators: [{
157
186
  type: Component,
158
- args: [{ selector: 'ymt-pane-body', imports: [CommonModule], template: "!<ng-content></ng-content>!\n", styles: [":host{display:block}\n"] }]
187
+ args: [{ selector: 'ymt-pane-footer', imports: [CommonModule], template: "<footer><ng-content></ng-content></footer>\n", styles: [":host footer{padding:var(--ymt-spacing-m) var(--ymt-spacing-xl);border-block-start:1px solid var(--ymt-outline-variant);background-color:var(--ymt-surface-variant);display:flex;justify-content:flex-end}\n"] }]
159
188
  }] });
160
189
 
161
- const cmp = [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneTopBarComponent, YmtPaneBodyComponent, YmtPaneAsideComponent];
190
+ const cmp = [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneBodyComponent, YmtPaneFooterComponent, YmtPaneAsideComponent];
162
191
  class YmtPanesModule {
163
192
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPanesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
164
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: YmtPanesModule, imports: [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneTopBarComponent, YmtPaneBodyComponent, YmtPaneAsideComponent], exports: [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneTopBarComponent, YmtPaneBodyComponent, YmtPaneAsideComponent] });
193
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: YmtPanesModule, imports: [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneBodyComponent, YmtPaneFooterComponent, YmtPaneAsideComponent], exports: [YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneBodyComponent, YmtPaneFooterComponent, YmtPaneAsideComponent] });
165
194
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPanesModule, imports: [cmp] });
166
195
  }
167
196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YmtPanesModule, decorators: [{
@@ -176,5 +205,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
176
205
  * Generated bundle index. Do not edit.
177
206
  */
178
207
 
179
- export { YmtPaneAsideComponent, YmtPaneBodyComponent, YmtPaneComponent, YmtPaneHeaderComponent, YmtPaneTopBarComponent, YmtPanesModule };
208
+ export { YmtPaneAsideComponent, YmtPaneBodyComponent, YmtPaneComponent, YmtPaneFooterComponent, YmtPaneHeaderComponent, YmtPanesModule };
180
209
  //# sourceMappingURL=yuuvis-material-panes.mjs.map