@operato/gantt 2.0.0-beta.0 → 2.0.0-beta.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.
- package/CHANGELOG.md +19 -0
- package/dist/src/locale.d.ts +1 -0
- package/dist/src/locale.js +49 -0
- package/dist/src/locale.js.map +1 -0
- package/dist/src/ox-gantt-chart.d.ts +39 -0
- package/dist/src/ox-gantt-chart.js +707 -0
- package/dist/src/ox-gantt-chart.js.map +1 -0
- package/dist/src/ox-gantt-resize-splitter.d.ts +13 -0
- package/dist/src/ox-gantt-resize-splitter.js +117 -0
- package/dist/src/ox-gantt-resize-splitter.js.map +1 -0
- package/dist/src/ox-gantt.d.ts +24 -0
- package/dist/src/ox-gantt.js +186 -0
- package/dist/src/ox-gantt.js.map +1 -0
- package/dist/src/types.d.ts +10 -5
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils.d.ts +3 -0
- package/dist/src/utils.js +10 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/stories/ox-gantt-chart.stories.d.ts +41 -0
- package/dist/stories/{ox-lite-gantt.stories.js → ox-gantt-chart.stories.js} +53 -21
- package/dist/stories/ox-gantt-chart.stories.js.map +1 -0
- package/dist/stories/ox-gantt.stories.d.ts +6 -1
- package/dist/stories/ox-gantt.stories.js +286 -15
- package/dist/stories/ox-gantt.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -4
- package/src/locale.ts +51 -0
- package/src/ox-gantt-chart.ts +773 -0
- package/src/ox-gantt-resize-splitter.ts +137 -0
- package/src/ox-gantt.ts +177 -0
- package/src/types.ts +12 -6
- package/src/utils.ts +13 -0
- package/stories/{ox-lite-gantt.stories.ts → ox-gantt-chart.stories.ts} +65 -22
- package/stories/ox-gantt.stories.ts +289 -16
- package/themes/dark-hc.css +151 -0
- package/themes/dark-mc.css +151 -0
- package/themes/dark.css +151 -0
- package/themes/grist-theme.css +169 -0
- package/themes/light-hc.css +151 -0
- package/themes/light-mc.css +151 -0
- package/themes/light.css +151 -0
- package/themes/md-typescale-styles.css +100 -0
- package/themes/spacing.css +43 -0
- package/themes/state-color.css +6 -0
- package/dist/src/gantt.d.ts +0 -28
- package/dist/src/gantt.js +0 -178
- package/dist/src/gantt.js.map +0 -1
- package/dist/src/lite-gantt.d.ts +0 -27
- package/dist/src/lite-gantt.js +0 -146
- package/dist/src/lite-gantt.js.map +0 -1
- package/dist/stories/ox-lite-gantt.stories.d.ts +0 -22
- package/dist/stories/ox-lite-gantt.stories.js.map +0 -1
- package/src/gantt.ts +0 -191
- package/src/lite-gantt.ts +0 -152
- package/src/renderer.txt +0 -775
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.0-beta.4](https://github.com/hatiolab/operato/compare/v2.0.0-beta.3...v2.0.0-beta.4) (2024-06-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fix
|
|
10
|
+
|
|
11
|
+
* theming styles ([15fa201](https://github.com/hatiolab/operato/commit/15fa20198d7adc6b57f16e408f8dee94c40113f5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [2.0.0-beta.1](https://github.com/hatiolab/operato/compare/v2.0.0-beta.0...v2.0.0-beta.1) (2024-06-03)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### :bug: Bug Fix
|
|
19
|
+
|
|
20
|
+
* gantt-upgrade ([46e9bff](https://github.com/hatiolab/operato/commit/46e9bffdebaeb7964df9f2b6e5c82625b494689c))
|
|
21
|
+
* gantt-upgrade ([4f17a67](https://github.com/hatiolab/operato/commit/4f17a67fa09760a64907ebb687eb4710db4782c3))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.0.0-beta.0](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.158...v2.0.0-beta.0) (2024-06-01)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @operato/gantt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setLocale(locale: string): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { timeFormatDefaultLocale } from 'd3-time-format';
|
|
2
|
+
// 한국어 로케일 정의
|
|
3
|
+
const koKR = {
|
|
4
|
+
dateTime: '%Y-%m-%d %a %X',
|
|
5
|
+
date: '%Y-%m-%d',
|
|
6
|
+
time: '%H:%M:%S',
|
|
7
|
+
periods: ['AM', 'PM'],
|
|
8
|
+
days: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
|
|
9
|
+
shortDays: ['일', '월', '화', '수', '목', '금', '토'],
|
|
10
|
+
months: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
|
11
|
+
shortMonths: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']
|
|
12
|
+
};
|
|
13
|
+
// 영어 로케일 정의
|
|
14
|
+
const enUS = {
|
|
15
|
+
dateTime: '%x, %X',
|
|
16
|
+
date: '%-m/%-d/%Y',
|
|
17
|
+
time: '%-I:%M:%S %p',
|
|
18
|
+
periods: ['AM', 'PM'],
|
|
19
|
+
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
20
|
+
shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
21
|
+
months: [
|
|
22
|
+
'January',
|
|
23
|
+
'February',
|
|
24
|
+
'March',
|
|
25
|
+
'April',
|
|
26
|
+
'May',
|
|
27
|
+
'June',
|
|
28
|
+
'July',
|
|
29
|
+
'August',
|
|
30
|
+
'September',
|
|
31
|
+
'October',
|
|
32
|
+
'November',
|
|
33
|
+
'December'
|
|
34
|
+
],
|
|
35
|
+
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
|
36
|
+
};
|
|
37
|
+
// 로케일 설정 함수
|
|
38
|
+
export function setLocale(locale) {
|
|
39
|
+
if (locale === 'ko') {
|
|
40
|
+
timeFormatDefaultLocale(koKR);
|
|
41
|
+
}
|
|
42
|
+
else if (locale === 'en') {
|
|
43
|
+
timeFormatDefaultLocale(enUS);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// 예제 언어 선택
|
|
47
|
+
const selectedLocale = 'ko';
|
|
48
|
+
setLocale(selectedLocale);
|
|
49
|
+
//# sourceMappingURL=locale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAExD,aAAa;AACb,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE,gBAAgB;IAC1B,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACvD,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC9C,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACnF,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE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d',\n time: '%H:%M:%S',\n periods: ['AM', 'PM'],\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} as d3.TimeLocaleDefinition\n\n// 영어 로케일 정의\nconst enUS = {\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} as d3.TimeLocaleDefinition\n\n// 로케일 설정 함수\nexport function setLocale(locale: string) {\n if (locale === 'ko') {\n timeFormatDefaultLocale(koKR)\n } else if (locale === 'en') {\n timeFormatDefaultLocale(enUS)\n }\n}\n\n// 예제 언어 선택\nconst selectedLocale = 'ko'\nsetLocale(selectedLocale)\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LitElement, PropertyValues, PropertyValueMap } from 'lit';
|
|
2
|
+
import * as d3 from 'd3';
|
|
3
|
+
import { LEVEL, TaskTag } from './types';
|
|
4
|
+
import { Task } from './types.js';
|
|
5
|
+
type TimeScale = 'year-quarter' | 'year-month' | 'quarter-week' | 'week-day';
|
|
6
|
+
export declare class OxGanttChart extends LitElement {
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
fromDate: string;
|
|
9
|
+
toDate: string;
|
|
10
|
+
axisScale: TimeScale;
|
|
11
|
+
extendGridLines: boolean;
|
|
12
|
+
tasks: Task[];
|
|
13
|
+
baseWidth: number;
|
|
14
|
+
level: LEVEL;
|
|
15
|
+
private fromTime;
|
|
16
|
+
private toTime;
|
|
17
|
+
private totalDays;
|
|
18
|
+
private _timeScale;
|
|
19
|
+
svgHeader: SVGElement;
|
|
20
|
+
svgBody: SVGElement;
|
|
21
|
+
container: HTMLDivElement;
|
|
22
|
+
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
23
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
24
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
setVerticalOffset(offset: number): void;
|
|
26
|
+
getScale(): number;
|
|
27
|
+
getChartWidth(): number;
|
|
28
|
+
get timeScale(): d3.ScaleTime<number, number, never>;
|
|
29
|
+
updateTimeScale(): void;
|
|
30
|
+
redraw(): void;
|
|
31
|
+
drawBody(): void;
|
|
32
|
+
getTaskColor(tags: TaskTag[]): string;
|
|
33
|
+
drawAxes(): void;
|
|
34
|
+
initHeaderGestureHandlers(): void;
|
|
35
|
+
highlightSelection(startX: number, endX: number): void;
|
|
36
|
+
finalizeSelection(startX: number, endX: number): void;
|
|
37
|
+
handleWheelForHeader(event: WheelEvent): void;
|
|
38
|
+
}
|
|
39
|
+
export {};
|