@operato/scene-bpmn 7.0.1 → 7.3.19

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 (39) hide show
  1. package/package.json +3 -3
  2. package/CHANGELOG.md +0 -365
  3. package/src/base/bpmn-activity.ts +0 -32
  4. package/src/base/bpmn-container-base.ts +0 -201
  5. package/src/base/bpmn-control-base.ts +0 -201
  6. package/src/bpmn-comment.ts +0 -64
  7. package/src/bpmn-data-object.ts +0 -181
  8. package/src/bpmn-data-store.ts +0 -63
  9. package/src/bpmn-event.ts +0 -468
  10. package/src/bpmn-expanded-subprocess.ts +0 -207
  11. package/src/bpmn-flow.ts +0 -37
  12. package/src/bpmn-gateway.ts +0 -181
  13. package/src/bpmn-group.ts +0 -39
  14. package/src/bpmn-lane.ts +0 -125
  15. package/src/bpmn-message.ts +0 -57
  16. package/src/bpmn-pool.ts +0 -25
  17. package/src/bpmn-subprocess.ts +0 -323
  18. package/src/bpmn-task.ts +0 -479
  19. package/src/characteristics/loop.ts +0 -0
  20. package/src/editors/index.ts +0 -0
  21. package/src/groups/index.ts +0 -3
  22. package/src/groups/process.ts +0 -48
  23. package/src/index.ts +0 -13
  24. package/src/templates/bpmn-comment.ts +0 -24
  25. package/src/templates/bpmn-data-object.ts +0 -21
  26. package/src/templates/bpmn-data-store.ts +0 -19
  27. package/src/templates/bpmn-event.ts +0 -19
  28. package/src/templates/bpmn-expanded-subprocess.ts +0 -24
  29. package/src/templates/bpmn-flow.ts +0 -23
  30. package/src/templates/bpmn-gateway.ts +0 -19
  31. package/src/templates/bpmn-group.ts +0 -20
  32. package/src/templates/bpmn-lane.ts +0 -20
  33. package/src/templates/bpmn-message.ts +0 -21
  34. package/src/templates/bpmn-pool.ts +0 -18
  35. package/src/templates/bpmn-subprocess.ts +0 -18
  36. package/src/templates/bpmn-task.ts +0 -18
  37. package/src/templates/index.ts +0 -31
  38. package/tsconfig.json +0 -24
  39. package/tsconfig.tsbuildinfo +0 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/scene-bpmn",
3
3
  "description": "bpmn components for things-scene",
4
4
  "author": "heartyoh",
5
- "version": "7.0.1",
5
+ "version": "7.3.19",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "migration": "things-factory-migration"
28
28
  },
29
29
  "dependencies": {
30
- "@hatiolab/things-scene": "^3.2.0"
30
+ "@hatiolab/things-scene": "^3.4.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hatiolab/prettier-config": "^1.0.0",
@@ -57,5 +57,5 @@
57
57
  "prettier --write"
58
58
  ]
59
59
  },
60
- "gitHead": "575a4ccdeb952a605c9a6f65a389906e73a71013"
60
+ "gitHead": "ff73072a62ee02520f9d986d0095f6d329de64f9"
61
61
  }
