@king-design/react 3.0.0-beta.0 → 3.0.0-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.
Files changed (223) hide show
  1. package/__tests__/__snapshots__/Dialog.md +1 -1
  2. package/__tests__/__snapshots__/React Demos.md +468 -309
  3. package/__tests__/components/cascader.spec.tsx +53 -0
  4. package/__tests__/components/drawer.spec.tsx +67 -5
  5. package/components/button/index.d.ts +1 -1
  6. package/components/button/index.js +1 -1
  7. package/components/button/styles.d.ts +1 -1
  8. package/components/button/styles.js +3 -5
  9. package/components/carousel/index.vdt.js +2 -2
  10. package/components/cascader/index.d.ts +22 -11
  11. package/components/cascader/index.js +9 -12
  12. package/components/cascader/index.spec.js +81 -0
  13. package/components/cascader/index.vdt.js +11 -9
  14. package/components/cascader/styles.js +1 -1
  15. package/components/cascader/useFields.d.ts +2 -0
  16. package/components/cascader/useFields.js +18 -0
  17. package/components/cascader/useFilterable.d.ts +2 -1
  18. package/components/cascader/useFilterable.js +17 -6
  19. package/components/cascader/useLabel.d.ts +2 -1
  20. package/components/cascader/useLabel.js +4 -4
  21. package/components/cascader/useLoad.d.ts +2 -1
  22. package/components/cascader/useLoad.js +9 -7
  23. package/components/collapse/item.vdt.js +1 -1
  24. package/components/colorpicker/index.d.ts +2 -0
  25. package/components/colorpicker/index.js +7 -2
  26. package/components/colorpicker/index.vdt.js +3 -6
  27. package/components/copy/index.d.ts +17 -0
  28. package/components/copy/index.js +43 -0
  29. package/components/copy/index.spec.d.ts +1 -0
  30. package/components/copy/index.spec.js +52 -0
  31. package/components/copy/index.vdt.js +45 -0
  32. package/components/copy/styles.d.ts +2 -0
  33. package/components/copy/styles.js +14 -0
  34. package/components/copy/useCopy.d.ts +4 -0
  35. package/components/copy/useCopy.js +90 -0
  36. package/components/datepicker/calendar.vdt.js +6 -6
  37. package/components/datepicker/index.spec.js +171 -153
  38. package/components/datepicker/index.vdt.js +1 -1
  39. package/components/datepicker/styles.js +1 -1
  40. package/components/datepicker/useValue.d.ts +3 -3
  41. package/components/datepicker/useValue.js +38 -9
  42. package/components/diagram/shapes/callout.d.ts +1 -1
  43. package/components/diagram/shapes/circle.d.ts +1 -1
  44. package/components/diagram/shapes/document.d.ts +1 -1
  45. package/components/diagram/shapes/ellipse.d.ts +1 -1
  46. package/components/diagram/shapes/hexagon.d.ts +1 -1
  47. package/components/diagram/shapes/image.d.ts +1 -1
  48. package/components/diagram/shapes/parallelogram.d.ts +1 -1
  49. package/components/diagram/shapes/rectangle.d.ts +1 -1
  50. package/components/diagram/shapes/square.d.ts +1 -1
  51. package/components/diagram/shapes/text.d.ts +1 -1
  52. package/components/dialog/alert.vdt.js +6 -5
  53. package/components/dialog/index.spec.js +6 -6
  54. package/components/dialog/styles.js +1 -1
  55. package/components/dropdown/dropdown.d.ts +6 -6
  56. package/components/dropdown/dropdown.js +58 -75
  57. package/components/dropdown/index.spec.js +96 -17
  58. package/components/dropdown/item.d.ts +1 -1
  59. package/components/dropdown/item.js +19 -7
  60. package/components/dropdown/menu.js +1 -1
  61. package/components/dropdown/usePosition.js +11 -2
  62. package/components/editable/index.d.ts +1 -0
  63. package/components/editable/index.js +20 -6
  64. package/components/editable/index.vdt.js +2 -1
  65. package/components/form/index.spec.js +4 -2
  66. package/components/form/item.vdt.js +2 -1
  67. package/components/form/styles.js +4 -4
  68. package/components/grid/useGutter.js +8 -8
  69. package/components/icon/styles.js +1 -1
  70. package/components/input/index.d.ts +13 -2
  71. package/components/input/index.js +16 -13
  72. package/components/input/index.spec.js +169 -1
  73. package/components/input/index.vdt.js +44 -12
  74. package/components/input/search.vdt.js +2 -4
  75. package/components/input/styles.js +30 -6
  76. package/components/input/useAutoRows.d.ts +2 -0
  77. package/components/input/useAutoRows.js +79 -0
  78. package/components/input/useAutoWidth.js +13 -3
  79. package/components/input/useFocus.d.ts +4 -0
  80. package/components/input/useFocus.js +21 -0
  81. package/components/input/useShowPassword.d.ts +7 -0
  82. package/components/input/useShowPassword.js +31 -0
  83. package/components/menu/index.spec.js +26 -15
  84. package/components/menu/item.d.ts +2 -0
  85. package/components/menu/item.js +5 -0
  86. package/components/menu/item.vdt.js +4 -1
  87. package/components/pagination/index.d.ts +1 -1
  88. package/components/pagination/index.js +3 -2
  89. package/components/pagination/index.spec.js +49 -0
  90. package/components/pagination/index.vdt.js +10 -12
  91. package/components/pagination/styles.js +1 -1
  92. package/components/popover/content.d.ts +19 -0
  93. package/components/popover/content.js +31 -0
  94. package/components/popover/content.vdt.js +68 -0
  95. package/components/popover/index.d.ts +16 -0
  96. package/components/popover/index.js +44 -0
  97. package/components/popover/index.spec.d.ts +1 -0
  98. package/components/popover/index.spec.js +195 -0
  99. package/components/popover/styles.d.ts +1 -0
  100. package/components/popover/styles.js +22 -0
  101. package/components/portal.d.ts +6 -2
  102. package/components/portal.js +4 -3
  103. package/components/position.js +2 -1
  104. package/components/progress/index.js +1 -1
  105. package/components/progress/index.vdt.js +46 -8
  106. package/components/progress/styles.js +19 -13
  107. package/components/rate/styles.js +1 -1
  108. package/components/select/base.d.ts +7 -3
  109. package/components/select/base.js +9 -3
  110. package/components/select/base.vdt.js +75 -47
  111. package/components/select/index.spec.js +25 -13
  112. package/components/select/menu.vdt.js +6 -6
  113. package/components/select/option.vdt.js +2 -1
  114. package/components/select/styles.js +11 -5
  115. package/components/select/useDraggble.d.ts +2 -0
  116. package/components/select/useDraggble.js +11 -0
  117. package/components/slider/index.spec.js +48 -9
  118. package/components/slider/index.vdt.js +23 -12
  119. package/components/slider/styles.js +23 -14
  120. package/components/slider/useValue.d.ts +3 -1
  121. package/components/slider/useValue.js +12 -0
  122. package/components/spinner/index.d.ts +0 -1
  123. package/components/spinner/index.js +1 -19
  124. package/components/spinner/index.vdt.js +13 -8
  125. package/components/spinner/styles.js +2 -2
  126. package/components/spinner/useChange.d.ts +1 -1
  127. package/components/spinner/useChange.js +2 -2
  128. package/components/spinner/useValue.d.ts +1 -0
  129. package/components/spinner/useValue.js +16 -1
  130. package/components/split/index.vdt.js +32 -20
  131. package/components/split/memo.d.ts +9 -0
  132. package/components/split/memo.js +26 -0
  133. package/components/steps/index.d.ts +1 -0
  134. package/components/steps/index.js +2 -1
  135. package/components/steps/index.spec.js +1 -1
  136. package/components/steps/index.vdt.js +7 -4
  137. package/components/steps/step.vdt.js +2 -3
  138. package/components/steps/styles.d.ts +1 -0
  139. package/components/steps/styles.js +50 -17
  140. package/components/switch/index.spec.js +82 -65
  141. package/components/table/cell.js +1 -6
  142. package/components/table/cell.vdt.js +1 -1
  143. package/components/table/column.vdt.js +40 -24
  144. package/components/table/index.spec.js +162 -20
  145. package/components/table/row.d.ts +1 -1
  146. package/components/table/row.js +2 -1
  147. package/components/table/styles.js +16 -9
  148. package/components/table/table.d.ts +15 -0
  149. package/components/table/table.js +16 -7
  150. package/components/table/table.vdt.js +20 -6
  151. package/components/table/useChecked.d.ts +3 -2
  152. package/components/table/useChecked.js +23 -12
  153. package/components/table/useDisableRow.d.ts +2 -1
  154. package/components/table/useDisableRow.js +4 -4
  155. package/components/table/useDraggable.d.ts +3 -2
  156. package/components/table/useDraggable.js +11 -15
  157. package/components/table/useGroup.d.ts +9 -3
  158. package/components/table/useGroup.js +48 -37
  159. package/components/table/useMerge.d.ts +2 -1
  160. package/components/table/useMerge.js +5 -4
  161. package/components/table/usePagination.d.ts +8 -0
  162. package/components/table/usePagination.js +81 -0
  163. package/components/table/useStickyScrollbar.js +2 -2
  164. package/components/table/useTree.d.ts +2 -1
  165. package/components/table/useTree.js +3 -4
  166. package/components/table/useWidth.js +2 -2
  167. package/components/tabs/index.d.ts +1 -1
  168. package/components/tabs/index.js +1 -1
  169. package/components/tabs/index.spec.js +67 -0
  170. package/components/tabs/index.vdt.js +9 -4
  171. package/components/tabs/styles.js +32 -34
  172. package/components/tabs/useScroll.d.ts +1 -1
  173. package/components/tabs/useScroll.js +75 -48
  174. package/components/tag/base.d.ts +1 -0
  175. package/components/tag/base.js +1 -1
  176. package/components/tag/index.d.ts +1 -0
  177. package/components/tag/index.js +2 -1
  178. package/components/tag/index.spec.js +147 -4
  179. package/components/tag/styles.d.ts +67 -0
  180. package/components/tag/styles.js +33 -8
  181. package/components/tag/tags.d.ts +27 -0
  182. package/components/tag/tags.js +51 -0
  183. package/components/tag/tags.vdt.js +91 -0
  184. package/components/tag/useChildren.d.ts +2 -0
  185. package/components/tag/useChildren.js +39 -0
  186. package/components/tag/useDraggable.d.ts +3 -0
  187. package/components/tag/useDraggable.js +89 -0
  188. package/components/tag/useNowrap.d.ts +7 -0
  189. package/components/tag/useNowrap.js +115 -0
  190. package/components/timepicker/index.spec.js +1 -1
  191. package/components/tooltip/content.d.ts +3 -2
  192. package/components/tooltip/content.js +18 -1
  193. package/components/tooltip/content.vdt.js +22 -10
  194. package/components/tooltip/index.spec.js +147 -92
  195. package/components/tooltip/styles.d.ts +23 -0
  196. package/components/tooltip/styles.js +2 -2
  197. package/components/tooltip/tooltip.d.ts +1 -1
  198. package/components/tooltip/tooltip.js +11 -11
  199. package/components/transfer/index.vdt.js +14 -3
  200. package/components/types.d.ts +1 -0
  201. package/components/upload/index.spec.js +5 -6
  202. package/components/upload/index.vdt.js +7 -5
  203. package/components/utils.d.ts +2 -0
  204. package/components/utils.js +24 -3
  205. package/components/virtual.d.ts +8 -0
  206. package/components/virtual.js +126 -0
  207. package/hooks/useResizeObserver.d.ts +1 -1
  208. package/hooks/useResizeObserver.js +19 -6
  209. package/i18n/en-US.d.ts +4 -1
  210. package/i18n/en-US.js +6 -2
  211. package/index.d.ts +5 -3
  212. package/index.js +5 -3
  213. package/package.json +2 -2
  214. package/styles/fonts/iconfont.eot +0 -0
  215. package/styles/fonts/iconfont.js +2 -2
  216. package/styles/fonts/iconfont.svg +35 -35
  217. package/styles/fonts/iconfont.ttf +0 -0
  218. package/styles/fonts/iconfont.woff +0 -0
  219. package/styles/fonts/ionicons.js +3 -3
  220. package/styles/global.js +1 -1
  221. package/yarn-error.log +41 -43
  222. package/components/table/useResizeObserver.d.ts +0 -2
  223. package/components/table/useResizeObserver.js +0 -20
