cloud-b2b 1.1.6 → 1.1.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.
@@ -43,7 +43,7 @@ import helper from '../helper';
43
43
  import Control, { getTitle, makeString } from '../Control';
44
44
  import variables from '../variables';
45
45
  var FormItem = _Form.Item;
46
- var defaultSize = 'small';
46
+ var defaultSize = 'large';
47
47
  var defaultColNum = 4;
48
48
  var TYPE = ['readonly', 'text', 'search', 'searchText', 'select', 'selectText', 'radioGroup', 'number', 'date', 'textArea', 'password', 'editor', 'selectWriting', 'selectSearch', 'empty', 'captcha', 'area', 'uploadImg', 'cascader'];
49
49
  /**
@@ -55,6 +55,7 @@ import SuperTableCell from './SuperTableCell';
55
55
  import fixed from '../SuperTable/fixed';
56
56
  import SuperToolbar from '../SuperToolbar';
57
57
  import variables from '../variables';
58
+ import helper from '../helper';
58
59
  var TypeEnum = ['readonly', 'index', 'checkbox', 'text', 'number', 'select', //存储value
59
60
  'selectText', //存储title
60
61
  'search', 'searchText', 'selectSearch', //多选下拉搜索
@@ -624,7 +625,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
624
625
  pagination = _this$props3$paginati === void 0 ? false : _this$props3$paginati,
625
626
  _this$props3$isEmphas = _this$props3.isEmphasized,
626
627
  isEmphasized = _this$props3$isEmphas === void 0 ? false : _this$props3$isEmphas,
627
- maxHeight = _this$props3.maxHeight;
628
+ maxHeight = _this$props3.maxHeight,
629
+ _this$props3$expanded = _this$props3.expandedRowRender,
630
+ expandedRowRender = _this$props3$expanded === void 0 ? undefined : _this$props3$expanded,
631
+ _this$props3$onExpand = _this$props3.onExpand,
632
+ onExpand = _this$props3$onExpand === void 0 ? undefined : _this$props3$onExpand;
628
633
 
629
634
  var widthX = _reduceInstanceProperty(_context10 = _filterInstanceProperty(cols).call(cols, function (col) {
630
635
  return !col.hide;
@@ -632,7 +637,13 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
632
637
  return width += item.width ? item.width : 120;
633
638
  }, 0);
634
639
 
635
- return _objectSpread({
640
+ var scrollProps = !helper.isEmpty2(expandedRowRender) ? {} : {
641
+ scroll: {
642
+ x: widthX,
643
+ y: maxHeight
644
+ }
645
+ };
646
+ return _objectSpread(_objectSpread({
636
647
  className: !isEmphasized ? variables('SuperTable2') : variables('SuperTable2').noTransition,
637
648
  columns: _this.getColumns(cols),
638
649
  dataSource: _this.getDataSource(items, cols),
@@ -640,16 +651,15 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
640
651
  whiteSpace: 'nowrap'
641
652
  }, style),
642
653
  size: 'small',
643
- scroll: {
644
- x: widthX,
645
- y: maxHeight
646
- },
647
654
  pagination: pagination,
648
655
  footer: footer,
649
656
  locale: _this.props.emptyText ? {
650
657
  emptyText: _this.props.emptyText
651
658
  } : null
652
- }, _this.getPropsByCheckbox());
659
+ }, _this.getPropsByCheckbox()), {}, {
660
+ expandedRowRender: expandedRowRender,
661
+ onExpand: onExpand
662
+ }, scrollProps);
653
663
  });
654
664
 
655
665
  _defineProperty(_assertThisInitialized(_this), "setScroll", function () {
@@ -1,35 +1,35 @@
1
- @import '../variables';
2
-
3
- .@{cloudlink-prefix}-title {
4
- > *:first-child {
5
- display: inline-block;
6
- color: @brand-primary;
7
- line-height: 1.2;
8
-
9
- &[data-border='true'] {
10
- padding: 0 5px;
11
- border-left: @brand-primary solid 3px;
12
- }
13
-
14
- &[data-fold='true'] {
15
- cursor: pointer;
16
- margin: 8px 0;
17
- }
18
-
19
- &[data-required='true'] {
20
- &::after {
21
- display: inline-block;
22
- margin-left: 4px;
23
- color: #f5222d;
24
- font-size: 12px;
25
- font-family: SimSun, sans-serif;
26
- line-height: 1;
27
- content: '*';
28
- }
29
- }
30
- }
31
-
32
- > [role = 'toolbar'] {
33
- display: inline-block;
34
- }
35
- }
1
+ @import '../variables';
2
+
3
+ .@{cloudlink-prefix}-title {
4
+ > *:first-child {
5
+ display: inline-block;
6
+ color: @brand-primary;
7
+ line-height: 1.2;
8
+
9
+ &[data-border='true'] {
10
+ padding: 0 5px;
11
+ border-left: @brand-primary solid 3px;
12
+ }
13
+
14
+ &[data-fold='true'] {
15
+ cursor: pointer;
16
+ margin: 8px 0;
17
+ }
18
+
19
+ &[data-required='true'] {
20
+ &::after {
21
+ display: inline-block;
22
+ margin-left: 4px;
23
+ color: #f5222d;
24
+ font-size: 12px;
25
+ font-family: SimSun, sans-serif;
26
+ line-height: 1;
27
+ content: '*';
28
+ }
29
+ }
30
+ }
31
+
32
+ > [role = 'toolbar'] {
33
+ display: inline-block;
34
+ }
35
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "name": "Title",
3
- "version": "0.0.0",
4
- "private": true,
5
- "main": "./Title.js"
6
- }
1
+ {
2
+ "name": "Title",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./Title.js"
6
+ }
@@ -97,7 +97,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
97
97
  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; } }
98
98
 
99
99
  var FormItem = _form["default"].Item;
100
- var defaultSize = 'small';
100
+ var defaultSize = 'large';
101
101
  var defaultColNum = 4;
102
102
  var TYPE = ['readonly', 'text', 'search', 'searchText', 'select', 'selectText', 'radioGroup', 'number', 'date', 'textArea', 'password', 'editor', 'selectWriting', 'selectSearch', 'empty', 'captcha', 'area', 'uploadImg', 'cascader'];
103
103
  /**
@@ -94,6 +94,8 @@ var _SuperToolbar = _interopRequireDefault(require("../SuperToolbar"));
94
94
 
95
95
  var _variables = _interopRequireDefault(require("../variables"));
96
96
 
97
+ var _helper = _interopRequireDefault(require("../helper"));
98
+
97
99
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (_Array$isArray2(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
98
100
 
99
101
  function _unsupportedIterableToArray(o, minLen) { var _context13; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context13 = Object.prototype.toString.call(o)).call(_context13, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -653,13 +655,23 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
653
655
  pagination = _this$props3$paginati === void 0 ? false : _this$props3$paginati,
654
656
  _this$props3$isEmphas = _this$props3.isEmphasized,
655
657
  isEmphasized = _this$props3$isEmphas === void 0 ? false : _this$props3$isEmphas,
656
- maxHeight = _this$props3.maxHeight;
658
+ maxHeight = _this$props3.maxHeight,
659
+ _this$props3$expanded = _this$props3.expandedRowRender,
660
+ expandedRowRender = _this$props3$expanded === void 0 ? undefined : _this$props3$expanded,
661
+ _this$props3$onExpand = _this$props3.onExpand,
662
+ onExpand = _this$props3$onExpand === void 0 ? undefined : _this$props3$onExpand;
657
663
  var widthX = (0, _reduce["default"])(_context10 = (0, _filter["default"])(cols).call(cols, function (col) {
658
664
  return !col.hide;
659
665
  })).call(_context10, function (width, item) {
660
666
  return width += item.width ? item.width : 120;
661
667
  }, 0);
662
- return _objectSpread({
668
+ var scrollProps = !_helper["default"].isEmpty2(expandedRowRender) ? {} : {
669
+ scroll: {
670
+ x: widthX,
671
+ y: maxHeight
672
+ }
673
+ };
674
+ return _objectSpread(_objectSpread({
663
675
  className: !isEmphasized ? (0, _variables["default"])('SuperTable2') : (0, _variables["default"])('SuperTable2').noTransition,
664
676
  columns: _this.getColumns(cols),
665
677
  dataSource: _this.getDataSource(items, cols),
@@ -667,16 +679,15 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
667
679
  whiteSpace: 'nowrap'
668
680
  }, style),
669
681
  size: 'small',
670
- scroll: {
671
- x: widthX,
672
- y: maxHeight
673
- },
674
682
  pagination: pagination,
675
683
  footer: footer,
676
684
  locale: _this.props.emptyText ? {
677
685
  emptyText: _this.props.emptyText
678
686
  } : null
679
- }, _this.getPropsByCheckbox());
687
+ }, _this.getPropsByCheckbox()), {}, {
688
+ expandedRowRender: expandedRowRender,
689
+ onExpand: onExpand
690
+ }, scrollProps);
680
691
  });
681
692
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setScroll", function () {
682
693
  if (_this.props.maxHeight && _this.props.items.length) {
@@ -1,35 +1,35 @@
1
- @import '../variables';
2
-
3
- .@{cloudlink-prefix}-title {
4
- > *:first-child {
5
- display: inline-block;
6
- color: @brand-primary;
7
- line-height: 1.2;
8
-
9
- &[data-border='true'] {
10
- padding: 0 5px;
11
- border-left: @brand-primary solid 3px;
12
- }
13
-
14
- &[data-fold='true'] {
15
- cursor: pointer;
16
- margin: 8px 0;
17
- }
18
-
19
- &[data-required='true'] {
20
- &::after {
21
- display: inline-block;
22
- margin-left: 4px;
23
- color: #f5222d;
24
- font-size: 12px;
25
- font-family: SimSun, sans-serif;
26
- line-height: 1;
27
- content: '*';
28
- }
29
- }
30
- }
31
-
32
- > [role = 'toolbar'] {
33
- display: inline-block;
34
- }
35
- }
1
+ @import '../variables';
2
+
3
+ .@{cloudlink-prefix}-title {
4
+ > *:first-child {
5
+ display: inline-block;
6
+ color: @brand-primary;
7
+ line-height: 1.2;
8
+
9
+ &[data-border='true'] {
10
+ padding: 0 5px;
11
+ border-left: @brand-primary solid 3px;
12
+ }
13
+
14
+ &[data-fold='true'] {
15
+ cursor: pointer;
16
+ margin: 8px 0;
17
+ }
18
+
19
+ &[data-required='true'] {
20
+ &::after {
21
+ display: inline-block;
22
+ margin-left: 4px;
23
+ color: #f5222d;
24
+ font-size: 12px;
25
+ font-family: SimSun, sans-serif;
26
+ line-height: 1;
27
+ content: '*';
28
+ }
29
+ }
30
+ }
31
+
32
+ > [role = 'toolbar'] {
33
+ display: inline-block;
34
+ }
35
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "name": "Title",
3
- "version": "0.0.0",
4
- "private": true,
5
- "main": "./Title.js"
6
- }
1
+ {
2
+ "name": "Title",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./Title.js"
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloud-b2b",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "A react component library dependent antd",
5
5
  "keywords": [
6
6
  "react",