bbj-screen-widget 2.4.55 → 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.
@@ -6020,9 +6020,17 @@ let RadarChartComponent = class RadarChartComponent extends BasicLineChartCompon
6020
6020
  lineHeight: '',
6021
6021
  };
6022
6022
  this.align = 'auto';
6023
+ this.label = false;
6023
6024
  this.shape = 'polygon';
6024
6025
  this.area = false;
6025
- this.radius = 100;
6026
+ this.grid = {
6027
+ top: 30,
6028
+ right: 30,
6029
+ bottom: 40,
6030
+ left: 36,
6031
+ };
6032
+ // @Property('缩放', { type: 'number' })
6033
+ // radius = 100;
6026
6034
  this.chartOption = {};
6027
6035
  this._data = [
6028
6036
  { x: '销售', y: 10, m: 37, s: '预算' },
@@ -6064,11 +6072,18 @@ let RadarChartComponent = class RadarChartComponent extends BasicLineChartCompon
6064
6072
  textStyle: style,
6065
6073
  },
6066
6074
  indicator: [],
6067
- radius: this.radius,
6068
6075
  },
6069
6076
  color: this.lineColor,
6077
+ grid: this.grid,
6070
6078
  series: [
6071
6079
  {
6080
+ label: {
6081
+ show: this.label,
6082
+ textStyle: this.getTextStyle(this.font),
6083
+ formatter: function (params) {
6084
+ return params.value;
6085
+ },
6086
+ },
6072
6087
  type: 'radar',
6073
6088
  areaStyle: { opacity: this.area ? 0.3 : 0 },
6074
6089
  data: [],
@@ -6194,6 +6209,10 @@ __decorate([
6194
6209
  }),
6195
6210
  __metadata("design:type", Object)
6196
6211
  ], RadarChartComponent.prototype, "align", void 0);
