@aj-shadow/z-abs-complayer-markup-client 0.0.0-aj-beta.221

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 (208) hide show
  1. package/.gitattributes +26 -0
  2. package/LICENSE.txt +96 -0
  3. package/README.md +5 -0
  4. package/npm-shrinkwrap.json +13 -0
  5. package/package.json +10 -0
  6. package/project/client/_build/Bundle-CompLayer-Markup-client.bld +40 -0
  7. package/project/client/_build/Client-CompLayer-Markup-client-jsx.bld +10 -0
  8. package/project/client/_build/Client-CompLayer-Markup-client.bld +10 -0
  9. package/project/client/_build/Client-css-CompLayer-Markup-bundle.bld +9 -0
  10. package/project/client/_build/z-abs-complayer-markup-client.prj +36 -0
  11. package/project/client/actions/action-style.js +17 -0
  12. package/project/client/actions/data-action-style.js +13 -0
  13. package/project/client/css/markup_addressing.css +30 -0
  14. package/project/client/css/markup_flowchart.css +53 -0
  15. package/project/client/css/markup_general.css +4 -0
  16. package/project/client/css/markup_image.css +10 -0
  17. package/project/client/css/markup_license.css +107 -0
  18. package/project/client/css/markup_login.css +201 -0
  19. package/project/client/css/markup_node_diagram.css +51 -0
  20. package/project/client/css/markup_sequence_diagram.css +6 -0
  21. package/project/client/css/markup_state.css +5 -0
  22. package/project/client/css/markup_table.css +57 -0
  23. package/project/client/css/markup_tc.css +32 -0
  24. package/project/client/css/markup_ts.css +36 -0
  25. package/project/client/data/addresses/data-addresses-client-address-global.js +20 -0
  26. package/project/client/data/addresses/data-addresses-client-address-local.js +20 -0
  27. package/project/client/data/addresses/data-addresses-client-interface-global.js +17 -0
  28. package/project/client/data/addresses/data-addresses-client-interface-local.js +17 -0
  29. package/project/client/data/addresses/data-addresses-dns-global.js +18 -0
  30. package/project/client/data/addresses/data-addresses-dns-local.js +19 -0
  31. package/project/client/data/addresses/data-addresses-dst-global.js +20 -0
  32. package/project/client/data/addresses/data-addresses-dst-local.js +20 -0
  33. package/project/client/data/addresses/data-addresses-network-interface-global.js +17 -0
  34. package/project/client/data/addresses/data-addresses-network-interface-local.js +17 -0
  35. package/project/client/data/addresses/data-addresses-ports-global.js +18 -0
  36. package/project/client/data/addresses/data-addresses-ports-local.js +18 -0
  37. package/project/client/data/addresses/data-addresses-server-address-global.js +20 -0
  38. package/project/client/data/addresses/data-addresses-server-address-local.js +20 -0
  39. package/project/client/data/addresses/data-addresses-server-interface-global.js +17 -0
  40. package/project/client/data/addresses/data-addresses-server-interface-local.js +17 -0
  41. package/project/client/data/addresses/data-addresses-src-global.js +21 -0
  42. package/project/client/data/addresses/data-addresses-src-local.js +21 -0
  43. package/project/client/data/addresses/data-addresses-srv-global.js +20 -0
  44. package/project/client/data/addresses/data-addresses-srv-local.js +20 -0
  45. package/project/client/data/addresses/data-addresses-sut-address-global.js +20 -0
  46. package/project/client/data/addresses/data-addresses-sut-address-local.js +20 -0
  47. package/project/client/data/addresses/data-addresses-sut-interface-global.js +19 -0
  48. package/project/client/data/addresses/data-addresses-sut-interface-local.js +19 -0
  49. package/project/client/data/data-chart/data-chart-axis.js +13 -0
  50. package/project/client/data/data-chart/data-chart-grid.js +14 -0
  51. package/project/client/data/data-chart/data-chart-line/data-chart-line-config.js +17 -0
  52. package/project/client/data/data-chart/data-chart-line/data-chart-line.js +41 -0
  53. package/project/client/data/data-config.js +14 -0
  54. package/project/client/data/data-constructor.js +18 -0
  55. package/project/client/data/data-content/data-content-audio-global.js +18 -0
  56. package/project/client/data/data-content/data-content-audio-local.js +18 -0
  57. package/project/client/data/data-content/data-content-documents-global.js +18 -0
  58. package/project/client/data/data-content/data-content-documents-local.js +18 -0
  59. package/project/client/data/data-content/data-content-image-global.js +21 -0
  60. package/project/client/data/data-content/data-content-image-local.js +21 -0
  61. package/project/client/data/data-content/data-content-other-global.js +20 -0
  62. package/project/client/data/data-content/data-content-other-local.js +20 -0
  63. package/project/client/data/data-content/data-content-text-global.js +20 -0
  64. package/project/client/data/data-content/data-content-text-local.js +20 -0
  65. package/project/client/data/data-content/data-content-video-global.js +20 -0
  66. package/project/client/data/data-content/data-content-video-local.js +20 -0
  67. package/project/client/data/data-data.js +28 -0
  68. package/project/client/data/data-dependencies/data-dependencies.js +17 -0
  69. package/project/client/data/data-documentation/data-documentation-navigation.js +15 -0
  70. package/project/client/data/data-documentation/data-documentation.js +20 -0
  71. package/project/client/data/data-flowchart/data-flowchart-block.js +33 -0
  72. package/project/client/data/data-flowchart/data-flowchart-connection.js +17 -0
  73. package/project/client/data/data-flowchart/data-flowchart.js +30 -0
  74. package/project/client/data/data-html/data-html-anchor.js +12 -0
  75. package/project/client/data/data-html/data-html-br.js +11 -0
  76. package/project/client/data/data-html/data-html-button.js +15 -0
  77. package/project/client/data/data-html/data-html-log-start.js +12 -0
  78. package/project/client/data/data-html/data-html-log-stop.js +13 -0
  79. package/project/client/data/data-html/data-html-log.js +16 -0
  80. package/project/client/data/data-html/data-html-toolbar.js +19 -0
  81. package/project/client/data/data-image/data-image.js +20 -0
  82. package/project/client/data/data-lab/data-lab-interface-client.js +19 -0
  83. package/project/client/data/data-lab/data-lab-interface-server.js +19 -0
  84. package/project/client/data/data-lab/data-lab-interface-sut.js +20 -0
  85. package/project/client/data/data-lab/data-lab-network.js +31 -0
  86. package/project/client/data/data-lab/data-lab.js +21 -0
  87. package/project/client/data/data-licenses/data-licenses.js +16 -0
  88. package/project/client/data/data-node-diagram/data-node-diagram-config.js +21 -0
  89. package/project/client/data/data-node-diagram/data-node-diagram-connection.js +18 -0
  90. package/project/client/data/data-node-diagram/data-node-diagram-group.js +16 -0
  91. package/project/client/data/data-node-diagram/data-node-diagram-node.js +22 -0
  92. package/project/client/data/data-node-diagram/data-node-diagram.js +47 -0
  93. package/project/client/data/data-repos/data-repos-content-local.js +15 -0
  94. package/project/client/data/data-repos/data-repos-data-local.js +15 -0
  95. package/project/client/data/data-sequence-diagram/data-sequence-diagram-config.js +22 -0
  96. package/project/client/data/data-sequence-diagram/data-sequence-diagram-message.js +17 -0
  97. package/project/client/data/data-sequence-diagram/data-sequence-diagram-node.js +11 -0
  98. package/project/client/data/data-sequence-diagram/data-sequence-diagram.js +32 -0
  99. package/project/client/data/data-state-machine/data-state-machine-config.js +17 -0
  100. package/project/client/data/data-state-machine/data-state-machine-state.js +29 -0
  101. package/project/client/data/data-state-machine/data-state-machine-transition.js +18 -0
  102. package/project/client/data/data-state-machine/data-state-machine.js +37 -0
  103. package/project/client/data/data-system-under-test/data-system-under-test-instances.js +15 -0
  104. package/project/client/data/data-system-under-test/data-system-under-test-nodes.js +18 -0
  105. package/project/client/data/data-table/data-table-config.js +21 -0
  106. package/project/client/data/data-table-key-value.js +56 -0
  107. package/project/client/data/data-test-case/data-actor.js +282 -0
  108. package/project/client/data/data-test-case/data-test-case-settings.js +49 -0
  109. package/project/client/data/data-test-case/data-test-case.js +19 -0
  110. package/project/client/data/data-test-case/data-test-data-iteration.js +54 -0
  111. package/project/client/data/data-test-case/data-test-data-test-case.js +16 -0
  112. package/project/client/data/data-test-case/data-verification-test-case.js +24 -0
  113. package/project/client/data/data-test-data/data-test-data-environment-global.js +18 -0
  114. package/project/client/data/data-test-data/data-test-data-environment-local.js +18 -0
  115. package/project/client/data/data-test-data/data-test-data-environment-static.js +16 -0
  116. package/project/client/data/data-test-data/data-test-data-general-global.js +18 -0
  117. package/project/client/data/data-test-data/data-test-data-general-local.js +18 -0
  118. package/project/client/data/data-test-data/data-test-data-output-global.js +18 -0
  119. package/project/client/data/data-test-data/data-test-data-output-local.js +18 -0
  120. package/project/client/data/data-test-data/data-test-data-system-global.js +18 -0
  121. package/project/client/data/data-test-data/data-test-data-system-local.js +18 -0
  122. package/project/client/data/data-test-suite/data-test-suite-abstraction.js +72 -0
  123. package/project/client/data/data-test-suite/data-test-suite.js +15 -0
  124. package/project/client/data/data-tree/data-tree-node.js +17 -0
  125. package/project/client/data/data-tree/data-tree.js +13 -0
  126. package/project/client/markup/markup-addresses/markup-addresses-client-address.js +31 -0
  127. package/project/client/markup/markup-addresses/markup-addresses-client-interface.js +31 -0
  128. package/project/client/markup/markup-addresses/markup-addresses-dns.js +32 -0
  129. package/project/client/markup/markup-addresses/markup-addresses-dst.js +31 -0
  130. package/project/client/markup/markup-addresses/markup-addresses-network-interface.js +31 -0
  131. package/project/client/markup/markup-addresses/markup-addresses-ports.js +31 -0
  132. package/project/client/markup/markup-addresses/markup-addresses-server-address.js +31 -0
  133. package/project/client/markup/markup-addresses/markup-addresses-server-interface.js +31 -0
  134. package/project/client/markup/markup-addresses/markup-addresses-src.js +31 -0
  135. package/project/client/markup/markup-addresses/markup-addresses-srv.js +31 -0
  136. package/project/client/markup/markup-addresses/markup-addresses-sut-address.js +31 -0
  137. package/project/client/markup/markup-addresses/markup-addresses-sut-interface.js +31 -0
  138. package/project/client/markup/markup-chart/markup-chart-line.js +92 -0
  139. package/project/client/markup/markup-content/markup-content-audio.js +31 -0
  140. package/project/client/markup/markup-content/markup-content-documents.js +31 -0
  141. package/project/client/markup/markup-content/markup-content-image.js +31 -0
  142. package/project/client/markup/markup-content/markup-content-other.js +31 -0
  143. package/project/client/markup/markup-content/markup-content-text.js +31 -0
  144. package/project/client/markup/markup-content/markup-content-video.js +31 -0
  145. package/project/client/markup/markup-dependencies/markup-dependencies.js +30 -0
  146. package/project/client/markup/markup-documentation/markup-documentation-anchor.js +37 -0
  147. package/project/client/markup/markup-documentation/markup-documentation-api-status.js +67 -0
  148. package/project/client/markup/markup-documentation/markup-documentation-code.js +20 -0
  149. package/project/client/markup/markup-documentation/markup-documentation-div.js +34 -0
  150. package/project/client/markup/markup-documentation/markup-documentation-documentation-status.js +67 -0
  151. package/project/client/markup/markup-documentation/markup-documentation-embed.js +23 -0
  152. package/project/client/markup/markup-documentation/markup-documentation-html.js +139 -0
  153. package/project/client/markup/markup-documentation/markup-documentation-ie.js +21 -0
  154. package/project/client/markup/markup-documentation/markup-documentation-image.js +46 -0
  155. package/project/client/markup/markup-documentation/markup-documentation-lab.js +19 -0
  156. package/project/client/markup/markup-documentation/markup-documentation-local-note.js +33 -0
  157. package/project/client/markup/markup-documentation/markup-documentation-navigation.js +109 -0
  158. package/project/client/markup/markup-documentation/markup-documentation-page.js +262 -0
  159. package/project/client/markup/markup-documentation/markup-documentation-ref.js +28 -0
  160. package/project/client/markup/markup-documentation/markup-documentation-result.js +21 -0
  161. package/project/client/markup/markup-documentation/markup-documentation-state-machine.js +194 -0
  162. package/project/client/markup/markup-documentation/markup-documentation.js +74 -0
  163. package/project/client/markup/markup-flowchart.js +264 -0
  164. package/project/client/markup/markup-lab.js +116 -0
  165. package/project/client/markup/markup-licenses/markup-licenses.js +29 -0
  166. package/project/client/markup/markup-node-diagram.js +435 -0
  167. package/project/client/markup/markup-parse-helper.js +26 -0
  168. package/project/client/markup/markup-pattern-config.js +53 -0
  169. package/project/client/markup/markup-pattern-data.js +50 -0
  170. package/project/client/markup/markup-pattern-function.js +47 -0
  171. package/project/client/markup/markup-repos/markup-repos.js +31 -0
  172. package/project/client/markup/markup-sequence-diagram.js +466 -0
  173. package/project/client/markup/markup-system-under-test/markup-system-under-test-instances.js +29 -0
  174. package/project/client/markup/markup-system-under-test/markup-system-under-test-nodes.js +30 -0
  175. package/project/client/markup/markup-table-key-value-parse.js +25 -0
  176. package/project/client/markup/markup-table-key-value-stringify.js +91 -0
  177. package/project/client/markup/markup-table-key-value.js +18 -0
  178. package/project/client/markup/markup-table-name-value.js +101 -0
  179. package/project/client/markup/markup-table.js +85 -0
  180. package/project/client/markup/markup-tables-parser.js +122 -0
  181. package/project/client/markup/markup-test-case/markup-test-case.js +67 -0
  182. package/project/client/markup/markup-test-data/markup-test-data-environment.js +31 -0
  183. package/project/client/markup/markup-test-data/markup-test-data-general.js +31 -0
  184. package/project/client/markup/markup-test-data/markup-test-data-output.js +31 -0
  185. package/project/client/markup/markup-test-data/markup-test-data-system.js +31 -0
  186. package/project/client/markup/markup-test-suite/markup-test-suite.js +40 -0
  187. package/project/client/react-components/helper/line-data.js +16 -0
  188. package/project/client/react-components/helper/line-object.js +22 -0
  189. package/project/client/react-components/helper/scroll-data.js +74 -0
  190. package/project/client/react-components/markup/component-chart/component-image-chart-line.jsx +203 -0
  191. package/project/client/react-components/markup/component-code.jsx +50 -0
  192. package/project/client/react-components/markup/component-document.jsx +105 -0
  193. package/project/client/react-components/markup/component-documentation-anchor.jsx +47 -0
  194. package/project/client/react-components/markup/component-embed.jsx +48 -0
  195. package/project/client/react-components/markup/component-image-flowchart.jsx +389 -0
  196. package/project/client/react-components/markup/component-image-image.jsx +32 -0
  197. package/project/client/react-components/markup/component-image-lab.jsx +696 -0
  198. package/project/client/react-components/markup/component-image-node-diagram.jsx +506 -0
  199. package/project/client/react-components/markup/component-image-result.jsx +22 -0
  200. package/project/client/react-components/markup/component-image-sequence-diagram.jsx +645 -0
  201. package/project/client/react-components/markup/component-image-state-machine.jsx +633 -0
  202. package/project/client/react-components/markup/component-image-table.jsx +96 -0
  203. package/project/client/react-components/markup/component-local-note.jsx +99 -0
  204. package/project/client/react-components/markup/component-markup-remarkable.jsx +79 -0
  205. package/project/client/react-components/markup/component-markup.jsx +1036 -0
  206. package/project/client/react-components/markup/component-table-data-table.jsx +146 -0
  207. package/project/client/stores/style-store.js +96 -0
  208. package/project/z-abs-complayer-markup-client.tree +239 -0
