@operato/gantt 2.0.0-alpha.154 → 2.0.0-beta.1
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 +18 -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
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import { CommonHeaderStyles } from '@operato/styles';
|
|
2
|
-
import '../src/lite-gantt.js';
|
|
3
1
|
import { html } from 'lit';
|
|
2
|
+
import { CommonHeaderStyles } from '@operato/styles';
|
|
3
|
+
import '../src/ox-gantt-chart.js';
|
|
4
4
|
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
|
5
5
|
export default {
|
|
6
|
-
title: 'ox-
|
|
7
|
-
component: 'ox-
|
|
6
|
+
title: 'ox-gantt-chart',
|
|
7
|
+
component: 'ox-gantt-chart',
|
|
8
8
|
argTypes: {
|
|
9
|
+
axisScale: { control: 'select', options: ['year-quarter', 'year-month', 'quarter-week', 'week-day'] },
|
|
10
|
+
fromDate: { control: 'string' },
|
|
11
|
+
toDate: { control: 'string' },
|
|
12
|
+
extendGridLines: { control: 'boolean' },
|
|
9
13
|
theme: { control: 'select', options: ['light', 'dark'] }
|
|
10
14
|
}
|
|
11
15
|
};
|
|
12
|
-
const Template = ({ theme = 'light' }) => html `
|
|
16
|
+
const Template = ({ axisScale = 'week-day', fromDate = '', toDate = '', extendGridLines, theme = 'light' }) => html `
|
|
13
17
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
14
18
|
|
|
15
19
|
<link href="/themes/light.css" rel="stylesheet" />
|
|
16
20
|
<link href="/themes/dark.css" rel="stylesheet" />
|
|
17
21
|
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
22
|
+
<link href="/themes/md-typescale-styles.css" rel="stylesheet" />
|
|
18
23
|
|
|
19
24
|
<link
|
|
20
25
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
@@ -40,15 +45,18 @@ const Template = ({ theme = 'light' }) => html `
|
|
|
40
45
|
<style>
|
|
41
46
|
body {
|
|
42
47
|
width: 100%;
|
|
43
|
-
height:
|
|
48
|
+
height: 800px;
|
|
44
49
|
text-align: center;
|
|
45
50
|
|
|
46
51
|
background-color: var(--md-sys-color-background);
|
|
47
52
|
color: var(--md-sys-color-on-background);
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
ox-gantt {
|
|
56
|
+
width: 90%;
|
|
57
|
+
height: 500px;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
|
|
52
60
|
background-color: var(--md-sys-color-primary-container);
|
|
53
61
|
color: var(--md-sys-color-on-primary-container);
|
|
54
62
|
}
|
|
@@ -58,17 +66,41 @@ const Template = ({ theme = 'light' }) => html `
|
|
|
58
66
|
document.body.classList.add('${theme}')
|
|
59
67
|
</script>
|
|
60
68
|
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
<style>
|
|
70
|
+
ox-gantt-chart {
|
|
71
|
+
height: 500px;
|
|
72
|
+
border: 1px solid black;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
75
|
+
|
|
76
|
+
<ox-gantt-chart
|
|
77
|
+
.axisScale=${axisScale}
|
|
78
|
+
.fromDate=${fromDate}
|
|
79
|
+
.toDate=${toDate}
|
|
80
|
+
?extend-grid-lines=${extendGridLines}
|
|
81
|
+
></ox-gantt-chart>
|
|
71
82
|
`;
|
|
72
|
-
export const
|
|
73
|
-
|
|
74
|
-
|
|
83
|
+
export const YearMonth = Template.bind({});
|
|
84
|
+
YearMonth.args = {
|
|
85
|
+
axisScale: 'year-quarter',
|
|
86
|
+
fromDate: '2020-01-01',
|
|
87
|
+
toDate: '2025-12-31'
|
|
88
|
+
};
|
|
89
|
+
YearMonth.args = {
|
|
90
|
+
axisScale: 'year-month',
|
|
91
|
+
fromDate: '2022-01-01',
|
|
92
|
+
toDate: '2024-12-31'
|
|
93
|
+
};
|
|
94
|
+
export const MonthWeek = Template.bind({});
|
|
95
|
+
MonthWeek.args = {
|
|
96
|
+
axisScale: 'quarter-week',
|
|
97
|
+
fromDate: '2022-01-01',
|
|
98
|
+
toDate: '2023-03-31'
|
|
99
|
+
};
|
|
100
|
+
export const WeekDay = Template.bind({});
|
|
101
|
+
WeekDay.args = {
|
|
102
|
+
axisScale: 'week-day',
|
|
103
|
+
fromDate: '2022-01-01',
|
|
104
|
+
toDate: '2022-11-15'
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=ox-gantt-chart.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-gantt-chart.stories.js","sourceRoot":"","sources":["../../stories/ox-gantt-chart.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAE1F,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE;QACR,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,YAAY,EAAE,cAAc,EA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AAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE,YAAY;IACtB,MAAM,EAAE,YAAY;CACrB,CAAA","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { CommonHeaderStyles } from '@operato/styles'\nimport '../src/ox-gantt-chart.js'\n\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nexport default {\n title: 'ox-gantt-chart',\n component: 'ox-gantt-chart',\n argTypes: {\n axisScale: { control: 'select', options: ['year-quarter', 'year-month', 'quarter-week', 'week-day'] },\n fromDate: { control: 'string' },\n toDate: { control: 'string' },\n extendGridLines: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n axisScale: 'year-quarter' | 'year-month' | 'quarter-week' | 'week-day'\n fromDate: string\n toDate: string\n extendGridLines: boolean\n theme: 'light' | 'dark'\n}\n\nconst Template: Story<ArgTypes> = ({\n axisScale = 'week-day',\n fromDate = '',\n toDate = '',\n extendGridLines,\n theme = 'light'\n}: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n <link href=\"/themes/md-typescale-styles.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n ${CommonHeaderStyles.cssText}\n </style>\n\n <style>\n body {\n width: 100%;\n height: 800px;\n text-align: center;\n\n background-color: var(--md-sys-color-background);\n color: var(--md-sys-color-on-background);\n }\n\n ox-gantt {\n width: 90%;\n height: 500px;\n box-sizing: border-box;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <style>\n ox-gantt-chart {\n height: 500px;\n border: 1px solid black;\n }\n </style>\n\n <ox-gantt-chart\n .axisScale=${axisScale}\n .fromDate=${fromDate}\n .toDate=${toDate}\n ?extend-grid-lines=${extendGridLines}\n ></ox-gantt-chart>\n`\n\nexport const YearMonth = Template.bind({})\nYearMonth.args = {\n axisScale: 'year-quarter',\n fromDate: '2020-01-01',\n toDate: '2025-12-31'\n}\n\nYearMonth.args = {\n axisScale: 'year-month',\n fromDate: '2022-01-01',\n toDate: '2024-12-31'\n}\n\nexport const MonthWeek = Template.bind({})\nMonthWeek.args = {\n axisScale: 'quarter-week',\n fromDate: '2022-01-01',\n toDate: '2023-03-31'\n}\n\nexport const WeekDay = Template.bind({})\nWeekDay.args = {\n axisScale: 'week-day',\n fromDate: '2022-01-01',\n toDate: '2022-11-15'\n}\n"]}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import '../src/gantt.js';
|
|
1
|
+
import '../src/ox-gantt.js';
|
|
2
2
|
import { TemplateResult } from 'lit';
|
|
3
|
+
import { Task } from '../src/types.js';
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
6
|
component: string;
|
|
6
7
|
argTypes: {
|
|
8
|
+
tasks: {
|
|
9
|
+
control: string;
|
|
10
|
+
};
|
|
7
11
|
theme: {
|
|
8
12
|
control: string;
|
|
9
13
|
options: string[];
|
|
@@ -17,6 +21,7 @@ interface Story<T> {
|
|
|
17
21
|
argTypes?: Record<string, unknown>;
|
|
18
22
|
}
|
|
19
23
|
interface ArgTypes {
|
|
24
|
+
tasks: Task[];
|
|
20
25
|
theme: 'light' | 'dark';
|
|
21
26
|
}
|
|
22
27
|
export declare const Regular: Story<ArgTypes>;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { CommonHeaderStyles } from '@operato/styles';
|
|
2
|
-
import '../src/gantt.js';
|
|
2
|
+
import '../src/ox-gantt.js';
|
|
3
3
|
import { html } from 'lit';
|
|
4
4
|
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
|
|
5
5
|
export default {
|
|
6
6
|
title: 'ox-gantt',
|
|
7
7
|
component: 'ox-gantt',
|
|
8
8
|
argTypes: {
|
|
9
|
+
tasks: { control: 'object' },
|
|
9
10
|
theme: { control: 'select', options: ['light', 'dark'] }
|
|
10
11
|
}
|
|
11
12
|
};
|
|
12
|
-
const Template = ({ theme = 'light' }) => html `
|
|
13
|
+
const Template = ({ theme = 'light', tasks }) => html `
|
|
13
14
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
14
15
|
|
|
15
16
|
<link href="/themes/light.css" rel="stylesheet" />
|
|
16
17
|
<link href="/themes/dark.css" rel="stylesheet" />
|
|
17
18
|
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
19
|
+
<link href="/themes/md-typescale-styles.css" rel="stylesheet" />
|
|
18
20
|
|
|
19
21
|
<link
|
|
20
22
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
@@ -40,15 +42,18 @@ const Template = ({ theme = 'light' }) => html `
|
|
|
40
42
|
<style>
|
|
41
43
|
body {
|
|
42
44
|
width: 100%;
|
|
43
|
-
height:
|
|
45
|
+
height: 800px;
|
|
44
46
|
text-align: center;
|
|
45
47
|
|
|
46
48
|
background-color: var(--md-sys-color-background);
|
|
47
49
|
color: var(--md-sys-color-on-background);
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
ox-gantt {
|
|
53
|
+
width: 90%;
|
|
54
|
+
height: 500px;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
|
|
52
57
|
background-color: var(--md-sys-color-primary-container);
|
|
53
58
|
color: var(--md-sys-color-on-primary-container);
|
|
54
59
|
}
|
|
@@ -58,17 +63,283 @@ const Template = ({ theme = 'light' }) => html `
|
|
|
58
63
|
document.body.classList.add('${theme}')
|
|
59
64
|
</script>
|
|
60
65
|
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
<ox-gantt
|
|
67
|
+
from-date="2022-12-27"
|
|
68
|
+
to-date="2024-12-31"
|
|
69
|
+
.tasks=${tasks}
|
|
70
|
+
@date-range-selected=${(e) => {
|
|
71
|
+
console.log('date-range-selected', e.detail);
|
|
66
72
|
}}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
@task-clicked=${(e) => {
|
|
74
|
+
console.log('task-clicked', e.detail);
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
</ox-gantt>
|
|
71
78
|
`;
|
|
79
|
+
const exampleSection = {
|
|
80
|
+
name: 'Development'
|
|
81
|
+
};
|
|
72
82
|
export const Regular = Template.bind({});
|
|
73
|
-
Regular.args = {
|
|
83
|
+
Regular.args = {
|
|
84
|
+
tasks: [
|
|
85
|
+
{
|
|
86
|
+
id: '1',
|
|
87
|
+
title: 'Design',
|
|
88
|
+
type: 'task',
|
|
89
|
+
section: exampleSection,
|
|
90
|
+
startTime: new Date('2023-01-01'),
|
|
91
|
+
endTime: new Date('2023-01-05'),
|
|
92
|
+
progress: 60,
|
|
93
|
+
after: '',
|
|
94
|
+
length: '5d',
|
|
95
|
+
tags: ['active'],
|
|
96
|
+
children: []
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: '2',
|
|
100
|
+
title: 'Development',
|
|
101
|
+
type: 'milestone',
|
|
102
|
+
section: exampleSection,
|
|
103
|
+
startTime: new Date('2023-01-06'),
|
|
104
|
+
endTime: new Date('2023-01-06'),
|
|
105
|
+
progress: 30,
|
|
106
|
+
after: '1',
|
|
107
|
+
length: '1d',
|
|
108
|
+
tags: ['milestone'],
|
|
109
|
+
children: []
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: '3',
|
|
113
|
+
title: 'Coding',
|
|
114
|
+
type: 'phase',
|
|
115
|
+
section: exampleSection,
|
|
116
|
+
startTime: new Date('2023-01-07'),
|
|
117
|
+
endTime: new Date('2023-01-15'),
|
|
118
|
+
progress: 10,
|
|
119
|
+
after: '2',
|
|
120
|
+
length: '9d',
|
|
121
|
+
tags: ['critical'],
|
|
122
|
+
children: [
|
|
123
|
+
{
|
|
124
|
+
id: '3-1',
|
|
125
|
+
title: 'Coding-A',
|
|
126
|
+
type: 'task',
|
|
127
|
+
section: exampleSection,
|
|
128
|
+
startTime: new Date('2023-01-07'),
|
|
129
|
+
endTime: new Date('2023-01-10'),
|
|
130
|
+
progress: 60,
|
|
131
|
+
after: '',
|
|
132
|
+
length: '4d',
|
|
133
|
+
tags: ['done'],
|
|
134
|
+
children: []
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: '3-2',
|
|
138
|
+
title: 'Coding-B',
|
|
139
|
+
type: 'task',
|
|
140
|
+
section: exampleSection,
|
|
141
|
+
startTime: new Date('2023-01-11'),
|
|
142
|
+
endTime: new Date('2023-01-15'),
|
|
143
|
+
after: '3-1',
|
|
144
|
+
length: '5d',
|
|
145
|
+
tags: ['active'],
|
|
146
|
+
children: []
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: '4',
|
|
152
|
+
title: 'Test',
|
|
153
|
+
type: 'milestone',
|
|
154
|
+
section: exampleSection,
|
|
155
|
+
startTime: new Date('2023-01-07'),
|
|
156
|
+
endTime: new Date('2023-01-10'),
|
|
157
|
+
progress: 100,
|
|
158
|
+
after: '1',
|
|
159
|
+
length: '1d',
|
|
160
|
+
tags: ['done'],
|
|
161
|
+
children: []
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: '5',
|
|
165
|
+
title: 'Deploy',
|
|
166
|
+
type: 'milestone',
|
|
167
|
+
section: exampleSection,
|
|
168
|
+
startTime: new Date('2023-01-15'),
|
|
169
|
+
endTime: new Date('2023-01-21'),
|
|
170
|
+
after: '4',
|
|
171
|
+
length: '1d',
|
|
172
|
+
tags: ['milestone'],
|
|
173
|
+
children: []
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: '6',
|
|
177
|
+
title: 'Publishing',
|
|
178
|
+
type: 'milestone',
|
|
179
|
+
section: exampleSection,
|
|
180
|
+
startTime: new Date('2023-01-11'),
|
|
181
|
+
endTime: new Date('2023-01-15'),
|
|
182
|
+
after: '5',
|
|
183
|
+
length: '1d',
|
|
184
|
+
tags: ['milestone'],
|
|
185
|
+
children: []
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: '7',
|
|
189
|
+
title: 'Provisioning',
|
|
190
|
+
type: 'milestone',
|
|
191
|
+
section: exampleSection,
|
|
192
|
+
startTime: new Date('2023-01-12'),
|
|
193
|
+
endTime: new Date('2023-01-15'),
|
|
194
|
+
after: '6',
|
|
195
|
+
length: '1d',
|
|
196
|
+
tags: ['milestone'],
|
|
197
|
+
children: []
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: '8',
|
|
201
|
+
title: 'Alpha Test',
|
|
202
|
+
type: 'milestone',
|
|
203
|
+
section: exampleSection,
|
|
204
|
+
startTime: new Date('2023-01-15'),
|
|
205
|
+
endTime: new Date('2023-01-17'),
|
|
206
|
+
after: '7',
|
|
207
|
+
length: '1d',
|
|
208
|
+
tags: ['critical'],
|
|
209
|
+
children: []
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: '9',
|
|
213
|
+
title: 'Beta Task',
|
|
214
|
+
type: 'milestone',
|
|
215
|
+
section: exampleSection,
|
|
216
|
+
startTime: new Date('2023-01-15'),
|
|
217
|
+
endTime: new Date('2023-01-18'),
|
|
218
|
+
after: '8',
|
|
219
|
+
length: '1d',
|
|
220
|
+
tags: ['active'],
|
|
221
|
+
children: []
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: '10',
|
|
225
|
+
title: 'Gamma Test',
|
|
226
|
+
type: 'milestone',
|
|
227
|
+
section: exampleSection,
|
|
228
|
+
startTime: new Date('2023-01-18'),
|
|
229
|
+
endTime: new Date('2023-01-19'),
|
|
230
|
+
after: '9',
|
|
231
|
+
length: '1d',
|
|
232
|
+
tags: ['critical'],
|
|
233
|
+
children: []
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: '11',
|
|
237
|
+
title: 'Zeta Test',
|
|
238
|
+
type: 'milestone',
|
|
239
|
+
section: exampleSection,
|
|
240
|
+
startTime: new Date('2023-01-18'),
|
|
241
|
+
endTime: new Date('2023-01-22'),
|
|
242
|
+
after: '9',
|
|
243
|
+
length: '1d',
|
|
244
|
+
tags: ['milestone'],
|
|
245
|
+
children: []
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
id: '12',
|
|
249
|
+
title: 'Release',
|
|
250
|
+
type: 'milestone',
|
|
251
|
+
section: exampleSection,
|
|
252
|
+
startTime: new Date('2023-01-18'),
|
|
253
|
+
endTime: new Date('2023-01-23'),
|
|
254
|
+
after: '9',
|
|
255
|
+
length: '1d',
|
|
256
|
+
tags: ['milestone'],
|
|
257
|
+
children: []
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
id: '13',
|
|
261
|
+
title: 'Release',
|
|
262
|
+
type: 'milestone',
|
|
263
|
+
section: exampleSection,
|
|
264
|
+
startTime: new Date('2023-01-22'),
|
|
265
|
+
endTime: new Date('2023-01-27'),
|
|
266
|
+
after: '12',
|
|
267
|
+
length: '1d',
|
|
268
|
+
tags: ['done'],
|
|
269
|
+
children: []
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
id: '14',
|
|
273
|
+
title: 'Release',
|
|
274
|
+
type: 'milestone',
|
|
275
|
+
section: exampleSection,
|
|
276
|
+
startTime: new Date('2023-01-27'),
|
|
277
|
+
endTime: new Date('2023-01-30'),
|
|
278
|
+
after: '13',
|
|
279
|
+
length: '1d',
|
|
280
|
+
tags: ['milestone'],
|
|
281
|
+
children: []
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
id: '15',
|
|
285
|
+
title: 'Release',
|
|
286
|
+
type: 'milestone',
|
|
287
|
+
section: exampleSection,
|
|
288
|
+
startTime: new Date('2023-01-30'),
|
|
289
|
+
endTime: new Date('2023-01-31'),
|
|
290
|
+
after: '14',
|
|
291
|
+
length: '1d',
|
|
292
|
+
tags: ['milestone'],
|
|
293
|
+
children: []
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
id: '16',
|
|
297
|
+
title: 'Release',
|
|
298
|
+
type: 'milestone',
|
|
299
|
+
section: exampleSection,
|
|
300
|
+
startTime: new Date('2023-01-31'),
|
|
301
|
+
endTime: new Date('2023-02-05'),
|
|
302
|
+
after: '15',
|
|
303
|
+
length: '1d',
|
|
304
|
+
tags: ['active'],
|
|
305
|
+
children: []
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
id: '17',
|
|
309
|
+
title: 'Release',
|
|
310
|
+
type: 'milestone',
|
|
311
|
+
section: exampleSection,
|
|
312
|
+
startTime: new Date('2023-02-06'),
|
|
313
|
+
endTime: new Date('2023-02-07'),
|
|
314
|
+
after: '16',
|
|
315
|
+
length: '1d',
|
|
316
|
+
tags: ['milestone'],
|
|
317
|
+
children: []
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
id: '18',
|
|
321
|
+
title: 'Release',
|
|
322
|
+
type: 'milestone',
|
|
323
|
+
section: exampleSection,
|
|
324
|
+
startTime: new Date('2023-02-08'),
|
|
325
|
+
endTime: new Date('2023-02-09'),
|
|
326
|
+
after: '17',
|
|
327
|
+
length: '1d',
|
|
328
|
+
tags: ['critical'],
|
|
329
|
+
children: []
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: '19',
|
|
333
|
+
title: 'Release',
|
|
334
|
+
type: 'milestone',
|
|
335
|
+
section: exampleSection,
|
|
336
|
+
startTime: new Date('2023-02-10'),
|
|
337
|
+
endTime: new Date('2023-02-25'),
|
|
338
|
+
after: '18',
|
|
339
|
+
length: '1d',
|
|
340
|
+
tags: ['milestone'],
|
|
341
|
+
children: []
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
};
|
|
74
345
|
//# sourceMappingURL=ox-gantt.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-gantt.stories.js","sourceRoot":"","sources":["../../stories/ox-gantt.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAI1F,eAAe;IACb,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAYD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,GAAG,OAAO,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;MAqBnE,iBAAiB,CAAC,OAAO;;;;MAIzB,kBAAkB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;mCAqBG,KAAK;;;;;;kBAMtB,CAAC,CAAc,EAAE,EAAE;IAC3B,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC;;;;;CAKR,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import { CommonHeaderStyles } from '@operato/styles'\nimport '../src/gantt.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nimport { Task, Section } from '../src/types.js'\n\nexport default {\n title: 'ox-gantt',\n component: 'ox-gantt',\n argTypes: {\n theme: { control: 'select', options: ['light', 'dark'] }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n theme: 'light' | 'dark'\n}\n\nconst Template: Story<ArgTypes> = ({ theme = 'light' }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n ${CommonHeaderStyles.cssText}\n </style>\n\n <style>\n body {\n width: 100%;\n height: 500px;\n text-align: center;\n\n background-color: var(--md-sys-color-background);\n color: var(--md-sys-color-on-background);\n }\n\n .header {\n padding: var(--spacing-medium);\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <div class=\"header\">\n <div class=\"filters\">\n <ox-gantt\n @change=${(e: CustomEvent) => {\n console.log('search form changed', e.detail)\n }}\n >\n </ox-gantt>\n </div>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
|
|
1
|
+
{"version":3,"file":"ox-gantt.stories.js","sourceRoot":"","sources":["../../stories/ox-gantt.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAI1F,eAAe;IACb,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAaD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,GAAG,OAAO,EAAE,KAAK,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;MAsB1E,iBAAiB,CAAC,OAAO;;;;MAIzB,kBAAkB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;mCAwBG,KAAK;;;;;;aAM3B,KAAK;2BACS,CAAC,CAAc,EAAE,EAAE;IACxC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC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AAI,CAAC,YAAY,CAAC;YACjC,OAAO,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YAC/B,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,CAAC,WAAW,CAAC;YACnB,QAAQ,EAAE,EAAE;SACb;QACD;YACE,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,cAAc;YACvB,SAAS,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YACjC,OAAO,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YAC/B,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,CAAC,UAAU,CAAC;YAClB,QAAQ,EAAE,EAAE;SACb;QACD;YACE,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,cAAc;YACvB,SAAS,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YACjC,OAAO,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YAC/B,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,CAAC,WAAW,CAAC;YACnB,QAAQ,EAAE,EAAE;SACb;KACF;CACF,CAAA","sourcesContent":["import { CommonHeaderStyles } from '@operato/styles'\nimport '../src/ox-gantt.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\n\nimport { Task, Section } from '../src/types.js'\n\nexport default {\n title: 'ox-gantt',\n component: 'ox-gantt',\n argTypes: {\n tasks: { control: 'object' },\n theme: { control: 'select', options: ['light', 'dark'] }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n tasks: Task[]\n theme: 'light' | 'dark'\n}\n\nconst Template: Story<ArgTypes> = ({ theme = 'light', tasks }: ArgTypes) => html`\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\" rel=\"stylesheet\" />\n\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n <link href=\"/themes/md-typescale-styles.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n ${MDTypeScaleStyles.cssText}\n </style>\n\n <style>\n ${CommonHeaderStyles.cssText}\n </style>\n\n <style>\n body {\n width: 100%;\n height: 800px;\n text-align: center;\n\n background-color: var(--md-sys-color-background);\n color: var(--md-sys-color-on-background);\n }\n\n ox-gantt {\n width: 90%;\n height: 500px;\n box-sizing: border-box;\n\n background-color: var(--md-sys-color-primary-container);\n color: var(--md-sys-color-on-primary-container);\n }\n </style>\n\n <script>\n document.body.classList.add('${theme}')\n </script>\n\n <ox-gantt\n from-date=\"2022-12-27\"\n to-date=\"2024-12-31\"\n .tasks=${tasks}\n @date-range-selected=${(e: CustomEvent) => {\n console.log('date-range-selected', e.detail)\n }}\n @task-clicked=${(e: CustomEvent) => {\n console.log('task-clicked', e.detail)\n }}\n >\n </ox-gantt>\n`\n\nconst exampleSection: Section = {\n name: 'Development'\n}\n\nexport const Regular = Template.bind({})\nRegular.args = {\n tasks: [\n {\n id: '1',\n title: 'Design',\n type: 'task',\n section: exampleSection,\n startTime: new Date('2023-01-01'),\n endTime: new Date('2023-01-05'),\n progress: 60,\n after: '',\n length: '5d',\n tags: ['active'],\n children: []\n },\n {\n id: '2',\n title: 'Development',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-06'),\n endTime: new Date('2023-01-06'),\n progress: 30,\n after: '1',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '3',\n title: 'Coding',\n type: 'phase',\n section: exampleSection,\n startTime: new Date('2023-01-07'),\n endTime: new Date('2023-01-15'),\n progress: 10,\n after: '2',\n length: '9d',\n tags: ['critical'],\n children: [\n {\n id: '3-1',\n title: 'Coding-A',\n type: 'task',\n section: exampleSection,\n startTime: new Date('2023-01-07'),\n endTime: new Date('2023-01-10'),\n progress: 60,\n after: '',\n length: '4d',\n tags: ['done'],\n children: []\n },\n {\n id: '3-2',\n title: 'Coding-B',\n type: 'task',\n section: exampleSection,\n startTime: new Date('2023-01-11'),\n endTime: new Date('2023-01-15'),\n after: '3-1',\n length: '5d',\n tags: ['active'],\n children: []\n }\n ]\n },\n {\n id: '4',\n title: 'Test',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-07'),\n endTime: new Date('2023-01-10'),\n progress: 100,\n after: '1',\n length: '1d',\n tags: ['done'],\n children: []\n },\n {\n id: '5',\n title: 'Deploy',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-15'),\n endTime: new Date('2023-01-21'),\n after: '4',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '6',\n title: 'Publishing',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-11'),\n endTime: new Date('2023-01-15'),\n after: '5',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '7',\n title: 'Provisioning',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-12'),\n endTime: new Date('2023-01-15'),\n after: '6',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '8',\n title: 'Alpha Test',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-15'),\n endTime: new Date('2023-01-17'),\n after: '7',\n length: '1d',\n tags: ['critical'],\n children: []\n },\n {\n id: '9',\n title: 'Beta Task',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-15'),\n endTime: new Date('2023-01-18'),\n after: '8',\n length: '1d',\n tags: ['active'],\n children: []\n },\n {\n id: '10',\n title: 'Gamma Test',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-18'),\n endTime: new Date('2023-01-19'),\n after: '9',\n length: '1d',\n tags: ['critical'],\n children: []\n },\n {\n id: '11',\n title: 'Zeta Test',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-18'),\n endTime: new Date('2023-01-22'),\n after: '9',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '12',\n title: 'Release',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-18'),\n endTime: new Date('2023-01-23'),\n after: '9',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '13',\n title: 'Release',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-22'),\n endTime: new Date('2023-01-27'),\n after: '12',\n length: '1d',\n tags: ['done'],\n children: []\n },\n {\n id: '14',\n title: 'Release',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-27'),\n endTime: new Date('2023-01-30'),\n after: '13',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '15',\n title: 'Release',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-30'),\n endTime: new Date('2023-01-31'),\n after: '14',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '16',\n title: 'Release',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-01-31'),\n endTime: new Date('2023-02-05'),\n after: '15',\n length: '1d',\n tags: ['active'],\n children: []\n },\n {\n id: '17',\n title: 'Release',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-02-06'),\n endTime: new Date('2023-02-07'),\n after: '16',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '18',\n title: 'Release',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-02-08'),\n endTime: new Date('2023-02-09'),\n after: '17',\n length: '1d',\n tags: ['critical'],\n children: []\n },\n {\n id: '19',\n title: 'Release',\n type: 'milestone',\n section: exampleSection,\n startTime: new Date('2023-02-10'),\n endTime: new Date('2023-02-25'),\n after: '18',\n length: '1d',\n tags: ['milestone'],\n children: []\n }\n ]\n}\n"]}
|