@qn-pandora/pandora-component 4.0.4 → 4.0.5

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.
package/es/index.less CHANGED
@@ -1,38 +1,38 @@
1
1
  @import './style\mixin.less';
2
2
  @import './style\theme.less';
3
3
  @import './components\AutoComplete\style.less';
4
- @import './components\Card\style.less';
5
- @import './components\Button\style.less';
6
4
  @import './components\Breadcrumb\style.less';
5
+ @import './components\Button\style.less';
6
+ @import './components\Checkbox\style.less';
7
+ @import './components\Card\style.less';
8
+ @import './components\Collapse\style.less';
7
9
  @import './components\CheckboxList\style.less';
8
10
  @import './components\CheckTransformList\style.less';
9
- @import './components\Collapse\style.less';
10
- @import './components\Checkbox\style.less';
11
11
  @import './components\CollapsiblePanel\style.less';
12
- @import './components\DateTimePicker\style.less';
13
- @import './components\Drawer\style.less';
14
12
  @import './components\FileResumable\style.less';
13
+ @import './components\Drawer\style.less';
14
+ @import './components\DateTimePicker\style.less';
15
15
  @import './components\Input\style.less';
16
16
  @import './components\KeyValuePair\style.less';
17
17
  @import './components\Menu\style.less';
18
- @import './components\Modal\style.less';
19
18
  @import './components\NameExplainTooltip\style.less';
20
- @import './components\NameLimiter\style.less';
19
+ @import './components\Modal\style.less';
21
20
  @import './components\OptionList\style.less';
22
- @import './components\RadioGroup\style.less';
23
21
  @import './components\RangeInput\style.less';
22
+ @import './components\NameLimiter\style.less';
23
+ @import './components\RadioGroup\style.less';
24
24
  @import './components\Selector\style.less';
25
- @import './components\Spin\style.less';
26
25
  @import './components\RemarkName\style.less';
26
+ @import './components\Spin\style.less';
27
27
  @import './components\Steps\style.less';
28
- @import './components\Table\style.less';
29
- @import './components\Timeline\style.less';
30
- @import './components\Tabs\style.less';
31
28
  @import './components\TagList\style.less';
29
+ @import './components\Tabs\style.less';
30
+ @import './components\Table\style.less';
32
31
  @import './components\Transfer\style.less';
32
+ @import './components\Timeline\style.less';
33
33
  @import './components\TreeSelector\style.less';
34
- @import './components\Card\RowExtra\style.less';
35
34
  @import './components\Card\SearchInput\style.less';
35
+ @import './components\Card\RowExtra\style.less';
36
36
  @import './components\DateTimePicker\Base\style.less';
37
37
  @import './components\DateTimePicker\BaseMobile\style.less';
38
38
  @import './components\DateTimePicker\DisplayInput\style.less';
@@ -40,11 +40,11 @@
40
40
  @import './components\OptionList\OptionItem\style.less';
41
41
  @import './components\OptionList\PopoverOptionList\style.less';
42
42
  @import './components\Steps\ControlButton\style.less';
43
+ @import './components\TagList\TagSwitch\style.less';
44
+ @import './components\TagList\Tag\style.less';
43
45
  @import './components\Table\ColumnTag\style.less';
44
- @import './components\Timeline\TimelineItem\style.less';
45
46
  @import './components\Transfer\List\style.less';
46
- @import './components\TagList\Tag\style.less';
47
47
  @import './components\Transfer\ListBody\style.less';
48
- @import './components\TagList\TagSwitch\style.less';
48
+ @import './components\Timeline\TimelineItem\style.less';
49
49
  @import './components\DateTimePicker\Collapse\Panel\style.less';
50
50
  @import './components\DateTimePicker\BaseMobile\Absolute\style.less';
