bbj-screen-widget 2.4.57 → 2.4.59

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.
Files changed (30) hide show
  1. package/bbj-screen-widget.metadata.json +1 -1
  2. package/bundles/bbj-screen-widget.umd.js +101 -74
  3. package/bundles/bbj-screen-widget.umd.js.map +1 -1
  4. package/bundles/bbj-screen-widget.umd.min.js +1 -1
  5. package/bundles/bbj-screen-widget.umd.min.js.map +1 -1
  6. package/esm2015/lib/calendar/background-events/background-events.component.js +3 -1
  7. package/esm2015/lib/calendar/calendar-events-child.js +1 -8
  8. package/esm2015/lib/calendar/calendar.component.js +26 -8
  9. package/esm2015/lib/calendar/calendar.util.js +12 -0
  10. package/esm2015/lib/calendar/events/events.component.js +6 -2
  11. package/esm2015/lib/gauge-progress/gauge-progress.component.js +3 -3
  12. package/esm2015/lib/gauge-progress/gauge.module.js +5 -4
  13. package/esm2015/lib/iframe/iframe.component.js +2 -2
  14. package/esm2015/lib/item-swiper/item-swiper.component.js +42 -33
  15. package/esm2015/lib/item-swiper/item-swiper.module.js +6 -12
  16. package/esm2015/lib/screen-widget.module.js +3 -3
  17. package/esm2015/lib/tabs/tabs.component.js +2 -2
  18. package/esm2015/lib/temporary-data/temporary-data.component.js +2 -2
  19. package/esm2015/lib/video-grid/video-grid.component.js +2 -2
  20. package/esm2015/lib/workbench-widget.module.js +3 -3
  21. package/fesm2015/bbj-screen-widget.js +98 -70
  22. package/fesm2015/bbj-screen-widget.js.map +1 -1
  23. package/lib/calendar/calendar-events-child.d.ts +1 -2
  24. package/lib/calendar/calendar.component.d.ts +5 -1
  25. package/lib/calendar/calendar.util.d.ts +6 -0
  26. package/lib/gauge-progress/gauge.module.d.ts +1 -0
  27. package/lib/item-swiper/item-swiper.module.d.ts +1 -0
  28. package/package.json +2 -2
  29. package/src/assets/img/screen/bulletin-board.png +0 -0
  30. package/src/assets/img/screen/tabs.png +0 -0
@@ -1,4 +1,4 @@
1
- import { ɵɵdefineInjectable, ɵɵinject, Injectable, Component, ChangeDetectionStrategy, ChangeDetectorRef, Renderer2, ElementRef, NgModule, EventEmitter, NgZone, ViewChild, Input, Pipe, forwardRef, Inject, Optional, HostBinding, Directive, HostListener } from '@angular/core';
1
+ import { ɵɵdefineInjectable, ɵɵinject, Injectable, Component, ChangeDetectionStrategy, ChangeDetectorRef, Renderer2, ElementRef, NgModule, EventEmitter, NgZone, ViewChild, Input, Pipe, forwardRef, Inject, Optional, HostBinding, Directive, CUSTOM_ELEMENTS_SCHEMA, HostListener } from '@angular/core';
2
2
  import { BaiduMapService } from 'bbj-screen-widget/core';
3
3
  export * from 'bbj-screen-widget/core';
4
4
  import { HttpClient, HttpClientJsonpModule } from '@angular/common/http';
@@ -27,7 +27,7 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
27
27
  import { getMap, registerMap } from 'echarts';
28
28
  import { NzTreeModule } from 'ng-zorro-antd/tree';
29
29
  import { NzHighlightModule } from 'ng-zorro-antd/core/highlight';
30
- import { addWeeks, addDays, startOfWeek, addYears, startOfYear, addMonths, startOfMonth, startOfDay, parse, format, parseISO, min } from 'date-fns';
30
+ import { addWeeks, addDays, startOfWeek, addYears, startOfYear, addMonths, startOfMonth, startOfDay, parse, format, isMatch, parseISO, min } from 'date-fns';
31
31
  import { NzI18nService } from 'ng-zorro-antd/i18n';
32
32
  import { differenceInCalendarDays } from 'date-fns/fp';
33
33
  import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
