bbj-screen-widget 2.4.56 → 2.4.57

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.
@@ -6662,12 +6662,7 @@
6662
6662
  indicator: [],
6663
6663
  },
6664
6664
  color: this.lineColor,
6665
- grid: {
6666
- top: this.grid.top,
6667
- right: this.grid.right,
6668
- left: this.grid.left,
6669
- bottom: this.grid.bottom,
6670
- },
6665
+ grid: this.grid,
6671
6666
  series: [
6672
6667
  {
6673
6668
  label: {
@@ -9683,182 +9678,219 @@
9683
9678
  _this.data = [];
9684
9679
  _this.areaClick = new i0.EventEmitter();
9685
9680
  _this.nameMap = {
9681
+ Somalia: '索马里',
9682
+ Liechtenstein: '列支敦士登',
9683
+ Morocco: '摩洛哥',
9684
+ 'W. Sahara': '西撒哈拉',
9685
+ Serbia: '塞尔维亚',
9686
9686
  Afghanistan: '阿富汗',
9687
- Albania: '阿尔巴尼亚',
9688
- Algeria: '阿尔及利亚',
9689
9687
  Angola: '安哥拉',
9688
+ Albania: '阿尔巴尼亚',
9689
+ Aland: '奥兰群岛',
9690
+ Andorra: '安道尔',
9691
+ 'United Arab Emirates': '阿拉伯联合酋长国',
9690
9692
  Argentina: '阿根廷',
9691
9693
  Armenia: '亚美尼亚',
9694
+ 'American Samoa': '美属萨摩亚',
9695
+ 'Fr. S. Antarctic Lands': '法属南部领地',
9696
+ 'Antigua and Barb.': '安提瓜和巴布达',
9692
9697
  Australia: '澳大利亚',
9693
9698
  Austria: '奥地利',
9694
9699
  Azerbaijan: '阿塞拜疆',
9700
+ Burundi: '布隆迪',
9701
+ Belgium: '比利时',
9702
+ Benin: '贝宁',
9703
+ 'Burkina Faso': '布基纳法索',
9695
9704
  Bangladesh: '孟加拉国',
9705
+ Bulgaria: '保加利亚',
9706
+ Bahrain: '巴林',
9707
+ Bahamas: '巴哈马',
9708
+ 'Bosnia and Herz.': '波斯尼亚和黑塞哥维那',
9696
9709
  Belarus: '白俄罗斯',
9697
- Belgium: '比利时',
9698
9710
  Belize: '伯利兹',
9699
- Benin: '贝宁',
9700
9711
  Bermuda: '百慕大',
9701
- Bhutan: '不丹',
9702
9712
  Bolivia: '玻利维亚',
9703
- 'Bosnia and Herzegovina': '波斯尼亚和黑塞哥维那',
9704
- Botswana: '博茨瓦纳',
9705
9713
  Brazil: '巴西',
9714
+ Barbados: '巴巴多斯',
9706
9715
  Brunei: '文莱',
9707
- Bulgaria: '保加利亚',
9708
- 'Burkina Faso': '布基纳法索',
9709
- Burundi: '布隆迪',
9710
- Cambodia: '柬埔寨',
9711
- Cameroon: '喀麦隆',
9716
+ Bhutan: '不丹',
9717
+ Botswana: '博茨瓦纳',
9718
+ 'Central African Rep.': '中非共和国',
9712
9719
  Canada: '加拿大',
9713
- 'Central African Republic': '中非共和国',
9714
- Chad: '乍得',
9720
+ Switzerland: '瑞士',
9715
9721
  Chile: '智利',
9716
9722
  China: '中国',
9723
+ "Côte d'Ivoire": '科特迪瓦',
9724
+ Cameroon: '喀麦隆',
9725
+ 'Dem. Rep. Congo': '刚果(金)',
9726
+ Congo: '刚果(布)',
9717
9727
  Colombia: '哥伦比亚',
9728
+ Comoros: '科摩罗',
9729
+ 'Cape Verde': '佛得角',
9718
9730
  'Costa Rica': '哥斯达黎加',
9719
- Croatia: '克罗地亚',
9720
9731
  Cuba: '古巴',
9732
+ Curaçao: '库拉索',
9733
+ 'Cayman Is.': '开曼群岛',
9734
+ 'N. Cyprus': '北塞浦路斯',
9721
9735
  Cyprus: '塞浦路斯',
9722
- 'Czech Republic': '捷克共和国',
9723
- 'Democratic Republic of the Congo': '刚果民主共和国',
9724
- Denmark: '丹麦',
9736
+ 'Czech Rep.': '捷克',
9737
+ Germany: '德国',
9725
9738
  Djibouti: '吉布提',
9726
- 'Dominican Republic': '多明尼加共和国',
9727
- 'East Timor': '东帝汶',
9739
+ Dominica: '多米尼克',
9740
+ Denmark: '丹麦',
9741
+ 'Dominican Rep.': '多米尼加',
9742
+ Algeria: '阿尔及利亚',
9728
9743
  Ecuador: '厄瓜多尔',
9729
9744
  Egypt: '埃及',
9730
- 'El Salvador': '萨尔瓦多',
9731
- 'Equatorial Guinea': '赤道几内亚',
9732
9745
  Eritrea: '厄立特里亚',
9746
+ Spain: '西班牙',
9733
9747
  Estonia: '爱沙尼亚',
9734
9748
  Ethiopia: '埃塞俄比亚',
9735
- 'Falkland Islands': '福克兰群岛',
9736
- Fiji: '斐',
9737
9749
  Finland: '芬兰',
9750
+ Fiji: '斐济',
9751
+ 'Falkland Is.': '福克兰群岛',
9738
9752
  France: '法国',
9739
- 'French Guiana': '法属圭亚那',
9740
- 'French Southern and Antarctic Lands': '法属南半球和南极领地',
9753
+ 'Faeroe Is.': '法罗群岛',
9754
+ Micronesia: '密克罗尼西亚',
9741
9755
  Gabon: '加蓬',
9742
- Gambia: '冈比亚',
9756
+ 'United Kingdom': '英国',
9743
9757
  Georgia: '格鲁吉亚',
9744
- Germany: '德国',
9745
9758
  Ghana: '加纳',
9759
+ Guinea: '几内亚',
9760
+ Gambia: '冈比亚',
9761
+ 'Guinea-Bissau': '几内亚比绍',
9762
+ 'Eq. Guinea': '赤道几内亚',
9746
9763
  Greece: '希腊',
9764
+ Grenada: '格林纳达',
9747
9765
  Greenland: '格陵兰',
9748
9766
  Guatemala: '危地马拉',
9749
- Guinea: '几内亚',
9750
- 'Guinea Bissau': '几内亚比绍',
9767
+ Guam: '关岛',
9751
9768
  Guyana: '圭亚那',
9752
- Haiti: '海地',
9769
+ 'Heard I. and McDonald Is.': '赫德岛和麦克唐纳群岛',
9753
9770
  Honduras: '洪都拉斯',
9771
+ Croatia: '克罗地亚',
9772
+ Haiti: '海地',
9754
9773
  Hungary: '匈牙利',
9755
- Iceland: '冰岛',
9774
+ Indonesia: '印度尼西亚',
9775
+ 'Isle of Man': '马恩岛',
9756
9776
  India: '印度',
9757
- Indonesia: '印尼',
9777
+ 'Br. Indian Ocean Ter.': '英属印度洋领地',
9778
+ Ireland: '爱尔兰',
9758
9779
  Iran: '伊朗',
9759
9780
  Iraq: '伊拉克',
9760
- Ireland: '爱尔兰',
9781
+ Iceland: '冰岛',
9761
9782
  Israel: '以色列',
9762
9783
  Italy: '意大利',
9763
- 'Ivory Coast': '象牙海岸',
9764
9784
  Jamaica: '牙买加',
9765
- Japan: '日本',
9785
+ Jersey: '泽西岛',
9766
9786
  Jordan: '约旦',
9787
+ Japan: '日本',
9788
+ 'Siachen Glacier': '锡亚琴冰川',
9767
9789
  Kazakhstan: '哈萨克斯坦',
9768
9790
  Kenya: '肯尼亚',
9769
- Kosovo: '科索沃',
9770
- Kuwait: '科威特',
9771
9791
  Kyrgyzstan: '吉尔吉斯斯坦',
9772
- Laos: '老挝',
9773
- Latvia: '拉脱维亚',
9792
+ Cambodia: '柬埔寨',
9793
+ Kiribati: '基里巴斯',
9794
+ Korea: '韩国',
9795
+ Kuwait: '科威特',
9796
+ 'Lao PDR': '老挝',
9774
9797
  Lebanon: '黎巴嫩',
9775
- Lesotho: '莱索托',
9776
9798
  Liberia: '利比里亚',
9777
9799
  Libya: '利比亚',
9800
+ 'Saint Lucia': '圣卢西亚',
9801
+ 'Sri Lanka': '斯里兰卡',
9802
+ Lesotho: '莱索托',
9778
9803
  Lithuania: '立陶宛',
9779
9804
  Luxembourg: '卢森堡',
9780
- Macedonia: '马其顿',
9805
+ Latvia: '拉脱维亚',
9806
+ Moldova: '摩尔多瓦',
9781
9807
  Madagascar: '马达加斯加',
9782
- Malawi: '马拉维',
9783
- Malaysia: '马来西亚',
9784
- Mali: '马里',
9785
- Mauritania: '毛里塔尼亚',
9786
9808
  Mexico: '墨西哥',
9787
- Moldova: '摩尔多瓦',
9788
- Mongolia: '蒙古',
9809
+ Macedonia: '北马其顿',
9810
+ Mali: '马里',
9811
+ Malta: '马耳他',
9812
+ Myanmar: '缅甸',
9789
9813
  Montenegro: '黑山',
9790
- Morocco: '摩洛哥',
9814
+ Mongolia: '蒙古',
9815
+ 'N. Mariana Is.': '北马里亚纳群岛',
9791
9816
  Mozambique: '莫桑比克',
9792
- Myanmar: '缅甸',
9817
+ Mauritania: '毛里塔尼亚',
9818
+ Montserrat: '蒙特塞拉特',
9819
+ Mauritius: '毛里求斯',
9820
+ Malawi: '马拉维',
9821
+ Malaysia: '马来西亚',
9793
9822
  Namibia: '纳米比亚',
9794
- Nepal: '尼泊尔',
9795
- Netherlands: '荷兰',
9796
9823
  'New Caledonia': '新喀里多尼亚',
9797
- 'New Zealand': '新西兰',
9798
- Nicaragua: '尼加拉瓜',
9799
9824
  Niger: '尼日尔',
9800
9825
  Nigeria: '尼日利亚',
9801
- 'North Korea': '北朝鲜',
9802
- 'Northern Cyprus': '北塞浦路斯',
9826
+ Nicaragua: '尼加拉瓜',
9827
+ Niue: '纽埃',
9828
+ Netherlands: '荷兰',
9803
9829
  Norway: '挪威',
9830
+ Nepal: '尼泊尔',
9831
+ 'New Zealand': '新西兰',
9804
9832
  Oman: '阿曼',
9805
9833
  Pakistan: '巴基斯坦',
9806
9834
  Panama: '巴拿马',
9807
- 'Papua New Guinea': '巴布亚新几内亚',
9808
- Paraguay: '巴拉圭',
9809
9835
  Peru: '秘鲁',
9810
9836
  Philippines: '菲律宾',
9837
+ Palau: '帕劳',
9838
+ 'Papua New Guinea': '巴布亚新几内亚',
9811
9839
  Poland: '波兰',
9812
- Portugal: '葡萄牙',
9813
9840
  'Puerto Rico': '波多黎各',
9841
+ 'Dem. Rep. Korea': '朝鲜',
9842
+ Portugal: '葡萄牙',
9843
+ Paraguay: '巴拉圭',
9844
+ Palestine: '巴勒斯坦',
9845
+ 'Fr. Polynesia': '法属波利尼西亚',
9814
9846
  Qatar: '卡塔尔',
9815
- 'Republic of Serbia': '塞尔维亚',
9816
- 'Republic of the Congo': '刚果共和国',
9817
9847
  Romania: '罗马尼亚',
9818
9848
  Russia: '俄罗斯',
9819
9849
  Rwanda: '卢旺达',
9820
9850
  'Saudi Arabia': '沙特阿拉伯',
9851
+ Sudan: '苏丹',
9852
+ 'S. Sudan': '南苏丹',
9821
9853
  Senegal: '塞内加尔',
9822
- 'Sierra Leone': '塞拉利昂',
9823
9854
  Singapore: '新加坡',
9855
+ 'S. Geo. and S. Sandw. Is.': '南乔治亚岛和南桑威奇群岛',
9856
+ 'Saint Helena': '圣赫勒拿',
9857
+ 'Solomon Is.': '所罗门群岛',
9858
+ 'Sierra Leone': '塞拉利昂',
9859
+ 'El Salvador': '萨尔瓦多',
9860
+ 'St. Pierre and Miquelon': '圣皮埃尔和密克隆',
9861
+ 'São Tomé and Principe': '圣多美和普林西比',
9862
+ Suriname: '苏里南',
9824
9863
  Slovakia: '斯洛伐克',
9825
9864
  Slovenia: '斯洛文尼亚',
9826
- 'Solomon Islands': '所罗门群岛',
9827
- Somalia: '索马里',
9828
- Somaliland: '索马里兰',
9829
- 'South Africa': '南非',
9830
- 'South Korea': '韩国',
9831
- 'South Sudan': '南苏丹',
9832
- Spain: '西班牙',
9833
- 'Sri Lanka': '斯里兰卡',
9834
- Sudan: '苏丹',
9835
- Suriname: '苏里南',
9836
- Swaziland: '斯威士兰',
9837
9865
  Sweden: '瑞典',
9838
- Switzerland: '瑞士',
9866
+ Swaziland: '斯威士兰',
9867
+ Seychelles: '塞舌尔',
9839
9868
  Syria: '叙利亚',
9840
- Tajikistan: '塔吉克斯坦',
9841
- Thailand: '泰国',
9842
- 'The Bahamas': '巴哈马',
9869
+ 'Turks and Caicos Is.': '特克斯和凯科斯群岛',
9870
+ Chad: '乍得',
9843
9871
  Togo: '多哥',
9844
- 'Trinidad and Tobago': '特里尼达和多巴哥',
9872
+ Thailand: '泰国',
9873
+ Tajikistan: '塔吉克斯坦',
9874
+ Turkmenistan: '土库曼斯坦',
9875
+ 'Timor-Leste': '东帝汶',
9876
+ Tonga: '汤加',
9877
+ 'Trinidad and Tobago': '特立尼达和多巴哥',
9845
9878
  Tunisia: '突尼斯',
9846
9879
  Turkey: '土耳其',
9847
- Turkmenistan: '土库曼斯坦',
9880
+ Tanzania: '坦桑尼亚',
9848
9881
  Uganda: '乌干达',
9849
9882
  Ukraine: '乌克兰',
9850
- 'United Arab Emirates': '阿联酋',
9851
- 'United Kingdom': '英国',
9852
- 'United Republic of Tanzania': '坦桑尼亚',
9853
- 'United States': '美国',
9854
9883
  Uruguay: '乌拉圭',
9884
+ 'United States': '美国',
9855
9885
  Uzbekistan: '乌兹别克斯坦',
9856
- Vanuatu: '瓦努阿图',
9886
+ 'St. Vin. and Gren.': '圣文森特和格林纳丁斯',
9857
9887
  Venezuela: '委内瑞拉',
9888
+ 'U.S. Virgin Is.': '美属维尔京群岛',
9858
9889
  Vietnam: '越南',
9859
- 'West Bank': '西岸',
9860
- 'Western Sahara': '西撒哈拉',
9890
+ Vanuatu: '瓦努阿图',
9891
+ Samoa: '萨摩亚',
9861
9892
  Yemen: '也门',
9893
+ 'South Africa': '南非',
9862
9894
  Zambia: '赞比亚',
9863
9895
  Zimbabwe: '津巴布韦',
9864
9896
  };
@@ -20303,8 +20335,10 @@
20303
20335
 
20304
20336
  var ɵ0$d = { type: 'string', title: 'id' };
20305
20337
  exports.ɵeg = /** @class */ (function () {
20306
- function CalendarComponent(router) {
20338
+ function CalendarComponent(router, cd) {
20339
+ var _this = this;
20307
20340
  this.router = router;
20341
+ this.cd = cd;
20308
20342
  this.isInitialDate = true;
20309
20343
  this.initialDate = '2020-07-18';
20310
20344
  this.data = [
@@ -20313,57 +20347,113 @@
20313
20347
  { end: '2020-07-22', start: '2020-07-20', title: 'event 5' },
20314
20348
  ];
20315
20349
  this.dataClick = new i0.EventEmitter();
20350
+ this.typeChange = new i0.EventEmitter();
20351
+ this.eventMap = new Map();
20352
+ this.eventClick = function (event) {
20353
+ _this.dataClick.emit({ id: event.id, title: event.title });
20354
+ };
20316
20355
  }
20317
20356
  CalendarComponent.prototype.ngOnChanges = function (changes) {
20318
20357
  var _this = this;
20358
+ var _a;
20319
20359
  if (changes.data) {
20360
+ if ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) {
20361
+ var events = this.data.map(function (item) { return (Object.assign(Object.assign({}, item), { extendedProps: {
20362
+ eventClick: _this.eventClick,
20363
+ } })); });
20364
+ this.setEvents(this.id, events);
20365
+ }
20366
+ else {
20367
+ this.removeEvents(this.id);
20368
+ }
20320
20369
  // const events = this.data.map((item) => ({
20321
20370
  // id: item.id,
20322
20371
  // start: item.start.indexOf(' 00:00:00') > -1 ? item.start.split(' ')[0] : item.start,
20323
20372
  // end: item.end.indexOf(' 00:00:00') > -1 ? item.end.split(' ')[0] : item.end,
20324
20373
  // title: item.title,
20325
20374
  // }));
20326
- this.calendarOptions = {
20327
- headerToolbar: {
20328
- left: 'prev,next today',
20329
- center: 'title',
20330
- right: 'timeGridDay,timeGridWeek,dayGridMonth',
20331
- },
20332
- buttonText: {
20333
- dayGridMonth: '月',
20334
- timeGridWeek: '周',
20335
- timeGridDay: '日',
20336
- today: '今日',
20337
- },
20338
- timeZone: 'local',
20339
- initialDate: this.isInitialDate ? this.initialDate : null,
20340
- events: this.data,
20341
- locale: 'zh',
20342
- eventTimeFormat: {
20343
- hour: 'numeric',
20344
- minute: '2-digit',
20345
- hour12: false,
20346
- },
20347
- slotLabelFormat: { hour: 'numeric', minute: '2-digit', hour12: false },
20348
- eventClick: function (info) {
20349
- info.jsEvent.preventDefault();
20350
- _this.dataClick.emit({ id: info.event.id, title: info.event.title });
20351
- },
20352
- };
20353
20375
  }
20354
20376
  };
20355
20377
  CalendarComponent.prototype.ngOnInit = function () { };
20378
+ CalendarComponent.prototype.setEvents = function (key, events) {
20379
+ this.eventMap.set(key, events);
20380
+ this.update();
20381
+ };
20382
+ CalendarComponent.prototype.removeEvents = function (key) {
20383
+ if (this.eventMap.has(key)) {
20384
+ this.eventMap.delete(key);
20385
+ this.update();
20386
+ }
20387
+ };
20388
+ CalendarComponent.prototype.update = function () {
20389
+ var e_1, _b;
20390
+ var _this = this;
20391
+ var events = [];
20392
+ try {
20393
+ for (var _c = __values(this.eventMap.values()), _d = _c.next(); !_d.done; _d = _c.next()) {
20394
+ var event = _d.value;
20395
+ if (event) {
20396
+ events.push.apply(events, __spread(event));
20397
+ }
20398
+ }
20399
+ }
20400
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
20401
+ finally {
20402
+ try {
20403
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
20404
+ }
20405
+ finally { if (e_1) throw e_1.error; }
20406
+ }
20407
+ this.calendarOptions = {
20408
+ headerToolbar: {
20409
+ left: 'prev,next today',
20410
+ center: 'title',
20411
+ right: 'timeGridDay,timeGridWeek,dayGridMonth',
20412
+ },
20413
+ buttonText: {
20414
+ dayGridMonth: '月',
20415
+ timeGridWeek: '周',
20416
+ timeGridDay: '日',
20417
+ today: '今日',
20418
+ },
20419
+ timeZone: 'local',
20420
+ initialDate: this.isInitialDate ? this.initialDate : null,
20421
+ events: events,
20422
+ locale: 'zh',
20423
+ eventTimeFormat: {
20424
+ hour: 'numeric',
20425
+ minute: '2-digit',
20426
+ hour12: false,
20427
+ },
20428
+ slotLabelFormat: { hour: 'numeric', minute: '2-digit', hour12: false },
20429
+ eventClick: function (info) {
20430
+ var _a;
20431
+ info.jsEvent.preventDefault();
20432
+ if ((_a = info.event.extendedProps) === null || _a === void 0 ? void 0 : _a.eventClick) {
20433
+ info.event.extendedProps.eventClick(info.event);
20434
+ }
20435
+ // this.dataClick.emit({ id: info.event.id, title: info.event.title });
20436
+ },
20437
+ datesSet: function (arg) {
20438
+ var type = arg.view.type;
20439
+ type = type.substring(type.indexOf('Grid') + 4).toLowerCase();
20440
+ _this.typeChange.emit(type);
20441
+ },
20442
+ };
20443
+ this.cd.markForCheck();
20444
+ };
20356
20445
  return CalendarComponent;
20357
20446
  }());
20358
20447
  exports.ɵeg.decorators = [
20359
20448
  { type: i0.Component, args: [{
20360
20449
  selector: 'sc-calendar',
20361
- template: "<full-calendar *ngIf=\"calendarOptions\" [options]=\"calendarOptions\"></full-calendar>\n",
20450
+ template: "<full-calendar *ngIf=\"calendarOptions\" [options]=\"calendarOptions\"></full-calendar>\n<ng-template *ngFor=\"let child of children\" widget-host [widget]=\"child\"></ng-template>\n",
20362
20451
  styles: [":host ::ng-deep .fc-direction-ltr{height:100%}:host ::ng-deep .fc .fc-view-harness{padding-bottom:0!important}:host ::ng-deep .fc-license-message{display:none}:host ::ng-deep .fc-daygrid-event{white-space:normal}"]
20363
20452
  },] }
20364
20453
  ];
20365
20454
  exports.ɵeg.ctorParameters = function () { return [
20366
- { type: router.Router }
20455
+ { type: router.Router },
20456
+ { type: i0.ChangeDetectorRef }
20367
20457
  ]; };
20368
20458
  __decorate([
20369
20459
  bbjWidgetBase.Property('是否自定义初始日期', { ui: { format: 'date', widget: 'checkbox', spanLabel: 0, spanControl: 24 } }),
@@ -20388,11 +20478,183 @@
20388
20478
  bbjWidgetBase.DataOutput(['id', 'title']),
20389
20479
  __metadata("design:type", Object)
20390
20480
  ], exports.ɵeg.prototype, "dataClick", void 0);
20481
+ __decorate([
20482
+ bbjWidgetBase.DataOutput('视图类型'),
20483
+ __metadata("design:type", Object)
20484
+ ], exports.ɵeg.prototype, "typeChange", void 0);
20391
20485
  exports.ɵeg = __decorate([
20392
- bbjWidgetBase.Widget('日历', { group: 'component', image: 'assets/img/screen/rili.png', icon: 'iconmokuai' }),
20393
- __metadata("design:paramtypes", [router.Router])
20486
+ bbjWidgetBase.Widget('日历', {
20487
+ group: 'component',
20488
+ image: 'assets/img/screen/rili.png',
20489
+ icon: 'iconmokuai',
20490
+ childTypes: ['sc-calendar-events', 'sc-calendar-background-events'],
20491
+ }),
20492
+ __metadata("design:paramtypes", [router.Router, i0.ChangeDetectorRef])
20394
20493
  ], exports.ɵeg);
20395
20494
 
20495
+ var CalendarEventsChild = /** @class */ (function () {
20496
+ function CalendarEventsChild(parent) {
20497
+ this.parent = parent;
20498
+ }
20499
+ CalendarEventsChild.prototype.ngOnChanges = function (changes) {
20500
+ var _this = this;
20501
+ if (changes.data) {
20502
+ if (this.data) {
20503
+ var events = this.getEvents(this.data);
20504
+ if (events && this.eventClick) {
20505
+ events = events.map(function (event) {
20506
+ return Object.assign(Object.assign({}, event), { extendedProps: {
20507
+ eventClick: _this.eventClick,
20508
+ } });
20509
+ });
20510
+ }
20511
+ this.parent.setEvents(this.id, events);
20512
+ }
20513
+ else {
20514
+ this.parent.removeEvents(this.id);
20515
+ }
20516
+ }
20517
+ };
20518
+ CalendarEventsChild.prototype.ngOnDestroy = function () {
20519
+ this.parent.removeEvents(this.id);
20520
+ };
20521
+ return CalendarEventsChild;
20522
+ }());
20523
+ CalendarEventsChild.decorators = [
20524
+ { type: i0.Directive }
20525
+ ];
20526
+ CalendarEventsChild.ctorParameters = function () { return [
20527
+ { type: exports.ɵeg }
20528
+ ]; };
20529
+
20530
+ var ɵ0$e = { type: 'string', title: 'id' };
20531
+ exports.ɵeh = /** @class */ (function (_super) {
20532
+ __extends(BackgroundEventsComponent, _super);
20533
+ function BackgroundEventsComponent(parent) {
20534
+ var _this = _super.call(this, parent) || this;
20535
+ _this.parent = parent;
20536
+ _this.data = [
20537
+ { end: '2020-07-21 00:00:00', start: '2020-07-19 00:00:00', title: 'event 3' },
20538
+ { end: '2020-07-19 00:00:00', start: '2020-07-18 00:00:00', title: 'event 4' },
20539
+ { end: '2020-07-22', start: '2020-07-20', title: 'event 5' },
20540
+ ];
20541
+ return _this;
20542
+ }
20543
+ BackgroundEventsComponent.prototype.getEvents = function (data) {
20544
+ var _this = this;
20545
+ return data.map(function (item) {
20546
+ var event = Object.assign(Object.assign({}, item), { display: 'background' });
20547
+ if (!event.color && _this.color) {
20548
+ event.color = _this.color;
20549
+ }
20550
+ return event;
20551
+ });
20552
+ };
20553
+ return BackgroundEventsComponent;
20554
+ }(CalendarEventsChild));
20555
+ exports.ɵeh.decorators = [
20556
+ { type: i0.Component, args: [{
20557
+ selector: 'sc-calendar-background-events',
20558
+ template: "",
20559
+ styles: [""]
20560
+ },] }
20561
+ ];
20562
+ exports.ɵeh.ctorParameters = function () { return [
20563
+ { type: exports.ɵeg }
20564
+ ]; };
20565
+ __decorate([
20566
+ bbjWidgetBase.Property('颜色', {
20567
+ ui: {
20568
+ widget: 'myColor',
20569
+ },
20570
+ }),
20571
+ __metadata("design:type", String)
20572
+ ], exports.ɵeh.prototype, "color", void 0);
20573
+ __decorate([
20574
+ bbjWidgetBase.Data({
20575
+ properties: {
20576
+ id: ɵ0$e,
20577
+ start: { type: 'string', title: '开始日期' },
20578
+ end: { type: 'string', title: '结束日期' },
20579
+ title: { type: 'string', title: '标题' },
20580
+ color: { type: 'string', title: '背景颜色' },
20581
+ },
20582
+ }),
20583
+ __metadata("design:type", Array)
20584
+ ], exports.ɵeh.prototype, "data", void 0);
20585
+ exports.ɵeh = __decorate([
20586
+ bbjWidgetBase.Widget('背景颜色', { hidden: true }),
20587
+ __metadata("design:paramtypes", [exports.ɵeg])
20588
+ ], exports.ɵeh);
20589
+
20590
+ var ɵ0$f = { type: 'string', title: 'id' };
20591
+ exports.ɵej = /** @class */ (function (_super) {
20592
+ __extends(EventsComponent, _super);
20593
+ function EventsComponent(parent) {
20594
+ var _this = _super.call(this, parent) || this;
20595
+ _this.parent = parent;
20596
+ _this.data = [
20597
+ { end: '2020-07-21 00:00:00', start: '2020-07-19 00:00:00', title: 'event 3' },
20598
+ { end: '2020-07-19 00:00:00', start: '2020-07-18 00:00:00', title: 'event 4' },
20599
+ { end: '2020-07-22', start: '2020-07-20', title: 'event 5' },
20600
+ ];
20601
+ _this.dataClick = new i0.EventEmitter();
20602
+ _this.eventClick = function (event) {
20603
+ _this.dataClick.emit(event);
20604
+ };
20605
+ return _this;
20606
+ }
20607
+ EventsComponent.prototype.getEvents = function (data) {
20608
+ var _this = this;
20609
+ return data.map(function (item) {
20610
+ var event = Object.assign({}, item);
20611
+ if (!event.color && _this.color) {
20612
+ event.color = _this.color;
20613
+ }
20614
+ return event;
20615
+ });
20616
+ };
20617
+ return EventsComponent;
20618
+ }(CalendarEventsChild));
20619
+ exports.ɵej.decorators = [
20620
+ { type: i0.Component, args: [{
20621
+ selector: 'sc-calendar-events',
20622
+ template: "",
20623
+ styles: [""]
20624
+ },] }
20625
+ ];
20626
+ exports.ɵej.ctorParameters = function () { return [
20627
+ { type: exports.ɵeg }
20628
+ ]; };
20629
+ __decorate([
20630
+ bbjWidgetBase.Property('颜色', {
20631
+ ui: {
20632
+ widget: 'myColor',
20633
+ },
20634
+ }),
20635
+ __metadata("design:type", String)
20636
+ ], exports.ɵej.prototype, "color", void 0);
20637
+ __decorate([
20638
+ bbjWidgetBase.Data({
20639
+ properties: {
20640
+ id: ɵ0$f,
20641
+ start: { type: 'string', title: '开始日期' },
20642
+ end: { type: 'string', title: '结束日期' },
20643
+ title: { type: 'string', title: '标题' },
20644
+ color: { type: 'string', title: '颜色' },
20645
+ },
20646
+ }),
20647
+ __metadata("design:type", Array)
20648
+ ], exports.ɵej.prototype, "data", void 0);
20649
+ __decorate([
20650
+ bbjWidgetBase.DataOutput(['id', 'title']),
20651
+ __metadata("design:type", Object)
20652
+ ], exports.ɵej.prototype, "dataClick", void 0);
20653
+ exports.ɵej = __decorate([
20654
+ bbjWidgetBase.Widget('事件', { hidden: true }),
20655
+ __metadata("design:paramtypes", [exports.ɵeg])
20656
+ ], exports.ɵej);
20657
+
20396
20658
  var CalendarModule = /** @class */ (function () {
20397
20659
  function CalendarModule(widgetService) {
20398
20660
  angular$1.FullCalendarModule.registerPlugins([
@@ -20401,12 +20663,14 @@
20401
20663
  interactionPlugin__default['default'],
20402
20664
  ]);
20403
20665
  widgetService.register(exports.ɵeg);
20666
+ widgetService.register(exports.ɵej);
20667
+ widgetService.register(exports.ɵeh);
20404
20668
  }
20405
20669
  return CalendarModule;
20406
20670
  }());
20407
20671
  CalendarModule.decorators = [
20408
20672
  { type: i0.NgModule, args: [{
20409
- declarations: [exports.ɵeg],
20673
+ declarations: [exports.ɵeg, exports.ɵeh, exports.ɵej],
20410
20674
  imports: [common.CommonModule, bbjWidgetBase.WidgetBaseModule, angular$1.FullCalendarModule],
20411
20675
  },] }
20412
20676
  ];
@@ -20537,7 +20801,7 @@
20537
20801
  { type: bbjWidgetBase.WidgetService }
20538
20802
  ]; };
20539
20803
 
20540
- exports.ɵei = /** @class */ (function () {
20804
+ exports.ɵel = /** @class */ (function () {
20541
20805
  function GanttComponent(ele) {
20542
20806
  this.ele = ele;
20543
20807
  this.contentRenderers = new Map();
@@ -20696,27 +20960,27 @@
20696
20960
  };
20697
20961
  return GanttComponent;
20698
20962
  }());
20699
- exports.ɵei.decorators = [
20963
+ exports.ɵel.decorators = [
20700
20964
  { type: i0.Component, args: [{
20701
20965
  selector: 'sc-gantt',
20702
20966
  template: "<!--<nz-date-picker [(ngModel)]=\"initDate\" (ngModelChange)=\"onChange(initDate)\"></nz-date-picker>-->\n<full-calendar *ngIf=\"calendarOptions\" [options]=\"calendarOptions\" ></full-calendar>\n<ng-template #fcEventContent let-data=\"data\">\n\n <div class=\"progress\" nz-tooltip [nzTooltipTitle]=\"titleTemplate\" [ngStyle]=\"data.progressStyle\">\n <span class=\"bar\" [ngStyle]=\"data.barStyle\">{{data.title}}</span>\n </div>\n <ng-template #titleTemplate><i nz-icon nzType=\"file\" style=\"margin-right: 8px\"></i> <span>{{data.title}}<br/>\u5F00\u59CB:{{data.start}}<br/>\u7ED3\u675F:{{data.end}}<br/>\u8FDB\u5EA6:{{data.progress}}</span></ng-template>\n</ng-template>\n\n",
20703
20967
  styles: [":host ::ng-deep .fc-direction-ltr{height:100%}:host ::ng-deep .fc .fc-view-harness{padding-bottom:0!important}:host ::ng-deep .progress{overflow:hidden;height:var(--height);background-color:#f7f7f7;background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#fff5f5f5\",endColorstr=\"#fff9f9f9\",GradientType=0);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);border-radius:4px;width:100%}:host ::ng-deep .progress .bar{white-space:nowrap;width:0;height:100%;color:#fff;float:left;font-size:12px;text-align:center;align-items:center;display:flex;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e90d2;background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#ff149bdf\",endColorstr=\"#ff0480be\",GradientType=0);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-sizing:border-box;transition:width .6s ease}:host ::ng-deep .fc-license-message{display:none!important}:host ::ng-deep .fc table{font-size:17px!important}:host ::ng-deep .fc-resource .fc-datagrid-cell-main{font-size:var(--fontSize);color:var(--color);font-weight:var(--weight);font-family:var(--family);line-height:var(--lineHeight)}"]
20704
20968
  },] }
20705
20969
  ];
20706
- exports.ɵei.ctorParameters = function () { return [
20970
+ exports.ɵel.ctorParameters = function () { return [
20707
20971
  { type: i0.ElementRef }
20708
20972
  ]; };
20709
- exports.ɵei.propDecorators = {
20973
+ exports.ɵel.propDecorators = {
20710
20974
  eventContent: [{ type: i0.ViewChild, args: ['fcEventContent', { static: true },] }]
20711
20975
  };
20712
20976
  __decorate([
20713
20977
  bbjWidgetBase.Property('头部名称', { type: 'string' }),
20714
20978
  __metadata("design:type", Object)
20715
- ], exports.ɵei.prototype, "headerContent", void 0);
20979
+ ], exports.ɵel.prototype, "headerContent", void 0);
20716
20980
  __decorate([
20717
20981
  bbjWidgetBase.Property('项目字体', { ui: { widget: 'myFont' } }),
20718
20982
  __metadata("design:type", Object)
20719
- ], exports.ɵei.prototype, "contentFont", void 0);
20983
+ ], exports.ɵel.prototype, "contentFont", void 0);
20720
20984
  __decorate([
20721
20985
  bbjWidgetBase.Property('系列颜色', {
20722
20986
  ui: {
@@ -20725,19 +20989,19 @@
20725
20989
  },
20726
20990
  }),
20727
20991
  __metadata("design:type", Object)
20728
- ], exports.ɵei.prototype, "lineColor", void 0);
20992
+ ], exports.ɵel.prototype, "lineColor", void 0);
20729
20993
  __decorate([
20730
20994
  bbjWidgetBase.Property('进度透明', { type: 'number', max: 1 }),
20731
20995
  __metadata("design:type", Object)
20732
- ], exports.ɵei.prototype, "progressTransparency", void 0);
20996
+ ], exports.ɵel.prototype, "progressTransparency", void 0);
20733
20997
  __decorate([
20734
20998
  bbjWidgetBase.Property('区域占比', { type: 'number' }),
20735
20999
  __metadata("design:type", Object)
20736
- ], exports.ɵei.prototype, "areaRate", void 0);
21000
+ ], exports.ɵel.prototype, "areaRate", void 0);
20737
21001
  __decorate([
20738
21002
  bbjWidgetBase.Property('进度条高度', { type: 'number' }),
20739
21003
  __metadata("design:type", Object)
20740
- ], exports.ɵei.prototype, "progressHeight", void 0);
21004
+ ], exports.ɵel.prototype, "progressHeight", void 0);
20741
21005
  __decorate([
20742
21006
  bbjWidgetBase.Data({
20743
21007
  properties: {
@@ -20749,11 +21013,11 @@
20749
21013
  },
20750
21014
  }),
20751
21015
  __metadata("design:type", Array)
20752
- ], exports.ɵei.prototype, "data", void 0);
20753
- exports.ɵei = __decorate([
21016
+ ], exports.ɵel.prototype, "data", void 0);
21017
+ exports.ɵel = __decorate([
20754
21018
  bbjWidgetBase.Widget('甘特图', { group: 'component', image: 'assets/img/screen/gantt.png', icon: 'iconmokuai' }),
20755
21019
  __metadata("design:paramtypes", [i0.ElementRef])
20756
- ], exports.ɵei);
21020
+ ], exports.ɵel);
20757
21021
 
