@operato/process 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 (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,479 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import '@material/web/icon/icon.js'
6
- import '@operato/help/ox-title-with-help.js'
7
- import '@operato/input/ox-buttons-radio.js'
8
- import '@operato/input/ox-input-data.js'
9
- import '@operato/i18n/ox-i18n.js'
10
-
11
- import { css, html, PropertyValues } from 'lit'
12
- import { property, query, state } from 'lit/decorators.js'
13
-
14
- import { Properties, Scene } from '@hatiolab/things-scene'
15
- import { ScopedElementsMixin } from '@open-wc/scoped-elements'
16
-
17
- import { AbstractProperty } from '../abstract-property.js'
18
- import { PropertySharedStyle } from '../property-shared-style.js'
19
- import { DataBindingMapper } from './data-binding-mapper.js'
20
-
21
- var clipboard = '{}'
22
-
23
- const PROPS = [
24
- '',
25
- 'text',
26
- ['fillStyle', 'fill style'],
27
- ['strokeStyle', 'stroke style'],
28
- ['fontColor', 'font color'],
29
- 'value',
30
- 'data',
31
- 'source',
32
- 'hidden',
33
- 'started',
34
- 'play',
35
- ['ref', 'reference'],
36
- 'options',
37
- 'rotate',
38
- 'dimension',
39
- 'location',
40
- 'accessor',
41
- ['tap', '(tap)'],
42
- '(action)'
43
- ].map(prop => {
44
- return typeof prop == 'string' ? { name: prop, label: prop } : { name: prop[0], label: prop[1] }
45
- })
46
-
47
- export class PropertyDataBinding extends ScopedElementsMixin(AbstractProperty) {
48
- static styles = [
49
- PropertySharedStyle,
50
- css`
51
- #tab-header {
52
- display: flex;
53
- align-items: center;
54
- justify-content: space-between;
55
- }
56
-
57
- #tab-header > md-icon {
58
- padding: 0;
59
- margin: 0;
60
- width: 25px;
61
- height: 25px;
62
- font-size: x-large;
63
- border-bottom: 1px solid rgba(0, 0, 0, 0.2);
64
- }
65
-
66
- fieldset[collapsable] legend {
67
- box-sizing: border-box;
68
- width: 100%;
69
- }
70
-
71
- fieldset[collapsable] legend md-icon {
72
- float: right;
73
- font-size: medium;
74
- margin: 0;
75
- }
76
-
77
- fieldset[collapsable][collapsed] > :not(legend) {
78
- display: none;
79
- }
80
-
81
- ox-buttons-radio {
82
- flex: 1;
83
- height: 25px;
84
- border: 1px solid rgba(0, 0, 0, 0.2);
85
- border-width: 1px 1px 0 1px;
86
- text-align: center;
87
-
88
- display: flex;
89
- padding: 0;
90
- box-sizing: border-box;
91
-
92
- width: 0; /* limit width */
93
- overflow-x: hidden;
94
- }
95
-
96
- ox-buttons-radio > div {
97
- background-color: rgba(0, 0, 0, 0.2);
98
- border: 1px solid rgba(0, 0, 0, 0.07);
99
- border-width: 0 0 2px 0;
100
- padding: 0;
101
- color: #fff;
102
- font-size: 13px;
103
- max-width: 25px;
104
- min-width: 25px;
105
- }
106
-
107
- ox-buttons-radio > div[disabled] {
108
- background-color: rgba(0, 0, 0, 0.1);
109
- }
110
-
111
- ox-buttons-radio > div[active] {
112
- border-color: rgb(242, 71, 28);
113
- }
114
-
115
- ox-buttons-radio > div.iron-selected {
116
- background-color: var(--md-sys-color-surface);
117
- color: var(--md-sys-color-on-surface);
118
- }
119
-
120
- div[binding] {
121
- display: flex;
122
- flex-direction: row-reverse;
123
- background-color: var(--md-sys-color-surface);
124
- color: var(--md-sys-color-on-surface);
125
- overflow: hidden;
126
- border-style: solid;
127
- border-color: rgba(0, 0, 0, 0.2);
128
- border-image: initial;
129
- border-width: 0px 1px;
130
- padding: 7px 5px 2px 5px;
131
- }
132
-
133
- md-icon {
134
- margin-left: 5px;
135
- color: var(--md-sys-color-on-secondary-container);
136
- opacity: 0.8;
137
- cursor: pointer;
138
- --md-icon-size: 18px;
139
- }
140
-
141
- md-icon:hover {
142
- color: var(--md-sys-color-on-primary-container);
143
- opacity: 1;
144
- }
145
-
146
- md-icon[disabled] {
147
- color: rgba(0, 0, 0, 0.1);
148
- }
149
-
150
- data-binding-mapper {
151
- --things-select: {
152
- min-width: 50%;
153
- margin-bottom: 10px;
154
- padding: 3px 20px 2px 5px;
155
- -webkit-border-radius: 4px;
156
- -moz-border-radius: 4px;
157
- border-radius: 4px;
158
- border: 1px solid rgba(0, 0, 0, 0.15);
159
- font-size: 15px;
160
- font-weight: 300;
161
- -webkit-appearance: none;
162
- };
163
- }
164
- `
165
- ]
166
-
167
- @property({ type: Object }) value?: Properties
168
- @property({ type: Object }) scene?: Scene
169
-
170
- @state() mappingIndex: number = 0
171
- @state() _afterRender?: Function | null
172
- @state() _dataExpanded: boolean = false
173
-
174
- @query('#tabs') tabs!: HTMLElement
175
- @query('#tab-nav-left-button') tabNavLeftButton!: HTMLElement
176
- @query('#tab-nav-right-button') tabNavRightButton!: HTMLElement
177
-
178
- private mapping: Properties = {}
179
-
180
- get mappings() {
181
- return this.value?.mappings || []
182
- }
183
-
184
- firstUpdated() {
185
- this.renderRoot.addEventListener('change', this._onValueChange.bind(this))
186
-
187
- this.tabContainer.addEventListener('scroll', () => {
188
- this._onTabScroll()
189
- })
190
- }
191
-
192
- updated(changes: PropertyValues<this>) {
193
- if (changes.has('value')) {
194
- this._onValueChanged()
195
- }
196
- }
197
-
198
- static get scopedElements() {
199
- return {
200
- 'data-binding-mapper': DataBindingMapper
201
- }
202
- }
203
-
204
- render() {
205
- const value = this.value || {
206
- mappings: []
207
- }
208
-
209
- return html`
210
- <fieldset>
211
- <legend>
212
- <ox-title-with-help topic="board-modeller/data-binding" msgid="label.identifier"
213
- >identifier</ox-title-with-help
214
- >
215
- </legend>
216
- <div class="property-grid">
217
- <label> <ox-i18n msgid="label.id">ID</ox-i18n> </label>
218
- <input value-key="id" .value=${value.id || ''} />
219
-
220
- <label> <ox-i18n msgid="label.class">Class</ox-i18n> </label>
221
- <input value-key="class" .value=${value.class || ''} />
222
-
223
- <label> <ox-i18n msgid="label.tag">Tag</ox-i18n> </label>
224
- <input value-key="tag" .value=${value.tag || ''} />
225
-
226
- <label> <ox-i18n msgid="label.template-prefix">Template Prefix</ox-i18n> </label>
227
- <input value-key="templatePrefix" .value=${value.templatePrefix || ''} />
228
-
229
- <div class="checkbox-row">
230
- <input id="checkbox-ndns" type="checkbox" value-key="ndns" .checked=${value.ndns} />
231
- <label for="checkbox-ndns"> <ox-i18n msgid="label.ndns">No Data No Show</ox-i18n> </label>
232
- </div>
233
-
234
- <div class="checkbox-row">
235
- <input id="checkbox-sensitive" type="checkbox" value-key="sensitive" .checked=${value.sensitive} />
236
- <label for="checkbox-sensitive">
237
- <ox-i18n msgid="label.intent-sensitive">Intent Sensitive</ox-i18n>
238
- </label>
239
- </div>
240
-
241
- <div class="checkbox-row">
242
- <input id="checkbox-persistent" type="checkbox" value-key="persistent" .checked=${value.persistent} />
243
- <label for="checkbox-persistent">
244
- <ox-i18n msgid="label.persistent-data">Persistent Data</ox-i18n>
245
- </label>
246
- </div>
247
- </div>
248
- </fieldset>
249
-
250
- <fieldset collapsable ?collapsed=${!this._dataExpanded}>
251
- <legend>
252
- <ox-title-with-help topic="board-modeller/initial-data" msgid="label.initial-data"
253
- >initial value</ox-title-with-help
254
- >
255
- <md-icon
256
- @click=${() => {
257
- this._dataExpanded = !this._dataExpanded
258
- }}
259
- >${this._dataExpanded ? 'expand_less' : 'expand_more'}</md-icon
260
- >
261
- </legend>
262
- <ox-input-data value-key="data" .value=${value.data}> </ox-input-data>
263
- </fieldset>
264
-
265
- <fieldset>
266
- <legend>
267
- <ox-title-with-help topic="board-modeller/data-spread" msgid="label.data-spread"
268
- >Data Spread</ox-title-with-help
269
- >
270
- </legend>
271
-
272
- <div id="tab-header">
273
- <md-icon
274
- id="tab-nav-left-button"
275
- @click=${() => {
276
- this._onTabScrollNavLeft()
277
- }}
278
- disabled
279
- >chevron_left</md-icon
280
- >
281
-
282
- <ox-buttons-radio
283
- id="tabs"
284
- .value=${String(this.mappingIndex)}
285
- @change=${(e: Event) => {
286
- e.stopPropagation()
287
- this._setMappingIndex((e.target as any).value)
288
- }}
289
- >
290
- ${this.mappings.map((m: string, i: number) => html` <div data-value=${i} data-mapping>${i + 1}</div> `)}
291
- <div data-value=${this.mappings.length} data-mapping disabled>${this.mappings.length + 1}</div>
292
- </ox-buttons-radio>
293
-
294
- <md-icon
295
- id="tab-nav-right-button"
296
- @click=${(e: Event) => {
297
- this._onTabScrollNavRight()
298
- }}
299
- disabled
300
- >chevron_right</md-icon
301
- >
302
- </div>
303
-
304
- <div binding>
305
- <md-icon style="font-size:19px" @click=${() => this._clearDataBindingMapper()} title="delete current tab"
306
- >delete_forever</md-icon
307
- >
308
- <md-icon @click=${() => this._pasteDataBindingMapper()} title="replace current tab">content_paste</md-icon>
309
- <md-icon style="font-size:17px" @click=${() => this._copyDataBindingMapper()} title="copy current tab"
310
- >content_copy</md-icon
311
- >
312
- </div>
313
-
314
- <data-binding-mapper
315
- @value-change=${(e: CustomEvent) => this._onMappingChanged(e)}
316
- .scene=${this.scene}
317
- .mapping=${(value.mappings && value.mappings[this.mappingIndex]) || {}}
318
- .properties=${PROPS}
319
- >
320
- </data-binding-mapper>
321
- </fieldset>
322
- `
323
- }
324
-
325
- _setMappingIndex(idx: number) {
326
- this.mappingIndex = isNaN(Number(idx)) ? 0 : Number(idx)
327
-
328
- this._onTabScroll()
329
- }
330
-
331
- _clearDataBindingMapper() {
332
- var mappings = [...(this.value?.mappings || [])]
333
- mappings.splice(this.mappingIndex, 1)
334
- this._onAfterValueChange(
335
- 'mappings',
336
- mappings.filter(m => !!m)
337
- )
338
- }
339
-
340
- _copyDataBindingMapper() {
341
- clipboard = JSON.stringify(this.mappings[this.mappingIndex])
342
- }
343
-
344
- async _pasteDataBindingMapper() {
345
- var index = this.mappingIndex
346
- var mappings = [...(this.value?.mappings || [])]
347
- mappings[this.mappingIndex] = JSON.parse(clipboard)
348
-
349
- this._onAfterValueChange('mappings', mappings)
350
-
351
- setTimeout(() => {
352
- this._setMappingIndex(index)
353
- }, 100)
354
- }
355
-
356
- async _onValueChanged() {
357
- await this.updateComplete
358
-
359
- if (this._afterRender) {
360
- this._afterRender()
361
- } else {
362
- this._setMappingIndex(0)
363
- }
364
-
365
- this._afterRender = null
366
- }
367
-
368
- _onValueChange(e: Event) {
369
- var element = e.target as HTMLElement
370
- var key = element.getAttribute('value-key')
371
-
372
- var value = this._getValueFromEventTarget(element)
373
-
374
- if (!key) {
375
- return
376
- }
377
-
378
- this.value = {
379
- ...this.value,
380
- [key]: value
381
- }
382
-
383
- this._onAfterValueChange(key, value)
384
- }
385
-
386
- get tabContainer() {
387
- return this.tabs
388
- }
389
-
390
- async _onMappingChanged(e: CustomEvent) {
391
- var mapping = (e.target as any).mapping
392
-
393
- /* data spread target의 변경이 있는 경우, target 컴포넌트들의 태그를 블링크 시킨다 */
394
- if (mapping && mapping.target) {
395
- this.scene &&
396
- this.scene.findAll(mapping.target, this.scene.selected && this.scene.selected[0]).forEach((c, i) => {
397
- if (i == 0) c.trigger('decotagreset')
398
- c.trigger('decotag', {})
399
- })
400
- }
401
-
402
- /* mapping의 모든 속성이 편집되면, 모델에 반영한다. */
403
- var mappings = [...(this.value?.mappings || [])]
404
-
405
- if (mapping.target && mapping.property && mapping.rule) {
406
- mappings[this.mappingIndex] = mapping
407
-
408
- var mappingIdx = this.mappingIndex
409
- this._afterRender = () => {
410
- this._setMappingIndex(mappingIdx)
411
- this.tabContainer.scrollLeft = this.tabContainer.scrollWidth
412
- }
413
-
414
- this.dispatchEvent(
415
- new CustomEvent('property-change', {
416
- bubbles: true,
417
- composed: true,
418
- detail: {
419
- mappings: mappings.filter(m => !!m)
420
- }
421
- })
422
- )
423
-
424
- await this.requestUpdate()
425
- } else if (!mapping.target && !mapping.property) {
426
- const { accessor, source } = e.detail?.changed || {}
427
-
428
- // accessor나 source를 입력중인 경우 tabIndex Change 방지
429
- if (!accessor && !source) {
430
- mappings[this.mappingIndex] = null
431
- var nextMappingIdx = Math.max(this.mappingIndex - 1, 0)
432
- this._afterRender = () => {
433
- this._setMappingIndex(nextMappingIdx)
434
- }
435
- this.dispatchEvent(
436
- new CustomEvent('property-change', {
437
- bubbles: true,
438
- composed: true,
439
- detail: {
440
- mappings: mappings.filter(m => !!m)
441
- }
442
- })
443
- )
444
- }
445
- }
446
- }
447
-
448
- _onTabScroll() {
449
- if (this.tabContainer.clientWidth == this.tabContainer.scrollWidth) {
450
- this.tabNavLeftButton.setAttribute('disabled', '')
451
- this.tabNavRightButton.setAttribute('disabled', '')
452
- }
453
- // left-end
454
- else if (this.tabContainer.scrollLeft == 0) {
455
- this.tabNavLeftButton.setAttribute('disabled', '')
456
- this.tabNavRightButton.removeAttribute('disabled')
457
- }
458
- // right-end
459
- else if (this.tabContainer.scrollLeft + this.tabContainer.clientWidth >= this.tabContainer.scrollWidth) {
460
- this.tabNavLeftButton.removeAttribute('disabled')
461
- this.tabNavRightButton.setAttribute('disabled', '')
462
- } else {
463
- this.tabNavLeftButton.removeAttribute('disabled')
464
- this.tabNavRightButton.removeAttribute('disabled')
465
- }
466
- }
467
-
468
- _onTabScrollNavLeft() {
469
- this.tabContainer.style.scrollBehavior = 'smooth'
470
- this.tabContainer.scrollLeft -= this.tabContainer.clientWidth
471
- this.tabContainer.style.scrollBehavior = 'auto'
472
- }
473
-
474
- _onTabScrollNavRight() {
475
- this.tabContainer.style.scrollBehavior = 'smooth'
476
- this.tabContainer.scrollLeft += this.tabContainer.clientWidth
477
- this.tabContainer.style.scrollBehavior = 'auto'
478
- }
479
- }
@@ -1,62 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import { css } from 'lit'
6
-
7
- export const EffectsSharedStyle = css`
8
- :host {
9
- display: grid;
10
- grid-template-columns: repeat(10, 1fr);
11
- grid-gap: 5px;
12
- grid-auto-rows: minmax(24px, auto);
13
-
14
- align-items: center;
15
- }
16
-
17
- * {
18
- align-self: stretch;
19
- }
20
-
21
- label {
22
- grid-column: span 3;
23
- text-align: right;
24
- text-transform: capitalize;
25
-
26
- align-self: center;
27
- }
28
-
29
- input,
30
- select,
31
- ox-input-angle,
32
- ox-input-color,
33
- [custom-editor] {
34
- grid-column: span 7;
35
- }
36
-
37
- input,
38
- select,
39
- ox-input-angle input,
40
- ox-input-color input,
41
- [custom-editor] input {
42
- border: var(--property-sidebar-fieldset-border);
43
- }
44
-
45
- ox-input-data {
46
- height: 300px;
47
- }
48
-
49
- input[type='checkbox'] {
50
- grid-column: 4 / 5;
51
- align-self: center;
52
- }
53
-
54
- label.checkbox-label {
55
- grid-column: span 6;
56
- text-align: left;
57
- }
58
-
59
- [fullwidth] {
60
- grid-column: 1 / -1;
61
- }
62
- `
@@ -1,52 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import '@operato/i18n/ox-i18n.js'
6
- import '@operato/help/ox-title-with-help.js'
7
-
8
- import { html } from 'lit'
9
- import { property } from 'lit/decorators.js'
10
-
11
- import { Properties, Scene } from '@hatiolab/things-scene'
12
- import { ScopedElementsMixin } from '@open-wc/scoped-elements'
13
-
14
- import { AbstractProperty } from '../abstract-property.js'
15
- import { PropertySharedStyle } from '../property-shared-style.js'
16
- import { PropertyEvent } from './property-event.js'
17
- import { PropertyShadow } from './property-shadow.js'
18
-
19
- export class PropertyEffects extends ScopedElementsMixin(AbstractProperty) {
20
- static styles = [PropertySharedStyle]
21
-
22
- @property({ type: Object }) value?: Properties
23
- @property({ type: Object }) scene?: Scene
24
-
25
- firstUpdated() {
26
- this.renderRoot.addEventListener('change', this._onValueChange.bind(this))
27
- }
28
-
29
- static get scopedElements() {
30
- return {
31
- 'process-property-shadow': PropertyShadow,
32
- 'process-property-event': PropertyEvent
33
- }
34
- }
35
-
36
- render() {
37
- const value = this.value || {}
38
-
39
- return html`
40
- <fieldset>
41
- <legend>
42
- <ox-title-with-help topic="process-modeller/effects/shadow" msgid="label.shadow">shadow</ox-title-with-help>
43
- </legend>
44
-
45
- <process-property-shadow value-key="shadow" .value=${value.shadow || {}}> </process-property-shadow>
46
- </fieldset>
47
-
48
- <process-property-event value-key="event" .scene=${this.scene} .value=${value.event || {}}>
49
- </process-property-event>
50
- `
51
- }
52
- }