@operato/board 0.2.52 → 0.3.7
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 +76 -0
- package/custom-elements.json +2565 -2474
- package/demo/index.html +3 -3
- package/dist/src/component/container.js +2 -2
- package/dist/src/component/container.js.map +1 -1
- package/dist/src/component/etc.js +3 -3
- package/dist/src/component/etc.js.map +1 -1
- package/dist/src/component/line.js +5 -5
- package/dist/src/component/line.js.map +1 -1
- package/dist/src/component/shape.js +6 -6
- package/dist/src/component/shape.js.map +1 -1
- package/dist/src/component/text-and-media.js +5 -5
- package/dist/src/component/text-and-media.js.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.js +2 -2
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.js +35 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
- package/dist/src/modeller/component-toolbar/mode-icons.d.ts +2 -0
- package/dist/src/modeller/component-toolbar/mode-icons.js +86 -0
- package/dist/src/modeller/component-toolbar/mode-icons.js.map +1 -0
- package/dist/src/modeller/edit-toolbar-style.js +4 -4
- package/dist/src/modeller/edit-toolbar-style.js.map +1 -1
- package/dist/src/modeller/edit-toolbar.d.ts +1 -1
- package/dist/src/modeller/edit-toolbar.js +1 -1
- package/dist/src/modeller/edit-toolbar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +2 -2
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +4 -5
- 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 +2 -2
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +3 -3
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.js +2 -2
- 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 +2 -2
- package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.js +2 -2
- 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 +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +3 -3
- 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 +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +3 -3
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event.js +2 -2
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js +2 -2
- 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 -3
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-shared-style.js +1 -1
- package/dist/src/modeller/property-sidebar/property-shared-style.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-sidebar.js +2 -2
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js +1 -1
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +2 -2
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +5 -5
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +10 -7
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.js +5 -5
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
- package/dist/src/ox-board-list.d.ts +1 -1
- package/dist/src/ox-board-list.js +4 -4
- package/dist/src/ox-board-list.js.map +1 -1
- package/dist/src/ox-board-modeller.d.ts +2 -2
- package/dist/src/ox-board-modeller.js +23 -3
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/{assets/images → icons}/components/audio.png +0 -0
- package/{assets/images → icons}/components/both-arrow.png +0 -0
- package/{assets/images → icons}/components/color-image.png +0 -0
- package/{assets/images → icons}/components/container.png +0 -0
- package/{assets/images → icons}/components/dash.png +0 -0
- package/{assets/images → icons}/components/donut.png +0 -0
- package/{assets/images → icons}/components/ellipse.png +0 -0
- package/{assets/images → icons}/components/forklift.png +0 -0
- package/{assets/images → icons}/components/gif-image.png +0 -0
- package/{assets/images → icons}/components/global-reference.png +0 -0
- package/{assets/images → icons}/components/gray-image.png +0 -0
- package/{assets/images → icons}/components/humidity-sensor.png +0 -0
- package/{assets/images → icons}/components/info-window.png +0 -0
- package/{assets/images → icons}/components/line.png +0 -0
- package/{assets/images → icons}/components/local-reference.png +0 -0
- package/{assets/images → icons}/components/no-image.png +0 -0
- package/{assets/images → icons}/components/person.png +0 -0
- package/{assets/images → icons}/components/polygon.png +0 -0
- package/{assets/images → icons}/components/polyline.png +0 -0
- package/{assets/images → icons}/components/popup.png +0 -0
- package/{assets/images → icons}/components/rect.png +0 -0
- package/{assets/images → icons}/components/single-arrow.png +0 -0
- package/{assets/images → icons}/components/star.png +0 -0
- package/{assets/images → icons}/components/text.png +0 -0
- package/{assets/images → icons}/components/triangle.png +0 -0
- package/icons/icon-collapse-active.png +0 -0
- package/icons/icon-collapse.png +0 -0
- package/icons/icon-fullscreen.png +0 -0
- package/icons/icon-htoolbar.png +0 -0
- package/icons/icon-properties-arrow-type.png +0 -0
- package/icons/icon-properties-gradient-direction.png +0 -0
- package/icons/icon-properties-label.png +0 -0
- package/icons/icon-properties-line-type.png +0 -0
- package/icons/icon-properties-padding.png +0 -0
- package/icons/icon-properties-ratio.png +0 -0
- package/icons/icon-properties-table.png +0 -0
- package/icons/icon-properties.png +0 -0
- package/icons/icon-shell-inspector.png +0 -0
- package/package.json +21 -14
- package/src/component/container.ts +3 -2
- package/src/component/etc.ts +4 -3
- package/src/component/line.ts +6 -5
- package/src/component/shape.ts +7 -6
- package/src/component/text-and-media.ts +6 -5
- package/src/index.ts +5 -0
- package/src/modeller/component-toolbar/component-menu.ts +5 -3
- package/src/modeller/component-toolbar/component-toolbar.ts +39 -1
- package/src/modeller/component-toolbar/mode-icons.ts +86 -0
- package/src/modeller/edit-toolbar-style.ts +4 -4
- package/src/modeller/edit-toolbar.ts +3 -2
- package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +5 -5
- package/src/modeller/property-sidebar/data-binding/data-binding.ts +5 -4
- package/src/modeller/property-sidebar/effects/effects.ts +2 -3
- package/src/modeller/property-sidebar/effects/property-animation.ts +2 -2
- package/src/modeller/property-sidebar/effects/property-animations.ts +2 -3
- package/src/modeller/property-sidebar/effects/property-event-hover.ts +4 -3
- package/src/modeller/property-sidebar/effects/property-event-tap.ts +4 -3
- package/src/modeller/property-sidebar/effects/property-event.ts +2 -3
- package/src/modeller/property-sidebar/effects/property-shadow.ts +2 -2
- package/src/modeller/property-sidebar/inspector/inspector.ts +5 -5
- package/src/modeller/property-sidebar/property-shared-style.ts +1 -1
- package/src/modeller/property-sidebar/property-sidebar.ts +3 -3
- package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +1 -1
- package/src/modeller/property-sidebar/shapes/shapes.ts +5 -5
- package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +12 -8
- package/src/modeller/property-sidebar/styles/styles.ts +5 -5
- package/src/ox-board-list.ts +7 -7
- package/src/ox-board-modeller.ts +32 -5
- package/tsconfig.json +1 -0
- package/web-dev-server.config.mjs +2 -0
- package/yarn-error.log +18355 -0
- package/@types/global/index.d.ts +0 -1
- package/assets/images/icon-vtoolbar.png +0 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/board",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
"directory": "webcomponents/board"
|
|
17
17
|
},
|
|
18
18
|
"exports": {
|
|
19
|
-
"
|
|
20
|
-
"./ox-board-
|
|
21
|
-
"./ox-board-
|
|
19
|
+
".": "./dist/src/index.js",
|
|
20
|
+
"./ox-board-list.js": "./dist/src/ox-board-list.js",
|
|
21
|
+
"./ox-board-viewer.js": "./dist/src/ox-board-viewer.js",
|
|
22
|
+
"./ox-board-player.js": "./dist/src/ox-board-player.js",
|
|
23
|
+
"./ox-board-modeller.js": "./dist/src/ox-board-modeller.js",
|
|
24
|
+
"./register-default-groups.js": "./dist/src/component/register-default-groups.js"
|
|
22
25
|
},
|
|
23
26
|
"typesVersions": {
|
|
24
27
|
"*": {
|
|
@@ -46,14 +49,16 @@
|
|
|
46
49
|
"storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
|
|
47
50
|
},
|
|
48
51
|
"dependencies": {
|
|
49
|
-
"@operato/data-grist": "^0.
|
|
50
|
-
"@operato/graphql": "^0.
|
|
51
|
-
"@operato/input": "^0.
|
|
52
|
-
"@operato/
|
|
53
|
-
"@operato/
|
|
54
|
-
"@operato/
|
|
55
|
-
"@operato/
|
|
56
|
-
"@
|
|
52
|
+
"@operato/data-grist": "^0.3.7",
|
|
53
|
+
"@operato/graphql": "^0.3.7",
|
|
54
|
+
"@operato/input": "^0.3.7",
|
|
55
|
+
"@operato/markdown": "^0.3.7",
|
|
56
|
+
"@operato/popup": "^0.3.7",
|
|
57
|
+
"@operato/property-editor": "^0.3.7",
|
|
58
|
+
"@operato/styles": "^0.3.7",
|
|
59
|
+
"@polymer/paper-dropdown-menu": "^3.2.0",
|
|
60
|
+
"@things-factory/help": "^4.0.27",
|
|
61
|
+
"@things-factory/modeller-ui": "^4.0.27",
|
|
57
62
|
"@types/file-saver": "^2.0.4",
|
|
58
63
|
"@types/sortablejs": "^1.10.7",
|
|
59
64
|
"file-saver": "^2.0.5",
|
|
@@ -65,11 +70,13 @@
|
|
|
65
70
|
"devDependencies": {
|
|
66
71
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
67
72
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
68
|
-
"@hatiolab/things-scene": "^2.7.
|
|
73
|
+
"@hatiolab/things-scene": "^2.7.31",
|
|
69
74
|
"@material/mwc-fab": "^0.25.3",
|
|
70
75
|
"@material/mwc-icon": "^0.25.3",
|
|
71
76
|
"@open-wc/eslint-config": "^4.3.0",
|
|
72
77
|
"@open-wc/testing": "next",
|
|
78
|
+
"@rollup/plugin-image": "^2.1.1",
|
|
79
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
73
80
|
"@types/bwip-js": "^2.1.1",
|
|
74
81
|
"@types/w3c-web-usb": "^1.0.5",
|
|
75
82
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
@@ -99,5 +106,5 @@
|
|
|
99
106
|
"prettier --write"
|
|
100
107
|
]
|
|
101
108
|
},
|
|
102
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "4cc91580b763e2f4f38d95cadef5b18509393bc6"
|
|
103
110
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentGroup } from '../types'
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
const iconContainer = new URL('../../../icons/components/container.png', import.meta.url).href
|
|
4
|
+
const popup = new URL('../../../icons/components/popup.png', import.meta.url).href
|
|
4
5
|
|
|
5
6
|
const icon = `
|
|
6
7
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
package/src/component/etc.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentGroup } from '../types'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
const globalReference = new URL('../../../icons/components/global-reference.png', import.meta.url).href
|
|
4
|
+
const infoWindow = new URL('../../../icons/components/info-window.png', import.meta.url).href
|
|
5
|
+
const localReference = new URL('../../../icons/components/local-reference.png', import.meta.url).href
|
|
5
6
|
|
|
6
7
|
const icon = `
|
|
7
8
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
package/src/component/line.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ComponentGroup } from '../types'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
const bothArrow = new URL('../../../icons/components/both-arrow.png', import.meta.url).href
|
|
4
|
+
const dash = new URL('../../../icons/components/dash.png', import.meta.url).href
|
|
5
|
+
const lineIcon = new URL('../../../icons/components/line.png', import.meta.url).href
|
|
6
|
+
const polyline = new URL('../../../icons/components/polyline.png', import.meta.url).href
|
|
7
|
+
const singleArrow = new URL('../../../icons/components/single-arrow.png', import.meta.url).href
|
|
7
8
|
|
|
8
9
|
const icon = `
|
|
9
10
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
package/src/component/shape.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ComponentGroup } from '../types'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
|
|
3
|
+
const donut = new URL('../../../icons/components/donut.png', import.meta.url).href
|
|
4
|
+
const ellipse = new URL('../../../icons/components/ellipse.png', import.meta.url).href
|
|
5
|
+
const polygon = new URL('../../../icons/components/polygon.png', import.meta.url).href
|
|
6
|
+
const rect = new URL('../../../icons/components/rect.png', import.meta.url).href
|
|
7
|
+
const star = new URL('../../../icons/components/star.png', import.meta.url).href
|
|
8
|
+
const triangle = new URL('../../../icons/components/triangle.png', import.meta.url).href
|
|
8
9
|
|
|
9
10
|
const icon = `
|
|
10
11
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ComponentGroup } from '../types'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
const audio = new URL('../../../icons/components/audio.png', import.meta.url).href
|
|
4
|
+
const colorImage = new URL('../../../icons/components/color-image.png', import.meta.url).href
|
|
5
|
+
const gifImage = new URL('../../../icons/components/gif-image.png', import.meta.url).href
|
|
6
|
+
const grayImage = new URL('../../../icons/components/gray-image.png', import.meta.url).href
|
|
7
|
+
const text = new URL('../../../icons/components/text.png', import.meta.url).href
|
|
7
8
|
|
|
8
9
|
const icon = `
|
|
9
10
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
package/src/index.ts
CHANGED
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import './component-detail'
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { Pallet, PalletItem } from '../../types'
|
|
7
|
+
import { css, html, LitElement, PropertyValues } from 'lit'
|
|
9
8
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
10
9
|
|
|
11
10
|
import { Scene } from '@hatiolab/things-scene'
|
|
12
11
|
import { ScrollbarStyles } from '@operato/styles'
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
import { Pallet, PalletItem } from '../../types'
|
|
14
|
+
|
|
15
|
+
const noImage = new URL('../../../../icons/components/no-image.png', import.meta.url).href
|
|
14
16
|
|
|
15
17
|
@customElement('component-menu')
|
|
16
18
|
class ComponentMenu extends LitElement {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import './component-menu'
|
|
6
6
|
|
|
7
|
+
import { ICON_EDIT_MODE, ICON_SHIFT_MODE } from './mode-icons'
|
|
7
8
|
import { LitElement, PropertyValues, css, html } from 'lit'
|
|
8
9
|
import { SCENE_MODE, Scene } from '@hatiolab/things-scene'
|
|
9
10
|
import { customElement, property, query, queryAll } from 'lit/decorators.js'
|
|
@@ -37,6 +38,10 @@ class ComponentToolbar extends LitElement {
|
|
|
37
38
|
box-sizing: border-box;
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
#shift[active] {
|
|
42
|
+
background-color: #beb9b3;
|
|
43
|
+
}
|
|
44
|
+
|
|
40
45
|
component-menu {
|
|
41
46
|
position: absolute;
|
|
42
47
|
top: 0;
|
|
@@ -54,8 +59,9 @@ class ComponentToolbar extends LitElement {
|
|
|
54
59
|
@property({ type: Array }) componentGroupList: ComponentGroup[] = []
|
|
55
60
|
@property({ type: String }) group?: string | null
|
|
56
61
|
@property({ type: Object }) scene!: Scene
|
|
57
|
-
@property({ type: Number }) mode: SCENE_MODE = SCENE_MODE.
|
|
62
|
+
@property({ type: Number }) mode: SCENE_MODE = SCENE_MODE.EDIT
|
|
58
63
|
|
|
64
|
+
@query('#shift') shift!: HTMLImageElement
|
|
59
65
|
@query('component-menu') private menu!: HTMLElement
|
|
60
66
|
@queryAll('[data-group]') private groups!: NodeListOf<HTMLElement>
|
|
61
67
|
|
|
@@ -72,6 +78,11 @@ class ComponentToolbar extends LitElement {
|
|
|
72
78
|
'data:image/svg+xml;charset=UTF-8;base64,' + btoa(group.icon.replace(/{{strokeColor}}/g, color))
|
|
73
79
|
return sum
|
|
74
80
|
}, {} as { [name: string]: string })
|
|
81
|
+
|
|
82
|
+
this.icons['mode-edit'] =
|
|
83
|
+
'data:image/svg+xml;charset=UTF-8;base64,' + btoa(ICON_EDIT_MODE.replace(/{{strokeColor}}/g, color))
|
|
84
|
+
this.icons['mode-shift'] =
|
|
85
|
+
'data:image/svg+xml;charset=UTF-8;base64,' + btoa(ICON_SHIFT_MODE.replace(/{{strokeColor}}/g, color))
|
|
75
86
|
}
|
|
76
87
|
|
|
77
88
|
if (changes.has('group')) {
|
|
@@ -87,8 +98,11 @@ class ComponentToolbar extends LitElement {
|
|
|
87
98
|
|
|
88
99
|
render() {
|
|
89
100
|
const componentList = this.componentGroupList || []
|
|
101
|
+
const modeIcon = this.icons[this.mode === SCENE_MODE.EDIT ? 'mode-edit' : 'mode-shift']
|
|
90
102
|
|
|
91
103
|
return html`
|
|
104
|
+
<img id="shift" .src=${modeIcon} @click=${(e: MouseEvent) => this._onClickShift(e)} />
|
|
105
|
+
|
|
92
106
|
${componentList
|
|
93
107
|
.filter(group => group.templates?.length > 0)
|
|
94
108
|
.map(
|
|
@@ -115,6 +129,30 @@ class ComponentToolbar extends LitElement {
|
|
|
115
129
|
`
|
|
116
130
|
}
|
|
117
131
|
|
|
132
|
+
_setMode(mode: SCENE_MODE) {
|
|
133
|
+
this.mode = mode
|
|
134
|
+
|
|
135
|
+
this.dispatchEvent(
|
|
136
|
+
new CustomEvent('mode-changed', {
|
|
137
|
+
bubbles: true,
|
|
138
|
+
composed: true,
|
|
139
|
+
detail: { value: mode }
|
|
140
|
+
})
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
_onClickShift(e: MouseEvent) {
|
|
145
|
+
const shift = this.shift
|
|
146
|
+
|
|
147
|
+
if (shift.hasAttribute('active')) {
|
|
148
|
+
shift.removeAttribute('active')
|
|
149
|
+
this._setMode(SCENE_MODE.EDIT)
|
|
150
|
+
} else {
|
|
151
|
+
shift.setAttribute('active', '')
|
|
152
|
+
this._setMode(SCENE_MODE.SHIFT)
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
118
156
|
async _onClickGroup(e: MouseEvent) {
|
|
119
157
|
var button = e.target as HTMLElement
|
|
120
158
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export const ICON_EDIT_MODE = `
|
|
2
|
+
<svg
|
|
3
|
+
version="1.1"
|
|
4
|
+
id="Layer_1"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
7
|
+
x="0px"
|
|
8
|
+
y="0px"
|
|
9
|
+
viewBox="0 0 30 30"
|
|
10
|
+
style="enable-background:new 0 0 30 30;"
|
|
11
|
+
xml:space="preserve"
|
|
12
|
+
>
|
|
13
|
+
<style type="text/css">
|
|
14
|
+
.st0 {
|
|
15
|
+
fill: {{strokeColor}};
|
|
16
|
+
}
|
|
17
|
+
.st1 {
|
|
18
|
+
fill: none;
|
|
19
|
+
stroke: {{strokeColor}};
|
|
20
|
+
stroke-width: 0.75;
|
|
21
|
+
stroke-linejoin: round;
|
|
22
|
+
stroke-miterlimit: 10;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
<g>
|
|
26
|
+
<polygon class="st0" points="2.7,3.9 2.7,22.8 7.8,17.2 16.1,16.9 " />
|
|
27
|
+
<path
|
|
28
|
+
class="st1"
|
|
29
|
+
d="M27.7,20.1L26.1,19c-0.1,0-0.2,0-0.2,0c0,0.1,0,0.2,0,0.2l1.2,0.9h-4.9v-5l0.9,1.2c0,0,0.1,0.1,0.1,0.1
|
|
30
|
+
c0,0,0.1,0,0.1,0c0.1,0,0.1-0.1,0-0.2l-1.1-1.6c-0.1-0.1-0.2-0.1-0.2,0L20.8,16c0,0.1,0,0.2,0,0.2s0.2,0,0.2,0l0.9-1.2v5h-5
|
|
31
|
+
l1.2-0.9c0.1,0,0.1-0.1,0-0.2c0-0.1-0.1-0.1-0.2,0l-1.6,1.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0.1,0.1,0.1l1.6,1.1c0,0,0.1,0,0.1,0
|
|
32
|
+
c0,0,0.1,0,0.1-0.1c0-0.1,0-0.2,0-0.2l-1.2-0.9h5v5L21,24.2c0-0.1-0.1-0.1-0.2,0c-0.1,0-0.1,0.1,0,0.2l1.1,1.6c0,0,0.1,0.1,0.1,0.1
|
|
33
|
+
s0.1,0,0.1-0.1l1.1-1.6c0-0.1,0-0.2,0-0.2c-0.1,0-0.2,0-0.2,0l-0.9,1.2v-5h4.9l-1.2,0.9c-0.1,0-0.1,0.1,0,0.2c0,0,0.1,0.1,0.1,0.1
|
|
34
|
+
c0,0,0.1,0,0.1,0l1.6-1.1c0,0,0.1-0.1,0.1-0.1C27.7,20.2,27.7,20.1,27.7,20.1z"
|
|
35
|
+
/>
|
|
36
|
+
</g>
|
|
37
|
+
</svg>
|
|
38
|
+
`
|
|
39
|
+
|
|
40
|
+
export const ICON_SHIFT_MODE = `
|
|
41
|
+
<svg
|
|
42
|
+
version="1.1"
|
|
43
|
+
id="Layer_1"
|
|
44
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
45
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
46
|
+
x="0px"
|
|
47
|
+
y="0px"
|
|
48
|
+
viewBox="0 0 30 30"
|
|
49
|
+
style="enable-background:new 0 0 30 30;"
|
|
50
|
+
xml:space="preserve"
|
|
51
|
+
>
|
|
52
|
+
<style type="text/css">
|
|
53
|
+
.st0 {
|
|
54
|
+
fill-rule: evenodd;
|
|
55
|
+
clip-rule: evenodd;
|
|
56
|
+
}
|
|
57
|
+
.st1 {
|
|
58
|
+
fill: {{strokeColor}};
|
|
59
|
+
stroke: {{strokeColor}};
|
|
60
|
+
stroke-width: 0.75;
|
|
61
|
+
stroke-linejoin: round;
|
|
62
|
+
stroke-miterlimit: 10;
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
65
|
+
<g>
|
|
66
|
+
<path
|
|
67
|
+
class="st0"
|
|
68
|
+
d="M7.8,23.2c1.6,0,3.8,0,5.7,0c0.8,0,1.3-0.3,1.6-1.2c0.4-2.9,1.5-4.9,2.4-6.9s1.4-2.5,1.6-3.4
|
|
69
|
+
c0.1-0.5,0.2-1.6-0.4-1.9c-0.6-0.3-1.2,0.1-1.9,1.3c-0.8,1.6-1,2-1.4,2c-0.3,0-0.1-4,0-5.4c0.1-1.3-0.6-1.8-1.3-1.8
|
|
70
|
+
c-0.8-0.1-1.5,0.4-1.5,1.5c0,1.5-0.2,5.2-0.7,5.2c-0.4,0-0.3-4.3-0.6-6.7c-0.1-1-0.6-1.8-1.5-1.8C9.1,4.2,8.4,4.7,8.3,5.8
|
|
71
|
+
c-0.1,1.3,1,6.7,0.5,6.7c-0.4,0-1.4-3.3-2.3-5.1C6,6.5,5.6,6,4.6,6.4C3.9,6.7,3.5,7.6,3.8,8.5c0.5,1.2,2.7,6.8,2.2,6.8
|
|
72
|
+
c-0.4,0-1.4-1.4-2.7-2.1c-1.1-0.6-1.8-0.4-2.1-0.1c-0.4,0.3-0.7,1,0.9,2.8c0.6,0.6,3.1,2.3,3.7,3.2c0.7,1.3,0.6,1,0.8,2.8
|
|
73
|
+
C6.7,22.7,7,23.2,7.8,23.2z"
|
|
74
|
+
/>
|
|
75
|
+
<path
|
|
76
|
+
class="st1"
|
|
77
|
+
d="M28.7,20.1L27.1,19c-0.1,0-0.2,0-0.2,0c0,0.1,0,0.2,0,0.2l1.2,0.9h-4.9v-5l0.9,1.2c0,0,0.1,0.1,0.1,0.1
|
|
78
|
+
c0,0,0.1,0,0.1,0c0.1,0,0.1-0.1,0-0.2l-1.1-1.6c-0.1-0.1-0.2-0.1-0.2,0L21.8,16c0,0.1,0,0.2,0,0.2s0.2,0,0.2,0l0.9-1.2v5h-5
|
|
79
|
+
l1.2-0.9c0.1,0,0.1-0.1,0-0.2c0-0.1-0.1-0.1-0.2,0l-1.6,1.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0.1,0.1,0.1l1.6,1.1c0,0,0.1,0,0.1,0
|
|
80
|
+
c0,0,0.1,0,0.1-0.1c0-0.1,0-0.2,0-0.2l-1.2-0.9h5v5L22,24.2c0-0.1-0.1-0.1-0.2,0c-0.1,0-0.1,0.1,0,0.2l1.1,1.6c0,0,0.1,0.1,0.1,0.1
|
|
81
|
+
s0.1,0,0.1-0.1l1.1-1.6c0-0.1,0-0.2,0-0.2c-0.1,0-0.2,0-0.2,0l-0.9,1.2v-5h4.9l-1.2,0.9c-0.1,0-0.1,0.1,0,0.2c0,0,0.1,0.1,0.1,0.1
|
|
82
|
+
c0,0,0.1,0,0.1,0l1.6-1.1c0,0,0.1-0.1,0.1-0.1C28.7,20.2,28.7,20.1,28.7,20.1z"
|
|
83
|
+
/>
|
|
84
|
+
</g>
|
|
85
|
+
</svg>
|
|
86
|
+
`
|
|
@@ -43,7 +43,7 @@ export const style = css`
|
|
|
43
43
|
span[button] {
|
|
44
44
|
min-height: 35px;
|
|
45
45
|
|
|
46
|
-
background: url
|
|
46
|
+
background: var(--url-icon-htoolbar) no-repeat;
|
|
47
47
|
background-position-x: 50%;
|
|
48
48
|
opacity: 0.8;
|
|
49
49
|
}
|
|
@@ -209,20 +209,20 @@ export const style = css`
|
|
|
209
209
|
|
|
210
210
|
/* bigger buttons */
|
|
211
211
|
#fullscreen {
|
|
212
|
-
background: url
|
|
212
|
+
background: var(--url-icon-fullscreen) 50% 10px no-repeat;
|
|
213
213
|
width: var(--edit-toolbar-bigger-icon-size);
|
|
214
214
|
height: var(--edit-toolbar-bigger-icon-size);
|
|
215
215
|
border-left: var(--edit-toolbar-bigger-icon-line);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
#toggle-property {
|
|
219
|
-
background: url
|
|
219
|
+
background: var(--url-icon-collapse) 80% 10px no-repeat;
|
|
220
220
|
width: var(--edit-toolbar-bigger-icon-size);
|
|
221
221
|
height: var(--edit-toolbar-bigger-icon-size);
|
|
222
222
|
border-left: var(--edit-toolbar-bigger-icon-line);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
#toggle-property[active] {
|
|
226
|
-
background: url
|
|
226
|
+
background: var(--url-icon-collapse-active) 80% 10px no-repeat;
|
|
227
227
|
}
|
|
228
228
|
`
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { html, LitElement, PropertyValues } from 'lit'
|
|
6
|
+
import { customElement, property, query, queryAll } from 'lit/decorators.js'
|
|
7
|
+
|
|
5
8
|
import { Component, Scene } from '@hatiolab/things-scene'
|
|
6
|
-
import { LitElement, PropertyValues, html } from 'lit'
|
|
7
|
-
import { customElement, property, query, queryAll, state } from 'lit/decorators.js'
|
|
8
9
|
|
|
9
10
|
import { style } from './edit-toolbar-style'
|
|
10
11
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
// import '@things-factory/modeller-ui/client/editors/things-editor-code'
|
|
6
5
|
import '@things-factory/modeller-ui/client/editors/things-editor-value-map'
|
|
7
6
|
import '@things-factory/modeller-ui/client/editors/things-editor-value-range'
|
|
8
|
-
import '@operato/input/
|
|
9
|
-
import '@operato/input/
|
|
7
|
+
import '@operato/input/ox-buttons-radio.js'
|
|
8
|
+
import '@operato/input/ox-input-code.js'
|
|
9
|
+
|
|
10
|
+
import { css, html, LitElement, PropertyValues } from 'lit'
|
|
11
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
10
12
|
|
|
11
|
-
import { LitElement, PropertyValues, css, html } from 'lit'
|
|
12
13
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
13
|
-
import { customElement, property, query, state } from 'lit/decorators'
|
|
14
14
|
|
|
15
15
|
export type Rule =
|
|
16
16
|
| {
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
import './data-binding-mapper'
|
|
6
6
|
import '@material/mwc-icon'
|
|
7
7
|
import '@things-factory/help'
|
|
8
|
-
import '@operato/input/
|
|
9
|
-
import '@operato/input/
|
|
8
|
+
import '@operato/input/ox-buttons-radio.js'
|
|
9
|
+
import '@operato/input/ox-input-data.js'
|
|
10
|
+
|
|
11
|
+
import { css, html, PropertyValues } from 'lit'
|
|
12
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
10
13
|
|
|
11
14
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
12
|
-
import { PropertyValues, css, html } from 'lit'
|
|
13
|
-
import { customElement, property, query, state } from 'lit/decorators'
|
|
14
15
|
|
|
15
16
|
import { AbstractProperty } from '../abstract-property'
|
|
16
17
|
import { PropertySharedStyle } from '../property-shared-style'
|
|
@@ -6,13 +6,12 @@ import './property-animations'
|
|
|
6
6
|
import './property-event'
|
|
7
7
|
import './property-shadow'
|
|
8
8
|
|
|
9
|
-
import { html } from 'lit'
|
|
10
|
-
import { customElement, property } from 'lit/decorators'
|
|
11
|
-
|
|
12
9
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
10
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
13
11
|
|
|
14
12
|
import { AbstractProperty } from '../abstract-property'
|
|
15
13
|
import { PropertySharedStyle } from '../property-shared-style'
|
|
14
|
+
import { html } from 'lit'
|
|
16
15
|
|
|
17
16
|
@customElement('property-effect')
|
|
18
17
|
class PropertyEffects extends AbstractProperty {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import '@operato/input/
|
|
5
|
+
import '@operato/input/ox-input-angle.js'
|
|
6
6
|
|
|
7
7
|
import { html, LitElement } from 'lit'
|
|
8
|
-
import { customElement, property } from 'lit/decorators'
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
9
9
|
|
|
10
10
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
11
11
|
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
import './property-animation'
|
|
6
6
|
import '@material/mwc-icon'
|
|
7
7
|
|
|
8
|
-
import { css, html
|
|
9
|
-
import { customElement, property, state } from 'lit/decorators'
|
|
10
|
-
|
|
8
|
+
import { LitElement, css, html } from 'lit'
|
|
11
9
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
10
|
+
import { customElement, property, state } from 'lit/decorators.js'
|
|
12
11
|
|
|
13
12
|
import { PropertySharedStyle } from '../property-shared-style'
|
|
14
13
|
import { convert } from './value-converter'
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import '@operato/input/
|
|
5
|
+
import '@operato/input/ox-input-data.js'
|
|
6
|
+
|
|
7
|
+
import { html, LitElement } from 'lit'
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
9
|
|
|
7
|
-
import { LitElement, html } from 'lit'
|
|
8
10
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
9
|
-
import { customElement, property } from 'lit/decorators'
|
|
10
11
|
|
|
11
12
|
import { EffectsSharedStyle } from './effects-shared-style'
|
|
12
13
|
import { convert } from './value-converter'
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import '@operato/input/
|
|
5
|
+
import '@operato/input/ox-input-data.js'
|
|
6
|
+
|
|
7
|
+
import { html, LitElement } from 'lit'
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
9
|
|
|
7
|
-
import { LitElement, html } from 'lit'
|
|
8
10
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
9
|
-
import { customElement, property } from 'lit/decorators'
|
|
10
11
|
|
|
11
12
|
import { EffectsSharedStyle } from './effects-shared-style'
|
|
12
13
|
import { convert } from './value-converter'
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
import './property-event-hover'
|
|
6
6
|
import './property-event-tap'
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import { customElement, property } from 'lit/decorators'
|
|
10
|
-
|
|
8
|
+
import { LitElement, html } from 'lit'
|
|
11
9
|
import { Properties, Scene } from '@hatiolab/things-scene'
|
|
10
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
12
11
|
|
|
13
12
|
import { PropertySharedStyle } from '../property-shared-style'
|
|
14
13
|
import { convert } from './value-converter'
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import '@things-factory/modeller-ui/client/editors/things-editor-color'
|
|
6
6
|
|
|
7
7
|
import { css, html, LitElement } from 'lit'
|
|
8
|
-
import { customElement, property } from 'lit/decorators'
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
9
9
|
|
|
10
10
|
import { Properties } from '@hatiolab/things-scene'
|
|
11
11
|
|
|
@@ -56,7 +56,7 @@ export default class PropertyShadow extends LitElement {
|
|
|
56
56
|
|
|
57
57
|
.icon-only-label {
|
|
58
58
|
grid-column: span 3;
|
|
59
|
-
background: url
|
|
59
|
+
background: var(--url-icon-properties-label) no-repeat;
|
|
60
60
|
float: left;
|
|
61
61
|
margin: 0;
|
|
62
62
|
align-self: stretch;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { customElement, property } from 'lit/decorators'
|
|
4
|
-
|
|
1
|
+
import { css, html, LitElement, PropertyValues, TemplateResult } from 'lit'
|
|
2
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
5
3
|
import Sortable from 'sortablejs'
|
|
6
4
|
|
|
5
|
+
import { Component, Container, Scene } from '@hatiolab/things-scene'
|
|
6
|
+
|
|
7
7
|
@customElement('scene-inspector')
|
|
8
8
|
export default class SceneInspector extends LitElement {
|
|
9
9
|
static styles = [
|
|
@@ -56,7 +56,7 @@ export default class SceneInspector extends LitElement {
|
|
|
56
56
|
.collapsed::before,
|
|
57
57
|
.extended::before,
|
|
58
58
|
.collapsespace::before {
|
|
59
|
-
background: url
|
|
59
|
+
background: var(--url-icon-shell-inspector) no-repeat;
|
|
60
60
|
width: 16px;
|
|
61
61
|
height: 18px;
|
|
62
62
|
display: inline-block;
|