@operato/context 7.1.31 → 7.1.33
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 +19 -0
- package/dist/src/tools/ox-page-action-context-bar.js +4 -3
- package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- 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 -43
- package/src/index.ts +0 -1
- package/src/layouts/ox-context-page-toolbar.ts +0 -121
- package/src/layouts/ox-context-toolbar.ts +0 -208
- package/src/styles/ox-context-toolbar-overlay-style.ts +0 -58
- package/src/tools/ox-page-action-context-bar.ts +0 -222
- package/src/tools/ox-page-action-overlay-template.ts +0 -111
- package/src/tools/ox-page-title-bar.ts +0 -125
- package/src/tools/ox-title-bar.ts +0 -121
- package/stories/ox-context-page-toolbar-select-buttons.stories.ts +0 -166
- package/stories/ox-context-page-toolbar-select.stories.ts +0 -129
- package/stories/ox-context-page-toolbar.stories.ts +0 -130
- package/stories/ox-context-toolbar-complex.stories.ts +0 -181
- package/stories/ox-context-toolbar-cooldown.stories.ts +0 -112
- package/stories/ox-context-toolbar-empty.stories.ts +0 -111
- package/stories/ox-context-toolbar-overflow.stories.ts +0 -165
- package/stories/ox-context-toolbar.stories.ts +0 -221
- package/tsconfig.json +0 -24
- package/web-dev-server.config.mjs +0 -27
- package/web-test-runner.config.mjs +0 -41
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js'
|
|
2
|
-
import '../src/layouts/ox-context-toolbar.js'
|
|
3
|
-
import '../src/tools/ox-page-action-context-bar.js'
|
|
4
|
-
import { TOOL_POSITION } from '@operato/layout'
|
|
5
|
-
|
|
6
|
-
import { sleep } from '@operato/utils'
|
|
7
|
-
|
|
8
|
-
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
title: 'ox-context-toolbar empty',
|
|
12
|
-
component: 'ox-context-toolbar',
|
|
13
|
-
argTypes: {}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface Story<T> {
|
|
17
|
-
(args: T): TemplateResult
|
|
18
|
-
args?: Partial<T>
|
|
19
|
-
argTypes?: Record<string, unknown>
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface ArgTypes {}
|
|
23
|
-
|
|
24
|
-
const Template: Story<ArgTypes> = () => html`
|
|
25
|
-
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
-
<link href="/themes/material-theme.css" rel="stylesheet" />
|
|
27
|
-
<link href="/themes/context-theme.css" rel="stylesheet" />
|
|
28
|
-
|
|
29
|
-
<link
|
|
30
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
31
|
-
rel="stylesheet"
|
|
32
|
-
/>
|
|
33
|
-
<link
|
|
34
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
35
|
-
rel="stylesheet"
|
|
36
|
-
/>
|
|
37
|
-
<link
|
|
38
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
39
|
-
rel="stylesheet"
|
|
40
|
-
/>
|
|
41
|
-
|
|
42
|
-
<style>
|
|
43
|
-
body {
|
|
44
|
-
background-color: var(--md-sys-color-surface);
|
|
45
|
-
}
|
|
46
|
-
</style>
|
|
47
|
-
|
|
48
|
-
<div style="display: flex; flex-direction: column; gap: 10px; padding: 10px; background-color: black;">
|
|
49
|
-
<ox-context-toolbar
|
|
50
|
-
.tools=${[]}
|
|
51
|
-
.context=${{
|
|
52
|
-
exportable: true,
|
|
53
|
-
importable: true,
|
|
54
|
-
toolbar: true
|
|
55
|
-
}}
|
|
56
|
-
>
|
|
57
|
-
</ox-context-toolbar>
|
|
58
|
-
|
|
59
|
-
<ox-context-toolbar
|
|
60
|
-
.tools=${[
|
|
61
|
-
{
|
|
62
|
-
position: TOOL_POSITION.CENTER,
|
|
63
|
-
template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
64
|
-
}
|
|
65
|
-
]}
|
|
66
|
-
.context=${{
|
|
67
|
-
exportable: true,
|
|
68
|
-
importable: true,
|
|
69
|
-
toolbar: true
|
|
70
|
-
}}
|
|
71
|
-
>
|
|
72
|
-
</ox-context-toolbar>
|
|
73
|
-
|
|
74
|
-
<ox-context-toolbar
|
|
75
|
-
.tools=${[
|
|
76
|
-
{
|
|
77
|
-
position: TOOL_POSITION.CENTER,
|
|
78
|
-
template: html`<ox-page-action-context-bar
|
|
79
|
-
.actions=${[
|
|
80
|
-
{
|
|
81
|
-
type: 'icon',
|
|
82
|
-
action: async () => {},
|
|
83
|
-
icon: 'check'
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
title: 'short-take(0secs)',
|
|
87
|
-
action: async () => {},
|
|
88
|
-
icon: 'delete'
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
title: 'long-take(3secs)',
|
|
92
|
-
action: async () => {
|
|
93
|
-
await sleep(3000)
|
|
94
|
-
},
|
|
95
|
-
icon: 'save'
|
|
96
|
-
}
|
|
97
|
-
]}
|
|
98
|
-
></ox-page-action-context-bar>`
|
|
99
|
-
}
|
|
100
|
-
]}
|
|
101
|
-
.context=${{
|
|
102
|
-
exportable: true,
|
|
103
|
-
importable: true,
|
|
104
|
-
toolbar: true
|
|
105
|
-
}}
|
|
106
|
-
>
|
|
107
|
-
</ox-context-toolbar>
|
|
108
|
-
</div>
|
|
109
|
-
`
|
|
110
|
-
|
|
111
|
-
export const Regular = Template.bind({})
|
|
112
|
-
Regular.args = {}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js'
|
|
2
|
-
import '../src/layouts/ox-context-toolbar.js'
|
|
3
|
-
import '../src/tools/ox-page-action-context-bar.js'
|
|
4
|
-
import { TOOL_POSITION } from '@operato/layout'
|
|
5
|
-
|
|
6
|
-
import { sleep } from '@operato/utils'
|
|
7
|
-
|
|
8
|
-
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
title: 'ox-context-toolbar empty',
|
|
13
|
-
component: 'ox-context-toolbar',
|
|
14
|
-
argTypes: {
|
|
15
|
-
theme: { control: 'select', options: ['light', 'dark'] }
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface Story<T> {
|
|
20
|
-
(args: T): TemplateResult
|
|
21
|
-
args?: Partial<T>
|
|
22
|
-
argTypes?: Record<string, unknown>
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface ArgTypes {}
|
|
26
|
-
|
|
27
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
28
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
29
|
-
|
|
30
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
|
31
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
|
32
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
33
|
-
|
|
34
|
-
<link
|
|
35
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
36
|
-
rel="stylesheet"
|
|
37
|
-
/>
|
|
38
|
-
<link
|
|
39
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
40
|
-
rel="stylesheet"
|
|
41
|
-
/>
|
|
42
|
-
<link
|
|
43
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
44
|
-
rel="stylesheet"
|
|
45
|
-
/>
|
|
46
|
-
|
|
47
|
-
<style>
|
|
48
|
-
${MDTypeScaleStyles.cssText}
|
|
49
|
-
</style>
|
|
50
|
-
|
|
51
|
-
<style>
|
|
52
|
-
.container {
|
|
53
|
-
height: 500px;
|
|
54
|
-
text-align: center;
|
|
55
|
-
padding: 20px;
|
|
56
|
-
background-color: var(--md-sys-color-primary-container);
|
|
57
|
-
color: var(--md-sys-color-on-primary-container);
|
|
58
|
-
|
|
59
|
-
padding: 20px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
ox-buttons-radio {
|
|
63
|
-
padding: 20px;
|
|
64
|
-
}
|
|
65
|
-
</style>
|
|
66
|
-
|
|
67
|
-
<div class="container md-typescale-body-large-prominent">
|
|
68
|
-
<ox-context-toolbar
|
|
69
|
-
.tools=${[]}
|
|
70
|
-
.context=${{
|
|
71
|
-
exportable: true,
|
|
72
|
-
importable: true,
|
|
73
|
-
toolbar: true
|
|
74
|
-
}}
|
|
75
|
-
>
|
|
76
|
-
</ox-context-toolbar>
|
|
77
|
-
|
|
78
|
-
<ox-context-toolbar
|
|
79
|
-
.tools=${[
|
|
80
|
-
{
|
|
81
|
-
position: TOOL_POSITION.CENTER,
|
|
82
|
-
template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
83
|
-
}
|
|
84
|
-
]}
|
|
85
|
-
.context=${{
|
|
86
|
-
exportable: true,
|
|
87
|
-
importable: true,
|
|
88
|
-
toolbar: true
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
</ox-context-toolbar>
|
|
92
|
-
|
|
93
|
-
<ox-context-toolbar
|
|
94
|
-
.tools=${[
|
|
95
|
-
{
|
|
96
|
-
position: TOOL_POSITION.CENTER,
|
|
97
|
-
template: html`<ox-page-action-context-bar .actions=${[]}></ox-page-action-context-bar>`
|
|
98
|
-
}
|
|
99
|
-
]}
|
|
100
|
-
.context=${{
|
|
101
|
-
exportable: true,
|
|
102
|
-
importable: true,
|
|
103
|
-
toolbar: true
|
|
104
|
-
}}
|
|
105
|
-
>
|
|
106
|
-
</ox-context-toolbar>
|
|
107
|
-
</div>
|
|
108
|
-
`
|
|
109
|
-
|
|
110
|
-
export const Regular = Template.bind({})
|
|
111
|
-
Regular.args = {}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js'
|
|
2
|
-
import '../src/layouts/ox-context-toolbar.js'
|
|
3
|
-
import '../src/tools/ox-page-action-context-bar.js'
|
|
4
|
-
import { TOOL_POSITION } from '@operato/layout'
|
|
5
|
-
|
|
6
|
-
import '@operato/styles'
|
|
7
|
-
|
|
8
|
-
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
title: 'ox-context-toolbar overflow',
|
|
13
|
-
component: 'ox-context-toolbar',
|
|
14
|
-
argTypes: {
|
|
15
|
-
theme: { control: 'select', options: ['light', 'dark'] }
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface Story<T> {
|
|
20
|
-
(args: T): TemplateResult
|
|
21
|
-
args?: Partial<T>
|
|
22
|
-
argTypes?: Record<string, unknown>
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface ArgTypes {}
|
|
26
|
-
|
|
27
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
28
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
29
|
-
|
|
30
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
|
31
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
|
32
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
33
|
-
|
|
34
|
-
<link
|
|
35
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
36
|
-
rel="stylesheet"
|
|
37
|
-
/>
|
|
38
|
-
<link
|
|
39
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
40
|
-
rel="stylesheet"
|
|
41
|
-
/>
|
|
42
|
-
<link
|
|
43
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
44
|
-
rel="stylesheet"
|
|
45
|
-
/>
|
|
46
|
-
|
|
47
|
-
<style>
|
|
48
|
-
${MDTypeScaleStyles.cssText}
|
|
49
|
-
</style>
|
|
50
|
-
|
|
51
|
-
<style>
|
|
52
|
-
.container {
|
|
53
|
-
height: 500px;
|
|
54
|
-
text-align: center;
|
|
55
|
-
padding: 20px;
|
|
56
|
-
background-color: var(--md-sys-color-primary-container);
|
|
57
|
-
color: var(--md-sys-color-on-primary-container);
|
|
58
|
-
|
|
59
|
-
padding: 20px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
ox-buttons-radio {
|
|
63
|
-
padding: 20px;
|
|
64
|
-
}
|
|
65
|
-
</style>
|
|
66
|
-
|
|
67
|
-
<div class="container md-typescale-body-large-prominent">
|
|
68
|
-
<ox-context-toolbar
|
|
69
|
-
.tools=${[
|
|
70
|
-
{
|
|
71
|
-
position: TOOL_POSITION.FRONT,
|
|
72
|
-
template: html` <md-icon>download</md-icon> `,
|
|
73
|
-
context: 'exportable'
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
position: TOOL_POSITION.FRONT,
|
|
77
|
-
template: html` <md-icon>upload</md-icon> `,
|
|
78
|
-
context: 'importable'
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
position: TOOL_POSITION.CENTER,
|
|
82
|
-
template: html`<ox-page-action-context-bar
|
|
83
|
-
.actions=${[
|
|
84
|
-
{
|
|
85
|
-
title: 'save',
|
|
86
|
-
action: () => {},
|
|
87
|
-
icon: 'save'
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
title: 'copy',
|
|
91
|
-
action: () => {},
|
|
92
|
-
icon: 'content_copy'
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
title: 'delete',
|
|
96
|
-
action: () => {},
|
|
97
|
-
icon: 'delete'
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
title: 'save',
|
|
101
|
-
action: () => {},
|
|
102
|
-
icon: 'save',
|
|
103
|
-
emphasis: {
|
|
104
|
-
raised: true
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
title: 'copy',
|
|
109
|
-
action: () => {},
|
|
110
|
-
icon: 'content_copy'
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
title: 'delete',
|
|
114
|
-
action: () => {},
|
|
115
|
-
icon: 'delete'
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
title: 'save',
|
|
119
|
-
action: () => {},
|
|
120
|
-
icon: 'save'
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
title: 'copy',
|
|
124
|
-
action: () => {},
|
|
125
|
-
icon: 'content_copy'
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
title: 'delete',
|
|
129
|
-
action: () => {},
|
|
130
|
-
icon: 'delete'
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
title: 'save',
|
|
134
|
-
action: () => {},
|
|
135
|
-
icon: 'save'
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
title: 'copy',
|
|
139
|
-
action: () => {},
|
|
140
|
-
icon: 'content_copy'
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
title: 'delete',
|
|
144
|
-
action: () => {},
|
|
145
|
-
icon: 'delete',
|
|
146
|
-
emphasis: {
|
|
147
|
-
danger: true
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
]}
|
|
151
|
-
></ox-page-action-context-bar>`
|
|
152
|
-
}
|
|
153
|
-
]}
|
|
154
|
-
.context=${{
|
|
155
|
-
exportable: true,
|
|
156
|
-
importable: true,
|
|
157
|
-
toolbar: true
|
|
158
|
-
}}
|
|
159
|
-
>
|
|
160
|
-
</ox-context-toolbar>
|
|
161
|
-
</div>
|
|
162
|
-
`
|
|
163
|
-
|
|
164
|
-
export const Regular = Template.bind({})
|
|
165
|
-
Regular.args = {}
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js'
|
|
2
|
-
import '../src/layouts/ox-context-toolbar.js'
|
|
3
|
-
import '../src/tools/ox-page-action-context-bar.js'
|
|
4
|
-
import { TOOL_POSITION } from '@operato/layout'
|
|
5
|
-
|
|
6
|
-
import '@operato/styles'
|
|
7
|
-
|
|
8
|
-
import { css, html, render, TemplateResult } from 'lit'
|
|
9
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
title: 'ox-context-toolbar',
|
|
13
|
-
component: 'ox-context-toolbar',
|
|
14
|
-
argTypes: {}
|
|
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
|
-
|
|
25
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
26
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
27
|
-
|
|
28
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
|
29
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
|
30
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
31
|
-
|
|
32
|
-
<link
|
|
33
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
34
|
-
rel="stylesheet"
|
|
35
|
-
/>
|
|
36
|
-
<link
|
|
37
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
38
|
-
rel="stylesheet"
|
|
39
|
-
/>
|
|
40
|
-
<link
|
|
41
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
42
|
-
rel="stylesheet"
|
|
43
|
-
/>
|
|
44
|
-
|
|
45
|
-
<style>
|
|
46
|
-
${MDTypeScaleStyles.cssText}
|
|
47
|
-
</style>
|
|
48
|
-
|
|
49
|
-
<style>
|
|
50
|
-
.container {
|
|
51
|
-
height: 500px;
|
|
52
|
-
text-align: center;
|
|
53
|
-
padding: 20px;
|
|
54
|
-
background-color: var(--md-sys-color-primary-container);
|
|
55
|
-
color: var(--md-sys-color-on-primary-container);
|
|
56
|
-
|
|
57
|
-
padding: 20px;
|
|
58
|
-
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
gap: 20px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
ox-buttons-radio {
|
|
65
|
-
padding: 20px;
|
|
66
|
-
}
|
|
67
|
-
</style>
|
|
68
|
-
|
|
69
|
-
<div class="container md-typescale-body-large-prominent">
|
|
70
|
-
<ox-context-toolbar
|
|
71
|
-
.tools=${[
|
|
72
|
-
{
|
|
73
|
-
position: TOOL_POSITION.FRONT,
|
|
74
|
-
template: html` <md-icon>download</md-icon> `,
|
|
75
|
-
context: 'exportable'
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
position: TOOL_POSITION.FRONT,
|
|
79
|
-
template: html` <md-icon>upload</md-icon> `,
|
|
80
|
-
context: 'importable'
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
position: TOOL_POSITION.CENTER,
|
|
84
|
-
template: html`<ox-page-action-context-bar
|
|
85
|
-
.actions=${[
|
|
86
|
-
{
|
|
87
|
-
title: 'save',
|
|
88
|
-
action: () => {},
|
|
89
|
-
icon: 'save'
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
title: 'copy',
|
|
93
|
-
action: () => {},
|
|
94
|
-
icon: 'content_copy'
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
title: 'delete',
|
|
98
|
-
action: () => {},
|
|
99
|
-
icon: 'delete',
|
|
100
|
-
emphasis: {
|
|
101
|
-
raised: true,
|
|
102
|
-
outlined: false,
|
|
103
|
-
dense: false,
|
|
104
|
-
danger: true
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
]}
|
|
108
|
-
></ox-page-action-context-bar>`
|
|
109
|
-
}
|
|
110
|
-
]}
|
|
111
|
-
.context=${{
|
|
112
|
-
exportable: true,
|
|
113
|
-
importable: true,
|
|
114
|
-
toolbar: true
|
|
115
|
-
}}
|
|
116
|
-
>
|
|
117
|
-
</ox-context-toolbar>
|
|
118
|
-
|
|
119
|
-
<ox-context-toolbar
|
|
120
|
-
.tools=${[
|
|
121
|
-
{
|
|
122
|
-
position: TOOL_POSITION.FRONT,
|
|
123
|
-
template: html` <md-icon>download</md-icon> `,
|
|
124
|
-
context: 'exportable'
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
position: TOOL_POSITION.CENTER,
|
|
128
|
-
template: html`<ox-page-action-context-bar
|
|
129
|
-
.actions=${[
|
|
130
|
-
{
|
|
131
|
-
title: 'save',
|
|
132
|
-
action: () => {},
|
|
133
|
-
icon: 'save'
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
title: 'copy',
|
|
137
|
-
action: () => {},
|
|
138
|
-
icon: 'content_copy'
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
title: 'delete',
|
|
142
|
-
action: () => {},
|
|
143
|
-
icon: 'delete',
|
|
144
|
-
emphasis: {
|
|
145
|
-
raised: false,
|
|
146
|
-
outlined: false,
|
|
147
|
-
dense: false,
|
|
148
|
-
danger: true
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
]}
|
|
152
|
-
></ox-page-action-context-bar>`
|
|
153
|
-
}
|
|
154
|
-
]}
|
|
155
|
-
.context=${{
|
|
156
|
-
exportable: true,
|
|
157
|
-
importable: true,
|
|
158
|
-
toolbar: true
|
|
159
|
-
}}
|
|
160
|
-
>
|
|
161
|
-
</ox-context-toolbar>
|
|
162
|
-
|
|
163
|
-
<ox-context-toolbar
|
|
164
|
-
.tools=${[
|
|
165
|
-
{
|
|
166
|
-
position: TOOL_POSITION.FRONT,
|
|
167
|
-
template: html` <md-icon>download</md-icon> `,
|
|
168
|
-
context: 'exportable'
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
position: TOOL_POSITION.FRONT,
|
|
172
|
-
template: html` <md-icon>upload</md-icon> `,
|
|
173
|
-
context: 'importable'
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
position: TOOL_POSITION.FRONT,
|
|
177
|
-
template: html` <md-icon>restart_alt</md-icon> `,
|
|
178
|
-
context: 'resettable'
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
position: TOOL_POSITION.CENTER,
|
|
182
|
-
template: html`<ox-page-action-context-bar
|
|
183
|
-
.actions=${[
|
|
184
|
-
{
|
|
185
|
-
title: 'save',
|
|
186
|
-
action: () => {},
|
|
187
|
-
icon: 'save'
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
title: 'copy',
|
|
191
|
-
action: () => {},
|
|
192
|
-
icon: 'content_copy'
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
title: 'delete',
|
|
196
|
-
action: () => {},
|
|
197
|
-
icon: 'delete',
|
|
198
|
-
emphasis: {
|
|
199
|
-
raised: true,
|
|
200
|
-
outlined: false,
|
|
201
|
-
dense: false,
|
|
202
|
-
danger: true
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
]}
|
|
206
|
-
></ox-page-action-context-bar>`
|
|
207
|
-
}
|
|
208
|
-
]}
|
|
209
|
-
.context=${{
|
|
210
|
-
exportable: true,
|
|
211
|
-
importable: true,
|
|
212
|
-
resettable: true,
|
|
213
|
-
toolbar: true
|
|
214
|
-
}}
|
|
215
|
-
>
|
|
216
|
-
</ox-context-toolbar>
|
|
217
|
-
</div>
|
|
218
|
-
`
|
|
219
|
-
|
|
220
|
-
export const Regular = Template.bind({})
|
|
221
|
-
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
|
-
});
|