@operato/process 7.1.31 → 7.1.33

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 (57) 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/preview.js +0 -52
  6. package/.storybook/server.mjs +0 -8
  7. package/demo/index-modeller.html +0 -112
  8. package/demo/index-viewer.html +0 -112
  9. package/demo/index.html +0 -112
  10. package/src/data-storage/data-storage.ts +0 -47
  11. package/src/graphql/data-subscription.ts +0 -30
  12. package/src/graphql/favorite-process.ts +0 -25
  13. package/src/graphql/index.ts +0 -3
  14. package/src/graphql/process-group.ts +0 -138
  15. package/src/graphql/process.ts +0 -141
  16. package/src/graphql/scenario.ts +0 -79
  17. package/src/index.ts +0 -8
  18. package/src/modeller/component-toolbar/component-detail.ts +0 -58
  19. package/src/modeller/component-toolbar/component-menu.ts +0 -193
  20. package/src/modeller/component-toolbar/component-toolbar.ts +0 -196
  21. package/src/modeller/component-toolbar/mode-icons.ts +0 -88
  22. package/src/modeller/edit-toolbar-style.ts +0 -229
  23. package/src/modeller/edit-toolbar.ts +0 -576
  24. package/src/modeller/property-sidebar/abstract-property.ts +0 -69
  25. package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +0 -475
  26. package/src/modeller/property-sidebar/data-binding/data-binding.ts +0 -479
  27. package/src/modeller/property-sidebar/effects/effects-shared-style.ts +0 -62
  28. package/src/modeller/property-sidebar/effects/effects.ts +0 -52
  29. package/src/modeller/property-sidebar/effects/property-event-hover.ts +0 -201
  30. package/src/modeller/property-sidebar/effects/property-event-tap.ts +0 -212
  31. package/src/modeller/property-sidebar/effects/property-event.ts +0 -76
  32. package/src/modeller/property-sidebar/effects/property-shadow.ts +0 -114
  33. package/src/modeller/property-sidebar/effects/value-converter.ts +0 -23
  34. package/src/modeller/property-sidebar/inspector/inspector.ts +0 -408
  35. package/src/modeller/property-sidebar/property-shared-style.ts +0 -136
  36. package/src/modeller/property-sidebar/property-sidebar.ts +0 -342
  37. package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +0 -94
  38. package/src/modeller/property-sidebar/shapes/shapes.ts +0 -410
  39. package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +0 -147
  40. package/src/modeller/property-sidebar/specifics/specifics.ts +0 -81
  41. package/src/modeller/property-sidebar/styles/styles.ts +0 -577
  42. package/src/ox-editor-process-selector.ts +0 -91
  43. package/src/ox-process-list.ts +0 -401
  44. package/src/ox-process-modeller.ts +0 -432
  45. package/src/ox-process-template-list.ts +0 -272
  46. package/src/ox-process-template-viewer.ts +0 -198
  47. package/src/ox-process-viewer.ts +0 -575
  48. package/src/ox-property-editor-process-selector.ts +0 -23
  49. package/src/selector/ox-process-creation-card.ts +0 -95
  50. package/src/selector/ox-process-selector.ts +0 -324
  51. package/src/selector/process-creation-popup.ts +0 -151
  52. package/src/selector/process-thumbnail-card.ts +0 -175
  53. package/src/types.ts +0 -57
  54. package/stories/index.stories.ts +0 -54
  55. package/tsconfig.json +0 -24
  56. package/web-dev-server.config.mjs +0 -30
  57. package/web-test-runner.config.mjs +0 -29
