bbj-screen-widget 2.4.57 → 2.4.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bbj-screen-widget.metadata.json +1 -1
- package/bundles/bbj-screen-widget.umd.js +44 -24
- package/bundles/bbj-screen-widget.umd.js.map +1 -1
- package/bundles/bbj-screen-widget.umd.min.js +1 -1
- package/bundles/bbj-screen-widget.umd.min.js.map +1 -1
- package/esm2015/lib/calendar/background-events/background-events.component.js +3 -1
- package/esm2015/lib/calendar/calendar-events-child.js +1 -8
- package/esm2015/lib/calendar/calendar.component.js +23 -8
- package/esm2015/lib/calendar/calendar.util.js +12 -0
- package/esm2015/lib/calendar/events/events.component.js +6 -2
- package/esm2015/lib/iframe/iframe.component.js +2 -2
- package/esm2015/lib/screen-widget.module.js +3 -3
- package/esm2015/lib/tabs/tabs.component.js +2 -2
- package/esm2015/lib/temporary-data/temporary-data.component.js +2 -2
- package/esm2015/lib/video-grid/video-grid.component.js +2 -2
- package/esm2015/lib/workbench-widget.module.js +3 -3
- package/fesm2015/bbj-screen-widget.js +45 -24
- package/fesm2015/bbj-screen-widget.js.map +1 -1
- package/lib/calendar/calendar-events-child.d.ts +1 -2
- package/lib/calendar/calendar.component.d.ts +5 -1
- package/lib/calendar/calendar.util.d.ts +6 -0
- package/package.json +1 -1
- package/src/assets/img/screen/bulletin-board.png +0 -0
- package/src/assets/img/screen/tabs.png +0 -0
|
@@ -19110,7 +19110,7 @@
|
|
|
19110
19110
|
__metadata("design:type", Object)
|
|
19111
19111
|
], exports.ɵdt.prototype, "dataChange", void 0);
|
|
19112
19112
|
exports.ɵdt = __decorate([
|
|
19113
|
-
bbjWidgetBase.Widget('临时数据'),
|
|
19113
|
+
bbjWidgetBase.Widget('临时数据', { group: 'component', image: 'assets/img/screen/temporary-data.png', icon: 'iconmokuai' }),
|
|
19114
19114
|
__metadata("design:paramtypes", [i0.Renderer2, i0.ElementRef])
|
|
19115
19115
|
], exports.ɵdt);
|
|
19116
19116
|
|
|
@@ -19431,7 +19431,7 @@
|
|
|
19431
19431
|
__metadata("design:returntype", void 0)
|
|
19432
19432
|
], exports.ɵdw.prototype, "setUrl", null);
|
|
19433
19433
|
exports.ɵdw = __decorate([
|
|
19434
|
-
bbjWidgetBase.Widget('iframe'),
|
|
19434
|
+
bbjWidgetBase.Widget('iframe', { group: 'component', image: 'assets/img/screen/iframe.png', icon: 'iconmokuai' }),
|
|
19435
19435
|
__metadata("design:paramtypes", [])
|
|
19436
19436
|
], exports.ɵdw);
|
|
19437
19437
|
|
|
@@ -19578,7 +19578,7 @@
|
|
|
19578
19578
|
__metadata("design:type", Object)
|
|
19579
19579
|
], exports.ɵdy.prototype, "data", void 0);
|
|
19580
19580
|
exports.ɵdy = __decorate([
|
|
19581
|
-
bbjWidgetBase.Widget('视频宫格'),
|
|
19581
|
+
bbjWidgetBase.Widget('视频宫格', { group: 'component', image: 'assets/img/screen/video-grid.png', icon: 'iconmokuai' }),
|
|
19582
19582
|
__metadata("design:paramtypes", [])
|
|
19583
19583
|
], exports.ɵdy);
|
|
19584
19584
|
|
|
@@ -19888,13 +19888,13 @@
|
|
|
19888
19888
|
},
|
|
19889
19889
|
});
|
|
19890
19890
|
widgetService.register(exports.ɵbp, {
|
|
19891
|
-
title: '
|
|
19891
|
+
title: '视频demo',
|
|
19892
19892
|
option: {
|
|
19893
19893
|
type: 'video',
|
|
19894
19894
|
src: 'https://xiche.oss-cn-beijing.aliyuncs.com/video/20180417154421.mp4',
|
|
19895
19895
|
},
|
|
19896
19896
|
}, {
|
|
19897
|
-
title: '
|
|
19897
|
+
title: '音频demo',
|
|
19898
19898
|
option: {
|
|
19899
19899
|
type: 'audio',
|
|
19900
19900
|
src: 'https://xiche.oss-cn-beijing.aliyuncs.com/video/20180417154421.mp4',
|
|
@@ -20333,6 +20333,17 @@
|
|
|
20333
20333
|
{ type: bbjWidgetBase.WidgetService }
|
|
20334
20334
|
]; };
|
|
20335
20335
|
|
|
20336
|
+
var dayFormat = 'yyyy-MM-dd';
|
|
20337
|
+
/**
|
|
20338
|
+
* 如果结束时间是仅日期的格式,加上一天
|
|
20339
|
+
* @param event
|
|
20340
|
+
*/
|
|
20341
|
+
function updateEndTime(event) {
|
|
20342
|
+
if (typeof event.end === 'string' && dateFns.isMatch(event.end, dayFormat)) {
|
|
20343
|
+
event.end = dateFns.format(dateFns.addDays(dateFns.parse(event.end, dayFormat, new Date()), 1), dayFormat);
|
|
20344
|
+
}
|
|
20345
|
+
}
|
|
20346
|
+
|
|
20336
20347
|
var ɵ0$d = { type: 'string', title: 'id' };
|
|
20337
20348
|
exports.ɵeg = /** @class */ (function () {
|
|
20338
20349
|
function CalendarComponent(router, cd) {
|
|
@@ -20347,7 +20358,7 @@
|
|
|
20347
20358
|
{ end: '2020-07-22', start: '2020-07-20', title: 'event 5' },
|
|
20348
20359
|
];
|
|
20349
20360
|
this.dataClick = new i0.EventEmitter();
|
|
20350
|
-
this.
|
|
20361
|
+
this.datesSetChange = new i0.EventEmitter();
|
|
20351
20362
|
this.eventMap = new Map();
|
|
20352
20363
|
this.eventClick = function (event) {
|
|
20353
20364
|
_this.dataClick.emit({ id: event.id, title: event.title });
|
|
@@ -20358,9 +20369,13 @@
|
|
|
20358
20369
|
var _a;
|
|
20359
20370
|
if (changes.data) {
|
|
20360
20371
|
if ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) {
|
|
20361
|
-
var events = this.data.map(function (item) {
|
|
20362
|
-
|
|
20363
|
-
|
|
20372
|
+
var events = this.data.map(function (item) {
|
|
20373
|
+
var event = Object.assign(Object.assign({}, item), { extendedProps: {
|
|
20374
|
+
eventClick: _this.eventClick,
|
|
20375
|
+
} });
|
|
20376
|
+
updateEndTime(event);
|
|
20377
|
+
return event;
|
|
20378
|
+
});
|
|
20364
20379
|
this.setEvents(this.id, events);
|
|
20365
20380
|
}
|
|
20366
20381
|
else {
|
|
@@ -20435,9 +20450,12 @@
|
|
|
20435
20450
|
// this.dataClick.emit({ id: info.event.id, title: info.event.title });
|
|
20436
20451
|
},
|
|
20437
20452
|
datesSet: function (arg) {
|
|
20453
|
+
console.log(arg);
|
|
20438
20454
|
var type = arg.view.type;
|
|
20439
20455
|
type = type.substring(type.indexOf('Grid') + 4).toLowerCase();
|
|
20440
|
-
|
|
20456
|
+
var start = dateFns.format(arg.start, 'yyyy-MM-dd');
|
|
20457
|
+
var end = dateFns.format(arg.end, 'yyyy-MM-dd');
|
|
20458
|
+
_this.datesSetChange.emit({ type: type, start: start, end: end });
|
|
20441
20459
|
},
|
|
20442
20460
|
};
|
|
20443
20461
|
this.cd.markForCheck();
|
|
@@ -20479,9 +20497,15 @@
|
|
|
20479
20497
|
__metadata("design:type", Object)
|
|
20480
20498
|
], exports.ɵeg.prototype, "dataClick", void 0);
|
|
20481
20499
|
__decorate([
|
|
20482
|
-
bbjWidgetBase.DataOutput(
|
|
20500
|
+
bbjWidgetBase.DataOutput({
|
|
20501
|
+
properties: {
|
|
20502
|
+
type: { type: 'string', title: '视图类型' },
|
|
20503
|
+
start: { type: 'string', title: '开始时间' },
|
|
20504
|
+
end: { type: 'string', title: '结束时间' },
|
|
20505
|
+
},
|
|
20506
|
+
}, { triggerLink: false }),
|
|
20483
20507
|
__metadata("design:type", Object)
|
|
20484
|
-
], exports.ɵeg.prototype, "
|
|
20508
|
+
], exports.ɵeg.prototype, "datesSetChange", void 0);
|
|
20485
20509
|
exports.ɵeg = __decorate([
|
|
20486
20510
|
bbjWidgetBase.Widget('日历', {
|
|
20487
20511
|
group: 'component',
|
|
@@ -20497,17 +20521,9 @@
|
|
|
20497
20521
|
this.parent = parent;
|
|
20498
20522
|
}
|
|
20499
20523
|
CalendarEventsChild.prototype.ngOnChanges = function (changes) {
|
|
20500
|
-
var _this = this;
|
|
20501
20524
|
if (changes.data) {
|
|
20502
20525
|
if (this.data) {
|
|
20503
20526
|
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
20527
|
this.parent.setEvents(this.id, events);
|
|
20512
20528
|
}
|
|
20513
20529
|
else {
|
|
@@ -20547,6 +20563,7 @@
|
|
|
20547
20563
|
if (!event.color && _this.color) {
|
|
20548
20564
|
event.color = _this.color;
|
|
20549
20565
|
}
|
|
20566
|
+
updateEndTime(event);
|
|
20550
20567
|
return event;
|
|
20551
20568
|
});
|
|
20552
20569
|
};
|
|
@@ -20607,10 +20624,13 @@
|
|
|
20607
20624
|
EventsComponent.prototype.getEvents = function (data) {
|
|
20608
20625
|
var _this = this;
|
|
20609
20626
|
return data.map(function (item) {
|
|
20610
|
-
var event = Object.assign({}, item)
|
|
20627
|
+
var event = Object.assign(Object.assign({}, item), { extendedProps: {
|
|
20628
|
+
eventClick: _this.eventClick,
|
|
20629
|
+
} });
|
|
20611
20630
|
if (!event.color && _this.color) {
|
|
20612
20631
|
event.color = _this.color;
|
|
20613
20632
|
}
|
|
20633
|
+
updateEndTime(event);
|
|
20614
20634
|
return event;
|
|
20615
20635
|
});
|
|
20616
20636
|
};
|
|
@@ -20745,7 +20765,7 @@
|
|
|
20745
20765
|
], exports.ɵed.prototype, "tabBarGutter", void 0);
|
|
20746
20766
|
exports.ɵed = __decorate([
|
|
20747
20767
|
bbjWidgetBase.Widget('标签页', {
|
|
20748
|
-
group: 'component',
|
|
20768
|
+
group: 'component', image: 'assets/img/screen/tabs.png', icon: 'iconmokuai',
|
|
20749
20769
|
children: [
|
|
20750
20770
|
{
|
|
20751
20771
|
title: '选项卡1',
|
|
@@ -21186,13 +21206,13 @@
|
|
|
21186
21206
|
size: { width: 7, height: 3 },
|
|
21187
21207
|
});
|
|
21188
21208
|
widgetService.register(exports.ɵbp, {
|
|
21189
|
-
title: '
|
|
21209
|
+
title: '视频demo',
|
|
21190
21210
|
option: {
|
|
21191
21211
|
type: 'video',
|
|
21192
21212
|
src: 'https://xiche.oss-cn-beijing.aliyuncs.com/video/20180417154421.mp4',
|
|
21193
21213
|
},
|
|
21194
21214
|
}, {
|
|
21195
|
-
title: '
|
|
21215
|
+
title: '音频demo',
|
|
21196
21216
|
option: {
|
|
21197
21217
|
type: 'audio',
|
|
21198
21218
|
src: 'https://xiche.oss-cn-beijing.aliyuncs.com/video/20180417154421.mp4',
|