@operato/gantt 2.0.0-beta.4 → 7.0.0-rc.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/CHANGELOG.md +116 -0
- package/dist/src/gantt-chart-controller.d.ts +32 -0
- package/dist/src/gantt-chart-controller.js +395 -0
- package/dist/src/gantt-chart-controller.js.map +1 -0
- package/dist/src/locales.d.ts +52 -0
- package/dist/src/locales.js +79 -0
- package/dist/src/locales.js.map +1 -0
- package/dist/src/ox-gantt-chart.d.ts +11 -20
- package/dist/src/ox-gantt-chart.js +141 -435
- package/dist/src/ox-gantt-chart.js.map +1 -1
- package/dist/src/ox-gantt-resize-splitter.d.ts +2 -3
- package/dist/src/ox-gantt-resize-splitter.js +15 -22
- package/dist/src/ox-gantt-resize-splitter.js.map +1 -1
- package/dist/src/ox-gantt.d.ts +17 -3
- package/dist/src/ox-gantt.js +169 -29
- package/dist/src/ox-gantt.js.map +1 -1
- package/dist/src/ox-task-tooltip.d.ts +12 -0
- package/dist/src/ox-task-tooltip.js +132 -0
- package/dist/src/ox-task-tooltip.js.map +1 -0
- package/dist/src/types.d.ts +11 -4
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils.d.ts +3 -3
- package/dist/src/utils.js.map +1 -1
- package/dist/stories/ox-gantt.stories.d.ts +19 -2
- package/dist/stories/ox-gantt.stories.js +104 -90
- package/dist/stories/ox-gantt.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -4
- package/src/gantt-chart-controller.ts +473 -0
- package/src/locales.ts +78 -0
- package/src/ox-gantt-chart.ts +151 -484
- package/src/ox-gantt-resize-splitter.ts +18 -25
- package/src/ox-gantt.ts +174 -31
- package/src/ox-task-tooltip.ts +120 -0
- package/src/types.ts +13 -5
- package/src/utils.ts +4 -4
- package/stories/ox-gantt.stories.ts +118 -91
- package/themes/grist-theme.css +5 -3
- package/translations/en.json +11 -1
- package/translations/ja.json +11 -1
- package/translations/ko.json +11 -1
- package/translations/ms.json +11 -1
- package/translations/zh.json +11 -1
- package/dist/src/locale.d.ts +0 -1
- package/dist/src/locale.js +0 -49
- package/dist/src/locale.js.map +0 -1
- package/src/locale.ts +0 -51
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare const locales: {
|
|
2
|
+
'en-US': {
|
|
3
|
+
dateTime: string;
|
|
4
|
+
date: string;
|
|
5
|
+
time: string;
|
|
6
|
+
periods: string[];
|
|
7
|
+
days: string[];
|
|
8
|
+
shortDays: string[];
|
|
9
|
+
months: string[];
|
|
10
|
+
shortMonths: string[];
|
|
11
|
+
};
|
|
12
|
+
'ko-KR': {
|
|
13
|
+
dateTime: string;
|
|
14
|
+
date: string;
|
|
15
|
+
time: string;
|
|
16
|
+
periods: string[];
|
|
17
|
+
days: string[];
|
|
18
|
+
shortDays: string[];
|
|
19
|
+
months: string[];
|
|
20
|
+
shortMonths: string[];
|
|
21
|
+
};
|
|
22
|
+
'ja-JP': {
|
|
23
|
+
dateTime: string;
|
|
24
|
+
date: string;
|
|
25
|
+
time: string;
|
|
26
|
+
periods: string[];
|
|
27
|
+
days: string[];
|
|
28
|
+
shortDays: string[];
|
|
29
|
+
months: string[];
|
|
30
|
+
shortMonths: string[];
|
|
31
|
+
};
|
|
32
|
+
'zh-CN': {
|
|
33
|
+
dateTime: string;
|
|
34
|
+
date: string;
|
|
35
|
+
time: string;
|
|
36
|
+
periods: string[];
|
|
37
|
+
days: string[];
|
|
38
|
+
shortDays: string[];
|
|
39
|
+
months: string[];
|
|
40
|
+
shortMonths: string[];
|
|
41
|
+
};
|
|
42
|
+
'ms-MY': {
|
|
43
|
+
dateTime: string;
|
|
44
|
+
date: string;
|
|
45
|
+
time: string;
|
|
46
|
+
periods: string[];
|
|
47
|
+
days: string[];
|
|
48
|
+
shortDays: string[];
|
|
49
|
+
months: string[];
|
|
50
|
+
shortMonths: string[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const locales = {
|
|
2
|
+
'en-US': {
|
|
3
|
+
dateTime: '%x, %X',
|
|
4
|
+
date: '%-m/%-d/%Y',
|
|
5
|
+
time: '%-I:%M:%S %p',
|
|
6
|
+
periods: ['AM', 'PM'],
|
|
7
|
+
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
8
|
+
shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
9
|
+
months: [
|
|
10
|
+
'January',
|
|
11
|
+
'February',
|
|
12
|
+
'March',
|
|
13
|
+
'April',
|
|
14
|
+
'May',
|
|
15
|
+
'June',
|
|
16
|
+
'July',
|
|
17
|
+
'August',
|
|
18
|
+
'September',
|
|
19
|
+
'October',
|
|
20
|
+
'November',
|
|
21
|
+
'December'
|
|
22
|
+
],
|
|
23
|
+
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
|
24
|
+
},
|
|
25
|
+
'ko-KR': {
|
|
26
|
+
dateTime: '%x, %X',
|
|
27
|
+
date: '%Y-%m-%d',
|
|
28
|
+
time: '%H:%M:%S',
|
|
29
|
+
periods: ['오전', '오후'],
|
|
30
|
+
days: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
|
|
31
|
+
shortDays: ['일', '월', '화', '수', '목', '금', '토'],
|
|
32
|
+
months: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
|
33
|
+
shortMonths: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']
|
|
34
|
+
},
|
|
35
|
+
'ja-JP': {
|
|
36
|
+
dateTime: '%x, %X',
|
|
37
|
+
date: '%Y/%m/%d',
|
|
38
|
+
time: '%H:%M:%S',
|
|
39
|
+
periods: ['午前', '午後'],
|
|
40
|
+
days: ['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'],
|
|
41
|
+
shortDays: ['日', '月', '火', '水', '木', '金', '土'],
|
|
42
|
+
months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
|
43
|
+
shortMonths: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
|
|
44
|
+
},
|
|
45
|
+
'zh-CN': {
|
|
46
|
+
dateTime: '%x, %X',
|
|
47
|
+
date: '%Y-%m-%d',
|
|
48
|
+
time: '%H:%M:%S',
|
|
49
|
+
periods: ['上午', '下午'],
|
|
50
|
+
days: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
|
51
|
+
shortDays: ['日', '一', '二', '三', '四', '五', '六'],
|
|
52
|
+
months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
|
53
|
+
shortMonths: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
|
|
54
|
+
},
|
|
55
|
+
'ms-MY': {
|
|
56
|
+
dateTime: '%x, %X',
|
|
57
|
+
date: '%d/%m/%Y',
|
|
58
|
+
time: '%H:%M:%S',
|
|
59
|
+
periods: ['AM', 'PM'],
|
|
60
|
+
days: ['Ahad', 'Isnin', 'Selasa', 'Rabu', 'Khamis', 'Jumaat', 'Sabtu'],
|
|
61
|
+
shortDays: ['Ahd', 'Isn', 'Sel', 'Rab', 'Kha', 'Jum', 'Sab'],
|
|
62
|
+
months: [
|
|
63
|
+
'Januari',
|
|
64
|
+
'Februari',
|
|
65
|
+
'Mac',
|
|
66
|
+
'April',
|
|
67
|
+
'Mei',
|
|
68
|
+
'Jun',
|
|
69
|
+
'Julai',
|
|
70
|
+
'Ogos',
|
|
71
|
+
'September',
|
|
72
|
+
'Oktober',
|
|
73
|
+
'November',
|
|
74
|
+
'Disember'
|
|
75
|
+
],
|
|
76
|
+
shortMonths: ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ogo', 'Sep', 'Okt', 'Nov', 'Dis']
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=locales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.js","sourceRoot":"","sources":["../../src/locales.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,OAAO,EAAE;QACP,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;QACrB,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;QACpF,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;QAC5D,MAAM,EAAE;YACN,SAAS;YACT,UAAU;YACV,OAAO;YACP,OAAO;YACP,KAAK;YACL,MAAM;YACN,MAAM;YACN,QAAQ;YACR,WAAW;YACX,SAAS;YACT,UAAU;YACV,UAAU;SACX;QACD,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;KAClG;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;QACrB,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;QACv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E,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;KAClG;CACF,CAAA","sourcesContent":["export const locales = {\n 'en-US': {\n dateTime: '%x, %X',\n date: '%-m/%-d/%Y',\n time: '%-I:%M:%S %p',\n periods: ['AM', 'PM'],\n days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n ],\n shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n },\n 'ko-KR': {\n dateTime: '%x, %X',\n date: '%Y-%m-%d',\n time: '%H:%M:%S',\n periods: ['오전', '오후'],\n days: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],\n shortDays: ['일', '월', '화', '수', '목', '금', '토'],\n months: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],\n shortMonths: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']\n },\n 'ja-JP': {\n dateTime: '%x, %X',\n date: '%Y/%m/%d',\n time: '%H:%M:%S',\n periods: ['午前', '午後'],\n days: ['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'],\n shortDays: ['日', '月', '火', '水', '木', '金', '土'],\n months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],\n shortMonths: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']\n },\n 'zh-CN': {\n dateTime: '%x, %X',\n date: '%Y-%m-%d',\n time: '%H:%M:%S',\n periods: ['上午', '下午'],\n days: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],\n shortDays: ['日', '一', '二', '三', '四', '五', '六'],\n months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],\n shortMonths: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']\n },\n 'ms-MY': {\n dateTime: '%x, %X',\n date: '%d/%m/%Y',\n time: '%H:%M:%S',\n periods: ['AM', 'PM'],\n days: ['Ahad', 'Isnin', 'Selasa', 'Rabu', 'Khamis', 'Jumaat', 'Sabtu'],\n shortDays: ['Ahd', 'Isn', 'Sel', 'Rab', 'Kha', 'Jum', 'Sab'],\n months: [\n 'Januari',\n 'Februari',\n 'Mac',\n 'April',\n 'Mei',\n 'Jun',\n 'Julai',\n 'Ogos',\n 'September',\n 'Oktober',\n 'November',\n 'Disember'\n ],\n shortMonths: ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ogo', 'Sep', 'Okt', 'Nov', 'Dis']\n }\n}\n"]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import './ox-task-tooltip';
|
|
1
2
|
import { LitElement, PropertyValues, PropertyValueMap } from 'lit';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { Task } from './types.js';
|
|
5
|
-
type TimeScale = 'year-quarter' | 'year-month' | 'quarter-week' | 'week-day';
|
|
3
|
+
import { Task, TimeScale } from './types.js';
|
|
4
|
+
import { OxTaskTooltip } from './ox-task-tooltip.js';
|
|
6
5
|
export declare class OxGanttChart extends LitElement {
|
|
7
6
|
static styles: import("lit").CSSResult[];
|
|
8
7
|
fromDate: string;
|
|
@@ -10,30 +9,22 @@ export declare class OxGanttChart extends LitElement {
|
|
|
10
9
|
axisScale: TimeScale;
|
|
11
10
|
extendGridLines: boolean;
|
|
12
11
|
tasks: Task[];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
private fromTime;
|
|
16
|
-
private toTime;
|
|
17
|
-
private totalDays;
|
|
18
|
-
private _timeScale;
|
|
12
|
+
selectedTaskId?: string;
|
|
13
|
+
locale: string;
|
|
19
14
|
svgHeader: SVGElement;
|
|
20
15
|
svgBody: SVGElement;
|
|
21
16
|
container: HTMLDivElement;
|
|
17
|
+
tooltip: OxTaskTooltip;
|
|
18
|
+
private ganttChartController;
|
|
19
|
+
constructor();
|
|
22
20
|
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
23
21
|
updated(changedProperties: PropertyValues<this>): void;
|
|
24
22
|
render(): import("lit-html").TemplateResult<1>;
|
|
25
23
|
setVerticalOffset(offset: number): void;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
updateTimeScale(): void;
|
|
30
|
-
redraw(): void;
|
|
31
|
-
drawBody(): void;
|
|
32
|
-
getTaskColor(tags: TaskTag[]): string;
|
|
33
|
-
drawAxes(): void;
|
|
24
|
+
getVerticalOffset(): number;
|
|
25
|
+
handleWheelForHeader(event: WheelEvent): void;
|
|
26
|
+
updateLocale(locale: string): void;
|
|
34
27
|
initHeaderGestureHandlers(): void;
|
|
35
28
|
highlightSelection(startX: number, endX: number): void;
|
|
36
29
|
finalizeSelection(startX: number, endX: number): void;
|
|
37
|
-
handleWheelForHeader(event: WheelEvent): void;
|
|
38
30
|
}
|
|
39
|
-
export {};
|