@operato/property-panel 9.2.0 → 10.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 +8 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-property-panel.d.ts +8 -0
- package/dist/src/ox-property-panel.js +44 -3
- package/dist/src/ox-property-panel.js.map +1 -1
- package/dist/src/property-panel/abstract-property.js +1 -0
- package/dist/src/property-panel/abstract-property.js.map +1 -1
- package/dist/src/property-panel/data-binding/data-binding-mapper.js +1 -1
- package/dist/src/property-panel/data-binding/data-binding-mapper.js.map +1 -1
- package/dist/src/property-panel/data-binding/data-binding.js.map +1 -1
- package/dist/src/property-panel/effects/property-animation.js +1 -1
- package/dist/src/property-panel/effects/property-animation.js.map +1 -1
- package/dist/src/property-panel/effects/property-event-hover.d.ts +1 -1
- package/dist/src/property-panel/effects/property-event-hover.js +3 -3
- package/dist/src/property-panel/effects/property-event-hover.js.map +1 -1
- package/dist/src/property-panel/effects/property-event-tap.js +4 -4
- package/dist/src/property-panel/effects/property-event-tap.js.map +1 -1
- package/dist/src/property-panel/inspector/inspector.js +6 -6
- package/dist/src/property-panel/inspector/inspector.js.map +1 -1
- package/dist/src/property-panel/shapes/shapes.d.ts +0 -2
- package/dist/src/property-panel/shapes/shapes.js +5 -44
- package/dist/src/property-panel/shapes/shapes.js.map +1 -1
- package/dist/src/property-panel/threed/property-material3d.d.ts +27 -0
- package/dist/src/property-panel/threed/property-material3d.js +189 -0
- package/dist/src/property-panel/threed/property-material3d.js.map +1 -0
- package/dist/src/property-panel/threed/property-scene3d.d.ts +26 -0
- package/dist/src/property-panel/threed/property-scene3d.js +314 -0
- package/dist/src/property-panel/threed/property-scene3d.js.map +1 -0
- package/dist/src/property-panel/threed/threed.d.ts +17 -0
- package/dist/src/property-panel/threed/threed.js +98 -0
- package/dist/src/property-panel/threed/threed.js.map +1 -0
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -9
- package/.editorconfig +0 -29
- package/.storybook/main.js +0 -5
- package/.storybook/preview.js +0 -52
- package/.storybook/server.mjs +0 -8
- package/demo/index.html +0 -30
- package/dist/stories/index.stories.d.ts +0 -22
- package/dist/stories/index.stories.js +0 -121
- package/dist/stories/index.stories.js.map +0 -1
- package/src/graphql/board.ts +0 -144
- package/src/graphql/data-subscription.ts +0 -30
- package/src/graphql/favorite-board.ts +0 -25
- package/src/graphql/group.ts +0 -138
- package/src/graphql/index.ts +0 -4
- package/src/graphql/play-group.ts +0 -225
- package/src/graphql/scenario.ts +0 -79
- package/src/index.ts +0 -8
- package/src/ox-property-panel.ts +0 -347
- package/src/property-panel/abstract-property.ts +0 -65
- package/src/property-panel/data-binding/data-binding-mapper.ts +0 -408
- package/src/property-panel/data-binding/data-binding-value-map.ts +0 -19
- package/src/property-panel/data-binding/data-binding-value-range.ts +0 -19
- package/src/property-panel/data-binding/data-binding.ts +0 -470
- package/src/property-panel/effects/effects.ts +0 -77
- package/src/property-panel/effects/property-animation.ts +0 -155
- package/src/property-panel/effects/property-animations.ts +0 -73
- package/src/property-panel/effects/property-event-hover-emphasize.ts +0 -74
- package/src/property-panel/effects/property-event-hover.ts +0 -255
- package/src/property-panel/effects/property-event-tap.ts +0 -269
- package/src/property-panel/effects/property-event.ts +0 -73
- package/src/property-panel/effects/property-shadow.ts +0 -77
- package/src/property-panel/effects/value-converter.ts +0 -17
- package/src/property-panel/inspector/inspector.ts +0 -376
- package/src/property-panel/shapes/shapes.ts +0 -379
- package/src/property-panel/specifics/specific-properties-builder.ts +0 -160
- package/src/property-panel/specifics/specifics.ts +0 -81
- package/src/property-panel/styles/styles.ts +0 -285
- package/src/types.ts +0 -63
- package/stories/index.stories.ts +0 -134
- package/tsconfig.json +0 -26
- package/web-dev-server.config.mjs +0 -27
- package/web-test-runner.config.mjs +0 -41
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import '@operato/help/ox-title-with-help.js'
|
|
6
|
-
import '@operato/popup/ox-popup-list.js'
|
|
7
|
-
import '@operato/input/ox-input-range.js'
|
|
8
|
-
import '@operato/input/ox-input-color.js'
|
|
9
|
-
import '@operato/input/ox-input-fill-style.js'
|
|
10
|
-
import '@operato/input/ox-select.js'
|
|
11
|
-
import '@operato/font/ox-font-selector.js'
|
|
12
|
-
import '@operato/i18n/ox-i18n.js'
|
|
13
|
-
|
|
14
|
-
import { css, html, nothing } from 'lit'
|
|
15
|
-
import { property } from 'lit/decorators.js'
|
|
16
|
-
|
|
17
|
-
import { Component } from '@hatiolab/things-scene'
|
|
18
|
-
import { PropertyGridStyles } from '@operato/styles/property-grid-styles.js'
|
|
19
|
-
import { LineStyles } from '@operato/styles/line-styles.js'
|
|
20
|
-
|
|
21
|
-
import { AbstractProperty } from '../abstract-property.js'
|
|
22
|
-
|
|
23
|
-
export class PropertyStyles extends AbstractProperty {
|
|
24
|
-
static styles = [
|
|
25
|
-
PropertyGridStyles,
|
|
26
|
-
LineStyles,
|
|
27
|
-
css`
|
|
28
|
-
ox-input-range {
|
|
29
|
-
width: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.btn-group {
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
gap: var(--spacing-medium, 8px);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.btn-group * {
|
|
40
|
-
width: 30px;
|
|
41
|
-
min-width: initial;
|
|
42
|
-
border-radius: 0;
|
|
43
|
-
border-bottom: 2px solid #fff;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.btn-group [active] {
|
|
47
|
-
border-bottom: 2px solid #f2471c;
|
|
48
|
-
}
|
|
49
|
-
`
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
@property({ type: Object }) value: any = {}
|
|
53
|
-
@property({ type: Array }) selected: Component[] = []
|
|
54
|
-
@property({ type: Array }) fonts: any[] = []
|
|
55
|
-
@property({ type: Boolean, attribute: 'is-line' }) isLine: boolean = false
|
|
56
|
-
|
|
57
|
-
connectedCallback() {
|
|
58
|
-
super.connectedCallback()
|
|
59
|
-
|
|
60
|
-
this.renderRoot.addEventListener('change', this.onValueChange.bind(this))
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
onButtonGroupClick(e: Event) {
|
|
64
|
-
const target = e.target as HTMLElement
|
|
65
|
-
|
|
66
|
-
if (target.hasAttribute('value-key')) {
|
|
67
|
-
target.toggleAttribute('active')
|
|
68
|
-
|
|
69
|
-
target.dispatchEvent(
|
|
70
|
-
new CustomEvent('change', {
|
|
71
|
-
bubbles: true,
|
|
72
|
-
composed: true
|
|
73
|
-
})
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
render() {
|
|
79
|
-
var {
|
|
80
|
-
alpha = 1,
|
|
81
|
-
fontFamily,
|
|
82
|
-
fontSize,
|
|
83
|
-
lineHeight,
|
|
84
|
-
fontColor,
|
|
85
|
-
letterSpacing,
|
|
86
|
-
bold,
|
|
87
|
-
italic,
|
|
88
|
-
fillStyle,
|
|
89
|
-
lineWidth,
|
|
90
|
-
strokeStyle,
|
|
91
|
-
lineDash = 'solid',
|
|
92
|
-
lineCap,
|
|
93
|
-
lineJoin,
|
|
94
|
-
begin = 'none',
|
|
95
|
-
beginSize = 'size1',
|
|
96
|
-
end = 'none',
|
|
97
|
-
endSize = 'size1'
|
|
98
|
-
} = this.value || {}
|
|
99
|
-
|
|
100
|
-
return html`
|
|
101
|
-
<fieldset>
|
|
102
|
-
<legend>
|
|
103
|
-
<ox-title-with-help topic="board-modeller/styles/opacity" msgid="label.opacity">opacity</ox-title-with-help>
|
|
104
|
-
</legend>
|
|
105
|
-
<ox-input-range min="0" max="1" step="0.1" value-key="alpha" .value=${alpha} editable> </ox-input-range>
|
|
106
|
-
</fieldset>
|
|
107
|
-
|
|
108
|
-
<fieldset>
|
|
109
|
-
<legend>
|
|
110
|
-
<ox-title-with-help topic="board-modeller/styles/text-style" msgid="label.text-style"
|
|
111
|
-
>text style</ox-title-with-help
|
|
112
|
-
>
|
|
113
|
-
</legend>
|
|
114
|
-
|
|
115
|
-
<div class="property-grid">
|
|
116
|
-
<label>
|
|
117
|
-
<ox-i18n msgid="label.font-family">Font Family</ox-i18n>
|
|
118
|
-
</label>
|
|
119
|
-
|
|
120
|
-
<ox-font-selector class="custom-editor" value-key="fontFamily" .value=${fontFamily}></ox-font-selector>
|
|
121
|
-
|
|
122
|
-
<label class="onethird-label icon-only-label"><md-icon>format_size</md-icon></label>
|
|
123
|
-
<input type="number" value-key="fontSize" .value=${fontSize} class="onethird-editor" />
|
|
124
|
-
|
|
125
|
-
<label class="onethird-label icon-only-label"><md-icon>format_line_spacing</md-icon></label>
|
|
126
|
-
<input type="number" value-key="lineHeight" .value=${lineHeight} class="onethird-editor" />
|
|
127
|
-
|
|
128
|
-
<label class="onethird-label icon-only-label"><md-icon>format_letter_spacing</md-icon></label>
|
|
129
|
-
<input type="number" value-key="letterSpacing" .value=${letterSpacing} class="onethird-editor" />
|
|
130
|
-
|
|
131
|
-
<label class="twothird-label icon-only-label"><md-icon>format_color_text</md-icon></label>
|
|
132
|
-
<ox-input-color value-key="fontColor" .value=${fontColor} class="twothird-editor"> </ox-input-color>
|
|
133
|
-
|
|
134
|
-
<div class="onethird-full btn-group" @click=${this.onButtonGroupClick}>
|
|
135
|
-
<md-icon value-key="bold" ?active=${bold}>format_bold</md-icon>
|
|
136
|
-
<md-icon value-key="italic" ?active=${italic}>format_italic</md-icon>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
</fieldset>
|
|
140
|
-
|
|
141
|
-
<fieldset>
|
|
142
|
-
<legend>
|
|
143
|
-
<ox-title-with-help topic="board-modeller/styles/fill-style" msgid="label.fill-style"
|
|
144
|
-
>fill style</ox-title-with-help
|
|
145
|
-
>
|
|
146
|
-
</legend>
|
|
147
|
-
|
|
148
|
-
<ox-input-fill-style value-key="fillStyle" .value=${fillStyle}> </ox-input-fill-style>
|
|
149
|
-
</fieldset>
|
|
150
|
-
|
|
151
|
-
<fieldset>
|
|
152
|
-
<legend>
|
|
153
|
-
<ox-title-with-help msgid="label.line-style" topic="board-modeller/styles/line-style"></ox-title-with-help>
|
|
154
|
-
</legend>
|
|
155
|
-
|
|
156
|
-
<div class="property-grid">
|
|
157
|
-
<label class="half-label icon-only-label"><md-icon>line_weight</md-icon></label>
|
|
158
|
-
<input type="number" value-key="lineWidth" .value=${lineWidth} class="half-editor" />
|
|
159
|
-
|
|
160
|
-
<label class="half-label icon-only-label"><md-icon>border_color</md-icon></label>
|
|
161
|
-
<ox-input-color value-key="strokeStyle" .value=${strokeStyle} class="half-editor"> </ox-input-color>
|
|
162
|
-
|
|
163
|
-
<label>
|
|
164
|
-
<ox-i18n msgid="label.line-type">line type</ox-i18n>
|
|
165
|
-
</label>
|
|
166
|
-
<ox-select value-key="lineDash" .value=${lineDash} class="custom-editor">
|
|
167
|
-
<div class="line-type ${lineDash}" slot="label"></div>
|
|
168
|
-
<ox-popup-list align-left nowrap>
|
|
169
|
-
<style>
|
|
170
|
-
${LineStyles.cssText}
|
|
171
|
-
</style>
|
|
172
|
-
<div class="line-type solid" value="solid" option></div>
|
|
173
|
-
<div class="line-type round-dot" value="round-dot" option></div>
|
|
174
|
-
<div class="line-type square-dot" value="square-dot" option></div>
|
|
175
|
-
<div class="line-type dash" value="dash" option></div>
|
|
176
|
-
<div class="line-type dash-dot" value="dash-dot" option></div>
|
|
177
|
-
<div class="line-type long-dash" value="long-dash" option></div>
|
|
178
|
-
<div class="line-type long-dash-dot" value="long-dash-dot" option></div>
|
|
179
|
-
<div class="line-type long-dash-dot-dot" value="long-dash-dot-dot" option></div>
|
|
180
|
-
</ox-popup-list>
|
|
181
|
-
</ox-select>
|
|
182
|
-
|
|
183
|
-
<label>
|
|
184
|
-
<ox-i18n msgid="label.cap-type">cap type</ox-i18n>
|
|
185
|
-
</label>
|
|
186
|
-
<select value-key="lineCap" .value=${lineCap}>
|
|
187
|
-
<option value="butt"><ox-i18n msgid="label.square">square</ox-i18n></option>
|
|
188
|
-
<option value="round"><ox-i18n msgid="label.round">round</ox-i18n></option>
|
|
189
|
-
</select>
|
|
190
|
-
|
|
191
|
-
<label>
|
|
192
|
-
<ox-i18n msgid="label.join-type">join type</ox-i18n>
|
|
193
|
-
</label>
|
|
194
|
-
<select value-key="lineJoin" .value=${lineJoin}>
|
|
195
|
-
<option value="miter"><ox-i18n msgid="label.miter">miter</ox-i18n></option>
|
|
196
|
-
<option value="round"><ox-i18n msgid="label.round">round</ox-i18n></option>
|
|
197
|
-
<option value="bevel"><ox-i18n msgid="label.bevel">bevel</ox-i18n></option>
|
|
198
|
-
</select>
|
|
199
|
-
|
|
200
|
-
${this.isLine
|
|
201
|
-
? html`
|
|
202
|
-
<label>
|
|
203
|
-
<ox-i18n msgid="label.begin-type">begin type</ox-i18n>
|
|
204
|
-
</label>
|
|
205
|
-
<ox-select value-key="begin" .value=${begin} class="custom-editor">
|
|
206
|
-
<div class="arrow-type ${begin ? `begin-${begin}` : nothing}" slot="label"></div>
|
|
207
|
-
<ox-popup-list align-left nowrap>
|
|
208
|
-
<style>
|
|
209
|
-
${LineStyles.cssText}
|
|
210
|
-
</style>
|
|
211
|
-
<div class="arrow-type begin-none" value="none" option></div>
|
|
212
|
-
<div class="arrow-type begin-arrow" value="arrow" option></div>
|
|
213
|
-
<div class="arrow-type begin-open-arrow" value="open-arrow" option></div>
|
|
214
|
-
<div class="arrow-type begin-sharp-arrow" value="sharp-arrow" option></div>
|
|
215
|
-
<div class="arrow-type begin-diamond" value="diamond" option></div>
|
|
216
|
-
<div class="arrow-type begin-oval" value="oval" option></div>
|
|
217
|
-
</ox-popup-list>
|
|
218
|
-
</ox-select>
|
|
219
|
-
|
|
220
|
-
<label>
|
|
221
|
-
<ox-i18n msgid="label.begin-size">begin size</ox-i18n>
|
|
222
|
-
</label>
|
|
223
|
-
<ox-select value-key="beginSize" .value=${beginSize} class="custom-editor">
|
|
224
|
-
<div class="arrow-type ${beginSize ? `begin-${beginSize}` : nothing}" slot="label"></div>
|
|
225
|
-
<ox-popup-list align-left nowrap>
|
|
226
|
-
<style>
|
|
227
|
-
${LineStyles.cssText}
|
|
228
|
-
</style>
|
|
229
|
-
<div class="arrow-type begin-size1" value="size1" option></div>
|
|
230
|
-
<div class="arrow-type begin-size2" value="size2" option></div>
|
|
231
|
-
<div class="arrow-type begin-size3" value="size3" option></div>
|
|
232
|
-
<div class="arrow-type begin-size4" value="size4" option></div>
|
|
233
|
-
<div class="arrow-type begin-size5" value="size5" option></div>
|
|
234
|
-
<div class="arrow-type begin-size6" value="size6" option></div>
|
|
235
|
-
<div class="arrow-type begin-size7" value="size7" option></div>
|
|
236
|
-
<div class="arrow-type begin-size8" value="size8" option></div>
|
|
237
|
-
<div class="arrow-type begin-size9" value="size9" option></div>
|
|
238
|
-
</ox-popup-list>
|
|
239
|
-
</ox-select>
|
|
240
|
-
|
|
241
|
-
<label>
|
|
242
|
-
<ox-i18n msgid="label.end-type">end type</ox-i18n>
|
|
243
|
-
</label>
|
|
244
|
-
<ox-select value-key="end" .value=${end} class="custom-editor">
|
|
245
|
-
<div class="arrow-type ${end ? `end-${end}` : nothing}" slot="label"></div>
|
|
246
|
-
<ox-popup-list align-left nowrap>
|
|
247
|
-
<style>
|
|
248
|
-
${LineStyles.cssText}
|
|
249
|
-
</style>
|
|
250
|
-
<div class="arrow-type end-none" value="none" option></div>
|
|
251
|
-
<div class="arrow-type end-arrow" value="arrow" option></div>
|
|
252
|
-
<div class="arrow-type end-open-arrow" value="open-arrow" option></div>
|
|
253
|
-
<div class="arrow-type end-sharp-arrow" value="sharp-arrow" option></div>
|
|
254
|
-
<div class="arrow-type end-diamond" value="diamond" option></div>
|
|
255
|
-
<div class="arrow-type end-oval" value="oval" option></div>
|
|
256
|
-
</ox-popup-list>
|
|
257
|
-
</ox-select>
|
|
258
|
-
|
|
259
|
-
<label>
|
|
260
|
-
<ox-i18n msgid="label.end-size">end size</ox-i18n>
|
|
261
|
-
</label>
|
|
262
|
-
<ox-select value-key="endSize" .value=${endSize} class="custom-editor">
|
|
263
|
-
<div class="arrow-type ${endSize ? `end-${endSize}` : nothing}" slot="label"></div>
|
|
264
|
-
<ox-popup-list align-left nowrap>
|
|
265
|
-
<style>
|
|
266
|
-
${LineStyles.cssText}
|
|
267
|
-
</style>
|
|
268
|
-
<div class="arrow-type end-size1" value="size1" option></div>
|
|
269
|
-
<div class="arrow-type end-size2" value="size2" option></div>
|
|
270
|
-
<div class="arrow-type end-size3" value="size3" option></div>
|
|
271
|
-
<div class="arrow-type end-size4" value="size4" option></div>
|
|
272
|
-
<div class="arrow-type end-size5" value="size5" option></div>
|
|
273
|
-
<div class="arrow-type end-size6" value="size6" option></div>
|
|
274
|
-
<div class="arrow-type end-size7" value="size7" option></div>
|
|
275
|
-
<div class="arrow-type end-size8" value="size8" option></div>
|
|
276
|
-
<div class="arrow-type end-size9" value="size9" option></div>
|
|
277
|
-
</ox-popup-list>
|
|
278
|
-
</ox-select>
|
|
279
|
-
`
|
|
280
|
-
: html``}
|
|
281
|
-
</div>
|
|
282
|
-
</fieldset>
|
|
283
|
-
`
|
|
284
|
-
}
|
|
285
|
-
}
|
package/src/types.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Model } from '@hatiolab/things-scene'
|
|
2
|
-
|
|
3
|
-
export interface PalletItem {
|
|
4
|
-
type: string
|
|
5
|
-
description: string
|
|
6
|
-
icon: HTMLImageElement
|
|
7
|
-
group: string | string[]
|
|
8
|
-
model: Model
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface Pallet {
|
|
12
|
-
name: string
|
|
13
|
-
templates: PalletItem[]
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type ComponentTemplate = {
|
|
17
|
-
type: string
|
|
18
|
-
description: string
|
|
19
|
-
group:
|
|
20
|
-
| 'line'
|
|
21
|
-
| 'shape'
|
|
22
|
-
| 'textAndMedia'
|
|
23
|
-
| 'chartAndGauge'
|
|
24
|
-
| 'table'
|
|
25
|
-
| 'container'
|
|
26
|
-
| 'dataSource'
|
|
27
|
-
| 'IoT'
|
|
28
|
-
| '3D'
|
|
29
|
-
| 'warehouse'
|
|
30
|
-
| 'form'
|
|
31
|
-
| 'etc'
|
|
32
|
-
| string
|
|
33
|
-
icon: any
|
|
34
|
-
model: Model
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type ComponentGroup = {
|
|
38
|
-
name: string
|
|
39
|
-
description: string
|
|
40
|
-
icon: string
|
|
41
|
-
templates: ComponentTemplate[]
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type Board = {
|
|
45
|
-
id?: string
|
|
46
|
-
name?: string
|
|
47
|
-
description?: string
|
|
48
|
-
model?: any
|
|
49
|
-
groupId?: string
|
|
50
|
-
thumbnail?: string
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export type BoardGroup = {
|
|
54
|
-
id?: string
|
|
55
|
-
name?: string
|
|
56
|
-
description?: string
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type PlayGroup = {
|
|
60
|
-
id?: string
|
|
61
|
-
name?: string
|
|
62
|
-
description?: string
|
|
63
|
-
}
|
package/stories/index.stories.ts
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { html, TemplateResult } from 'lit'
|
|
2
|
-
import '../src/ox-property-panel.js'
|
|
3
|
-
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'OxPropertyPanel',
|
|
7
|
-
component: 'ox-property-panel',
|
|
8
|
-
argTypes: {
|
|
9
|
-
model: { control: 'object' }
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface Story<T> {
|
|
14
|
-
(args: T): TemplateResult
|
|
15
|
-
args?: Partial<T>
|
|
16
|
-
argTypes?: Record<string, unknown>
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface ArgTypes {
|
|
20
|
-
model?: any
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const Template: Story<ArgTypes> = ({ model }: ArgTypes) => html`
|
|
24
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
25
|
-
|
|
26
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
|
27
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
|
28
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
29
|
-
<link href="/themes/help-theme.css" rel="stylesheet" />
|
|
30
|
-
|
|
31
|
-
<link
|
|
32
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
33
|
-
rel="stylesheet"
|
|
34
|
-
/>
|
|
35
|
-
<link
|
|
36
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
37
|
-
rel="stylesheet"
|
|
38
|
-
/>
|
|
39
|
-
<link
|
|
40
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
41
|
-
rel="stylesheet"
|
|
42
|
-
/>
|
|
43
|
-
|
|
44
|
-
<style>
|
|
45
|
-
${MDTypeScaleStyles.cssText}
|
|
46
|
-
</style>
|
|
47
|
-
|
|
48
|
-
<style>
|
|
49
|
-
#place {
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: 500px;
|
|
52
|
-
text-align: center;
|
|
53
|
-
|
|
54
|
-
background-color: var(--md-sys-color-primary-container);
|
|
55
|
-
color: var(--md-sys-color-on-primary-container);
|
|
56
|
-
}
|
|
57
|
-
</style>
|
|
58
|
-
|
|
59
|
-
<ox-property-panel .model=${model}> </ox-property-panel>
|
|
60
|
-
`
|
|
61
|
-
|
|
62
|
-
export const Regular = Template.bind({})
|
|
63
|
-
Regular.args = {
|
|
64
|
-
model: {
|
|
65
|
-
type: 'progress-circle',
|
|
66
|
-
cy: 100,
|
|
67
|
-
cx: 100,
|
|
68
|
-
rx: 100,
|
|
69
|
-
ry: 100,
|
|
70
|
-
value: '#{data}',
|
|
71
|
-
startAngle: 0,
|
|
72
|
-
endAngle: 360,
|
|
73
|
-
fontSize: 70,
|
|
74
|
-
strokeStyle: 'rgb(82, 199, 255)',
|
|
75
|
-
blankStrokeStyle: 'rgba(0,0,0,.2)',
|
|
76
|
-
fontFamily: 'digital',
|
|
77
|
-
fontColor: '#fff',
|
|
78
|
-
text: '#{data}',
|
|
79
|
-
alpha: 1,
|
|
80
|
-
hidden: false,
|
|
81
|
-
lineWidth: 20,
|
|
82
|
-
lineDash: 'solid',
|
|
83
|
-
lineCap: 'butt',
|
|
84
|
-
rotation: 0,
|
|
85
|
-
paddingTop: 50,
|
|
86
|
-
shadow: {
|
|
87
|
-
left: 4,
|
|
88
|
-
top: 4,
|
|
89
|
-
blurSize: 4,
|
|
90
|
-
color: 'rgba(0,0,0,.3)'
|
|
91
|
-
},
|
|
92
|
-
paddingRight: 15,
|
|
93
|
-
textAlign: 'center',
|
|
94
|
-
textFormat: '#,##0.0',
|
|
95
|
-
data: 99,
|
|
96
|
-
mappings: [],
|
|
97
|
-
locked: false,
|
|
98
|
-
fillStyle: 'rgba(76, 187, 250, 0.2)',
|
|
99
|
-
paddingLeft: 0,
|
|
100
|
-
textBaseline: null,
|
|
101
|
-
packmanStyle: true,
|
|
102
|
-
animFromBase: true,
|
|
103
|
-
bold: true,
|
|
104
|
-
refid: 45
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export const Custom = Template.bind({})
|
|
109
|
-
Custom.args = {
|
|
110
|
-
model: {
|
|
111
|
-
type: 'rect',
|
|
112
|
-
left: 95.56740614334475,
|
|
113
|
-
top: 30.973680756104017,
|
|
114
|
-
width: 239.5904436860068,
|
|
115
|
-
height: 47.098976109215045,
|
|
116
|
-
fillStyle: 'red',
|
|
117
|
-
strokeStyle: '#000',
|
|
118
|
-
alpha: 1,
|
|
119
|
-
hidden: false,
|
|
120
|
-
lineWidth: 1,
|
|
121
|
-
lineDash: 'solid',
|
|
122
|
-
lineCap: 'butt',
|
|
123
|
-
refid: 8,
|
|
124
|
-
rotation: 0,
|
|
125
|
-
id: 'a',
|
|
126
|
-
mappings: [
|
|
127
|
-
{
|
|
128
|
-
rule: 'value',
|
|
129
|
-
target: '(self)',
|
|
130
|
-
property: 'text'
|
|
131
|
-
}
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2018",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"moduleResolution": "bundler",
|
|
6
|
-
"resolveJsonModule": true,
|
|
7
|
-
"noEmitOnError": true,
|
|
8
|
-
"lib": ["es2017", "dom"],
|
|
9
|
-
"strict": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
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
|
-
"exclude": ["dist"]
|
|
26
|
-
}
|
|
@@ -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.lit] }),
|
|
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 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
|
-
});
|