zegantt 0.1.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.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## React Compiler
11
+
12
+ The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13
+
14
+ ## Expanding the ESLint configuration
15
+
16
+ If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
17
+
18
+ ```js
19
+ export default defineConfig([
20
+ globalIgnores(['dist']),
21
+ {
22
+ files: ['**/*.{ts,tsx}'],
23
+ extends: [
24
+ // Other configs...
25
+
26
+ // Remove tseslint.configs.recommended and replace with this
27
+ tseslint.configs.recommendedTypeChecked,
28
+ // Alternatively, use this for stricter rules
29
+ tseslint.configs.strictTypeChecked,
30
+ // Optionally, add this for stylistic rules
31
+ tseslint.configs.stylisticTypeChecked,
32
+
33
+ // Other configs...
34
+ ],
35
+ languageOptions: {
36
+ parserOptions: {
37
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
+ tsconfigRootDir: import.meta.dirname,
39
+ },
40
+ // other options...
41
+ },
42
+ },
43
+ ])
44
+ ```
45
+
46
+ You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47
+
48
+ ```js
49
+ // eslint.config.js
50
+ import reactX from 'eslint-plugin-react-x'
51
+ import reactDom from 'eslint-plugin-react-dom'
52
+
53
+ export default defineConfig([
54
+ globalIgnores(['dist']),
55
+ {
56
+ files: ['**/*.{ts,tsx}'],
57
+ extends: [
58
+ // Other configs...
59
+ // Enable lint rules for React
60
+ reactX.configs['recommended-typescript'],
61
+ // Enable lint rules for React DOM
62
+ reactDom.configs.recommended,
63
+ ],
64
+ languageOptions: {
65
+ parserOptions: {
66
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
+ tsconfigRootDir: import.meta.dirname,
68
+ },
69
+ // other options...
70
+ },
71
+ },
72
+ ])
73
+ ```
@@ -0,0 +1,114 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare interface CreateDependencyParams {
4
+ predecessorId: string;
5
+ predecessorType: PredecessorType;
6
+ successorId: string;
7
+ successorType: PredecessorType;
8
+ type: DependencyType;
9
+ lag: number;
10
+ }
11
+
12
+ export declare type DependencyType = "FS" | "SS" | "FF" | "SF";
13
+
14
+ export declare interface GanttDependency {
15
+ id: string;
16
+ predecessorId: string;
17
+ predecessorName?: string;
18
+ predecessorType: PredecessorType;
19
+ successorId: string;
20
+ successorName?: string;
21
+ successorType: PredecessorType;
22
+ type: DependencyType;
23
+ lag: number;
24
+ }
25
+
26
+ export declare interface GanttEvent {
27
+ id: string;
28
+ title: string;
29
+ date?: Date | string;
30
+ finished?: boolean;
31
+ projectId?: string;
32
+ projectTitle?: string;
33
+ }
34
+
35
+ export declare interface GanttMilestone {
36
+ id: string;
37
+ name: string;
38
+ date?: Date | string;
39
+ finished?: boolean;
40
+ projectId?: string;
41
+ projectTitle?: string;
42
+ }
43
+
44
+ export declare interface GanttNote {
45
+ id: string;
46
+ title: string;
47
+ date?: Date | string;
48
+ color?: string;
49
+ filesCount?: number;
50
+ projectId?: string;
51
+ projectTitle?: string;
52
+ }
53
+
54
+ export declare interface GanttStep {
55
+ id: string;
56
+ name: string;
57
+ startDate?: Date | string;
58
+ finishDate?: Date | string;
59
+ previsionStartDate?: Date | string;
60
+ previsionFinishDate?: Date | string;
61
+ conclusionPercent?: number | string;
62
+ projectId?: string;
63
+ projectTitle?: string;
64
+ }
65
+
66
+ /** Compatible task shape exposed through callbacks */
67
+ export declare interface GanttTask {
68
+ id: string;
69
+ name: string;
70
+ start: Date;
71
+ end: Date;
72
+ type: string;
73
+ progress: number;
74
+ }
75
+
76
+ export declare type PredecessorType = "STEP" | "MILESTONE";
77
+
78
+ export declare function ProjectGantt(props: ProjectGanttProps): JSX.Element;
79
+
80
+ export declare interface ProjectGanttProps {
81
+ steps: GanttStep[];
82
+ milestones?: GanttMilestone[];
83
+ events?: GanttEvent[];
84
+ notes?: GanttNote[];
85
+ dependencies?: GanttDependency[];
86
+ loading?: boolean;
87
+ projectName?: string;
88
+ /** Object containing localized strings or a translation function */
89
+ translations?: Record<string, string> | ((key: string, fallback?: string) => string);
90
+ /** When true renders one project-header row per project and groups tasks by project */
91
+ groupByProject?: boolean;
92
+ onTaskChange?: (task: GanttTask) => void;
93
+ onTaskClick?: (task: GanttTask) => void;
94
+ onAddNewStage?: (date?: Date, projectId?: string) => void;
95
+ onViewStage?: (task: GanttTask) => void;
96
+ onEditStage?: (task: GanttTask) => void;
97
+ onDeleteStage?: (taskId: string) => void;
98
+ onCreateDependency?: (params: CreateDependencyParams) => Promise<void>;
99
+ onDeleteDependency?: (dependencyId: string) => Promise<void>;
100
+ onAddMilestone?: (date?: Date, projectId?: string) => void;
101
+ onAddEvent?: (date?: Date, projectId?: string) => void;
102
+ onAddNote?: (date?: Date, projectId?: string) => void;
103
+ onSaveNote?: (data: {
104
+ title: string;
105
+ description: string;
106
+ color: string;
107
+ date: string;
108
+ predecessorId: string;
109
+ dependencyType: DependencyType;
110
+ files: File[];
111
+ }) => Promise<void>;
112
+ }
113
+
114
+ export { }
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>