@operato/board 0.3.2 → 0.3.9
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 +61 -0
- package/custom-elements.json +943 -1164
- 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/modeller/component-toolbar/component-menu.js +2 -2
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- 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/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 +2 -2
- 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.js +2 -2
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +9 -6
- 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-modeller.js +21 -1
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/ox-board-player.js +2 -3
- package/dist/src/ox-board-player.js.map +1 -1
- package/dist/src/ox-board-viewer.js +3 -4
- package/dist/src/ox-board-viewer.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 +13 -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/modeller/component-toolbar/component-menu.ts +5 -3
- package/src/modeller/edit-toolbar-style.ts +4 -4
- package/src/modeller/edit-toolbar.ts +3 -2
- package/src/modeller/property-sidebar/effects/property-shadow.ts +3 -2
- package/src/modeller/property-sidebar/inspector/inspector.ts +4 -4
- 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 +2 -2
- package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +11 -7
- package/src/modeller/property-sidebar/styles/styles.ts +5 -5
- package/src/ox-board-modeller.ts +27 -1
- package/src/ox-board-player.ts +3 -3
- package/src/ox-board-viewer.ts +3 -4
- package/@types/global/index.d.ts +0 -1
- package/assets/images/icon-vtoolbar.png +0 -0
- package/dist/src/utils/fullscreen.d.ts +0 -14
- package/dist/src/utils/fullscreen.js +0 -69
- package/dist/src/utils/fullscreen.js.map +0 -1
- package/dist/src/utils/os.d.ts +0 -20
- package/dist/src/utils/os.js +0 -41
- package/dist/src/utils/os.js.map +0 -1
- package/dist/src/utils/swipe-listener.d.ts +0 -10
- package/dist/src/utils/swipe-listener.js +0 -257
- package/dist/src/utils/swipe-listener.js.map +0 -1
- package/src/utils/fullscreen.ts +0 -82
- package/src/utils/os.ts +0 -41
- package/src/utils/swipe-listener.ts +0 -290
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,24 +49,23 @@
|
|
|
49
49
|
"storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@operato/data-grist": "^0.3.
|
|
53
|
-
"@operato/graphql": "^0.3.
|
|
54
|
-
"@operato/input": "^0.3.
|
|
55
|
-
"@operato/
|
|
56
|
-
"@operato/
|
|
57
|
-
"@operato/
|
|
58
|
-
"@operato/
|
|
59
|
-
"@operato/
|
|
52
|
+
"@operato/data-grist": "^0.3.9",
|
|
53
|
+
"@operato/graphql": "^0.3.9",
|
|
54
|
+
"@operato/input": "^0.3.9",
|
|
55
|
+
"@operato/markdown": "^0.3.9",
|
|
56
|
+
"@operato/popup": "^0.3.9",
|
|
57
|
+
"@operato/property-editor": "^0.3.9",
|
|
58
|
+
"@operato/styles": "^0.3.9",
|
|
59
|
+
"@operato/utils": "^0.3.9",
|
|
60
60
|
"@polymer/paper-dropdown-menu": "^3.2.0",
|
|
61
|
-
"@things-factory/help": "^4.0.
|
|
62
|
-
"@things-factory/modeller-ui": "^4.0.
|
|
61
|
+
"@things-factory/help": "^4.0.27",
|
|
62
|
+
"@things-factory/modeller-ui": "^4.0.27",
|
|
63
63
|
"@types/file-saver": "^2.0.4",
|
|
64
64
|
"@types/sortablejs": "^1.10.7",
|
|
65
65
|
"file-saver": "^2.0.5",
|
|
66
66
|
"lit": "^2.0.2",
|
|
67
67
|
"lodash": "^4.17.21",
|
|
68
|
-
"sortablejs": "^1.14.0"
|
|
69
|
-
"swipe-listener": "^1.3.0"
|
|
68
|
+
"sortablejs": "^1.14.0"
|
|
70
69
|
},
|
|
71
70
|
"devDependencies": {
|
|
72
71
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
@@ -107,5 +106,5 @@
|
|
|
107
106
|
"prettier --write"
|
|
108
107
|
]
|
|
109
108
|
},
|
|
110
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "d63971adcea045ccd788ff4ae5b9e2ca561bb754"
|
|
111
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">
|
|
@@ -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 {
|
|
@@ -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
|
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import '@things-factory/modeller-ui/client/editors/things-editor-color'
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { css, html, LitElement } from 'lit'
|
|
8
8
|
import { customElement, property } from 'lit/decorators.js'
|
|
9
9
|
|
|
10
10
|
import { Properties } from '@hatiolab/things-scene'
|
|
11
|
+
|
|
11
12
|
import { convert } from './value-converter'
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -55,7 +56,7 @@ export default class PropertyShadow extends LitElement {
|
|
|
55
56
|
|
|
56
57
|
.icon-only-label {
|
|
57
58
|
grid-column: span 3;
|
|
58
|
-
background: url
|
|
59
|
+
background: var(--url-icon-properties-label) no-repeat;
|
|
59
60
|
float: left;
|
|
60
61
|
margin: 0;
|
|
61
62
|
align-self: stretch;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LitElement, PropertyValues, TemplateResult, css, html } from 'lit'
|
|
1
|
+
import { css, html, LitElement, PropertyValues, TemplateResult } from 'lit'
|
|
3
2
|
import { customElement, property } from 'lit/decorators.js'
|
|
4
|
-
|
|
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;
|
|
@@ -102,7 +102,7 @@ export const PropertySharedStyle = css`
|
|
|
102
102
|
.icon-only-label {
|
|
103
103
|
grid-column: span 1;
|
|
104
104
|
|
|
105
|
-
background: url
|
|
105
|
+
background: var(--url-icon-properties-label) no-repeat;
|
|
106
106
|
float: left;
|
|
107
107
|
margin: 0;
|
|
108
108
|
align-self: stretch;
|
|
@@ -10,12 +10,12 @@ import './specifics/specifics'
|
|
|
10
10
|
import './data-binding/data-binding'
|
|
11
11
|
import './inspector/inspector'
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
import { LitElement, PropertyValues, css, html } from 'lit'
|
|
13
|
+
import { css, html, LitElement, PropertyValues } from 'lit'
|
|
15
14
|
import { customElement, property } from 'lit/decorators.js'
|
|
15
|
+
import deepClone from 'lodash/cloneDeep'
|
|
16
16
|
|
|
17
|
+
import { BOUNDS, Component, Model, Scene } from '@hatiolab/things-scene'
|
|
17
18
|
import { ScrollbarStyles } from '@operato/styles'
|
|
18
|
-
import deepClone from 'lodash/cloneDeep'
|
|
19
19
|
|
|
20
20
|
@customElement('property-sidebar')
|
|
21
21
|
class PropertySidebar extends LitElement {
|
|
@@ -39,7 +39,7 @@ class PropertyShapes extends AbstractProperty {
|
|
|
39
39
|
`,
|
|
40
40
|
css`
|
|
41
41
|
.icon-label label {
|
|
42
|
-
background: url
|
|
42
|
+
background: var(--url-icon-properties-label) 7px -900px no-repeat;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.icon-label label.width {
|
|
@@ -94,7 +94,7 @@ class PropertyShapes extends AbstractProperty {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
ox-buttons-radio div {
|
|
97
|
-
background: url
|
|
97
|
+
background: var(--url-icon-properties) no-repeat;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
ox-buttons-radio div[data-value='left'] {
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import '@things-factory/modeller-ui/client/editors/things-editor-property'
|
|
6
6
|
|
|
7
|
-
import { LitElement, PropertyValues } from 'lit'
|
|
7
|
+
import { html, LitElement, PropertyValues } from 'lit'
|
|
8
8
|
import { customElement, property } from 'lit/decorators.js'
|
|
9
9
|
|
|
10
|
-
import { OxPropertyEditor } from '@operato/property-editor'
|
|
11
10
|
import { Properties } from '@hatiolab/things-scene'
|
|
11
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
모든 에디터들은 change 이벤트를 지원해야 한다. 또한, 모든 에디터들은 value속성에 값을 가져야 한다.
|
|
@@ -63,8 +63,12 @@ class SpecificPropertiesBuilder extends LitElement {
|
|
|
63
63
|
@property({ type: Array }) props: any[] = []
|
|
64
64
|
@property({ type: Object }) propertyEditor: any
|
|
65
65
|
|
|
66
|
+
render() {
|
|
67
|
+
return html`<slot></slot>`
|
|
68
|
+
}
|
|
69
|
+
|
|
66
70
|
firstUpdated() {
|
|
67
|
-
this.
|
|
71
|
+
this.addEventListener('change', this._onValueChanged.bind(this))
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
updated(changes: PropertyValues<this>) {
|
|
@@ -73,7 +77,7 @@ class SpecificPropertiesBuilder extends LitElement {
|
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
_onPropsChanged(props: any[]) {
|
|
76
|
-
this.
|
|
80
|
+
this.textContent = ''
|
|
77
81
|
;(props || []).forEach(prop => {
|
|
78
82
|
let elementType = OxPropertyEditor.getEditor(prop.type)
|
|
79
83
|
if (!elementType) {
|
|
@@ -93,16 +97,16 @@ class SpecificPropertiesBuilder extends LitElement {
|
|
|
93
97
|
element.property = prop.property
|
|
94
98
|
element.setAttribute('property-editor', 'true')
|
|
95
99
|
|
|
96
|
-
this.
|
|
100
|
+
this.appendChild(element)
|
|
97
101
|
})
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
_setValues() {
|
|
101
105
|
this.value &&
|
|
102
|
-
Array.from(this.
|
|
106
|
+
Array.from(this.querySelectorAll('[name]')).forEach((prop: Properties) => {
|
|
103
107
|
let name = prop.getAttribute('name')
|
|
104
108
|
var convertedValue = convertValue(prop.type, this.value[name])
|
|
105
|
-
if (convertedValue
|
|
109
|
+
if (convertedValue === undefined) convertedValue = (DEFAULT_VALUE as any)[prop.type]
|
|
106
110
|
prop.value = convertedValue
|
|
107
111
|
prop.observe && prop.observe.call(prop, prop.value)
|
|
108
112
|
})
|
|
@@ -39,7 +39,7 @@ class PropertyStyles extends AbstractProperty {
|
|
|
39
39
|
display: inline-block;
|
|
40
40
|
border-bottom: 2px solid #fff;
|
|
41
41
|
|
|
42
|
-
background: url
|
|
42
|
+
background: var(--url-icon-properties) no-repeat;
|
|
43
43
|
background-size: 70%;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -68,7 +68,7 @@ class PropertyStyles extends AbstractProperty {
|
|
|
68
68
|
max-width: 100px;
|
|
69
69
|
}
|
|
70
70
|
.line-type paper-item {
|
|
71
|
-
background: url
|
|
71
|
+
background: var(--url-icon-properties-line-type) 50% 0 no-repeat;
|
|
72
72
|
min-height: 25px;
|
|
73
73
|
padding: 3px 9px;
|
|
74
74
|
width: 80px;
|
|
@@ -100,7 +100,7 @@ class PropertyStyles extends AbstractProperty {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.line-type .paper-input-container input {
|
|
103
|
-
background: url
|
|
103
|
+
background: var(--url-icon-properties-line-type) 50% 0 no-repeat !important;
|
|
104
104
|
}
|
|
105
105
|
.line-type.solid .paper-input-container input {
|
|
106
106
|
background-position: 50% 5px !important;
|
|
@@ -132,7 +132,7 @@ class PropertyStyles extends AbstractProperty {
|
|
|
132
132
|
max-width: 140px;
|
|
133
133
|
}
|
|
134
134
|
.arrow-type paper-item {
|
|
135
|
-
background: url
|
|
135
|
+
background: var(--url-icon-properties-arrow-type) 50% 0 no-repeat;
|
|
136
136
|
min-height: 30px;
|
|
137
137
|
padding: 3px 7px;
|
|
138
138
|
width: 30px;
|
|
@@ -230,7 +230,7 @@ class PropertyStyles extends AbstractProperty {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
.arrow-type .paper-input-container input {
|
|
233
|
-
background: url
|
|
233
|
+
background: var(--url-icon-properties-arrow-type) 110% 0 no-repeat !important;
|
|
234
234
|
}
|
|
235
235
|
.arrow-type.begin-no .paper-input-container input {
|
|
236
236
|
background-position: 110% 5px !important;
|
package/src/ox-board-modeller.ts
CHANGED
|
@@ -12,13 +12,26 @@ import { customElement, property, query } from 'lit/decorators.js'
|
|
|
12
12
|
|
|
13
13
|
import { Scene, SCENE_MODE } from '@hatiolab/things-scene'
|
|
14
14
|
import { OxPopup } from '@operato/popup'
|
|
15
|
+
import { togglefullscreen } from '@operato/utils'
|
|
15
16
|
|
|
16
17
|
import { EditToolbar } from './modeller/edit-toolbar'
|
|
17
18
|
import { ComponentGroup, ComponentTemplate } from './types'
|
|
18
|
-
import { togglefullscreen } from './utils/fullscreen'
|
|
19
19
|
|
|
20
20
|
const isMacOS = navigator.userAgent.indexOf('Mac') != -1
|
|
21
21
|
|
|
22
|
+
const ICON_PROPERTIES = new URL('../../icons/icon-properties.png', import.meta.url).href
|
|
23
|
+
const ICON_PROPERTIES_LINE_TYPE = new URL('../../icons/icon-properties-line-type.png', import.meta.url).href
|
|
24
|
+
const ICON_PROPERTIES_ARROW_TYPE = new URL('../../icons/icon-properties-arrow-type.png', import.meta.url).href
|
|
25
|
+
const ICON_PROPERTIES_LABEL = new URL('../../icons/icon-properties-label.png', import.meta.url).href
|
|
26
|
+
const ICON_PROPERTIES_PADDING = new URL('../../icons/icon-properties-padding.png', import.meta.url).href
|
|
27
|
+
|
|
28
|
+
const ICON_HTOOLBAR = new URL('../../icons/icon-htoolbar.png', import.meta.url).href
|
|
29
|
+
const ICON_FULLSCREEN = new URL('../../icons/icon-fullscreen.png', import.meta.url).href
|
|
30
|
+
const ICON_COLLAPSE = new URL('../../icons/icon-collapse.png', import.meta.url).href
|
|
31
|
+
const ICON_COLLAPSE_ACTIVE = new URL('../../icons/icon-collapse-active.png', import.meta.url).href
|
|
32
|
+
|
|
33
|
+
const ICON_SHELL_INSPECTOR = new URL('../../icons/icon-shell-inspector.png', import.meta.url).href
|
|
34
|
+
|
|
22
35
|
var Registry: ComponentGroup[] = []
|
|
23
36
|
|
|
24
37
|
@customElement('ox-board-modeller')
|
|
@@ -170,6 +183,19 @@ export class BoardModeller extends LitElement {
|
|
|
170
183
|
ids = ids.filter(id => !!id).sort()
|
|
171
184
|
callback(ids)
|
|
172
185
|
})
|
|
186
|
+
|
|
187
|
+
this.style.setProperty('--url-icon-properties', `url(${ICON_PROPERTIES})`)
|
|
188
|
+
this.style.setProperty('--url-icon-properties-label', `url(${ICON_PROPERTIES_LABEL})`)
|
|
189
|
+
this.style.setProperty('--url-icon-properties-padding', `url(${ICON_PROPERTIES_PADDING})`)
|
|
190
|
+
this.style.setProperty('--url-icon-properties-line-type', `url(${ICON_PROPERTIES_LINE_TYPE})`)
|
|
191
|
+
this.style.setProperty('--url-icon-properties-arrow-type', `url(${ICON_PROPERTIES_ARROW_TYPE})`)
|
|
192
|
+
|
|
193
|
+
this.style.setProperty('--url-icon-htoolbar', `url(${ICON_HTOOLBAR})`)
|
|
194
|
+
this.style.setProperty('--url-icon-fullscreen', `url(${ICON_FULLSCREEN})`)
|
|
195
|
+
this.style.setProperty('--url-icon-collapse', `url(${ICON_COLLAPSE})`)
|
|
196
|
+
this.style.setProperty('--url-icon-collapse-active', `url(${ICON_COLLAPSE_ACTIVE})`)
|
|
197
|
+
|
|
198
|
+
this.style.setProperty('--url-icon-shell-inspector', `url(${ICON_SHELL_INSPECTOR})`)
|
|
173
199
|
}
|
|
174
200
|
|
|
175
201
|
render() {
|
package/src/ox-board-player.ts
CHANGED
|
@@ -3,11 +3,11 @@ import '@material/mwc-icon'
|
|
|
3
3
|
import './player/ox-board-wrapper'
|
|
4
4
|
import './player/ox-board-player-carousel'
|
|
5
5
|
|
|
6
|
-
import { LitElement, PropertyValues
|
|
6
|
+
import { html, LitElement, PropertyValues } from 'lit'
|
|
7
7
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
8
|
-
import { exitfullscreen, togglefullscreen } from './utils/fullscreen'
|
|
9
8
|
|
|
10
|
-
import { SwipeListener } from '
|
|
9
|
+
import { exitfullscreen, SwipeListener, togglefullscreen } from '@operato/utils'
|
|
10
|
+
|
|
11
11
|
import { style } from './ox-board-player-style'
|
|
12
12
|
|
|
13
13
|
@customElement('ox-board-player')
|
package/src/ox-board-viewer.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import '@material/mwc-fab'
|
|
2
2
|
import '@material/mwc-icon'
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import { SCENE_MODE, create } from '@hatiolab/things-scene'
|
|
4
|
+
import { css, html, LitElement, PropertyValues } from 'lit'
|
|
6
5
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
import { togglefullscreen } from '
|
|
7
|
+
import { create, SCENE_MODE } from '@hatiolab/things-scene'
|
|
8
|
+
import { isIOS, togglefullscreen } from '@operato/utils'
|
|
10
9
|
|
|
11
10
|
@customElement('ox-board-viewer')
|
|
12
11
|
export class BoardViewer extends LitElement {
|
package/@types/global/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module '*.png'
|
|
Binary file
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 풀스크린 전환 이후와 풀스크린 해제 이후에 호출되는 콜백함수
|
|
3
|
-
* @callback FullscreenCallback
|
|
4
|
-
*/
|
|
5
|
-
export declare type FullscreenCallback = () => void;
|
|
6
|
-
/**
|
|
7
|
-
* 엘리먼트를 풀스크린으로 표시되도록 한다.
|
|
8
|
-
* @param {HTMLElement} element 대상 엘리먼트
|
|
9
|
-
* @param {FullscreenCallback} afterfull 풀스크린이 된 이후에 호출되는 콜백함수
|
|
10
|
-
* @param {FullscreenCallback} afterfinish 풀스크린이 해제된 이후에 호출되는 콜백함수
|
|
11
|
-
*/
|
|
12
|
-
export declare function fullscreen(element: HTMLElement, afterfull?: FullscreenCallback, afterfinish?: FullscreenCallback): void;
|
|
13
|
-
export declare function exitfullscreen(): void;
|
|
14
|
-
export declare function togglefullscreen(element: HTMLElement, afterfull?: FullscreenCallback, afterfinish?: FullscreenCallback): void;
|