@@ -39,8 +39,7 @@ import { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';
39
39
  import { NzMessageService } from 'ng-zorro-antd/message';
40
40
  import { NzUploadModule } from 'ng-zorro-antd/upload';
41
41
  import { NzTableModule } from 'ng-zorro-antd/table';
42
- import { SwiperModule } from 'swiper/angular';
43
- import SwiperCore, { Navigation, Pagination, Scrollbar, A11y, Virtual, Zoom, Autoplay, Thumbs, Controller } from 'swiper/core';
42
+ import 'swiper/swiper-element-bundle.js';
44
43
  import { NzSpaceModule } from 'ng-zorro-antd/space';
45
44
  import { NzGridModule } from 'ng-zorro-antd/grid';
46
45
  import { Router } from '@angular/router';
@@ -17386,8 +17385,8 @@ let GaugeProgressComponent = class GaugeProgressComponent {
17386
17385
  GaugeProgressComponent.decorators = [
17387
17386
  { type: Component, args: [{
17388
17387
  selector: 'sc-gauge-progress',
17389
- template: "\n<swiper\n #swiper\n [slidesPerView]=\"slidesPerView\"\n [spaceBetween]=\"spaceBetween\"\n [navigation]=\"navigation && navigationLeftIcon && navigationRightIcon ? navigationBtnConfig : navigation\"\n class=\"swiper-no-swiping\"\n [noSwiping]=\"true\"\n>\n <ng-template swiperSlide *ngFor=\"let item of data\">\n <!-- <div class=\"item-img\">\n <div class=\"item-val\" [ngStyle]=\"numfont\">{{ item.value }}</div>\n <img [src]=\"cardBgImg\" alt=\"\" />\n </div>\n <div [ngStyle]=\"font\">{{ item.label }}</div> -->\n <div echarts [options]=\"item\" class=\"demo-chart\" [initOpts]=\"{ renderer: 'svg' }\"></div>\n </ng-template>\n</swiper>\n<ng-container *ngIf=\"navigation && navigationLeftIcon && navigationRightIcon\">\n <div class=\"navigationbtn swiper-navigation-prev\" [style]=\"{ left: (navigationMoveVal || '-60') + 'px' }\">\n <img [src]=\"navigationLeftIcon\" alt=\"\" />\n </div>\n <div class=\"navigationbtn swiper-navigation-next\" [style]=\"{ right: (navigationMoveVal || '-60') + 'px' }\">\n <img [src]=\"navigationRightIcon\" alt=\"\" />\n </div>\n</ng-container>\n\n\n\n",
17390
- styles: [":host{display:block}:host,:host ::ng-deep .swiper-container{height:100%;width:100%}:host ::ng-deep .swiper-slide{text-align:center;position:relative}:host ::ng-deep .item-img{position:relative}:host ::ng-deep .item-img img{display:block;width:100%}:host ::ng-deep .item-val{position:absolute;text-align:center;top:0;bottom:0;left:0;width:100%;z-index:99}:host ::ng-deep .navigationbtn{cursor:pointer;position:absolute;top:0;bottom:0;display:flex;align-items:center;outline:none}:host ::ng-deep .swiper-navigation-prev{left:-60px}:host ::ng-deep .swiper-navigation-next{right:-60px}.demo-chart{height:100%}"]
17388
+ template: "\n<swiper-container\n #swiper\n [slidesPerView]=\"slidesPerView\"\n [spaceBetween]=\"spaceBetween\"\n [navigation]=\"navigation && navigationLeftIcon && navigationRightIcon ? navigationBtnConfig : navigation\"\n class=\"swiper-no-swiping\"\n [noSwiping]=\"true\"\n>\n <swiper-slide *ngFor=\"let item of data\">\n <!-- <div class=\"item-img\">\n <div class=\"item-val\" [ngStyle]=\"numfont\">{{ item.value }}</div>\n <img [src]=\"cardBgImg\" alt=\"\" />\n </div>\n <div [ngStyle]=\"font\">{{ item.label }}</div> -->\n <div echarts [options]=\"item\" class=\"demo-chart\" [initOpts]=\"{ renderer: 'svg' }\"></div>\n </swiper-slide>\n</swiper-container>\n<ng-container *ngIf=\"navigation && navigationLeftIcon && navigationRightIcon\">\n <div class=\"navigationbtn swiper-navigation-prev\" [style]=\"{ left: (navigationMoveVal || '-60') + 'px' }\">\n <img [src]=\"navigationLeftIcon\" alt=\"\" />\n </div>\n <div class=\"navigationbtn swiper-navigation-next\" [style]=\"{ right: (navigationMoveVal || '-60') + 'px' }\">\n <img [src]=\"navigationRightIcon\" alt=\"\" />\n </div>\n</ng-container>\n\n\n\n",
17389
+ styles: [":host{display:block}:host,:host ::ng-deep swiper-container{height:100%;width:100%}:host ::ng-deep swiper-slide{text-align:center;position:relative}:host ::ng-deep .item-img{position:relative}:host ::ng-deep .item-img img{display:block;width:100%}:host ::ng-deep .item-val{position:absolute;text-align:center;top:0;bottom:0;left:0;width:100%;z-index:99}:host ::ng-deep .navigationbtn{cursor:pointer;position:absolute;top:0;bottom:0;display:flex;align-items:center;outline:none}:host ::ng-deep .swiper-navigation-prev{left:-60px}:host ::ng-deep .swiper-navigation-next{right:-60px}.demo-chart{height:100%}"]
17391
17390
  },] }
17392
17391
  ];
17393
17392
  GaugeProgressComponent.ctorParameters = () => [];
@@ -17575,7 +17574,8 @@ class GaugeProgressModule {
17575
17574
  GaugeProgressModule.decorators = [
17576
17575
  { type: NgModule, args: [{
17577
17576
  declarations: [GaugeProgressComponent],
17578
- imports: [CommonModule, WidgetBaseModule, NgxEchartsModule, SwiperModule],
17577
+ imports: [CommonModule, WidgetBaseModule, NgxEchartsModule],
17578
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
17579
17579
  },] }
17580
17580
  ];
17581
17581
  GaugeProgressModule.ctorParameters = () => [
@@ -17758,23 +17758,37 @@ BulletinBoardModule.ctorParameters = () => [
17758
17758
  ];
17759
17759
 
17760
17760
  // install Swiper components
17761
- SwiperCore.use([
17762
- Navigation,
17763
- Pagination,
17764
- Scrollbar,
17765
- A11y,
17766
- Virtual,
17767
- Zoom,
17768
- Autoplay,
17769
- Thumbs,
17770
- Controller
17771
- ]);
17761
+ // SwiperCore.use([
17762
+ // Navigation,
17763
+ // Pagination,
17764
+ // Scrollbar,
17765
+ // A11y,
17766
+ // Virtual,
17767
+ // Zoom,
17768
+ // Autoplay,
17769
+ // Thumbs,
17770
+ // Controller
17771
+ // ]);
17772
17772
  let ItemSwiperComponent = class ItemSwiperComponent {
17773
17773
  constructor(ele) {
17774
17774
  this.ele = ele;
17775
17775
  this.font = { family: 'Microsoft YaHei', color: '#ffffff', weight: 'normal', size: 20, space: 0, lineHeight: '66' };
17776
- this.numfont = { family: 'Microsoft YaHei', color: '#ffffff', weight: 'normal', size: 21, space: 0, lineHeight: '25' };
17777
- this.titlefont = { family: 'Microsoft YaHei', color: '#ffffff', weight: 'normal', size: 21, space: 0, lineHeight: '25' };
17776
+ this.numfont = {
17777
+ family: 'Microsoft YaHei',
17778
+ color: '#ffffff',
17779
+ weight: 'normal',
17780
+ size: 21,
17781
+ space: 0,
17782
+ lineHeight: '25',
17783
+ };
17784
+ this.titlefont = {
17785
+ family: 'Microsoft YaHei',
17786
+ color: '#ffffff',
17787
+ weight: 'normal',
17788
+ size: 21,
17789
+ space: 0,
17790
+ lineHeight: '25',
17791
+ };
17778
17792
  this.slidesPerView = 3;
17779
17793
  this.selectHeight = 180;
17780
17794
  this.gourpHeight = 0;
@@ -17817,7 +17831,7 @@ let ItemSwiperComponent = class ItemSwiperComponent {
17817
17831
  this.valueChange = new EventEmitter();
17818
17832
  this.navigationBtnConfig = {
17819
17833
  prevEl: '.swiper-navigation-prev',
17820
- nextEl: '.swiper-navigation-next'
17834
+ nextEl: '.swiper-navigation-next',
17821
17835
  };
17822
17836
  this.data = [];
17823
17837
  this.items = {};
@@ -17867,7 +17881,7 @@ let ItemSwiperComponent = class ItemSwiperComponent {
17867
17881
  img = ((_a = this.images[i]) === null || _a === void 0 ? void 0 : _a.imageUrl) || this.images[this.images.length - 1].imageUrl;
17868
17882
  t.imgstyle = {
17869
17883
  height: (this.height || 30) + 'px',
17870
- width: (this.width || 30) + 'px'
17884
+ width: (this.width || 30) + 'px',
17871
17885
  };
17872
17886
  }
17873
17887
  t.img = img;
@@ -17888,7 +17902,7 @@ let ItemSwiperComponent = class ItemSwiperComponent {
17888
17902
  arr.push({ label: t.label, value: t.value });
17889
17903
  });
17890
17904
  if (this.groups && this.groups.length > 0) {
17891
- this.groups.forEach(e => {
17905
+ this.groups.forEach((e) => {
17892
17906
  let a = this.items[e.groupName];
17893
17907
  if (!a) {
17894
17908
  return;
@@ -17896,11 +17910,11 @@ let ItemSwiperComponent = class ItemSwiperComponent {
17896
17910
  a.img = e.imageUrl || '';
17897
17911
  a.imgstyle = {
17898
17912
  height: (this.height || 30) + 'px',
17899
- width: (this.width || 30) + 'px'
17913
+ width: (this.width || 30) + 'px',
17900
17914
  };
17901
17915
  });
17902
17916
  }
17903
- Object.keys(this.items).forEach(key => {
17917
+ Object.keys(this.items).forEach((key) => {
17904
17918
  let map = this.items[key];
17905
17919
  map['group'] = key;
17906
17920
  this.data.push(map);
@@ -17914,16 +17928,14 @@ let ItemSwiperComponent = class ItemSwiperComponent {
17914
17928
  }
17915
17929
  console.log(this.data);
17916
17930
  }
17917
- onSwiper(swiper) {
17918
- }
17919
- onSlideChange() {
17920
- }
17931
+ onSwiper(swiper) { }
17932
+ onSlideChange() { }
17921
17933
  };
17922
17934
  ItemSwiperComponent.decorators = [
17923
17935
  { type: Component, args: [{
17924
17936
  selector: 'sc-item-swiper',
17925
- template: "<swiper\n #swiper\n [slidesPerView]=\"slidesPerView\"\n [spaceBetween]=\"spaceBetween\"\n [navigation]=\"navigation && navigationLeftIcon && navigationRightIcon ? navigationBtnConfig : navigation\"\n class=\"swiper-no-swiping\"\n [noSwiping]=\"true\"\n>\n <ng-template swiperSlide *ngFor=\"let item of data\">\n <ng-container *ngIf=\"!isgroup\">\n <div class=\"item-img\">\n <div class=\"item-val\" [ngStyle]=\"numfont\">{{ item.value }}</div>\n <img [src]=\"item.img\" alt=\"\" [ngStyle]=\"item.imgstyle\" />\n </div>\n <div [ngStyle]=\"font\">{{ item.label }}</div>\n </ng-container>\n <!-- <ng-container *ngFor=\"let i of item\"> -->\n <ng-container *ngIf=\"isgroup\">\n <div class=\"content\" [style.height]=\"selectHeight + 'px'\">\n <div [ngStyle]=\"groupfont\" class=\"title\">{{ item.group }}</div>\n <div class=\"item-img\">\n <!-- <ng-container *ngIf=\"item.img\"> -->\n <img [src]=\"item.img\" alt=\"\" [ngStyle]=\"item.imgstyle\" />\n <!-- </ng-container> -->\n </div>\n <div class=\"kvbox\" [style.bottom]=\"valueBottom + 'px'\">\n <div style=\"display: inline-flex\">\n <ng-container *ngFor=\"let a of item.field\">\n <span style=\"flex: 1; left: 0px\" class=\"label\">\n <div [ngStyle]=\"font\">{{ a.label }}</div>\n <div [ngStyle]=\"numfont\">{{ a.value }}</div>\n </span>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n <!-- </ng-container> -->\n </ng-template>\n</swiper>\n<ng-container *ngIf=\"navigationLeftIcon && navigationRightIcon\">\n <div class=\"navigationbtn swiper-navigation-prev\" [style.left.px]=\"navigationMoveVal || -60\" [class.hidden]=\"!showNavigation\">\n <img [src]=\"navigationLeftIcon\" alt=\"\" />\n </div>\n <div class=\"navigationbtn swiper-navigation-next\" [style.right.px]=\"navigationMoveVal || -60\" [class.hidden]=\"!showNavigation\">\n <img [src]=\"navigationRightIcon\" alt=\"\" />\n </div>\n</ng-container>\n",
17926
- styles: [":host{position:relative;display:block}:host ::ng-deep .swiper-container{width:100%}:host ::ng-deep .title{z-index:100;position:absolute;left:0;width:100%;text-align:center}:host ::ng-deep .swiper-slide{text-align:center;position:relative;overflow:visible;padding-top:30px}:host ::ng-deep .content,:host ::ng-deep .item-img{position:relative;height:100%;width:100%}:host ::ng-deep .item-img img{display:block;margin:auto}:host ::ng-deep .item-val{position:absolute;text-align:center;top:0;bottom:0;left:0;width:100%;z-index:99;overflow:visible}:host ::ng-deep .navigationbtn{cursor:pointer;position:absolute;top:0;bottom:0;display:flex;align-items:center;outline:none}:host ::ng-deep .navigationbtn.hidden{display:none}:host ::ng-deep .swiper-navigation-prev{left:-60px}:host ::ng-deep .swiper-navigation-next{right:-60px}:host ::ng-deep .label{margin:0 8px}:host ::ng-deep .kvbox{position:absolute;text-align:center;left:0;width:100%;z-index:99}"]
17937
+ template: "<swiper-container appSwiper\n #swiper\n [attr.slides-per-view]=\"slidesPerView\"\n [attr.space-between]=\"spaceBetween\"\n [attr.navigation]=\"navigation && navigationLeftIcon && navigationRightIcon ? navigationBtnConfig : navigation\"\n class=\"swiper-no-swiping\"\n [attr.no-swiping]=\"true\"\n>\n <swiper-slide *ngFor=\"let item of data\">\n <ng-container *ngIf=\"!isgroup\">\n <div class=\"item-img\">\n <div class=\"item-val\" [ngStyle]=\"numfont\">{{ item.value }}</div>\n <img [src]=\"item.img\" alt=\"\" [ngStyle]=\"item.imgstyle\" />\n </div>\n <div [ngStyle]=\"font\">{{ item.label }}</div>\n </ng-container>\n <!-- <ng-container *ngFor=\"let i of item\"> -->\n <ng-container *ngIf=\"isgroup\">\n <div class=\"content\" [style.height]=\"selectHeight + 'px'\">\n <div [ngStyle]=\"groupfont\" class=\"title\">{{ item.group }}</div>\n <div class=\"item-img\">\n <!-- <ng-container *ngIf=\"item.img\"> -->\n <img [src]=\"item.img\" alt=\"\" [ngStyle]=\"item.imgstyle\" />\n <!-- </ng-container> -->\n </div>\n <div class=\"kvbox\" [style.bottom]=\"valueBottom + 'px'\">\n <div style=\"display: inline-flex\">\n <ng-container *ngFor=\"let a of item.field\">\n <span style=\"flex: 1; left: 0px\" class=\"label\">\n <div [ngStyle]=\"font\">{{ a.label }}</div>\n <div [ngStyle]=\"numfont\">{{ a.value }}</div>\n </span>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n <!-- </ng-container> -->\n </swiper-slide>\n</swiper-container>\n<ng-container *ngIf=\"navigationLeftIcon && navigationRightIcon\">\n <div class=\"navigationbtn swiper-navigation-prev\" [style.left.px]=\"navigationMoveVal || -60\" [class.hidden]=\"!showNavigation\">\n <img [src]=\"navigationLeftIcon\" alt=\"\" />\n </div>\n <div class=\"navigationbtn swiper-navigation-next\" [style.right.px]=\"navigationMoveVal || -60\" [class.hidden]=\"!showNavigation\">\n <img [src]=\"navigationRightIcon\" alt=\"\" />\n </div>\n</ng-container>\n",
17938
+ styles: [":host{position:relative;display:block}:host ::ng-deep swiper-container{width:100%}:host ::ng-deep .title{z-index:100;position:absolute;left:0;width:100%;text-align:center}:host ::ng-deep swiper-slide{text-align:center;position:relative;overflow:visible;padding-top:30px}:host ::ng-deep .content,:host ::ng-deep .item-img{position:relative;height:100%;width:100%}:host ::ng-deep .item-img img{display:block;margin:auto}:host ::ng-deep .item-val{position:absolute;text-align:center;top:0;bottom:0;left:0;width:100%;z-index:99;overflow:visible}:host ::ng-deep .navigationbtn{cursor:pointer;position:absolute;top:0;bottom:0;display:flex;align-items:center;outline:none}:host ::ng-deep .navigationbtn.hidden{display:none}:host ::ng-deep .swiper-navigation-prev{left:-60px}:host ::ng-deep .swiper-navigation-next{right:-60px}:host ::ng-deep .label{margin:0 8px}:host ::ng-deep .kvbox{position:absolute;text-align:center;left:0;width:100%;z-index:99}"]
17927
17939
  },] }
17928
17940
  ];
17929
17941
  ItemSwiperComponent.ctorParameters = () => [
@@ -17976,7 +17988,7 @@ __decorate([
17976
17988
  type: 'string',
17977
17989
  ui: {
17978
17990
  widget: 'myUpload',
17979
- }
17991
+ },
17980
17992
  }),
17981
17993
  __metadata("design:type", Object)
17982
17994
  ], ItemSwiperComponent.prototype, "navigationLeftIcon", void 0);
@@ -17985,16 +17997,14 @@ __decorate([
17985
17997
  type: 'string',
17986
17998
  ui: {
17987
17999
  widget: 'myUpload',
17988
- }
18000
+ },
17989
18001
  }),
17990
18002
  __metadata("design:type", Object)
17991
18003
  ], ItemSwiperComponent.prototype, "navigationRightIcon", void 0);
17992
18004
  __decorate([
17993
18005
  Property('显示模式', {
17994
18006
  ui: { widget: 'select' },
17995
- enum: [
17996
- { label: '图标卡片', value: 'card' },
17997
- ],
18007
+ enum: [{ label: '图标卡片', value: 'card' }],
17998
18008
  }),
17999
18009
  __metadata("design:type", Object)
18000
18010
  ], ItemSwiperComponent.prototype, "showType", void 0);
@@ -18051,7 +18061,7 @@ __decorate([
18051
18061
  properties: {
18052
18062
  groupName: {
18053
18063
  type: 'string',
18054
- title: '组名'
18064
+ title: '组名',
18055
18065
  },
18056
18066
  imageUrl: {
18057
18067
  type: 'string',
@@ -18072,7 +18082,7 @@ __decorate([
18072
18082
  properties: {
18073
18083
  label: { title: '标题', type: 'string' },
18074
18084
  value: { title: '值', type: 'string' },
18075
- group: { title: '分组', type: 'string' }
18085
+ group: { title: '分组', type: 'string' },
18076
18086
  },
18077
18087
  }),
18078
18088
  __metadata("design:type", Array)
@@ -18093,15 +18103,9 @@ class ItemSwiperModule {
18093
18103
  }
18094
18104
  ItemSwiperModule.decorators = [
18095
18105
  { type: NgModule, args: [{
18096
- declarations: [
18097
- ItemSwiperComponent
18098
- ],
18099
- imports: [
18100
- CommonModule,
18101
- WidgetBaseModule,
18102
- NzSpaceModule,
18103
- SwiperModule
18104
- ]
18106
+ declarations: [ItemSwiperComponent],
18107
+ imports: [CommonModule, WidgetBaseModule, NzSpaceModule],
18108
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
18105
18109
  },] }
18106
18110
  ];
18107
18111
  ItemSwiperModule.ctorParameters = () => [
@@ -18149,7 +18153,7 @@ __decorate([
18149
18153
  __metadata("design:type", Object)
18150
18154
  ], TemporaryDataComponent.prototype, "dataChange", void 0);
18151
18155
  TemporaryDataComponent = __decorate([
18152
- Widget('临时数据'),
18156
+ Widget('临时数据', { group: 'component', image: 'assets/img/screen/temporary-data.png', icon: 'iconmokuai' }),
18153
18157
  __metadata("design:paramtypes", [Renderer2, ElementRef])
18154
18158
  ], TemporaryDataComponent);
18155
18159
 
@@ -18463,7 +18467,7 @@ __decorate([
18463
18467
  __metadata("design:returntype", void 0)
18464
18468
  ], IframeComponent.prototype, "setUrl", null);
18465
18469
  IframeComponent = __decorate([
18466
- Widget('iframe'),
18470
+ Widget('iframe', { group: 'component', image: 'assets/img/screen/iframe.png', icon: 'iconmokuai' }),
18467
18471
  __metadata("design:paramtypes", [])
18468
18472
  ], IframeComponent);
18469
18473
 
@@ -18607,7 +18611,7 @@ __decorate([
18607
18611
  __metadata("design:type", Object)
18608
18612
  ], VideoGridComponent.prototype, "data", void 0);
18609
18613
  VideoGridComponent = __decorate([
18610
- Widget('视频宫格'),
18614
+ Widget('视频宫格', { group: 'component', image: 'assets/img/screen/video-grid.png', icon: 'iconmokuai' }),
18611
18615
  __metadata("design:paramtypes", [])
18612
18616
  ], VideoGridComponent);
18613
18617
 
@@ -18914,13 +18918,13 @@ class ScreenWidgetModule {
18914
18918
  },
18915
18919
  });
18916
18920
  widgetService.register(AudioComponent, {
18917
- title: '我的视频一号',
18921
+ title: '视频demo',
18918
18922
  option: {
18919
18923
  type: 'video',
18920
18924
  src: 'https://xiche.oss-cn-beijing.aliyuncs.com/video/20180417154421.mp4',
18921
18925
  },
18922
18926
  }, {
18923
- title: '我的视频二号',
18927
+ title: '音频demo',
18924
18928
  option: {
18925
18929
  type: 'audio',
18926
18930
  src: 'https://xiche.oss-cn-beijing.aliyuncs.com/video/20180417154421.mp4',
@@ -19356,6 +19360,17 @@ AnnouncementModule.ctorParameters = () => [
19356
19360
  { type: WidgetService }
19357
19361
  ];
19358
19362
 
19363
+ const dayFormat = 'yyyy-MM-dd';
19364
+ /**
19365
+ * 如果结束时间是仅日期的格式,加上一天
19366
+ * @param event
19367
+ */
19368
+ function updateEndTime(event) {
19369
+ if (typeof event.end === 'string' && isMatch(event.end, dayFormat)) {
19370
+ event.end = format(addDays(parse(event.end, dayFormat, new Date()), 1), dayFormat);
19371
+ }
19372
+ }
19373
+
19359
19374
  const ɵ0$d = { type: 'string', title: 'id' };
19360
19375
  let CalendarComponent = class CalendarComponent {
19361
19376
  constructor(router, cd) {
@@ -19369,7 +19384,7 @@ let CalendarComponent = class CalendarComponent {
19369
19384
  { end: '2020-07-22', start: '2020-07-20', title: 'event 5' },
19370
19385
  ];
19371
19386
  this.dataClick = new EventEmitter();
19372
- this.typeChange = new EventEmitter();
19387
+ this.datesSetChange = new EventEmitter();
19373
19388
  this.eventMap = new Map();
19374
19389
  this.eventClick = (event) => {
19375
19390
  this.dataClick.emit({ id: event.id, title: event.title });
@@ -19379,14 +19394,21 @@ let CalendarComponent = class CalendarComponent {
19379
19394
  var _a;
19380
19395
  if (changes.data) {
19381
19396
  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
- } })));
19397
+ const events = this.data.map((item) => {
19398
+ const event = Object.assign(Object.assign({}, item), { extendedProps: {
19399
+ eventClick: this.eventClick,
19400
+ } });
19401
+ updateEndTime(event);
19402
+ return event;
19403
+ });
19385
19404
  this.setEvents(this.id, events);
19386
19405
  }
19387
19406
  else {
19388
19407
  this.removeEvents(this.id);
19389
19408
  }
19409
+ if (!this.calendarOptions) {
19410
+ this.update();
19411
+ }
19390
19412
  // const events = this.data.map((item) => ({
19391
19413
  // id: item.id,
19392
19414
  // start: item.start.indexOf(' 00:00:00') > -1 ? item.start.split(' ')[0] : item.start,
@@ -19444,9 +19466,12 @@ let CalendarComponent = class CalendarComponent {
19444
19466
  // this.dataClick.emit({ id: info.event.id, title: info.event.title });
19445
19467
  },
19446
19468
  datesSet: (arg) => {
19469
+ console.log(arg);
19447
19470
  let type = arg.view.type;
19448
19471
  type = type.substring(type.indexOf('Grid') + 4).toLowerCase();
19449
- this.typeChange.emit(type);
19472
+ const start = format(arg.start, 'yyyy-MM-dd');
19473
+ const end = format(arg.end, 'yyyy-MM-dd');
19474
+ this.datesSetChange.emit({ type, start, end });
19450
19475
  },
19451
19476
  };
19452
19477
  this.cd.markForCheck();
@@ -19487,9 +19512,15 @@ __decorate([
19487
19512
  __metadata("design:type", Object)
19488
19513
  ], CalendarComponent.prototype, "dataClick", void 0);
19489
19514
  __decorate([
19490
- DataOutput('视图类型'),
19515
+ DataOutput({
19516
+ properties: {
19517
+ type: { type: 'string', title: '视图类型' },
19518
+ start: { type: 'string', title: '开始时间' },
19519
+ end: { type: 'string', title: '结束时间' },
19520
+ },
19521
+ }, { triggerLink: false }),
19491
19522
  __metadata("design:type", Object)
19492
- ], CalendarComponent.prototype, "typeChange", void 0);
19523
+ ], CalendarComponent.prototype, "datesSetChange", void 0);
19493
19524
  CalendarComponent = __decorate([
19494
19525
  Widget('日历', {
19495
19526
  group: 'component',
@@ -19508,13 +19539,6 @@ class CalendarEventsChild {
19508
19539
  if (changes.data) {
19509
19540
  if (this.data) {
19510
19541
  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
19542
  this.parent.setEvents(this.id, events);
19519
19543
  }
19520
19544
  else {
@@ -19550,6 +19574,7 @@ let BackgroundEventsComponent = class BackgroundEventsComponent extends Calendar
19550
19574
  if (!event.color && this.color) {
19551
19575
  event.color = this.color;
19552
19576
  }
19577
+ updateEndTime(event);
19553
19578
  return event;
19554
19579
  });
19555
19580
  }
@@ -19606,10 +19631,13 @@ let EventsComponent = class EventsComponent extends CalendarEventsChild {
19606
19631
  }
19607
19632
  getEvents(data) {
19608
19633
  return data.map((item) => {
19609
- const event = Object.assign({}, item);
19634
+ const event = Object.assign(Object.assign({}, item), { extendedProps: {
19635
+ eventClick: this.eventClick,
19636
+ } });
19610
19637
  if (!event.color && this.color) {
19611
19638
  event.color = this.color;
19612
19639
  }
19640
+ updateEndTime(event);
19613
19641
  return event;
19614
19642
  });
19615
19643
  }
@@ -19741,7 +19769,7 @@ __decorate([
19741
19769
  ], TabsComponent.prototype, "tabBarGutter", void 0);
19742
19770
  TabsComponent = __decorate([
19743
19771
  Widget('标签页', {
19744
- group: 'component',
19772
+ group: 'component', image: 'assets/img/screen/tabs.png', icon: 'iconmokuai',
19745
19773
  children: [
19746
19774
  {
19747
19775
  title: '选项卡1',
@@ -20177,13 +20205,13 @@ class WorkbenchWidgetModule {
20177
20205
  size: { width: 7, height: 3 },
20178
20206
  });
20179
20207
  widgetService.register(AudioComponent, {
20180
- title: '我的视频一号',
20208
+ title: '视频demo',
20181
20209
  option: {
20182
20210
  type: 'video',
20183
20211
  src: 'https://xiche.oss-cn-beijing.aliyuncs.com/video/20180417154421.mp4',
20184
20212
  },
20185
20213
  }, {
20186
- title: '我的视频二号',
20214
+ title: '音频demo',
20187
20215
  option: {
20188
20216
  type: 'audio',
20189
20217
  src: 'https://xiche.oss-cn-beijing.aliyuncs.com/video/20180417154421.mp4',