@@ -14,6 +14,10 @@ export interface IOption {
14
14
  * 路由
15
15
  */
16
16
  weburl?: string;
17
+ /**
18
+ * 内部链接
19
+ */
20
+ internalUrl?: string;
17
21
  /**
18
22
  * 路由调整方式
19
23
  */
@@ -238,9 +238,12 @@ var Table = /** @class */ (function (_super) {
238
238
  : rowClassName(record, index, indent));
239
239
  };
240
240
  Table.prototype.getDisabledStatus = function (option) {
241
+ var _this = this;
241
242
  var noneSelected = this.selectedRowKeys.length === 0;
242
243
  var disabled = typeof option.disabled === 'function'
243
- ? option.disabled(__spread(this.undisabledData))
244
+ ? option.disabled(__spread(this.undisabledData.filter(function (item, index) {
245
+ return _this.selectedRowKeys.indexOf(_this.getRowKey(item, index)) !== -1;
246
+ })))
244
247
  : option.disabled;
245
248
  return noneSelected || disabled;
246
249
  };
@@ -1512,6 +1512,9 @@ textarea.ant-pagination-options-quick-jumper input {
1512
1512
  .pandora-sdk-table-wrapper .ant-table-tbody > tr > td:last-child {
1513
1513
  padding-right: 20px;
1514
1514
  }
1515
+ .pandora-sdk-table-wrapper .ant-table-tbody > tr > td:first-child:has(.pandora-sdk-table-empty) {
1516
+ padding: 0;
1517
+ }
1515
1518
  .pandora-sdk-table-wrapper .ant-table-thead > tr > th .anticon-filter {
1516
1519
  line-height: 20px;
1517
1520
  }
@@ -42,6 +42,11 @@
42
42
  .@{ant-prefix}-table-tbody > tr > td:last-child {
43
43
  padding-right: 20px;
44
44
  }
45
+ .@{ant-prefix}-table-tbody
46
+ > tr
47
+ > td:first-child:has(.@{sdk-prefix}-table-empty) {
48
+ padding: 0;
49
+ }
45
50
 
46
51
  .@{ant-prefix}-table-thead > tr > th .anticon-filter {
47
52
  line-height: 20px;
@@ -33,6 +33,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
33
33
  var react_1 = __importStar(require("react"));
34
34
  var antd_1 = require("antd");
35
35
  var config_provider_1 = require("antd/es/config-provider");
36
+ var lodash_1 = require("lodash");
36
37
  var pandora_component_icons_1 = require("@qn-pandora/pandora-component-icons");
37
38
  var ListBody_1 = __importDefault(require("../ListBody"));
38
39
  var language_1 = require("../../../utils/language");
@@ -42,17 +43,23 @@ function List(props) {
42
43
  var _a = __read(react_1.useState(''), 2), searchValue = _a[0], setSearchValue = _a[1];
43
44
  var locale = react_1.useContext(config_provider_1.ConfigContext).locale;
44
45
  var title = props.title, type = props.type, searchPlaceHolder = props.searchPlaceHolder, _b = props.dataSource, dataSource = _b === void 0 ? [] : _b, _c = props.targetKeys, targetKeys = _c === void 0 ? [] : _c, selectAllTitle = props.selectAllTitle, onTargetKeysChange = props.onTargetKeysChange;
46
+ var filterDataSource = react_1.useMemo(function () {
47
+ return dataSource.filter(function (item) { return item.name.includes(searchValue); });
48
+ }, [dataSource, searchValue]);
45
49
  var onToggleAll = react_1.useCallback(function (e) {
50
+ var newTargetKeys = [];
51
+ var allTargetKeys = filterDataSource.map(function (item) { return item.key; });
46
52
  if (e.target.checked === true) {
47
- var targetKeys_1 = dataSource.map(function (item) { return item.key; });
48
- onTargetKeysChange(targetKeys_1);
53
+ newTargetKeys = __spread(new Set(__spread(targetKeys, allTargetKeys)));
49
54
  }
50
55
  else {
51
- onTargetKeysChange([]);
56
+ newTargetKeys = targetKeys.filter(function (item) { return !lodash_1.includes(allTargetKeys, item); });
52
57
  }
53
- }, [dataSource, onTargetKeysChange]);
54
- var selectedAllNode = (react_1.default.createElement(antd_1.Checkbox, { className: style_1.SDK_PREFIX + "-transfer-mb10", checked: dataSource.every(function (item) { return item.checked; }), indeterminate: dataSource.some(function (item) { return item.checked; }) &&
55
- !dataSource.every(function (item) { return item.checked; }), onChange: onToggleAll },
58
+ onTargetKeysChange(newTargetKeys);
59
+ }, [filterDataSource, targetKeys, onTargetKeysChange]);
60
+ var selectedAllNode = (react_1.default.createElement(antd_1.Checkbox, { className: style_1.SDK_PREFIX + "-transfer-mb10", checked: !!filterDataSource.length &&
61
+ filterDataSource.every(function (item) { return item.checked; }), indeterminate: filterDataSource.some(function (item) { return item.checked; }) &&
62
+ !filterDataSource.every(function (item) { return item.checked; }), onChange: onToggleAll },
56
63
  react_1.default.createElement("strong", null, selectAllTitle || language_1.formatString(type_1.TransferLocale.select_all, locale))));
57
64
  var onCheckboxChange = react_1.useCallback(function (key, checked) {
58
65
  var keys = __spread(targetKeys);
@@ -70,6 +77,6 @@ function List(props) {
70
77
  react_1.default.createElement(antd_1.Input, { placeholder: searchPlaceHolder ||
71
78
  language_1.formatString(type_1.TransferLocale.placeholder, locale), value: searchValue, onChange: function (e) { return setSearchValue(e.target.value); }, className: style_1.SDK_PREFIX + "-transfer-mb10", prefix: react_1.default.createElement(pandora_component_icons_1.Search, { className: style_1.SDK_PREFIX + "-search-icon" }) })),
72
79
  type === "source" /* Source */ && selectedAllNode,
73
- react_1.default.createElement(ListBody_1.default, { dataSource: dataSource.filter(function (item) { return item.name.includes(searchValue); }), onChange: onCheckboxChange })));
80
+ react_1.default.createElement(ListBody_1.default, { dataSource: filterDataSource, onChange: onCheckboxChange })));
74
81
  }
75
82
  exports.default = List;