@aj-shadow/z-abs-complayer-visualizationlog-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 (75) 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-VisualizationLog-client.bld +36 -0
  7. package/project/client/_build/Client-CompLayer-VisualizationLog-client-jsx.bld +10 -0
  8. package/project/client/_build/Client-CompLayer-VisualizationLog-client.bld +10 -0
  9. package/project/client/_build/Client-css-CompLayer-VisualizationLog-bundle.bld +9 -0
  10. package/project/client/_build/z-abs-complayer-visualizationlog-client.prj +36 -0
  11. package/project/client/css/log-column.css +124 -0
  12. package/project/client/css/log-heading.css +54 -0
  13. package/project/client/css/log-inner.css +56 -0
  14. package/project/client/css/log-row.css +19 -0
  15. package/project/client/css/log-scroll.css +0 -0
  16. package/project/client/css/log-start-end.css +38 -0
  17. package/project/client/css/log-type-browser-err.css +21 -0
  18. package/project/client/css/log-type-browser-log.css +21 -0
  19. package/project/client/css/log-type-debug.css +21 -0
  20. package/project/client/css/log-type-engine.css +21 -0
  21. package/project/client/css/log-type-error.css +21 -0
  22. package/project/client/css/log-type-gui.css +21 -0
  23. package/project/client/css/log-type-ip.css +21 -0
  24. package/project/client/css/log-type-test-data.css +21 -0
  25. package/project/client/css/log-type-verify-failure.css +21 -0
  26. package/project/client/css/log-type-verify-succes.css +21 -0
  27. package/project/client/css/log-type-warning.css +21 -0
  28. package/project/client/css/log.css +118 -0
  29. package/project/client/data/data-log-end-result.js +32 -0
  30. package/project/client/data/data-log-end.js +52 -0
  31. package/project/client/data/data-log-log-result.js +76 -0
  32. package/project/client/data/data-log-log.js +157 -0
  33. package/project/client/data/data-log-start-result.js +36 -0
  34. package/project/client/data/data-log-start.js +56 -0
  35. package/project/client/logic/cache.js +185 -0
  36. package/project/client/logic/const.js +26 -0
  37. package/project/client/logic/log-filter.js +122 -0
  38. package/project/client/react-component/log.jsx +296 -0
  39. package/project/client/templates/template-icons/svgs/template-arrow-head.js +35 -0
  40. package/project/client/templates/template-icons/svgs/template-arrow-line.js +34 -0
  41. package/project/client/templates/template-icons/svgs/template-background.js +28 -0
  42. package/project/client/templates/template-icons/svgs/template-circle-big.js +27 -0
  43. package/project/client/templates/template-icons/svgs/template-circle-small.js +27 -0
  44. package/project/client/templates/template-icons/svgs/template-envelope.js +46 -0
  45. package/project/client/templates/template-icons/svgs/template-hex-big.js +38 -0
  46. package/project/client/templates/template-icons/svgs/template-hex-small.js +38 -0
  47. package/project/client/templates/template-icons/svgs/template-square-big.js +28 -0
  48. package/project/client/templates/template-icons/svgs/template-square-small.js +28 -0
  49. package/project/client/templates/template-icons/svgs/template-triangle-big.js +31 -0
  50. package/project/client/templates/template-icons/svgs/template-triangle-small.js +31 -0
  51. package/project/client/templates/template-icons/svgs/template-x-big.js +39 -0
  52. package/project/client/templates/template-icons/svgs/template-x-small.js +39 -0
  53. package/project/client/templates/template-icons/template-icon-accepted.js +32 -0
  54. package/project/client/templates/template-icons/template-icon-accepting.js +32 -0
  55. package/project/client/templates/template-icons/template-icon-attached.js +68 -0
  56. package/project/client/templates/template-icons/template-icon-closed.js +44 -0
  57. package/project/client/templates/template-icons/template-icon-closing.js +44 -0
  58. package/project/client/templates/template-icons/template-icon-connected.js +32 -0
  59. package/project/client/templates/template-icons/template-icon-connecting.js +32 -0
  60. package/project/client/templates/template-icons/template-icon-detached.js +61 -0
  61. package/project/client/templates/template-icons/template-icon-not-connected.js +37 -0
  62. package/project/client/templates/template-icons/template-icon-not-started.js +67 -0
  63. package/project/client/templates/template-icons/template-icon-receive.js +37 -0
  64. package/project/client/templates/template-icons/template-icon-send.js +37 -0
  65. package/project/client/templates/template-icons/template-icon-stack.js +110 -0
  66. package/project/client/templates/template-icons/template-icon-started.js +32 -0
  67. package/project/client/templates/template-icons/template-icon-starting.js +32 -0
  68. package/project/client/templates/template-icons/template-icon-stopped.js +34 -0
  69. package/project/client/templates/template-icons/template-icon-stopping.js +34 -0
  70. package/project/client/templates/template-icons/template-icon-unknown.js +26 -0
  71. package/project/client/templates/template-icons/template-icon.js +76 -0
  72. package/project/client/templates/template-log-end.js +68 -0
  73. package/project/client/templates/template-log-log.js +652 -0
  74. package/project/client/templates/template-log-start.js +67 -0
  75. package/project/z-abs-complayer-visualizationlog-client.tree +78 -0
