draw-table-vue 0.2.0 → 0.3.0

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,3 +0,0 @@
1
- export { default as CanvasTable } from './components/CanvasTable.vue';
2
- export * from './types';
3
- export * from './core/renderer';
@@ -1,77 +0,0 @@
1
- import type { VNode } from 'vue';
2
-
3
- export type CellType = 'text' | 'image' | 'checkbox' | 'radio' | 'switch' | 'color-picker' | 'tags' | 'expand' | 'selection' | 'index';
4
-
5
- export interface CellStyle {
6
- color?: string;
7
- backgroundColor?: string;
8
- fontSize?: number;
9
- fontFamily?: string;
10
- textAlign?: 'left' | 'center' | 'right';
11
- padding?: [number, number, number, number]; // [top, right, bottom, left]
12
- border?: boolean;
13
- }
14
-
15
- export interface ColumnConfig {
16
- key?: string;
17
- title: string;
18
- type?: CellType;
19
- width?: number;
20
- fixed?: 'left' | 'right' | boolean;
21
- align?: 'left' | 'center' | 'right';
22
- renderEdit?: (data: any, h: (component: any, props?: any, children?: any) => VNode) => VNode;
23
- renderHeaderMenu?: (column: ColumnConfig, defaultMenu: MenuItem[]) => MenuItem[];
24
- summary?: SummaryFunction[];
25
- renderHeader?: (column: ColumnConfig, h: (component: any, propsOrChildren?: any, children?: any) => VNode) => VNode;
26
- renderCell?: (row: any, column: ColumnConfig, h: (component: any, propsOrChildren?: any, children?: any) => VNode) => VNode;
27
- children?: ColumnConfig[];
28
- [key: string]: any;
29
- }
30
-
31
- export interface MenuItem {
32
- icon?: string;
33
- label: string;
34
- onCommand: (column: ColumnConfig) => void;
35
- }
36
-
37
- export interface SummaryResult {
38
- label: string;
39
- value: string | number;
40
- }
41
-
42
- export type SummaryFunction = (data: any[]) => SummaryResult;
43
-
44
- export interface TableRow {
45
- id: string | number;
46
- [key: string]: any;
47
- _expanded?: boolean;
48
- _selected?: boolean;
49
- }
50
-
51
- export interface TableOptions {
52
- border?: boolean;
53
- stripe?: boolean;
54
- multiSelect?: boolean;
55
- fixedHeader?: boolean;
56
- rowHeight?: number;
57
- headerHeight?: number;
58
- renderExpand?: (row: TableRow, h: (component: any, props?: any, children?: any) => VNode) => VNode;
59
- spanMethod?: (info: { row: number, column: ColumnConfig, rowIndex: number, columnIndex: number }) => { rowspan: number, colspan: number } | undefined;
60
- }
61
-
62
- export interface CellInfo {
63
- row: number;
64
- col: number;
65
- rect: { x: number, y: number, width: number, height: number };
66
- column: ColumnConfig;
67
- data: any;
68
- isExpandBtn?: boolean;
69
- isSelection?: boolean;
70
- }
71
-
72
- export interface MergedCell {
73
- row: number;
74
- col: number;
75
- rowspan: number;
76
- colspan: number;
77
- }
package/tsconfig.app.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "extends": "@vue/tsconfig/tsconfig.dom.json",
3
- "compilerOptions": {
4
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
- "types": ["vite/client"],
6
-
7
- /* Linting */
8
- "strict": true,
9
- "noUnusedLocals": true,
10
- "noUnusedParameters": true,
11
- "erasableSyntaxOnly": true,
12
- "noFallthroughCasesInSwitch": true,
13
- "noUncheckedSideEffectImports": true
14
- },
15
- "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
16
- }
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ]
7
- }
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
- "target": "ES2023",
5
- "lib": ["ES2023"],
6
- "module": "ESNext",
7
- "types": ["node"],
8
- "skipLibCheck": true,
9
-
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "verbatimModuleSyntax": true,
14
- "moduleDetection": "force",
15
- "noEmit": true,
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "erasableSyntaxOnly": true,
22
- "noFallthroughCasesInSwitch": true,
23
- "noUncheckedSideEffectImports": true
24
- },
25
- "include": ["vite.config.ts"]
26
- }
package/vite.config.ts DELETED
@@ -1,7 +0,0 @@
1
- import { defineConfig } from 'vite'
2
- import vue from '@vitejs/plugin-vue'
3
-
4
- // https://vite.dev/config/
5
- export default defineConfig({
6
- plugins: [vue()],
7
- })
File without changes