@yelon/bis 15.1.0 → 15.1.1-beta.0-cdf36c8
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/layout-basic.component.mjs +33 -19
- package/esm2020/layout/layout-nav/layout-nav-application.component.mjs +71 -50
- package/esm2020/layout/layout-nav/layout-nav-group.component.mjs +3 -3
- package/esm2020/layout/layout-nav/layout-nav-tile.component.mjs +3 -3
- package/esm2020/layout/layout-nav/types.mjs +2 -7
- package/esm2020/layout/public_api.mjs +2 -1
- package/esm2020/layout/widgets/yunzai-clear-storage.component.mjs +6 -6
- package/esm2020/layout/widgets/yunzai-fullscreen.component.mjs +6 -6
- package/esm2020/layout/widgets/yunzai-i18n.component.mjs +38 -11
- package/esm2020/layout/widgets/yunzai-notify.component.mjs +10 -10
- package/esm2020/layout/widgets/yunzai-theme-btn.component.mjs +3 -3
- package/esm2020/layout/widgets/yunzai-user.component.mjs +6 -6
- package/esm2020/layout/yunzai-act.guard.mjs +3 -3
- package/esm2020/layout/yunzai-auth.service.mjs +3 -3
- package/esm2020/layout/yunzai-default.interceptor.mjs +6 -4
- package/esm2020/layout/yunzai-i18n.service.mjs +88 -51
- package/esm2020/layout/yunzai-lang.mjs +114 -0
- package/esm2020/layout/yunzai-layout.module.mjs +4 -4
- package/esm2020/layout/yunzai-startup.service.mjs +5 -5
- package/fesm2015/layout.mjs +386 -186
- package/fesm2015/layout.mjs.map +1 -1
- package/fesm2020/layout.mjs +386 -186
- package/fesm2020/layout.mjs.map +1 -1
- package/layout/layout-basic/layout-basic.component.d.ts +1 -0
- package/layout/layout-nav/layout-nav-application.component.d.ts +7 -6
- package/layout/layout-nav/types.d.ts +1 -6
- package/layout/public_api.d.ts +1 -0
- package/layout/widgets/yunzai-i18n.component.d.ts +6 -7
- package/layout/yunzai-i18n.service.d.ts +14 -9
- package/layout/yunzai-lang.d.ts +11 -0
- package/package.json +11 -11
package/fesm2015/layout.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ChangeDetectionStrategy, HostListener, Injectable, Inject, Input, Optional, NgModule, APP_INITIALIZER } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import * as i1$
|
|
5
|
-
import { WINDOW, log as log$1, deepCopy, YunzaiConfigService } from '@yelon/util';
|
|
3
|
+
import { Subject, takeUntil, of, catchError, forkJoin, map as map$1, mergeMap, mergeAll, BehaviorSubject, throwError, filter, take, switchMap } from 'rxjs';
|
|
4
|
+
import * as i1$4 from '@yelon/util';
|
|
5
|
+
import { WINDOW, hasFavicon, setFavicon, log as log$1, deepCopy, YunzaiConfigService } from '@yelon/util';
|
|
6
6
|
import * as i1$5 from '@yelon/theme/layout-default';
|
|
7
|
-
import * as i1$
|
|
7
|
+
import * as i1$3 from '@yelon/cache';
|
|
8
8
|
import { CacheService } from '@yelon/cache';
|
|
9
9
|
import * as i3$3 from '@yelon/socket';
|
|
10
10
|
import * as i4$1 from '@angular/common';
|
|
@@ -20,16 +20,26 @@ import * as i9 from 'ng-zorro-antd/avatar';
|
|
|
20
20
|
import * as i1 from 'ng-zorro-antd/modal';
|
|
21
21
|
import * as i1$1 from 'ng-zorro-antd/message';
|
|
22
22
|
import * as i1$2 from '@yelon/theme';
|
|
23
|
-
import { zh_CN as zh_CN$1, zh_TW as zh_TW$1, en_US as en_US$1, YunzaiI18nBaseService, YUNZAI_I18N_TOKEN, _HttpClient } from '@yelon/theme';
|
|
23
|
+
import { zh_CN as zh_CN$1, zh_TW as zh_TW$1, en_US as en_US$1, el_GR as el_GR$1, es_ES as es_ES$1, fr_FR as fr_FR$1, hr_HR as hr_HR$1, it_IT as it_IT$1, ko_KR as ko_KR$1, pl_PL as pl_PL$1, sl_SI as sl_SI$1, tr_TR as tr_TR$1, YunzaiI18nBaseService, YUNZAI_I18N_TOKEN, _HttpClient } from '@yelon/theme';
|
|
24
24
|
import screenfull from 'screenfull';
|
|
25
25
|
import { __decorate } from 'tslib';
|
|
26
26
|
import { InputBoolean } from '@yelon/util/decorator';
|
|
27
27
|
import ngEn from '@angular/common/locales/en';
|
|
28
|
+
import { zhCN, zhTW, enUS, el, es, fr, hr, it, ko, pl, sl, tr } from 'date-fns/locale';
|
|
29
|
+
import { map } from 'rxjs/operators';
|
|
30
|
+
import * as i2 from 'ng-zorro-antd/i18n';
|
|
31
|
+
import { zh_CN, zh_TW, en_US, el_GR, es_ES, fr_FR, hr_HR, it_IT, ko_KR, pl_PL, sl_SI, tr_TR } from 'ng-zorro-antd/i18n';
|
|
32
|
+
import ngElGr from '@angular/common/locales/el';
|
|
33
|
+
import ngEsEs from '@angular/common/locales/es';
|
|
34
|
+
import ngFr from '@angular/common/locales/fr';
|
|
35
|
+
import ngHr from '@angular/common/locales/hr';
|
|
36
|
+
import ngIt from '@angular/common/locales/it';
|
|
37
|
+
import ngKo from '@angular/common/locales/ko';
|
|
38
|
+
import ngPl from '@angular/common/locales/pl';
|
|
39
|
+
import ngSl from '@angular/common/locales/sl';
|
|
40
|
+
import ngTr from '@angular/common/locales/tr';
|
|
28
41
|
import ngZh from '@angular/common/locales/zh';
|
|
29
42
|
import ngZhTw from '@angular/common/locales/zh-Hant';
|
|
30
|
-
import { zhCN, zhTW, enUS } from 'date-fns/locale';
|
|
31
|
-
import * as i2 from 'ng-zorro-antd/i18n';
|
|
32
|
-
import { zh_CN, zh_TW, en_US } from 'ng-zorro-antd/i18n';
|
|
33
43
|
import * as i3$1 from '@angular/cdk/platform';
|
|
34
44
|
import * as i4 from '@yelon/util/config';
|
|
35
45
|
import { YunzaiConfigService as YunzaiConfigService$1 } from '@yelon/util/config';
|
|
@@ -73,18 +83,18 @@ class YunzaiClearStorageComponent {
|
|
|
73
83
|
});
|
|
74
84
|
}
|
|
75
85
|
}
|
|
76
|
-
YunzaiClearStorageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
77
|
-
YunzaiClearStorageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
86
|
+
YunzaiClearStorageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiClearStorageComponent, deps: [{ token: i1.NzModalService }, { token: i1$1.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
+
YunzaiClearStorageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiClearStorageComponent, selector: "yunzai-clearstorage", host: { listeners: { "click": "_click()" }, properties: { "class.d-block": "true" } }, ngImport: i0, template: `
|
|
78
88
|
<i nz-icon nzType="tool"></i>
|
|
79
|
-
{{ '
|
|
89
|
+
{{ 'storage.clear' | i18n }}
|
|
80
90
|
`, isInline: true, dependencies: [{ 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: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiClearStorageComponent, decorators: [{
|
|
82
92
|
type: Component,
|
|
83
93
|
args: [{
|
|
84
94
|
selector: 'yunzai-clearstorage',
|
|
85
95
|
template: `
|
|
86
96
|
<i nz-icon nzType="tool"></i>
|
|
87
|
-
{{ '
|
|
97
|
+
{{ 'storage.clear' | i18n }}
|
|
88
98
|
`,
|
|
89
99
|
host: {
|
|
90
100
|
'[class.d-block]': 'true'
|
|
@@ -109,18 +119,18 @@ class YunzaiFullScreenComponent {
|
|
|
109
119
|
}
|
|
110
120
|
}
|
|
111
121
|
}
|
|
112
|
-
YunzaiFullScreenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
113
|
-
YunzaiFullScreenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
122
|
+
YunzaiFullScreenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiFullScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
123
|
+
YunzaiFullScreenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiFullScreenComponent, selector: "yunzai-fullscreen", host: { listeners: { "window:resize": "_resize()", "click": "_click()" }, properties: { "class.d-block": "true" } }, ngImport: i0, template: `
|
|
114
124
|
<i nz-icon [nzType]="status ? 'fullscreen-exit' : 'fullscreen'"></i>
|
|
115
|
-
{{ (status ? '
|
|
125
|
+
{{ (status ? 'exitFullscreen' : 'fullscreen') | i18n }}
|
|
116
126
|
`, isInline: true, dependencies: [{ 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: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiFullScreenComponent, decorators: [{
|
|
118
128
|
type: Component,
|
|
119
129
|
args: [{
|
|
120
130
|
selector: 'yunzai-fullscreen',
|
|
121
131
|
template: `
|
|
122
132
|
<i nz-icon [nzType]="status ? 'fullscreen-exit' : 'fullscreen'"></i>
|
|
123
|
-
{{ (status ? '
|
|
133
|
+
{{ (status ? 'exitFullscreen' : 'fullscreen') | i18n }}
|
|
124
134
|
`,
|
|
125
135
|
host: {
|
|
126
136
|
'[class.d-block]': 'true'
|
|
@@ -135,8 +145,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
135
145
|
args: ['click']
|
|
136
146
|
}] } });
|
|
137
147
|
|
|
138
|
-
const
|
|
139
|
-
|
|
148
|
+
const BUSINESS_DEFAULT_CONFIG = {
|
|
149
|
+
baseUrl: '/backstage',
|
|
150
|
+
systemCode: 'portal',
|
|
151
|
+
loginForm: null,
|
|
152
|
+
refreshTokenEnabled: true,
|
|
153
|
+
refreshTokenType: 're-request'
|
|
154
|
+
};
|
|
155
|
+
function mergeBisConfig(srv) {
|
|
156
|
+
return srv.merge('bis', BUSINESS_DEFAULT_CONFIG);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const YUNZAI_LANGS = {
|
|
140
160
|
'zh-CN': {
|
|
141
161
|
text: '简体中文',
|
|
142
162
|
ng: ngZh,
|
|
@@ -160,23 +180,100 @@ const LANGS = {
|
|
|
160
180
|
date: enUS,
|
|
161
181
|
yelon: en_US$1,
|
|
162
182
|
abbr: '🇬🇧'
|
|
183
|
+
},
|
|
184
|
+
'el-GR': {
|
|
185
|
+
text: 'Ελληνικά',
|
|
186
|
+
ng: ngElGr,
|
|
187
|
+
zorro: el_GR,
|
|
188
|
+
date: el,
|
|
189
|
+
yelon: el_GR$1,
|
|
190
|
+
abbr: '🇬🇷'
|
|
191
|
+
},
|
|
192
|
+
'es-ES': {
|
|
193
|
+
text: 'Español',
|
|
194
|
+
ng: ngEsEs,
|
|
195
|
+
zorro: es_ES,
|
|
196
|
+
date: es,
|
|
197
|
+
yelon: es_ES$1,
|
|
198
|
+
abbr: '🇪🇸'
|
|
199
|
+
},
|
|
200
|
+
'fr-FR': {
|
|
201
|
+
text: 'Français',
|
|
202
|
+
ng: ngFr,
|
|
203
|
+
zorro: fr_FR,
|
|
204
|
+
date: fr,
|
|
205
|
+
yelon: fr_FR$1,
|
|
206
|
+
abbr: '🇫🇷'
|
|
207
|
+
},
|
|
208
|
+
'hr-HR': {
|
|
209
|
+
text: 'Hrvatski',
|
|
210
|
+
ng: ngHr,
|
|
211
|
+
zorro: hr_HR,
|
|
212
|
+
date: hr,
|
|
213
|
+
yelon: hr_HR$1,
|
|
214
|
+
abbr: '🇭🇷'
|
|
215
|
+
},
|
|
216
|
+
'it-IT': {
|
|
217
|
+
text: 'Italiano',
|
|
218
|
+
ng: ngIt,
|
|
219
|
+
zorro: it_IT,
|
|
220
|
+
date: it,
|
|
221
|
+
yelon: it_IT$1,
|
|
222
|
+
abbr: '🇮🇹'
|
|
223
|
+
},
|
|
224
|
+
'ko-KR': {
|
|
225
|
+
text: '한국어',
|
|
226
|
+
ng: ngKo,
|
|
227
|
+
zorro: ko_KR,
|
|
228
|
+
date: ko,
|
|
229
|
+
yelon: ko_KR$1,
|
|
230
|
+
abbr: '🇰🇷'
|
|
231
|
+
},
|
|
232
|
+
'pl-PL': {
|
|
233
|
+
text: 'Polski',
|
|
234
|
+
ng: ngPl,
|
|
235
|
+
zorro: pl_PL,
|
|
236
|
+
date: pl,
|
|
237
|
+
yelon: pl_PL$1,
|
|
238
|
+
abbr: '🇵🇱'
|
|
239
|
+
},
|
|
240
|
+
'sl-SI': {
|
|
241
|
+
text: 'Slovenščina',
|
|
242
|
+
ng: ngSl,
|
|
243
|
+
zorro: sl_SI,
|
|
244
|
+
date: sl,
|
|
245
|
+
yelon: sl_SI$1,
|
|
246
|
+
abbr: '🇸🇮'
|
|
247
|
+
},
|
|
248
|
+
'tr-TR': {
|
|
249
|
+
text: 'Türkçe',
|
|
250
|
+
ng: ngTr,
|
|
251
|
+
zorro: tr_TR,
|
|
252
|
+
date: tr,
|
|
253
|
+
yelon: tr_TR$1,
|
|
254
|
+
abbr: '🇹🇷'
|
|
163
255
|
}
|
|
164
256
|
};
|
|
257
|
+
|
|
258
|
+
const DEFAULT = 'zh-CN';
|
|
165
259
|
class YunzaiI18NService extends YunzaiI18nBaseService {
|
|
166
|
-
constructor(http, settings, nzI18nService, yelonLocaleService, platform, cogSrv) {
|
|
260
|
+
constructor(http, settings, nzI18nService, yelonLocaleService, platform, cogSrv, cacheService) {
|
|
167
261
|
super(cogSrv);
|
|
168
262
|
this.http = http;
|
|
169
263
|
this.settings = settings;
|
|
170
264
|
this.nzI18nService = nzI18nService;
|
|
171
265
|
this.yelonLocaleService = yelonLocaleService;
|
|
172
266
|
this.platform = platform;
|
|
267
|
+
this.cacheService = cacheService;
|
|
173
268
|
this._defaultLang = DEFAULT;
|
|
174
|
-
this.
|
|
175
|
-
const item = LANGS[code];
|
|
176
|
-
return { code, text: item.text, abbr: item.abbr };
|
|
177
|
-
});
|
|
269
|
+
this.destroy$ = new Subject();
|
|
178
270
|
const defaultLang = this.getDefaultLang();
|
|
179
|
-
this.
|
|
271
|
+
this.bis = mergeBisConfig(cogSrv);
|
|
272
|
+
this.getLangs()
|
|
273
|
+
.pipe(takeUntil(this.destroy$))
|
|
274
|
+
.subscribe(langs => {
|
|
275
|
+
this._defaultLang = langs.findIndex(w => w.code === defaultLang) === -1 ? DEFAULT : defaultLang;
|
|
276
|
+
});
|
|
180
277
|
}
|
|
181
278
|
getDefaultLang() {
|
|
182
279
|
if (!this.platform.isBrowser) {
|
|
@@ -190,35 +287,89 @@ class YunzaiI18NService extends YunzaiI18nBaseService {
|
|
|
190
287
|
return arr.length <= 1 ? res : `${arr[0]}-${arr[1].toUpperCase()}`;
|
|
191
288
|
}
|
|
192
289
|
loadLangData(lang) {
|
|
193
|
-
|
|
290
|
+
if (ngDevMode) {
|
|
291
|
+
return this.http.get(`assets/tmp/i18n/${lang}.json`);
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
if (this.getLang(lang)) {
|
|
295
|
+
return of(this.getLang(lang));
|
|
296
|
+
}
|
|
297
|
+
return this.http
|
|
298
|
+
.get(`${this.bis.baseUrl}/i18n/api/v2/language/${lang}?_allow_anonymous`)
|
|
299
|
+
.pipe(catchError(() => this.http.get(`assets/tmp/i18n/${lang}.json`)));
|
|
300
|
+
}
|
|
194
301
|
}
|
|
195
302
|
use(lang, data) {
|
|
196
303
|
if (this._currentLang === lang)
|
|
197
304
|
return;
|
|
305
|
+
if (!ngDevMode) {
|
|
306
|
+
this.cacheLang(lang, data);
|
|
307
|
+
}
|
|
198
308
|
this._data = this.flatData(data, []);
|
|
199
|
-
const item =
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
309
|
+
const item = YUNZAI_LANGS[lang];
|
|
310
|
+
if (item) {
|
|
311
|
+
registerLocaleData(item.ng);
|
|
312
|
+
this.nzI18nService.setLocale(item.zorro);
|
|
313
|
+
this.nzI18nService.setDateLocale(item.date);
|
|
314
|
+
this.yelonLocaleService.setLocale(item.yelon);
|
|
315
|
+
this._currentLang = lang;
|
|
316
|
+
this._change$.next(lang);
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
registerLocaleData(ngEn);
|
|
320
|
+
this.nzI18nService.setLocale(en_US);
|
|
321
|
+
this.nzI18nService.setDateLocale(enUS);
|
|
322
|
+
this.yelonLocaleService.setLocale(en_US$1);
|
|
323
|
+
this._currentLang = lang;
|
|
324
|
+
this._change$.next(lang);
|
|
325
|
+
}
|
|
206
326
|
}
|
|
207
327
|
getLangs() {
|
|
208
|
-
|
|
328
|
+
const langs = Object.keys(YUNZAI_LANGS).map(code => {
|
|
329
|
+
const item = YUNZAI_LANGS[code];
|
|
330
|
+
return { code, text: item.text, abbr: item.abbr, image: undefined };
|
|
331
|
+
});
|
|
332
|
+
if (ngDevMode) {
|
|
333
|
+
return of(langs);
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
if (this.getCachedLangs().length > 0) {
|
|
337
|
+
return of(this.getCachedLangs());
|
|
338
|
+
}
|
|
339
|
+
return this.http.get(`${this.bis.baseUrl}/i18n/api/v2/language?_allow_anonymous`).pipe(map((response) => {
|
|
340
|
+
this.cacheLangs(response.data);
|
|
341
|
+
return response.data;
|
|
342
|
+
}), catchError(() => of(langs)));
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
cacheLang(lang, data) {
|
|
346
|
+
const key = `_yz_lang_${lang}`;
|
|
347
|
+
this.cacheService.set(key, data);
|
|
348
|
+
}
|
|
349
|
+
getLang(lang) {
|
|
350
|
+
const key = `_yz_lang_${lang}`;
|
|
351
|
+
return this.cacheService.get(key, { mode: 'none' });
|
|
352
|
+
}
|
|
353
|
+
cacheLangs(langs) {
|
|
354
|
+
const key = `_yz_langs`;
|
|
355
|
+
this.cacheService.set(key, langs);
|
|
356
|
+
}
|
|
357
|
+
getCachedLangs() {
|
|
358
|
+
const key = `_yz_langs`;
|
|
359
|
+
return this.cacheService.get(key, { mode: 'none' }) || [];
|
|
360
|
+
}
|
|
361
|
+
ngOnDestroy() {
|
|
362
|
+
this.destroy$.complete();
|
|
209
363
|
}
|
|
210
364
|
}
|
|
211
|
-
YunzaiI18NService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
212
|
-
YunzaiI18NService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
365
|
+
YunzaiI18NService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiI18NService, deps: [{ token: i1$2._HttpClient }, { token: i1$2.SettingsService }, { token: i2.NzI18nService }, { token: i1$2.YelonLocaleService }, { token: i3$1.Platform }, { token: i4.YunzaiConfigService }, { token: i1$3.CacheService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
366
|
+
YunzaiI18NService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiI18NService, providedIn: 'root' });
|
|
367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiI18NService, decorators: [{
|
|
214
368
|
type: Injectable,
|
|
215
369
|
args: [{ providedIn: 'root' }]
|
|
216
|
-
}], ctorParameters: function () { return [{ type: i1$2._HttpClient }, { type: i1$2.SettingsService }, { type: i2.NzI18nService }, { type: i1$2.YelonLocaleService }, { type: i3$1.Platform }, { type: i4.YunzaiConfigService }]; } });
|
|
370
|
+
}], ctorParameters: function () { return [{ type: i1$2._HttpClient }, { type: i1$2.SettingsService }, { type: i2.NzI18nService }, { type: i1$2.YelonLocaleService }, { type: i3$1.Platform }, { type: i4.YunzaiConfigService }, { type: i1$3.CacheService }]; } });
|
|
217
371
|
|
|
218
372
|
class YunzaiI18NComponent {
|
|
219
|
-
get langs() {
|
|
220
|
-
return this.i18n.getLangs();
|
|
221
|
-
}
|
|
222
373
|
get curLangCode() {
|
|
223
374
|
return this.settings.layout.lang;
|
|
224
375
|
}
|
|
@@ -226,8 +377,16 @@ class YunzaiI18NComponent {
|
|
|
226
377
|
this.settings = settings;
|
|
227
378
|
this.i18n = i18n;
|
|
228
379
|
this.doc = doc;
|
|
380
|
+
this.destroy$ = new Subject();
|
|
229
381
|
/** Whether to display language text */
|
|
230
382
|
this.showLangText = true;
|
|
383
|
+
this.langs = [];
|
|
384
|
+
this.i18n
|
|
385
|
+
.getLangs()
|
|
386
|
+
.pipe(takeUntil(this.destroy$))
|
|
387
|
+
.subscribe(langs => {
|
|
388
|
+
this.langs = langs;
|
|
389
|
+
});
|
|
231
390
|
}
|
|
232
391
|
change(lang) {
|
|
233
392
|
const spinEl = this.doc.createElement('div');
|
|
@@ -240,12 +399,15 @@ class YunzaiI18NComponent {
|
|
|
240
399
|
setTimeout(() => this.doc.location.reload());
|
|
241
400
|
});
|
|
242
401
|
}
|
|
402
|
+
ngOnDestroy() {
|
|
403
|
+
this.destroy$.complete();
|
|
404
|
+
}
|
|
243
405
|
}
|
|
244
|
-
YunzaiI18NComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
245
|
-
YunzaiI18NComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
406
|
+
YunzaiI18NComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiI18NComponent, deps: [{ token: i1$2.SettingsService }, { token: YUNZAI_I18N_TOKEN }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
407
|
+
YunzaiI18NComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiI18NComponent, selector: "yunzai-i18n", inputs: { showLangText: "showLangText" }, ngImport: i0, template: `
|
|
246
408
|
<div *ngIf="showLangText" nz-dropdown [nzDropdownMenu]="langMenu" nzPlacement="bottomRight">
|
|
247
409
|
<i nz-icon nzType="global"></i>
|
|
248
|
-
{{ '
|
|
410
|
+
{{ 'lang.nav' | i18n }}
|
|
249
411
|
<i nz-icon nzType="down"></i>
|
|
250
412
|
</div>
|
|
251
413
|
<i
|
|
@@ -264,7 +426,16 @@ YunzaiI18NComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
264
426
|
[nzSelected]="item.code === curLangCode"
|
|
265
427
|
(click)="change(item.code)"
|
|
266
428
|
>
|
|
267
|
-
<span role="img" [attr.aria-label]="item.text" class="pr-xs">{{ item.abbr }}</span>
|
|
429
|
+
<span *ngIf="!item.icon" role="img" [attr.aria-label]="item.text" class="pr-xs">{{ item.abbr }}</span>
|
|
430
|
+
<img
|
|
431
|
+
*ngIf="item.icon"
|
|
432
|
+
style="margin-right:4px"
|
|
433
|
+
width="50px"
|
|
434
|
+
height="30px"
|
|
435
|
+
[src]="'data:image/png;base64,' + item.icon"
|
|
436
|
+
[alt]="item.abbr"
|
|
437
|
+
class="pr-xs"
|
|
438
|
+
/>
|
|
268
439
|
{{ item.text }}
|
|
269
440
|
</li>
|
|
270
441
|
</ul>
|
|
@@ -273,14 +444,14 @@ YunzaiI18NComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
273
444
|
__decorate([
|
|
274
445
|
InputBoolean()
|
|
275
446
|
], YunzaiI18NComponent.prototype, "showLangText", void 0);
|
|
276
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiI18NComponent, decorators: [{
|
|
277
448
|
type: Component,
|
|
278
449
|
args: [{
|
|
279
450
|
selector: 'yunzai-i18n',
|
|
280
451
|
template: `
|
|
281
452
|
<div *ngIf="showLangText" nz-dropdown [nzDropdownMenu]="langMenu" nzPlacement="bottomRight">
|
|
282
453
|
<i nz-icon nzType="global"></i>
|
|
283
|
-
{{ '
|
|
454
|
+
{{ 'lang.nav' | i18n }}
|
|
284
455
|
<i nz-icon nzType="down"></i>
|
|
285
456
|
</div>
|
|
286
457
|
<i
|
|
@@ -299,7 +470,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
299
470
|
[nzSelected]="item.code === curLangCode"
|
|
300
471
|
(click)="change(item.code)"
|
|
301
472
|
>
|
|
302
|
-
<span role="img" [attr.aria-label]="item.text" class="pr-xs">{{ item.abbr }}</span>
|
|
473
|
+
<span *ngIf="!item.icon" role="img" [attr.aria-label]="item.text" class="pr-xs">{{ item.abbr }}</span>
|
|
474
|
+
<img
|
|
475
|
+
*ngIf="item.icon"
|
|
476
|
+
style="margin-right:4px"
|
|
477
|
+
width="50px"
|
|
478
|
+
height="30px"
|
|
479
|
+
[src]="'data:image/png;base64,' + item.icon"
|
|
480
|
+
[alt]="item.abbr"
|
|
481
|
+
class="pr-xs"
|
|
482
|
+
/>
|
|
303
483
|
{{ item.text }}
|
|
304
484
|
</li>
|
|
305
485
|
</ul>
|
|
@@ -332,25 +512,25 @@ class YunzaiNotifyComponent {
|
|
|
332
512
|
key: 'msg',
|
|
333
513
|
title: this.y18n.fanyi('notify.message'),
|
|
334
514
|
list: [],
|
|
335
|
-
emptyText: this.y18n.fanyi('notify.message.
|
|
515
|
+
emptyText: this.y18n.fanyi('notify.message.empty'),
|
|
336
516
|
emptyImage: './assets/tmp/img/message.svg',
|
|
337
|
-
clearText: this.y18n.fanyi('notify.message.
|
|
517
|
+
clearText: this.y18n.fanyi('notify.message.clear')
|
|
338
518
|
},
|
|
339
519
|
{
|
|
340
520
|
key: 'todo',
|
|
341
521
|
title: this.y18n.fanyi('notify.todo'),
|
|
342
522
|
list: [],
|
|
343
|
-
emptyText: this.y18n.fanyi('notify.todo.
|
|
523
|
+
emptyText: this.y18n.fanyi('notify.todo.empty'),
|
|
344
524
|
emptyImage: './assets/tmp/img/todo.svg',
|
|
345
|
-
clearText: this.y18n.fanyi('notify.todo.
|
|
525
|
+
clearText: this.y18n.fanyi('notify.todo.clear')
|
|
346
526
|
},
|
|
347
527
|
{
|
|
348
528
|
key: 'notice',
|
|
349
529
|
title: this.y18n.fanyi('notify.notice'),
|
|
350
530
|
list: [],
|
|
351
|
-
emptyText: this.y18n.fanyi('notify.notice.
|
|
531
|
+
emptyText: this.y18n.fanyi('notify.notice.empty'),
|
|
352
532
|
emptyImage: './assets/tmp/img/notice.svg',
|
|
353
|
-
clearText: this.y18n.fanyi('notify.notice.
|
|
533
|
+
clearText: this.y18n.fanyi('notify.notice.clear')
|
|
354
534
|
}
|
|
355
535
|
];
|
|
356
536
|
this.loading = false;
|
|
@@ -386,7 +566,7 @@ class YunzaiNotifyComponent {
|
|
|
386
566
|
pageSize: 10,
|
|
387
567
|
status: '0'
|
|
388
568
|
})
|
|
389
|
-
.pipe(map((response) => {
|
|
569
|
+
.pipe(map$1((response) => {
|
|
390
570
|
const viewMessage = this.data.filter(d => d.key === 'msg')[0];
|
|
391
571
|
viewMessage.list = response.data.list.map((m) => {
|
|
392
572
|
return Object.assign(Object.assign({}, m), { avatar: (m === null || m === void 0 ? void 0 : m.imgUrl) || './assets/tmp/img/message.png', title: m.systemName, description: m.content, extra: formatMessageStatus(m.status).extra, color: formatMessageStatus(m.status).color, datetime: formatDistanceToNow(new Date(m.date), { locale: this.nzI18n.getDateLocale() }) });
|
|
@@ -412,7 +592,7 @@ class YunzaiNotifyComponent {
|
|
|
412
592
|
pageSize: 10,
|
|
413
593
|
status: '0'
|
|
414
594
|
})
|
|
415
|
-
.pipe(map((response) => {
|
|
595
|
+
.pipe(map$1((response) => {
|
|
416
596
|
const viewTodo = this.data.filter(d => d.key === 'todo')[0];
|
|
417
597
|
viewTodo.list = response.data.list.map((t) => {
|
|
418
598
|
return Object.assign(Object.assign({}, t), { avatar: (t === null || t === void 0 ? void 0 : t.imgUrl) || './assets/tmp/img/todo.png', title: t.systemName, description: t.content, datetime: formatDistanceToNow(new Date(t.date), { locale: this.nzI18n.getDateLocale() }), extra: formatTodoStatus(t.status).extra, color: formatTodoStatus(t.status).color });
|
|
@@ -440,8 +620,8 @@ class YunzaiNotifyComponent {
|
|
|
440
620
|
this.subs.forEach(a => a.unsubscribe());
|
|
441
621
|
}
|
|
442
622
|
}
|
|
443
|
-
YunzaiNotifyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
444
|
-
YunzaiNotifyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
623
|
+
YunzaiNotifyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiNotifyComponent, deps: [{ token: i0.Injector }, { token: i1$1.NzMessageService }, { token: YUNZAI_I18N_TOKEN }, { token: i2.NzI18nService }, { token: i0.ChangeDetectorRef }, { token: i1$2._HttpClient }], target: i0.ɵɵFactoryTarget.Component });
|
|
624
|
+
YunzaiNotifyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiNotifyComponent, selector: "yunzai-notify", ngImport: i0, template: `
|
|
445
625
|
<notice-icon
|
|
446
626
|
[data]="data"
|
|
447
627
|
[count]="count"
|
|
@@ -452,7 +632,7 @@ YunzaiNotifyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
452
632
|
(clear)="clear($event)"
|
|
453
633
|
></notice-icon>
|
|
454
634
|
`, isInline: true, dependencies: [{ kind: "component", type: i4$2.NoticeIconComponent, selector: "notice-icon", inputs: ["data", "count", "loading", "popoverVisible", "btnClass", "btnIconClass", "centered"], outputs: ["select", "clear", "popoverVisibleChange"], exportAs: ["noticeIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiNotifyComponent, decorators: [{
|
|
456
636
|
type: Component,
|
|
457
637
|
args: [{
|
|
458
638
|
selector: 'yunzai-notify',
|
|
@@ -554,8 +734,8 @@ class YunzaiThemBtnComponent {
|
|
|
554
734
|
this.destroy$.complete();
|
|
555
735
|
}
|
|
556
736
|
}
|
|
557
|
-
YunzaiThemBtnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
558
|
-
YunzaiThemBtnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
737
|
+
YunzaiThemBtnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiThemBtnComponent, deps: [{ token: i0.Renderer2 }, { token: i4.YunzaiConfigService }, { token: i3$1.Platform }, { token: DOCUMENT }, { token: i3$2.Directionality, optional: true }, { token: YUNZAI_THEME_BTN_KEYS }], target: i0.ɵɵFactoryTarget.Component });
|
|
738
|
+
YunzaiThemBtnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiThemBtnComponent, selector: "yunzai-theme-btn", inputs: { types: "types", devTips: "devTips", deployUrl: "deployUrl" }, ngImport: i0, template: `
|
|
559
739
|
<div
|
|
560
740
|
class="yunzai-default__nav-item"
|
|
561
741
|
nz-dropdown
|
|
@@ -595,7 +775,7 @@ YunzaiThemBtnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
595
775
|
<!-- </div>-->
|
|
596
776
|
</nz-dropdown-menu>
|
|
597
777
|
`, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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$1.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiThemBtnComponent, decorators: [{
|
|
599
779
|
type: Component,
|
|
600
780
|
args: [{
|
|
601
781
|
selector: 'yunzai-theme-btn',
|
|
@@ -659,17 +839,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
659
839
|
type: Input
|
|
660
840
|
}] } });
|
|
661
841
|
|
|
662
|
-
const BUSINESS_DEFAULT_CONFIG = {
|
|
663
|
-
baseUrl: '/backstage',
|
|
664
|
-
systemCode: 'portal',
|
|
665
|
-
loginForm: null,
|
|
666
|
-
refreshTokenEnabled: true,
|
|
667
|
-
refreshTokenType: 're-request'
|
|
668
|
-
};
|
|
669
|
-
function mergeBisConfig(srv) {
|
|
670
|
-
return srv.merge('bis', BUSINESS_DEFAULT_CONFIG);
|
|
671
|
-
}
|
|
672
|
-
|
|
673
842
|
class YunzaiUserComponent {
|
|
674
843
|
constructor(injector, msg, tokenService,
|
|
675
844
|
// @ts-ignore
|
|
@@ -707,8 +876,8 @@ class YunzaiUserComponent {
|
|
|
707
876
|
}
|
|
708
877
|
}
|
|
709
878
|
}
|
|
710
|
-
YunzaiUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
711
|
-
YunzaiUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
879
|
+
YunzaiUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiUserComponent, deps: [{ token: i0.Injector }, { token: i1$1.NzMessageService }, { token: YA_SERVICE_TOKEN }, { token: i1$4.YunzaiConfigService }, { token: i1$3.CacheService }], target: i0.ɵɵFactoryTarget.Component });
|
|
880
|
+
YunzaiUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiUserComponent, selector: "yunzai-user", ngImport: i0, template: `
|
|
712
881
|
<div
|
|
713
882
|
class="yunzai-default__nav-item d-flex align-items-center px-sm"
|
|
714
883
|
nz-dropdown
|
|
@@ -729,12 +898,12 @@ YunzaiUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
729
898
|
<li nz-menu-divider></li>
|
|
730
899
|
<div nz-menu-item (click)="logout()">
|
|
731
900
|
<i nz-icon nzType="logout" class="mr-sm"></i>
|
|
732
|
-
{{ '
|
|
901
|
+
{{ 'logout' | i18n }}
|
|
733
902
|
</div>
|
|
734
903
|
</div>
|
|
735
904
|
</nz-dropdown-menu>
|
|
736
905
|
`, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i6.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { 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: "pipe", type: i1$2.I18nPipe, name: "i18n" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
906
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiUserComponent, decorators: [{
|
|
738
907
|
type: Component,
|
|
739
908
|
args: [{
|
|
740
909
|
selector: 'yunzai-user',
|
|
@@ -759,7 +928,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
759
928
|
<li nz-menu-divider></li>
|
|
760
929
|
<div nz-menu-item (click)="logout()">
|
|
761
930
|
<i nz-icon nzType="logout" class="mr-sm"></i>
|
|
762
|
-
{{ '
|
|
931
|
+
{{ 'logout' | i18n }}
|
|
763
932
|
</div>
|
|
764
933
|
</div>
|
|
765
934
|
</nz-dropdown-menu>
|
|
@@ -770,26 +939,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
770
939
|
return [{ type: i0.Injector }, { type: i1$1.NzMessageService }, { type: undefined, decorators: [{
|
|
771
940
|
type: Inject,
|
|
772
941
|
args: [YA_SERVICE_TOKEN]
|
|
773
|
-
}] }, { type: i1$
|
|
942
|
+
}] }, { type: i1$4.YunzaiConfigService }, { type: i1$3.CacheService }];
|
|
774
943
|
} });
|
|
775
944
|
|
|
776
|
-
var TopicType;
|
|
777
|
-
(function (TopicType) {
|
|
778
|
-
TopicType[TopicType["FULL"] = 0] = "FULL";
|
|
779
|
-
TopicType[TopicType["OWN"] = 1] = "OWN";
|
|
780
|
-
TopicType[TopicType["EVERY"] = 2] = "EVERY";
|
|
781
|
-
})(TopicType || (TopicType = {}));
|
|
782
|
-
|
|
783
945
|
class LayoutNavApplicationComponent {
|
|
784
946
|
constructor(cacheService, i18n, http, inject) {
|
|
785
947
|
this.cacheService = cacheService;
|
|
786
948
|
this.i18n = i18n;
|
|
787
949
|
this.http = http;
|
|
788
950
|
this.inject = inject;
|
|
789
|
-
this.TopicType = TopicType;
|
|
790
951
|
this.state = {
|
|
791
952
|
active: false,
|
|
792
|
-
type:
|
|
953
|
+
type: 'all',
|
|
793
954
|
topic: undefined,
|
|
794
955
|
topics: [],
|
|
795
956
|
list: [],
|
|
@@ -798,18 +959,32 @@ class LayoutNavApplicationComponent {
|
|
|
798
959
|
};
|
|
799
960
|
}
|
|
800
961
|
ngOnInit() {
|
|
801
|
-
this.
|
|
962
|
+
this.fetchAllTopic();
|
|
963
|
+
this.attachNav('all');
|
|
802
964
|
}
|
|
803
|
-
|
|
804
|
-
this.state.
|
|
805
|
-
|
|
965
|
+
fetchAllTopic() {
|
|
966
|
+
this.state.topics = this.cacheService.get('_yz_header', { mode: 'none' });
|
|
967
|
+
}
|
|
968
|
+
attachNav(type, topic) {
|
|
806
969
|
this.state.type = type;
|
|
970
|
+
this.clearSearch();
|
|
971
|
+
if (type === 'all') {
|
|
972
|
+
this.displayAllNav();
|
|
973
|
+
}
|
|
974
|
+
if (type === 'mine') {
|
|
975
|
+
this.displayMineNav();
|
|
976
|
+
}
|
|
977
|
+
if (type === 'other' && topic) {
|
|
978
|
+
this.displayOtherNav(topic);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
clearSearch() {
|
|
982
|
+
this.state.search = null;
|
|
807
983
|
}
|
|
808
|
-
|
|
809
|
-
this.
|
|
984
|
+
displayAllNav() {
|
|
985
|
+
this.state.list = this.cacheService.get('_yz_header', { mode: 'none' });
|
|
810
986
|
}
|
|
811
|
-
|
|
812
|
-
this.initTopic(TopicType.OWN);
|
|
987
|
+
displayMineNav() {
|
|
813
988
|
const temp = this.cacheService.get('_yz_header', { mode: 'none' });
|
|
814
989
|
this.state.list = temp
|
|
815
990
|
.filter((topic) => {
|
|
@@ -822,11 +997,10 @@ class LayoutNavApplicationComponent {
|
|
|
822
997
|
return topic.children.length > 0;
|
|
823
998
|
});
|
|
824
999
|
}
|
|
825
|
-
|
|
826
|
-
this.
|
|
827
|
-
this.state.topic = e;
|
|
1000
|
+
displayOtherNav(topic) {
|
|
1001
|
+
this.state.topic = topic;
|
|
828
1002
|
const temp = this.cacheService.get('_yz_header', { mode: 'none' });
|
|
829
|
-
this.state.list =
|
|
1003
|
+
this.state.list = temp.filter(t => t.key === topic.key)[0].children;
|
|
830
1004
|
}
|
|
831
1005
|
diffChange(flag) {
|
|
832
1006
|
if (flag) {
|
|
@@ -888,9 +1062,9 @@ class LayoutNavApplicationComponent {
|
|
|
888
1062
|
this.state.destroy$.complete();
|
|
889
1063
|
}
|
|
890
1064
|
}
|
|
891
|
-
LayoutNavApplicationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
892
|
-
LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
893
|
-
<!--
|
|
1065
|
+
LayoutNavApplicationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavApplicationComponent, deps: [{ token: i1$3.CacheService }, { token: YunzaiI18NService }, { token: i1$2._HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1066
|
+
LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: LayoutNavApplicationComponent, selector: "layout-nav-application", ngImport: i0, template: `
|
|
1067
|
+
<!-- search start-->
|
|
894
1068
|
<ng-template #search>
|
|
895
1069
|
<div nz-row class="yz-application-list-search">
|
|
896
1070
|
<nz-input-group [nzPrefix]="prefixTemplate">
|
|
@@ -907,45 +1081,50 @@ LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
|
|
|
907
1081
|
</nz-input-group>
|
|
908
1082
|
</div>
|
|
909
1083
|
</ng-template>
|
|
1084
|
+
<!-- search end -->
|
|
1085
|
+
|
|
1086
|
+
<!-- right menu start -->
|
|
910
1087
|
<ng-template #ld>
|
|
911
1088
|
<div class="yz-application-list">
|
|
912
1089
|
<ul>
|
|
913
|
-
<li *ngFor="let
|
|
914
|
-
<h5>{{
|
|
915
|
-
<a href="javascript:;" *ngFor="let
|
|
1090
|
+
<li *ngFor="let topic of state.list">
|
|
1091
|
+
<h5>{{ topic.name | i18n }}</h5>
|
|
1092
|
+
<a href="javascript:;" *ngFor="let nav of topic.children" (click)="open(nav)">{{ nav.name | i18n }}</a>
|
|
916
1093
|
</li>
|
|
917
1094
|
</ul>
|
|
918
1095
|
</div>
|
|
919
1096
|
</ng-template>
|
|
920
|
-
<!--
|
|
1097
|
+
<!-- right menu end -->
|
|
921
1098
|
|
|
922
1099
|
<!-- button start-->
|
|
923
|
-
<div class="yunzai-default__nav-item" (click)="diffChange()"> {{ '
|
|
1100
|
+
<div class="yunzai-default__nav-item" (click)="diffChange()"> {{ 'mode.nav' | i18n }}</div>
|
|
924
1101
|
<!-- button end-->
|
|
925
1102
|
|
|
926
1103
|
<!-- header start-->
|
|
927
1104
|
<div class="yz-application" nz-row *ngIf="state.active">
|
|
928
1105
|
<div nz-col [nzSpan]="3" class="yz-application-topic">
|
|
929
|
-
<div class="yz-application-text" (click)="
|
|
930
|
-
<div class="yz-application-text" (click)="
|
|
931
|
-
<div class="yz-application-text" *ngFor="let
|
|
1106
|
+
<div class="yz-application-text" (click)="attachNav('all')">{{ 'mode.nav.all' | i18n }}</div>
|
|
1107
|
+
<div class="yz-application-text" (click)="attachNav('mine')">{{ 'mode.nav.mine' | i18n }}</div>
|
|
1108
|
+
<div class="yz-application-text" *ngFor="let nav of state.topics" (click)="attachNav('other', nav)">{{
|
|
1109
|
+
nav.name | i18n
|
|
1110
|
+
}}</div>
|
|
932
1111
|
</div>
|
|
933
1112
|
<div nz-col [nzSpan]="21" [ngSwitch]="state.topic" class="yz-application-container">
|
|
934
|
-
<div *
|
|
1113
|
+
<div *ngIf="state.type === 'all'">
|
|
935
1114
|
<ng-template [ngTemplateOutlet]="search"></ng-template>
|
|
936
1115
|
<ng-template [ngTemplateOutlet]="ld"></ng-template>
|
|
937
1116
|
</div>
|
|
938
|
-
<div *
|
|
1117
|
+
<div *ngIf="state.type === 'mine'">
|
|
939
1118
|
<ng-template [ngTemplateOutlet]="search"></ng-template>
|
|
940
1119
|
<ng-template [ngTemplateOutlet]="ld"></ng-template>
|
|
941
1120
|
</div>
|
|
942
|
-
<div *
|
|
1121
|
+
<div *ngIf="state.type === 'other'" class="yz-application-list">
|
|
943
1122
|
<div class="yz-application-list-item">
|
|
944
1123
|
<ul>
|
|
945
|
-
<li *ngFor="let
|
|
1124
|
+
<li *ngFor="let nav of state.list" (click)="open(nav)">
|
|
946
1125
|
<a href="javascript:;">
|
|
947
|
-
<h4>{{
|
|
948
|
-
<p>{{
|
|
1126
|
+
<h4>{{ nav.name | i18n }}</h4>
|
|
1127
|
+
<p>{{ nav.intro | i18n }}</p>
|
|
949
1128
|
</a>
|
|
950
1129
|
</li>
|
|
951
1130
|
</ul>
|
|
@@ -954,13 +1133,13 @@ LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
|
|
|
954
1133
|
</div>
|
|
955
1134
|
</div>
|
|
956
1135
|
<!-- header end-->
|
|
957
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type:
|
|
958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1136
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: i7$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i7$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: i9$1.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i9$1.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i9$1.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }] });
|
|
1137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavApplicationComponent, decorators: [{
|
|
959
1138
|
type: Component,
|
|
960
1139
|
args: [{
|
|
961
1140
|
selector: `layout-nav-application`,
|
|
962
1141
|
template: `
|
|
963
|
-
<!--
|
|
1142
|
+
<!-- search start-->
|
|
964
1143
|
<ng-template #search>
|
|
965
1144
|
<div nz-row class="yz-application-list-search">
|
|
966
1145
|
<nz-input-group [nzPrefix]="prefixTemplate">
|
|
@@ -977,45 +1156,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
977
1156
|
</nz-input-group>
|
|
978
1157
|
</div>
|
|
979
1158
|
</ng-template>
|
|
1159
|
+
<!-- search end -->
|
|
1160
|
+
|
|
1161
|
+
<!-- right menu start -->
|
|
980
1162
|
<ng-template #ld>
|
|
981
1163
|
<div class="yz-application-list">
|
|
982
1164
|
<ul>
|
|
983
|
-
<li *ngFor="let
|
|
984
|
-
<h5>{{
|
|
985
|
-
<a href="javascript:;" *ngFor="let
|
|
1165
|
+
<li *ngFor="let topic of state.list">
|
|
1166
|
+
<h5>{{ topic.name | i18n }}</h5>
|
|
1167
|
+
<a href="javascript:;" *ngFor="let nav of topic.children" (click)="open(nav)">{{ nav.name | i18n }}</a>
|
|
986
1168
|
</li>
|
|
987
1169
|
</ul>
|
|
988
1170
|
</div>
|
|
989
1171
|
</ng-template>
|
|
990
|
-
<!--
|
|
1172
|
+
<!-- right menu end -->
|
|
991
1173
|
|
|
992
1174
|
<!-- button start-->
|
|
993
|
-
<div class="yunzai-default__nav-item" (click)="diffChange()"> {{ '
|
|
1175
|
+
<div class="yunzai-default__nav-item" (click)="diffChange()"> {{ 'mode.nav' | i18n }}</div>
|
|
994
1176
|
<!-- button end-->
|
|
995
1177
|
|
|
996
1178
|
<!-- header start-->
|
|
997
1179
|
<div class="yz-application" nz-row *ngIf="state.active">
|
|
998
1180
|
<div nz-col [nzSpan]="3" class="yz-application-topic">
|
|
999
|
-
<div class="yz-application-text" (click)="
|
|
1000
|
-
<div class="yz-application-text" (click)="
|
|
1001
|
-
<div class="yz-application-text" *ngFor="let
|
|
1181
|
+
<div class="yz-application-text" (click)="attachNav('all')">{{ 'mode.nav.all' | i18n }}</div>
|
|
1182
|
+
<div class="yz-application-text" (click)="attachNav('mine')">{{ 'mode.nav.mine' | i18n }}</div>
|
|
1183
|
+
<div class="yz-application-text" *ngFor="let nav of state.topics" (click)="attachNav('other', nav)">{{
|
|
1184
|
+
nav.name | i18n
|
|
1185
|
+
}}</div>
|
|
1002
1186
|
</div>
|
|
1003
1187
|
<div nz-col [nzSpan]="21" [ngSwitch]="state.topic" class="yz-application-container">
|
|
1004
|
-
<div *
|
|
1188
|
+
<div *ngIf="state.type === 'all'">
|
|
1005
1189
|
<ng-template [ngTemplateOutlet]="search"></ng-template>
|
|
1006
1190
|
<ng-template [ngTemplateOutlet]="ld"></ng-template>
|
|
1007
1191
|
</div>
|
|
1008
|
-
<div *
|
|
1192
|
+
<div *ngIf="state.type === 'mine'">
|
|
1009
1193
|
<ng-template [ngTemplateOutlet]="search"></ng-template>
|
|
1010
1194
|
<ng-template [ngTemplateOutlet]="ld"></ng-template>
|
|
1011
1195
|
</div>
|
|
1012
|
-
<div *
|
|
1196
|
+
<div *ngIf="state.type === 'other'" class="yz-application-list">
|
|
1013
1197
|
<div class="yz-application-list-item">
|
|
1014
1198
|
<ul>
|
|
1015
|
-
<li *ngFor="let
|
|
1199
|
+
<li *ngFor="let nav of state.list" (click)="open(nav)">
|
|
1016
1200
|
<a href="javascript:;">
|
|
1017
|
-
<h4>{{
|
|
1018
|
-
<p>{{
|
|
1201
|
+
<h4>{{ nav.name | i18n }}</h4>
|
|
1202
|
+
<p>{{ nav.intro | i18n }}</p>
|
|
1019
1203
|
</a>
|
|
1020
1204
|
</li>
|
|
1021
1205
|
</ul>
|
|
@@ -1026,7 +1210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1026
1210
|
<!-- header end-->
|
|
1027
1211
|
`
|
|
1028
1212
|
}]
|
|
1029
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
1213
|
+
}], ctorParameters: function () { return [{ type: i1$3.CacheService }, { type: YunzaiI18NService }, { type: i1$2._HttpClient }, { type: i0.Injector }]; } });
|
|
1030
1214
|
|
|
1031
1215
|
class LayoutNavGroupComponent {
|
|
1032
1216
|
constructor(inject, cacheService, http) {
|
|
@@ -1070,8 +1254,8 @@ class LayoutNavGroupComponent {
|
|
|
1070
1254
|
this.state.destroy$.complete();
|
|
1071
1255
|
}
|
|
1072
1256
|
}
|
|
1073
|
-
LayoutNavGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1074
|
-
LayoutNavGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
1257
|
+
LayoutNavGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavGroupComponent, deps: [{ token: i0.Injector }, { token: i1$3.CacheService }, { token: i1$2._HttpClient }], target: i0.ɵɵFactoryTarget.Component });
|
|
1258
|
+
LayoutNavGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: LayoutNavGroupComponent, selector: "layout-nav-group", ngImport: i0, template: `
|
|
1075
1259
|
<div class="yz-application-group">
|
|
1076
1260
|
<nz-tabset>
|
|
1077
1261
|
<nz-tab *ngFor="let menu of state.topics" [nzTitle]="groupTitleTpl">
|
|
@@ -1100,7 +1284,7 @@ LayoutNavGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
1100
1284
|
</nz-tabset>
|
|
1101
1285
|
</div>
|
|
1102
1286
|
`, isInline: true, dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "directive", type: i7.NzDropDownADirective, selector: "a[nz-dropdown]" }, { 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: i8$2.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i8$2.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "pipe", type: i1$2.I18nPipe, name: "i18n" }] });
|
|
1103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavGroupComponent, decorators: [{
|
|
1104
1288
|
type: Component,
|
|
1105
1289
|
args: [{
|
|
1106
1290
|
selector: `layout-nav-group`,
|
|
@@ -1134,14 +1318,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1134
1318
|
</div>
|
|
1135
1319
|
`
|
|
1136
1320
|
}]
|
|
1137
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$
|
|
1321
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$3.CacheService }, { type: i1$2._HttpClient }]; } });
|
|
1138
1322
|
|
|
1139
1323
|
class LayoutNavTileComponent {
|
|
1140
1324
|
constructor() { }
|
|
1141
1325
|
}
|
|
1142
|
-
LayoutNavTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1143
|
-
LayoutNavTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
1144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1326
|
+
LayoutNavTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1327
|
+
LayoutNavTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: LayoutNavTileComponent, selector: "layout-nav-tile", ngImport: i0, template: `<template></template>`, isInline: true });
|
|
1328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavTileComponent, decorators: [{
|
|
1145
1329
|
type: Component,
|
|
1146
1330
|
args: [{
|
|
1147
1331
|
selector: `layout-nav-tile`,
|
|
@@ -1199,12 +1383,26 @@ class YunzaiLayoutBasicComponent {
|
|
|
1199
1383
|
}
|
|
1200
1384
|
ngOnInit() {
|
|
1201
1385
|
this.initLogo();
|
|
1386
|
+
this.initFavicon();
|
|
1202
1387
|
this.initNavType();
|
|
1203
1388
|
this.initAside();
|
|
1204
1389
|
this.addLayoutDisplayListener();
|
|
1205
1390
|
this.stompService.listen();
|
|
1206
1391
|
this.toIndex();
|
|
1207
1392
|
}
|
|
1393
|
+
initFavicon() {
|
|
1394
|
+
const projectInfo = this.cacheService.get('_yz_project_info', { mode: 'none' });
|
|
1395
|
+
if (projectInfo.faviconUrl) {
|
|
1396
|
+
hasFavicon(projectInfo.faviconUrl).then((has) => {
|
|
1397
|
+
if (has) {
|
|
1398
|
+
setFavicon(projectInfo.faviconUrl);
|
|
1399
|
+
}
|
|
1400
|
+
else {
|
|
1401
|
+
setFavicon('./assets/favicon.ico');
|
|
1402
|
+
}
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1208
1406
|
initAside() {
|
|
1209
1407
|
const aside = this.cacheService.get('_yz_current', { mode: 'none' });
|
|
1210
1408
|
this.state.aside = Object.assign({}, aside);
|
|
@@ -1256,8 +1454,8 @@ class YunzaiLayoutBasicComponent {
|
|
|
1256
1454
|
this.state.destroy$.complete();
|
|
1257
1455
|
}
|
|
1258
1456
|
}
|
|
1259
|
-
YunzaiLayoutBasicComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1260
|
-
YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
1457
|
+
YunzaiLayoutBasicComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutBasicComponent, deps: [{ token: i1$5.LayoutDisplayService }, { token: i1$3.CacheService }, { token: i3$3.StompService }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Component });
|
|
1458
|
+
YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiLayoutBasicComponent, selector: "yz-layout-basic", ngImport: i0, template: `<layout-default
|
|
1261
1459
|
[options]="options"
|
|
1262
1460
|
[asideUser]="asideUserTpl"
|
|
1263
1461
|
[content]="displayReusetab ? contentTpl : noneTpl"
|
|
@@ -1294,20 +1492,20 @@ YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
1294
1492
|
<nz-dropdown-menu #settingsMenu="nzDropdownMenu">
|
|
1295
1493
|
<div nz-menu style="width: 200px;">
|
|
1296
1494
|
<div nz-menu-item>
|
|
1297
|
-
{{ '
|
|
1495
|
+
{{ 'mode.nav' | i18n }}
|
|
1298
1496
|
</div>
|
|
1299
1497
|
|
|
1300
1498
|
<div nz-menu-item (click)="onNavTypeChange(NavType.APPLICATION)">
|
|
1301
1499
|
<i nz-icon nzType="appstore" class="mr-sm"></i>
|
|
1302
|
-
{{ '
|
|
1500
|
+
{{ 'mode.nav.application' | i18n }}
|
|
1303
1501
|
</div>
|
|
1304
1502
|
<div nz-menu-item (click)="onNavTypeChange(NavType.GROUP)">
|
|
1305
1503
|
<i nz-icon nzType="group" class="mr-sm"></i>
|
|
1306
|
-
{{ '
|
|
1504
|
+
{{ 'mode.nav.group' | i18n }}
|
|
1307
1505
|
</div>
|
|
1308
1506
|
<div nz-menu-item (click)="onNavTypeChange(NavType.TILE)">
|
|
1309
1507
|
<i nz-icon nzType="appstore" class="mr-sm"></i>
|
|
1310
|
-
{{ '
|
|
1508
|
+
{{ 'mode.nav.tile' | i18n }}
|
|
1311
1509
|
</div>
|
|
1312
1510
|
<div nz-menu-item> <yunzai-fullscreen></yunzai-fullscreen> </div>
|
|
1313
1511
|
<div nz-menu-item> <yunzai-clearstorage></yunzai-clearstorage> </div>
|
|
@@ -1324,13 +1522,13 @@ YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
1324
1522
|
<div nz-dropdown nzTrigger="click" [nzDropdownMenu]="userMenu" class="yunzai-default__aside-user">
|
|
1325
1523
|
<nz-avatar class="yunzai-default__aside-user-avatar" [nzSrc]="aside.icon"></nz-avatar>
|
|
1326
1524
|
<div class="yunzai-default__aside-user-info">
|
|
1327
|
-
<strong>{{ aside.name }}</strong>
|
|
1328
|
-
<p class="mb0">{{ aside.intro }}</p>
|
|
1525
|
+
<strong>{{ aside.name | i18n }}</strong>
|
|
1526
|
+
<p class="mb0">{{ aside.intro | i18n }}</p>
|
|
1329
1527
|
</div>
|
|
1330
1528
|
</div>
|
|
1331
1529
|
<nz-dropdown-menu #userMenu="nzDropdownMenu">
|
|
1332
1530
|
<ul nz-menu>
|
|
1333
|
-
<li nz-menu-item routerLink="/">{{ '
|
|
1531
|
+
<li nz-menu-item routerLink="/">{{ 'back.home' | i18n }}</li>
|
|
1334
1532
|
</ul>
|
|
1335
1533
|
</nz-dropdown-menu>
|
|
1336
1534
|
</ng-template>
|
|
@@ -1341,7 +1539,7 @@ YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
1341
1539
|
<ng-template #noneTpl>
|
|
1342
1540
|
<router-outlet></router-outlet>
|
|
1343
1541
|
</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" }] });
|
|
1344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutBasicComponent, decorators: [{
|
|
1345
1543
|
type: Component,
|
|
1346
1544
|
args: [{
|
|
1347
1545
|
selector: `yz-layout-basic`,
|
|
@@ -1382,20 +1580,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1382
1580
|
<nz-dropdown-menu #settingsMenu="nzDropdownMenu">
|
|
1383
1581
|
<div nz-menu style="width: 200px;">
|
|
1384
1582
|
<div nz-menu-item>
|
|
1385
|
-
{{ '
|
|
1583
|
+
{{ 'mode.nav' | i18n }}
|
|
1386
1584
|
</div>
|
|
1387
1585
|
|
|
1388
1586
|
<div nz-menu-item (click)="onNavTypeChange(NavType.APPLICATION)">
|
|
1389
1587
|
<i nz-icon nzType="appstore" class="mr-sm"></i>
|
|
1390
|
-
{{ '
|
|
1588
|
+
{{ 'mode.nav.application' | i18n }}
|
|
1391
1589
|
</div>
|
|
1392
1590
|
<div nz-menu-item (click)="onNavTypeChange(NavType.GROUP)">
|
|
1393
1591
|
<i nz-icon nzType="group" class="mr-sm"></i>
|
|
1394
|
-
{{ '
|
|
1592
|
+
{{ 'mode.nav.group' | i18n }}
|
|
1395
1593
|
</div>
|
|
1396
1594
|
<div nz-menu-item (click)="onNavTypeChange(NavType.TILE)">
|
|
1397
1595
|
<i nz-icon nzType="appstore" class="mr-sm"></i>
|
|
1398
|
-
{{ '
|
|
1596
|
+
{{ 'mode.nav.tile' | i18n }}
|
|
1399
1597
|
</div>
|
|
1400
1598
|
<div nz-menu-item> <yunzai-fullscreen></yunzai-fullscreen> </div>
|
|
1401
1599
|
<div nz-menu-item> <yunzai-clearstorage></yunzai-clearstorage> </div>
|
|
@@ -1412,13 +1610,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1412
1610
|
<div nz-dropdown nzTrigger="click" [nzDropdownMenu]="userMenu" class="yunzai-default__aside-user">
|
|
1413
1611
|
<nz-avatar class="yunzai-default__aside-user-avatar" [nzSrc]="aside.icon"></nz-avatar>
|
|
1414
1612
|
<div class="yunzai-default__aside-user-info">
|
|
1415
|
-
<strong>{{ aside.name }}</strong>
|
|
1416
|
-
<p class="mb0">{{ aside.intro }}</p>
|
|
1613
|
+
<strong>{{ aside.name | i18n }}</strong>
|
|
1614
|
+
<p class="mb0">{{ aside.intro | i18n }}</p>
|
|
1417
1615
|
</div>
|
|
1418
1616
|
</div>
|
|
1419
1617
|
<nz-dropdown-menu #userMenu="nzDropdownMenu">
|
|
1420
1618
|
<ul nz-menu>
|
|
1421
|
-
<li nz-menu-item routerLink="/">{{ '
|
|
1619
|
+
<li nz-menu-item routerLink="/">{{ 'back.home' | i18n }}</li>
|
|
1422
1620
|
</ul>
|
|
1423
1621
|
</nz-dropdown-menu>
|
|
1424
1622
|
</ng-template>
|
|
@@ -1431,7 +1629,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1431
1629
|
</ng-template> `
|
|
1432
1630
|
}]
|
|
1433
1631
|
}], ctorParameters: function () {
|
|
1434
|
-
return [{ type: i1$5.LayoutDisplayService }, { type: i1$
|
|
1632
|
+
return [{ type: i1$5.LayoutDisplayService }, { type: i1$3.CacheService }, { type: i3$3.StompService }, { type: undefined, decorators: [{
|
|
1435
1633
|
type: Inject,
|
|
1436
1634
|
args: [WINDOW]
|
|
1437
1635
|
}] }];
|
|
@@ -1528,14 +1726,14 @@ class ActGuard {
|
|
|
1528
1726
|
});
|
|
1529
1727
|
}
|
|
1530
1728
|
}
|
|
1531
|
-
ActGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1532
|
-
ActGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
1533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1729
|
+
ActGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ActGuard, deps: [{ token: i1$4.YunzaiConfigService }, { token: i1$3.CacheService }, { token: i1$4.PathToRegexpService }, { token: i5$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1730
|
+
ActGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ActGuard, providedIn: 'root' });
|
|
1731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ActGuard, decorators: [{
|
|
1534
1732
|
type: Injectable,
|
|
1535
1733
|
args: [{
|
|
1536
1734
|
providedIn: 'root'
|
|
1537
1735
|
}]
|
|
1538
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
1736
|
+
}], ctorParameters: function () { return [{ type: i1$4.YunzaiConfigService }, { type: i1$3.CacheService }, { type: i1$4.PathToRegexpService }, { type: i5$1.Router }]; } });
|
|
1539
1737
|
|
|
1540
1738
|
class YunzaiAuthService {
|
|
1541
1739
|
constructor(injector) {
|
|
@@ -1571,7 +1769,7 @@ class YunzaiAuthService {
|
|
|
1571
1769
|
}
|
|
1572
1770
|
fetchTokenByUP() {
|
|
1573
1771
|
log$1('yz.auth.service: ', 'fetchTokenByUP');
|
|
1574
|
-
return this.httpClient.post(`/auth/oauth/token?_allow_anonymous=true`, this.config.loginForm).pipe(map((response) => {
|
|
1772
|
+
return this.httpClient.post(`/auth/oauth/token?_allow_anonymous=true`, this.config.loginForm).pipe(map$1((response) => {
|
|
1575
1773
|
const { access_token, expires_in, refresh_token, scope, token_type } = response;
|
|
1576
1774
|
return {
|
|
1577
1775
|
token: access_token,
|
|
@@ -1587,7 +1785,7 @@ class YunzaiAuthService {
|
|
|
1587
1785
|
const uri = encodeURIComponent(this.injector.get(WINDOW).location.href);
|
|
1588
1786
|
return this.httpClient
|
|
1589
1787
|
.get(`/cas-proxy/app/validate_full?callback=${uri}&_allow_anonymous=true×tamp=${new Date().getTime()}`)
|
|
1590
|
-
.pipe(map((response) => {
|
|
1788
|
+
.pipe(map$1((response) => {
|
|
1591
1789
|
switch (response.errcode) {
|
|
1592
1790
|
case 2000:
|
|
1593
1791
|
const { access_token, expires_in, refresh_token, scope, token_type } = response.data;
|
|
@@ -1641,7 +1839,7 @@ class YunzaiAuthService {
|
|
|
1641
1839
|
// user cache
|
|
1642
1840
|
if (!u) {
|
|
1643
1841
|
log$1('yz.auth.service: ', 'fetch user cache');
|
|
1644
|
-
list.push(this.httpClient.get(`/auth/user`).pipe(map((user) => {
|
|
1842
|
+
list.push(this.httpClient.get(`/auth/user`).pipe(map$1((user) => {
|
|
1645
1843
|
this.cacheService.set('_yz_user', user.principal);
|
|
1646
1844
|
})));
|
|
1647
1845
|
}
|
|
@@ -1652,7 +1850,7 @@ class YunzaiAuthService {
|
|
|
1652
1850
|
// header cache
|
|
1653
1851
|
if (!h) {
|
|
1654
1852
|
log$1('yz.auth.service: ', 'fetch header cache');
|
|
1655
|
-
list.push(this.httpClient.get(`/auth/allheader/v2`).pipe(map((header) => {
|
|
1853
|
+
list.push(this.httpClient.get(`/auth/allheader/v2`).pipe(map$1((header) => {
|
|
1656
1854
|
this.cacheService.set('_yz_header', header.data);
|
|
1657
1855
|
})));
|
|
1658
1856
|
}
|
|
@@ -1663,7 +1861,7 @@ class YunzaiAuthService {
|
|
|
1663
1861
|
// project cache
|
|
1664
1862
|
if (!p) {
|
|
1665
1863
|
log$1('yz.auth.service: ', 'fetch project cache');
|
|
1666
|
-
list.push(this.httpClient.get(`/app-manager/project/info`).pipe(map((info) => {
|
|
1864
|
+
list.push(this.httpClient.get(`/app-manager/project/info`).pipe(map$1((info) => {
|
|
1667
1865
|
this.cacheService.set('_yz_project_info', info.data);
|
|
1668
1866
|
})));
|
|
1669
1867
|
}
|
|
@@ -1675,9 +1873,9 @@ class YunzaiAuthService {
|
|
|
1675
1873
|
}));
|
|
1676
1874
|
}
|
|
1677
1875
|
}
|
|
1678
|
-
YunzaiAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1679
|
-
YunzaiAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
1680
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1876
|
+
YunzaiAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiAuthService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1877
|
+
YunzaiAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiAuthService, providedIn: 'root' });
|
|
1878
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiAuthService, decorators: [{
|
|
1681
1879
|
type: Injectable,
|
|
1682
1880
|
args: [{ providedIn: 'root' }]
|
|
1683
1881
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
@@ -1859,6 +2057,8 @@ class YunzaiDefaultInterceptor {
|
|
|
1859
2057
|
if (url.includes('.json') && url.includes('assets')) {
|
|
1860
2058
|
url = req.url;
|
|
1861
2059
|
}
|
|
2060
|
+
if (url.includes('i18n'))
|
|
2061
|
+
return next.handle(req);
|
|
1862
2062
|
// 加入语言头
|
|
1863
2063
|
const newReq = req.clone({ url, setHeaders: this.getAdditionalHeaders(req.headers) });
|
|
1864
2064
|
return next.handle(newReq).pipe(mergeMap(ev => {
|
|
@@ -1871,9 +2071,9 @@ class YunzaiDefaultInterceptor {
|
|
|
1871
2071
|
}), catchError((err) => this.handleData(err, newReq, next)));
|
|
1872
2072
|
}
|
|
1873
2073
|
}
|
|
1874
|
-
YunzaiDefaultInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1875
|
-
YunzaiDefaultInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
1876
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
2074
|
+
YunzaiDefaultInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiDefaultInterceptor, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2075
|
+
YunzaiDefaultInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiDefaultInterceptor });
|
|
2076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiDefaultInterceptor, decorators: [{
|
|
1877
2077
|
type: Injectable
|
|
1878
2078
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
1879
2079
|
|
|
@@ -1889,8 +2089,8 @@ const LAYOUT_NAV_COMPONENTS = [LayoutNavApplicationComponent, LayoutNavGroupComp
|
|
|
1889
2089
|
const COMPONENTS = [YunzaiLayoutBasicComponent];
|
|
1890
2090
|
class YunzaiLayoutModule {
|
|
1891
2091
|
}
|
|
1892
|
-
YunzaiLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1893
|
-
YunzaiLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
2092
|
+
YunzaiLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2093
|
+
YunzaiLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutModule, declarations: [YunzaiLayoutBasicComponent, YunzaiClearStorageComponent,
|
|
1894
2094
|
YunzaiFullScreenComponent,
|
|
1895
2095
|
YunzaiI18NComponent,
|
|
1896
2096
|
YunzaiNotifyComponent,
|
|
@@ -1907,7 +2107,7 @@ YunzaiLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
1907
2107
|
YunzaiNotifyComponent,
|
|
1908
2108
|
YunzaiThemBtnComponent,
|
|
1909
2109
|
YunzaiUserComponent, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent] });
|
|
1910
|
-
YunzaiLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
2110
|
+
YunzaiLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutModule, providers: [
|
|
1911
2111
|
{
|
|
1912
2112
|
provide: YUNZAI_THEME_BTN_KEYS,
|
|
1913
2113
|
useValue: 'site-theme'
|
|
@@ -1919,7 +2119,7 @@ YunzaiLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", vers
|
|
|
1919
2119
|
ReactiveFormsModule,
|
|
1920
2120
|
YunzaiSharedYelonModule,
|
|
1921
2121
|
YunzaiSharedZorroModule] });
|
|
1922
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
2122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutModule, decorators: [{
|
|
1923
2123
|
type: NgModule,
|
|
1924
2124
|
args: [{
|
|
1925
2125
|
imports: [
|
|
@@ -2754,7 +2954,7 @@ class YunzaiStartupService {
|
|
|
2754
2954
|
}
|
|
2755
2955
|
load() {
|
|
2756
2956
|
log$1('startup.service: ', 'load');
|
|
2757
|
-
|
|
2957
|
+
let defaultLang = this.settingService.layout.lang || this.i18n.defaultLang;
|
|
2758
2958
|
return this.i18n.loadLangData(defaultLang).pipe(mergeMap(langData => {
|
|
2759
2959
|
log$1('startup.service: ', 'set i18n, defaultLang->', defaultLang, ' langData->', langData);
|
|
2760
2960
|
this.i18n.use(defaultLang, langData);
|
|
@@ -2822,9 +3022,9 @@ class YunzaiStartupService {
|
|
|
2822
3022
|
}
|
|
2823
3023
|
}
|
|
2824
3024
|
}
|
|
2825
|
-
YunzaiStartupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
2826
|
-
YunzaiStartupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
2827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
3025
|
+
YunzaiStartupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiStartupService, deps: [{ token: i8.NzIconService }, { token: i1$2.MenuService }, { token: YUNZAI_I18N_TOKEN }, { token: WINDOW }, { token: i1$2.SettingsService }, { token: i3$4.ACLService }, { token: i1$2.TitleService }, { token: YunzaiAuthService }, { token: i1$3.CacheService }, { token: i1$4.YunzaiConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3026
|
+
YunzaiStartupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiStartupService });
|
|
3027
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiStartupService, decorators: [{
|
|
2828
3028
|
type: Injectable
|
|
2829
3029
|
}], ctorParameters: function () {
|
|
2830
3030
|
return [{ type: i8.NzIconService }, { type: i1$2.MenuService }, { type: YunzaiI18NService, decorators: [{
|
|
@@ -2833,7 +3033,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
2833
3033
|
}] }, { type: undefined, decorators: [{
|
|
2834
3034
|
type: Inject,
|
|
2835
3035
|
args: [WINDOW]
|
|
2836
|
-
}] }, { type: i1$2.SettingsService }, { type: i3$4.ACLService }, { type: i1$2.TitleService }, { type: YunzaiAuthService }, { type: i1$
|
|
3036
|
+
}] }, { type: i1$2.SettingsService }, { type: i3$4.ACLService }, { type: i1$2.TitleService }, { type: YunzaiAuthService }, { type: i1$3.CacheService }, { type: i1$4.YunzaiConfigService }];
|
|
2837
3037
|
} });
|
|
2838
3038
|
function mapYzSideToYelonMenu(menus) {
|
|
2839
3039
|
menus.forEach(menu => {
|
|
@@ -2883,5 +3083,5 @@ const YUNZAI_APPINIT_PROVIDES = [
|
|
|
2883
3083
|
* Generated bundle index. Do not edit.
|
|
2884
3084
|
*/
|
|
2885
3085
|
|
|
2886
|
-
export { ActGuard, BUSINESS_DEFAULT_CONFIG, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent, NavType,
|
|
3086
|
+
export { ActGuard, BUSINESS_DEFAULT_CONFIG, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent, NavType, YUNZAI_APPINIT_PROVIDES, YUNZAI_LANGS, 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 };
|
|
2887
3087
|
//# sourceMappingURL=layout.mjs.map
|