@@ -0,0 +1,28 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateBackground {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createElementNS(InnerConst.SVG_NS, 'g');
13
+ const background = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'rect'));
14
+ background.setAttribute('x', 2);
15
+ background.setAttribute('y', 2);
16
+ background.setAttribute('height', 16);
17
+ background.setAttribute('width', Const.ICON_X_WIDTH - 4);
18
+ background.setAttribute("fill", "url(#ipLogGradient)");
19
+ TemplateBackground.template = template;
20
+ }
21
+
22
+ static create() {
23
+ return TemplateBackground.template.cloneNode(true);
24
+ }
25
+ }
26
+
27
+
28
+ module.exports = TemplateBackground;
@@ -0,0 +1,27 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateCircleBig {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createElementNS(InnerConst.SVG_NS, 'circle');
13
+ template.setAttribute('cx', Const.ICON_X);
14
+ template.setAttribute('cy', Const.ICON_Y);
15
+ template.setAttribute('r', 4);
16
+ template.setAttribute('stroke', 'black');
17
+ template.setAttribute('stroke-width', 1);
18
+ TemplateCircleBig.template = template;
19
+ }
20
+
21
+ static create() {
22
+ return TemplateCircleBig.template.cloneNode(true);
23
+ }
24
+ }
25
+
26
+
27
+ module.exports = TemplateCircleBig;
@@ -0,0 +1,27 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateCircleSmall {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createElementNS(InnerConst.SVG_NS, 'circle');
13
+ template.setAttribute('cx', Const.ICON_X);
14
+ template.setAttribute('cy', Const.ICON_Y);
15
+ template.setAttribute('r', 2.5);
16
+ template.setAttribute('stroke', 'black');
17
+ template.setAttribute('stroke-width', 1);
18
+ TemplateCircleSmall.template = template;
19
+ }
20
+
21
+ static create() {
22
+ return TemplateCircleSmall.template.cloneNode(true);
23
+ }
24
+ }
25
+
26
+
27
+ module.exports = TemplateCircleSmall;
@@ -0,0 +1,46 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateEnvelope {
9
+ static template = null;
10
+
11
+ static {
12
+ const HEIGHT_HALF = 5;
13
+ const HEIGHT = HEIGHT_HALF + HEIGHT_HALF;
14
+ const MIDDLE_TOP_POINT = HEIGHT - 2.5;
15
+ const MIDDLE_BOTTOM_POINT = HEIGHT;
16
+ const BOTTOM_POINT = HEIGHT + 2.5;
17
+ const WIDTH_HALF = 5;
18
+ const WIDTH = WIDTH_HALF + WIDTH_HALF;
19
+ const MIDDLE_POINT = Const.ICON_X-3;
20
+ const LEFT_POINT = MIDDLE_POINT - WIDTH_HALF;
21
+ const RIGHT_POINT = MIDDLE_POINT + WIDTH_HALF;
22
+
23
+ const template = document.createDocumentFragment();
24
+ const rect = template.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'rect'));
25
+ rect.setAttribute('y', MIDDLE_TOP_POINT);
26
+ rect.setAttribute('height', 5);
27
+ rect.setAttribute('fill', 'white');
28
+ rect.setAttribute('x', LEFT_POINT);
29
+ rect.setAttribute('width', WIDTH);
30
+
31
+ const top = template.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'polygon'));
32
+ top.setAttribute('points', `${LEFT_POINT + 2},${MIDDLE_TOP_POINT} ${MIDDLE_POINT},${MIDDLE_BOTTOM_POINT - 1} ${RIGHT_POINT - 2},${MIDDLE_TOP_POINT}`);
33
+
34
+ const bottom = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'polygon'));
35
+ bottom.setAttribute('points', `${LEFT_POINT},${MIDDLE_TOP_POINT} ${MIDDLE_POINT},${MIDDLE_BOTTOM_POINT} ${RIGHT_POINT},${MIDDLE_TOP_POINT} ${RIGHT_POINT},${BOTTOM_POINT} ${LEFT_POINT},${BOTTOM_POINT} ${LEFT_POINT},${MIDDLE_TOP_POINT} ${MIDDLE_POINT},${MIDDLE_TOP_POINT} ${RIGHT_POINT},${MIDDLE_TOP_POINT}`);
36
+
37
+ TemplateEnvelope.template = template;
38
+ }
39
+
40
+ static create() {
41
+ return TemplateEnvelope.template.cloneNode(true);
42
+ }
43
+ }
44
+
45
+
46
+ module.exports = TemplateEnvelope;
@@ -0,0 +1,38 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateHexBig {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createElementNS(InnerConst.SVG_NS, 'polygon');
13
+ const arrowWidth = 4;
14
+ const cx = Const.ICON_X;
15
+ const cy = Const.ICON_Y;
16
+ const r = arrowWidth;
17
+ const sqrt3 = Math.sqrt(3);
18
+ const hexPoints = [
19
+ `${cx + r},${cy}`,
20
+ `${cx + (r >> 1)},${cy + (sqrt3 * r >> 1)}`,
21
+ `${cx - (r >> 1)},${cy + (sqrt3 * r >> 1)}`,
22
+ `${cx - r},${cy}`,
23
+ `${cx - (r >> 1)},${cy - (sqrt3 * r >> 1)}`,
24
+ `${cx + (r >> 1)},${cy - (sqrt3 * r >> 1)}`
25
+ ].join(' ');
26
+ template.setAttribute('points', hexPoints);
27
+ template.setAttribute('stroke', 'black');
28
+ template.setAttribute('stroke-width', 1);
29
+ TemplateHexBig.template = template;
30
+ }
31
+
32
+ static create() {
33
+ return TemplateHexBig.template.cloneNode(true);
34
+ }
35
+ }
36
+
37
+
38
+ module.exports = TemplateHexBig;
@@ -0,0 +1,38 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateHexSmall {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createElementNS(InnerConst.SVG_NS, 'polygon');
13
+ const arrowWidth = 3;
14
+ const cx = Const.ICON_X;
15
+ const cy = Const.ICON_Y;
16
+ const r = arrowWidth;
17
+ const sqrt3 = Math.sqrt(3);
18
+ const hexPoints = [
19
+ `${cx + r},${cy}`,
20
+ `${cx + (r >> 1)},${cy + (sqrt3 * r >> 1)}`,
21
+ `${cx - (r >> 1)},${cy + (sqrt3 * r >> 1)}`,
22
+ `${cx - r},${cy}`,
23
+ `${cx - (r >> 1)},${cy - (sqrt3 * r >> 1)}`,
24
+ `${cx + (r >> 1)},${cy - (sqrt3 * r >> 1)}`
25
+ ].join(' ');
26
+ template.setAttribute('points', hexPoints);
27
+ template.setAttribute('stroke', 'black');
28
+ template.setAttribute('stroke-width', 1);
29
+ TemplateHexSmall.template = template;
30
+ }
31
+
32
+ static create() {
33
+ return TemplateHexSmall.template.cloneNode(true);
34
+ }
35
+ }
36
+
37
+
38
+ module.exports = TemplateHexSmall;
@@ -0,0 +1,28 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateSquareBig {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createElementNS(InnerConst.SVG_NS, 'rect');
13
+ template.setAttribute('y', Const.ICON_Y - 3);
14
+ template.setAttribute('height', 6);
15
+ template.setAttribute('x', Const.ICON_X - 3);
16
+ template.setAttribute('width', 6);
17
+ template.setAttribute('stroke', 'black');
18
+ template.setAttribute('stroke-width', 1);
19
+ TemplateSquareBig.template = template;
20
+ }
21
+
22
+ static create() {
23
+ return TemplateSquareBig.template.cloneNode(true);
24
+ }
25
+ }
26
+
27
+
28
+ module.exports = TemplateSquareBig;
@@ -0,0 +1,28 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateSquareSmall {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createElementNS(InnerConst.SVG_NS, 'rect');
13
+ template.setAttribute('y', Const.ICON_Y - 2);
14
+ template.setAttribute('height', 4);
15
+ template.setAttribute('x', Const.ICON_X - 2);
16
+ template.setAttribute('width', 4);
17
+ template.setAttribute('stroke', 'black');
18
+ template.setAttribute('stroke-width', 1);
19
+ TemplateSquareSmall.template = template;
20
+ }
21
+
22
+ static create() {
23
+ return TemplateSquareSmall.template.cloneNode(true);
24
+ }
25
+ }
26
+
27
+
28
+ module.exports = TemplateSquareSmall;
@@ -0,0 +1,31 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateTriangleBig {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createElementNS(InnerConst.SVG_NS, 'polygon');
13
+ const arrowWidth = 4;
14
+ const startArrowX1 = Const.ICON_X - arrowWidth;
15
+ const startArrowX2 = Const.ICON_X + arrowWidth;
16
+ const startArrowY1 = Const.ICON_Y - arrowWidth;
17
+ const startArrowY2 = Const.ICON_Y;
18
+ const startArrowY3 = Const.ICON_Y + arrowWidth;
19
+ template.setAttribute('points', `${startArrowX1},${startArrowY1} ${startArrowX1},${startArrowY3} ${startArrowX2},${startArrowY2}`);
20
+ template.setAttribute('stroke', 'black');
21
+ template.setAttribute('stroke-width', 1);
22
+ TemplateTriangleBig.template = template;
23
+ }
24
+
25
+ static create() {
26
+ return TemplateTriangleBig.template.cloneNode(true);
27
+ }
28
+ }
29
+
30
+
31
+ module.exports = TemplateTriangleBig;
@@ -0,0 +1,31 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateTriangleSmall {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createElementNS(InnerConst.SVG_NS, 'polygon');
13
+ const arrowWidth = 3;
14
+ const startArrowX1 = Const.ICON_X - arrowWidth;
15
+ const startArrowX2 = Const.ICON_X + arrowWidth;
16
+ const startArrowY1 = Const.ICON_Y - arrowWidth;
17
+ const startArrowY2 = Const.ICON_Y;
18
+ const startArrowY3 = Const.ICON_Y + arrowWidth;
19
+ template.setAttribute('points', `${startArrowX1},${startArrowY1} ${startArrowX1},${startArrowY3} ${startArrowX2},${startArrowY2}`);
20
+ template.setAttribute('stroke', 'black');
21
+ template.setAttribute('stroke-width', 1);
22
+ TemplateTriangleSmall.template = template;
23
+ }
24
+
25
+ static create() {
26
+ return TemplateTriangleSmall.template.cloneNode(true);
27
+ }
28
+ }
29
+
30
+
31
+ module.exports = TemplateTriangleSmall;
@@ -0,0 +1,39 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateXBig {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createDocumentFragment();
13
+
14
+ const length = 4.5;
15
+ const closingLine1 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
16
+ closingLine1.setAttribute('y1', Const.ICON_Y - length);
17
+ closingLine1.setAttribute('y2', Const.ICON_Y + length);
18
+ closingLine1.setAttribute('x1', Const.ICON_X - length);
19
+ closingLine1.setAttribute('x2', Const.ICON_X + length);
20
+ closingLine1.setAttribute('stroke', 'black');
21
+ closingLine1.setAttribute('stroke-width', 2);
22
+
23
+ const closingLine2 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
24
+ closingLine2.setAttribute('y1', Const.ICON_Y + length);
25
+ closingLine2.setAttribute('y2', Const.ICON_Y - length);
26
+ closingLine2.setAttribute('x1', Const.ICON_X - length);
27
+ closingLine2.setAttribute('x2', Const.ICON_X + length);
28
+ closingLine2.setAttribute('stroke', 'black');
29
+ closingLine2.setAttribute('stroke-width', 2);
30
+ TemplateXBig.template = template;
31
+ }
32
+
33
+ static create() {
34
+ return TemplateXBig.template.cloneNode(true);
35
+ }
36
+ }
37
+
38
+
39
+ module.exports = TemplateXBig;
@@ -0,0 +1,39 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../../logic/const';
5
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
6
+
7
+
8
+ class TemplateXSmall {
9
+ static template = null;
10
+
11
+ static {
12
+ const template = document.createDocumentFragment();
13
+
14
+ const length = 3;
15
+ const closingLine1 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
16
+ closingLine1.setAttribute('y1', Const.ICON_Y - length);
17
+ closingLine1.setAttribute('y2', Const.ICON_Y + length);
18
+ closingLine1.setAttribute('x1', Const.ICON_X - length);
19
+ closingLine1.setAttribute('x2', Const.ICON_X + length);
20
+ closingLine1.setAttribute('stroke', 'black');
21
+ closingLine1.setAttribute('stroke-width', 2);
22
+
23
+ const closingLine2 = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
24
+ closingLine2.setAttribute('y1', Const.ICON_Y + length);
25
+ closingLine2.setAttribute('y2', Const.ICON_Y - length);
26
+ closingLine2.setAttribute('x1', Const.ICON_X - length);
27
+ closingLine2.setAttribute('x2', Const.ICON_X + length);
28
+ closingLine2.setAttribute('stroke', 'black');
29
+ closingLine2.setAttribute('stroke-width', 2);
30
+ TemplateXSmall.template = template;
31
+ }
32
+
33
+ static create() {
34
+ return TemplateXSmall.template.cloneNode(true);
35
+ }
36
+ }
37
+
38
+
39
+ module.exports = TemplateXSmall;
@@ -0,0 +1,32 @@
1
+
2
+ 'use strict';
3
+
4
+ import TemplateBackground from './svgs/template-background';
5
+ import TemplateHexBig from './svgs/template-hex-big';
6
+
7
+
8
+ class TemplateIconAccepted {
9
+ static template = [];
10
+
11
+ static exit() {
12
+ TemplateIconAccepted.template = [];
13
+ }
14
+
15
+ static init(stackStyles) {
16
+ stackStyles.forEach((stackStyle, key) => {
17
+ const template = TemplateBackground.create();
18
+ const acceptedTemplate = template.appendChild(TemplateHexBig.create());
19
+ acceptedTemplate.setAttribute('fill', stackStyle.protocolColor);
20
+ TemplateIconAccepted.template[stackStyle.index] = template;
21
+ });
22
+ return TemplateIconAccepted.create;
23
+ }
24
+
25
+ static create(protocolIndex, type) {
26
+ const template = TemplateIconAccepted.template[protocolIndex].cloneNode(true);
27
+ return template;
28
+ }
29
+ }
30
+
31
+
32
+ module.exports = TemplateIconAccepted;
@@ -0,0 +1,32 @@
1
+
2
+ 'use strict';
3
+
4
+ import TemplateBackground from './svgs/template-background';
5
+ import TemplateHexSmall from './svgs/template-hex-small';
6
+
7
+
8
+ class TemplateIconAccepting {
9
+ static template = [];
10
+
11
+ static exit() {
12
+ TemplateIconStarting.template = [];
13
+ }
14
+
15
+ static init(stackStyles) {
16
+ stackStyles.forEach((stackStyle, key) => {
17
+ const template = TemplateBackground.create();
18
+ const acceptingTemplate = template.appendChild(TemplateHexSmall.create());
19
+ acceptingTemplate.setAttribute('fill', stackStyle.protocolColor);
20
+ TemplateIconAccepting.template[stackStyle.index] = template;
21
+ });
22
+ return TemplateIconAccepting.create;
23
+ }
24
+
25
+ static create(protocolIndex, type) {
26
+ const template = TemplateIconAccepting.template[protocolIndex].cloneNode(true);
27
+ return template;
28
+ }
29
+ }
30
+
31
+
32
+ module.exports = TemplateIconAccepting;
@@ -0,0 +1,68 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateBackground from './svgs/template-background';
6
+ import TemplateTriangleBig from './svgs/template-triangle-big';
7
+ import InnerConst from 'z-abs-complayer-visualizationinner-client/client/logic/inner-const';
8
+
9
+ class TemplateIconAttached {
10
+ static template = [];
11
+
12
+ static exit() {
13
+ TemplateIconAttached.template = [];
14
+ }
15
+
16
+ static init(stackStyles) {
17
+ stackStyles.forEach((stackStyle, key) => {
18
+ const template = TemplateBackground.create();
19
+ const startedTemplate = template.appendChild(TemplateTriangleBig.create());
20
+ startedTemplate.setAttribute('fill', stackStyle.protocolColor);
21
+ const hex = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'polygon'));
22
+ const arrowWidth = 4;
23
+ const cx = Const.ICON_X - 8;
24
+ const cy = Const.ICON_Y;
25
+ const r = arrowWidth;
26
+ const sqrt3 = Math.sqrt(3);
27
+ const hexPoints = [
28
+ `${cx + r},${cy}`,
29
+ `${cx + (r >> 1)},${cy + (sqrt3 * r >> 1)}`,
30
+ `${cx - (r >> 1)},${cy + (sqrt3 * r >> 1)}`,
31
+ `${cx - r},${cy}`,
32
+ `${cx - (r >> 1)},${cy - (sqrt3 * r >> 1)}`,
33
+ `${cx + (r >> 1)},${cy - (sqrt3 * r >> 1)}`
34
+ ].join(' ');
35
+ hex.setAttribute('points', hexPoints);
36
+ hex.setAttribute('stroke', 'black');
37
+ hex.setAttribute('stroke-width', 1);
38
+ hex.setAttribute('fill', stackStyle.protocolColor);
39
+
40
+ const lineHorizontal = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
41
+ lineHorizontal.setAttribute('y1', Const.ICON_Y);
42
+ lineHorizontal.setAttribute('y2', Const.ICON_Y);
43
+ lineHorizontal.setAttribute('x1', Const.ICON_X - 6.5);
44
+ lineHorizontal.setAttribute('x2', Const.ICON_X - 9.5);
45
+ lineHorizontal.setAttribute('stroke', 'black');
46
+ lineHorizontal.setAttribute('stroke-width', 0.5);
47
+
48
+ const lineVertical = template.appendChild(document.createElementNS(InnerConst.SVG_NS, 'line'));
49
+ lineVertical.setAttribute('y1', Const.ICON_Y - 1.5);
50
+ lineVertical.setAttribute('y2', Const.ICON_Y + 1.5);
51
+ lineVertical.setAttribute('x1', Const.ICON_X - 8);
52
+ lineVertical.setAttribute('x2', Const.ICON_X - 8);
53
+ lineVertical.setAttribute('stroke', 'black');
54
+ lineVertical.setAttribute('stroke-width', 0.5);
55
+
56
+ TemplateIconAttached.template[stackStyle.index] = template;
57
+ });
58
+ return TemplateIconAttached.create;
59
+ }
60
+
61
+ static create(protocolIndex, type) {
62
+ const template = TemplateIconAttached.template[protocolIndex].cloneNode(true);
63
+ return template;
64
+ }
65
+ }
66
+
67
+
68
+ module.exports = TemplateIconAttached;
@@ -0,0 +1,44 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateBackground from './svgs/template-background';
6
+ import TemplateCircleBig from './svgs/template-circle-big';
7
+ import TemplateHexBig from './svgs/template-hex-big';
8
+ import TemplatexBig from './svgs/template-x-big';
9
+
10
+
11
+ class TemplateIconClosed {
12
+ static template = [[], []];
13
+
14
+ static exit() {
15
+ TemplateIconClosed.template = [[], []];
16
+ }
17
+
18
+ static init(stackStyles) {
19
+ stackStyles.forEach((stackStyle, key) => {
20
+ const template = TemplateBackground.create();
21
+ template.appendChild(TemplatexBig.create());
22
+
23
+ const closedClientTemplate = template.cloneNode(true);
24
+ const connectedTemplate = closedClientTemplate.appendChild(TemplateCircleBig.create());
25
+ connectedTemplate.setAttribute('fill', stackStyle.protocolColor);
26
+
27
+ const closedServerTemplate = template.cloneNode(true);
28
+ const acceptedTemplate = closedServerTemplate.appendChild(TemplateHexBig.create());
29
+ acceptedTemplate.setAttribute('fill', stackStyle.protocolColor);
30
+
31
+ TemplateIconClosed.template[Const.LOCAL_TYPE_IS_CLIENT][stackStyle.index] = closedClientTemplate;
32
+ TemplateIconClosed.template[Const.LOCAL_TYPE_IS_SERVER][stackStyle.index] = closedServerTemplate;
33
+ });
34
+ return TemplateIconClosed.create;
35
+ }
36
+
37
+ static create(protocolIndex, type) {
38
+ const template = TemplateIconClosed.template[type][protocolIndex].cloneNode(true);
39
+ return template;
40
+ }
41
+ }
42
+
43
+
44
+ module.exports = TemplateIconClosed;
@@ -0,0 +1,44 @@
1
+
2
+ 'use strict';
3
+
4
+ import Const from '../../logic/const';
5
+ import TemplateBackground from './svgs/template-background';
6
+ import TemplateCircleSmall from './svgs/template-circle-small';
7
+ import TemplateHexSmall from './svgs/template-hex-small';
8
+ import TemplateXSmall from './svgs/template-x-small';
9
+
10
+
11
+ class TemplateIconClosing {
12
+ static template = [[], []];
13
+
14
+ static exit() {
15
+ TemplateIconClosing.template = [[], []];
16
+ }
17
+
18
+ static init(stackStyles) {
19
+ stackStyles.forEach((stackStyle, key) => {
20
+ const template = TemplateBackground.create();
21
+ template.appendChild(TemplateXSmall.create());
22
+
23
+ const closingClientTemplate = template.cloneNode(true);
24
+ const connectingTemplate = closingClientTemplate.appendChild(TemplateCircleSmall.create());
25
+ connectingTemplate.setAttribute('fill', stackStyle.protocolColor);
26
+
27
+ const closingServerTemplate = template.cloneNode(true);
28
+ const acceptingTemplate = closingServerTemplate.appendChild(TemplateHexSmall.create());
29
+ acceptingTemplate.setAttribute('fill', stackStyle.protocolColor);
30
+
31
+ TemplateIconClosing.template[Const.LOCAL_TYPE_IS_CLIENT][stackStyle.index] = closingClientTemplate;
32
+ TemplateIconClosing.template[Const.LOCAL_TYPE_IS_SERVER][stackStyle.index] = closingServerTemplate;
33
+ });
34
+ return TemplateIconClosing.create;
35
+ }
36
+
37
+ static create(protocolIndex, type) {
38
+ const template = TemplateIconClosing.template[type][protocolIndex].cloneNode(true);
39
+ return template;
40
+ }
41
+ }
42
+
43
+
44
+ module.exports = TemplateIconClosing;
@@ -0,0 +1,32 @@
1
+
2
+ 'use strict';
3
+
4
+ import TemplateBackground from './svgs/template-background';
5
+ import TemplateCircleBig from './svgs/template-circle-big';
6
+
7
+
8
+ class TemplateIconConnected {
9
+ static template = [];
10
+
11
+ static exit() {
12
+ TemplateIconConnected.template = [];
13
+ }
14
+
15
+ static init(stackStyles) {
16
+ stackStyles.forEach((stackStyle, key) => {
17
+ const template = TemplateBackground.create();
18
+ const connectedTemplate = template.appendChild(TemplateCircleBig.create());
19
+ connectedTemplate.setAttribute('fill', stackStyle.protocolColor);
20
+ TemplateIconConnected.template[stackStyle.index] = template;
21
+ });
22
+ return TemplateIconConnected.create;
23
+ }
24
+
25
+ static create(protocolIndex, type) {
26
+ const template = TemplateIconConnected.template[protocolIndex].cloneNode(true);
27
+ return template;
28
+ }
29
+ }
30
+
31
+
32
+ module.exports = TemplateIconConnected;