@hug/ngx-layout 3.1.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -5
- package/README.md +2 -3
- package/fesm2022/hug-ngx-layout.mjs +5 -3
- package/fesm2022/hug-ngx-layout.mjs.map +1 -1
- package/layout.component.d.ts +4 -4
- package/package.json +4 -4
- package/providers/index.d.ts +8 -4
- /package/{public/translations → translations}/de-CH.json +0 -0
- /package/{public/translations → translations}/en-US.json +0 -0
- /package/{public/translations → translations}/fr-CH.json +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
# 4.0.0 (2025-11-06)
|
|
2
2
|
|
|
3
3
|
### 🚀 Features
|
|
4
4
|
|
|
5
|
-
- **
|
|
5
|
+
- ⚠️ **i18n:** remove public folder + avoid providing Ngx*Intl + improve fallback logic (#NGXCPTS-35) ([b9380ef](https://github.com/DSI-HUG/ngx-components/commit/b9380ef))
|
|
6
6
|
|
|
7
7
|
### 🌱 Dependencies
|
|
8
8
|
|
|
9
|
-
- **@hug/ngx-sidenav**: upgraded to `v3.0.
|
|
10
|
-
- **@hug/ngx-core**: upgraded to `
|
|
9
|
+
- **@hug/ngx-sidenav**: upgraded to `v3.0.5`
|
|
10
|
+
- **@hug/ngx-core**: upgraded to `v4.0.0`
|
|
11
11
|
|
|
12
12
|
### ❤️ Thank You
|
|
13
13
|
|
|
14
|
-
-
|
|
14
|
+
- damien-guillermet
|
|
15
|
+
|
|
16
|
+
## 3.1.1 (2025-10-15)
|
|
17
|
+
|
|
18
|
+
### 🐛 Fixes
|
|
19
|
+
|
|
20
|
+
- **i18n:** relative imports in layout and status (#NGXCPTS-25) ([f59e391](https://github.com/DSI-HUG/ngx-components/commit/f59e391))
|
|
21
|
+
|
|
22
|
+
### ❤️ Thank You
|
|
23
|
+
|
|
24
|
+
- damien-guillermet
|
|
15
25
|
|
|
16
26
|
## 3.0.3 (2025-06-04)
|
|
17
27
|
|
package/README.md
CHANGED
|
@@ -18,9 +18,9 @@ First of all you have to import the asset translation files like:
|
|
|
18
18
|
"assets": [
|
|
19
19
|
...
|
|
20
20
|
{
|
|
21
|
-
"input": "node_modules/@hug/ngx-layout/
|
|
21
|
+
"input": "node_modules/@hug/ngx-layout/translations",
|
|
22
22
|
"glob": "**/*",
|
|
23
|
-
"output": "
|
|
23
|
+
"output": "translations/ngx-layout"
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
26
|
}
|
|
@@ -35,7 +35,6 @@ import { NgxLayoutIntl, provideNgxLayout } from '@hug/ngx-layout';
|
|
|
35
35
|
|
|
36
36
|
export const appConfig: ApplicationConfig = {
|
|
37
37
|
providers: [
|
|
38
|
-
NgxLayoutIntl,
|
|
39
38
|
provideNgxLayout()
|
|
40
39
|
]
|
|
41
40
|
};
|
|
@@ -25,10 +25,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
|
25
25
|
}] });
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
29
|
-
* @param
|
|
28
|
+
* Provide the component to the application level.
|
|
29
|
+
* @param options - The component's providing options.
|
|
30
|
+
* @param options.translationsPath - The path to the translations files (default: `translations/ngx-layout`).
|
|
31
|
+
* @param options.customIntl - A custom internationalization class to inject.
|
|
30
32
|
*/
|
|
31
|
-
const provideNgxLayout = (
|
|
33
|
+
const provideNgxLayout = (options) => provideNgxIntl(NgxLayoutIntl, options?.translationsPath ?? 'translations/ngx-layout', options?.customIntl ?? NgxLayoutIntl);
|
|
32
34
|
|
|
33
35
|
class NgxLayoutComponent {
|
|
34
36
|
toolbarColor = 'primary';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hug-ngx-layout.mjs","sources":["../../../projects/layout/src/providers/ngx-layout-intl.ts","../../../projects/layout/src/providers/index.ts","../../../projects/layout/src/layout.component.ts","../../../projects/layout/src/layout.component.html","../../../projects/layout/src/hug-ngx-layout.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { NgxAbstractIntl } from '@hug/ngx-core';\n\n/**\n * Data for internationalization\n */\n@Injectable()\nexport class NgxLayoutIntl extends NgxAbstractIntl<NgxLayoutIntl> {\n\n public closeLabel = '';\n public backLabel = '';\n public sideFilterLabel = '';\n}\n","import { EnvironmentProviders } from '@angular/core';\nimport { provideNgxIntl } from '@hug/ngx-core';\n\nimport { NgxLayoutIntl } from './ngx-layout-intl';\n\nexport * from './ngx-layout-intl';\n\n/**\n * The application initializer provider.\n * @param filesPath the path to translations asset files (default: `public/translations/ngx-layout`).\n */\nexport const provideNgxLayout = (filesPath = 'public/translations/ngx-layout'): EnvironmentProviders => provideNgxIntl(filesPath, NgxLayoutIntl);\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, inject, Input, Output, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatDrawer, MatDrawerContainer, MatDrawerContent } from '@angular/material/sidenav';\nimport { MatToolbar } from '@angular/material/toolbar';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { NgxMediaService } from '@hug/ngx-core';\nimport { NgxSidenavService } from '@hug/ngx-sidenav';\n\nimport { NgxLayoutIntl } from './providers';\n\n@Component({\n selector: 'ngx-layout',\n templateUrl: './layout.component.html',\n styleUrls: ['./layout.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n AsyncPipe,\n MatIconButton,\n MatIcon,\n MatDrawer,\n MatDrawerContainer,\n MatDrawerContent,\n MatToolbar,\n MatTooltip\n ]\n})\nexport class NgxLayoutComponent {\n @Input() public toolbarColor = 'primary';\n @Input() public editorToolbarId = 'editor-toolbar';\n\n @Input() public layoutToolbarExternal?: TemplateRef<unknown>;\n @Input() public layoutPrimaryActionExternal?: TemplateRef<unknown>;\n @Input() public layoutActionsExternal?: TemplateRef<unknown>;\n @Input() public layoutInfoBoxesExternal?: TemplateRef<unknown>;\n @Input() public layoutRightExternal?: TemplateRef<unknown>;\n\n @Output() public readonly closeButtonClicked = new EventEmitter<MouseEvent>();\n @Output() public readonly backButtonClicked = new EventEmitter<MouseEvent>();\n @Output() public readonly sideFilterClosed = new EventEmitter<void>();\n @Output() public readonly sideFilterOpened = new EventEmitter<void>();\n\n @ContentChild('layoutToolbar') protected layoutToolbarContent?: TemplateRef<unknown>;\n @ContentChild('layoutPrimaryAction') protected layoutPrimaryActionContent?: TemplateRef<unknown>;\n @ContentChild('layoutActions') protected layoutActionsContent?: TemplateRef<unknown>;\n @ContentChild('layoutInfoBoxes') protected layoutInfoBoxesContent?: TemplateRef<unknown>;\n @ContentChild('layoutRight') protected layoutRightContent?: TemplateRef<unknown>;\n\n @ViewChild('sideFilter') protected sideFilter?: MatDrawer;\n\n protected intl = inject(NgxLayoutIntl);\n\n protected mediaService = inject(NgxMediaService);\n protected sidenavService = inject(NgxSidenavService);\n protected elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n public get layoutToolbar(): TemplateRef<unknown> | undefined {\n return this.layoutToolbarExternal ?? this.layoutToolbarContent;\n }\n\n public get layoutPrimaryAction(): TemplateRef<unknown> | undefined {\n return this.layoutPrimaryActionExternal ?? this.layoutPrimaryActionContent;\n }\n\n public get layoutActions(): TemplateRef<unknown> | undefined {\n return this.layoutActionsExternal ?? this.layoutActionsContent;\n }\n\n public get layoutInfoBoxes(): TemplateRef<unknown> | undefined {\n return this.layoutInfoBoxesExternal ?? this.layoutInfoBoxesContent;\n }\n\n public get layoutRight(): TemplateRef<unknown> | undefined {\n const value = this.layoutRightExternal ?? this.layoutRightContent;\n if (!value) {\n this.elementRef.nativeElement.setAttribute('no-right', 'true');\n } else {\n this.elementRef.nativeElement.removeAttribute('no-right');\n }\n return value;\n }\n\n private _withSidenav = false;\n\n @Input()\n public set withSidenav(value: BooleanInput) {\n this._withSidenav = coerceBooleanProperty(value);\n }\n\n public get withSidenav(): BooleanInput {\n return this._withSidenav;\n }\n\n private _keepFilterButtonDisplayed = true;\n\n @Input()\n public set keepFilterButtonDisplayed(value: BooleanInput) {\n this._keepFilterButtonDisplayed = coerceBooleanProperty(value);\n }\n\n public get keepFilterButtonDisplayed(): BooleanInput {\n return this._keepFilterButtonDisplayed;\n }\n\n private _withCloseButton = false;\n\n @Input()\n public set withCloseButton(value: BooleanInput) {\n this._withCloseButton = coerceBooleanProperty(value);\n }\n\n public get withCloseButton(): BooleanInput {\n return this._withCloseButton;\n }\n\n private _withBackButton = false;\n\n @Input()\n public set withBackButton(value: BooleanInput) {\n this._withBackButton = coerceBooleanProperty(value);\n }\n\n public get withBackButton(): BooleanInput {\n return this._withBackButton;\n }\n\n public closeSideFilter(): void {\n void this.sideFilter?.close();\n }\n\n public openSideFilter(): void {\n void this.sideFilter?.open();\n }\n}\n","<ng-container *ngTemplateOutlet=\"filter\"></ng-container>\n\n<ng-template #content>\n <div class=\"main-content\">\n @if (\n layoutPrimaryAction && !((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false)\n ) {\n <span class=\"primary-action-container\" [class.bottom]=\"mediaService.isHandset$ | async\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n <ng-content></ng-content>\n </div>\n @if ((mediaService.isHandset$ | async) && actionsToolbar) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n</ng-template>\n\n<ng-template #actionsToolbar>\n <mat-toolbar\n id=\"actions-toolbar\"\n class=\"actions\"\n [color]=\"toolbarColor\"\n [class.bottom]=\"mediaService.isHandset$ | async\">\n @if (layoutPrimaryAction && (layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <span class=\"primary-action-container\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n @if (layoutActions) {\n <ng-template [ngTemplateOutlet]=\"layoutActions\"></ng-template>\n }\n @if (layoutInfoBoxes && (mediaService.isHandset$ | async) === false) {\n <div class=\"info-boxes-container\">\n <ng-template [ngTemplateOutlet]=\"layoutInfoBoxes\"></ng-template>\n </div>\n }\n </mat-toolbar>\n</ng-template>\n\n<ng-template #filter>\n @if (layoutToolbar || layoutRight) {\n <mat-toolbar id=\"toolbar\" [color]=\"toolbarColor\">\n @if (withSidenav && (mediaService.isHandset$ | async) && (sidenavService.openChanged$ | async) === false) {\n <button type=\"button\" id=\"sidenav-button\" mat-icon-button (click)=\"sidenavService.toggle()\">\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (withBackButton) {\n <button\n type=\"button\"\n id=\"back-button\"\n mat-icon-button\n (click)=\"this.backButtonClicked.emit($event)\"\n [matTooltip]=\"intl.backLabel\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n <div id=\"toolbar-content-container\">\n @if (layoutToolbar) {\n <ng-template [ngTemplateOutlet]=\"layoutToolbar\"></ng-template>\n }\n </div>\n @if (sideFilter && (keepFilterButtonDisplayed || (mediaService.isHandset$ | async)) && layoutRight) {\n <button\n type=\"button\"\n id=\"filter-button\"\n mat-icon-button\n (click)=\"sideFilter.toggle()\"\n [matTooltip]=\"intl.sideFilterLabel\">\n <mat-icon>tune</mat-icon>\n </button>\n }\n @if (withCloseButton) {\n <button\n type=\"button\"\n id=\"close-button\"\n mat-icon-button\n (click)=\"this.closeButtonClicked.emit($event)\"\n [matTooltip]=\"intl.closeLabel\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-toolbar>\n }\n\n @if ((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n @if (layoutRight) {\n <mat-drawer-container autosize=\"true\">\n <mat-drawer-content>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </mat-drawer-content>\n <mat-drawer\n id=\"side-filter\"\n #sideFilter\n (closed)=\"sideFilterClosed.emit()\"\n (openedChange)=\"sideFilterOpened.emit()\"\n class=\"right\"\n position=\"end\"\n [attr.role]=\"(mediaService.isHandset$ | async) ? 'dialog' : 'navigation'\"\n [mode]=\"(mediaService.isHandset$ | async) ? 'over' : 'side'\"\n [opened]=\"(mediaService.isHandset$ | async) === false\">\n <ng-template [ngTemplateOutlet]=\"layoutRight\"></ng-template>\n </mat-drawer>\n </mat-drawer-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGA;;AAEG;AAEG,MAAO,aAAc,SAAQ,eAA8B,CAAA;IAEtD,UAAU,GAAG,EAAE;IACf,SAAS,GAAG,EAAE;IACd,eAAe,GAAG,EAAE;uGAJlB,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAb,aAAa,EAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB;;;ACCD;;;AAGG;AACU,MAAA,gBAAgB,GAAG,CAAC,SAAS,GAAG,gCAAgC,KAA2B,cAAc,CAAC,SAAS,EAAE,aAAa;;MCoBlI,kBAAkB,CAAA;IACX,YAAY,GAAG,SAAS;IACxB,eAAe,GAAG,gBAAgB;AAElC,IAAA,qBAAqB;AACrB,IAAA,2BAA2B;AAC3B,IAAA,qBAAqB;AACrB,IAAA,uBAAuB;AACvB,IAAA,mBAAmB;AAET,IAAA,kBAAkB,GAAG,IAAI,YAAY,EAAc;AACnD,IAAA,iBAAiB,GAAG,IAAI,YAAY,EAAc;AAClD,IAAA,gBAAgB,GAAG,IAAI,YAAY,EAAQ;AAC3C,IAAA,gBAAgB,GAAG,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gB;wBAChB,UAAU;wBACV;AACH,qBAAA,EAAA,QAAA,EAAA,onJAAA,EAAA,MAAA,EAAA,CAAA,wtIAAA,CAAA,EAAA;8BAGe,YAAY,EAAA,CAAA;sBAA3B;gBACe,eAAe,EAAA,CAAA;sBAA9B;gBAEe,qBAAqB,EAAA,CAAA;sBAApC;gBACe,2BAA2B,EAAA,CAAA;sBAA1C;gBACe,qBAAqB,EAAA,CAAA;sBAApC;gBACe,uBAAuB,EAAA,CAAA;sBAAtC;gBACe,mBAAmB,EAAA,CAAA;sBAAlC;gBAEyB,kBAAkB,EAAA,CAAA;sBAA3C;gBACyB,iBAAiB,EAAA,CAAA;sBAA1C;gBACyB,gBAAgB,EAAA,CAAA;sBAAzC;gBACyB,gBAAgB,EAAA,CAAA;sBAAzC;gBAEwC,oBAAoB,EAAA,CAAA;sBAA5D,YAAY;uBAAC,eAAe;gBACkB,0BAA0B,EAAA,CAAA;sBAAxE,YAAY;uBAAC,qBAAqB;gBACM,oBAAoB,EAAA,CAAA;sBAA5D,YAAY;uBAAC,eAAe;gBACc,sBAAsB,EAAA,CAAA;sBAAhE,YAAY;uBAAC,iBAAiB;gBACQ,kBAAkB,EAAA,CAAA;sBAAxD,YAAY;uBAAC,aAAa;gBAEQ,UAAU,EAAA,CAAA;sBAA5C,SAAS;uBAAC,YAAY;gBAqCZ,WAAW,EAAA,CAAA;sBADrB;gBAYU,yBAAyB,EAAA,CAAA;sBADnC;gBAYU,eAAe,EAAA,CAAA;sBADzB;gBAYU,cAAc,EAAA,CAAA;sBADxB;;;AEzHL;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"hug-ngx-layout.mjs","sources":["../../../projects/layout/src/providers/ngx-layout-intl.ts","../../../projects/layout/src/providers/index.ts","../../../projects/layout/src/layout.component.ts","../../../projects/layout/src/layout.component.html","../../../projects/layout/src/hug-ngx-layout.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { NgxAbstractIntl } from '@hug/ngx-core';\n\n/**\n * Data for internationalization\n */\n@Injectable()\nexport class NgxLayoutIntl extends NgxAbstractIntl<NgxLayoutIntl> {\n\n public closeLabel = '';\n public backLabel = '';\n public sideFilterLabel = '';\n}\n","import type { EnvironmentProviders } from '@angular/core';\nimport { type NgxOptionsIntl, provideNgxIntl } from '@hug/ngx-core';\n\nimport { NgxLayoutIntl } from './ngx-layout-intl';\n\nexport * from './ngx-layout-intl';\n\n/**\n * Provide the component to the application level.\n * @param options - The component's providing options.\n * @param options.translationsPath - The path to the translations files (default: `translations/ngx-layout`).\n * @param options.customIntl - A custom internationalization class to inject.\n */\nexport const provideNgxLayout = (options?: NgxOptionsIntl<NgxLayoutIntl>): EnvironmentProviders =>\n provideNgxIntl(\n NgxLayoutIntl,\n options?.translationsPath ?? 'translations/ngx-layout',\n options?.customIntl ?? NgxLayoutIntl\n );\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, inject, Input, Output, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatDrawer, MatDrawerContainer, MatDrawerContent } from '@angular/material/sidenav';\nimport { MatToolbar } from '@angular/material/toolbar';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { NgxMediaService } from '@hug/ngx-core';\nimport { NgxSidenavService } from '@hug/ngx-sidenav';\n\nimport { NgxLayoutIntl } from './providers';\n\n@Component({\n selector: 'ngx-layout',\n templateUrl: './layout.component.html',\n styleUrls: ['./layout.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgTemplateOutlet,\n AsyncPipe,\n MatIconButton,\n MatIcon,\n MatDrawer,\n MatDrawerContainer,\n MatDrawerContent,\n MatToolbar,\n MatTooltip\n ]\n})\nexport class NgxLayoutComponent {\n @Input() public toolbarColor = 'primary';\n @Input() public editorToolbarId = 'editor-toolbar';\n\n @Input() public layoutToolbarExternal?: TemplateRef<unknown>;\n @Input() public layoutPrimaryActionExternal?: TemplateRef<unknown>;\n @Input() public layoutActionsExternal?: TemplateRef<unknown>;\n @Input() public layoutInfoBoxesExternal?: TemplateRef<unknown>;\n @Input() public layoutRightExternal?: TemplateRef<unknown>;\n\n @Output() public readonly closeButtonClicked = new EventEmitter<MouseEvent>();\n @Output() public readonly backButtonClicked = new EventEmitter<MouseEvent>();\n @Output() public readonly sideFilterClosed = new EventEmitter<void>();\n @Output() public readonly sideFilterOpened = new EventEmitter<void>();\n\n @ContentChild('layoutToolbar') protected layoutToolbarContent?: TemplateRef<unknown>;\n @ContentChild('layoutPrimaryAction') protected layoutPrimaryActionContent?: TemplateRef<unknown>;\n @ContentChild('layoutActions') protected layoutActionsContent?: TemplateRef<unknown>;\n @ContentChild('layoutInfoBoxes') protected layoutInfoBoxesContent?: TemplateRef<unknown>;\n @ContentChild('layoutRight') protected layoutRightContent?: TemplateRef<unknown>;\n\n @ViewChild('sideFilter') protected sideFilter?: MatDrawer;\n\n protected readonly intl = inject(NgxLayoutIntl);\n protected readonly mediaService = inject(NgxMediaService);\n protected readonly sidenavService = inject(NgxSidenavService);\n protected readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n public get layoutToolbar(): TemplateRef<unknown> | undefined {\n return this.layoutToolbarExternal ?? this.layoutToolbarContent;\n }\n\n public get layoutPrimaryAction(): TemplateRef<unknown> | undefined {\n return this.layoutPrimaryActionExternal ?? this.layoutPrimaryActionContent;\n }\n\n public get layoutActions(): TemplateRef<unknown> | undefined {\n return this.layoutActionsExternal ?? this.layoutActionsContent;\n }\n\n public get layoutInfoBoxes(): TemplateRef<unknown> | undefined {\n return this.layoutInfoBoxesExternal ?? this.layoutInfoBoxesContent;\n }\n\n public get layoutRight(): TemplateRef<unknown> | undefined {\n const value = this.layoutRightExternal ?? this.layoutRightContent;\n if (!value) {\n this.elementRef.nativeElement.setAttribute('no-right', 'true');\n } else {\n this.elementRef.nativeElement.removeAttribute('no-right');\n }\n return value;\n }\n\n private _withSidenav = false;\n\n @Input()\n public set withSidenav(value: BooleanInput) {\n this._withSidenav = coerceBooleanProperty(value);\n }\n\n public get withSidenav(): BooleanInput {\n return this._withSidenav;\n }\n\n private _keepFilterButtonDisplayed = true;\n\n @Input()\n public set keepFilterButtonDisplayed(value: BooleanInput) {\n this._keepFilterButtonDisplayed = coerceBooleanProperty(value);\n }\n\n public get keepFilterButtonDisplayed(): BooleanInput {\n return this._keepFilterButtonDisplayed;\n }\n\n private _withCloseButton = false;\n\n @Input()\n public set withCloseButton(value: BooleanInput) {\n this._withCloseButton = coerceBooleanProperty(value);\n }\n\n public get withCloseButton(): BooleanInput {\n return this._withCloseButton;\n }\n\n private _withBackButton = false;\n\n @Input()\n public set withBackButton(value: BooleanInput) {\n this._withBackButton = coerceBooleanProperty(value);\n }\n\n public get withBackButton(): BooleanInput {\n return this._withBackButton;\n }\n\n public closeSideFilter(): void {\n void this.sideFilter?.close();\n }\n\n public openSideFilter(): void {\n void this.sideFilter?.open();\n }\n}\n","<ng-container *ngTemplateOutlet=\"filter\"></ng-container>\n\n<ng-template #content>\n <div class=\"main-content\">\n @if (\n layoutPrimaryAction && !((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false)\n ) {\n <span class=\"primary-action-container\" [class.bottom]=\"mediaService.isHandset$ | async\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n <ng-content></ng-content>\n </div>\n @if ((mediaService.isHandset$ | async) && actionsToolbar) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n</ng-template>\n\n<ng-template #actionsToolbar>\n <mat-toolbar\n id=\"actions-toolbar\"\n class=\"actions\"\n [color]=\"toolbarColor\"\n [class.bottom]=\"mediaService.isHandset$ | async\">\n @if (layoutPrimaryAction && (layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <span class=\"primary-action-container\">\n <ng-template [ngTemplateOutlet]=\"layoutPrimaryAction\"></ng-template>\n </span>\n }\n @if (layoutActions) {\n <ng-template [ngTemplateOutlet]=\"layoutActions\"></ng-template>\n }\n @if (layoutInfoBoxes && (mediaService.isHandset$ | async) === false) {\n <div class=\"info-boxes-container\">\n <ng-template [ngTemplateOutlet]=\"layoutInfoBoxes\"></ng-template>\n </div>\n }\n </mat-toolbar>\n</ng-template>\n\n<ng-template #filter>\n @if (layoutToolbar || layoutRight) {\n <mat-toolbar id=\"toolbar\" [color]=\"toolbarColor\">\n @if (withSidenav && (mediaService.isHandset$ | async) && (sidenavService.openChanged$ | async) === false) {\n <button type=\"button\" id=\"sidenav-button\" mat-icon-button (click)=\"sidenavService.toggle()\">\n <mat-icon>menu</mat-icon>\n </button>\n }\n @if (withBackButton) {\n <button\n type=\"button\"\n id=\"back-button\"\n mat-icon-button\n (click)=\"this.backButtonClicked.emit($event)\"\n [matTooltip]=\"intl.backLabel\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n <div id=\"toolbar-content-container\">\n @if (layoutToolbar) {\n <ng-template [ngTemplateOutlet]=\"layoutToolbar\"></ng-template>\n }\n </div>\n @if (sideFilter && (keepFilterButtonDisplayed || (mediaService.isHandset$ | async)) && layoutRight) {\n <button\n type=\"button\"\n id=\"filter-button\"\n mat-icon-button\n (click)=\"sideFilter.toggle()\"\n [matTooltip]=\"intl.sideFilterLabel\">\n <mat-icon>tune</mat-icon>\n </button>\n }\n @if (withCloseButton) {\n <button\n type=\"button\"\n id=\"close-button\"\n mat-icon-button\n (click)=\"this.closeButtonClicked.emit($event)\"\n [matTooltip]=\"intl.closeLabel\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-toolbar>\n }\n\n @if ((layoutActions || layoutInfoBoxes) && (mediaService.isHandset$ | async) === false) {\n <ng-container *ngTemplateOutlet=\"actionsToolbar\"></ng-container>\n }\n @if (layoutRight) {\n <mat-drawer-container autosize=\"true\">\n <mat-drawer-content>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </mat-drawer-content>\n <mat-drawer\n id=\"side-filter\"\n #sideFilter\n (closed)=\"sideFilterClosed.emit()\"\n (openedChange)=\"sideFilterOpened.emit()\"\n class=\"right\"\n position=\"end\"\n [attr.role]=\"(mediaService.isHandset$ | async) ? 'dialog' : 'navigation'\"\n [mode]=\"(mediaService.isHandset$ | async) ? 'over' : 'side'\"\n [opened]=\"(mediaService.isHandset$ | async) === false\">\n <ng-template [ngTemplateOutlet]=\"layoutRight\"></ng-template>\n </mat-drawer>\n </mat-drawer-container>\n } @else {\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGA;;AAEG;AAEG,MAAO,aAAc,SAAQ,eAA8B,CAAA;IAEtD,UAAU,GAAG,EAAE;IACf,SAAS,GAAG,EAAE;IACd,eAAe,GAAG,EAAE;uGAJlB,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAb,aAAa,EAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB;;;ACCD;;;;;AAKG;AACU,MAAA,gBAAgB,GAAG,CAAC,OAAuC,KACpE,cAAc,CACV,aAAa,EACb,OAAO,EAAE,gBAAgB,IAAI,yBAAyB,EACtD,OAAO,EAAE,UAAU,IAAI,aAAa;;MCc/B,kBAAkB,CAAA;IACX,YAAY,GAAG,SAAS;IACxB,eAAe,GAAG,gBAAgB;AAElC,IAAA,qBAAqB;AACrB,IAAA,2BAA2B;AAC3B,IAAA,qBAAqB;AACrB,IAAA,uBAAuB;AACvB,IAAA,mBAAmB;AAET,IAAA,kBAAkB,GAAG,IAAI,YAAY,EAAc;AACnD,IAAA,iBAAiB,GAAG,IAAI,YAA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BAAgB;wBAChB,SAAS;wBACT,aAAa;wBACb,OAAO;wBACP,SAAS;wBACT,kBAAkB;wBAClB,gBAAgB;wBAChB,UAAU;wBACV;AACH,qBAAA,EAAA,QAAA,EAAA,onJAAA,EAAA,MAAA,EAAA,CAAA,wtIAAA,CAAA,EAAA;8BAGe,YAAY,EAAA,CAAA;sBAA3B;gBACe,eAAe,EAAA,CAAA;sBAA9B;gBAEe,qBAAqB,EAAA,CAAA;sBAApC;gBACe,2BAA2B,EAAA,CAAA;sBAA1C;gBACe,qBAAqB,EAAA,CAAA;sBAApC;gBACe,uBAAuB,EAAA,CAAA;sBAAtC;gBACe,mBAAmB,EAAA,CAAA;sBAAlC;gBAEyB,kBAAkB,EAAA,CAAA;sBAA3C;gBACyB,iBAAiB,EAAA,CAAA;sBAA1C;gBACyB,gBAAgB,EAAA,CAAA;sBAAzC;gBACyB,gBAAgB,EAAA,CAAA;sBAAzC;gBAEwC,oBAAoB,EAAA,CAAA;sBAA5D,YAAY;uBAAC,eAAe;gBACkB,0BAA0B,EAAA,CAAA;sBAAxE,YAAY;uBAAC,qBAAqB;gBACM,oBAAoB,EAAA,CAAA;sBAA5D,YAAY;uBAAC,eAAe;gBACc,sBAAsB,EAAA,CAAA;sBAAhE,YAAY;uBAAC,iBAAiB;gBACQ,kBAAkB,EAAA,CAAA;sBAAxD,YAAY;uBAAC,aAAa;gBAEQ,UAAU,EAAA,CAAA;sBAA5C,SAAS;uBAAC,YAAY;gBAoCZ,WAAW,EAAA,CAAA;sBADrB;gBAYU,yBAAyB,EAAA,CAAA;sBADnC;gBAYU,eAAe,EAAA,CAAA;sBADzB;gBAYU,cAAc,EAAA,CAAA;sBADxB;;;AExHL;;AAEG;;;;"}
|
package/layout.component.d.ts
CHANGED
|
@@ -23,10 +23,10 @@ export declare class NgxLayoutComponent {
|
|
|
23
23
|
protected layoutInfoBoxesContent?: TemplateRef<unknown>;
|
|
24
24
|
protected layoutRightContent?: TemplateRef<unknown>;
|
|
25
25
|
protected sideFilter?: MatDrawer;
|
|
26
|
-
protected intl: NgxLayoutIntl;
|
|
27
|
-
protected mediaService: NgxMediaService;
|
|
28
|
-
protected sidenavService: NgxSidenavService;
|
|
29
|
-
protected elementRef: ElementRef<HTMLElement>;
|
|
26
|
+
protected readonly intl: NgxLayoutIntl;
|
|
27
|
+
protected readonly mediaService: NgxMediaService;
|
|
28
|
+
protected readonly sidenavService: NgxSidenavService;
|
|
29
|
+
protected readonly elementRef: ElementRef<HTMLElement>;
|
|
30
30
|
get layoutToolbar(): TemplateRef<unknown> | undefined;
|
|
31
31
|
get layoutPrimaryAction(): TemplateRef<unknown> | undefined;
|
|
32
32
|
get layoutActions(): TemplateRef<unknown> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hug/ngx-layout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "HUG Angular - layout component",
|
|
5
5
|
"homepage": "https://github.com/dsi-hug/ngx-components",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"types": "./index.d.ts",
|
|
27
27
|
"default": "./fesm2022/hug-ngx-layout.mjs"
|
|
28
28
|
},
|
|
29
|
-
"./
|
|
29
|
+
"./translations/*": {
|
|
30
30
|
"default": "./**/*.json"
|
|
31
31
|
},
|
|
32
32
|
"./package.json": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@angular/core": ">=19 <20",
|
|
39
39
|
"@angular/cdk": ">=19 <20",
|
|
40
40
|
"@angular/material": ">=19 <20",
|
|
41
|
-
"@hug/ngx-core": "^
|
|
42
|
-
"@hug/ngx-sidenav": "^3.0.
|
|
41
|
+
"@hug/ngx-core": "^4.0.0",
|
|
42
|
+
"@hug/ngx-sidenav": "^3.0.5"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"tslib": "^2.7.0"
|
package/providers/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { EnvironmentProviders } from '@angular/core';
|
|
1
|
+
import type { EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { type NgxOptionsIntl } from '@hug/ngx-core';
|
|
3
|
+
import { NgxLayoutIntl } from './ngx-layout-intl';
|
|
2
4
|
export * from './ngx-layout-intl';
|
|
3
5
|
/**
|
|
4
|
-
*
|
|
5
|
-
* @param
|
|
6
|
+
* Provide the component to the application level.
|
|
7
|
+
* @param options - The component's providing options.
|
|
8
|
+
* @param options.translationsPath - The path to the translations files (default: `translations/ngx-layout`).
|
|
9
|
+
* @param options.customIntl - A custom internationalization class to inject.
|
|
6
10
|
*/
|
|
7
|
-
export declare const provideNgxLayout: (
|
|
11
|
+
export declare const provideNgxLayout: (options?: NgxOptionsIntl<NgxLayoutIntl>) => EnvironmentProviders;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|