@operato/gantt 9.0.0-beta.5 → 9.0.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.
@@ -1,428 +0,0 @@
1
- import '../src/ox-gantt.js';
2
- import { html } from 'lit';
3
- import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles';
4
- import { CommonHeaderStyles } from '@operato/styles';
5
- export default {
6
- title: 'ox-gantt',
7
- component: 'ox-gantt',
8
- argTypes: {
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
- tasks: { control: 'object' }
14
- }
15
- };
16
- const Template = ({ tasks, fromDate, toDate, extendGridLines, timeScale = 'week-day' }) => html `
17
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
18
-
19
- <link href="/themes/light.css" rel="stylesheet" />
20
- <link href="/themes/dark.css" rel="stylesheet" />
21
- <link href="/themes/spacing.css" rel="stylesheet" />
22
- <link href="/themes/md-typescale-styles.css" rel="stylesheet" />
23
-
24
- <link
25
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
26
- rel="stylesheet"
27
- />
28
- <link
29
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
30
- rel="stylesheet"
31
- />
32
- <link
33
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
34
- rel="stylesheet"
35
- />
36
-
37
- <style>
38
- ${MDTypeScaleStyles.cssText}
39
- </style>
40
-
41
- <style>
42
- ${CommonHeaderStyles.cssText}
43
- </style>
44
-
45
- <style>
46
- html,
47
- body {
48
- margin: 0;
49
- padding: 0;
50
- overflow: hidden;
51
-
52
- overscroll-behavior: none;
53
-
54
- /* This is a font-stack that tries to use the system-default sans-serifs first */
55
- font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
56
- line-height: 1.5;
57
- -webkit-font-smoothing: antialiased;
58
-
59
- accent-color: var(--md-sys-color-primary);
60
- }
61
-
62
- body {
63
- width: 100%;
64
- height: 800px;
65
- text-align: center;
66
-
67
- background-color: var(--md-sys-color-background);
68
- color: var(--md-sys-color-on-background);
69
- }
70
-
71
- ox-gantt {
72
- width: 95%;
73
- height: 800px;
74
- box-sizing: border-box;
75
-
76
- background-color: var(--md-sys-color-primary-container);
77
- color: var(--md-sys-color-on-primary-container);
78
- }
79
- </style>
80
-
81
- <ox-gantt
82
- from-date=${new Date(fromDate).toISOString().split('T')[0]}
83
- to-date=${new Date(toDate).toISOString().split('T')[0]}
84
- .timeScale=${timeScale}
85
- .tasks=${tasks}
86
- @date-range-selected=${(e) => {
87
- console.log('date-range-selected', e.detail);
88
- }}
89
- @task-clicked=${(e) => {
90
- console.log('task-clicked', e.detail);
91
- }}
92
- ?extend-grid-lines=${extendGridLines}
93
- >
94
- </ox-gantt>
95
- `;
96
- export const Regular = Template.bind({});
97
- Regular.args = {
98
- fromDate: '2022-12-27',
99
- toDate: '2024-12-31',
100
- tasks: [
101
- {
102
- id: '1',
103
- title: 'Design',
104
- type: 'task',
105
- startDate: '2023-01-01',
106
- endDate: '2023-01-05',
107
- progress: 60,
108
- dependsOn: '',
109
- duration: 5,
110
- tags: ['active'],
111
- resources: [{ type: '철근/형틀공', allocated: 6 }],
112
- children: []
113
- },
114
- {
115
- id: '2',
116
- title: 'Development',
117
- type: 'milestone',
118
- style: 'blue',
119
- startDate: '2023-01-06',
120
- endDate: '2023-01-06',
121
- progress: 30,
122
- dependsOn: '1',
123
- duration: 1,
124
- tags: ['milestone'],
125
- resources: [{ type: '철근/형틀공', allocated: 6 }],
126
- children: []
127
- },
128
- {
129
- id: '3',
130
- title: 'Coding',
131
- type: 'phase',
132
- startDate: '2023-01-07',
133
- endDate: '2023-01-15',
134
- progress: 10,
135
- dependsOn: '2',
136
- duration: 9,
137
- tags: ['critical'],
138
- style: 'red',
139
- children: [
140
- {
141
- id: '3-1',
142
- title: 'Coding-A',
143
- type: 'task',
144
- startDate: '2023-01-07',
145
- endDate: '2023-01-10',
146
- progress: 60,
147
- dependsOn: '',
148
- duration: 4,
149
- tags: ['done'],
150
- style: 'green',
151
- children: [
152
- {
153
- id: '3-1-1',
154
- title: 'Coding-A',
155
- type: 'task',
156
- startDate: '2023-01-07',
157
- endDate: '2023-01-10',
158
- progress: 60,
159
- dependsOn: '',
160
- duration: 4,
161
- tags: ['active'],
162
- resources: [{ type: '창호공', allocated: 5 }],
163
- children: []
164
- },
165
- {
166
- id: '3-1-2',
167
- title: 'Coding-B',
168
- type: 'task',
169
- startDate: '2023-01-11',
170
- endDate: '2023-01-15',
171
- dependsOn: '3-1-1',
172
- duration: 5,
173
- tags: ['active'],
174
- resources: [{ type: '창호공', allocated: 3 }],
175
- children: []
176
- }
177
- ]
178
- },
179
- {
180
- id: '3-2',
181
- title: 'Coding-B',
182
- type: 'task',
183
- startDate: '2023-01-11',
184
- endDate: '2023-01-15',
185
- dependsOn: '3-1',
186
- duration: 5,
187
- tags: ['active'],
188
- resources: [{ type: '창호공', allocated: 6 }],
189
- children: []
190
- }
191
- ]
192
- },
193
- {
194
- id: '4',
195
- title: 'Test',
196
- type: 'milestone',
197
- startDate: '2023-01-07',
198
- endDate: '2023-01-10',
199
- progress: 100,
200
- dependsOn: '1',
201
- duration: 1,
202
- tags: ['done'],
203
- style: 'green',
204
- resources: [{ type: '방수공', allocated: 5 }],
205
- children: []
206
- },
207
- {
208
- id: '5',
209
- title: 'Deploy',
210
- type: 'milestone',
211
- style: 'blue',
212
- startDate: '2023-01-15',
213
- endDate: '2023-01-21',
214
- dependsOn: '4',
215
- duration: 1,
216
- tags: ['milestone'],
217
- resources: [{ type: '목공', allocated: 3 }],
218
- children: []
219
- },
220
- {
221
- id: '6',
222
- title: 'Publishing',
223
- type: 'milestone',
224
- style: 'blue',
225
- startDate: '2023-01-11',
226
- endDate: '2023-01-15',
227
- dependsOn: '5',
228
- duration: 1,
229
- tags: ['milestone'],
230
- resources: [{ type: '금속공', allocated: 1 }],
231
- children: []
232
- },
233
- {
234
- id: '7',
235
- title: 'Provisioning',
236
- type: 'milestone',
237
- style: 'blue',
238
- startDate: '2023-01-12',
239
- endDate: '2023-01-15',
240
- dependsOn: '6',
241
- duration: 1,
242
- tags: ['milestone'],
243
- resources: [{ type: '타일공', allocated: 6 }],
244
- children: []
245
- },
246
- {
247
- id: '8',
248
- title: 'Alpha Test',
249
- type: 'milestone',
250
- style: 'blue',
251
- startDate: '2023-01-15',
252
- endDate: '2023-01-17',
253
- dependsOn: '7',
254
- duration: 1,
255
- tags: ['critical'],
256
- resources: [{ type: '창호공', allocated: 7 }],
257
- children: []
258
- },
259
- {
260
- id: '9',
261
- title: 'Beta Task',
262
- type: 'milestone',
263
- style: 'blue',
264
- startDate: '2023-01-15',
265
- endDate: '2023-01-18',
266
- dependsOn: '8',
267
- duration: 1,
268
- tags: ['active'],
269
- resources: [{ type: '도배공', allocated: 8 }],
270
- children: []
271
- },
272
- {
273
- id: '10',
274
- title: 'Gamma Test',
275
- type: 'milestone',
276
- // section: testSection,
277
- startDate: '2023-01-18',
278
- endDate: '2023-01-19',
279
- dependsOn: '9',
280
- duration: 1,
281
- tags: ['critical'],
282
- style: 'red',
283
- resources: [{ type: '조적공', allocated: 6 }],
284
- children: []
285
- },
286
- {
287
- id: '11',
288
- title: 'Zeta Test',
289
- type: 'milestone',
290
- style: 'blue',
291
- startDate: '2023-01-18',
292
- endDate: '2023-01-22',
293
- dependsOn: '9',
294
- duration: 1,
295
- tags: ['milestone'],
296
- resources: [{ type: '철근/형틀공', allocated: 6 }],
297
- children: []
298
- },
299
- {
300
- id: '12',
301
- title: 'Release',
302
- type: 'milestone',
303
- style: 'blue',
304
- startDate: '2023-01-18',
305
- endDate: '2023-01-23',
306
- dependsOn: '9',
307
- duration: 1,
308
- resources: [{ type: '방수공', allocated: 6 }],
309
- tags: ['milestone'],
310
- children: [
311
- {
312
- id: '12-1',
313
- title: 'Coding-A',
314
- type: 'task',
315
- startDate: '2023-01-07',
316
- endDate: '2023-01-10',
317
- progress: 60,
318
- dependsOn: '',
319
- duration: 4,
320
- tags: ['done'],
321
- style: 'green',
322
- resources: [{ type: '방수공', allocated: 6 }],
323
- children: []
324
- },
325
- {
326
- id: '12-2',
327
- title: 'Coding-B',
328
- type: 'task',
329
- startDate: '2023-01-11',
330
- endDate: '2023-01-15',
331
- dependsOn: '12-1',
332
- duration: 5,
333
- tags: ['active'],
334
- resources: [{ type: '조적공', allocated: 6 }],
335
- children: []
336
- }
337
- ]
338
- },
339
- {
340
- id: '13',
341
- title: 'Release',
342
- type: 'milestone',
343
- startDate: '2023-01-22',
344
- endDate: '2023-01-27',
345
- dependsOn: '12',
346
- duration: 1,
347
- tags: ['done'],
348
- style: 'green',
349
- children: []
350
- },
351
- {
352
- id: '14',
353
- title: 'Release',
354
- type: 'milestone',
355
- style: 'blue',
356
- startDate: '2023-01-27',
357
- endDate: '2023-01-30',
358
- dependsOn: '13',
359
- duration: 1,
360
- tags: ['milestone'],
361
- resources: [{ type: '금속공', allocated: 1 }],
362
- children: []
363
- },
364
- {
365
- id: '15',
366
- title: 'Release',
367
- type: 'milestone',
368
- style: 'blue',
369
- startDate: '2023-01-30',
370
- endDate: '2023-01-31',
371
- dependsOn: '14',
372
- duration: 1,
373
- tags: ['milestone'],
374
- children: []
375
- },
376
- {
377
- id: '16',
378
- title: 'Release',
379
- type: 'milestone',
380
- style: 'blue',
381
- startDate: '2023-01-31',
382
- endDate: '2023-02-05',
383
- dependsOn: '15',
384
- duration: 1,
385
- resources: [{ type: '창호공', allocated: 1 }],
386
- tags: ['active'],
387
- children: []
388
- },
389
- {
390
- id: '17',
391
- title: 'Release',
392
- type: 'milestone',
393
- style: 'blue',
394
- startDate: '2023-02-06',
395
- endDate: '2023-02-07',
396
- dependsOn: '16',
397
- duration: 1,
398
- tags: ['milestone'],
399
- children: []
400
- },
401
- {
402
- id: '18',
403
- title: 'Release',
404
- type: 'milestone',
405
- startDate: '2023-02-08',
406
- endDate: '2023-02-09',
407
- dependsOn: '17',
408
- duration: 1,
409
- tags: ['critical'],
410
- style: 'red',
411
- children: []
412
- },
413
- {
414
- id: '19',
415
- title: 'Release',
416
- type: 'milestone',
417
- style: 'blue',
418
- startDate: '2023-02-10',
419
- endDate: '2023-02-25',
420
- dependsOn: '18',
421
- duration: 1,
422
- tags: ['milestone'],
423
- resources: [{ type: '창호공', allocated: 7 }],
424
- children: []
425
- }
426
- ]
427
- };
428
- //# sourceMappingURL=ox-gantt.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ox-gantt.stories.js","sourceRoot":"","sources":["../../stories/ox-gantt.stories.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAIpD,eAAe;IACb,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC7B,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC3B,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,CAAC,EAAE;QACrG,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACvC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC7B;CACF,CAAA;AAgBD,MAAM,QAAQ,GAAoB,CAAC,EACjC,KAAK,EACL,QA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,SAAS,EAAE,YAAY;YACvB,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,CAAC;YACX,IAAI,EAAE,CAAC,UAAU,CAAC;YAClB,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,EAAE;SACb;QACD;YACE,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,YAAY;YACvB,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,CAAC;YACX,IAAI,EAAE,CAAC,WAAW,CAAC;YACnB,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;YAC1C,QAAQ,EAAE,EAAE;SACb;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-gantt.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\nimport { CommonHeaderStyles } from '@operato/styles'\n\nimport { Task, 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 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}\n\nconst Template: Story<ArgTypes> = ({\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 html,\n body {\n margin: 0;\n padding: 0;\n overflow: hidden;\n\n overscroll-behavior: none;\n\n /* This is a font-stack that tries to use the system-default sans-serifs first */\n font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n\n accent-color: var(--md-sys-color-primary);\n }\n\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: 95%;\n height: 800px;\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 <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\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 startDate: '2023-01-01',\n endDate: '2023-01-05',\n progress: 60,\n dependsOn: '',\n duration: 5,\n tags: ['active'],\n resources: [{ type: '철근/형틀공', allocated: 6 }],\n children: []\n },\n {\n id: '2',\n title: 'Development',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-06',\n endDate: '2023-01-06',\n progress: 30,\n dependsOn: '1',\n duration: 1,\n tags: ['milestone'],\n resources: [{ type: '철근/형틀공', allocated: 6 }],\n children: []\n },\n {\n id: '3',\n title: 'Coding',\n type: 'phase',\n startDate: '2023-01-07',\n endDate: '2023-01-15',\n progress: 10,\n dependsOn: '2',\n duration: 9,\n tags: ['critical'],\n style: 'red',\n children: [\n {\n id: '3-1',\n title: 'Coding-A',\n type: 'task',\n startDate: '2023-01-07',\n endDate: '2023-01-10',\n progress: 60,\n dependsOn: '',\n duration: 4,\n tags: ['done'],\n style: 'green',\n children: [\n {\n id: '3-1-1',\n title: 'Coding-A',\n type: 'task',\n startDate: '2023-01-07',\n endDate: '2023-01-10',\n progress: 60,\n dependsOn: '',\n duration: 4,\n tags: ['active'],\n resources: [{ type: '창호공', allocated: 5 }],\n children: []\n },\n {\n id: '3-1-2',\n title: 'Coding-B',\n type: 'task',\n startDate: '2023-01-11',\n endDate: '2023-01-15',\n dependsOn: '3-1-1',\n duration: 5,\n tags: ['active'],\n resources: [{ type: '창호공', allocated: 3 }],\n children: []\n }\n ]\n },\n {\n id: '3-2',\n title: 'Coding-B',\n type: 'task',\n startDate: '2023-01-11',\n endDate: '2023-01-15',\n dependsOn: '3-1',\n duration: 5,\n tags: ['active'],\n resources: [{ type: '창호공', allocated: 6 }],\n children: []\n }\n ]\n },\n {\n id: '4',\n title: 'Test',\n type: 'milestone',\n startDate: '2023-01-07',\n endDate: '2023-01-10',\n progress: 100,\n dependsOn: '1',\n duration: 1,\n tags: ['done'],\n style: 'green',\n resources: [{ type: '방수공', allocated: 5 }],\n children: []\n },\n {\n id: '5',\n title: 'Deploy',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-15',\n endDate: '2023-01-21',\n dependsOn: '4',\n duration: 1,\n tags: ['milestone'],\n resources: [{ type: '목공', allocated: 3 }],\n children: []\n },\n {\n id: '6',\n title: 'Publishing',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-11',\n endDate: '2023-01-15',\n dependsOn: '5',\n duration: 1,\n tags: ['milestone'],\n resources: [{ type: '금속공', allocated: 1 }],\n children: []\n },\n {\n id: '7',\n title: 'Provisioning',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-12',\n endDate: '2023-01-15',\n dependsOn: '6',\n duration: 1,\n tags: ['milestone'],\n resources: [{ type: '타일공', allocated: 6 }],\n children: []\n },\n {\n id: '8',\n title: 'Alpha Test',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-15',\n endDate: '2023-01-17',\n dependsOn: '7',\n duration: 1,\n tags: ['critical'],\n resources: [{ type: '창호공', allocated: 7 }],\n children: []\n },\n {\n id: '9',\n title: 'Beta Task',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-15',\n endDate: '2023-01-18',\n dependsOn: '8',\n duration: 1,\n tags: ['active'],\n resources: [{ type: '도배공', allocated: 8 }],\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 duration: 1,\n tags: ['critical'],\n style: 'red',\n resources: [{ type: '조적공', allocated: 6 }],\n children: []\n },\n {\n id: '11',\n title: 'Zeta Test',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-18',\n endDate: '2023-01-22',\n dependsOn: '9',\n duration: 1,\n tags: ['milestone'],\n resources: [{ type: '철근/형틀공', allocated: 6 }],\n children: []\n },\n {\n id: '12',\n title: 'Release',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-18',\n endDate: '2023-01-23',\n dependsOn: '9',\n duration: 1,\n resources: [{ type: '방수공', allocated: 6 }],\n tags: ['milestone'],\n children: [\n {\n id: '12-1',\n title: 'Coding-A',\n type: 'task',\n startDate: '2023-01-07',\n endDate: '2023-01-10',\n progress: 60,\n dependsOn: '',\n duration: 4,\n tags: ['done'],\n style: 'green',\n resources: [{ type: '방수공', allocated: 6 }],\n children: []\n },\n {\n id: '12-2',\n title: 'Coding-B',\n type: 'task',\n startDate: '2023-01-11',\n endDate: '2023-01-15',\n dependsOn: '12-1',\n duration: 5,\n tags: ['active'],\n resources: [{ type: '조적공', allocated: 6 }],\n children: []\n }\n ]\n },\n {\n id: '13',\n title: 'Release',\n type: 'milestone',\n startDate: '2023-01-22',\n endDate: '2023-01-27',\n dependsOn: '12',\n duration: 1,\n tags: ['done'],\n style: 'green',\n children: []\n },\n {\n id: '14',\n title: 'Release',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-27',\n endDate: '2023-01-30',\n dependsOn: '13',\n duration: 1,\n tags: ['milestone'],\n resources: [{ type: '금속공', allocated: 1 }],\n children: []\n },\n {\n id: '15',\n title: 'Release',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-30',\n endDate: '2023-01-31',\n dependsOn: '14',\n duration: 1,\n tags: ['milestone'],\n children: []\n },\n {\n id: '16',\n title: 'Release',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-01-31',\n endDate: '2023-02-05',\n dependsOn: '15',\n duration: 1,\n resources: [{ type: '창호공', allocated: 1 }],\n tags: ['active'],\n children: []\n },\n {\n id: '17',\n title: 'Release',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-02-06',\n endDate: '2023-02-07',\n dependsOn: '16',\n duration: 1,\n tags: ['milestone'],\n children: []\n },\n {\n id: '18',\n title: 'Release',\n type: 'milestone',\n startDate: '2023-02-08',\n endDate: '2023-02-09',\n dependsOn: '17',\n duration: 1,\n tags: ['critical'],\n style: 'red',\n children: []\n },\n {\n id: '19',\n title: 'Release',\n type: 'milestone',\n style: 'blue',\n startDate: '2023-02-10',\n endDate: '2023-02-25',\n dependsOn: '18',\n duration: 1,\n tags: ['milestone'],\n resources: [{ type: '창호공', allocated: 7 }],\n children: []\n }\n ]\n}\n"]}