@operato/board 1.0.13 → 1.0.16
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 +16 -0
- package/dist/src/modeller/component-toolbar/component-detail.d.ts +8 -0
- package/dist/src/modeller/component-toolbar/component-detail.js +4 -7
- package/dist/src/modeller/component-toolbar/component-detail.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.d.ts +24 -1
- package/dist/src/modeller/component-toolbar/component-menu.js +11 -8
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +25 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.js +12 -9
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
- package/dist/src/modeller/edit-toolbar.js +3 -7
- package/dist/src/modeller/edit-toolbar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +3 -7
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +36 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +12 -9
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.d.ts +19 -3
- package/dist/src/modeller/property-sidebar/effects/effects.js +16 -11
- package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.js +5 -9
- package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.d.ts +17 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.js +12 -9
- package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +15 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +4 -7
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +23 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +3 -6
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +18 -2
- package/dist/src/modeller/property-sidebar/effects/property-event.js +12 -8
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-shadow.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js +4 -8
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +3 -7
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +43 -6
- package/dist/src/modeller/property-sidebar/property-sidebar.js +20 -12
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +18 -0
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +3 -6
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.d.ts +12 -0
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +3 -6
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +21 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.js +10 -7
- package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +11 -0
- package/dist/src/modeller/property-sidebar/styles/styles.js +5 -8
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-handler.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-player.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-property.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -1
- package/dist/src/ox-board-list.js.map +1 -1
- package/dist/src/ox-board-modeller.d.ts +13 -6
- package/dist/src/ox-board-modeller.js +16 -8
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/ox-board-player.js.map +1 -1
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/src/player/ox-board-player-carousel.js.map +1 -1
- package/dist/src/player/ox-board-player-grid.js.map +1 -1
- package/dist/src/player/ox-board-wrapper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -6
- package/src/modeller/component-toolbar/component-detail.ts +3 -4
- package/src/modeller/component-toolbar/component-menu.ts +13 -7
- package/src/modeller/component-toolbar/component-toolbar.ts +13 -7
- package/src/modeller/edit-toolbar.ts +1 -2
- package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +2 -3
- package/src/modeller/property-sidebar/data-binding/data-binding.ts +12 -6
- package/src/modeller/property-sidebar/effects/effects.ts +16 -8
- package/src/modeller/property-sidebar/effects/property-animation.ts +4 -5
- package/src/modeller/property-sidebar/effects/property-animations.ts +12 -6
- package/src/modeller/property-sidebar/effects/property-event-hover.ts +3 -4
- package/src/modeller/property-sidebar/effects/property-event-tap.ts +2 -3
- package/src/modeller/property-sidebar/effects/property-event.ts +12 -5
- package/src/modeller/property-sidebar/effects/property-shadow.ts +4 -4
- package/src/modeller/property-sidebar/inspector/inspector.ts +2 -3
- package/src/modeller/property-sidebar/property-sidebar.ts +21 -9
- package/src/modeller/property-sidebar/shapes/shapes.ts +2 -3
- package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +2 -3
- package/src/modeller/property-sidebar/specifics/specifics.ts +9 -5
- package/src/modeller/property-sidebar/styles/styles.ts +5 -5
- package/src/ox-board-modeller.ts +18 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/board",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,15 +55,16 @@
|
|
|
55
55
|
"storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@
|
|
58
|
+
"@open-wc/scoped-elements": "^2.0.0-next.6",
|
|
59
|
+
"@operato/app": "^1.0.16",
|
|
59
60
|
"@operato/data-grist": "^1.0.8",
|
|
60
|
-
"@operato/font": "^1.0.
|
|
61
|
-
"@operato/graphql": "^1.0.
|
|
61
|
+
"@operato/font": "^1.0.16",
|
|
62
|
+
"@operato/graphql": "^1.0.16",
|
|
62
63
|
"@operato/i18n": "^1.0.6",
|
|
63
64
|
"@operato/input": "^1.0.6",
|
|
64
65
|
"@operato/markdown": "^1.0.6",
|
|
65
66
|
"@operato/popup": "^1.0.6",
|
|
66
|
-
"@operato/property-editor": "^1.0.
|
|
67
|
+
"@operato/property-editor": "^1.0.16",
|
|
67
68
|
"@operato/styles": "^1.0.6",
|
|
68
69
|
"@operato/utils": "^1.0.6",
|
|
69
70
|
"@polymer/paper-dropdown-menu": "^3.2.0",
|
|
@@ -86,6 +87,7 @@
|
|
|
86
87
|
"@rollup/plugin-image": "^2.1.1",
|
|
87
88
|
"@rollup/plugin-json": "^4.1.0",
|
|
88
89
|
"@types/bwip-js": "^2.1.1",
|
|
90
|
+
"@types/lodash-es": "^4.17.6",
|
|
89
91
|
"@types/w3c-web-usb": "^1.0.5",
|
|
90
92
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
91
93
|
"@typescript-eslint/parser": "^4.33.0",
|
|
@@ -114,5 +116,5 @@
|
|
|
114
116
|
"prettier --write"
|
|
115
117
|
]
|
|
116
118
|
},
|
|
117
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "3e0514a3903e5a0278a0df8e4dd368ec4daf812c"
|
|
118
120
|
}
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import '@operato/markdown'
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { css, html, LitElement } from 'lit'
|
|
8
|
+
import { property } from 'lit/decorators.js'
|
|
9
9
|
|
|
10
10
|
import { ScrollbarStyles } from '@operato/styles'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
class ComponentDetail extends LitElement {
|
|
12
|
+
export class ComponentDetail extends LitElement {
|
|
14
13
|
static styles = [
|
|
15
14
|
ScrollbarStyles,
|
|
16
15
|
css`
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import '
|
|
6
|
-
|
|
7
|
-
import { LitElement, PropertyValues, css, html } from 'lit'
|
|
8
|
-
import { Pallet, PalletItem } from '../../types'
|
|
9
|
-
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
5
|
+
import { css, html, LitElement, PropertyValues } from 'lit'
|
|
6
|
+
import { property, query, state } from 'lit/decorators.js'
|
|
10
7
|
|
|
11
8
|
import { Scene } from '@hatiolab/things-scene'
|
|
9
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
12
10
|
import { ScrollbarStyles } from '@operato/styles'
|
|
13
11
|
|
|
12
|
+
import { Pallet, PalletItem } from '../../types'
|
|
13
|
+
import { ComponentDetail } from './component-detail'
|
|
14
|
+
|
|
14
15
|
const noImage = new URL('../../../../icons/components/no-image.png', import.meta.url).href
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
class ComponentMenu extends LitElement {
|
|
17
|
+
export class ComponentMenu extends ScopedElementsMixin(LitElement) {
|
|
18
18
|
static styles = [
|
|
19
19
|
ScrollbarStyles,
|
|
20
20
|
css`
|
|
@@ -107,6 +107,12 @@ class ComponentMenu extends LitElement {
|
|
|
107
107
|
|
|
108
108
|
@query('component-detail') detail!: HTMLElement
|
|
109
109
|
|
|
110
|
+
static get scopedElements() {
|
|
111
|
+
return {
|
|
112
|
+
'component-detail': ComponentDetail
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
110
116
|
render() {
|
|
111
117
|
return this.group
|
|
112
118
|
? html`
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import '
|
|
5
|
+
import { css, html, LitElement, PropertyValues } from 'lit'
|
|
6
|
+
import { property, query, queryAll } from 'lit/decorators.js'
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { SCENE_MODE, Scene } from '@hatiolab/things-scene'
|
|
10
|
-
import { customElement, property, query, queryAll } from 'lit/decorators.js'
|
|
8
|
+
import { Scene, SCENE_MODE } from '@hatiolab/things-scene'
|
|
9
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
11
10
|
|
|
12
11
|
import { ComponentGroup } from '../../types'
|
|
12
|
+
import { ComponentMenu } from './component-menu.js'
|
|
13
|
+
import { ICON_EDIT_MODE, ICON_SHIFT_MODE } from './mode-icons'
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
class ComponentToolbar extends LitElement {
|
|
15
|
+
export class ComponentToolbar extends ScopedElementsMixin(LitElement) {
|
|
16
16
|
static styles = [
|
|
17
17
|
css`
|
|
18
18
|
:host {
|
|
@@ -96,6 +96,12 @@ class ComponentToolbar extends LitElement {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
static get scopedElements() {
|
|
100
|
+
return {
|
|
101
|
+
'component-menu': ComponentMenu
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
99
105
|
render() {
|
|
100
106
|
const componentList = this.componentGroupList || []
|
|
101
107
|
const modeIcon = this.icons[this.mode === SCENE_MODE.SHIFT ? 'mode-shift' : 'mode-edit']
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { html, LitElement, PropertyValues } from 'lit'
|
|
6
|
-
import {
|
|
6
|
+
import { property, query, queryAll } from 'lit/decorators.js'
|
|
7
7
|
|
|
8
8
|
import { Component, Scene } from '@hatiolab/things-scene'
|
|
9
9
|
import { copyToClipboard, isMacOS } from '@operato/utils'
|
|
@@ -12,7 +12,6 @@ import { style } from './edit-toolbar-style'
|
|
|
12
12
|
|
|
13
13
|
const MACOS = isMacOS()
|
|
14
14
|
|
|
15
|
-
@customElement('edit-toolbar')
|
|
16
15
|
export class EditToolbar extends LitElement {
|
|
17
16
|
static styles = [style]
|
|
18
17
|
|
|
@@ -9,7 +9,7 @@ import '@operato/input/ox-input-code.js'
|
|
|
9
9
|
import '@operato/i18n/ox-i18n.js'
|
|
10
10
|
|
|
11
11
|
import { css, html, LitElement, PropertyValues } from 'lit'
|
|
12
|
-
import {
|
|
12
|
+
import { property, query, state } from 'lit/decorators.js'
|
|
13
13
|
|
|
14
14
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
15
15
|
|
|
@@ -39,8 +39,7 @@ Example:
|
|
|
39
39
|
</data-binding-mapper>
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
export default class DataBindingMapper extends LitElement {
|
|
42
|
+
export class DataBindingMapper extends LitElement {
|
|
44
43
|
static styles = [
|
|
45
44
|
css`
|
|
46
45
|
:host {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import './data-binding-mapper'
|
|
6
5
|
import '@material/mwc-icon'
|
|
7
6
|
import '@operato/help/ox-title-with-help.js'
|
|
8
7
|
import '@operato/input/ox-buttons-radio.js'
|
|
@@ -10,12 +9,14 @@ import '@operato/input/ox-input-data.js'
|
|
|
10
9
|
import '@operato/i18n/ox-i18n.js'
|
|
11
10
|
|
|
12
11
|
import { css, html, PropertyValues } from 'lit'
|
|
13
|
-
import {
|
|
12
|
+
import { property, query, state } from 'lit/decorators.js'
|
|
14
13
|
|
|
15
14
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
15
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
16
16
|
|
|
17
|
-
import { AbstractProperty } from '../abstract-property'
|
|
18
|
-
import { PropertySharedStyle } from '../property-shared-style'
|
|
17
|
+
import { AbstractProperty } from '../abstract-property.js'
|
|
18
|
+
import { PropertySharedStyle } from '../property-shared-style.js'
|
|
19
|
+
import { DataBindingMapper } from './data-binding-mapper.js'
|
|
19
20
|
|
|
20
21
|
var clipboard = '{}'
|
|
21
22
|
|
|
@@ -43,8 +44,7 @@ const PROPS = [
|
|
|
43
44
|
return typeof prop == 'string' ? { name: prop, label: prop } : { name: prop[0], label: prop[1] }
|
|
44
45
|
})
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
class PropertyDataBinding extends AbstractProperty {
|
|
47
|
+
export class PropertyDataBinding extends ScopedElementsMixin(AbstractProperty) {
|
|
48
48
|
static styles = [
|
|
49
49
|
PropertySharedStyle,
|
|
50
50
|
css`
|
|
@@ -194,6 +194,12 @@ class PropertyDataBinding extends AbstractProperty {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
static get scopedElements() {
|
|
198
|
+
return {
|
|
199
|
+
'data-binding-mapper': DataBindingMapper
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
197
203
|
render() {
|
|
198
204
|
const value = this.value || {
|
|
199
205
|
mappings: []
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import './property-animations'
|
|
6
|
-
import './property-event'
|
|
7
|
-
import './property-shadow'
|
|
8
5
|
import '@operato/i18n/ox-i18n.js'
|
|
9
6
|
import '@operato/help/ox-title-with-help.js'
|
|
10
7
|
|
|
11
8
|
import { html } from 'lit'
|
|
12
|
-
import {
|
|
9
|
+
import { property } from 'lit/decorators.js'
|
|
13
10
|
|
|
14
11
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
12
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
15
13
|
|
|
16
|
-
import { AbstractProperty } from '../abstract-property'
|
|
17
|
-
import { PropertySharedStyle } from '../property-shared-style'
|
|
14
|
+
import { AbstractProperty } from '../abstract-property.js'
|
|
15
|
+
import { PropertySharedStyle } from '../property-shared-style.js'
|
|
16
|
+
import { PropertyAnimations } from './property-animations.js'
|
|
17
|
+
import { PropertyEvent } from './property-event.js'
|
|
18
|
+
import { PropertyShadow } from './property-shadow.js'
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
class PropertyEffects extends AbstractProperty {
|
|
20
|
+
export class PropertyEffects extends ScopedElementsMixin(AbstractProperty) {
|
|
21
21
|
static styles = [PropertySharedStyle]
|
|
22
22
|
|
|
23
23
|
@property({ type: Object }) value?: Properties
|
|
@@ -27,6 +27,14 @@ class PropertyEffects extends AbstractProperty {
|
|
|
27
27
|
this.renderRoot.addEventListener('change', this._onValueChange.bind(this))
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
static get scopedElements() {
|
|
31
|
+
return {
|
|
32
|
+
'property-shadow': PropertyShadow,
|
|
33
|
+
'property-animations': PropertyAnimations,
|
|
34
|
+
'property-event': PropertyEvent
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
30
38
|
render() {
|
|
31
39
|
const value = this.value || {}
|
|
32
40
|
|
|
@@ -6,12 +6,12 @@ import '@operato/input/ox-input-angle.js'
|
|
|
6
6
|
import '@operato/i18n/ox-i18n.js'
|
|
7
7
|
|
|
8
8
|
import { html, LitElement } from 'lit'
|
|
9
|
-
import {
|
|
9
|
+
import { property } from 'lit/decorators.js'
|
|
10
10
|
|
|
11
11
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
12
12
|
|
|
13
|
-
import { EffectsSharedStyle } from './effects-shared-style'
|
|
14
|
-
import { convert } from './value-converter'
|
|
13
|
+
import { EffectsSharedStyle } from './effects-shared-style.js'
|
|
14
|
+
import { convert } from './value-converter.js'
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* 컴포넌트의 animation 속성을 편집하는 element
|
|
@@ -22,8 +22,7 @@ Example:
|
|
|
22
22
|
</property-animation>
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
export default class PropertyAnimation extends LitElement {
|
|
25
|
+
export class PropertyAnimation extends LitElement {
|
|
27
26
|
static styles = [EffectsSharedStyle]
|
|
28
27
|
|
|
29
28
|
@property({ type: Object }) value?: Properties
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import './property-animation'
|
|
6
5
|
import '@material/mwc-icon'
|
|
7
6
|
import '@operato/help/ox-title-with-help.js'
|
|
8
7
|
|
|
9
8
|
import { css, html, LitElement } from 'lit'
|
|
10
|
-
import {
|
|
9
|
+
import { property, state } from 'lit/decorators.js'
|
|
11
10
|
|
|
12
11
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
12
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
13
13
|
|
|
14
|
-
import { PropertySharedStyle } from '../property-shared-style'
|
|
15
|
-
import {
|
|
14
|
+
import { PropertySharedStyle } from '../property-shared-style.js'
|
|
15
|
+
import { PropertyAnimation } from './property-animation.js'
|
|
16
|
+
import { convert } from './value-converter.js'
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
class PropertyAnimations extends LitElement {
|
|
18
|
+
export class PropertyAnimations extends ScopedElementsMixin(LitElement) {
|
|
19
19
|
static styles = [
|
|
20
20
|
PropertySharedStyle,
|
|
21
21
|
css`
|
|
@@ -46,6 +46,12 @@ class PropertyAnimations extends LitElement {
|
|
|
46
46
|
this.renderRoot.addEventListener('change', this._onValueChange.bind(this))
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
static get scopedElements() {
|
|
50
|
+
return {
|
|
51
|
+
'property-animation': PropertyAnimation
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
49
55
|
render() {
|
|
50
56
|
const value = this.value || {}
|
|
51
57
|
|
|
@@ -6,15 +6,14 @@ import '@operato/input/ox-input-data.js'
|
|
|
6
6
|
import '@operato/i18n/ox-i18n.js'
|
|
7
7
|
|
|
8
8
|
import { html, LitElement } from 'lit'
|
|
9
|
-
import {
|
|
9
|
+
import { property } from 'lit/decorators.js'
|
|
10
10
|
|
|
11
11
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
12
12
|
|
|
13
|
-
import { EffectsSharedStyle } from './effects-shared-style'
|
|
13
|
+
import { EffectsSharedStyle } from './effects-shared-style.js'
|
|
14
14
|
import { convert } from './value-converter'
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
class PropertyEventHover extends LitElement {
|
|
16
|
+
export class PropertyEventHover extends LitElement {
|
|
18
17
|
static styles = [EffectsSharedStyle]
|
|
19
18
|
|
|
20
19
|
@property({ type: Object }) value?: Properties
|
|
@@ -6,7 +6,7 @@ import '@operato/input/ox-input-data.js'
|
|
|
6
6
|
import '@operato/i18n/ox-i18n.js'
|
|
7
7
|
|
|
8
8
|
import { html, LitElement } from 'lit'
|
|
9
|
-
import {
|
|
9
|
+
import { property, state } from 'lit/decorators.js'
|
|
10
10
|
|
|
11
11
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
12
12
|
|
|
@@ -14,8 +14,7 @@ import { scenarios } from '../../../graphql/scenario'
|
|
|
14
14
|
import { EffectsSharedStyle } from './effects-shared-style'
|
|
15
15
|
import { convert } from './value-converter'
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
class PropertyEventTap extends LitElement {
|
|
17
|
+
export class PropertyEventTap extends LitElement {
|
|
19
18
|
static styles = [EffectsSharedStyle]
|
|
20
19
|
|
|
21
20
|
@property({ type: Object }) value?: Properties
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import './property-event-hover'
|
|
6
|
-
import './property-event-tap'
|
|
7
5
|
import '@operato/help/ox-title-with-help.js'
|
|
8
6
|
|
|
9
7
|
import { html, LitElement } from 'lit'
|
|
10
|
-
import {
|
|
8
|
+
import { property } from 'lit/decorators.js'
|
|
11
9
|
|
|
12
10
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
11
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
13
12
|
|
|
14
13
|
import { PropertySharedStyle } from '../property-shared-style'
|
|
14
|
+
import { PropertyEventHover } from './property-event-hover'
|
|
15
|
+
import { PropertyEventTap } from './property-event-tap'
|
|
15
16
|
import { convert } from './value-converter'
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
class PropertyEvent extends LitElement {
|
|
18
|
+
export class PropertyEvent extends ScopedElementsMixin(LitElement) {
|
|
19
19
|
static styles = [PropertySharedStyle]
|
|
20
20
|
|
|
21
21
|
@property({ type: Object }) value?: Properties
|
|
@@ -25,6 +25,13 @@ class PropertyEvent extends LitElement {
|
|
|
25
25
|
this.renderRoot.addEventListener('change', this._onValueChange.bind(this))
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
static get scopedElements() {
|
|
29
|
+
return {
|
|
30
|
+
'property-event-hover': PropertyEventHover,
|
|
31
|
+
'property-event-tap': PropertyEventTap
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
render() {
|
|
29
36
|
const value = this.value || {}
|
|
30
37
|
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
import '@operato/i18n/ox-i18n.js'
|
|
6
6
|
import '@operato/input/ox-input-color.js'
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { css, html, LitElement } from 'lit'
|
|
9
|
+
import { property } from 'lit/decorators.js'
|
|
10
10
|
|
|
11
11
|
import { Properties } from '@hatiolab/things-scene'
|
|
12
|
+
|
|
12
13
|
import { convert } from './value-converter'
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -21,8 +22,7 @@ import { convert } from './value-converter'
|
|
|
21
22
|
* ></property-shadow>
|
|
22
23
|
*/
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
export default class PropertyShadow extends LitElement {
|
|
25
|
+
export class PropertyShadow extends LitElement {
|
|
26
26
|
static styles = [
|
|
27
27
|
css`
|
|
28
28
|
:host {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { css, html, LitElement, PropertyValues, TemplateResult } from 'lit'
|
|
2
|
-
import {
|
|
2
|
+
import { property } from 'lit/decorators.js'
|
|
3
3
|
import Sortable from 'sortablejs'
|
|
4
4
|
|
|
5
5
|
import { Component, Container, Scene } from '@hatiolab/things-scene'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
export default class SceneInspector extends LitElement {
|
|
7
|
+
export class SceneInspector extends LitElement {
|
|
9
8
|
static styles = [
|
|
10
9
|
css`
|
|
11
10
|
:host {
|
|
@@ -3,22 +3,23 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import '@material/mwc-icon'
|
|
6
|
-
import './shapes/shapes'
|
|
7
|
-
import './styles/styles'
|
|
8
|
-
import './effects/effects'
|
|
9
|
-
import './specifics/specifics'
|
|
10
|
-
import './data-binding/data-binding'
|
|
11
|
-
import './inspector/inspector'
|
|
12
6
|
|
|
13
7
|
import { css, html, LitElement, PropertyValues } from 'lit'
|
|
14
|
-
import {
|
|
8
|
+
import { property } from 'lit/decorators.js'
|
|
15
9
|
import deepClone from 'lodash-es/cloneDeep'
|
|
16
10
|
|
|
17
11
|
import { BOUNDS, Component, Model, Scene } from '@hatiolab/things-scene'
|
|
12
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
18
13
|
import { ScrollbarStyles } from '@operato/styles'
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
import { PropertyDataBinding } from './data-binding/data-binding.js'
|
|
16
|
+
import { PropertyEffects } from './effects/effects.js'
|
|
17
|
+
import { SceneInspector } from './inspector/inspector'
|
|
18
|
+
import { PropertyShapes } from './shapes/shapes.js'
|
|
19
|
+
import { PropertySpecific } from './specifics/specifics.js'
|
|
20
|
+
import { PropertyStyles } from './styles/styles.js'
|
|
21
|
+
|
|
22
|
+
export class PropertySidebar extends ScopedElementsMixin(LitElement) {
|
|
22
23
|
static styles = [
|
|
23
24
|
ScrollbarStyles,
|
|
24
25
|
css`
|
|
@@ -93,6 +94,17 @@ class PropertySidebar extends LitElement {
|
|
|
93
94
|
change.has('collapsed') && this._onCollapsed(this.collapsed)
|
|
94
95
|
}
|
|
95
96
|
|
|
97
|
+
static get scopedElements() {
|
|
98
|
+
return {
|
|
99
|
+
'property-shape': PropertyShapes,
|
|
100
|
+
'property-style': PropertyStyles,
|
|
101
|
+
'property-effect': PropertyEffects,
|
|
102
|
+
'property-specific': PropertySpecific,
|
|
103
|
+
'property-data-binding': PropertyDataBinding,
|
|
104
|
+
'scene-inspector': SceneInspector
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
96
108
|
render() {
|
|
97
109
|
var tabName = this.tabName ? this.tabName : 'shape'
|
|
98
110
|
|
|
@@ -9,7 +9,7 @@ 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 {
|
|
12
|
+
import { property, state } from 'lit/decorators.js'
|
|
13
13
|
|
|
14
14
|
import { BOUNDS, Component, Properties } from '@hatiolab/things-scene'
|
|
15
15
|
|
|
@@ -17,8 +17,7 @@ import { AbstractProperty } from '../abstract-property'
|
|
|
17
17
|
import { PropertySharedStyle } from '../property-shared-style'
|
|
18
18
|
import { BoxPaddingEditorStyles } from './box-padding-editor-styles'
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
class PropertyShapes extends AbstractProperty {
|
|
20
|
+
export class PropertyShapes extends AbstractProperty {
|
|
22
21
|
static styles = [
|
|
23
22
|
PropertySharedStyle,
|
|
24
23
|
BoxPaddingEditorStyles,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import '@operato/app/property-editor.js' /* for registering property editors */
|
|
6
6
|
|
|
7
7
|
import { html, LitElement, PropertyValues } from 'lit'
|
|
8
|
-
import {
|
|
8
|
+
import { property } from 'lit/decorators.js'
|
|
9
9
|
|
|
10
10
|
import { Properties } from '@hatiolab/things-scene'
|
|
11
11
|
import { OxPropertyEditor, PropertySpec } from '@operato/property-editor'
|
|
@@ -57,8 +57,7 @@ function convertValue(type: string, value: any) {
|
|
|
57
57
|
return converted
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
class SpecificPropertiesBuilder extends LitElement {
|
|
60
|
+
export class SpecificPropertiesBuilder extends LitElement {
|
|
62
61
|
@property({ type: Object }) value: any
|
|
63
62
|
@property({ type: Array }) props: any[] = []
|
|
64
63
|
@property({ type: Object }) propertyEditor: any
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import '@operato/help/ox-help-icon.js'
|
|
6
|
-
import './specific-properties-builder'
|
|
7
6
|
|
|
8
7
|
import { css, html, LitElement } from 'lit'
|
|
9
|
-
import {
|
|
8
|
+
import { property } from 'lit/decorators.js'
|
|
10
9
|
|
|
11
10
|
import { Component, Scene } from '@hatiolab/things-scene'
|
|
11
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
12
12
|
|
|
13
13
|
import { PropertySharedStyle } from '../property-shared-style'
|
|
14
|
+
import { SpecificPropertiesBuilder } from './specific-properties-builder.js'
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
class PropertySpecific extends LitElement {
|
|
16
|
+
export class PropertySpecific extends ScopedElementsMixin(LitElement) {
|
|
17
17
|
static styles = [
|
|
18
18
|
PropertySharedStyle,
|
|
19
19
|
css`
|
|
@@ -48,7 +48,11 @@ class PropertySpecific extends LitElement {
|
|
|
48
48
|
|
|
49
49
|
this.removeEventListener('i-need-selected', this.boundINeedSelected)
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
static get scopedElements() {
|
|
52
|
+
return {
|
|
53
|
+
'specific-properties-builder': SpecificPropertiesBuilder
|
|
54
|
+
}
|
|
55
|
+
}
|
|
52
56
|
render() {
|
|
53
57
|
const selected = this.selected && this.selected[0]
|
|
54
58
|
const value = this.value || {}
|
|
@@ -11,14 +11,14 @@ import '@operato/font/ox-font-selector.js'
|
|
|
11
11
|
import '@operato/i18n/ox-i18n.js'
|
|
12
12
|
|
|
13
13
|
import { css, html } from 'lit'
|
|
14
|
-
import {
|
|
14
|
+
import { property } from 'lit/decorators.js'
|
|
15
15
|
|
|
16
|
-
import { AbstractProperty } from '../abstract-property'
|
|
17
16
|
import { Component } from '@hatiolab/things-scene'
|
|
18
|
-
import { PropertySharedStyle } from '../property-shared-style'
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
import { AbstractProperty } from '../abstract-property.js'
|
|
19
|
+
import { PropertySharedStyle } from '../property-shared-style.js'
|
|
20
|
+
|
|
21
|
+
export class PropertyStyles extends AbstractProperty {
|
|
22
22
|
static styles = [
|
|
23
23
|
PropertySharedStyle,
|
|
24
24
|
css`
|
package/src/ox-board-modeller.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import '@material/mwc-fab'
|
|
2
2
|
import './modeller/scene-viewer/ox-scene-viewer'
|
|
3
|
-
import './modeller/component-toolbar/component-toolbar'
|
|
4
|
-
import './modeller/property-sidebar/property-sidebar'
|
|
5
|
-
import './modeller/edit-toolbar'
|
|
6
3
|
import '@hatiolab/things-scene'
|
|
7
4
|
import './ox-board-viewer'
|
|
8
5
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { SCENE_MODE, Scene } from '@hatiolab/things-scene'
|
|
6
|
+
import { saveAs } from 'file-saver'
|
|
7
|
+
import { css, html, LitElement } from 'lit'
|
|
12
8
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
9
|
+
|
|
10
|
+
import { Scene, SCENE_MODE } from '@hatiolab/things-scene'
|
|
11
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
12
|
+
import { OxPopup } from '@operato/popup'
|
|
13
13
|
import { isMacOS, togglefullscreen } from '@operato/utils'
|
|
14
14
|
|
|
15
|
+
import { ComponentToolbar } from './modeller/component-toolbar/component-toolbar'
|
|
15
16
|
import { EditToolbar } from './modeller/edit-toolbar'
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
17
|
+
import { PropertySidebar } from './modeller/property-sidebar/property-sidebar'
|
|
18
|
+
import { ComponentGroup, ComponentTemplate } from './types'
|
|
18
19
|
|
|
19
20
|
const MACOS = isMacOS()
|
|
20
21
|
|
|
@@ -34,7 +35,7 @@ const ICON_SHELL_INSPECTOR = new URL('../../icons/icon-shell-inspector.png', imp
|
|
|
34
35
|
var Registry: ComponentGroup[] = []
|
|
35
36
|
|
|
36
37
|
@customElement('ox-board-modeller')
|
|
37
|
-
export class BoardModeller extends LitElement {
|
|
38
|
+
export class BoardModeller extends ScopedElementsMixin(LitElement) {
|
|
38
39
|
static styles = [
|
|
39
40
|
css`
|
|
40
41
|
:host {
|
|
@@ -193,6 +194,14 @@ export class BoardModeller extends LitElement {
|
|
|
193
194
|
this.style.setProperty('--url-icon-shell-inspector', `url(${ICON_SHELL_INSPECTOR})`)
|
|
194
195
|
}
|
|
195
196
|
|
|
197
|
+
static get scopedElements() {
|
|
198
|
+
return {
|
|
199
|
+
'edit-toolbar': EditToolbar,
|
|
200
|
+
'property-sidebar': PropertySidebar,
|
|
201
|
+
'component-toolbar': ComponentToolbar
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
196
205
|
render() {
|
|
197
206
|
return html`
|
|
198
207
|
<edit-toolbar
|