@@ -1,6 +1,7 @@
1
1
  import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
2
  import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
3
3
  import _Array$from2 from "@babel/runtime-corejs3/core-js/array/from";
4
+ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/includes";
4
5
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
5
6
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
6
7
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
@@ -496,7 +497,7 @@ describe('Datepicker', function () {
496
497
 
497
498
  case 14:
498
499
  // remove specified item
499
- close = element.querySelector('.k-select-close');
500
+ close = element.querySelector('.k-tag-close');
500
501
  close.click();
501
502
  expect(instance.get('date')).have.lengthOf(0);
502
503
  _context13.next = 19;
@@ -752,16 +753,18 @@ describe('Datepicker', function () {
752
753
  }, _callee17);
753
754
  })));
754
755
  it('datetime range', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {
755
- var _mount16, instance, element, _element$querySelecto9, select, content, _content$querySelecto8, calendar1, calendar2;
756
+ var _context18;
756
757
 
757
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
758
+ var _mount16, instance, element, _element$querySelecto9, select, content, _content$querySelecto8, calendar1, calendar2, values;
759
+
760
+ return _regeneratorRuntime.wrap(function _callee18$(_context19) {
758
761
  while (1) {
759
- switch (_context18.prev = _context18.next) {
762
+ switch (_context19.prev = _context19.next) {
760
763
  case 0:
761
764
  _mount16 = mount(MultipleDemo), instance = _mount16[0], element = _mount16[1];
762
765
  _element$querySelecto9 = element.querySelectorAll('.k-datepicker'), select = _element$querySelecto9[5];
763
766
  dispatchEvent(select, 'click');
764
- _context18.next = 5;
767
+ _context19.next = 5;
765
768
  return wait();
766
769
 
767
770
  case 5:
@@ -769,24 +772,24 @@ describe('Datepicker', function () {
769
772
  _content$querySelecto8 = content.querySelectorAll('.k-datepicker-calendar-wrapper'), calendar1 = _content$querySelecto8[0], calendar2 = _content$querySelecto8[1];
770
773
  calendar1.querySelectorAll('.k-calendar-item')[17].click();
771
774
  calendar2.querySelectorAll('.k-calendar-item')[17].click();
772
- _context18.next = 11;
775
+ _context19.next = 11;
773
776
  return wait();
774
777
 
775
778
  case 11:
776
779
  content.querySelector('.k-btn').click();
777
- _context18.next = 14;
780
+ _context19.next = 14;
778
781
  return wait();
779
782
 
780
783
  case 14:
781
784
  expect(instance.get('datetimeRange')).have.lengthOf(1);
782
785
  calendar1.querySelectorAll('.k-calendar-item')[18].click();
783
786
  calendar2.querySelectorAll('.k-calendar-item')[18].click();
784
- _context18.next = 19;
787
+ _context19.next = 19;
785
788
  return wait();
786
789
 
787
790
  case 19:
788
791
  content.querySelector('.k-btn').click();
789
- _context18.next = 22;
792
+ _context19.next = 22;
790
793
  return wait();
791
794
 
792
795
  case 22:
@@ -794,37 +797,52 @@ describe('Datepicker', function () {
794
797
 
795
798
  calendar1.querySelectorAll('.k-calendar-item')[17].click();
796
799
  calendar2.querySelectorAll('.k-calendar-item')[17].click();
797
- _context18.next = 27;
800
+ _context19.next = 27;
798
801
  return wait();
799
802
 
800
803
  case 27:
801
804
  content.querySelector('.k-btn').click();
802
- _context18.next = 30;
805
+ _context19.next = 30;
803
806
  return wait();
804
807
 
805
808
  case 30:
806
809
  expect(instance.get('datetimeRange')).have.lengthOf(2);
807
810
  instance.set('datetimeRange', []);
808
- _context18.next = 34;
811
+ _context19.next = 34;
809
812
  return wait();
810
813
 
811
814
  case 34:
812
815
  calendar1.querySelectorAll('.k-calendar-item')[17].click();
813
816
  calendar2.querySelectorAll('.k-calendar-item')[17].click();
814
- _context18.next = 38;
817
+ _context19.next = 38;
815
818
  return wait();
816
819
 
817
820
  case 38:
818
821
  content.querySelector('.k-btn').click();
819
- _context18.next = 41;
822
+ _context19.next = 41;
820
823
  return wait();
821
824
 
822
825
  case 41:
823
- expect(instance.get('datetimeRange')).have.lengthOf(1);
826
+ expect(instance.get('datetimeRange')).have.lengthOf(1); // select the first value in end panel
827
+
828
+ calendar2.querySelectorAll('.k-calendar-item')[17].click();
829
+ calendar2.querySelectorAll('.k-calendar-item')[17].click();
830
+ _context19.next = 46;
831
+ return wait();
832
+
833
+ case 46:
834
+ content.querySelector('.k-btn').click();
835
+ _context19.next = 49;
836
+ return wait();
837
+
838
+ case 49:
839
+ values = instance.get('datetimeRange');
840
+ expect(values).have.lengthOf(2);
841
+ expect(_includesInstanceProperty(_context18 = values[1][1]).call(_context18, '23:59:59')).to.be.true;
824
842
 
825
- case 42:
843
+ case 52:
826
844
  case "end":
827
- return _context18.stop();
845
+ return _context19.stop();
828
846
  }
829
847
  }
830
848
  }, _callee18);
@@ -834,15 +852,15 @@ describe('Datepicker', function () {
834
852
  it('date', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
835
853
  var _mount17, instance, element, select, content, first, value, value1, second;
836
854
 
837
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
855
+ return _regeneratorRuntime.wrap(function _callee19$(_context20) {
838
856
  while (1) {
839
- switch (_context19.prev = _context19.next) {
857
+ switch (_context20.prev = _context20.next) {
840
858
  case 0:
841
859
  _mount17 = mount(RangeDemo), instance = _mount17[0], element = _mount17[1]; // date
842
860
 
843
861
  select = element.querySelector('.k-datepicker');
844
862
  select.click();
845
- _context19.next = 5;
863
+ _context20.next = 5;
846
864
  return wait();
847
865
 
848
866
  case 5:
@@ -850,27 +868,27 @@ describe('Datepicker', function () {
850
868
 
851
869
  first = content.querySelector('.k-calendar-item:nth-child(18)');
852
870
  first.click();
853
- _context19.next = 10;
871
+ _context20.next = 10;
854
872
  return wait();
855
873
 
856
874
  case 10:
857
875
  expect(instance.get('date')).to.be.null; // hover status
858
876
 
859
877
  dispatchEvent(first.nextElementSibling.nextElementSibling, 'mouseenter');
860
- _context19.next = 14;
878
+ _context20.next = 14;
861
879
  return wait();
862
880
 
863
881
  case 14:
864
882
  expect(first.nextElementSibling.classList.contains('k-in-range')).to.be.true;
865
883
  dispatchEvent(first.previousElementSibling.previousElementSibling, 'mouseenter');
866
- _context19.next = 18;
884
+ _context20.next = 18;
867
885
  return wait();
868
886
 
869
887
  case 18:
870
888
  expect(first.previousElementSibling.classList.contains('k-in-range')).to.be.true;
871
889
  expect(first.nextElementSibling.classList.contains('k-in-range')).to.be.false;
872
890
  dispatchEvent(first.previousElementSibling.previousElementSibling, 'click');
873
- _context19.next = 23;
891
+ _context20.next = 23;
874
892
  return wait();
875
893
 
876
894
  case 23:
@@ -879,14 +897,14 @@ describe('Datepicker', function () {
879
897
  expect(value[0] < value[1]).to.be.true; // select the same date
880
898
 
881
899
  select.click();
882
- _context19.next = 29;
900
+ _context20.next = 29;
883
901
  return wait();
884
902
 
885
903
  case 29:
886
904
  // select the middle date
887
905
  first.click();
888
906
  first.click();
889
- _context19.next = 33;
907
+ _context20.next = 33;
890
908
  return wait();
891
909
 
892
910
  case 33:
@@ -895,14 +913,14 @@ describe('Datepicker', function () {
895
913
  expect(value1[0]).eql(value1[1]); // cancel all of range values and re-select
896
914
 
897
915
  select.click();
898
- _context19.next = 39;
916
+ _context20.next = 39;
899
917
  return wait();
900
918
 
901
919
  case 39:
902
920
  // select the middle date
903
921
  first.click();
904
922
  dispatchEvent(first.previousElementSibling.previousElementSibling, 'click');
905
- _context19.next = 43;
923
+ _context20.next = 43;
906
924
  return wait();
907
925
 
908
926
  case 43:
@@ -911,14 +929,14 @@ describe('Datepicker', function () {
911
929
  expect(instance.get('date')).eql(value); // range cross months
912
930
 
913
931
  select.click();
914
- _context19.next = 49;
932
+ _context20.next = 49;
915
933
  return wait();
916
934
 
917
935
  case 49:
918
936
  first.click();
919
937
  second = content.querySelector('.k-datepicker-calendar-wrapper:nth-child(2) .k-calendar-item:nth-child(19)');
920
938
  second.click();
921
- _context19.next = 54;
939
+ _context20.next = 54;
922
940
  return wait();
923
941
 
924
942
  case 54:
@@ -926,7 +944,7 @@ describe('Datepicker', function () {
926
944
 
927
945
  case 55:
928
946
  case "end":
929
- return _context19.stop();
947
+ return _context20.stop();
930
948
  }
931
949
  }
932
950
  }, _callee19);
@@ -934,14 +952,14 @@ describe('Datepicker', function () {
934
952
  it('datetime', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {
935
953
  var _mount18, instance, element, _element$querySelecto10, datetime, content, _content$querySelecto9, calendar1, calendar2, first, second, value2;
936
954
 
937
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
955
+ return _regeneratorRuntime.wrap(function _callee20$(_context21) {
938
956
  while (1) {
939
- switch (_context20.prev = _context20.next) {
957
+ switch (_context21.prev = _context21.next) {
940
958
  case 0:
941
959
  _mount18 = mount(RangeDemo), instance = _mount18[0], element = _mount18[1];
942
960
  _element$querySelecto10 = element.querySelectorAll('.k-datepicker'), datetime = _element$querySelecto10[1];
943
961
  datetime.click();
944
- _context20.next = 5;
962
+ _context21.next = 5;
945
963
  return wait();
946
964
 
947
965
  case 5:
@@ -951,14 +969,14 @@ describe('Datepicker', function () {
951
969
  second = calendar2.querySelectorAll('.k-calendar-item')[17];
952
970
  first.click();
953
971
  second.click();
954
- _context20.next = 13;
972
+ _context21.next = 13;
955
973
  return wait();
956
974
 
957
975
  case 13:
958
976
  dispatchEvent(calendar1.querySelector('.k-scroll-select-wrapper .k-active').nextElementSibling, 'click');
959
977
  dispatchEvent(calendar2.querySelector('.k-scroll-select-wrapper .k-active').previousElementSibling, 'click');
960
978
  content.querySelector('.k-datepicker-footer .k-btn').click();
961
- _context20.next = 18;
979
+ _context21.next = 18;
962
980
  return wait();
963
981
 
964
982
  case 18:
@@ -966,11 +984,11 @@ describe('Datepicker', function () {
966
984
  expect(value2).have.lengthOf(2);
967
985
  expect(_mapInstanceProperty(value2).call(value2, function (item) {
968
986
  return item.split(' ')[1];
969
- })).eql(['01:00:00', '23:00:00']);
987
+ })).eql(['01:00:00', '22:59:59']);
970
988
 
971
989
  case 21:
972
990
  case "end":
973
- return _context20.stop();
991
+ return _context21.stop();
974
992
  }
975
993
  }
976
994
  }, _callee20);
@@ -978,14 +996,14 @@ describe('Datepicker', function () {
978
996
  it('year', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {
979
997
  var _mount19, instance, element, _element$querySelecto11, select, content, _content$querySelecto10, calendar1, calendar2, first, second, value;
980
998
 
981
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
999
+ return _regeneratorRuntime.wrap(function _callee21$(_context22) {
982
1000
  while (1) {
983
- switch (_context21.prev = _context21.next) {
1001
+ switch (_context22.prev = _context22.next) {
984
1002
  case 0:
985
1003
  _mount19 = mount(RangeDemo), instance = _mount19[0], element = _mount19[1];
986
1004
  _element$querySelecto11 = element.querySelectorAll('.k-datepicker'), select = _element$querySelecto11[2];
987
1005
  select.click();
988
- _context21.next = 5;
1006
+ _context22.next = 5;
989
1007
  return wait();
990
1008
 
991
1009
  case 5:
@@ -995,7 +1013,7 @@ describe('Datepicker', function () {
995
1013
  second = calendar2.querySelector('.k-calendar-item:nth-child(2)');
996
1014
  first.click();
997
1015
  second.click();
998
- _context21.next = 13;
1016
+ _context22.next = 13;
999
1017
  return wait();
1000
1018
 
1001
1019
  case 13:
@@ -1004,7 +1022,7 @@ describe('Datepicker', function () {
1004
1022
 
1005
1023
  case 15:
1006
1024
  case "end":
1007
- return _context21.stop();
1025
+ return _context22.stop();
1008
1026
  }
1009
1027
  }
1010
1028
  }, _callee21);
@@ -1012,14 +1030,14 @@ describe('Datepicker', function () {
1012
1030
  it('month', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22() {
1013
1031
  var _mount20, instance, element, _element$querySelecto12, select, content, _content$querySelecto11, calendar1, calendar2, first, second, value;
1014
1032
 
1015
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
1033
+ return _regeneratorRuntime.wrap(function _callee22$(_context23) {
1016
1034
  while (1) {
1017
- switch (_context22.prev = _context22.next) {
1035
+ switch (_context23.prev = _context23.next) {
1018
1036
  case 0:
1019
1037
  _mount20 = mount(RangeDemo), instance = _mount20[0], element = _mount20[1];
1020
1038
  _element$querySelecto12 = element.querySelectorAll('.k-datepicker'), select = _element$querySelecto12[3];
1021
1039
  select.click();
1022
- _context22.next = 5;
1040
+ _context23.next = 5;
1023
1041
  return wait();
1024
1042
 
1025
1043
  case 5:
@@ -1029,7 +1047,7 @@ describe('Datepicker', function () {
1029
1047
  second = calendar2.querySelector('.k-calendar-item:nth-child(1)');
1030
1048
  first.click();
1031
1049
  second.click();
1032
- _context22.next = 13;
1050
+ _context23.next = 13;
1033
1051
  return wait();
1034
1052
 
1035
1053
  case 13:
@@ -1038,7 +1056,7 @@ describe('Datepicker', function () {
1038
1056
 
1039
1057
  case 15:
1040
1058
  case "end":
1041
- return _context22.stop();
1059
+ return _context23.stop();
1042
1060
  }
1043
1061
  }
1044
1062
  }, _callee22);
@@ -1046,19 +1064,19 @@ describe('Datepicker', function () {
1046
1064
  });
1047
1065
  describe('Keybord', function () {
1048
1066
  it('single date', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23() {
1049
- var _context23;
1067
+ var _context24;
1050
1068
 
1051
1069
  var _mount21, instance, element, now, select, content;
1052
1070
 
1053
- return _regeneratorRuntime.wrap(function _callee23$(_context24) {
1071
+ return _regeneratorRuntime.wrap(function _callee23$(_context25) {
1054
1072
  while (1) {
1055
- switch (_context24.prev = _context24.next) {
1073
+ switch (_context25.prev = _context25.next) {
1056
1074
  case 0:
1057
1075
  _mount21 = mount(BasicDemo), instance = _mount21[0], element = _mount21[1];
1058
1076
  now = new Date();
1059
1077
  select = element.querySelector('.k-datepicker');
1060
1078
  select.click();
1061
- _context24.next = 6;
1079
+ _context25.next = 6;
1062
1080
  return wait();
1063
1081
 
1064
1082
  case 6:
@@ -1067,7 +1085,7 @@ describe('Datepicker', function () {
1067
1085
  dispatchEvent(select, 'keydown', {
1068
1086
  keyCode: 40
1069
1087
  });
1070
- _context24.next = 10;
1088
+ _context25.next = 10;
1071
1089
  return wait();
1072
1090
 
1073
1091
  case 10:
@@ -1076,7 +1094,7 @@ describe('Datepicker', function () {
1076
1094
  dispatchEvent(select, 'keydown', {
1077
1095
  keyCode: 38
1078
1096
  });
1079
- _context24.next = 14;
1097
+ _context25.next = 14;
1080
1098
  return wait();
1081
1099
 
1082
1100
  case 14:
@@ -1086,7 +1104,7 @@ describe('Datepicker', function () {
1086
1104
  dispatchEvent(select, 'keydown', {
1087
1105
  keyCode: 39
1088
1106
  });
1089
- _context24.next = 19;
1107
+ _context25.next = 19;
1090
1108
  return wait();
1091
1109
 
1092
1110
  case 19:
@@ -1096,7 +1114,7 @@ describe('Datepicker', function () {
1096
1114
  dispatchEvent(select, 'keydown', {
1097
1115
  keyCode: 37
1098
1116
  });
1099
- _context24.next = 24;
1117
+ _context25.next = 24;
1100
1118
  return wait();
1101
1119
 
1102
1120
  case 24:
@@ -1106,23 +1124,23 @@ describe('Datepicker', function () {
1106
1124
  dispatchEvent(select, 'keydown', {
1107
1125
  keyCode: 13
1108
1126
  });
1109
- _context24.next = 29;
1127
+ _context25.next = 29;
1110
1128
  return wait();
1111
1129
 
1112
1130
  case 29:
1113
- expect(_mapInstanceProperty(_context23 = instance.get('date').split('-')).call(_context23, function (v) {
1131
+ expect(_mapInstanceProperty(_context24 = instance.get('date').split('-')).call(_context24, function (v) {
1114
1132
  return +v;
1115
1133
  })).to.eql([now.getFullYear(), now.getMonth() + 1, now.getDate()]); // again
1116
1134
 
1117
1135
  select.click();
1118
- _context24.next = 33;
1136
+ _context25.next = 33;
1119
1137
  return wait();
1120
1138
 
1121
1139
  case 33:
1122
1140
  dispatchEvent(select, 'keydown', {
1123
1141
  keyCode: 40
1124
1142
  });
1125
- _context24.next = 36;
1143
+ _context25.next = 36;
1126
1144
  return wait();
1127
1145
 
1128
1146
  case 36:
@@ -1130,7 +1148,7 @@ describe('Datepicker', function () {
1130
1148
 
1131
1149
  case 37:
1132
1150
  case "end":
1133
- return _context24.stop();
1151
+ return _context25.stop();
1134
1152
  }
1135
1153
  }
1136
1154
  }, _callee23);
@@ -1138,14 +1156,14 @@ describe('Datepicker', function () {
1138
1156
  it('range date', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24() {
1139
1157
  var _mount22, instance, element, select, value, _value;
1140
1158
 
1141
- return _regeneratorRuntime.wrap(function _callee24$(_context25) {
1159
+ return _regeneratorRuntime.wrap(function _callee24$(_context26) {
1142
1160
  while (1) {
1143
- switch (_context25.prev = _context25.next) {
1161
+ switch (_context26.prev = _context26.next) {
1144
1162
  case 0:
1145
1163
  _mount22 = mount(RangeDemo), instance = _mount22[0], element = _mount22[1];
1146
1164
  select = element.querySelector('.k-datepicker');
1147
1165
  select.click();
1148
- _context25.next = 5;
1166
+ _context26.next = 5;
1149
1167
  return wait();
1150
1168
 
1151
1169
  case 5:
@@ -1161,7 +1179,7 @@ describe('Datepicker', function () {
1161
1179
  dispatchEvent(select, 'keydown', {
1162
1180
  keyCode: 13
1163
1181
  });
1164
- _context25.next = 11;
1182
+ _context26.next = 11;
1165
1183
  return wait();
1166
1184
 
1167
1185
  case 11:
@@ -1169,7 +1187,7 @@ describe('Datepicker', function () {
1169
1187
  expect(value).have.lengthOf(2); // again
1170
1188
 
1171
1189
  select.click();
1172
- _context25.next = 16;
1190
+ _context26.next = 16;
1173
1191
  return wait();
1174
1192
 
1175
1193
  case 16:
@@ -1182,7 +1200,7 @@ describe('Datepicker', function () {
1182
1200
  dispatchEvent(select, 'keydown', {
1183
1201
  keyCode: 13
1184
1202
  });
1185
- _context25.next = 21;
1203
+ _context26.next = 21;
1186
1204
  return wait();
1187
1205
 
1188
1206
  case 21:
@@ -1191,23 +1209,23 @@ describe('Datepicker', function () {
1191
1209
 
1192
1210
  case 23:
1193
1211
  case "end":
1194
- return _context25.stop();
1212
+ return _context26.stop();
1195
1213
  }
1196
1214
  }
1197
1215
  }, _callee24);
1198
1216
  })));
1199
1217
  });
1200
1218
  describe('Event', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
1201
- return _regeneratorRuntime.wrap(function _callee26$(_context28) {
1219
+ return _regeneratorRuntime.wrap(function _callee26$(_context29) {
1202
1220
  while (1) {
1203
- switch (_context28.prev = _context28.next) {
1221
+ switch (_context29.prev = _context29.next) {
1204
1222
  case 0:
1205
1223
  it('selecting', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
1206
1224
  var fn, Demo, _mount23, instance, element, content, _content$querySelecto12, calendar1, calendar2, first, second;
1207
1225
 
1208
- return _regeneratorRuntime.wrap(function _callee25$(_context27) {
1226
+ return _regeneratorRuntime.wrap(function _callee25$(_context28) {
1209
1227
  while (1) {
1210
- switch (_context27.prev = _context27.next) {
1228
+ switch (_context28.prev = _context28.next) {
1211
1229
  case 0:
1212
1230
  fn = sinon.spy(function (v) {
1213
1231
  return console.log(v);
@@ -1217,7 +1235,7 @@ describe('Datepicker', function () {
1217
1235
  _inheritsLoose(Demo, _Component);
1218
1236
 
1219
1237
  function Demo() {
1220
- var _context26;
1238
+ var _context27;
1221
1239
 
1222
1240
  var _this;
1223
1241
 
@@ -1225,7 +1243,7 @@ describe('Datepicker', function () {
1225
1243
  args[_key] = arguments[_key];
1226
1244
  }
1227
1245
 
1228
- _this = _Component.call.apply(_Component, _concatInstanceProperty(_context26 = [this]).call(_context26, args)) || this;
1246
+ _this = _Component.call.apply(_Component, _concatInstanceProperty(_context27 = [this]).call(_context27, args)) || this;
1229
1247
  _this.Datepicker = Datepicker;
1230
1248
  return _this;
1231
1249
  }
@@ -1242,7 +1260,7 @@ describe('Datepicker', function () {
1242
1260
  Demo.template = "\n const {Datepicker} = this;\n <Datepicker ev-selecting={this.onSelecting} range type=\"datetime\" />\n ";
1243
1261
  _mount23 = mount(Demo), instance = _mount23[0], element = _mount23[1];
1244
1262
  element.click();
1245
- _context27.next = 7;
1263
+ _context28.next = 7;
1246
1264
  return wait();
1247
1265
 
1248
1266
  case 7:
@@ -1256,7 +1274,7 @@ describe('Datepicker', function () {
1256
1274
  second.click();
1257
1275
  expect(fn.callCount).to.eql(2);
1258
1276
  expect(fn.lastCall.args[0]).have.lengthOf(2);
1259
- _context27.next = 19;
1277
+ _context28.next = 19;
1260
1278
  return wait();
1261
1279
 
1262
1280
  case 19:
@@ -1267,7 +1285,7 @@ describe('Datepicker', function () {
1267
1285
  expect(fn.callCount).to.eql(4);
1268
1286
  expect(fn.lastCall.args[0]).have.lengthOf(2);
1269
1287
  content.querySelector('.k-datepicker-footer .k-btn').click();
1270
- _context27.next = 28;
1288
+ _context28.next = 28;
1271
1289
  return wait();
1272
1290
 
1273
1291
  case 28:
@@ -1275,7 +1293,7 @@ describe('Datepicker', function () {
1275
1293
 
1276
1294
  case 29:
1277
1295
  case "end":
1278
- return _context27.stop();
1296
+ return _context28.stop();
1279
1297
  }
1280
1298
  }
1281
1299
  }, _callee25);
@@ -1283,7 +1301,7 @@ describe('Datepicker', function () {
1283
1301
 
1284
1302
  case 1:
1285
1303
  case "end":
1286
- return _context28.stop();
1304
+ return _context29.stop();
1287
1305
  }
1288
1306
  }
1289
1307
  }, _callee26);
@@ -1291,21 +1309,21 @@ describe('Datepicker', function () {
1291
1309
  it('should disable some time pickers', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
1292
1310
  var _mount24, instance, element, input, content;
1293
1311
 
1294
- return _regeneratorRuntime.wrap(function _callee27$(_context29) {
1312
+ return _regeneratorRuntime.wrap(function _callee27$(_context30) {
1295
1313
  while (1) {
1296
- switch (_context29.prev = _context29.next) {
1314
+ switch (_context30.prev = _context30.next) {
1297
1315
  case 0:
1298
1316
  _mount24 = mount(DatetimeDemo), instance = _mount24[0], element = _mount24[1];
1299
1317
  input = element.querySelectorAll('.k-input')[1];
1300
1318
  input.click();
1301
- _context29.next = 5;
1319
+ _context30.next = 5;
1302
1320
  return wait();
1303
1321
 
1304
1322
  case 5:
1305
1323
  content = getElement('.k-datepicker-content'); // change to time panel
1306
1324
 
1307
1325
  content.querySelector('.k-calendar-item').click();
1308
- _context29.next = 9;
1326
+ _context30.next = 9;
1309
1327
  return wait();
1310
1328
 
1311
1329
  case 9:
@@ -1315,7 +1333,7 @@ describe('Datepicker', function () {
1315
1333
 
1316
1334
  case 12:
1317
1335
  case "end":
1318
- return _context29.stop();
1336
+ return _context30.stop();
1319
1337
  }
1320
1338
  }
1321
1339
  }, _callee27);
@@ -1323,51 +1341,51 @@ describe('Datepicker', function () {
1323
1341
  it('format', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {
1324
1342
  var _mount25, instance, element, _element$querySelecto13, input1, input2, input3, content;
1325
1343
 
1326
- return _regeneratorRuntime.wrap(function _callee28$(_context30) {
1344
+ return _regeneratorRuntime.wrap(function _callee28$(_context31) {
1327
1345
  while (1) {
1328
- switch (_context30.prev = _context30.next) {
1346
+ switch (_context31.prev = _context31.next) {
1329
1347
  case 0:
1330
1348
  _mount25 = mount(FormatDemo), instance = _mount25[0], element = _mount25[1];
1331
1349
  _element$querySelecto13 = element.querySelectorAll('.k-input-inner'), input1 = _element$querySelecto13[0], input2 = _element$querySelecto13[1], input3 = _element$querySelecto13[2];
1332
1350
  input1.click();
1333
- _context30.next = 5;
1351
+ _context31.next = 5;
1334
1352
  return wait();
1335
1353
 
1336
1354
  case 5:
1337
1355
  content = getElement('.k-datepicker-content');
1338
1356
  content.querySelector('.k-today').click();
1339
- _context30.next = 9;
1357
+ _context31.next = 9;
1340
1358
  return wait();
1341
1359
 
1342
1360
  case 9:
1343
1361
  expect(instance.get('date1')).to.eql(dayjs().format('MM/DD/YYYY'));
1344
1362
  expect(input1.value).to.eql(dayjs().format('MM/DD/YYYY'));
1345
1363
  input2.click();
1346
- _context30.next = 14;
1364
+ _context31.next = 14;
1347
1365
  return wait();
1348
1366
 
1349
1367
  case 14:
1350
1368
  content = getElement('.k-datepicker-content');
1351
1369
  content.querySelector('.k-today').click();
1352
- _context30.next = 18;
1370
+ _context31.next = 18;
1353
1371
  return wait();
1354
1372
 
1355
1373
  case 18:
1356
1374
  expect(instance.get('date2')).to.eql(dayjs().format('YYYY-MM-DD'));
1357
1375
  expect(input2.value).to.eql(dayjs().format('YYYY年M月D日'));
1358
1376
  input3.click();
1359
- _context30.next = 23;
1377
+ _context31.next = 23;
1360
1378
  return wait();
1361
1379
 
1362
1380
  case 23:
1363
1381
  content = getElement('.k-datepicker-content');
1364
1382
  content.querySelector('.k-today').click();
1365
- _context30.next = 27;
1383
+ _context31.next = 27;
1366
1384
  return wait();
1367
1385
 
1368
1386
  case 27:
1369
1387
  content.querySelector('.k-btn').click();
1370
- _context30.next = 30;
1388
+ _context31.next = 30;
1371
1389
  return wait();
1372
1390
 
1373
1391
  case 30:
@@ -1376,7 +1394,7 @@ describe('Datepicker', function () {
1376
1394
 
1377
1395
  case 32:
1378
1396
  case "end":
1379
- return _context30.stop();
1397
+ return _context31.stop();
1380
1398
  }
1381
1399
  }
1382
1400
  }, _callee28);
@@ -1385,15 +1403,15 @@ describe('Datepicker', function () {
1385
1403
  it('date', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29() {
1386
1404
  var _mount26, instance, element, now, content, dateDoms;
1387
1405
 
1388
- return _regeneratorRuntime.wrap(function _callee29$(_context31) {
1406
+ return _regeneratorRuntime.wrap(function _callee29$(_context32) {
1389
1407
  while (1) {
1390
- switch (_context31.prev = _context31.next) {
1408
+ switch (_context32.prev = _context32.next) {
1391
1409
  case 0:
1392
1410
  _mount26 = mount(MaxMinDemo), instance = _mount26[0], element = _mount26[1];
1393
1411
  now = dayjs().format('YYYY-MM-DD');
1394
1412
  instance.set('to', now);
1395
1413
  element.querySelector('.k-datepicker').click();
1396
- _context31.next = 6;
1414
+ _context32.next = 6;
1397
1415
  return wait();
1398
1416
 
1399
1417
  case 6:
@@ -1404,7 +1422,7 @@ describe('Datepicker', function () {
1404
1422
 
1405
1423
  case 10:
1406
1424
  case "end":
1407
- return _context31.stop();
1425
+ return _context32.stop();
1408
1426
  }
1409
1427
  }
1410
1428
  }, _callee29);
@@ -1412,21 +1430,21 @@ describe('Datepicker', function () {
1412
1430
  it('datetime', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
1413
1431
  var _mount27, instance, element, now, content;
1414
1432
 
1415
- return _regeneratorRuntime.wrap(function _callee30$(_context32) {
1433
+ return _regeneratorRuntime.wrap(function _callee30$(_context33) {
1416
1434
  while (1) {
1417
- switch (_context32.prev = _context32.next) {
1435
+ switch (_context33.prev = _context33.next) {
1418
1436
  case 0:
1419
1437
  _mount27 = mount(MaxMinDemo), instance = _mount27[0], element = _mount27[1];
1420
1438
  now = dayjs().format('YYYY-MM-DD') + '00:00:00';
1421
1439
  instance.set('toTime', now);
1422
1440
  element.querySelectorAll('.k-datepicker')[2].click();
1423
- _context32.next = 6;
1441
+ _context33.next = 6;
1424
1442
  return wait();
1425
1443
 
1426
1444
  case 6:
1427
1445
  content = getElement('.k-datepicker-content');
1428
1446
  content.querySelector('.k-today').click();
1429
- _context32.next = 10;
1447
+ _context33.next = 10;
1430
1448
  return wait();
1431
1449
 
1432
1450
  case 10:
@@ -1434,7 +1452,7 @@ describe('Datepicker', function () {
1434
1452
 
1435
1453
  case 11:
1436
1454
  case "end":
1437
- return _context32.stop();
1455
+ return _context33.stop();
1438
1456
  }
1439
1457
  }
1440
1458
  }, _callee30);
@@ -1442,9 +1460,9 @@ describe('Datepicker', function () {
1442
1460
  it('should auto place scrollSeelct to the time that equal to the minDate after selecting the date in datetime picker', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
1443
1461
  var _mount28, instance, element, date, time, fromTime, endTimeTrigger, content;
1444
1462
 
1445
- return _regeneratorRuntime.wrap(function _callee31$(_context33) {
1463
+ return _regeneratorRuntime.wrap(function _callee31$(_context34) {
1446
1464
  while (1) {
1447
- switch (_context33.prev = _context33.next) {
1465
+ switch (_context34.prev = _context34.next) {
1448
1466
  case 0:
1449
1467
  _mount28 = mount(MaxMinDemo), instance = _mount28[0], element = _mount28[1];
1450
1468
  date = dayjs().format('YYYY-MM-DD');
@@ -1453,18 +1471,18 @@ describe('Datepicker', function () {
1453
1471
  instance.set('fromTime', fromTime);
1454
1472
  endTimeTrigger = element.querySelectorAll('.k-datepicker')[3];
1455
1473
  endTimeTrigger.click();
1456
- _context33.next = 9;
1474
+ _context34.next = 9;
1457
1475
  return wait();
1458
1476
 
1459
1477
  case 9:
1460
1478
  content = getElement('.k-datepicker-content');
1461
1479
  content.querySelector('.k-today').click();
1462
- _context33.next = 13;
1480
+ _context34.next = 13;
1463
1481
  return wait();
1464
1482
 
1465
1483
  case 13:
1466
1484
  content.querySelector('.k-btn').click();
1467
- _context33.next = 16;
1485
+ _context34.next = 16;
1468
1486
  return wait();
1469
1487
 
1470
1488
  case 16:
@@ -1472,7 +1490,7 @@ describe('Datepicker', function () {
1472
1490
 
1473
1491
  case 17:
1474
1492
  case "end":
1475
- return _context33.stop();
1493
+ return _context34.stop();
1476
1494
  }
1477
1495
  }
1478
1496
  }, _callee31);
@@ -1486,7 +1504,7 @@ describe('Datepicker', function () {
1486
1504
  _inheritsLoose(Demo, _Component2);
1487
1505
 
1488
1506
  function Demo() {
1489
- var _context34;
1507
+ var _context35;
1490
1508
 
1491
1509
  var _this2;
1492
1510
 
@@ -1494,7 +1512,7 @@ describe('Datepicker', function () {
1494
1512
  args[_key2] = arguments[_key2];
1495
1513
  }
1496
1514
 
1497
- _this2 = _Component2.call.apply(_Component2, _concatInstanceProperty(_context34 = [this]).call(_context34, args)) || this;
1515
+ _this2 = _Component2.call.apply(_Component2, _concatInstanceProperty(_context35 = [this]).call(_context35, args)) || this;
1498
1516
  _this2.Datepicker = Datepicker;
1499
1517
  return _this2;
1500
1518
  }
@@ -1512,13 +1530,13 @@ describe('Datepicker', function () {
1512
1530
  globalInput = input;
1513
1531
  return /*#__PURE__*/function () {
1514
1532
  var _ref32 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(value, result) {
1515
- return _regeneratorRuntime.wrap(function _callee32$(_context35) {
1533
+ return _regeneratorRuntime.wrap(function _callee32$(_context36) {
1516
1534
  while (1) {
1517
- switch (_context35.prev = _context35.next) {
1535
+ switch (_context36.prev = _context36.next) {
1518
1536
  case 0:
1519
1537
  input.value = value;
1520
1538
  dispatchEvent(input, 'input');
1521
- _context35.next = 4;
1539
+ _context36.next = 4;
1522
1540
  return wait();
1523
1541
 
1524
1542
  case 4:
@@ -1526,7 +1544,7 @@ describe('Datepicker', function () {
1526
1544
 
1527
1545
  case 5:
1528
1546
  case "end":
1529
- return _context35.stop();
1547
+ return _context36.stop();
1530
1548
  }
1531
1549
  }
1532
1550
  }, _callee32);
@@ -1540,165 +1558,165 @@ describe('Datepicker', function () {
1540
1558
 
1541
1559
  it('basic', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
1542
1560
  var myTest;
1543
- return _regeneratorRuntime.wrap(function _callee33$(_context36) {
1561
+ return _regeneratorRuntime.wrap(function _callee33$(_context37) {
1544
1562
  while (1) {
1545
- switch (_context36.prev = _context36.next) {
1563
+ switch (_context37.prev = _context37.next) {
1546
1564
  case 0:
1547
1565
  myTest = test("<Datepicker v-model=\"value\" max=\"2021-11-11\" min=\"2020-01-01\" />"); // input incorrect value
1548
1566
 
1549
- _context36.next = 3;
1567
+ _context37.next = 3;
1550
1568
  return myTest('2020', undefined);
1551
1569
 
1552
1570
  case 3:
1553
- _context36.next = 5;
1571
+ _context37.next = 5;
1554
1572
  return myTest('2020-02-02', '2020-02-02');
1555
1573
 
1556
1574
  case 5:
1557
- _context36.next = 7;
1575
+ _context37.next = 7;
1558
1576
  return myTest('', null);
1559
1577
 
1560
1578
  case 7:
1561
- _context36.next = 9;
1579
+ _context37.next = 9;
1562
1580
  return myTest('1999-01-01', null);
1563
1581
 
1564
1582
  case 9:
1565
1583
  case "end":
1566
- return _context36.stop();
1584
+ return _context37.stop();
1567
1585
  }
1568
1586
  }
1569
1587
  }, _callee33);
1570
1588
  })));
1571
1589
  it('multiple', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34() {
1572
1590
  var myTest;
1573
- return _regeneratorRuntime.wrap(function _callee34$(_context37) {
1591
+ return _regeneratorRuntime.wrap(function _callee34$(_context38) {
1574
1592
  while (1) {
1575
- switch (_context37.prev = _context37.next) {
1593
+ switch (_context38.prev = _context38.next) {
1576
1594
  case 0:
1577
1595
  myTest = test("<Datepicker v-model=\"value\" multiple />"); // input incorrect value
1578
1596
 
1579
- _context37.next = 3;
1597
+ _context38.next = 3;
1580
1598
  return myTest('2', undefined);
1581
1599
 
1582
1600
  case 3:
1583
- _context37.next = 5;
1601
+ _context38.next = 5;
1584
1602
  return myTest('2020-02-02', ['2020-02-02']);
1585
1603
 
1586
1604
  case 5:
1587
- _context37.next = 7;
1605
+ _context38.next = 7;
1588
1606
  return myTest('2', ['2020-02-02']);
1589
1607
 
1590
1608
  case 7:
1591
- _context37.next = 9;
1609
+ _context38.next = 9;
1592
1610
  return myTest('2020-03-03', ['2020-02-02', '2020-03-03']);
1593
1611
 
1594
1612
  case 9:
1595
1613
  case "end":
1596
- return _context37.stop();
1614
+ return _context38.stop();
1597
1615
  }
1598
1616
  }
1599
1617
  }, _callee34);
1600
1618
  })));
1601
1619
  it('range', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35() {
1602
1620
  var myTest;
1603
- return _regeneratorRuntime.wrap(function _callee35$(_context38) {
1621
+ return _regeneratorRuntime.wrap(function _callee35$(_context39) {
1604
1622
  while (1) {
1605
- switch (_context38.prev = _context38.next) {
1623
+ switch (_context39.prev = _context39.next) {
1606
1624
  case 0:
1607
1625
  myTest = test("<Datepicker v-model=\"value\" range max=\"2021-11-11\" min=\"2020-01-01\" />");
1608
- _context38.next = 3;
1626
+ _context39.next = 3;
1609
1627
  return myTest('2020-03-03', undefined);
1610
1628
 
1611
1629
  case 3:
1612
- _context38.next = 5;
1630
+ _context39.next = 5;
1613
1631
  return myTest('2020-03-03~', undefined);
1614
1632
 
1615
1633
  case 5:
1616
1634
  // input correct value
1617
1635
  dispatchEvent(globalInput, 'click'); // show calendar
1618
1636
 
1619
- _context38.next = 8;
1637
+ _context39.next = 8;
1620
1638
  return wait();
1621
1639
 
1622
1640
  case 8:
1623
- _context38.next = 10;
1641
+ _context39.next = 10;
1624
1642
  return myTest('2020-03-03~2020-03-04', ['2020-03-03', '2020-03-04']);
1625
1643
 
1626
1644
  case 10:
1627
1645
  expect(getElement('.k-datepicker-content').querySelector('.k-datepicker-calendar-wrapper:nth-child(1)').innerHTML).to.matchSnapshot(); // clear value
1628
1646
 
1629
- _context38.next = 13;
1647
+ _context39.next = 13;
1630
1648
  return myTest('', null);
1631
1649
 
1632
1650
  case 13:
1633
- _context38.next = 15;
1651
+ _context39.next = 15;
1634
1652
  return myTest('1999-01-01~2020-03-04', null);
1635
1653
 
1636
1654
  case 15:
1637
1655
  case "end":
1638
- return _context38.stop();
1656
+ return _context39.stop();
1639
1657
  }
1640
1658
  }
1641
1659
  }, _callee35);
1642
1660
  })));
1643
1661
  it('datetime', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36() {
1644
1662
  var myTest;
1645
- return _regeneratorRuntime.wrap(function _callee36$(_context39) {
1663
+ return _regeneratorRuntime.wrap(function _callee36$(_context40) {
1646
1664
  while (1) {
1647
- switch (_context39.prev = _context39.next) {
1665
+ switch (_context40.prev = _context40.next) {
1648
1666
  case 0:
1649
1667
  myTest = test("<Datepicker v-model=\"value\" type=\"datetime\" />");
1650
- _context39.next = 3;
1668
+ _context40.next = 3;
1651
1669
  return myTest('2020-03-03', undefined);
1652
1670
 
1653
1671
  case 3:
1654
- _context39.next = 5;
1672
+ _context40.next = 5;
1655
1673
  return myTest('2020-03-03 02:02:02', '2020-03-03 02:02:02');
1656
1674
 
1657
1675
  case 5:
1658
1676
  case "end":
1659
- return _context39.stop();
1677
+ return _context40.stop();
1660
1678
  }
1661
1679
  }
1662
1680
  }, _callee36);
1663
1681
  })));
1664
1682
  it('datetime range', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37() {
1665
1683
  var myTest;
1666
- return _regeneratorRuntime.wrap(function _callee37$(_context40) {
1684
+ return _regeneratorRuntime.wrap(function _callee37$(_context41) {
1667
1685
  while (1) {
1668
- switch (_context40.prev = _context40.next) {
1686
+ switch (_context41.prev = _context41.next) {
1669
1687
  case 0:
1670
1688
  myTest = test('<Datepicker v-model="value" type="datetime" range />');
1671
- _context40.next = 3;
1689
+ _context41.next = 3;
1672
1690
  return myTest('2020-08-11 00:00:00 ~ 2020-08-11 01:00:00', ['2020-08-11 00:00:00', '2020-08-11 01:00:00']);
1673
1691
 
1674
1692
  case 3:
1675
- _context40.next = 5;
1693
+ _context41.next = 5;
1676
1694
  return myTest('2020-08-11 00:01:00 ~ 2020-08-11 01:00:00', ['2020-08-11 00:01:00', '2020-08-11 01:00:00']);
1677
1695
 
1678
1696
  case 5:
1679
- _context40.next = 7;
1697
+ _context41.next = 7;
1680
1698
  return myTest('2020-08-11 00:01:00 ~ 2020-08-11 01:01:00', ['2020-08-11 00:01:00', '2020-08-11 01:01:00']);
1681
1699
 
1682
1700
  case 7:
1683
1701
  case "end":
1684
- return _context40.stop();
1702
+ return _context41.stop();
1685
1703
  }
1686
1704
  }
1687
1705
  }, _callee37);
1688
1706
  })));
1689
1707
  it('date format', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38() {
1690
1708
  var myTest;
1691
- return _regeneratorRuntime.wrap(function _callee38$(_context41) {
1709
+ return _regeneratorRuntime.wrap(function _callee38$(_context42) {
1692
1710
  while (1) {
1693
- switch (_context41.prev = _context41.next) {
1711
+ switch (_context42.prev = _context42.next) {
1694
1712
  case 0:
1695
1713
  myTest = test("<Datepicker v-model=\"value\" showFormat=\"YYYY\u5E74M\u6708D\u65E5\" />");
1696
- _context41.next = 3;
1714
+ _context42.next = 3;
1697
1715
  return myTest('2020年2月19日', '2020-02-19');
1698
1716
 
1699
1717
  case 3:
1700
1718
  case "end":
1701
- return _context41.stop();
1719
+ return _context42.stop();
1702
1720
  }
1703
1721
  }
1704
1722
  }, _callee38);