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