20758
21022
  // import {FormsModule} from '@angular/forms';
20759
21023
  // import {NzDatePickerModule} from 'ng-zorro-antd/date-picker';
@@ -20766,13 +21030,13 @@
20766
21030
  interactionPlugin__default['default'],
20767
21031
  resourceTimelinePlugin__default['default'],
20768
21032
  ]);
20769
- widgetService.register(exports.ɵei);
21033
+ widgetService.register(exports.ɵel);
20770
21034
  }
20771
21035
  return GanttModule;
20772
21036
  }());
20773
21037
  GanttModule.decorators = [
20774
21038
  { type: i0.NgModule, args: [{
20775
- declarations: [exports.ɵei],
21039
+ declarations: [exports.ɵel],
20776
21040
  imports: [
20777
21041
  common.CommonModule,
20778
21042
  bbjWidgetBase.WidgetBaseModule,
@@ -21407,7 +21671,8 @@
21407
21671
  exports.ɵea = AnnouncementModule;
21408
21672
  exports.ɵec = TabsModule;
21409
21673
  exports.ɵef = CalendarModule;
21410
- exports.ɵeh = GanttModule;
21674
+ exports.ɵei = CalendarEventsChild;
21675
+ exports.ɵek = GanttModule;
21411
21676
  exports.ɵo = ButtonModule;
21412
21677
  exports.ɵq = HttpService;
21413
21678
  exports.ɵr = TimerModule;