package/CHANGELOG.md DELETED
@@ -1,365 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [7.0.1](https://github.com/things-scene/operato-scene/compare/v7.0.0...v7.0.1) (2024-06-30)
7
-
8
-
9
- ### :bug: Bug Fix
10
-
11
- * things-factory@7.0.0 ([f4cfe44](https://github.com/things-scene/operato-scene/commit/f4cfe44cb565e7b8fdc0df210a722b6526871848))
12
-
13
-
14
-
15
- ## [7.0.0](https://github.com/things-scene/operato-scene/compare/v7.0.0-rc.4...v7.0.0) (2024-06-30)
16
-
17
- **Note:** Version bump only for package @operato/scene-bpmn
18
-
19
-
20
-
21
-
22
-
23
- ## [7.0.0-rc.1](https://github.com/things-scene/operato-scene/compare/v7.0.0-rc.0...v7.0.0-rc.1) (2024-06-21)
24
-
25
-
26
- ### :bug: Bug Fix
27
-
28
- * apply v7-rc dependencies ([eee5612](https://github.com/things-scene/operato-scene/commit/eee5612e1d569387c284a7c6c49d64ef44b6d701))
29
-
30
-
31
-
32
- ## [7.0.0-rc.0](https://github.com/things-scene/operato-scene/compare/v2.0.0-beta.8...v7.0.0-rc.0) (2024-06-21)
33
-
34
- **Note:** Version bump only for package @operato/scene-bpmn
35
-
36
-
37
-
38
-
39
-
40
- ## [2.0.0-beta.0](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.12...v2.0.0-beta.0) (2024-06-01)
41
-
42
-
43
- ### :rocket: New Features
44
-
45
- * 2.0.0-beta.0 ([a2e2869](https://github.com/things-scene/operato-scene/commit/a2e28694eedf5bab0c54bcab5432d54ec59edd7f))
46
-
47
-
48
- ### :bug: Bug Fix
49
-
50
- * allowJs in tsconfig option ([fa77174](https://github.com/things-scene/operato-scene/commit/fa771742188f21f177f0a85281570f59f0c478cf))
51
-
52
-
53
-
54
- ## [2.0.0-alpha.12](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2024-05-11)
55
-
56
-
57
- ### :bug: Bug Fix
58
-
59
- * ignore 'cache' folder for git and npm ([d70f811](https://github.com/things-scene/operato-scene/commit/d70f8118ff3e9248f80aa9435d6e6cbb8aacfcaf))
60
-
61
-
62
-
63
- ## [2.0.0-alpha.9](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.8...v2.0.0-alpha.9) (2024-04-11)
64
-
65
-
66
- ### :bug: Bug Fix
67
-
68
- * things-factory@7.0.1 ([a9f4c18](https://github.com/things-scene/operato-scene/commit/a9f4c1873b80c540e4c2e16649e127ccffcf9a4c))
69
-
70
-
71
-
72
- ## [2.0.0-alpha.6](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2024-03-24)
73
-
74
-
75
- ### :bug: Bug Fix
76
-
77
- * translation ([266d423](https://github.com/things-scene/operato-scene/commit/266d423d9d6992464f45a437acc90ccf8ed33bf6))
78
-
79
-
80
-
81
- ## [2.0.0-alpha.4](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2024-03-21)
82
-
83
-
84
- ### :bug: Bug Fix
85
-
86
- * 컴포넌트 명 다국어 ([3616a52](https://github.com/things-scene/operato-scene/commit/3616a52e2f0268c83c976c6b4deeffc016f91e46))
87
-
88
-
89
-
90
- ## [2.0.0-alpha.0](https://github.com/things-scene/operato-scene/compare/v1.3.9...v2.0.0-alpha.0) (2024-01-14)
91
-
92
-
93
- ### :bug: Bug Fix
94
-
95
- * 2.0.0-alpha.0 ([93274e3](https://github.com/things-scene/operato-scene/commit/93274e36c5d184f339f83899654dd48b4786ac2b))
96
-
97
-
98
-
99
- ## [1.3.7](https://github.com/things-scene/operato-scene/compare/v1.3.6...v1.3.7) (2024-01-01)
100
-
101
-
102
- ### :bug: Bug Fix
103
-
104
- * mpi module moved from things-factory ([47b743f](https://github.com/things-scene/operato-scene/commit/47b743fd19001f195db85e50b8f6e457a1573aa5))
105
-
106
-
107
-
108
- ## [1.2.90](https://github.com/things-scene/operato-scene/compare/v1.2.89...v1.2.90) (2023-11-22)
109
-
110
- **Note:** Version bump only for package @operato/scene-bpmn
111
-
112
-
113
-
114
-
115
-
116
- ## [1.2.87](https://github.com/things-scene/operato-scene/compare/v1.2.86...v1.2.87) (2023-11-10)
117
-
118
- **Note:** Version bump only for package @operato/scene-bpmn
119
-
120
-
121
-
122
-
123
-
124
- ## [1.2.76](https://github.com/things-scene/operato-scene/compare/v1.2.75...v1.2.76) (2023-10-28)
125
-
126
-
127
- ### :bug: Bug Fix
128
-
129
- * scene-tab ([ad62f96](https://github.com/things-scene/operato-scene/commit/ad62f967b149eb5adf8f2e0714d79e8a9dc7186c))
130
-
131
-
132
-
133
- ## [1.2.66](https://github.com/things-scene/operato-scene/compare/v1.2.65...v1.2.66) (2023-09-14)
134
-
135
- **Note:** Version bump only for package @operato/scene-bpmn
136
-
137
-
138
-
139
-
140
-
141
- ## [1.2.65](https://github.com/things-scene/operato-scene/compare/v1.2.64...v1.2.65) (2023-09-14)
142
-
143
- **Note:** Version bump only for package @operato/scene-bpmn
144
-
145
-
146
-
147
-
148
-
149
- ## [1.2.62](https://github.com/things-scene/operato-scene/compare/v1.2.61...v1.2.62) (2023-09-11)
150
-
151
- **Note:** Version bump only for package @operato/scene-bpmn
152
-
153
-
154
-
155
-
156
-
157
- ## [1.2.49](https://github.com/things-scene/operato-scene/compare/v1.2.48...v1.2.49) (2023-06-26)
158
-
159
-
160
- ### :bug: Bug Fix
161
-
162
- * missing .npmignore ([61ba4f2](https://github.com/things-scene/operato-scene/commit/61ba4f2ae22a865d700a971d62eb01f950c34d0e))
163
-
164
-
165
-
166
- ## [1.2.46](https://github.com/things-scene/operato-scene/compare/v1.2.45...v1.2.46) (2023-06-10)
167
-
168
-
169
- ### :bug: Bug Fix
170
-
171
- * typescript build options ([3eb0d7f](https://github.com/things-scene/operato-scene/commit/3eb0d7fd80e2c3cea698501aa1d9d54903423a7b))
172
-
173
-
174
-
175
- ## [1.2.36](https://github.com/things-scene/operato-scene/compare/v1.2.35...v1.2.36) (2023-05-13)
176
-
177
-
178
- ### :bug: Bug Fix
179
-
180
- * license ([d37d485](https://github.com/things-scene/operato-scene/commit/d37d48597407dea1ad022e674f2899720e56d695))
181
-
182
-
183
-
184
- ## [1.2.29](https://github.com/things-scene/operato-scene/compare/v1.2.28...v1.2.29) (2023-04-30)
185
-
186
-
187
- ### :bug: Bug Fix
188
-
189
- * update module's version ([047d08b](https://github.com/things-scene/operato-scene/commit/047d08b5d912d12c04b2f6b63156d1e812588365))
190
-
191
-
192
-
193
- ### [1.2.27](https://github.com/things-scene/operato-scene/compare/v1.2.26...v1.2.27) (2023-04-22)
194
-
195
- **Note:** Version bump only for package @operato/scene-bpmn
196
-
197
-
198
-
199
-
200
-
201
- ### [1.2.4](https://github.com/things-scene/operato-scene/compare/v1.2.3...v1.2.4) (2023-02-13)
202
-
203
- **Note:** Version bump only for package @operato/scene-bpmn
204
-
205
-
206
-
207
-
208
-
209
- ### [1.2.2](https://github.com/things-scene/operato-scene/compare/v1.2.1...v1.2.2) (2023-02-09)
210
-
211
-
212
- ### :bug: Bug Fix
213
-
214
- * migrate scene-urdf from things-factory ([3f75f87](https://github.com/things-scene/operato-scene/commit/3f75f8743e993a9a3ed595eed8f94b15da042a31))
215
-
216
-
217
-
218
- ## [1.2.0](https://github.com/things-scene/operato-scene/compare/v1.1.29...v1.2.0) (2023-02-07)
219
-
220
-
221
- ### :bug: Bug Fix
222
-
223
- * [@things-factory](https://github.com/things-factory)@6.0.0 ([5927ebb](https://github.com/things-scene/operato-scene/commit/5927ebb5113be2b914cc47005eb7115d69481695))
224
- * updating dependencies ([f4dd8fc](https://github.com/things-scene/operato-scene/commit/f4dd8fcdaa03b67de78189c6d574b30a995456f0))
225
-
226
-
227
-
228
- ### [1.1.23](https://github.com/things-scene/operato-scene/compare/v1.1.22...v1.1.23) (2022-12-18)
229
-
230
-
231
- ### :bug: Bug Fix
232
-
233
- * latest @hatiolab/things-scene ([8d6afb5](https://github.com/things-scene/operato-scene/commit/8d6afb5ecbd453260615fca229f1d74b0ea6e4ee))
234
-
235
-
236
-
237
- ### [1.1.20](https://github.com/things-scene/operato-scene/compare/v1.1.19...v1.1.20) (2022-12-09)
238
-
239
-
240
- ### :bug: Bug Fix
241
-
242
- * filling for bpmn components ([2f3bb57](https://github.com/things-scene/operato-scene/commit/2f3bb57ef5ab7915f8c863d82eb55e46af4d512e))
243
- * filling for bpmn components ([7447940](https://github.com/things-scene/operato-scene/commit/74479406b4cf70702ef367eea6cdf3dff24dec2b))
244
-
245
-
246
-
247
- ### [1.1.15](https://github.com/things-scene/operato-scene/compare/v1.1.14...v1.1.15) (2022-11-13)
248
-
249
-
250
- ### :bug: Bug Fix
251
-
252
- * use @things-factory/operato-board@6.0.0-zeta.x ([a9deef9](https://github.com/things-scene/operato-scene/commit/a9deef935fde00c6c0d09ca424ca949ac24cbd6a))
253
-
254
-
255
-
256
- ### [1.1.12](https://github.com/things-scene/operato-scene/compare/v1.1.11...v1.1.12) (2022-11-09)
257
-
258
-
259
- ### :bug: Bug Fix
260
-
261
- * bpmn ([b80f20a](https://github.com/things-scene/operato-scene/commit/b80f20adc7656c544b9a559e1eb85ceca5b4f00f))
262
- * events properties for activities ([93cdf0b](https://github.com/things-scene/operato-scene/commit/93cdf0b570fe829a50d89672cf8c974ad6ff74ac))
263
-
264
-
265
-
266
- ### [1.1.10](https://github.com/things-scene/operato-scene/compare/v1.1.9...v1.1.10) (2022-11-06)
267
-
268
-
269
- ### :bug: Bug Fix
270
-
271
- * bpmn label positions ([805c888](https://github.com/things-scene/operato-scene/commit/805c888a9f51b1094e2af7edd27c8a22e933b1e6))
272
-
273
-
274
-
275
- ### [1.1.9](https://github.com/things-scene/operato-scene/compare/v1.1.8...v1.1.9) (2022-11-06)
276
-
277
-
278
- ### :bug: Bug Fix
279
-
280
- * bpmn-flow template ([464a8bd](https://github.com/things-scene/operato-scene/commit/464a8bd39762b1f746ad461ff167efe0feacb073))
281
- * transaction, interrupting properties for bpmn ([e9a7308](https://github.com/things-scene/operato-scene/commit/e9a7308d3cd983b604d278984dc4764d6c3fd974))
282
-
283
-
284
-
285
- ### [1.1.8](https://github.com/things-scene/operato-scene/compare/v1.1.7...v1.1.8) (2022-11-05)
286
-
287
-
288
- ### :bug: Bug Fix
289
-
290
- * guaranty padding values ([6d21f7c](https://github.com/things-scene/operato-scene/commit/6d21f7ced527b3172b6e1ff67160f505192359bd))
291
- * padding default value ([2d55f81](https://github.com/things-scene/operato-scene/commit/2d55f81efffbbb1687e11380abfe293328e1e88d))
292
-
293
-
294
-
295
- ### [1.1.7](https://github.com/things-scene/operato-scene/compare/v1.1.6...v1.1.7) (2022-11-05)
296
-
297
-
298
- ### :bug: Bug Fix
299
-
300
- * bpmn-expanded-subprocess default font size ([89e4675](https://github.com/things-scene/operato-scene/commit/89e4675a177c5e6411b847ee6aa55787c4dc0a8a))
301
-
302
-
303
-
304
- ### [1.1.6](https://github.com/things-scene/operato-scene/compare/v1.1.5...v1.1.6) (2022-11-05)
305
-
306
-
307
- ### :bug: Bug Fix
308
-
309
- * bpmn-lane textAlign ([16d84ce](https://github.com/things-scene/operato-scene/commit/16d84cefbdc561cacfda8938a843083db1fe0b82))
310
-
311
-
312
-
313
- ### [1.1.5](https://github.com/things-scene/operato-scene/compare/v1.1.4...v1.1.5) (2022-11-05)
314
-
315
-
316
- ### :bug: Bug Fix
317
-
318
- * templates ([78a23e4](https://github.com/things-scene/operato-scene/commit/78a23e42c3a13b1fd50af223d3a7c5f6739ed8a3))
319
- * update things-scene ([84f2a9f](https://github.com/things-scene/operato-scene/commit/84f2a9fa6fe5fcb22444caf489de8a5aa84000a2))
320
-
321
-
322
-
323
- ### [1.1.4](https://github.com/things-scene/operato-scene/compare/v1.1.3...v1.1.4) (2022-11-04)
324
-
325
-
326
- ### :bug: Bug Fix
327
-
328
- * add serve:dev ([c9f2ac7](https://github.com/things-scene/operato-scene/commit/c9f2ac74ff71fcbe39e2fa374778ef754239bd25))
329
- * bpmn lane ([5bd4cb8](https://github.com/things-scene/operato-scene/commit/5bd4cb81a35e98a51d5eec4fb0e4e3ad97fc39aa))
330
-
331
-
332
-
333
- ### [1.1.3](https://github.com/things-scene/operato-scene/compare/v1.1.2...v1.1.3) (2022-11-04)
334
-
335
-
336
- ### :bug: Bug Fix
337
-
338
- * bpmn-lane ([0b96d84](https://github.com/things-scene/operato-scene/commit/0b96d84b6964f570db79ac532c754341c478eb29))
339
-
340
-
341
-
342
- ### [1.1.2](https://github.com/things-scene/operato-scene/compare/v1.1.1...v1.1.2) (2022-11-04)
343
-
344
-
345
- ### :bug: Bug Fix
346
-
347
- * process-lane ([853b998](https://github.com/things-scene/operato-scene/commit/853b998333bda1c7946059a851777aac9f46b8b2))
348
-
349
-
350
-
351
- ### [1.1.1](https://github.com/things-scene/operato-scene/compare/v1.1.0...v1.1.1) (2022-11-03)
352
-
353
-
354
- ### :bug: Bug Fix
355
-
356
- * typo ([c4758b9](https://github.com/things-scene/operato-scene/commit/c4758b9d66e4edb15ee4b805117fd9b18ef92737))
357
-
358
-
359
-
360
- ## [1.1.0](https://github.com/things-scene/operato-scene/compare/v1.0.7...v1.1.0) (2022-11-03)
361
-
362
-
363
- ### :rocket: New Features
364
-
365
- * add bpmn and eipatterns ([6f5e74c](https://github.com/things-scene/operato-scene/commit/6f5e74c9e45ff61324c080f9b2828f1a69fddc5a))
@@ -1,32 +0,0 @@
1
- import BPMNControlBase from './bpmn-control-base'
2
-
3
- export default abstract class BPMNActivity extends BPMNControlBase {
4
- abstract getImageElement(): HTMLImageElement | null | undefined
5
-
6
- render(ctx: CanvasRenderingContext2D) {
7
- var { left, top, width, height } = this.bounds
8
-
9
- ctx.translate(left, top)
10
- ctx.beginPath()
11
-
12
- var radius = 9
13
-
14
- ctx.moveTo(radius, 0)
15
- ctx.arcTo(width, 0, width, height, radius)
16
- ctx.arcTo(width, height, 0, height, radius)
17
- ctx.arcTo(0, height, 0, 0, radius)
18
- ctx.arcTo(0, 0, width, 0, radius)
19
-
20
- ctx.translate(-left, -top)
21
-
22
- this.drawFill(ctx)
23
- this.drawStroke(ctx)
24
-
25
- ctx.beginPath()
26
-
27
- const image = this.getImageElement()
28
- if (image) {
29
- this.drawImage(ctx, image, left, top, 24, 24)
30
- }
31
- }
32
- }
@@ -1,201 +0,0 @@
1
- import { Anchor, Container, Connectable, LinkEnd, Properties } from '@hatiolab/things-scene'
2
-
3
- export enum DIRECTION {
4
- NORTH = 'N',
5
- EAST = 'E',
6
- SOUTH = 'S',
7
- WEST = 'W'
8
- }
9
-
10
- export enum INOUT {
11
- IN = 'in',
12
- OUT = 'out',
13
- INOUT = 'inout'
14
- }
15
-
16
- export enum FLOW {
17
- MESSAGE = 'message',
18
- SEQUENCE = 'sequence',
19
- ASSOCIATION = 'association'
20
- }
21
-
22
- export type NODE = {
23
- name: string
24
- description: string
25
- inout: INOUT
26
- type: FLOW
27
- direction: DIRECTION
28
- multiplicity?: number
29
- }
30
-
31
- const STYLE_MAP = {
32
- message: {
33
- strokeStyle: 'black',
34
- fillStyle: 'black'
35
- },
36
- sequence: {
37
- strokeStyle: 'red',
38
- fillStyle: 'red',
39
- lineDash: 'long-dash-dot'
40
- },
41
- association: {
42
- strokeStyle: 'yellow',
43
- fillStyle: 'yellow',
44
- lineDash: 'dash',
45
- begin: 'none',
46
- beginSize: 'size1',
47
- end: 'none',
48
- endSize: 'size1'
49
- }
50
- }
51
-
52
- type FILTER_FUNCTION = (this: Anchor, counterEnd?: LinkEnd) => boolean
53
-
54
- const ANCHOR_LENGTH = 8
55
-
56
- const TEMPLATE = {
57
- type: 'bpmn-flow',
58
- lineWidth: 2,
59
- strokeStyle: 'black',
60
- begin: 'none',
61
- beginSize: 'size1',
62
- end: 'arrow',
63
- endSize: 'size9',
64
- round: 10
65
- }
66
-
67
- function linkFilter(this: Anchor, counterEnd?: LinkEnd) {
68
- if (!counterEnd) {
69
- return this.inout !== 'in'
70
- }
71
-
72
- const { component, anchor } = counterEnd || {}
73
- /* FIXME remove !anchor.type condition */
74
- return !anchor?.type || anchor.type === this.type
75
- }
76
-
77
- export default abstract class BPMNContainerBase extends Connectable(Container) {
78
- get anchors(): Array<Anchor> {
79
- var allNodes = this.nodes
80
- var { left, top, width, height } = this.bounds
81
-
82
- var right = left + width
83
- var bottom = top + height
84
-
85
- const dirs: Array<Array<Anchor>> = [DIRECTION.NORTH, DIRECTION.EAST, DIRECTION.SOUTH, DIRECTION.WEST].map(
86
- direction => {
87
- const nodes = allNodes.filter(node => node.direction === direction)
88
- if (nodes.length === 0) {
89
- return []
90
- }
91
-
92
- var dx = 0
93
- var dy = 0
94
- var sx = 0
95
- var sy = 0
96
-
97
- switch (direction) {
98
- case DIRECTION.NORTH:
99
- sx = left
100
- sy = top
101
- dx = width / (nodes.length + 1)
102
- dy = 0
103
-
104
- break
105
-
106
- case DIRECTION.EAST:
107
- sx = right
108
- sy = top
109
- dx = 0
110
- dy = height / (nodes.length + 1)
111
-
112
- break
113
-
114
- case DIRECTION.SOUTH:
115
- sx = left
116
- sy = bottom
117
- dx = width / (nodes.length + 1)
118
- dy = 0
119
-
120
- break
121
-
122
- case DIRECTION.WEST:
123
- sx = left
124
- sy = top
125
- dx = 0
126
- dy = height / (nodes.length + 1)
127
-
128
- break
129
-
130
- default:
131
- }
132
-
133
- return nodes.map((node, idx) => {
134
- const x = sx + dx * (idx + 1)
135
- const y = sy + dy * (idx + 1)
136
-
137
- return {
138
- type: node.type as string,
139
- name: node.name,
140
- inout: node.inout,
141
- position: {
142
- x,
143
- y
144
- },
145
- bounds: {
146
- left: x - ANCHOR_LENGTH / 2,
147
- top: y - ANCHOR_LENGTH / 2,
148
- width: ANCHOR_LENGTH,
149
- height: ANCHOR_LENGTH
150
- },
151
- filter: linkFilter,
152
- template: {
153
- ...TEMPLATE,
154
- ...(STYLE_MAP[node.type || 'message'] || STYLE_MAP['message'])
155
- },
156
- multiplicity: node.multiplicity
157
- }
158
- })
159
- }
160
- )
161
-
162
- return dirs.flat()
163
- }
164
-
165
- get nodes(): NODE[] {
166
- return [
167
- {
168
- name: 'Left',
169
- description: 'Left side message inout',
170
- inout: INOUT.INOUT,
171
- type: FLOW.MESSAGE,
172
- direction: DIRECTION.WEST,
173
- multiplicity: 1
174
- },
175
- {
176
- name: 'Top',
177
- description: 'Top side message inout',
178
- inout: INOUT.INOUT,
179
- type: FLOW.MESSAGE,
180
- direction: DIRECTION.NORTH,
181
- multiplicity: 1
182
- },
183
- {
184
- name: 'Right',
185
- description: 'Right side message inout',
186
- inout: INOUT.INOUT,
187
- type: FLOW.MESSAGE,
188
- direction: DIRECTION.EAST,
189
- multiplicity: 1
190
- },
191
- {
192
- name: 'Down',
193
- description: 'Down side message inout',
194
- inout: INOUT.INOUT,
195
- type: FLOW.MESSAGE,
196
- direction: DIRECTION.SOUTH,
197
- multiplicity: 1
198
- }
199
- ]
200
- }
201
- }