linkmore-design 1.0.32 → 1.0.33

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 (35) hide show
  1. package/dist/index.umd.js +639 -15
  2. package/dist/index.umd.min.js +5 -5
  3. package/es/CustomTableOption/columnsSort.d.ts +4 -0
  4. package/es/CustomTableOption/columnsSort.js +317 -0
  5. package/es/CustomTableOption/filterSort.d.ts +4 -0
  6. package/es/CustomTableOption/filterSort.js +193 -0
  7. package/es/CustomTableOption/index.d.ts +12 -0
  8. package/es/CustomTableOption/index.js +122 -0
  9. package/es/CustomTableOption/style/index.css +548 -0
  10. package/es/CustomTableOption/style/index.d.ts +1 -0
  11. package/es/CustomTableOption/style/index.js +1 -0
  12. package/es/LmTable/Table.js +27 -13
  13. package/es/LmTable/style/style.css +4 -0
  14. package/es/Radio/style/style.css +2 -1
  15. package/es/Tag/index.js +2 -2
  16. package/es/Tag/style/index.css +4 -0
  17. package/es/index.js +9 -1
  18. package/es/message/style/index.css +1 -1
  19. package/lib/CustomTableOption/columnsSort.d.ts +4 -0
  20. package/lib/CustomTableOption/columnsSort.js +336 -0
  21. package/lib/CustomTableOption/filterSort.d.ts +4 -0
  22. package/lib/CustomTableOption/filterSort.js +213 -0
  23. package/lib/CustomTableOption/index.d.ts +12 -0
  24. package/lib/CustomTableOption/index.js +140 -0
  25. package/lib/CustomTableOption/style/index.css +548 -0
  26. package/lib/CustomTableOption/style/index.d.ts +1 -0
  27. package/lib/CustomTableOption/style/index.js +3 -0
  28. package/lib/LmTable/Table.js +27 -13
  29. package/lib/LmTable/style/style.css +4 -0
  30. package/lib/Radio/style/style.css +2 -1
  31. package/lib/Tag/index.js +2 -2
  32. package/lib/Tag/style/index.css +4 -0
  33. package/lib/index.js +9 -1
  34. package/lib/message/style/index.css +1 -1
  35. package/package.json +1 -1
@@ -27,7 +27,7 @@ var _react = _interopRequireWildcard(require("react"));
27
27
 
28
28
  var _resetConfig = _interopRequireDefault(require("./resetConfig"));
29
29
 
30
- var _excluded = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "customCheck", "rowSelection"];
30
+ var _excluded = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "customCheck", "rowSelection", "columnsState", "tableRowType"];
31
31
  var Summary = _proTable.default.Summary;
32
32
  exports.Summary = Summary;
33
33
  var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
@@ -45,6 +45,9 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
45
45
  virtual = _props$virtual === void 0 ? false : _props$virtual,
46
46
  customCheck = props.customCheck,
47
47
  rowSelection = props.rowSelection,
48
+ columnsState = props.columnsState,
49
+ _props$tableRowType = props.tableRowType,
50
+ tableRowType = _props$tableRowType === void 0 ? 'default' : _props$tableRowType,
48
51
  resetProps = (0, _objectWithoutProperties2.default)(props, _excluded);
49
52
  var _resetProps$rowKey = resetProps.rowKey,
50
53
  rowKey = _resetProps$rowKey === void 0 ? 'id' : _resetProps$rowKey;
@@ -89,7 +92,9 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
89
92
  };
90
93
 
