@yelon/bis 12.0.14 → 12.0.18

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license ng-yunzai(devcui@outlook.com) v12.0.14
2
+ * @license ng-yunzai(devcui@outlook.com) v12.0.18
3
3
  * (c) 2020 devcui https://github.com/hbyunzai/yelon/
4
4
  * License: MIT
5
5
  */
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license ng-yunzai(devcui@outlook.com) v12.0.14
2
+ * @license ng-yunzai(devcui@outlook.com) v12.0.18
3
3
  * (c) 2020 devcui https://github.com/hbyunzai/yelon/
4
4
  * License: MIT
5
5
  */
6
6
  (function (global, factory) {
7
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@yelon/cache'), require('@yelon/theme'), require('@yelon/util'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/common/locales/en'), require('@angular/common/locales/zh'), require('@angular/common/locales/zh-Hant'), require('date-fns/locale'), require('ng-zorro-antd/i18n'), require('@yelon/util/config'), require('@yelon/util/decorator'), require('rxjs'), require('rxjs/operators'), require('date-fns'), require('ng-zorro-antd/message'), require('@yelon/util/other'), require('@angular/cdk/bidi'), require('@yelon/theme/theme-btn'), require('@yelon/auth'), require('ng-zorro-antd/modal'), require('screenfull'), require('@angular/common/http'), require('@angular/forms'), require('@angular/router'), require('@yelon/bis/shared'), require('@stomp/rx-stomp'), require('ng-zorro-antd/notification'), require('ng-zorro-antd/icon'), require('@yelon/acl')) :
8
- typeof define === 'function' && define.amd ? define('@yelon/bis/layout', ['exports', '@angular/core', '@yelon/cache', '@yelon/theme', '@yelon/util', '@angular/cdk/platform', '@angular/common', '@angular/common/locales/en', '@angular/common/locales/zh', '@angular/common/locales/zh-Hant', 'date-fns/locale', 'ng-zorro-antd/i18n', '@yelon/util/config', '@yelon/util/decorator', 'rxjs', 'rxjs/operators', 'date-fns', 'ng-zorro-antd/message', '@yelon/util/other', '@angular/cdk/bidi', '@yelon/theme/theme-btn', '@yelon/auth', 'ng-zorro-antd/modal', 'screenfull', '@angular/common/http', '@angular/forms', '@angular/router', '@yelon/bis/shared', '@stomp/rx-stomp', 'ng-zorro-antd/notification', 'ng-zorro-antd/icon', '@yelon/acl'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.yelon = global.yelon || {}, global.yelon.bis = global.yelon.bis || {}, global.yelon.bis.layout = {}), global.ng.core, global.yelon.cache, global.yelon.theme, global.yelon.util, global.ng.cdk.platform, global.ng.common, global.ng.common.locales.en, global.ng.common.locales.zh, global.ng.common.locales.zhHant, global.locale, global["ng-zorro-antd/i18n"], global.yelon.util.config, global.decorator, global.rxjs, global.rxjs.operators, global.DateFns, global.message, global.yelon.util.other, global.ng.cdk.bidi, global.themeBtn, global.yelon.auth, global["ng-zorro-antd/modal"], global.screenfull, global.ng.common.http, global.ng.forms, global.ng.router, global.yelon.bis.shared, global.rxStomp, global.i3$1, global["ng-zorro-antd/icon"], global.yelon.acl));
10
- })(this, (function (exports, i0, i2$1, i1, util, i3, common, ngEn, ngZh, ngZhTw, locale, i2, i1$1, decorator, rxjs, operators, dateFns, message, other, bidi, themeBtn, auth, modal, screenfull, http, forms, i4, shared, rxStomp, i3$1, icon, acl) { 'use strict';
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@yelon/cache'), require('@yelon/theme'), require('@yelon/util'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/common/locales/en'), require('@angular/common/locales/zh'), require('@angular/common/locales/zh-Hant'), require('date-fns/locale'), require('@yelon/util/config'), require('ng-zorro-antd/i18n'), require('@yelon/util/decorator'), require('rxjs'), require('rxjs/operators'), require('date-fns'), require('@yelon/util/other'), require('ng-zorro-antd/message'), require('@angular/cdk/bidi'), require('@yelon/theme/theme-btn'), require('@yelon/auth'), require('ng-zorro-antd/modal'), require('screenfull'), require('@angular/common/http'), require('@angular/forms'), require('@angular/router'), require('@yelon/bis/shared'), require('@stomp/rx-stomp'), require('ng-zorro-antd/notification'), require('@yelon/acl'), require('ng-zorro-antd/icon')) :
8
+ typeof define === 'function' && define.amd ? define('@yelon/bis/layout', ['exports', '@angular/core', '@yelon/cache', '@yelon/theme', '@yelon/util', '@angular/cdk/platform', '@angular/common', '@angular/common/locales/en', '@angular/common/locales/zh', '@angular/common/locales/zh-Hant', 'date-fns/locale', '@yelon/util/config', 'ng-zorro-antd/i18n', '@yelon/util/decorator', 'rxjs', 'rxjs/operators', 'date-fns', '@yelon/util/other', 'ng-zorro-antd/message', '@angular/cdk/bidi', '@yelon/theme/theme-btn', '@yelon/auth', 'ng-zorro-antd/modal', 'screenfull', '@angular/common/http', '@angular/forms', '@angular/router', '@yelon/bis/shared', '@stomp/rx-stomp', 'ng-zorro-antd/notification', '@yelon/acl', 'ng-zorro-antd/icon'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.yelon = global.yelon || {}, global.yelon.bis = global.yelon.bis || {}, global.yelon.bis.layout = {}), global.ng.core, global.yelon.cache, global.yelon.theme, global.yelon.util, global.ng.cdk.platform, global.ng.common, global.ng.common.locales.en, global.ng.common.locales.zh, global.ng.common.locales.zhHant, global.locale, global.yelon.util.config, global["ng-zorro-antd/i18n"], global.decorator, global.rxjs, global.rxjs.operators, global.DateFns, global.yelon.util.other, global.message, global.ng.cdk.bidi, global.themeBtn, global.yelon.auth, global["ng-zorro-antd/modal"], global.screenfull, global.ng.common.http, global.ng.forms, global.ng.router, global.yelon.bis.shared, global.rxStomp, global.i3$1, global.yelon.acl, global["ng-zorro-antd/icon"]));
10
+ })(this, (function (exports, i0, i2$1, i1, util, i3, common, ngEn, ngZh, ngZhTw, locale, i1$1, i2, decorator, rxjs, operators, dateFns, other, message, bidi, themeBtn, auth, modal, screenfull, http, forms, i4, shared, rxStomp, i3$1, acl, icon) { 'use strict';
11
11
 
12
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
13
 
@@ -36,8 +36,8 @@
36
36
  var ngEn__default = /*#__PURE__*/_interopDefaultLegacy(ngEn);
37
37
  var ngZh__default = /*#__PURE__*/_interopDefaultLegacy(ngZh);
38
38
  var ngZhTw__default = /*#__PURE__*/_interopDefaultLegacy(ngZhTw);
39
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
40
39
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
40
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
41
41
  var screenfull__namespace = /*#__PURE__*/_interopNamespace(screenfull);
42
42
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
43
43
  var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
@@ -402,9 +402,7 @@
402
402
  return { code: code, text: item.text, abbr: item.abbr };
403
403
  });
404
404
  var defaultLang = _this.getDefaultLang();
405
- if (_this._langs.findIndex(function (w) { return w.code === defaultLang; })) {
406
- _this._defaultLang = defaultLang;
407
- }
405
+ _this._defaultLang = _this._langs.findIndex(function (w) { return w.code === defaultLang; }) === -1 ? DEFAULT : defaultLang;
408
406
  return _this;
409
407
  }
