cloud-b2b 1.0.4 → 1.0.7

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 (76) hide show
  1. package/es/Indent/Indent.js +23 -0
  2. package/es/Indent/package.json +6 -0
  3. package/es/LayoutLink/LayoutLink.js +2 -2
  4. package/es/Sidebar2/Sidebar.js +1 -1
  5. package/es/SuperForm/SuperForm.js +2 -2
  6. package/es/SuperForm2/SuperForm.js +732 -0
  7. package/es/SuperForm2/SuperForm.less +52 -0
  8. package/es/SuperForm2/package.json +6 -0
  9. package/es/SuperTab/SuperTab.js +130 -0
  10. package/es/SuperTab/SuperTab.less +43 -0
  11. package/es/SuperTab/package.json +6 -0
  12. package/es/SuperTab2/SuperTab2.js +167 -0
  13. package/es/SuperTab2/SuperTab2.less +18 -0
  14. package/es/SuperTab2/package.json +6 -0
  15. package/es/SuperTable/DragSortRow.less +17 -17
  16. package/es/SuperTable/FilterDropDown.less +30 -30
  17. package/es/SuperTable/SuperTable.js +38 -38
  18. package/es/SuperTable/SuperTable.less +132 -135
  19. package/es/SuperTable/package.json +6 -6
  20. package/es/SuperTable2/SuperTable2.js +22 -22
  21. package/es/SuperTable2/SuperTable2.less +100 -116
  22. package/es/SuperTable2/package.json +6 -6
  23. package/es/SuperTable3/FilterDropDown.js +188 -0
  24. package/es/SuperTable3/FilterDropDown.less +29 -0
  25. package/es/SuperTable3/SuperTable.js +783 -0
  26. package/es/SuperTable3/SuperTable.less +99 -0
  27. package/es/SuperTable3/fixed.js +42 -0
  28. package/es/SuperTable3/package.json +6 -0
  29. package/es/Title/Title.less +35 -35
  30. package/es/Title/package.json +6 -6
  31. package/es/Viewer/Viewer.js +1 -1
  32. package/es/adjust.less +89 -89
  33. package/es/index.js +12 -2
  34. package/es/style.less +12 -2
  35. package/lib/Indent/Indent.js +38 -0
  36. package/lib/Indent/package.json +6 -0
  37. package/lib/LayoutLink/LayoutLink.js +2 -2
  38. package/lib/Sidebar2/Sidebar.js +1 -1
  39. package/lib/SuperForm/SuperForm.js +2 -2
  40. package/lib/SuperForm2/SuperForm.js +742 -0
  41. package/lib/SuperForm2/SuperForm.less +52 -0
  42. package/lib/SuperForm2/package.json +6 -0
  43. package/lib/SuperTab/SuperTab.js +146 -0
  44. package/lib/SuperTab/SuperTab.less +43 -0
  45. package/lib/SuperTab/package.json +6 -0
  46. package/lib/SuperTab2/SuperTab2.js +191 -0
  47. package/lib/SuperTab2/SuperTab2.less +18 -0
  48. package/lib/SuperTab2/package.json +6 -0
  49. package/lib/SuperTable/DragSortRow.less +17 -17
  50. package/lib/SuperTable/FilterDropDown.less +30 -30
  51. package/lib/SuperTable/SuperTable.js +38 -38
  52. package/lib/SuperTable/SuperTable.less +132 -135
  53. package/lib/SuperTable/package.json +6 -6
  54. package/lib/SuperTable2/SuperTable2.js +22 -22
  55. package/lib/SuperTable2/SuperTable2.less +100 -116
  56. package/lib/SuperTable2/package.json +6 -6
  57. package/lib/SuperTable3/FilterDropDown.js +205 -0
  58. package/lib/SuperTable3/FilterDropDown.less +29 -0
  59. package/lib/SuperTable3/SuperTable.js +787 -0
  60. package/lib/SuperTable3/SuperTable.less +99 -0
  61. package/lib/SuperTable3/fixed.js +55 -0
  62. package/lib/SuperTable3/package.json +6 -0
  63. package/lib/Title/Title.less +35 -35
  64. package/lib/Title/package.json +6 -6
  65. package/lib/Viewer/Viewer.js +1 -1
  66. package/lib/adjust.less +89 -89
  67. package/lib/index.js +102 -7
  68. package/lib/index.less +5 -1
  69. package/lib/style.less +12 -2
  70. package/package.json +1 -1
  71. package/es/HomeHeader/Header.js +0 -75
  72. package/es/HomeHeader/Header.less +0 -73
  73. package/es/HomeHeader/package.json +0 -6
  74. package/lib/HomeHeader/Header.js +0 -95
  75. package/lib/HomeHeader/Header.less +0 -73
  76. package/lib/HomeHeader/package.json +0 -6
