k-react-vtable 1.0.32 → 1.0.34

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 (39) hide show
  1. package/cjs/containers/withContainer.d.ts +1 -1
  2. package/cjs/containers/withContainer.js +2 -1
  3. package/cjs/containers/withContainer.js.map +1 -1
  4. package/cjs/context/table.js +1 -2
  5. package/cjs/index.d.ts +1 -1
  6. package/cjs/index.js +1 -1
  7. package/cjs/index.js.map +1 -1
  8. package/cjs/tables/base-table.d.ts +2 -1
  9. package/cjs/tables/list-table-simple.d.ts +5 -4
  10. package/cjs/tables/list-table-simple.js.map +1 -1
  11. package/cjs/tables/list-table.d.ts +5 -4
  12. package/cjs/tables/list-table.js.map +1 -1
  13. package/cjs/tables/pivot-chart.d.ts +5 -3
  14. package/cjs/tables/pivot-chart.js.map +1 -1
  15. package/cjs/tables/pivot-table-simple.d.ts +5 -4
  16. package/cjs/tables/pivot-table-simple.js.map +1 -1
  17. package/cjs/tables/pivot-table.d.ts +5 -4
  18. package/cjs/tables/pivot-table.js.map +1 -1
  19. package/dist/react-vtable.js +19883 -20143
  20. package/dist/react-vtable.min.js +2 -2
  21. package/es/containers/withContainer.d.ts +1 -1
  22. package/es/containers/withContainer.js +2 -1
  23. package/es/containers/withContainer.js.map +1 -1
  24. package/es/context/table.js +1 -2
  25. package/es/index.d.ts +1 -1
  26. package/es/index.js +1 -1
  27. package/es/index.js.map +1 -1
  28. package/es/tables/base-table.d.ts +2 -1
  29. package/es/tables/list-table-simple.d.ts +5 -4
  30. package/es/tables/list-table-simple.js.map +1 -1
  31. package/es/tables/list-table.d.ts +5 -4
  32. package/es/tables/list-table.js.map +1 -1
  33. package/es/tables/pivot-chart.d.ts +5 -3
  34. package/es/tables/pivot-chart.js.map +1 -1
  35. package/es/tables/pivot-table-simple.d.ts +5 -4
  36. package/es/tables/pivot-table-simple.js.map +1 -1
  37. package/es/tables/pivot-table.d.ts +5 -4
  38. package/es/tables/pivot-table.js.map +1 -1
  39. package/package.json +2 -2
@@ -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<Omit<any, "ref"> & React.RefAttributes<any>>;
8
+ export default function withContainer<Props extends ContainerProps, CompProps>(Comp: typeof React.Component<any, CompProps>, name?: string, getProps?: (props: any) => CompProps): React.ForwardRefExoticComponent<React.PropsWithoutRef<CompProps & Props> & React.RefAttributes<any>>;
@@ -29,4 +29,5 @@ export default function withContainer(Comp, name = "TableContainer", getProps) {
29
29
  }, getProps ? getProps(options) : options)) : React.createElement(React.Fragment, null));
30
30
  }));
31
31
  return Cls.displayName = name || Comp.name, Cls;
32
- }
32
+ }
33
+ //# sourceMappingURL=withContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["containers/withContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AASjE,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAA4C,EAC5C,IAAI,GAAG,gBAAgB,EACvB,QAAoC;IAEpC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAW,CAAC,KAAU,EAAE,GAAG,EAAE,EAAE;QACzD,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAiB,KAAK,EAAjB,OAAO,UAAK,KAAK,EAA/C,+BAAuC,CAAQ,CAAC;QAEtD,eAAe,CAAC,GAAG,EAAE;YACnB,SAAS,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,CACL,6BACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,SAAS,EACpB,KAAK,kBACH,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,MAAM,EAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,MAAM,IACzB,KAAK,KAGT,MAAM,CAAC,CAAC,CAAC,CACR,oBAAC,IAAI,kBAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,OAAO,IAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,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"]}
1
+ {"version":3,"sources":["containers/withContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AASjE,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAA4C,EAC5C,IAAI,GAAG,gBAAgB,EACvB,QAAoC;IAEpC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAyB,CAAC,KAAwB,EAAE,GAAG,EAAE,EAAE;QACrF,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAiB,KAAK,EAAjB,OAAO,UAAK,KAAK,EAA/C,+BAAuC,CAAQ,CAAC;QAEtD,eAAe,CAAC,GAAG,EAAE;YACnB,SAAS,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,CACL,6BACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,SAAS,EACpB,KAAK,kBACH,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,MAAM,EAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,MAAM,IACzB,KAAK,KAGT,MAAM,CAAC,CAAC,CAAC,CACR,oBAAC,IAAI,kBAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,OAAO,IAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,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, CompProps & Props>((props: CompProps & Props, 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"]}
@@ -12,5 +12,4 @@ export function withTableInstance(Component) {
12
12
  return Com.displayName = Component.name, Com;
13
13
  }
