assui 2.3.8 → 3.0.0-alpha.0

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 (168) hide show
  1. package/es/a-select/index.js +7 -22
  2. package/es/a-select/style/index.css +195 -743
  3. package/es/area-text/index.js +1 -3
  4. package/es/button-drawer/index.js +12 -30
  5. package/es/button-modal/index.js +12 -33
  6. package/es/color-select/index.js +10 -23
  7. package/es/color-select/style/index.css +195 -743
  8. package/es/condition-input/index.js +8 -26
  9. package/es/condition-input/parse2RegexOption.js +0 -11
  10. package/es/config-provider/index.js +1 -3
  11. package/es/copy-to-clipboard/index.js +11 -27
  12. package/es/copy-to-clipboard/style/index.css +0 -1
  13. package/es/highlight-textarea/HighlighedContents.js +1 -3
  14. package/es/highlight-textarea/extractSpansOfClasses.d.ts +1 -0
  15. package/es/highlight-textarea/extractSpansOfClasses.js +7 -29
  16. package/es/highlight-textarea/getRanges.js +3 -35
  17. package/es/highlight-textarea/getType.js +0 -6
  18. package/es/highlight-textarea/index.js +11 -30
  19. package/es/highlight-textarea/style/index.css +7 -21
  20. package/es/img-crop/EasyCrop.js +18 -34
  21. package/es/img-crop/getCroppedImg.js +15 -50
  22. package/es/img-crop/index.js +56 -145
  23. package/es/img-crop/style/index.css +195 -743
  24. package/es/json-editor/index.js +6 -20
  25. package/es/keep-tab/index.d.ts +7 -2
  26. package/es/keep-tab/index.js +34 -59
  27. package/es/keep-tab/style/index.css +39 -99
  28. package/es/label-auto-complete/index.js +14 -32
  29. package/es/label-auto-complete/style/index.css +195 -743
  30. package/es/label-condition-input/index.js +13 -29
  31. package/es/label-customize-range-picker/defaultRadioList.js +0 -3
  32. package/es/label-customize-range-picker/index.js +36 -78
  33. package/es/label-customize-range-picker/style/index.css +195 -743
  34. package/es/label-customize-range-picker/utils/index.js +5 -14
  35. package/es/label-date-picker/index.js +11 -28
  36. package/es/label-date-picker/style/index.css +195 -743
  37. package/es/label-input/index.js +23 -37
  38. package/es/label-number-input/index.js +13 -28
  39. package/es/label-range-picker/index.js +11 -28
  40. package/es/label-range-picker/style/index.css +195 -743
  41. package/es/label-select/index.js +11 -27
  42. package/es/label-select/style/index.css +195 -743
  43. package/es/label-text-area/index.js +13 -35
  44. package/es/label-tree-select/index.js +15 -32
  45. package/es/label-tree-select/style/index.css +195 -743
  46. package/es/number-format-input/index.js +1 -11
  47. package/es/number-input/index.js +18 -37
  48. package/es/number-input/utils.js +7 -15
  49. package/es/rc-echart/core.js +15 -27
  50. package/es/rc-echart/index.js +0 -6
  51. package/es/rc-qrcode/index.js +2 -12
  52. package/es/rc-qrcode/useQrcode.js +5 -12
  53. package/es/rich-text-editor/index.js +5 -16
  54. package/es/rich-text-editor/plugins/code/index.js +0 -8
  55. package/es/rich-text-editor/style/index.css +195 -743
  56. package/es/single-img-upload/index.js +36 -110
  57. package/es/single-img-upload/style/index.css +195 -743
  58. package/es/split-pane/index.js +0 -4
  59. package/es/step-number-input/index.js +14 -39
  60. package/es/step-number-input/style/index.css +195 -743
  61. package/es/table-col/index.js +2 -4
  62. package/es/text-area/index.js +8 -27
  63. package/es/text-input/index.js +4 -18
  64. package/es/text-input/style/index.css +7 -21
  65. package/lib/a-select/index.js +7 -27
  66. package/lib/a-select/style/index.css +195 -743
  67. package/lib/a-select/style/index.js +0 -2
  68. package/lib/area-text/index.js +1 -6
  69. package/lib/area-text/style/index.js +0 -1
  70. package/lib/beautiful-dnd/index.js +0 -9
  71. package/lib/button-drawer/index.js +12 -42
  72. package/lib/button-drawer/style/index.js +0 -1
  73. package/lib/button-modal/index.js +12 -44
  74. package/lib/button-modal/style/index.js +0 -1
  75. package/lib/color-select/index.js +10 -39
  76. package/lib/color-select/style/index.css +195 -743
  77. package/lib/color-select/style/index.js +0 -2
  78. package/lib/condition-input/index.js +8 -41
  79. package/lib/condition-input/parse2RegexOption.js +0 -16
  80. package/lib/condition-input/style/index.js +0 -1
  81. package/lib/config-provider/context.js +0 -4
  82. package/lib/config-provider/index.js +1 -28
  83. package/lib/copy-to-clipboard/index.js +11 -38
  84. package/lib/copy-to-clipboard/style/index.css +0 -1
  85. package/lib/copy-to-clipboard/style/index.js +0 -1
  86. package/lib/highlight-textarea/HighlighedContents.js +1 -7
  87. package/lib/highlight-textarea/extractSpansOfClasses.d.ts +1 -0
  88. package/lib/highlight-textarea/extractSpansOfClasses.js +7 -31
  89. package/lib/highlight-textarea/getRanges.js +3 -38
  90. package/lib/highlight-textarea/getType.js +0 -8
  91. package/lib/highlight-textarea/index.js +11 -44
  92. package/lib/highlight-textarea/style/index.css +7 -21
  93. package/lib/highlight-textarea/style/index.js +0 -1
  94. package/lib/highlight-words/index.js +0 -3
  95. package/lib/img-crop/EasyCrop.js +18 -44
  96. package/lib/img-crop/getCroppedImg.js +15 -51
  97. package/lib/img-crop/index.js +56 -159
  98. package/lib/img-crop/style/index.css +195 -743
  99. package/lib/img-crop/style/index.js +0 -3
  100. package/lib/index.js +0 -77
  101. package/lib/json-editor/index.js +6 -35
  102. package/lib/json-editor/style/index.js +0 -2
  103. package/lib/keep-tab/index.d.ts +7 -2
  104. package/lib/keep-tab/index.js +34 -76
  105. package/lib/keep-tab/style/index.css +39 -99
  106. package/lib/keep-tab/style/index.js +0 -2
  107. package/lib/label-auto-complete/index.js +14 -39
  108. package/lib/label-auto-complete/style/index.css +195 -743
  109. package/lib/label-auto-complete/style/index.js +0 -2
  110. package/lib/label-condition-input/index.js +13 -36
  111. package/lib/label-condition-input/style/index.js +0 -1
  112. package/lib/label-customize-range-picker/defaultRadioList.js +0 -7
  113. package/lib/label-customize-range-picker/index.js +36 -99
  114. package/lib/label-customize-range-picker/style/index.css +195 -743
  115. package/lib/label-customize-range-picker/style/index.js +0 -5
  116. package/lib/label-customize-range-picker/utils/index.js +5 -19
  117. package/lib/label-date-picker/index.js +11 -34
  118. package/lib/label-date-picker/style/index.css +195 -743
  119. package/lib/label-date-picker/style/index.js +0 -2
  120. package/lib/label-input/index.js +23 -46
  121. package/lib/label-input/style/index.js +0 -1
  122. package/lib/label-number-input/index.js +13 -36
  123. package/lib/label-number-input/style/index.js +0 -1
  124. package/lib/label-range-picker/index.js +11 -36
  125. package/lib/label-range-picker/style/index.css +195 -743
  126. package/lib/label-range-picker/style/index.js +0 -2
  127. package/lib/label-select/index.js +11 -36
  128. package/lib/label-select/style/index.css +195 -743
  129. package/lib/label-select/style/index.js +0 -2
  130. package/lib/label-text-area/index.js +13 -40
  131. package/lib/label-text-area/style/index.js +0 -1
  132. package/lib/label-tree-select/index.js +15 -38
  133. package/lib/label-tree-select/style/index.css +195 -743
  134. package/lib/label-tree-select/style/index.js +0 -2
  135. package/lib/messages/index.js +0 -2
  136. package/lib/number-format-input/index.js +1 -15
  137. package/lib/number-format-input/style/index.js +0 -1
  138. package/lib/number-input/index.js +18 -55
  139. package/lib/number-input/style/index.js +0 -1
  140. package/lib/number-input/utils.js +8 -20
  141. package/lib/rc-echart/core.js +15 -40
  142. package/lib/rc-echart/index.js +0 -17
  143. package/lib/rc-motion/index.js +0 -3
  144. package/lib/rc-qrcode/index.js +2 -25
  145. package/lib/rc-qrcode/useQrcode.js +5 -17
  146. package/lib/rc-transition-group/index.js +0 -9
  147. package/lib/resizable/index.js +0 -2
  148. package/lib/resizable/style/index.js +0 -1
  149. package/lib/rich-text-editor/index.js +5 -53
  150. package/lib/rich-text-editor/plugins/code/index.js +2 -12
  151. package/lib/rich-text-editor/style/index.css +195 -743
  152. package/lib/rich-text-editor/style/index.js +0 -1
  153. package/lib/single-img-upload/index.js +36 -125
  154. package/lib/single-img-upload/style/index.css +195 -743
  155. package/lib/single-img-upload/style/index.js +0 -3
  156. package/lib/sortable-hoc/index.js +0 -9
  157. package/lib/split-pane/index.js +0 -15
  158. package/lib/split-pane/style/index.js +0 -1
  159. package/lib/step-number-input/index.js +14 -55
  160. package/lib/step-number-input/style/index.css +195 -743
  161. package/lib/step-number-input/style/index.js +0 -2
  162. package/lib/table-col/index.js +2 -6
  163. package/lib/text-area/index.js +8 -38
  164. package/lib/text-area/style/index.js +0 -1
  165. package/lib/text-input/index.js +4 -23
  166. package/lib/text-input/style/index.css +7 -21
  167. package/lib/text-input/style/index.js +0 -1
  168. package/package.json +5 -5
