@qn-pandora/pandora-component 2.2.1 → 2.2.2

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 (83) hide show
  1. package/es/components/Button/style.css +0 -1
  2. package/es/components/Button/style.less +0 -1
  3. package/es/components/Card/index.js +2 -1
  4. package/es/components/CheckTransformList/Item/index.js +1 -1
  5. package/es/components/CheckTransformList/style.css +9 -1
  6. package/es/components/CheckboxList/index.d.ts +1 -0
  7. package/es/components/CheckboxList/index.js +3 -2
  8. package/es/components/Collapse/index.js +2 -1
  9. package/es/components/CollapsiblePanel/index.d.ts +2 -2
  10. package/es/components/ConfigProvider/index.js +2 -1
  11. package/es/components/DateTimePicker/Base/index.js +2 -2
  12. package/es/components/DateTimePicker/index.d.ts +2 -1
  13. package/es/components/Input/index.js +2 -1
  14. package/es/components/Menu/index.d.ts +2 -2
  15. package/es/components/NameLimiter/index.d.ts +3 -13
  16. package/es/components/NameLimiter/index.js +30 -39
  17. package/es/components/NameLimiter/style.css +9 -1
  18. package/es/components/NameLimiter/style.less +10 -1
  19. package/es/components/OptionList/index.js +2 -1
  20. package/es/components/RemarkName/index.d.ts +0 -2
  21. package/es/components/RemarkName/index.js +2 -4
  22. package/es/components/RemarkName/style.css +9 -5
  23. package/es/components/RemarkName/style.less +0 -5
  24. package/es/components/SolidRadioGroup/index.js +7 -4
  25. package/es/components/SolidRadioGroup/style.css +4 -0
  26. package/es/components/SolidRadioGroup/style.less +5 -0
  27. package/es/components/Steps/index.js +2 -1
  28. package/es/components/Table/index.d.ts +9 -24
  29. package/es/components/Table/index.js +40 -8
  30. package/es/components/TagList/Tag/style.css +3 -3
  31. package/es/components/TagList/Tag/style.less +3 -3
  32. package/es/components/TagList/index.js +3 -2
  33. package/es/components/TagList/style.css +3 -3
  34. package/es/components/TagList/style.less +8 -8
  35. package/es/index.css +46 -39
  36. package/es/index.d.ts +1 -1
  37. package/es/index.js +1 -1
  38. package/es/index.less +4 -4
  39. package/es/style/theme.less +5 -4
  40. package/lib/components/Button/style.css +0 -1
  41. package/lib/components/Button/style.less +0 -1
  42. package/lib/components/Card/index.js +1 -1
  43. package/lib/components/CheckTransformList/Item/index.js +1 -1
  44. package/lib/components/CheckTransformList/style.css +9 -1
  45. package/lib/components/CheckboxList/index.d.ts +1 -0
  46. package/lib/components/CheckboxList/index.js +3 -2
  47. package/lib/components/Collapse/index.js +1 -1
  48. package/lib/components/CollapsiblePanel/index.d.ts +2 -2
  49. package/lib/components/ConfigProvider/index.js +1 -1
  50. package/lib/components/DateTimePicker/Base/index.js +2 -2
  51. package/lib/components/DateTimePicker/index.d.ts +2 -1
  52. package/lib/components/Input/index.js +1 -1
  53. package/lib/components/Menu/index.d.ts +2 -2
  54. package/lib/components/NameLimiter/index.d.ts +3 -13
  55. package/lib/components/NameLimiter/index.js +30 -38
  56. package/lib/components/NameLimiter/style.css +9 -1
  57. package/lib/components/NameLimiter/style.less +10 -1
  58. package/lib/components/OptionList/index.js +1 -1
  59. package/lib/components/RemarkName/index.d.ts +0 -2
  60. package/lib/components/RemarkName/index.js +2 -4
  61. package/lib/components/RemarkName/style.css +9 -5
  62. package/lib/components/RemarkName/style.less +0 -5
  63. package/lib/components/SolidRadioGroup/index.js +6 -3
  64. package/lib/components/SolidRadioGroup/style.css +4 -0
  65. package/lib/components/SolidRadioGroup/style.less +5 -0
  66. package/lib/components/Steps/index.js +1 -1
  67. package/lib/components/Table/index.d.ts +9 -24
  68. package/lib/components/Table/index.js +39 -7
  69. package/lib/components/TagList/Tag/style.css +3 -3
  70. package/lib/components/TagList/Tag/style.less +3 -3
  71. package/lib/components/TagList/index.js +2 -2
  72. package/lib/components/TagList/style.css +3 -3
  73. package/lib/components/TagList/style.less +8 -8
  74. package/lib/index.css +1724 -1717
  75. package/lib/index.d.ts +1 -1
  76. package/lib/index.js +0 -1
  77. package/lib/index.less +2 -2
  78. package/lib/style/theme.less +5 -4
  79. package/package.json +22 -22
  80. package/es/components/NameLimiter/transformer.d.ts +0 -6
  81. package/es/components/NameLimiter/transformer.js +0 -84
  82. package/lib/components/NameLimiter/transformer.d.ts +0 -6
  83. package/lib/components/NameLimiter/transformer.js +0 -91