@@ -0,0 +1,645 @@
1
+
2
+ 'use strict';
3
+
4
+ import ReactComponentBase from 'z-abs-corelayer-client/client/react-component/react-component-base';
5
+ import React from 'react';
6
+
7
+
8
+ export default class ComponentImageSequenceDiagram extends ReactComponentBase {
9
+ constructor(props) {
10
+ super(props);
11
+ }
12
+
13
+ shouldUpdate(nextProps, nextState) {
14
+ return !this.shallowCompare(this.props, nextProps);
15
+ }
16
+
17
+ renderTitle(title, x) {
18
+ if(0 !== title) {
19
+ return (
20
+ <text x={x} y={ComponentImageSequenceDiagram.TITLE_TOP} textAnchor="middle" style={{fontSize:ComponentImageSequenceDiagram.TITLE_FONT_SIZE,fontWeight:'bold'}}>
21
+ {title}
22
+ </text>
23
+ );
24
+ }
25
+ }
26
+
27
+ renderNodes(nodes, height, titleHeight, config) {
28
+ const svgNodes = nodes.map((node, index) => {
29
+ const lineNumberBias = config.lineNumbers ? ComponentImageSequenceDiagram.LINE_NUMBER_BIAS : 0;
30
+ const x = config.widthBias + index * config.nodeWidth + lineNumberBias;
31
+ return (
32
+ <g key={index}>
33
+ <text x={x} y={titleHeight + config.heightBias + ComponentImageSequenceDiagram.TEXT_BIAS_MSG_Y} style={{fontSize:'12px',fontWeight:'bold',textAnchor:'middle'}}>
34
+ {node.name}
35
+ </text>
36
+ <line x1={x} y1={config.heightBias + titleHeight} x2={x} y2={config.heightBias + height + titleHeight} style={{stroke:'#666',strokeWidth:ComponentImageSequenceDiagram.NODE_WIDTH}} />
37
+ </g>
38
+ );
39
+ });
40
+ return (
41
+ <g>
42
+ {svgNodes}
43
+ </g>
44
+ );
45
+ }
46
+
47
+ renderMessageLine(message, x1, x2, y, config) {
48
+ let xa;
49
+ let xb;
50
+ if('normal-bi-directional' === message.messageType || 'part-bi-directional' === message.messageType) {
51
+ if(x1 < x2) {
52
+ xa = x1 + ComponentImageSequenceDiagram.LINE_BIAS;
53
+ xb = x2 - ComponentImageSequenceDiagram.LINE_BIAS;
54
+ }
55
+ else {
56
+ xa = x1 - ComponentImageSequenceDiagram.LINE_BIAS;
57
+ xb = x2 + ComponentImageSequenceDiagram.LINE_BIAS;
58
+ }
59
+ }
60
+ else if('long-comment' === message.messageType) {
61
+ if(x1 < x2) {
62
+ xa = x1 + ComponentImageSequenceDiagram.NODE_WIDTH_HALF;
63
+ xb = x2 - ComponentImageSequenceDiagram.NODE_WIDTH_HALF;
64
+ }
65
+ else {
66
+ xa = x1 - ComponentImageSequenceDiagram.NODE_WIDTH_HALF;
67
+ xb = x2 + ComponentImageSequenceDiagram.NODE_WIDTH_HALF;
68
+ }
69
+ y = y - config.nodeCommentHeight / 2 + 4;
70
+ }
71
+ else {
72
+ if(x1 < x2) {
73
+ xa = x1 + ComponentImageSequenceDiagram.NODE_WIDTH_HALF;
74
+ xb = x2 - ComponentImageSequenceDiagram.LINE_BIAS;
75
+ }
76
+ else {
77
+ xa = x1 - ComponentImageSequenceDiagram.NODE_WIDTH_HALF;
78
+ xb = x2 + ComponentImageSequenceDiagram.LINE_BIAS;
79
+ }
80
+ }
81
+ let type = `seq_dia_protocol_${message.type}`;
82
+ if('part' === message.messageType || 'part-bi-directional' === message.messageType) {
83
+ type += ' seq_message_part';
84
+ }
85
+ return (
86
+ <line className={type} x1={xa} y1={y} x2={xb} y2={y} style={{strokeWidth:ComponentImageSequenceDiagram.NODE_WIDTH}} />
87
+ );
88
+ }
89
+
90
+ renderTriangleEndPoints(x1, x2, y) {
91
+ let xa1, xa2;
92
+ let xb1, xb2;
93
+ if(x1 < x2) {
94
+ xa1 = x1 + ComponentImageSequenceDiagram.TRIANGLE_BASE;
95
+ xb1 = x1 + ComponentImageSequenceDiagram.TRIANGLE_TOP;
96
+ xa2 = x2 - ComponentImageSequenceDiagram.TRIANGLE_BASE;
97
+ xb2 = x2 - ComponentImageSequenceDiagram.TRIANGLE_TOP;
98
+ }
99
+ else {
100
+ xa1 = x1 - ComponentImageSequenceDiagram.TRIANGLE_BASE;
101
+ xb1 = x1 - ComponentImageSequenceDiagram.TRIANGLE_TOP;
102
+ xa2 = x2 + ComponentImageSequenceDiagram.TRIANGLE_BASE;
103
+ xb2 = x2 + ComponentImageSequenceDiagram.TRIANGLE_TOP;
104
+ }
105
+ const trinagle1 = `${xa1},${y - ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xa1},${y + ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xb1},${y}`;
106
+ const trinagle2 = `${xa2},${y - ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xa2},${y + ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xb2},${y}`;
107
+ return (
108
+ <g>
109
+ <polygon points={trinagle1}/>
110
+ <polygon points={trinagle2}/>
111
+ </g>
112
+ );
113
+ }
114
+
115
+ renderTriangleEndPoint(x1, x2, y) {
116
+ let xa;
117
+ let xb;
118
+ if(x1 < x2) {
119
+ xa = x2 - ComponentImageSequenceDiagram.TRIANGLE_BASE;
120
+ xb = x2 - ComponentImageSequenceDiagram.TRIANGLE_TOP;
121
+ }
122
+ else {
123
+ xa = x2 + ComponentImageSequenceDiagram.TRIANGLE_BASE;
124
+ xb = x2 + ComponentImageSequenceDiagram.TRIANGLE_TOP;
125
+ }
126
+ const trinagle = `${xa},${y - ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xa},${y + ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xb},${y}`;
127
+ return (
128
+ <polygon points={trinagle}/>
129
+ );
130
+ }
131
+
132
+ renderConnectEndPoints(message, x1, x2, y) {
133
+ let xa;
134
+ let xb;
135
+ if(x1 < x2) {
136
+ xa = x2 - ComponentImageSequenceDiagram.ARROW_CONNECTION_BASE;
137
+ xb = x2 - ComponentImageSequenceDiagram.ARROW_CONNECTION_TOP;
138
+ }
139
+ else {
140
+ xa = x2 + ComponentImageSequenceDiagram.ARROW_CONNECTION_BASE;
141
+ xb = x2 + ComponentImageSequenceDiagram.ARROW_CONNECTION_TOP;
142
+ }
143
+ const trinagle = `${xa},${y - ComponentImageSequenceDiagram.ARROW_CONNECTION_HEIGHT} ${xa},${y + ComponentImageSequenceDiagram.ARROW_CONNECTION_HEIGHT} ${xb},${y}`;
144
+ const className = `markup_seq_end_point seq_dia_protocol_${message.type}_small`;
145
+ return (
146
+ <g>
147
+ <polygon points={trinagle} />
148
+ <circle cx={x1} cy={y} r="4"/>
149
+ <circle cx={x2} cy={y} r="4"/>
150
+ <circle cx={x1} cy={y} r="3" className={className} />
151
+ <circle cx={x2} cy={y} r="3" className={className} />
152
+ </g>
153
+ );
154
+ }
155
+
156
+ renderDisconnectEndPoints(x1, x2, y) {
157
+ let xa;
158
+ let xb;
159
+ if(x1 < x2) {
160
+ xa = x2 - ComponentImageSequenceDiagram.TRIANGLE_BASE;
161
+ xb = x2 - ComponentImageSequenceDiagram.TRIANGLE_TOP;
162
+ }
163
+ else {
164
+ xa = x2 + ComponentImageSequenceDiagram.TRIANGLE_BASE;
165
+ xb = x2 + ComponentImageSequenceDiagram.TRIANGLE_TOP;
166
+ }
167
+ const trinagle = `${xa},${y - ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xa},${y + ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xb},${y}`;
168
+ const x1Plus = x1 + ComponentImageSequenceDiagram.CROSS_LENGTH;
169
+ const x1Minus = x1 - ComponentImageSequenceDiagram.CROSS_LENGTH;
170
+ const x2Plus = x2 + ComponentImageSequenceDiagram.CROSS_LENGTH;
171
+ const x2Minus = x2 - ComponentImageSequenceDiagram.CROSS_LENGTH;
172
+ const yPlus = y + ComponentImageSequenceDiagram.CROSS_LENGTH;
173
+ const yMinus = y - ComponentImageSequenceDiagram.CROSS_LENGTH;
174
+ return (
175
+ <g>
176
+ <polygon points={trinagle} />
177
+ <line x1={x1Minus} y1={yPlus} x2={x1Plus} y2= {yMinus} style={{stroke:'black',strokeWidth:ComponentImageSequenceDiagram.DISCONNECT_WIDTH}} />
178
+ <line x1={x1Plus} y1={yPlus} x2={x1Minus} y2= {yMinus} style={{stroke:'black',strokeWidth:ComponentImageSequenceDiagram.DISCONNECT_WIDTH}} />
179
+ <line x1={x2Minus} y1={yPlus} x2={x2Plus} y2= {yMinus} style={{stroke:'black',strokeWidth:ComponentImageSequenceDiagram.DISCONNECT_WIDTH}} />
180
+ <line x1={x2Plus} y1={yPlus} x2={x2Minus} y2= {yMinus} style={{stroke:'black',strokeWidth:ComponentImageSequenceDiagram.DISCONNECT_WIDTH}} />
181
+ </g>
182
+ );
183
+ }
184
+
185
+ renderStartEndPoint(message, x, y) {
186
+ const ya = y;
187
+ const xa = x - ComponentImageSequenceDiagram.TRIANGLE_BASE + ComponentImageSequenceDiagram.TRIANGLE_BASE_2_3;
188
+ const xb = x - ComponentImageSequenceDiagram.TRIANGLE_TOP + ComponentImageSequenceDiagram.TRIANGLE_BASE_2_3;
189
+ const trinagle = `${xa},${ya - ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xa},${ya + ComponentImageSequenceDiagram.TRIANGLE_HEIGHT} ${xb},${ya}`;
190
+ const className = `markup_seq_end_point seq_dia_protocol_${message.type}_small`;
191
+ return (
192
+ <g>
193
+ <polygon className={className} points={trinagle} />
194
+ </g>
195
+ );
196
+ }
197
+
198
+ renderStopEndPoint(message, x, y) {
199
+ const length = 8;
200
+ const lengthHalf = length / 2;
201
+ const xa = x - lengthHalf;
202
+ const ya = y - lengthHalf;
203
+ const className = `markup_seq_end_point seq_dia_protocol_${message.type}_small`;
204
+ return (
205
+ <g>
206
+ <rect className={className} x={xa} y={ya} width={length} height={length}/>
207
+ </g>
208
+ );
209
+ }
210
+
211
+ renderPauseEndPoint(message, x, y) {
212
+ const length = 8;
213
+ const lengthHalf = length / 2;
214
+ const xa = x - lengthHalf;
215
+ const ya = y - lengthHalf;
216
+ const className = `markup_seq_end_point seq_dia_protocol_${message.type}_empty`;
217
+ const classNamePause = `markup_seq_end_point seq_dia_protocol_${message.type}_pause`;
218
+ return (
219
+ <g>
220
+ <rect className={className} x={xa} y={ya} width={length} height={length}/>
221
+ <line className={classNamePause} x1={xa+2} x2={xa+2} y1={ya} y2={ya+8} />
222
+ <line className={classNamePause} x1={xa+6} x2={xa+6} y1={ya} y2={ya+8} />
223
+ </g>
224
+ );
225
+ }
226
+
227
+ renderNewEndPoint(message, x, y) {
228
+ return (
229
+ <g>
230
+ <circle cx={x} cy={y} r="4" style={{stroke:'Black',strokeWidth:1,fill:'White'}} />
231
+ </g>
232
+ );
233
+ }
234
+
235
+ renderDeleteEndPoint(message, x, y) {
236
+ const length = 4;
237
+ const lengthHalf = length / 2;
238
+ const xa = x - lengthHalf;
239
+ const xb = x + lengthHalf;
240
+ const ya = y - lengthHalf;
241
+ const yb = y + lengthHalf;
242
+ return (
243
+ <g>
244
+ <circle cx={x} cy={y} r="4" style={{stroke:'Black',strokeWidth:1,fill:'White'}} />
245
+ <line x1={xa} x2={xb} y1={yb} y2={ya} style={{stroke:'Black',strokeWidth:1}}/>
246
+ <line x1={xa} x2={xb} y1={ya} y2={yb} style={{stroke:'Black',strokeWidth:1}}/>
247
+ </g>
248
+ );
249
+ }
250
+
251
+ renderCommentEndPoint(message, x, y) {
252
+ const length = 6;
253
+ const slope = 1;
254
+ const lengthHalf = length / 2;
255
+ const xa = x - lengthHalf;
256
+ const xb = x + lengthHalf;
257
+ const ya = y - lengthHalf;
258
+ const yb = y + lengthHalf;
259
+ const className = `markup_seq_end_point seq_dia_protocol_${message.type}_small`;
260
+ return (
261
+ <g>
262
+ <circle cx={x} cy={y} r="4" style={{stroke:'Black',strokeWidth:1,fill:'White'}} />
263
+ <line x1={xa-1+slope} x2={xb-1-slope} y1={yb} y2={ya} style={{stroke:'Black',strokeWidth:1}}/>
264
+ <line x1={xa+1+slope} x2={xb+1-slope} y1={yb} y2={ya} style={{stroke:'Black',strokeWidth:1}}/>
265
+ </g>
266
+ );
267
+ }
268
+
269
+ renderVerifyEndPoint(message, x, y) {
270
+ const ax1 = x;
271
+ const ax2 = x - 2;
272
+ const ay1 = y + 2;
273
+ const ay2 = y;
274
+ const bx1 = x - 0.5;
275
+ const bx2 = x + 2;
276
+ const by1 = y + 2;
277
+ const by2 = y - 2;
278
+ const className = `markup_seq_end_point seq_dia_protocol_${message.type}_small`;
279
+ return (
280
+ <g>
281
+ <circle cx={x} cy={y} r="4" style={{stroke:'Green',strokeWidth:1,fill:'#d0e9c6'}} />
282
+ <line x1={ax1} x2={ax2} y1={ay1} y2={ay2} style={{stroke:'Green',strokeWidth:1}}/>
283
+ <line x1={bx1} x2={bx2} y1={by1} y2={by2} style={{stroke:'Green',strokeWidth:1}}/>
284
+ </g>
285
+ );
286
+ }
287
+
288
+ renderNewBrowserEndPoint(message, x, y) {
289
+ const r = 2;
290
+ const className = `markup_seq_end_point seq_dia_protocol_${message.type}_small`;
291
+ return (
292
+ <>
293
+ <g transform={`translate(${x-5} ${y-4}) scale(0.1 0.1)`}>
294
+ <path className="gui_seq_dia_browser_svg" d="M 84.24 34.662 c 5.993 -13.379 7.386 -25.143 3.819 -32.273 c -0.097 -0.193 -0.254 -0.35 -0.447 -0.447 C 80.481 -1.626 68.717 -0.234 55.337 5.76 c -0.018 0.008 -0.033 0.021 -0.05 0.03 c -6.605 2.964 -13.045 6.812 -18.59 11.048 l -12.576 0.306 c -1.434 0.035 -2.838 0.449 -4.061 1.197 L 2.531 29.06 c -1.463 0.894 -2.359 2.452 -2.397 4.167 c -0.038 1.715 0.79 3.311 2.212 4.268 l 13.132 8.839 l -2.22 10.701 c -0.068 0.33 0.034 0.672 0.272 0.91 L 32.056 76.47 c 0.189 0.189 0.444 0.293 0.707 0.293 c 0.067 0 0.136 -0.007 0.203 -0.021 l 10.693 -2.218 l 8.817 13.101 c 0.937 1.392 2.484 2.213 4.157 2.213 c 0.036 0 0.074 0 0.111 -0.001 c 1.714 -0.037 3.273 -0.934 4.168 -2.397 l 10.717 -17.53 c 0.748 -1.221 1.161 -2.625 1.197 -4.061 l 0.305 -12.506 z" />
295
+ <line className="gui_seq_dia_browser_fuel" x1="20" x2="0" y1="58" y2="78" />
296
+ <line className="gui_seq_dia_browser_fuel" x1="26" x2="0" y1="64" y2="90" />
297
+ <line className="gui_seq_dia_browser_fuel" x1="32" x2="12" y1="70" y2="90" />
298
+ </g>
299
+ <circle className={`seq_dia_protocol_${message.type}_small`} cx={x} cy={y} r={r} style={{stroke:'black',strokeWidth:0.5}} />
300
+ </>
301
+ );
302
+ }
303
+
304
+ renderPageEndPoint(message, x, y) {
305
+ const length = 6;
306
+ const lengthHalf = length / 2;
307
+ x = x - lengthHalf - 2;
308
+ y = y - lengthHalf - 2;
309
+ return (
310
+ <g transform={`translate(${x} ${y}) scale(0.02 0.02)`}>
311
+ <path className="gui_seq_dia_page" fill="#8fbcef" d="m285.37 85.136 1.3221-76.683 101.47 101.8-80.98-1.3221z" />
312
+ <path fill="White" d="m5.742 26.302 18.84-16.527 262.11-1.3221-1.3221 76.683 21.815 23.798 80.98 1.3221-0.99159 368.21-17.518 18.675-338.79 4.1316-23.137-20.823z" />
313
+ <path className="gui_seq_dia_page" fill="#227ce0" d="m398.96 110.75c-0.018-0.185-0.05-0.365-0.081-0.545-0.011-0.06-0.016-0.122-0.028-0.182-0.043-0.215-0.098-0.425-0.159-0.632-7e-3 -0.025-0.012-0.052-0.02-0.077-0.065-0.213-0.141-0.421-0.224-0.625-8e-3 -0.021-0.015-0.043-0.023-0.064-0.081-0.195-0.173-0.384-0.269-0.57-0.016-0.031-0.029-0.063-0.045-0.094-0.093-0.173-0.196-0.339-0.301-0.504-0.027-0.042-0.05-0.086-0.077-0.127-0.103-0.154-0.216-0.3-0.33-0.446-0.037-0.048-0.07-0.098-0.109-0.145-0.142-0.173-0.294-0.338-0.45-0.498-0.015-0.015-0.027-0.031-0.042-0.046l-104-104c-0.018-0.018-0.038-0.033-0.057-0.051-0.156-0.153-0.317-0.301-0.486-0.44-0.055-0.045-0.113-0.083-0.169-0.126-0.138-0.107-0.275-0.214-0.42-0.311-0.051-0.034-0.105-0.062-0.156-0.095-0.156-0.099-0.312-0.197-0.475-0.284-0.036-0.019-0.074-0.035-0.111-0.053-0.181-0.093-0.365-0.183-0.554-0.262-0.024-0.01-0.049-0.017-0.074-0.027-0.202-0.081-0.406-0.157-0.616-0.221-0.027-8e-3 -0.054-0.013-0.081-0.021-0.206-0.06-0.415-0.115-0.628-0.158-0.063-0.013-0.128-0.018-0.192-0.029-0.177-0.031-0.354-0.062-0.536-0.08-0.248-0.025-0.498-0.038-0.749-0.038h-248c-21.78 0-39.5 17.72-39.5 39.5v432c0 21.78 17.72 39.5 39.5 39.5h320c21.78 0 39.5-17.72 39.5-39.5v-360c0-0.251-0.013-0.501-0.038-0.749zm-103.96-85.145 78.394 78.394h-53.894c-13.509 0-24.5-10.99-24.5-24.5zm64.5 470.39h-320c-13.509 0-24.5-10.99-24.5-24.5v-432c0-13.51 10.991-24.5 24.5-24.5h240.5v64.5c0 21.78 17.72 39.5 39.5 39.5h64.5v352.5c0 13.51-10.991 24.5-24.5 24.5z" />
314
+ <g transform="translate(-55.998 .001)">
315
+ <path d="m210.79 328.21v33.164l-117.89-51.094v-28.359l117.89-51.094v33.398l-82.148 31.641z" />
316
+ <path d="m283.68 230.12-32.812 135.12q-1.6406 6.6797-2.9297 10.547-1.1719 3.8672-3.75 5.9766-2.4609 2.2266-7.2656 2.2266-11.953 0-11.953-10.312 0-2.6953 2.3438-13.477l32.695-135.12q2.5781-10.781 4.9219-14.766 2.3438-3.9844 9.1406-3.9844 5.8594 0 8.9062 2.8125 3.1641 2.8125 3.1641 7.7344 0 3.6328-2.4609 13.242z" />
317
+ <path d="m418.1 310.28-117.89 51.328v-33.164l82.383-32.344-82.383-31.875v-32.93l117.89 50.859z" />
318
+ </g>
319
+ </g>
320
+ );
321
+ }
322
+
323
+ renderClickEndPoint(message, x, y) {
324
+ const r = 2.4;
325
+ const className = `markup_seq_end_point seq_dia_protocol_${message.type}_small`;
326
+ return (
327
+ <>
328
+ <circle className={`seq_dia_protocol_${message.type}_small`} cx={x} cy={y} r={r} style={{stroke:'black',strokeWidth:0.5}} />
329
+ <g transform={`translate(${x - 5} ${y - 7.5}) scale(0.13 0.13)`}>
330
+ <path style={{stroke:'Black',strokeWidth:4,strokeDasharray:'none',strokeLinecap:'butt',strokeLinejoin:'miter',strokeMiterlimit:10,fill:'White',fillRule:'nonzero',opacity:1,strokeLinecap:'round',transform:'rotate(45deg)'}} d="M 66.437 24.873 c 0.382 -1.923 -0.02 -3.815 -1.129 -5.329 c -1.108 -1.514 -2.791 -2.467 -4.739 -2.685 c -1.918 -0.215 -3.853 0.314 -5.455 1.487 l -32.62 23.888 l 0.161 -8.456 c 0.036 -1.889 -0.682 -3.638 -2.023 -4.924 c -1.388 -1.332 -3.25 -1.999 -5.258 -1.878 c -4.003 0.242 -7.319 3.62 -7.394 7.529 L 7.399 65.128 C 7.276 70.599 8.867 75.753 12 80.031 c 4.799 6.553 12.408 9.97 20.359 9.969 c 5.88 0 11.948 -1.868 17.205 -5.718 l 13.652 -9.998 c 3.344 -2.45 4.212 -6.972 1.935 -10.081 c -1.108 -1.513 -2.791 -2.467 -4.739 -2.684 c -0.013 -0.001 -0.025 -0.001 -0.038 -0.002 l 0.359 -0.263 c 1.601 -1.173 2.69 -2.86 3.064 -4.751 c 0.382 -1.922 -0.02 -3.816 -1.129 -5.329 c -1.108 -1.513 -2.791 -2.467 -4.739 -2.685 c -0.351 -0.04 -0.702 -0.046 -1.052 -0.036 c 0.446 -0.746 0.771 -1.56 0.942 -2.42 c 0.381 -1.922 -0.021 -3.815 -1.129 -5.329 c -1.154 -1.576 -2.899 -2.488 -4.774 -2.689 l 11.458 -8.391 C 64.974 28.451 66.063 26.764 66.437 24.873" />
331
+ </g>
332
+ </>
333
+ );
334
+ }
335
+
336
+ renderTypeEndPoint(message, x, y) {
337
+ const r = 2.4;
338
+ const className = `markup_seq_end_point seq_dia_protocol_${message.type}_small`;
339
+ return (
340
+ <>
341
+ <line x1={x-8} x2={x} y1={y} y2={y} style={{stroke:'black',strokeWidth:0.5}}/>
342
+ <circle className={`seq_dia_protocol_${message.type}_small`} cx={x} cy={y} r={r} style={{stroke:'black',strokeWidth:0.5}} />
343
+ <g transform={`translate(${x-16} ${y-6}) scale(0.02 0.02)`}>
344
+ <rect className="gui_seq_dia_type" x="0" width="480" rx="2" y="200" height="200" ry="2" />
345
+ <path d="M251.2,193.5v-53.7c0-5.8,4.7-10.5,10.5-10.5h119.4c21,0,38.1-17.1,38.1-38.1s-17.1-38.1-38.1-38.1H129.5 c-5.4,0-10.1,4.3-10.1,10.1c0,5.8,4.3,10.1,10.1,10.1h251.6c10.1,0,17.9,8.2,17.9,17.9c0,10.1-8.2,17.9-17.9,17.9H261.7 c-16.7,0-30.3,13.6-30.3,30.3v53.3H0v244.2h490V193.5H251.2z M232.2,221.5h15.6c5.4,0,10.1,4.3,10.1,10.1s-4.3,10.1-10.1,10.1 h-15.6c-5.4,0-10.1-4.3-10.1-10.1C222.1,225.8,226.7,221.5,232.2,221.5z M203.4,325.7h-15.6c-5.4,0-10.1-4.3-10.1-10.1 c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C213.5,321,208.8,325.7,203.4,325.7z M213.5,352.9 c0,5.4-4.3,10.1-10.1,10.1h-15.6c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6C208.8,342.8,213.5,347.5,213.5,352.9z M203.4,288h-15.6c-5.4,0-10.1-4.3-10.1-10.1c0-5.8,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1 C213.5,283.7,208.8,288,203.4,288z M186.3,221.5h15.6c5.4,0,10.1,4.3,10.1,10.1s-4.3,10.1-10.1,10.1h-15.6 c-5.4,0-10.1-4.3-10.1-10.1S180.8,221.5,186.3,221.5z M140.4,221.5H156c5.4,0,10.1,4.3,10.1,10.1s-4.3,10.1-10.1,10.1h-15.6 c-5.4,0-10.1-4.3-10.1-10.1C130.3,225.8,134.9,221.5,140.4,221.5z M138.8,268.1h15.6c5.4,0,10.1,4.3,10.1,10.1 c0,5.8-4.3,10.1-10.1,10.1h-15.6c-5.4,0-10.1-4.3-10.1-10.1C128.7,272.4,133.4,268.1,138.8,268.1z M138.8,305.5h15.6 c5.4,0,10.1,4.3,10.1,10.1c0,5.4-4.3,10.1-10.1,10.1h-15.6c-5.4,0-10.1-4.3-10.1-10.1C128.7,310.1,133.4,305.5,138.8,305.5z M138.8,342.8h15.6c5.4,0,10.1,4.3,10.1,10.1c0,5.4-4.3,10.1-10.1,10.1h-15.6c-5.4,0-10.1-4.3-10.1-10.1 C128.7,347.5,133.4,342.8,138.8,342.8z M94.5,221.5h15.6c5.4,0,10.1,4.3,10.1,10.1s-4.3,10.1-10.1,10.1H94.5 c-5.4,0-10.1-4.3-10.1-10.1S89.1,221.5,94.5,221.5z M89.4,268.1H105c5.4,0,10.1,4.3,10.1,10.1c0,5.8-4.3,10.1-10.1,10.1H89.4 c-5.4,0-10.1-4.3-10.1-10.1C79.3,272.4,84,268.1,89.4,268.1z M89.4,305.5H105c5.4,0,10.1,4.3,10.1,10.1c0,5.4-4.3,10.1-10.1,10.1 H89.4c-5.4,0-10.1-4.3-10.1-10.1C79.7,310.1,84,305.5,89.4,305.5z M89.4,342.8H105c5.4,0,10.1,4.3,10.1,10.1 c0,5.4-4.3,10.1-10.1,10.1H89.4c-5.4,0-10.1-4.3-10.1-10.1C79.7,347.5,84,342.8,89.4,342.8z M56,400.4H40.4 c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1H56c5.4,0,10.1,4.3,10.1,10.1C65.7,395.7,61.4,400.4,56,400.4z M56,363H40.4 c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1H56c5.4,0,10.1,4.3,10.1,10.1C65.7,358.4,61.4,363,56,363z M56,325.7H40.4 c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1H56c5.4,0,10.1,4.3,10.1,10.1C65.7,321,61.4,325.7,56,325.7z M56,288H40.4 c-5.4,0-10.1-4.3-10.1-10.1c0-5.8,4.3-10.1,10.1-10.1H56c5.4,0,10.1,4.3,10.1,10.1C66.1,283.7,61.4,288,56,288z M56,241.3H40.4 c-5.4,0-10.1-4.3-10.1-10.1s4.3-10.1,10.1-10.1H56c5.4,0,10.1,4.3,10.1,10.1S61.4,241.3,56,241.3z M252.8,400.4H89.4 c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h163.3c5.4,0,10.1,4.3,10.1,10.1C262.9,395.7,258.2,400.4,252.8,400.4z M252.8,363h-15.6c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1 C262.9,358.4,258.2,363,252.8,363z M252.8,325.7h-15.6c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6 c5.4,0,10.1,4.3,10.1,10.1C262.9,321,258.2,325.7,252.8,325.7z M252.8,288h-15.6c-5.4,0-10.1-4.3-10.1-10.1 c0-5.8,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C262.9,283.7,258.2,288,252.8,288z M302.2,400.4h-15.6 c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C311.9,395.7,307.6,400.4,302.2,400.4z M302.2,363h-15.6c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1 C311.9,358.4,307.6,363,302.2,363z M302.2,325.7h-15.6c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6 c5.4,0,10.1,4.3,10.1,10.1C311.9,321,307.6,325.7,302.2,325.7z M302.2,288h-15.6c-5.4,0-10.1-4.3-10.1-10.1 c0-5.8,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C312.3,283.7,307.6,288,302.2,288z M312.3,241.3h-15.6 c-5.4,0-10.1-4.3-10.1-10.1s4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1S317.7,241.3,312.3,241.3z M351.2,400.4h-15.6 c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C361.3,395.7,356.6,400.4,351.2,400.4z M351.2,363h-15.6c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1 C361.3,358.4,356.6,363,351.2,363z M351.2,325.7h-15.6c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6 c5.4,0,10.1,4.3,10.1,10.1C361.3,321,356.6,325.7,351.2,325.7z M351.2,288h-15.6c-5.4,0-10.1-4.3-10.1-10.1 c0-5.8,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C361.3,283.7,356.6,288,351.2,288z M357.8,241.3h-15.6 c-5.4,0-10.1-4.3-10.1-10.1s4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1S363.6,241.3,357.8,241.3z M400.6,400.4H385 c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C410.3,395.7,406,400.4,400.6,400.4z M400.6,363H385c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1 C410.3,358.4,406,363,400.6,363z M400.6,325.7H385c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6 c5.4,0,10.1,4.3,10.1,10.1C410.3,321,406,325.7,400.6,325.7z M400.6,288H385c-5.4,0-10.1-4.3-10.1-10.1c0-5.8,4.3-10.1,10.1-10.1 h15.6c5.4,0,10.1,4.3,10.1,10.1C410.7,283.7,406,288,400.6,288z M403.7,241.3h-15.6c-5.4,0-10.1-4.3-10.1-10.1s4.3-10.1,10.1-10.1 h15.6c5.4,0,10.1,4.3,10.1,10.1C413.8,237,409.5,241.3,403.7,241.3z M449.6,400.4H434c-5.4,0-10.1-4.3-10.1-10.1 c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C459.7,395.7,455,400.4,449.6,400.4z M449.6,363H434 c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C459.7,358.4,455,363,449.6,363z M449.6,325.7 H434c-5.4,0-10.1-4.3-10.1-10.1c0-5.4,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1C459.7,321,455,325.7,449.6,325.7z M449.6,288H434c-5.4,0-10.1-4.3-10.1-10.1c0-5.8,4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1 C459.7,283.7,455,288,449.6,288z M449.6,241.3H434c-5.4,0-10.1-4.3-10.1-10.1s4.3-10.1,10.1-10.1h15.6c5.4,0,10.1,4.3,10.1,10.1 S455,241.3,449.6,241.3z" />
346
+ </g>
347
+ </>
348
+ );
349
+ }
350
+
351
+ renderMessageEndPoints(message, x1, x2, y) {
352
+ if('normal' === message.messageType || 'part' === message.messageType) {
353
+ return this.renderTriangleEndPoint(x1, x2, y);
354
+ }
355
+ else if('normal-bi-directional' === message.messageType || 'part-bi-directional' === message.messageType) {
356
+ return this.renderTriangleEndPoints(x1, x2, y);
357
+ }
358
+ else if('connect' === message.messageType) {
359
+ return this.renderConnectEndPoints(message, x1, x2, y);
360
+ }
361
+ else if('disconnect' === message.messageType) {
362
+ return this.renderDisconnectEndPoints(x1, x2, y);
363
+ }
364
+ }
365
+
366
+ renderMessageEndPoint(message, x, y) {
367
+ if('start' === message.messageType) {
368
+ return this.renderStartEndPoint(message, x, y);
369
+ }
370
+ else if('stop' === message.messageType) {
371
+ return this.renderStopEndPoint(message, x, y);
372
+ }
373
+ else if('pause' === message.messageType) {
374
+ return this.renderPauseEndPoint(message, x, y);
375
+ }
376
+ else if('new' === message.messageType) {
377
+ return this.renderNewEndPoint(message, x, y);
378
+ }
379
+ else if('delete' === message.messageType) {
380
+ return this.renderDeleteEndPoint(message, x, y);
381
+ }
382
+ else if('comment' === message.messageType) {
383
+ return this.renderCommentEndPoint(message, x, y);
384
+ }
385
+ else if('verify' === message.messageType) {
386
+ return this.renderVerifyEndPoint(message, x, y);
387
+ }
388
+ else if('browser' === message.messageType) {
389
+ return this.renderNewBrowserEndPoint(message, x, y);
390
+ }
391
+ else if('page' === message.messageType) {
392
+ return this.renderPageEndPoint(message, x, y);
393
+ }
394
+ else if('click' === message.messageType) {
395
+ return this.renderClickEndPoint(message, x, y);
396
+ }
397
+ else if('type' === message.messageType) {
398
+ return this.renderTypeEndPoint(message, x, y);
399
+ }
400
+ }
401
+
402
+ renderMessageEventData(message, x1, y, config) {
403
+ let x = x1 - ComponentImageSequenceDiagram.TEXT_EVENT_BIAS_X;
404
+ let infoText = message.data ? message.data : null;
405
+ let text = '';
406
+ if('verify' === message.messageType) {
407
+ text = 'VERIFY';
408
+ }
409
+ if('browser' === message.messageType) {
410
+ text = 'browser';
411
+ }
412
+ else if('page' === message.messageType) {
413
+ text = 'page';
414
+ }
415
+ else if('click' === message.messageType) {
416
+ text = 'click';
417
+ x -= 6;
418
+ }
419
+ else if('type' === message.messageType) {
420
+ text = 'type';
421
+ x -= 6;
422
+ }
423
+ const anchor = 'end';
424
+ return (
425
+ <>
426
+ <text x={x} y={y + (config.nodeEventHeight / 2) + ComponentImageSequenceDiagram.TEXT_BIAS_EVENT_Y} style={{fontSize:'10px',fontWeight:'bold',textAnchor:anchor}}>
427
+ {text}
428
+ </text>
429
+ <text x={x1 + ComponentImageSequenceDiagram.TEXT_EVENT_BIAS_X} y={y + (config.nodeEventHeight / 2) + ComponentImageSequenceDiagram.TEXT_BIAS_EVENT_Y} style={{fontSize:'10px',fontWeight:'bold'}}>
430
+ {infoText}
431
+ </text>
432
+ </>
433
+ );
434
+ }
435
+
436
+ renderMessageData(message, x1, x2, y, config) {
437
+ if('long-comment' === message.messageType) {
438
+ let xa = 0;
439
+ let xb = 0;
440
+ let width = 0;
441
+ let textX = 0;
442
+ const TextY = y - config.nodeCommentHeight / 2 + ComponentImageSequenceDiagram.TEXT_BIAS_COMMENT_Y;
443
+ y = y - config.nodeCommentHeight + ComponentImageSequenceDiagram.COMMENT_BIAS_Y;
444
+ if(x1 < x2) {
445
+ xa = x1 + ComponentImageSequenceDiagram.COMMENT_BIAS_X;
446
+ xb = x2 - ComponentImageSequenceDiagram.COMMENT_BIAS_X;
447
+ width = xb - xa;
448
+ textX = xa + width / 2;
449
+ }
450
+ else {
451
+ xa = x1 - ComponentImageSequenceDiagram.COMMENT_BIAS_X;
452
+ xb = x2 + ComponentImageSequenceDiagram.COMMENT_BIAS_X;
453
+ width = xa - xb;
454
+ textX = xb + width / 2;
455
+ }
456
+ return (
457
+ <g>
458
+ <rect className={`seq_dia_protocol_${message.type}_dimond`} x={xa} y={y} width={width} height={config.nodeCommentHeight - 4}/>
459
+ <text x={textX} y={TextY} style={{fontSize:'10px',fontWeight:'bold',textAnchor:'middle'}}>
460
+ {message.data}
461
+ </text>
462
+ </g>
463
+ );
464
+ }
465
+ else {
466
+ let x = 0;
467
+ let anchor = '';
468
+ if(x1 < x2) {
469
+ x = x1 + ComponentImageSequenceDiagram.TEXT_MESSAGE_BIAS_X;
470
+ anchor = 'start';
471
+ }
472
+ else {
473
+ x = x1 - ComponentImageSequenceDiagram.TEXT_MESSAGE_BIAS_X;
474
+ anchor = 'end';
475
+ }
476
+ return (
477
+ <text x={x} y={y + ComponentImageSequenceDiagram.TEXT_BIAS_MSG_Y} style={{fontSize:'10px',fontWeight:'bold',textAnchor:anchor}}>
478
+ {message.data}
479
+ </text>
480
+ );
481
+ }
482
+ }
483
+
484
+ renderMessages(messages, titleHeight, config) {
485
+ let y = titleHeight + config.heightBias + config.nodeEventHeight;
486
+ const lineNumberBias = config.lineNumbers ? ComponentImageSequenceDiagram.LINE_NUMBER_BIAS : 0;
487
+ const svgMessages = messages.map((message, index) => {
488
+ if(2 === message.nodes) {
489
+ const x1 = config.widthBias + message.fromIndex * config.nodeWidth + lineNumberBias;
490
+ const x2 = config.widthBias + message.toIndex * config.nodeWidth + lineNumberBias;
491
+ if('msg' === message.height) {
492
+ y += config.nodeMessageHeight;
493
+ }
494
+ else if('event' === message.height) {
495
+ y += config.nodeEventHeight;
496
+ }
497
+ else if('comment' === message.height) {
498
+ y += config.nodeCommentHeight;
499
+ }
500
+ return (
501
+ <g key={index}>
502
+ {this.renderMessageLine(message, x1, x2, y, config)}
503
+ {this.renderMessageData(message, x1, x2, y, config)}
504
+ {this.renderMessageEndPoints(message, x1, x2, y)}
505
+ </g>
506
+ );
507
+ }
508
+ else if(1 === message.nodes) {
509
+ const x1 = config.widthBias + message.fromIndex * config.nodeWidth + lineNumberBias;
510
+ if('msg' === message.height) {
511
+ y += config.nodeMessageHeight;
512
+ }
513
+ else if('event' === message.height) {
514
+ y += config.nodeEventHeight;
515
+ }
516
+ return (
517
+ <g key={index}>
518
+ {this.renderMessageEventData(message, x1, y, config)}
519
+ {this.renderMessageEndPoint(message, x1, y)}
520
+ </g>
521
+ );
522
+ }
523
+ });
524
+ return (
525
+ <g>
526
+ {svgMessages}
527
+ </g>
528
+ );
529
+ }
530
+
531
+ renderLineNumbers(messages, nodeHeight, config) {
532
+ if(config.lineNumbers) {
533
+ const lineNumberBias = config.lineNumbers ? ComponentImageSequenceDiagram.LINE_NUMBER_BIAS : 0;
534
+ const x = config.widthBias;
535
+ const y1 = config.heightBias;
536
+ const y2 = config.heightBias + nodeHeight;
537
+ let yText = y1 + config.nodeEventHeight;
538
+ let yHalfExtra = 0;
539
+ const lineNumbers = messages.map((message, index) => {
540
+ if('msg' === message.height) {
541
+ yText += config.nodeMessageHeight;
542
+ yHalfExtra = config.nodeMessageHeight / 2 - 6;
543
+ }
544
+ else if('event' === message.height) {
545
+ yText += config.nodeEventHeight;
546
+ yHalfExtra = config.nodeEventHeight / 2;
547
+ }
548
+ else if('comment' === message.height) {
549
+ yText += config.nodeCommentHeight;
550
+ yHalfExtra = config.nodeCommentHeight / 2 - 6;
551
+ }
552
+ return (
553
+ <text key={index} x={x - 4} y={yText + yHalfExtra} style={{fontSize:'10px',fontWeight:'bold',textAnchor:'end'}}>{index + 1}</text>
554
+ );
555
+ });
556
+ return (
557
+ <g>
558
+ <line x1={x} x2={x} y1={y1} y2={y2} style={{stroke:'Black'}}/>
559
+ {lineNumbers}
560
+ </g>
561
+ );
562
+ }
563
+ }
564
+
565
+ calculateNodeHeight(messages, config) {
566
+ let y = config.heightBias;
567
+ messages.forEach((message) => {
568
+ if('msg' === message.height) {
569
+ y += config.nodeMessageHeight;
570
+ }
571
+ else if('event' === message.height) {
572
+ y += config.nodeEventHeight;
573
+ }
574
+ else if('comment' === message.height) {
575
+ y += config.nodeCommentHeight;
576
+ }
577
+ });
578
+ return y;
579
+ }
580
+
581
+ render() {
582
+ const title = this.props.sequenceDiagram.title;
583
+ const nodes = this.props.sequenceDiagram.nodes;
584
+ const messages = this.props.sequenceDiagram.messages;
585
+ const config = this.props.sequenceDiagram.dataSequenceDiagramConfig;
586
+ const titleHeight = ('' !== title && undefined !== title) ? ComponentImageSequenceDiagram.TITLE_HEIGHT : 0;
587
+ const nodeHeight = this.calculateNodeHeight(messages, config);
588
+ const svgHeight = titleHeight + nodeHeight + config.nodeMessageHeight + config.heightBias;
589
+ const lineNumberBias = config.lineNumbers ? ComponentImageSequenceDiagram.LINE_NUMBER_BIAS : 0;
590
+ const svgWidth = 2 * config.widthBias + config.nodeWidth * (nodes.length - 1) + lineNumberBias;
591
+ const viewBox = [0, 0, svgWidth, svgHeight].join(' ');
592
+ const style = {};
593
+ if(!config.border) {
594
+ style.border = '0px';
595
+ }
596
+ if('default' !== config.backgroundColor) {
597
+ style.backgroundColor = config.backgroundColor;
598
+ }
599
+ return (
600
+ <svg className="markup_seq" width={svgWidth} height={svgHeight} viewBox={viewBox} style={style}>
601
+ {this.renderTitle(title, svgWidth / 2)}
602
+ {this.renderNodes(nodes, nodeHeight, titleHeight, config)}
603
+ {this.renderMessages(messages, titleHeight, config)}
604
+ {this.renderLineNumbers(messages, nodeHeight, config)}
605
+ </svg>
606
+ );
607
+ }
608
+
609
+ /*_networkPopover(virtualNetwork) {
610
+ let popup = [['name:', virtualNetwork.name], ['family:', virtualNetwork.family], ['subnet:', virtualNetwork.subnet]];
611
+ if(virtualNetwork.valid) {
612
+ if(virtualNetwork.reduced) {
613
+ popup.push(['reduced', '']);
614
+ }
615
+ }
616
+ else {
617
+ popup.push(['not valid', '']);
618
+ }
619
+ return popup;
620
+ }*/
621
+ }
622
+
623
+ ComponentImageSequenceDiagram.TITLE_HEIGHT = 30;
624
+ ComponentImageSequenceDiagram.TITLE_FONT_SIZE = 20;
625
+ ComponentImageSequenceDiagram.TITLE_TOP = 26;
626
+ ComponentImageSequenceDiagram.NODE_WIDTH = 3;
627
+ ComponentImageSequenceDiagram.NODE_WIDTH_HALF = ComponentImageSequenceDiagram.NODE_WIDTH / 2;
628
+ ComponentImageSequenceDiagram.DISCONNECT_WIDTH = 2;
629
+ ComponentImageSequenceDiagram.TEXT_EVENT_BIAS_X = 10;
630
+ ComponentImageSequenceDiagram.TEXT_MESSAGE_BIAS_X = 12;
631
+ ComponentImageSequenceDiagram.TEXT_BIAS_EVENT_Y = -2;
632
+ ComponentImageSequenceDiagram.TEXT_BIAS_MSG_Y = -4;
633
+ ComponentImageSequenceDiagram.TEXT_BIAS_COMMENT_Y = 7.5;
634
+ ComponentImageSequenceDiagram.COMMENT_BIAS_X = 20;
635
+ ComponentImageSequenceDiagram.COMMENT_BIAS_Y = 6;
636
+ ComponentImageSequenceDiagram.TRIANGLE_BASE = 12;
637
+ ComponentImageSequenceDiagram.TRIANGLE_BASE_2_3 = ComponentImageSequenceDiagram.TRIANGLE_BASE * 2 / 3;
638
+ ComponentImageSequenceDiagram.TRIANGLE_TOP = (ComponentImageSequenceDiagram.NODE_WIDTH - 1) / 2;
639
+ ComponentImageSequenceDiagram.TRIANGLE_HEIGHT = 4;
640
+ ComponentImageSequenceDiagram.ARROW_CONNECTION_BASE = 12;
641
+ ComponentImageSequenceDiagram.ARROW_CONNECTION_TOP = (ComponentImageSequenceDiagram.NODE_WIDTH - 1) / 2;
642
+ ComponentImageSequenceDiagram.ARROW_CONNECTION_HEIGHT = 3;
643
+ ComponentImageSequenceDiagram.LINE_BIAS = ComponentImageSequenceDiagram.TRIANGLE_BASE - ComponentImageSequenceDiagram.TRIANGLE_TOP;
644
+ ComponentImageSequenceDiagram.CROSS_LENGTH = 5;
645
+ ComponentImageSequenceDiagram.LINE_NUMBER_BIAS = 90;