@gulibs/react-vtable 0.0.3 → 0.0.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.
@@ -1,4 +1,4 @@
1
- import type { ProColumn } from "@/types";
1
+ import type { ProColumn } from "../types";
2
2
  import type { Table } from "@tanstack/react-table";
3
3
  interface ColumnSettingProps<T = any> {
4
4
  table?: Table<T>;
@@ -1,4 +1,4 @@
1
- import type { EditableConfig, ProTableEditable } from "@/types";
1
+ import type { EditableConfig, ProTableEditable } from "../types";
2
2
  interface EditableActionsProps<T> {
3
3
  record: T;
4
4
  config: EditableConfig;
@@ -1,4 +1,4 @@
1
- import type { ProColumn } from "@/types";
1
+ import type { ProColumn } from "../types";
2
2
  interface EditableCellProps<T> {
3
3
  value: any;
4
4
  record: T;
@@ -1,4 +1,4 @@
1
- import type { ProTablePagination } from "@/types";
1
+ import type { ProTablePagination } from "../types";
2
2
  interface PaginationProps extends ProTablePagination {
3
3
  onPaginationChange?: (current: number, pageSize: number) => void;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { ProColumn, ProTableSearch } from "@/types";
1
+ import type { ProColumn, ProTableSearch } from "../types";
2
2
  interface SearchProps<T = any> extends ProTableSearch {
3
3
  columns: ProColumn<T>[];
4
4
  onSearch?: (values: Record<string, any>) => void;
@@ -1,4 +1,4 @@
1
- import type { ProTableToolBar, ProColumn } from "@/types";
1
+ import type { ProTableToolBar, ProColumn } from "../types";
2
2
  import type { Table } from "@tanstack/react-table";
3
3
  interface ToolBarProps<T = any> extends ProTableToolBar {
4
4
  table: Table<T>;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { DayButton, DayPicker } from "react-day-picker";
3
- import { Button } from "@/components/ui/button";
3
+ import { Button } from "../../components/ui/button";
4
4
  declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
5
  buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { ColumnDef } from "@tanstack/react-table";
2
- import type { ProColumn } from "@/types";
2
+ import type { ProColumn } from "../types";
3
3
  interface UseColumnsOptions<T> {
4
4
  columns: ProColumn<T>[];
5
5
  rowSelection?: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { ProTableAction, ProTableProps } from "@/types";
2
+ import type { ProTableAction, ProTableProps } from "../types";
3
3
  interface ProTableState<T> {
4
4
  loading: boolean;
5
5
  data: T[];
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { ProTableProps, ProTableAction } from "@/types";
2
+ import type { ProTableProps, ProTableAction } from "./types";
3
3
  import "./styles/fixed-column.css";
4
4
  export declare const ProTable: <T extends Record<string, any>>(props: ProTableProps<T> & {
5
5
  ref?: React.Ref<ProTableAction<T>>;
@@ -1,4 +1,4 @@
1
- import type { ProColumn } from "@/types";
1
+ import type { ProColumn } from "../types";
2
2
  /**
3
3
  * 从列配置中提取搜索字段
4
4
  */
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { ProFieldValueType } from "@/types";
2
+ import type { ProFieldValueType } from "../types";
3
3
  export interface ValueTypeConfig {
4
4
  render: (value: any, props?: any) => React.ReactNode;
5
5
  renderFormItem?: (value: any, props?: any) => React.ReactNode;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gulibs/react-vtable",
3
3
  "private": false,
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -22,10 +22,17 @@
22
22
  "access": "public",
23
23
  "registry": "https://registry.npmjs.org/"
24
24
  },
25
+ "scripts": {
26
+ "dev": "vite",
27
+ "build": "rm -rf dist && (tsc -p tsconfig.lib.json || true) && tsc-alias -p tsconfig.lib.json && vite build",
28
+ "lint": "eslint .",
29
+ "preview": "vite preview"
30
+ },
25
31
  "peerDependencies": {
26
32
  "react": ">=18.0.0",
27
33
  "react-dom": ">=18.0.0",
28
- "tailwindcss": ">=3.0.0"
34
+ "tailwindcss": ">=3.0.0",
35
+ "@tanstack/react-table": ">=8.0.0"
29
36
  },
30
37
  "dependencies": {
31
38
  "@dnd-kit/core": "^6.3.1",
@@ -69,6 +76,7 @@
69
76
  "react": "^19.1.1",
70
77
  "react-dom": "^19.1.1",
71
78
  "tailwindcss": "^4.1.15",
79
+ "tsc-alias": "^1.8.16",
72
80
  "tw-animate-css": "^1.4.0",
73
81
  "typescript": "~5.9.3",
74
82
  "typescript-eslint": "^8.45.0",
@@ -77,11 +85,5 @@
77
85
  },
78
86
  "resolutions": {
79
87
  "vite": "npm:rolldown-vite@7.1.14"
80
- },
81
- "scripts": {
82
- "dev": "vite",
83
- "build": "rm -rf dist && (tsc -p tsconfig.lib.json || true) && vite build",
84
- "lint": "eslint .",
85
- "preview": "vite preview"
86
88
  }
87
89
  }