@ezuikit/player-theme 2.0.0-beta.6 → 2.0.1-beta.2

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,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.0.0-beta.6
3
- * Copyright (c) 2025-11-18 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.0.1-beta.2
3
+ * Copyright (c) 2025-12-03 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import EventEmitter from 'eventemitter3';
@@ -11,6 +11,7 @@ import require$$1, { isMobile, 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
  /**
@@ -4646,12 +4647,12 @@ function getDefaultExportFromCjs (x) {
4646
4647
  * Released under the MIT License.
4647
4648
  */
4648
4649
 
4649
- var dist$2;
4650
- var hasRequiredDist$2;
4650
+ var dist$1;
4651
+ var hasRequiredDist$1;
4651
4652
 
4652
- function requireDist$2 () {
4653
- if (hasRequiredDist$2) return dist$2;
4654
- hasRequiredDist$2 = 1;
4653
+ function requireDist$1 () {
4654
+ if (hasRequiredDist$1) return dist$1;
4655
+ hasRequiredDist$1 = 1;
4655
4656
 
4656
4657
  /**
4657
4658
  * Zoom position
@@ -5358,12 +5359,12 @@ function requireDist$2 () {
5358
5359
  }();
5359
5360
  Zoom.VERSION = '0.0.2';
5360
5361
 
5361
- dist$2 = Zoom;
5362
- return dist$2;
5362
+ dist$1 = Zoom;
5363
+ return dist$1;
5363
5364
  }
5364
5365
 
5365
- var distExports$2 = requireDist$2();
5366
- var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$2);
5366
+ var distExports$1 = requireDist$1();
5367
+ var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
5367
5368
 
5368
5369
  function _extends$h() {
5369
5370
  _extends$h = Object.assign || function(target) {
@@ -6438,7 +6439,7 @@ function _set_prototype_of$d(o, p) {
6438
6439
  return CapturePicture;
6439
6440
  }(Control);
6440
6441
 
6441
- var dist$1 = {};
6442
+ var dist = {};
6442
6443
 
6443
6444
  /*
6444
6445
  * @ezuikit/control-ptz v0.0.1
@@ -6446,11 +6447,11 @@ var dist$1 = {};
6446
6447
  * Released under the MIT License.
6447
6448
  */
6448
6449
 
6449
- var hasRequiredDist$1;
6450
+ var hasRequiredDist;
6450
6451
 
6451
- function requireDist$1 () {
6452
- if (hasRequiredDist$1) return dist$1;
6453
- hasRequiredDist$1 = 1;
6452
+ function requireDist () {
6453
+ if (hasRequiredDist) return dist;
6454
+ hasRequiredDist = 1;
6454
6455
 
6455
6456
  var deepmerge$1 = deepmerge;
6456
6457
  var utilsTools = require$$1;
@@ -7373,13 +7374,13 @@ function requireDist$1 () {
7373
7374
  return Ptz;
7374
7375
  }(BasePtz);
7375
7376
 
7376
- dist$1.BasePtz = BasePtz;
7377
- dist$1.MobilePtz = MobilePtz;
7378
- dist$1.Ptz = Ptz;
7379
- return dist$1;
7377
+ dist.BasePtz = BasePtz;
7378
+ dist.MobilePtz = MobilePtz;
7379
+ dist.Ptz = Ptz;
7380
+ return dist;
7380
7381
  }
7381
7382
 
7382
- var distExports$1 = requireDist$1();
7383
+ var distExports = requireDist();
7383
7384
 
7384
7385
  function _defineProperties$4(target, props) {
7385
7386
  for(var i = 0; i < props.length; i++){
@@ -7478,7 +7479,7 @@ function _set_prototype_of$c(o, p) {
7478
7479
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
7479
7480
  this.$panel.appendChild(this.$turntable);
7480
7481
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7481
- this._ptzControl = new distExports$1.Ptz(this.$turntable, _extends$b({}, this._options, {
7482
+ this._ptzControl = new distExports.Ptz(this.$turntable, _extends$b({}, this._options, {
7482
7483
  onSpeedChange: this._onSpeedChange.bind(this),
7483
7484
  onDirection: this._onDirection.bind(this)
7484
7485
  }));
@@ -7487,7 +7488,7 @@ function _set_prototype_of$c(o, p) {
7487
7488
  };
7488
7489
  _proto.renderMobileExtend = function renderMobileExtend($container) {
7489
7490
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7490
- if (!this._ptzControl1) this._ptzControl1 = new distExports$1.MobilePtz($container, _extends$b({}, this._options, {
7491
+ if (!this._ptzControl1) this._ptzControl1 = new distExports.MobilePtz($container, _extends$b({}, this._options, {
7491
7492
  onSpeedChange: this._onSpeedChange.bind(this),
7492
7493
  onDirection: this._onDirection.bind(this)
7493
7494
  }));
@@ -8364,6 +8365,10 @@ function _set_prototype_of$8(o, p) {
8364
8365
  };
8365
8366
  return _set_prototype_of$8(o, p);
8366
8367
  }
8368
+ function _type_of(obj) {
8369
+ "@swc/helpers - typeof";
8370
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
8371
+ }
8367
8372
  var DEFINITION_LEVELS_LOCALE = [
8368
8373
  'VIDEO_LEVEL_FLUENT',
8369
8374
  'VIDEO_LEVEL_STANDARD',
@@ -8457,7 +8462,7 @@ function __filter(list, locale) {
8457
8462
  Select.prototype.updateOptions.call(_assert_this_initialized$1(_this), __filter(list, _this.locale));
8458
8463
  });
8459
8464
  _this.on(EVENTS.currentVideoLevel, function(item, realLevel) {
8460
- var l = typeof item === 'object' ? item.level : item;
8465
+ var l = (typeof item === "undefined" ? "undefined" : _type_of(item)) === 'object' ? item.level : item;
8461
8466
  _this._level = realLevel + '';
8462
8467
  if (l === 'auto') {
8463
8468
  var _options_locales_options_language;
@@ -8586,394 +8591,6 @@ var SPEED_DEFAULT_OPTIONS = {
8586
8591
  return Speed;
8587
8592
  }(Select);
8588
8593
 
8589
- /*
8590
- * @ezuikit/control-date-picker v0.0.1-alpha.2
8591
- * Copyright (c) 2025-11-12 Ezviz-OpenBiz
8592
- * Released under the MIT License.
8593
- */
8594
-
8595
- var dist;
8596
- var hasRequiredDist;
8597
-
8598
- function requireDist () {
8599
- if (hasRequiredDist) return dist;
8600
- hasRequiredDist = 1;
8601
-
8602
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
8603
- try {
8604
- var info = gen[key](arg);
8605
- var value = info.value;
8606
- } catch (error) {
8607
- reject(error);
8608
- return;
8609
- }
8610
- if (info.done) {
8611
- resolve(value);
8612
- } else {
8613
- Promise.resolve(value).then(_next, _throw);
8614
- }
8615
- }
8616
- function _async_to_generator(fn) {
8617
- return function() {
8618
- var self = this, args = arguments;
8619
- return new Promise(function(resolve, reject) {
8620
- var gen = fn.apply(self, args);
8621
- function _next(value) {
8622
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
8623
- }
8624
- function _throw(err) {
8625
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
8626
- }
8627
- _next(undefined);
8628
- });
8629
- };
8630
- }
8631
- function _ts_generator(thisArg, body) {
8632
- var f, y, t, _ = {
8633
- label: 0,
8634
- sent: function() {
8635
- if (t[0] & 1) throw t[1];
8636
- return t[1];
8637
- },
8638
- trys: [],
8639
- ops: []
8640
- }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
8641
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
8642
- return this;
8643
- }), g;
8644
- function verb(n) {
8645
- return function(v) {
8646
- return step([
8647
- n,
8648
- v
8649
- ]);
8650
- };
8651
- }
8652
- function step(op) {
8653
- if (f) throw new TypeError("Generator is already executing.");
8654
- while(g && (g = 0, op[0] && (_ = 0)), _)try {
8655
- 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;
8656
- if (y = 0, t) op = [
8657
- op[0] & 2,
8658
- t.value
8659
- ];
8660
- switch(op[0]){
8661
- case 0:
8662
- case 1:
8663
- t = op;
8664
- break;
8665
- case 4:
8666
- _.label++;
8667
- return {
8668
- value: op[1],
8669
- done: false
8670
- };
8671
- case 5:
8672
- _.label++;
8673
- y = op[1];
8674
- op = [
8675
- 0
8676
- ];
8677
- continue;
8678
- case 7:
8679
- op = _.ops.pop();
8680
- _.trys.pop();
8681
- continue;
8682
- default:
8683
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
8684
- _ = 0;
8685
- continue;
8686
- }
8687
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
8688
- _.label = op[1];
8689
- break;
8690
- }
8691
- if (op[0] === 6 && _.label < t[1]) {
8692
- _.label = t[1];
8693
- t = op;
8694
- break;
8695
- }
8696
- if (t && _.label < t[2]) {
8697
- _.label = t[2];
8698
- _.ops.push(op);
8699
- break;
8700
- }
8701
- if (t[2]) _.ops.pop();
8702
- _.trys.pop();
8703
- continue;
8704
- }
8705
- op = body.call(thisArg, _);
8706
- } catch (e) {
8707
- op = [
8708
- 6,
8709
- e
8710
- ];
8711
- y = 0;
8712
- } finally{
8713
- f = t = 0;
8714
- }
8715
- if (op[0] & 5) throw op[1];
8716
- return {
8717
- value: op[0] ? op[1] : void 0,
8718
- done: true
8719
- };
8720
- }
8721
- }
8722
- var AppendJS = /*#__PURE__*/ function() {
8723
- function AppendJS() {}
8724
- AppendJS.loadScript = function loadScript(src) {
8725
- return _async_to_generator(function() {
8726
- return _ts_generator(this, function(_state) {
8727
- switch(_state.label){
8728
- case 0:
8729
- return [
8730
- 4,
8731
- new Promise(function(resolve, reject) {
8732
- if (AppendJS.LoadedScr.includes(src)) {
8733
- return resolve(src);
8734
- }
8735
- if (AppendJS.LoadingScrQueue[src]) {
8736
- return AppendJS.LoadingScrQueue[src].push(resolve);
8737
- } else {
8738
- AppendJS.LoadingScrQueue[src] = [
8739
- resolve
8740
- ];
8741
- }
8742
- var link;
8743
- if (src.includes('.js')) {
8744
- link = document.createElement('script');
8745
- link.src = src;
8746
- link.async = true;
8747
- } else if (src.includes('.css')) {
8748
- link = document.createElement('link');
8749
- link.rel = 'stylesheet';
8750
- link.href = src;
8751
- }
8752
- link.onload = function() {
8753
- AppendJS.LoadedScr.push(src);
8754
- AppendJS.LoadingScrQueue[src].forEach(function(resolve) {
8755
- return resolve(src);
8756
- });
8757
- AppendJS.LoadingScrQueue[src] = [];
8758
- };
8759
- link.onerror = function() {
8760
- return reject(new Error('Failed to load ' + src));
8761
- };
8762
- document.head.appendChild(link);
8763
- })
8764
- ];
8765
- case 1:
8766
- return [
8767
- 2,
8768
- _state.sent()
8769
- ];
8770
- }
8771
- });
8772
- })();
8773
- };
8774
- AppendJS.loadScriptsBatch = function loadScriptsBatch(srcArr) {
8775
- return _async_to_generator(function() {
8776
- return _ts_generator(this, function(_state) {
8777
- switch(_state.label){
8778
- case 0:
8779
- return [
8780
- 4,
8781
- Promise.all(srcArr.map(AppendJS.loadScript))
8782
- ];
8783
- case 1:
8784
- return [
8785
- 2,
8786
- _state.sent()
8787
- ];
8788
- }
8789
- });
8790
- })();
8791
- };
8792
- AppendJS.remove = function remove(src) {
8793
- src.forEach(function(item) {
8794
- var link = document.querySelector('script[src="' + item + '"]') || document.querySelector('link[href="' + item + '"]');
8795
- if (link) {
8796
- link.remove();
8797
- }
8798
- });
8799
- };
8800
- AppendJS.clear = function clear() {
8801
- AppendJS.remove(AppendJS.LoadedScr);
8802
- };
8803
- return AppendJS;
8804
- }();
8805
- /** 已经加载完的js/css */ AppendJS.LoadedScr = [];
8806
- /** 正在加载的js/css */ AppendJS.LoadingScrQueue = {};
8807
-
8808
- function _defineProperties(target, props) {
8809
- for(var i = 0; i < props.length; i++){
8810
- var descriptor = props[i];
8811
- descriptor.enumerable = descriptor.enumerable || false;
8812
- descriptor.configurable = true;
8813
- if ("value" in descriptor) descriptor.writable = true;
8814
- Object.defineProperty(target, descriptor.key, descriptor);
8815
- }
8816
- }
8817
- function _create_class(Constructor, protoProps, staticProps) {
8818
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
8819
- return Constructor;
8820
- }
8821
- var DEFAULT_OPTIONS = {
8822
- staticPath: '.',
8823
- place: 'top-right',
8824
- language: 'zh-CN',
8825
- current: new Date(),
8826
- maxDate: new Date()
8827
- };
8828
- /**
8829
- * 日期选择器
8830
- */ var DatePicker = /*#__PURE__*/ function() {
8831
- function DatePicker(container, options) {
8832
- var _this = this;
8833
- this._open = false;
8834
- this._change = true;
8835
- this.$container = container;
8836
- this.options = Object.assign({}, DEFAULT_OPTIONS, options);
8837
- this.options.staticPath = (this.options.staticPath || '').replace(/\/$/, '');
8838
- if (this.options.current) {
8839
- this._date = this.options.current;
8840
- }
8841
- this._init();
8842
- this.$container.addEventListener('click', function() {
8843
- if (_this._open) _this.hide();
8844
- else _this.show();
8845
- });
8846
- document.body.addEventListener('click', function(e) {
8847
- if (!_this.$container.contains(e.target)) {
8848
- _this.hide();
8849
- }
8850
- });
8851
- }
8852
- var _proto = DatePicker.prototype;
8853
- _proto._init = function _init() {
8854
- var _this = this;
8855
- // 因为挂载在行内,需要父标签设置 position: relative;
8856
- this.$container.style.cssText += ";position: relative;";
8857
- this.$container.classList.add("datepicker-inline-" + this.options.place);
8858
- AppendJS.loadScriptsBatch([
8859
- "" + this.options.staticPath + "/rec/jquery.min.js",
8860
- "" + this.options.staticPath + "/rec/datepicker.min.css"
8861
- ]).then(function() {
8862
- AppendJS.loadScriptsBatch([
8863
- "" + _this.options.staticPath + "/rec/datepicker.js"
8864
- ]).then(function() {
8865
- AppendJS.loadScriptsBatch([
8866
- "" + _this.options.staticPath + "/rec/datepicker.zh-CN.js",
8867
- "" + _this.options.staticPath + "/rec/datepicker.en-US.js"
8868
- ]).then(function() {
8869
- window.$(_this.$container).datepicker({
8870
- date: _this.options.current,
8871
- language: _this.options.language,
8872
- endDate: _this.options.maxDate,
8873
- inline: true
8874
- });
8875
- _this.hide();
8876
- window.$(_this.$container).on('pick.datepicker', function(e) {
8877
- var _this__date, _this__date1, _this__date2, _this__date3, _this__date4, _this__date5;
8878
- if (e.view === 'year' && ((_this__date = _this._date) == null ? void 0 : _this__date.getFullYear()) !== e.date.getFullYear()) {
8879
- _this.options.onYearChange == null ? void 0 : _this.options.onYearChange.call(_this.options, e.date);
8880
- } 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())) {
8881
- _this.options.onMonthChange == null ? void 0 : _this.options.onMonthChange.call(_this.options, e.date);
8882
- } else if ([
8883
- 'day',
8884
- 'pick'
8885
- ].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())) {
8886
- if (_this._change) {
8887
- _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, e.date);
8888
- }
8889
- _this._date = new Date(e.date.getTime());
8890
- }
8891
- if (e.view === 'day') _this.hide();
8892
- _this._change = true;
8893
- });
8894
- });
8895
- });
8896
- });
8897
- };
8898
- /**
8899
- * 设置日期, change = true 时触发 onChange 事件
8900
- *
8901
- * @param date 设置的日期
8902
- * @param change 是否触发 onChange 事件
8903
- */ _proto.setDate = function setDate(date, change) {
8904
- if (change === void 0) change = true;
8905
- var $datepicker = this.$container.querySelector(".datepicker-inline");
8906
- if ($datepicker) {
8907
- this._change = change;
8908
- window.$(this.$container).datepicker('setDate', date);
8909
- }
8910
- };
8911
- /**
8912
- * 隐藏面板, 会触发 onPanelChange 事件
8913
- */ _proto.hide = function hide() {
8914
- var $datepicker = this.$container.querySelector(".datepicker-inline");
8915
- if ($datepicker) {
8916
- if (this._open) {
8917
- this._open = false;
8918
- this.options.onPanelChange == null ? void 0 : this.options.onPanelChange.call(this.options, false, this._date);
8919
- }
8920
- $datepicker.classList.add('datepicker-hide');
8921
- }
8922
- };
8923
- /**
8924
- * 显示面板, 会触发 onPanelChange 事件
8925
- */ _proto.show = function show() {
8926
- var $datepicker = this.$container.querySelector(".datepicker-inline");
8927
- if ($datepicker) {
8928
- var _window_$_datepicker, _window_$;
8929
- if (!this._open) {
8930
- this._open = true;
8931
- this.options.onPanelChange == null ? void 0 : this.options.onPanelChange.call(this.options, true, this._date);
8932
- }
8933
- if (this._date) this.setDate(this._date, false);
8934
- (_window_$_datepicker = (_window_$ = window.$(this.$container)).datepicker) == null ? void 0 : _window_$_datepicker.call(_window_$, 'showView');
8935
- if (this.options.place === 'bottom-left') {
8936
- $datepicker.style.cssText += "top: " + (this.$container.clientHeight + 10) + "px; bottom: auto; right: auto; left: 0px";
8937
- } else {
8938
- $datepicker.style.cssText += "bottom: " + (this.$container.clientHeight + 10) + "px; top: auto";
8939
- }
8940
- $datepicker.classList.remove('datepicker-hide');
8941
- }
8942
- };
8943
- /**
8944
- * 销毁
8945
- */ _proto.destroy = function destroy() {
8946
- this.hide();
8947
- this._date = undefined;
8948
- window.$(this.$container).datepicker('destroy');
8949
- // AppendJS.remove([
8950
- // `${this.options.staticPath}/rec/jquery.min.js`,
8951
- // `${this.options.staticPath}/rec/datepicker.min.css`,
8952
- // `${this.options.staticPath}/rec/datepicker.js`,
8953
- // `${this.options.staticPath}/rec/datepicker.zh-CN.js`,
8954
- // `${this.options.staticPath}/rec/datepicker.en-US.js`,
8955
- // ]);
8956
- };
8957
- _create_class(DatePicker, [
8958
- {
8959
- key: "date",
8960
- get: /**
8961
- * 获取日期
8962
- */ function get() {
8963
- return this._date;
8964
- }
8965
- }
8966
- ]);
8967
- return DatePicker;
8968
- }();
8969
-
8970
- dist = DatePicker;
8971
- return dist;
8972
- }
8973
-
8974
- var distExports = requireDist();
8975
- var DatePickerUtil = /*@__PURE__*/getDefaultExportFromCjs(distExports);
8976
-
8977
8594
  /**
8978
8595
  * @description 时间操作
8979
8596
  */ var DateTime = /*#__PURE__*/ function() {
@@ -9163,7 +8780,9 @@ function _set_prototype_of$6(o, p) {
9163
8780
  function DatePickerControl(options) {
9164
8781
  var _this;
9165
8782
  var _this_options_props_urlInfo_searchParams, _this_options_props_urlInfo, _this_options_props;
9166
- _this = Control.call(this, _extends$5({}, options, {
8783
+ _this = Control.call(this, _extends$5({
8784
+ maxDate: new Date()
8785
+ }, options, {
9167
8786
  tagName: 'span',
9168
8787
  controlType: 'button',
9169
8788
  classNameSuffix: 'date'
@@ -9176,7 +8795,8 @@ function _set_prototype_of$6(o, p) {
9176
8795
  var _proto = DatePickerControl.prototype;
9177
8796
  _proto._render = function _render() {
9178
8797
  var _this = this;
9179
- if (isMobile()) {
8798
+ var isMobile1 = isMobile();
8799
+ if (isMobile1) {
9180
8800
  var _this_locale;
9181
8801
  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>";
9182
8802
  } else {
@@ -9185,14 +8805,25 @@ function _set_prototype_of$6(o, p) {
9185
8805
  title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_CALENDAR
9186
8806
  });
9187
8807
  }
9188
- this.dataPickerUtil = new DatePickerUtil(this.$container, {
9189
- staticPath: this.options.staticPath,
9190
- language: this.options.language === 'zh' ? 'zh-CN' : 'en-US',
8808
+ this.dataPicker = new DatePicker(this.$container, {
8809
+ isMobile: isMobile1,
8810
+ getPopupContainer: function() {
8811
+ return _this.$container;
8812
+ },
8813
+ mode: 'date',
8814
+ offset: [
8815
+ 0,
8816
+ -10
8817
+ ],
8818
+ badges: this.options.badges || [],
8819
+ language: this.options.language === 'zh' ? 'zh' : 'en',
9191
8820
  current: new Date(this._value + ' 00:00:00'),
9192
- maxDate: this.options.maxDate || new Date(),
9193
- place: isMobile() ? 'bottom-left' : 'top-right',
9194
- onChange: function(date) {
9195
- if (date && _this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
8821
+ disabledDate: function(date) {
8822
+ return date.getTime() > (_this.options.maxDate || new Date()).getTime();
8823
+ },
8824
+ placement: 'tr',
8825
+ onOk: function(date, mode) {
8826
+ if (date && _this._value !== DateTime.formate(date, 'YYYY-MM-DD') && isMobile1) {
9196
8827
  _this._value = DateTime.formate(date, 'YYYY-MM-DD');
9197
8828
  _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
9198
8829
  _this.emit(EVENTS.control.dateChange, date);
@@ -9201,9 +8832,16 @@ function _set_prototype_of$6(o, p) {
9201
8832
  }
9202
8833
  }
9203
8834
  },
9204
- onPanelChange: function(open, date) {
9205
- _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, date);
9206
- _this.emit(EVENTS.control.datePanelOpenChange, open, date);
8835
+ onChange: function(date, mode) {
8836
+ if (date && _this._value !== DateTime.formate(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
8837
+ _this._value = DateTime.formate(date, 'YYYY-MM-DD');
8838
+ _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
8839
+ _this.emit(EVENTS.control.dateChange, date);
8840
+ }
8841
+ },
8842
+ onOpenChange: function(open) {
8843
+ _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.dataPicker.current);
8844
+ _this.emit(EVENTS.control.datePanelOpenChange, open, _this.dataPicker.current);
9207
8845
  }
9208
8846
  });
9209
8847
  };
@@ -9213,8 +8851,8 @@ function _set_prototype_of$6(o, p) {
9213
8851
  * @param change 是否触发 onChange 事件
9214
8852
  */ _proto.setDate = function setDate(date, change) {
9215
8853
  if (change === void 0) change = true;
9216
- var _this_dataPickerUtil;
9217
- (_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.setDate(date, change);
8854
+ var _this_dataPicker;
8855
+ (_this_dataPicker = this.dataPicker) == null ? void 0 : _this_dataPicker.setCurrent(date, change);
9218
8856
  if (date && !change && this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
9219
8857
  this._value = DateTime.formate(date, 'YYYY-MM-DD');
9220
8858
  if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
@@ -9223,18 +8861,17 @@ function _set_prototype_of$6(o, p) {
9223
8861
  }
9224
8862
  };
9225
8863
  _proto.reset = function reset() {
9226
- var _this_dataPickerUtil;
9227
- (_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
8864
+ if (this.dataPicker) this.dataPicker.open = false;
9228
8865
  Control.prototype.reset.call(this);
9229
8866
  };
9230
8867
  /**
9231
8868
  * 销毁控件
9232
8869
  * @override
9233
8870
  */ _proto.destroy = function destroy() {
9234
- if (this.dataPickerUtil) {
9235
- this.dataPickerUtil.destroy();
8871
+ if (this.dataPicker) {
8872
+ this.dataPicker.destroy();
9236
8873
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9237
- this.dataPickerUtil = null;
8874
+ this.dataPicker = null;
9238
8875
  }
9239
8876
  Control.prototype.destroy.call(this);
9240
8877
  };
@@ -9244,6 +8881,7 @@ function _set_prototype_of$6(o, p) {
9244
8881
  };
9245
8882
  /**
9246
8883
  * 点击 Control 会触发
8884
+ * @overload super._onControlClick(e: Event)
9247
8885
  */ _proto._onControlClick = function _onControlClick(e) {
9248
8886
  Control.prototype._onControlClick.call(this, e);
9249
8887
  };
@@ -11838,6 +11476,6 @@ var THEME_DEFAULT_OPTIONS = {
11838
11476
  zh: zh,
11839
11477
  en: en
11840
11478
  };
11841
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.6';
11479
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.1-beta.2';
11842
11480
 
11843
11481
  export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };