xph-crud 0.3.3 → 0.3.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.
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { ICurCellFuncProps, IMainProps } from '../types';
3
+
4
+ declare const Copy: (Comp: React.JSXElementConstructor<any>, curCellFuncProps: ICurCellFuncProps<{}, {}, "copy">, mainProps: IMainProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default Copy;
@@ -12,5 +12,9 @@ declare const cellComponentMap: {
12
12
  tag: {
13
13
  Comp: (Comp: import('react').JSXElementConstructor<any>, curCellFuncProps: import('../types').ICurCellFuncProps<{}, {}, "tag">, mainProps: import('../types').IMainProps) => import("react/jsx-runtime").JSX.Element;
14
14
  };
15
+ /** 复制 */
16
+ copy: {
17
+ Comp: (Comp: import('react').JSXElementConstructor<any>, curCellFuncProps: import('../types').ICurCellFuncProps<{}, {}, "copy">, mainProps: import('../types').IMainProps) => import("react/jsx-runtime").JSX.Element;
18
+ };
15
19
  };
16
20
  export { cellComponentMap };
@@ -28,6 +28,20 @@ export type TCellComponentPropsMap<CellFuncExtendPropsMap extends TXphExtendComp
28
28
  };
29
29
  }>;
30
30
  };
31
+ copy: {
32
+ /**
33
+ * 复制的文本
34
+ */
35
+ text?: string | ((record: any) => string);
36
+ /**
37
+ * 大小
38
+ */
39
+ size?: "small" | "default" | "large";
40
+ /**
41
+ * 自定义点击事件
42
+ */
43
+ onClick?: (record: any) => void;
44
+ };
31
45
  } & CellFuncExtendPropsMap;
32
46
  type Without<T, K> = {
33
47
  [P in Exclude<keyof T, K>]?: never;
@@ -18,3 +18,5 @@ export { default as useExtendTable } from './useExtendTable';
18
18
  export * from './useExtendTable';
19
19
  export { default as useCrudFormDialog } from './useCrudFormDialog';
20
20
  export * from './useCrudFormDialog';
21
+ export { default as useCopyToClipboard } from './useCopyToClipboard';
22
+ export * from './useCopyToClipboard';
@@ -0,0 +1,6 @@
1
+ export declare function copyTextToClipboard(input: string, { target, }?: {
2
+ target?: HTMLElement;
3
+ }): boolean;
4
+ export default function useCopyToClipboard(): {
5
+ copy: (value: string) => boolean;
6
+ };
package/package.json CHANGED
@@ -1,63 +1,63 @@
1
- {
2
- "name": "xph-crud",
3
- "version": "0.3.3",
4
- "type": "module",
5
- "main": "dist/index.js",
6
- "types": "dist/types/index.d.ts",
7
- "description": "This is a configurable component library based on React",
8
- "keywords": [
9
- "react",
10
- "ant-design",
11
- "configurable-component"
12
- ],
13
- "scripts": {
14
- "examples": "vite",
15
- "build": "tsc && vite build",
16
- "docs": "cd docs && npm run start",
17
- "build:docs": "cd docs && npm run build",
18
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
19
- },
20
- "files": [
21
- "dist",
22
- "README.md"
23
- ],
24
- "peerDependencies": {
25
- "@ant-design/icons": "5.3.2",
26
- "antd": "^5.14.2",
27
- "react": "^18.2.0",
28
- "react-dom": "^18.2.0",
29
- "dayjs": "^1.11.13"
30
- },
31
- "dependencies": {
32
- "lodash-es": "^4.17.21"
33
- },
34
- "devDependencies": {
35
- "@types/lodash-es": "^4.17.12",
36
- "@types/node": "^20.14.2",
37
- "@types/react": "^18.2.66",
38
- "@types/react-dom": "^18.2.22",
39
- "@typescript-eslint/eslint-plugin": "^7.2.0",
40
- "@typescript-eslint/parser": "^7.2.0",
41
- "@vitejs/plugin-react": "^4.2.1",
42
- "eslint": "^8.57.0",
43
- "eslint-plugin-react-hooks": "^4.6.0",
44
- "eslint-plugin-react-refresh": "^0.4.6",
45
- "typescript": "^5.2.2",
46
- "vite": "^5.2.0",
47
- "vite-plugin-dts": "^3.9.1"
48
- },
49
- "license": "ISC",
50
- "author": "XiaoPiHong",
51
- "homepage": "https://github.com/XiaoPiHong/xph-crud",
52
- "bugs": {
53
- "url": "https://github.com/XiaoPiHong/xph-crud/issues",
54
- "email": "260094892@qq.com"
55
- },
56
- "repository": {
57
- "type": "git",
58
- "url": "https://github.com/XiaoPiHong/xph-crud.git"
59
- },
60
- "engines": {
61
- "node": ">=16"
62
- }
63
- }
1
+ {
2
+ "name": "xph-crud",
3
+ "version": "0.3.5",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/types/index.d.ts",
7
+ "description": "This is a configurable component library based on React",
8
+ "keywords": [
9
+ "react",
10
+ "ant-design",
11
+ "configurable-component"
12
+ ],
13
+ "files": [
14
+ "dist",
15
+ "README.md"
16
+ ],
17
+ "peerDependencies": {
18
+ "@ant-design/icons": "5.3.2",
19
+ "antd": "^5.14.2",
20
+ "react": "^18.2.0",
21
+ "react-dom": "^18.2.0",
22
+ "dayjs": "^1.11.13"
23
+ },
24
+ "dependencies": {
25
+ "lodash-es": "^4.17.21"
26
+ },
27
+ "devDependencies": {
28
+ "@types/lodash-es": "^4.17.12",
29
+ "@types/node": "^20.14.2",
30
+ "@types/react": "^18.2.66",
31
+ "@types/react-dom": "^18.2.22",
32
+ "@typescript-eslint/eslint-plugin": "^7.2.0",
33
+ "@typescript-eslint/parser": "^7.2.0",
34
+ "@vitejs/plugin-react": "^4.2.1",
35
+ "eslint": "^8.57.0",
36
+ "eslint-plugin-react-hooks": "^4.6.0",
37
+ "eslint-plugin-react-refresh": "^0.4.6",
38
+ "typescript": "^5.2.2",
39
+ "vite": "^5.2.0",
40
+ "vite-plugin-dts": "^3.9.1"
41
+ },
42
+ "license": "ISC",
43
+ "author": "XiaoPiHong",
44
+ "homepage": "https://github.com/XiaoPiHong/xph-crud",
45
+ "bugs": {
46
+ "url": "https://github.com/XiaoPiHong/xph-crud/issues",
47
+ "email": "260094892@qq.com"
48
+ },
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "https://github.com/XiaoPiHong/xph-crud.git"
52
+ },
53
+ "engines": {
54
+ "node": ">=16"
55
+ },
56
+ "scripts": {
57
+ "examples": "vite",
58
+ "build": "tsc && vite build",
59
+ "docs": "cd docs && npm run start",
60
+ "build:docs": "cd docs && npm run build",
61
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
62
+ }
63
+ }