@operato/dataset 7.1.31 → 7.1.32
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 +10 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/.editorconfig +0 -29
- package/.storybook/main.js +0 -3
- package/.storybook/preview.js +0 -52
- package/.storybook/server.mjs +0 -8
- package/demo/favicon.ico +0 -0
- package/demo/index.html +0 -349
- package/demo/ox-data-ooc-brief-view-test.html +0 -349
- package/src/grist-editor/index.ts +0 -10
- package/src/grist-editor/ox-grist-editor-data-item-spec.ts +0 -93
- package/src/grist-editor/ox-popup-data-item-spec.ts +0 -93
- package/src/index.ts +0 -2
- package/src/ox-data-entry-form.ts +0 -303
- package/src/ox-data-entry-subgroup-form.ts +0 -157
- package/src/ox-data-entry-subgroup-view.ts +0 -221
- package/src/ox-data-entry-view.ts +0 -241
- package/src/ox-data-item-spec.ts +0 -131
- package/src/ox-data-ooc-badge.ts +0 -73
- package/src/ox-data-ooc-brief-view.ts +0 -43
- package/src/ox-data-ooc-correction-part.ts +0 -107
- package/src/ox-data-ooc-history.ts +0 -74
- package/src/ox-data-ooc-view.ts +0 -51
- package/src/ox-data-sample-subgroup-view.ts +0 -210
- package/src/ox-data-sample-view.ts +0 -271
- package/src/ox-data-summary-view.ts +0 -198
- package/src/types.ts +0 -178
- package/src/usecase/ccp/index.ts +0 -10
- package/src/usecase/ccp/ox-data-use-case-ccp.ts +0 -147
- package/src/usecase/ccp/ox-input-ccp-limits.ts +0 -184
- package/src/usecase/ccp/ox-property-editor-ccp-limits.ts +0 -23
- package/src/usecase/ox-data-use-case.ts +0 -178
- package/src/usecase/qc/index.ts +0 -10
- package/src/usecase/qc/ox-data-use-case-qc.ts +0 -76
- package/src/usecase/qc/ox-input-qc-limits.ts +0 -183
- package/src/usecase/qc/ox-property-editor-qc-limits.ts +0 -23
- package/src/usecase/spc/index.ts +0 -10
- package/src/usecase/spc/ox-data-use-case-spc.ts +0 -147
- package/src/usecase/spc/ox-input-spc-limits.ts +0 -184
- package/src/usecase/spc/ox-property-editor-spc-limits.ts +0 -23
- package/stories/ox-data-entry-form.stories.ts +0 -253
- package/stories/ox-data-item-spec.stories.ts +0 -257
- package/stories/ox-data-ooc-brief-view.stories.ts +0 -333
- package/stories/ox-data-ooc-view.stories.ts +0 -327
- package/stories/ox-data-sample-view.stories.ts +0 -313
- package/stories/ox-grist-editor-data-item-spec.stories.ts +0 -412
- package/tsconfig.json +0 -24
- package/web-dev-server.config.mjs +0 -27
- package/web-test-runner.config.mjs +0 -41
|
@@ -1,412 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js'
|
|
2
|
-
import '@operato/property-editor/ox-property-editor-checkbox.js'
|
|
3
|
-
import '@operato/property-editor/ox-property-editor-number.js'
|
|
4
|
-
import '@operato/property-editor/ox-property-editor-string.js'
|
|
5
|
-
import '@operato/property-editor/ox-property-editor-options.js'
|
|
6
|
-
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
7
|
-
import '@operato/data-grist/ox-filters-form.js'
|
|
8
|
-
import '@operato/data-grist/ox-sorters-control.js'
|
|
9
|
-
import '@operato/grist-editor' /* regiester grist editors */
|
|
10
|
-
/* set grist-editors */
|
|
11
|
-
import '../src/grist-editor/index.js'
|
|
12
|
-
import '../src/usecase/ccp' /* register usecase CCP */
|
|
13
|
-
import '../src/usecase/qc' /* register usecase QC */
|
|
14
|
-
|
|
15
|
-
import { css, html, LitElement, TemplateResult } from 'lit'
|
|
16
|
-
import { state } from 'lit/decorators.js'
|
|
17
|
-
|
|
18
|
-
import { FetchOption, GristRecord } from '@operato/data-grist'
|
|
19
|
-
import { i18next } from '@operato/i18n'
|
|
20
|
-
import { OxPropertyEditor } from '@operato/property-editor'
|
|
21
|
-
import { CommonGristStyles } from '@operato/styles'
|
|
22
|
-
|
|
23
|
-
OxPropertyEditor.register({
|
|
24
|
-
number: 'ox-property-editor-number',
|
|
25
|
-
string: 'ox-property-editor-string',
|
|
26
|
-
boolean: 'ox-property-editor-checkbox',
|
|
27
|
-
options: 'ox-property-editor-options'
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
const fetchHandler = async ({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) => {
|
|
31
|
-
var total = 10
|
|
32
|
-
var start = (page - 1) * limit
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
total,
|
|
36
|
-
records: Array(limit * page > total ? total % limit : limit)
|
|
37
|
-
.fill('')
|
|
38
|
-
.map((item, idx) => {
|
|
39
|
-
return {
|
|
40
|
-
id: idx,
|
|
41
|
-
name: `name-${start + idx + 1}`,
|
|
42
|
-
description: `description-${start + idx + 1}`,
|
|
43
|
-
sequence: idx + 1,
|
|
44
|
-
active: true,
|
|
45
|
-
tag: `tag-${idx + 1}`,
|
|
46
|
-
type: idx % 3 === 0 ? 'select' : idx % 3 === 1 ? 'number' : 'string',
|
|
47
|
-
spec: {
|
|
48
|
-
ccp: {
|
|
49
|
-
criticalLimits: 100,
|
|
50
|
-
targetLimits: 200
|
|
51
|
-
},
|
|
52
|
-
qc: {
|
|
53
|
-
criticalLimits: 300,
|
|
54
|
-
targetLimits: true
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
options:
|
|
58
|
-
idx % 2 === 0
|
|
59
|
-
? {
|
|
60
|
-
options: [
|
|
61
|
-
{
|
|
62
|
-
text: 'A',
|
|
63
|
-
value: 'a'
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
text: 'B',
|
|
67
|
-
value: 'b'
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
: undefined,
|
|
72
|
-
schedule: '* * * * * *',
|
|
73
|
-
keyvalue: {},
|
|
74
|
-
createdAt: Date.now(),
|
|
75
|
-
updatedAt: Date.now()
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
class GristDemo extends LitElement {
|
|
82
|
-
static styles = [
|
|
83
|
-
CommonGristStyles,
|
|
84
|
-
css`
|
|
85
|
-
:host {
|
|
86
|
-
display: flex;
|
|
87
|
-
flex-direction: column;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
#tailer {
|
|
91
|
-
display: flex;
|
|
92
|
-
flex-direction: row;
|
|
93
|
-
margin: 0 var(--spacing-medium);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
#tailer a {
|
|
97
|
-
padding: 0 var(--padding-default) 0 var(--padding-default);
|
|
98
|
-
margin: 0 var(--spacing-small);
|
|
99
|
-
border-right: 1px solid rgba(0, 0, 0, 0.1);
|
|
100
|
-
font-size: var(--fontsize-default);
|
|
101
|
-
color: var(--md-sys-color-on-primary-container);
|
|
102
|
-
}
|
|
103
|
-
`
|
|
104
|
-
]
|
|
105
|
-
|
|
106
|
-
@state() mode: String = 'CARD'
|
|
107
|
-
|
|
108
|
-
get grist() {
|
|
109
|
-
return this.renderRoot.querySelector('ox-grist')
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
config: any = {
|
|
113
|
-
list: { fields: ['name', 'description', 'active'] },
|
|
114
|
-
columns: [
|
|
115
|
-
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
116
|
-
{
|
|
117
|
-
type: 'gutter',
|
|
118
|
-
gutterName: 'button',
|
|
119
|
-
icon: 'add',
|
|
120
|
-
handlers: {
|
|
121
|
-
click: 'record-copy'
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{ type: 'gutter', gutterName: 'sequence' },
|
|
125
|
-
{
|
|
126
|
-
type: 'gutter',
|
|
127
|
-
gutterName: 'button',
|
|
128
|
-
icon: 'arrow_upward',
|
|
129
|
-
handlers: {
|
|
130
|
-
click: 'move-up'
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
type: 'gutter',
|
|
135
|
-
gutterName: 'button',
|
|
136
|
-
icon: 'arrow_downward',
|
|
137
|
-
handlers: {
|
|
138
|
-
click: 'move-down'
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
type: 'number',
|
|
143
|
-
name: 'sequence',
|
|
144
|
-
hidden: true
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
type: 'string',
|
|
148
|
-
name: 'id',
|
|
149
|
-
hidden: true
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
type: 'string',
|
|
153
|
-
name: 'name',
|
|
154
|
-
header: i18next.t('field.name'),
|
|
155
|
-
record: {
|
|
156
|
-
editable: true
|
|
157
|
-
},
|
|
158
|
-
width: 140
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
type: 'string',
|
|
162
|
-
name: 'description',
|
|
163
|
-
header: i18next.t('field.description'),
|
|
164
|
-
record: {
|
|
165
|
-
editable: true
|
|
166
|
-
},
|
|
167
|
-
width: 180
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
type: 'checkbox',
|
|
171
|
-
name: 'active',
|
|
172
|
-
label: true,
|
|
173
|
-
header: i18next.t('field.active'),
|
|
174
|
-
record: {
|
|
175
|
-
editable: true
|
|
176
|
-
},
|
|
177
|
-
sortable: true,
|
|
178
|
-
width: 60
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
type: 'string',
|
|
182
|
-
name: 'tag',
|
|
183
|
-
header: i18next.t('field.tag'),
|
|
184
|
-
record: {
|
|
185
|
-
editable: true
|
|
186
|
-
},
|
|
187
|
-
width: 180
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
type: 'select',
|
|
191
|
-
name: 'type',
|
|
192
|
-
header: i18next.t('field.type'),
|
|
193
|
-
record: {
|
|
194
|
-
options: ['', 'number', 'text', 'select', 'boolean', 'file', 'signature'],
|
|
195
|
-
editable: true
|
|
196
|
-
},
|
|
197
|
-
width: 120
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
type: 'crontab',
|
|
201
|
-
name: 'schedule',
|
|
202
|
-
header: i18next.t('field.schedule'),
|
|
203
|
-
record: {
|
|
204
|
-
editable: true
|
|
205
|
-
},
|
|
206
|
-
width: 120
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
type: 'partition-keys',
|
|
210
|
-
name: 'keyvalue',
|
|
211
|
-
header: i18next.t('field.keyvalue'),
|
|
212
|
-
record: {
|
|
213
|
-
editable: true,
|
|
214
|
-
options: {
|
|
215
|
-
objectified: true,
|
|
216
|
-
valuetype: 'string'
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
width: 120
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
type: 'parameters',
|
|
223
|
-
name: 'options',
|
|
224
|
-
header: i18next.t('field.options'),
|
|
225
|
-
record: {
|
|
226
|
-
editable: true,
|
|
227
|
-
renderer: (value: any) => {
|
|
228
|
-
return typeof value === 'string' ? value : typeof value === 'object' ? JSON.stringify(value) : ''
|
|
229
|
-
},
|
|
230
|
-
options: async (value: any, column: any, record: GristRecord, row: GristRecord, field: any) => {
|
|
231
|
-
return {
|
|
232
|
-
name: record.type,
|
|
233
|
-
help: '',
|
|
234
|
-
spec:
|
|
235
|
-
record.type === 'select'
|
|
236
|
-
? [
|
|
237
|
-
{
|
|
238
|
-
type: 'options',
|
|
239
|
-
name: 'options',
|
|
240
|
-
label: 'options'
|
|
241
|
-
}
|
|
242
|
-
]
|
|
243
|
-
: [],
|
|
244
|
-
context: this.grist,
|
|
245
|
-
objectified: true /* tell parameters editor not to need to parse */
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
width: 120
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
type: 'string',
|
|
253
|
-
name: 'unit',
|
|
254
|
-
header: i18next.t('field.unit'),
|
|
255
|
-
record: {
|
|
256
|
-
editable: true
|
|
257
|
-
},
|
|
258
|
-
width: 120
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
type: 'number',
|
|
262
|
-
name: 'quota',
|
|
263
|
-
header: i18next.t('field.quota'),
|
|
264
|
-
record: {
|
|
265
|
-
editable: true
|
|
266
|
-
},
|
|
267
|
-
width: 60
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
type: 'data-item-spec',
|
|
271
|
-
name: 'spec',
|
|
272
|
-
header: i18next.t('field.spec'),
|
|
273
|
-
record: {
|
|
274
|
-
editable: true,
|
|
275
|
-
options: {
|
|
276
|
-
name,
|
|
277
|
-
objectified: true
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
width: 200
|
|
281
|
-
}
|
|
282
|
-
],
|
|
283
|
-
rows: {
|
|
284
|
-
selectable: {
|
|
285
|
-
multiple: true
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
pagination: {
|
|
289
|
-
infinite: true
|
|
290
|
-
},
|
|
291
|
-
sorters: [
|
|
292
|
-
{
|
|
293
|
-
name: 'sequence'
|
|
294
|
-
}
|
|
295
|
-
]
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
render() {
|
|
299
|
-
const mode = this.mode || 'CARD'
|
|
300
|
-
|
|
301
|
-
return html`
|
|
302
|
-
<ox-grist .config=${this.config} .mode=${mode} auto-fetch .fetchHandler=${fetchHandler}>
|
|
303
|
-
<div id="filters" slot="headroom">
|
|
304
|
-
<ox-filters-form @filters-change=${(e: CustomEvent) => console.log('changed', e.detail)}></ox-filters-form>
|
|
305
|
-
</div>
|
|
306
|
-
|
|
307
|
-
<div slot="headroom" id="headroom">
|
|
308
|
-
<div id="modes">
|
|
309
|
-
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>
|
|
310
|
-
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>
|
|
311
|
-
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
312
|
-
</div>
|
|
313
|
-
</div>
|
|
314
|
-
</ox-grist>
|
|
315
|
-
`
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
customElements.define('ox-data-items', GristDemo)
|
|
320
|
-
|
|
321
|
-
export default {
|
|
322
|
-
title: 'ox-grist-editor-data-item-spec',
|
|
323
|
-
component: 'ox-grist-editor-data-item-spec',
|
|
324
|
-
argTypes: {}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
interface Story<T> {
|
|
328
|
-
(args: T): TemplateResult
|
|
329
|
-
args?: Partial<T>
|
|
330
|
-
argTypes?: Record<string, unknown>
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
interface ArgTypes {}
|
|
334
|
-
|
|
335
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
336
|
-
<link
|
|
337
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
338
|
-
rel="stylesheet"
|
|
339
|
-
/>
|
|
340
|
-
<link
|
|
341
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
342
|
-
rel="stylesheet"
|
|
343
|
-
/>
|
|
344
|
-
<link
|
|
345
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
346
|
-
rel="stylesheet"
|
|
347
|
-
/>
|
|
348
|
-
|
|
349
|
-
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
350
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
|
351
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
|
352
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
353
|
-
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
354
|
-
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
355
|
-
|
|
356
|
-
<style>
|
|
357
|
-
[slot='headroom'] {
|
|
358
|
-
display: flex;
|
|
359
|
-
flex-direction: row;
|
|
360
|
-
align-items: center;
|
|
361
|
-
padding: var(--padding-default) var(--spacing-large);
|
|
362
|
-
background-color: var(--md-sys-color-surface);
|
|
363
|
-
box-shadow: var(--box-shadow);
|
|
364
|
-
|
|
365
|
-
--md-icon-size: 24px;
|
|
366
|
-
}
|
|
367
|
-
#sorters md-icon,
|
|
368
|
-
#modes md-icon {
|
|
369
|
-
--md-icon-size: 18px;
|
|
370
|
-
}
|
|
371
|
-
#sorters {
|
|
372
|
-
margin-left: auto;
|
|
373
|
-
margin-right: var(--spacing-medium);
|
|
374
|
-
padding-left: var(--spacing-small);
|
|
375
|
-
border-bottom: var(--border-dim-color);
|
|
376
|
-
position: relative;
|
|
377
|
-
color: var(--md-sys-color-on-secondary-container);
|
|
378
|
-
font-size: var(--fontsize-default);
|
|
379
|
-
user-select: none;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
#sorters > * {
|
|
383
|
-
padding: var(--spacing-small);
|
|
384
|
-
vertical-align: middle;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
#filters {
|
|
388
|
-
display: flex;
|
|
389
|
-
justify-content: center;
|
|
390
|
-
align-items: center;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
#filters * {
|
|
394
|
-
margin-right: var(--spacing-medium);
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
@media only screen and (max-width: 460px) {
|
|
398
|
-
#filters {
|
|
399
|
-
flex-direction: column;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
#modes {
|
|
403
|
-
display: none;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
</style>
|
|
407
|
-
|
|
408
|
-
<ox-data-items mode="LIST"></ox-data-items>
|
|
409
|
-
`
|
|
410
|
-
|
|
411
|
-
export const Regular = Template.bind({})
|
|
412
|
-
Regular.args = {}
|
package/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2018",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"noEmitOnError": true,
|
|
7
|
-
"lib": ["es2017", "dom"],
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": false,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"experimentalDecorators": true,
|
|
12
|
-
"useDefineForClassFields": false,
|
|
13
|
-
"importHelpers": true,
|
|
14
|
-
"outDir": "dist",
|
|
15
|
-
"sourceMap": true,
|
|
16
|
-
"inlineSources": true,
|
|
17
|
-
"rootDir": "./",
|
|
18
|
-
"declaration": true,
|
|
19
|
-
"incremental": true,
|
|
20
|
-
"skipLibCheck": true,
|
|
21
|
-
"types": ["node", "mocha"]
|
|
22
|
-
},
|
|
23
|
-
"include": ["**/*.ts"]
|
|
24
|
-
}
|
|
@@ -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
|
-
});
|