@ezuikit/player-theme 2.0.2-beta.1 → 2.0.2-beta.3

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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.0.2-beta.1
3
- * Copyright (c) 2025-12-05 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.0.2-beta.3
3
+ * Copyright (c) 2025-12-08 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
@@ -13,6 +13,7 @@ var require$$1 = require('@ezuikit/utils-tools');
13
13
  var screenfull = require('screenfull');
14
14
  var I18n = require('@ezuikit/utils-i18n');
15
15
  var Logger = require('@ezuikit/utils-logger');
16
+ var controlDatePicker = require('@ezuikit/control-date-picker');
16
17
  var controlTimeLine = require('@ezuikit/control-time-line');
17
18
 
18
19
  /**
@@ -43,7 +44,8 @@ var THEME_PROPS = [
43
44
  'speed',
44
45
  'urlInfo',
45
46
  'videoLevelList',
46
- 'videoLevel'
47
+ 'videoLevel',
48
+ 'recMonth'
47
49
  ];
48
50
  /**
49
51
  * 当移动端 picker 控件打开时需要关闭动画(定时器)
@@ -189,8 +191,9 @@ var EVENTS = {
189
191
  /** 全局全屏控件销毁 */ globalFullscreenDestroy: 'Control.globalFullscreenDestroy',
190
192
  /** 日期面板展示隐藏变换 */ datePanelOpenChange: 'Control.datePanelOpenChange',
191
193
  /** 日期改变 */ dateChange: 'Control.dateChange',
194
+ /** 日期改变 */ dateMonthChange: 'Control.dateMonthChange',
192
195
  /** 日期销毁 */ dateDestroy: 'Control.datePanelDestroy',
193
- /** 时间轴拖动结束 */ timeLineChange: 'Control.timeLineChange',
196
+ /** 时间轴拖动结束 */ timeLineChange: 'Control.timeLineChange',
194
197
  /** 时间轴图片列表面板 */ timeLinePanelOpenChange: 'Control.timeLinePanelOpenChange',
195
198
  /** 时间轴控件销毁 */ timeLineDestroy: 'Control.timeLineDestroy',
196
199
  /** 主题控件挂载前 切换新的主题也会触发,如果想首次获取需要在 onInitializing 回调中进行监听 */ beforeMountControls: 'Control.beforeMountControls',
@@ -201,7 +204,7 @@ var EVENTS = {
201
204
  /** 加载控件销毁 */ loadingDestroy: 'Control.loadingDestroy',
202
205
  /** 消息控件销毁 */ messageDestroy: 'Control.messageDestroy',
203
206
  /** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy',
204
- contentRerender: 'Control.contentRerender'
207
+ /** 播放器内容区域重新渲染 */ contentRerender: 'Control.contentRerender'
205
208
  },
