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
@@ -3,7 +3,5 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  require("antd/lib/select/style");
8
-
9
7
  require("./index.less");
@@ -4,39 +4,31 @@ var __assign = this && this.__assign || function () {
4
4
  __assign = Object.assign || function (t) {
5
5
  for (var s, i = 1, n = arguments.length; i < n; i++) {
6
6
  s = arguments[i];
7
-
8
7
  for (var p in s) {
9
8
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
10
9
  }
11
10
  }
12
-
13
11
  return t;
14
12
  };
15
-
16
13
  return __assign.apply(this, arguments);
17
14
  };
18
-
19
15
  var __rest = this && this.__rest || function (s, e) {
20
16
  var t = {};
21
-
22
17
  for (var p in s) {
23
18
  if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
24
19
  }
25
-
26
20
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
21
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
28
22
  }
29
23
  return t;
30
24
  };
31
-
32
25
  var __read = this && this.__read || function (o, n) {
33
26
  var m = typeof Symbol === "function" && o[Symbol.iterator];
34
27
  if (!m) return o;
35
28
  var i = m.call(o),
36
- r,
37
- ar = [],
38
- e;
39
-
29
+ r,
30
+ ar = [],
31
+ e;
40
32
  try {
41
33
  while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
42
34
  ar.push(r.value);
@@ -52,71 +44,53 @@ var __read = this && this.__read || function (o, n) {
52
44
  if (e) throw e.error;
53
45
  }
54
46
  }
55
-
56
47
  return ar;
57
48
  };
58
-
59
49
  var __importDefault = this && this.__importDefault || function (mod) {
60
50
  return mod && mod.__esModule ? mod : {
61
51
  "default": mod
62
52
  };
63
53
  };
64
-
65
54
  Object.defineProperty(exports, "__esModule", {
66
55
  value: true
67
56
  });
68
-
69
57
  var react_1 = __importDefault(require("react"));
70
-
71
58
  var classnames_1 = __importDefault(require("classnames"));
72
-
73
59
  var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
74
-
75
60
  var trimStart_1 = __importDefault(require("lodash/trimStart"));
76
-
77
61
  var LabelTextArea = function LabelTextArea(props) {
78
62
  var className = props.className,
79
- label = props.label,
80
- id = props.id,
81
- formatter = props.formatter,
82
- onFocus = props.onFocus,
83
- onBlur = props.onBlur,
84
- restProps = __rest(props, ["className", "label", "id", "formatter", "onFocus", "onBlur"]);
85
-
63
+ label = props.label,
64
+ id = props.id,
65
+ formatter = props.formatter,
66
+ onFocus = props.onFocus,
67
+ onBlur = props.onBlur,
68
+ restProps = __rest(props, ["className", "label", "id", "formatter", "onFocus", "onBlur"]);
86
69
  var _a = __read(react_1["default"].useState(false), 2),
87
- focused = _a[0],
88
- setFocused = _a[1];
89
-
70
+ focused = _a[0],
71
+ setFocused = _a[1];
90
72
  var _b = __read((0, useControllableValue_1["default"])(props), 2),
91
- value = _b[0],
92
- setValue = _b[1];
93
-
73
+ value = _b[0],
74
+ setValue = _b[1];
94
75
  var TextAreaDomRef = react_1["default"].useRef(null);
95
-
96
76
  var handleFocus = function handleFocus() {
97
77
  setFocused(true);
98
78
  onFocus === null || onFocus === void 0 ? void 0 : onFocus(value);
99
79
  };
100
-
101
80
  var handleBlur = function handleBlur() {
102
81
  setFocused(false);
103
82
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
104
83
  };
105
-
106
84
  var handleLabelClick = function handleLabelClick() {
107
85
  TextAreaDomRef.current.focus();
108
86
  };
109
-
110
87
  var handleChange = function handleChange(e) {
111
88
  var finallyValue = (0, trimStart_1["default"])(e.target.value);
112
-
113
89
  if (formatter) {
114
90
  finallyValue = formatter(finallyValue);
115
91
  }
116
-
117
92
  setValue(finallyValue);
118
93
  };
119
-
120
94
  return react_1["default"].createElement("div", {
121
95
  className: (0, classnames_1["default"])('label-input-control', className),
122
96
  id: id
@@ -139,5 +113,4 @@ var LabelTextArea = function LabelTextArea(props) {
139
113
  className: "label-textarea-text"
140
114
  }, label)));
