@operato/scene-bpmn 7.3.9 → 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 +2 -2
  2. package/CHANGELOG.md +0 -374
  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.3.9",
5
+ "version": "7.3.19",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "license": "MIT",
@@ -57,5 +57,5 @@
57
57
  "prettier --write"
58
58
  ]
59
59
  },
60
- "gitHead": "32b46499c33be406e0fccc602746290a51e0f286"
60
+ "gitHead": "ff73072a62ee02520f9d986d0095f6d329de64f9"
61
61
  }
package/CHANGELOG.md DELETED
@@ -1,374 +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.3.9](https://github.com/things-scene/operato-scene/compare/v7.3.8...v7.3.9) (2024-09-11)
7
-
8
-
9
- ### :bug: Bug Fix
10
-
11
- * @hatiolab/things-scene version ([5260171](https://github.com/things-scene/operato-scene/commit/52601719115288709ca7e0eee0974cc4677f219e))
12
-
13
-
14
-
15
- ## [7.0.1](https://github.com/things-scene/operato-scene/compare/v7.0.0...v7.0.1) (2024-06-30)
16
-
17
-
18
- ### :bug: Bug Fix
19
-
20
- * things-factory@7.0.0 ([f4cfe44](https://github.com/things-scene/operato-scene/commit/f4cfe44cb565e7b8fdc0df210a722b6526871848))
21
-
22
-
23
-
24
- ## [7.0.0](https://github.com/things-scene/operato-scene/compare/v7.0.0-rc.4...v7.0.0) (2024-06-30)
25
-
26
- **Note:** Version bump only for package @operato/scene-bpmn
27
-
28
-
29
-
30
-
31
-
32
- ## [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)
33
-
34
-
35
- ### :bug: Bug Fix
36
-
37
- * apply v7-rc dependencies ([eee5612](https://github.com/things-scene/operato-scene/commit/eee5612e1d569387c284a7c6c49d64ef44b6d701))
38
-
39
-
40
-
41
- ## [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)
42
-
43
- **Note:** Version bump only for package @operato/scene-bpmn
44
-
45
-
46
-
47
-
48
-
49
- ## [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)
50
-
51
-
52
- ### :rocket: New Features
53
-
54
- * 2.0.0-beta.0 ([a2e2869](https://github.com/things-scene/operato-scene/commit/a2e28694eedf5bab0c54bcab5432d54ec59edd7f))
55
-
56
-
57
- ### :bug: Bug Fix
58
-
59
- * allowJs in tsconfig option ([fa77174](https://github.com/things-scene/operato-scene/commit/fa771742188f21f177f0a85281570f59f0c478cf))
60
-
61
-
62
-
63
- ## [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)
64
-
65
-
66
- ### :bug: Bug Fix
67
-
68
- * ignore 'cache' folder for git and npm ([d70f811](https://github.com/things-scene/operato-scene/commit/d70f8118ff3e9248f80aa9435d6e6cbb8aacfcaf))
69
-
70
-
71
-
72
- ## [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)
73
-
74
-
75
- ### :bug: Bug Fix
76
-
77
- * things-factory@7.0.1 ([a9f4c18](https://github.com/things-scene/operato-scene/commit/a9f4c1873b80c540e4c2e16649e127ccffcf9a4c))
78
-
79
-
80
-
81
- ## [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)
82
-
83
-
84
- ### :bug: Bug Fix
85
-
86
- * translation ([266d423](https://github.com/things-scene/operato-scene/commit/266d423d9d6992464f45a437acc90ccf8ed33bf6))
87
-
88
-
89
-
90
- ## [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)
91
-
92
-
93
- ### :bug: Bug Fix
94
-
95
- * 컴포넌트 명 다국어 ([3616a52](https://github.com/things-scene/operato-scene/commit/3616a52e2f0268c83c976c6b4deeffc016f91e46))
96
-
97
-
98
-
99
- ## [2.0.0-alpha.0](https://github.com/things-scene/operato-scene/compare/v1.3.9...v2.0.0-alpha.0) (2024-01-14)
100
-
101
-
102
- ### :bug: Bug Fix
103
-
104
- * 2.0.0-alpha.0 ([93274e3](https://github.com/things-scene/operato-scene/commit/93274e36c5d184f339f83899654dd48b4786ac2b))
105
-
106
-
107
-
108
- ## [1.3.7](https://github.com/things-scene/operato-scene/compare/v1.3.6...v1.3.7) (2024-01-01)
109
-
110
-
111
- ### :bug: Bug Fix
112
-
113
- * mpi module moved from things-factory ([47b743f](https://github.com/things-scene/operato-scene/commit/47b743fd19001f195db85e50b8f6e457a1573aa5))
114
-
115
-
116
-
117
- ## [1.2.90](https://github.com/things-scene/operato-scene/compare/v1.2.89...v1.2.90) (2023-11-22)
118
-
119
- **Note:** Version bump only for package @operato/scene-bpmn
120
-
121
-
122
-
123
-
124
-
125
- ## [1.2.87](https://github.com/things-scene/operato-scene/compare/v1.2.86...v1.2.87) (2023-11-10)
126
-
127
- **Note:** Version bump only for package @operato/scene-bpmn
128
-
129
-
130
-
131
-
132
-
133
- ## [1.2.76](https://github.com/things-scene/operato-scene/compare/v1.2.75...v1.2.76) (2023-10-28)
134
-
135
-
136
- ### :bug: Bug Fix
137
-
138
- * scene-tab ([ad62f96](https://github.com/things-scene/operato-scene/commit/ad62f967b149eb5adf8f2e0714d79e8a9dc7186c))
139
-
140
-
141
-
142
- ## [1.2.66](https://github.com/things-scene/operato-scene/compare/v1.2.65...v1.2.66) (2023-09-14)
143
-
144
- **Note:** Version bump only for package @operato/scene-bpmn
145
-
146
-
147
-
148
-
149
-
150
- ## [1.2.65](https://github.com/things-scene/operato-scene/compare/v1.2.64...v1.2.65) (2023-09-14)
151
-
152
- **Note:** Version bump only for package @operato/scene-bpmn
153
-
154
-
155
-
156
-
157
-
158
- ## [1.2.62](https://github.com/things-scene/operato-scene/compare/v1.2.61...v1.2.62) (2023-09-11)
159
-
160
- **Note:** Version bump only for package @operato/scene-bpmn
161
-
162
-
163
-
164
-
165
-
166
- ## [1.2.49](https://github.com/things-scene/operato-scene/compare/v1.2.48...v1.2.49) (2023-06-26)
167
-
168
-
169
- ### :bug: Bug Fix
170
-
171
- * missing .npmignore ([61ba4f2](https://github.com/things-scene/operato-scene/commit/61ba4f2ae22a865d700a971d62eb01f950c34d0e))
172
-
173
-
174
-
175
- ## [1.2.46](https://github.com/things-scene/operato-scene/compare/v1.2.45...v1.2.46) (2023-06-10)
176
-
177
-
178
- ### :bug: Bug Fix
179
-
180
- * typescript build options ([3eb0d7f](https://github.com/things-scene/operato-scene/commit/3eb0d7fd80e2c3cea698501aa1d9d54903423a7b))
181
-
182
-
183
-
184
- ## [1.2.36](https://github.com/things-scene/operato-scene/compare/v1.2.35...v1.2.36) (2023-05-13)
185
-
186
-
187
- ### :bug: Bug Fix
188
-
189
- * license ([d37d485](https://github.com/things-scene/operato-scene/commit/d37d48597407dea1ad022e674f2899720e56d695))
190
-
191
-
192
-
193
- ## [1.2.29](https://github.com/things-scene/operato-scene/compare/v1.2.28...v1.2.29) (2023-04-30)
194
-
195
-
196
- ### :bug: Bug Fix
197
-
198
- * update module's version ([047d08b](https://github.com/things-scene/operato-scene/commit/047d08b5d912d12c04b2f6b63156d1e812588365))
199
-
200
-
201
-
202
- ### [1.2.27](https://github.com/things-scene/operato-scene/compare/v1.2.26...v1.2.27) (2023-04-22)
203
-
204
- **Note:** Version bump only for package @operato/scene-bpmn
205
-
206
-
207
-
208
-
209
-
210
- ### [1.2.4](https://github.com/things-scene/operato-scene/compare/v1.2.3...v1.2.4) (2023-02-13)
211
-
212
- **Note:** Version bump only for package @operato/scene-bpmn
213
-
214
-
215
-
216
-
217
-
218
- ### [1.2.2](https://github.com/things-scene/operato-scene/compare/v1.2.1...v1.2.2) (2023-02-09)
219
-
220
-
221
- ### :bug: Bug Fix
222
-
223
- * migrate scene-urdf from things-factory ([3f75f87](https://github.com/things-scene/operato-scene/commit/3f75f8743e993a9a3ed595eed8f94b15da042a31))
224
-
225
-
226
-
227
- ## [1.2.0](https://github.com/things-scene/operato-scene/compare/v1.1.29...v1.2.0) (2023-02-07)
228
-
229
-
230
- ### :bug: Bug Fix
231
-
232
- * [@things-factory](https://github.com/things-factory)@6.0.0 ([5927ebb](https://github.com/things-scene/operato-scene/commit/5927ebb5113be2b914cc47005eb7115d69481695))
233
- * updating dependencies ([f4dd8fc](https://github.com/things-scene/operato-scene/commit/f4dd8fcdaa03b67de78189c6d574b30a995456f0))
234
-
235
-
236
-
237
- ### [1.1.23](https://github.com/things-scene/operato-scene/compare/v1.1.22...v1.1.23) (2022-12-18)
238
-
239
-
240
- ### :bug: Bug Fix
241
-
242
- * latest @hatiolab/things-scene ([8d6afb5](https://github.com/things-scene/operato-scene/commit/8d6afb5ecbd453260615fca229f1d74b0ea6e4ee))
243
-
244
-
245
-
246
- ### [1.1.20](https://github.com/things-scene/operato-scene/compare/v1.1.19...v1.1.20) (2022-12-09)
247
-
248
-
249
- ### :bug: Bug Fix
250
-
251
- * filling for bpmn components ([2f3bb57](https://github.com/things-scene/operato-scene/commit/2f3bb57ef5ab7915f8c863d82eb55e46af4d512e))
252
- * filling for bpmn components ([7447940](https://github.com/things-scene/operato-scene/commit/74479406b4cf70702ef367eea6cdf3dff24dec2b))
253
-
254
-
255
-
256
- ### [1.1.15](https://github.com/things-scene/operato-scene/compare/v1.1.14...v1.1.15) (2022-11-13)
257
-
258
-
259
- ### :bug: Bug Fix
260
-
261
- * use @things-factory/operato-board@6.0.0-zeta.x ([a9deef9](https://github.com/things-scene/operato-scene/commit/a9deef935fde00c6c0d09ca424ca949ac24cbd6a))
262
-
263
-
264
-
265
- ### [1.1.12](https://github.com/things-scene/operato-scene/compare/v1.1.11...v1.1.12) (2022-11-09)
266
-
267
-
268
- ### :bug: Bug Fix
269
-
270
- * bpmn ([b80f20a](https://github.com/things-scene/operato-scene/commit/b80f20adc7656c544b9a559e1eb85ceca5b4f00f))
271
- * events properties for activities ([93cdf0b](https://github.com/things-scene/operato-scene/commit/93cdf0b570fe829a50d89672cf8c974ad6ff74ac))
272
-
273
-
274
-
275
- ### [1.1.10](https://github.com/things-scene/operato-scene/compare/v1.1.9...v1.1.10) (2022-11-06)
276
-
277
-
278
- ### :bug: Bug Fix
279
-
280
- * bpmn label positions ([805c888](https://github.com/things-scene/operato-scene/commit/805c888a9f51b1094e2af7edd27c8a22e933b1e6))
281
-
282
-
283
-
284
- ### [1.1.9](https://github.com/things-scene/operato-scene/compare/v1.1.8...v1.1.9) (2022-11-06)
285
-
286
-
287
- ### :bug: Bug Fix
288
-
289
- * bpmn-flow template ([464a8bd](https://github.com/things-scene/operato-scene/commit/464a8bd39762b1f746ad461ff167efe0feacb073))
290
- * transaction, interrupting properties for bpmn ([e9a7308](https://github.com/things-scene/operato-scene/commit/e9a7308d3cd983b604d278984dc4764d6c3fd974))
291
-
292
-
293
-
294
- ### [1.1.8](https://github.com/things-scene/operato-scene/compare/v1.1.7...v1.1.8) (2022-11-05)
295
-
296
-
297
- ### :bug: Bug Fix
298
-
299
- * guaranty padding values ([6d21f7c](https://github.com/things-scene/operato-scene/commit/6d21f7ced527b3172b6e1ff67160f505192359bd))
300
- * padding default value ([2d55f81](https://github.com/things-scene/operato-scene/commit/2d55f81efffbbb1687e11380abfe293328e1e88d))
301
-
302
-
303
-
304
- ### [1.1.7](https://github.com/things-scene/operato-scene/compare/v1.1.6...v1.1.7) (2022-11-05)
305
-
306
-
307
- ### :bug: Bug Fix
308
-
309
- * bpmn-expanded-subprocess default font size ([89e4675](https://github.com/things-scene/operato-scene/commit/89e4675a177c5e6411b847ee6aa55787c4dc0a8a))
310
-
311
-
312
-
313
- ### [1.1.6](https://github.com/things-scene/operato-scene/compare/v1.1.5...v1.1.6) (2022-11-05)
314
-
315
-
316
- ### :bug: Bug Fix
317
-
318
- * bpmn-lane textAlign ([16d84ce](https://github.com/things-scene/operato-scene/commit/16d84cefbdc561cacfda8938a843083db1fe0b82))
319
-
320
-
321
-
322
- ### [1.1.5](https://github.com/things-scene/operato-scene/compare/v1.1.4...v1.1.5) (2022-11-05)
323
-
324
-
325
- ### :bug: Bug Fix
326
-
327
- * templates ([78a23e4](https://github.com/things-scene/operato-scene/commit/78a23e42c3a13b1fd50af223d3a7c5f6739ed8a3))
328
- * update things-scene ([84f2a9f](https://github.com/things-scene/operato-scene/commit/84f2a9fa6fe5fcb22444caf489de8a5aa84000a2))
329
-
330
-
331
-
332
- ### [1.1.4](https://github.com/things-scene/operato-scene/compare/v1.1.3...v1.1.4) (2022-11-04)
333
-
334
-
335
- ### :bug: Bug Fix
336
-
337
- * add serve:dev ([c9f2ac7](https://github.com/things-scene/operato-scene/commit/c9f2ac74ff71fcbe39e2fa374778ef754239bd25))
338
- * bpmn lane ([5bd4cb8](https://github.com/things-scene/operato-scene/commit/5bd4cb81a35e98a51d5eec4fb0e4e3ad97fc39aa))
339
-
340
-
341
-
342
- ### [1.1.3](https://github.com/things-scene/operato-scene/compare/v1.1.2...v1.1.3) (2022-11-04)
343
-
344
-
345
- ### :bug: Bug Fix
346
-
347
- * bpmn-lane ([0b96d84](https://github.com/things-scene/operato-scene/commit/0b96d84b6964f570db79ac532c754341c478eb29))
348
-
349
-
350
-
351
- ### [1.1.2](https://github.com/things-scene/operato-scene/compare/v1.1.1...v1.1.2) (2022-11-04)
352
-
353
-
354
- ### :bug: Bug Fix
355
-
356
- * process-lane ([853b998](https://github.com/things-scene/operato-scene/commit/853b998333bda1c7946059a851777aac9f46b8b2))
357
-
358
-
359
-
360
- ### [1.1.1](https://github.com/things-scene/operato-scene/compare/v1.1.0...v1.1.1) (2022-11-03)
361
-
362
-
363
- ### :bug: Bug Fix
364
-
365
- * typo ([c4758b9](https://github.com/things-scene/operato-scene/commit/c4758b9d66e4edb15ee4b805117fd9b18ef92737))
366
-
367
-
368
-
369
- ## [1.1.0](https://github.com/things-scene/operato-scene/compare/v1.0.7...v1.1.0) (2022-11-03)
370
-
371
-
372
- ### :rocket: New Features
373
-
374
- * 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
- }