6212
+ __decorate([
6213
+ Property('标签', { type: 'boolean' }),
6214
+ __metadata("design:type", Object)
6215
+ ], RadarChartComponent.prototype, "label", void 0);
6197
6216
  __decorate([
6198
6217
  Property('形状', {
6199
6218
  ui: { widget: 'select' },
@@ -6211,9 +6230,9 @@ __decorate([
6211
6230
  __metadata("design:type", Object)
6212
6231
  ], RadarChartComponent.prototype, "area", void 0);
6213
6232
  __decorate([
6214
- Property('缩放', { type: 'number' }),
6233
+ Property('边距', { ui: { widget: 'myGrid' } }),
6215
6234
  __metadata("design:type", Object)
6216
- ], RadarChartComponent.prototype, "radius", void 0);
6235
+ ], RadarChartComponent.prototype, "grid", void 0);
6217
6236
  __decorate([
6218
6237
  Data({
6219
6238
  properties: {
@@ -8992,182 +9011,219 @@ let PlanimetricMap2dComponent = PlanimetricMap2dComponent_1 = class PlanimetricM
8992
9011
  this.data = [];
8993
9012
  this.areaClick = new EventEmitter();
8994
9013
  this.nameMap = {
9014
+ Somalia: '索马里',
9015
+ Liechtenstein: '列支敦士登',
9016
+ Morocco: '摩洛哥',
9017
+ 'W. Sahara': '西撒哈拉',
9018
+ Serbia: '塞尔维亚',
8995
9019
  Afghanistan: '阿富汗',
8996
- Albania: '阿尔巴尼亚',
8997
- Algeria: '阿尔及利亚',
8998
9020
  Angola: '安哥拉',
9021
+ Albania: '阿尔巴尼亚',
9022
+ Aland: '奥兰群岛',
9023
+ Andorra: '安道尔',
9024
+ 'United Arab Emirates': '阿拉伯联合酋长国',
8999
9025
  Argentina: '阿根廷',
9000
9026
  Armenia: '亚美尼亚',
9027
+ 'American Samoa': '美属萨摩亚',
9028
+ 'Fr. S. Antarctic Lands': '法属南部领地',
9029
+ 'Antigua and Barb.': '安提瓜和巴布达',
9001
9030
  Australia: '澳大利亚',
9002
9031
  Austria: '奥地利',
9003
9032
  Azerbaijan: '阿塞拜疆',
9033
+ Burundi: '布隆迪',
9034
+ Belgium: '比利时',
9035
+ Benin: '贝宁',
9036
+ 'Burkina Faso': '布基纳法索',
9004
9037
  Bangladesh: '孟加拉国',
9038
+ Bulgaria: '保加利亚',
9039
+ Bahrain: '巴林',
9040
+ Bahamas: '巴哈马',
9041
+ 'Bosnia and Herz.': '波斯尼亚和黑塞哥维那',
9005
9042
  Belarus: '白俄罗斯',
9006
- Belgium: '比利时',
9007
9043
  Belize: '伯利兹',
9008
- Benin: '贝宁',
9009
9044
  Bermuda: '百慕大',
9010
- Bhutan: '不丹',
9011
9045
  Bolivia: '玻利维亚',
9012
- 'Bosnia and Herzegovina': '波斯尼亚和黑塞哥维那',
9013
- Botswana: '博茨瓦纳',
9014
9046
  Brazil: '巴西',
9047
+ Barbados: '巴巴多斯',
9015
9048
  Brunei: '文莱',
9016
- Bulgaria: '保加利亚',
9017
- 'Burkina Faso': '布基纳法索',
9018
- Burundi: '布隆迪',
9019
- Cambodia: '柬埔寨',
9020
- Cameroon: '喀麦隆',
9049
+ Bhutan: '不丹',
9050
+ Botswana: '博茨瓦纳',
9051
+ 'Central African Rep.': '中非共和国',
9021
9052
  Canada: '加拿大',
9022
- 'Central African Republic': '中非共和国',
9023
- Chad: '乍得',
9053
+ Switzerland: '瑞士',
9024
9054
  Chile: '智利',
9025
9055
  China: '中国',
9056
+ "Côte d'Ivoire": '科特迪瓦',
9057
+ Cameroon: '喀麦隆',
9058
+ 'Dem. Rep. Congo': '刚果(金)',
9059
+ Congo: '刚果(布)',
9026
9060
  Colombia: '哥伦比亚',
9061
+ Comoros: '科摩罗',
9062
+ 'Cape Verde': '佛得角',
9027
9063
  'Costa Rica': '哥斯达黎加',
9028
- Croatia: '克罗地亚',
9029
9064
  Cuba: '古巴',
9065
+ Curaçao: '库拉索',
9066
+ 'Cayman Is.': '开曼群岛',
9067
+ 'N. Cyprus': '北塞浦路斯',
9030
9068
  Cyprus: '塞浦路斯',
9031
- 'Czech Republic': '捷克共和国',
9032
- 'Democratic Republic of the Congo': '刚果民主共和国',
9033
- Denmark: '丹麦',
9069
+ 'Czech Rep.': '捷克',
9070
+ Germany: '德国',
9034
9071
  Djibouti: '吉布提',
9035
- 'Dominican Republic': '多明尼加共和国',
9036
- 'East Timor': '东帝汶',
9072
+ Dominica: '多米尼克',
9073
+ Denmark: '丹麦',
9074
+ 'Dominican Rep.': '多米尼加',
9075
+ Algeria: '阿尔及利亚',
9037
9076
  Ecuador: '厄瓜多尔',
9038
9077
  Egypt: '埃及',
9039
- 'El Salvador': '萨尔瓦多',
9040
- 'Equatorial Guinea': '赤道几内亚',
9041
9078
  Eritrea: '厄立特里亚',
9079
+ Spain: '西班牙',
9042
9080
  Estonia: '爱沙尼亚',
9043
9081
  Ethiopia: '埃塞俄比亚',
9044
- 'Falkland Islands': '福克兰群岛',
9045
- Fiji: '斐',
9046
9082
  Finland: '芬兰',
9083
+ Fiji: '斐济',
9084
+ 'Falkland Is.': '福克兰群岛',
9047
9085
  France: '法国',
9048
- 'French Guiana': '法属圭亚那',
9049
- 'French Southern and Antarctic Lands': '法属南半球和南极领地',
9086
+ 'Faeroe Is.': '法罗群岛',
9087
+ Micronesia: '密克罗尼西亚',
9050
9088
  Gabon: '加蓬',
9051
- Gambia: '冈比亚',
9089
+ 'United Kingdom': '英国',
9052
9090
  Georgia: '格鲁吉亚',
9053
- Germany: '德国',
9054
9091
  Ghana: '加纳',
9092
+ Guinea: '几内亚',
9093
+ Gambia: '冈比亚',
9094
+ 'Guinea-Bissau': '几内亚比绍',
9095
+ 'Eq. Guinea': '赤道几内亚',
9055
9096
  Greece: '希腊',
9097
+ Grenada: '格林纳达',
9056
9098
  Greenland: '格陵兰',
9057
9099
  Guatemala: '危地马拉',
9058
- Guinea: '几内亚',
9059
- 'Guinea Bissau': '几内亚比绍',
9100
+ Guam: '关岛',
9060
9101
  Guyana: '圭亚那',
9061
- Haiti: '海地',
9102
+ 'Heard I. and McDonald Is.': '赫德岛和麦克唐纳群岛',
9062
9103
  Honduras: '洪都拉斯',
9104
+ Croatia: '克罗地亚',
9105
+ Haiti: '海地',
9063
9106
  Hungary: '匈牙利',
9064
- Iceland: '冰岛',
9107
+ Indonesia: '印度尼西亚',
9108
+ 'Isle of Man': '马恩岛',
9065
9109
  India: '印度',
9066
- Indonesia: '印尼',
9110
+ 'Br. Indian Ocean Ter.': '英属印度洋领地',
9111
+ Ireland: '爱尔兰',
9067
9112
  Iran: '伊朗',
9068
9113
  Iraq: '伊拉克',
9069
- Ireland: '爱尔兰',
9114
+ Iceland: '冰岛',
9070
9115
  Israel: '以色列',
9071
9116
  Italy: '意大利',
9072
- 'Ivory Coast': '象牙海岸',
9073
9117
  Jamaica: '牙买加',
9074
- Japan: '日本',
9118
+ Jersey: '泽西岛',
9075
9119
  Jordan: '约旦',
9120
+ Japan: '日本',
9121
+ 'Siachen Glacier': '锡亚琴冰川',
9076
9122
  Kazakhstan: '哈萨克斯坦',
9077
9123
  Kenya: '肯尼亚',
9078
- Kosovo: '科索沃',
9079
- Kuwait: '科威特',
9080
9124
  Kyrgyzstan: '吉尔吉斯斯坦',
9081
- Laos: '老挝',
9082
- Latvia: '拉脱维亚',
9125
+ Cambodia: '柬埔寨',
9126
+ Kiribati: '基里巴斯',
9127
+ Korea: '韩国',
9128
+ Kuwait: '科威特',
9129
+ 'Lao PDR': '老挝',
9083
9130
  Lebanon: '黎巴嫩',
9084
- Lesotho: '莱索托',
9085
9131
  Liberia: '利比里亚',
9086
9132
  Libya: '利比亚',
9133
+ 'Saint Lucia': '圣卢西亚',
9134
+ 'Sri Lanka': '斯里兰卡',
9135
+ Lesotho: '莱索托',
9087
9136
  Lithuania: '立陶宛',
9088
9137
  Luxembourg: '卢森堡',
9089
- Macedonia: '马其顿',
9138
+ Latvia: '拉脱维亚',
9139
+ Moldova: '摩尔多瓦',
9090
9140
  Madagascar: '马达加斯加',
9091
- Malawi: '马拉维',
9092
- Malaysia: '马来西亚',
9093
- Mali: '马里',
9094
- Mauritania: '毛里塔尼亚',
9095
9141
  Mexico: '墨西哥',
9096
- Moldova: '摩尔多瓦',
9097
- Mongolia: '蒙古',
9142
+ Macedonia: '北马其顿',
9143
+ Mali: '马里',
9144
+ Malta: '马耳他',
9145
+ Myanmar: '缅甸',
9098
9146
  Montenegro: '黑山',
9099
- Morocco: '摩洛哥',
9147
+ Mongolia: '蒙古',
9148
+ 'N. Mariana Is.': '北马里亚纳群岛',
9100
9149
  Mozambique: '莫桑比克',
9101
- Myanmar: '缅甸',
9150
+ Mauritania: '毛里塔尼亚',
9151
+ Montserrat: '蒙特塞拉特',
9152
+ Mauritius: '毛里求斯',
9153
+ Malawi: '马拉维',
9154
+ Malaysia: '马来西亚',
9102
9155
  Namibia: '纳米比亚',
9103
- Nepal: '尼泊尔',
9104
- Netherlands: '荷兰',
9105
9156
  'New Caledonia': '新喀里多尼亚',
9106
- 'New Zealand': '新西兰',
9107
- Nicaragua: '尼加拉瓜',
9108
9157
  Niger: '尼日尔',
9109
9158
  Nigeria: '尼日利亚',
9110
- 'North Korea': '北朝鲜',
9111
- 'Northern Cyprus': '北塞浦路斯',
9159
+ Nicaragua: '尼加拉瓜',
9160
+ Niue: '纽埃',
9161
+ Netherlands: '荷兰',
9112
9162
  Norway: '挪威',
9163
+ Nepal: '尼泊尔',
9164
+ 'New Zealand': '新西兰',
9113
9165
  Oman: '阿曼',
9114
9166
  Pakistan: '巴基斯坦',
9115
9167
  Panama: '巴拿马',
9116
- 'Papua New Guinea': '巴布亚新几内亚',
9117
- Paraguay: '巴拉圭',
9118
9168
  Peru: '秘鲁',
9119
9169
  Philippines: '菲律宾',
9170
+ Palau: '帕劳',
9171
+ 'Papua New Guinea': '巴布亚新几内亚',
9120
9172
  Poland: '波兰',
9121
- Portugal: '葡萄牙',
9122
9173
  'Puerto Rico': '波多黎各',
9174
+ 'Dem. Rep. Korea': '朝鲜',
9175
+ Portugal: '葡萄牙',
9176
+ Paraguay: '巴拉圭',
9177
+ Palestine: '巴勒斯坦',
9178
+ 'Fr. Polynesia': '法属波利尼西亚',
9123
9179
  Qatar: '卡塔尔',
9124
- 'Republic of Serbia': '塞尔维亚',
9125
- 'Republic of the Congo': '刚果共和国',
9126
9180
  Romania: '罗马尼亚',
9127
9181
  Russia: '俄罗斯',
9128
9182
  Rwanda: '卢旺达',
9129
9183
  'Saudi Arabia': '沙特阿拉伯',
9184
+ Sudan: '苏丹',
9185
+ 'S. Sudan': '南苏丹',
9130
9186
  Senegal: '塞内加尔',
9131
- 'Sierra Leone': '塞拉利昂',
9132
9187
  Singapore: '新加坡',
9188
+ 'S. Geo. and S. Sandw. Is.': '南乔治亚岛和南桑威奇群岛',
9189
+ 'Saint Helena': '圣赫勒拿',
9190
+ 'Solomon Is.': '所罗门群岛',
9191
+ 'Sierra Leone': '塞拉利昂',
9192
+ 'El Salvador': '萨尔瓦多',
9193
+ 'St. Pierre and Miquelon': '圣皮埃尔和密克隆',
9194
+ 'São Tomé and Principe': '圣多美和普林西比',
9195
+ Suriname: '苏里南',
9133
9196
  Slovakia: '斯洛伐克',
9134
9197
  Slovenia: '斯洛文尼亚',
9135
- 'Solomon Islands': '所罗门群岛',
9136
- Somalia: '索马里',
9137
- Somaliland: '索马里兰',
9138
- 'South Africa': '南非',
9139
- 'South Korea': '韩国',
9140
- 'South Sudan': '南苏丹',
9141
- Spain: '西班牙',
9142
- 'Sri Lanka': '斯里兰卡',
9143
- Sudan: '苏丹',
9144
- Suriname: '苏里南',
9145
- Swaziland: '斯威士兰',
9146
9198
  Sweden: '瑞典',
9147
- Switzerland: '瑞士',
9199
+ Swaziland: '斯威士兰',
9200
+ Seychelles: '塞舌尔',
9148
9201
  Syria: '叙利亚',
9149
- Tajikistan: '塔吉克斯坦',
9150
- Thailand: '泰国',
9151
- 'The Bahamas': '巴哈马',
9202
+ 'Turks and Caicos Is.': '特克斯和凯科斯群岛',
9203
+ Chad: '乍得',
9152
9204
  Togo: '多哥',
9153
- 'Trinidad and Tobago': '特里尼达和多巴哥',
9205
+ Thailand: '泰国',
9206
+ Tajikistan: '塔吉克斯坦',
9207
+ Turkmenistan: '土库曼斯坦',
9208
+ 'Timor-Leste': '东帝汶',
9209
+ Tonga: '汤加',
9210
+ 'Trinidad and Tobago': '特立尼达和多巴哥',
9154
9211
  Tunisia: '突尼斯',
9155
9212
  Turkey: '土耳其',
9156
- Turkmenistan: '土库曼斯坦',
9213
+ Tanzania: '坦桑尼亚',
9157
9214
  Uganda: '乌干达',
9158
9215
  Ukraine: '乌克兰',
9159
- 'United Arab Emirates': '阿联酋',
9160
- 'United Kingdom': '英国',
9161
- 'United Republic of Tanzania': '坦桑尼亚',
9162
- 'United States': '美国',
9163
9216
  Uruguay: '乌拉圭',
9217
+ 'United States': '美国',
9164
9218
  Uzbekistan: '乌兹别克斯坦',
9165
- Vanuatu: '瓦努阿图',
9219
+ 'St. Vin. and Gren.': '圣文森特和格林纳丁斯',
9166
9220
  Venezuela: '委内瑞拉',
9221
+ 'U.S. Virgin Is.': '美属维尔京群岛',
9167
9222
  Vietnam: '越南',
9168
- 'West Bank': '西岸',
9169
- 'Western Sahara': '西撒哈拉',
9223
+ Vanuatu: '瓦努阿图',
9224
+ Samoa: '萨摩亚',
9170
9225
  Yemen: '也门',
9226
+ 'South Africa': '南非',
9171
9227
  Zambia: '赞比亚',
9172
9228
  Zimbabwe: '津巴布韦',
9173
9229
  };
@@ -19302,8 +19358,9 @@ AnnouncementModule.ctorParameters = () => [
19302
19358
 
19303
19359
  const ɵ0$d = { type: 'string', title: 'id' };
19304
19360
  let CalendarComponent = class CalendarComponent {
19305
- constructor(router) {
19361
+ constructor(router, cd) {
19306
19362
  this.router = router;
19363
+ this.cd = cd;
19307
19364
  this.isInitialDate = true;
19308
19365
  this.initialDate = '2020-07-18';
19309
19366
  this.data = [
@@ -19312,55 +19369,99 @@ let CalendarComponent = class CalendarComponent {
19312
19369
  { end: '2020-07-22', start: '2020-07-20', title: 'event 5' },
19313
19370
  ];
19314
19371
  this.dataClick = new EventEmitter();
19372
+ this.typeChange = new EventEmitter();
19373
+ this.eventMap = new Map();
19374
+ this.eventClick = (event) => {
19375
+ this.dataClick.emit({ id: event.id, title: event.title });
19376
+ };
19315
19377
  }
19316
19378
  ngOnChanges(changes) {
19379
+ var _a;
19317
19380
  if (changes.data) {
19381
+ if ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) {
19382
+ const events = this.data.map((item) => (Object.assign(Object.assign({}, item), { extendedProps: {
19383
+ eventClick: this.eventClick,
19384
+ } })));
19385
+ this.setEvents(this.id, events);
19386
+ }
19387
+ else {
19388
+ this.removeEvents(this.id);
19389
+ }
19318
19390
  // const events = this.data.map((item) => ({
19319
19391
  // id: item.id,
19320
19392
  // start: item.start.indexOf(' 00:00:00') > -1 ? item.start.split(' ')[0] : item.start,
19321
19393
  // end: item.end.indexOf(' 00:00:00') > -1 ? item.end.split(' ')[0] : item.end,
19322
19394
  // title: item.title,
19323
19395
  // }));
19324
- this.calendarOptions = {
19325
- headerToolbar: {
19326
- left: 'prev,next today',
19327
- center: 'title',
19328
- right: 'timeGridDay,timeGridWeek,dayGridMonth',
19329
- },
19330
- buttonText: {
19331
- dayGridMonth: '月',
19332
- timeGridWeek: '周',
19333
- timeGridDay: '日',
19334
- today: '今日',
19335
- },
19336
- timeZone: 'local',
19337
- initialDate: this.isInitialDate ? this.initialDate : null,
19338
- events: this.data,
19339
- locale: 'zh',
19340
- eventTimeFormat: {
19341
- hour: 'numeric',
19342
- minute: '2-digit',
19343
- hour12: false,
19344
- },
19345
- slotLabelFormat: { hour: 'numeric', minute: '2-digit', hour12: false },
19346
- eventClick: (info) => {
19347
- info.jsEvent.preventDefault();
19348
- this.dataClick.emit({ id: info.event.id, title: info.event.title });
19349
- },
19350
- };
19351
19396
  }
19352
19397
  }
19353
19398
  ngOnInit() { }
19399
+ setEvents(key, events) {
19400
+ this.eventMap.set(key, events);
19401
+ this.update();
19402
+ }
19403
+ removeEvents(key) {
19404
+ if (this.eventMap.has(key)) {
19405
+ this.eventMap.delete(key);
19406
+ this.update();
19407
+ }
19408
+ }
19409
+ update() {
19410
+ const events = [];
19411
+ for (const event of this.eventMap.values()) {
19412
+ if (event) {
19413
+ events.push(...event);
19414
+ }
19415
+ }
19416
+ this.calendarOptions = {
19417
+ headerToolbar: {
19418
+ left: 'prev,next today',
19419
+ center: 'title',
19420
+ right: 'timeGridDay,timeGridWeek,dayGridMonth',
19421
+ },
19422
+ buttonText: {
19423
+ dayGridMonth: '月',
19424
+ timeGridWeek: '周',
19425
+ timeGridDay: '日',
19426
+ today: '今日',
19427
+ },
19428
+ timeZone: 'local',
19429
+ initialDate: this.isInitialDate ? this.initialDate : null,
19430
+ events: events,
19431
+ locale: 'zh',
19432
+ eventTimeFormat: {
19433
+ hour: 'numeric',
19434
+ minute: '2-digit',
19435
+ hour12: false,
19436
+ },
19437
+ slotLabelFormat: { hour: 'numeric', minute: '2-digit', hour12: false },
19438
+ eventClick: (info) => {
19439
+ var _a;
19440
+ info.jsEvent.preventDefault();
19441
+ if ((_a = info.event.extendedProps) === null || _a === void 0 ? void 0 : _a.eventClick) {
19442
+ info.event.extendedProps.eventClick(info.event);
19443
+ }
19444
+ // this.dataClick.emit({ id: info.event.id, title: info.event.title });
19445
+ },
19446
+ datesSet: (arg) => {
19447
+ let type = arg.view.type;
19448
+ type = type.substring(type.indexOf('Grid') + 4).toLowerCase();
19449
+ this.typeChange.emit(type);
19450
+ },
19451
+ };
19452
+ this.cd.markForCheck();
19453
+ }
19354
19454
  };
19355
19455
  CalendarComponent.decorators = [
19356
19456
  { type: Component, args: [{
19357
19457
  selector: 'sc-calendar',
19358
- template: "<full-calendar *ngIf=\"calendarOptions\" [options]=\"calendarOptions\"></full-calendar>\n",
19458
+ template: "<full-calendar *ngIf=\"calendarOptions\" [options]=\"calendarOptions\"></full-calendar>\n<ng-template *ngFor=\"let child of children\" widget-host [widget]=\"child\"></ng-template>\n",
19359
19459
  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}"]
19360
19460
  },] }
19361
19461
  ];
19362
19462
  CalendarComponent.ctorParameters = () => [
19363
- { type: Router }
19463
+ { type: Router },
19464
+ { type: ChangeDetectorRef }
19364
19465
  ];
19365
19466
  __decorate([
19366
19467
  Property('是否自定义初始日期', { ui: { format: 'date', widget: 'checkbox', spanLabel: 0, spanControl: 24 } }),
@@ -19385,11 +19486,173 @@ __decorate([
19385
19486
  DataOutput(['id', 'title']),
19386
19487
  __metadata("design:type", Object)
19387
19488
  ], CalendarComponent.prototype, "dataClick", void 0);
19489
+ __decorate([
19490
+ DataOutput('视图类型'),
19491
+ __metadata("design:type", Object)
19492
+ ], CalendarComponent.prototype, "typeChange", void 0);
19388
19493
  CalendarComponent = __decorate([
19389
- Widget('日历', { group: 'component', image: 'assets/img/screen/rili.png', icon: 'iconmokuai' }),
19390
- __metadata("design:paramtypes", [Router])
19494
+ Widget('日历', {
19495
+ group: 'component',
19496
+ image: 'assets/img/screen/rili.png',
19497
+ icon: 'iconmokuai',
19498
+ childTypes: ['sc-calendar-events', 'sc-calendar-background-events'],
19499
+ }),
19500
+ __metadata("design:paramtypes", [Router, ChangeDetectorRef])
19391
19501
  ], CalendarComponent);
19392
19502
 
19503
+ class CalendarEventsChild {
19504
+ constructor(parent) {
19505
+ this.parent = parent;
19506
+ }
19507
+ ngOnChanges(changes) {
19508
+ if (changes.data) {
19509
+ if (this.data) {
19510
+ let events = this.getEvents(this.data);
19511
+ if (events && this.eventClick) {
19512
+ events = events.map((event) => {
19513
+ return Object.assign(Object.assign({}, event), { extendedProps: {
19514
+ eventClick: this.eventClick,
19515
+ } });
19516
+ });
19517
+ }
19518
+ this.parent.setEvents(this.id, events);
19519
+ }
19520
+ else {
19521
+ this.parent.removeEvents(this.id);
19522
+ }
19523
+ }
19524
+ }
19525
+ ngOnDestroy() {
19526
+ this.parent.removeEvents(this.id);
19527
+ }
19528
+ }
19529
+ CalendarEventsChild.decorators = [
19530
+ { type: Directive }
19531
+ ];
19532
+ CalendarEventsChild.ctorParameters = () => [
19533
+ { type: CalendarComponent }
19534
+ ];
19535
+
19536
+ const ɵ0$e = { type: 'string', title: 'id' };
19537
+ let BackgroundEventsComponent = class BackgroundEventsComponent extends CalendarEventsChild {
19538
+ constructor(parent) {
19539
+ super(parent);
19540
+ this.parent = parent;
19541
+ this.data = [
19542
+ { end: '2020-07-21 00:00:00', start: '2020-07-19 00:00:00', title: 'event 3' },
19543
+ { end: '2020-07-19 00:00:00', start: '2020-07-18 00:00:00', title: 'event 4' },
19544
+ { end: '2020-07-22', start: '2020-07-20', title: 'event 5' },
19545
+ ];
19546
+ }
19547
+ getEvents(data) {
19548
+ return data.map((item) => {
19549
+ const event = Object.assign(Object.assign({}, item), { display: 'background' });
19550
+ if (!event.color && this.color) {
19551
+ event.color = this.color;
19552
+ }
19553
+ return event;
19554
+ });
19555
+ }
19556
+ };
19557
+ BackgroundEventsComponent.decorators = [
19558
+ { type: Component, args: [{
19559
+ selector: 'sc-calendar-background-events',
19560
+ template: "",
19561
+ styles: [""]
19562
+ },] }
19563
+ ];
19564
+ BackgroundEventsComponent.ctorParameters = () => [
19565
+ { type: CalendarComponent }
19566
+ ];
19567
+ __decorate([
19568
+ Property('颜色', {
19569
+ ui: {
19570
+ widget: 'myColor',
19571
+ },
19572
+ }),
19573
+ __metadata("design:type", String)
19574
+ ], BackgroundEventsComponent.prototype, "color", void 0);
19575
+ __decorate([
19576
+ Data({
19577
+ properties: {
19578
+ id: ɵ0$e,
19579
+ start: { type: 'string', title: '开始日期' },
19580
+ end: { type: 'string', title: '结束日期' },
19581
+ title: { type: 'string', title: '标题' },
19582
+ color: { type: 'string', title: '背景颜色' },
19583
+ },
19584
+ }),
19585
+ __metadata("design:type", Array)
19586
+ ], BackgroundEventsComponent.prototype, "data", void 0);
19587
+ BackgroundEventsComponent = __decorate([
19588
+ Widget('背景颜色', { hidden: true }),
19589
+ __metadata("design:paramtypes", [CalendarComponent])
19590
+ ], BackgroundEventsComponent);
19591
+
19592
+ const ɵ0$f = { type: 'string', title: 'id' };
19593
+ let EventsComponent = class EventsComponent extends CalendarEventsChild {
19594
+ constructor(parent) {
19595
+ super(parent);
19596
+ this.parent = parent;
19597
+ this.data = [
19598
+ { end: '2020-07-21 00:00:00', start: '2020-07-19 00:00:00', title: 'event 3' },
19599
+ { end: '2020-07-19 00:00:00', start: '2020-07-18 00:00:00', title: 'event 4' },
19600
+ { end: '2020-07-22', start: '2020-07-20', title: 'event 5' },
19601
+ ];
19602
+ this.dataClick = new EventEmitter();
19603
+ this.eventClick = (event) => {
19604
+ this.dataClick.emit(event);
19605
+ };
19606
+ }
19607
+ getEvents(data) {
19608
+ return data.map((item) => {
19609
+ const event = Object.assign({}, item);
19610
+ if (!event.color && this.color) {
19611
+ event.color = this.color;
19612
+ }
19613
+ return event;
19614
+ });
19615
+ }
19616
+ };
19617
+ EventsComponent.decorators = [
19618
+ { type: Component, args: [{
19619
+ selector: 'sc-calendar-events',
19620
+ template: "",
19621
+ styles: [""]
19622
+ },] }
19623
+ ];
19624
+ EventsComponent.ctorParameters = () => [
19625
+ { type: CalendarComponent }
19626
+ ];
19627
+ __decorate([
19628
+ Property('颜色', {
19629
+ ui: {
19630
+ widget: 'myColor',
19631
+ },
19632
+ }),
19633
+ __metadata("design:type", String)
19634
+ ], EventsComponent.prototype, "color", void 0);
19635
+ __decorate([
19636
+ Data({
19637
+ properties: {
19638
+ id: ɵ0$f,
19639
+ start: { type: 'string', title: '开始日期' },
19640
+ end: { type: 'string', title: '结束日期' },
19641
+ title: { type: 'string', title: '标题' },
19642
+ color: { type: 'string', title: '颜色' },
19643
+ },
19644
+ }),
19645
+ __metadata("design:type", Array)
19646
+ ], EventsComponent.prototype, "data", void 0);
19647
+ __decorate([
19648
+ DataOutput(['id', 'title']),
19649
+ __metadata("design:type", Object)
19650
+ ], EventsComponent.prototype, "dataClick", void 0);
19651
+ EventsComponent = __decorate([
19652
+ Widget('事件', { hidden: true }),
19653
+ __metadata("design:paramtypes", [CalendarComponent])
19654
+ ], EventsComponent);
19655
+
19393
19656
  class CalendarModule {
19394
19657
  constructor(widgetService) {
19395
19658
  FullCalendarModule.registerPlugins([
@@ -19398,11 +19661,13 @@ class CalendarModule {
19398
19661
  interactionPlugin,
19399
19662
  ]);
19400
19663
  widgetService.register(CalendarComponent);
19664
+ widgetService.register(EventsComponent);
19665
+ widgetService.register(BackgroundEventsComponent);
19401
19666
  }
19402
19667
  }
19403
19668
  CalendarModule.decorators = [
19404
19669
  { type: NgModule, args: [{
19405
- declarations: [CalendarComponent],
19670
+ declarations: [CalendarComponent, BackgroundEventsComponent, EventsComponent],
19406
19671
  imports: [CommonModule, WidgetBaseModule, FullCalendarModule],
19407
19672
  },] }
19408
19673
  ];
@@ -20314,5 +20579,5 @@ WorkbenchWidgetModule.ctorParameters = () => [
20314
20579
  * Generated bundle index. Do not edit.
20315
20580
  */
20316
20581
 
20317
- export { AudioModule, BarChartThreeDModule, BasicBarChartComponent, BasicBarChartModule, BasicLineChartModule, BasicPieChartModule, BasicPlanimetricMapModule, BubbleChartModule, CheckboxModule, CommonService, CrossTableModule, CustomBaiduMapModule, DatePickerModule, FileUrlService, FunnelChartModule, GaodeMapService, GaugeModule, IframeModule, LiquidFillModule, MarqueeModule, PercentPieChartModule, PlanimetricMap2dModule, PlanimetricMap3dModule, RadarChartModule, Scatter3dModule, ScreenWidgetModule, SelectModule, TableModule, TreeControlModule, TreeRingChartModule, VideoPlayerModule, VisualMapChartModule, WorkbenchWidgetModule, ɵ0$2 as ɵ0, ɵ1$2 as ɵ1, ɵ2$2 as ɵ2, ɵ3$2 as ɵ3, ImageModule as ɵa, ImageComponent as ɵb, WeatherModule as ɵba, WeatherComponent as ɵbb, RadioModule as ɵbc, RadioComponent as ɵbd, CheckboxComponent as ɵbe, RateModule as ɵbf, RateComponent as ɵbg, GeneralTextModule as ɵbh, GeneralTextComponent as ɵbi, MarqueeComponent as ɵbj, WordartModule as ɵbk, WordartComponent as ɵbl, IconfontModule as ɵbm, IconfontComponent as ɵbn, TableComponent as ɵbo, AudioComponent as ɵbp, VideoPlayerComponent as ɵbq, ShapeModule as ɵbr, ShapeComponent as ɵbs, BackgroundModule as ɵbt, BackgroundComponent as ɵbu, ShufflingListModule as ɵbv, ShufflingListComponent as ɵbw, ColorPipe as ɵbx, BasicPlanimetricMapComponent as ɵby, ParentContainerComponent as ɵbz, BasicLineChartComponent as ɵc, BreathingBubbleLayerModule as ɵca, BreathingBubbleLayerComponent as ɵcb, PlanimetricMap2dComponent as ɵcc, FlyLineLayerModule as ɵcd, FlyLineLayerComponent as ɵce, Map2dPolylineLayerModule as ɵcf, Map2dPolylineLayerComponent as ɵcg, Map2dMarkLayerModule as ɵch, Map2dMarkLayerComponent as ɵci, Map2dVisualLayerModule as ɵcj, Map2dVisualLayerComponent as ɵck, ParentContainerModule as ɵcl, PlanimetricMap3dComponent as ɵcm, Map3dMarkLayerModule as ɵcn, Map3dMarkLayerComponent as ɵco, Map3dLineLayerModule as ɵcp, Map3dLineLayerComponent as ɵcq, MipAnimModule as ɵcr, MipAnimComponent as ɵcs, TreeControlComponent as ɵct, VisualMapChartComponent as ɵcu, DatePickerComponent as ɵcv, TimePickerModule as ɵcw, TimePickerComponent as ɵcx, CustomBaiduMapComponent as ɵcy, BaiduMarkerLayerComponent as ɵcz, BasicPieChartComponent as ɵd, BaseLayer as ɵda, BaiduPolylineLayerComponent as ɵdb, WindLayerComponent as ɵdc, TyphoonAreaLayerComponent as ɵdd, UploadModule as ɵde, UploadComponent as ɵdf, CrossTableComponent as ɵdg, Pie3dChartModule as ɵdh, Pie3dChartComponent as ɵdi, HighChartsService as ɵdj, MultiTitleGaugeModule as ɵdk, MultiTitleGaugeComponent as ɵdl, GaugeProgressModule as ɵdm, GaugeProgressComponent as ɵdn, ItemSwiperModule as ɵdo, ItemSwiperComponent as ɵdp, BulletinBoardModule as ɵdq, BulletinBoardComponent as ɵdr, TemporaryDataModule as ɵds, TemporaryDataComponent as ɵdt, LineLightFlowModule as ɵdu, LineLightFlowComponent as ɵdv, IframeComponent as ɵdw, VideoGridModule as ɵdx, VideoGridComponent as ɵdy, Scatter3dComponent as ɵdz, LineBarChartModule as ɵe, AnnouncementModule as ɵea, AnnouncementComponent as ɵeb, TabsModule as ɵec, TabsComponent as ɵed, TabComponent as ɵee, CalendarModule as ɵef, CalendarComponent as ɵeg, GanttModule as ɵeh, GanttComponent as ɵei, LineBarChartComponent as ɵf, BarChartThreeDComponent as ɵg, BubbleChartComponent as ɵh, RadarChartComponent as ɵi, FunnelChartComponent as ɵj, PercentPieChartComponent as ɵk, TreeRingChartComponent as ɵl, GaugeComponent as ɵm, LiquidFillComponent as ɵn, ButtonModule as ɵo, ButtonComponent as ɵp, HttpService as ɵq, TimerModule as ɵr, TimerComponent as ɵs, NumberFlopModule as ɵt, NumberFlopComponent as ɵu, VoteModule as ɵv, VoteComponent as ɵw, SelectComponent as ɵx, SearchModule as ɵy, SearchComponent as ɵz };
20582
+ export { AudioModule, BarChartThreeDModule, BasicBarChartComponent, BasicBarChartModule, BasicLineChartModule, BasicPieChartModule, BasicPlanimetricMapModule, BubbleChartModule, CheckboxModule, CommonService, CrossTableModule, CustomBaiduMapModule, DatePickerModule, FileUrlService, FunnelChartModule, GaodeMapService, GaugeModule, IframeModule, LiquidFillModule, MarqueeModule, PercentPieChartModule, PlanimetricMap2dModule, PlanimetricMap3dModule, RadarChartModule, Scatter3dModule, ScreenWidgetModule, SelectModule, TableModule, TreeControlModule, TreeRingChartModule, VideoPlayerModule, VisualMapChartModule, WorkbenchWidgetModule, ɵ0$2 as ɵ0, ɵ1$2 as ɵ1, ɵ2$2 as ɵ2, ɵ3$2 as ɵ3, ImageModule as ɵa, ImageComponent as ɵb, WeatherModule as ɵba, WeatherComponent as ɵbb, RadioModule as ɵbc, RadioComponent as ɵbd, CheckboxComponent as ɵbe, RateModule as ɵbf, RateComponent as ɵbg, GeneralTextModule as ɵbh, GeneralTextComponent as ɵbi, MarqueeComponent as ɵbj, WordartModule as ɵbk, WordartComponent as ɵbl, IconfontModule as ɵbm, IconfontComponent as ɵbn, TableComponent as ɵbo, AudioComponent as ɵbp, VideoPlayerComponent as ɵbq, ShapeModule as ɵbr, ShapeComponent as ɵbs, BackgroundModule as ɵbt, BackgroundComponent as ɵbu, ShufflingListModule as ɵbv, ShufflingListComponent as ɵbw, ColorPipe as ɵbx, BasicPlanimetricMapComponent as ɵby, ParentContainerComponent as ɵbz, BasicLineChartComponent as ɵc, BreathingBubbleLayerModule as ɵca, BreathingBubbleLayerComponent as ɵcb, PlanimetricMap2dComponent as ɵcc, FlyLineLayerModule as ɵcd, FlyLineLayerComponent as ɵce, Map2dPolylineLayerModule as ɵcf, Map2dPolylineLayerComponent as ɵcg, Map2dMarkLayerModule as ɵch, Map2dMarkLayerComponent as ɵci, Map2dVisualLayerModule as ɵcj, Map2dVisualLayerComponent as ɵck, ParentContainerModule as ɵcl, PlanimetricMap3dComponent as ɵcm, Map3dMarkLayerModule as ɵcn, Map3dMarkLayerComponent as ɵco, Map3dLineLayerModule as ɵcp, Map3dLineLayerComponent as ɵcq, MipAnimModule as ɵcr, MipAnimComponent as ɵcs, TreeControlComponent as ɵct, VisualMapChartComponent as ɵcu, DatePickerComponent as ɵcv, TimePickerModule as ɵcw, TimePickerComponent as ɵcx, CustomBaiduMapComponent as ɵcy, BaiduMarkerLayerComponent as ɵcz, BasicPieChartComponent as ɵd, BaseLayer as ɵda, BaiduPolylineLayerComponent as ɵdb, WindLayerComponent as ɵdc, TyphoonAreaLayerComponent as ɵdd, UploadModule as ɵde, UploadComponent as ɵdf, CrossTableComponent as ɵdg, Pie3dChartModule as ɵdh, Pie3dChartComponent as ɵdi, HighChartsService as ɵdj, MultiTitleGaugeModule as ɵdk, MultiTitleGaugeComponent as ɵdl, GaugeProgressModule as ɵdm, GaugeProgressComponent as ɵdn, ItemSwiperModule as ɵdo, ItemSwiperComponent as ɵdp, BulletinBoardModule as ɵdq, BulletinBoardComponent as ɵdr, TemporaryDataModule as ɵds, TemporaryDataComponent as ɵdt, LineLightFlowModule as ɵdu, LineLightFlowComponent as ɵdv, IframeComponent as ɵdw, VideoGridModule as ɵdx, VideoGridComponent as ɵdy, Scatter3dComponent as ɵdz, LineBarChartModule as ɵe, AnnouncementModule as ɵea, AnnouncementComponent as ɵeb, TabsModule as ɵec, TabsComponent as ɵed, TabComponent as ɵee, CalendarModule as ɵef, CalendarComponent as ɵeg, BackgroundEventsComponent as ɵeh, CalendarEventsChild as ɵei, EventsComponent as ɵej, GanttModule as ɵek, GanttComponent as ɵel, LineBarChartComponent as ɵf, BarChartThreeDComponent as ɵg, BubbleChartComponent as ɵh, RadarChartComponent as ɵi, FunnelChartComponent as ɵj, PercentPieChartComponent as ɵk, TreeRingChartComponent as ɵl, GaugeComponent as ɵm, LiquidFillComponent as ɵn, ButtonModule as ɵo, ButtonComponent as ɵp, HttpService as ɵq, TimerModule as ɵr, TimerComponent as ɵs, NumberFlopModule as ɵt, NumberFlopComponent as ɵu, VoteModule as ɵv, VoteComponent as ɵw, SelectComponent as ɵx, SearchModule as ɵy, SearchComponent as ɵz };
20318
20583
  //# sourceMappingURL=bbj-screen-widget.js.map