@operato/board 7.1.30 → 7.1.32

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 (87) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +14 -14
  4. package/.storybook/main.js +0 -3
  5. package/.storybook/server.mjs +0 -8
  6. package/demo/index-modeller.html +0 -112
  7. package/demo/index-player.html +0 -112
  8. package/demo/index-viewer.html +0 -112
  9. package/demo/index.html +0 -112
  10. package/src/component/3d.ts +0 -29
  11. package/src/component/chart-and-gauge.ts +0 -28
  12. package/src/component/container.ts +0 -63
  13. package/src/component/data-source.ts +0 -30
  14. package/src/component/etc.ts +0 -88
  15. package/src/component/form.ts +0 -42
  16. package/src/component/index.ts +0 -12
  17. package/src/component/iot.ts +0 -52
  18. package/src/component/line.ts +0 -156
  19. package/src/component/register-default-groups.ts +0 -28
  20. package/src/component/shape.ts +0 -156
  21. package/src/component/table.ts +0 -28
  22. package/src/component/text-and-media.ts +0 -125
  23. package/src/component/warehouse.ts +0 -26
  24. package/src/data-storage/data-storage.ts +0 -76
  25. package/src/graphql/board.ts +0 -144
  26. package/src/graphql/data-subscription.ts +0 -30
  27. package/src/graphql/favorite-board.ts +0 -25
  28. package/src/graphql/group.ts +0 -138
  29. package/src/graphql/index.ts +0 -4
  30. package/src/graphql/play-group.ts +0 -225
  31. package/src/graphql/scenario.ts +0 -79
  32. package/src/index.ts +0 -10
  33. package/src/modeller/component-toolbar/component-detail.ts +0 -52
  34. package/src/modeller/component-toolbar/component-menu.ts +0 -196
  35. package/src/modeller/component-toolbar/component-toolbar.ts +0 -196
  36. package/src/modeller/component-toolbar/mode-icons.ts +0 -88
  37. package/src/modeller/edit-toolbar-style.ts +0 -232
  38. package/src/modeller/edit-toolbar.ts +0 -587
  39. package/src/modeller/property-sidebar/abstract-property.ts +0 -69
  40. package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +0 -475
  41. package/src/modeller/property-sidebar/data-binding/data-binding-value-map.ts +0 -19
  42. package/src/modeller/property-sidebar/data-binding/data-binding-value-range.ts +0 -19
  43. package/src/modeller/property-sidebar/data-binding/data-binding.ts +0 -480
  44. package/src/modeller/property-sidebar/effects/effects-shared-style.ts +0 -62
  45. package/src/modeller/property-sidebar/effects/effects.ts +0 -69
  46. package/src/modeller/property-sidebar/effects/property-animation.ts +0 -146
  47. package/src/modeller/property-sidebar/effects/property-animations.ts +0 -93
  48. package/src/modeller/property-sidebar/effects/property-event-hover.ts +0 -200
  49. package/src/modeller/property-sidebar/effects/property-event-tap.ts +0 -251
  50. package/src/modeller/property-sidebar/effects/property-event.ts +0 -73
  51. package/src/modeller/property-sidebar/effects/property-shadow.ts +0 -114
  52. package/src/modeller/property-sidebar/effects/value-converter.ts +0 -23
  53. package/src/modeller/property-sidebar/inspector/inspector.ts +0 -404
  54. package/src/modeller/property-sidebar/property-shared-style.ts +0 -136
  55. package/src/modeller/property-sidebar/property-sidebar.ts +0 -326
  56. package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +0 -94
  57. package/src/modeller/property-sidebar/shapes/shapes.ts +0 -432
  58. package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +0 -152
  59. package/src/modeller/property-sidebar/specifics/specifics.ts +0 -81
  60. package/src/modeller/property-sidebar/styles/styles.ts +0 -577
  61. package/src/modeller/scene-viewer/confidential-overlay.ts +0 -18
  62. package/src/modeller/scene-viewer/ox-scene-handler.ts +0 -40
  63. package/src/modeller/scene-viewer/ox-scene-layer.ts +0 -42
  64. package/src/modeller/scene-viewer/ox-scene-property.ts +0 -10
  65. package/src/modeller/scene-viewer/ox-scene-viewer.ts +0 -263
  66. package/src/ox-board-component-info.ts +0 -236
  67. package/src/ox-board-list.ts +0 -401
  68. package/src/ox-board-modeller.ts +0 -408
  69. package/src/ox-board-player-style.ts +0 -200
  70. package/src/ox-board-player.ts +0 -333
  71. package/src/ox-board-template-list.ts +0 -267
  72. package/src/ox-board-template-viewer.ts +0 -198
  73. package/src/ox-board-viewer.ts +0 -727
  74. package/src/ox-editor-board-selector.ts +0 -91
  75. package/src/ox-property-editor-board-selector.ts +0 -23
  76. package/src/player/ox-board-player-carousel.ts +0 -197
  77. package/src/player/ox-board-player-grid.ts +0 -78
  78. package/src/player/ox-board-wrapper.ts +0 -152
  79. package/src/selector/board-creation-popup.ts +0 -151
  80. package/src/selector/board-thumbnail-card.ts +0 -175
  81. package/src/selector/ox-board-creation-card.ts +0 -98
  82. package/src/selector/ox-board-selector.ts +0 -382
  83. package/src/types.ts +0 -63
  84. package/stories/property-data-binding.stories.ts +0 -34
  85. package/tsconfig.json +0 -24
  86. package/web-dev-server.config.mjs +0 -30
  87. package/web-test-runner.config.mjs +0 -29
