@operato/process 1.1.25 → 1.1.27
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 +17 -0
- package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +2 -0
- package/dist/src/modeller/component-toolbar/component-toolbar.js +29 -9
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
- package/dist/src/ox-process-modeller.d.ts +3 -3
- package/dist/src/ox-process-modeller.js +74 -68
- package/dist/src/ox-process-modeller.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/modeller/component-toolbar/component-toolbar.ts +34 -14
- package/src/ox-process-modeller.ts +79 -74
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/process",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.27",
|
|
4
4
|
"description": "Webcomponent for business process modeling following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@open-wc/scoped-elements": "^2.1.3",
|
|
54
|
-
"@operato/app": "^1.1.
|
|
55
|
-
"@operato/board": "^1.1.
|
|
56
|
-
"@operato/data-grist": "^1.1.
|
|
57
|
-
"@operato/font": "^1.1.
|
|
54
|
+
"@operato/app": "^1.1.27",
|
|
55
|
+
"@operato/board": "^1.1.27",
|
|
56
|
+
"@operato/data-grist": "^1.1.27",
|
|
57
|
+
"@operato/font": "^1.1.27",
|
|
58
58
|
"@operato/graphql": "^1.1.13",
|
|
59
59
|
"@operato/i18n": "^1.1.13",
|
|
60
|
-
"@operato/input": "^1.1.
|
|
60
|
+
"@operato/input": "^1.1.27",
|
|
61
61
|
"@operato/markdown": "^1.1.13",
|
|
62
62
|
"@operato/popup": "^1.1.23",
|
|
63
|
-
"@operato/property-editor": "^1.1.
|
|
63
|
+
"@operato/property-editor": "^1.1.27",
|
|
64
64
|
"@operato/styles": "^1.1.13",
|
|
65
65
|
"@operato/utils": "^1.1.15",
|
|
66
66
|
"@polymer/paper-dropdown-menu": "^3.2.0",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"prettier --write"
|
|
112
112
|
]
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "5605397be78c3f388251d275cd7d0f41c6ba53ff"
|
|
115
115
|
}
|
|
@@ -24,7 +24,17 @@ export class ComponentToolbar extends ScopedElementsMixin(LitElement) {
|
|
|
24
24
|
background-color: var(--component-toolbar-background-color);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
[components] {
|
|
28
|
+
display: block;
|
|
29
|
+
padding: 0;
|
|
30
|
+
margin: 0;
|
|
31
|
+
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[components] > img {
|
|
28
38
|
display: flex;
|
|
29
39
|
flex-direction: row;
|
|
30
40
|
|
|
@@ -63,6 +73,7 @@ export class ComponentToolbar extends ScopedElementsMixin(LitElement) {
|
|
|
63
73
|
|
|
64
74
|
@query('#shift') shift!: HTMLImageElement
|
|
65
75
|
@query('process-component-menu') private menu!: HTMLElement
|
|
76
|
+
@query('div[components]') private componentsContainer!: HTMLElement
|
|
66
77
|
@queryAll('[data-group]') private groups!: NodeListOf<HTMLElement>
|
|
67
78
|
|
|
68
79
|
private icons: { [name: string]: string } = {}
|
|
@@ -107,19 +118,21 @@ export class ComponentToolbar extends ScopedElementsMixin(LitElement) {
|
|
|
107
118
|
const modeIcon = this.icons[this.mode === SCENE_MODE.SHIFT ? 'mode-shift' : 'mode-edit']
|
|
108
119
|
|
|
109
120
|
return html`
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
<div components @mousewheel=${(e: MouseEvent) => this.onWheelEvent(e)}>
|
|
122
|
+
<img id="shift" .src=${modeIcon} @click=${(e: MouseEvent) => this._onClickShift(e)} />
|
|
123
|
+
|
|
124
|
+
${componentList
|
|
125
|
+
.filter(group => group.templates?.length > 0)
|
|
126
|
+
.map(
|
|
127
|
+
group => html`
|
|
128
|
+
<img
|
|
129
|
+
data-group=${group.name}
|
|
130
|
+
@click=${(e: MouseEvent) => this._onClickGroup(e)}
|
|
131
|
+
.src=${this.icons[group.name]}
|
|
132
|
+
/>
|
|
133
|
+
`
|
|
134
|
+
)}
|
|
135
|
+
</div>
|
|
123
136
|
|
|
124
137
|
<process-component-menu
|
|
125
138
|
tabindex="-1"
|
|
@@ -135,6 +148,13 @@ export class ComponentToolbar extends ScopedElementsMixin(LitElement) {
|
|
|
135
148
|
`
|
|
136
149
|
}
|
|
137
150
|
|
|
151
|
+
onWheelEvent(e: Event) {
|
|
152
|
+
var delta = Math.max(-1, Math.min(1, (e as WheelEvent).deltaY || -(e as WheelEvent).detail))
|
|
153
|
+
this.componentsContainer.scrollTop += delta * 10
|
|
154
|
+
|
|
155
|
+
e.preventDefault()
|
|
156
|
+
}
|
|
157
|
+
|
|
138
158
|
_setMode(mode: SCENE_MODE) {
|
|
139
159
|
this.mode = mode
|
|
140
160
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '@material/mwc-fab'
|
|
2
|
-
import '@hatiolab/things-scene'
|
|
3
|
-
import './ox-process-viewer'
|
|
4
2
|
import '@operato/board/ox-scene-handler.js'
|
|
5
3
|
import '@operato/board/ox-scene-layer.js'
|
|
6
4
|
import '@operato/board/ox-scene-property.js'
|
|
7
5
|
import '@operato/board/ox-scene-viewer.js'
|
|
6
|
+
import '@hatiolab/things-scene'
|
|
7
|
+
import './ox-process-viewer'
|
|
8
8
|
|
|
9
9
|
import { saveAs } from 'file-saver'
|
|
10
10
|
import { css, html, LitElement, PropertyValues } from 'lit'
|
|
@@ -15,11 +15,10 @@ import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
|
15
15
|
import { OxPopup } from '@operato/popup'
|
|
16
16
|
import { isMacOS, togglefullscreen } from '@operato/utils'
|
|
17
17
|
|
|
18
|
-
import { ComponentGroup, ComponentTemplate } from './types'
|
|
19
|
-
|
|
20
18
|
import { ComponentToolbar } from './modeller/component-toolbar/component-toolbar'
|
|
21
19
|
import { EditToolbar } from './modeller/edit-toolbar'
|
|
22
20
|
import { PropertySidebar } from './modeller/property-sidebar/property-sidebar'
|
|
21
|
+
import { ComponentGroup, ComponentTemplate } from './types'
|
|
23
22
|
|
|
24
23
|
const MACOS = isMacOS()
|
|
25
24
|
|
|
@@ -43,34 +42,38 @@ export class OxProcessModeller extends ScopedElementsMixin(LitElement) {
|
|
|
43
42
|
static styles = [
|
|
44
43
|
css`
|
|
45
44
|
:host {
|
|
46
|
-
display:
|
|
47
|
-
|
|
48
|
-
grid-template-rows: auto 1fr;
|
|
49
|
-
grid-template-columns: auto 1fr auto;
|
|
50
|
-
grid-template-areas: 'toolbar toolbar toolbar' 'palletbar scene propertybar';
|
|
51
|
-
grid-gap: 0;
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
52
47
|
|
|
53
48
|
height: 100%;
|
|
54
49
|
overflow: hidden;
|
|
55
50
|
}
|
|
56
51
|
|
|
57
52
|
process-edit-toolbar {
|
|
58
|
-
|
|
53
|
+
flex: 45px;
|
|
54
|
+
max-height: 45px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
div[content] {
|
|
58
|
+
flex: 1;
|
|
59
|
+
max-height: calc(100% - 45px);
|
|
60
|
+
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: row;
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
process-component-toolbar {
|
|
62
|
-
|
|
66
|
+
max-height: 100%;
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
process-property-sidebar {
|
|
66
|
-
grid-area: propertybar;
|
|
67
70
|
overflow: hidden;
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
#scene-wrap {
|
|
71
|
-
grid-area: scene;
|
|
72
74
|
position: relative;
|
|
73
75
|
|
|
76
|
+
flex: 1;
|
|
74
77
|
display: flex;
|
|
75
78
|
flex-direction: row;
|
|
76
79
|
}
|
|
@@ -180,7 +183,7 @@ export class OxProcessModeller extends ScopedElementsMixin(LitElement) {
|
|
|
180
183
|
ids = this.scene.ids.map(({ key }) => key)
|
|
181
184
|
}
|
|
182
185
|
|
|
183
|
-
ids = ids.filter(
|
|
186
|
+
ids = ids.filter(Boolean).sort()
|
|
184
187
|
callback(ids)
|
|
185
188
|
})
|
|
186
189
|
|
|
@@ -219,72 +222,74 @@ export class OxProcessModeller extends ScopedElementsMixin(LitElement) {
|
|
|
219
222
|
${this.renderBrandingZone()}
|
|
220
223
|
</process-edit-toolbar>
|
|
221
224
|
|
|
222
|
-
<
|
|
223
|
-
|
|
224
|
-
.mode=${this.mode}
|
|
225
|
-
@mode-changed=${(e: CustomEvent) => {
|
|
226
|
-
this.mode = e.detail.value
|
|
227
|
-
}}
|
|
228
|
-
.componentGroupList=${this.componentGroupList}
|
|
229
|
-
.group=${this.group}
|
|
230
|
-
>
|
|
231
|
-
</process-component-toolbar>
|
|
232
|
-
|
|
233
|
-
<div id="scene-wrap">
|
|
234
|
-
<ox-scene-viewer
|
|
235
|
-
id="scene"
|
|
225
|
+
<div content>
|
|
226
|
+
<process-component-toolbar
|
|
236
227
|
.scene=${this.scene}
|
|
237
|
-
@scene-changed=${(e: CustomEvent) => {
|
|
238
|
-
this.scene = e.detail.value
|
|
239
|
-
}}
|
|
240
|
-
.model=${this.model}
|
|
241
|
-
.selected=${this.selected}
|
|
242
|
-
@selected-changed=${(e: CustomEvent) => {
|
|
243
|
-
this.selected = e.detail.value
|
|
244
|
-
}}
|
|
245
228
|
.mode=${this.mode}
|
|
246
229
|
@mode-changed=${(e: CustomEvent) => {
|
|
247
230
|
this.mode = e.detail.value
|
|
248
231
|
}}
|
|
249
|
-
|
|
250
|
-
.
|
|
251
|
-
@contextmenu=${() => this.onContextMenu()}
|
|
252
|
-
.provider=${this.provider}
|
|
253
|
-
name="modeller"
|
|
232
|
+
.componentGroupList=${this.componentGroupList}
|
|
233
|
+
.group=${this.group}
|
|
254
234
|
>
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
<ox-scene-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
235
|
+
</process-component-toolbar>
|
|
236
|
+
|
|
237
|
+
<div id="scene-wrap">
|
|
238
|
+
<ox-scene-viewer
|
|
239
|
+
id="scene"
|
|
240
|
+
.scene=${this.scene}
|
|
241
|
+
@scene-changed=${(e: CustomEvent) => {
|
|
242
|
+
this.scene = e.detail.value
|
|
243
|
+
}}
|
|
244
|
+
.model=${this.model}
|
|
245
|
+
.selected=${this.selected}
|
|
246
|
+
@selected-changed=${(e: CustomEvent) => {
|
|
247
|
+
this.selected = e.detail.value
|
|
248
|
+
}}
|
|
249
|
+
.mode=${this.mode}
|
|
250
|
+
@mode-changed=${(e: CustomEvent) => {
|
|
251
|
+
this.mode = e.detail.value
|
|
252
|
+
}}
|
|
253
|
+
fit="ratio"
|
|
254
|
+
.baseUrl=${this.baseUrl}
|
|
255
|
+
@contextmenu=${() => this.onContextMenu()}
|
|
256
|
+
.provider=${this.provider}
|
|
257
|
+
name="modeller"
|
|
258
|
+
>
|
|
259
|
+
<ox-scene-layer type="selection-layer"></ox-scene-layer>
|
|
260
|
+
<ox-scene-layer type="modeling-layer"></ox-scene-layer>
|
|
261
|
+
<ox-scene-layer type="add-layer"> </ox-scene-layer>
|
|
262
|
+
<ox-scene-layer type="guide-layer">
|
|
263
|
+
<ox-scene-property name="ruler" value="disabled"></ox-scene-property>
|
|
264
|
+
</ox-scene-layer>
|
|
265
|
+
<ox-scene-layer type="shift-layer">
|
|
266
|
+
<ox-scene-property name="text" value="${this.overlay}"></ox-scene-property>
|
|
267
|
+
<ox-scene-property name="alpha" value="0.3"></ox-scene-property>
|
|
268
|
+
<ox-scene-property name="fontFamily" value="arial"></ox-scene-property>
|
|
269
|
+
<ox-scene-property name="fontSize" value="30" type="number"></ox-scene-property>
|
|
270
|
+
<ox-scene-property name="fontColor" value="navy"></ox-scene-property>
|
|
271
|
+
<ox-scene-property name="textBaseline" value="top"></ox-scene-property>
|
|
272
|
+
<ox-scene-property name="textAlign" value="left"></ox-scene-property>
|
|
273
|
+
<ox-scene-property name="paddingTop" value="50" type="number"></ox-scene-property>
|
|
274
|
+
<ox-scene-property name="paddingLeft" value="50" type="number"></ox-scene-property>
|
|
275
|
+
</ox-scene-layer>
|
|
276
|
+
<ox-scene-layer type="decotag-layer"></ox-scene-layer>
|
|
277
|
+
<ox-scene-handler type="text-editor"></ox-scene-handler>
|
|
278
|
+
<ox-scene-handler type="move-handler"></ox-scene-handler>
|
|
279
|
+
</ox-scene-viewer>
|
|
280
|
+
|
|
281
|
+
<mwc-fab icon="save" @click=${() => this.onTapSave()} title="save"> </mwc-fab>
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
<process-property-sidebar
|
|
285
|
+
.scene=${this.scene}
|
|
286
|
+
.selected=${this.selected}
|
|
287
|
+
.collapsed=${this.hideProperty}
|
|
288
|
+
.fonts=${this.fonts}
|
|
289
|
+
.propertyEditor=${this.propertyEditor}
|
|
290
|
+
>
|
|
291
|
+
</process-property-sidebar>
|
|
278
292
|
</div>
|
|
279
|
-
|
|
280
|
-
<process-property-sidebar
|
|
281
|
-
.scene=${this.scene}
|
|
282
|
-
.selected=${this.selected}
|
|
283
|
-
.collapsed=${this.hideProperty}
|
|
284
|
-
.fonts=${this.fonts}
|
|
285
|
-
.propertyEditor=${this.propertyEditor}
|
|
286
|
-
>
|
|
287
|
-
</process-property-sidebar>
|
|
288
293
|
`
|
|
289
294
|
}
|
|
290
295
|
|