@operato/process 1.1.4 → 1.1.6
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 +17 -0
- package/dist/src/modeller/property-sidebar/effects/effects.d.ts +2 -0
- package/dist/src/modeller/property-sidebar/effects/effects.js +6 -1
- package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +20 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +127 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +28 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +199 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +22 -0
- package/dist/src/modeller/property-sidebar/effects/property-event.js +67 -0
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -0
- package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +2 -0
- package/dist/src/modeller/property-sidebar/property-sidebar.js +7 -0
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +5 -7
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +84 -17
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/modeller/property-sidebar/effects/effects.ts +6 -1
- package/src/modeller/property-sidebar/effects/property-event-hover.ts +140 -0
- package/src/modeller/property-sidebar/effects/property-event-tap.ts +208 -0
- package/src/modeller/property-sidebar/effects/property-event.ts +76 -0
- package/src/modeller/property-sidebar/property-sidebar.ts +7 -0
- package/src/modeller/property-sidebar/shapes/shapes.ts +85 -18
|
@@ -9,17 +9,15 @@ import '@operato/i18n/ox-i18n.js'
|
|
|
9
9
|
import '@operato/help/ox-title-with-help.js'
|
|
10
10
|
|
|
11
11
|
import { css, html } from 'lit'
|
|
12
|
-
import { property } from 'lit/decorators.js'
|
|
12
|
+
import { property, state } from 'lit/decorators.js'
|
|
13
13
|
|
|
14
14
|
import { BOUNDS, Component, Properties } from '@hatiolab/things-scene'
|
|
15
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
16
15
|
|
|
17
16
|
import { AbstractProperty } from '../abstract-property'
|
|
18
|
-
import { PropertyShadow } from '../effects/property-shadow.js'
|
|
19
17
|
import { PropertySharedStyle } from '../property-shared-style'
|
|
20
18
|
import { BoxPaddingEditorStyles } from './box-padding-editor-styles'
|
|
21
19
|
|
|
22
|
-
export class PropertyShapes extends
|
|
20
|
+
export class PropertyShapes extends AbstractProperty {
|
|
23
21
|
static styles = [
|
|
24
22
|
PropertySharedStyle,
|
|
25
23
|
BoxPaddingEditorStyles,
|
|
@@ -138,16 +136,12 @@ export class PropertyShapes extends ScopedElementsMixin(AbstractProperty) {
|
|
|
138
136
|
@property({ type: Object }) bounds: BOUNDS | null = null
|
|
139
137
|
@property({ type: Array }) selected: Component[] = []
|
|
140
138
|
|
|
139
|
+
@state() private _3dExpanded: boolean = false
|
|
140
|
+
|
|
141
141
|
firstUpdated() {
|
|
142
142
|
this.renderRoot.addEventListener('change', this._onValueChange.bind(this))
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
static get scopedElements() {
|
|
146
|
-
return {
|
|
147
|
-
'process-property-shadow': PropertyShadow
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
145
|
render() {
|
|
152
146
|
const value = this.value || {}
|
|
153
147
|
|
|
@@ -160,18 +154,45 @@ export class PropertyShapes extends ScopedElementsMixin(AbstractProperty) {
|
|
|
160
154
|
<input value-key="id" .value=${value.id || ''} />
|
|
161
155
|
`
|
|
162
156
|
: html``}
|
|
157
|
+
${this._isClassIdentifiable(this.selected)
|
|
158
|
+
? html`
|
|
159
|
+
<label> <ox-i18n msgid="label.class">Class</ox-i18n> </label>
|
|
160
|
+
<input value-key="class" .value=${value.class || ''} />
|
|
161
|
+
`
|
|
162
|
+
: html``}
|
|
163
163
|
${this._hasTextProperty(this.selected)
|
|
164
164
|
? html`
|
|
165
165
|
<label> <ox-i18n msgid="label.text">Text</ox-i18n> </label>
|
|
166
166
|
<input value-key="text" .value=${value.text || ''} />
|
|
167
|
+
<label> <ox-i18n msgid="label.text-format">Text Format</ox-i18n> </label>
|
|
168
|
+
<input value-key="textFormat" .value=${value.textFormat || ''} list="format-list" />
|
|
169
|
+
<datalist id="format-list">
|
|
170
|
+
<option value="#,###."></option>
|
|
171
|
+
<option value="#,###.#"></option>
|
|
172
|
+
<option value="#,###.0"></option>
|
|
173
|
+
<option value="#,##0.#"></option>
|
|
174
|
+
<option value="#,##0.0"></option>
|
|
175
|
+
<option value="#,##0.0%"></option>
|
|
176
|
+
</datalist>
|
|
177
|
+
`
|
|
178
|
+
: html``}
|
|
179
|
+
${this._hasProperties(this.selected)
|
|
180
|
+
? html`
|
|
181
|
+
<div class="checkbox-row">
|
|
182
|
+
<input id="checkbox-hidden" value-key="hidden" type="checkbox" .checked=${value.hidden} />
|
|
183
|
+
<label for="checkbox-hidden"> <ox-i18n msgid="label.item-hidden">Item Hidden</ox-i18n> </label>
|
|
184
|
+
|
|
185
|
+
<input id="checkbox-locked" value-key="locked" type="checkbox" .checked=${value.locked} />
|
|
186
|
+
<label for="checkbox-locked"> <ox-i18n msgid="label.locked">Locked</ox-i18n> </label>
|
|
187
|
+
</div>
|
|
167
188
|
`
|
|
168
189
|
: html``}
|
|
169
190
|
</div>
|
|
170
191
|
</fieldset>
|
|
171
192
|
|
|
172
|
-
${this.
|
|
193
|
+
${!this._isLine(this.selected)
|
|
173
194
|
? html`
|
|
174
|
-
<fieldset class="icon-label unit">
|
|
195
|
+
<fieldset class="icon-label unit ratio">
|
|
175
196
|
<legend>
|
|
176
197
|
<ox-title-with-help topic="process-modeller/shapes/size" msgid="label.size">size</ox-title-with-help>
|
|
177
198
|
</legend>
|
|
@@ -181,20 +202,48 @@ export class PropertyShapes extends ScopedElementsMixin(AbstractProperty) {
|
|
|
181
202
|
<input type="number" value-key="bounds.width" .value=${this.bounds?.width} />
|
|
182
203
|
<label class="height"> <ox-i18n msgid="label.height">height</ox-i18n> </label>
|
|
183
204
|
<input type="number" value-key="bounds.height" .value=${this.bounds?.height} />
|
|
205
|
+
|
|
206
|
+
${this.selected.length && this.selected[0].isRootModel()
|
|
207
|
+
? html``
|
|
208
|
+
: html`
|
|
209
|
+
<label class="rotate"> <ox-i18n msgid="label.rotate">rotate</ox-i18n> </label>
|
|
210
|
+
<ox-input-angle value-key="rotation" .radian=${value.rotation}> </ox-input-angle>
|
|
211
|
+
`}
|
|
184
212
|
</div>
|
|
185
213
|
</fieldset>
|
|
186
214
|
`
|
|
187
|
-
: html
|
|
188
|
-
|
|
215
|
+
: html``}
|
|
216
|
+
${this._is3dish(this.selected)
|
|
217
|
+
? html`
|
|
218
|
+
<fieldset class="icon-label unit ratio" collapsable ?collapsed=${!this._3dExpanded}>
|
|
189
219
|
<legend>
|
|
190
|
-
<ox-title-with-help topic="process-modeller/
|
|
191
|
-
|
|
220
|
+
<ox-title-with-help topic="process-modeller/shapes/3dish" msgid="label.3dish">3D</ox-title-with-help>
|
|
221
|
+
<mwc-icon
|
|
222
|
+
@click=${(e: Event) => {
|
|
223
|
+
this._3dExpanded = !this._3dExpanded
|
|
224
|
+
}}
|
|
225
|
+
>${this._3dExpanded ? 'expand_less' : 'expand_more'}</mwc-icon
|
|
192
226
|
>
|
|
193
227
|
</legend>
|
|
194
228
|
|
|
195
|
-
<
|
|
229
|
+
<div class="property-grid">
|
|
230
|
+
<label class="zPos"> <ox-i18n msgid="label.z-pos">pos. Z</ox-i18n> </label>
|
|
231
|
+
<input type="number" value-key="zPos" .value=${value.zPos} />
|
|
232
|
+
<label class="depth"> <ox-i18n msgid="label.depth">depth</ox-i18n> </label>
|
|
233
|
+
<input type="number" value-key="depth" .value=${value.depth} />
|
|
234
|
+
|
|
235
|
+
<label class="rotationX"> <ox-i18n msgid="label.rotation-x">rot. X</ox-i18n> </label>
|
|
236
|
+
<ox-input-angle value-key="rotationX" .radian=${value.rotationX}> </ox-input-angle>
|
|
237
|
+
|
|
238
|
+
<label class="rotationY"> <ox-i18n msgid="label.rotation-y">rot. Y</ox-i18n> </label>
|
|
239
|
+
<ox-input-angle value-key="rotationY" .radian=${value.rotationY}> </ox-input-angle>
|
|
240
|
+
|
|
241
|
+
<label class="rotationZ"> <ox-i18n msgid="label.rotation-z">rot. Z</ox-i18n> </label>
|
|
242
|
+
<ox-input-angle value-key="rotation" .radian=${value.rotation}> </ox-input-angle>
|
|
243
|
+
</div>
|
|
196
244
|
</fieldset>
|
|
197
|
-
`
|
|
245
|
+
`
|
|
246
|
+
: html``}
|
|
198
247
|
${this._hasTextProperty(this.selected)
|
|
199
248
|
? html`
|
|
200
249
|
<fieldset>
|
|
@@ -311,6 +360,12 @@ export class PropertyShapes extends ScopedElementsMixin(AbstractProperty) {
|
|
|
311
360
|
return true
|
|
312
361
|
}
|
|
313
362
|
|
|
363
|
+
_hasProperties(selected: Component[]) {
|
|
364
|
+
if (!selected || selected.length == 0 || (selected[0] && selected[0].isLayer && selected[0].isLayer())) return false
|
|
365
|
+
|
|
366
|
+
return true
|
|
367
|
+
}
|
|
368
|
+
|
|
314
369
|
_isIdentifiable(selected: Component[]) {
|
|
315
370
|
if (!selected || selected.length == 0 || selected.length > 1 || (selected[0].isLayer && selected[0].isLayer()))
|
|
316
371
|
return false
|
|
@@ -318,9 +373,21 @@ export class PropertyShapes extends ScopedElementsMixin(AbstractProperty) {
|
|
|
318
373
|
return true
|
|
319
374
|
}
|
|
320
375
|
|
|
376
|
+
_isClassIdentifiable(selected: Component[]) {
|
|
377
|
+
if (!selected || (selected[0] && selected[0].isLayer())) return false
|
|
378
|
+
|
|
379
|
+
return true
|
|
380
|
+
}
|
|
381
|
+
|
|
321
382
|
_isLine(selected: Component[]) {
|
|
322
383
|
if (!selected || !(selected[0] && selected[0].isLine())) return false
|
|
323
384
|
|
|
324
385
|
return true
|
|
325
386
|
}
|
|
387
|
+
|
|
388
|
+
_is3dish(selected: Component[]) {
|
|
389
|
+
if (!selected || !(selected[0] && selected[0].is3dish())) return false
|
|
390
|
+
|
|
391
|
+
return true
|
|
392
|
+
}
|
|
326
393
|
}
|