@operato/board 0.3.1 → 0.3.8

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.
Files changed (98) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/custom-elements.json +1446 -1452
  3. package/demo/index.html +3 -3
  4. package/dist/src/component/container.js +2 -2
  5. package/dist/src/component/container.js.map +1 -1
  6. package/dist/src/component/etc.js +3 -3
  7. package/dist/src/component/etc.js.map +1 -1
  8. package/dist/src/component/line.js +5 -5
  9. package/dist/src/component/line.js.map +1 -1
  10. package/dist/src/component/shape.js +6 -6
  11. package/dist/src/component/shape.js.map +1 -1
  12. package/dist/src/component/text-and-media.js +5 -5
  13. package/dist/src/component/text-and-media.js.map +1 -1
  14. package/dist/src/modeller/component-toolbar/component-menu.js +2 -2
  15. package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
  16. package/dist/src/modeller/edit-toolbar-style.js +4 -4
  17. package/dist/src/modeller/edit-toolbar-style.js.map +1 -1
  18. package/dist/src/modeller/edit-toolbar.d.ts +1 -1
  19. package/dist/src/modeller/edit-toolbar.js +1 -1
  20. package/dist/src/modeller/edit-toolbar.js.map +1 -1
  21. package/dist/src/modeller/property-sidebar/effects/property-shadow.js +2 -2
  22. package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +1 -1
  23. package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +1 -1
  24. package/dist/src/modeller/property-sidebar/inspector/inspector.js +2 -2
  25. package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
  26. package/dist/src/modeller/property-sidebar/property-shared-style.js +1 -1
  27. package/dist/src/modeller/property-sidebar/property-shared-style.js.map +1 -1
  28. package/dist/src/modeller/property-sidebar/property-sidebar.js +2 -2
  29. package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
  30. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js +1 -1
  31. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js.map +1 -1
  32. package/dist/src/modeller/property-sidebar/shapes/shapes.js +2 -2
  33. package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
  34. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +9 -6
  35. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -1
  36. package/dist/src/modeller/property-sidebar/styles/styles.js +5 -5
  37. package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
  38. package/dist/src/ox-board-modeller.js +20 -0
  39. package/dist/src/ox-board-modeller.js.map +1 -1
  40. package/dist/tsconfig.tsbuildinfo +1 -1
  41. package/{assets/images → icons}/components/audio.png +0 -0
  42. package/{assets/images → icons}/components/both-arrow.png +0 -0
  43. package/{assets/images → icons}/components/color-image.png +0 -0
  44. package/{assets/images → icons}/components/container.png +0 -0
  45. package/{assets/images → icons}/components/dash.png +0 -0
  46. package/{assets/images → icons}/components/donut.png +0 -0
  47. package/{assets/images → icons}/components/ellipse.png +0 -0
  48. package/{assets/images → icons}/components/forklift.png +0 -0
  49. package/{assets/images → icons}/components/gif-image.png +0 -0
  50. package/{assets/images → icons}/components/global-reference.png +0 -0
  51. package/{assets/images → icons}/components/gray-image.png +0 -0
  52. package/{assets/images → icons}/components/humidity-sensor.png +0 -0
  53. package/{assets/images → icons}/components/info-window.png +0 -0
  54. package/{assets/images → icons}/components/line.png +0 -0
  55. package/{assets/images → icons}/components/local-reference.png +0 -0
  56. package/{assets/images → icons}/components/no-image.png +0 -0
  57. package/{assets/images → icons}/components/person.png +0 -0
  58. package/{assets/images → icons}/components/polygon.png +0 -0
  59. package/{assets/images → icons}/components/polyline.png +0 -0
  60. package/{assets/images → icons}/components/popup.png +0 -0
  61. package/{assets/images → icons}/components/rect.png +0 -0
  62. package/{assets/images → icons}/components/single-arrow.png +0 -0
  63. package/{assets/images → icons}/components/star.png +0 -0
  64. package/{assets/images → icons}/components/text.png +0 -0
  65. package/{assets/images → icons}/components/triangle.png +0 -0
  66. package/icons/icon-collapse-active.png +0 -0
  67. package/icons/icon-collapse.png +0 -0
  68. package/icons/icon-fullscreen.png +0 -0
  69. package/icons/icon-htoolbar.png +0 -0
  70. package/icons/icon-properties-arrow-type.png +0 -0
  71. package/icons/icon-properties-gradient-direction.png +0 -0
  72. package/icons/icon-properties-label.png +0 -0
  73. package/icons/icon-properties-line-type.png +0 -0
  74. package/icons/icon-properties-padding.png +0 -0
  75. package/icons/icon-properties-ratio.png +0 -0
  76. package/icons/icon-properties-table.png +0 -0
  77. package/icons/icon-properties.png +0 -0
  78. package/icons/icon-shell-inspector.png +0 -0
  79. package/package.json +11 -12
  80. package/src/component/container.ts +3 -2
  81. package/src/component/etc.ts +4 -3
  82. package/src/component/line.ts +6 -5
  83. package/src/component/shape.ts +7 -6
  84. package/src/component/text-and-media.ts +6 -5
  85. package/src/modeller/component-toolbar/component-menu.ts +5 -3
  86. package/src/modeller/edit-toolbar-style.ts +4 -4
  87. package/src/modeller/edit-toolbar.ts +3 -2
  88. package/src/modeller/property-sidebar/effects/property-shadow.ts +3 -2
  89. package/src/modeller/property-sidebar/inspector/inspector.ts +4 -4
  90. package/src/modeller/property-sidebar/property-shared-style.ts +1 -1
  91. package/src/modeller/property-sidebar/property-sidebar.ts +3 -3
  92. package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +1 -1
  93. package/src/modeller/property-sidebar/shapes/shapes.ts +2 -2
  94. package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +11 -7
  95. package/src/modeller/property-sidebar/styles/styles.ts +5 -5
  96. package/src/ox-board-modeller.ts +26 -0
  97. package/@types/global/index.d.ts +0 -1
  98. 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
