@arim-aisdc/public-components 2.3.71 → 3.0.0-alpha

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.
@@ -17,7 +17,7 @@ export declare const foramtBaseInfoField: (data: any, dataField: BaseInfoFieldTy
17
17
  value: any;
18
18
  field: string;
19
19
  label?: string;
20
- text: string | JSX.Element | Element;
20
+ text: string | Element | JSX.Element;
21
21
  units?: string;
22
22
  width?: string;
23
23
  labelWidth?: string;
@@ -245,17 +245,19 @@ var LabelDropdown = /*#__PURE__*/React.memo(function (_ref3) {
245
245
  children: /*#__PURE__*/_jsx(Tooltip, {
246
246
  title: isOverflowing ? label : '',
247
247
  color: "var(--globalColor7)",
248
- overlayStyle: {
249
- border: '1px solid var(--tableColor2)',
250
- borderRadius: '6px'
251
- },
252
- overlayInnerStyle: {
253
- padding: '6px 16px',
254
- borderRadius: '6px',
255
- color: 'var(--globalColor1)',
256
- background: 'var(--globalColor1)',
257
- fontSize: '14px',
258
- lineHeight: '28px'
248
+ styles: {
249
+ root: {
250
+ border: '1px solid var(--tableColor2)',
251
+ borderRadius: '6px'
252
+ },
253
+ body: {
254
+ padding: '6px 16px',
255
+ borderRadius: '6px',
256
+ color: 'var(--globalColor1)',
257
+ background: 'var(--globalColor1)',
258
+ fontSize: '14px',
259
+ lineHeight: '28px'
260
+ }
259
261
  },
260
262
  children: /*#__PURE__*/_jsx("div", {
261
263
  ref: labelRef,
@@ -200,7 +200,7 @@ var CenterModal = function CenterModal(_ref) {
200
200
  className: "iconfont-other icon-other-close",
201
201
  children: " "
202
202
  }),
203
- destroyOnClose: true,
203
+ destroyOnHidden: true,
204
204
  confirmLoading: confirmLoading,
205
205
  maskClosable: maskClosable,
206
206
  afterClose: afterClose,
@@ -31,6 +31,8 @@ export interface ConditionExpressionPropsType {
31
31
  labelInValue?: boolean;
32
32
  /** 是否支持前端筛选 */
33
33
  canFrontFilter?: boolean;
34
+ /** 前端筛选函数 */
35
+ frontendFilterOptionFun?: (input: any, option: any) => boolean;
34
36
  }
35
37
  declare const _default: React.NamedExoticComponent<ConditionExpressionPropsType>;
36
38
  export default _default;
@@ -68,7 +68,8 @@ var ConditionExpression = function ConditionExpression(_ref) {
68
68
  showParameter = _ref$showParameter === void 0 ? true : _ref$showParameter,
69
69
  parameterOptions = _ref.parameterOptions,
70
70
  labelInValue = _ref.labelInValue,
71
- canFrontFilter = _ref.canFrontFilter;
71
+ canFrontFilter = _ref.canFrontFilter,
72
+ frontendFilterOptionFun = _ref.frontendFilterOptionFun;
72
73
  /** 添加条件触发 */
73
74
  var addExpression = function addExpression(index) {
74
75
  var _conditionExpressionItem = value.map(function (e, i) {
@@ -167,6 +168,11 @@ var ConditionExpression = function ConditionExpression(_ref) {
167
168
  className: 'condition-all-undelete',
168
169
  children: [item === null || item === void 0 ? void 0 : item.map(function (e, i) {
169
170
  var _value$index$, _value$index$2, _value$index$3, _value$index$4;
171
+ // 前端筛选逻辑
172
+ var frontendFilterOption = function frontendFilterOption(input, option) {
173
+ var _option$label;
174
+ return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').toLowerCase().includes(input.toLowerCase());
175
+ };
170
176
  return /*#__PURE__*/_jsxs("div", {
171
177
  style: {
172
178
  display: 'flex',
@@ -188,10 +194,7 @@ var ConditionExpression = function ConditionExpression(_ref) {
188
194
  return dataChange('arguments', data, [index[0], i]);
189
195
  },
190
196
  showSearch: canFrontFilter,
191
- filterOption: canFrontFilter ? function (input, option) {
192
- var _option$label;
193
- return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').toLowerCase().includes(input.toLowerCase());
194
- } : true
197
+ filterOption: canFrontFilter || frontendFilterOptionFun ? frontendFilterOptionFun || frontendFilterOption : true
195
198
  })
196
199
  }), /*#__PURE__*/_jsx("div", {
197
200
  className: 'condition-select-middle',
@@ -371,10 +371,11 @@ var CustomForm = function CustomForm(_ref, ref) {
371
371
  allowClear: item.allowClear === false ? false : true,
372
372
  options: item.setting || [],
373
373
  placeholder: item.inputTips,
374
- onSearch: debounce(function (value) {
374
+ showSearch: item.showSearch,
375
+ onSearch: item.showSearch ? debounce(function (value) {
375
376
  var _item$handleSearch3;
376
377
  return (_item$handleSearch3 = item.handleSearch) === null || _item$handleSearch3 === void 0 ? void 0 : _item$handleSearch3.call(item, value, item.isInitGetOptions);
377
- }, 200),
378
+ }, 200) : undefined,
378
379
  onFocus: function onFocus() {
379
380
  var _item$handleSearch4;
380
381
  return (_item$handleSearch4 = item.handleSearch) === null || _item$handleSearch4 === void 0 ? void 0 : _item$handleSearch4.call(item, '', item.isInitGetOptions);
@@ -207,7 +207,7 @@ var QueryFilter = function QueryFilter(_ref, ref) {
207
207
  mode: item.mode ? item.mode : undefined,
208
208
  showSearch: item.showSearch,
209
209
  placeholder: item.inputTips,
210
- dropdownMatchSelectWidth: item.dropdownMatchSelectWidth,
210
+ popupMatchSelectWidth: item.dropdownMatchSelectWidth,
211
211
  allowClear: item.allowClear === false ? false : true,
212
212
  disabled: item.disabled
213
213
  // defaultValue={item.defaultValue}
@@ -384,7 +384,9 @@ var Row = function Row(_ref) {
384
384
  destroyTooltipOnHide: {
385
385
  keepParent: false
386
386
  },
387
- overlayClassName: "table-max-row-tooltip-wrapper",
387
+ classNames: {
388
+ root: 'table-max-row-tooltip-wrapper'
389
+ },
388
390
  getPopupContainer: function getPopupContainer() {
389
391
  return tableBodyRef.current || document.body;
390
392
  },
@@ -373,7 +373,7 @@ var VirtualRow = function VirtualRow(_ref) {
373
373
  }
374
374
  }, [
375
375
  // 依赖项保持不变
376
- row, row.id, rowEditing, tableId, editting, canRowDrag, disableDragRowIds, isDragging, selectedRowDragging, rowStyle, handleRowClick, rowMouseEnter, rowMouseLeave, rowClassNames, cellClassName, theme, table, handleCellRightClick, getCellProps, tableTooltip, onEditValueChange, dateFormat, row.getVisibleCells(), row.getIsSelected(), rowStyles]);
376
+ row, row.id, rowEditing, tableId, editting, canRowDrag, disableDragRowIds, isDragging, selectedRowDragging, rowStyle, handleRowClick, rowMouseEnter, rowMouseLeave, rowClassNames, cellClassName, theme, table, handleCellRightClick, getCellProps, tableTooltip, onEditValueChange, dateFormat, row.getVisibleCells(), row.getIsSelected(), rowStyles, table.getState().columnSizing]);
377
377
  var rowCom = function rowCom() {
378
378
  var renderCell = function renderCell(cell) {
379
379
  var _cellClassName2;
@@ -442,7 +442,9 @@ var VirtualRow = function VirtualRow(_ref) {
442
442
  destroyTooltipOnHide: {
443
443
  keepParent: false
444
444
  },
445
- overlayClassName: "table-max-row-tooltip-wrapper",
445
+ classNames: {
446
+ root: 'table-max-row-tooltip-wrapper'
447
+ },
446
448
  getPopupContainer: function getPopupContainer() {
447
449
  return tableBodyRef.current || document.body;
448
450
  },
@@ -125,7 +125,9 @@ export var EditableCell = function EditableCell(_ref) {
125
125
  mouseEnterDelay: 0.5
126
126
  // trigger="click"
127
127
  ,
128
- overlayClassName: "tableMaxCellTooltip",
128
+ classNames: {
129
+ root: 'table-max-row-tooltip-wrapper'
130
+ },
129
131
  children: /*#__PURE__*/_jsx("div", {
130
132
  className: "ellipsis",
131
133
  children: children
@@ -216,7 +216,9 @@ var SettingItem = function SettingItem(_ref) {
216
216
  placement: "top",
217
217
  title: item.tooltip,
218
218
  zIndex: 99999,
219
- overlayClassName: "tableMaxSettingTooltip",
219
+ classNames: {
220
+ root: 'table-max-row-tooltip-wrapper'
221
+ },
220
222
  children: /*#__PURE__*/_jsx("i", {
221
223
  className: "icon iconfont-other icon-other-".concat(item.icon, " move-handle"),
222
224
  onClick: function onClick() {
@@ -1,13 +1,13 @@
1
1
  import { TableMaxColumnType } from "../../type";
2
- export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
3
- export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
4
- export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
5
- export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
2
+ export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
3
+ export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
4
+ export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
5
+ export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
6
6
  declare const customSortFns: {
7
- numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
8
- stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
9
- timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
10
- numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
7
+ numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
8
+ stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
9
+ timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
10
+ numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
11
11
  };
12
12
  export default customSortFns;
13
13
  export type SortFnType = keyof typeof customSortFns | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "2.3.71",
3
+ "version": "3.0.0-alpha",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -97,7 +97,7 @@
97
97
  "stylelint": "^14.9.1"
98
98
  },
99
99
  "peerDependencies": {
100
- "antd": "^5.27.3",
100
+ "antd": "6",
101
101
  "react": ">=17.0.1",
102
102
  "react-dom": ">=17.0.1",
103
103
  "umi-request": "^1.4.0"