14
14
 
15
- export default TableContext;
16
- //# sourceMappingURL=table.js.map
15
+ export default TableContext;
package/es/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './tables';
2
2
  export * from './table-components';
3
3
  export * from './components';
4
- export declare const version = "1.0.32";
4
+ export declare const version = "1.0.34";
package/es/index.js CHANGED
@@ -4,5 +4,5 @@ export * from "./table-components";
4
4
 
5
5
  export * from "./components";
6
6
 
7
- export const version = "1.0.32";
7
+ export const version = "1.0.34";
8
8
  //# sourceMappingURL=index.js.map
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,QAAQ,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.0.32\";\n"]}
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,QAAQ,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.0.34\";\n"]}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { ContainerProps } from '../containers/withContainer';
2
3
  import type { EventsProps } from '../eventsUtils';
3
4
  import { VTableReactAttributePlugin } from '../table-components/custom/vtable-react-attribute-plugin';
4
5
  import type { ListTable, PivotTable, PivotChart, ListTableConstructorOptions, PivotTableConstructorOptions, PivotChartConstructorOptions } from 'k-vtable';
@@ -20,5 +21,5 @@ export type BaseTableProps = EventsProps & IOption & {
20
21
  onError?: (err: Error) => void;
21
22
  };
22
23
  type Props = React.PropsWithChildren<BaseTableProps>;
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>>;
24
+ export declare const createTable: <T extends Props>(componentName: string, defaultProps?: Partial<T>, callback?: (props: T) => T) => React.ForwardRefExoticComponent<React.PropsWithoutRef<T & ContainerProps> & React.RefAttributes<any>>;
24
25
  export {};
@@ -1,7 +1,8 @@
1
1
  import type React from 'react';
2
2
  import type { ListTableConstructorOptions } from 'k-vtable';
3
3
  import type { BaseTableProps } from './base-table';