141
115
  };
142
-
143
116
  exports["default"] = LabelTextArea;
@@ -3,5 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  require("./index.less");
@@ -4,26 +4,21 @@ var __assign = this && this.__assign || function () {
4
4
  __assign = Object.assign || function (t) {
5
5
  for (var s, i = 1, n = arguments.length; i < n; i++) {
6
6
  s = arguments[i];
7
-
8
7
  for (var p in s) {
9
8
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
10
9
  }
11
10
  }
12
-
13
11
  return t;
14
12
  };
15
-
16
13
  return __assign.apply(this, arguments);
17
14
  };
18
-
19
15
  var __read = this && this.__read || function (o, n) {
20
16
  var m = typeof Symbol === "function" && o[Symbol.iterator];
21
17
  if (!m) return o;
22
18
  var i = m.call(o),
23
- r,
24
- ar = [],
25
- e;
26
-
19
+ r,
20
+ ar = [],
21
+ e;
27
22
  try {
28
23
  while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
29
24
  ar.push(r.value);
@@ -39,69 +34,52 @@ var __read = this && this.__read || function (o, n) {
39
34
  if (e) throw e.error;
40
35
  }
41
36
  }
42
-
43
37
  return ar;
44
38
  };
45
-
46
39
  var __importDefault = this && this.__importDefault || function (mod) {
47
40
  return mod && mod.__esModule ? mod : {
48
41
  "default": mod
49
42
  };
50
43
  };
51
-
52
44
  Object.defineProperty(exports, "__esModule", {
53
45
  value: true
54
46
  });
55
-
56
47
  var react_1 = __importDefault(require("react"));
57
-
58
48
  var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
59
-
60
49
  var tree_select_1 = __importDefault(require("antd/lib/tree-select"));
61
-
62
50
  var classnames_1 = __importDefault(require("classnames"));
63
-
64
51
  var omit_1 = __importDefault(require("lodash/omit"));
65
-
66
52
  var LabelTreeSelect = function LabelTreeSelect(props) {
67
53
  var className = props.className,
68
- label = props.label,
69
- unit = props.unit,
70
- _a = props.showSearch,
71
- showSearch = _a === void 0 ? false : _a,
72
- onDropdownVisibleChange = props.onDropdownVisibleChange;
54
+ label = props.label,
55
+ unit = props.unit,
56
+ _a = props.showSearch,
57
+ showSearch = _a === void 0 ? false : _a,
58
+ onDropdownVisibleChange = props.onDropdownVisibleChange;
73
59
  var selectRef = react_1["default"].useRef(null);
74
-
75
60
  var _b = __read((0, useControllableValue_1["default"])(props, {
76
- valuePropName: 'open',
77
- trigger: 'setOpen'
78
- }), 2),
79
- open = _b[0],
80
- setOpen = _b[1];
81
-
61
+ valuePropName: 'open',
62
+ trigger: 'setOpen'
63
+ }), 2),
64
+ open = _b[0],
65
+ setOpen = _b[1];
82
66
  var _c = __read((0, useControllableValue_1["default"])(props), 2),
83
- value = _c[0],
84
- setValue = _c[1];
85
-
67
+ value = _c[0],
68
+ setValue = _c[1];
86
69
  var handleChange = function handleChange(nextValue) {
87
70
  setValue(nextValue);
88
71
  };
89
-
90
72
  var handleLabelClick = function handleLabelClick() {
91
73
  var _a;
92
-
93
74
  if (!open) {
94
75
  setOpen(!open);
95
76
  }
96
-
97
77
  (_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.focus();
98
78
  };
99
-
100
79
  var handleDropdownVisibleChange = function handleDropdownVisibleChange(nextOpen) {
101
80
  setOpen(nextOpen);
102
81
  onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 ? void 0 : onDropdownVisibleChange(nextOpen);
103
82
  };
104
-
105
83
  var isValueNotEmpty = !!(value === null || value === void 0 ? void 0 : value.length);
106
84
  return react_1["default"].createElement("div", {
107
85
  className: (0, classnames_1["default"])({
@@ -124,5 +102,4 @@ var LabelTreeSelect = function LabelTreeSelect(props) {
124
102
  onClick: handleLabelClick
125
103
  }, label));
126
104
  };
127
-
128
105
  exports["default"] = LabelTreeSelect;