@@ -2,10 +2,9 @@ var __read = this && this.__read || function (o, n) {
2
2
  var m = typeof Symbol === "function" && o[Symbol.iterator];
3
3
  if (!m) return o;
4
4
  var i = m.call(o),
5
- r,
6
- ar = [],
7
- e;
8
-
5
+ r,
6
+ ar = [],
7
+ e;
9
8
  try {
10
9
  while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
11
10
  ar.push(r.value);
@@ -21,10 +20,8 @@ var __read = this && this.__read || function (o, n) {
21
20
  if (e) throw e.error;
22
21
  }
23
22
  }
24
-
25
23
  return ar;
26
24
  };
27
-
28
25
  import React from 'react';
29
26
  import classNames from 'classnames';
30
27
  import trimStart from 'lodash/trimStart';
@@ -34,7 +31,7 @@ import useControllableValue from "ahooks/es/useControllableValue";
34
31
  import useSize from "ahooks/es/useSize";
35
32
  var PasswordSuffix = /*#__PURE__*/React.memo(function (_a) {
36
33
  var inputType = _a.inputType,
37
- onChangeInputType = _a.onChangeInputType;
34
+ onChangeInputType = _a.onChangeInputType;
38
35
  var resultNode = inputType === 'password' ? /*#__PURE__*/React.createElement(EyeOutlined, {
39
36
  onClick: function onClick() {
40
37
  onChangeInputType('text');
@@ -47,59 +44,49 @@ var PasswordSuffix = /*#__PURE__*/React.memo(function (_a) {
47
44
  });
48
45
  return resultNode;
49
46
  });
50
-
51
47
  var LabelInput = function LabelInput(props) {
52
48
  var className = props.className,
53
- prefix = props.prefix,
54
- suffix = props.suffix,
55
- label = props.label,
56
- id = props.id,
57
- onFocus = props.onFocus,
58
- onBlur = props.onBlur,
59
- _a = props.type,
60
- type = _a === void 0 ? 'text' : _a,
61
- maxLength = props.maxLength,
62
- _b = props.baseMinWidth,
63
- baseMinWidth = _b === void 0 ? 50 : _b;
49
+ prefix = props.prefix,
50
+ suffix = props.suffix,
51
+ label = props.label,
52
+ id = props.id,
53
+ onFocus = props.onFocus,
54
+ onBlur = props.onBlur,
55
+ _a = props.type,
56
+ type = _a === void 0 ? 'text' : _a,
57
+ maxLength = props.maxLength,
58
+ _b = props.baseMinWidth,
59
+ baseMinWidth = _b === void 0 ? 50 : _b;
64
60
  var labelDomRef = React.useRef(null);
65
61
  var labelSize = useSize(labelDomRef);
66
-
67
62
  var _c = __read(React.useState(false), 2),
68
- focused = _c[0],
69
- setFocused = _c[1];
70
-
63
+ focused = _c[0],
64
+ setFocused = _c[1];
71
65
  var _d = __read(useControllableValue(props, {
72
- defaultValue: ''
73
- }), 2),
74
- value = _d[0],
75
- setValue = _d[1];
76
-
66
+ defaultValue: ''
67
+ }), 2),
68
+ value = _d[0],
69
+ setValue = _d[1];
77
70
  var _e = __read(React.useState(type), 2),
78
- inputType = _e[0],
79
- setInputType = _e[1];
80
-
71
+ inputType = _e[0],
72
+ setInputType = _e[1];
81
73
  var InputDomRef = React.useRef(null);
82
74
  var isPasswordInput = type === 'password';
83
-
84
75
  var handleFocus = function handleFocus() {
85
76
  setFocused(true);
86
77
  onFocus === null || onFocus === void 0 ? void 0 : onFocus(value);
87
78
  };
88
-
89
79
  var handleBlur = function handleBlur() {
90
80
  setFocused(false);
91
81
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
92
82
  };
93
-
94
83
  var handleChange = function handleChange(e) {
95
84
  var finallyValue = trimStart(e.target.value);
96
85
  setValue(finallyValue);
97
86
  };
98
-
99
87
  var handleLabelClick = function handleLabelClick() {
100
88
  InputDomRef.current.focus();
101
89
  };
102
-
103
90
  var onChangeInputType = React.useCallback(function (nextInputType) {
104
91
  setInputType(nextInputType);
105
92
  }, []);
@@ -142,5 +129,4 @@ var LabelInput = function LabelInput(props) {
142
129
  onChangeInputType: onChangeInputType
143
130
  }))));