@@ -66,7 +66,7 @@ import * as React from 'react';
66
66
  import { Table as AntTable, Checkbox } from 'antd';
67
67
  import classnames from 'classnames';
68
68
  import { observable, action, computed } from 'mobx';
69
- import { size, xor, union, unionBy, differenceBy, get, isUndefined } from 'lodash';
69
+ import { size, xor, union, unionBy, differenceBy, get } from 'lodash';
70
70
  import { observer } from 'mobx-react';
71
71
  import bind from '../../utils/bind';
72
72
  import { SDK_PREFIX } from '../../constants/style';
@@ -126,10 +126,23 @@ var Table = /** @class */ (function (_super) {
126
126
  enumerable: true,
127
127
  configurable: true
128
128
  });
129
+ Object.defineProperty(Table.prototype, "undisabledData", {
130
+ get: function () {
131
+ var _a = this.props, dataSource = _a.dataSource, rowSelection = _a.rowSelection;
132
+ var getCheckboxProps = (rowSelection || {}).getCheckboxProps;
133
+ var undisabledData = dataSource || [];
134
+ if (getCheckboxProps) {
135
+ // 如果checkbox有disabled的,要去掉这些rowItem
136
+ undisabledData = undisabledData.filter(function (data) { return !getCheckboxProps(data).disabled; });
137
+ }
138
+ return undisabledData;
139
+ },
140
+ enumerable: true,
141
+ configurable: true
142
+ });
129
143
  Object.defineProperty(Table.prototype, "keysOfCurrentPage", {
130
144
  get: function () {
131
- var dataSource = this.props.dataSource;
132
- return (dataSource || []).map(this.getRowKey);
145
+ return this.undisabledData.map(this.getRowKey);
133
146
  },
134
147
  enumerable: true,
135
148
  configurable: true
@@ -205,19 +218,29 @@ var Table = /** @class */ (function (_super) {
205
218
  ? rowClassName
206
219
  : rowClassName(record, index, indent));
207
220
  };
221
+ Table.prototype.getDisabledStatus = function (option) {
222
+ var noneSelected = this.selectedRowKeys.length === 0;
223
+ var disabled = typeof option.disabled === 'function'
224
+ ? option.disabled(__spread(this.undisabledData))
225
+ : option.disabled;
226
+ return noneSelected || disabled;
227
+ };
208
228
  Table.prototype.render = function () {
209
229
  var _a, _b;
210
230
  var _this = this;
211
231
  var _c = this.props, className = _c.className, batchOptions = _c.batchOptions, scroll = _c.scroll, restProps = __rest(_c, ["className", "batchOptions", "scroll"]);
212
232
  return (React.createElement("div", null,
213
- React.createElement(AntTable, __assign({ scroll: scroll }, restProps, { className: classnames(SDK_PREFIX + "-table-wrapper", (_a = {}, _a[SDK_PREFIX + "-table-scrollX"] = get(scroll, 'x'), _a), (_b = {}, _b[SDK_PREFIX + "-table-scrollY"] = get(scroll, 'y'), _b), className), rowSelection: batchOptions && this.props.rowSelection
233
+ React.createElement(AntTable, __assign({ scroll: scroll }, restProps, { className: classnames(SDK_PREFIX + "-table-wrapper", (_a = {}, _a[SDK_PREFIX + "-table-scrollX"] = get(scroll, 'x'), _a), (_b = {}, _b[SDK_PREFIX + "-table-scrollY"] = get(scroll, 'y'), _b), className),
234
+ // 涉及到权限
235
+ // getCheckboxProps只能放到tableBatchWrapper里,因为selectedRowKeys在那个组件计算
236
+ rowSelection: batchOptions && this.props.rowSelection
214
237
  ? this.rowSelection
215
238
  : this.props.rowSelection, rowClassName: this.getRowClassName })),
216
239
  this.props.batchOptions &&
217
240
  this.props.rowSelection &&
218
241
  this.props.dataSource &&
219
242
  this.props.dataSource.length > 0 ? (React.createElement("div", { className: SDK_PREFIX + "-table-batch-opt" },
220
- React.createElement(Checkbox, { indeterminate: this.indeterminate, onChange: this.handleCheckAllChange, checked: this.checkAll, disabled: size(this.props.dataSource) === 0 }),
243
+ React.createElement(Checkbox, { indeterminate: this.indeterminate, onChange: this.handleCheckAllChange, checked: this.checkAll, disabled: size(this.undisabledData) === 0 }),
221
244
  React.createElement("span", { className: SDK_PREFIX + "-table-batch-opt-label" },
222
245
  "\u5DF2\u9009 ",
223
246
  this.selectedRowKeys.length),
@@ -225,9 +248,7 @@ var Table = /** @class */ (function (_super) {
225
248
  var _a;
226
249
  return (React.createElement("span", { key: index, className: classnames((_a = {},
227
250
  _a[SDK_PREFIX + "-table-batch-opt-item"] = true,
228
- _a[SDK_PREFIX + "-table-batch-opt-disabled"] = isUndefined(option.disabled)
229
- ? _this.selectedRowKeys.length === 0
230
- : option.disabled,
251
+ _a[SDK_PREFIX + "-table-batch-opt-disabled"] = _this.getDisabledStatus(option),
231
252
  _a)), onClick: function () { return _this.handleBatchOptionClick(option); } }, option.text));
232
253
  })))) : null));
233
254
  };
@@ -251,6 +272,11 @@ var Table = /** @class */ (function (_super) {
251
272
  __metadata("design:type", Object),
252
273
  __metadata("design:paramtypes", [])
253
274
  ], Table.prototype, "rowSelection", null);
275
+ __decorate([
276
+ computed,
277
+ __metadata("design:type", Object),
278
+ __metadata("design:paramtypes", [])
279
+ ], Table.prototype, "undisabledData", null);
254
280
  __decorate([
255
281
  computed,
256
282
  __metadata("design:type", Object),
@@ -312,6 +338,12 @@ var Table = /** @class */ (function (_super) {
312
338
  __metadata("design:paramtypes", [Object, Number, Number]),
313
339
  __metadata("design:returntype", void 0)
314
340
  ], Table.prototype, "getRowClassName", null);
341
+ __decorate([
342
+ bind,
343
+ __metadata("design:type", Function),
344
+ __metadata("design:paramtypes", [Object]),
345
+ __metadata("design:returntype", void 0)
346
+ ], Table.prototype, "getDisabledStatus", null);
315
347
  Table = __decorate([
316
348
  observer
317
349
  ], Table);
@@ -9,7 +9,7 @@
9
9
  line-height: 24px;
10
10
  margin-right: 8px;
11
11
  border-radius: 1px;
12
- color: #42526e;
12
+ color: #333;
13
13
  text-align: center;
14
14
  vertical-align: middle;
15
15
  border-radius: 2px;
@@ -47,8 +47,8 @@
47
47
  border-left: 1px solid rgba(44, 109, 210, 0.1);
48
48
  }
49
49
  .pandora-sdk-root .pandora-sdk-content {
50
- padding: 0 4px;
51
- max-width: 200px;
50
+ padding: 0 8px;
51
+ max-width: 150px;
52
52
  vertical-align: middle;
53
53
  overflow: hidden;
54
54
  white-space: nowrap;
@@ -5,7 +5,7 @@
5
5
  line-height: 24px;
6
6
  margin-right: 8px;
7
7
  border-radius: 1px;
8
- color: @font-color-2;
8
+ color: @font-color-7;
9
9
  text-align: center;
10
10
  vertical-align: middle;
11
11
  border-radius: @border-radius-base;
@@ -45,8 +45,8 @@
45
45
  }
46
46
 
47
47
  .@{sdk-prefix}-content {
48
- padding: 0 4px;
49
- max-width: 200px;
48
+ padding: 0 8px;
49
+ max-width: 150px;
50
50
  vertical-align: middle;
51
51
  overflow: hidden;
52
52
  white-space: nowrap;
@@ -26,7 +26,7 @@ import { MoreCircle } from '@qn-pandora/pandora-component-icons';
26
26
  import Tag from './Tag';
27
27
  import TagSwitch from './TagSwitch';
28
28
  import { SDK_PREFIX } from '../../constants/style';
29
- export default function TagList(props) {
29
+ function TagList(props) {
30
30
  var _a = props.mode, mode = _a === void 0 ? 'tag' : _a, className = props.className;
31
31
  var handleSwitchChange = function (active, value) {
32
32
  var values = props.values, onChange = props.onChange;
@@ -57,10 +57,11 @@ export default function TagList(props) {
57
57
  }
58
58
  return (React.createElement("div", { className: classnames(SDK_PREFIX + "-simplify", props.className) },
59
59
  React.Children.toArray(children).slice(0, simplifyTo),
60
- React.createElement(Popover, { content: React.createElement("div", { className: SDK_PREFIX + "-popover" }, children), getPopupContainer: getPopupContainer },
60
+ React.createElement(Popover, { content: React.createElement("div", { className: SDK_PREFIX + "-popover" }, React.Children.toArray(children).slice(simplifyTo, childSize)), getPopupContainer: getPopupContainer },
61
61
  React.createElement(MoreCircle, { className: SDK_PREFIX + "-icon" }))));
62
62
  };
63
63
  return (React.createElement("div", { className: classnames(SDK_PREFIX + "-taglist-containter", className) }, mode === 'tag' ? getTagList() : getTagSwitchList()));
64
64
  }
65
65
  TagList.Tag = Tag;
66
66
  TagList.TagSwitch = TagSwitch;
67
+ export default TagList;
@@ -266,12 +266,12 @@
266
266
  .pandora-sdk-taglist-containter .pandora-sdk-simplify .pandora-sdk-icon:hover {
267
267
  color: #7a869a;
268
268
  }
269
- .pandora-sdk-taglist-containter .pandora-sdk-popover {
269
+ .pandora-sdk-popover {
270
270
  max-width: 400px;
271
271
  max-height: 1000px;
272
272
  overflow: auto;
273
- padding: 16px;
273
+ padding: 8px !important;
274
274
  }
275
- .pandora-sdk-taglist-containter .pandora-sdk-popover > div {
275
+ .pandora-sdk-popover > div {
276
276
  margin: 4px;
277
277
  }
@@ -15,14 +15,14 @@
15
15
  }
16
16
  }
17
17
  }
18
+ }
18
19
 
19
- .@{sdk-prefix}-popover {
20
- max-width: 400px;
21
- max-height: 1000px;
22
- overflow: auto;
23
- padding: 16px;
24
- > div {
25
- margin: 4px;
26
- }
20
+ .@{sdk-prefix}-popover {
21
+ max-width: 400px;
22
+ max-height: 1000px;
23
+ overflow: auto;
24
+ padding: 8px !important;
25
+ > div {
26
+ margin: 4px;
27
27
  }
28
28
  }
package/es/index.css CHANGED
@@ -2019,7 +2019,6 @@ a.ant-btn-sm {
2019
2019
  .pandora-sdk-button {
2020
2020
  -webkit-box-shadow: none;
2021
2021
  box-shadow: none;
2022
- border-radius: 2px;
2023
2022
  }
2024
2023
  .pandora-sdk-button.pandora-sdk-button-disabled {
2025
2024
  background: #eee !important;
@@ -6159,6 +6158,15 @@ textarea.ant-input-number {
6159
6158
  .ant-menu-vertical-right.ant-menu-sub:not([class*='-active']) {
6160
6159
  max-height: 320px;
6161
6160
  }
6161
+ .pandora-sdk-name-explain-icon {
6162
+ color: inherit;
6163
+ -webkit-transition: color 0.3s;
6164
+ transition: color 0.3s;
6165
+ }
6166
+ .pandora-sdk-name-explain-icon:hover,
6167
+ .pandora-sdk-name-explain-icon .ant-tooltip-open {
6168
+ color: #2c6dd2;
6169
+ }
6162
6170
  .ant-modal {
6163
6171
  -webkit-box-sizing: border-box;
6164
6172
  box-sizing: border-box;
@@ -6440,15 +6448,6 @@ textarea.ant-input-number {
6440
6448
  .pandora-sdk-modal .ant-modal-footer .ant-btn-primary {
6441
6449
  color: #d9d9d9;
6442
6450
  }
6443
- .pandora-sdk-name-explain-icon {
6444
- color: inherit;
6445
- -webkit-transition: color 0.3s;
6446
- transition: color 0.3s;
6447
- }
6448
- .pandora-sdk-name-explain-icon:hover,
6449
- .pandora-sdk-name-explain-icon .ant-tooltip-open {
6450
- color: #2c6dd2;
6451
- }
6452
6451
  .ant-tooltip {
6453
6452
  -webkit-box-sizing: border-box;
6454
6453
  box-sizing: border-box;
@@ -6709,7 +6708,15 @@ textarea.ant-input-number {
6709
6708
  .ant-tooltip-rtl .ant-tooltip-inner {
6710
6709
  text-align: right;
6711
6710
  }
6712
- .pandora-sdk-name-tooltip .ant-tooltip-inner {
6711
+ .pandora-sdk-name-limit {
6712
+ max-width: 100%;
6713
+ display: inline-block;
6714
+ vertical-align: top;
6715
+ white-space: nowrap;
6716
+ text-overflow: ellipsis;
6717
+ overflow: hidden;
6718
+ }
6719
+ .pandora-sdk-name-limit-tooltip .ant-tooltip-inner {
6713
6720
  max-width: 400px !important;
6714
6721
  max-height: 200px !important;
6715
6722
  overflow: auto;
@@ -7570,10 +7577,6 @@ textarea.ant-input-number {
7570
7577
  .pandora-sdk-close-icon {
7571
7578
  color: #d9d9d9;
7572
7579
  }
7573
- .pandora-sdk-remark-name {
7574
- word-break: break-all;
7575
- white-space: nowrap;
7576
- }
7577
7580
  .ant-radio-group {
7578
7581
  -webkit-box-sizing: border-box;
7579
7582
  box-sizing: border-box;
@@ -7965,6 +7968,10 @@ span.ant-radio + * {
7965
7968
  border-color: #2c6dd2 !important;
7966
7969
  color: #2c6dd2 !important;
7967
7970
  }
7971
+ .pandora-sdk-solid-radio-group .ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled {
7972
+ border-color: #d9d9d9 !important;
7973
+ color: rgba(0, 0, 0, 0.85) !important;
7974
+ }
7968
7975
  .pandora-sdk-solid-radio-group .ant-radio-button-wrapper:not(:first-child)::before {
7969
7976
  background-color: #d9d9d9;
7970
7977
  }
@@ -10953,13 +10960,13 @@ textarea.ant-pagination-options-quick-jumper input {
10953
10960
  .pandora-sdk-taglist-containter .pandora-sdk-simplify .pandora-sdk-icon:hover {
10954
10961
  color: #7a869a;
10955
10962
  }
10956
- .pandora-sdk-taglist-containter .pandora-sdk-popover {
10963
+ .pandora-sdk-popover {
10957
10964
  max-width: 400px;
10958
10965
  max-height: 1000px;
10959
10966
  overflow: auto;
10960
- padding: 16px;
10967
+ padding: 8px !important;
10961
10968
  }
10962
- .pandora-sdk-taglist-containter .pandora-sdk-popover > div {
10969
+ .pandora-sdk-popover > div {
10963
10970
  margin: 4px;
10964
10971
  }
10965
10972
  .pandora-sdk-timeline-container {
@@ -11558,6 +11565,12 @@ textarea.ant-pagination-options-quick-jumper input {
11558
11565
  .pandora-sdk-tree-select-dropdown .ant-empty {
11559
11566
  text-align: center;
11560
11567
  }
11568
+ .pandora-sdk-card-search-input {
11569
+ min-width: 200px;
11570
+ }
11571
+ .pandora-sdk-card-search-input i {
11572
+ color: #bfbfbf;
11573
+ }
11561
11574
  .ant-row {
11562
11575
  display: -webkit-box;
11563
11576
  display: -ms-flexbox;
@@ -17447,12 +17460,6 @@ textarea.ant-pagination-options-quick-jumper input {
17447
17460
  .pandora-sdk-card-row-extra button {
17448
17461
  min-width: 80px;
17449
17462
  }
17450
- .pandora-sdk-card-search-input {
17451
- min-width: 200px;
17452
- }
17453
- .pandora-sdk-card-search-input i {
17454
- color: #bfbfbf;
17455
- }
17456
17463
  .pandora-sdk-panel-title {
17457
17464
  display: -webkit-box;
17458
17465
  display: -ms-flexbox;
@@ -18901,7 +18908,7 @@ _:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-ce
18901
18908
  line-height: 24px;
18902
18909
  margin-right: 8px;
18903
18910
  border-radius: 1px;
18904
- color: #42526e;
18911
+ color: #333;
18905
18912
  text-align: center;
18906
18913
  vertical-align: middle;
18907
18914
  border-radius: 2px;
@@ -18939,8 +18946,8 @@ _:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-ce
18939
18946
  border-left: 1px solid rgba(44, 109, 210, 0.1);
18940
18947
  }
18941
18948
  .pandora-sdk-root .pandora-sdk-content {
18942
- padding: 0 4px;
18943
- max-width: 200px;
18949
+ padding: 0 8px;
18950
+ max-width: 150px;
18944
18951
  vertical-align: middle;
18945
18952
  overflow: hidden;
18946
18953
  white-space: nowrap;
@@ -19033,18 +19040,6 @@ _:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-ce
19033
19040
  font-size: 12px;
19034
19041
  color: #333;
19035
19042
  }
19036
- .pandora-sdk-transfer-list {
19037
- overflow: hidden;
19038
- }
19039
- .pandora-sdk-transfer-list .pandora-sdk-transfer-title {
19040
- margin-bottom: 10px;
19041
- }
19042
- .pandora-sdk-transfer-list .pandora-sdk-transfer-search {
19043
- margin-bottom: 10px;
19044
- }
19045
- .pandora-sdk-transfer-list .pandora-sdk-transfer-mb10 {
19046
- margin-bottom: 10px;
19047
- }
19048
19043
  .pandora-sdk-transfer-list-body {
19049
19044
  height: 300px;
19050
19045
  overflow-y: scroll;
@@ -19061,6 +19056,18 @@ _:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-ce
19061
19056
  .pandora-sdk-transfer-list-body .pandora-sdk-transfer-mb10 {
19062
19057
  margin-bottom: 10px;
19063
19058
  }
19059
+ .pandora-sdk-transfer-list {
19060
+ overflow: hidden;
19061
+ }
19062
+ .pandora-sdk-transfer-list .pandora-sdk-transfer-title {
19063
+ margin-bottom: 10px;
19064
+ }
19065
+ .pandora-sdk-transfer-list .pandora-sdk-transfer-search {
19066
+ margin-bottom: 10px;
19067
+ }
19068
+ .pandora-sdk-transfer-list .pandora-sdk-transfer-mb10 {
19069
+ margin-bottom: 10px;
19070
+ }
19064
19071
  .pandora-sdk-datetime-mobile-pick-range-preset-head {
19065
19072
  display: -webkit-box;
19066
19073
  display: -ms-flexbox;
package/es/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { default as Button, IButtonProps } from './components/Button';
4
4
  export { default as Card } from './components/Card';
5
5
  export { default as Collapse } from './components/Collapse';
6
6
  export { default as ConfigProvider } from './components/ConfigProvider';
7
- export { default as NameLimiter, INameLimiterProps, SplitType } from './components/NameLimiter';
7
+ export { default as NameLimiter, INameLimiterProps } from './components/NameLimiter';
8
8
  export { default as Input, TInputProps } from './components/Input';
9
9
  export { default as Selector, ISelectorProps, IGroupOption as ISelectorGroupOption, IOptions as ISelectorOptions, SelectValue as ISelectValue } from './components/Selector';
10
10
  export { default as Table, ITableProps, IOptionItem as ITableOptionItem } from './components/Table';
package/es/index.js CHANGED
@@ -4,7 +4,7 @@ export { default as Button } from './components/Button';
4
4
  export { default as Card } from './components/Card';
5
5
  export { default as Collapse } from './components/Collapse';
6
6
  export { default as ConfigProvider } from './components/ConfigProvider';
7
- export { default as NameLimiter, SplitType } from './components/NameLimiter';
7
+ export { default as NameLimiter } from './components/NameLimiter';
8
8
  export { default as Input } from './components/Input';
9
9
  export { default as Selector } from './components/Selector';
10
10
  export { default as Table } from './components/Table';
package/es/index.less CHANGED
@@ -14,13 +14,13 @@
14
14
  @import './components/InputNumber/style.less';
15
15
  @import './components/KeyValuePair/style.less';
16
16
  @import './components/Menu/style.less';
17
- @import './components/Modal/style.less';
18
17
  @import './components/NameExplainTooltip/style.less';
18
+ @import './components/Modal/style.less';
19
19
  @import './components/NameLimiter/style.less';
20
20
  @import './components/OptionList/style.less';
21
21
  @import './components/RangeInput/style.less';
22
- @import './components/Selector/style.less';
23
22
  @import './components/RemarkName/style.less';
23
+ @import './components/Selector/style.less';
24
24
  @import './components/SolidRadioGroup/style.less';
25
25
  @import './components/Spin/style.less';
26
26
  @import './components/Steps/style.less';
@@ -30,8 +30,8 @@
30
30
  @import './components/Timeline/style.less';
31
31
  @import './components/Transfer/style.less';
32
32
  @import './components/TreeSelector/style.less';
33
- @import './components/Card/RowExtra/style.less';
34
33
  @import './components/Card/SearchInput/style.less';
34
+ @import './components/Card/RowExtra/style.less';
35
35
  @import './components/Collapse/Panel/style.less';
36
36
  @import './components/Collapse/stories/style.stories.less';
37
37
  @import './components/DateTimePicker/Base/style.less';
@@ -45,6 +45,6 @@
45
45
  @import './components/TagList/Tag/style.less';
46
46
  @import './components/TagList/TagSwitch/style.less';
47
47
  @import './components/Timeline/TimelineItem/style.less';
48
- @import './components/Transfer/List/style.less';
49
48
  @import './components/Transfer/ListBody/style.less';
49
+ @import './components/Transfer/List/style.less';
50
50
  @import './components/DateTimePicker/BaseMobile/Absolute/style.less';
@@ -123,8 +123,8 @@
123
123
  @zindex-popover: 1200; // antd
124
124
  @zindex-tooltip: 1300; // antd
125
125
  // pandora色
126
- @zindex-layout-navbar: 1100; // phoenix
127
- @zindex-layout-sidebar: 1100; // phoenix
126
+ @zindex-layout-navbar: 1210; // phoenix
127
+ @zindex-layout-sidebar: 1200; // phoenix
128
128
  @zindex-toaster: 3000; // app-platform phoenix
129
129
 
130
130
  // 组件色变量=========================================================
@@ -245,9 +245,10 @@
245
245
  @time-absolute-picker-title-div: #939393; // pandora-component
246
246
 
247
247
  // sidebar------------------------
248
- @layout-sidebar-width: 176px; // phoenix
248
+ @layout-sidebar-width: 240px; // phoenix
249
249
  @layout-sidebar-collapsed-width: 0px; // phoenix
250
- @layout-navbar-height: 48px; // phoenix
250
+ @layout-navbar-height: 52px; // phoenix
251
+ @layout-navbar-sub-height: 56px; // phoenix
251
252
  // 深色主题
252
253
  @side-bar-active-color: #6ac73c; // pandora-visualization
253
254
 
@@ -1925,7 +1925,6 @@ a.ant-btn-sm {
1925
1925
  .pandora-sdk-button {
1926
1926
  -webkit-box-shadow: none;
1927
1927
  box-shadow: none;
1928
- border-radius: 2px;
1929
1928
  }
1930
1929
  .pandora-sdk-button.pandora-sdk-button-disabled {
1931
1930
  background: #eee !important;
@@ -3,7 +3,6 @@
3
3
 
4
4
  .@{sdk-prefix}-button {
5
5
  box-shadow: none;
6
- border-radius: @border-radius-base;
7
6
 
8
7
  &.@{sdk-prefix}-button-disabled {
9
8
  background: @button-disabled-bg!important;
@@ -45,8 +45,8 @@ function Card(props) {
45
45
  var className = props.className, otherProps = __rest(props, ["className"]);
46
46
  return (React.createElement(antd_1.Card, __assign({ className: classnames_1.default(className, style_1.SDK_PREFIX + "-card") }, otherProps)));
47
47
  }
48
- exports.default = Card;
49
48
  Card.RowExtra = RowExtra_1.default;
50
49
  Card.SearchInput = SearchInput_1.default;
51
50
  Card.Grid = antd_1.Card.Grid;
52
51
  Card.Meta = antd_1.Card.Meta;
52
+ exports.default = Card;
@@ -32,7 +32,7 @@ function Item(props) {
32
32
  React.createElement("div", { className: style_1.SDK_PREFIX + "-check-transform-checkbox-group" }, options.map(function (item) {
33
33
  return (React.createElement("div", { key: item.value },
34
34
  React.createElement(antd_1.Checkbox, { value: item.value, checked: item.checked, onChange: onCheckboxChange },
35
- React.createElement(NameLimiter_1.default, { name: item.text, length: 18 }))));
35
+ React.createElement(NameLimiter_1.default, { name: item.text }))));
36
36
  })))));
37
37
  }
38
38
  exports.default = Item;
@@ -1371,7 +1371,15 @@ textarea.ant-input {
1371
1371
  .ant-tooltip-rtl .ant-tooltip-inner {
1372
1372
  text-align: right;
1373
1373
  }
1374
- .pandora-sdk-name-tooltip .ant-tooltip-inner {
1374
+ .pandora-sdk-name-limit {
1375
+ max-width: 100%;
1376
+ display: inline-block;
1377
+ vertical-align: top;
1378
+ white-space: nowrap;
1379
+ text-overflow: ellipsis;
1380
+ overflow: hidden;
1381
+ }
1382
+ .pandora-sdk-name-limit-tooltip .ant-tooltip-inner {
1375
1383
  max-width: 400px !important;
1376
1384
  max-height: 200px !important;
1377
1385
  overflow: auto;
@@ -5,6 +5,7 @@ export interface IOptionItem {
5
5
  text?: string | React.ReactNode;
6
6
  value: CheckboxValueType;
7
7
  indeterminate?: boolean | ((item: IOptionItem) => boolean);
8
+ disabled?: boolean | ((item: IOptionItem) => boolean);
8
9
  }
9
10
  export interface ICheckboxListProps {
10
11
  /**
@@ -21,11 +21,12 @@ function CheckboxList(props) {
21
21
  options.map(function (option) {
22
22
  // 将 option string的形式进行格式化
23
23
  var optionItem = typeof option === 'string' ? { value: option } : option;
24
- var key = optionItem.key, value = optionItem.value, text = optionItem.text, indeterminate = optionItem.indeterminate;
24
+ var key = optionItem.key, value = optionItem.value, text = optionItem.text, indeterminate = optionItem.indeterminate, disabled = optionItem.disabled;
25
25
  var indeterminateState = typeof indeterminate === 'function'
26
26
  ? indeterminate(optionItem)
27
27
  : indeterminate;
28
- return (React.createElement(antd_1.Checkbox, { className: classnames_1.default(style_1.SDK_PREFIX + "-checkbox-item", itemClassName), key: String(key || value), value: value, indeterminate: indeterminateState }, text || value));
28
+ var disabledState = typeof disabled === 'function' ? disabled(optionItem) : disabled;
29
+ return (React.createElement(antd_1.Checkbox, { className: classnames_1.default(style_1.SDK_PREFIX + "-checkbox-item", itemClassName), key: String(key || value), value: value, indeterminate: indeterminateState, disabled: disabledState }, text || value));
29
30
  })));
30
31
  }
31
32
  exports.default = CheckboxList;
@@ -50,5 +50,5 @@ function Collapse(props) {
50
50
  }, [children, defaultActiveKey]);
51
51
  return React.createElement("div", { className: className }, getPanels());
52
52
  }
53
- exports.default = Collapse;
54
53
  Collapse.Panel = Panel_1.default;
54
+ exports.default = Collapse;
@@ -16,7 +16,7 @@ export declare type TCollapsiblePanelProps = Omit<IPanelContentProps, 'active'>
16
16
  disabled?: boolean;
17
17
  header: string | React.ReactNode;
18
18
  };
19
- export default class CollapsiblePanel extends React.Component<TCollapsiblePanelProps, {
19
+ declare class CollapsiblePanel extends React.Component<TCollapsiblePanelProps, {
20
20
  active: boolean;
21
21
  }> {
22
22
  static PanelContent: typeof PanelContent;
@@ -30,4 +30,4 @@ export default class CollapsiblePanel extends React.Component<TCollapsiblePanelP
30
30
  toggle: () => void;
31
31
  render(): JSX.Element;
32
32
  }
33
- export {};
33
+ export default CollapsiblePanel;
@@ -34,6 +34,6 @@ function ConfigProvider(props) {
34
34
  return (react_1.default.createElement(context_1.LocaleProvider, { locale: otherLocale },
35
35
  react_1.default.createElement(config_provider_1.default, __assign({}, otherProps, { locale: antdLocale }))));
36
36
  }
37
- exports.default = ConfigProvider;
38
37
  ConfigProvider.generateLocaleConsumer = context_1.generateLocaleConsumer;
39
38
  ConfigProvider.generateUseLocale = context_1.generateUseLocale;
39
+ exports.default = ConfigProvider;
@@ -56,7 +56,7 @@ var time_1 = require("../../../constants/time");
56
56
  var Button_1 = __importDefault(require("../../Button"));
57
57
  var Collapse_1 = __importDefault(require("../../Collapse"));
58
58
  var Selector_1 = __importDefault(require("../../Selector"));
59
- var NameLimiter_1 = __importStar(require("../../NameLimiter"));
59
+ var NameLimiter_1 = __importDefault(require("../../NameLimiter"));
60
60
  var relativeTimePicker_1 = __importDefault(require("./relativeTimePicker"));
61
61
  var time_2 = __importDefault(require("../time"));
62
62
  var constants_1 = require("../constants");
@@ -258,7 +258,7 @@ var Base = /** @class */ (function (_super) {
258
258
  return (React.createElement("div", { key: preset.value, className: classnames_1.default(style_1.SDK_PREFIX + "-datetime-pick-item", (_a = {},
259
259
  _a['active'] = value && preset.value === value.preset,
260
260
  _a)), onClick: function () { return _this.handlePresetClick(preset); } },
261
- React.createElement(NameLimiter_1.default, { name: preset.text, length: 12, type: NameLimiter_1.SplitType.End })));
261
+ React.createElement(NameLimiter_1.default, { name: preset.text })));
262
262
  });
263
263
  };
264
264
  Base.prototype.handlePresetClick = function (preset) {
@@ -22,7 +22,7 @@ export interface IDateTimePickerProps extends IBaseProps {
22
22
  /**
23
23
  * 弹出层时间选择组件封装
24
24
  */
25
- export default class DateTimePicker extends React.Component<IDateTimePickerProps, any> {
25
+ declare class DateTimePicker extends React.Component<IDateTimePickerProps, any> {
26
26
  static Base: typeof Base;
27
27
  static BaseMobile: typeof BaseMobile;
28
28
  visible: boolean;
@@ -31,3 +31,4 @@ export default class DateTimePicker extends React.Component<IDateTimePickerProps
31
31
  handleChange(value: Time): void;
32
32
  render(): JSX.Element;
33
33
  }
34
+ export default DateTimePicker;
@@ -48,8 +48,8 @@ function Input(props) {
48
48
  }, [onChange]);
49
49
  return React.createElement(antd_1.Input, __assign({}, restProps, { onChange: handleChange }));
50
50
  }
51
- exports.default = Input;
52
51
  Input.DebounceInput = debounce_1.default(Input);
53
52
  Input.Password = Password_1.Password;
54
53
  Input.TextArea = TextArea_1.TextArea;
55
54
  Input.NumberInput = NumberInput_1.default;
55
+ exports.default = Input;
@@ -13,9 +13,9 @@ export interface IMenuProps extends Omit<MenuProps, 'options' | 'mode'> {
13
13
  }
14
14
  export declare function Menue(props: React.PropsWithChildren<IMenuProps>): JSX.Element;
15
15
  export declare namespace Menue {
16
- var Divider: typeof import("rc-menu").Divider;
16
+ var Divider;
17
17
  var Item: typeof import("antd/lib/menu/MenuItem").default;
18
18
  var SubMenu: typeof import("antd/lib/menu/SubMenu").default;
19
- var ItemGroup: typeof import("rc-menu").MenuItemGroup;
19
+ var ItemGroup;
20
20
  }
21
21
  export default Menue;