cloud-b2b 1.1.50 → 1.1.52

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 (309) hide show
  1. package/package.json +44 -22
  2. package/src/Area/Area.js +94 -0
  3. package/src/Card/Card.js +16 -0
  4. package/src/CodeInput/CodeInput.js +76 -0
  5. package/src/Control/Control.js +338 -0
  6. package/src/Control/event.js +45 -0
  7. package/src/Enhance/Dialogs.js +24 -0
  8. package/src/Enhance/Loading.js +83 -0
  9. package/{es → src}/Enhance/index.js +8 -8
  10. package/src/Header/Header.js +149 -0
  11. package/src/Header/Vertical.js +74 -0
  12. package/src/ImageView/ImageView.js +62 -0
  13. package/src/Indent/Indent.js +12 -0
  14. package/src/InpurCascader/InputCascader.js +83 -0
  15. package/src/InputEditor/InputEditor.js +93 -0
  16. package/src/InputSearch/InputSearch.js +186 -0
  17. package/src/InputSelect/InputSelect.js +103 -0
  18. package/src/InputTreeSelect/InputTreeSelect.js +87 -0
  19. package/src/InputWriting/InputWriting.js +65 -0
  20. package/src/Layout/Layout.js +121 -0
  21. package/src/LayoutLink/LayoutLink.js +59 -0
  22. package/src/Link/Link.js +57 -0
  23. package/src/Loading/Loading.js +15 -0
  24. package/src/Loading2/Loading2.js +15 -0
  25. package/src/ModalWithDrag/ModalWithDrag.js +17 -0
  26. package/src/ModalWithDrag/drag.js +128 -0
  27. package/src/NumberInput/NumberInput.js +137 -0
  28. package/src/Search/Search.js +368 -0
  29. package/src/Sidebar/Sidebar.js +111 -0
  30. package/src/Sidebar2/Sidebar.js +143 -0
  31. package/src/SuperForm/SuperForm.js +516 -0
  32. package/src/SuperForm2/SuperForm.js +588 -0
  33. package/src/SuperIcon/SuperIcon.js +14 -0
  34. package/src/SuperPagination/SuperPagination.js +65 -0
  35. package/src/SuperTab/SuperTab.js +84 -0
  36. package/src/SuperTab2/SuperTab2.js +94 -0
  37. package/src/SuperTable/DragSortRow.js +62 -0
  38. package/src/SuperTable/FilterDropDown.js +111 -0
  39. package/src/SuperTable/SuperTable.js +590 -0
  40. package/src/SuperTable/fixed.js +34 -0
  41. package/src/SuperTable2/SuperTable2.js +600 -0
  42. package/src/SuperTable2/SuperTableCell.js +144 -0
  43. package/src/SuperTable3/FilterDropDown.js +111 -0
  44. package/src/SuperTable3/SuperTable.js +498 -0
  45. package/src/SuperTable3/fixed.js +34 -0
  46. package/src/SuperToolbar/SuperToolbar.js +128 -0
  47. package/src/SuperUpload/SuperUpload.js +137 -0
  48. package/src/Title/Title.js +18 -0
  49. package/src/Viewer/ImageViews.js +220 -0
  50. package/src/Viewer/Viewer.js +97 -0
  51. package/src/WingBlank/WingBlank.js +14 -0
  52. package/src/helper.js +185 -0
  53. package/src/history.js +6 -0
  54. package/src/index.js +38 -0
  55. package/src/variables.js +5 -0
  56. package/test/index.html +10 -0
  57. package/test/test.js +16 -0
  58. package/test/test.less +12 -0
  59. package/test/webpack.config.js +71 -0
  60. package/tools/babel.config.js +14 -0
  61. package/tools/build.js +70 -0
  62. package/tools/publish.js +9 -0
  63. package/tools/util.js +53 -0
  64. package/es/Area/Area.js +0 -170
  65. package/es/Card/Card.js +0 -20
  66. package/es/CodeInput/CodeInput.js +0 -152
  67. package/es/Control/Control.js +0 -496
  68. package/es/Control/event.js +0 -57
  69. package/es/Enhance/Dialogs.js +0 -67
  70. package/es/Enhance/Loading.js +0 -151
  71. package/es/Header/Header.js +0 -194
  72. package/es/Header/Vertical.js +0 -129
  73. package/es/ImageView/ImageView.js +0 -117
  74. package/es/Indent/Indent.js +0 -23
  75. package/es/InpurCascader/InputCascader.js +0 -135
  76. package/es/InputEditor/InputEditor.js +0 -113
  77. package/es/InputSearch/InputSearch.js +0 -311
  78. package/es/InputSelect/InputSelect.js +0 -191
  79. package/es/InputTreeSelect/InputTreeSelect.js +0 -147
  80. package/es/InputWriting/InputWriting.js +0 -107
  81. package/es/Layout/Layout.js +0 -232
  82. package/es/LayoutLink/LayoutLink.js +0 -82
  83. package/es/Link/Link.js +0 -108
  84. package/es/Loading/Loading.js +0 -15
  85. package/es/Loading2/Loading2.js +0 -11
  86. package/es/ModalWithDrag/ModalWithDrag.js +0 -34
  87. package/es/ModalWithDrag/drag.js +0 -133
  88. package/es/NumberInput/NumberInput.js +0 -240
  89. package/es/Search/Search.js +0 -595
  90. package/es/Sidebar/Sidebar.js +0 -165
  91. package/es/Sidebar2/Sidebar.js +0 -192
  92. package/es/SuperForm/SuperForm.js +0 -720
  93. package/es/SuperForm2/SuperForm.js +0 -828
  94. package/es/SuperIcon/SuperIcon.js +0 -30
  95. package/es/SuperPagination/SuperPagination.js +0 -126
  96. package/es/SuperTab/SuperTab.js +0 -130
  97. package/es/SuperTab2/SuperTab2.js +0 -167
  98. package/es/SuperTable/DragSortRow.js +0 -125
  99. package/es/SuperTable/FilterDropDown.js +0 -188
  100. package/es/SuperTable/SuperTable.js +0 -940
  101. package/es/SuperTable/fixed.js +0 -42
  102. package/es/SuperTable2/SuperTable2.js +0 -1019
  103. package/es/SuperTable2/SuperTableCell.js +0 -242
  104. package/es/SuperTable3/FilterDropDown.js +0 -188
  105. package/es/SuperTable3/SuperTable.js +0 -790
  106. package/es/SuperTable3/fixed.js +0 -42
  107. package/es/SuperToolbar/SuperToolbar.js +0 -223
  108. package/es/SuperUpload/SuperUpload.js +0 -434
  109. package/es/Title/Title.js +0 -36
  110. package/es/Viewer/ImageViews.js +0 -311
  111. package/es/Viewer/Viewer.js +0 -149
  112. package/es/WingBlank/WingBlank.js +0 -20
  113. package/es/helper.js +0 -169
  114. package/es/history.js +0 -5
  115. package/es/index.js +0 -37
  116. package/es/variables.js +0 -4
  117. package/lib/Area/Area.js +0 -198
  118. package/lib/Area/package.json +0 -6
  119. package/lib/Card/Card.js +0 -38
  120. package/lib/Card/package.json +0 -6
  121. package/lib/CodeInput/CodeInput.js +0 -179
  122. package/lib/CodeInput/package.json +0 -6
  123. package/lib/Control/Control.js +0 -548
  124. package/lib/Control/event.js +0 -68
  125. package/lib/Control/package.json +0 -6
  126. package/lib/Enhance/Dialogs.js +0 -87
  127. package/lib/Enhance/Loading.js +0 -175
  128. package/lib/Enhance/index.js +0 -35
  129. package/lib/Enhance/package.json +0 -6
  130. package/lib/Header/Header.js +0 -215
  131. package/lib/Header/Header.less +0 -95
  132. package/lib/Header/Vertical.js +0 -150
  133. package/lib/Header/Vertical.less +0 -60
  134. package/lib/Header/package.json +0 -6
  135. package/lib/ImageView/ImageView.js +0 -134
  136. package/lib/ImageView/ImageView.less +0 -14
  137. package/lib/ImageView/package.json +0 -6
  138. package/lib/Indent/Indent.js +0 -38
  139. package/lib/Indent/package.json +0 -6
  140. package/lib/InpurCascader/InputCascader.js +0 -156
  141. package/lib/InpurCascader/package.json +0 -6
  142. package/lib/InputEditor/InputEditor.js +0 -131
  143. package/lib/InputEditor/inputEditor.less +0 -8
  144. package/lib/InputEditor/package.json +0 -6
  145. package/lib/InputSearch/InputSearch.js +0 -327
  146. package/lib/InputSearch/package.json +0 -6
  147. package/lib/InputSelect/InputSelect.js +0 -214
  148. package/lib/InputSelect/package.json +0 -6
  149. package/lib/InputTreeSelect/InputTreeSelect.js +0 -169
  150. package/lib/InputTreeSelect/package.json +0 -6
  151. package/lib/InputWriting/InputWriting.js +0 -123
  152. package/lib/InputWriting/package.json +0 -6
  153. package/lib/Layout/Layout.js +0 -258
  154. package/lib/Layout/Layout.less +0 -28
  155. package/lib/Layout/package.json +0 -6
  156. package/lib/LayoutLink/LayoutLink.js +0 -114
  157. package/lib/LayoutLink/LayoutLink.less +0 -53
  158. package/lib/LayoutLink/package.json +0 -6
  159. package/lib/Link/Link.js +0 -130
  160. package/lib/Link/package.json +0 -6
  161. package/lib/Loading/Loading.js +0 -30
  162. package/lib/Loading/Loading.less +0 -13
  163. package/lib/Loading/package.json +0 -6
  164. package/lib/Loading2/Loading2.js +0 -26
  165. package/lib/Loading2/Loading2.less +0 -19
  166. package/lib/Loading2/package.json +0 -6
  167. package/lib/ModalWithDrag/ModalWithDrag.js +0 -53
  168. package/lib/ModalWithDrag/ModalWithDrag.less +0 -6
  169. package/lib/ModalWithDrag/drag.js +0 -147
  170. package/lib/ModalWithDrag/package.json +0 -6
  171. package/lib/NumberInput/NumberInput.js +0 -262
  172. package/lib/NumberInput/package.json +0 -6
  173. package/lib/Search/Search.js +0 -616
  174. package/lib/Search/Search.less +0 -63
  175. package/lib/Search/package.json +0 -6
  176. package/lib/Sidebar/Sidebar.js +0 -186
  177. package/lib/Sidebar/Sidebar.less +0 -78
  178. package/lib/Sidebar/package.json +0 -6
  179. package/lib/Sidebar2/Sidebar.js +0 -213
  180. package/lib/Sidebar2/Sidebar.less +0 -153
  181. package/lib/Sidebar2/package.json +0 -6
  182. package/lib/SuperForm/SuperForm.js +0 -731
  183. package/lib/SuperForm/SuperForm.less +0 -52
  184. package/lib/SuperForm/package.json +0 -6
  185. package/lib/SuperForm2/SuperForm.js +0 -834
  186. package/lib/SuperForm2/SuperForm.less +0 -52
  187. package/lib/SuperForm2/package.json +0 -6
  188. package/lib/SuperIcon/SuperIcon.js +0 -47
  189. package/lib/SuperIcon/package.json +0 -6
  190. package/lib/SuperPagination/SuperPagination.js +0 -145
  191. package/lib/SuperPagination/package.json +0 -6
  192. package/lib/SuperTab/SuperTab.js +0 -146
  193. package/lib/SuperTab/SuperTab.less +0 -43
  194. package/lib/SuperTab/package.json +0 -6
  195. package/lib/SuperTab2/SuperTab2.js +0 -191
  196. package/lib/SuperTab2/SuperTab2.less +0 -18
  197. package/lib/SuperTab2/package.json +0 -6
  198. package/lib/SuperTable/DragSortRow.js +0 -142
  199. package/lib/SuperTable/DragSortRow.less +0 -17
  200. package/lib/SuperTable/FilterDropDown.js +0 -205
  201. package/lib/SuperTable/FilterDropDown.less +0 -30
  202. package/lib/SuperTable/SuperTable.js +0 -945
  203. package/lib/SuperTable/SuperTable.less +0 -132
  204. package/lib/SuperTable/fixed.js +0 -55
  205. package/lib/SuperTable/package.json +0 -6
  206. package/lib/SuperTable2/SuperTable2.js +0 -1047
  207. package/lib/SuperTable2/SuperTable2.less +0 -118
  208. package/lib/SuperTable2/SuperTableCell.js +0 -258
  209. package/lib/SuperTable2/package.json +0 -6
  210. package/lib/SuperTable3/FilterDropDown.js +0 -205
  211. package/lib/SuperTable3/FilterDropDown.less +0 -29
  212. package/lib/SuperTable3/SuperTable.js +0 -795
  213. package/lib/SuperTable3/SuperTable.less +0 -99
  214. package/lib/SuperTable3/fixed.js +0 -55
  215. package/lib/SuperTable3/package.json +0 -6
  216. package/lib/SuperToolbar/SuperToolbar.js +0 -248
  217. package/lib/SuperToolbar/SuperToolbar.less +0 -17
  218. package/lib/SuperToolbar/package.json +0 -6
  219. package/lib/SuperUpload/SuperUpload.js +0 -481
  220. package/lib/SuperUpload/SuperUpload.less +0 -28
  221. package/lib/SuperUpload/package.json +0 -6
  222. package/lib/Title/Title.js +0 -54
  223. package/lib/Title/Title.less +0 -35
  224. package/lib/Title/package.json +0 -6
  225. package/lib/Viewer/ImageViews.js +0 -323
  226. package/lib/Viewer/Viewer.js +0 -167
  227. package/lib/Viewer/Viewer.less +0 -67
  228. package/lib/Viewer/imgView.less +0 -59
  229. package/lib/Viewer/package.json +0 -7
  230. package/lib/WingBlank/WingBlank.js +0 -37
  231. package/lib/WingBlank/WingBlank.less +0 -12
  232. package/lib/WingBlank/package.json +0 -6
  233. package/lib/adjust.less +0 -89
  234. package/lib/helper.js +0 -204
  235. package/lib/history.js +0 -18
  236. package/lib/index.js +0 -347
  237. package/lib/index.less +0 -31
  238. package/lib/style.less +0 -30
  239. package/lib/variables.js +0 -16
  240. package/lib/variables.less +0 -73
  241. /package/{es → src}/Area/package.json +0 -0
  242. /package/{es → src}/Card/package.json +0 -0
  243. /package/{es → src}/CodeInput/package.json +0 -0
  244. /package/{es → src}/Control/package.json +0 -0
  245. /package/{es → src}/Enhance/package.json +0 -0
  246. /package/{es → src}/Header/Header.less +0 -0
  247. /package/{es → src}/Header/Vertical.less +0 -0
  248. /package/{es → src}/Header/package.json +0 -0
  249. /package/{es → src}/ImageView/ImageView.less +0 -0
  250. /package/{es → src}/ImageView/package.json +0 -0
  251. /package/{es → src}/Indent/package.json +0 -0
  252. /package/{es → src}/InpurCascader/package.json +0 -0
  253. /package/{es → src}/InputEditor/inputEditor.less +0 -0
  254. /package/{es → src}/InputEditor/package.json +0 -0
  255. /package/{es → src}/InputSearch/package.json +0 -0
  256. /package/{es → src}/InputSelect/package.json +0 -0
  257. /package/{es → src}/InputTreeSelect/package.json +0 -0
  258. /package/{es → src}/InputWriting/package.json +0 -0
  259. /package/{es → src}/Layout/Layout.less +0 -0
  260. /package/{es → src}/Layout/package.json +0 -0
  261. /package/{es → src}/LayoutLink/LayoutLink.less +0 -0
  262. /package/{es → src}/LayoutLink/package.json +0 -0
  263. /package/{es → src}/Link/package.json +0 -0
  264. /package/{es → src}/Loading/Loading.less +0 -0
  265. /package/{es → src}/Loading/package.json +0 -0
  266. /package/{es → src}/Loading2/Loading2.less +0 -0
  267. /package/{es → src}/Loading2/package.json +0 -0
  268. /package/{es → src}/ModalWithDrag/ModalWithDrag.less +0 -0
  269. /package/{es → src}/ModalWithDrag/package.json +0 -0
  270. /package/{es → src}/NumberInput/package.json +0 -0
  271. /package/{es → src}/Search/Search.less +0 -0
  272. /package/{es → src}/Search/package.json +0 -0
  273. /package/{es → src}/Sidebar/Sidebar.less +0 -0
  274. /package/{es → src}/Sidebar/package.json +0 -0
  275. /package/{es → src}/Sidebar2/Sidebar.less +0 -0
  276. /package/{es → src}/Sidebar2/package.json +0 -0
  277. /package/{es → src}/SuperForm/SuperForm.less +0 -0
  278. /package/{es → src}/SuperForm/package.json +0 -0
  279. /package/{es → src}/SuperForm2/SuperForm.less +0 -0
  280. /package/{es → src}/SuperForm2/package.json +0 -0
  281. /package/{es → src}/SuperIcon/package.json +0 -0
  282. /package/{es → src}/SuperPagination/package.json +0 -0
  283. /package/{es → src}/SuperTab/SuperTab.less +0 -0
  284. /package/{es → src}/SuperTab/package.json +0 -0
  285. /package/{es → src}/SuperTab2/SuperTab2.less +0 -0
  286. /package/{es → src}/SuperTab2/package.json +0 -0
  287. /package/{es → src}/SuperTable/DragSortRow.less +0 -0
  288. /package/{es → src}/SuperTable/FilterDropDown.less +0 -0
  289. /package/{es → src}/SuperTable/SuperTable.less +0 -0
  290. /package/{es → src}/SuperTable/package.json +0 -0
  291. /package/{es → src}/SuperTable2/SuperTable2.less +0 -0
  292. /package/{es → src}/SuperTable2/package.json +0 -0
  293. /package/{es → src}/SuperTable3/FilterDropDown.less +0 -0
  294. /package/{es → src}/SuperTable3/SuperTable.less +0 -0
  295. /package/{es → src}/SuperTable3/package.json +0 -0
  296. /package/{es → src}/SuperToolbar/SuperToolbar.less +0 -0
  297. /package/{es → src}/SuperToolbar/package.json +0 -0
  298. /package/{es → src}/SuperUpload/SuperUpload.less +0 -0
  299. /package/{es → src}/SuperUpload/package.json +0 -0
  300. /package/{es → src}/Title/Title.less +0 -0
  301. /package/{es → src}/Title/package.json +0 -0
  302. /package/{es → src}/Viewer/Viewer.less +0 -0
  303. /package/{es → src}/Viewer/imgView.less +0 -0
  304. /package/{es → src}/Viewer/package.json +0 -0
  305. /package/{es → src}/WingBlank/WingBlank.less +0 -0
  306. /package/{es → src}/WingBlank/package.json +0 -0
  307. /package/{es → src}/adjust.less +0 -0
  308. /package/{es → src}/style.less +0 -0
  309. /package/{es → src}/variables.less +0 -0
