@delon/theme 19.1.0 → 20.0.0-beta.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/compact.css +994 -245
- package/compact.min.css +1 -1
- package/dark.css +991 -242
- package/dark.min.css +1 -1
- package/default.css +994 -245
- package/default.min.css +1 -1
- package/fesm2022/layout-default.mjs +52 -66
- package/fesm2022/layout-default.mjs.map +1 -1
- package/fesm2022/setting-drawer.mjs +14 -22
- package/fesm2022/setting-drawer.mjs.map +1 -1
- package/fesm2022/theme-btn.mjs +10 -19
- package/fesm2022/theme-btn.mjs.map +1 -1
- package/fesm2022/theme.mjs +112 -94
- package/fesm2022/theme.mjs.map +1 -1
- package/index.d.ts +1689 -3
- package/layout-blank/index.d.ts +2 -5
- package/layout-default/index.d.ts +245 -5
- package/layout-default/style/_header.less +3 -3
- package/layout-default/style/_layout.less +1 -1
- package/layout-default/style/fix/_sidebar-nav.less +21 -6
- package/layout-default/style/theme-dark.less +1 -0
- package/layout-default/style/theme-default.less +1 -0
- package/layout-default/style/widgets/_app-icons.less +2 -2
- package/package.json +6 -6
- package/setting-drawer/index.d.ts +65 -5
- package/setting-drawer/style/index.less +2 -2
- package/system/antd/_drawer.less +2 -2
- package/system/antd/_modal.less +3 -3
- package/system/antd/_table.less +2 -2
- package/system/antd/_tag.less +1 -1
- package/system/ng/_preserve-white-spaces.less +8 -8
- package/system/utils/_code.less +2 -2
- package/system/utils/_scrollbar.less +1 -1
- package/system/widgets/_header-dropdown.less +1 -1
- package/theme-btn/index.d.ts +42 -5
- package/variable.css +994 -245
- package/variable.min.css +1 -1
- package/layout-blank/public_api.d.ts +0 -2
- package/layout-default/layout-header-item-trigger.directive.d.ts +0 -5
- package/layout-default/layout-header-item.component.d.ts +0 -10
- package/layout-default/layout-header.component.d.ts +0 -31
- package/layout-default/layout-nav.component.d.ts +0 -61
- package/layout-default/layout-top-menu-item.d.ts +0 -9
- package/layout-default/layout.component.d.ts +0 -39
- package/layout-default/layout.module.d.ts +0 -19
- package/layout-default/layout.service.d.ts +0 -29
- package/layout-default/public_api.d.ts +0 -9
- package/layout-default/types.d.ts +0 -60
- package/public_api.d.ts +0 -8
- package/setting-drawer/public_api.d.ts +0 -3
- package/setting-drawer/setting-drawer-item.component.d.ts +0 -11
- package/setting-drawer/setting-drawer.component.d.ts +0 -48
- package/setting-drawer/setting-drawer.module.d.ts +0 -8
- package/setting-drawer/setting-drawer.types.d.ts +0 -7
- package/src/config.d.ts +0 -63
- package/src/locale/index.d.ts +0 -1
- package/src/locale/languages/ar-SA.d.ts +0 -3
- package/src/locale/languages/el-GR.d.ts +0 -3
- package/src/locale/languages/en-US.d.ts +0 -3
- package/src/locale/languages/es-ES.d.ts +0 -3
- package/src/locale/languages/fr-FR.d.ts +0 -3
- package/src/locale/languages/hr-HR.d.ts +0 -3
- package/src/locale/languages/it-IT.d.ts +0 -3
- package/src/locale/languages/ja-JP.d.ts +0 -3
- package/src/locale/languages/ko-KR.d.ts +0 -3
- package/src/locale/languages/pl-PL.d.ts +0 -3
- package/src/locale/languages/sl-SI.d.ts +0 -3
- package/src/locale/languages/tr-TR.d.ts +0 -3
- package/src/locale/languages/vi-VI.d.ts +0 -3
- package/src/locale/languages/zh-CN.d.ts +0 -3
- package/src/locale/languages/zh-TW.d.ts +0 -3
- package/src/locale/locale.module.d.ts +0 -6
- package/src/locale/locale.service.d.ts +0 -17
- package/src/locale/locale.tokens.d.ts +0 -3
- package/src/locale/locale.types.d.ts +0 -93
- package/src/locale/public_api.d.ts +0 -19
- package/src/pipes/date/date.pipe.d.ts +0 -9
- package/src/pipes/index.d.ts +0 -5
- package/src/pipes/keys/keys.pipe.d.ts +0 -11
- package/src/pipes/safe/html.pipe.d.ts +0 -9
- package/src/pipes/safe/url.pipe.d.ts +0 -9
- package/src/pipes/yn/yn.pipe.d.ts +0 -16
- package/src/provide.d.ts +0 -23
- package/src/router/optional-preloader.d.ts +0 -20
- package/src/services/drawer/drawer.helper.d.ts +0 -71
- package/src/services/http/http.client.d.ts +0 -570
- package/src/services/http/http.decorator.d.ts +0 -108
- package/src/services/http/http.token.d.ts +0 -37
- package/src/services/http/index.d.ts +0 -3
- package/src/services/i18n/i18n-url.guard.d.ts +0 -36
- package/src/services/i18n/i18n.d.ts +0 -90
- package/src/services/i18n/i18n.pipe.d.ts +0 -8
- package/src/services/i18n/index.d.ts +0 -3
- package/src/services/index.d.ts +0 -10
- package/src/services/menu/index.d.ts +0 -2
- package/src/services/menu/interface.d.ts +0 -79
- package/src/services/menu/menu.service.d.ts +0 -114
- package/src/services/modal/modal.helper.d.ts +0 -78
- package/src/services/preloader/preloader.d.ts +0 -1
- package/src/services/responsive/responsive.d.ts +0 -12
- package/src/services/rtl/rtl.service.d.ts +0 -48
- package/src/services/settings/index.d.ts +0 -2
- package/src/services/settings/settings.service.d.ts +0 -40
- package/src/services/settings/types.d.ts +0 -35
- package/src/services/title/title.service.d.ts +0 -72
- package/src/theme.module.d.ts +0 -22
- package/src/version.d.ts +0 -2
- package/theme-btn/public_api.d.ts +0 -2
- package/theme-btn/theme-btn.component.d.ts +0 -32
- package/theme-btn/theme-btn.module.d.ts +0 -10
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import * as i1
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
2
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
4
|
+
import { Input, ViewChild, Component, inject, Injectable, Renderer2, ChangeDetectorRef, NgZone, DestroyRef, EventEmitter, numberAttribute, booleanAttribute, Output, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, ContentChildren, Directive, NgModule } from '@angular/core';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
-
import * as
|
|
6
|
+
import * as i2$1 from '@angular/router';
|
|
7
7
|
import { Router, NavigationEnd, RouteConfigLoadStart, NavigationError, NavigationCancel, RouteConfigLoadEnd, RouterModule } from '@angular/router';
|
|
8
8
|
import { BehaviorSubject, filter } from 'rxjs';
|
|
9
|
-
import { updateHostClass } from '@delon/util/browser';
|
|
10
|
-
import * as i2$1 from 'ng-zorro-antd/message';
|
|
11
|
-
import * as i3$1 from '@delon/theme';
|
|
12
9
|
import { SettingsService, MenuService } from '@delon/theme';
|
|
13
|
-
import
|
|
10
|
+
import { updateHostClass } from '@delon/util/browser';
|
|
11
|
+
import { NzMessageService } from 'ng-zorro-antd/message';
|
|
12
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
14
13
|
import * as i3 from 'ng-zorro-antd/icon';
|
|
15
14
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
16
15
|
import { __decorate } from 'tslib';
|
|
@@ -29,14 +28,14 @@ class LayoutDefaultHeaderItemComponent {
|
|
|
29
28
|
host;
|
|
30
29
|
hidden = 'none';
|
|
31
30
|
direction = 'right';
|
|
32
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
33
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultHeaderItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: LayoutDefaultHeaderItemComponent, isStandalone: false, selector: "layout-default-header-item", inputs: { hidden: "hidden", direction: "direction" }, viewQueries: [{ propertyName: "host", first: true, predicate: ["host"], descendants: true, static: true }], ngImport: i0, template: `
|
|
34
33
|
<ng-template #host>
|
|
35
34
|
<ng-content />
|
|
36
35
|
</ng-template>
|
|
37
36
|
`, isInline: true });
|
|
38
37
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultHeaderItemComponent, decorators: [{
|
|
40
39
|
type: Component,
|
|
41
40
|
args: [{
|
|
42
41
|
selector: 'layout-default-header-item',
|
|
@@ -68,6 +67,7 @@ const DEFAULT = {
|
|
|
68
67
|
};
|
|
69
68
|
class LayoutDefaultService {
|
|
70
69
|
settings = inject(SettingsService);
|
|
70
|
+
bm = inject(BreakpointObserver);
|
|
71
71
|
_options$ = new BehaviorSubject(DEFAULT);
|
|
72
72
|
_options = DEFAULT;
|
|
73
73
|
get options() {
|
|
@@ -84,12 +84,13 @@ class LayoutDefaultService {
|
|
|
84
84
|
}
|
|
85
85
|
return `menu-${type}`;
|
|
86
86
|
}
|
|
87
|
-
constructor(
|
|
87
|
+
constructor() {
|
|
88
88
|
const mobileMedia = 'only screen and (max-width: 767.99px)';
|
|
89
|
-
bm
|
|
89
|
+
this.bm
|
|
90
|
+
.observe(mobileMedia)
|
|
90
91
|
.pipe(takeUntilDestroyed())
|
|
91
92
|
.subscribe(state => this.checkMedia(state.matches));
|
|
92
|
-
this.checkMedia(bm.isMatched(mobileMedia));
|
|
93
|
+
this.checkMedia(this.bm.isMatched(mobileMedia));
|
|
93
94
|
}
|
|
94
95
|
checkMedia(value) {
|
|
95
96
|
this.settings.setLayout('collapsed', value);
|
|
@@ -118,13 +119,13 @@ class LayoutDefaultService {
|
|
|
118
119
|
this.settings.setLayout('collapsed', status != null ? status : !this.settings.layout.collapsed);
|
|
119
120
|
this.notify();
|
|
120
121
|
}
|
|
121
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
122
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
122
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
123
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultService, providedIn: 'root' });
|
|
123
124
|
}
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultService, decorators: [{
|
|
125
126
|
type: Injectable,
|
|
126
127
|
args: [{ providedIn: 'root' }]
|
|
127
|
-
}], ctorParameters: () => [
|
|
128
|
+
}], ctorParameters: () => [] });
|
|
128
129
|
|
|
129
130
|
const SHOWCLS = 'sidebar-nav__floating-show';
|
|
130
131
|
const FLOATINGCLS = 'sidebar-nav__floating';
|
|
@@ -138,11 +139,10 @@ class LayoutDefaultNavComponent {
|
|
|
138
139
|
cdr = inject(ChangeDetectorRef);
|
|
139
140
|
ngZone = inject(NgZone);
|
|
140
141
|
sanitizer = inject(DomSanitizer);
|
|
141
|
-
directionality = inject(Directionality);
|
|
142
142
|
bodyEl;
|
|
143
143
|
destroy$ = inject(DestroyRef);
|
|
144
144
|
floatingEl;
|
|
145
|
-
dir =
|
|
145
|
+
dir = inject(Directionality).valueSignal;
|
|
146
146
|
list = [];
|
|
147
147
|
disabledAcl = false;
|
|
148
148
|
autoCloseUnderPad = true;
|
|
@@ -223,7 +223,7 @@ class LayoutDefaultNavComponent {
|
|
|
223
223
|
offsetHeight = rect.top + node.clientHeight - docHeight + spacing;
|
|
224
224
|
}
|
|
225
225
|
node.style.top = `${rect.top + scrollTop - offsetHeight}px`;
|
|
226
|
-
if (this.dir === 'rtl') {
|
|
226
|
+
if (this.dir() === 'rtl') {
|
|
227
227
|
node.style.right = `${rect.width + spacing}px`;
|
|
228
228
|
}
|
|
229
229
|
else {
|
|
@@ -311,11 +311,6 @@ class LayoutDefaultNavComponent {
|
|
|
311
311
|
.pipe(takeUntilDestroyed(this.destroy$), filter(t => t.type === 'layout' && t.name === 'collapsed'))
|
|
312
312
|
.subscribe(() => this.clearFloating());
|
|
313
313
|
this.underPad();
|
|
314
|
-
this.dir = this.directionality.value;
|
|
315
|
-
this.directionality.change.pipe(takeUntilDestroyed(this.destroy$)).subscribe(direction => {
|
|
316
|
-
this.dir = direction;
|
|
317
|
-
this.cdr.detectChanges();
|
|
318
|
-
});
|
|
319
314
|
this.openByUrl(router.url);
|
|
320
315
|
this.ngZone.runOutsideAngular(() => this.genFloating());
|
|
321
316
|
}
|
|
@@ -347,19 +342,19 @@ class LayoutDefaultNavComponent {
|
|
|
347
342
|
openAside(status) {
|
|
348
343
|
this.settings.setLayout('collapsed', status);
|
|
349
344
|
}
|
|
350
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
351
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
345
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
346
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: LayoutDefaultNavComponent, isStandalone: false, selector: "layout-default-nav", inputs: { disabledAcl: ["disabledAcl", "disabledAcl", booleanAttribute], autoCloseUnderPad: ["autoCloseUnderPad", "autoCloseUnderPad", booleanAttribute], recursivePath: ["recursivePath", "recursivePath", booleanAttribute], hideEmptyChildren: ["hideEmptyChildren", "hideEmptyChildren", booleanAttribute], openStrictly: ["openStrictly", "openStrictly", booleanAttribute], maxLevelIcon: ["maxLevelIcon", "maxLevelIcon", numberAttribute] }, outputs: { select: "select" }, host: { listeners: { "click": "_click()", "document:click": "closeSubMenu()" }, properties: { "class.d-block": "true" } }, ngImport: i0, template: "<ng-template #icon let-i>\n @if (i) {\n @switch (i.type) {\n @case ('icon') {\n <nz-icon\n class=\"sidebar-nav__item-icon\"\n [nzType]=\"i.value\"\n [nzTheme]=\"i.theme\"\n [nzSpin]=\"i.spin\"\n [nzTwotoneColor]=\"i.twoToneColor\"\n [nzIconfont]=\"i.iconfont\"\n [nzRotate]=\"i.rotate\"\n />\n }\n @case ('iconfont') {\n <nz-icon class=\"sidebar-nav__item-icon\" [nzIconfont]=\"i.iconfont\" />\n }\n @case ('img') {\n <img [src]=\"i.value\" class=\"sidebar-nav__item-icon sidebar-nav__item-img\" />\n }\n @case ('svg') {\n <span class=\"sidebar-nav__item-icon sidebar-nav__item-svg\" [innerHTML]=\"i.value\"></span>\n }\n @default {\n <i class=\"sidebar-nav__item-icon {{ i.value }}\"></i>\n }\n }\n }\n</ng-template>\n<ng-template #tree let-ls>\n @for (i of ls; track $index) {\n @if (i._hidden !== true) {\n @if (i.render_type === 'divider') {\n <li class=\"sidebar-nav__divider\"></li>\n }@else {\n <li class=\"sidebar-nav__item\" [class.sidebar-nav__selected]=\"i._selected\" [class.sidebar-nav__open]=\"i.open\">\n <!-- link -->\n @if (i.children.length === 0) {\n <a\n (click)=\"to(i)\"\n [attr.data-id]=\"i._id\"\n class=\"sidebar-nav__item-link\"\n [class.sidebar-nav__item-disabled]=\"i.disabled\"\n (mouseenter)=\"closeSubMenu()\"\n >\n @if (i._needIcon) {\n @if (collapsed) {\n <span nz-tooltip nzTooltipPlacement=\"right\" [nzTooltipTitle]=\"i.text\">\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\" />\n </span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\" />\n }\n }\n <span class=\"sidebar-nav__item-text\" [innerHTML]=\"i._text\" [attr.title]=\"i.text\"></span>\n </a>\n }\n <!-- has children link -->\n @if (i.children.length > 0) {\n <a (click)=\"toggleOpen(i)\" (mouseenter)=\"showSubMenu($event, i)\" class=\"sidebar-nav__item-link\">\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\" />\n <span class=\"sidebar-nav__item-text\" [innerHTML]=\"i._text\" [attr.title]=\"i.text\"></span>\n <i class=\"sidebar-nav__sub-arrow\"></i>\n </a>\n }\n <!-- badge -->\n @if (i.badge) {\n <nz-badge\n [nzCount]=\"i.badge\"\n [nzDot]=\"i.badgeDot\"\n nzStandalone\n [nzOverflowCount]=\"i.badgeOverflowCount ? i.badgeOverflowCount : 9\"\n />\n }\n @if (i.children.length > 0) {\n <ul class=\"sidebar-nav sidebar-nav__sub sidebar-nav__depth{{ i._depth }}\">\n <ng-template [ngTemplateOutlet]=\"tree\" [ngTemplateOutletContext]=\"{ $implicit: i.children }\" />\n </ul>\n }\n </li>\n }\n }\n }\n</ng-template>\n<ul class=\"sidebar-nav\">\n @for (group of list; track $index) {\n @if (group.group) {\n <li class=\"sidebar-nav__item sidebar-nav__group-title\">\n <span [innerHTML]=\"group._text\"></span>\n </li>\n }\n <ng-template [ngTemplateOutlet]=\"tree\" [ngTemplateOutletContext]=\"{ $implicit: group.children }\" />\n }\n</ul>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "directive", type: i3.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i4.NzBadgeComponent, selector: "nz-badge", inputs: ["nzShowZero", "nzShowDot", "nzStandalone", "nzDot", "nzOverflowCount", "nzColor", "nzStyle", "nzText", "nzTitle", "nzStatus", "nzCount", "nzOffset", "nzSize"], exportAs: ["nzBadge"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
352
347
|
}
|
|
353
348
|
__decorate([
|
|
354
349
|
ZoneOutside()
|
|
355
350
|
], LayoutDefaultNavComponent.prototype, "showSubMenu", null);
|
|
356
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultNavComponent, decorators: [{
|
|
357
352
|
type: Component,
|
|
358
353
|
args: [{ selector: 'layout-default-nav', host: {
|
|
359
354
|
'(click)': '_click()',
|
|
360
355
|
'(document:click)': 'closeSubMenu()',
|
|
361
356
|
'[class.d-block]': `true`
|
|
362
|
-
},
|
|
357
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "<ng-template #icon let-i>\n @if (i) {\n @switch (i.type) {\n @case ('icon') {\n <nz-icon\n class=\"sidebar-nav__item-icon\"\n [nzType]=\"i.value\"\n [nzTheme]=\"i.theme\"\n [nzSpin]=\"i.spin\"\n [nzTwotoneColor]=\"i.twoToneColor\"\n [nzIconfont]=\"i.iconfont\"\n [nzRotate]=\"i.rotate\"\n />\n }\n @case ('iconfont') {\n <nz-icon class=\"sidebar-nav__item-icon\" [nzIconfont]=\"i.iconfont\" />\n }\n @case ('img') {\n <img [src]=\"i.value\" class=\"sidebar-nav__item-icon sidebar-nav__item-img\" />\n }\n @case ('svg') {\n <span class=\"sidebar-nav__item-icon sidebar-nav__item-svg\" [innerHTML]=\"i.value\"></span>\n }\n @default {\n <i class=\"sidebar-nav__item-icon {{ i.value }}\"></i>\n }\n }\n }\n</ng-template>\n<ng-template #tree let-ls>\n @for (i of ls; track $index) {\n @if (i._hidden !== true) {\n @if (i.render_type === 'divider') {\n <li class=\"sidebar-nav__divider\"></li>\n }@else {\n <li class=\"sidebar-nav__item\" [class.sidebar-nav__selected]=\"i._selected\" [class.sidebar-nav__open]=\"i.open\">\n <!-- link -->\n @if (i.children.length === 0) {\n <a\n (click)=\"to(i)\"\n [attr.data-id]=\"i._id\"\n class=\"sidebar-nav__item-link\"\n [class.sidebar-nav__item-disabled]=\"i.disabled\"\n (mouseenter)=\"closeSubMenu()\"\n >\n @if (i._needIcon) {\n @if (collapsed) {\n <span nz-tooltip nzTooltipPlacement=\"right\" [nzTooltipTitle]=\"i.text\">\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\" />\n </span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\" />\n }\n }\n <span class=\"sidebar-nav__item-text\" [innerHTML]=\"i._text\" [attr.title]=\"i.text\"></span>\n </a>\n }\n <!-- has children link -->\n @if (i.children.length > 0) {\n <a (click)=\"toggleOpen(i)\" (mouseenter)=\"showSubMenu($event, i)\" class=\"sidebar-nav__item-link\">\n <ng-template [ngTemplateOutlet]=\"icon\" [ngTemplateOutletContext]=\"{ $implicit: i.icon }\" />\n <span class=\"sidebar-nav__item-text\" [innerHTML]=\"i._text\" [attr.title]=\"i.text\"></span>\n <i class=\"sidebar-nav__sub-arrow\"></i>\n </a>\n }\n <!-- badge -->\n @if (i.badge) {\n <nz-badge\n [nzCount]=\"i.badge\"\n [nzDot]=\"i.badgeDot\"\n nzStandalone\n [nzOverflowCount]=\"i.badgeOverflowCount ? i.badgeOverflowCount : 9\"\n />\n }\n @if (i.children.length > 0) {\n <ul class=\"sidebar-nav sidebar-nav__sub sidebar-nav__depth{{ i._depth }}\">\n <ng-template [ngTemplateOutlet]=\"tree\" [ngTemplateOutletContext]=\"{ $implicit: i.children }\" />\n </ul>\n }\n </li>\n }\n }\n }\n</ng-template>\n<ul class=\"sidebar-nav\">\n @for (group of list; track $index) {\n @if (group.group) {\n <li class=\"sidebar-nav__item sidebar-nav__group-title\">\n <span [innerHTML]=\"group._text\"></span>\n </li>\n }\n <ng-template [ngTemplateOutlet]=\"tree\" [ngTemplateOutletContext]=\"{ $implicit: group.children }\" />\n }\n</ul>\n" }]
|
|
363
358
|
}], propDecorators: { disabledAcl: [{
|
|
364
359
|
type: Input,
|
|
365
360
|
args: [{ transform: booleanAttribute }]
|
|
@@ -418,8 +413,8 @@ class LayoutDefaultHeaderComponent {
|
|
|
418
413
|
toggleCollapsed() {
|
|
419
414
|
this.srv.toggleCollapsed();
|
|
420
415
|
}
|
|
421
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
422
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
416
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
417
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: LayoutDefaultHeaderComponent, isStandalone: false, selector: "layout-default-header", inputs: { items: "items" }, host: { properties: { "class.alain-default__header": "true" } }, ngImport: i0, template: `
|
|
423
418
|
<ng-template #render let-ls>
|
|
424
419
|
@for (i of ls; track $index) {
|
|
425
420
|
<li [class.hidden-mobile]="i.hidden === 'mobile'" [class.hidden-pc]="i.hidden === 'pc'">
|
|
@@ -457,9 +452,9 @@ class LayoutDefaultHeaderComponent {
|
|
|
457
452
|
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: right }" />
|
|
458
453
|
</ul>
|
|
459
454
|
</div>
|
|
460
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1
|
|
455
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
461
456
|
}
|
|
462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultHeaderComponent, decorators: [{
|
|
463
458
|
type: Component,
|
|
464
459
|
args: [{
|
|
465
460
|
selector: 'layout-default-header',
|
|
@@ -514,12 +509,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
514
509
|
}] } });
|
|
515
510
|
|
|
516
511
|
class LayoutDefaultComponent {
|
|
517
|
-
msgSrv;
|
|
518
|
-
settings;
|
|
519
|
-
el;
|
|
520
|
-
renderer;
|
|
521
|
-
doc;
|
|
522
|
-
srv;
|
|
523
512
|
headerItems;
|
|
524
513
|
get opt() {
|
|
525
514
|
return this.srv.options;
|
|
@@ -549,14 +538,15 @@ class LayoutDefaultComponent {
|
|
|
549
538
|
toggleCollapsed() {
|
|
550
539
|
this.srv.toggleCollapsed();
|
|
551
540
|
}
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
541
|
+
router = inject(Router);
|
|
542
|
+
msgSrv = inject(NzMessageService);
|
|
543
|
+
settings = inject(SettingsService);
|
|
544
|
+
el = inject(ElementRef);
|
|
545
|
+
renderer = inject(Renderer2);
|
|
546
|
+
doc = inject(DOCUMENT);
|
|
547
|
+
srv = inject(LayoutDefaultService);
|
|
548
|
+
constructor() {
|
|
549
|
+
this.router.events
|
|
560
550
|
.pipe(takeUntilDestroyed(), filter(() => !this.fetchingStrictly))
|
|
561
551
|
.subscribe(ev => this.processEv(ev));
|
|
562
552
|
this.srv.options$.pipe(takeUntilDestroyed()).subscribe(() => this.setClass());
|
|
@@ -595,8 +585,8 @@ class LayoutDefaultComponent {
|
|
|
595
585
|
});
|
|
596
586
|
doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
|
|
597
587
|
}
|
|
598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
599
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
588
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
589
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: LayoutDefaultComponent, isStandalone: false, selector: "layout-default", inputs: { options: "options", asideUser: "asideUser", asideBottom: "asideBottom", nav: "nav", content: "content", customError: "customError", fetchingStrictly: ["fetchingStrictly", "fetchingStrictly", booleanAttribute], fetching: ["fetching", "fetching", booleanAttribute] }, queries: [{ propertyName: "headerItems", predicate: LayoutDefaultHeaderItemComponent }], exportAs: ["layoutDefault"], ngImport: i0, template: `
|
|
600
590
|
@if (showFetching) {
|
|
601
591
|
<div class="alain-default__progress-bar"></div>
|
|
602
592
|
}
|
|
@@ -631,9 +621,9 @@ class LayoutDefaultComponent {
|
|
|
631
621
|
<ng-container *ngTemplateOutlet="content" />
|
|
632
622
|
<ng-content />
|
|
633
623
|
</section>
|
|
634
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1
|
|
624
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: LayoutDefaultNavComponent, selector: "layout-default-nav", inputs: ["disabledAcl", "autoCloseUnderPad", "recursivePath", "hideEmptyChildren", "openStrictly", "maxLevelIcon"], outputs: ["select"] }, { kind: "component", type: LayoutDefaultHeaderComponent, selector: "layout-default-header", inputs: ["items"] }] });
|
|
635
625
|
}
|
|
636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultComponent, decorators: [{
|
|
637
627
|
type: Component,
|
|
638
628
|
args: [{
|
|
639
629
|
selector: 'layout-default',
|
|
@@ -677,10 +667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
677
667
|
// eslint-disable-next-line @angular-eslint/prefer-standalone
|
|
678
668
|
standalone: false
|
|
679
669
|
}]
|
|
680
|
-
}], ctorParameters: () => [
|
|
681
|
-
type: Inject,
|
|
682
|
-
args: [DOCUMENT]
|
|
683
|
-
}] }, { type: LayoutDefaultService }], propDecorators: { headerItems: [{
|
|
670
|
+
}], ctorParameters: () => [], propDecorators: { headerItems: [{
|
|
684
671
|
type: ContentChildren,
|
|
685
672
|
args: [LayoutDefaultHeaderItemComponent, { descendants: false }]
|
|
686
673
|
}], options: [{
|
|
@@ -704,10 +691,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
704
691
|
}] } });
|
|
705
692
|
|
|
706
693
|
class LayoutDefaultHeaderItemTriggerDirective {
|
|
707
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
708
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
694
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultHeaderItemTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
695
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.4", type: LayoutDefaultHeaderItemTriggerDirective, isStandalone: false, selector: "[layout-default-header-item-trigger]", host: { properties: { "class.alain-default__nav-item": "true" } }, ngImport: i0 });
|
|
709
696
|
}
|
|
710
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultHeaderItemTriggerDirective, decorators: [{
|
|
711
698
|
type: Directive,
|
|
712
699
|
args: [{
|
|
713
700
|
selector: '[layout-default-header-item-trigger]',
|
|
@@ -722,10 +709,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
722
709
|
class LayoutDefaultTopMenuItemComponent {
|
|
723
710
|
selected = false;
|
|
724
711
|
disabled = false;
|
|
725
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
726
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "
|
|
712
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultTopMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
713
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.0.4", type: LayoutDefaultTopMenuItemComponent, isStandalone: false, selector: "layout-default-top-menu-item", inputs: { selected: ["selected", "selected", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, host: { properties: { "class.alain-default__nav-item": "true", "class.alain-default__top-menu-item": "true", "class.alain-default__top-menu-item-selected": "selected", "class.alain-default__top-menu-item-disabled": "disabled" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
727
714
|
}
|
|
728
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
715
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultTopMenuItemComponent, decorators: [{
|
|
729
716
|
type: Component,
|
|
730
717
|
args: [{
|
|
731
718
|
selector: 'layout-default-top-menu-item',
|
|
@@ -736,7 +723,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
|
|
|
736
723
|
'[class.alain-default__top-menu-item-selected]': `selected`,
|
|
737
724
|
'[class.alain-default__top-menu-item-disabled]': `disabled`
|
|
738
725
|
},
|
|
739
|
-
preserveWhitespaces: false,
|
|
740
726
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
741
727
|
encapsulation: ViewEncapsulation.None,
|
|
742
728
|
// eslint-disable-next-line @angular-eslint/prefer-standalone
|
|
@@ -759,8 +745,8 @@ const COMPONENTS = [
|
|
|
759
745
|
LayoutDefaultTopMenuItemComponent
|
|
760
746
|
];
|
|
761
747
|
class LayoutDefaultModule {
|
|
762
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
763
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
748
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
749
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultModule, declarations: [LayoutDefaultComponent,
|
|
764
750
|
LayoutDefaultNavComponent,
|
|
765
751
|
LayoutDefaultHeaderComponent,
|
|
766
752
|
LayoutDefaultHeaderItemComponent,
|
|
@@ -771,9 +757,9 @@ class LayoutDefaultModule {
|
|
|
771
757
|
LayoutDefaultHeaderItemComponent,
|
|
772
758
|
LayoutDefaultHeaderItemTriggerDirective,
|
|
773
759
|
LayoutDefaultTopMenuItemComponent] });
|
|
774
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
760
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultModule, imports: [CommonModule, RouterModule, NzToolTipModule, NzIconModule, NzAvatarModule, NzDropDownModule, NzBadgeModule] });
|
|
775
761
|
}
|
|
776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
762
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LayoutDefaultModule, decorators: [{
|
|
777
763
|
type: NgModule,
|
|
778
764
|
args: [{
|
|
779
765
|
imports: [CommonModule, RouterModule, NzToolTipModule, NzIconModule, NzAvatarModule, NzDropDownModule, NzBadgeModule],
|