@things-factory/board-ui 4.0.10 → 4.0.14
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/client/index.js +0 -2
- package/client/pages/board-modeller-page.js +6 -75
- package/client/pages/board-player-page.js +1 -1
- package/client/pages/board-viewer-page.js +1 -1
- package/package.json +9 -10
- package/assets/images/icon-properties-ipattern.png +0 -0
- package/client/board-modeller/board-modeller.js +0 -237
- package/client/board-modeller/component-toolbar/component-menu.js +0 -153
- package/client/board-modeller/component-toolbar/component-toolbar.js +0 -193
- package/client/board-modeller/edit-toolbar-style.js +0 -228
- package/client/board-modeller/edit-toolbar.js +0 -637
- package/client/board-modeller/property-sidebar/abstract-property.js +0 -73
- package/client/board-modeller/property-sidebar/data-binding/data-binding-mapper.js +0 -366
- package/client/board-modeller/property-sidebar/data-binding/data-binding.js +0 -476
- package/client/board-modeller/property-sidebar/effects/effects-shared-style.js +0 -58
- package/client/board-modeller/property-sidebar/effects/effects.js +0 -64
- package/client/board-modeller/property-sidebar/effects/property-animation.js +0 -141
- package/client/board-modeller/property-sidebar/effects/property-animations.js +0 -92
- package/client/board-modeller/property-sidebar/effects/property-event-hover.js +0 -144
- package/client/board-modeller/property-sidebar/effects/property-event-tap.js +0 -146
- package/client/board-modeller/property-sidebar/effects/property-event.js +0 -72
- package/client/board-modeller/property-sidebar/effects/property-shadow.js +0 -122
- package/client/board-modeller/property-sidebar/effects/value-converter.js +0 -26
- package/client/board-modeller/property-sidebar/inspector/inspector.js +0 -338
- package/client/board-modeller/property-sidebar/property-shared-style.js +0 -132
- package/client/board-modeller/property-sidebar/property-sidebar.js +0 -324
- package/client/board-modeller/property-sidebar/shapes/box-padding-editor-styles.js +0 -94
- package/client/board-modeller/property-sidebar/shapes/shapes.js +0 -421
- package/client/board-modeller/property-sidebar/specifics/specific-properties-builder.js +0 -149
- package/client/board-modeller/property-sidebar/specifics/specifics.js +0 -248
- package/client/board-modeller/property-sidebar/styles/styles.js +0 -591
- package/client/board-modeller/scene-viewer/confidential-overlay.js +0 -18
- package/client/board-modeller/scene-viewer/things-scene-handler.js +0 -50
- package/client/board-modeller/scene-viewer/things-scene-layer.js +0 -52
- package/client/board-modeller/scene-viewer/things-scene-player.js +0 -115
- package/client/board-modeller/scene-viewer/things-scene-property.js +0 -25
- package/client/board-modeller/scene-viewer/things-scene-viewer.js +0 -312
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { LitElement, html, css } from 'lit-element'
|
|
6
|
-
|
|
7
|
-
import './component-menu'
|
|
8
|
-
|
|
9
|
-
class ComponentToolbar extends LitElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super()
|
|
12
|
-
|
|
13
|
-
this.componentGroupList = []
|
|
14
|
-
this.group = ''
|
|
15
|
-
this.scene = null
|
|
16
|
-
this.mode = 0
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static get properties() {
|
|
20
|
-
return {
|
|
21
|
-
componentGroupList: Array,
|
|
22
|
-
group: String,
|
|
23
|
-
scene: Object,
|
|
24
|
-
mode: Number
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static get styles() {
|
|
29
|
-
return [
|
|
30
|
-
css`
|
|
31
|
-
:host {
|
|
32
|
-
left: 0;
|
|
33
|
-
display: block;
|
|
34
|
-
position: relative;
|
|
35
|
-
|
|
36
|
-
width: var(--component-toolbar-icon-size);
|
|
37
|
-
background-color: var(--component-toolbar-background-color);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
span {
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: row;
|
|
43
|
-
|
|
44
|
-
width: var(--component-toolbar-icon-size);
|
|
45
|
-
height: var(--component-toolbar-icon-size);
|
|
46
|
-
min-width: 50%;
|
|
47
|
-
|
|
48
|
-
border-bottom: var(--component-toolbar-border);
|
|
49
|
-
margin: 0;
|
|
50
|
-
background: url(/assets/images/icon-vtoolbar.png) -1px 0 no-repeat;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
span[data-group='line'] {
|
|
54
|
-
background-position: 50% -186px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
span[data-group='shape'] {
|
|
58
|
-
background-position: 0px -284px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
span[data-group='textAndMedia'] {
|
|
62
|
-
background-position: 50% -385px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
span[data-group='chartAndGauge'] {
|
|
66
|
-
background-position: 50% -488px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
span[data-group='table'] {
|
|
70
|
-
background-position: 50% -585px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
span[data-group='container'] {
|
|
74
|
-
background-position: 50% -685px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
span[data-group='dataSource'] {
|
|
78
|
-
background-position: 50% -888px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
span[data-group='IoT'] {
|
|
82
|
-
background-position: -3px -788px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
span[data-group='3D'] {
|
|
86
|
-
background-position: 50% -992px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
span[data-group='warehouse'] {
|
|
90
|
-
background-position: -2px -1089px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
span[data-group='form'] {
|
|
94
|
-
background-position: -2px -1287px;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
span[data-group='etc'] {
|
|
98
|
-
background-position: -1px -1189px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.pressed {
|
|
102
|
-
background-position: 0 15px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.pressed[pressed],
|
|
106
|
-
.pressed[active] {
|
|
107
|
-
background-position: -3px -88px;
|
|
108
|
-
background-color: #beb9b3;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
component-menu {
|
|
112
|
-
display: none;
|
|
113
|
-
position: absolute;
|
|
114
|
-
top: 0;
|
|
115
|
-
left: var(--component-toolbar-icon-size);
|
|
116
|
-
height: 100%;
|
|
117
|
-
outline: none;
|
|
118
|
-
}
|
|
119
|
-
`
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
render() {
|
|
124
|
-
return html`
|
|
125
|
-
<span id="shift" class="pressed" @click="${e => this._onClickShift(e)}"> </span>
|
|
126
|
-
|
|
127
|
-
${this.componentGroupList
|
|
128
|
-
.filter(group => group.templates?.length > 0)
|
|
129
|
-
.map(
|
|
130
|
-
item => html`
|
|
131
|
-
<span data-group=${item.name} @click=${e => this._onClickGroup(e)}> </span>
|
|
132
|
-
`
|
|
133
|
-
)}
|
|
134
|
-
|
|
135
|
-
<component-menu
|
|
136
|
-
tabindex="-1"
|
|
137
|
-
@focusout=${e => {
|
|
138
|
-
this.group = null
|
|
139
|
-
}}
|
|
140
|
-
id="menu"
|
|
141
|
-
.scene=${this.scene}
|
|
142
|
-
.group=${this.group}
|
|
143
|
-
.groups=${this.componentGroupList}
|
|
144
|
-
class="shadow"
|
|
145
|
-
>
|
|
146
|
-
</component-menu>
|
|
147
|
-
`
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
get menu() {
|
|
151
|
-
return this.shadowRoot.getElementById('menu')
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
_setMode(mode) {
|
|
155
|
-
this.mode = mode
|
|
156
|
-
this.dispatchEvent(
|
|
157
|
-
new CustomEvent('mode-changed', {
|
|
158
|
-
bubbles: true,
|
|
159
|
-
composed: true,
|
|
160
|
-
detail: { value: mode }
|
|
161
|
-
})
|
|
162
|
-
)
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
_onClickShift(e) {
|
|
166
|
-
var shift = this.shadowRoot.getElementById('shift')
|
|
167
|
-
if (shift.hasAttribute('active')) {
|
|
168
|
-
shift.removeAttribute('active')
|
|
169
|
-
this._setMode(1)
|
|
170
|
-
} else {
|
|
171
|
-
shift.setAttribute('active', '')
|
|
172
|
-
this._setMode(2)
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
async _onClickGroup(e) {
|
|
177
|
-
var button = e.target
|
|
178
|
-
|
|
179
|
-
if (!button.hasAttribute || !button.hasAttribute('data-group')) {
|
|
180
|
-
return
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
this.group = button.getAttribute('data-group')
|
|
184
|
-
|
|
185
|
-
if (!this.group) return
|
|
186
|
-
|
|
187
|
-
await this.updateComplete
|
|
188
|
-
|
|
189
|
-
this.menu.focus()
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
customElements.define('component-toolbar', ComponentToolbar)
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { css } from 'lit-element'
|
|
6
|
-
|
|
7
|
-
export const style = css`
|
|
8
|
-
:host {
|
|
9
|
-
background-color: var(--edit-toolbar-background-color, #394e64);
|
|
10
|
-
|
|
11
|
-
overflow-x: hidden;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
[tools] {
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
overflow: none;
|
|
18
|
-
padding: 0px 10px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
[tools] > * {
|
|
22
|
-
padding: 0px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
[tools] > span[button] {
|
|
26
|
-
min-width: 30px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
[tools] > span[padding] {
|
|
30
|
-
flex: 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
[tools] > .vline {
|
|
34
|
-
display: block;
|
|
35
|
-
flex: none;
|
|
36
|
-
border-left: 1px solid rgba(255, 255, 255, 0.2);
|
|
37
|
-
border-right: 1px solid rgba(0, 0, 0, 0.15);
|
|
38
|
-
width: 0px;
|
|
39
|
-
height: 18px;
|
|
40
|
-
margin: 0 3px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
span[button] {
|
|
44
|
-
min-height: 35px;
|
|
45
|
-
|
|
46
|
-
background: url('/assets/images/icon-htoolbar.png') no-repeat;
|
|
47
|
-
background-position-x: 50%;
|
|
48
|
-
opacity: 0.8;
|
|
49
|
-
}
|
|
50
|
-
span[button]:hover {
|
|
51
|
-
opacity: 1;
|
|
52
|
-
background-color: rgba(0, 0, 0, 0.1);
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
#fullscreen,
|
|
57
|
-
#toggle-property {
|
|
58
|
-
flex: none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
#align-left {
|
|
62
|
-
background-position-y: 8px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
#align-center {
|
|
66
|
-
background-position-y: -42px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
#align-right {
|
|
70
|
-
background-position-y: -92px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
#align-top {
|
|
74
|
-
background-position-y: -142px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
#align-middle {
|
|
78
|
-
background-position-y: -192px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
#align-bottom {
|
|
82
|
-
background-position-y: -242px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
#undo {
|
|
86
|
-
background-position-y: -592px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
#redo {
|
|
90
|
-
background-position-y: -642px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
#front {
|
|
94
|
-
background-position-y: -292px;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
#back {
|
|
98
|
-
background-position-y: -342px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
#forward {
|
|
102
|
-
background-position-y: -392px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
#backward {
|
|
106
|
-
background-position-y: -442px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
#symmetry-x {
|
|
110
|
-
background-position-y: -492px;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
#symmetry-y {
|
|
114
|
-
background-position-y: -542px;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
#group {
|
|
118
|
-
background-position-y: -492px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
#ungroup {
|
|
122
|
-
background-position-y: -542px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
#fullscreen {
|
|
126
|
-
background-position-y: -692px;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
#toggle-property {
|
|
130
|
-
background-position-y: -692px;
|
|
131
|
-
float: right;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
#zoomin {
|
|
135
|
-
background-position-y: -742px;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
#zoomout {
|
|
139
|
-
background-position-y: -792px;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
#fit-scene {
|
|
143
|
-
background-position-y: -1492px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
#cut {
|
|
147
|
-
background-position-y: -842px;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
#copy {
|
|
151
|
-
background-position-y: -892px;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
#paste {
|
|
155
|
-
background-position-y: -942px;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
#delete {
|
|
159
|
-
background-position-y: -992px;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
#font-increase {
|
|
163
|
-
background-position-y: -1042px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
#font-decrease {
|
|
167
|
-
background-position-y: -1092px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
#style-copy {
|
|
171
|
-
background-position-y: -1142px;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
#context-menu {
|
|
175
|
-
background-position-y: -692px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
#symmetry-x {
|
|
179
|
-
background-position-y: -1192px;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
#symmetry-y {
|
|
183
|
-
background-position-y: -1242px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
#rotate-cw {
|
|
187
|
-
background-position-y: -1292px;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
#rotate-ccw {
|
|
191
|
-
background-position-y: -1342px;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
#distribute-horizontal {
|
|
195
|
-
background-position-y: -1542px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
#distribute-vertical {
|
|
199
|
-
background-position-y: -1593px;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
#toggle-property {
|
|
203
|
-
background-position-y: -1392px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
#preview {
|
|
207
|
-
background-position-y: -1640px;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/* bigger buttons */
|
|
211
|
-
#fullscreen {
|
|
212
|
-
background: url('/assets/images/icon-fullscreen.png') 50% 10px no-repeat;
|
|
213
|
-
width: var(--edit-toolbar-bigger-icon-size);
|
|
214
|
-
height: var(--edit-toolbar-bigger-icon-size);
|
|
215
|
-
border-left: var(--edit-toolbar-bigger-icon-line);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
#toggle-property {
|
|
219
|
-
background: url('/assets/images/icon-collapse.png') 80% 10px no-repeat;
|
|
220
|
-
width: var(--edit-toolbar-bigger-icon-size);
|
|
221
|
-
height: var(--edit-toolbar-bigger-icon-size);
|
|
222
|
-
border-left: var(--edit-toolbar-bigger-icon-line);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
#toggle-property[active] {
|
|
226
|
-
background: url(/assets/images/icon-collapse-active.png) 80% 10px no-repeat;
|
|
227
|
-
}
|
|
228
|
-
`
|