File without changes
File without changes
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.1",
3
+ "version": "0.3.8",
4
4
  "description": "Webcomponent for board following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "license": "MIT",
@@ -49,17 +49,16 @@
49
49
  "storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
50
50
  },
51
51
  "dependencies": {
52
- "@operato/data-grist": "^0.3.1",
53
- "@operato/graphql": "^0.3.1",
54
- "@operato/input": "^0.3.1",
55
- "@operato/layout": "^0.3.1",
56
- "@operato/markdown": "^0.3.1",
57
- "@operato/popup": "^0.3.1",
58
- "@operato/property-editor": "^0.3.1",
59
- "@operato/styles": "^0.3.1",
52
+ "@operato/data-grist": "^0.3.8",
53
+ "@operato/graphql": "^0.3.8",
54
+ "@operato/input": "^0.3.8",
55
+ "@operato/markdown": "^0.3.8",
56
+ "@operato/popup": "^0.3.8",
57
+ "@operato/property-editor": "^0.3.8",
58
+ "@operato/styles": "^0.3.8",
60
59
  "@polymer/paper-dropdown-menu": "^3.2.0",
61
- "@things-factory/help": "^4.0.24",
62
- "@things-factory/modeller-ui": "^4.0.24",
60
+ "@things-factory/help": "^4.0.27",
61
+ "@things-factory/modeller-ui": "^4.0.27",
63
62
  "@types/file-saver": "^2.0.4",
64
63
  "@types/sortablejs": "^1.10.7",
65
64
  "file-saver": "^2.0.5",
@@ -107,5 +106,5 @@
107
106
  "prettier --write"
108
107
  ]
109
108
  },
110
- "gitHead": "082f16bf248908bd498ec1fddb912cdbb13efc68"
109
+ "gitHead": "7d5cd8c985a5b0fcae4bb7237eb771ab13f0c9a9"
111
110
  }
@@ -1,6 +1,7 @@
1
1
  import { ComponentGroup } from '../types'
2
- import iconContainer from '../../../assets/images/components/container.png'
3
- import popup from '../../../assets/images/components/popup.png'
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">
@@ -1,7 +1,8 @@
1
1
  import { ComponentGroup } from '../types'