@@ -1,135 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
5
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
6
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
7
- import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
8
- import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
- import _Cascader from "antd/es/cascader";
10
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
11
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
12
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
13
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
14
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
15
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
16
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
17
-
18
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
-
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
21
-
22
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
23
-
24
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
25
-
26
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
27
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
28
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
29
- //级联选择input
30
- import React from 'react';
31
- import PropTypes from 'prop-types';
32
- import { getObjectExclude } from '../helper';
33
- var optionsType = {
34
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
35
- disabled: PropTypes.bool,
36
- children: PropTypes.array,
37
- title: PropTypes.string,
38
- isLeaf: PropTypes.bool //false 就会触发 loadData 方法,从而在loadData方法中请求下一级数据,
39
-
40
- };
41
- var PROPS = {
42
- options: PropTypes.arrayOf(PropTypes.shape(optionsType)).isRequired,
43
- value: PropTypes.array.isRequired,
44
- placeholder: PropTypes.string,
45
- onChange: PropTypes.func,
46
- loadData: PropTypes.func,
47
- //动态加载 ps:loadData 与 showSearch 无法一起使用
48
- showSearch: PropTypes.func
49
- };
50
-
51
- var PROPS_KEYS = _Object$keys(PROPS);
52
-
53
- var InputCascader = /*#__PURE__*/function (_React$Component) {
54
- _inherits(InputCascader, _React$Component);
55
-
56
- var _super = _createSuper(InputCascader);
57
-
58
- function InputCascader(_props) {
59
- var _this;
60
-
61
- _classCallCheck(this, InputCascader);
62
-
63
- _this = _super.call(this, _props);
64
-
65
- _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
66
- var onChange = _this.props.onChange;
67
- onChange && onChange(value);
68
- });
69
-
70
- _defineProperty(_assertThisInitialized(_this), "loadData", function (selectedOptions) {
71
- var onSearch = _this.props.onSearch;
72
- onSearch && onSearch(selectedOptions[0]);
73
- });
74
-
75
- _defineProperty(_assertThisInitialized(_this), "getOptions", function (options) {
76
- return _mapInstanceProperty(options).call(options, function (option) {
77
- var obj = _objectSpread(_objectSpread({}, option), {}, {
78
- label: option.title
79
- });
80
-
81
- if (option.children && option.children.length > 0) {
82
- obj.children = _this.getOptions(option.children);
83
- }
84
-
85
- return obj;
86
- });
87
- });
88
-
89
- _defineProperty(_assertThisInitialized(_this), "showSearch", function (inputValue, path) {});
90
-
91
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
92
- var _this$props = _this.props,
93
- _this$props$options = _this$props.options,
94
- options = _this$props$options === void 0 ? [] : _this$props$options,
95
- placeholder = _this$props.placeholder,
96
- size = _this$props.size,
97
- value = _this$props.value,
98
- loadData = _this$props.loadData,
99
- showSearch = _this$props.showSearch;
100
-
101
- var props = _Object$assign(getObjectExclude({}, PROPS_KEYS), {
102
- onChange: _this.onChange,
103
- value: value,
104
- options: _this.getOptions(options),
105
- changeOnSelect: true,
106
- placeholder: placeholder,
107
- size: size
108
- }); //动态加载 ps:loadData 与 showSearch 无法一起使用
109
-
110
-
111
- if (loadData) {
112
- props.loadData = _this.loadData;
113
- } else if (showSearch) {
114
- props.showSearch = _this.showSearch;
115
- }
116
-
117
- return props;
118
- });
119
-
120
- return _this;
121
- }
122
-
123
- _createClass(InputCascader, [{
124
- key: "render",
125
- value: function render() {
126
- return /*#__PURE__*/React.createElement(_Cascader, this.getProps());
127
- }
128
- }]);
129
-
130
- return InputCascader;
131
- }(React.Component);
132
-
133
- _defineProperty(InputCascader, "propTypes", PROPS);
134
-
135
- export default InputCascader;
@@ -1,113 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
3
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
4
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
5
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
7
-
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
-
10
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
11
-
12
- import React from 'react';
13
- import variables from '../variables';
14
- var defaultMenus = ['head', // 标题
15
- 'bold', // 粗体
16
- 'fontSize', // 字号
17
- 'fontName', // 字体
18
- 'italic', // 斜体
19
- 'underline', // 下划线
20
- 'strikeThrough', // 删除线
21
- 'foreColor', // 文字颜色
22
- 'backColor', // 背景颜色
23
- 'link', // 插入链接
24
- 'list', // 列表
25
- 'justify', // 对齐方式
26
- 'quote', // 引用
27
- 'image', // 插入图片
28
- 'table', // 表格
29
- 'code' // 插入代码
30
- ];
31
-
32
- var InputEditor = /*#__PURE__*/function (_React$Component) {
33
- _inherits(InputEditor, _React$Component);
34
-
35
- var _super = _createSuper(InputEditor);
36
-
37
- function InputEditor() {
38
- _classCallCheck(this, InputEditor);
39
-
40
- return _super.apply(this, arguments);
41
- }
42
-
43
- _createClass(InputEditor, [{
44
- key: "componentDidMount",
45
- value: function componentDidMount() {
46
- var _this$props = this.props,
47
- inputKey = _this$props.inputKey,
48
- menus = _this$props.menus,
49
- color = _this$props.color,
50
- _this$props$showLinkI = _this$props.showLinkImg,
51
- showLinkImg = _this$props$showLinkI === void 0 ? true : _this$props$showLinkI,
52
- _this$props$uploadImg = _this$props.uploadImgShowBase64,
53
- uploadImgShowBase64 = _this$props$uploadImg === void 0 ? true : _this$props$uploadImg,
54
- onChange = _this$props.onChange,
55
- value = _this$props.value,
56
- readonly = _this$props.readonly;
57
-
58
- if (!readonly) {
59
- var elem = this.refs[inputKey];
60
- this[inputKey] = new E(elem); //配置菜单
61
-
62
- menus && (this[inputKey].config.menus = menus); //配置颜色
63
-
64
- color && (this[inputKey].config.menus = color); //配置菜单
65
-
66
- this[inputKey].config.menus = defaultMenus;
67
-
68
- if (menus) {
69
- this[inputKey].config.menus = menus;
70
- }
71
-
72
- this[inputKey].config.uploadImgShowBase64 = uploadImgShowBase64; //是否可以上传图片
73
-
74
- this[inputKey].config.showLinkImg = showLinkImg; //隐藏网络图片
75
-
76
- this[inputKey].config.onchange = function (html) {
77
- onChange && onChange(html);
78
- }; //配置编辑区域的 z-index
79
-
80
-
81
- this[inputKey].config.zIndex = 0;
82
- this[inputKey].create();
83
- this[inputKey].txt.html(value);
84
- }
85
- }
86
- }, {
87
- key: "componentDidUpdate",
88
- value: function componentDidUpdate() {// const {inputKey,value='', readonly} = this.props;
89
- // !readonly && value && this[inputKey].txt.html(value); //支持清空操作
90
- }
91
- }, {
92
- key: "render",
93
- value: function render() {
94
- var _this$props2 = this.props,
95
- inputKey = _this$props2.inputKey,
96
- readonly = _this$props2.readonly,
97
- value = _this$props2.value;
98
- return /*#__PURE__*/React.createElement("div", {
99
- className: variables('InputEditor')
100
- }, readonly ? /*#__PURE__*/React.createElement("div", {
101
- dangerouslySetInnerHTML: {
102
- __html: "".concat(value)
103
- }
104
- }) : /*#__PURE__*/React.createElement("div", {
105
- ref: inputKey
106
- }));
107
- }
108
- }]);
109
-
110
- return InputEditor;
111
- }(React.Component);
112
-
113
- export default InputEditor;
@@ -1,311 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _Input from "antd/es/input";
3
- import _typeof from "@babel/runtime-corejs3/helpers/typeof";
4
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
5
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
6
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
7
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
9
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
10
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
11
- import _Icon from "antd/es/icon";
12
- import _AutoComplete from "antd/es/auto-complete";
13
-
14
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
15
-
16
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
17
-
18
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
19
- import _findIndexInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find-index";
20
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
21
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
22
- import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
23
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
24
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
25
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
26
- import React from 'react';
27
- import PropTypes from 'prop-types';
28
- import { getObjectExclude } from '../helper';
29
- var SelectOption = _AutoComplete.Option; // 如果写在局部,每次渲染时生成的suffix引用值不同,会使antd的Input认为suffix动态变化了,从而导致Input报出警告 (antd的BUG)
30
-
31
- var suffix = /*#__PURE__*/React.createElement(_Icon, {
32
- type: "search",
33
- style: {
34
- color: 'black',
35
- opacity: 0.25,
36
- marginRight: -4
37
- }
38
- });
39
- var OPTION_STYLE = {
40
- "float": 'right',
41
- marginLeft: '1rem',
42
- color: '#aaa',
43
- whiteSpace: 'pre-wrap'
44
- };
45
- var OPTION_STYLE2 = {
46
- display: 'block',
47
- color: '#aaa',
48
- whiteSpace: 'pre-wrap'
49
- };
50
- /**
51
- * filter: 为true表示下拉列表会依据输入的值进行前端过滤,默认为true; 如果不想过滤,则设为false
52
- * remark: 为true表示options的option中含有remark字段,并需要用remark值进行过滤下拉,默认为false
53
- * searchWhenClick: 每次点击时,触发onSearch事件,默认为false
54
- * noSearchWhenTypo: 当输入时,不触发onSearch事件,默认为false
55
- */
56
-
57
- var PROPS = {
58
- filter: PropTypes.bool,
59
- remark: PropTypes.bool,
60
- searchWhenClick: PropTypes.bool,
61
- noSearchWhenTypo: PropTypes.bool,
62
- options: PropTypes.array,
63
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]),
64
- inputRef: PropTypes.func,
65
- onChange: PropTypes.func,
66
- onBlur: PropTypes.func,
67
- onSelect: PropTypes.func,
68
- onSearch: PropTypes.func
69
- };
70
-
71
- var PROPS_KEYS = _Object$keys(PROPS);
72
-
73
- var InputSearch = /*#__PURE__*/function (_React$Component) {
74
- _inherits(InputSearch, _React$Component);
75
-
76
- var _super = _createSuper(InputSearch);
77
-
78
- function InputSearch(_props) {
79
- var _this;
80
-
81
- _classCallCheck(this, InputSearch);
82
-
83
- _this = _super.call(this, _props);
84
-
85
- _defineProperty(_assertThisInitialized(_this), "onSearch", function (value) {
86
- _this.setState({
87
- value: value
88
- });
89
-
90
- var _this$props = _this.props,
91
- onSearch = _this$props.onSearch,
92
- noSearchWhenTypo = _this$props.noSearchWhenTypo;
93
- !noSearchWhenTypo && onSearch && onSearch(value);
94
- });
95
-
96
- _defineProperty(_assertThisInitialized(_this), "onBlur", function () {
97
- var _this$props2 = _this.props,
98
- _this$props2$autoAdd = _this$props2.autoAdd,
99
- autoAdd = _this$props2$autoAdd === void 0 ? false : _this$props2$autoAdd,
100
- _this$props2$options = _this$props2.options,
101
- options = _this$props2$options === void 0 ? [] : _this$props2$options,
102
- onChange = _this$props2.onChange,
103
- onBlur = _this$props2.onBlur;
104
-
105
- if (_this.props.value !== _this.state.value) {
106
- var index = _findIndexInstanceProperty(options).call(options, function (option) {
107
- return option.title === _this.state.value;
108
- });
109
-
110
- var value = '';
111
-
112
- if (index === -1) {
113
- if (autoAdd && _this.state.value) {
114
- if (typeof _this.state.value === 'string') {
115
- value = {
116
- value: -1,
117
- title: _this.state.value
118
- };
119
- } else if (_typeof(_this.state.value) === 'object' && _this.state.value.title && _this.state.value.value) {
120
- value = _this.state.value;
121
- }
122
- }
123
- } else {
124
- value = options[index];
125
- }
126
-
127
- _this.setState({
128
- value: value
129
- });
130
-
131
- onChange && onChange(value);
132
- onBlur && onBlur(value);
133
- } else {
134
- onBlur && onBlur(_this.props.value);
135
- }
136
- });
137
-
138
- _defineProperty(_assertThisInitialized(_this), "onSelect", function (value) {
139
- var _this$props3 = _this.props,
140
- onChange = _this$props3.onChange,
141
- _this$props3$options = _this$props3.options,
142
- options = _this$props3$options === void 0 ? [] : _this$props3$options;
143
-
144
- var index = _findIndexInstanceProperty(options).call(options, function (option) {
145
- return String(option.value) === value;
146
- });
147
-
148
- if (index > -1) {
149
- _this.setState({
150
- value: options[index]
151
- });
152
-
153
- onChange && onChange(options[index]);
154
- }
155
- });
156
-
157
- _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
158
- var _this$props4 = _this.props,
159
- _this$props4$options = _this$props4.options,
160
- options = _this$props4$options === void 0 ? [] : _this$props4$options,
161
- onSearch = _this$props4.onSearch,
162
- searchWhenClick = _this$props4.searchWhenClick,
163
- value = _this$props4.value;
164
-
165
- if (onSearch && (!options.length || !value && searchWhenClick)) {
166
- onSearch(e.target.value);
167
- }
168
- });
169
-
170
- _defineProperty(_assertThisInitialized(_this), "makeValueValid", function (value) {
171
- var _context;
172
-
173
- return _includesInstanceProperty(_context = [NaN, undefined, null]).call(_context, value) ? '' : value;
174
- });
175
-
176
- _defineProperty(_assertThisInitialized(_this), "getValue", function () {
177
- var value = _this.state.value;
178
- return String(_this.makeValueValid(_typeof(value) === 'object' ? value.value : value));
179
- });
180
-
181
- _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
182
- var _context2;
183
-
184
- return option.props.children && _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
185
- });
186
-
187
- _defineProperty(_assertThisInitialized(_this), "isMatchRemark", function (inputValue, option) {
188
- var _option$props = option.props,
189
- _option$props$text = _option$props.text,
190
- text = _option$props$text === void 0 ? '' : _option$props$text,
191
- _option$props$remark = _option$props.remark,
192
- remark = _option$props$remark === void 0 ? '' : _option$props$remark;
193
- return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
194
- });
195
-
196
- _defineProperty(_assertThisInitialized(_this), "isValidValue", function (value) {
197
- var _context3;
198
-
199
- // value必须为对象,且有属性value的值不等''或undefined
200
- return value && !_includesInstanceProperty(_context3 = ['', undefined]).call(_context3, value.value);
201
- });
202
-
203
- _defineProperty(_assertThisInitialized(_this), "getOptions", function () {
204
- var value = _this.state.value;
205
- var options = _this.props.options;
206
-
207
- if (options && options.length) {
208
- if (_this.isValidValue(value) && !_findInstanceProperty(options).call(options, function (option) {
209
- return option.value === value.value;
210
- })) {
211
- return [value];
212
- } else {
213
- return options;
214
- }
215
- } else if (_this.isValidValue(value)) {
216
- return [value];
217
- } else {
218
- return [];
219
- }
220
- });
221
-
222
- _defineProperty(_assertThisInitialized(_this), "getDataSource", function () {
223
- var _context4;
224
-
225
- return _mapInstanceProperty(_context4 = _this.getOptions()).call(_context4, function (option) {
226
- return {
227
- value: String(option.value),
228
- text: option.title
229
- };
230
- });
231
- });
232
-
233
- _defineProperty(_assertThisInitialized(_this), "getDataSourceRemark", function () {
234
- var _context5;
235
-
236
- return _mapInstanceProperty(_context5 = _this.getOptions()).call(_context5, function (option, index) {
237
- return /*#__PURE__*/React.createElement(SelectOption, {
238
- key: index,
239
- value: String(option.value),
240
- text: option.title,
241
- remark: option.remark || ''
242
- }, /*#__PURE__*/React.createElement("span", null, option.title), /*#__PURE__*/React.createElement("span", {
243
- style: OPTION_STYLE
244
- }, option.remark || ''), /*#__PURE__*/React.createElement("span", {
245
- style: OPTION_STYLE2
246
- }, option.description || ''));
247
- });
248
- });
249
-
250
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
251
- var _this$props5 = _this.props,
252
- inputRef = _this$props5.inputRef,
253
- _this$props5$filter = _filterInstanceProperty(_this$props5),
254
- filter = _this$props5$filter === void 0 ? true : _this$props5$filter;
255
-
256
- var props = _Object$assign(getObjectExclude(_this.props, PROPS_KEYS), {
257
- value: _this.getValue(),
258
- allowClear: true,
259
- ref: inputRef,
260
- onChange: _this.onSearch,
261
- filterOption: function filterOption(e, option) {
262
- return option;
263
- },
264
- onSelect: _this.onSelect,
265
- onBlur: _this.onBlur
266
- });
267
-
268
- if (_this.props.remark) {
269
- props.dataSource = _this.getDataSourceRemark();
270
- props.filterOption = filter ? _this.isMatchRemark : false;
271
- props.optionLabelProp = 'text';
272
- } else {
273
- props.dataSource = _this.getDataSource();
274
- props.filterOption = filter ? _this.isMatch : false;
275
- }
276
-
277
- return props;
278
- });
279
-
280
- _this.state = {
281
- value: _props.value
282
- };
283
- return _this;
284
- }
285
-
286
- _createClass(InputSearch, [{
287
- key: "componentWillReceiveProps",
288
- value: function componentWillReceiveProps(props) {
289
- if (props.value !== this.props.value) {
290
- this.setState({
291
- value: props.value
292
- });
293
- }
294
- }
295
- }, {
296
- key: "render",
297
- value: function render() {
298
- return /*#__PURE__*/React.createElement("div", {
299
- onClick: this.onClick
300
- }, /*#__PURE__*/React.createElement(_AutoComplete, this.getProps(), /*#__PURE__*/React.createElement(_Input, {
301
- suffix: suffix
302
- })));
303
- }
304
- }]);
305
-
306
- return InputSearch;
307
- }(React.Component);
308
-
309
- _defineProperty(InputSearch, "propTypes", PROPS);
310
-
311
- export default InputSearch;