206
209
  /**
207
210
  * 主题控件相关
@@ -4062,11 +4065,11 @@ function debounce(func, wait) {
4062
4065
  // 对讲
4063
4066
  // =======================================================
4064
4067
  theme.on(EVENTS.talkingChange, function(talking) {
4065
- var _theme_controls_talkControl, _theme_controls;
4068
+ var _theme_controls, _theme_controls_talkControl, _theme_controls1;
4066
4069
  theme._talking = talking;
4067
- if (talking !== ((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls.talkControl) == null ? void 0 : _theme_controls_talkControl.active)) {
4068
- var _theme_controls_talkControl1, _theme_controls1;
4069
- (_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_talkControl1 = _theme_controls1.talkControl) == null ? void 0 : _theme_controls_talkControl1.emit(EVENTS.talkingChange, talking);
4070
+ if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.talkControl) && talking !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls1.talkControl) == null ? void 0 : _theme_controls_talkControl.active)) {
4071
+ var _theme_controls_talkControl1, _theme_controls2;
4072
+ (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_talkControl1 = _theme_controls2.talkControl) == null ? void 0 : _theme_controls_talkControl1.emit(EVENTS.talkingChange, talking);
4070
4073
  }
4071
4074
  });
4072
4075
  theme.on(EVENTS.talkVolumeChange, function(value) {
@@ -4077,9 +4080,9 @@ function debounce(func, wait) {
4077
4080
  // 录制
4078
4081
  // =======================================================
4079
4082
  theme.on(EVENTS.recordingChange, function(recording) {
4080
- var _theme_controls_recordControl, _theme_controls;
4083
+ var _theme_controls, _theme_controls_recordControl, _theme_controls1;
4081
4084
  theme._recording = recording;
4082
- if (recording !== ((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_recordControl = _theme_controls.recordControl) == null ? void 0 : _theme_controls_recordControl.active)) theme.controls.recordControl.active = recording;
4085
+ if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recordControl) && recording !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recordControl = _theme_controls1.recordControl) == null ? void 0 : _theme_controls_recordControl.active)) theme.controls.recordControl.active = recording;
4083
4086
  });
4084
4087
  // =======================================================
4085
4088
  // 清晰度
@@ -4096,14 +4099,14 @@ function debounce(func, wait) {
4096
4099
  // 放大
4097
4100
  // =======================================================
4098
4101
  theme.on(EVENTS.zoomingChange, function(zooming) {
4099
- var _theme_controls_zoomControl1, _theme_controls1;
4100
- if (((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 = _theme_controls1.zoomControl) == null ? void 0 : _theme_controls_zoomControl1.active) !== zooming) {
4102
+ var _theme_controls1, _theme_controls_zoomControl1, _theme_controls2;
4103
+ if (((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.zoomControl) && ((_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 = _theme_controls2.zoomControl) == null ? void 0 : _theme_controls_zoomControl1.active) !== zooming) {
4101
4104
  theme.controls.zoomControl.active = zooming;
4102
4105
  }
4103
4106
  });
4104
4107
  theme.on(EVENTS.zoomChange, function(zoom) {
4105
- var _theme_controls_zoomControl, _theme_controls;
4106
- if (((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_zoomControl = _theme_controls.zoomControl) == null ? void 0 : _theme_controls_zoomControl.value) !== zoom) {
4108
+ var _theme_controls, _theme_controls_zoomControl, _theme_controls1;
4109
+ if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.zoomControl) && ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl = _theme_controls1.zoomControl) == null ? void 0 : _theme_controls_zoomControl.value) !== zoom) {
4107
4110
  theme.controls.zoomControl.value = zoom;
4108
4111
  }
4109
4112
  });
@@ -4129,31 +4132,40 @@ function debounce(func, wait) {
4129
4132
  // 全屏
4130
4133
  // =======================================================
4131
4134
  theme == null ? void 0 : theme.on(EVENTS.fullscreenChange, function(info) {
4132
- if ([
4133
- 0,
4134
- 180
4135
- ].includes(theme.orientationAngle) && info.isMobile && info.isCurrentFullscreen) {
4136
- var // 代表移动端播放内容节点被旋转了 90度
4137
- _theme_zoomUtil_setTransform, _theme_zoomUtil;
4138
- (_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
4139
- } else {
4140
- var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
4141
- (_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
4135
+ if (theme.zoomUtil) {
4136
+ if ([
4137
+ 0,
4138
+ 180
4139
+ ].includes(theme.orientationAngle) && info.isMobile && info.isCurrentFullscreen) {
4140
+ var // 代表移动端播放内容节点被旋转了 90度
4141
+ _theme_zoomUtil_setTransform, _theme_zoomUtil;
4142
+ (_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
4143
+ } else {
4144
+ var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
4145
+ (_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
4146
+ }
4142
4147
  }
4143
4148
  });
4144
4149
  theme == null ? void 0 : theme.on(EVENTS.orientationChange, function(angle) {
4145
- if ([
4146
- 0,
4147
- 180
4148
- ].includes(angle) && Utils.isMobile && theme.isCurrentFullscreen) {
4149
- var // 代表移动端播放内容节点被旋转了 90度
4150
- _theme_zoomUtil_setTransform, _theme_zoomUtil;
4151
- (_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
4152
- } else {
4153
- var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
4154
- (_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
4150
+ if (theme.zoomUtil) {
4151
+ if ([
4152
+ 0,
4153
+ 180
4154
+ ].includes(angle) && Utils.isMobile && theme.isCurrentFullscreen) {
4155
+ var // 代表移动端播放内容节点被旋转了 90度
4156
+ _theme_zoomUtil_setTransform, _theme_zoomUtil;
4157
+ (_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
4158
+ } else {
4159
+ var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
4160
+ (_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
4161
+ }
4155
4162
  }
4156
4163
  });
4164
+ // 日期选择器
4165
+ theme == null ? void 0 : theme.on(EVENTS.control.dateMonthChange, function(dates) {
4166
+ var _theme_controls_dateControl_emit, _theme_controls_dateControl, _theme_controls;
4167
+ (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : (_theme_controls_dateControl_emit = _theme_controls_dateControl.emit) == null ? void 0 : _theme_controls_dateControl_emit.call(_theme_controls_dateControl, EVENTS.control.dateMonthChange, dates);
4168
+ });
4157
4169
  }
4158
4170
  /**
4159
4171
  * 控件向主题发现通信消息 control.on -> theme.emit ,仅用来转发控件的事件
@@ -4352,10 +4364,10 @@ function debounce(func, wait) {
4352
4364
  theme.emit(EVENTS.control.timeLineChange, date);
4353
4365
  });
4354
4366
  theme.controls.timeLineControl.on(EVENTS.control.timeLinePanelOpenChange, function(open) {
4355
- var _theme_controls_dateControl;
4356
- if ((_theme_controls_dateControl = theme.controls.dateControl) == null ? void 0 : _theme_controls_dateControl.dataPickerUtil) {
4357
- var _theme_controls_dateControl_dataPickerUtil, _theme_controls_dateControl1;
4358
- (_theme_controls_dateControl1 = theme.controls.dateControl) == null ? void 0 : (_theme_controls_dateControl_dataPickerUtil = _theme_controls_dateControl1.dataPickerUtil) == null ? void 0 : _theme_controls_dateControl_dataPickerUtil.hide();
4367
+ var _theme_controls_dateControl, _theme_controls;
4368
+ if ((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : _theme_controls_dateControl.datePicker) {
4369
+ var _theme_controls_dateControl_datePicker, _theme_controls_dateControl1, _theme_controls1;
4370
+ (_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_dateControl1 = _theme_controls1.dateControl) == null ? void 0 : (_theme_controls_dateControl_datePicker = _theme_controls_dateControl1.datePicker) == null ? void 0 : _theme_controls_dateControl_datePicker.hide();
4359
4371
  }
4360
4372
  theme.emit(EVENTS.control.timeLinePanelOpenChange, open);
4361
4373
  });
@@ -4648,12 +4660,12 @@ function getDefaultExportFromCjs (x) {
4648
4660
  * Released under the MIT License.
4649
4661
  */
4650
4662
 
4651
- var dist$2;
4652
- var hasRequiredDist$2;
4663
+ var dist$1;
4664
+ var hasRequiredDist$1;
4653
4665
 