91
94
  var resetColumns = (0, _react.useCallback)(function () {
92
- return useColumns.map(function (col, index) {
95
+ return useColumns.filter(function (item) {
96
+ return item.show !== false;
97
+ }).map(function (col, index) {
93
98
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, col), {}, {
94
99
  width: col.width,
95
100
  onHeaderCell: function onHeaderCell(column) {
@@ -112,20 +117,25 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
112
117
  trigger = _Object$assign.trigger,
113
118
  highlight = _Object$assign.highlight;
114
119
 
120
+ console.log(trigger, highlight, 'rowclick');
121
+
115
122
  if (highlight) {
116
123
  setActiveKey(record[rowKey]);
117
124
  }
118
125
 
119
126
  if (trigger === 'row') {
120
127
  var selectedRows = useSelectedRows.selectedRows;
121
- var selectedRowKeys = selectedRows.map(function (v) {
122
- return v[rowKey];
123
- });
124
- var Idx = selectedRowKeys.indexOf(record[rowKey]);
125
- Idx >= 0 ? selectedRows.splice(Idx, 1) : selectedRows.push(record);
126
- setSelectedRows({
127
- selectedRows: selectedRows
128
- });
128
+
129
+ if (tableRowType === 'select' || tableRowType === 'default' && selectedRows.length) {
130
+ var selectedRowKeys = selectedRows.map(function (v) {
131
+ return v[rowKey];
132
+ });
133
+ var Idx = selectedRowKeys.indexOf(record[rowKey]);
134
+ Idx >= 0 ? selectedRows.splice(Idx, 1) : selectedRows.push(record);
135
+ setSelectedRows({
136
+ selectedRows: selectedRows
137
+ });
138
+ }
129
139
  }
130
140
 
131
141
  rowClick === null || rowClick === void 0 ? void 0 : rowClick(record);
@@ -147,7 +157,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
147
157
  debounceTime: 300,
148
158
  revalidateOnFocus: false,
149
159
  options: {
150
- setting: false,
160
+ setting: true,
151
161
  density: false,
152
162
  fullScreen: false,
153
163
  reload: false
@@ -155,6 +165,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
155
165
  columnsState: {
156
166
  value: columnsStateMap,
157
167
  onChange: function onChange(k) {
168
+ console.log(k, 'kkk');
158
169
  setColumnsStateMap(k);
159
170
  }
160
171
  },
@@ -231,7 +242,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
231
242
  // }, [columns, autoSize.width])
232
243
 
233
244
  (0, _react.useEffect)(function () {
234
- var obj = {};
245
+ var obj = (0, _objectSpread2.default)({}, columnsState);
235
246
  columns === null || columns === void 0 ? void 0 : columns.forEach(function (item) {
236
247
  if (item.fixed) {
237
248
  obj[item.dataIndex || item.key] = {
@@ -241,6 +252,10 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
241
252
  });
242
253
  setColumnsStateMap(obj);
243
254
  }, []); // useEffect(() => {
255
+ // console.log(props.columnsStateValue, 'v vv')
256
+ // setColumnsStateMap(props.columnsStateValue)
257
+ // }, [props.columnsStateValue])
258
+ // useEffect(() => {
244
259
  // rowClick?.()
245
260
  // }, [useSelectedRows])
246
261
  // 将节点方法给外部使用
@@ -385,7 +400,6 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
385
400
  _tableWarpRef$current7 = _tableWarpRef$current5.height,
386
401
  height = _tableWarpRef$current7 === void 0 ? '100%' : _tableWarpRef$current7;
387
402
 
388
- console.log(width, height, '--tableWarpReftableWarpRef', tableWarpRef.current);
389
403
  var value = summary ? 48 : 0;
390
404
  resizeRef.current = window.addEventListener('resize', handResize);
391
405
  setTableSize({
@@ -1118,6 +1118,9 @@ html {
1118
1118
  #lm_protable_warp .ant-pro-card-body {
1119
1119
  padding: 0;
1120
1120
  }
1121
+ #lm_protable_warp .lm_protable .ant-table {
1122
+ font-size: 12px;
1123
+ }
1121
1124
  #lm_protable_warp .lm_protable .ant-card-body,
1122
1125
  #lm_protable_warp .lm_protable .ant-pro-card-body {
1123
1126
  padding: 0;
@@ -1167,6 +1170,7 @@ html {
1167
1170
  #lm_protable_warp .lm_protable .ant-table-thead > tr > th {
1168
1171
  background: var(--color-4);
1169
1172
  font-size: 12px;
1173
+ padding: 8px;
1170
1174
  }
1171
1175
  #lm_protable_warp .lm_protable .ant-table.ant-table-small {
1172
1176
  font-size: 12px;
@@ -30,7 +30,7 @@
30
30
  font-size: 12px;
31
31
  line-height: 30px;
32
32
  height: 32px;
33
- padding: 1px 8px;
33
+ padding: 1px 12px;
34
34
  color: var(--font-color);
35
35
  vertical-align: middle;
36
36
  }
@@ -73,6 +73,7 @@
73
73
  .lm-radio-group.ant-radio-group-small .ant-radio-button-wrapper {
74
74
  line-height: 22px;
75
75
  height: 24px;
76
+ padding: 1px 8px;
76
77
  }
77
78
  .lm-radio-group.ant-radio-group-small .ant-radio-button-wrapper > span:last-child {
78
79
  line-height: 22px;
package/lib/Tag/index.js CHANGED
@@ -30,7 +30,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
30
30
  return t;
31
31
  };
32
32
 
33
- var PresetColorTypes = ['pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime'];
33
+ var PresetColorTypes = ['pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime', 'theme'];
34
34
  exports.PresetColorTypes = PresetColorTypes;
35
35
  var prefixCls = 'lm_tag';
36
36
  var LmTag = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
@@ -44,7 +44,7 @@ var LmTag = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
44
44
  color: color,
45
45
  className: (0, _classnames.default)(prefixCls, {
46
46
  lm_tag_noborder: !!props.noborder
47
- }, className, PresetColorTypes.includes(color) && "lm_tag_main_color")
47
+ }, className, PresetColorTypes.includes(color) && "lm_tag_main_color lm_tag_main_".concat(color))
48
48
  }));
49
49
  });
50
50
  LmTag.CheckableTag = _tag.default.CheckableTag;
@@ -512,6 +512,10 @@ html {
512
512
  .lm_tag.ant-tag .anticon-close {
513
513
  margin-left: 6px;
514
514
  }
515
+ .lm_tag.ant-tag.lm_tag_main_theme {
516
+ background: var(--tree-select-bg);
517
+ color: var(--primary-color);
518
+ }
515
519
  .lm_tag.lm_tag_noborder {
516
520
  border-color: transparent;
517
521
  }
package/lib/index.js CHANGED
@@ -35,6 +35,12 @@ Object.defineProperty(exports, "CkFilter", {
35
35
  return _CkFilter.default;
36
36
  }
37
37
  });
38
+ Object.defineProperty(exports, "CustomTableOption", {
39
+ enumerable: true,
40
+ get: function get() {
41
+ return _CustomTableOption.default;
42
+ }
43
+ });
38
44
  Object.defineProperty(exports, "CustomerService", {
39
45
  enumerable: true,
40
46
  get: function get() {
@@ -332,4 +338,6 @@ var _Table = _interopRequireDefault(require("./Table"));
332
338
 
333
339
  var _Switch = _interopRequireDefault(require("./Switch"));
334
340
 
335
- var _Image = _interopRequireDefault(require("./Image"));
341
+ var _Image = _interopRequireDefault(require("./Image"));
342
+
343
+ var _CustomTableOption = _interopRequireDefault(require("./CustomTableOption"));
@@ -504,6 +504,6 @@ html {
504
504
  opacity: 1;
505
505
  }
506
506
  .ant-message .ant-message-notice-content {
507
- padding: 7px 16px;
507
+ padding: 8px 16px;
508
508
  font-size: 12px;
509
509
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkmore-design",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "author": {
5
5
  "name": "nowthen",
6
6
  "email": "rnlvwyx@gmail.com"