@operato/board 1.4.39 → 1.4.40
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/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +2 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +54 -5
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/modeller/property-sidebar/effects/property-event-hover.ts +61 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/board",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.40",
|
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -148,5 +148,5 @@
|
|
|
148
148
|
"prettier --write"
|
|
149
149
|
]
|
|
150
150
|
},
|
|
151
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "dc3003dedf12580a7954be0dc09e3151a07f272b"
|
|
152
152
|
}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
import '@operato/input/ox-input-data.js'
|
|
6
6
|
import '@operato/i18n/ox-i18n.js'
|
|
7
7
|
|
|
8
|
-
import { html, LitElement } from 'lit'
|
|
8
|
+
import { css, html, LitElement } from 'lit'
|
|
9
9
|
import { property } from 'lit/decorators.js'
|
|
10
|
+
import { ifDefined } from 'lit/directives/if-defined.js'
|
|
10
11
|
|
|
11
12
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
12
13
|
|
|
@@ -14,7 +15,50 @@ import { EffectsSharedStyle } from './effects-shared-style.js'
|
|
|
14
15
|
import { convert } from './value-converter'
|
|
15
16
|
|
|
16
17
|
export class PropertyEventHover extends LitElement {
|
|
17
|
-
static styles = [
|
|
18
|
+
static styles = [
|
|
19
|
+
EffectsSharedStyle,
|
|
20
|
+
css`
|
|
21
|
+
.cursor-auto {
|
|
22
|
+
cursor: auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.cursor-pointer {
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cursor-default {
|
|
30
|
+
cursor: default;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.cursor-move {
|
|
34
|
+
cursor: move;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.cursor-text {
|
|
38
|
+
cursor: text;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.cursor-wait {
|
|
42
|
+
cursor: wait;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.cursor-help {
|
|
46
|
+
cursor: help;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.cursor-crosshair {
|
|
50
|
+
cursor: crosshair;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.cursor-not-allowed {
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.cursor-grab {
|
|
58
|
+
cursor: grab;
|
|
59
|
+
}
|
|
60
|
+
`
|
|
61
|
+
]
|
|
18
62
|
|
|
19
63
|
@property({ type: Object }) value?: Properties
|
|
20
64
|
@property({ type: Object }) scene?: Scene
|
|
@@ -36,11 +80,12 @@ export class PropertyEventHover extends LitElement {
|
|
|
36
80
|
<select id="tap-select" value-key="action" .value=${action || ''}>
|
|
37
81
|
<option value=""></option>
|
|
38
82
|
<option value="popup">popup target board</option>
|
|
39
|
-
<option value="
|
|
83
|
+
<option value="info-window">open infowindow</option>
|
|
40
84
|
<option value="data-toggle">toggle(true/false) target component data</option>
|
|
41
85
|
<option value="data-tristate">tristate(0/1/2) target component data</option>
|
|
42
86
|
<option value="data-set">set value to target component data</option>
|
|
43
87
|
<option value="value-set">set value to target component value</option>
|
|
88
|
+
<option value="mouse-cursor">change mouse cursor to target style</option>
|
|
44
89
|
</select>
|
|
45
90
|
|
|
46
91
|
<label> <ox-i18n msgid="label.target">target</ox-i18n> </label>
|
|
@@ -59,7 +104,8 @@ export class PropertyEventHover extends LitElement {
|
|
|
59
104
|
|
|
60
105
|
<datalist id="target-list">
|
|
61
106
|
${this._getTargetList(action).map(
|
|
62
|
-
({ value, description }) =>
|
|
107
|
+
({ value, description, class: a }) =>
|
|
108
|
+
html` <option .value=${value} class=${ifDefined(a)}>${description}</option> `
|
|
63
109
|
)}
|
|
64
110
|
</datalist>
|
|
65
111
|
`}
|
|
@@ -90,7 +136,7 @@ export class PropertyEventHover extends LitElement {
|
|
|
90
136
|
}
|
|
91
137
|
}
|
|
92
138
|
|
|
93
|
-
_getTargetList(action: string): { value: string; description
|
|
139
|
+
_getTargetList(action: string): { value: string; description?: string; class?: string }[] {
|
|
94
140
|
switch (action) {
|
|
95
141
|
case 'data-toggle':
|
|
96
142
|
case 'data-tristate':
|
|
@@ -105,7 +151,8 @@ export class PropertyEventHover extends LitElement {
|
|
|
105
151
|
[]
|
|
106
152
|
ids.unshift({ value: '(self)', description: 'self component' })
|
|
107
153
|
return ids
|
|
108
|
-
|
|
154
|
+
|
|
155
|
+
case 'info-window':
|
|
109
156
|
return (
|
|
110
157
|
(this.scene &&
|
|
111
158
|
this.scene.ids
|
|
@@ -118,6 +165,14 @@ export class PropertyEventHover extends LitElement {
|
|
|
118
165
|
})) ||
|
|
119
166
|
[]
|
|
120
167
|
)
|
|
168
|
+
|
|
169
|
+
case 'mouse-cursor':
|
|
170
|
+
return ['auto', 'pointer', 'default', 'move', 'text', 'wait', 'help', 'crosshair', 'not-allowed', 'grab'].map(
|
|
171
|
+
style => {
|
|
172
|
+
return { value: style, class: 'cursor-' + style }
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
|
|
121
176
|
default:
|
|
122
177
|
return []
|
|
123
178
|
}
|