@operato/gantt 8.0.0-beta.0 → 8.0.0-beta.2
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/package.json +5 -5
- package/.editorconfig +0 -29
- package/.storybook/main.js +0 -3
- package/.storybook/preview.js +0 -52
- package/.storybook/server.mjs +0 -8
- package/demo/index.html +0 -22
- package/src/draw-time-scale-header.ts +0 -142
- package/src/gantt-chart-controller.ts +0 -402
- package/src/index.ts +0 -0
- package/src/locales.ts +0 -78
- package/src/ox-gantt-chart.ts +0 -418
- package/src/ox-gantt-resize-splitter.ts +0 -159
- package/src/ox-gantt.ts +0 -535
- package/src/ox-resource-chart.ts +0 -147
- package/src/ox-task-tooltip.ts +0 -142
- package/src/resource-chart-controller.ts +0 -284
- package/src/types.ts +0 -33
- package/src/utils.ts +0 -13
- package/stories/ox-gantt-chart.stories.ts +0 -125
- package/stories/ox-gantt.stories.ts +0 -453
- package/tsconfig.json +0 -25
- package/web-dev-server.config.mjs +0 -27
- package/web-test-runner.config.mjs +0 -41
|
@@ -1,453 +0,0 @@
|
|
|
1
|
-
import '../src/ox-gantt.js'
|
|
2
|
-
|
|
3
|
-
import { html, TemplateResult } from 'lit'
|
|
4
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
|
5
|
-
import { CommonHeaderStyles } from '@operato/styles'
|
|
6
|
-
|
|
7
|
-
import { Task, TimeScale } from '../src/types.js'
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'ox-gantt',
|
|
11
|
-
component: 'ox-gantt',
|
|
12
|
-
argTypes: {
|
|
13
|
-
fromDate: { control: 'date' },
|
|
14
|
-
toDate: { control: 'date' },
|
|
15
|
-
timeScale: { control: 'select', options: ['year-quarter', 'year-month', 'quarter-week', 'week-day'] },
|
|
16
|
-
extendGridLines: { control: 'boolean' },
|
|
17
|
-
tasks: { control: 'object' }
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface Story<T> {
|
|
22
|
-
(args: T): TemplateResult
|
|
23
|
-
args?: Partial<T>
|
|
24
|
-
argTypes?: Record<string, unknown>
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
interface ArgTypes {
|
|
28
|
-
tasks: Task[]
|
|
29
|
-
fromDate: number | string
|
|
30
|
-
toDate: number | string
|
|
31
|
-
extendGridLines: boolean
|
|
32
|
-
timeScale: TimeScale
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const Template: Story<ArgTypes> = ({
|
|
36
|
-
tasks,
|
|
37
|
-
fromDate,
|
|
38
|
-
toDate,
|
|
39
|
-
extendGridLines,
|
|
40
|
-
timeScale = 'week-day'
|
|
41
|
-
}: ArgTypes) => html`
|
|
42
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
43
|
-
|
|
44
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
|
45
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
|
46
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
47
|
-
<link href="/themes/md-typescale-styles.css" rel="stylesheet" />
|
|
48
|
-
|
|
49
|
-
<link
|
|
50
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
51
|
-
rel="stylesheet"
|
|
52
|
-
/>
|
|
53
|
-
<link
|
|
54
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
55
|
-
rel="stylesheet"
|
|
56
|
-
/>
|
|
57
|
-
<link
|
|
58
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
59
|
-
rel="stylesheet"
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
<style>
|
|
63
|
-
${MDTypeScaleStyles.cssText}
|
|
64
|
-
</style>
|
|
65
|
-
|
|
66
|
-
<style>
|
|
67
|
-
${CommonHeaderStyles.cssText}
|
|
68
|
-
</style>
|
|
69
|
-
|
|
70
|
-
<style>
|
|
71
|
-
html,
|
|
72
|
-
body {
|
|
73
|
-
margin: 0;
|
|
74
|
-
padding: 0;
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
|
|
77
|
-
overscroll-behavior: none;
|
|
78
|
-
|
|
79
|
-
/* This is a font-stack that tries to use the system-default sans-serifs first */
|
|
80
|
-
font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
81
|
-
line-height: 1.5;
|
|
82
|
-
-webkit-font-smoothing: antialiased;
|
|
83
|
-
|
|
84
|
-
accent-color: var(--md-sys-color-primary);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
body {
|
|
88
|
-
width: 100%;
|
|
89
|
-
height: 800px;
|
|
90
|
-
text-align: center;
|
|
91
|
-
|
|
92
|
-
background-color: var(--md-sys-color-background);
|
|
93
|
-
color: var(--md-sys-color-on-background);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
ox-gantt {
|
|
97
|
-
width: 95%;
|
|
98
|
-
height: 800px;
|
|
99
|
-
box-sizing: border-box;
|
|
100
|
-
|
|
101
|
-
background-color: var(--md-sys-color-primary-container);
|
|
102
|
-
color: var(--md-sys-color-on-primary-container);
|
|
103
|
-
}
|
|
104
|
-
</style>
|
|
105
|
-
|
|
106
|
-
<ox-gantt
|
|
107
|
-
from-date=${new Date(fromDate).toISOString().split('T')[0]}
|
|
108
|
-
to-date=${new Date(toDate).toISOString().split('T')[0]}
|
|
109
|
-
.timeScale=${timeScale}
|
|
110
|
-
.tasks=${tasks}
|
|
111
|
-
@date-range-selected=${(e: CustomEvent) => {
|
|
112
|
-
console.log('date-range-selected', e.detail)
|
|
113
|
-
}}
|
|
114
|
-
@task-clicked=${(e: CustomEvent) => {
|
|
115
|
-
console.log('task-clicked', e.detail)
|
|
116
|
-
}}
|
|
117
|
-
?extend-grid-lines=${extendGridLines}
|
|
118
|
-
>
|
|
119
|
-
</ox-gantt>
|
|
120
|
-
`
|
|
121
|
-
|
|
122
|
-
export const Regular = Template.bind({})
|
|
123
|
-
Regular.args = {
|
|
124
|
-
fromDate: '2022-12-27',
|
|
125
|
-
toDate: '2024-12-31',
|
|
126
|
-
tasks: [
|
|
127
|
-
{
|
|
128
|
-
id: '1',
|
|
129
|
-
title: 'Design',
|
|
130
|
-
type: 'task',
|
|
131
|
-
startDate: '2023-01-01',
|
|
132
|
-
endDate: '2023-01-05',
|
|
133
|
-
progress: 60,
|
|
134
|
-
dependsOn: '',
|
|
135
|
-
duration: 5,
|
|
136
|
-
tags: ['active'],
|
|
137
|
-
resources: [{ type: '철근/형틀공', allocated: 6 }],
|
|
138
|
-
children: []
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
id: '2',
|
|
142
|
-
title: 'Development',
|
|
143
|
-
type: 'milestone',
|
|
144
|
-
style: 'blue',
|
|
145
|
-
startDate: '2023-01-06',
|
|
146
|
-
endDate: '2023-01-06',
|
|
147
|
-
progress: 30,
|
|
148
|
-
dependsOn: '1',
|
|
149
|
-
duration: 1,
|
|
150
|
-
tags: ['milestone'],
|
|
151
|
-
resources: [{ type: '철근/형틀공', allocated: 6 }],
|
|
152
|
-
children: []
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
id: '3',
|
|
156
|
-
title: 'Coding',
|
|
157
|
-
type: 'phase',
|
|
158
|
-
startDate: '2023-01-07',
|
|
159
|
-
endDate: '2023-01-15',
|
|
160
|
-
progress: 10,
|
|
161
|
-
dependsOn: '2',
|
|
162
|
-
duration: 9,
|
|
163
|
-
tags: ['critical'],
|
|
164
|
-
style: 'red',
|
|
165
|
-
children: [
|
|
166
|
-
{
|
|
167
|
-
id: '3-1',
|
|
168
|
-
title: 'Coding-A',
|
|
169
|
-
type: 'task',
|
|
170
|
-
startDate: '2023-01-07',
|
|
171
|
-
endDate: '2023-01-10',
|
|
172
|
-
progress: 60,
|
|
173
|
-
dependsOn: '',
|
|
174
|
-
duration: 4,
|
|
175
|
-
tags: ['done'],
|
|
176
|
-
style: 'green',
|
|
177
|
-
children: [
|
|
178
|
-
{
|
|
179
|
-
id: '3-1-1',
|
|
180
|
-
title: 'Coding-A',
|
|
181
|
-
type: 'task',
|
|
182
|
-
startDate: '2023-01-07',
|
|
183
|
-
endDate: '2023-01-10',
|
|
184
|
-
progress: 60,
|
|
185
|
-
dependsOn: '',
|
|
186
|
-
duration: 4,
|
|
187
|
-
tags: ['active'],
|
|
188
|
-
resources: [{ type: '창호공', allocated: 5 }],
|
|
189
|
-
children: []
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
id: '3-1-2',
|
|
193
|
-
title: 'Coding-B',
|
|
194
|
-
type: 'task',
|
|
195
|
-
startDate: '2023-01-11',
|
|
196
|
-
endDate: '2023-01-15',
|
|
197
|
-
dependsOn: '3-1-1',
|
|
198
|
-
duration: 5,
|
|
199
|
-
tags: ['active'],
|
|
200
|
-
resources: [{ type: '창호공', allocated: 3 }],
|
|
201
|
-
children: []
|
|
202
|
-
}
|
|
203
|
-
]
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
id: '3-2',
|
|
207
|
-
title: 'Coding-B',
|
|
208
|
-
type: 'task',
|
|
209
|
-
startDate: '2023-01-11',
|
|
210
|
-
endDate: '2023-01-15',
|
|
211
|
-
dependsOn: '3-1',
|
|
212
|
-
duration: 5,
|
|
213
|
-
tags: ['active'],
|
|
214
|
-
resources: [{ type: '창호공', allocated: 6 }],
|
|
215
|
-
children: []
|
|
216
|
-
}
|
|
217
|
-
]
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
id: '4',
|
|
221
|
-
title: 'Test',
|
|
222
|
-
type: 'milestone',
|
|
223
|
-
startDate: '2023-01-07',
|
|
224
|
-
endDate: '2023-01-10',
|
|
225
|
-
progress: 100,
|
|
226
|
-
dependsOn: '1',
|
|
227
|
-
duration: 1,
|
|
228
|
-
tags: ['done'],
|
|
229
|
-
style: 'green',
|
|
230
|
-
resources: [{ type: '방수공', allocated: 5 }],
|
|
231
|
-
children: []
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
id: '5',
|
|
235
|
-
title: 'Deploy',
|
|
236
|
-
type: 'milestone',
|
|
237
|
-
style: 'blue',
|
|
238
|
-
startDate: '2023-01-15',
|
|
239
|
-
endDate: '2023-01-21',
|
|
240
|
-
dependsOn: '4',
|
|
241
|
-
duration: 1,
|
|
242
|
-
tags: ['milestone'],
|
|
243
|
-
resources: [{ type: '목공', allocated: 3 }],
|
|
244
|
-
children: []
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
id: '6',
|
|
248
|
-
title: 'Publishing',
|
|
249
|
-
type: 'milestone',
|
|
250
|
-
style: 'blue',
|
|
251
|
-
startDate: '2023-01-11',
|
|
252
|
-
endDate: '2023-01-15',
|
|
253
|
-
dependsOn: '5',
|
|
254
|
-
duration: 1,
|
|
255
|
-
tags: ['milestone'],
|
|
256
|
-
resources: [{ type: '금속공', allocated: 1 }],
|
|
257
|
-
children: []
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
id: '7',
|
|
261
|
-
title: 'Provisioning',
|
|
262
|
-
type: 'milestone',
|
|
263
|
-
style: 'blue',
|
|
264
|
-
startDate: '2023-01-12',
|
|
265
|
-
endDate: '2023-01-15',
|
|
266
|
-
dependsOn: '6',
|
|
267
|
-
duration: 1,
|
|
268
|
-
tags: ['milestone'],
|
|
269
|
-
resources: [{ type: '타일공', allocated: 6 }],
|
|
270
|
-
children: []
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
id: '8',
|
|
274
|
-
title: 'Alpha Test',
|
|
275
|
-
type: 'milestone',
|
|
276
|
-
style: 'blue',
|
|
277
|
-
startDate: '2023-01-15',
|
|
278
|
-
endDate: '2023-01-17',
|
|
279
|
-
dependsOn: '7',
|
|
280
|
-
duration: 1,
|
|
281
|
-
tags: ['critical'],
|
|
282
|
-
resources: [{ type: '창호공', allocated: 7 }],
|
|
283
|
-
children: []
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
id: '9',
|
|
287
|
-
title: 'Beta Task',
|
|
288
|
-
type: 'milestone',
|
|
289
|
-
style: 'blue',
|
|
290
|
-
startDate: '2023-01-15',
|
|
291
|
-
endDate: '2023-01-18',
|
|
292
|
-
dependsOn: '8',
|
|
293
|
-
duration: 1,
|
|
294
|
-
tags: ['active'],
|
|
295
|
-
resources: [{ type: '도배공', allocated: 8 }],
|
|
296
|
-
children: []
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
id: '10',
|
|
300
|
-
title: 'Gamma Test',
|
|
301
|
-
type: 'milestone',
|
|
302
|
-
// section: testSection,
|
|
303
|
-
startDate: '2023-01-18',
|
|
304
|
-
endDate: '2023-01-19',
|
|
305
|
-
dependsOn: '9',
|
|
306
|
-
duration: 1,
|
|
307
|
-
tags: ['critical'],
|
|
308
|
-
style: 'red',
|
|
309
|
-
resources: [{ type: '조적공', allocated: 6 }],
|
|
310
|
-
children: []
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
id: '11',
|
|
314
|
-
title: 'Zeta Test',
|
|
315
|
-
type: 'milestone',
|
|
316
|
-
style: 'blue',
|
|
317
|
-
startDate: '2023-01-18',
|
|
318
|
-
endDate: '2023-01-22',
|
|
319
|
-
dependsOn: '9',
|
|
320
|
-
duration: 1,
|
|
321
|
-
tags: ['milestone'],
|
|
322
|
-
resources: [{ type: '철근/형틀공', allocated: 6 }],
|
|
323
|
-
children: []
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
id: '12',
|
|
327
|
-
title: 'Release',
|
|
328
|
-
type: 'milestone',
|
|
329
|
-
style: 'blue',
|
|
330
|
-
startDate: '2023-01-18',
|
|
331
|
-
endDate: '2023-01-23',
|
|
332
|
-
dependsOn: '9',
|
|
333
|
-
duration: 1,
|
|
334
|
-
resources: [{ type: '방수공', allocated: 6 }],
|
|
335
|
-
tags: ['milestone'],
|
|
336
|
-
children: [
|
|
337
|
-
{
|
|
338
|
-
id: '12-1',
|
|
339
|
-
title: 'Coding-A',
|
|
340
|
-
type: 'task',
|
|
341
|
-
startDate: '2023-01-07',
|
|
342
|
-
endDate: '2023-01-10',
|
|
343
|
-
progress: 60,
|
|
344
|
-
dependsOn: '',
|
|
345
|
-
duration: 4,
|
|
346
|
-
tags: ['done'],
|
|
347
|
-
style: 'green',
|
|
348
|
-
resources: [{ type: '방수공', allocated: 6 }],
|
|
349
|
-
children: []
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
id: '12-2',
|
|
353
|
-
title: 'Coding-B',
|
|
354
|
-
type: 'task',
|
|
355
|
-
startDate: '2023-01-11',
|
|
356
|
-
endDate: '2023-01-15',
|
|
357
|
-
dependsOn: '12-1',
|
|
358
|
-
duration: 5,
|
|
359
|
-
tags: ['active'],
|
|
360
|
-
resources: [{ type: '조적공', allocated: 6 }],
|
|
361
|
-
children: []
|
|
362
|
-
}
|
|
363
|
-
]
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
id: '13',
|
|
367
|
-
title: 'Release',
|
|
368
|
-
type: 'milestone',
|
|
369
|
-
startDate: '2023-01-22',
|
|
370
|
-
endDate: '2023-01-27',
|
|
371
|
-
dependsOn: '12',
|
|
372
|
-
duration: 1,
|
|
373
|
-
tags: ['done'],
|
|
374
|
-
style: 'green',
|
|
375
|
-
children: []
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
id: '14',
|
|
379
|
-
title: 'Release',
|
|
380
|
-
type: 'milestone',
|
|
381
|
-
style: 'blue',
|
|
382
|
-
startDate: '2023-01-27',
|
|
383
|
-
endDate: '2023-01-30',
|
|
384
|
-
dependsOn: '13',
|
|
385
|
-
duration: 1,
|
|
386
|
-
tags: ['milestone'],
|
|
387
|
-
resources: [{ type: '금속공', allocated: 1 }],
|
|
388
|
-
children: []
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
id: '15',
|
|
392
|
-
title: 'Release',
|
|
393
|
-
type: 'milestone',
|
|
394
|
-
style: 'blue',
|
|
395
|
-
startDate: '2023-01-30',
|
|
396
|
-
endDate: '2023-01-31',
|
|
397
|
-
dependsOn: '14',
|
|
398
|
-
duration: 1,
|
|
399
|
-
tags: ['milestone'],
|
|
400
|
-
children: []
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
id: '16',
|
|
404
|
-
title: 'Release',
|
|
405
|
-
type: 'milestone',
|
|
406
|
-
style: 'blue',
|
|
407
|
-
startDate: '2023-01-31',
|
|
408
|
-
endDate: '2023-02-05',
|
|
409
|
-
dependsOn: '15',
|
|
410
|
-
duration: 1,
|
|
411
|
-
resources: [{ type: '창호공', allocated: 1 }],
|
|
412
|
-
tags: ['active'],
|
|
413
|
-
children: []
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
id: '17',
|
|
417
|
-
title: 'Release',
|
|
418
|
-
type: 'milestone',
|
|
419
|
-
style: 'blue',
|
|
420
|
-
startDate: '2023-02-06',
|
|
421
|
-
endDate: '2023-02-07',
|
|
422
|
-
dependsOn: '16',
|
|
423
|
-
duration: 1,
|
|
424
|
-
tags: ['milestone'],
|
|
425
|
-
children: []
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
id: '18',
|
|
429
|
-
title: 'Release',
|
|
430
|
-
type: 'milestone',
|
|
431
|
-
startDate: '2023-02-08',
|
|
432
|
-
endDate: '2023-02-09',
|
|
433
|
-
dependsOn: '17',
|
|
434
|
-
duration: 1,
|
|
435
|
-
tags: ['critical'],
|
|
436
|
-
style: 'red',
|
|
437
|
-
children: []
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
id: '19',
|
|
441
|
-
title: 'Release',
|
|
442
|
-
type: 'milestone',
|
|
443
|
-
style: 'blue',
|
|
444
|
-
startDate: '2023-02-10',
|
|
445
|
-
endDate: '2023-02-25',
|
|
446
|
-
dependsOn: '18',
|
|
447
|
-
duration: 1,
|
|
448
|
-
tags: ['milestone'],
|
|
449
|
-
resources: [{ type: '창호공', allocated: 7 }],
|
|
450
|
-
children: []
|
|
451
|
-
}
|
|
452
|
-
]
|
|
453
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "esnext",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"resolveJsonModule": true,
|
|
7
|
-
"noEmitOnError": true,
|
|
8
|
-
"lib": ["es2017", "dom"],
|
|
9
|
-
"strict": true,
|
|
10
|
-
"esModuleInterop": false,
|
|
11
|
-
"allowSyntheticDefaultImports": true,
|
|
12
|
-
"experimentalDecorators": true,
|
|
13
|
-
"useDefineForClassFields": false,
|
|
14
|
-
"importHelpers": true,
|
|
15
|
-
"outDir": "dist",
|
|
16
|
-
"sourceMap": true,
|
|
17
|
-
"inlineSources": true,
|
|
18
|
-
"rootDir": "./",
|
|
19
|
-
"declaration": true,
|
|
20
|
-
"incremental": true,
|
|
21
|
-
"skipLibCheck": true,
|
|
22
|
-
"types": ["node", "mocha"]
|
|
23
|
-
},
|
|
24
|
-
"include": ["**/*.ts"]
|
|
25
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
|
|
2
|
-
|
|
3
|
-
/** Use Hot Module replacement by adding --hmr to the start command */
|
|
4
|
-
const hmr = process.argv.includes('--hmr');
|
|
5
|
-
|
|
6
|
-
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
|
|
7
|
-
open: '/demo/',
|
|
8
|
-
/** Use regular watch mode if HMR is not enabled. */
|
|
9
|
-
watch: !hmr,
|
|
10
|
-
/** Resolve bare module imports */
|
|
11
|
-
nodeResolve: {
|
|
12
|
-
exportConditions: ['browser', 'development'],
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
16
|
-
// esbuildTarget: 'auto'
|
|
17
|
-
|
|
18
|
-
/** Set appIndex to enable SPA routing */
|
|
19
|
-
// appIndex: 'demo/index.html',
|
|
20
|
-
|
|
21
|
-
plugins: [
|
|
22
|
-
/** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
|
|
23
|
-
// hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
|
|
24
|
-
],
|
|
25
|
-
|
|
26
|
-
// See documentation for all available options
|
|
27
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// import { playwrightLauncher } from '@web/test-runner-playwright';
|
|
2
|
-
|
|
3
|
-
const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
|
|
4
|
-
|
|
5
|
-
export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
6
|
-
/** Test files to run */
|
|
7
|
-
files: 'dist/test/**/*.test.js',
|
|
8
|
-
|
|
9
|
-
/** Resolve bare module imports */
|
|
10
|
-
nodeResolve: {
|
|
11
|
-
exportConditions: ['browser', 'development'],
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
/** Filter out lit dev mode logs */
|
|
15
|
-
filterBrowserLogs(log) {
|
|
16
|
-
for (const arg of log.args) {
|
|
17
|
-
if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return true;
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
25
|
-
// esbuildTarget: 'auto',
|
|
26
|
-
|
|
27
|
-
/** Amount of browsers to run concurrently */
|
|
28
|
-
// concurrentBrowsers: 2,
|
|
29
|
-
|
|
30
|
-
/** Amount of test files per browser to test concurrently */
|
|
31
|
-
// concurrency: 1,
|
|
32
|
-
|
|
33
|
-
/** Browsers to run tests on */
|
|
34
|
-
// browsers: [
|
|
35
|
-
// playwrightLauncher({ product: 'chromium' }),
|
|
36
|
-
// playwrightLauncher({ product: 'firefox' }),
|
|
37
|
-
// playwrightLauncher({ product: 'webkit' }),
|
|
38
|
-
// ],
|
|
39
|
-
|
|
40
|
-
// See documentation for all available options
|
|
41
|
-
});
|