4
- type Override<T, U> = Omit<T, keyof U> & U;
5
- export type ListTableProps = Override<Omit<BaseTableProps, 'records' | 'container'>, Omit<ListTableConstructorOptions, 'container'>>;
6
- export declare const ListTableSimple: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
7
- export {};
4
+ export interface ListTableProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<ListTableConstructorOptions, 'container'> {
5
+ }
6
+ export declare const ListTableSimple: React.ForwardRefExoticComponent<ListTableProps & {
7
+ children?: React.ReactNode;
8
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["tables/list-table-simple.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAU3C,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAA0C,WAAW,EAAE;IAC/F,IAAI,EAAE,YAAY;IAClB,kBAAkB,EAAE,qBAA4B;CACjD,CAAC,CAAC","file":"list-table-simple.js","sourcesContent":["import type React from 'react';\nimport type { ListTableConstructorOptions } from 'k-vtable';\nimport { ListTableSimple as ListTableConstrouctor } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\n// 类型覆盖工具:让 ListTableConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性\ntype Override<T, U> = Omit<T, keyof U> & U;\n\nexport type ListTableProps = Override<\n Omit<BaseTableProps, 'records' | 'container'>,\n Omit<ListTableConstructorOptions, 'container'>\n>;\n\nexport const ListTableSimple = createTable<React.PropsWithChildren<ListTableProps>>('ListTable', {\n type: 'list-table',\n vtableConstrouctor: ListTableConstrouctor as any\n});\n"]}
1
+ {"version":3,"sources":["tables/list-table-simple.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAA0C,WAAW,EAAE;IAC/F,IAAI,EAAE,YAAY;IAClB,kBAAkB,EAAE,qBAA4B;CACjD,CAAC,CAAC","file":"list-table-simple.js","sourcesContent":["import type React from 'react';\nimport type { ListTableConstructorOptions } from 'k-vtable';\nimport { ListTableSimple as ListTableConstrouctor } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\nexport interface ListTableProps\n extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,\n Omit<ListTableConstructorOptions, 'container'> {}\n\nexport const ListTableSimple = createTable<React.PropsWithChildren<ListTableProps>>('ListTable', {\n type: 'list-table',\n vtableConstrouctor: ListTableConstrouctor as any\n});\n"]}
@@ -1,7 +1,8 @@
1
1
  import type React from 'react';
2
2
  import type { ListTableConstructorOptions } from 'k-vtable';
3
3
  import type { BaseTableProps } from './base-table';
4
- type Override<T, U> = Omit<T, keyof U> & U;
5
- export type ListTableProps = Override<Omit<BaseTableProps, 'records' | 'container'>, Omit<ListTableConstructorOptions, 'container'>>;
6
- export declare const ListTable: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
7
- export {};
4
+ export interface ListTableProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<ListTableConstructorOptions, 'container'> {
5
+ }
6
+ export declare const ListTable: React.ForwardRefExoticComponent<ListTableProps & {
7
+ children?: React.ReactNode;
8
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["tables/list-table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAU3C,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAA0C,WAAW,EAAE;IACzF,IAAI,EAAE,YAAY;IAClB,kBAAkB,EAAE,qBAA4B;CACjD,CAAC,CAAC","file":"list-table.js","sourcesContent":["import type React from 'react';\nimport type { ListTableConstructorOptions } from 'k-vtable';\nimport { ListTable as ListTableConstrouctor } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\n// 类型覆盖工具:让 ListTableConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性\ntype Override<T, U> = Omit<T, keyof U> & U;\n\nexport type ListTableProps = Override<\n Omit<BaseTableProps, 'records' | 'container'>,\n Omit<ListTableConstructorOptions, 'container'>\n>;\n\nexport const ListTable = createTable<React.PropsWithChildren<ListTableProps>>('ListTable', {\n type: 'list-table',\n vtableConstrouctor: ListTableConstrouctor as any\n});\n"]}
1
+ {"version":3,"sources":["tables/list-table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAA0C,WAAW,EAAE;IACzF,IAAI,EAAE,YAAY;IAClB,kBAAkB,EAAE,qBAA4B;CACjD,CAAC,CAAC","file":"list-table.js","sourcesContent":["import type React from 'react';\nimport type { ListTableConstructorOptions } from 'k-vtable';\nimport { ListTable as ListTableConstrouctor } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\nexport interface ListTableProps\n extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,\n Omit<ListTableConstructorOptions, 'container'> {}\n\nexport const ListTable = createTable<React.PropsWithChildren<ListTableProps>>('ListTable', {\n type: 'list-table',\n vtableConstrouctor: ListTableConstrouctor as any\n});\n"]}
@@ -1,11 +1,13 @@
1
1
  import type React from 'react';
2
2
  import { type PivotChartConstructorOptions } from 'k-vtable';
3
3
  import type { BaseTableProps } from './base-table';
4
- type Override<T, U> = Omit<T, keyof U> & U;
5
4
  interface AnyRecords {
6
5
  records: Record<string, unknown>[];
7
6
  }
8
- export type PivotChartProps = Override<Omit<BaseTableProps, 'records' | 'container'>, Omit<PivotChartConstructorOptions, 'container' | 'records'>> & AnyRecords;
9
- export declare const PivotChart: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
7
+ export interface PivotChartProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<PivotChartConstructorOptions, 'container' | 'records'>, AnyRecords {
8
+ }
9
+ export declare const PivotChart: React.ForwardRefExoticComponent<PivotChartProps & {
10
+ children?: React.ReactNode;
11
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
10
12
  export declare function registerChartModule(name: string, chart: any): void;
11
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"sources":["tables/pivot-chart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,UAAU,IAAI,sBAAsB,EAAqC,MAAM,UAAU,CAAC;AAE7G,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAe3C,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA2C,YAAY,EAAE;IAC5F,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,sBAA6B;CAClD,CAAC,CAAC;AAEH,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,KAAU;IAC1D,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACpC,CAAC","file":"pivot-chart.js","sourcesContent":["import type React from 'react';\nimport { register, PivotChart as PivotChartConstrouctor, type PivotChartConstructorOptions } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\n// 类型覆盖工具:让 PivotChartConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性\ntype Override<T, U> = Omit<T, keyof U> & U;\n\ninterface AnyRecords {\n records: Record<string, unknown>[];\n}\n\nexport type PivotChartProps = Override<\n Omit<BaseTableProps, 'records' | 'container'>,\n Omit<PivotChartConstructorOptions, 'container' | 'records'>\n> &\n AnyRecords;\n\nexport const PivotChart = createTable<React.PropsWithChildren<PivotChartProps>>('PivotChart', {\n type: 'pivot-chart',\n vtableConstrouctor: PivotChartConstrouctor as any\n});\n\nexport function registerChartModule(name: string, chart: any) {\n register.chartModule(name, chart);\n}\n"]}
1
+ {"version":3,"sources":["tables/pivot-chart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,UAAU,IAAI,sBAAsB,EAAqC,MAAM,UAAU,CAAC;AAE7G,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAW3C,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA2C,YAAY,EAAE;IAC5F,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,sBAA6B;CAClD,CAAC,CAAC;AAEH,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,KAAU;IAC1D,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACpC,CAAC","file":"pivot-chart.js","sourcesContent":["import type React from 'react';\nimport { register, PivotChart as PivotChartConstrouctor, type PivotChartConstructorOptions } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\ninterface AnyRecords {\n records: Record<string, unknown>[];\n}\n\nexport interface PivotChartProps\n extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,\n Omit<PivotChartConstructorOptions, 'container' | 'records'>,\n AnyRecords {}\n\nexport const PivotChart = createTable<React.PropsWithChildren<PivotChartProps>>('PivotChart', {\n type: 'pivot-chart',\n vtableConstrouctor: PivotChartConstrouctor as any\n});\n\nexport function registerChartModule(name: string, chart: any) {\n register.chartModule(name, chart);\n}\n"]}
@@ -1,7 +1,8 @@
1
1
  import type React from 'react';
2
2
  import type { PivotTableConstructorOptions } from 'k-vtable';
3
3
  import type { BaseTableProps } from './base-table';
4
- type Override<T, U> = Omit<T, keyof U> & U;
5
- export type PivotTableProps = Override<Omit<BaseTableProps, 'records' | 'container'>, Omit<PivotTableConstructorOptions, 'container'>>;
6
- export declare const PivotTableSimple: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
7
- export {};
4
+ export interface PivotTableProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<PivotTableConstructorOptions, 'container'> {
5
+ }
6
+ export declare const PivotTableSimple: React.ForwardRefExoticComponent<PivotTableProps & {
7
+ children?: React.ReactNode;
8
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["tables/pivot-table-simple.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,IAAI,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAU3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAA2C,YAAY,EAAE;IAClG,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,sBAA6B;CAClD,CAAC,CAAC","file":"pivot-table-simple.js","sourcesContent":["import type React from 'react';\nimport type { PivotTableConstructorOptions } from 'k-vtable';\nimport { PivotTableSimple as PivotTableConstrouctor } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\n// 类型覆盖工具:让 PivotTableConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性\ntype Override<T, U> = Omit<T, keyof U> & U;\n\nexport type PivotTableProps = Override<\n Omit<BaseTableProps, 'records' | 'container'>,\n Omit<PivotTableConstructorOptions, 'container'>\n>;\n\nexport const PivotTableSimple = createTable<React.PropsWithChildren<PivotTableProps>>('PivotTable', {\n type: 'pivot-table',\n vtableConstrouctor: PivotTableConstrouctor as any\n});\n"]}
1
+ {"version":3,"sources":["tables/pivot-table-simple.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,IAAI,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAA2C,YAAY,EAAE;IAClG,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,sBAA6B;CAClD,CAAC,CAAC","file":"pivot-table-simple.js","sourcesContent":["import type React from 'react';\nimport type { PivotTableConstructorOptions } from 'k-vtable';\nimport { PivotTableSimple as PivotTableConstrouctor } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\nexport interface PivotTableProps\n extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,\n Omit<PivotTableConstructorOptions, 'container'> {}\n\nexport const PivotTableSimple = createTable<React.PropsWithChildren<PivotTableProps>>('PivotTable', {\n type: 'pivot-table',\n vtableConstrouctor: PivotTableConstrouctor as any\n});\n"]}
@@ -1,7 +1,8 @@
1
1
  import type React from 'react';
2
2
  import type { PivotTableConstructorOptions } from 'k-vtable';
3
3
  import type { BaseTableProps } from './base-table';
4
- type Override<T, U> = Omit<T, keyof U> & U;
5
- export type PivotTableProps = Override<Omit<BaseTableProps, 'records' | 'container'>, Omit<PivotTableConstructorOptions, 'container'>>;
6
- export declare const PivotTable: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
7
- export {};
4
+ export interface PivotTableProps extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>, Omit<PivotTableConstructorOptions, 'container'> {
5
+ }
6
+ export declare const PivotTable: React.ForwardRefExoticComponent<PivotTableProps & {
7
+ children?: React.ReactNode;
8
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["tables/pivot-table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,IAAI,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAU3C,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA2C,YAAY,EAAE;IAC5F,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,sBAA6B;CAClD,CAAC,CAAC","file":"pivot-table.js","sourcesContent":["import type React from 'react';\nimport type { PivotTableConstructorOptions } from 'k-vtable';\nimport { PivotTable as PivotTableConstrouctor } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\n// 类型覆盖工具:让 PivotTableConstructorOptions 中的属性覆盖 BaseTableProps 中的同名属性\ntype Override<T, U> = Omit<T, keyof U> & U;\n\nexport type PivotTableProps = Override<\n Omit<BaseTableProps, 'records' | 'container'>,\n Omit<PivotTableConstructorOptions, 'container'>\n>;\n\nexport const PivotTable = createTable<React.PropsWithChildren<PivotTableProps>>('PivotTable', {\n type: 'pivot-table',\n vtableConstrouctor: PivotTableConstrouctor as any\n});\n"]}
1
+ {"version":3,"sources":["tables/pivot-table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,IAAI,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA2C,YAAY,EAAE;IAC5F,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,sBAA6B;CAClD,CAAC,CAAC","file":"pivot-table.js","sourcesContent":["import type React from 'react';\nimport type { PivotTableConstructorOptions } from 'k-vtable';\nimport { PivotTable as PivotTableConstrouctor } from 'k-vtable';\nimport type { BaseTableProps } from './base-table';\nimport { createTable } from './base-table';\n\nexport interface PivotTableProps\n extends Omit<BaseTableProps, 'records' | 'columnWidthConfig' | 'columns' | 'dragOrder' | 'resize'>,\n Omit<PivotTableConstructorOptions, 'container'> {}\n\nexport const PivotTable = createTable<React.PropsWithChildren<PivotTableProps>>('PivotTable', {\n type: 'pivot-table',\n vtableConstrouctor: PivotTableConstrouctor as any\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k-react-vtable",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "The react version of VTable",
5
5
  "keywords": [
6
6
  "react",
@@ -50,7 +50,7 @@
50
50
  "access": "public"
51
51
  },
52
52
  "dependencies": {
53
- "k-vtable": "1.0.32",
53
+ "k-vtable": "1.0.34",
54
54
  "@visactor/vutils": "~1.0.17",
55
55
  "react-is": "^18.2.0",
56
56
  "react-reconciler": "0.29.2"