@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
|
@@ -6,11 +6,15 @@ export default {
|
|
|
6
6
|
title: 'ox-gantt',
|
|
7
7
|
component: 'ox-gantt',
|
|
8
8
|
argTypes: {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
fromDate: { control: 'date' },
|
|
10
|
+
toDate: { control: 'date' },
|
|
11
|
+
timeScale: { control: 'select', options: ['year-quarter', 'year-month', 'quarter-week', 'week-day'] },
|
|
12
|
+
extendGridLines: { control: 'boolean' },
|
|
13
|
+
theme: { control: 'select', options: ['light', 'dark'] },
|
|
14
|
+
tasks: { control: 'object' }
|
|
11
15
|
}
|
|
12
16
|
};
|
|
13
|
-
const Template = ({ theme = 'light', tasks }) => html `
|
|
17
|
+
const Template = ({ theme = 'light', tasks, fromDate, toDate, extendGridLines, timeScale = 'week-day' }) => html `
|
|
14
18
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
15
19
|
|
|
16
20
|
<link href="/themes/light.css" rel="stylesheet" />
|
|
@@ -64,8 +68,9 @@ const Template = ({ theme = 'light', tasks }) => html `
|
|
|
64
68
|
</script>
|
|
65
69
|
|
|
66
70
|
<ox-gantt
|
|
67
|
-
from-date
|
|
68
|
-
to-date
|
|
71
|
+
from-date=${new Date(fromDate).toISOString().split('T')[0]}
|
|
72
|
+
to-date=${new Date(toDate).toISOString().split('T')[0]}
|
|
73
|
+
.timeScale=${timeScale}
|
|
69
74
|
.tasks=${tasks}
|
|
70
75
|
@date-range-selected=${(e) => {
|
|
71
76
|
console.log('date-range-selected', e.detail);
|
|
@@ -73,24 +78,33 @@ const Template = ({ theme = 'light', tasks }) => html `
|
|
|
73
78
|
@task-clicked=${(e) => {
|
|
74
79
|
console.log('task-clicked', e.detail);
|
|
75
80
|
}}
|
|
81
|
+
?extend-grid-lines=${extendGridLines}
|
|
76
82
|
>
|
|
77
83
|
</ox-gantt>
|
|
78
84
|
`;
|
|
79
|
-
const
|
|
85
|
+
const developmentSection = {
|
|
80
86
|
name: 'Development'
|
|
81
87
|
};
|
|
88
|
+
const testSection = {
|
|
89
|
+
name: 'Test'
|
|
90
|
+
};
|
|
91
|
+
const releaseSection = {
|
|
92
|
+
name: 'Release'
|
|
93
|
+
};
|
|
82
94
|
export const Regular = Template.bind({});
|
|
83
95
|
Regular.args = {
|
|
96
|
+
fromDate: '2022-12-27',
|
|
97
|
+
toDate: '2024-12-31',
|
|
84
98
|
tasks: [
|
|
85
99
|
{
|
|
86
100
|
id: '1',
|
|
87
101
|
title: 'Design',
|
|
88
102
|
type: 'task',
|
|
89
|
-
section:
|
|
90
|
-
|
|
91
|
-
|
|
103
|
+
// section: developmentSection,
|
|
104
|
+
startDate: '2023-01-01',
|
|
105
|
+
endDate: '2023-01-05',
|
|
92
106
|
progress: 60,
|
|
93
|
-
|
|
107
|
+
dependsOn: '',
|
|
94
108
|
length: '5d',
|
|
95
109
|
tags: ['active'],
|
|
96
110
|
children: []
|
|
@@ -99,11 +113,11 @@ Regular.args = {
|
|
|
99
113
|
id: '2',
|
|
100
114
|
title: 'Development',
|
|
101
115
|
type: 'milestone',
|
|
102
|
-
section:
|
|
103
|
-
|
|
104
|
-
|
|
116
|
+
// section: developmentSection,
|
|
117
|
+
startDate: '2023-01-06',
|
|
118
|
+
endDate: '2023-01-06',
|
|
105
119
|
progress: 30,
|
|
106
|
-
|
|
120
|
+
dependsOn: '1',
|
|
107
121
|
length: '1d',
|
|
108
122
|
tags: ['milestone'],
|
|
109
123
|
children: []
|
|
@@ -112,11 +126,11 @@ Regular.args = {
|
|
|
112
126
|
id: '3',
|
|
113
127
|
title: 'Coding',
|
|
114
128
|
type: 'phase',
|
|
115
|
-
section:
|
|
116
|
-
|
|
117
|
-
|
|
129
|
+
// section: developmentSection,
|
|
130
|
+
startDate: '2023-01-07',
|
|
131
|
+
endDate: '2023-01-15',
|
|
118
132
|
progress: 10,
|
|
119
|
-
|
|
133
|
+
dependsOn: '2',
|
|
120
134
|
length: '9d',
|
|
121
135
|
tags: ['critical'],
|
|
122
136
|
children: [
|
|
@@ -124,11 +138,11 @@ Regular.args = {
|
|
|
124
138
|
id: '3-1',
|
|
125
139
|
title: 'Coding-A',
|
|
126
140
|
type: 'task',
|
|
127
|
-
section:
|
|
128
|
-
|
|
129
|
-
|
|
141
|
+
// section: developmentSection,
|
|
142
|
+
startDate: '2023-01-07',
|
|
143
|
+
endDate: '2023-01-10',
|
|
130
144
|
progress: 60,
|
|
131
|
-
|
|
145
|
+
dependsOn: '',
|
|
132
146
|
length: '4d',
|
|
133
147
|
tags: ['done'],
|
|
134
148
|
children: []
|
|
@@ -137,10 +151,10 @@ Regular.args = {
|
|
|
137
151
|
id: '3-2',
|
|
138
152
|
title: 'Coding-B',
|
|
139
153
|
type: 'task',
|
|
140
|
-
section:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
154
|
+
// section: developmentSection,
|
|
155
|
+
startDate: '2023-01-11',
|
|
156
|
+
endDate: '2023-01-15',
|
|
157
|
+
dependsOn: '3-1',
|
|
144
158
|
length: '5d',
|
|
145
159
|
tags: ['active'],
|
|
146
160
|
children: []
|
|
@@ -151,11 +165,11 @@ Regular.args = {
|
|
|
151
165
|
id: '4',
|
|
152
166
|
title: 'Test',
|
|
153
167
|
type: 'milestone',
|
|
154
|
-
section:
|
|
155
|
-
|
|
156
|
-
|
|
168
|
+
// section: developmentSection,
|
|
169
|
+
startDate: '2023-01-07',
|
|
170
|
+
endDate: '2023-01-10',
|
|
157
171
|
progress: 100,
|
|
158
|
-
|
|
172
|
+
dependsOn: '1',
|
|
159
173
|
length: '1d',
|
|
160
174
|
tags: ['done'],
|
|
161
175
|
children: []
|
|
@@ -164,10 +178,10 @@ Regular.args = {
|
|
|
164
178
|
id: '5',
|
|
165
179
|
title: 'Deploy',
|
|
166
180
|
type: 'milestone',
|
|
167
|
-
section:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
181
|
+
// section: developmentSection,
|
|
182
|
+
startDate: '2023-01-15',
|
|
183
|
+
endDate: '2023-01-21',
|
|
184
|
+
dependsOn: '4',
|
|
171
185
|
length: '1d',
|
|
172
186
|
tags: ['milestone'],
|
|
173
187
|
children: []
|
|
@@ -176,10 +190,10 @@ Regular.args = {
|
|
|
176
190
|
id: '6',
|
|
177
191
|
title: 'Publishing',
|
|
178
192
|
type: 'milestone',
|
|
179
|
-
section:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
193
|
+
// section: developmentSection,
|
|
194
|
+
startDate: '2023-01-11',
|
|
195
|
+
endDate: '2023-01-15',
|
|
196
|
+
dependsOn: '5',
|
|
183
197
|
length: '1d',
|
|
184
198
|
tags: ['milestone'],
|
|
185
199
|
children: []
|
|
@@ -188,10 +202,10 @@ Regular.args = {
|
|
|
188
202
|
id: '7',
|
|
189
203
|
title: 'Provisioning',
|
|
190
204
|
type: 'milestone',
|
|
191
|
-
section:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
205
|
+
// section: developmentSection,
|
|
206
|
+
startDate: '2023-01-12',
|
|
207
|
+
endDate: '2023-01-15',
|
|
208
|
+
dependsOn: '6',
|
|
195
209
|
length: '1d',
|
|
196
210
|
tags: ['milestone'],
|
|
197
211
|
children: []
|
|
@@ -200,10 +214,10 @@ Regular.args = {
|
|
|
200
214
|
id: '8',
|
|
201
215
|
title: 'Alpha Test',
|
|
202
216
|
type: 'milestone',
|
|
203
|
-
section:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
217
|
+
// section: testSection,
|
|
218
|
+
startDate: '2023-01-15',
|
|
219
|
+
endDate: '2023-01-17',
|
|
220
|
+
dependsOn: '7',
|
|
207
221
|
length: '1d',
|
|
208
222
|
tags: ['critical'],
|
|
209
223
|
children: []
|
|
@@ -212,10 +226,10 @@ Regular.args = {
|
|
|
212
226
|
id: '9',
|
|
213
227
|
title: 'Beta Task',
|
|
214
228
|
type: 'milestone',
|
|
215
|
-
section:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
229
|
+
// section: testSection,
|
|
230
|
+
startDate: '2023-01-15',
|
|
231
|
+
endDate: '2023-01-18',
|
|
232
|
+
dependsOn: '8',
|
|
219
233
|
length: '1d',
|
|
220
234
|
tags: ['active'],
|
|
221
235
|
children: []
|
|
@@ -224,10 +238,10 @@ Regular.args = {
|
|
|
224
238
|
id: '10',
|
|
225
239
|
title: 'Gamma Test',
|
|
226
240
|
type: 'milestone',
|
|
227
|
-
section:
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
241
|
+
// section: testSection,
|
|
242
|
+
startDate: '2023-01-18',
|
|
243
|
+
endDate: '2023-01-19',
|
|
244
|
+
dependsOn: '9',
|
|
231
245
|
length: '1d',
|
|
232
246
|
tags: ['critical'],
|
|
233
247
|
children: []
|
|
@@ -236,10 +250,10 @@ Regular.args = {
|
|
|
236
250
|
id: '11',
|
|
237
251
|
title: 'Zeta Test',
|
|
238
252
|
type: 'milestone',
|
|
239
|
-
section:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
253
|
+
// section: testSection,
|
|
254
|
+
startDate: '2023-01-18',
|
|
255
|
+
endDate: '2023-01-22',
|
|
256
|
+
dependsOn: '9',
|
|
243
257
|
length: '1d',
|
|
244
258
|
tags: ['milestone'],
|
|
245
259
|
children: []
|
|
@@ -248,10 +262,10 @@ Regular.args = {
|
|
|
248
262
|
id: '12',
|
|
249
263
|
title: 'Release',
|
|
250
264
|
type: 'milestone',
|
|
251
|
-
section:
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
265
|
+
// section: releaseSection,
|
|
266
|
+
startDate: '2023-01-18',
|
|
267
|
+
endDate: '2023-01-23',
|
|
268
|
+
dependsOn: '9',
|
|
255
269
|
length: '1d',
|
|
256
270
|
tags: ['milestone'],
|
|
257
271
|
children: []
|
|
@@ -260,10 +274,10 @@ Regular.args = {
|
|
|
260
274
|
id: '13',
|
|
261
275
|
title: 'Release',
|
|
262
276
|
type: 'milestone',
|
|
263
|
-
section:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
277
|
+
// section: releaseSection,
|
|
278
|
+
startDate: '2023-01-22',
|
|
279
|
+
endDate: '2023-01-27',
|
|
280
|
+
dependsOn: '12',
|
|
267
281
|
length: '1d',
|
|
268
282
|
tags: ['done'],
|
|
269
283
|
children: []
|
|
@@ -272,10 +286,10 @@ Regular.args = {
|
|
|
272
286
|
id: '14',
|
|
273
287
|
title: 'Release',
|
|
274
288
|
type: 'milestone',
|
|
275
|
-
section:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
289
|
+
// section: releaseSection,
|
|
290
|
+
startDate: '2023-01-27',
|
|
291
|
+
endDate: '2023-01-30',
|
|
292
|
+
dependsOn: '13',
|
|
279
293
|
length: '1d',
|
|
280
294
|
tags: ['milestone'],
|
|
281
295
|
children: []
|
|
@@ -284,10 +298,10 @@ Regular.args = {
|
|
|
284
298
|
id: '15',
|
|
285
299
|
title: 'Release',
|
|
286
300
|
type: 'milestone',
|
|
287
|
-
section:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
301
|
+
// section: releaseSection,
|
|
302
|
+
startDate: '2023-01-30',
|
|
303
|
+
endDate: '2023-01-31',
|
|
304
|
+
dependsOn: '14',
|
|
291
305
|
length: '1d',
|
|
292
306
|
tags: ['milestone'],
|
|
293
307
|
children: []
|
|
@@ -296,10 +310,10 @@ Regular.args = {
|
|
|
296
310
|
id: '16',
|
|
297
311
|
title: 'Release',
|
|
298
312
|
type: 'milestone',
|
|
299
|
-
section:
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
313
|
+
// section: releaseSection,
|
|
314
|
+
startDate: '2023-01-31',
|
|
315
|
+
endDate: '2023-02-05',
|
|
316
|
+
dependsOn: '15',
|
|
303
317
|
length: '1d',
|
|
304
318
|
tags: ['active'],
|
|
305
319
|
children: []
|
|
@@ -308,10 +322,10 @@ Regular.args = {
|
|
|
308
322
|
id: '17',
|
|
309
323
|
title: 'Release',
|
|
310
324
|
type: 'milestone',
|
|
311
|
-
section:
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
325
|
+
// section: releaseSection,
|
|
326
|
+
startDate: '2023-02-06',
|
|
327
|
+
endDate: '2023-02-07',
|
|
328
|
+
dependsOn: '16',
|
|
315
329
|
length: '1d',
|
|
316
330
|
tags: ['milestone'],
|
|
317
331
|
children: []
|
|
@@ -320,10 +334,10 @@ Regular.args = {
|
|
|
320
334
|
id: '18',
|
|
321
335
|
title: 'Release',
|
|
322
336
|
type: 'milestone',
|
|
323
|
-
section:
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
337
|
+
// section: releaseSection,
|
|
338
|
+
startDate: '2023-02-08',
|
|
339
|
+
endDate: '2023-02-09',
|
|
340
|
+
dependsOn: '17',
|
|
327
341
|
length: '1d',
|
|
328
342
|
tags: ['critical'],
|
|
329
343
|
children: []
|
|
@@ -332,10 +346,10 @@ Regular.args = {
|
|
|
332
346
|
id: '19',
|
|
333
347
|
title: 'Release',
|
|
334
348
|
type: 'milestone',
|
|
335
|
-
section:
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
349
|
+
// section: releaseSection,
|
|
350
|
+
startDate: '2023-02-10',
|
|
351
|
+
endDate: '2023-02-25',
|
|
352
|
+
dependsOn: '18',
|
|
339
353
|
length: '1d',
|
|
340
354
|
tags: ['milestone'],
|
|
341
355
|
children: []
|
|
@@ -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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ChB,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"]}
|
|
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,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I,EAAE,WAAW;YACjB,2BAA2B;YAC3B,SAAS,EAAE,YAAY;YACvB,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,CAAC,QAAQ,CAAC;YAChB,QAAQ,EAAE,EAAE;SACb;QACD;YACE,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,WAAW;YACjB,2BAA2B;YAC3B,SAAS,EAAE,YAAY;YACvB,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE,IAAI;YACf,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,2BAA2B;YAC3B,SAAS,EAAE,YAAY;YACvB,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE,IAAI;YACf,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,2BAA2B;YAC3B,SAAS,EAAE,YAAY;YACvB,OAAO,EAAE,YAAY;YACrB,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, 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"]}
|