@hw-component/table 0.0.9-beta-v13 → 0.0.9-beta-v18

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 (52) hide show
  1. package/es/HTableBody/AlertMsg.d.ts +1 -1
  2. package/es/HTableBody/hooks.d.ts +1 -2
  3. package/es/HTableBody/index.d.ts +1 -3
  4. package/es/HTableFooter/index.d.ts +1 -3
  5. package/es/{src/components/HTableHeader → HTableHeader}/modal.d.ts +2 -2
  6. package/es/HTablePagination/index.d.ts +1 -2
  7. package/es/TableConfig.d.ts +1 -1
  8. package/es/{src/components/context.d.ts → context.d.ts} +1 -2
  9. package/{lib/src/components → es}/index.d.ts +1 -0
  10. package/lib/HTableBody/AlertMsg.d.ts +1 -1
  11. package/lib/HTableBody/hooks.d.ts +1 -2
  12. package/lib/HTableBody/index.d.ts +1 -3
  13. package/lib/HTableFooter/index.d.ts +1 -3
  14. package/lib/{src/components/HTableHeader → HTableHeader}/modal.d.ts +2 -2
  15. package/lib/HTablePagination/index.d.ts +1 -2
  16. package/lib/TableConfig.d.ts +1 -1
  17. package/lib/{src/components/context.d.ts → context.d.ts} +1 -2
  18. package/{es/src/components → lib}/index.d.ts +1 -0
  19. package/package.json +1 -1
  20. package/src/components/HTableBody/AlertMsg.tsx +1 -1
  21. package/src/components/HTableBody/HeaderTitle/index.tsx +1 -1
  22. package/src/components/HTableBody/hooks.tsx +1 -3
  23. package/src/components/HTableBody/index.tsx +1 -3
  24. package/src/components/HTableFooter/index.tsx +1 -3
  25. package/src/components/HTableHeader/hooks.tsx +1 -1
  26. package/src/components/HTableHeader/modal.ts +2 -2
  27. package/src/components/HTablePagination/index.tsx +1 -2
  28. package/src/components/ModalTable/hooks.ts +1 -1
  29. package/src/components/ModalTable/index.tsx +1 -1
  30. package/src/components/Table.tsx +1 -1
  31. package/src/components/TableConfig.tsx +1 -1
  32. package/src/components/context.ts +1 -2
  33. package/src/components/hooks/useHTable.tsx +1 -2
  34. package/src/components/index.tsx +1 -0
  35. package/src/pages/ModalTable/index.tsx +1 -1
  36. package/src/pages/Table/index.tsx +1 -1
  37. package/src/pages/TableCustomize/index.tsx +1 -1
  38. package/tsconfig.json +2 -2
  39. /package/es/{src/components/HTableHeader → HTableHeader}/defaultFormRender.d.ts +0 -0
  40. /package/es/{src/components/HTableHeader → HTableHeader}/defaultSubComponent.d.ts +0 -0
  41. /package/es/{src/components/HTableHeader → HTableHeader}/hooks.d.ts +0 -0
  42. /package/es/{src/components/HTableHeader → HTableHeader}/index.d.ts +0 -0
  43. /package/es/{src/components/Table.d.ts → Table.d.ts} +0 -0
  44. /package/es/{src/components/hooks → hooks}/index.d.ts +0 -0
  45. /package/es/{src/components/modal.d.ts → modal.d.ts} +0 -0
  46. /package/lib/{src/components/HTableHeader → HTableHeader}/defaultFormRender.d.ts +0 -0
  47. /package/lib/{src/components/HTableHeader → HTableHeader}/defaultSubComponent.d.ts +0 -0
  48. /package/lib/{src/components/HTableHeader → HTableHeader}/hooks.d.ts +0 -0
  49. /package/lib/{src/components/HTableHeader → HTableHeader}/index.d.ts +0 -0
  50. /package/lib/{src/components/Table.d.ts → Table.d.ts} +0 -0
  51. /package/lib/{src/components/hooks → hooks}/index.d.ts +0 -0
  52. /package/lib/{src/components/modal.d.ts → modal.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import type { ActionRenderFn } from "../modal";
1
+ import type { ActionRenderFn } from "src/components/modal";
2
2
  interface IProps {
3
3
  actionRender?: ActionRenderFn;
4
4
  }
@@ -1,7 +1,6 @@
1
- import type { HTableProps } from "../modal";
1
+ import type { HTableProps, ConfigDataModal } from "../modal";
2
2
  import React from "react";
3
3
  import type { GetRowKey } from "rc-table/lib/interface";
4
- import type { ConfigDataModal } from "../modal";
5
4
  import type { SizeType } from "antd/lib/config-provider/SizeContext";
6
5
  export declare const useCols: ({ configData, rowSelection, table }: HTableProps) => {
7
6
  cols: ConfigDataModal;
@@ -1,8 +1,6 @@
1
1
  import type { ProTableProps } from "@ant-design/pro-table";
2
- import type { ActionRenderFn, ConfigDataModal, ParamsModal } from "../modal";
2
+ import type { ActionRenderFn, ConfigDataModal, ParamsModal, HTableInstance, HRowSelection } from "../modal";
3
3
  import React from "react";
4
- import type { HTableInstance } from "../modal";
5
- import type { HRowSelection } from "../modal";
6
4
  import type { AffixProps } from "antd/lib/affix";
7
5
  export interface HTableBodyProps extends Omit<ProTableProps<any, any>, "dataSource" | "rowSelection"> {
8
6
  configData?: ConfigDataModal;
@@ -1,7 +1,5 @@
1
- import type { ActionRenderFn } from "../modal";
1
+ import type { ActionRenderFn, HTableInstance, ResultModal, RowObj, FooterBtnRenderFn } from "../modal";
2
2
  import React from "react";
3
- import type { HTableInstance, ResultModal, RowObj } from "../modal";
4
- import type { FooterBtnRenderFn } from "../modal";
5
3
  interface IFooterProps {
6
4
  actionRender?: ActionRenderFn;
7
5
  footerRender?: (tableInstance: HTableInstance, selectedRowData: RowObj, data?: ResultModal) => React.ReactNode;
@@ -1,7 +1,7 @@
1
- import type { ConfigDataModal, ConfigItemModal } from "../modal";
1
+ import type { ConfigDataModal, ConfigItemModal } from "src/components/modal";
2
2
  import type { ColProps } from "antd";
3
3
  import type React from "react";
4
- import type { HTableInstance } from "../modal";
4
+ import type { HTableInstance } from "src/components/modal";
5
5
  export interface IHeaderProps {
6
6
  configData?: ConfigDataModal;
7
7
  onFinish?: (value: Record<string, any>) => Promise<any>;
@@ -1,8 +1,7 @@
1
1
  import type { PaginationProps } from "antd";
2
- import type { ParamsModal } from "../modal";
2
+ import type { ParamsModal, HTableInstance } from "../modal";
3
3
  import React from "react";
4
4
  import type { AffixProps } from "antd/lib/affix";
5
- import type { HTableInstance } from "../modal";
6
5
  export interface IPaginationProps extends PaginationProps {
7
6
  onPageChange?: (params: ParamsModal) => void;
8
7
  paginationStyle?: React.CSSProperties;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { HTableInstance } from "./modal";
2
+ import type { HTableInstance } from "src/components/modal";
3
3
  interface HTableConfigContextModal {
4
4
  emptyRender?: (table: HTableInstance) => React.ReactNode;
5
5
  errorRender?: (table: HTableInstance, error: Error) => React.ReactNode;
@@ -1,7 +1,6 @@
1
1
  import type { Dispatch, SetStateAction } from "react";
2
2
  import React from "react";
3
- import type { ResultModal, RowObj, HTableInstance } from "./modal";
4
- import type { HTableProps } from "./modal";
3
+ import type { HTableProps, ResultModal, RowObj, HTableInstance } from "./modal";
5
4
  interface HContextModal extends Omit<HTableProps, "request"> {
6
5
  tableInstance: HTableInstance;
7
6
  data?: ResultModal;
@@ -1,4 +1,5 @@
1
1
  import "./index.less";
2
+ import "./modal";
2
3
  export { default as HTable } from "./Table";
3
4
  export { default as useHTable } from "./hooks/useHTable";
4
5
  export { default as HTableConfig } from "./TableConfig";
@@ -1,4 +1,4 @@
1
- import type { ActionRenderFn } from "../modal";
1
+ import type { ActionRenderFn } from "src/components/modal";
2
2
  interface IProps {
3
3
  actionRender?: ActionRenderFn;
4
4
  }
@@ -1,7 +1,6 @@
1
- import type { HTableProps } from "../modal";
1
+ import type { HTableProps, ConfigDataModal } from "../modal";
2
2
  import React from "react";
3
3
  import type { GetRowKey } from "rc-table/lib/interface";
4
- import type { ConfigDataModal } from "../modal";
5
4
  import type { SizeType } from "antd/lib/config-provider/SizeContext";
6
5
  export declare const useCols: ({ configData, rowSelection, table }: HTableProps) => {
7
6
  cols: ConfigDataModal;
@@ -1,8 +1,6 @@
1
1
  import type { ProTableProps } from "@ant-design/pro-table";
2
- import type { ActionRenderFn, ConfigDataModal, ParamsModal } from "../modal";
2
+ import type { ActionRenderFn, ConfigDataModal, ParamsModal, HTableInstance, HRowSelection } from "../modal";
3
3
  import React from "react";
4
- import type { HTableInstance } from "../modal";
5
- import type { HRowSelection } from "../modal";
6
4
  import type { AffixProps } from "antd/lib/affix";
7
5
  export interface HTableBodyProps extends Omit<ProTableProps<any, any>, "dataSource" | "rowSelection"> {
8
6
  configData?: ConfigDataModal;
@@ -1,7 +1,5 @@
1
- import type { ActionRenderFn } from "../modal";
1
+ import type { ActionRenderFn, HTableInstance, ResultModal, RowObj, FooterBtnRenderFn } from "../modal";
2
2
  import React from "react";
3
- import type { HTableInstance, ResultModal, RowObj } from "../modal";
4
- import type { FooterBtnRenderFn } from "../modal";
5
3
  interface IFooterProps {
6
4
  actionRender?: ActionRenderFn;
7
5
  footerRender?: (tableInstance: HTableInstance, selectedRowData: RowObj, data?: ResultModal) => React.ReactNode;
@@ -1,7 +1,7 @@
1
- import type { ConfigDataModal, ConfigItemModal } from "../modal";
1
+ import type { ConfigDataModal, ConfigItemModal } from "src/components/modal";
2
2
  import type { ColProps } from "antd";
3
3
  import type React from "react";
4
- import type { HTableInstance } from "../modal";
4
+ import type { HTableInstance } from "src/components/modal";
5
5
  export interface IHeaderProps {
6
6
  configData?: ConfigDataModal;
7
7
  onFinish?: (value: Record<string, any>) => Promise<any>;
@@ -1,8 +1,7 @@
1
1
  import type { PaginationProps } from "antd";
2
- import type { ParamsModal } from "../modal";
2
+ import type { ParamsModal, HTableInstance } from "../modal";
3
3
  import React from "react";
4
4
  import type { AffixProps } from "antd/lib/affix";
5
- import type { HTableInstance } from "../modal";
6
5
  export interface IPaginationProps extends PaginationProps {
7
6
  onPageChange?: (params: ParamsModal) => void;
8
7
  paginationStyle?: React.CSSProperties;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { HTableInstance } from "./modal";
2
+ import type { HTableInstance } from "src/components/modal";
3
3
  interface HTableConfigContextModal {
4
4
  emptyRender?: (table: HTableInstance) => React.ReactNode;
5
5
  errorRender?: (table: HTableInstance, error: Error) => React.ReactNode;
@@ -1,7 +1,6 @@
1
1
  import type { Dispatch, SetStateAction } from "react";
2
2
  import React from "react";
3
- import type { ResultModal, RowObj, HTableInstance } from "./modal";
4
- import type { HTableProps } from "./modal";
3
+ import type { HTableProps, ResultModal, RowObj, HTableInstance } from "./modal";
5
4
  interface HContextModal extends Omit<HTableProps, "request"> {
6
5
  tableInstance: HTableInstance;
7
6
  data?: ResultModal;
@@ -1,4 +1,5 @@
1
1
  import "./index.less";
2
+ import "./modal";
2
3
  export { default as HTable } from "./Table";
3
4
  export { default as useHTable } from "./hooks/useHTable";
4
5
  export { default as HTableConfig } from "./TableConfig";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/table",
3
- "version": "0.0.9-beta-v13",
3
+ "version": "0.0.9-beta-v18",
4
4
  "description": "基于antd二次开发table组件",
5
5
  "keywords": [
6
6
  "table"
@@ -1,7 +1,7 @@
1
1
  import { Button, Row, Typography } from "antd";
2
2
  import React from "react";
3
3
  import { useHTableContext } from "../context";
4
- import type { ActionRenderFn } from "../modal";
4
+ import type { ActionRenderFn } from "src/components/modal";
5
5
  const { Text, Link } = Typography;
6
6
  interface IProps {
7
7
  actionRender?: ActionRenderFn;
@@ -1,4 +1,4 @@
1
- import { Row, Space } from "antd";
1
+ import { Row } from "antd";
2
2
  import type { HTableBodyProps } from "../index";
3
3
  import type { DetailedReactHTMLElement } from "react";
4
4
  import React from "react";
@@ -1,10 +1,8 @@
1
- import type { HTableInstance, HTableProps } from "../modal";
1
+ import type { HTableInstance, HTableProps,HRowSelection,ConfigDataModal } from "../modal";
2
2
  import React, { useEffect, useState } from "react";
3
3
  import { useHTableContext } from "../context";
4
4
  import type { GetRowKey } from "rc-table/lib/interface";
5
5
  import { RowSelectionBox, RowSelectionTitle } from "./RowSelection";
6
- import type { HRowSelection } from "../modal";
7
- import type { ConfigDataModal } from "../modal";
8
6
  import type { SizeType } from "antd/lib/config-provider/SizeContext";
9
7
  const rowSelectionCol = (rowSelection?: HRowSelection) => {
10
8
  const { allPageCheck, onChange, getCheckboxProps } = rowSelection || {};
@@ -1,16 +1,14 @@
1
1
  import type { ProTableProps } from "@ant-design/pro-table";
2
2
  import ProTable from "@ant-design/pro-table";
3
- import type { ActionRenderFn, ConfigDataModal, ParamsModal } from "../modal";
3
+ import type { ActionRenderFn, ConfigDataModal, ParamsModal,HTableInstance,HRowSelection } from "../modal";
4
4
  import { useCols, useSize, useSynchronousKeys } from "./hooks";
5
5
  import { useHTableContext } from "../context";
6
6
  import React from "react";
7
7
  import { ConfigProvider, Empty, Alert } from "antd";
8
- import type { HTableInstance } from "../modal";
9
8
  import { useHTableConfigContext } from "../TableConfig";
10
9
  import HTablePagination from "../HTablePagination";
11
10
  import { useClassName } from "../hooks";
12
11
  import AlertMsg from "./AlertMsg";
13
- import type { HRowSelection } from "../modal";
14
12
  import type { AffixProps } from "antd/lib/affix";
15
13
  import Options from "./Options";
16
14
  import HeaderTitle from "./HeaderTitle";
@@ -1,10 +1,8 @@
1
1
  import { Card, Affix, Row, Space, Button } from "antd";
2
2
  import { Typography } from "antd";
3
- import type { ActionRenderFn } from "../modal";
3
+ import type { ActionRenderFn,HTableInstance, ResultModal, RowObj,FooterBtnRenderFn } from "../modal";
4
4
  import { useHTableContext } from "../context";
5
5
  import React from "react";
6
- import type { HTableInstance, ResultModal, RowObj } from "../modal";
7
- import type { FooterBtnRenderFn } from "../modal";
8
6
 
9
7
  const { Text, Link } = Typography;
10
8
  interface IFooterProps {
@@ -6,7 +6,7 @@ import { useClassName } from "../hooks";
6
6
  import type { HFormInstance } from "@hw-component/form/es/Form/modal";
7
7
  import { DefaultSubComponent } from "../HTableHeader/defaultSubComponent";
8
8
  import { useHTableContext } from "../context";
9
- import type { HTableInstance } from "@/components/modal";
9
+ import type { HTableInstance } from "../modal";
10
10
  import { renderData } from "./defaultFormRender";
11
11
  const sizeObj = {
12
12
  xl: {
@@ -1,7 +1,7 @@
1
- import type { ConfigDataModal, ConfigItemModal } from "../modal";
1
+ import type { ConfigDataModal, ConfigItemModal } from "src/components/modal";
2
2
  import type { ColProps } from "antd";
3
3
  import type React from "react";
4
- import type { HTableInstance } from "../modal";
4
+ import type { HTableInstance } from "src/components/modal";
5
5
 
6
6
  export interface IHeaderProps {
7
7
  configData?: ConfigDataModal;
@@ -1,12 +1,11 @@
1
1
  import type { PaginationProps } from "antd";
2
2
  import { Affix, Pagination, Row } from "antd";
3
3
  import { useHTableContext } from "../context";
4
- import type { ParamsModal } from "../modal";
4
+ import type { ParamsModal,HTableInstance } from "../modal";
5
5
  import { useClassName } from "../hooks";
6
6
  import React, { useState } from "react";
7
7
  import type { AffixProps } from "antd/lib/affix";
8
8
  import GoTop from "../GoTop";
9
- import type { HTableInstance } from "../modal";
10
9
  export interface IPaginationProps extends PaginationProps {
11
10
  onPageChange?: (params: ParamsModal) => void;
12
11
  paginationStyle?: React.CSSProperties;
@@ -3,9 +3,9 @@ import type {
3
3
  HDiaLogTableInstance,
4
4
  HOnDiaLogTableInstance,
5
5
  ModalTableProps,
6
+ DialogParamsModal
6
7
  } from "../modal";
7
8
  import { useEffect, useMemo, useState } from "react";
8
- import type { DialogParamsModal } from "../modal";
9
9
 
10
10
  export const useHDialogTable = () => {
11
11
  const tableInstance = useHTable();
@@ -1,6 +1,6 @@
1
1
  import { Modal } from "antd";
2
2
  import Table from "../Table";
3
- import type { ModalTableProps, ParamsModal } from "../modal";
3
+ import type { ModalTableProps } from "../modal";
4
4
  import { useCurrentTable, useTableProps, useVisible } from "./hooks";
5
5
  export default ({
6
6
  configData: configDataProps,
@@ -4,7 +4,7 @@ import useCurrentTable from "./hooks/useCurrentTable";
4
4
  import useRowObj from "./hooks/useRowObj";
5
5
  import { HTableContext } from "./context";
6
6
  import { Space } from "antd";
7
- import type { HTableInstance, HTableProps } from "./modal";
7
+ import type { HTableProps } from "./modal";
8
8
  import useReq from "./hooks/useReq";
9
9
  import useDispatch from "./hooks/useDispatch";
10
10
  import { useState } from "react";
@@ -1,5 +1,5 @@
1
1
  import React, { useContext } from "react";
2
- import type { HTableInstance } from "./modal";
2
+ import type { HTableInstance } from "src/components/modal";
3
3
 
4
4
  interface HTableConfigContextModal {
5
5
  emptyRender?: (table: HTableInstance) => React.ReactNode;
@@ -1,7 +1,6 @@
1
1
  import type { Dispatch, SetStateAction} from "react";
2
2
  import React, { useContext } from "react";
3
- import type { ResultModal, RowObj, HTableInstance } from "./modal";
4
- import type { HTableProps } from "./modal";
3
+ import type { HTableProps,ResultModal, RowObj, HTableInstance } from "./modal";
5
4
 
6
5
  interface HContextModal extends Omit<HTableProps, "request"> {
7
6
  tableInstance: HTableInstance;
@@ -1,7 +1,6 @@
1
1
  import { useMemo } from "react";
2
- import type { HTableInstance, ParamsModal } from "../modal";
2
+ import type { HTableInstance, ParamsModal ,TableInstance} from "../modal";
3
3
  import { useHForm } from "@hw-component/form";
4
- import type { TableInstance } from "../modal";
5
4
 
6
5
  export default (): HTableInstance => {
7
6
  const form = useHForm();
@@ -1,4 +1,5 @@
1
1
  import "./index.less";
2
+ import "./modal"
2
3
  export { default as HTable } from "./Table";
3
4
  export { default as useHTable } from "./hooks/useHTable";
4
5
  export { default as HTableConfig } from "./TableConfig";
@@ -1,5 +1,5 @@
1
1
  import { Button } from "antd";
2
- import { HModalTable, HTable, useHDialogTable } from "../../components";
2
+ import { HModalTable, HTable, useHDialogTable } from "@/components";
3
3
  const configData = [
4
4
  {
5
5
  title: "座位",
@@ -1,4 +1,4 @@
1
- import { HTable, useHTable } from "../../components";
1
+ import { HTable, useHTable } from "@/components";
2
2
  import { Button } from "antd";
3
3
  import { HFormConfigProvider } from "@hw-component/form";
4
4
 
@@ -4,7 +4,7 @@ import {
4
4
  HTableBody,
5
5
  HTableFooter,
6
6
  HTablePagination,
7
- } from "../../components";
7
+ } from "@/components";
8
8
  import { useRequest } from "ahooks";
9
9
  import { Space } from "antd";
10
10
 
package/tsconfig.json CHANGED
@@ -22,8 +22,8 @@
22
22
  "typeRoots": ["./node_modules/@types/", "./src/typings.d.ts"],
23
23
  "paths": {
24
24
  "@/*": ["./src/*"]
25
- },
25
+ }
26
26
  },
27
- "include": ["src/**/*", "typings/**/*"],
27
+ "include": ["src/**/*"],
28
28
  "exclude": ["node_modules", "**/*.spec.ts", "**/*.css", "**/*.less"]
29
29
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes