@autobest-ui/components 1.4.0 → 2.0.1

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 (183) hide show
  1. package/esm/accordion/Item.d.ts +1 -1
  2. package/esm/accordion/Item.js +5 -3
  3. package/esm/accordion/index.d.ts +1 -1
  4. package/esm/accordion/index.js +5 -3
  5. package/esm/affix/PortalAffix.js +7 -7
  6. package/esm/affix/index.js +19 -17
  7. package/esm/carousel/index.js +16 -14
  8. package/esm/checkbox/index.js +19 -17
  9. package/esm/collapse/index.js +13 -11
  10. package/esm/confirm/index.d.ts +1 -1
  11. package/esm/confirm/index.js +14 -14
  12. package/esm/date-picker/calendar/Day.d.ts +1 -1
  13. package/esm/date-picker/calendar/Day.js +11 -11
  14. package/esm/date-picker/calendar/MonthYear.js +8 -8
  15. package/esm/date-picker/calendar/grid/index.js +18 -18
  16. package/esm/date-picker/calendar/index.js +7 -5
  17. package/esm/date-picker/calendar/types.js +1 -0
  18. package/esm/date-picker/index.js +15 -13
  19. package/esm/drawer/Child.js +6 -6
  20. package/esm/drawer/index.js +11 -9
  21. package/esm/ellipsis/index.js +4 -4
  22. package/esm/guide/index.d.ts +4 -5
  23. package/esm/guide/index.js +19 -19
  24. package/esm/index.d.ts +0 -1
  25. package/esm/index.js +0 -1
  26. package/esm/input-number/index.d.ts +4 -4
  27. package/esm/input-number/index.js +27 -25
  28. package/esm/lazy-image/index.d.ts +3 -3
  29. package/esm/lazy-image/index.js +6 -4
  30. package/esm/link-list/index.js +24 -22
  31. package/esm/link-list/style/index.css +1 -1
  32. package/esm/loading/index.d.ts +7 -2
  33. package/esm/loading/index.js +20 -26
  34. package/esm/loading/style/index.css +1 -1
  35. package/esm/loading/style/index.scss +0 -10
  36. package/esm/loading-bar/index.d.ts +1 -0
  37. package/esm/loading-bar/index.js +3 -3
  38. package/esm/loading-container/index.js +6 -6
  39. package/esm/loading-icon/index.js +12 -12
  40. package/esm/mask/index.js +4 -4
  41. package/esm/message/index.js +14 -14
  42. package/esm/modal/Affix.d.ts +1 -0
  43. package/esm/modal/Affix.js +1 -1
  44. package/esm/modal/Title.js +9 -9
  45. package/esm/modal/getPopupLocation.js +1 -1
  46. package/esm/modal/index.d.ts +1 -1
  47. package/esm/modal/index.js +21 -19
  48. package/esm/modal/style/index.css +1 -1
  49. package/esm/move/index.d.ts +1 -1
  50. package/esm/move/index.js +14 -12
  51. package/esm/popover/index.js +9 -9
  52. package/esm/portal/index.js +5 -3
  53. package/esm/script/index.js +8 -6
  54. package/esm/select/index.d.ts +3 -3
  55. package/esm/select/index.js +34 -36
  56. package/esm/show-more/index.js +14 -12
  57. package/esm/skeleton/Item.js +3 -3
  58. package/esm/skeleton/index.js +11 -15
  59. package/esm/style.css +14 -15
  60. package/esm/table/body/BodyRow.js +8 -8
  61. package/esm/table/body/CheckIcon.js +7 -7
  62. package/esm/table/body/index.d.ts +1 -1
  63. package/esm/table/body/index.js +6 -6
  64. package/esm/table/header/CheckIcon.js +6 -6
  65. package/esm/table/header/HeaderCell.d.ts +1 -1
  66. package/esm/table/header/HeaderCell.js +10 -8
  67. package/esm/table/header/HeaderRow.d.ts +1 -0
  68. package/esm/table/header/HeaderRow.js +2 -2
  69. package/esm/table/index.d.ts +3 -7
  70. package/esm/table/index.js +20 -18
  71. package/esm/table/interface.js +1 -0
  72. package/esm/tabs/index.d.ts +1 -1
  73. package/esm/tabs/index.js +14 -12
  74. package/esm/tooltip/index.d.ts +1 -0
  75. package/esm/tooltip/index.js +1 -1
  76. package/esm/trigger/bottomAlign.js +2 -2
  77. package/esm/trigger/getPopupLocation.js +2 -1
  78. package/esm/trigger/index.d.ts +4 -4
  79. package/esm/trigger/index.js +24 -22
  80. package/esm/trigger/leftAlign.js +2 -2
  81. package/esm/trigger/rightAlign.js +2 -2
  82. package/esm/trigger/topAlign.js +2 -2
  83. package/esm/trigger/utils.js +2 -2
  84. package/lib/accordion/Item.d.ts +1 -1
  85. package/lib/accordion/Item.js +5 -3
  86. package/lib/accordion/index.d.ts +1 -1
  87. package/lib/accordion/index.js +5 -3
  88. package/lib/affix/PortalAffix.js +7 -7
  89. package/lib/affix/index.js +19 -17
  90. package/lib/carousel/index.js +16 -14
  91. package/lib/checkbox/index.js +19 -17
  92. package/lib/collapse/index.js +13 -11
  93. package/lib/confirm/index.d.ts +1 -1
  94. package/lib/confirm/index.js +14 -14
  95. package/lib/date-picker/calendar/Day.d.ts +1 -1
  96. package/lib/date-picker/calendar/Day.js +12 -12
  97. package/lib/date-picker/calendar/MonthYear.js +9 -9
  98. package/lib/date-picker/calendar/grid/index.js +18 -18
  99. package/lib/date-picker/calendar/index.js +8 -6
  100. package/lib/date-picker/calendar/types.js +5 -1
  101. package/lib/date-picker/index.js +15 -13
  102. package/lib/date-picker/utils.js +8 -8
  103. package/lib/drawer/Child.js +6 -6
  104. package/lib/drawer/index.js +11 -9
  105. package/lib/ellipsis/index.js +4 -4
  106. package/lib/guide/index.d.ts +4 -5
  107. package/lib/guide/index.js +19 -20
  108. package/lib/index.d.ts +0 -1
  109. package/lib/index.js +54 -62
  110. package/lib/input-number/index.d.ts +4 -4
  111. package/lib/input-number/index.js +27 -25
  112. package/lib/lazy-image/index.d.ts +3 -3
  113. package/lib/lazy-image/index.js +6 -4
  114. package/lib/link-list/index.js +24 -22
  115. package/lib/link-list/style/index.css +1 -1
  116. package/lib/loading/index.d.ts +7 -2
  117. package/lib/loading/index.js +20 -27
  118. package/lib/loading/style/index.css +1 -1
  119. package/lib/loading/style/index.scss +0 -10
  120. package/lib/loading-bar/index.d.ts +1 -0
  121. package/lib/loading-bar/index.js +3 -3
  122. package/lib/loading-container/index.js +6 -6
  123. package/lib/loading-icon/index.js +12 -12
  124. package/lib/mask/index.js +4 -4
  125. package/lib/message/index.js +14 -14
  126. package/lib/modal/Affix.d.ts +1 -0
  127. package/lib/modal/Affix.js +1 -1
  128. package/lib/modal/Title.js +9 -9
  129. package/lib/modal/getPopupLocation.js +1 -1
  130. package/lib/modal/index.d.ts +1 -1
  131. package/lib/modal/index.js +22 -20
  132. package/lib/modal/style/index.css +1 -1
  133. package/lib/move/index.d.ts +1 -1
  134. package/lib/move/index.js +14 -12
  135. package/lib/popover/index.js +9 -9
  136. package/lib/portal/index.js +5 -3
  137. package/lib/script/index.js +8 -6
  138. package/lib/select/index.d.ts +3 -3
  139. package/lib/select/index.js +34 -36
  140. package/lib/show-more/index.js +14 -12
  141. package/lib/skeleton/Item.js +3 -3
  142. package/lib/skeleton/index.js +11 -15
  143. package/lib/style.css +14 -15
  144. package/lib/table/body/BodyRow.js +8 -8
  145. package/lib/table/body/CheckIcon.js +7 -7
  146. package/lib/table/body/index.d.ts +1 -1
  147. package/lib/table/body/index.js +6 -6
  148. package/lib/table/header/CheckIcon.js +6 -6
  149. package/lib/table/header/HeaderCell.d.ts +1 -1
  150. package/lib/table/header/HeaderCell.js +10 -8
  151. package/lib/table/header/HeaderRow.d.ts +1 -0
  152. package/lib/table/header/HeaderRow.js +2 -2
  153. package/lib/table/index.d.ts +3 -7
  154. package/lib/table/index.js +20 -18
  155. package/lib/table/interface.js +5 -1
  156. package/lib/tabs/index.d.ts +1 -1
  157. package/lib/tabs/index.js +14 -12
  158. package/lib/tooltip/index.d.ts +1 -0
  159. package/lib/tooltip/index.js +1 -1
  160. package/lib/trigger/align.js +24 -24
  161. package/lib/trigger/bottomAlign.js +3 -3
  162. package/lib/trigger/constants.js +1 -1
  163. package/lib/trigger/getPopupLocation.js +2 -1
  164. package/lib/trigger/index.d.ts +4 -4
  165. package/lib/trigger/index.js +25 -23
  166. package/lib/trigger/leftAlign.js +3 -3
  167. package/lib/trigger/ref.js +1 -1
  168. package/lib/trigger/rightAlign.js +3 -3
  169. package/lib/trigger/topAlign.js +3 -3
  170. package/lib/trigger/utils.js +4 -4
  171. package/package.json +3 -3
  172. package/esm/use-config/index.d.ts +0 -5
  173. package/esm/use-config/index.js +0 -13
  174. package/esm/use-config/style/index.css +0 -0
  175. package/esm/use-config/style/index.d.ts +0 -1
  176. package/esm/use-config/style/index.js +0 -1
  177. package/esm/use-config/style/index.scss +0 -0
  178. package/lib/use-config/index.d.ts +0 -5
  179. package/lib/use-config/index.js +0 -21
  180. package/lib/use-config/style/index.css +0 -0
  181. package/lib/use-config/style/index.d.ts +0 -1
  182. package/lib/use-config/style/index.js +0 -1
  183. package/lib/use-config/style/index.scss +0 -0