144
131
  };
145
-
146
132
  export default LabelInput;
@@ -2,26 +2,21 @@ var __assign = this && this.__assign || function () {
2
2
  __assign = Object.assign || function (t) {
3
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
4
4
  s = arguments[i];
5
-
6
5
  for (var p in s) {
7
6
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
7
  }
9
8
  }
10
-
11
9
  return t;
12
10
  };
13
-
14
11
  return __assign.apply(this, arguments);
15
12
  };
16
-
17
13
  var __read = this && this.__read || function (o, n) {
18
14
  var m = typeof Symbol === "function" && o[Symbol.iterator];
19
15
  if (!m) return o;
20
16
  var i = m.call(o),
21
- r,
22
- ar = [],
23
- e;
24
-
17
+ r,
18
+ ar = [],
19
+ e;
25
20
  try {
26
21
  while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
27
22
  ar.push(r.value);
@@ -37,10 +32,8 @@ var __read = this && this.__read || function (o, n) {
37
32
  if (e) throw e.error;
38
33
  }
39
34
  }
40
-
41
35
  return ar;
42
36
  };
43
-
44
37
  import React from 'react';
45
38
  import useControllableValue from "ahooks/es/useControllableValue";
46
39
  import useSize from "ahooks/es/useSize";
@@ -48,42 +41,35 @@ import isUndefined from 'lodash/isUndefined';
48
41
  import classNames from 'classnames';