@@ -1,116 +1,100 @@
1
- @import '../variables.less';
2
-
3
- .@{cloudlink-prefix}-SuperTable2 {
4
- border-spacing: 0;
5
- cursor: default;
6
-
7
- :global(.ant-checkbox-input) {
8
- z-index: -1;
9
- }
10
-
11
- :global(.ant-select-selection--multiple) {
12
- max-width: 200px;
13
- max-height: 22px;
14
- overflow: auto;
15
- }
16
-
17
- :global(.ant-select-search__field) {
18
- z-index: 0;
19
- }
20
-
21
- :global(.ant-switch-disabled) {
22
- background: #e4e4e4;
23
- }
24
-
25
- :global(.ant-switch-checked) {
26
- background: #2CBB45!important;
27
- }
28
-
29
- :global(.ant-table-fixed){
30
- width: 100% !important;
31
- }
32
- :global(.ant-table-tbody){
33
- width: 100% !important;
34
- }
35
-
36
- :global(.ant-table-thead){
37
- -moz-transform: none !important;
38
- -webkit-transform: none !important;
39
- -o-transform: none !important;
40
- -ms-transform: none !important;
41
- transform: none !important;
42
- }
43
-
44
-
45
- th [role='add'] {
46
- color: @primary-color;
47
- margin-left: 4px;
48
- cursor: pointer;
49
- }
50
-
51
- td [role='imgBox']{
52
- color: @primary-color;
53
-
54
- span {
55
- margin-left: 10px;
56
- overflow: hidden;
57
- text-overflow: ellipsis;
58
- max-width: 100px;
59
- }
60
- }
61
-
62
- :global(.ant-table-placeholder) {
63
- padding: 0;
64
-
65
- > div {
66
- margin: 0;
67
-
68
- :global(.ant-empty-image) {
69
- display: none;
70
- }
71
- }
72
- }
73
-
74
- .emphasizedSelectRow{
75
- background-color: @table-row-hover-bg;
76
- color :#000;
77
- font-weight: 700;
78
- }
79
- .emphasizedUnselectRow{
80
- color :#000;
81
- font-weight: 700;
82
- }
83
-
84
- .select {
85
- background-color: @table-row-hover-bg;
86
- }
87
-
88
- .center {
89
- text-align: center !important;
90
- }
91
-
92
- .left {
93
- text-align: left !important;
94
- }
95
-
96
- .right {
97
- text-align: right !important;
98
- }
99
-
100
- .noTransition{
101
- tr {
102
- transition: all 0s!important;
103
- >td{
104
- transition: all 0s!important;
105
- }
106
- }
107
- }
108
- }
109
-
110
- .weakenedSelectRow{
111
- background-color: @table-row-hover-bg;
112
- color :#999;
113
- }
114
- .weakenedUnselectRow{
115
- color :#999;
116
- }
1
+ @import '../variables.less';
2
+
3
+ .@{cloudlink-prefix}-SuperTable2 {
4
+ border-spacing: 0;
5
+ cursor: default;
6
+
7
+ :global(.ant-checkbox-input) {
8
+ z-index: -1;
9
+ }
10
+
11
+ :global(.ant-select-selection--multiple) {
12
+ max-width: 200px;
13
+ max-height: 22px;
14
+ overflow: auto;
15
+ }
16
+
17
+ :global(.ant-select-search__field) {
18
+ z-index: 0;
19
+ }
20
+
21
+ :global(.ant-switch-disabled) {
22
+ background: #e4e4e4;
23
+ }
24
+
25
+ :global(.ant-switch-checked) {
26
+ background: #2CBB45!important;
27
+ }
28
+
29
+ th [role='add'] {
30
+ color: @primary-color;
31
+ margin-left: 4px;
32
+ cursor: pointer;
33
+ }
34
+
35
+ td [role='imgBox']{
36
+ color: @primary-color;
37
+
38
+ span {
39
+ margin-left: 10px;
40
+ overflow: hidden;
41
+ text-overflow: ellipsis;
42
+ max-width: 100px;
43
+ }
44
+ }
45
+
46
+ :global(.ant-table-placeholder) {
47
+ padding: 0;
48
+
49
+ > div {
50
+ margin: 0;
51
+
52
+ :global(.ant-empty-image) {
53
+ display: none;
54
+ }
55
+ }
56
+ }
57
+
58
+ .emphasizedSelectRow{
59
+ background-color: @table-row-hover-bg;
60
+ color :#000;
61
+ font-weight: 700;
62
+ }
63
+ .emphasizedUnselectRow{
64
+ color :#000;
65
+ font-weight: 700;
66
+ }
67
+
68
+ .select {
69
+ background-color: @table-row-hover-bg;
70
+ }
71
+
72
+ .center {
73
+ text-align: center !important;
74
+ }
75
+
76
+ .left {
77
+ text-align: left !important;
78
+ }
79
+
80
+ .right {
81
+ text-align: right !important;
82
+ }
83
+
84
+ .noTransition{
85
+ tr {
86
+ transition: all 0s!important;
87
+ >td{
88
+ transition: all 0s!important;
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+ .weakenedSelectRow{
95
+ background-color: @table-row-hover-bg;
96
+ color :#999;
97
+ }
98
+ .weakenedUnselectRow{
99
+ color :#999;
100
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "name": "SuperTable2",
3
- "version": "0.0.0",
4
- "private": true,
5
- "main": "./SuperTable2.js"
6
- }
1
+ {
2
+ "name": "SuperTable2",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./SuperTable2.js"
6
+ }
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+
3
+ var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
4
+
5
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
6
+
7
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
8
+
9
+ _Object$defineProperty(exports, "__esModule", {
10
+ value: true
11
+ });
12
+
13
+ exports["default"] = void 0;
14
+
15
+ var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
16
+
17
+ var _input = _interopRequireDefault(require("antd/lib/input"));
18
+
19
+ var _button = _interopRequireDefault(require("antd/lib/button"));
20
+
21
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
22
+
23
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
24
+
25
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
26
+
27
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
28
+
29
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
30
+
31
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
32
+
33
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
34
+
35
+ var _react = _interopRequireDefault(require("react"));
36
+
37
+ var _propTypes = _interopRequireDefault(require("prop-types"));
38
+
39
+ var _Control = _interopRequireDefault(require("../Control/Control"));
40
+
41
+ var _variables = _interopRequireDefault(require("../variables"));
42
+
43
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
44
+
45
+ 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; } }
46
+
47
+ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
48
+ (0, _inherits2["default"])(FilterDropDown, _React$Component);
49
+
50
+ var _super = _createSuper(FilterDropDown);
51
+
52
+ function FilterDropDown(_props) {
53
+ var _this;
54
+
55
+ (0, _classCallCheck2["default"])(this, FilterDropDown);
56
+ _this = _super.call(this, _props);
57
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (e) {
58
+ _this.setState({
59
+ value: e.target.value
60
+ });
61
+ });
62
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDateChange", function (key, value) {
63
+ _this.setState((0, _defineProperty2["default"])({}, key, value));
64
+ });
65
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onSearch", function () {
66
+ var _this$props = _this.props,
67
+ onSearch = _this$props.onSearch,
68
+ isDateFilterByStartAndEnd = _this$props.isDateFilterByStartAndEnd;
69
+
70
+ if (onSearch) {
71
+ var value = !_this.state.start && !_this.state.end ? "" : _this.state;
72
+ var val = isDateFilterByStartAndEnd ? value : _this.state.value;
73
+ onSearch(val);
74
+ }
75
+ });
76
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "DateInputCreator", function () {
77
+ var _context, _context2, _context3;
78
+
79
+ var props = _this.props.props;
80
+ var propsStart = {
81
+ type: "date",
82
+ size: "small",
83
+ showTime: props ? props.showTime : true,
84
+ value: _this.state.start,
85
+ style: {
86
+ marginRight: '5px'
87
+ },
88
+ onChange: (0, _bind["default"])(_context = _this.onDateChange).call(_context, null, 'start')
89
+ };
90
+ var propsEnd = {
91
+ type: "date",
92
+ size: "small",
93
+ showTime: props ? props.showTime : true,
94
+ value: _this.state.end,
95
+ style: {
96
+ marginLeft: '5px'
97
+ },
98
+ onChange: (0, _bind["default"])(_context2 = _this.onDateChange).call(_context2, null, 'end')
99
+ };
100
+ return /*#__PURE__*/_react["default"].createElement("div", {
101
+ className: (0, _variables["default"])('SuperTable3-FilterDropDown').date
102
+ }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Control["default"], propsStart), "To", /*#__PURE__*/_react["default"].createElement(_Control["default"], propsEnd)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_button["default"], {
103
+ size: "small",
104
+ style: {
105
+ marginRight: '5px'
106
+ },
107
+ onClick: _this.props.onClose
108
+ }, "\u5173\u95ED"), /*#__PURE__*/_react["default"].createElement(_button["default"], {
109
+ size: "small",
110
+ type: "primary",
111
+ onClick: (0, _bind["default"])(_context3 = _this.onSearch).call(_context3, null, _this.props.type)
112
+ }, "\u641C\u7D22")));
113
+ });
114
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "InputCreator", function () {
115
+ var props = {
116
+ size: 'small',
117
+ value: _this.state.value,
118
+ onChange: _this.onChange,
119
+ onPressEnter: _this.onSearch,
120
+ ref: function ref(e) {
121
+ return _this.input = e;
122
+ }
123
+ };
124
+ return /*#__PURE__*/_react["default"].createElement("div", {
125
+ className: (0, _variables["default"])('SuperTable3-FilterDropDown')
126
+ }, /*#__PURE__*/_react["default"].createElement(_input["default"], props), /*#__PURE__*/_react["default"].createElement(_button["default"], {
127
+ onClick: _this.onSearch,
128
+ size: "small",
129
+ type: "primary"
130
+ }, "\u641C\u7D22"));
131
+ });
132
+ _this.state = {
133
+ value: _props.value || ''
134
+ };
135
+
136
+ if (_props.isDateFilterByStartAndEnd) {
137
+ var _ref = _props.value || {},
138
+ _ref$start = _ref.start,
139
+ start = _ref$start === void 0 ? '' : _ref$start,
140
+ _ref$end = _ref.end,
141
+ end = _ref$end === void 0 ? '' : _ref$end;
142
+
143
+ _this.state = {
144
+ start: start,
145
+ end: end
146
+ };
147
+ } else {
148
+ _this.state = {
149
+ value: _props.value || ''
150
+ };
151
+ }
152
+
153
+ return _this;
154
+ }
155
+
156
+ (0, _createClass2["default"])(FilterDropDown, [{
157
+ key: "componentWillReceiveProps",
158
+ value: function componentWillReceiveProps(newProps) {
159
+ if (newProps.isDateFilterByStartAndEnd) {
160
+ var _ref2 = newProps.value || {},
161
+ _ref2$start = _ref2.start,
162
+ start = _ref2$start === void 0 ? '' : _ref2$start,
163
+ _ref2$end = _ref2.end,
164
+ end = _ref2$end === void 0 ? '' : _ref2$end;
165
+
166
+ this.setState({
167
+ start: start,
168
+ end: end
169
+ });
170
+ } else {
171
+ this.setState({
172
+ value: newProps.value || ''
173
+ });
174
+ }
175
+ }
176
+ }, {
177
+ key: "componentDidMount",
178
+ value: function componentDidMount() {
179
+ if (this.input) {
180
+ this.input.focus();
181
+ }
182
+ }
183
+ }, {
184
+ key: "componentDidUpdate",
185
+ value: function componentDidUpdate() {
186
+ if (this.input) {
187
+ this.input.focus();
188
+ }
189
+ }
190
+ }, {
191
+ key: "render",
192
+ value: function render() {
193
+ return this.props.isDateFilterByStartAndEnd ? this.DateInputCreator() : this.InputCreator();
194
+ }
195
+ }]);
196
+ return FilterDropDown;
197
+ }(_react["default"].Component);
198
+
199
+ (0, _defineProperty2["default"])(FilterDropDown, "propTypes", {
200
+ value: _propTypes["default"].any,
201
+ onSearch: _propTypes["default"].func,
202
+ onClose: _propTypes["default"].func
203
+ });
204
+ var _default = FilterDropDown;
205
+ exports["default"] = _default;
@@ -0,0 +1,29 @@
1
+ @import '../variables.less';
2
+
3
+ .@{cloudlink-prefix}-SuperTable3-FilterDropDown {
4
+ background: white;
5
+ padding: @padding-vertical @padding-horizontal;
6
+ border-radius: @border-radius-base;
7
+ border: 1px solid #d9d9d9;
8
+
9
+ > :first-child {
10
+ width: 135px;
11
+ margin-right: 10px;
12
+ }
13
+
14
+ .date{
15
+ background: white;
16
+ padding: @padding-vertical @padding-horizontal;
17
+ border-radius: @border-radius-base;
18
+ border: 1px solid #d9d9d9;
19
+
20
+ > :first-child > div {
21
+ display: inline-block;
22
+ }
23
+
24
+ > :last-child {
25
+ text-align: right;
26
+ margin-top: 5px;
27
+ }
28
+ }
29
+ }