@@ -6,11 +6,11 @@ function Times(_a) {
6
6
  closable = _a.closable;
7
7
 
8
8
  if (closable) {
9
- return React.createElement("span", {
10
- className: prefixCls + "-times",
9
+ return /*#__PURE__*/React.createElement("span", {
10
+ className: "".concat(prefixCls, "-times"),
11
11
  onMouseDown: onClose,
12
12
  onTouchStart: onClose
13
- }, React.createElement("svg", {
13
+ }, /*#__PURE__*/React.createElement("svg", {
14
14
  viewBox: "64 64 896 896",
15
15
  className: "",
16
16
  "data-icon": "close",
@@ -19,7 +19,7 @@ function Times(_a) {
19
19
  fill: "currentColor",
20
20
  "aria-hidden": "true",
21
21
  focusable: "false"
22
- }, React.createElement("path", {
22
+ }, /*#__PURE__*/React.createElement("path", {
23
23
  d: "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"
24
24
  })));
25
25
  }
@@ -34,20 +34,20 @@ function Title(_a) {
34
34
  onClose = _a.onClose;
35
35
 
36
36
  if (title) {
37
- return React.createElement("div", {
38
- className: prefixCls + "-title"
39
- }, title, React.createElement(Times, {
37
+ return /*#__PURE__*/React.createElement("div", {
38
+ className: "".concat(prefixCls, "-title")
39
+ }, title, /*#__PURE__*/React.createElement(Times, {
40
40
  prefixCls: prefixCls,
41
41
  closable: closable,
42
42
  onClose: onClose
43
43
  }));
44
44
  }
45
45
 
46
- return React.createElement(Times, {
46
+ return /*#__PURE__*/React.createElement(Times, {
47
47
  prefixCls: prefixCls,
48
48
  closable: closable,
49
49
  onClose: onClose
50
50
  });
51
51
  }
52
52
 
53
- export default React.memo(Title);
53
+ export default /*#__PURE__*/React.memo(Title);
@@ -7,7 +7,7 @@ export default function getPopupLocation(_a) {
7
7
  var clientSize = getAvailSize(true);
8
8
  var popupSize = getElementSize(element);
9
9
  var doubleLimit = popupLimitSpacing * 2;
10
- var height = popupSize.height > clientSize.height - doubleLimit ? clientSize.height - doubleLimit + "px" : '';
10
+ var height = popupSize.height > clientSize.height - doubleLimit ? "".concat(clientSize.height - doubleLimit, "px") : '';
11
11
 
12
12
  if (placement === 'top') {
13
13
  return {
@@ -77,7 +77,7 @@ interface ModalStates {
77
77
  cacheVisible: boolean;
78
78
  }
79
79
  declare class Modal extends React.Component<ModalProps, ModalStates> {
80
- static Affix: React.ComponentType<Required<Pick<import("../portal").PortalProps, "children" | "getContainer">>>;
80
+ static Affix: React.ComponentType<Required<Omit<import("../portal").PortalProps, "didUpdate">>>;
81
81
  static cacheOpenedIds: number[];
82
82
  openId: number;
83
83
  prefixCls: string;
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
6
6
  d.__proto__ = b;
7
7
  } || function (d, b) {
8
8
  for (var p in b) {
9
- if (b.hasOwnProperty(p)) d[p] = b[p];
9
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
10
10
  }
11
11
  };
12
12
 
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
14
14
  };
15
15
 
16
16
  return function (d, b) {
17
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
18
+
17
19
  _extendStatics(d, b);
18
20
 
19
21
  function __() {
@@ -29,9 +31,9 @@ import { CSSTransition } from 'react-transition-group';
29
31
  import classNames from 'classnames';
30
32
  import { addEventListener, hasVerticalScrollbar, isTouchScreen, getElementSize, getStyle, contains, getStyleValue, getScrollBarSize } from '@autobest-ui/utils';
31
33
  import Portal from '../portal';
34
+ import Mask from '../mask';
32
35
  import Title from './Title';
33
36
  import Affix from './Affix';
34
- import Mask from '../mask';
35
37
  import getPopupLocation from './getPopupLocation';
36
38
 
37
39
  function getId() {
@@ -53,8 +55,8 @@ function (_super) {
53
55
  _this.openId = getId();
54
56
  _this.prefixCls = 'ab-modal';
55
57
  _this.scrollBarSize = 0;
56
- _this.popupRef = React.createRef();
57
- _this.maskRef = React.createRef();
58
+ _this.popupRef = /*#__PURE__*/React.createRef();
59
+ _this.maskRef = /*#__PURE__*/React.createRef();
58
60
  /**
59
61
  * 全局事件回调
60
62
  * @param event
@@ -139,11 +141,11 @@ function (_super) {
139
141
  currentDocument.style.overflow = 'hidden';
140
142
 
141
143
  if (hasVerticalScrollbar(_this.scrollBarSize)) {
142
- currentDocument.style.paddingRight = _this.scrollBarSize + "px";
144
+ currentDocument.style.paddingRight = "".concat(_this.scrollBarSize, "px");
143
145
 
144
146
  if (element && element.parentNode) {
145
147
  var parentNode = element.parentNode;
146
- parentNode.style.paddingRight = _this.scrollBarSize + "px";
148
+ parentNode.style.paddingRight = "".concat(_this.scrollBarSize, "px");
147
149
  }
148
150
  }
149
151
  }
@@ -178,9 +180,9 @@ function (_super) {
178
180
  var popupHeight = height || _this.props.height;
179
181
 
180
182
  if (!popupHeight || popupHeight === 'auto') {
181
- lastChild.style.maxHeight = "calc(100vh - .3rem - " + (placement === 'top' && top ? top : '0px') + " - " + firstChildHeight + "px)";
183
+ lastChild.style.maxHeight = "calc(100vh - .3rem - ".concat(placement === 'top' && top ? top : '0px', " - ").concat(firstChildHeight, "px)");
182
184
  } else {
183
- lastChild.style.maxHeight = "calc(100% - " + firstChildHeight + "px)";
185
+ lastChild.style.maxHeight = "calc(100% - ".concat(firstChildHeight, "px)");
184
186
  }
185
187
  });
186
188
  }
@@ -365,27 +367,27 @@ function (_super) {
365
367
  title = _b.title,
366
368
  placement = _b.placement,
367
369
  top = _b.top;
368
- var maxHeight = "calc(100vh - .3rem - " + (placement === 'top' && top ? top : '0px') + ")";
369
- return React.createElement("div", {
370
- className: classNames(cls, className, (_a = {}, _a[cls + "-center"] = placement === 'center', _a[this.prefixCls + "-hidden"] = !visible && !this.state.isUserOperated, _a))
371
- }, React.createElement(CSSTransition, {
370
+ var maxHeight = "calc(100vh - .3rem - ".concat(placement === 'top' && top ? top : '0px', ")");
371
+ return /*#__PURE__*/React.createElement("div", {
372
+ className: classNames(cls, className, (_a = {}, _a["".concat(cls, "-center")] = placement === 'center', _a["".concat(this.prefixCls, "-hidden")] = !visible && !this.state.isUserOperated, _a))
373
+ }, /*#__PURE__*/React.createElement(CSSTransition, {
372
374
  "in": visible,
373
375
  timeout: 300,
374
- classNames: cls + "-fade",
376
+ classNames: "".concat(cls, "-fade"),
375
377
  onEnter: this.onEnter,
376
378
  onEntered: this.onEntered,
377
379
  onExited: this.onExited,
378
380
  appear: true
379
381
  }, function (state) {
380
- return React.createElement("div", {
381
- className: cls + "-content",
382
+ return /*#__PURE__*/React.createElement("div", {
383
+ className: "".concat(cls, "-content"),
382
384
  style: state !== 'exited' ? {
383
385
  width: width,
384
386
  height: height,
385
387
  maxHeight: maxHeight
386
388
  } : undefined,
387
389
  ref: _this.popupRef
388
- }, React.createElement(Title, {
390
+ }, /*#__PURE__*/React.createElement(Title, {
389
391
  prefixCls: cls,
390
392
  closable: closable,
391
393
  onClose: _this.onClose,
@@ -400,16 +402,16 @@ function (_super) {
400
402
  var visible = this.props.visible; // 插入元素,不使用传送门, 和当前元素同级
401
403
 
402
404
  if (this.props.isInsertNode) {
403
- return React.createElement(React.Fragment, null, React.createElement(Mask, {
405
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
404
406
  visible: visible,
405
- className: classNames((_a = {}, _a[this.prefixCls + "-hidden"] = !visible && !this.state.isUserOperated, _a)),
407
+ className: classNames((_a = {}, _a["".concat(this.prefixCls, "-hidden")] = !visible && !this.state.isUserOperated, _a)),
406
408
  timeout: 500,
407
409
  ref: this.maskRef
408
410
  }), this.renderPopup());
409
411
  }
410
412
 
411
413
  if (visible || this.popupRef.current) {
412
- return React.createElement(Portal, null, React.createElement(React.Fragment, null, React.createElement(Mask, {
414
+ return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
413
415
  visible: visible,
414
416
  timeout: 500,
415
417
  ref: this.maskRef
@@ -1 +1 @@
1
- .ab-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:101;overflow:auto;outline:0}.ab-modal.ab-modal-center{text-align:center}.ab-modal.ab-modal-center:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:''}.ab-modal.ab-modal-center .ab-modal-content{top:0;text-align:left;display:inline-block;vertical-align:middle}.ab-modal-content{position:relative;background-color:#fff;max-width:calc(100vw - .3rem);margin-left:auto;margin-right:auto;overflow:auto;-webkit-overflow-scrolling:touch;transition:transform .3s,opacity .3s cubic-bezier(.7,.3,.1,1);z-index:101}.ab-modal-title{position:relative;width:100%}.ab-modal-title .ab-modal-times{top:50%;transform:translateY(-50%)}.ab-modal-times{position:absolute;top:.12rem;right:.12rem;font-size:.15rem;color:#b0b0b0;cursor:pointer}.ab-modal-times svg{display:block}.ab-modal-times:hover{color:#333}.ab-modal-hidden{display:none}@media only screen and (max-width:767px){.ab-modal-content{width:calc(100vw - .3rem)}}.ab-modal-fade-appear,.ab-modal-fade-enter{transform:translate3d(0,-30px,0);opacity:0}.ab-modal-fade-appear-active,.ab-modal-fade-enter-active{transform:translateZ(0);opacity:1}.ab-modal-fade-enter-done{transform:translateZ(0);opacity:1}.ab-modal-fade-exit{transform:translateZ(0);opacity:1}.ab-modal-fade-exit-active{transform:translate3d(0,-30px,0);opacity:0}.ab-modal-fade-exit-done{display:none}
1
+ .ab-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:101;overflow:auto;outline:0}.ab-modal.ab-modal-center{text-align:center}.ab-modal.ab-modal-center:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:""}.ab-modal.ab-modal-center .ab-modal-content{top:0;text-align:left;display:inline-block;vertical-align:middle}.ab-modal-content{position:relative;background-color:#fff;max-width:calc(100vw - .3rem);margin-left:auto;margin-right:auto;overflow:auto;-webkit-overflow-scrolling:touch;transition:transform .3s,opacity .3s cubic-bezier(.7,.3,.1,1);z-index:101}.ab-modal-title{position:relative;width:100%}.ab-modal-title .ab-modal-times{top:50%;transform:translateY(-50%)}.ab-modal-times{position:absolute;top:.12rem;right:.12rem;font-size:.15rem;color:#b0b0b0;cursor:pointer}.ab-modal-times svg{display:block}.ab-modal-times:hover{color:#333}.ab-modal-hidden{display:none}@media only screen and (max-width:767px){.ab-modal-content{width:calc(100vw - .3rem)}}.ab-modal-fade-appear,.ab-modal-fade-enter{transform:translate3d(0,-30px,0);opacity:0}.ab-modal-fade-appear-active,.ab-modal-fade-enter-active{transform:translateZ(0);opacity:1}.ab-modal-fade-enter-done{transform:translateZ(0);opacity:1}.ab-modal-fade-exit{transform:translateZ(0);opacity:1}.ab-modal-fade-exit-active{transform:translate3d(0,-30px,0);opacity:0}.ab-modal-fade-exit-done{display:none}
@@ -107,6 +107,6 @@ declare class Move extends React.Component<MoveProps> {
107
107
  setElementInfo(element: any): void;
108
108
  onTransitionEnd: () => void;
109
109
  getDomNode(): HTMLElement;
110
- render(): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
110
+ render(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
111
111
  }
112
112
  export default Move;
package/esm/move/index.js CHANGED
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
6
6
  d.__proto__ = b;
7
7
  } || function (d, b) {
8
8
  for (var p in b) {
9
- if (b.hasOwnProperty(p)) d[p] = b[p];
9
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
10
10
  }
11
11
  };
12
12
 
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
14
14
  };
15
15
 
16
16
  return function (d, b) {
17
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
18
+
17
19
  _extendStatics(d, b);
18
20
 
19
21
  function __() {
@@ -83,7 +85,7 @@ function (_super) {
83
85
  _this.isTouchScale = false; // 强制刷新元素位置
84
86
 
85
87
  _this.isForceUpdatePlacement = false;
86
- _this.moveRef = React.createRef();
88
+ _this.moveRef = /*#__PURE__*/React.createRef();
87
89
  _this.updateTimer = null;
88
90
 
89
91
  _this.refreshInfo = function (el, prevProps) {
@@ -353,34 +355,34 @@ function (_super) {
353
355
  }
354
356
 
355
357
  this.updateTimer = setTimeout(function () {
356
- var element = _this.getDomNode();
358
+ var currentElement = _this.getDomNode();
357
359
 
358
- if (!element) {
360
+ if (!currentElement) {
359
361
  return;
360
362
  }
361
363
 
362
- _this.refreshInfo(element, prevProps);
364
+ _this.refreshInfo(currentElement, prevProps);
363
365
 
364
366
  var isTouch = isTouchScreen();
365
367
 
366
368
  if (!_this.startHandler) {
367
369
  var eventType = isTouch ? 'touchstart' : 'mousedown';
368
- _this.startHandler = addEventListener(element, eventType, function (ev) {
369
- return _this.onStart(ev, element);
370
+ _this.startHandler = addEventListener(currentElement, eventType, function (ev) {
371
+ return _this.onStart(ev, currentElement);
370
372
  });
371
373
  } // 不支持Touch的设备监听滚动
372
374
 
373
375
 
374
376
  if (_this.props.scalable && !isTouch && !_this.mousewheelHandler) {
375
- _this.mousewheelHandler = addEventListener(element, 'wheel', function (ev) {
376
- return _this.onMousewheel(ev, element);
377
+ _this.mousewheelHandler = addEventListener(currentElement, 'wheel', function (ev) {
378
+ return _this.onMousewheel(ev, currentElement);
377
379
  });
378
380
  } // 加入 resize 监听
379
381
 
380
382
 
381
383
  if (_this.props.monitorWindowResize && !_this.resizeHandler) {
382
384
  _this.resizeHandler = addEventListener(window, 'resize', throttleWithRAF(function () {
383
- return _this.refreshInfo(element, prevProps);
385
+ return _this.refreshInfo(currentElement, prevProps);
384
386
  }));
385
387
  }
386
388
  }, 0);
@@ -440,7 +442,7 @@ function (_super) {
440
442
  };
441
443
 
442
444
  Move.prototype.setElementInfo = function (element) {
443
- element.style.transform = "translate(" + this.currentObj.left + "px, " + this.currentObj.top + "px) scale(" + this.currentScaleSize + ")";
445
+ element.style.transform = "translate(".concat(this.currentObj.left, "px, ").concat(this.currentObj.top, "px) scale(").concat(this.currentScaleSize, ")");
444
446
  };
445
447
 
446
448
  Move.prototype.getDomNode = function () {
@@ -456,7 +458,7 @@ function (_super) {
456
458
  var child = React.Children.only(children);
457
459
 
458
460
  if (ReactIs.isElement(child) && !ReactIs.isFragment(child)) {
459
- return React.cloneElement(child, {
461
+ return /*#__PURE__*/React.cloneElement(child, {
460
462
  ref: this.moveRef,
461
463
  onTransitionEnd: this.onTransitionEnd,
462
464
  className: classNames(this.prefixCls, child.props.className)
@@ -54,30 +54,30 @@ function Popover(props) {
54
54
 
55
55
 
56
56
  if (closeIcon) {
57
- return React.cloneElement(closeIcon, {
57
+ return /*#__PURE__*/React.cloneElement(closeIcon, {
58
58
  onClick: onHidePopup
59
59
  });
60
60
  }
61
61
 
62
- return React.createElement("i", {
63
- className: classNames(cls + "-close", closeClassName),
62
+ return /*#__PURE__*/React.createElement("i", {
63
+ className: classNames("".concat(cls, "-close"), closeClassName),
64
64
  onClick: onHidePopup
65
65
  }, "\xD7");
66
66
  }
67
67
 
68
- var innerClass = classNames(cls + "-inner", innerClassName, (_a = {}, _a[cls + "-inner-expand"] = !hiddenClose, _a));
68
+ var innerClass = classNames("".concat(cls, "-inner"), innerClassName, (_a = {}, _a["".concat(cls, "-inner-expand")] = !hiddenClose, _a));
69
69
 
70
70
  function renderPopup() {
71
- return React.createElement(React.Fragment, null, renderClose(), React.createElement("i", {
72
- className: classNames(cls + "-arrow", arrowClassName),
71
+ return /*#__PURE__*/React.createElement(React.Fragment, null, renderClose(), /*#__PURE__*/React.createElement("i", {
72
+ className: classNames("".concat(cls, "-arrow"), arrowClassName),
73
73
  style: arrowStyle
74
- }), React.createElement("div", {
74
+ }), /*#__PURE__*/React.createElement("div", {
75
75
  className: innerClass
76
76
  }, tip));
77
77
  }
78
78
 
79
- return React.createElement(Trigger, __assign({}, props, {
80
- wrapClassName: classNames(cls + "-wrap ", props.wrapClassName),
79
+ return /*#__PURE__*/React.createElement(Trigger, __assign({}, props, {
80
+ wrapClassName: classNames("".concat(cls, "-wrap "), props.wrapClassName),
81
81
  ref: triggerEl,
82
82
  hiddenArrow: false,
83
83
  popup: renderPopup,
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
6
6
  d.__proto__ = b;
7
7
  } || function (d, b) {
8
8
  for (var p in b) {
9
- if (b.hasOwnProperty(p)) d[p] = b[p];
9
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
10
10
  }
11
11
  };
12
12
 
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
14
14
  };
15
15
 
16
16
  return function (d, b) {
17
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
18
+
17
19
  _extendStatics(d, b);
18
20
 
19
21
  function __() {
@@ -67,10 +69,10 @@ function (_super) {
67
69
 
68
70
  Portal.prototype.render = function () {
69
71
  if (this.container) {
70
- return ReactDOM.createPortal(this.props.children, this.container);
72
+ return /*#__PURE__*/ReactDOM.createPortal(this.props.children, this.container);
71
73
  }
72
74
 
73
- return React.createElement(React.Fragment, null);
75
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
74
76
  };
75
77
 
76
78
  Portal.getContainer = function () {
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
6
6
  d.__proto__ = b;
7
7
  } || function (d, b) {
8
8
  for (var p in b) {
9
- if (b.hasOwnProperty(p)) d[p] = b[p];
9
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
10
10
  }
11
11
  };
12
12
 
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
14
14
  };
15
15
 
16
16
  return function (d, b) {
17
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
18
+
17
19
  _extendStatics(d, b);
18
20
 
19
21
  function __() {
@@ -72,7 +74,7 @@ function (_super) {
72
74
  if (isRefresh || preProps.beforeCode !== beforeCode) {
73
75
  // 这里只支持在url改变时,删除code, 并不对code进行判断来删除url的script, 原因是没有这种需求
74
76
  if (cancelable && preProps && preProps.beforeCode !== beforeCode) {
75
- var preCodeElement = document.querySelector("script[data-src='" + preProps.url + "']");
77
+ var preCodeElement = document.querySelector("script[data-src='".concat(preProps.url, "']"));
76
78
 
77
79
  if (preCodeElement && preCodeElement.remove) {
78
80
  preCodeElement.remove();
@@ -86,16 +88,16 @@ function (_super) {
86
88
 
87
89
 
88
90
  if (isRefresh || url !== preProps.url) {
89
- var scriptsElement = document.querySelector("script[src='" + url + "']"); // 如果已经存在, 警告, 并终止执行
91
+ var scriptsElement = document.querySelector("script[src='".concat(url, "']")); // 如果已经存在, 警告, 并终止执行
90
92
 
91
93
  if (scriptsElement) {
92
94
  // eslint-disable-next-line no-console
93
- console.error("Src: " + url + " has been created, the corresponding callback will no longer be executed, Please use it directly");
95
+ console.error("Src: ".concat(url, " has been created, the corresponding callback will no longer be executed, Please use it directly"));
94
96
  return;
95
97
  }
96
98
 
97
99
  if (cancelable && preProps && url !== preProps.url) {
98
- var preScriptsElement = document.querySelector("script[src='" + preProps.url + "']");
100
+ var preScriptsElement = document.querySelector("script[src='".concat(preProps.url, "']"));
99
101
 
100
102
  if (preScriptsElement && preScriptsElement.remove) {
101
103
  preScriptsElement.remove();
@@ -127,7 +129,7 @@ function (_super) {
127
129
  onRemove = _a.onRemove;
128
130
 
129
131
  if (cancelable && url) {
130
- var scriptsElement = document.querySelector("script[src='" + url + "']");
132
+ var scriptsElement = document.querySelector("script[src='".concat(url, "']"));
131
133
 
132
134
  if (scriptsElement && scriptsElement.remove) {
133
135
  scriptsElement.remove();
@@ -110,8 +110,8 @@ declare class Select extends React.Component<SelectProps, SelectStates> {
110
110
  triggerSelect: (status?: boolean) => void;
111
111
  onTriggerSelect: () => void;
112
112
  onSelecting(ev: React.MouseEvent | React.TouchEvent, item: any): void;
113
- renderTitle(): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
114
- renderBottom(): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
113
+ renderTitle(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
114
+ renderBottom(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
115
115
  /**
116
116
  * 下拉框内容
117
117
  */
@@ -120,7 +120,7 @@ declare class Select extends React.Component<SelectProps, SelectStates> {
120
120
  * 根据value获取当前的name,并显示出来
121
121
  * @returns {*}
122
122
  */
123
- getCurrentName(): React.ReactChild;
123
+ getCurrentName(): NameValue;
124
124
  render(): JSX.Element;
125
125
  }
126
126
  export default Select;
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
6
6
  d.__proto__ = b;
7
7
  } || function (d, b) {
8
8
  for (var p in b) {
9
- if (b.hasOwnProperty(p)) d[p] = b[p];
9
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
10
10
  }
11
11
  };
12
12
 
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
14
14
  };
15
15
 
16
16
  return function (d, b) {
17
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
18
+
17
19
  _extendStatics(d, b);
18
20
 
19
21
  function __() {
@@ -53,18 +55,14 @@ var __rest = this && this.__rest || function (s, e) {
53
55
  return t;
54
56
  };
55
57
 
56
- var __spreadArrays = this && this.__spreadArrays || function () {
57
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
58
- s += arguments[i].length;
59
- }
60
-
61
- for (var r = Array(s), k = 0, i = 0; i < il; i++) {
62
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
63
- r[k] = a[j];
58
+ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
59
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
60
+ if (ar || !(i in from)) {
61
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
62
+ ar[i] = from[i];
64
63
  }
65
64
  }
66
-
67
- return r;
65
+ return to.concat(ar || Array.prototype.slice.call(from));
68
66
  };
69
67
 
70
68
  import React from 'react';
@@ -120,7 +118,7 @@ function (_super) {
120
118
 
121
119
  if (columnCount <= 1) {
122
120
  return {
123
- list: [__spreadArrays(options)]
121
+ list: [__spreadArray([], options, true)]
124
122
  };
125
123
  } // 对columnCount值,进行分列,返回一个新的多维数组
126
124
 
@@ -132,7 +130,7 @@ function (_super) {
132
130
  var startIndex = maxRow * (i - 1);
133
131
  var endIndex = maxRow * i;
134
132
  var columnList = options.slice(startIndex, endIndex);
135
- list.push(__spreadArrays(columnList));
133
+ list.push(__spreadArray([], columnList, true));
136
134
  }
137
135
 
138
136
  return {
@@ -165,8 +163,8 @@ function (_super) {
165
163
  }
166
164
 
167
165
  var child = React.Children.only(title);
168
- return React.cloneElement(child, {
169
- className: classNames(this.prefixCls + "-title", child.props.className)
166
+ return /*#__PURE__*/React.cloneElement(child, {
167
+ className: classNames("".concat(this.prefixCls, "-title"), child.props.className)
170
168
  });
171
169
  };
172
170
 
@@ -178,8 +176,8 @@ function (_super) {
178
176
  }
179
177
 
180
178
  var child = React.Children.only(bottom);
181
- return React.cloneElement(child, {
182
- className: classNames(this.prefixCls + "-bottom", child.props.className)
179
+ return /*#__PURE__*/React.cloneElement(child, {
180
+ className: classNames("".concat(this.prefixCls, "-bottom"), child.props.className)
183
181
  });
184
182
  };
185
183
  /**
@@ -191,25 +189,25 @@ function (_super) {
191
189
  var _this = this;
192
190
 
193
191
  var cls = this.prefixCls;
194
- return React.createElement(React.Fragment, null, this.renderTitle(), React.createElement("div", {
195
- className: cls + "-content"
192
+ return /*#__PURE__*/React.createElement(React.Fragment, null, this.renderTitle(), /*#__PURE__*/React.createElement("div", {
193
+ className: "".concat(cls, "-content")
196
194
  }, this.state.list.map(function (col, index) {
197
- return React.createElement("ul", {
198
- className: cls + "-col",
195
+ return /*#__PURE__*/React.createElement("ul", {
196
+ className: "".concat(cls, "-col"),
199
197
  key: index
200
198
  }, col.map(function (item) {
201
199
  var _a;
202
200
 
203
201
  if (item.unselect) {
204
- return React.createElement("li", {
205
- key: item.value + "1",
206
- className: classNames(item.className, cls + "-unselect")
202
+ return /*#__PURE__*/React.createElement("li", {
203
+ key: "".concat(item.value, "1"),
204
+ className: classNames(item.className, "".concat(cls, "-unselect"))
207
205
  }, item.name);
208
206
  }
209
207
 
210
- return React.createElement("li", {
208
+ return /*#__PURE__*/React.createElement("li", {
211
209
  key: item.value,
212
- className: classNames(item.className, (_a = {}, _a[cls + "-active"] = item.value === _this.props.value, _a)),
210
+ className: classNames(item.className, (_a = {}, _a["".concat(cls, "-active")] = item.value === _this.props.value, _a)),
213
211
  onClick: function onClick(ev) {
214
212
  return _this.onSelecting(ev, item);
215
213
  }
@@ -257,8 +255,8 @@ function (_super) {
257
255
 
258
256
  var cls = this.prefixCls;
259
257
  var currentName = this.getCurrentName();
260
- return React.createElement(Trigger, __assign({}, extraProps, {
261
- wrapClassName: classNames(cls + "-wrap", dropClassName),
258
+ return /*#__PURE__*/React.createElement(Trigger, __assign({}, extraProps, {
259
+ wrapClassName: classNames("".concat(cls, "-wrap"), dropClassName),
262
260
  visible: visible,
263
261
  trigger: "click",
264
262
  isTransformHorizontalDirection: true,
@@ -266,20 +264,20 @@ function (_super) {
266
264
  popupLimitSpacing: 10,
267
265
  popup: this.getSelectPopup(),
268
266
  onVisibleChange: this.triggerSelect
269
- }), React.createElement("div", {
270
- className: classNames([cls + "-input-group", className, (_a = {}, _a[cls + "-active"] = visible, _a.disabled = disabled, _a)]),
267
+ }), /*#__PURE__*/React.createElement("div", {
268
+ className: classNames(["".concat(cls, "-input-group"), className, (_a = {}, _a["".concat(cls, "-active")] = visible, _a.disabled = disabled, _a)]),
271
269
  onClick: this.onTriggerSelect
272
- }, React.createElement("div", {
273
- className: classNames([cls + "-input-control", (_b = {}, _b[cls + "-focused"] = visible, _b[cls + "-empty"] = !currentName, _b)])
274
- }, currentName || placeholder), hiddenIcon ? null : React.createElement("span", {
275
- className: cls + "-icon"
270
+ }, /*#__PURE__*/React.createElement("div", {
271
+ className: classNames(["".concat(cls, "-input-control"), (_b = {}, _b["".concat(cls, "-focused")] = visible, _b["".concat(cls, "-empty")] = !currentName, _b)])
272
+ }, currentName || placeholder), hiddenIcon ? null : /*#__PURE__*/React.createElement("span", {
273
+ className: "".concat(cls, "-icon")
276
274
  }, typeof icon === 'function' ? icon() : icon)));
277
275
  }; // 默认值
278
276
 
279
277
 
280
278
  Select.defaultProps = {
281
279
  title: null,
282
- icon: React.createElement("svg", {
280
+ icon: /*#__PURE__*/React.createElement("svg", {
283
281
  viewBox: "64 64 896 896",
284
282
  "data-icon": "down",
285
283
  fill: "currentColor",
@@ -287,7 +285,7 @@ function (_super) {
287
285
  height: "1em",
288
286
  "aria-hidden": "true",
289
287
  focusable: "false"
290
- }, React.createElement("path", {
288
+ }, /*#__PURE__*/React.createElement("path", {
291
289
  d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
292
290
  })),
293
291
  placeholder: 'Please select',