49
42
  import omit from 'lodash/omit';
50
43
  import NumberInput from '../number-input';
51
-
52
44
  var LabelNumberInput = function LabelNumberInput(props) {
53
45
  var className = props.className,
54
- label = props.label,
55
- onBlur = props.onBlur,
56
- onFocus = props.onFocus,
57
- id = props.id,
58
- _a = props.baseMinWidth,
59
- baseMinWidth = _a === void 0 ? 50 : _a;
46
+ label = props.label,
47
+ onBlur = props.onBlur,
48
+ onFocus = props.onFocus,
49
+ id = props.id,
50
+ _a = props.baseMinWidth,
51
+ baseMinWidth = _a === void 0 ? 50 : _a;
60
52
  var numberInputRef = React.useRef(null);
61
53
  var labelDomRef = React.useRef(null);
62
54
  var labelSize = useSize(labelDomRef);
63
-
64
55
  var _b = __read(useControllableValue(props), 2),
65
- value = _b[0],
66
- setValue = _b[1];
67
-
56
+ value = _b[0],
57
+ setValue = _b[1];
68
58
  var _c = __read(React.useState(false), 2),
69
- focused = _c[0],
70
- setFocused = _c[1];
71
-
59
+ focused = _c[0],
60
+ setFocused = _c[1];
72
61
  var handleLabelClick = function handleLabelClick() {
73
62
  setFocused(true);
74
63
  numberInputRef.current.focus();
75
64
  };
76
-
77
65
  var handleFocus = function handleFocus() {
78
66
  setFocused(true);
79
67
  onFocus === null || onFocus === void 0 ? void 0 : onFocus(value);
80
68
  };
81
-
82
69
  var handleBlur = function handleBlur() {
83
70
  setFocused(false);
84
71
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
85
72
  };
86
-
87
73
  var controlMinWidth = (labelSize === null || labelSize === void 0 ? void 0 : labelSize.width) ? labelSize.width + baseMinWidth : undefined;
88
74
  return /*#__PURE__*/React.createElement("div", {
89
75
  className: classNames('label-number-input-warper', className),
@@ -110,5 +96,4 @@ var LabelNumberInput = function LabelNumberInput(props) {
110
96
  onClick: handleLabelClick
111
97
  }, label)));
