@operato/input 8.0.0-beta.0 → 8.0.0-beta.1
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/package.json +7 -7
- package/.editorconfig +0 -29
- package/.storybook/main.js +0 -3
- package/.storybook/preview.js +0 -52
- package/.storybook/server.mjs +0 -8
- package/src/index.ts +0 -35
- package/src/locale/locale-codes.ts +0 -18
- package/src/locale/locale-picker.ts +0 -43
- package/src/locale/localization.ts +0 -15
- package/src/locales/en.ts +0 -30
- package/src/locales/ko.ts +0 -30
- package/src/locales/ms.ts +0 -30
- package/src/locales/zh.ts +0 -30
- package/src/ox-buttons-radio.ts +0 -140
- package/src/ox-checkbox.ts +0 -181
- package/src/ox-form-field.ts +0 -53
- package/src/ox-input-3axis.ts +0 -77
- package/src/ox-input-3dish.ts +0 -211
- package/src/ox-input-angle.ts +0 -73
- package/src/ox-input-barcode.ts +0 -318
- package/src/ox-input-code.ts +0 -139
- package/src/ox-input-color-gradient.ts +0 -349
- package/src/ox-input-color-stops.ts +0 -525
- package/src/ox-input-color.ts +0 -338
- package/src/ox-input-container.ts +0 -32
- package/src/ox-input-crontab.ts +0 -595
- package/src/ox-input-data.ts +0 -219
- package/src/ox-input-direction.ts +0 -92
- package/src/ox-input-duration.ts +0 -175
- package/src/ox-input-file.ts +0 -209
- package/src/ox-input-hashtags.ts +0 -185
- package/src/ox-input-i18n-label.ts +0 -140
- package/src/ox-input-image.ts +0 -168
- package/src/ox-input-key-values.ts +0 -301
- package/src/ox-input-layout/ox-input-card-layout.ts +0 -58
- package/src/ox-input-layout/ox-input-grid-layout.ts +0 -64
- package/src/ox-input-layout/ox-input-layout.ts +0 -77
- package/src/ox-input-mass-fraction.ts +0 -437
- package/src/ox-input-multiple-colors.ts +0 -135
- package/src/ox-input-options.ts +0 -216
- package/src/ox-input-partition-keys.ts +0 -303
- package/src/ox-input-privilege.ts +0 -163
- package/src/ox-input-quantifier.ts +0 -62
- package/src/ox-input-range.ts +0 -146
- package/src/ox-input-scene-component-id.ts +0 -73
- package/src/ox-input-search.ts +0 -126
- package/src/ox-input-select-buttons.ts +0 -75
- package/src/ox-input-signature.ts +0 -208
- package/src/ox-input-stack.ts +0 -136
- package/src/ox-input-switch.ts +0 -117
- package/src/ox-input-table-column-config.ts +0 -211
- package/src/ox-input-table.ts +0 -404
- package/src/ox-input-textarea.ts +0 -86
- package/src/ox-input-unit-number.ts +0 -354
- package/src/ox-input-value-map.ts +0 -342
- package/src/ox-input-value-ranges.ts +0 -363
- package/src/ox-input-work-shift.ts +0 -290
- package/src/ox-select-floor.ts +0 -246
- package/src/ox-select.ts +0 -219
- package/stories/image-for-select-floor.ts +0 -2
- package/stories/ox-buttons-radio.stories.ts +0 -89
- package/stories/ox-checkbox.stories.ts +0 -111
- package/stories/ox-input-3axis.stories.ts +0 -77
- package/stories/ox-input-3dish.stories.ts +0 -106
- package/stories/ox-input-angle.stories.ts +0 -84
- package/stories/ox-input-barcode.stories.ts +0 -117
- package/stories/ox-input-code.stories.ts +0 -99
- package/stories/ox-input-crontab.stories.ts +0 -82
- package/stories/ox-input-data.stories.ts +0 -82
- package/stories/ox-input-direction.stories.ts +0 -91
- package/stories/ox-input-duration.stories.ts +0 -84
- package/stories/ox-input-file.stories.ts +0 -111
- package/stories/ox-input-hashtags.stories.ts +0 -82
- package/stories/ox-input-i18n-label.stories.ts +0 -103
- package/stories/ox-input-key-values.stories.ts +0 -97
- package/stories/ox-input-mass-fraction.stories.ts +0 -102
- package/stories/ox-input-multiple-colors.stories.ts +0 -72
- package/stories/ox-input-options.stories.ts +0 -80
- package/stories/ox-input-partition-keys.stories.ts +0 -84
- package/stories/ox-input-privilege.stories.ts +0 -108
- package/stories/ox-input-quantifier.stories.ts +0 -80
- package/stories/ox-input-range.stories.ts +0 -89
- package/stories/ox-input-search.stories.ts +0 -91
- package/stories/ox-input-select-buttons.stories.ts +0 -118
- package/stories/ox-input-signature.stories.ts +0 -75
- package/stories/ox-input-switch.stories.ts +0 -91
- package/stories/ox-input-table-column-config.stories.ts +0 -109
- package/stories/ox-input-unit.stories.ts +0 -151
- package/stories/ox-input-value-map.stories.ts +0 -92
- package/stories/ox-input-value-ranges.stories.ts +0 -92
- package/stories/ox-input-work-shift.stories.ts +0 -106
- package/stories/ox-select-floor.stories.ts +0 -197
- package/stories/ox-select-set-options.stories.ts +0 -208
- package/stories/ox-select.stories.ts +0 -181
- package/tsconfig.json +0 -25
- package/web-dev-server.config.mjs +0 -27
- package/web-test-runner.config.mjs +0 -41
@@ -1,208 +0,0 @@
|
|
1
|
-
import '../src/ox-select.js'
|
2
|
-
import '../src/ox-checkbox.js'
|
3
|
-
|
4
|
-
import { OxSelect } from '../src/ox-select.js'
|
5
|
-
import { html, TemplateResult } from 'lit'
|
6
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
7
|
-
|
8
|
-
export default {
|
9
|
-
title: 'ox-select-set-options',
|
10
|
-
component: 'ox-select',
|
11
|
-
argTypes: {
|
12
|
-
placeholder: { control: 'text' },
|
13
|
-
name: { control: 'text' },
|
14
|
-
options: { control: 'object' },
|
15
|
-
multiple: { control: 'boolean' },
|
16
|
-
withSearch: { control: 'boolean' },
|
17
|
-
disabled: { control: 'boolean' }
|
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
|
-
placeholder?: string
|
29
|
-
name?: string
|
30
|
-
value?: object | string
|
31
|
-
options?: string[] | { display: string; value: string }[]
|
32
|
-
multiple?: boolean
|
33
|
-
withSearch?: boolean
|
34
|
-
disabled?: boolean
|
35
|
-
}
|
36
|
-
|
37
|
-
const Template: Story<ArgTypes> = ({
|
38
|
-
placeholder = 'Checkbox',
|
39
|
-
name = 'hello',
|
40
|
-
value = '',
|
41
|
-
options = [],
|
42
|
-
multiple,
|
43
|
-
withSearch,
|
44
|
-
disabled
|
45
|
-
}: ArgTypes) => html`
|
46
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
47
|
-
|
48
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
49
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
50
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
51
|
-
|
52
|
-
<link
|
53
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
54
|
-
rel="stylesheet"
|
55
|
-
/>
|
56
|
-
<link
|
57
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
58
|
-
rel="stylesheet"
|
59
|
-
/>
|
60
|
-
<link
|
61
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
62
|
-
rel="stylesheet"
|
63
|
-
/>
|
64
|
-
|
65
|
-
<style>
|
66
|
-
${MDTypeScaleStyles.cssText}
|
67
|
-
</style>
|
68
|
-
|
69
|
-
<style>
|
70
|
-
.container {
|
71
|
-
height: 500px;
|
72
|
-
text-align: center;
|
73
|
-
padding: 20px;
|
74
|
-
|
75
|
-
background-color: var(--md-sys-color-primary-container);
|
76
|
-
color: var(--md-sys-color-on-primary-container);
|
77
|
-
}
|
78
|
-
</style>
|
79
|
-
|
80
|
-
<div class="container md-typescale-body-large-prominent">
|
81
|
-
<ox-select
|
82
|
-
name=${name}
|
83
|
-
@change=${(e: Event) => {
|
84
|
-
console.log((e.target as HTMLInputElement).value)
|
85
|
-
}}
|
86
|
-
placeholder=${placeholder}
|
87
|
-
.value=${value}
|
88
|
-
?disabled=${disabled}
|
89
|
-
>
|
90
|
-
</ox-select>
|
91
|
-
|
92
|
-
<input
|
93
|
-
type="button"
|
94
|
-
value="set options"
|
95
|
-
@click=${() => {
|
96
|
-
const select = document.querySelector('ox-select') as OxSelect
|
97
|
-
select.setOptions(options, { multiple, withSearch })
|
98
|
-
select.value = JSON.parse(JSON.stringify(value))
|
99
|
-
}}
|
100
|
-
/>
|
101
|
-
</div>
|
102
|
-
`
|
103
|
-
|
104
|
-
export const Regular = Template.bind({})
|
105
|
-
Regular.args = {
|
106
|
-
placeholder: 'single select',
|
107
|
-
name: 'label',
|
108
|
-
value: '',
|
109
|
-
multiple: false,
|
110
|
-
options: [
|
111
|
-
{
|
112
|
-
value: 'A',
|
113
|
-
display: 'LABEL-A'
|
114
|
-
},
|
115
|
-
{
|
116
|
-
value: 'B',
|
117
|
-
display: 'LABEL-B'
|
118
|
-
},
|
119
|
-
{
|
120
|
-
value: 'C',
|
121
|
-
display: 'LABEL-C'
|
122
|
-
},
|
123
|
-
{
|
124
|
-
value: 'TOO LONG VALUE',
|
125
|
-
display: 'LABEL-TOO LONG VALUE'
|
126
|
-
}
|
127
|
-
]
|
128
|
-
}
|
129
|
-
|
130
|
-
export const MultipleSelect = Template.bind({})
|
131
|
-
MultipleSelect.args = {
|
132
|
-
placeholder: 'multiple select',
|
133
|
-
name: 'multiple',
|
134
|
-
multiple: true,
|
135
|
-
withSearch: true,
|
136
|
-
value: ['B', 'TOO LONG VALUE'],
|
137
|
-
options: [
|
138
|
-
'A',
|
139
|
-
'B',
|
140
|
-
'C',
|
141
|
-
'D',
|
142
|
-
'E',
|
143
|
-
'F',
|
144
|
-
'G',
|
145
|
-
'H',
|
146
|
-
'I',
|
147
|
-
'J',
|
148
|
-
'K',
|
149
|
-
'L',
|
150
|
-
'M',
|
151
|
-
'O',
|
152
|
-
'P',
|
153
|
-
'Q',
|
154
|
-
'R',
|
155
|
-
'S',
|
156
|
-
'T',
|
157
|
-
'U',
|
158
|
-
'V',
|
159
|
-
'W',
|
160
|
-
'X',
|
161
|
-
'Y',
|
162
|
-
'Z',
|
163
|
-
'TOO LONG VALUE'
|
164
|
-
]
|
165
|
-
}
|
166
|
-
|
167
|
-
export const MultipleWithCheckbox = Template.bind({})
|
168
|
-
MultipleWithCheckbox.args = {
|
169
|
-
placeholder: 'multiple with checkbox',
|
170
|
-
name: 'multiple',
|
171
|
-
multiple: true,
|
172
|
-
withSearch: true,
|
173
|
-
value: ['B', 'C', 'F'],
|
174
|
-
options: [
|
175
|
-
{
|
176
|
-
value: 'A',
|
177
|
-
display: 'A'
|
178
|
-
},
|
179
|
-
{
|
180
|
-
value: 'B',
|
181
|
-
display: 'B'
|
182
|
-
},
|
183
|
-
{
|
184
|
-
value: 'C',
|
185
|
-
display: 'C'
|
186
|
-
},
|
187
|
-
{
|
188
|
-
value: 'D',
|
189
|
-
display: 'D'
|
190
|
-
},
|
191
|
-
{
|
192
|
-
value: 'E',
|
193
|
-
display: 'E'
|
194
|
-
},
|
195
|
-
{
|
196
|
-
value: 'F',
|
197
|
-
display: 'F'
|
198
|
-
},
|
199
|
-
{
|
200
|
-
value: 'G',
|
201
|
-
display: 'G'
|
202
|
-
},
|
203
|
-
{
|
204
|
-
value: 'TOO LONG VALUE',
|
205
|
-
display: 'TOO LONG VALUE'
|
206
|
-
}
|
207
|
-
]
|
208
|
-
}
|
@@ -1,181 +0,0 @@
|
|
1
|
-
import '../src/ox-select.js'
|
2
|
-
import '../src/ox-checkbox.js'
|
3
|
-
|
4
|
-
import { html, TemplateResult } from 'lit'
|
5
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
6
|
-
|
7
|
-
export default {
|
8
|
-
title: 'ox-select',
|
9
|
-
component: 'ox-select',
|
10
|
-
argTypes: {
|
11
|
-
placeholder: { control: 'text' },
|
12
|
-
name: { control: 'text' },
|
13
|
-
disabled: { control: 'boolean' }
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
interface Story<T> {
|
18
|
-
(args: T): TemplateResult
|
19
|
-
args?: Partial<T>
|
20
|
-
argTypes?: Record<string, unknown>
|
21
|
-
}
|
22
|
-
|
23
|
-
interface ArgTypes {
|
24
|
-
placeholder?: string
|
25
|
-
name?: string
|
26
|
-
value?: object | string
|
27
|
-
slot?: TemplateResult
|
28
|
-
disabled?: boolean
|
29
|
-
}
|
30
|
-
|
31
|
-
const Template: Story<ArgTypes> = ({
|
32
|
-
placeholder = 'Checkbox',
|
33
|
-
name = 'hello',
|
34
|
-
value = '',
|
35
|
-
slot,
|
36
|
-
disabled
|
37
|
-
}: ArgTypes) => html`
|
38
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
39
|
-
|
40
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
41
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
42
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
43
|
-
|
44
|
-
<link
|
45
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
46
|
-
rel="stylesheet"
|
47
|
-
/>
|
48
|
-
<link
|
49
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
50
|
-
rel="stylesheet"
|
51
|
-
/>
|
52
|
-
<link
|
53
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
54
|
-
rel="stylesheet"
|
55
|
-
/>
|
56
|
-
|
57
|
-
<style>
|
58
|
-
${MDTypeScaleStyles.cssText}
|
59
|
-
</style>
|
60
|
-
|
61
|
-
<style>
|
62
|
-
.container {
|
63
|
-
height: 250px;
|
64
|
-
text-align: center;
|
65
|
-
padding: 20px;
|
66
|
-
|
67
|
-
background-color: var(--md-sys-color-primary-container);
|
68
|
-
color: var(--md-sys-color-on-primary-container);
|
69
|
-
}
|
70
|
-
|
71
|
-
ox-select {
|
72
|
-
width: 300px;
|
73
|
-
}
|
74
|
-
</style>
|
75
|
-
|
76
|
-
<div class="container md-typescale-body-large-prominent">
|
77
|
-
<ox-select
|
78
|
-
name=${name}
|
79
|
-
@change=${(e: Event) => {
|
80
|
-
console.log((e.target as HTMLInputElement).value)
|
81
|
-
}}
|
82
|
-
placeholder=${placeholder}
|
83
|
-
.value=${value}
|
84
|
-
?disabled=${disabled}
|
85
|
-
>
|
86
|
-
${slot}
|
87
|
-
</ox-select>
|
88
|
-
</div>
|
89
|
-
`
|
90
|
-
|
91
|
-
export const Regular = Template.bind({})
|
92
|
-
Regular.args = {
|
93
|
-
placeholder: 'single select',
|
94
|
-
name: 'label',
|
95
|
-
value: '',
|
96
|
-
slot: html`
|
97
|
-
<ox-popup-list align-left nowrap>
|
98
|
-
<div option value="A">LABEL-A</div>
|
99
|
-
<div option value="B">LABEL-B</div>
|
100
|
-
<div option value="C">LABEL-C</div>
|
101
|
-
<div option value="TOO LONG VALUE">LABEL-TOO LONG VALUE</div>
|
102
|
-
</ox-popup-list>
|
103
|
-
`
|
104
|
-
}
|
105
|
-
|
106
|
-
export const MultipleSelect = Template.bind({})
|
107
|
-
MultipleSelect.args = {
|
108
|
-
placeholder: 'multiple select',
|
109
|
-
name: 'multiple',
|
110
|
-
value: ['B', 'TOO LONG VALUE'],
|
111
|
-
slot: html`
|
112
|
-
<ox-popup-list multiple with-search>
|
113
|
-
<div option value="A">A</div>
|
114
|
-
<div option value="B">B</div>
|
115
|
-
<div option value="C">C</div>
|
116
|
-
<div option value="D">D</div>
|
117
|
-
<div option value="E">E</div>
|
118
|
-
<div option value="F">F</div>
|
119
|
-
<div option value="G">G</div>
|
120
|
-
<div option value="H">H</div>
|
121
|
-
<div option value="I">I</div>
|
122
|
-
<div option value="J">J</div>
|
123
|
-
<div option value="K">K</div>
|
124
|
-
<div option value="L">L</div>
|
125
|
-
<div option value="M">M</div>
|
126
|
-
<div option value="O">O</div>
|
127
|
-
<div option value="P">P</div>
|
128
|
-
<div option value="Q">Q</div>
|
129
|
-
<div option value="R">R</div>
|
130
|
-
<div option value="S">S</div>
|
131
|
-
<div option value="T">T</div>
|
132
|
-
<div option value="U">U</div>
|
133
|
-
<div option value="V">V</div>
|
134
|
-
<div option value="W">W</div>
|
135
|
-
<div option value="X">X</div>
|
136
|
-
<div option value="Y">Y</div>
|
137
|
-
<div option value="Z">Z</div>
|
138
|
-
<div option value="TOO LONG VALUE" />TOO LONG VALUE</div>
|
139
|
-
</ox-popup-list>
|
140
|
-
`
|
141
|
-
}
|
142
|
-
|
143
|
-
export const MultipleWithCheckbox = Template.bind({})
|
144
|
-
MultipleWithCheckbox.args = {
|
145
|
-
placeholder: 'multiple with checkbox',
|
146
|
-
name: 'multiple',
|
147
|
-
value: ['B', 'C', 'F'],
|
148
|
-
slot: html`
|
149
|
-
<ox-popup-list attr-selected="checked" multiple with-search>
|
150
|
-
<ox-checkbox
|
151
|
-
@change=${(e: Event) => {
|
152
|
-
const target = e.target as HTMLInputElement
|
153
|
-
const options = Array.from(target.parentElement!.querySelectorAll('[option]')).filter(
|
154
|
-
option => !option.hasAttribute('hidden')
|
155
|
-
)
|
156
|
-
options.forEach(option => ((option as HTMLInputElement).checked = target.checked))
|
157
|
-
const value = options
|
158
|
-
.map(option => ((option as HTMLInputElement).checked ? (option as HTMLInputElement).value : undefined))
|
159
|
-
.filter(Boolean)
|
160
|
-
|
161
|
-
;(target.closest('ox-popup-list') as any)!.dispatchEvent(
|
162
|
-
new CustomEvent('select', {
|
163
|
-
bubbles: true,
|
164
|
-
composed: true,
|
165
|
-
detail: value
|
166
|
-
})
|
167
|
-
)
|
168
|
-
}}
|
169
|
-
>set all</ox-checkbox
|
170
|
-
>
|
171
|
-
<ox-checkbox option value="A">LABEL-A</ox-checkbox>
|
172
|
-
<ox-checkbox option value="B">LABEL-B</ox-checkbox>
|
173
|
-
<ox-checkbox option value="C" checked>LABEL-C</ox-checkbox>
|
174
|
-
<ox-checkbox option value="D">LABEL-D</ox-checkbox>
|
175
|
-
<ox-checkbox option value="E">LABEL-E</ox-checkbox>
|
176
|
-
<ox-checkbox option value="F">LABEL-F</ox-checkbox>
|
177
|
-
<ox-checkbox option value="G">LABEL-G</ox-checkbox>
|
178
|
-
<ox-checkbox option value="TOO LONG VALUE">TOO LONG VALUE</ox-checkbox>
|
179
|
-
</ox-popup-list>
|
180
|
-
`
|
181
|
-
}
|
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
|
-
});
|