@visactor/react-vtable 1.22.13-alpha.1 → 1.22.13-alpha.4
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/cjs/containers/withContainer.d.ts +1 -1
- package/cjs/containers/withContainer.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/tables/base-table.d.ts +1 -2
- package/cjs/tables/list-table-simple.d.ts +1 -3
- package/cjs/tables/list-table.d.ts +1 -3
- package/cjs/tables/pivot-chart.d.ts +1 -3
- package/cjs/tables/pivot-table-simple.d.ts +1 -3
- package/cjs/tables/pivot-table.d.ts +1 -3
- package/dist/react-vtable.js +2 -2
- package/dist/react-vtable.min.js +2 -2
- package/es/containers/withContainer.d.ts +1 -1
- package/es/containers/withContainer.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/tables/base-table.d.ts +1 -2
- package/es/tables/list-table-simple.d.ts +1 -3
- package/es/tables/list-table.d.ts +1 -3
- package/es/tables/pivot-chart.d.ts +1 -3
- package/es/tables/pivot-table-simple.d.ts +1 -3
- package/es/tables/pivot-table.d.ts +1 -3
- package/package.json +3 -3
|
@@ -5,4 +5,4 @@ export interface ContainerProps {
|
|
|
5
5
|
width?: number | string;
|
|
6
6
|
height?: number | string;
|
|
7
7
|
}
|
|
8
|
-
export default function withContainer<Props extends ContainerProps, CompProps>(Comp: typeof React.Component<any, CompProps>, name?: string, getProps?: (props: any) => CompProps): React.ForwardRefExoticComponent<
|
|
8
|
+
export default function withContainer<Props extends ContainerProps, CompProps>(Comp: typeof React.Component<any, CompProps>, name?: string, getProps?: (props: any) => CompProps): React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["containers/withContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO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AAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,OAAqB,CAAC,EAAI,CAC9G,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACG,CACP,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC;IACpC,OAAO,GAAG,CAAC;AACb,CAAC","file":"withContainer.js","sourcesContent":["import React, { useRef, useState, useLayoutEffect } from 'react';\n\nexport interface ContainerProps {\n style?: React.CSSProperties;\n className?: string;\n width?: number | string;\n height?: number | string;\n}\n\nexport default function withContainer<Props extends ContainerProps, CompProps>(\n Comp: typeof React.Component<any, CompProps>,\n name = 'TableContainer',\n getProps?: (props: any) => CompProps\n) {\n const Cls = React.forwardRef<any, any>((props: any, ref) => {\n const container = useRef();\n const [inited, setInited] = useState(false);\n const { className, style, width, ...options } = props;\n\n useLayoutEffect(() => {\n setInited(true);\n }, []);\n\n return (\n <div\n ref={container}\n className={className}\n style={{\n position: 'relative',\n height: props.height || '100%',\n width: props.width || '100%',\n ...style\n }}\n >\n {inited ? (\n <Comp ref={ref} container={container.current} {...(getProps ? getProps(options) : (options as CompProps))} />\n ) : (\n <></>\n )}\n </div>\n );\n });\n Cls.displayName = name || Comp.name;\n return Cls;\n}\n"]}
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.22.13-alpha.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.22.13-alpha.4\";\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ContainerProps } from '../containers/withContainer';
|
|
3
2
|
import type { EventsProps } from '../eventsUtils';
|
|
4
3
|
import { VTableReactAttributePlugin } from '../table-components/custom/vtable-react-attribute-plugin';
|
|
5
4
|
import type { ListTable, PivotTable, PivotChart, ListTableConstructorOptions, PivotTableConstructorOptions, PivotChartConstructorOptions } from '@visactor/vtable';
|
|
@@ -21,5 +20,5 @@ export type BaseTableProps = EventsProps & IOption & {
|
|
|
21
20
|
onError?: (err: Error) => void;
|
|
22
21
|
};
|
|
23
22
|
type Props = React.PropsWithChildren<BaseTableProps>;
|
|
24
|
-
export declare const createTable: <T extends Props>(componentName: string, defaultProps?: Partial<T>, callback?: (props: T) => T) => React.ForwardRefExoticComponent<
|
|
23
|
+
export declare const createTable: <T extends Props>(componentName: string, defaultProps?: Partial<T>, callback?: (props: T) => T) => React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
25
24
|
export {};
|
|
@@ -3,6 +3,4 @@ import type { ListTableConstructorOptions } from '@visactor/vtable';
|
|
|
3
3
|
import type { BaseTableProps } from './base-table';
|
|
4
4
|
export interface ListTableProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<ListTableConstructorOptions, 'container'> {
|
|
5
5
|
}
|
|
6
|
-
export declare const ListTableSimple: React.ForwardRefExoticComponent<
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
6
|
+
export declare const ListTableSimple: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
@@ -3,6 +3,4 @@ import type { ListTableConstructorOptions } from '@visactor/vtable';
|
|
|
3
3
|
import type { BaseTableProps } from './base-table';
|
|
4
4
|
export interface ListTableProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<ListTableConstructorOptions, 'container'> {
|
|
5
5
|
}
|
|
6
|
-
export declare const ListTable: React.ForwardRefExoticComponent<
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
6
|
+
export declare const ListTable: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
@@ -6,8 +6,6 @@ interface AnyRecords {
|
|
|
6
6
|
}
|
|
7
7
|
export interface PivotChartProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<PivotChartConstructorOptions, 'container' | 'records'>, AnyRecords {
|
|
8
8
|
}
|
|
9
|
-
export declare const PivotChart: React.ForwardRefExoticComponent<
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
9
|
+
export declare const PivotChart: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
12
10
|
export declare function registerChartModule(name: string, chart: any): void;
|
|
13
11
|
export {};
|
|
@@ -3,6 +3,4 @@ import type { PivotTableConstructorOptions } from '@visactor/vtable';
|
|
|
3
3
|
import type { BaseTableProps } from './base-table';
|
|
4
4
|
export interface PivotTableProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<PivotTableConstructorOptions, 'container'> {
|
|
5
5
|
}
|
|
6
|
-
export declare const PivotTableSimple: React.ForwardRefExoticComponent<
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
6
|
+
export declare const PivotTableSimple: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
@@ -3,6 +3,4 @@ import type { PivotTableConstructorOptions } from '@visactor/vtable';
|
|
|
3
3
|
import type { BaseTableProps } from './base-table';
|
|
4
4
|
export interface PivotTableProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<PivotTableConstructorOptions, 'container'> {
|
|
5
5
|
}
|
|
6
|
-
export declare const PivotTable: React.ForwardRefExoticComponent<
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
6
|
+
export declare const PivotTable: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/react-vtable",
|
|
3
|
-
"version": "1.22.13-alpha.
|
|
3
|
+
"version": "1.22.13-alpha.4",
|
|
4
4
|
"description": "The react version of VTable",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@visactor/vtable": "1.22.13-alpha.
|
|
46
|
+
"@visactor/vtable": "1.22.13-alpha.4",
|
|
47
47
|
"@visactor/vutils": "~1.0.17",
|
|
48
48
|
"react-is": "^18.2.0",
|
|
49
49
|
"react-reconciler": "0.29.2"
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"@types/react-is": "^17.0.3",
|
|
94
94
|
"@arco-design/web-react": "2.60.2",
|
|
95
95
|
"@types/react-reconciler": "0.28.8",
|
|
96
|
-
"@internal/eslint-config": "0.0.1",
|
|
97
96
|
"@internal/bundler": "0.0.1",
|
|
97
|
+
"@internal/eslint-config": "0.0.1",
|
|
98
98
|
"@internal/ts-config": "0.0.1"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|