@operato/gantt 2.0.0-beta.17 → 2.0.0-beta.18
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 +9 -0
- package/dist/src/gantt-chart-controller.d.ts +3 -3
- package/dist/src/gantt-chart-controller.js +6 -4
- package/dist/src/gantt-chart-controller.js.map +1 -1
- package/dist/src/ox-gantt-chart.d.ts +1 -3
- package/dist/src/ox-gantt-chart.js +4 -0
- package/dist/src/ox-gantt-chart.js.map +1 -1
- package/dist/src/ox-gantt.d.ts +3 -2
- package/dist/src/ox-gantt.js +11 -7
- package/dist/src/ox-gantt.js.map +1 -1
- package/dist/src/types.d.ts +3 -3
- 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 +9 -4
- package/dist/stories/ox-gantt.stories.js +68 -66
- package/dist/stories/ox-gantt.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/gantt-chart-controller.ts +10 -7
- package/src/ox-gantt-chart.ts +6 -3
- package/src/ox-gantt.ts +9 -9
- package/src/types.ts +5 -5
- package/src/utils.ts +4 -4
- package/stories/ox-gantt.stories.ts +77 -67
package/dist/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAgB,CAAC,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,CAAC,CAAA;AAEtF,MAAM,UAAU,OAAO,CAAC,KAAkE;IACxF,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;IAClE,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;AACxB,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAkE;IAC1F,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;IACtD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;AACxB,CAAC","sourcesContent":["import { TimeScale } from './types'\n\nconst levels: TimeScale[] = ['week-day', 'quarter-week', 'year-month', 'year-quarter']\n\nexport function levelUp(level: 'year-quarter' | 'year-month' | 'quarter-week' | 'week-day'): TimeScale {\n const current = Math.min(levels.length, levels.indexOf(level) + 1)\n return levels[current]\n}\n\nexport function levelDown(level: 'year-quarter' | 'year-month' | 'quarter-week' | 'week-day'): TimeScale {\n const current = Math.max(0, levels.indexOf(level) - 1)\n return levels[current]\n}\n"]}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import '../src/ox-gantt.js';
|
|
2
2
|
import { TemplateResult } from 'lit';
|
|
3
|
-
import { Task } from '../src/types.js';
|
|
3
|
+
import { Task, TimeScale } from '../src/types.js';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: string;
|
|
7
7
|
argTypes: {
|
|
8
|
-
tasks: {
|
|
9
|
-
control: string;
|
|
10
|
-
};
|
|
11
8
|
fromDate: {
|
|
12
9
|
control: string;
|
|
13
10
|
};
|
|
14
11
|
toDate: {
|
|
15
12
|
control: string;
|
|
16
13
|
};
|
|
14
|
+
timeScale: {
|
|
15
|
+
control: string;
|
|
16
|
+
options: string[];
|
|
17
|
+
};
|
|
17
18
|
extendGridLines: {
|
|
18
19
|
control: string;
|
|
19
20
|
};
|
|
@@ -21,6 +22,9 @@ declare const _default: {
|
|
|
21
22
|
control: string;
|
|
22
23
|
options: string[];
|
|
23
24
|
};
|
|
25
|
+
tasks: {
|
|
26
|
+
control: string;
|
|
27
|
+
};
|
|
24
28
|
};
|
|
25
29
|
};
|
|
26
30
|
export default _default;
|
|
@@ -34,6 +38,7 @@ interface ArgTypes {
|
|
|
34
38
|
fromDate: number | string;
|
|
35
39
|
toDate: number | string;
|
|
36
40
|
extendGridLines: boolean;
|
|
41
|
+
timeScale: TimeScale;
|
|
37
42
|
theme: 'light' | 'dark';
|
|
38
43
|
}
|
|
39
44
|
export declare const Regular: Story<ArgTypes>;
|
|
@@ -6,14 +6,15 @@ export default {
|
|
|
6
6
|
title: 'ox-gantt',
|
|
7
7
|
component: 'ox-gantt',
|
|
8
8
|
argTypes: {
|
|
9
|
-
tasks: { control: 'object' },
|
|
10
9
|
fromDate: { control: 'date' },
|
|
11
10
|
toDate: { control: 'date' },
|
|
11
|
+
timeScale: { control: 'select', options: ['year-quarter', 'year-month', 'quarter-week', 'week-day'] },
|
|
12
12
|
extendGridLines: { control: 'boolean' },
|
|
13
|
-
theme: { control: 'select', options: ['light', 'dark'] }
|
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] },
|
|
14
|
+
tasks: { control: 'object' }
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
|
-
const Template = ({ theme = 'light', tasks, fromDate, toDate, extendGridLines }) => html `
|
|
17
|
+
const Template = ({ theme = 'light', tasks, fromDate, toDate, extendGridLines, timeScale = 'week-day' }) => html `
|
|
17
18
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
18
19
|
|
|
19
20
|
<link href="/themes/light.css" rel="stylesheet" />
|
|
@@ -69,6 +70,7 @@ const Template = ({ theme = 'light', tasks, fromDate, toDate, extendGridLines })
|
|
|
69
70
|
<ox-gantt
|
|
70
71
|
from-date=${new Date(fromDate).toISOString().split('T')[0]}
|
|
71
72
|
to-date=${new Date(toDate).toISOString().split('T')[0]}
|
|
73
|
+
.timeScale=${timeScale}
|
|
72
74
|
.tasks=${tasks}
|
|
73
75
|
@date-range-selected=${(e) => {
|
|
74
76
|
console.log('date-range-selected', e.detail);
|
|
@@ -98,9 +100,9 @@ Regular.args = {
|
|
|
98
100
|
id: '1',
|
|
99
101
|
title: 'Design',
|
|
100
102
|
type: 'task',
|
|
101
|
-
section: developmentSection,
|
|
102
|
-
startDate:
|
|
103
|
-
endDate:
|
|
103
|
+
// section: developmentSection,
|
|
104
|
+
startDate: '2023-01-01',
|
|
105
|
+
endDate: '2023-01-05',
|
|
104
106
|
progress: 60,
|
|
105
107
|
dependsOn: '',
|
|
106
108
|
length: '5d',
|
|
@@ -111,9 +113,9 @@ Regular.args = {
|
|
|
111
113
|
id: '2',
|
|
112
114
|
title: 'Development',
|
|
113
115
|
type: 'milestone',
|
|
114
|
-
section: developmentSection,
|
|
115
|
-
startDate:
|
|
116
|
-
endDate:
|
|
116
|
+
// section: developmentSection,
|
|
117
|
+
startDate: '2023-01-06',
|
|
118
|
+
endDate: '2023-01-06',
|
|
117
119
|
progress: 30,
|
|
118
120
|
dependsOn: '1',
|
|
119
121
|
length: '1d',
|
|
@@ -124,9 +126,9 @@ Regular.args = {
|
|
|
124
126
|
id: '3',
|
|
125
127
|
title: 'Coding',
|
|
126
128
|
type: 'phase',
|
|
127
|
-
section: developmentSection,
|
|
128
|
-
startDate:
|
|
129
|
-
endDate:
|
|
129
|
+
// section: developmentSection,
|
|
130
|
+
startDate: '2023-01-07',
|
|
131
|
+
endDate: '2023-01-15',
|
|
130
132
|
progress: 10,
|
|
131
133
|
dependsOn: '2',
|
|
132
134
|
length: '9d',
|
|
@@ -136,9 +138,9 @@ Regular.args = {
|
|
|
136
138
|
id: '3-1',
|
|
137
139
|
title: 'Coding-A',
|
|
138
140
|
type: 'task',
|
|
139
|
-
section: developmentSection,
|
|
140
|
-
startDate:
|
|
141
|
-
endDate:
|
|
141
|
+
// section: developmentSection,
|
|
142
|
+
startDate: '2023-01-07',
|
|
143
|
+
endDate: '2023-01-10',
|
|
142
144
|
progress: 60,
|
|
143
145
|
dependsOn: '',
|
|
144
146
|
length: '4d',
|
|
@@ -149,9 +151,9 @@ Regular.args = {
|
|
|
149
151
|
id: '3-2',
|
|
150
152
|
title: 'Coding-B',
|
|
151
153
|
type: 'task',
|
|
152
|
-
section: developmentSection,
|
|
153
|
-
startDate:
|
|
154
|
-
endDate:
|
|
154
|
+
// section: developmentSection,
|
|
155
|
+
startDate: '2023-01-11',
|
|
156
|
+
endDate: '2023-01-15',
|
|
155
157
|
dependsOn: '3-1',
|
|
156
158
|
length: '5d',
|
|
157
159
|
tags: ['active'],
|
|
@@ -163,9 +165,9 @@ Regular.args = {
|
|
|
163
165
|
id: '4',
|
|
164
166
|
title: 'Test',
|
|
165
167
|
type: 'milestone',
|
|
166
|
-
section: developmentSection,
|
|
167
|
-
startDate:
|
|
168
|
-
endDate:
|
|
168
|
+
// section: developmentSection,
|
|
169
|
+
startDate: '2023-01-07',
|
|
170
|
+
endDate: '2023-01-10',
|
|
169
171
|
progress: 100,
|
|
170
172
|
dependsOn: '1',
|
|
171
173
|
length: '1d',
|
|
@@ -176,9 +178,9 @@ Regular.args = {
|
|
|
176
178
|
id: '5',
|
|
177
179
|
title: 'Deploy',
|
|
178
180
|
type: 'milestone',
|
|
179
|
-
section: developmentSection,
|
|
180
|
-
startDate:
|
|
181
|
-
endDate:
|
|
181
|
+
// section: developmentSection,
|
|
182
|
+
startDate: '2023-01-15',
|
|
183
|
+
endDate: '2023-01-21',
|
|
182
184
|
dependsOn: '4',
|
|
183
185
|
length: '1d',
|
|
184
186
|
tags: ['milestone'],
|
|
@@ -188,9 +190,9 @@ Regular.args = {
|
|
|
188
190
|
id: '6',
|
|
189
191
|
title: 'Publishing',
|
|
190
192
|
type: 'milestone',
|
|
191
|
-
section: developmentSection,
|
|
192
|
-
startDate:
|
|
193
|
-
endDate:
|
|
193
|
+
// section: developmentSection,
|
|
194
|
+
startDate: '2023-01-11',
|
|
195
|
+
endDate: '2023-01-15',
|
|
194
196
|
dependsOn: '5',
|
|
195
197
|
length: '1d',
|
|
196
198
|
tags: ['milestone'],
|
|
@@ -200,9 +202,9 @@ Regular.args = {
|
|
|
200
202
|
id: '7',
|
|
201
203
|
title: 'Provisioning',
|
|
202
204
|
type: 'milestone',
|
|
203
|
-
section: developmentSection,
|
|
204
|
-
startDate:
|
|
205
|
-
endDate:
|
|
205
|
+
// section: developmentSection,
|
|
206
|
+
startDate: '2023-01-12',
|
|
207
|
+
endDate: '2023-01-15',
|
|
206
208
|
dependsOn: '6',
|
|
207
209
|
length: '1d',
|
|
208
210
|
tags: ['milestone'],
|
|
@@ -212,9 +214,9 @@ Regular.args = {
|
|
|
212
214
|
id: '8',
|
|
213
215
|
title: 'Alpha Test',
|
|
214
216
|
type: 'milestone',
|
|
215
|
-
section: testSection,
|
|
216
|
-
startDate:
|
|
217
|
-
endDate:
|
|
217
|
+
// section: testSection,
|
|
218
|
+
startDate: '2023-01-15',
|
|
219
|
+
endDate: '2023-01-17',
|
|
218
220
|
dependsOn: '7',
|
|
219
221
|
length: '1d',
|
|
220
222
|
tags: ['critical'],
|
|
@@ -224,9 +226,9 @@ Regular.args = {
|
|
|
224
226
|
id: '9',
|
|
225
227
|
title: 'Beta Task',
|
|
226
228
|
type: 'milestone',
|
|
227
|
-
section: testSection,
|
|
228
|
-
startDate:
|
|
229
|
-
endDate:
|
|
229
|
+
// section: testSection,
|
|
230
|
+
startDate: '2023-01-15',
|
|
231
|
+
endDate: '2023-01-18',
|
|
230
232
|
dependsOn: '8',
|
|
231
233
|
length: '1d',
|
|
232
234
|
tags: ['active'],
|
|
@@ -236,9 +238,9 @@ Regular.args = {
|
|
|
236
238
|
id: '10',
|
|
237
239
|
title: 'Gamma Test',
|
|
238
240
|
type: 'milestone',
|
|
239
|
-
section: testSection,
|
|
240
|
-
startDate:
|
|
241
|
-
endDate:
|
|
241
|
+
// section: testSection,
|
|
242
|
+
startDate: '2023-01-18',
|
|
243
|
+
endDate: '2023-01-19',
|
|
242
244
|
dependsOn: '9',
|
|
243
245
|
length: '1d',
|
|
244
246
|
tags: ['critical'],
|
|
@@ -248,9 +250,9 @@ Regular.args = {
|
|
|
248
250
|
id: '11',
|
|
249
251
|
title: 'Zeta Test',
|
|
250
252
|
type: 'milestone',
|
|
251
|
-
section: testSection,
|
|
252
|
-
startDate:
|
|
253
|
-
endDate:
|
|
253
|
+
// section: testSection,
|
|
254
|
+
startDate: '2023-01-18',
|
|
255
|
+
endDate: '2023-01-22',
|
|
254
256
|
dependsOn: '9',
|
|
255
257
|
length: '1d',
|
|
256
258
|
tags: ['milestone'],
|
|
@@ -260,9 +262,9 @@ Regular.args = {
|
|
|
260
262
|
id: '12',
|
|
261
263
|
title: 'Release',
|
|
262
264
|
type: 'milestone',
|
|
263
|
-
section: releaseSection,
|
|
264
|
-
startDate:
|
|
265
|
-
endDate:
|
|
265
|
+
// section: releaseSection,
|
|
266
|
+
startDate: '2023-01-18',
|
|
267
|
+
endDate: '2023-01-23',
|
|
266
268
|
dependsOn: '9',
|
|
267
269
|
length: '1d',
|
|
268
270
|
tags: ['milestone'],
|
|
@@ -272,9 +274,9 @@ Regular.args = {
|
|
|
272
274
|
id: '13',
|
|
273
275
|
title: 'Release',
|
|
274
276
|
type: 'milestone',
|
|
275
|
-
section: releaseSection,
|
|
276
|
-
startDate:
|
|
277
|
-
endDate:
|
|
277
|
+
// section: releaseSection,
|
|
278
|
+
startDate: '2023-01-22',
|
|
279
|
+
endDate: '2023-01-27',
|
|
278
280
|
dependsOn: '12',
|
|
279
281
|
length: '1d',
|
|
280
282
|
tags: ['done'],
|
|
@@ -284,9 +286,9 @@ Regular.args = {
|
|
|
284
286
|
id: '14',
|
|
285
287
|
title: 'Release',
|
|
286
288
|
type: 'milestone',
|
|
287
|
-
section: releaseSection,
|
|
288
|
-
startDate:
|
|
289
|
-
endDate:
|
|
289
|
+
// section: releaseSection,
|
|
290
|
+
startDate: '2023-01-27',
|
|
291
|
+
endDate: '2023-01-30',
|
|
290
292
|
dependsOn: '13',
|
|
291
293
|
length: '1d',
|
|
292
294
|
tags: ['milestone'],
|
|
@@ -296,9 +298,9 @@ Regular.args = {
|
|
|
296
298
|
id: '15',
|
|
297
299
|
title: 'Release',
|
|
298
300
|
type: 'milestone',
|
|
299
|
-
section: releaseSection,
|
|
300
|
-
startDate:
|
|
301
|
-
endDate:
|
|
301
|
+
// section: releaseSection,
|
|
302
|
+
startDate: '2023-01-30',
|
|
303
|
+
endDate: '2023-01-31',
|
|
302
304
|
dependsOn: '14',
|
|
303
305
|
length: '1d',
|
|
304
306
|
tags: ['milestone'],
|
|
@@ -308,9 +310,9 @@ Regular.args = {
|
|
|
308
310
|
id: '16',
|
|
309
311
|
title: 'Release',
|
|
310
312
|
type: 'milestone',
|
|
311
|
-
section: releaseSection,
|
|
312
|
-
startDate:
|
|
313
|
-
endDate:
|
|
313
|
+
// section: releaseSection,
|
|
314
|
+
startDate: '2023-01-31',
|
|
315
|
+
endDate: '2023-02-05',
|
|
314
316
|
dependsOn: '15',
|
|
315
317
|
length: '1d',
|
|
316
318
|
tags: ['active'],
|
|
@@ -320,9 +322,9 @@ Regular.args = {
|
|
|
320
322
|
id: '17',
|
|
321
323
|
title: 'Release',
|
|
322
324
|
type: 'milestone',
|
|
323
|
-
section: releaseSection,
|
|
324
|
-
startDate:
|
|
325
|
-
endDate:
|
|
325
|
+
// section: releaseSection,
|
|
326
|
+
startDate: '2023-02-06',
|
|
327
|
+
endDate: '2023-02-07',
|
|
326
328
|
dependsOn: '16',
|
|
327
329
|
length: '1d',
|
|
328
330
|
tags: ['milestone'],
|
|
@@ -332,9 +334,9 @@ Regular.args = {
|
|
|
332
334
|
id: '18',
|
|
333
335
|
title: 'Release',
|
|
334
336
|
type: 'milestone',
|
|
335
|
-
section: releaseSection,
|
|
336
|
-
startDate:
|
|
337
|
-
endDate:
|
|
337
|
+
// section: releaseSection,
|
|
338
|
+
startDate: '2023-02-08',
|
|
339
|
+
endDate: '2023-02-09',
|
|
338
340
|
dependsOn: '17',
|
|
339
341
|
length: '1d',
|
|
340
342
|
tags: ['critical'],
|
|
@@ -344,9 +346,9 @@ Regular.args = {
|
|
|
344
346
|
id: '19',
|
|
345
347
|
title: 'Release',
|
|
346
348
|
type: 'milestone',
|
|
347
|
-
section: releaseSection,
|
|
348
|
-
startDate:
|
|
349
|
-
endDate:
|
|
349
|
+
// section: releaseSection,
|
|
350
|
+
startDate: '2023-02-10',
|
|
351
|
+
endDate: '2023-02-25',
|
|
350
352
|
dependsOn: '18',
|
|
351
353
|
length: '1d',
|
|
352
354
|
tags: ['milestone'],
|
|
@@ -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,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,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC7B,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC3B,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACvC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;KACzD;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,GAAG,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;MAsB7G,iBAAiB,CAAC,OAAO;;;;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EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YACjC,OAAO,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YAC/B,SAAS,EAAE,IAAI;YACf,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 fromDate: { control: 'date' },\n toDate: { control: 'date' },\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 tasks: Task[]\n fromDate: number | string\n toDate: number | string\n extendGridLines: boolean\n theme: 'light' | 'dark'\n}\n\nconst Template: Story<ArgTypes> = ({ theme = 'light', tasks, fromDate, toDate, extendGridLines }: 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=${new Date(fromDate).toISOString().split('T')[0]}\n to-date=${new Date(toDate).toISOString().split('T')[0]}\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 ?extend-grid-lines=${extendGridLines}\n >\n </ox-gantt>\n`\n\nconst developmentSection: Section = {\n name: 'Development'\n}\n\nconst testSection: Section = {\n name: 'Test'\n}\n\nconst releaseSection: Section = {\n name: 'Release'\n}\n\nexport const Regular = Template.bind({})\nRegular.args = {\n fromDate: '2022-12-27',\n toDate: '2024-12-31',\n tasks: [\n {\n id: '1',\n title: 'Design',\n type: 'task',\n section: developmentSection,\n startDate: new Date('2023-01-01'),\n endDate: new Date('2023-01-05'),\n progress: 60,\n dependsOn: '',\n length: '5d',\n tags: ['active'],\n children: []\n },\n {\n id: '2',\n title: 'Development',\n type: 'milestone',\n section: developmentSection,\n startDate: new Date('2023-01-06'),\n endDate: new Date('2023-01-06'),\n progress: 30,\n dependsOn: '1',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '3',\n title: 'Coding',\n type: 'phase',\n section: developmentSection,\n startDate: new Date('2023-01-07'),\n endDate: new Date('2023-01-15'),\n progress: 10,\n dependsOn: '2',\n length: '9d',\n tags: ['critical'],\n children: [\n {\n id: '3-1',\n title: 'Coding-A',\n type: 'task',\n section: developmentSection,\n startDate: new Date('2023-01-07'),\n endDate: new Date('2023-01-10'),\n progress: 60,\n dependsOn: '',\n length: '4d',\n tags: ['done'],\n children: []\n },\n {\n id: '3-2',\n title: 'Coding-B',\n type: 'task',\n section: developmentSection,\n startDate: new Date('2023-01-11'),\n endDate: new Date('2023-01-15'),\n dependsOn: '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: developmentSection,\n startDate: new Date('2023-01-07'),\n endDate: new Date('2023-01-10'),\n progress: 100,\n dependsOn: '1',\n length: '1d',\n tags: ['done'],\n children: []\n },\n {\n id: '5',\n title: 'Deploy',\n type: 'milestone',\n section: developmentSection,\n startDate: new Date('2023-01-15'),\n endDate: new Date('2023-01-21'),\n dependsOn: '4',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '6',\n title: 'Publishing',\n type: 'milestone',\n section: developmentSection,\n startDate: new Date('2023-01-11'),\n endDate: new Date('2023-01-15'),\n dependsOn: '5',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '7',\n title: 'Provisioning',\n type: 'milestone',\n section: developmentSection,\n startDate: new Date('2023-01-12'),\n endDate: new Date('2023-01-15'),\n dependsOn: '6',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '8',\n title: 'Alpha Test',\n type: 'milestone',\n section: testSection,\n startDate: new Date('2023-01-15'),\n endDate: new Date('2023-01-17'),\n dependsOn: '7',\n length: '1d',\n tags: ['critical'],\n children: []\n },\n {\n id: '9',\n title: 'Beta Task',\n type: 'milestone',\n section: testSection,\n startDate: new Date('2023-01-15'),\n endDate: new Date('2023-01-18'),\n dependsOn: '8',\n length: '1d',\n tags: ['active'],\n children: []\n },\n {\n id: '10',\n title: 'Gamma Test',\n type: 'milestone',\n section: testSection,\n startDate: new Date('2023-01-18'),\n endDate: new Date('2023-01-19'),\n dependsOn: '9',\n length: '1d',\n tags: ['critical'],\n children: []\n },\n {\n id: '11',\n title: 'Zeta Test',\n type: 'milestone',\n section: testSection,\n startDate: new Date('2023-01-18'),\n endDate: new Date('2023-01-22'),\n dependsOn: '9',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '12',\n title: 'Release',\n type: 'milestone',\n section: releaseSection,\n startDate: new Date('2023-01-18'),\n endDate: new Date('2023-01-23'),\n dependsOn: '9',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '13',\n title: 'Release',\n type: 'milestone',\n section: releaseSection,\n startDate: new Date('2023-01-22'),\n endDate: new Date('2023-01-27'),\n dependsOn: '12',\n length: '1d',\n tags: ['done'],\n children: []\n },\n {\n id: '14',\n title: 'Release',\n type: 'milestone',\n section: releaseSection,\n startDate: new Date('2023-01-27'),\n endDate: new Date('2023-01-30'),\n dependsOn: '13',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '15',\n title: 'Release',\n type: 'milestone',\n section: releaseSection,\n startDate: new Date('2023-01-30'),\n endDate: new Date('2023-01-31'),\n dependsOn: '14',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '16',\n title: 'Release',\n type: 'milestone',\n section: releaseSection,\n startDate: new Date('2023-01-31'),\n endDate: new Date('2023-02-05'),\n dependsOn: '15',\n length: '1d',\n tags: ['active'],\n children: []\n },\n {\n id: '17',\n title: 'Release',\n type: 'milestone',\n section: releaseSection,\n startDate: new Date('2023-02-06'),\n endDate: new Date('2023-02-07'),\n dependsOn: '16',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '18',\n title: 'Release',\n type: 'milestone',\n section: releaseSection,\n startDate: new Date('2023-02-08'),\n endDate: new Date('2023-02-09'),\n dependsOn: '17',\n length: '1d',\n tags: ['critical'],\n children: []\n },\n {\n id: '19',\n title: 'Release',\n type: 'milestone',\n section: releaseSection,\n startDate: new Date('2023-02-10'),\n endDate: new Date('2023-02-25'),\n dependsOn: '18',\n length: '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,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, TimeScale } from '../src/types.js'\n\nexport default {\n title: 'ox-gantt',\n component: 'ox-gantt',\n argTypes: {\n fromDate: { control: 'date' },\n toDate: { control: 'date' },\n timeScale: { control: 'select', options: ['year-quarter', 'year-month', 'quarter-week', 'week-day'] },\n extendGridLines: { control: 'boolean' },\n theme: { control: 'select', options: ['light', 'dark'] },\n tasks: { control: 'object' }\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 fromDate: number | string\n toDate: number | string\n extendGridLines: boolean\n timeScale: TimeScale\n theme: 'light' | 'dark'\n}\n\nconst Template: Story<ArgTypes> = ({\n theme = 'light',\n tasks,\n fromDate,\n toDate,\n extendGridLines,\n timeScale = 'week-day'\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 <ox-gantt\n from-date=${new Date(fromDate).toISOString().split('T')[0]}\n to-date=${new Date(toDate).toISOString().split('T')[0]}\n .timeScale=${timeScale}\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 ?extend-grid-lines=${extendGridLines}\n >\n </ox-gantt>\n`\n\nconst developmentSection: Section = {\n name: 'Development'\n}\n\nconst testSection: Section = {\n name: 'Test'\n}\n\nconst releaseSection: Section = {\n name: 'Release'\n}\n\nexport const Regular = Template.bind({})\nRegular.args = {\n fromDate: '2022-12-27',\n toDate: '2024-12-31',\n tasks: [\n {\n id: '1',\n title: 'Design',\n type: 'task',\n // section: developmentSection,\n startDate: '2023-01-01',\n endDate: '2023-01-05',\n progress: 60,\n dependsOn: '',\n length: '5d',\n tags: ['active'],\n children: []\n },\n {\n id: '2',\n title: 'Development',\n type: 'milestone',\n // section: developmentSection,\n startDate: '2023-01-06',\n endDate: '2023-01-06',\n progress: 30,\n dependsOn: '1',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '3',\n title: 'Coding',\n type: 'phase',\n // section: developmentSection,\n startDate: '2023-01-07',\n endDate: '2023-01-15',\n progress: 10,\n dependsOn: '2',\n length: '9d',\n tags: ['critical'],\n children: [\n {\n id: '3-1',\n title: 'Coding-A',\n type: 'task',\n // section: developmentSection,\n startDate: '2023-01-07',\n endDate: '2023-01-10',\n progress: 60,\n dependsOn: '',\n length: '4d',\n tags: ['done'],\n children: []\n },\n {\n id: '3-2',\n title: 'Coding-B',\n type: 'task',\n // section: developmentSection,\n startDate: '2023-01-11',\n endDate: '2023-01-15',\n dependsOn: '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: developmentSection,\n startDate: '2023-01-07',\n endDate: '2023-01-10',\n progress: 100,\n dependsOn: '1',\n length: '1d',\n tags: ['done'],\n children: []\n },\n {\n id: '5',\n title: 'Deploy',\n type: 'milestone',\n // section: developmentSection,\n startDate: '2023-01-15',\n endDate: '2023-01-21',\n dependsOn: '4',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '6',\n title: 'Publishing',\n type: 'milestone',\n // section: developmentSection,\n startDate: '2023-01-11',\n endDate: '2023-01-15',\n dependsOn: '5',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '7',\n title: 'Provisioning',\n type: 'milestone',\n // section: developmentSection,\n startDate: '2023-01-12',\n endDate: '2023-01-15',\n dependsOn: '6',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '8',\n title: 'Alpha Test',\n type: 'milestone',\n // section: testSection,\n startDate: '2023-01-15',\n endDate: '2023-01-17',\n dependsOn: '7',\n length: '1d',\n tags: ['critical'],\n children: []\n },\n {\n id: '9',\n title: 'Beta Task',\n type: 'milestone',\n // section: testSection,\n startDate: '2023-01-15',\n endDate: '2023-01-18',\n dependsOn: '8',\n length: '1d',\n tags: ['active'],\n children: []\n },\n {\n id: '10',\n title: 'Gamma Test',\n type: 'milestone',\n // section: testSection,\n startDate: '2023-01-18',\n endDate: '2023-01-19',\n dependsOn: '9',\n length: '1d',\n tags: ['critical'],\n children: []\n },\n {\n id: '11',\n title: 'Zeta Test',\n type: 'milestone',\n // section: testSection,\n startDate: '2023-01-18',\n endDate: '2023-01-22',\n dependsOn: '9',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '12',\n title: 'Release',\n type: 'milestone',\n // section: releaseSection,\n startDate: '2023-01-18',\n endDate: '2023-01-23',\n dependsOn: '9',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '13',\n title: 'Release',\n type: 'milestone',\n // section: releaseSection,\n startDate: '2023-01-22',\n endDate: '2023-01-27',\n dependsOn: '12',\n length: '1d',\n tags: ['done'],\n children: []\n },\n {\n id: '14',\n title: 'Release',\n type: 'milestone',\n // section: releaseSection,\n startDate: '2023-01-27',\n endDate: '2023-01-30',\n dependsOn: '13',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '15',\n title: 'Release',\n type: 'milestone',\n // section: releaseSection,\n startDate: '2023-01-30',\n endDate: '2023-01-31',\n dependsOn: '14',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '16',\n title: 'Release',\n type: 'milestone',\n // section: releaseSection,\n startDate: '2023-01-31',\n endDate: '2023-02-05',\n dependsOn: '15',\n length: '1d',\n tags: ['active'],\n children: []\n },\n {\n id: '17',\n title: 'Release',\n type: 'milestone',\n // section: releaseSection,\n startDate: '2023-02-06',\n endDate: '2023-02-07',\n dependsOn: '16',\n length: '1d',\n tags: ['milestone'],\n children: []\n },\n {\n id: '18',\n title: 'Release',\n type: 'milestone',\n // section: releaseSection,\n startDate: '2023-02-08',\n endDate: '2023-02-09',\n dependsOn: '17',\n length: '1d',\n tags: ['critical'],\n children: []\n },\n {\n id: '19',\n title: 'Release',\n type: 'milestone',\n // section: releaseSection,\n startDate: '2023-02-10',\n endDate: '2023-02-25',\n dependsOn: '18',\n length: '1d',\n tags: ['milestone'],\n children: []\n }\n ]\n}\n"]}
|