@@ -1,136 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import { css } from 'lit'
6
-
7
- export const PropertySharedStyle = css`
8
- fieldset {
9
- border: none;
10
- margin: 4px;
11
- padding: 9px 4px 9px 4px;
12
- border-bottom: var(--property-sidebar-fieldset-border);
13
- color: var(--property-sidebar-fieldset-legend-color, var(--md-sys-color-on-secondary-container));
14
- font: var(--property-sidebar-fieldset-label);
15
- }
16
-
17
- fieldset legend {
18
- padding: 5px 0 0 5px;
19
- color: var(--property-sidebar-fieldset-legend-color, var(--md-sys-color-on-secondary-container));
20
- font: var(--property-sidebar-fieldset-legend);
21
- text-transform: capitalize;
22
- }
23
-
24
- select,
25
- input {
26
- border: var(--property-sidebar-fieldset-border);
27
- }
28
-
29
- ox-input-data {
30
- height: 300px;
31
- }
32
-
33
- /* property grid */
34
- .property-grid {
35
- display: grid;
36
- grid-template-columns: repeat(10, 1fr);
37
- grid-gap: 5px;
38
- grid-auto-rows: minmax(24px, auto);
39
- align-items: center;
40
- }
41
-
42
- .property-grid > * {
43
- width: 100%;
44
- box-sizing: border-box;
45
- }
46
-
47
- .property-grid > label {
48
- grid-column: span 3;
49
- text-align: right;
50
- text-transform: capitalize;
51
- line-height: 2;
52
- }
53
-
54
- .property-grid > input,
55
- .property-grid > table,
56
- .property-grid > select,
57
- .property-grid > ox-input-angle,
58
- .property-grid > ox-buttons-radio,
59
- .property-grid > ox-input-color,
60
- [custom-editor] {
61
- grid-column: span 7;
62
- align-self: stretch;
63
- }
64
-
65
- .property-grid > .checkbox-row {
66
- grid-column: span 10;
67
- }
68
-
69
- .property-grid > .property-full-label {
70
- grid-column: span 3;
71
- text-align: right;
72
- text-transform: capitalize;
73
- }
74
-
75
- .property-grid > .property-half-label {
76
- grid-column: span 1;
77
- }
78
-
79
- .property-grid > .property-full-input {
80
- grid-column: span 7;
81
- }
82
-
83
- .property-grid > .property-half-input {
84
- grid-column: span 4;
85
- }
86
-
87
- /* checkbox-row */
88
- .checkbox-row {
89
- display: grid;
90
- grid-template-columns: repeat(10, 1fr);
91
- grid-gap: 5px;
92
- grid-auto-rows: minmax(24px, auto);
93
- align-items: center;
94
- }
95
-
96
- .checkbox-row > input {
97
- grid-column: 4 / 5;
98
- }
99
-
100
- .checkbox-row > label {
101
- grid-column: span 6;
102
- text-align: left;
103
- }
104
-
105
- /* image resources */
106
- .icon-only-label {
107
- grid-column: span 1;
108
-
109
- background: var(--url-icon-properties-label) no-repeat;
110
- float: left;
111
- margin: 0;
112
- align-self: stretch;
113
- }
114
-
115
- .icon-only-label.color {
116
- background-position: 100% -500px;
117
- }
118
- .icon-only-label.font-size {
119
- background-position: 100% -594px;
120
- }
121
- .icon-only-label.leading {
122
- background-position: 100% -696px;
123
- }
124
- .icon-only-label.hscale {
125
- background-position: 100% -296px;
126
- }
127
- .icon-only-label.vscale {
128
- background-position: 100% -396px;
129
- }
130
- .icon-only-label.linewidth {
131
- background-position: 100% -894px;
132
- }
133
- .icon-only-label.lineHeight {
134
- background-position: 100% -995px;
135
- }
136
- `
@@ -1,326 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import '@material/web/icon/icon.js'
6
-
7
- import { css, html, LitElement, PropertyValues } from 'lit'
8
- import { property } from 'lit/decorators.js'
9
- import deepClone from 'lodash-es/cloneDeep'
10
-
11
- import { BOUNDS, Component, Model, Scene } from '@hatiolab/things-scene'
12
- import { ScopedElementsMixin } from '@open-wc/scoped-elements'
13
- import { ScrollbarStyles } from '@operato/styles'
14
-
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) {
23
- static styles = [
24
- ScrollbarStyles,
25
- css`
26
- :host {
27
- border-left: 1px solid var(--paper-blue-grey-100);
28
- width: 270px;
29
- display: flex;
30
- flex-direction: column;
31
- background-color: var(--property-sidebar-background-color, var(--md-sys-color-secondary-container));
32
- color: var(--property-sidebar-color, var(--md-sys-color-on-secondary-container));
33
- user-select: none;
34
-
35
- --input-padding: var(--spacing-small);
36
- --label-font: var(--property-sidebar-fieldset-label);
37
- }
38
-
39
- [tab] {
40
- display: flex;
41
- background-color: rgba(0, 0, 0, 0.08);
42
- opacity: 0.85;
43
- }
44
-
45
- [tab] md-icon {
46
- flex: 1;
47
-
48
- display: flex;
49
- align-items: center;
50
- justify-content: center;
51
-
52
- color: var(--property-sidebar-tab-icon-color);
53
- height: 40px;
54
- }
55
-
56
- [tab] [selected] {
57
- background-color: var(--property-sidebar-background-color, var(--md-sys-color-secondary-container));
58
- border-left: 1px solid rgba(255, 255, 255, 0.5);
59
- border-right: 1px solid rgba(0, 0, 0, 0.15);
60
- opacity: 1;
61
- }
62
-
63
- [content] {
64
- flex: 1;
65
-
66
- overflow: hidden;
67
- overflow-y: auto;
68
- }
69
-
70
- [content] > :not([active]) {
71
- display: none;
72
- }
73
- `
74
- ]
75
-
76
- @property({ type: Object }) scene: Scene | null = null
77
- @property({ type: Object }) bounds: any = {}
78
- @property({ type: Object }) model: Model | null = {}
79
- @property({ type: Array }) selected: Component[] = []
80
- @property({ type: Array }) specificProps: any
81
- @property({ type: String }) tabName: string | null = 'shape'
82
- @property({ type: Boolean }) collapsed: boolean = false
83
- @property({ type: Array }) fonts: any[] = []
84
- @property({ type: Array }) propertyEditor: any[] = []
85
-
86
- propertyTarget: Component | null = null
87
-
88
- firstUpdated() {
89
- this.renderRoot.addEventListener('property-change', this._onPropertyChanged.bind(this) as EventListener)
90
- this.renderRoot.addEventListener('bounds-change', this._onBoundsChanged.bind(this) as EventListener)
91
- }
92
-
93
- updated(change: PropertyValues<this>) {
94
- change.has('scene') && this._onSceneChanged()
95
- change.has('selected') && this._onSelectedChanged(this.selected)
96
- change.has('collapsed') && this._onCollapsed(this.collapsed)
97
- }
98
-
99
- static get scopedElements() {
100
- return {
101
- 'property-shape': PropertyShapes,
102
- 'property-style': PropertyStyles,
103
- 'property-effect': PropertyEffects,
104
- 'property-specific': PropertySpecific,
105
- 'property-data-binding': PropertyDataBinding,
106
- 'scene-inspector': SceneInspector
107
- }
108
- }
109
-
110
- render() {
111
- var tabName = this.tabName ? this.tabName : 'shape'
112
-
113
- return html`
114
- <div
115
- tab
116
- @click=${(e: MouseEvent) => {
117
- this.tabName = (e.target as HTMLElement).getAttribute('name')
118
- }}
119
- >
120
- <md-icon name="shape" ?selected=${tabName == 'shape'}>format_shapes</md-icon>
121
- <md-icon name="style" ?selected=${tabName == 'style'}>palette</md-icon>
122
- <md-icon name="effect" ?selected=${tabName == 'effect'}>movie_filter</md-icon>
123
- <md-icon name="specific" ?selected=${tabName == 'specific'}>tune</md-icon>
124
- <md-icon name="data-binding" ?selected=${tabName == 'data-binding'}>share</md-icon>
125
- <md-icon name="inspector" ?selected=${tabName == 'inspector'}>visibility</md-icon>
126
- </div>
127
-
128
- <div content>
129
- ${html`
130
- ${{
131
- shape: html`
132
- <property-shape
133
- .value=${this.model}
134
- .bounds=${this.bounds}
135
- .selected=${this.selected}
136
- ?active=${tabName == 'shape'}
137
- >
138
- </property-shape>
139
- `,
140
- style: html`
141
- <property-style
142
- .value=${this.model}
143
- .selected=${this.selected}
144
- .fonts=${this.fonts}
145
- ?active=${tabName == 'style'}
146
- >
147
- </property-style>
148
- `,
149
- effect: html`
150
- <property-effect .value=${this.model} .scene=${this.scene} ?active=${tabName == 'effect'}>
151
- </property-effect>
152
- `,
153
- specific: html`
154
- <property-specific
155
- .value=${this.model}
156
- .scene=${this.scene}
157
- .selected=${this.selected}
158
- .props=${this.specificProps}
159
- .propertyEditor=${this.propertyEditor}
160
- ?active=${tabName == 'specific'}
161
- >
162
- </property-specific>
163
- `,
164
- 'data-binding': html`
165
- <property-data-binding .scene=${this.scene} .value=${this.model} ?active=${tabName == 'data-binding'}>
166
- </property-data-binding>
167
- `,
168
- inspector: html`
169
- <scene-inspector .scene=${this.scene} ?active=${tabName == 'inspector'}></scene-inspector>
170
- `
171
- }[this.tabName!]}
172
- `}
173
- </div>
174
- `
175
- }
176
-
177
- _onPropertyChanged(e: CustomEvent) {
178
- var detail = e.detail
179
-
180
- if (this.propertyTarget) {
181
- /* 단일 컴포넌트의 경우에 적용 */
182
- this.scene && this.scene.undoableChange(() => this.propertyTarget!.set(detail))
183
- } else {
184
- /* 여러 컴포넌트의 경우에 적용 */
185
- this.scene && this.scene.undoableChange(() => this.selected.forEach(component => component.set(detail)))
186
- }
187
- }
188
-
189
- _onBoundsChanged(e: CustomEvent) {
190
- var detail = e.detail
191
-
192
- if (!this.scene) {
193
- return
194
- }
195
-
196
- if (this.propertyTarget) {
197
- /* 단일 컴포넌트의 경우에 적용 */
198
- this.scene.undoableChange(() => {
199
- this.propertyTarget!.bounds = {
200
- ...this.propertyTarget!.bounds,
201
- ...detail
202
- }
203
- })
204
- } else {
205
- /* 여러 컴포넌트의 경우에 적용 */
206
- this.scene.undoableChange(() => {
207
- this.selected.forEach(component => {
208
- component.bounds = {
209
- ...component.bounds,
210
- ...detail
211
- }
212
- })
213
- })
214
- }
215
- }
216
-
217
- _onChangedByScene() {
218
- if (this.propertyTarget) {
219
- this.model = {
220
- ...this.propertyTarget.model
221
- }
222
- this._setBounds(this.propertyTarget.bounds)
223
- }
224
- }
225
-
226
- _setPropertyTargetAsDefault() {
227
- if (!this.scene) {
228
- this._setPropertyTarget(null)
229
- this.specificProps = []
230
- this.model = null
231
- this.bounds = {}
232
- } else {
233
- this.scene.select('model-layer')
234
- }
235
- }
236
-
237
- _onCollapsed(collapsed: boolean) {
238
- !collapsed && (this.style.display = '')
239
-
240
- this.animate(
241
- collapsed
242
- ? [
243
- { transform: 'translateX(0)', opacity: 1, easing: 'ease-in' },
244
- { transform: 'translateX(100%)', opacity: 1 }
245
- ]
246
- : [
247
- { transform: 'translateX(100%)', opacity: 1 },
248
- { transform: 'translateX(0)', opacity: 1, easing: 'ease-out' }
249
- ],
250
- {
251
- duration: 500
252
- }
253
- ).onfinish = () => {
254
- collapsed && (this.style.display = 'none')
255
- dispatchEvent(new Event('resize'))
256
- }
257
- }
258
-
259
- async _onSceneChanged() {
260
- await this.updateComplete
261
-
262
- if (this.scene) this.selected = this.scene.select('model-layer')
263
- }
264
-
265
- async _onSelectedChanged(after: Component[]) {
266
- await this.updateComplete
267
-
268
- if (after.length == 1) {
269
- this._setPropertyTarget(after[0])
270
- // 컴포넌트 특성 속성(specific properties)을 먼저 바꾸고, 모델을 바꾸어준다.
271
- // 컴포넌트 속성에 따라 UI 컴포넌트가 준비되고, 이후에 모델값을 보여주도록 하기 위해서이다.
272
- this.specificProps = deepClone(this.propertyTarget!.nature.properties)
273
- this.model = {
274
- ...this.propertyTarget!.model
275
- }
276
- this._setBounds(this.propertyTarget!.bounds)
277
- } else if (after.length == 0) {
278
- // 선택이 안된 경우
279
-
280
- this._setPropertyTargetAsDefault()
281
- } else {
282
- // 다중 선택된 경우
283
-
284
- var type = after[0].model.type
285
- for (let i = 1; i < after.length; i++) {
286
- if (after[i].model.type != type) {
287
- type = undefined
288
- break
289
- }
290
- }
291
-
292
- this._setPropertyTarget(null)
293
-
294
- if (type) this.specificProps = deepClone(after[0].nature.properties)
295
- else this.specificProps = null
296
-
297
- this.model = {
298
- type: type,
299
- alpha: 1
300
- }
301
- this.bounds = {}
302
- }
303
- }
304
-
305
- _setPropertyTarget(newTarget: Component | null) {
306
- var oldTarget = this.propertyTarget
307
-
308
- if (oldTarget) {
309
- oldTarget.off('change', this._onChangedByScene, this)
310
- }
311
- if (newTarget) {
312
- newTarget.on('change', this._onChangedByScene, this)
313
- }
314
-
315
- this.propertyTarget = newTarget
316
- }
317
-
318
- _setBounds(bounds: BOUNDS) {
319
- this.bounds = {
320
- left: bounds.left,
321
- top: bounds.top,
322
- width: Math.round(bounds.width),
323
- height: Math.round(bounds.height)
324
- }
325
- }
326
- }
@@ -1,94 +0,0 @@
1
- import { css } from 'lit'
2
-
3
- export const BoxPaddingEditorStyles = css`
4
- .box-padding {
5
- width: 100%;
6
- }
7
-
8
- .box-padding td {
9
- background: var(--url-icon-properties-padding) 50% 0 no-repeat;
10
- }
11
-
12
- .box-padding tr:nth-child(1),
13
- .box-padding tr:nth-child(3) {
14
- height: 20px;
15
- }
16
-
17
- .box-padding tr td:nth-child(1),
18
- .box-padding tr td:nth-child(3) {
19
- width: 18px;
20
- }
21
-
22
- .box-padding .slide1 {
23
- background-position: 0 0;
24
- }
25
-
26
- .box-padding .slide2 {
27
- background-position: 50% -40px;
28
- background-color: rgba(69, 46, 41, 0.2);
29
- }
30
-
31
- .box-padding .slide3 {
32
- background-position: 100% -440px;
33
- }
34
-
35
- .box-padding .slide4 {
36
- background-position: 0 -360px;
37
- background-color: rgba(69, 46, 41, 0.2);
38
- }
39
-
40
- .box-padding .slide5 {
41
- background: none;
42
- text-align: center;
43
- }
44
-
45
- .box-padding .slide6 {
46
- background-position: 100% -160px;
47
- background-color: rgba(69, 46, 41, 0.2);
48
- }
49
-
50
- .box-padding .slide7 {
51
- background-position: 0 100%;
52
- }
53
-
54
- .box-padding .slide8 {
55
- background-position: 50% -320px;
56
- background-color: rgba(69, 46, 41, 0.2);
57
- }
58
-
59
- .box-padding .slide9 {
60
- background-position: 0 0px;
61
- }
62
-
63
- .box-padding input {
64
- background-color: transparent;
65
- width: 35px;
66
- margin: 0px;
67
- padding: 0px;
68
- clear: both;
69
- float: initial;
70
- border: 1px solid #fff;
71
- border-width: 0 0 1px 0;
72
- text-align: right;
73
- font-size: 14px;
74
- }
75
-
76
- .slide5 input:nth-child(1),
77
- .slide5 input:nth-child(4) {
78
- display: block;
79
- margin: auto;
80
- }
81
-
82
- .slide5 input:nth-child(2) {
83
- float: left;
84
- }
85
-
86
- .slide5 input:nth-child(3) {
87
- float: right;
88
- margin-top: -25px;
89
- }
90
-
91
- .slide5 input:nth-child(4) {
92
- margin-top: -5px;
93
- }
94
- `