2
- import globalReference from '../../../assets/images/components/global-reference.png'
3
- import infoWindow from '../../../assets/images/components/info-window.png'
4
- import localReference from '../../../assets/images/components/local-reference.png'
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">
@@ -1,9 +1,10 @@
1
1
  import { ComponentGroup } from '../types'
2
- import bothArrow from '../../../assets/images/components/both-arrow.png'
3
- import dash from '../../../assets/images/components/dash.png'
4
- import lineIcon from '../../../assets/images/components/line.png'
5
- import polyline from '../../../assets/images/components/polyline.png'
6
- import singleArrow from '../../../assets/images/components/single-arrow.png'
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">
@@ -1,10 +1,11 @@
1
1
  import { ComponentGroup } from '../types'
2
- import donut from '../../../assets/images/components/donut.png'
3
- import ellipse from '../../../assets/images/components/ellipse.png'
4
- import polygon from '../../../assets/images/components/polygon.png'
5
- import rect from '../../../assets/images/components/rect.png'
6
- import star from '../../../assets/images/components/star.png'
7
- import triangle from '../../../assets/images/components/triangle.png'
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
- import audio from '../../../assets/images/components/audio.png'
3
- import colorImage from '../../../assets/images/components/color-image.png'
4
- import gifImage from '../../../assets/images/components/gif-image.png'
5
- import grayImage from '../../../assets/images/components/gray-image.png'
6
- import text from '../../../assets/images/components/text.png'
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 { LitElement, PropertyValues, css, html } from 'lit'
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
- import noImage from '../../../../assets/images/components/no-image.png'
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('/assets/images/icon-htoolbar.png') no-repeat;
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('/assets/images/icon-fullscreen.png') 50% 10px no-repeat;
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('/assets/images/icon-collapse.png') 80% 10px no-repeat;
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(/assets/images/icon-collapse-active.png) 80% 10px no-repeat;
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 { LitElement, css, html } from 'lit'
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(/assets/images/icon-properties-label.png) no-repeat;
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 { Component, Container, Properties, Scene } from '@hatiolab/things-scene'
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(/assets/images/icon-shell-inspector.png) no-repeat;
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(/assets/images/icon-properties-label.png) no-repeat;
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 { BOUNDS, Component, Model, Scene } from '@hatiolab/things-scene'
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 {
@@ -6,7 +6,7 @@ export const BoxPaddingEditorStyles = css`
6
6
  }
7
7
 
8
8
  .box-padding td {
9
- background: url(/assets/images/icon-properties-padding.png) 50% 0 no-repeat;
9
+ background: var(--url-icon-properties-padding) 50% 0 no-repeat;
10
10
  }
11
11
 
12
12
  .box-padding tr:nth-child(1),
@@ -39,7 +39,7 @@ class PropertyShapes extends AbstractProperty {
39
39
  `,
40
40
  css`
41
41
  .icon-label label {
42
- background: url(/assets/images/icon-properties-label.png) 7px -900px no-repeat;
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(/assets/images/icon-properties.png) no-repeat;
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.renderRoot.addEventListener('change', this._onValueChanged.bind(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.renderRoot.textContent = ''
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.renderRoot.appendChild(element)
100
+ this.appendChild(element)
97
101
  })
98
102
  }
99
103
 
100
104
  _setValues() {
101
105
  this.value &&
102
- Array.from(this.renderRoot.querySelectorAll('[name]')).forEach((prop: Properties) => {
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 == undefined) convertedValue = (DEFAULT_VALUE as any)[prop.type]
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(/assets/images/icon-properties.png) no-repeat;
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(/assets/images/icon-properties-line-type.png) 50% 0 no-repeat;
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(/assets/images/icon-properties-line-type.png) 50% 0 no-repeat !important;
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(/assets/images/icon-properties-arrow-type.png) 50% 0 no-repeat;
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(/assets/images/icon-properties-arrow-type.png) 110% 0 no-repeat !important;
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;
@@ -19,6 +19,19 @@ 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() {
@@ -1 +0,0 @@
1
- declare module '*.png'
Binary file