@@ -1,342 +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 { PropertyShapes } from './shapes/shapes.js'
18
- import { PropertySpecific } from './specifics/specifics.js'
19
- import { PropertyStyles } from './styles/styles.js'
20
- import { SceneInspector } from './inspector/inspector'
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
- user-select: none;
33
-
34
- --input-padding: var(--spacing-small);
35
- --label-font: var(--property-sidebar-fieldset-label);
36
- }
37
-
38
- [tab] {
39
- display: flex;
40
- background-color: rgba(0, 0, 0, 0.08);
41
- opacity: 0.85;
42
- }
43
-
44
- [tab] md-icon {
45
- flex: 1;
46
-
47
- display: flex;
48
- align-items: center;
49
- justify-content: center;
50
-
51
- color: var(--property-sidebar-tab-icon-color);
52
- height: 40px;
53
- }
54
-
55
- [tab] [selected] {
56
- background-color: var(--property-sidebar-background-color, var(--md-sys-color-secondary-container));
57
- border-left: 1px solid rgba(255, 255, 255, 0.5);
58
- border-right: 1px solid rgba(0, 0, 0, 0.15);
59
- opacity: 1;
60
- }
61
-
62
- [content] {
63
- flex: 1;
64
-
65
- overflow: hidden;
66
- overflow-y: auto;
67
- }
68
-
69
- [content] > :not([active]) {
70
- display: none;
71
- }
72
-
73
- [hidden] {
74
- display: none !important;
75
- }
76
- `
77
- ]
78
-
79
- @property({ type: Object }) scene: Scene | null = null
80
- @property({ type: Object }) bounds: any = {}
81
- @property({ type: Object }) model: Model | null = {}
82
- @property({ type: Array }) selected: Component[] = []
83
- @property({ type: Array }) specificProps: any
84
- @property({ type: String }) tabName: string | null = 'specific'
85
- @property({ type: Boolean }) collapsed: boolean = false
86
- @property({ type: Array }) fonts: any[] = []
87
- @property({ type: Array }) propertyEditor: any[] = []
88
-
89
- @property({ type: Boolean, attribute: 'hide-data-binding' }) hideDataBinding: boolean = false
90
- @property({ type: Boolean, attribute: 'hide-effect' }) hideEffect: boolean = false
91
- @property({ type: Boolean, attribute: 'hide-inspector' }) hideInspector: boolean = false
92
- @property({ type: Boolean, attribute: 'hide-shape' }) hideShape: boolean = false
93
- @property({ type: Boolean, attribute: 'hide-style' }) hideStyle: boolean = false
94
- @property({ type: Boolean, attribute: 'hide-specific' }) hideSpecific: boolean = false
95
-
96
- propertyTarget: Component | null = null
97
-
98
- firstUpdated() {
99
- this.renderRoot.addEventListener('property-change', this._onPropertyChanged.bind(this) as EventListener)
100
- this.renderRoot.addEventListener('bounds-change', this._onBoundsChanged.bind(this) as EventListener)
101
- }
102
-
103
- updated(change: PropertyValues<this>) {
104
- change.has('scene') && this._onSceneChanged()
105
- change.has('selected') && this._onSelectedChanged(this.selected)
106
- change.has('collapsed') && this._onCollapsed(this.collapsed)
107
- }
108
-
109
- static get scopedElements() {
110
- return {
111
- 'process-property-shape': PropertyShapes,
112
- 'process-property-style': PropertyStyles,
113
- 'process-property-effect': PropertyEffects,
114
- 'process-property-specific': PropertySpecific,
115
- 'process-property-data-binding': PropertyDataBinding,
116
- 'process-scene-inspector': SceneInspector
117
- }
118
- }
119
-
120
- render() {
121
- var tabName = this.tabName ? this.tabName : 'specific'
122
-
123
- return html`
124
- <div
125
- tab
126
- @click=${(e: MouseEvent) => {
127
- this.tabName = (e.target as HTMLElement).getAttribute('name')
128
- }}
129
- >
130
- <md-icon name="specific" ?selected=${tabName == 'specific'} ?hidden=${this.hideSpecific}>tune</md-icon>
131
- <md-icon name="shape" ?selected=${tabName == 'shape'} ?hidden=${this.hideShape}>format_shapes</md-icon>
132
- <md-icon name="style" ?selected=${tabName == 'style'} ?hidden=${this.hideStyle}>palette</md-icon>
133
- <md-icon name="effect" ?selected=${tabName == 'effect'} ?hidden=${this.hideEffect}>movie_filter</md-icon>
134
- <md-icon name="data-binding" ?selected=${tabName == 'data-binding'} ?hidden=${this.hideDataBinding}
135
- >share</md-icon
136
- >
137
- <md-icon name="inspector" ?selected=${tabName == 'inspector'} ?hidden=${this.hideInspector}>visibility</md-icon>
138
- </div>
139
-
140
- <div content>
141
- ${html`
142
- ${{
143
- specific: html`
144
- <process-property-specific
145
- .value=${this.model}
146
- .scene=${this.scene}
147
- .selected=${this.selected}
148
- .props=${this.specificProps}
149
- .propertyEditor=${this.propertyEditor}
150
- ?active=${tabName == 'specific'}
151
- >
152
- </process-property-specific>
153
- `,
154
- shape: html`
155
- <process-property-shape
156
- .value=${this.model}
157
- .bounds=${this.bounds}
158
- .selected=${this.selected}
159
- ?active=${tabName == 'shape'}
160
- >
161
- </process-property-shape>
162
- `,
163
- style: html`
164
- <process-property-style
165
- .value=${this.model}
166
- .selected=${this.selected}
167
- .fonts=${this.fonts}
168
- ?active=${tabName == 'style'}
169
- >
170
- </process-property-style>
171
- `,
172
- effect: html`
173
- <process-property-effect .value=${this.model} .scene=${this.scene} ?active=${tabName == 'effect'}>
174
- </process-property-effect>
175
- `,
176
- 'data-binding': html`
177
- <process-property-data-binding
178
- .scene=${this.scene}
179
- .value=${this.model}
180
- ?active=${tabName == 'data-binding'}
181
- >
182
- </process-property-data-binding>
183
- `,
184
- inspector: html`
185
- <process-scene-inspector .scene=${this.scene} ?active=${tabName == 'inspector'}></process-scene-inspector>
186
- `
187
- }[this.tabName!]}
188
- `}
189
- </div>
190
- `
191
- }
192
-
193
- _onPropertyChanged(e: CustomEvent) {
194
- var detail = e.detail
195
-
196
- if (this.propertyTarget) {
197
- /* 단일 컴포넌트의 경우에 적용 */
198
- this.scene && this.scene.undoableChange(() => this.propertyTarget!.set(detail))
199
- } else {
200
- /* 여러 컴포넌트의 경우에 적용 */
201
- this.scene && this.scene.undoableChange(() => this.selected.forEach(component => component.set(detail)))
202
- }
203
- }
204
-
205
- _onBoundsChanged(e: CustomEvent) {
206
- var detail = e.detail
207
-
208
- if (!this.scene) {
209
- return
210
- }
211
-
212
- if (this.propertyTarget) {
213
- /* 단일 컴포넌트의 경우에 적용 */
214
- this.scene.undoableChange(() => {
215
- this.propertyTarget!.bounds = {
216
- ...this.propertyTarget!.bounds,
217
- ...detail
218
- }
219
- })
220
- } else {
221
- /* 여러 컴포넌트의 경우에 적용 */
222
- this.scene.undoableChange(() => {
223
- this.selected.forEach(component => {
224
- component.bounds = {
225
- ...component.bounds,
226
- ...detail
227
- }
228
- })
229
- })
230
- }
231
- }
232
-
233
- _onChangedByScene() {
234
- if (this.propertyTarget) {
235
- this.model = {
236
- ...this.propertyTarget.model
237
- }
238
- this._setBounds(this.propertyTarget.bounds)
239
- }
240
- }
241
-
242
- _setPropertyTargetAsDefault() {
243
- if (!this.scene) {
244
- this._setPropertyTarget(null)
245
- this.specificProps = []
246
- this.model = null
247
- this.bounds = {}
248
- } else {
249
- this.scene.select('model-layer')
250
- }
251
- }
252
-
253
- _onCollapsed(collapsed: boolean) {
254
- !collapsed && (this.style.display = '')
255
-
256
- this.animate(
257
- collapsed
258
- ? [
259
- { transform: 'translateX(0)', opacity: 1, easing: 'ease-in' },
260
- { transform: 'translateX(100%)', opacity: 1 }
261
- ]
262
- : [
263
- { transform: 'translateX(100%)', opacity: 1 },
264
- { transform: 'translateX(0)', opacity: 1, easing: 'ease-out' }
265
- ],
266
- {
267
- duration: 500
268
- }
269
- ).onfinish = () => {
270
- collapsed && (this.style.display = 'none')
271
- dispatchEvent(new Event('resize'))
272
- }
273
- }
274
-
275
- async _onSceneChanged() {
276
- await this.updateComplete
277
-
278
- if (this.scene) this.selected = this.scene.select('model-layer')
279
- }
280
-
281
- async _onSelectedChanged(after: Component[]) {
282
- await this.updateComplete
283
-
284
- if (after.length == 1) {
285
- this._setPropertyTarget(after[0])
286
- // 컴포넌트 특성 속성(specific properties)을 먼저 바꾸고, 모델을 바꾸어준다.
287
- // 컴포넌트 속성에 따라 UI 컴포넌트가 준비되고, 이후에 모델값을 보여주도록 하기 위해서이다.
288
- this.specificProps = deepClone(this.propertyTarget!.nature.properties)
289
- this.model = {
290
- ...this.propertyTarget!.model
291
- }
292
- this._setBounds(this.propertyTarget!.bounds)
293
- } else if (after.length == 0) {
294
- // 선택이 안된 경우
295
-
296
- this._setPropertyTargetAsDefault()
297
- } else {
298
- // 다중 선택된 경우
299
-
300
- var type = after[0].model.type
301
- for (let i = 1; i < after.length; i++) {
302
- if (after[i].model.type != type) {
303
- type = undefined
304
- break
305
- }
306
- }
307
-
308
- this._setPropertyTarget(null)
309
-
310
- if (type) this.specificProps = deepClone(after[0].nature.properties)
311
- else this.specificProps = null
312
-
313
- this.model = {
314
- type: type,
315
- alpha: 1
316
- }
317
- this.bounds = {}
318
- }
319
- }
320
-
321
- _setPropertyTarget(newTarget: Component | null) {
322
- var oldTarget = this.propertyTarget
323
-
324
- if (oldTarget) {
325
- oldTarget.off('change', this._onChangedByScene, this)
326
- }
327
- if (newTarget) {
328
- newTarget.on('change', this._onChangedByScene, this)
329
- }
330
-
331
- this.propertyTarget = newTarget
332
- }
333
-
334
- _setBounds(bounds: BOUNDS) {
335
- this.bounds = {
336
- left: bounds.left,
337
- top: bounds.top,
338
- width: Math.round(bounds.width),
339
- height: Math.round(bounds.height)
340
- }
341
- }
342
- }
@@ -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
- `