@yelon/bis 15.0.0-beta.5 → 15.0.0-beta.7
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/esm2020/layout/layout-basic/index.mjs +1 -2
- package/esm2020/layout/layout-basic/layout-basic.component.mjs +29 -31
- package/fesm2015/layout.mjs +18 -102
- package/fesm2015/layout.mjs.map +1 -1
- package/fesm2020/layout.mjs +18 -102
- package/fesm2020/layout.mjs.map +1 -1
- package/layout/layout-basic/index.d.ts +0 -1
- package/layout/layout-basic/layout-basic.component.d.ts +2 -5
- package/package.json +11 -11
- package/esm2020/layout/layout-basic/layout-display.service.mjs +0 -87
- package/layout/layout-basic/layout-display.service.d.ts +0 -15
package/fesm2020/layout.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Component, ChangeDetectionStrategy, HostListener, Injectable, Inject, Input, Optional, NgModule, APP_INITIALIZER } from '@angular/core';
|
|
3
|
+
import { forkJoin, map, Subject, takeUntil, of, mergeMap, mergeAll, BehaviorSubject, throwError, filter, take, switchMap, catchError } from 'rxjs';
|
|
4
4
|
import * as i1$3 from '@yelon/util';
|
|
5
|
-
import {
|
|
5
|
+
import { WINDOW, log as log$1, deepCopy, YunzaiConfigService } from '@yelon/util';
|
|
6
|
+
import * as i1$5 from '@yelon/theme/layout-default';
|
|
6
7
|
import * as i1$4 from '@yelon/cache';
|
|
7
8
|
import { CacheService } from '@yelon/cache';
|
|
8
9
|
import * as i3$3 from '@yelon/socket';
|
|
9
|
-
import * as i4$3 from '@angular/router';
|
|
10
|
-
import { Router, RouterModule } from '@angular/router';
|
|
11
10
|
import * as i4$1 from '@angular/common';
|
|
12
11
|
import { registerLocaleData, DOCUMENT, CommonModule } from '@angular/common';
|
|
12
|
+
import * as i5$1 from '@angular/router';
|
|
13
|
+
import { Router, RouterModule } from '@angular/router';
|
|
13
14
|
import * as i6$1 from '@yelon/abc/reuse-tab';
|
|
14
|
-
import * as i7$2 from '@yelon/theme/layout-default';
|
|
15
15
|
import * as i3 from 'ng-zorro-antd/core/transition-patch';
|
|
16
16
|
import * as i6 from 'ng-zorro-antd/menu';
|
|
17
17
|
import * as i7 from 'ng-zorro-antd/dropdown';
|
|
@@ -58,89 +58,6 @@ var NavType;
|
|
|
58
58
|
NavType["TILE"] = "tile";
|
|
59
59
|
})(NavType || (NavType = {}));
|
|
60
60
|
|
|
61
|
-
class LayoutDisplayService {
|
|
62
|
-
constructor() {
|
|
63
|
-
this.displayNav = new BehaviorSubject(true);
|
|
64
|
-
this.displayAside = new BehaviorSubject(true);
|
|
65
|
-
this.displayReuseTab = new BehaviorSubject(true);
|
|
66
|
-
this.destroy$ = new Subject();
|
|
67
|
-
if (getUrlParam(window.location.href, 'displayNav') !== null) {
|
|
68
|
-
this.hide('nav');
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
this.display('nav');
|
|
72
|
-
}
|
|
73
|
-
if (getUrlParam(window.location.href, 'displayAside') !== null) {
|
|
74
|
-
this.hide('aside');
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
this.display('aside');
|
|
78
|
-
}
|
|
79
|
-
if (getUrlParam(window.location.href, 'displayReuseTab') !== null) {
|
|
80
|
-
this.hide('reuseTab');
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
this.display('reuseTab');
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
display(component) {
|
|
87
|
-
switch (component) {
|
|
88
|
-
case 'nav':
|
|
89
|
-
this.displayNav.next(true);
|
|
90
|
-
break;
|
|
91
|
-
case 'aside':
|
|
92
|
-
this.displayAside.next(true);
|
|
93
|
-
break;
|
|
94
|
-
case 'reuseTab':
|
|
95
|
-
this.displayReuseTab.next(true);
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
resizeWindow();
|
|
99
|
-
}
|
|
100
|
-
hide(component) {
|
|
101
|
-
switch (component) {
|
|
102
|
-
case 'nav':
|
|
103
|
-
this.displayNav.next(false);
|
|
104
|
-
break;
|
|
105
|
-
case 'aside':
|
|
106
|
-
this.displayAside.next(false);
|
|
107
|
-
break;
|
|
108
|
-
case 'reuseTab':
|
|
109
|
-
this.displayReuseTab.next(false);
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
resizeWindow();
|
|
113
|
-
}
|
|
114
|
-
listen(component, callback) {
|
|
115
|
-
this.displayNav.pipe(tap(this.destroy$)).subscribe(display => {
|
|
116
|
-
if (component === 'nav') {
|
|
117
|
-
callback(display);
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
this.displayAside.pipe(tap(this.destroy$)).subscribe(display => {
|
|
121
|
-
if (component === 'aside') {
|
|
122
|
-
callback(display);
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
this.displayReuseTab.pipe(tap(this.destroy$)).subscribe(display => {
|
|
126
|
-
if (component === 'reuseTab') {
|
|
127
|
-
callback(display);
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
ngOnDestroy() {
|
|
132
|
-
this.destroy$.complete();
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
LayoutDisplayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutDisplayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
136
|
-
LayoutDisplayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutDisplayService, providedIn: 'root' });
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LayoutDisplayService, decorators: [{
|
|
138
|
-
type: Injectable,
|
|
139
|
-
args: [{
|
|
140
|
-
providedIn: 'root'
|
|
141
|
-
}]
|
|
142
|
-
}], ctorParameters: function () { return []; } });
|
|
143
|
-
|
|
144
61
|
class YunzaiClearStorageComponent {
|
|
145
62
|
constructor(modalSrv, messageSrv) {
|
|
146
63
|
this.modalSrv = modalSrv;
|
|
@@ -1257,7 +1174,7 @@ class YunzaiLayoutBasicComponent {
|
|
|
1257
1174
|
if (!this.state.display.nav) {
|
|
1258
1175
|
cascadingStyleSheet = {
|
|
1259
1176
|
...cascadingStyleSheet,
|
|
1260
|
-
top:
|
|
1177
|
+
top: '0px'
|
|
1261
1178
|
};
|
|
1262
1179
|
}
|
|
1263
1180
|
if (!this.state.display.aside) {
|
|
@@ -1268,11 +1185,10 @@ class YunzaiLayoutBasicComponent {
|
|
|
1268
1185
|
}
|
|
1269
1186
|
return cascadingStyleSheet;
|
|
1270
1187
|
}
|
|
1271
|
-
constructor(layoutDisplayService, cacheService, stompService,
|
|
1188
|
+
constructor(layoutDisplayService, cacheService, stompService, win) {
|
|
1272
1189
|
this.layoutDisplayService = layoutDisplayService;
|
|
1273
1190
|
this.cacheService = cacheService;
|
|
1274
1191
|
this.stompService = stompService;
|
|
1275
|
-
this.router = router;
|
|
1276
1192
|
this.win = win;
|
|
1277
1193
|
this.NavType = NavType;
|
|
1278
1194
|
this.state = {
|
|
@@ -1331,28 +1247,28 @@ class YunzaiLayoutBasicComponent {
|
|
|
1331
1247
|
}
|
|
1332
1248
|
toIndex() {
|
|
1333
1249
|
const defaultRoute = this.cacheService.get('_yz_defaultRoute', { mode: 'none' });
|
|
1334
|
-
|
|
1250
|
+
log$1('YunzaiLayoutBasicComponent: ', `todo: the default route was ${defaultRoute}, 但是还没想好如何实现.`);
|
|
1335
1251
|
}
|
|
1336
1252
|
onNavTypeChange(type) {
|
|
1337
1253
|
this.cacheService.set('_yz_header_type', type);
|
|
1338
1254
|
this.win.location.reload();
|
|
1339
1255
|
}
|
|
1340
1256
|
addLayoutDisplayListener() {
|
|
1257
|
+
this.layoutDisplayService.listen('reuseTab', (display) => {
|
|
1258
|
+
this.state.display.reusetab = display;
|
|
1259
|
+
});
|
|
1341
1260
|
this.layoutDisplayService.listen('nav', (display) => {
|
|
1342
1261
|
this.state.display.nav = display;
|
|
1343
1262
|
});
|
|
1344
1263
|
this.layoutDisplayService.listen('aside', (display) => {
|
|
1345
1264
|
this.state.display.aside = display;
|
|
1346
1265
|
});
|
|
1347
|
-
this.layoutDisplayService.listen('reuseTab', (display) => {
|
|
1348
|
-
this.state.display.reusetab = display;
|
|
1349
|
-
});
|
|
1350
1266
|
}
|
|
1351
1267
|
ngOnDestroy() {
|
|
1352
1268
|
this.state.destroy$.complete();
|
|
1353
1269
|
}
|
|
1354
1270
|
}
|
|
1355
|
-
YunzaiLayoutBasicComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutBasicComponent, deps: [{ token: LayoutDisplayService }, { token: i1$4.CacheService }, { token: i3$3.StompService }, { token:
|
|
1271
|
+
YunzaiLayoutBasicComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutBasicComponent, deps: [{ token: i1$5.LayoutDisplayService }, { token: i1$4.CacheService }, { token: i3$3.StompService }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Component });
|
|
1356
1272
|
YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: YunzaiLayoutBasicComponent, selector: "yz-layout-basic", ngImport: i0, template: `<layout-default
|
|
1357
1273
|
[options]="options"
|
|
1358
1274
|
[asideUser]="asideUserTpl"
|
|
@@ -1436,7 +1352,7 @@ YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
1436
1352
|
</ng-template>
|
|
1437
1353
|
<ng-template #noneTpl>
|
|
1438
1354
|
<router-outlet></router-outlet>
|
|
1439
|
-
</ng-template> `, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i4$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type:
|
|
1355
|
+
</ng-template> `, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i4$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i5$1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i5$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i6$1.ReuseTabComponent, selector: "reuse-tab, [reuse-tab]", inputs: ["mode", "i18n", "debug", "max", "tabMaxWidth", "excludes", "allowClose", "keepingScroll", "storageState", "keepingScrollContainer", "customContextMenu", "tabBarExtraContent", "tabBarGutter", "tabBarStyle", "tabType", "routeParamMatchMode", "disabled", "titleRender", "canClose"], outputs: ["change", "close"], exportAs: ["reuseTab"] }, { kind: "component", type: i1$5.LayoutDefaultComponent, selector: "layout-default", inputs: ["options", "asideUser", "asideBottom", "nav", "content", "customError"], exportAs: ["layoutDefault"] }, { kind: "component", type: i1$5.LayoutDefaultHeaderItemComponent, selector: "layout-default-header-item", inputs: ["hidden", "direction"] }, { kind: "directive", type: i1$5.LayoutDefaultHeaderItemTriggerDirective, selector: "[layout-default-header-item-trigger]" }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i6.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i6.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i7.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i7.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i9.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }, { kind: "component", type: YunzaiClearStorageComponent, selector: "yunzai-clearstorage" }, { kind: "component", type: YunzaiFullScreenComponent, selector: "yunzai-fullscreen" }, { kind: "component", type: YunzaiI18NComponent, selector: "yunzai-i18n", inputs: ["showLangText"] }, { kind: "component", type: YunzaiNotifyComponent, selector: "yunzai-notify" }, { kind: "component", type: YunzaiThemBtnComponent, selector: "yunzai-theme-btn", inputs: ["types", "devTips", "deployUrl"] }, { kind: "component", type: YunzaiUserComponent, selector: "yunzai-user" }, { kind: "component", type: LayoutNavApplicationComponent, selector: "layout-nav-application" }, { kind: "component", type: LayoutNavGroupComponent, selector: "layout-nav-group" }, { kind: "component", type: LayoutNavTileComponent, selector: "layout-nav-tile" }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }] });
|
|
1440
1356
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: YunzaiLayoutBasicComponent, decorators: [{
|
|
1441
1357
|
type: Component,
|
|
1442
1358
|
args: [{
|
|
@@ -1526,7 +1442,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1526
1442
|
<router-outlet></router-outlet>
|
|
1527
1443
|
</ng-template> `
|
|
1528
1444
|
}]
|
|
1529
|
-
}], ctorParameters: function () { return [{ type: LayoutDisplayService }, { type: i1$4.CacheService }, { type: i3$3.StompService }, { type:
|
|
1445
|
+
}], ctorParameters: function () { return [{ type: i1$5.LayoutDisplayService }, { type: i1$4.CacheService }, { type: i3$3.StompService }, { type: undefined, decorators: [{
|
|
1530
1446
|
type: Inject,
|
|
1531
1447
|
args: [WINDOW]
|
|
1532
1448
|
}] }]; } });
|
|
@@ -1622,14 +1538,14 @@ class ActGuard {
|
|
|
1622
1538
|
});
|
|
1623
1539
|
}
|
|
1624
1540
|
}
|
|
1625
|
-
ActGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, deps: [{ token: i1$3.YunzaiConfigService }, { token: i1$4.CacheService }, { token: i1$3.PathToRegexpService }, { token:
|
|
1541
|
+
ActGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, deps: [{ token: i1$3.YunzaiConfigService }, { token: i1$4.CacheService }, { token: i1$3.PathToRegexpService }, { token: i5$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1626
1542
|
ActGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, providedIn: 'root' });
|
|
1627
1543
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ActGuard, decorators: [{
|
|
1628
1544
|
type: Injectable,
|
|
1629
1545
|
args: [{
|
|
1630
1546
|
providedIn: 'root'
|
|
1631
1547
|
}]
|
|
1632
|
-
}], ctorParameters: function () { return [{ type: i1$3.YunzaiConfigService }, { type: i1$4.CacheService }, { type: i1$3.PathToRegexpService }, { type:
|
|
1548
|
+
}], ctorParameters: function () { return [{ type: i1$3.YunzaiConfigService }, { type: i1$4.CacheService }, { type: i1$3.PathToRegexpService }, { type: i5$1.Router }]; } });
|
|
1633
1549
|
|
|
1634
1550
|
class YunzaiAuthService {
|
|
1635
1551
|
constructor(injector) {
|
|
@@ -2975,5 +2891,5 @@ const YUNZAI_APPINIT_PROVIDES = [
|
|
|
2975
2891
|
* Generated bundle index. Do not edit.
|
|
2976
2892
|
*/
|
|
2977
2893
|
|
|
2978
|
-
export { ActGuard, BUSINESS_DEFAULT_CONFIG,
|
|
2894
|
+
export { ActGuard, BUSINESS_DEFAULT_CONFIG, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent, NavType, TopicType, YUNZAI_APPINIT_PROVIDES, YUNZAI_APPINIT_PROVIDES as YZ_APPINIT_PROVIDES, YunzaiAuthService, YunzaiClearStorageComponent, YunzaiDefaultInterceptor, YunzaiFullScreenComponent, YunzaiI18NComponent, YunzaiI18NService, YunzaiLayoutBasicComponent, YunzaiLayoutModule, YunzaiNotifyComponent, YunzaiStartupService, YunzaiStartupServiceFactory, YunzaiThemBtnComponent, YunzaiUserComponent, YunzaiAuthService as YzAuthService, YunzaiDefaultInterceptor as YzDefaultInterceptor, YunzaiI18NService as YzI18NService, YunzaiLayoutBasicComponent as YzLayoutBasicComponent, YunzaiStartupService as YzStartupService, YunzaiStartupServiceFactory as YzStartupServiceFactory, generateAbility, mapYzSideToYelonMenu, mergeBisConfig };
|
|
2979
2895
|
//# sourceMappingURL=layout.mjs.map
|