@delon/theme 17.0.5 → 17.1.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 +86 -4
- package/compact.min.css +1 -1
- package/dark.css +86 -4
- package/dark.min.css +1 -1
- package/default.css +86 -4
- package/default.min.css +1 -1
- package/esm2022/layout-default/layout-header-item-trigger.directive.mjs +3 -3
- package/esm2022/layout-default/layout-header-item.component.mjs +3 -3
- package/esm2022/layout-default/layout-header.component.mjs +21 -21
- package/esm2022/layout-default/layout-nav.component.mjs +50 -64
- package/esm2022/layout-default/layout-top-menu-item.mjs +9 -15
- package/esm2022/layout-default/layout.component.mjs +10 -16
- package/esm2022/layout-default/layout.module.mjs +4 -4
- package/esm2022/layout-default/layout.service.mjs +12 -12
- package/esm2022/setting-drawer/setting-drawer-item.component.mjs +5 -5
- package/esm2022/setting-drawer/setting-drawer.component.mjs +37 -45
- package/esm2022/setting-drawer/setting-drawer.module.mjs +4 -4
- package/esm2022/src/locale/languages/vi-VI.mjs +83 -0
- package/esm2022/src/locale/locale.module.mjs +4 -4
- package/esm2022/src/locale/locale.service.mjs +4 -4
- package/esm2022/src/locale/locale.tokens.mjs +1 -1
- package/esm2022/src/locale/public_api.mjs +2 -1
- package/esm2022/src/pipes/date/date.pipe.mjs +3 -3
- package/esm2022/src/pipes/keys/keys.pipe.mjs +3 -3
- package/esm2022/src/pipes/safe/html.pipe.mjs +9 -9
- package/esm2022/src/pipes/safe/url.pipe.mjs +9 -9
- package/esm2022/src/pipes/yn/yn.pipe.mjs +9 -9
- package/esm2022/src/provide.mjs +1 -1
- package/esm2022/src/services/drawer/drawer.helper.mjs +12 -16
- package/esm2022/src/services/http/http.client.mjs +10 -11
- package/esm2022/src/services/http/http.decorator.mjs +8 -11
- package/esm2022/src/services/i18n/i18n-url.guard.mjs +11 -16
- package/esm2022/src/services/i18n/i18n.mjs +7 -7
- package/esm2022/src/services/i18n/i18n.pipe.mjs +3 -3
- package/esm2022/src/services/menu/menu.service.mjs +12 -19
- package/esm2022/src/services/modal/modal.helper.mjs +13 -16
- package/esm2022/src/services/preloader/preloader.mjs +1 -1
- package/esm2022/src/services/responsive/responsive.mjs +4 -4
- package/esm2022/src/services/rtl/rtl.service.mjs +19 -22
- package/esm2022/src/services/settings/settings.service.mjs +10 -13
- package/esm2022/src/services/title/title.service.mjs +16 -24
- package/esm2022/src/theme.module.mjs +4 -4
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/theme-btn/theme-btn.component.mjs +24 -37
- package/esm2022/theme-btn/theme-btn.module.mjs +4 -4
- package/fesm2022/layout-default.mjs +101 -121
- package/fesm2022/layout-default.mjs.map +1 -1
- package/fesm2022/setting-drawer.mjs +42 -50
- package/fesm2022/setting-drawer.mjs.map +1 -1
- package/fesm2022/theme-btn.mjs +27 -40
- package/fesm2022/theme-btn.mjs.map +1 -1
- package/fesm2022/theme.mjs +222 -179
- package/fesm2022/theme.mjs.map +1 -1
- package/layout-default/layout-header.component.d.ts +6 -8
- package/layout-default/layout-nav.component.d.ts +24 -26
- package/layout-default/layout-top-menu-item.d.ts +2 -3
- package/layout-default/layout.component.d.ts +2 -3
- package/layout-default/layout.service.d.ts +1 -3
- package/package.json +4 -4
- package/setting-drawer/setting-drawer.component.d.ts +15 -16
- package/src/locale/languages/vi-VI.d.ts +3 -0
- package/src/locale/locale.tokens.d.ts +2 -1
- package/src/locale/public_api.d.ts +1 -0
- package/src/pipes/safe/html.pipe.d.ts +2 -3
- package/src/pipes/safe/url.pipe.d.ts +2 -3
- package/src/pipes/yn/yn.pipe.d.ts +2 -3
- package/src/services/drawer/drawer.helper.d.ts +4 -5
- package/src/services/http/http.client.d.ts +3 -3
- package/src/services/http/http.decorator.d.ts +1 -2
- package/src/services/i18n/i18n-url.guard.d.ts +3 -6
- package/src/services/menu/menu.service.d.ts +5 -7
- package/src/services/modal/modal.helper.d.ts +4 -6
- package/src/services/rtl/rtl.service.d.ts +8 -13
- package/src/services/settings/settings.service.d.ts +2 -4
- package/src/services/title/title.service.d.ts +8 -12
- package/theme-btn/theme-btn.component.d.ts +11 -15
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as i5 from '@angular/common';
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
3
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
4
3
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Component, ViewChild, Input, Injectable,
|
|
4
|
+
import { Component, ViewChild, Input, inject, Injectable, Renderer2, ChangeDetectorRef, NgZone, DestroyRef, EventEmitter, booleanAttribute, numberAttribute, ChangeDetectionStrategy, ViewEncapsulation, Output, Inject, ContentChildren, Directive, NgModule } from '@angular/core';
|
|
6
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
-
import * as
|
|
8
|
-
import { NavigationEnd, RouteConfigLoadStart, NavigationError, NavigationCancel, RouteConfigLoadEnd, RouterModule } from '@angular/router';
|
|
6
|
+
import * as i1$1 from '@angular/router';
|
|
7
|
+
import { Router, NavigationEnd, RouteConfigLoadStart, NavigationError, NavigationCancel, RouteConfigLoadEnd, RouterModule } from '@angular/router';
|
|
9
8
|
import { BehaviorSubject, filter } from 'rxjs';
|
|
10
9
|
import { updateHostClass } from '@delon/util/browser';
|
|
11
|
-
import { InputBoolean, InputNumber, ZoneOutside } from '@delon/util/decorator';
|
|
12
10
|
import * as i2$1 from 'ng-zorro-antd/message';
|
|
13
11
|
import { NzMessageModule } from 'ng-zorro-antd/message';
|
|
14
|
-
import * as
|
|
15
|
-
import
|
|
12
|
+
import * as i3$1 from '@delon/theme';
|
|
13
|
+
import { SettingsService, MenuService } from '@delon/theme';
|
|
14
|
+
import * as i3 from 'ng-zorro-antd/icon';
|
|
16
15
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
16
|
+
import { __decorate } from 'tslib';
|
|
17
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
18
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
19
|
+
import { ZoneOutside } from '@delon/util/decorator';
|
|
17
20
|
import { WINDOW } from '@delon/util/token';
|
|
18
|
-
import * as
|
|
19
|
-
import * as i4 from '@angular/cdk/bidi';
|
|
20
|
-
import * as i6 from 'ng-zorro-antd/tooltip';
|
|
21
|
+
import * as i2 from 'ng-zorro-antd/tooltip';
|
|
21
22
|
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
22
|
-
import * as
|
|
23
|
+
import * as i4 from 'ng-zorro-antd/badge';
|
|
23
24
|
import { NzBadgeModule } from 'ng-zorro-antd/badge';
|
|
24
25
|
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
|
25
26
|
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
|
@@ -29,14 +30,14 @@ class LayoutDefaultHeaderItemComponent {
|
|
|
29
30
|
this.hidden = 'none';
|
|
30
31
|
this.direction = 'right';
|
|
31
32
|
}
|
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultHeaderItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0", type: LayoutDefaultHeaderItemComponent, 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
35
|
<ng-template #host>
|
|
35
36
|
<ng-content />
|
|
36
37
|
</ng-template>
|
|
37
38
|
`, isInline: true }); }
|
|
38
39
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultHeaderItemComponent, decorators: [{
|
|
40
41
|
type: Component,
|
|
41
42
|
args: [{
|
|
42
43
|
selector: 'layout-default-header-item',
|
|
@@ -65,6 +66,11 @@ const DEFAULT = {
|
|
|
65
66
|
hideHeader: false
|
|
66
67
|
};
|
|
67
68
|
class LayoutDefaultService {
|
|
69
|
+
constructor() {
|
|
70
|
+
this.settings = inject(SettingsService);
|
|
71
|
+
this._options$ = new BehaviorSubject(DEFAULT);
|
|
72
|
+
this._options = DEFAULT;
|
|
73
|
+
}
|
|
68
74
|
get options() {
|
|
69
75
|
return this._options;
|
|
70
76
|
}
|
|
@@ -79,11 +85,6 @@ class LayoutDefaultService {
|
|
|
79
85
|
}
|
|
80
86
|
return `menu-${type}`;
|
|
81
87
|
}
|
|
82
|
-
constructor(settings) {
|
|
83
|
-
this.settings = settings;
|
|
84
|
-
this._options$ = new BehaviorSubject(DEFAULT);
|
|
85
|
-
this._options = DEFAULT;
|
|
86
|
-
}
|
|
87
88
|
notify() {
|
|
88
89
|
this._options$.next(this._options);
|
|
89
90
|
}
|
|
@@ -108,43 +109,44 @@ class LayoutDefaultService {
|
|
|
108
109
|
this.settings.setLayout('collapsed', status != null ? status : !this.settings.layout.collapsed);
|
|
109
110
|
this.notify();
|
|
110
111
|
}
|
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
112
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
113
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultService, providedIn: 'root' }); }
|
|
113
114
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultService, decorators: [{
|
|
115
116
|
type: Injectable,
|
|
116
117
|
args: [{ providedIn: 'root' }]
|
|
117
|
-
}]
|
|
118
|
+
}] });
|
|
118
119
|
|
|
119
120
|
const SHOWCLS = 'sidebar-nav__floating-show';
|
|
120
121
|
const FLOATINGCLS = 'sidebar-nav__floating';
|
|
121
122
|
class LayoutDefaultNavComponent {
|
|
122
|
-
|
|
123
|
-
this.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
this.
|
|
130
|
-
this.
|
|
131
|
-
this.
|
|
132
|
-
this.
|
|
133
|
-
this.cdr = cdr;
|
|
134
|
-
this.ngZone = ngZone;
|
|
135
|
-
this.sanitizer = sanitizer;
|
|
136
|
-
this.doc = doc;
|
|
137
|
-
this.win = win;
|
|
138
|
-
this.directionality = directionality;
|
|
123
|
+
constructor() {
|
|
124
|
+
this.doc = inject(DOCUMENT);
|
|
125
|
+
this.win = inject(WINDOW);
|
|
126
|
+
this.router = inject(Router);
|
|
127
|
+
this.render = inject(Renderer2);
|
|
128
|
+
this.menuSrv = inject(MenuService);
|
|
129
|
+
this.settings = inject(SettingsService);
|
|
130
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
131
|
+
this.ngZone = inject(NgZone);
|
|
132
|
+
this.sanitizer = inject(DomSanitizer);
|
|
133
|
+
this.directionality = inject(Directionality, { optional: true });
|
|
139
134
|
this.destroy$ = inject(DestroyRef);
|
|
140
135
|
this.dir = 'ltr';
|
|
141
136
|
this.list = [];
|
|
142
137
|
this.disabledAcl = false;
|
|
143
138
|
this.autoCloseUnderPad = true;
|
|
144
139
|
this.recursivePath = true;
|
|
140
|
+
this.hideEmptyChildren = true;
|
|
145
141
|
this.maxLevelIcon = 3;
|
|
146
142
|
this.select = new EventEmitter();
|
|
147
143
|
}
|
|
144
|
+
set openStrictly(value) {
|
|
145
|
+
this.menuSrv.openStrictly = value;
|
|
146
|
+
}
|
|
147
|
+
get collapsed() {
|
|
148
|
+
return this.settings.layout.collapsed;
|
|
149
|
+
}
|
|
148
150
|
getLinkNode(node) {
|
|
149
151
|
node = node.nodeName === 'A' ? node : node.parentNode;
|
|
150
152
|
return node.nodeName !== 'A' ? null : node;
|
|
@@ -292,7 +294,8 @@ class LayoutDefaultNavComponent {
|
|
|
292
294
|
icon.value = this.sanitizer.bypassSecurityTrustHtml(icon.value);
|
|
293
295
|
}
|
|
294
296
|
});
|
|
295
|
-
this.
|
|
297
|
+
if (this.hideEmptyChildren)
|
|
298
|
+
this.fixHide(data);
|
|
296
299
|
this.list = data.filter((w) => w._hidden !== true);
|
|
297
300
|
cdr.detectChanges();
|
|
298
301
|
});
|
|
@@ -307,8 +310,8 @@ class LayoutDefaultNavComponent {
|
|
|
307
310
|
.pipe(takeUntilDestroyed(this.destroy$), filter(t => t.type === 'layout' && t.name === 'collapsed'))
|
|
308
311
|
.subscribe(() => this.clearFloating());
|
|
309
312
|
this.underPad();
|
|
310
|
-
this.dir = this.directionality
|
|
311
|
-
this.directionality.
|
|
313
|
+
this.dir = this.directionality?.value;
|
|
314
|
+
this.directionality?.change.pipe(takeUntilDestroyed(this.destroy$)).subscribe(direction => {
|
|
312
315
|
this.dir = direction;
|
|
313
316
|
this.cdr.detectChanges();
|
|
314
317
|
});
|
|
@@ -343,57 +346,51 @@ class LayoutDefaultNavComponent {
|
|
|
343
346
|
openAside(status) {
|
|
344
347
|
this.settings.setLayout('collapsed', status);
|
|
345
348
|
}
|
|
346
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
347
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0
|
|
349
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
350
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: LayoutDefaultNavComponent, 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 <i\n class=\"sidebar-nav__item-icon\"\n nz-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 ></i>\n }\n @case ('iconfont') {\n <i class=\"sidebar-nav__item-icon\" nz-icon [nzIconfont]=\"i.iconfont\"></i>\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 <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 [ngClass]=\"{ '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 [nzCount]=\"i.badge\" [nzDot]=\"i.badgeDot\" nzStandalone [nzOverflowCount]=\"9\" />\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</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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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]", 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 }); }
|
|
348
351
|
}
|
|
349
|
-
__decorate([
|
|
350
|
-
InputBoolean()
|
|
351
|
-
], LayoutDefaultNavComponent.prototype, "disabledAcl", void 0);
|
|
352
|
-
__decorate([
|
|
353
|
-
InputBoolean()
|
|
354
|
-
], LayoutDefaultNavComponent.prototype, "autoCloseUnderPad", void 0);
|
|
355
|
-
__decorate([
|
|
356
|
-
InputBoolean()
|
|
357
|
-
], LayoutDefaultNavComponent.prototype, "recursivePath", void 0);
|
|
358
|
-
__decorate([
|
|
359
|
-
InputBoolean()
|
|
360
|
-
], LayoutDefaultNavComponent.prototype, "openStrictly", null);
|
|
361
|
-
__decorate([
|
|
362
|
-
InputNumber()
|
|
363
|
-
], LayoutDefaultNavComponent.prototype, "maxLevelIcon", void 0);
|
|
364
352
|
__decorate([
|
|
365
353
|
ZoneOutside()
|
|
366
354
|
], LayoutDefaultNavComponent.prototype, "showSubMenu", null);
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultNavComponent, decorators: [{
|
|
368
356
|
type: Component,
|
|
369
357
|
args: [{ selector: 'layout-default-nav', host: {
|
|
370
358
|
'(click)': '_click()',
|
|
371
359
|
'(document:click)': 'closeSubMenu()',
|
|
372
360
|
'[class.d-block]': `true`
|
|
373
361
|
}, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-template #icon let-i>\n @if (i) {\n @switch (i.type) {\n @case ('icon') {\n <i\n class=\"sidebar-nav__item-icon\"\n nz-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 ></i>\n }\n @case ('iconfont') {\n <i class=\"sidebar-nav__item-icon\" nz-icon [nzIconfont]=\"i.iconfont\"></i>\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 <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 [ngClass]=\"{ '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 [nzCount]=\"i.badge\" [nzDot]=\"i.badgeDot\" nzStandalone [nzOverflowCount]=\"9\" />\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</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" }]
|
|
374
|
-
}],
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}] }, { type: undefined, decorators: [{
|
|
378
|
-
type: Inject,
|
|
379
|
-
args: [WINDOW]
|
|
380
|
-
}] }, { type: i4.Directionality, decorators: [{
|
|
381
|
-
type: Optional
|
|
382
|
-
}] }], propDecorators: { disabledAcl: [{
|
|
383
|
-
type: Input
|
|
362
|
+
}], propDecorators: { disabledAcl: [{
|
|
363
|
+
type: Input,
|
|
364
|
+
args: [{ transform: booleanAttribute }]
|
|
384
365
|
}], autoCloseUnderPad: [{
|
|
385
|
-
type: Input
|
|
366
|
+
type: Input,
|
|
367
|
+
args: [{ transform: booleanAttribute }]
|
|
386
368
|
}], recursivePath: [{
|
|
387
|
-
type: Input
|
|
369
|
+
type: Input,
|
|
370
|
+
args: [{ transform: booleanAttribute }]
|
|
371
|
+
}], hideEmptyChildren: [{
|
|
372
|
+
type: Input,
|
|
373
|
+
args: [{ transform: booleanAttribute }]
|
|
388
374
|
}], openStrictly: [{
|
|
389
|
-
type: Input
|
|
375
|
+
type: Input,
|
|
376
|
+
args: [{ transform: booleanAttribute }]
|
|
390
377
|
}], maxLevelIcon: [{
|
|
391
|
-
type: Input
|
|
378
|
+
type: Input,
|
|
379
|
+
args: [{ transform: numberAttribute }]
|
|
392
380
|
}], select: [{
|
|
393
381
|
type: Output
|
|
394
382
|
}], showSubMenu: [] } });
|
|
395
383
|
|
|
396
384
|
class LayoutDefaultHeaderComponent {
|
|
385
|
+
constructor() {
|
|
386
|
+
this.settings = inject(SettingsService);
|
|
387
|
+
this.srv = inject(LayoutDefaultService);
|
|
388
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
389
|
+
this.destroy$ = inject(DestroyRef);
|
|
390
|
+
this.left = [];
|
|
391
|
+
this.middle = [];
|
|
392
|
+
this.right = [];
|
|
393
|
+
}
|
|
397
394
|
get opt() {
|
|
398
395
|
return this.srv.options;
|
|
399
396
|
}
|
|
@@ -406,15 +403,6 @@ class LayoutDefaultHeaderComponent {
|
|
|
406
403
|
get collapsedIcon() {
|
|
407
404
|
return this.srv.collapsedIcon;
|
|
408
405
|
}
|
|
409
|
-
constructor(srv, settings, cdr) {
|
|
410
|
-
this.srv = srv;
|
|
411
|
-
this.settings = settings;
|
|
412
|
-
this.cdr = cdr;
|
|
413
|
-
this.destroy$ = inject(DestroyRef);
|
|
414
|
-
this.left = [];
|
|
415
|
-
this.middle = [];
|
|
416
|
-
this.right = [];
|
|
417
|
-
}
|
|
418
406
|
refresh() {
|
|
419
407
|
const arr = this.items.toArray();
|
|
420
408
|
this.left = arr.filter(i => i.direction === 'left');
|
|
@@ -430,8 +418,8 @@ class LayoutDefaultHeaderComponent {
|
|
|
430
418
|
toggleCollapsed() {
|
|
431
419
|
this.srv.toggleCollapsed();
|
|
432
420
|
}
|
|
433
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
434
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0
|
|
421
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
422
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: LayoutDefaultHeaderComponent, selector: "layout-default-header", inputs: { items: "items" }, host: { properties: { "class.alain-default__header": "true" } }, ngImport: i0, template: `
|
|
435
423
|
<ng-template #render let-ls>
|
|
436
424
|
@for (i of ls; track $index) {
|
|
437
425
|
<li [class.hidden-mobile]="i.hidden === 'mobile'" [class.hidden-pc]="i.hidden === 'pc'">
|
|
@@ -469,9 +457,9 @@ class LayoutDefaultHeaderComponent {
|
|
|
469
457
|
<ng-template [ngTemplateOutlet]="render" [ngTemplateOutletContext]="{ $implicit: right }" />
|
|
470
458
|
</ul>
|
|
471
459
|
</div>
|
|
472
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
460
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
473
461
|
}
|
|
474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultHeaderComponent, decorators: [{
|
|
475
463
|
type: Component,
|
|
476
464
|
args: [{
|
|
477
465
|
selector: 'layout-default-header',
|
|
@@ -519,7 +507,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
519
507
|
},
|
|
520
508
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
521
509
|
}]
|
|
522
|
-
}],
|
|
510
|
+
}], propDecorators: { items: [{
|
|
523
511
|
type: Input
|
|
524
512
|
}] } });
|
|
525
513
|
|
|
@@ -597,8 +585,8 @@ class LayoutDefaultComponent {
|
|
|
597
585
|
});
|
|
598
586
|
doc.body.classList[layout.colorWeak ? 'add' : 'remove']('color-weak');
|
|
599
587
|
}
|
|
600
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
601
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0
|
|
588
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultComponent, deps: [{ token: i1$1.Router }, { token: i2$1.NzMessageService }, { token: i3$1.SettingsService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DOCUMENT }, { token: LayoutDefaultService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
589
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: LayoutDefaultComponent, 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: `
|
|
602
590
|
@if (showFetching) {
|
|
603
591
|
<div class="alain-default__progress-bar"></div>
|
|
604
592
|
}
|
|
@@ -633,15 +621,9 @@ class LayoutDefaultComponent {
|
|
|
633
621
|
<ng-container *ngTemplateOutlet="content" />
|
|
634
622
|
<ng-content />
|
|
635
623
|
</section>
|
|
636
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
624
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NzIconDirective, selector: "[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"] }] }); }
|
|
637
625
|
}
|
|
638
|
-
|
|
639
|
-
InputBoolean()
|
|
640
|
-
], LayoutDefaultComponent.prototype, "fetchingStrictly", void 0);
|
|
641
|
-
__decorate([
|
|
642
|
-
InputBoolean()
|
|
643
|
-
], LayoutDefaultComponent.prototype, "fetching", void 0);
|
|
644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LayoutDefaultComponent, decorators: [{
|
|
626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultComponent, decorators: [{
|
|
645
627
|
type: Component,
|
|
646
628
|
args: [{
|
|
647
629
|
selector: 'layout-default',
|
|
@@ -683,7 +665,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
683
665
|
</section>
|
|
684
666
|
`
|
|
685
667
|
}]
|
|
686
|
-
}], ctorParameters: () => [{ type:
|
|
668
|
+
}], ctorParameters: () => [{ type: i1$1.Router }, { type: i2$1.NzMessageService }, { type: i3$1.SettingsService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
687
669
|
type: Inject,
|
|
688
670
|
args: [DOCUMENT]
|
|
689
671
|
}] }, { type: LayoutDefaultService }], propDecorators: { headerItems: [{
|
|
@@ -702,16 +684,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
702
684
|
}], customError: [{
|
|
703
685
|
type: Input
|
|
704
686
|
}], fetchingStrictly: [{
|
|
705
|
-
type: Input
|
|
687
|
+
type: Input,
|
|
688
|
+
args: [{ transform: booleanAttribute }]
|
|
706
689
|
}], fetching: [{
|
|
707
|
-
type: Input
|
|
690
|
+
type: Input,
|
|
691
|
+
args: [{ transform: booleanAttribute }]
|
|
708
692
|
}] } });
|
|
709
693
|
|
|
710
694
|
class LayoutDefaultHeaderItemTriggerDirective {
|
|
711
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
712
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0
|
|
695
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultHeaderItemTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
696
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0", type: LayoutDefaultHeaderItemTriggerDirective, selector: "[layout-default-header-item-trigger]", host: { properties: { "class.alain-default__nav-item": "true" } }, ngImport: i0 }); }
|
|
713
697
|
}
|
|
714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultHeaderItemTriggerDirective, decorators: [{
|
|
715
699
|
type: Directive,
|
|
716
700
|
args: [{
|
|
717
701
|
selector: '[layout-default-header-item-trigger]',
|
|
@@ -726,16 +710,10 @@ class LayoutDefaultTopMenuItemComponent {
|
|
|
726
710
|
this.selected = false;
|
|
727
711
|
this.disabled = false;
|
|
728
712
|
}
|
|
729
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
730
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
713
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultTopMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
714
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.1.0", type: LayoutDefaultTopMenuItemComponent, 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 }); }
|
|
731
715
|
}
|
|
732
|
-
|
|
733
|
-
InputBoolean()
|
|
734
|
-
], LayoutDefaultTopMenuItemComponent.prototype, "selected", void 0);
|
|
735
|
-
__decorate([
|
|
736
|
-
InputBoolean()
|
|
737
|
-
], LayoutDefaultTopMenuItemComponent.prototype, "disabled", void 0);
|
|
738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LayoutDefaultTopMenuItemComponent, decorators: [{
|
|
716
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultTopMenuItemComponent, decorators: [{
|
|
739
717
|
type: Component,
|
|
740
718
|
args: [{
|
|
741
719
|
selector: 'layout-default-top-menu-item',
|
|
@@ -751,9 +729,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
751
729
|
encapsulation: ViewEncapsulation.None
|
|
752
730
|
}]
|
|
753
731
|
}], propDecorators: { selected: [{
|
|
754
|
-
type: Input
|
|
732
|
+
type: Input,
|
|
733
|
+
args: [{ transform: booleanAttribute }]
|
|
755
734
|
}], disabled: [{
|
|
756
|
-
type: Input
|
|
735
|
+
type: Input,
|
|
736
|
+
args: [{ transform: booleanAttribute }]
|
|
757
737
|
}] } });
|
|
758
738
|
|
|
759
739
|
const COMPONENTS = [
|
|
@@ -765,8 +745,8 @@ const COMPONENTS = [
|
|
|
765
745
|
LayoutDefaultTopMenuItemComponent
|
|
766
746
|
];
|
|
767
747
|
class LayoutDefaultModule {
|
|
768
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0
|
|
769
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0
|
|
748
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
749
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultModule, declarations: [LayoutDefaultComponent,
|
|
770
750
|
LayoutDefaultNavComponent,
|
|
771
751
|
LayoutDefaultHeaderComponent,
|
|
772
752
|
LayoutDefaultHeaderItemComponent,
|
|
@@ -784,7 +764,7 @@ class LayoutDefaultModule {
|
|
|
784
764
|
LayoutDefaultHeaderItemComponent,
|
|
785
765
|
LayoutDefaultHeaderItemTriggerDirective,
|
|
786
766
|
LayoutDefaultTopMenuItemComponent] }); }
|
|
787
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0
|
|
767
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultModule, imports: [CommonModule,
|
|
788
768
|
RouterModule,
|
|
789
769
|
NzToolTipModule,
|
|
790
770
|
NzIconModule,
|
|
@@ -793,7 +773,7 @@ class LayoutDefaultModule {
|
|
|
793
773
|
NzMessageModule,
|
|
794
774
|
NzBadgeModule] }); }
|
|
795
775
|
}
|
|
796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0
|
|
776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: LayoutDefaultModule, decorators: [{
|
|
797
777
|
type: NgModule,
|
|
798
778
|
args: [{
|
|
799
779
|
imports: [
|