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,311 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _Icon from "antd/es/icon";
3
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
7
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
8
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
9
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
- import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
11
- import _JSON$stringify from "@babel/runtime-corejs3/core-js-stable/json/stringify";
12
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
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 React from "react";
19
- import variables from '../variables';
20
-
21
- var addEvent = function addEvent(el, event, handler) {
22
- if (!el) return;
23
-
24
- if (el.attachEvent) {
25
- el.attachEvent('on' + event, handler);
26
- } else if (el.addEventListener) {
27
- el.addEventListener(event, handler, false);
28
- } else {
29
- el['on' + event] = handler;
30
- }
31
- };
32
-
33
- var removeEvent = function removeEvent(el, event, handler) {
34
- if (!el) return;
35
-
36
- if (el.detachEvent) {
37
- el.detachEvent('on' + event, handler);
38
- } else if (el.removeEventListener) {
39
- el.removeEventListener(event, handler, false);
40
- } else {
41
- el['on' + event] = null;
42
- }
43
- };
44
-
45
- var getCss = function getCss(o, key) {
46
- return o.currentStyle ? o.currentStyle[key] : document.defaultView.getComputedStyle(o)[key];
47
- }; // 获取元素旋转的角度
48
-
49
-
50
- var getRotateDeg = function getRotateDeg(target) {
51
- var rotateMatrix = getCss(target, 'transform');
52
-
53
- var _rotateMatrix$split$ = rotateMatrix.split('(')[1].split(')')[0].split(','),
54
- _rotateMatrix$split$2 = _slicedToArray(_rotateMatrix$split$, 2),
55
- a = _rotateMatrix$split$2[0],
56
- b = _rotateMatrix$split$2[1];
57
-
58
- return Math.round(Math.atan2(b, a) * (180 / Math.PI));
59
- };
60
-
61
- var ImageViews = /*#__PURE__*/function (_React$Component) {
62
- _inherits(ImageViews, _React$Component);
63
-
64
- var _super = _createSuper(ImageViews);
65
-
66
- function ImageViews(props) {
67
- var _this;
68
-
69
- _classCallCheck(this, ImageViews);
70
-
71
- _this = _super.call(this, props);
72
-
73
- _defineProperty(_assertThisInitialized(_this), "_onwheel", function (e) {
74
- var zoom = _this.state.zoom;
75
- /*事件兼容*/
76
-
77
- var event = e || window.event;
78
- var imageDOM = _this.imgRef;
79
- var delta;
80
-
81
- if (event.nativeEvent.wheelDelta) {
82
- delta = event.nativeEvent.wheelDelta / 1200;
83
- } else if (event.nativeEvent.deltaY) {
84
- delta = -event.nativeEvent.deltaY / 1200;
85
- }
86
-
87
- var zoomVal = zoom + delta;
88
-
89
- if (zoomVal >= 0.2) {
90
- imageDOM.style.transform = "translate(-50%,-50%) scale(".concat(zoomVal, ")");
91
- } else {
92
- zoomVal = 0.2;
93
- imageDOM.style.transform = "translate(-50%,-50%) scale(".concat(zoomVal, ")");
94
- }
95
-
96
- _this.setState({
97
- zoom: zoomVal
98
- });
99
- });
100
-
101
- _defineProperty(_assertThisInitialized(_this), "_onMouseDown", function (e) {
102
- /*事件兼容*/
103
- var event = e || window.event;
104
- var imageDOM = _this.imgRef;
105
- event.preventDefault(); //阻止浏览器的默认事件
106
-
107
- var startTouch = {};
108
- startTouch.initiated = true; //initiated为true表示开始滑动
109
-
110
- /*获取鼠标按下的地方距离元素左侧和上侧的距离*/
111
-
112
- startTouch.startX = event.nativeEvent.clientX - imageDOM.offsetLeft;
113
- startTouch.startY = event.nativeEvent.clientY - imageDOM.offsetTop;
114
-
115
- _this.setState({
116
- startTouch: startTouch
117
- });
118
-
119
- addEvent(document, 'mousemove', _this._onMouseMove);
120
- addEvent(document, 'mouseup', _this._onMouseUp);
121
- });
122
-
123
- _defineProperty(_assertThisInitialized(_this), "_onMouseMove", function (e) {
124
- var event = e || window.event;
125
- var imageDOM = _this.imgRef;
126
- var startTouch = _this.state.startTouch;
127
- if (!startTouch.initiated) return; //滑动距离
128
-
129
- var deltaX = event.clientX - startTouch.startX;
130
- var deltaY = event.clientY - startTouch.startY;
131
- imageDOM.style.left = "".concat(deltaX, "px");
132
- imageDOM.style.top = "".concat(deltaY, "px");
133
- });
134
-
135
- _defineProperty(_assertThisInitialized(_this), "_onMouseUp", function () {
136
- var startTouch = _this.state.startTouch;
137
- if (!startTouch.initiated) return;
138
- var endTouch = JSON.parse(_JSON$stringify(startTouch));
139
- endTouch.initiated = false;
140
-
141
- _this.setState({
142
- startTouch: startTouch
143
- });
144
-
145
- removeEvent(document, 'mousemove', _this._onMouseMove);
146
- removeEvent(document, 'mouseup', _this._onMouseDown);
147
- });
148
-
149
- _defineProperty(_assertThisInitialized(_this), "_onPlus", function (event) {
150
- var zoom = _this.state.zoom;
151
- var imageDOM = _this.imgRef;
152
- var zoomVal = zoom + 0.1;
153
- var originDeg = getRotateDeg(imageDOM);
154
- event.stopPropagation();
155
-
156
- if (zoomVal >= 0.2) {
157
- var _context;
158
-
159
- imageDOM.style.transform = _concatInstanceProperty(_context = "translate(-50%,-50%) scale(".concat(zoomVal, ") rotate(")).call(_context, originDeg, "deg)");
160
- }
161
-
162
- _this.setState({
163
- zoom: zoomVal
164
- });
165
- });
166
-
167
- _defineProperty(_assertThisInitialized(_this), "_onMinus", function () {
168
- var _context2;
169
-
170
- var zoom = _this.state.zoom;
171
- var imageDOM = _this.imgRef;
172
- var zoomVal = zoom - 0.1;
173
- var originDeg = getRotateDeg(imageDOM);
174
-
175
- if (zoomVal < 0.2) {
176
- zoomVal = 0.2;
177
- }
178
-
179
- imageDOM.style.transform = _concatInstanceProperty(_context2 = "translate(-50%,-50%) scale(".concat(zoomVal, ") rotate(")).call(_context2, originDeg, "deg)");
180
-
181
- _this.setState({
182
- zoom: zoomVal
183
- });
184
- });
185
-
186
- _defineProperty(_assertThisInitialized(_this), "_reload", function () {
187
- var imageDOM = _this.imgRef;
188
- imageDOM.style.transform = "translate(-50%,-50%) scale(1) rotate(0deg)";
189
- imageDOM.style.left = "50%";
190
- imageDOM.style.top = "50%";
191
-
192
- _this.setState({
193
- zoom: 1
194
- });
195
- });
196
-
197
- _defineProperty(_assertThisInitialized(_this), "_arrowLeft", function () {
198
- var onLeft = _this.props.onLeft;
199
- onLeft && onLeft();
200
- var imageDOM = _this.imgRef;
201
- imageDOM.style.transform = "translate(-50%,-50%) scale(1) rotate(0deg)";
202
- imageDOM.style.left = "50%";
203
- imageDOM.style.top = "50%";
204
-
205
- _this.setState({
206
- zoom: 1
207
- });
208
- });
209
-
210
- _defineProperty(_assertThisInitialized(_this), "_arrowRight", function () {
211
- var onRight = _this.props.onRight;
212
- onRight && onRight();
213
- var imageDOM = _this.imgRef;
214
- imageDOM.style.transform = "translate(-50%,-50%) scale(1) rotate(0deg)";
215
- imageDOM.style.left = "50%";
216
- imageDOM.style.top = "50%";
217
-
218
- _this.setState({
219
- zoom: 1
220
- });
221
- });
222
-
223
- _defineProperty(_assertThisInitialized(_this), "rotate", function (isLeft) {
224
- return function () {
225
- var _context3;
226
-
227
- var imageDOM = _this.imgRef;
228
- var originDeg = getRotateDeg(imageDOM);
229
- var zoom = _this.state.zoom;
230
- var rotateDeg = isLeft ? originDeg - 90 : originDeg + 90;
231
- imageDOM.style.transform = _concatInstanceProperty(_context3 = "translate(-50%,-50%) rotate(".concat(rotateDeg, "deg) scale(")).call(_context3, zoom, ")");
232
- };
233
- });
234
-
235
- _this.state = {
236
- zoom: 1,
237
- startTouch: {}
238
- };
239
- return _this;
240
- }
241
-
242
- _createClass(ImageViews, [{
243
- key: "render",
244
- value: function render() {
245
- var _this2 = this;
246
-
247
- var image = this.props.image;
248
- return /*#__PURE__*/React.createElement("div", {
249
- className: variables('ImageViews')
250
- }, /*#__PURE__*/React.createElement("div", {
251
- role: "imgWrapper"
252
- }, /*#__PURE__*/React.createElement("img", {
253
- src: image.src,
254
- alt: image.alt,
255
- ref: function ref(imgRef) {
256
- _this2.imgRef = imgRef;
257
- },
258
- onWheel: this._onwheel //缩放事件
259
- ,
260
- onMouseDown: this._onMouseDown //拖拽事件
261
-
262
- })), /*#__PURE__*/React.createElement("div", {
263
- className: variables('ImageViews').footer
264
- }, /*#__PURE__*/React.createElement("div", {
265
- className: variables('ImageViews').toolBar
266
- }, /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", {
267
- title: "\u653E\u5927",
268
- onClick: this._onPlus,
269
- onDoubleClick: function onDoubleClick(event) {
270
- return event.preventDefault();
271
- }
272
- }, /*#__PURE__*/React.createElement(_Icon, {
273
- type: "plus"
274
- })), /*#__PURE__*/React.createElement("li", {
275
- title: "\u7F29\u5C0F",
276
- onClick: this._onMinus
277
- }, /*#__PURE__*/React.createElement(_Icon, {
278
- type: "minus"
279
- })), /*#__PURE__*/React.createElement("li", {
280
- title: "\u4E0A\u4E00\u5F20",
281
- onClick: this._arrowLeft
282
- }, /*#__PURE__*/React.createElement(_Icon, {
283
- type: "arrow-left"
284
- })), /*#__PURE__*/React.createElement("li", {
285
- title: "\u4E0B\u4E00\u5F20",
286
- onClick: this._arrowRight
287
- }, /*#__PURE__*/React.createElement(_Icon, {
288
- type: "arrow-right"
289
- })), /*#__PURE__*/React.createElement("li", {
290
- title: "\u5411\u5DE6\u65CB\u8F6C",
291
- onClick: this.rotate(true)
292
- }, /*#__PURE__*/React.createElement(_Icon, {
293
- type: "pld-rotateleft"
294
- })), /*#__PURE__*/React.createElement("li", {
295
- title: "\u5411\u53F3\u65CB\u8F6C",
296
- onClick: this.rotate(false)
297
- }, /*#__PURE__*/React.createElement(_Icon, {
298
- type: "pld-rotateright"
299
- })), /*#__PURE__*/React.createElement("li", {
300
- title: "\u590D\u539F",
301
- onClick: this._reload
302
- }, /*#__PURE__*/React.createElement(_Icon, {
303
- type: "delete"
304
- }))))));
305
- }
306
- }]);
307
-
308
- return ImageViews;
309
- }(React.Component);
310
-
311
- export default ImageViews;
@@ -1,149 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _Icon from "antd/es/icon";
3
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
7
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
8
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
9
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
- import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
11
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
12
- import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
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 React from 'react';
19
- import PropTypes from 'prop-types';
20
- import ImageViews from "./ImageViews";
21
- import variables from '../variables';
22
-
23
- var Viewers = /*#__PURE__*/function (_React$Component) {
24
- _inherits(Viewers, _React$Component);
25
-
26
- var _super = _createSuper(Viewers);
27
-
28
- function Viewers(props) {
29
- var _this;
30
-
31
- _classCallCheck(this, Viewers);
32
-
33
- _this = _super.call(this, props);
34
-
35
- //修复Warning报错
36
- _defineProperty(_assertThisInitialized(_this), "componentWillUnmount", function () {
37
- _this.timeout = null;
38
- });
39
-
40
- _defineProperty(_assertThisInitialized(_this), "closeViewers", function () {
41
- var _this$props = _this.props,
42
- onCancel = _this$props.onCancel,
43
- onClose = _this$props.onClose;
44
- _this.containerRef.style['opacity'] = 0;
45
- _this.timeout = _setTimeout(function () {
46
- onCancel && onCancel(onClose);
47
- }, 1000);
48
- });
49
-
50
- _defineProperty(_assertThisInitialized(_this), "_onLeft", function () {
51
- var imageIndex = _this.state.imageIndex;
52
- var images = _this.props.images;
53
- var index = imageIndex - 1;
54
-
55
- if (index < 0) {
56
- index = images.length - 1;
57
- }
58
-
59
- _this.setState({
60
- imageIndex: index
61
- });
62
- });
63
-
64
- _defineProperty(_assertThisInitialized(_this), "_onRight", function () {
65
- var imageIndex = _this.state.imageIndex;
66
- var images = _this.props.images;
67
- var index = imageIndex + 1;
68
-
69
- if (index > images.length - 1) {
70
- index = 0;
71
- }
72
-
73
- _this.setState({
74
- imageIndex: index
75
- });
76
- });
77
-
78
- _defineProperty(_assertThisInitialized(_this), "_onSelect", function (index) {
79
- _this.setState({
80
- imageIndex: index
81
- });
82
- });
83
-
84
- _this.state = {
85
- imageIndex: props.imageIndex
86
- };
87
- return _this;
88
- }
89
-
90
- _createClass(Viewers, [{
91
- key: "render",
92
- value: function render() {
93
- var _this2 = this;
94
-
95
- var _this$props2 = this.props,
96
- visible = _this$props2.visible,
97
- images = _this$props2.images,
98
- titles = _this$props2.titles;
99
- var imageIndex = this.state.imageIndex;
100
- return /*#__PURE__*/React.createElement("div", null, visible ? /*#__PURE__*/React.createElement("div", {
101
- className: variables('Viewers'),
102
- ref: function ref(container) {
103
- _this2.containerRef = container;
104
- }
105
- }, /*#__PURE__*/React.createElement("div", {
106
- className: variables('Viewers').mask
107
- }), /*#__PURE__*/React.createElement("div", {
108
- className: variables('Viewers').title
109
- }, _mapInstanceProperty(titles).call(titles, function (item, index) {
110
- var _context;
111
-
112
- return /*#__PURE__*/React.createElement("div", {
113
- key: index,
114
- onClick: _bindInstanceProperty(_context = _this2._onSelect).call(_context, _this2, index),
115
- className: index === imageIndex ? variables('Viewers').selectTitle : ''
116
- }, item);
117
- })), /*#__PURE__*/React.createElement(ImageViews, {
118
- image: images[imageIndex],
119
- onLeft: this._onLeft,
120
- onRight: this._onRight
121
- }), /*#__PURE__*/React.createElement("div", {
122
- className: variables('Viewers').close,
123
- onClick: function onClick() {
124
- return _this2.closeViewers();
125
- }
126
- }, /*#__PURE__*/React.createElement(_Icon, {
127
- type: "close"
128
- }))) : null);
129
- }
130
- }]);
131
-
132
- return Viewers;
133
- }(React.Component);
134
-
135
- _defineProperty(Viewers, "propTypes", {
136
- /** viewer是否可见 */
137
- visible: PropTypes.bool.isRequired,
138
-
139
- /** 点击关闭按钮的回调 */
140
- onCancel: PropTypes.func.isRequired,
141
-
142
- /** 需要进行浏览的图片地址集合 */
143
- images: PropTypes.array.isRequired,
144
-
145
- /** 需要进行浏览的图片名称集合 */
146
- titles: PropTypes.array.isRequired
147
- });
148
-
149
- export default Viewers;
@@ -1,20 +0,0 @@
1
- import _extends from "@babel/runtime-corejs3/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
3
- var _excluded = ["className", "children"];
4
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
5
- import React from 'react';
6
- import variables from '../variables';
7
-
8
- function WingBlank(_ref) {
9
- var _context;
10
-
11
- var className = _ref.className,
12
- children = _ref.children,
13
- props = _objectWithoutProperties(_ref, _excluded);
14
-
15
- return /*#__PURE__*/React.createElement("div", _extends({
16
- className: _concatInstanceProperty(_context = "".concat(className, " ")).call(_context, variables('WingBlank'))
17
- }, props), /*#__PURE__*/React.createElement("div", null, children));
18
- }
19
-
20
- export default WingBlank;
package/es/helper.js DELETED
@@ -1,169 +0,0 @@
1
- import _typeof from "@babel/runtime-corejs3/helpers/typeof";
2
- import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
3
- import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
4
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
5
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
6
- import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
7
- import _Number$isInteger from "@babel/runtime-corejs3/core-js-stable/number/is-integer";
8
- import _parseFloat from "@babel/runtime-corejs3/core-js-stable/parse-float";
9
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
10
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
11
- import message from 'antd/lib/message';
12
- /**
13
- * 功能:从obj中取出不包含keys指定的属性,并组成一个新的子对象
14
- */
15
-
16
- var getObjectExclude = function getObjectExclude(obj, keys) {
17
- var _context;
18
-
19
- var inKeys = function inKeys(key) {
20
- return _someInstanceProperty(keys).call(keys, function (k) {
21
- return k === key;
22
- });
23
- };
24
-
25
- return _reduceInstanceProperty(_context = _Object$keys(obj)).call(_context, function (newObj, key) {
26
- !inKeys(key) && (newObj[key] = obj[key]);
27
- return newObj;
28
- }, {});
29
- }; // 获取当前登录的用户名
30
-
31
-
32
- var getUsername = function getUsername() {
33
- var username = 'username=';
34
- var cookie = document.cookie;
35
- var begin = _indexOfInstanceProperty(cookie).call(cookie, username) + username.length;
36
-
37
- var end = _indexOfInstanceProperty(cookie).call(cookie, ';', begin);
38
-
39
- return unescape(cookie.substring(begin, end < 0 ? cookie.length : end));
40
- };
41
- /**
42
- * 确保path为数组
43
- */
44
-
45
-
46
- var makeArray = function makeArray(path) {
47
- if (_Array$isArray(path)) {
48
- return path;
49
- } else if (!path) {
50
- return [];
51
- } else {
52
- return [path];
53
- }
54
- };
55
- /**
56
- * 功能:获取对象关键路径的值,不存在则返回undefined
57
- * obj:对象
58
- * path:字符串或字符串数组,指定关键路径
59
- */
60
-
61
-
62
- var getPathValue = function getPathValue(obj, path) {
63
- if (!path) {
64
- return undefined;
65
- } else {
66
- var _context2;
67
-
68
- return _reduceInstanceProperty(_context2 = makeArray(path)).call(_context2, function (value, key) {
69
- return _typeof(value) !== 'object' ? undefined : value[key];
70
- }, obj);
71
- }
72
- };
73
- /**
74
- * 功能:判断一个值是否为空(null,undefined和''属于空)
75
- */
76
-
77
-
78
- var isEmpty = function isEmpty(value) {
79
- var type = _typeof(value);
80
-
81
- if (type === 'number' || type === 'boolean') {
82
- return false;
83
- } else {
84
- return !value;
85
- }
86
- };
87
- /**
88
- * 功能:判断一个值是否为空(null,undefined,''和[]属于空)
89
- */
90
-
91
-
92
- var isEmpty2 = function isEmpty2(value) {
93
- var type = _typeof(value);
94
-
95
- if (type === 'number' || type === 'boolean') {
96
- return false;
97
- } else if (_Array$isArray(value)) {
98
- return !value.length;
99
- } else {
100
- return !value;
101
- }
102
- };
103
-
104
- var toThousands = function toThousands(number) {
105
- var fractionDigits = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
106
- var removeTrailingZeros = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
107
-
108
- if (!isNaN(Number(number))) {
109
- var formattedNumber;
110
-
111
- if (!_Number$isInteger(_parseFloat(number))) {
112
- formattedNumber = Number(number).toFixed(fractionDigits);
113
- }
114
-
115
- if (removeTrailingZeros) {
116
- //去除整数和小数部分末尾的零
117
- formattedNumber = formattedNumber.replace(/(\.\d*?[1-9])0*$/, '$1').replace(/\.0*$/, '');
118
- } else {
119
- formattedNumber = Number(number).toLocaleString(undefined, {
120
- minimumFractionDigits: fractionDigits,
121
- maximumFractionDigits: fractionDigits
122
- });
123
- }
124
-
125
- return formattedNumber;
126
- } else if (typeof number === 'string' && _includesInstanceProperty(number).call(number, '~')) {
127
- var numberList = number.split('~');
128
-
129
- var formattedArr = _mapInstanceProperty(numberList).call(numberList, function (num, index) {
130
- if (index === numberList.length - 1) {
131
- return _parseFloat(num).toFixed(fractionDigits);
132
- } else {
133
- return _parseFloat(num).toFixed(fractionDigits);
134
- }
135
- });
136
-
137
- var result = formattedArr.join('~');
138
- return result;
139
- }
140
- };
141
-
142
- var showError = function showError(msg) {
143
- message.error(msg);
144
- };
145
-
146
- var showSuccessMsg = function showSuccessMsg(msg) {
147
- message.success(msg);
148
- };
149
-
150
- var getObject = function getObject(obj, keys) {
151
- return _reduceInstanceProperty(keys).call(keys, function (newObj, key) {
152
- newObj[key] = obj[key];
153
- return newObj;
154
- }, {});
155
- };
156
-
157
- var helper = {
158
- getObjectExclude: getObjectExclude,
159
- getUsername: getUsername,
160
- getPathValue: getPathValue,
161
- isEmpty: isEmpty,
162
- isEmpty2: isEmpty2,
163
- showError: showError,
164
- showSuccessMsg: showSuccessMsg,
165
- toThousands: toThousands,
166
- getObject: getObject
167
- };
168
- export { getObject, getObjectExclude, getUsername, getPathValue, isEmpty, isEmpty2, showError, showSuccessMsg, toThousands };
169
- export default helper;
package/es/history.js DELETED
@@ -1,5 +0,0 @@
1
- // import createBrowserHistory from 'history/createBrowserHistory';
2
- import { createBrowserHistory } from 'history'; // Navigation manager, e.g. history.push('/home')
3
- // https://github.com/mjackson/history
4
-
5
- export default process.env.BROWSER && createBrowserHistory();
package/es/index.js DELETED
@@ -1,37 +0,0 @@
1
- import { EnhanceLoading, EnhanceDialogs, EnhanceEditDialog } from './Enhance';
2
- export { EnhanceLoading, EnhanceDialogs, EnhanceEditDialog };
3
- export { default as Title } from './Title';
4
- export { default as Card } from './Card';
5
- export { default as Control } from './Control';
6
- export { default as Header } from './Header';
7
- export { default as ImageView } from './ImageView';
8
- export { default as InpurCascader } from './InpurCascader';
9
- export { default as InputSearch } from './InputSearch';
10
- export { default as InputSelect } from './InputSelect';
11
- export { default as InputEditor } from './InputEditor';
12
- export { default as InputWriting } from './InputWriting';
13
- export { default as Layout } from './Layout';
14
- export { default as LayoutLink } from './LayoutLink';
15
- export { default as Link } from './Link';
16
- export { default as Loading } from './Loading';
17
- export { default as Loading2 } from './Loading2';
18
- export { default as ModalWithDrag } from './ModalWithDrag';
19
- export { default as NumberInput } from './NumberInput';
20
- export { default as Search } from './Search';
21
- export { default as Sidebar } from './Sidebar';
22
- export { default as Sidebar2 } from './Sidebar2';
23
- export { default as SuperForm } from './SuperForm';
24
- export { default as SuperForm2 } from './SuperForm2';
25
- export { default as SuperIcon } from './SuperIcon';
26
- export { default as SuperToolbar } from './SuperToolbar';
27
- export { default as SuperUpload } from './SuperUpload';
28
- export { default as Viewer } from './Viewer';
29
- export { default as WingBlank } from './WingBlank';
30
- export { default as Area } from './Area';
31
- export { default as SuperTable3 } from './SuperTable3';
32
- export { default as SuperTable2 } from './SuperTable2';
33
- export { default as SuperTable } from './SuperTable';
34
- export { default as SuperPagination } from './SuperPagination';
35
- export { default as SuperTab } from './SuperTab';
36
- export { default as SuperTab2 } from './SuperTab2';
37
- export { default as Indent } from './Indent';