410
408
  YzI18NService.prototype.getDefaultLang = function () {
@@ -637,36 +635,37 @@
637
635
  ], YzHeaderI18NComponent.prototype, "showLangText", void 0);
638
636
 
639
637
  var YzHeaderNotifyComponent = /** @class */ (function () {
640
- function YzHeaderNotifyComponent(injector, msg, nzI18n, cdr, httpClient) {
638
+ function YzHeaderNotifyComponent(injector, msg, y18n, nzI18n, cdr, httpClient) {
641
639
  this.injector = injector;
642
640
  this.msg = msg;
641
+ this.y18n = y18n;
643
642
  this.nzI18n = nzI18n;
644
643
  this.cdr = cdr;
645
644
  this.httpClient = httpClient;
646
645
  this.data = [
647
646
  {
648
647
  key: 'msg',
649
- title: '消息',
648
+ title: this.y18n.fanyi('notify.message'),
650
649
  list: [],
651
- emptyText: '您已读完所有消息',
650
+ emptyText: this.y18n.fanyi('notify.message.emptyText'),
652
651
  emptyImage: './assets/tmp/img/message.svg',
653
- clearText: '清空消息'
652
+ clearText: this.y18n.fanyi('notify.message.clearText')
654
653
  },
655
654
  {
656
655
  key: 'todo',
657
- title: '待办',
656
+ title: this.y18n.fanyi('notify.todo'),
658
657
  list: [],
659
- emptyText: '你已完成所有待办',
658
+ emptyText: this.y18n.fanyi('notify.todo.emptyText'),
660
659
  emptyImage: './assets/tmp/img/todo.svg',
661
- clearText: '重新加载'
660
+ clearText: this.y18n.fanyi('notify.todo.clearText')
662
661
  },
663
662
  {
664
663
  key: 'notice',
665
- title: '通知',
664
+ title: this.y18n.fanyi('notify.notice'),
666
665
  list: [],
667
- emptyText: '你已查看所有通知',
666
+ emptyText: this.y18n.fanyi('notify.notice.emptyText'),
668
667
  emptyImage: './assets/tmp/img/notice.svg',
669
- clearText: '重新加载'
668
+ clearText: this.y18n.fanyi('notify.notice.clearText')
670
669
  }
671
670
  ];
672
671
  this.loading = false;
@@ -691,11 +690,11 @@
691
690
  var formatMessageStatus = function (status) {
692
691
  switch (status) {
693
692
  case '0':
694
- return { extra: '未读', color: 'red' };
693
+ return { extra: _this.y18n.fanyi('notify.unread'), color: 'red' };
695
694
  case '1':
696
- return { extra: '已读', color: 'green' };
695
+ return { extra: _this.y18n.fanyi('notify.readed'), color: 'green' };
697
696
  default:
698
- return { extra: '无状态', color: 'primary' };
697
+ return { extra: _this.y18n.fanyi('notify.nostatus'), color: 'primary' };
699
698
  }
700
699
  };
701
700
  return this.httpClient
@@ -718,11 +717,11 @@
718
717
  var formatTodoStatus = function (status) {
719
718
  switch (status) {
720
719
  case '0':
721
- return { extra: '未开始', color: 'red' };
720
+ return { extra: _this.y18n.fanyi('notify.unstart'), color: 'red' };
722
721
  case '1':
723
- return { extra: '已开始', color: 'green' };
722
+ return { extra: _this.y18n.fanyi('notify.started'), color: 'green' };
724
723
  default:
725
- return { extra: '无状态', color: 'primary' };
724
+ return { extra: _this.y18n.fanyi('notify.nostatus'), color: 'primary' };
726
725
  }
727
726
  };
728
727
  return this.httpClient
@@ -744,7 +743,7 @@
744
743
  var t = this.data.filter(function (d) { return d.title === type; })[0];
745
744
  if (t.key == 'msg' || t.key == 'notice') {
746
745
  this.subs.push(this.httpClient.post("/message-center-3/my-msg-and-todo/msg-clear", {}).subscribe(function (_) {
747
- _this.msg.success("\u6E05\u7A7A\u4E86 " + type);
746
+ _this.msg.success(_this.y18n.fanyi('notify.clear') + " " + type);
748
747
  _this.loadData();
749
748
  }));
750
749
  }
@@ -771,6 +770,7 @@
771
770
  YzHeaderNotifyComponent.ctorParameters = function () { return [
772
771
  { type: i0.Injector },
773
772
  { type: message.NzMessageService },
773
+ { type: YzI18NService, decorators: [{ type: i0.Inject, args: [i1.YUNZAI_I18N_TOKEN,] }] },
774
774
  { type: i2.NzI18nService },
775
775
  { type: i0.ChangeDetectorRef },
776
776
  { type: i1._HttpClient }
@@ -2222,7 +2222,7 @@
2222
2222
  // menu
2223
2223
  var ms = util.deepCopy(user.menu).filter(function (m) { return m.systemCode && m.systemCode === _this.bis.systemCode; });
2224
2224
  mapYzSideToYelonMenu(ms);
2225
- var currentMenu = ms.pop();
2225
+ var currentMenu = ms.pop() || [];
2226
2226
  this.menuService.add([currentMenu]);
2227
2227
  // logo app
2228
2228
  this.settingService.setApp({ name: currentMenu.text, description: currentMenu.intro });
@@ -2232,8 +2232,8 @@
2232
2232
  email: user.email || 'no email'
2233
2233
  });
2234
2234
  // title
2235
- this.titleService.default = currentMenu.text || 'default application name';
2236
- this.titleService.setTitle(currentMenu.text || 'no title');
2235
+ this.titleService.default = currentMenu && currentMenu.text ? currentMenu.text : 'default application name';
2236
+ this.titleService.setTitle(currentMenu && currentMenu.text ? currentMenu.text : 'no title');
2237
2237
  // acl
2238
2238
  var abilities = [];
2239
2239
  generateAbility([currentMenu], abilities, '');
@@ -2623,14 +2623,15 @@
2623
2623
  { type: i4.Router }
2624
2624
  ]; };
2625
2625
 
2626
+ // export * from './contact/contact.component';
2627
+ // export * from './contact/contact.service';
2628
+
2626
2629
  /**
2627
2630
  * Generated bundle index. Do not edit.
2628
2631
  */
2629
2632
 
2630
2633
  exports.ActGuard = ActGuard;
2631
2634
  exports.BUSINESS_DEFAULT_CONFIG = BUSINESS_DEFAULT_CONFIG;
2632
- exports.ContactComponent = ContactComponent;
2633
- exports.ContactService = ContactService;
2634
2635
  exports.PathToRegexpService = PathToRegexpService;
2635
2636
  exports.STOMP_DEFAULT_CONFIG = STOMP_DEFAULT_CONFIG;
2636
2637
  exports.YZ_APPINIT_PROVIDES = YZ_APPINIT_PROVIDES;
@@ -2654,13 +2655,15 @@
2654
2655
  exports.mergeBisConfig = mergeBisConfig;
2655
2656
  exports.mergeStompConfig = mergeStompConfig;
2656
2657
  exports["ɵ0"] = ɵ0;
2657
- exports["ɵa"] = YzHeaderApplicationComponent;
2658
- exports["ɵb"] = YzHeaderNotifyComponent;
2659
- exports["ɵc"] = YzHeaderThemBtnComponent;
2660
- exports["ɵd"] = YzHeaderUserComponent;
2661
- exports["ɵe"] = YzHeaderFullScreenComponent;
2662
- exports["ɵf"] = YzHeaderClearStorageComponent;
2663
- exports["ɵg"] = YzHeaderI18NComponent;
2658
+ exports["ɵa"] = ContactComponent;
2659
+ exports["ɵb"] = ContactService;
2660
+ exports["ɵc"] = YzHeaderApplicationComponent;
2661
+ exports["ɵd"] = YzHeaderNotifyComponent;
2662
+ exports["ɵe"] = YzHeaderThemBtnComponent;
2663
+ exports["ɵf"] = YzHeaderUserComponent;
2664
+ exports["ɵg"] = YzHeaderFullScreenComponent;
2665
+ exports["ɵh"] = YzHeaderClearStorageComponent;
2666
+ exports["ɵi"] = YzHeaderI18NComponent;
2664
2667
 
2665
2668
  Object.defineProperty(exports, '__esModule', { value: true });
2666
2669