@levelcaptech/gantt-task-react-custom 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.
Files changed (40) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +159 -0
  3. package/dist/components/calendar/calendar.d.ts +14 -0
  4. package/dist/components/calendar/top-part-of-calendar.d.ts +11 -0
  5. package/dist/components/gantt/gantt.d.ts +3 -0
  6. package/dist/components/gantt/task-gantt-content.d.ts +25 -0
  7. package/dist/components/gantt/task-gantt.d.ts +13 -0
  8. package/dist/components/grid/grid-body.d.ts +12 -0
  9. package/dist/components/grid/grid.d.ts +4 -0
  10. package/dist/components/other/arrow.d.ts +12 -0
  11. package/dist/components/other/horizontal-scroll.d.ts +8 -0
  12. package/dist/components/other/tooltip.d.ts +29 -0
  13. package/dist/components/other/vertical-scroll.d.ts +9 -0
  14. package/dist/components/task-item/bar/bar-date-handle.d.ts +11 -0
  15. package/dist/components/task-item/bar/bar-display.d.ts +20 -0
  16. package/dist/components/task-item/bar/bar-progress-handle.d.ts +7 -0
  17. package/dist/components/task-item/bar/bar-small.d.ts +3 -0
  18. package/dist/components/task-item/bar/bar.d.ts +3 -0
  19. package/dist/components/task-item/milestone/milestone.d.ts +3 -0
  20. package/dist/components/task-item/project/project.d.ts +3 -0
  21. package/dist/components/task-item/task-item.d.ts +15 -0
  22. package/dist/components/task-list/task-list-header.d.ts +7 -0
  23. package/dist/components/task-list/task-list-table.d.ts +13 -0
  24. package/dist/components/task-list/task-list.d.ts +37 -0
  25. package/dist/helpers/bar-helper.d.ts +14 -0
  26. package/dist/helpers/date-helper.d.ts +14 -0
  27. package/dist/helpers/other-helper.d.ts +8 -0
  28. package/dist/index.css +312 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.js +2749 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/index.modern.js +2748 -0
  33. package/dist/index.modern.js.map +1 -0
  34. package/dist/test/date-helper.test.d.ts +1 -0
  35. package/dist/test/gant.test.d.ts +1 -0
  36. package/dist/types/bar-task.d.ts +21 -0
  37. package/dist/types/date-setup.d.ts +5 -0
  38. package/dist/types/gantt-task-actions.d.ts +8 -0
  39. package/dist/types/public-types.d.ts +136 -0
  40. package/package.json +70 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Maksym Vikarii https://github.com/MaTeMaTuK
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,159 @@
1
+ # gantt-task-react
2
+
3
+ ## License
4
+ MIT
5
+
6
+ Originally based on:
7
+ https://github.com/MaTeMaTuK/gantt-task-react
8
+
9
+ ## Interactive Gantt Chart for React with TypeScript.
10
+
11
+ ![example](https://user-images.githubusercontent.com/26743903/88215863-f35d5f00-cc64-11ea-81db-e829e6e9b5c8.png)
12
+
13
+ ## [Live Demo](https://matematuk.github.io/gantt-task-react/)
14
+
15
+ ## Install
16
+
17
+ ```
18
+ npm install gantt-task-react
19
+ ```
20
+
21
+ ## DevContainer (npm publish-ready)
22
+
23
+ VS Code Dev Containers で npmjs.com への publish を行う環境を用意しています。セットアップと利用方法は [docs/DEVCONTAINER.md](docs/DEVCONTAINER.md) を参照してください。
24
+
25
+ ## How to use it
26
+
27
+ ```javascript
28
+ import { Gantt, Task, EventOption, StylingOption, ViewMode, DisplayOption } from 'gantt-task-react';
29
+ import "gantt-task-react/dist/index.css";
30
+
31
+ let tasks: Task[] = [
32
+ {
33
+ start: new Date(2020, 1, 1),
34
+ end: new Date(2020, 1, 2),
35
+ name: 'Idea',
36
+ id: 'Task 0',
37
+ type:'task',
38
+ progress: 45,
39
+ isDisabled: true,
40
+ styles: { progressColor: '#ffbb54', progressSelectedColor: '#ff9e0d' },
41
+ },
42
+ ...
43
+ ];
44
+ <Gantt tasks={tasks} />
45
+ ```
46
+
47
+ You may handle actions
48
+
49
+ ```javascript
50
+ <Gantt
51
+ tasks={tasks}
52
+ viewMode={view}
53
+ onDateChange={onTaskChange}
54
+ onTaskDelete={onTaskDelete}
55
+ onProgressChange={onProgressChange}
56
+ onDoubleClick={onDblClick}
57
+ onClick={onClick}
58
+ />
59
+ ```
60
+
61
+ ## How to run example
62
+
63
+ ```
64
+ cd ./example
65
+ npm install
66
+ npm start
67
+ ```
68
+
69
+ ## Gantt Configuration
70
+
71
+ ### GanttProps
72
+
73
+ | Parameter Name | Type | Description |
74
+ | :------------------------------ | :------------ | :------------------------------------------------- |
75
+ | tasks\* | [Task](#Task) | Tasks array. |
76
+ | [EventOption](#EventOption) | interface | Specifies gantt events. |
77
+ | [DisplayOption](#DisplayOption) | interface | Specifies view type and display timeline language. |
78
+ | [StylingOption](#StylingOption) | interface | Specifies chart and global tasks styles |
79
+
80
+ ### EventOption
81
+
82
+ | Parameter Name | Type | Description |
83
+ | :----------------- | :---------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- |
84
+ | onSelect | (task: Task, isSelected: boolean) => void | Specifies the function to be executed on the taskbar select or unselect event. |
85
+ | onDoubleClick | (task: Task) => void | Specifies the function to be executed on the taskbar onDoubleClick event. |
86
+ | onClick | (task: Task) => void | Specifies the function to be executed on the taskbar onClick event. |
87
+ | onDelete\* | (task: Task) => void/boolean/Promise<void>/Promise<boolean> | Specifies the function to be executed on the taskbar on Delete button press event. |
88
+ | onDateChange\* | (task: Task, children: Task[]) => void/boolean/Promise<void>/Promise<boolean> | Specifies the function to be executed when drag taskbar event on timeline has finished. |
89
+ | onProgressChange\* | (task: Task, children: Task[]) => void/boolean/Promise<void>/Promise<boolean> | Specifies the function to be executed when drag taskbar progress event has finished. |
90
+ | onExpanderClick\* | onExpanderClick: (task: Task) => void; | Specifies the function to be executed on the table expander click |
91
+ | timeStep | number | A time step value for onDateChange. Specify in milliseconds. |
92
+
93
+ \* Chart undoes operation if method return false or error. Parameter children returns one level deep records.
94
+
95
+ ### DisplayOption
96
+
97
+ | Parameter Name | Type | Description |
98
+ | :------------- | :------ | :---------------------------------------------------------------------------------------------------------- |
99
+ | viewMode | enum | Specifies the time scale. Hour, Quarter Day, Half Day, Day, Week(ISO-8601, 1st day is Monday), Month, QuarterYear, Year. |
100
+ | viewDate | date | Specifies display date and time for display. |
101
+ | preStepsCount | number | Specifies empty space before the fist task |
102
+ | locale | string | Specifies the month name language. Able formats: ISO 639-2, Java Locale. |
103
+ | rtl | boolean | Sets rtl mode. |
104
+
105
+ ### StylingOption
106
+
107
+ | Parameter Name | Type | Description |
108
+ | :------------------------- | :----- | :--------------------------------------------------------------------------------------------- |
109
+ | headerHeight | number | Specifies the header height. |
110
+ | ganttHeight | number | Specifies the gantt chart height without header. Default is 0. It`s mean no height limitation. |
111
+ | columnWidth | number | Specifies the time period width. |
112
+ | listCellWidth | string | Specifies the task list cell width. Empty string is mean "no display". |
113
+ | rowHeight | number | Specifies the task row height. |
114
+ | barCornerRadius | number | Specifies the taskbar corner rounding. |
115
+ | barFill | number | Specifies the taskbar occupation. Sets in percent from 0 to 100. |
116
+ | handleWidth | number | Specifies width the taskbar drag event control for start and end dates. |
117
+ | fontFamily | string | Specifies the application font. |
118
+ | fontSize | string | Specifies the application font size. |
119
+ | barProgressColor | string | Specifies the taskbar progress fill color globally. |
120
+ | barProgressSelectedColor | string | Specifies the taskbar progress fill color globally on select. |
121
+ | barBackgroundColor | string | Specifies the taskbar background fill color globally. |
122
+ | barBackgroundSelectedColor | string | Specifies the taskbar background fill color globally on select. |
123
+ | arrowColor | string | Specifies the relationship arrow fill color. |
124
+ | arrowIndent | number | Specifies the relationship arrow right indent. Sets in px |
125
+ | todayColor | string | Specifies the current period column fill color. |
126
+ | TooltipContent | | Specifies the Tooltip view for selected taskbar. |
127
+ | TaskListHeader | | Specifies the task list Header view |
128
+ | TaskListTable | | Specifies the task list Table view |
129
+
130
+ - TooltipContent: [`React.FC<{ task: Task; fontSize: string; fontFamily: string; }>;`](https://github.com/MaTeMaTuK/gantt-task-react/blob/main/src/components/other/tooltip.tsx#L56)
131
+ - TaskListHeader: `React.FC<{ headerHeight: number; rowWidth: string; fontFamily: string; fontSize: string;}>;`
132
+ - TaskListTable: `React.FC<{ rowHeight: number; rowWidth: string; fontFamily: string; fontSize: string; locale: string; tasks: Task[]; selectedTaskId: string; setSelectedTask: (taskId: string) => void; }>;`
133
+
134
+ ### Task
135
+
136
+ | Parameter Name | Type | Description |
137
+ | :------------- | :------- | :---------------------------------------------------------------------------------------------------- |
138
+ | id\* | string | Task id. |
139
+ | name\* | string | Task display name. |
140
+ | type\* | string | Task display type: **task**, **milestone**, **project** |
141
+ | start\* | Date | Task start date. |
142
+ | end\* | Date | Task end date. |
143
+ | progress\* | number | Task progress. Sets in percent from 0 to 100. |
144
+ | dependencies | string[] | Specifies the parent dependencies ids. |
145
+ | styles | object | Specifies the taskbar styling settings locally. Object is passed with the following attributes: |
146
+ | | | - **backgroundColor**: String. Specifies the taskbar background fill color locally. |
147
+ | | | - **backgroundSelectedColor**: String. Specifies the taskbar background fill color locally on select. |
148
+ | | | - **progressColor**: String. Specifies the taskbar progress fill color locally. |
149
+ | | | - **progressSelectedColor**: String. Specifies the taskbar progress fill color globally on select. |
150
+ | isDisabled | bool | Disables all action for current task. |
151
+ | fontSize | string | Specifies the taskbar font size locally. |
152
+ | project | string | Task project name |
153
+ | hideChildren | bool | Hide children items. Parameter works with project type only |
154
+
155
+ \*Required
156
+
157
+ ## License
158
+
159
+ [MIT](https://oss.ninja/mit/jaredpalmer/)
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { ViewMode } from "../../types/public-types";
3
+ import { DateSetup } from "../../types/date-setup";
4
+ export declare type CalendarProps = {
5
+ dateSetup: DateSetup;
6
+ locale: string;
7
+ viewMode: ViewMode;
8
+ rtl: boolean;
9
+ headerHeight: number;
10
+ columnWidth: number;
11
+ fontFamily: string;
12
+ fontSize: string;
13
+ };
14
+ export declare const Calendar: React.FC<CalendarProps>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ declare type TopPartOfCalendarProps = {
3
+ value: string;
4
+ x1Line: number;
5
+ y1Line: number;
6
+ y2Line: number;
7
+ xText: number;
8
+ yText: number;
9
+ };
10
+ export declare const TopPartOfCalendar: React.FC<TopPartOfCalendarProps>;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { GanttProps } from "../../types/public-types";
3
+ export declare const Gantt: React.FunctionComponent<GanttProps>;
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { EventOption } from "../../types/public-types";
3
+ import { BarTask } from "../../types/bar-task";
4
+ import { GanttEvent } from "../../types/gantt-task-actions";
5
+ export declare type TaskGanttContentProps = {
6
+ tasks: BarTask[];
7
+ dates: Date[];
8
+ ganttEvent: GanttEvent;
9
+ selectedTask: BarTask | undefined;
10
+ rowHeight: number;
11
+ columnWidth: number;
12
+ timeStep: number;
13
+ svg?: React.RefObject<SVGSVGElement>;
14
+ svgWidth: number;
15
+ taskHeight: number;
16
+ arrowColor: string;
17
+ arrowIndent: number;
18
+ fontSize: string;
19
+ fontFamily: string;
20
+ rtl: boolean;
21
+ setGanttEvent: (value: GanttEvent) => void;
22
+ setFailedTask: (value: BarTask | null) => void;
23
+ setSelectedTask: (taskId: string) => void;
24
+ } & EventOption;
25
+ export declare const TaskGanttContent: React.FC<TaskGanttContentProps>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { GridProps } from "../grid/grid";
3
+ import { CalendarProps } from "../calendar/calendar";
4
+ import { TaskGanttContentProps } from "./task-gantt-content";
5
+ export declare type TaskGanttProps = {
6
+ gridProps: GridProps;
7
+ calendarProps: CalendarProps;
8
+ barProps: TaskGanttContentProps;
9
+ ganttHeight: number;
10
+ scrollY: number;
11
+ scrollX: number;
12
+ };
13
+ export declare const TaskGantt: React.FC<TaskGanttProps>;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { Task } from "../../types/public-types";
3
+ export declare type GridBodyProps = {
4
+ tasks: Task[];
5
+ dates: Date[];
6
+ svgWidth: number;
7
+ rowHeight: number;
8
+ columnWidth: number;
9
+ todayColor: string;
10
+ rtl: boolean;
11
+ };
12
+ export declare const GridBody: React.FC<GridBodyProps>;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { GridBodyProps } from "./grid-body";
3
+ export declare type GridProps = GridBodyProps;
4
+ export declare const Grid: React.FC<GridProps>;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { BarTask } from "../../types/bar-task";
3
+ declare type ArrowProps = {
4
+ taskFrom: BarTask;
5
+ taskTo: BarTask;
6
+ rowHeight: number;
7
+ taskHeight: number;
8
+ arrowIndent: number;
9
+ rtl: boolean;
10
+ };
11
+ export declare const Arrow: React.FC<ArrowProps>;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import React, { SyntheticEvent } from "react";
2
+ export declare const HorizontalScroll: React.FC<{
3
+ scroll: number;
4
+ svgWidth: number;
5
+ taskListWidth: number;
6
+ rtl: boolean;
7
+ onScroll: (event: SyntheticEvent<HTMLDivElement>) => void;
8
+ }>;
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import { Task } from "../../types/public-types";
3
+ import { BarTask } from "../../types/bar-task";
4
+ export declare type TooltipProps = {
5
+ task: BarTask;
6
+ arrowIndent: number;
7
+ rtl: boolean;
8
+ svgContainerHeight: number;
9
+ svgContainerWidth: number;
10
+ svgWidth: number;
11
+ headerHeight: number;
12
+ taskListWidth: number;
13
+ scrollX: number;
14
+ scrollY: number;
15
+ rowHeight: number;
16
+ fontSize: string;
17
+ fontFamily: string;
18
+ TooltipContent: React.FC<{
19
+ task: Task;
20
+ fontSize: string;
21
+ fontFamily: string;
22
+ }>;
23
+ };
24
+ export declare const Tooltip: React.FC<TooltipProps>;
25
+ export declare const StandardTooltipContent: React.FC<{
26
+ task: Task;
27
+ fontSize: string;
28
+ fontFamily: string;
29
+ }>;
@@ -0,0 +1,9 @@
1
+ import React, { SyntheticEvent } from "react";
2
+ export declare const VerticalScroll: React.FC<{
3
+ scroll: number;
4
+ ganttHeight: number;
5
+ ganttFullHeight: number;
6
+ headerHeight: number;
7
+ rtl: boolean;
8
+ onScroll: (event: SyntheticEvent<HTMLDivElement>) => void;
9
+ }>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ declare type BarDateHandleProps = {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ barCornerRadius: number;
8
+ onMouseDown: (event: React.MouseEvent<SVGRectElement, MouseEvent>) => void;
9
+ };
10
+ export declare const BarDateHandle: React.FC<BarDateHandleProps>;
11
+ export {};
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ declare type BarDisplayProps = {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ isSelected: boolean;
8
+ progressX: number;
9
+ progressWidth: number;
10
+ barCornerRadius: number;
11
+ styles: {
12
+ backgroundColor: string;
13
+ backgroundSelectedColor: string;
14
+ progressColor: string;
15
+ progressSelectedColor: string;
16
+ };
17
+ onMouseDown: (event: React.MouseEvent<SVGPolygonElement, MouseEvent>) => void;
18
+ };
19
+ export declare const BarDisplay: React.FC<BarDisplayProps>;
20
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare type BarProgressHandleProps = {
3
+ progressPoint: string;
4
+ onMouseDown: (event: React.MouseEvent<SVGPolygonElement, MouseEvent>) => void;
5
+ };
6
+ export declare const BarProgressHandle: React.FC<BarProgressHandleProps>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { TaskItemProps } from "../task-item";
3
+ export declare const BarSmall: React.FC<TaskItemProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { TaskItemProps } from "../task-item";
3
+ export declare const Bar: React.FC<TaskItemProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { TaskItemProps } from "../task-item";
3
+ export declare const Milestone: React.FC<TaskItemProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { TaskItemProps } from "../task-item";
3
+ export declare const Project: React.FC<TaskItemProps>;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { BarTask } from "../../types/bar-task";
3
+ import { GanttContentMoveAction } from "../../types/gantt-task-actions";
4
+ export declare type TaskItemProps = {
5
+ task: BarTask;
6
+ arrowIndent: number;
7
+ taskHeight: number;
8
+ isProgressChangeable: boolean;
9
+ isDateChangeable: boolean;
10
+ isDelete: boolean;
11
+ isSelected: boolean;
12
+ rtl: boolean;
13
+ onEventStart: (action: GanttContentMoveAction, selectedTask: BarTask, event?: React.MouseEvent | React.KeyboardEvent) => any;
14
+ };
15
+ export declare const TaskItem: React.FC<TaskItemProps>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ export declare const TaskListHeaderDefault: React.FC<{
3
+ headerHeight: number;
4
+ rowWidth: string;
5
+ fontFamily: string;
6
+ fontSize: string;
7
+ }>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { Task } from "../../types/public-types";
3
+ export declare const TaskListTableDefault: React.FC<{
4
+ rowHeight: number;
5
+ rowWidth: string;
6
+ fontFamily: string;
7
+ fontSize: string;
8
+ locale: string;
9
+ tasks: Task[];
10
+ selectedTaskId: string;
11
+ setSelectedTask: (taskId: string) => void;
12
+ onExpanderClick: (task: Task) => void;
13
+ }>;
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import { BarTask } from "../../types/bar-task";
3
+ import { Task } from "../../types/public-types";
4
+ export declare type TaskListProps = {
5
+ headerHeight: number;
6
+ rowWidth: string;
7
+ fontFamily: string;
8
+ fontSize: string;
9
+ rowHeight: number;
10
+ ganttHeight: number;
11
+ scrollY: number;
12
+ locale: string;
13
+ tasks: Task[];
14
+ taskListRef: React.RefObject<HTMLDivElement>;
15
+ horizontalContainerClass?: string;
16
+ selectedTask: BarTask | undefined;
17
+ setSelectedTask: (task: string) => void;
18
+ onExpanderClick: (task: Task) => void;
19
+ TaskListHeader: React.FC<{
20
+ headerHeight: number;
21
+ rowWidth: string;
22
+ fontFamily: string;
23
+ fontSize: string;
24
+ }>;
25
+ TaskListTable: React.FC<{
26
+ rowHeight: number;
27
+ rowWidth: string;
28
+ fontFamily: string;
29
+ fontSize: string;
30
+ locale: string;
31
+ tasks: Task[];
32
+ selectedTaskId: string;
33
+ setSelectedTask: (taskId: string) => void;
34
+ onExpanderClick: (task: Task) => void;
35
+ }>;
36
+ };
37
+ export declare const TaskList: React.FC<TaskListProps>;
@@ -0,0 +1,14 @@
1
+ import { Task } from "../types/public-types";
2
+ import { BarTask } from "../types/bar-task";
3
+ import { BarMoveAction } from "../types/gantt-task-actions";
4
+ export declare const convertToBarTasks: (tasks: Task[], dates: Date[], columnWidth: number, rowHeight: number, taskHeight: number, barCornerRadius: number, handleWidth: number, rtl: boolean, barProgressColor: string, barProgressSelectedColor: string, barBackgroundColor: string, barBackgroundSelectedColor: string, projectProgressColor: string, projectProgressSelectedColor: string, projectBackgroundColor: string, projectBackgroundSelectedColor: string, milestoneBackgroundColor: string, milestoneBackgroundSelectedColor: string) => BarTask[];
5
+ export declare const progressWithByParams: (taskX1: number, taskX2: number, progress: number, rtl: boolean) => number[];
6
+ export declare const progressByProgressWidth: (progressWidth: number, barTask: BarTask) => number;
7
+ export declare const getProgressPoint: (progressX: number, taskY: number, taskHeight: number) => string;
8
+ /**
9
+ * Method handles event in real time(mousemove) and on finish(mouseup)
10
+ */
11
+ export declare const handleTaskBySVGMouseEvent: (svgX: number, action: BarMoveAction, selectedTask: BarTask, xStep: number, timeStep: number, initEventX1Delta: number, rtl: boolean) => {
12
+ isChanged: boolean;
13
+ changedTask: BarTask;
14
+ };
@@ -0,0 +1,14 @@
1
+ import { Task, ViewMode } from "../types/public-types";
2
+ import DateTimeFormatOptions = Intl.DateTimeFormatOptions;
3
+ import DateTimeFormat = Intl.DateTimeFormat;
4
+ declare type DateHelperScales = "year" | "month" | "day" | "hour" | "minute" | "second" | "millisecond";
5
+ export declare const getCachedDateTimeFormat: (locString: string | string[], opts?: DateTimeFormatOptions) => DateTimeFormat;
6
+ export declare const addToDate: (date: Date, quantity: number, scale: DateHelperScales) => Date;
7
+ export declare const startOfDate: (date: Date, scale: DateHelperScales) => Date;
8
+ export declare const ganttDateRange: (tasks: Task[], viewMode: ViewMode, preStepsCount: number) => Date[];
9
+ export declare const seedDates: (startDate: Date, endDate: Date, viewMode: ViewMode) => Date[];
10
+ export declare const getLocaleMonth: (date: Date, locale: string) => string;
11
+ export declare const getLocalDayOfWeek: (date: Date, locale: string, format?: "long" | "short" | "narrow" | undefined) => string;
12
+ export declare const getWeekNumberISO8601: (date: Date) => string;
13
+ export declare const getDaysInMonth: (month: number, year: number) => number;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { BarTask } from "../types/bar-task";
3
+ import { Task } from "../types/public-types";
4
+ export declare function isKeyboardEvent(event: React.MouseEvent | React.KeyboardEvent | React.FocusEvent): event is React.KeyboardEvent;
5
+ export declare function isMouseEvent(event: React.MouseEvent | React.KeyboardEvent | React.FocusEvent): event is React.MouseEvent;
6
+ export declare function isBarTask(task: Task | BarTask): task is BarTask;
7
+ export declare function removeHiddenTasks(tasks: Task[]): Task[];
8
+ export declare const sortTasks: (taskA: Task, taskB: Task) => 0 | 1 | -1;