112
98
  };
113
-
114
99
  export default LabelNumberInput;
@@ -2,26 +2,21 @@ var __assign = this && this.__assign || function () {
2
2
  __assign = Object.assign || function (t) {
3
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
4
4
  s = arguments[i];
5
-
6
5
  for (var p in s) {
7
6
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
7
  }
9
8
  }
10
-
11
9
  return t;
12
10
  };
13
-
14
11
  return __assign.apply(this, arguments);
15
12
  };
16
-
17
13
  var __read = this && this.__read || function (o, n) {
18
14
  var m = typeof Symbol === "function" && o[Symbol.iterator];
19
15
  if (!m) return o;
20
16
  var i = m.call(o),
21
- r,
22
- ar = [],
23
- e;
24
-
17
+ r,
18
+ ar = [],
19
+ e;
25
20
  try {
26
21
  while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
27
22
  ar.push(r.value);
@@ -37,10 +32,8 @@ var __read = this && this.__read || function (o, n) {
37
32
  if (e) throw e.error;
38
33
  }
39
34
  }
40
-
41
35
  return ar;
42
36
  };
43
-
44
37
  import React from 'react';
45
38
  import useControllableValue from "ahooks/es/useControllableValue";
46
39
  import DatePicker from "antd/es/date-picker";
@@ -48,41 +41,32 @@ import classNames from 'classnames';
48
41
  import omit from 'lodash/omit';
49
42
  import CalendarOutlined from "a-icons/es/CalendarOutlined";
50
43
  var RangePicker = DatePicker.RangePicker;
51
-
52
44
  var LabelDatePicker = function LabelDatePicker(props) {
53
45
  var className = props.className,
54
- label = props.label;
46
+ label = props.label;
55
47
  var datePickerRef = React.useRef(null);
56
-
57
48
  var _a = __read(useControllableValue(props, {
58
- valuePropName: 'open',
59
- trigger: 'onOpenChange'
60
- }), 2),
61
- open = _a[0],
62
- onOpenChange = _a[1];
63
-
49
+ valuePropName: 'open',
50
+ trigger: 'onOpenChange'
51
+ }), 2),
52
+ open = _a[0],
53
+ onOpenChange = _a[1];
64
54
  var _b = __read(useControllableValue(props), 2),
65
- value = _b[0],
66
- setValue = _b[1];
67
-
55
+ value = _b[0],
56
+ setValue = _b[1];
68
57
  var handleChange = function handleChange(nextValue) {
69
58
  setValue(nextValue);
70
59
  };
71
-
72
60
  var handleLabelClick = function handleLabelClick() {
73
61
  var _a;
74
-
75
62
  if (!open) {
76
63
  onOpenChange(!open);
77
64
  }
78
-
79
65
  (_a = datePickerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
80
66
  };
81
-
82
67
  var handleOpenChange = function handleOpenChange(nextOpen) {
83
68
  onOpenChange(nextOpen);
84
69
  };
85
-
86
70
  return /*#__PURE__*/React.createElement("div", {
87
71
  className: classNames({
88
72
  'label-range-picker': true,
@@ -103,5 +87,4 @@ var LabelDatePicker = function LabelDatePicker(props) {
103
87
  onClick: handleLabelClick
104
88
  }, label));
105
89
  };
106
-
107
90
  export default LabelDatePicker;