dcp-design-react 1.8.28 → 1.8.30

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.
@@ -257,7 +257,7 @@ export type IAlertConfig = {
257
257
  };
258
258
  export type IColumn = {
259
259
  dataIndex: string;
260
- title: string;
260
+ title: string | React.ReactNode;
261
261
  description?: string;
262
262
  colSpan?: number;
263
263
  rowSpan?: number;
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import dayjs, { Dayjs } from 'dayjs';
2
3
  import { hasOwn } from '../../../_utils/util';
3
4
  import type { IColumn, IDerivedRowKey, IRecord, IRowKey, ISorter } from '../table/types';
4
- import type { Nullable, AnyObject, JSXElement } from '../../../_utils/types';
5
+ import type { Nullable, AnyObject } from '../../../_utils/types';
5
6
  export { hasOwn };
6
7
  export declare const columnsFlatMap: (columns: IColumn[]) => IColumn[];
7
8
  export declare const createFilterColumns: (columns: IColumn[]) => IColumn[];
@@ -21,7 +22,6 @@ export declare const getNodeOffset: (el: Nullable<HTMLElement>, container: HTMLE
21
22
  }) => any;
22
23
  export declare const parseHeight: (height: number | string) => Nullable<number | string>;
23
24
  export declare const difference: <T extends AnyObject<any>>(obj: T, base: T) => T;
24
- export declare const isArrayContain: (targetArr: unknown[], arr: unknown[]) => boolean;
25
25
  export declare const getCellValue: (record: IRecord, dataIndex: string) => any;
26
26
  export declare const setCellValue: (record: IRecord, dataIndex: string, val: unknown, precision?: number) => void;
27
27
  export declare const getSplitValue: (record: IRecord, key: string) => string;
@@ -33,7 +33,8 @@ export declare const stringToNumber: (input: string) => number | '';
33
33
  export declare const getDate: (dateString: string | undefined, format: string) => dayjs.Dayjs | null;
34
34
  export declare const formatDate: (date: Dayjs | null, format: string) => string;
35
35
  export declare const createUidKey: (prefix?: string) => string;
36
- export declare const getVNodeText: <T extends string | number>(val: JSXElement | T) => T[];
36
+ export declare const getTextFromVNode: <T extends string | number>(node: React.ReactNode | T) => T[];
37
+ export declare const getTHeadTitle: (title: React.ReactNode | string) => string;
37
38
  export declare const getGroupValidData: (list: IRecord[]) => IRecord<any>[];
38
39
  export declare const createOrderBy: (sorter: ISorter) => string;
39
40
  export declare const createWhereSQL: (filters: any, showType?: boolean) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcp-design-react",
3
- "version": "1.8.28",
3
+ "version": "1.8.30",
4
4
  "description": "A Component Library for React",
5
5
  "keywords": [
6
6
  "React",
@@ -98,7 +98,7 @@
98
98
  "@typescript-eslint/eslint-plugin": "^5.30.0",
99
99
  "@typescript-eslint/parser": "^5.30.0",
100
100
  "autoprefixer": "^10.4.14",
101
- "babel-loader": "^9.1.0",
101
+ "babel-loader": "^9.1.2",
102
102
  "core-js": "^3.32.0",
103
103
  "cp-cli": "^2.0.0",
104
104
  "cross-env": "^7.0.3",
@@ -129,9 +129,9 @@
129
129
  "style-loader": "^3.3.4",
130
130
  "ts-loader": "^9.4.4",
131
131
  "typescript": "^4.9.5",
132
- "webpack": "^5.88.2",
132
+ "webpack": "^5.91.0",
133
133
  "webpack-cli": "^5.1.4",
134
- "webpack-dev-server": "^4.15.1",
134
+ "webpack-dev-server": "^4.15.2",
135
135
  "webpack-node-externals": "^3.0.0"
136
136
  },
137
137
  "engines": {