@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/fesm2020/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>
|
|
@@ -330,25 +510,25 @@ class YunzaiNotifyComponent {
|
|
|
330
510
|
key: 'msg',
|
|
331
511
|
title: this.y18n.fanyi('notify.message'),
|
|
332
512
|
list: [],
|
|
333
|
-
emptyText: this.y18n.fanyi('notify.message.
|
|
513
|
+
emptyText: this.y18n.fanyi('notify.message.empty'),
|
|
334
514
|
emptyImage: './assets/tmp/img/message.svg',
|
|
335
|
-
clearText: this.y18n.fanyi('notify.message.
|
|
515
|
+
clearText: this.y18n.fanyi('notify.message.clear')
|
|
336
516
|
},
|
|
337
517
|
{
|
|
338
518
|
key: 'todo',
|
|
339
519
|
title: this.y18n.fanyi('notify.todo'),
|
|
340
520
|
list: [],
|
|
341
|
-
emptyText: this.y18n.fanyi('notify.todo.
|
|
521
|
+
emptyText: this.y18n.fanyi('notify.todo.empty'),
|
|
342
522
|
emptyImage: './assets/tmp/img/todo.svg',
|
|
343
|
-
clearText: this.y18n.fanyi('notify.todo.
|
|
523
|
+
clearText: this.y18n.fanyi('notify.todo.clear')
|
|
344
524
|
},
|
|
345
525
|
{
|
|
346
526
|
key: 'notice',
|
|
347
527
|
title: this.y18n.fanyi('notify.notice'),
|
|
348
528
|
list: [],
|
|
349
|
-
emptyText: this.y18n.fanyi('notify.notice.
|
|
529
|
+
emptyText: this.y18n.fanyi('notify.notice.empty'),
|
|
350
530
|
emptyImage: './assets/tmp/img/notice.svg',
|
|
351
|
-
clearText: this.y18n.fanyi('notify.notice.
|
|
531
|
+
clearText: this.y18n.fanyi('notify.notice.clear')
|
|
352
532
|
}
|
|
353
533
|
];
|
|
354
534
|
this.loading = false;
|
|
@@ -384,7 +564,7 @@ class YunzaiNotifyComponent {
|
|
|
384
564
|
pageSize: 10,
|
|
385
565
|
status: '0'
|
|
386
566
|
})
|
|
387
|
-
.pipe(map((response) => {
|
|
567
|
+
.pipe(map$1((response) => {
|
|
388
568
|
const viewMessage = this.data.filter(d => d.key === 'msg')[0];
|
|
389
569
|
viewMessage.list = response.data.list.map((m) => {
|
|
390
570
|
return {
|
|
@@ -418,7 +598,7 @@ class YunzaiNotifyComponent {
|
|
|
418
598
|
pageSize: 10,
|
|
419
599
|
status: '0'
|
|
420
600
|
})
|
|
421
|
-
.pipe(map((response) => {
|
|
601
|
+
.pipe(map$1((response) => {
|
|
422
602
|
const viewTodo = this.data.filter(d => d.key === 'todo')[0];
|
|
423
603
|
viewTodo.list = response.data.list.map((t) => {
|
|
424
604
|
return {
|
|
@@ -454,8 +634,8 @@ class YunzaiNotifyComponent {
|
|
|
454
634
|
this.subs.forEach(a => a.unsubscribe());
|
|
455
635
|
}
|
|
456
636
|
}
|
|
457
|
-
YunzaiNotifyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
458
|
-
YunzaiNotifyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
637
|
+
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 });
|
|
638
|
+
YunzaiNotifyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiNotifyComponent, selector: "yunzai-notify", ngImport: i0, template: `
|
|
459
639
|
<notice-icon
|
|
460
640
|
[data]="data"
|
|
461
641
|
[count]="count"
|
|
@@ -466,7 +646,7 @@ YunzaiNotifyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
466
646
|
(clear)="clear($event)"
|
|
467
647
|
></notice-icon>
|
|
468
648
|
`, 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 });
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
649
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiNotifyComponent, decorators: [{
|
|
470
650
|
type: Component,
|
|
471
651
|
args: [{
|
|
472
652
|
selector: 'yunzai-notify',
|
|
@@ -565,8 +745,8 @@ class YunzaiThemBtnComponent {
|
|
|
565
745
|
this.destroy$.complete();
|
|
566
746
|
}
|
|
567
747
|
}
|
|
568
|
-
YunzaiThemBtnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
569
|
-
YunzaiThemBtnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
748
|
+
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 });
|
|
749
|
+
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: `
|
|
570
750
|
<div
|
|
571
751
|
class="yunzai-default__nav-item"
|
|
572
752
|
nz-dropdown
|
|
@@ -606,7 +786,7 @@ YunzaiThemBtnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
606
786
|
<!-- </div>-->
|
|
607
787
|
</nz-dropdown-menu>
|
|
608
788
|
`, 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 });
|
|
609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiThemBtnComponent, decorators: [{
|
|
610
790
|
type: Component,
|
|
611
791
|
args: [{
|
|
612
792
|
selector: 'yunzai-theme-btn',
|
|
@@ -668,17 +848,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
668
848
|
type: Input
|
|
669
849
|
}] } });
|
|
670
850
|
|
|
671
|
-
const BUSINESS_DEFAULT_CONFIG = {
|
|
672
|
-
baseUrl: '/backstage',
|
|
673
|
-
systemCode: 'portal',
|
|
674
|
-
loginForm: null,
|
|
675
|
-
refreshTokenEnabled: true,
|
|
676
|
-
refreshTokenType: 're-request'
|
|
677
|
-
};
|
|
678
|
-
function mergeBisConfig(srv) {
|
|
679
|
-
return srv.merge('bis', BUSINESS_DEFAULT_CONFIG);
|
|
680
|
-
}
|
|
681
|
-
|
|
682
851
|
class YunzaiUserComponent {
|
|
683
852
|
constructor(injector, msg, tokenService,
|
|
684
853
|
// @ts-ignore
|
|
@@ -716,8 +885,8 @@ class YunzaiUserComponent {
|
|
|
716
885
|
}
|
|
717
886
|
}
|
|
718
887
|
}
|
|
719
|
-
YunzaiUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
720
|
-
YunzaiUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
888
|
+
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 });
|
|
889
|
+
YunzaiUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiUserComponent, selector: "yunzai-user", ngImport: i0, template: `
|
|
721
890
|
<div
|
|
722
891
|
class="yunzai-default__nav-item d-flex align-items-center px-sm"
|
|
723
892
|
nz-dropdown
|
|
@@ -738,12 +907,12 @@ YunzaiUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
738
907
|
<li nz-menu-divider></li>
|
|
739
908
|
<div nz-menu-item (click)="logout()">
|
|
740
909
|
<i nz-icon nzType="logout" class="mr-sm"></i>
|
|
741
|
-
{{ '
|
|
910
|
+
{{ 'logout' | i18n }}
|
|
742
911
|
</div>
|
|
743
912
|
</div>
|
|
744
913
|
</nz-dropdown-menu>
|
|
745
914
|
`, 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 });
|
|
746
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiUserComponent, decorators: [{
|
|
747
916
|
type: Component,
|
|
748
917
|
args: [{
|
|
749
918
|
selector: 'yunzai-user',
|
|
@@ -768,7 +937,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
768
937
|
<li nz-menu-divider></li>
|
|
769
938
|
<div nz-menu-item (click)="logout()">
|
|
770
939
|
<i nz-icon nzType="logout" class="mr-sm"></i>
|
|
771
|
-
{{ '
|
|
940
|
+
{{ 'logout' | i18n }}
|
|
772
941
|
</div>
|
|
773
942
|
</div>
|
|
774
943
|
</nz-dropdown-menu>
|
|
@@ -778,14 +947,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
778
947
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.NzMessageService }, { type: undefined, decorators: [{
|
|
779
948
|
type: Inject,
|
|
780
949
|
args: [YA_SERVICE_TOKEN]
|
|
781
|
-
}] }, { type: i1$
|
|
782
|
-
|
|
783
|
-
var TopicType;
|
|
784
|
-
(function (TopicType) {
|
|
785
|
-
TopicType[TopicType["FULL"] = 0] = "FULL";
|
|
786
|
-
TopicType[TopicType["OWN"] = 1] = "OWN";
|
|
787
|
-
TopicType[TopicType["EVERY"] = 2] = "EVERY";
|
|
788
|
-
})(TopicType || (TopicType = {}));
|
|
950
|
+
}] }, { type: i1$4.YunzaiConfigService }, { type: i1$3.CacheService }]; } });
|
|
789
951
|
|
|
790
952
|
class LayoutNavApplicationComponent {
|
|
791
953
|
constructor(cacheService, i18n, http, inject) {
|
|
@@ -793,10 +955,9 @@ class LayoutNavApplicationComponent {
|
|
|
793
955
|
this.i18n = i18n;
|
|
794
956
|
this.http = http;
|
|
795
957
|
this.inject = inject;
|
|
796
|
-
this.TopicType = TopicType;
|
|
797
958
|
this.state = {
|
|
798
959
|
active: false,
|
|
799
|
-
type:
|
|
960
|
+
type: 'all',
|
|
800
961
|
topic: undefined,
|
|
801
962
|
topics: [],
|
|
802
963
|
list: [],
|
|
@@ -805,18 +966,32 @@ class LayoutNavApplicationComponent {
|
|
|
805
966
|
};
|
|
806
967
|
}
|
|
807
968
|
ngOnInit() {
|
|
808
|
-
this.
|
|
969
|
+
this.fetchAllTopic();
|
|
970
|
+
this.attachNav('all');
|
|
809
971
|
}
|
|
810
|
-
|
|
811
|
-
this.state.
|
|
812
|
-
|
|
972
|
+
fetchAllTopic() {
|
|
973
|
+
this.state.topics = this.cacheService.get('_yz_header', { mode: 'none' });
|
|
974
|
+
}
|
|
975
|
+
attachNav(type, topic) {
|
|
813
976
|
this.state.type = type;
|
|
977
|
+
this.clearSearch();
|
|
978
|
+
if (type === 'all') {
|
|
979
|
+
this.displayAllNav();
|
|
980
|
+
}
|
|
981
|
+
if (type === 'mine') {
|
|
982
|
+
this.displayMineNav();
|
|
983
|
+
}
|
|
984
|
+
if (type === 'other' && topic) {
|
|
985
|
+
this.displayOtherNav(topic);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
clearSearch() {
|
|
989
|
+
this.state.search = null;
|
|
814
990
|
}
|
|
815
|
-
|
|
816
|
-
this.
|
|
991
|
+
displayAllNav() {
|
|
992
|
+
this.state.list = this.cacheService.get('_yz_header', { mode: 'none' });
|
|
817
993
|
}
|
|
818
|
-
|
|
819
|
-
this.initTopic(TopicType.OWN);
|
|
994
|
+
displayMineNav() {
|
|
820
995
|
const temp = this.cacheService.get('_yz_header', { mode: 'none' });
|
|
821
996
|
this.state.list = temp
|
|
822
997
|
.filter((topic) => {
|
|
@@ -829,11 +1004,10 @@ class LayoutNavApplicationComponent {
|
|
|
829
1004
|
return topic.children.length > 0;
|
|
830
1005
|
});
|
|
831
1006
|
}
|
|
832
|
-
|
|
833
|
-
this.
|
|
834
|
-
this.state.topic = e;
|
|
1007
|
+
displayOtherNav(topic) {
|
|
1008
|
+
this.state.topic = topic;
|
|
835
1009
|
const temp = this.cacheService.get('_yz_header', { mode: 'none' });
|
|
836
|
-
this.state.list =
|
|
1010
|
+
this.state.list = temp.filter(t => t.key === topic.key)[0].children;
|
|
837
1011
|
}
|
|
838
1012
|
diffChange(flag) {
|
|
839
1013
|
if (flag) {
|
|
@@ -895,9 +1069,9 @@ class LayoutNavApplicationComponent {
|
|
|
895
1069
|
this.state.destroy$.complete();
|
|
896
1070
|
}
|
|
897
1071
|
}
|
|
898
|
-
LayoutNavApplicationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
899
|
-
LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
900
|
-
<!--
|
|
1072
|
+
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 });
|
|
1073
|
+
LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: LayoutNavApplicationComponent, selector: "layout-nav-application", ngImport: i0, template: `
|
|
1074
|
+
<!-- search start-->
|
|
901
1075
|
<ng-template #search>
|
|
902
1076
|
<div nz-row class="yz-application-list-search">
|
|
903
1077
|
<nz-input-group [nzPrefix]="prefixTemplate">
|
|
@@ -914,45 +1088,50 @@ LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
|
|
|
914
1088
|
</nz-input-group>
|
|
915
1089
|
</div>
|
|
916
1090
|
</ng-template>
|
|
1091
|
+
<!-- search end -->
|
|
1092
|
+
|
|
1093
|
+
<!-- right menu start -->
|
|
917
1094
|
<ng-template #ld>
|
|
918
1095
|
<div class="yz-application-list">
|
|
919
1096
|
<ul>
|
|
920
|
-
<li *ngFor="let
|
|
921
|
-
<h5>{{
|
|
922
|
-
<a href="javascript:;" *ngFor="let
|
|
1097
|
+
<li *ngFor="let topic of state.list">
|
|
1098
|
+
<h5>{{ topic.name | i18n }}</h5>
|
|
1099
|
+
<a href="javascript:;" *ngFor="let nav of topic.children" (click)="open(nav)">{{ nav.name | i18n }}</a>
|
|
923
1100
|
</li>
|
|
924
1101
|
</ul>
|
|
925
1102
|
</div>
|
|
926
1103
|
</ng-template>
|
|
927
|
-
<!--
|
|
1104
|
+
<!-- right menu end -->
|
|
928
1105
|
|
|
929
1106
|
<!-- button start-->
|
|
930
|
-
<div class="yunzai-default__nav-item" (click)="diffChange()"> {{ '
|
|
1107
|
+
<div class="yunzai-default__nav-item" (click)="diffChange()"> {{ 'mode.nav' | i18n }}</div>
|
|
931
1108
|
<!-- button end-->
|
|
932
1109
|
|
|
933
1110
|
<!-- header start-->
|
|
934
1111
|
<div class="yz-application" nz-row *ngIf="state.active">
|
|
935
1112
|
<div nz-col [nzSpan]="3" class="yz-application-topic">
|
|
936
|
-
<div class="yz-application-text" (click)="
|
|
937
|
-
<div class="yz-application-text" (click)="
|
|
938
|
-
<div class="yz-application-text" *ngFor="let
|
|
1113
|
+
<div class="yz-application-text" (click)="attachNav('all')">{{ 'mode.nav.all' | i18n }}</div>
|
|
1114
|
+
<div class="yz-application-text" (click)="attachNav('mine')">{{ 'mode.nav.mine' | i18n }}</div>
|
|
1115
|
+
<div class="yz-application-text" *ngFor="let nav of state.topics" (click)="attachNav('other', nav)">{{
|
|
1116
|
+
nav.name | i18n
|
|
1117
|
+
}}</div>
|
|
939
1118
|
</div>
|
|
940
1119
|
<div nz-col [nzSpan]="21" [ngSwitch]="state.topic" class="yz-application-container">
|
|
941
|
-
<div *
|
|
1120
|
+
<div *ngIf="state.type === 'all'">
|
|
942
1121
|
<ng-template [ngTemplateOutlet]="search"></ng-template>
|
|
943
1122
|
<ng-template [ngTemplateOutlet]="ld"></ng-template>
|
|
944
1123
|
</div>
|
|
945
|
-
<div *
|
|
1124
|
+
<div *ngIf="state.type === 'mine'">
|
|
946
1125
|
<ng-template [ngTemplateOutlet]="search"></ng-template>
|
|
947
1126
|
<ng-template [ngTemplateOutlet]="ld"></ng-template>
|
|
948
1127
|
</div>
|
|
949
|
-
<div *
|
|
1128
|
+
<div *ngIf="state.type === 'other'" class="yz-application-list">
|
|
950
1129
|
<div class="yz-application-list-item">
|
|
951
1130
|
<ul>
|
|
952
|
-
<li *ngFor="let
|
|
1131
|
+
<li *ngFor="let nav of state.list" (click)="open(nav)">
|
|
953
1132
|
<a href="javascript:;">
|
|
954
|
-
<h4>{{
|
|
955
|
-
<p>{{
|
|
1133
|
+
<h4>{{ nav.name | i18n }}</h4>
|
|
1134
|
+
<p>{{ nav.intro | i18n }}</p>
|
|
956
1135
|
</a>
|
|
957
1136
|
</li>
|
|
958
1137
|
</ul>
|
|
@@ -961,13 +1140,13 @@ LayoutNavApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
|
|
|
961
1140
|
</div>
|
|
962
1141
|
</div>
|
|
963
1142
|
<!-- header end-->
|
|
964
|
-
`, 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:
|
|
965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1143
|
+
`, 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" }] });
|
|
1144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavApplicationComponent, decorators: [{
|
|
966
1145
|
type: Component,
|
|
967
1146
|
args: [{
|
|
968
1147
|
selector: `layout-nav-application`,
|
|
969
1148
|
template: `
|
|
970
|
-
<!--
|
|
1149
|
+
<!-- search start-->
|
|
971
1150
|
<ng-template #search>
|
|
972
1151
|
<div nz-row class="yz-application-list-search">
|
|
973
1152
|
<nz-input-group [nzPrefix]="prefixTemplate">
|
|
@@ -984,45 +1163,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
984
1163
|
</nz-input-group>
|
|
985
1164
|
</div>
|
|
986
1165
|
</ng-template>
|
|
1166
|
+
<!-- search end -->
|
|
1167
|
+
|
|
1168
|
+
<!-- right menu start -->
|
|
987
1169
|
<ng-template #ld>
|
|
988
1170
|
<div class="yz-application-list">
|
|
989
1171
|
<ul>
|
|
990
|
-
<li *ngFor="let
|
|
991
|
-
<h5>{{
|
|
992
|
-
<a href="javascript:;" *ngFor="let
|
|
1172
|
+
<li *ngFor="let topic of state.list">
|
|
1173
|
+
<h5>{{ topic.name | i18n }}</h5>
|
|
1174
|
+
<a href="javascript:;" *ngFor="let nav of topic.children" (click)="open(nav)">{{ nav.name | i18n }}</a>
|
|
993
1175
|
</li>
|
|
994
1176
|
</ul>
|
|
995
1177
|
</div>
|
|
996
1178
|
</ng-template>
|
|
997
|
-
<!--
|
|
1179
|
+
<!-- right menu end -->
|
|
998
1180
|
|
|
999
1181
|
<!-- button start-->
|
|
1000
|
-
<div class="yunzai-default__nav-item" (click)="diffChange()"> {{ '
|
|
1182
|
+
<div class="yunzai-default__nav-item" (click)="diffChange()"> {{ 'mode.nav' | i18n }}</div>
|
|
1001
1183
|
<!-- button end-->
|
|
1002
1184
|
|
|
1003
1185
|
<!-- header start-->
|
|
1004
1186
|
<div class="yz-application" nz-row *ngIf="state.active">
|
|
1005
1187
|
<div nz-col [nzSpan]="3" class="yz-application-topic">
|
|
1006
|
-
<div class="yz-application-text" (click)="
|
|
1007
|
-
<div class="yz-application-text" (click)="
|
|
1008
|
-
<div class="yz-application-text" *ngFor="let
|
|
1188
|
+
<div class="yz-application-text" (click)="attachNav('all')">{{ 'mode.nav.all' | i18n }}</div>
|
|
1189
|
+
<div class="yz-application-text" (click)="attachNav('mine')">{{ 'mode.nav.mine' | i18n }}</div>
|
|
1190
|
+
<div class="yz-application-text" *ngFor="let nav of state.topics" (click)="attachNav('other', nav)">{{
|
|
1191
|
+
nav.name | i18n
|
|
1192
|
+
}}</div>
|
|
1009
1193
|
</div>
|
|
1010
1194
|
<div nz-col [nzSpan]="21" [ngSwitch]="state.topic" class="yz-application-container">
|
|
1011
|
-
<div *
|
|
1195
|
+
<div *ngIf="state.type === 'all'">
|
|
1012
1196
|
<ng-template [ngTemplateOutlet]="search"></ng-template>
|
|
1013
1197
|
<ng-template [ngTemplateOutlet]="ld"></ng-template>
|
|
1014
1198
|
</div>
|
|
1015
|
-
<div *
|
|
1199
|
+
<div *ngIf="state.type === 'mine'">
|
|
1016
1200
|
<ng-template [ngTemplateOutlet]="search"></ng-template>
|
|
1017
1201
|
<ng-template [ngTemplateOutlet]="ld"></ng-template>
|
|
1018
1202
|
</div>
|
|
1019
|
-
<div *
|
|
1203
|
+
<div *ngIf="state.type === 'other'" class="yz-application-list">
|
|
1020
1204
|
<div class="yz-application-list-item">
|
|
1021
1205
|
<ul>
|
|
1022
|
-
<li *ngFor="let
|
|
1206
|
+
<li *ngFor="let nav of state.list" (click)="open(nav)">
|
|
1023
1207
|
<a href="javascript:;">
|
|
1024
|
-
<h4>{{
|
|
1025
|
-
<p>{{
|
|
1208
|
+
<h4>{{ nav.name | i18n }}</h4>
|
|
1209
|
+
<p>{{ nav.intro | i18n }}</p>
|
|
1026
1210
|
</a>
|
|
1027
1211
|
</li>
|
|
1028
1212
|
</ul>
|
|
@@ -1033,7 +1217,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1033
1217
|
<!-- header end-->
|
|
1034
1218
|
`
|
|
1035
1219
|
}]
|
|
1036
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
1220
|
+
}], ctorParameters: function () { return [{ type: i1$3.CacheService }, { type: YunzaiI18NService }, { type: i1$2._HttpClient }, { type: i0.Injector }]; } });
|
|
1037
1221
|
|
|
1038
1222
|
class LayoutNavGroupComponent {
|
|
1039
1223
|
constructor(inject, cacheService, http) {
|
|
@@ -1077,8 +1261,8 @@ class LayoutNavGroupComponent {
|
|
|
1077
1261
|
this.state.destroy$.complete();
|
|
1078
1262
|
}
|
|
1079
1263
|
}
|
|
1080
|
-
LayoutNavGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1081
|
-
LayoutNavGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
1264
|
+
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 });
|
|
1265
|
+
LayoutNavGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: LayoutNavGroupComponent, selector: "layout-nav-group", ngImport: i0, template: `
|
|
1082
1266
|
<div class="yz-application-group">
|
|
1083
1267
|
<nz-tabset>
|
|
1084
1268
|
<nz-tab *ngFor="let menu of state.topics" [nzTitle]="groupTitleTpl">
|
|
@@ -1107,7 +1291,7 @@ LayoutNavGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
1107
1291
|
</nz-tabset>
|
|
1108
1292
|
</div>
|
|
1109
1293
|
`, 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" }] });
|
|
1110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1294
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavGroupComponent, decorators: [{
|
|
1111
1295
|
type: Component,
|
|
1112
1296
|
args: [{
|
|
1113
1297
|
selector: `layout-nav-group`,
|
|
@@ -1141,14 +1325,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1141
1325
|
</div>
|
|
1142
1326
|
`
|
|
1143
1327
|
}]
|
|
1144
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$
|
|
1328
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$3.CacheService }, { type: i1$2._HttpClient }]; } });
|
|
1145
1329
|
|
|
1146
1330
|
class LayoutNavTileComponent {
|
|
1147
1331
|
constructor() { }
|
|
1148
1332
|
}
|
|
1149
|
-
LayoutNavTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1150
|
-
LayoutNavTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
1151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1333
|
+
LayoutNavTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1334
|
+
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 });
|
|
1335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LayoutNavTileComponent, decorators: [{
|
|
1152
1336
|
type: Component,
|
|
1153
1337
|
args: [{
|
|
1154
1338
|
selector: `layout-nav-tile`,
|
|
@@ -1212,12 +1396,26 @@ class YunzaiLayoutBasicComponent {
|
|
|
1212
1396
|
}
|
|
1213
1397
|
ngOnInit() {
|
|
1214
1398
|
this.initLogo();
|
|
1399
|
+
this.initFavicon();
|
|
1215
1400
|
this.initNavType();
|
|
1216
1401
|
this.initAside();
|
|
1217
1402
|
this.addLayoutDisplayListener();
|
|
1218
1403
|
this.stompService.listen();
|
|
1219
1404
|
this.toIndex();
|
|
1220
1405
|
}
|
|
1406
|
+
initFavicon() {
|
|
1407
|
+
const projectInfo = this.cacheService.get('_yz_project_info', { mode: 'none' });
|
|
1408
|
+
if (projectInfo.faviconUrl) {
|
|
1409
|
+
hasFavicon(projectInfo.faviconUrl).then((has) => {
|
|
1410
|
+
if (has) {
|
|
1411
|
+
setFavicon(projectInfo.faviconUrl);
|
|
1412
|
+
}
|
|
1413
|
+
else {
|
|
1414
|
+
setFavicon('./assets/favicon.ico');
|
|
1415
|
+
}
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1221
1419
|
initAside() {
|
|
1222
1420
|
const aside = this.cacheService.get('_yz_current', { mode: 'none' });
|
|
1223
1421
|
this.state.aside = { ...aside };
|
|
@@ -1268,8 +1466,8 @@ class YunzaiLayoutBasicComponent {
|
|
|
1268
1466
|
this.state.destroy$.complete();
|
|
1269
1467
|
}
|
|
1270
1468
|
}
|
|
1271
|
-
YunzaiLayoutBasicComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1272
|
-
YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
1469
|
+
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 });
|
|
1470
|
+
YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: YunzaiLayoutBasicComponent, selector: "yz-layout-basic", ngImport: i0, template: `<layout-default
|
|
1273
1471
|
[options]="options"
|
|
1274
1472
|
[asideUser]="asideUserTpl"
|
|
1275
1473
|
[content]="displayReusetab ? contentTpl : noneTpl"
|
|
@@ -1306,20 +1504,20 @@ YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
1306
1504
|
<nz-dropdown-menu #settingsMenu="nzDropdownMenu">
|
|
1307
1505
|
<div nz-menu style="width: 200px;">
|
|
1308
1506
|
<div nz-menu-item>
|
|
1309
|
-
{{ '
|
|
1507
|
+
{{ 'mode.nav' | i18n }}
|
|
1310
1508
|
</div>
|
|
1311
1509
|
|
|
1312
1510
|
<div nz-menu-item (click)="onNavTypeChange(NavType.APPLICATION)">
|
|
1313
1511
|
<i nz-icon nzType="appstore" class="mr-sm"></i>
|
|
1314
|
-
{{ '
|
|
1512
|
+
{{ 'mode.nav.application' | i18n }}
|
|
1315
1513
|
</div>
|
|
1316
1514
|
<div nz-menu-item (click)="onNavTypeChange(NavType.GROUP)">
|
|
1317
1515
|
<i nz-icon nzType="group" class="mr-sm"></i>
|
|
1318
|
-
{{ '
|
|
1516
|
+
{{ 'mode.nav.group' | i18n }}
|
|
1319
1517
|
</div>
|
|
1320
1518
|
<div nz-menu-item (click)="onNavTypeChange(NavType.TILE)">
|
|
1321
1519
|
<i nz-icon nzType="appstore" class="mr-sm"></i>
|
|
1322
|
-
{{ '
|
|
1520
|
+
{{ 'mode.nav.tile' | i18n }}
|
|
1323
1521
|
</div>
|
|
1324
1522
|
<div nz-menu-item> <yunzai-fullscreen></yunzai-fullscreen> </div>
|
|
1325
1523
|
<div nz-menu-item> <yunzai-clearstorage></yunzai-clearstorage> </div>
|
|
@@ -1336,13 +1534,13 @@ YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
1336
1534
|
<div nz-dropdown nzTrigger="click" [nzDropdownMenu]="userMenu" class="yunzai-default__aside-user">
|
|
1337
1535
|
<nz-avatar class="yunzai-default__aside-user-avatar" [nzSrc]="aside.icon"></nz-avatar>
|
|
1338
1536
|
<div class="yunzai-default__aside-user-info">
|
|
1339
|
-
<strong>{{ aside.name }}</strong>
|
|
1340
|
-
<p class="mb0">{{ aside.intro }}</p>
|
|
1537
|
+
<strong>{{ aside.name | i18n }}</strong>
|
|
1538
|
+
<p class="mb0">{{ aside.intro | i18n }}</p>
|
|
1341
1539
|
</div>
|
|
1342
1540
|
</div>
|
|
1343
1541
|
<nz-dropdown-menu #userMenu="nzDropdownMenu">
|
|
1344
1542
|
<ul nz-menu>
|
|
1345
|
-
<li nz-menu-item routerLink="/">{{ '
|
|
1543
|
+
<li nz-menu-item routerLink="/">{{ 'back.home' | i18n }}</li>
|
|
1346
1544
|
</ul>
|
|
1347
1545
|
</nz-dropdown-menu>
|
|
1348
1546
|
</ng-template>
|
|
@@ -1353,7 +1551,7 @@ YunzaiLayoutBasicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
1353
1551
|
<ng-template #noneTpl>
|
|
1354
1552
|
<router-outlet></router-outlet>
|
|
1355
1553
|
</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" }] });
|
|
1356
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutBasicComponent, decorators: [{
|
|
1357
1555
|
type: Component,
|
|
1358
1556
|
args: [{
|
|
1359
1557
|
selector: `yz-layout-basic`,
|
|
@@ -1394,20 +1592,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1394
1592
|
<nz-dropdown-menu #settingsMenu="nzDropdownMenu">
|
|
1395
1593
|
<div nz-menu style="width: 200px;">
|
|
1396
1594
|
<div nz-menu-item>
|
|
1397
|
-
{{ '
|
|
1595
|
+
{{ 'mode.nav' | i18n }}
|
|
1398
1596
|
</div>
|
|
1399
1597
|
|
|
1400
1598
|
<div nz-menu-item (click)="onNavTypeChange(NavType.APPLICATION)">
|
|
1401
1599
|
<i nz-icon nzType="appstore" class="mr-sm"></i>
|
|
1402
|
-
{{ '
|
|
1600
|
+
{{ 'mode.nav.application' | i18n }}
|
|
1403
1601
|
</div>
|
|
1404
1602
|
<div nz-menu-item (click)="onNavTypeChange(NavType.GROUP)">
|
|
1405
1603
|
<i nz-icon nzType="group" class="mr-sm"></i>
|
|
1406
|
-
{{ '
|
|
1604
|
+
{{ 'mode.nav.group' | i18n }}
|
|
1407
1605
|
</div>
|
|
1408
1606
|
<div nz-menu-item (click)="onNavTypeChange(NavType.TILE)">
|
|
1409
1607
|
<i nz-icon nzType="appstore" class="mr-sm"></i>
|
|
1410
|
-
{{ '
|
|
1608
|
+
{{ 'mode.nav.tile' | i18n }}
|
|
1411
1609
|
</div>
|
|
1412
1610
|
<div nz-menu-item> <yunzai-fullscreen></yunzai-fullscreen> </div>
|
|
1413
1611
|
<div nz-menu-item> <yunzai-clearstorage></yunzai-clearstorage> </div>
|
|
@@ -1424,13 +1622,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1424
1622
|
<div nz-dropdown nzTrigger="click" [nzDropdownMenu]="userMenu" class="yunzai-default__aside-user">
|
|
1425
1623
|
<nz-avatar class="yunzai-default__aside-user-avatar" [nzSrc]="aside.icon"></nz-avatar>
|
|
1426
1624
|
<div class="yunzai-default__aside-user-info">
|
|
1427
|
-
<strong>{{ aside.name }}</strong>
|
|
1428
|
-
<p class="mb0">{{ aside.intro }}</p>
|
|
1625
|
+
<strong>{{ aside.name | i18n }}</strong>
|
|
1626
|
+
<p class="mb0">{{ aside.intro | i18n }}</p>
|
|
1429
1627
|
</div>
|
|
1430
1628
|
</div>
|
|
1431
1629
|
<nz-dropdown-menu #userMenu="nzDropdownMenu">
|
|
1432
1630
|
<ul nz-menu>
|
|
1433
|
-
<li nz-menu-item routerLink="/">{{ '
|
|
1631
|
+
<li nz-menu-item routerLink="/">{{ 'back.home' | i18n }}</li>
|
|
1434
1632
|
</ul>
|
|
1435
1633
|
</nz-dropdown-menu>
|
|
1436
1634
|
</ng-template>
|
|
@@ -1442,7 +1640,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
1442
1640
|
<router-outlet></router-outlet>
|
|
1443
1641
|
</ng-template> `
|
|
1444
1642
|
}]
|
|
1445
|
-
}], ctorParameters: function () { return [{ type: i1$5.LayoutDisplayService }, { type: i1$
|
|
1643
|
+
}], ctorParameters: function () { return [{ type: i1$5.LayoutDisplayService }, { type: i1$3.CacheService }, { type: i3$3.StompService }, { type: undefined, decorators: [{
|
|
1446
1644
|
type: Inject,
|
|
1447
1645
|
args: [WINDOW]
|
|
1448
1646
|
}] }]; } });
|
|
@@ -1538,14 +1736,14 @@ class ActGuard {
|
|
|
1538
1736
|
});
|
|
1539
1737
|
}
|
|
1540
1738
|
}
|
|
1541
|
-
ActGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1542
|
-
ActGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
1543
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1739
|
+
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 });
|
|
1740
|
+
ActGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ActGuard, providedIn: 'root' });
|
|
1741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ActGuard, decorators: [{
|
|
1544
1742
|
type: Injectable,
|
|
1545
1743
|
args: [{
|
|
1546
1744
|
providedIn: 'root'
|
|
1547
1745
|
}]
|
|
1548
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
1746
|
+
}], ctorParameters: function () { return [{ type: i1$4.YunzaiConfigService }, { type: i1$3.CacheService }, { type: i1$4.PathToRegexpService }, { type: i5$1.Router }]; } });
|
|
1549
1747
|
|
|
1550
1748
|
class YunzaiAuthService {
|
|
1551
1749
|
constructor(injector) {
|
|
@@ -1580,7 +1778,7 @@ class YunzaiAuthService {
|
|
|
1580
1778
|
}
|
|
1581
1779
|
fetchTokenByUP() {
|
|
1582
1780
|
log$1('yz.auth.service: ', 'fetchTokenByUP');
|
|
1583
|
-
return this.httpClient.post(`/auth/oauth/token?_allow_anonymous=true`, this.config.loginForm).pipe(map((response) => {
|
|
1781
|
+
return this.httpClient.post(`/auth/oauth/token?_allow_anonymous=true`, this.config.loginForm).pipe(map$1((response) => {
|
|
1584
1782
|
const { access_token, expires_in, refresh_token, scope, token_type } = response;
|
|
1585
1783
|
return {
|
|
1586
1784
|
token: access_token,
|
|
@@ -1596,7 +1794,7 @@ class YunzaiAuthService {
|
|
|
1596
1794
|
const uri = encodeURIComponent(this.injector.get(WINDOW).location.href);
|
|
1597
1795
|
return this.httpClient
|
|
1598
1796
|
.get(`/cas-proxy/app/validate_full?callback=${uri}&_allow_anonymous=true×tamp=${new Date().getTime()}`)
|
|
1599
|
-
.pipe(map((response) => {
|
|
1797
|
+
.pipe(map$1((response) => {
|
|
1600
1798
|
switch (response.errcode) {
|
|
1601
1799
|
case 2000:
|
|
1602
1800
|
const { access_token, expires_in, refresh_token, scope, token_type } = response.data;
|
|
@@ -1650,7 +1848,7 @@ class YunzaiAuthService {
|
|
|
1650
1848
|
// user cache
|
|
1651
1849
|
if (!u) {
|
|
1652
1850
|
log$1('yz.auth.service: ', 'fetch user cache');
|
|
1653
|
-
list.push(this.httpClient.get(`/auth/user`).pipe(map((user) => {
|
|
1851
|
+
list.push(this.httpClient.get(`/auth/user`).pipe(map$1((user) => {
|
|
1654
1852
|
this.cacheService.set('_yz_user', user.principal);
|
|
1655
1853
|
})));
|
|
1656
1854
|
}
|
|
@@ -1661,7 +1859,7 @@ class YunzaiAuthService {
|
|
|
1661
1859
|
// header cache
|
|
1662
1860
|
if (!h) {
|
|
1663
1861
|
log$1('yz.auth.service: ', 'fetch header cache');
|
|
1664
|
-
list.push(this.httpClient.get(`/auth/allheader/v2`).pipe(map((header) => {
|
|
1862
|
+
list.push(this.httpClient.get(`/auth/allheader/v2`).pipe(map$1((header) => {
|
|
1665
1863
|
this.cacheService.set('_yz_header', header.data);
|
|
1666
1864
|
})));
|
|
1667
1865
|
}
|
|
@@ -1672,7 +1870,7 @@ class YunzaiAuthService {
|
|
|
1672
1870
|
// project cache
|
|
1673
1871
|
if (!p) {
|
|
1674
1872
|
log$1('yz.auth.service: ', 'fetch project cache');
|
|
1675
|
-
list.push(this.httpClient.get(`/app-manager/project/info`).pipe(map((info) => {
|
|
1873
|
+
list.push(this.httpClient.get(`/app-manager/project/info`).pipe(map$1((info) => {
|
|
1676
1874
|
this.cacheService.set('_yz_project_info', info.data);
|
|
1677
1875
|
})));
|
|
1678
1876
|
}
|
|
@@ -1684,9 +1882,9 @@ class YunzaiAuthService {
|
|
|
1684
1882
|
}));
|
|
1685
1883
|
}
|
|
1686
1884
|
}
|
|
1687
|
-
YunzaiAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1688
|
-
YunzaiAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
1689
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1885
|
+
YunzaiAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiAuthService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1886
|
+
YunzaiAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiAuthService, providedIn: 'root' });
|
|
1887
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiAuthService, decorators: [{
|
|
1690
1888
|
type: Injectable,
|
|
1691
1889
|
args: [{ providedIn: 'root' }]
|
|
1692
1890
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
@@ -1867,6 +2065,8 @@ class YunzaiDefaultInterceptor {
|
|
|
1867
2065
|
if (url.includes('.json') && url.includes('assets')) {
|
|
1868
2066
|
url = req.url;
|
|
1869
2067
|
}
|
|
2068
|
+
if (url.includes('i18n'))
|
|
2069
|
+
return next.handle(req);
|
|
1870
2070
|
// 加入语言头
|
|
1871
2071
|
const newReq = req.clone({ url, setHeaders: this.getAdditionalHeaders(req.headers) });
|
|
1872
2072
|
return next.handle(newReq).pipe(mergeMap(ev => {
|
|
@@ -1879,9 +2079,9 @@ class YunzaiDefaultInterceptor {
|
|
|
1879
2079
|
}), catchError((err) => this.handleData(err, newReq, next)));
|
|
1880
2080
|
}
|
|
1881
2081
|
}
|
|
1882
|
-
YunzaiDefaultInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1883
|
-
YunzaiDefaultInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
1884
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
2082
|
+
YunzaiDefaultInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiDefaultInterceptor, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2083
|
+
YunzaiDefaultInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiDefaultInterceptor });
|
|
2084
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiDefaultInterceptor, decorators: [{
|
|
1885
2085
|
type: Injectable
|
|
1886
2086
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
1887
2087
|
|
|
@@ -1897,8 +2097,8 @@ const LAYOUT_NAV_COMPONENTS = [LayoutNavApplicationComponent, LayoutNavGroupComp
|
|
|
1897
2097
|
const COMPONENTS = [YunzaiLayoutBasicComponent];
|
|
1898
2098
|
class YunzaiLayoutModule {
|
|
1899
2099
|
}
|
|
1900
|
-
YunzaiLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
1901
|
-
YunzaiLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
2100
|
+
YunzaiLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2101
|
+
YunzaiLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutModule, declarations: [YunzaiLayoutBasicComponent, YunzaiClearStorageComponent,
|
|
1902
2102
|
YunzaiFullScreenComponent,
|
|
1903
2103
|
YunzaiI18NComponent,
|
|
1904
2104
|
YunzaiNotifyComponent,
|
|
@@ -1915,7 +2115,7 @@ YunzaiLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
1915
2115
|
YunzaiNotifyComponent,
|
|
1916
2116
|
YunzaiThemBtnComponent,
|
|
1917
2117
|
YunzaiUserComponent, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent] });
|
|
1918
|
-
YunzaiLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
2118
|
+
YunzaiLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutModule, providers: [
|
|
1919
2119
|
{
|
|
1920
2120
|
provide: YUNZAI_THEME_BTN_KEYS,
|
|
1921
2121
|
useValue: 'site-theme'
|
|
@@ -1927,7 +2127,7 @@ YunzaiLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", vers
|
|
|
1927
2127
|
ReactiveFormsModule,
|
|
1928
2128
|
YunzaiSharedYelonModule,
|
|
1929
2129
|
YunzaiSharedZorroModule] });
|
|
1930
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
2130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiLayoutModule, decorators: [{
|
|
1931
2131
|
type: NgModule,
|
|
1932
2132
|
args: [{
|
|
1933
2133
|
imports: [
|
|
@@ -2762,7 +2962,7 @@ class YunzaiStartupService {
|
|
|
2762
2962
|
}
|
|
2763
2963
|
load() {
|
|
2764
2964
|
log$1('startup.service: ', 'load');
|
|
2765
|
-
|
|
2965
|
+
let defaultLang = this.settingService.layout.lang || this.i18n.defaultLang;
|
|
2766
2966
|
return this.i18n.loadLangData(defaultLang).pipe(mergeMap(langData => {
|
|
2767
2967
|
log$1('startup.service: ', 'set i18n, defaultLang->', defaultLang, ' langData->', langData);
|
|
2768
2968
|
this.i18n.use(defaultLang, langData);
|
|
@@ -2832,9 +3032,9 @@ class YunzaiStartupService {
|
|
|
2832
3032
|
}
|
|
2833
3033
|
}
|
|
2834
3034
|
}
|
|
2835
|
-
YunzaiStartupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
2836
|
-
YunzaiStartupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
|
2837
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
3035
|
+
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 });
|
|
3036
|
+
YunzaiStartupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiStartupService });
|
|
3037
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: YunzaiStartupService, decorators: [{
|
|
2838
3038
|
type: Injectable
|
|
2839
3039
|
}], ctorParameters: function () { return [{ type: i8.NzIconService }, { type: i1$2.MenuService }, { type: YunzaiI18NService, decorators: [{
|
|
2840
3040
|
type: Inject,
|
|
@@ -2842,7 +3042,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
2842
3042
|
}] }, { type: undefined, decorators: [{
|
|
2843
3043
|
type: Inject,
|
|
2844
3044
|
args: [WINDOW]
|
|
2845
|
-
}] }, { type: i1$2.SettingsService }, { type: i3$4.ACLService }, { type: i1$2.TitleService }, { type: YunzaiAuthService }, { type: i1$
|
|
3045
|
+
}] }, { type: i1$2.SettingsService }, { type: i3$4.ACLService }, { type: i1$2.TitleService }, { type: YunzaiAuthService }, { type: i1$3.CacheService }, { type: i1$4.YunzaiConfigService }]; } });
|
|
2846
3046
|
function mapYzSideToYelonMenu(menus) {
|
|
2847
3047
|
menus.forEach(menu => {
|
|
2848
3048
|
menu.badgeDot = menu.badge_dot || null;
|
|
@@ -2891,5 +3091,5 @@ const YUNZAI_APPINIT_PROVIDES = [
|
|
|
2891
3091
|
* Generated bundle index. Do not edit.
|
|
2892
3092
|
*/
|
|
2893
3093
|
|
|
2894
|
-
export { ActGuard, BUSINESS_DEFAULT_CONFIG, LayoutNavApplicationComponent, LayoutNavGroupComponent, LayoutNavTileComponent, NavType,
|
|
3094
|
+
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 };
|
|
2895
3095
|
//# sourceMappingURL=layout.mjs.map
|