4654
- function requireDist$2 () {
4655
- if (hasRequiredDist$2) return dist$2;
4656
- hasRequiredDist$2 = 1;
4666
+ function requireDist$1 () {
4667
+ if (hasRequiredDist$1) return dist$1;
4668
+ hasRequiredDist$1 = 1;
4657
4669
 
4658
4670
  /**
4659
4671
  * Zoom position
@@ -5360,12 +5372,12 @@ function requireDist$2 () {
5360
5372
  }();
5361
5373
  Zoom.VERSION = '0.0.2';
5362
5374
 
5363
- dist$2 = Zoom;
5364
- return dist$2;
5375
+ dist$1 = Zoom;
5376
+ return dist$1;
5365
5377
  }
5366
5378
 
5367
- var distExports$2 = requireDist$2();
5368
- var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$2);
5379
+ var distExports$1 = requireDist$1();
5380
+ var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
5369
5381
 
5370
5382
  function _extends$h() {
5371
5383
  _extends$h = Object.assign || function(target) {
@@ -6440,7 +6452,7 @@ function _set_prototype_of$d(o, p) {
6440
6452
  return CapturePicture;
6441
6453
  }(Control);
6442
6454
 
6443
- var dist$1 = {};
6455
+ var dist = {};
6444
6456
 
6445
6457
  /*
6446
6458
  * @ezuikit/control-ptz v0.0.1
@@ -6448,11 +6460,11 @@ var dist$1 = {};
6448
6460
  * Released under the MIT License.
6449
6461
  */
6450
6462
 
6451
- var hasRequiredDist$1;
6463
+ var hasRequiredDist;
6452
6464
 
6453
- function requireDist$1 () {
6454
- if (hasRequiredDist$1) return dist$1;
6455
- hasRequiredDist$1 = 1;
6465
+ function requireDist () {
6466
+ if (hasRequiredDist) return dist;
6467
+ hasRequiredDist = 1;
6456
6468
 
6457
6469
  var deepmerge$1 = deepmerge;
6458
6470
  var utilsTools = require$$1;
@@ -7375,13 +7387,13 @@ function requireDist$1 () {
7375
7387
  return Ptz;
7376
7388
  }(BasePtz);
7377
7389
 
7378
- dist$1.BasePtz = BasePtz;
7379
- dist$1.MobilePtz = MobilePtz;
7380
- dist$1.Ptz = Ptz;
7381
- return dist$1;
7390
+ dist.BasePtz = BasePtz;
7391
+ dist.MobilePtz = MobilePtz;
7392
+ dist.Ptz = Ptz;
7393
+ return dist;
7382
7394
  }
7383
7395
 
7384
- var distExports$1 = requireDist$1();
7396
+ var distExports = requireDist();
7385
7397
 
7386
7398
  function _defineProperties$4(target, props) {
7387
7399
  for(var i = 0; i < props.length; i++){
@@ -7480,7 +7492,7 @@ function _set_prototype_of$c(o, p) {
7480
7492
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
7481
7493
  this.$panel.appendChild(this.$turntable);
7482
7494
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7483
- this._ptzControl = new distExports$1.Ptz(this.$turntable, _extends$b({}, this._options, {
7495
+ this._ptzControl = new distExports.Ptz(this.$turntable, _extends$b({}, this._options, {
7484
7496
  onSpeedChange: this._onSpeedChange.bind(this),
7485
7497
  onDirection: this._onDirection.bind(this)
7486
7498
  }));
@@ -7489,7 +7501,7 @@ function _set_prototype_of$c(o, p) {
7489
7501
  };
7490
7502
  _proto.renderMobileExtend = function renderMobileExtend($container) {
7491
7503
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7492
- if (!this._ptzControl1) this._ptzControl1 = new distExports$1.MobilePtz($container, _extends$b({}, this._options, {
7504
+ if (!this._ptzControl1) this._ptzControl1 = new distExports.MobilePtz($container, _extends$b({}, this._options, {
7493
7505
  onSpeedChange: this._onSpeedChange.bind(this),
7494
7506
  onDirection: this._onDirection.bind(this)
7495
7507
  }));
@@ -8532,9 +8544,7 @@ var SUPPORT_SPEED = [
8532
8544
  0.5,
8533
8545
  1,
8534
8546
  2,
8535
- 4,
8536
- 8,
8537
- 16
8547
+ 4
8538
8548
  ]; // 8, 16
8539
8549
  var SPEED_DEFAULT_OPTIONS = {
8540
8550
  /**
@@ -8594,541 +8604,6 @@ var SPEED_DEFAULT_OPTIONS = {
8594
8604
  return Speed;
8595
8605
  }(Select);
8596
8606
 
8597
- /*
8598
- * @ezuikit/control-date-picker v0.0.1-alpha.2
8599
- * Copyright (c) 2025-11-12 Ezviz-OpenBiz
8600
- * Released under the MIT License.
8601
- */
8602
-
8603
- var dist;
8604
- var hasRequiredDist;
8605
-
8606
- function requireDist () {
8607
- if (hasRequiredDist) return dist;
8608
- hasRequiredDist = 1;
8609
-
8610
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
8611
- try {
8612
- var info = gen[key](arg);
8613
- var value = info.value;
8614
- } catch (error) {
8615
- reject(error);
8616
- return;
8617
- }
8618
- if (info.done) {
8619
- resolve(value);
8620
- } else {
8621
- Promise.resolve(value).then(_next, _throw);
8622
- }
8623
- }
8624
- function _async_to_generator(fn) {
8625
- return function() {
8626
- var self = this, args = arguments;
8627
- return new Promise(function(resolve, reject) {
8628
- var gen = fn.apply(self, args);
8629
- function _next(value) {
8630
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
8631
- }
8632
- function _throw(err) {
8633
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
8634
- }
8635
- _next(undefined);
8636
- });
8637
- };
8638
- }
8639
- function _ts_generator(thisArg, body) {
8640
- var f, y, t, _ = {
8641
- label: 0,
8642
- sent: function() {
8643
- if (t[0] & 1) throw t[1];
8644
- return t[1];
8645
- },
8646
- trys: [],
8647
- ops: []
8648
- }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
8649
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
8650
- return this;
8651
- }), g;
8652
- function verb(n) {
8653
- return function(v) {
8654
- return step([
8655
- n,
8656
- v
8657
- ]);
8658
- };
8659
- }
8660
- function step(op) {
8661
- if (f) throw new TypeError("Generator is already executing.");
8662
- while(g && (g = 0, op[0] && (_ = 0)), _)try {
8663
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
8664
- if (y = 0, t) op = [
8665
- op[0] & 2,
8666
- t.value
8667
- ];
8668
- switch(op[0]){
8669
- case 0:
8670
- case 1:
8671
- t = op;
8672
- break;
8673
- case 4:
8674
- _.label++;
8675
- return {
8676
- value: op[1],
8677
- done: false
8678
- };
8679
- case 5:
8680
- _.label++;
8681
- y = op[1];
8682
- op = [
8683
- 0
8684
- ];
8685
- continue;
8686
- case 7:
8687
- op = _.ops.pop();
8688
- _.trys.pop();
8689
- continue;
8690
- default:
8691
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
8692
- _ = 0;
8693
- continue;
8694
- }
8695
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
8696
- _.label = op[1];
8697
- break;
8698
- }
8699
- if (op[0] === 6 && _.label < t[1]) {
8700
- _.label = t[1];
8701
- t = op;
8702
- break;
8703
- }
8704
- if (t && _.label < t[2]) {
8705
- _.label = t[2];
8706
- _.ops.push(op);
8707
- break;
8708
- }
8709
- if (t[2]) _.ops.pop();
8710
- _.trys.pop();
8711
- continue;
8712
- }
8713
- op = body.call(thisArg, _);
8714
- } catch (e) {
8715
- op = [
8716
- 6,
8717
- e
8718
- ];
8719
- y = 0;
8720
- } finally{
8721
- f = t = 0;
8722
- }
8723
- if (op[0] & 5) throw op[1];
8724
- return {
8725
- value: op[0] ? op[1] : void 0,
8726
- done: true
8727
- };
8728
- }
8729
- }
8730
- var AppendJS = /*#__PURE__*/ function() {
8731
- function AppendJS() {}
8732
- AppendJS.loadScript = function loadScript(src) {
8733
- return _async_to_generator(function() {
8734
- return _ts_generator(this, function(_state) {
8735
- switch(_state.label){
8736
- case 0:
8737
- return [
8738
- 4,
8739
- new Promise(function(resolve, reject) {
8740
- if (AppendJS.LoadedScr.includes(src)) {
8741
- return resolve(src);
8742
- }
8743
- if (AppendJS.LoadingScrQueue[src]) {
8744
- return AppendJS.LoadingScrQueue[src].push(resolve);
8745
- } else {
8746
- AppendJS.LoadingScrQueue[src] = [
8747
- resolve
8748
- ];
8749
- }
8750
- var link;
8751
- if (src.includes('.js')) {
8752
- link = document.createElement('script');
8753
- link.src = src;
8754
- link.async = true;
8755
- } else if (src.includes('.css')) {
8756
- link = document.createElement('link');
8757
- link.rel = 'stylesheet';
8758
- link.href = src;
8759
- }
8760
- link.onload = function() {
8761
- AppendJS.LoadedScr.push(src);
8762
- AppendJS.LoadingScrQueue[src].forEach(function(resolve) {
8763
- return resolve(src);
8764
- });
8765
- AppendJS.LoadingScrQueue[src] = [];
8766
- };
8767
- link.onerror = function() {
8768
- return reject(new Error('Failed to load ' + src));
8769
- };
8770
- document.head.appendChild(link);
8771
- })
8772
- ];
8773
- case 1:
8774
- return [
8775
- 2,
8776
- _state.sent()
8777
- ];
8778
- }
8779
- });
8780
- })();
8781
- };
8782
- AppendJS.loadScriptsBatch = function loadScriptsBatch(srcArr) {
8783
- return _async_to_generator(function() {
8784
- return _ts_generator(this, function(_state) {
8785
- switch(_state.label){
8786
- case 0:
8787
- return [
8788
- 4,
8789
- Promise.all(srcArr.map(AppendJS.loadScript))
8790
- ];
8791
- case 1:
8792
- return [
8793
- 2,
8794
- _state.sent()
8795
- ];
8796
- }
8797
- });
8798
- })();
8799
- };
8800
- AppendJS.remove = function remove(src) {
8801
- src.forEach(function(item) {
8802
- var link = document.querySelector('script[src="' + item + '"]') || document.querySelector('link[href="' + item + '"]');
8803
- if (link) {
8804
- link.remove();
8805
- }
8806
- });
8807
- };
8808
- AppendJS.clear = function clear() {
8809
- AppendJS.remove(AppendJS.LoadedScr);
8810
- };
8811
- return AppendJS;
8812
- }();
8813
- /** 已经加载完的js/css */ AppendJS.LoadedScr = [];
8814
- /** 正在加载的js/css */ AppendJS.LoadingScrQueue = {};
8815
-
8816
- function _defineProperties(target, props) {
8817
- for(var i = 0; i < props.length; i++){
8818
- var descriptor = props[i];
8819
- descriptor.enumerable = descriptor.enumerable || false;
8820
- descriptor.configurable = true;
8821
- if ("value" in descriptor) descriptor.writable = true;
8822
- Object.defineProperty(target, descriptor.key, descriptor);
8823
- }
8824
- }
8825
- function _create_class(Constructor, protoProps, staticProps) {
8826
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
8827
- return Constructor;
8828
- }
8829
- var DEFAULT_OPTIONS = {
8830
- staticPath: '.',
8831
- place: 'top-right',
8832
- language: 'zh-CN',
8833
- current: new Date(),
8834
- maxDate: new Date()
8835
- };
8836
- /**
8837
- * 日期选择器
8838
- */ var DatePicker = /*#__PURE__*/ function() {
8839
- function DatePicker(container, options) {
8840
- var _this = this;
8841
- this._open = false;
8842
- this._change = true;
8843
- this.$container = container;
8844
- this.options = Object.assign({}, DEFAULT_OPTIONS, options);
8845
- this.options.staticPath = (this.options.staticPath || '').replace(/\/$/, '');
8846
- if (this.options.current) {
8847
- this._date = this.options.current;
8848
- }
8849
- this._init();
8850
- this.$container.addEventListener('click', function() {
8851
- if (_this._open) _this.hide();
8852
- else _this.show();
8853
- });
8854
- document.body.addEventListener('click', function(e) {
8855
- if (!_this.$container.contains(e.target)) {
8856
- _this.hide();
8857
- }
8858
- });
8859
- }
8860
- var _proto = DatePicker.prototype;
8861
- _proto._init = function _init() {
8862
- var _this = this;
8863
- // 因为挂载在行内,需要父标签设置 position: relative;
8864
- this.$container.style.cssText += ";position: relative;";
8865
- this.$container.classList.add("datepicker-inline-" + this.options.place);
8866
- AppendJS.loadScriptsBatch([
8867
- "" + this.options.staticPath + "/rec/jquery.min.js",
8868
- "" + this.options.staticPath + "/rec/datepicker.min.css"
8869
- ]).then(function() {
8870
- AppendJS.loadScriptsBatch([
8871
- "" + _this.options.staticPath + "/rec/datepicker.js"
8872
- ]).then(function() {
8873
- AppendJS.loadScriptsBatch([
8874
- "" + _this.options.staticPath + "/rec/datepicker.zh-CN.js",
8875
- "" + _this.options.staticPath + "/rec/datepicker.en-US.js"
8876
- ]).then(function() {
8877
- window.$(_this.$container).datepicker({
8878
- date: _this.options.current,
8879
- language: _this.options.language,
8880
- endDate: _this.options.maxDate,
8881
- inline: true
8882
- });
8883
- _this.hide();
8884
- window.$(_this.$container).on('pick.datepicker', function(e) {
8885
- var _this__date, _this__date1, _this__date2, _this__date3, _this__date4, _this__date5;
8886
- if (e.view === 'year' && ((_this__date = _this._date) == null ? void 0 : _this__date.getFullYear()) !== e.date.getFullYear()) {
8887
- _this.options.onYearChange == null ? void 0 : _this.options.onYearChange.call(_this.options, e.date);
8888
- } else if (e.view === 'month' && (((_this__date1 = _this._date) == null ? void 0 : _this__date1.getMonth()) !== e.date.getMonth() || ((_this__date2 = _this._date) == null ? void 0 : _this__date2.getFullYear()) !== e.date.getFullYear())) {
8889
- _this.options.onMonthChange == null ? void 0 : _this.options.onMonthChange.call(_this.options, e.date);
8890
- } else if ([
8891
- 'day',
8892
- 'pick'
8893
- ].includes(e.view || e.type) && (((_this__date3 = _this._date) == null ? void 0 : _this__date3.getDate()) !== e.date.getDate() || ((_this__date4 = _this._date) == null ? void 0 : _this__date4.getMonth()) !== e.date.getMonth() || ((_this__date5 = _this._date) == null ? void 0 : _this__date5.getFullYear()) !== e.date.getFullYear())) {
8894
- if (_this._change) {
8895
- _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, e.date);
8896
- }
8897
- _this._date = new Date(e.date.getTime());
8898
- }
8899
- if (e.view === 'day') _this.hide();
8900
- _this._change = true;
8901
- });
8902
- });
8903
- });
8904
- });
8905
- };
8906
- /**
8907
- * 设置日期, change = true 时触发 onChange 事件
8908
- *
8909
- * @param date 设置的日期
8910
- * @param change 是否触发 onChange 事件
8911
- */ _proto.setDate = function setDate(date, change) {
8912
- if (change === void 0) change = true;
8913
- var $datepicker = this.$container.querySelector(".datepicker-inline");
8914
- if ($datepicker) {
8915
- this._change = change;
8916
- window.$(this.$container).datepicker('setDate', date);
8917
- }
8918
- };
8919
- /**
8920
- * 隐藏面板, 会触发 onPanelChange 事件
8921
- */ _proto.hide = function hide() {
8922
- var $datepicker = this.$container.querySelector(".datepicker-inline");
8923
- if ($datepicker) {
8924
- if (this._open) {
8925
- this._open = false;
8926
- this.options.onPanelChange == null ? void 0 : this.options.onPanelChange.call(this.options, false, this._date);
8927
- }
8928
- $datepicker.classList.add('datepicker-hide');
8929
- }
8930
- };
8931
- /**
8932
- * 显示面板, 会触发 onPanelChange 事件
8933
- */ _proto.show = function show() {
8934
- var $datepicker = this.$container.querySelector(".datepicker-inline");
8935
- if ($datepicker) {
8936
- var _window_$_datepicker, _window_$;
8937
- if (!this._open) {
8938
- this._open = true;
8939
- this.options.onPanelChange == null ? void 0 : this.options.onPanelChange.call(this.options, true, this._date);
8940
- }
8941
- if (this._date) this.setDate(this._date, false);
8942
- (_window_$_datepicker = (_window_$ = window.$(this.$container)).datepicker) == null ? void 0 : _window_$_datepicker.call(_window_$, 'showView');
8943
- if (this.options.place === 'bottom-left') {
8944
- $datepicker.style.cssText += "top: " + (this.$container.clientHeight + 10) + "px; bottom: auto; right: auto; left: 0px";
8945
- } else {
8946
- $datepicker.style.cssText += "bottom: " + (this.$container.clientHeight + 10) + "px; top: auto";
8947
- }
8948
- $datepicker.classList.remove('datepicker-hide');
8949
- }
8950
- };
8951
- /**
8952
- * 销毁
8953
- */ _proto.destroy = function destroy() {
8954
- this.hide();
8955
- this._date = undefined;
8956
- window.$(this.$container).datepicker('destroy');
8957
- // AppendJS.remove([
8958
- // `${this.options.staticPath}/rec/jquery.min.js`,
8959
- // `${this.options.staticPath}/rec/datepicker.min.css`,
8960
- // `${this.options.staticPath}/rec/datepicker.js`,
8961
- // `${this.options.staticPath}/rec/datepicker.zh-CN.js`,
8962
- // `${this.options.staticPath}/rec/datepicker.en-US.js`,
8963
- // ]);
8964
- };
8965
- _create_class(DatePicker, [
8966
- {
8967
- key: "date",
8968
- get: /**
8969
- * 获取日期
8970
- */ function get() {
8971
- return this._date;
8972
- }
8973
- }
8974
- ]);
8975
- return DatePicker;
8976
- }();
8977
-
8978
- dist = DatePicker;
8979
- return dist;
8980
- }
8981
-
8982
- var distExports = requireDist();
8983
- var DatePickerUtil = /*@__PURE__*/getDefaultExportFromCjs(distExports);
8984
-
8985
- /**
8986
- * @description 时间操作
8987
- */ var DateTime = /*#__PURE__*/ function() {
8988
- function DateTime() {}
8989
- /**
8990
- * @description 时间格式化
8991
- * @param {Date | number | string} date
8992
- * @param {string} formatType 格式 'YYYY-MM-DD hh:mm:ss' 或 'YYYYMMDDhhmmss' 或 'YYYY/MM/DD hh:mm:ss' 或 'hh:mm:ss' 或 'YYYYMMDDThhmmssZ'
8993
- * @param {number} timeZone 时区偏移量 默认 0
8994
- */ DateTime.formate = function formate(date, formatType, timeZone) {
8995
- if (timeZone === void 0) timeZone = 0;
8996
- var dateTime = date;
8997
- if (typeof date === 'string') {
8998
- dateTime = DateTime.strToDate(date);
8999
- } else if (typeof date === 'number') {
9000
- dateTime = new Date(date);
9001
- }
9002
- dateTime = new Date(dateTime.getTime() - timeZone * 3600 * 1000);
9003
- var year = dateTime.getFullYear();
9004
- var month = String(dateTime.getMonth() + 1).padStart(2, '0');
9005
- var day = String(dateTime.getDate()).padStart(2, '0');
9006
- var hours = String(dateTime.getHours()).padStart(2, '0');
9007
- var minutes = String(dateTime.getMinutes()).padStart(2, '0');
9008
- var seconds = String(dateTime.getSeconds()).padStart(2, '0');
9009
- switch(formatType){
9010
- case 'YYYY-MM-DD hh:mm:ss':
9011
- return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
9012
- case 'YYYYMMDDhhmmss':
9013
- return "" + year + month + day + hours + minutes + seconds;
9014
- case 'YYYY/MM/DD hh:mm:ss':
9015
- return year + "/" + month + "/" + day + " " + hours + ":" + minutes + ":" + seconds;
9016
- case 'YYYYMMDDThhmmssZ':
9017
- return "" + year + month + day + "T" + hours + minutes + seconds + "Z";
9018
- case 'YYYY/MM/DD':
9019
- return year + "/" + month + "/" + day;
9020
- case 'YYYYMMDD':
9021
- return "" + year + month + day;
9022
- case 'YYYY-MM-DD':
9023
- return year + "-" + month + "-" + day;
9024
- case 'YYYY':
9025
- return "" + year;
9026
- case 'MM':
9027
- return "" + month;
9028
- case 'DD':
9029
- return "" + day;
9030
- case 'hh:mm:ss':
9031
- return hours + ":" + minutes + ":" + seconds;
9032
- case 'hh':
9033
- return "" + hours;
9034
- case 'mm':
9035
- return "" + minutes;
9036
- case 'ss':
9037
- return "" + seconds;
9038
- default:
9039
- throw new Error('Unsupported format type');
9040
- }
9041
- };
9042
- /**
9043
- * @description 对比两个时间的差值
9044
- * @param {Date | string | number} date1
9045
- * @param {Date | string | number} date2
9046
- * @param {"year" | "month" | "day" | "hour" | "minute" | "second"} diffType
9047
- */ DateTime.diff = function diff(date1, date2, diffType) {
9048
- /** @type {Date} */ var dateTime1 = date1;
9049
- if (typeof date1 === 'string') {
9050
- dateTime1 = DateTime.strToDate(date1);
9051
- } else if (typeof date1 === 'number') {
9052
- dateTime1 = new Date(date1);
9053
- }
9054
- /** @type {Date} */ var dateTime2 = date2;
9055
- if (typeof date2 === 'string') {
9056
- dateTime1 = DateTime.strToDate(date2);
9057
- } else if (typeof date2 === 'number') {
9058
- dateTime1 = new Date(date2);
9059
- }
9060
- var diffSecond = dateTime1.getTime() - dateTime2.getTime();
9061
- // diff
9062
- switch(diffType){
9063
- case 'year':
9064
- return dateTime1.getFullYear() - dateTime2.getFullYear();
9065
- case 'month':
9066
- // 计算总月份差
9067
- // eslint-disable-next-line no-case-declarations
9068
- var months = (dateTime1.getFullYear() - dateTime2.getFullYear()) * 12 + (dateTime1.getMonth() - dateTime2.getMonth());
9069
- // 如果结束日的日期小于开始日的日期,则减去一个月
9070
- if (dateTime1.getDate() < dateTime2.getDate()) {
9071
- months--;
9072
- }
9073
- return months;
9074
- case 'day':
9075
- return diffSecond / 60 / 60 / 24;
9076
- case 'hour':
9077
- return diffSecond / 60 / 60;
9078
- case 'minute':
9079
- return diffSecond / 60;
9080
- case 'second':
9081
- return diffSecond;
9082
- default:
9083
- throw new Error('Unsupported diff type');
9084
- }
9085
- };
9086
- DateTime.now = function now() {
9087
- return Date.now();
9088
- };
9089
- /**
9090
- *
9091
- * @param {string} str 日期, 2025-04-10 10:10:10 或 2025/04/10 10:10:10 或 20250410101010 或 20250410T101010Z 或 秒 或 毫秒
9092
- * @example
9093
- * DateTime.strToDate("2025/04/10 10:10:10") // Date
9094
- * DateTime.strToDate("2025-04-10 10:10:10") // Date
9095
- * DateTime.strToDate("20250410101010") // Date
9096
- * DateTime.strToDate("20250410T101010Z") // Date
9097
- */ DateTime.strToDate = function strToDate(str) {
9098
- var time = (str + '').replace(/-/gi, '').replace(/:/gi, '').replace(/\//gi, '').replace(/ /gi, '').replace(/T|Z/gi, '');
9099
- // 兼容
9100
- if ((str + '').length === 10) {
9101
- // 时间戳 秒
9102
- return new Date(+str);
9103
- } else if ((str + '').length === 13) {
9104
- // 时间戳 毫秒
9105
- return new Date(+str);
9106
- }
9107
- var year = time.slice(0, 4);
9108
- var month = time.slice(4, 6);
9109
- var day = time.slice(6, 8);
9110
- var hour = time.slice(8, 10);
9111
- var minute = time.slice(10, 12);
9112
- var second = time.slice(12, 14);
9113
- return new Date(year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' + second);
9114
- };
9115
- /**
9116
- * @description 补充十位
9117
- * @param {number} num
9118
- * @returns {string}
9119
- * @example
9120
- * DateTime.padStart(1) // "01"
9121
- * DateTime.padStart(33) // "33"
9122
- */ DateTime.padStart = function padStart(num) {
9123
- if (num < 10) {
9124
- return '0' + num;
9125
- } else {
9126
- return num + '';
9127
- }
9128
- };
9129
- return DateTime;
9130
- }();
9131
-
9132
8607
  function _extends$5() {
9133
8608
  _extends$5 = Object.assign || function(target) {
9134
8609
  for(var i = 1; i < arguments.length; i++){
@@ -9171,20 +8646,29 @@ function _set_prototype_of$6(o, p) {
9171
8646
  function DatePickerControl(options) {
9172
8647
  var _this;
9173
8648
  var _this_options_props_urlInfo_searchParams, _this_options_props_urlInfo, _this_options_props;
9174
- _this = Control.call(this, _extends$5({}, options, {
8649
+ _this = Control.call(this, _extends$5({
8650
+ maxDate: new Date()
8651
+ }, options, {
9175
8652
  tagName: 'span',
9176
8653
  controlType: 'button',
9177
8654
  classNameSuffix: 'date'
9178
8655
  })) || this;
9179
8656
  _this.options = options;
9180
- _this._value = DateTime.formate(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || new Date(), 'YYYY-MM-DD');
8657
+ _this._value = require$$1.DateTime.format(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || new Date(), 'YYYY-MM-DD');
9181
8658
  _this._render();
8659
+ // 日期上的点
8660
+ _this.on(EVENTS.control.dateMonthChange, function(dates) {
8661
+ var _this_datePicker_updateBadges, _this_datePicker;
8662
+ (_this_datePicker = _this.datePicker) == null ? void 0 : (_this_datePicker_updateBadges = _this_datePicker.updateBadges) == null ? void 0 : _this_datePicker_updateBadges.call(_this_datePicker, dates);
8663
+ });
9182
8664
  return _this;
9183
8665
  }
9184
8666
  var _proto = DatePickerControl.prototype;
9185
8667
  _proto._render = function _render() {
9186
8668
  var _this = this;
9187
- if (require$$1.isMobile()) {
8669
+ var _this_options_props;
8670
+ var isMobile1 = require$$1.isMobile();
8671
+ if (isMobile1) {
9188
8672
  var _this_locale;
9189
8673
  this.$container.innerHTML = '\n <span class="' + PREFIX_CLASS + '-mobile-date-filter" title="' + (((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_CALENDAR) || '') + '">\n <span class="' + PREFIX_CLASS + '-mobile-date-filter-value">' + this._getDateStr() + "</span>\n " + IconComponents.filter() + "\n <span>";
9190
8674
  } else {
@@ -9193,25 +8677,45 @@ function _set_prototype_of$6(o, p) {
9193
8677
  title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_CALENDAR
9194
8678
  });
9195
8679
  }
9196
- this.dataPickerUtil = new DatePickerUtil(this.$container, {
9197
- staticPath: this.options.staticPath,
9198
- language: this.options.language === 'zh' ? 'zh-CN' : 'en-US',
8680
+ this.datePicker = new controlDatePicker.DatePicker(this.$container, {
8681
+ isMobile: isMobile1,
8682
+ getPopupContainer: function() {
8683
+ return _this.$container;
8684
+ },
8685
+ mode: 'date',
8686
+ offset: [
8687
+ 0,
8688
+ -10
8689
+ ],
8690
+ badges: ((_this_options_props = this.options.props) == null ? void 0 : _this_options_props.recMonth) || [],
8691
+ language: this.options.language === 'zh' ? 'zh' : 'en',
9199
8692
  current: new Date(this._value + ' 00:00:00'),
9200
- maxDate: this.options.maxDate || new Date(),
9201
- place: require$$1.isMobile() ? 'bottom-left' : 'top-right',
9202
- onChange: function(date) {
9203
- if (date && _this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
9204
- _this._value = DateTime.formate(date, 'YYYY-MM-DD');
9205
- _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
8693
+ placement: 'tr',
8694
+ triggerClose: true,
8695
+ disabledDate: function(date) {
8696
+ return date.getTime() > (_this.options.maxDate || new Date()).getTime();
8697
+ },
8698
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8699
+ onOk: function(date, _mode) {
8700
+ if (date && _this._value !== require$$1.DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
8701
+ _this._value = require$$1.DateTime.format(date, 'YYYY-MM-DD');
8702
+ _this.options.onOk == null ? void 0 : _this.options.onOk.call(_this.options, date);
9206
8703
  _this.emit(EVENTS.control.dateChange, date);
9207
8704
  if (date && _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
9208
8705
  _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = _this._getDateStr();
9209
8706
  }
9210
8707
  }
9211
8708
  },
9212
- onPanelChange: function(open, date) {
9213
- _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, date);
9214
- _this.emit(EVENTS.control.datePanelOpenChange, open, date);
8709
+ onChange: function(date, mode) {
8710
+ if (date && _this._value !== require$$1.DateTime.format(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
8711
+ _this._value = require$$1.DateTime.format(date, 'YYYY-MM-DD');
8712
+ _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
8713
+ _this.emit(EVENTS.control.dateChange, date);
8714
+ }
8715
+ },
8716
+ onOpenChange: function(open) {
8717
+ _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.datePicker.current);
8718
+ _this.emit(EVENTS.control.datePanelOpenChange, open, _this.datePicker.current);
9215
8719
  }
9216
8720
  });
9217
8721
  };
@@ -9221,28 +8725,27 @@ function _set_prototype_of$6(o, p) {
9221
8725
  * @param change 是否触发 onChange 事件
9222
8726
  */ _proto.setDate = function setDate(date, change) {
9223
8727
  if (change === void 0) change = true;
9224
- var _this_dataPickerUtil;
9225
- (_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.setDate(date, change);
9226
- if (date && !change && this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
9227
- this._value = DateTime.formate(date, 'YYYY-MM-DD');
8728
+ var _this_datePicker;
8729
+ (_this_datePicker = this.datePicker) == null ? void 0 : _this_datePicker.setCurrent(date, change);
8730
+ if (date && !change && this._value !== require$$1.DateTime.format(date, 'YYYY-MM-DD')) {
8731
+ this._value = require$$1.DateTime.format(date, 'YYYY-MM-DD');
9228
8732
  if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
9229
8733
  this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = this._getDateStr();
9230
8734
  }
9231
8735
  }
9232
8736
  };
9233
8737
  _proto.reset = function reset() {
9234
- var _this_dataPickerUtil;
9235
- (_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
8738
+ if (this.datePicker) this.datePicker.open = false;
9236
8739
  Control.prototype.reset.call(this);
9237
8740
  };
9238
8741
  /**
9239
8742
  * 销毁控件
9240
8743
  * @override
9241
8744
  */ _proto.destroy = function destroy() {
9242
- if (this.dataPickerUtil) {
9243
- this.dataPickerUtil.destroy();
8745
+ if (this.datePicker) {
8746
+ this.datePicker.destroy();
9244
8747
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9245
- this.dataPickerUtil = null;
8748
+ this.datePicker = null;
9246
8749
  }
9247
8750
  Control.prototype.destroy.call(this);
9248
8751
  };
@@ -9252,6 +8755,7 @@ function _set_prototype_of$6(o, p) {
9252
8755
  };
9253
8756
  /**
9254
8757
  * 点击 Control 会触发
8758
+ * @overload super._onControlClick(e: Event)
9255
8759
  */ _proto._onControlClick = function _onControlClick(e) {
9256
8760
  Control.prototype._onControlClick.call(this, e);
9257
8761
  };
@@ -10324,8 +9828,7 @@ var _renderDatePicker = function(theme, container, props) {
10324
9828
  return container;
10325
9829
  },
10326
9830
  language: theme.options.language,
10327
- locales: theme.i18n.translations,
10328
- staticPath: theme.options.staticPath
9831
+ locales: theme.i18n.translations
10329
9832
  }, ((_theme_options = theme.options) == null ? void 0 : _theme_options["dateOptions"]) || {}, {
10330
9833
  props: props
10331
9834
  }));
@@ -10624,7 +10127,18 @@ var THEME_DEFAULT_OPTIONS = {
10624
10127
  */ _this._footerMoreControl = null, /** 头部控件 @since 0.0.1 @private */ _this._header = null, /** 低部控件 @since 0.0.1 @private */ _this._footer = null, /** 回放底部时间轴 @since 0.0.1 @private */ _this._recFooter = null, /**
10625
10128
  * 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
10626
10129
  * @private
10627
- */ _this._mobileExtend = null, /** @since 0.0.1 @private */ _this._interactiveResult = null, /** @since 0.0.1 @private */ _this._themeData = null, _this._fullscreen = null, _this.zoomUtil = null, /** 清除屏幕旋转 */ _this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ _this._cleanUpResizeObserver = null, /** 容器的宽 */ _this._width = 0, /** 容器的高 */ _this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ _this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ _this._orientationAngle = 0, /** 是否播放中 @private */ _this._playing = false, /** 加载中 */ _this._loading = false, /** 音量 */ _this._volume = 0, /** 静音 */ _this._muted = false, /** 电子放大倍数 @private */ _this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ _this._zooming = false, /** 录制中 @private */ _this._recording = false, /** 对讲中 @private */ _this._talking = false, /** 倍速 @private */ _this._speed = 1, /** 自定清晰度 @private */ _this._videoLevelAuto = false, /** 清晰度列表 */ _this.videoLevelList = [], /** 回放片段列表 */ _this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ _this._resizeOverflowTimer = null, /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, /** 播放地址信息 */ _this.urlInfo = null, _this.scaleMode = 0;
10130
+ */ _this._mobileExtend = null, /** @since 0.0.1 @private */ _this._interactiveResult = null, /** @since 0.0.1 @private */ _this._themeData = null, _this._fullscreen = null, _this.zoomUtil = null, /** 清除屏幕旋转 */ _this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ _this._cleanUpResizeObserver = null, /** 容器的宽 */ _this._width = 0, /** 容器的高 */ _this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ _this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ _this._orientationAngle = 0, /** 是否播放中 @private */ _this._playing = false, /** 加载中 */ _this._loading = false, /** 音量 */ _this._volume = 0, /** 静音 */ _this._muted = false, /** 电子放大倍数 @private */ _this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ _this._zooming = false, /** 录制中 @private */ _this._recording = false, /** 对讲中 @private */ _this._talking = false, /** 倍速 @private */ _this._speed = 1, /** 自定清晰度 @private */ _this._videoLevelAuto = false, /** 清晰度列表 */ _this.videoLevelList = [], /** 回放片段列表 */ _this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ _this._resizeOverflowTimer = null, // /**
10131
+ // * 记录回放的月份
10132
+ // *
10133
+ // * key: {序列号}_{通道号}_{rec | cloud | cloudRecord} 比如:BC7799091_1_rec BC7799091_1_cloud BC7799091_1_cloudRecord
10134
+ // *
10135
+ // * value: 月份列表 比如 ["2025-12-01", "2025-12-02"]
10136
+ // * @private
10137
+ // */
10138
+ // _recMonthObj: Record<string, string[]> = {};
10139
+ /**
10140
+ * 录像回放的月份列表 @private
10141
+ */ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, /** 播放地址信息 */ _this.urlInfo = null, _this.scaleMode = 0;
10628
10142
  _this._initOptions(options);
10629
10143
  if (_this.options.type === 'ezopen') {
10630
10144
  var _this_urlInfo_searchParams, _this_urlInfo;
@@ -10634,7 +10148,7 @@ var THEME_DEFAULT_OPTIONS = {
10634
10148
  }
10635
10149
  if (_this.urlInfo.type === 'rec') {
10636
10150
  var _this_urlInfo_searchParams1, _this_urlInfo1, _this_urlInfo_searchParams2, _this_urlInfo2;
10637
- _this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? DateTime.strToDate((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo2.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.begin) : DateTime.strToDate(DateTime.formate(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
10151
+ _this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? require$$1.DateTime.toDate((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo2.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.begin) : require$$1.DateTime.toDate(require$$1.DateTime.format(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
10638
10152
  }
10639
10153
  }
10640
10154
  _this._getRecType(_this.options.url);
@@ -10881,6 +10395,7 @@ var THEME_DEFAULT_OPTIONS = {
10881
10395
  this._themeData = null;
10882
10396
  if (this.i18n) this.i18n = null;
10883
10397
  this.recType = '';
10398
+ this.recMonth = []; // 清空数据
10884
10399
  this.emit(EVENTS.theme.destroyed);
10885
10400
  this.removeAllListeners();
10886
10401
  if (this.logger) this.logger = null;
@@ -11846,7 +11361,7 @@ var THEME_DEFAULT_OPTIONS = {
11846
11361
  zh: zh,
11847
11362
  en: en
11848
11363
  };
11849
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.1';
11364
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.3';
11850
11365
 
11851
11366
  exports.Control = Control;
11852
11367
  exports.Fullscreen = Fullscreen;