@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,203 @@
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 ComponentDataChartLine 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={ComponentDataChartLine.TITLE_TEXT} textAnchor="middle" style={{fontSize:ComponentDataChartLine.TITLE_FONT_SIZE,fontWeight:'bold'}}>
21
+ {title}
22
+ </text>
23
+ );
24
+ }
25
+ }
26
+
27
+ renderGrid(config, calculated) {
28
+ const grid = this.props.chartLine.grid;
29
+ if(null !== grid) {
30
+ if(undefined !== calculated) {
31
+ const xAxis = this._getAxis('x');
32
+ const yAxis = this._getAxis('y');
33
+ const xLines = [];
34
+ const yLines = [];
35
+ if(undefined !== xAxis && undefined !== yAxis) {
36
+ if(0 !== grid.dx) {
37
+ const halfGrid = grid.dx / 2;
38
+ const pt = this._calculatePoint(0, 0, config, calculated);
39
+ xLines.push(
40
+ <text key={`grid_y_text_0`} x={pt.x} y={pt.y + 12} textAnchor="middle" style={{fontSize:ComponentDataChartLine.GRID_FONT_SIZE,fontWeight:'bold'}}>
41
+ {0}
42
+ </text>
43
+ );
44
+ for(let x = grid.dx; x <= xAxis.topValue; x += grid.dx) {
45
+ const ph1 = this._calculatePoint(x - halfGrid, 0, config, calculated);
46
+ const ph2 = this._calculatePoint(x - halfGrid, yAxis.topValue, config, calculated);
47
+ xLines.push(<line key={`grid_x_h_${x}`} x1={ph1.x} y1={ph1.y} x2={ph2.x} y2={ph2.y} style={{stroke:'#ebebeb',strokeWidth:'1px'}} />);
48
+ const p1 = this._calculatePoint(x, 0, config, calculated);
49
+ const p2 = this._calculatePoint(x, yAxis.topValue, config, calculated);
50
+ xLines.push(<line key={`grid_x_${x}`} x1={p1.x} y1={p1.y} x2={p2.x} y2={p2.y} style={{stroke:'#cccccc',strokeWidth:'1px'}} />);
51
+ const pt = this._calculatePoint(x, 0, config, calculated);
52
+ xLines.push(
53
+ <text key={`grid_x_text_${x}`} x={pt.x} y={pt.y + 12} textAnchor="middle" style={{fontSize:ComponentDataChartLine.GRID_FONT_SIZE,fontWeight:'bold'}}>
54
+ {x}
55
+ </text>
56
+ );
57
+ }
58
+ }
59
+ if(0 !== grid.dy) {
60
+ const halfGrid = grid.dy / 2;
61
+ const pt = this._calculatePoint(0, 0, config, calculated);
62
+ yLines.push(
63
+ <text key={`grid_y_text_0`} x={pt.x - 10} y={pt.y + ComponentDataChartLine.GRID_FONT_SIZE_HALF - 1} textAnchor="middle" style={{fontSize:ComponentDataChartLine.GRID_FONT_SIZE,fontWeight:'bold'}}>
64
+ {0}
65
+ </text>
66
+ );
67
+ for(let y = grid.dy; y <= yAxis.topValue; y += grid.dy) {
68
+ const ph1 = this._calculatePoint(0, y - halfGrid, config, calculated);
69
+ const ph2 = this._calculatePoint(xAxis.topValue, y - halfGrid, config, calculated);
70
+ yLines.push(<line key={`grid_y_h_${y}`} x1={ph1.x} y1={ph1.y} x2={ph2.x} y2={ph2.y} style={{stroke:'#ebebeb',strokeWidth:'1px'}} />);
71
+ const p1 = this._calculatePoint(0, y, config, calculated);
72
+ const p2 = this._calculatePoint(xAxis.topValue, y, config, calculated);
73
+ yLines.push(<line key={`grid_y_${y}`} x1={p1.x} y1={p1.y} x2={p2.x} y2={p2.y} style={{stroke:'#cccccc',strokeWidth:'1px'}} />);
74
+ const pt = this._calculatePoint(0, y, config, calculated);
75
+ yLines.push(
76
+ <text key={`grid_y_text_${y}`} x={pt.x - 10} y={pt.y + ComponentDataChartLine.GRID_FONT_SIZE_HALF - 1} textAnchor="middle" style={{fontSize:ComponentDataChartLine.GRID_FONT_SIZE,fontWeight:'bold'}}>
77
+ {y}
78
+ </text>
79
+ );
80
+ }
81
+ }
82
+ return (
83
+ <g>
84
+ <g key={`grid_x`}>
85
+ {xLines}
86
+ </g>
87
+ <g key={`grid_y`}>
88
+ {yLines}
89
+ </g>
90
+ </g>
91
+ );
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ renderAxes(config, calculated) {
98
+ if(undefined !== calculated) {
99
+ const x = this._getAxis('x');
100
+ const y = this._getAxis('y');
101
+ if(undefined !== x && undefined !== y) {
102
+ const fromAxis = this._calculatePoint(0, 0, config, calculated);
103
+ const toXAxis = this._calculatePoint(x.topValue, 0, config, calculated);
104
+ const toYAxis = this._calculatePoint(0, y.topValue, config, calculated);
105
+ return (
106
+ <g>
107
+ <line x1={fromAxis.x} y1={fromAxis.y} x2={toXAxis.x} y2={toXAxis.y} style={{stroke:'#333333',strokeWidth:'1px'}} />
108
+ <line x1={fromAxis.x} y1={fromAxis.y} x2={toYAxis.x} y2={toYAxis.y} style={{stroke:'#333333',strokeWidth:'1px'}} />
109
+ </g>
110
+ );
111
+ }
112
+ }
113
+ }
114
+
115
+ renderData(config, calculated) {
116
+ if(undefined !== calculated) {
117
+ const datas = this.props.chartLine.data;
118
+ const allLines = [];
119
+ let lineIndex = 0;
120
+ datas.forEach((data) => {
121
+ const lineDatas = data.datas;
122
+ if(2 <= lineDatas.length) {
123
+ const lines = [];
124
+ let from = this._calculatePoint(lineDatas[0][0], lineDatas[0][1], config, calculated);
125
+ for(let i = 1; i < lineDatas.length; ++i) {
126
+ const to = this._calculatePoint(lineDatas[i][0], lineDatas[i][1], config, calculated);
127
+ if(!isNaN(from.x) && !isNaN(from.y) && !isNaN(to.x) && !isNaN(to.y)) {
128
+ lines.push(<line key={`point_${data.name}_${i}`} x1={from.x} y1={from.y} x2={to.x} y2={to.y} style={{stroke:ComponentDataChartLine.DEFAULT_COLORS[lineIndex] ,strokeWidth:'2px'}} />);
129
+ from = to;
130
+ }
131
+ }
132
+ allLines.push(
133
+ <g key={`line_${data.name}`}>
134
+ {lines}
135
+ </g>
136
+ );
137
+ }
138
+ ++lineIndex;
139
+ });
140
+ return (
141
+ <g>
142
+ {allLines}
143
+ </g>
144
+ );
145
+ }
146
+ }
147
+
148
+ _getAxis(axis) {
149
+ const axes = this.props.chartLine.axes;
150
+ for(let i = 0; i < axes.length; ++i) {
151
+ if(axis === axes[i].direction) {
152
+ return axes[i];
153
+ }
154
+ }
155
+ }
156
+
157
+ _calculatePoint(x, y, config, calculated) {
158
+ return {
159
+ x: x * calculated.xScale + config.widthBias,
160
+ y: ComponentDataChartLine.TITLE_HEIGHT + config.heightBias + config.height - y * calculated.yScale
161
+ };
162
+ }
163
+
164
+ _calculate(config) {
165
+ const x = this._getAxis('x');
166
+ const y = this._getAxis('y');
167
+ if(undefined !== x && undefined !== y) {
168
+ return {
169
+ xScale: config.width / x.topValue,
170
+ yScale: config.height / y.topValue
171
+ };
172
+ }
173
+ }
174
+
175
+ render() {
176
+ const title = this.props.chartLine.title;
177
+ const config = this.props.chartLine.dataChartLineConfig;
178
+ const calculated = this._calculate(config);
179
+ const titleHeight = ('' !== title && undefined !== title) ? ComponentDataChartLine.TITLE_HEIGHT : 0;
180
+ const svgWidth = 2 * config.widthBias + config.width;
181
+ const chartHeight = 2 * config.heightBias + config.height;
182
+ const svgHeight = titleHeight + chartHeight;
183
+ const viewBox = [0, 0, svgWidth, svgHeight].join(' ');
184
+ return (
185
+ <svg className="markup_node" width={svgWidth} height={svgHeight} viewBox={viewBox}>
186
+ {this.renderTitle(title, svgWidth / 2)}
187
+ {this.renderGrid(config, calculated)}
188
+ {this.renderAxes(config, calculated)}
189
+ {this.renderData(config, calculated)}
190
+ </svg>
191
+ );
192
+ }
193
+ }
194
+
195
+ ComponentDataChartLine.TITLE_HEIGHT = 40;
196
+ ComponentDataChartLine.TITLE_FONT_SIZE = 20;
197
+ ComponentDataChartLine.TITLE_TEXT = (ComponentDataChartLine.TITLE_HEIGHT + ComponentDataChartLine.TITLE_FONT_SIZE) / 2;
198
+
199
+ ComponentDataChartLine.DEFAULT_COLORS = ['Blue', 'Red', 'Yellow', 'Green'];
200
+
201
+ ComponentDataChartLine.GRID_FONT_SIZE = 10;
202
+ ComponentDataChartLine.GRID_FONT_SIZE_HALF = ComponentDataChartLine.GRID_FONT_SIZE / 2;
203
+
@@ -0,0 +1,50 @@
1
+
2
+ 'use strict';
3
+
4
+ import CodeMirrorEditor from 'z-abs-complayer-codemirror-client/client/code-mirror-editor';
5
+ import ReactComponentBase from 'z-abs-corelayer-client/client/react-component/react-component-base';
6
+ import React from 'react';
7
+
8
+
9
+ export default class ComponentCode extends ReactComponentBase {
10
+ constructor(props) {
11
+ super(props);
12
+ }
13
+
14
+ shouldUpdate(nextProps, nextState) {
15
+ return !this.shallowCompare(this.props, nextProps);
16
+ }
17
+
18
+ render(options) {
19
+ const id = this.props.id ? `${this.props.id}_component_code_view` : 'component_code_view';
20
+ return (
21
+ <div>
22
+ <p className="markup_code">{this.props.name}</p>
23
+ <CodeMirrorEditor id={id} code={this.props.code} options={this.getOptions(this.props.type)} height="100%" />
24
+ </div>
25
+ );
26
+ }
27
+
28
+ getOptions(type) {
29
+ return {
30
+ lineNumbers: true,
31
+ highlightActiveLineGutter: true,
32
+ highlightActiveLine: false,
33
+ closeBrackets: true,
34
+ bracketMatching: true,
35
+ drawSelection: true,
36
+ foldGutter: true,
37
+
38
+ tabKeyAction: 'indent',
39
+ tabSize: 2,
40
+ indentType: 'spaces',
41
+ indentUnit: 2,
42
+
43
+ readOnly: true,
44
+ autofocus: true,
45
+ dragDrop: false,
46
+
47
+ type
48
+ };
49
+ }
50
+ }
@@ -0,0 +1,105 @@
1
+
2
+ 'use strict';
3
+
4
+ import ComponentEmbed from './component-embed';
5
+ import ComponentLocalNote from './component-local-note';
6
+ import ComponentMarkup from './component-markup';
7
+ import Link from 'z-abs-complayer-router-client/client/react-component/link';
8
+ import ReactComponentBase from 'z-abs-corelayer-client/client/react-component/react-component-base';
9
+ import React from 'react';
10
+
11
+
12
+ class ComponentDocument extends ReactComponentBase {
13
+ constructor(props) {
14
+ super(props);
15
+ this.refMarkup = React.createRef();
16
+ this.mounted = false;
17
+ }
18
+
19
+ calculateTop(scrollData) {
20
+ this.refMarkup.current.calculateTop(scrollData);
21
+ }
22
+
23
+ calculateObject(scrollData, whichObject) {
24
+ this.refMarkup.current.calculateObject(scrollData, whichObject);
25
+ }
26
+
27
+ scroll(scrollData) {
28
+ this.refMarkup.current.scroll(scrollData);
29
+ }
30
+
31
+ didMount() {
32
+ this.mounted = true;
33
+ }
34
+
35
+ shouldUpdate(nextProps, nextState) {
36
+ return !this.shallowCompare(this.props, nextProps);
37
+ }
38
+
39
+ renderEmbedMenu(value) {
40
+ if(this.props.noediting) {
41
+ return null;
42
+ }
43
+ else {
44
+ return (
45
+ <ComponentEmbed path={value.value.path} />
46
+ );
47
+ }
48
+ }
49
+
50
+ render() {
51
+ if(this.props.waitMount && !this.mounted) {
52
+ return null;
53
+ }
54
+ return (
55
+ <ComponentMarkup ref={this.refMarkup} inner={this.props.inner} preview={this.props.preview} document={this.props.document} linkReferences={this.props.linkReferences}
56
+ onUnkownMarkup={(value, index, dataLineStart, dataLineStop, dataLineObjectIndex) => {
57
+ if('markup_embed' === value.type) {
58
+ if(!this.props.embededDocuments.has(value.value.path)) {
59
+ return null;
60
+ }
61
+ else {
62
+ return (
63
+ <React.Fragment key={index}>
64
+ {this.renderEmbedMenu(value)}
65
+ <ComponentDocument noediting={this.props.noediting} inner preview={this.props.preview} document={this.props.embededDocuments.get(value.value.path)} linkReferences={this.props.linkReferences} embededDocuments={this.props.embededDocuments} localNotes={this.props.localNotes} onAddNote={this.props.onAddNote} onEditNote={this.props.onEditNote} onDeleteNote={this.props.onDeleteNote} />
66
+ </React.Fragment>
67
+ );
68
+ }
69
+ }
70
+ else if('markup_local_note' === value.type) {
71
+ if(this.props.noediting) {
72
+ return null;
73
+ }
74
+ else {
75
+ return (
76
+ <ComponentLocalNote inner key={index} guid={value.value.guid} note={this.props.localNotes.get(value.value.guid)} dataLineStart={dataLineStart} dataLineStop={dataLineStop} dataLineObjectIndex={dataLineObjectIndex}
77
+ onAddNote={() => {
78
+ this.props.onAddNote && this.props.onAddNote(value.value.guid);
79
+ }}
80
+ onEditNote={() => {
81
+ this.props.onEditNote && this.props.onEditNote(value.value.guid);
82
+ }}
83
+ onDeleteNote={() => {
84
+ this.props.onDeleteNote && this.props.onDeleteNote(value.value.guid);
85
+ }}
86
+ />
87
+ );
88
+ }
89
+ }
90
+ else {
91
+ return (
92
+ <p key={index}> UNKNOWN MARKUP KEY {value.type} </p>
93
+ );
94
+ }
95
+ }}
96
+
97
+ onEditorScroll={(top, line, delta, object) => {
98
+ this.props.onEditorScroll && this.props.onEditorScroll(top, line, delta, object);
99
+ }}
100
+ />
101
+ );
102
+ }
103
+ }
104
+
105
+ module.exports = ComponentDocument;
@@ -0,0 +1,47 @@
1
+
2
+ 'use strict';
3
+
4
+ import Icon from 'z-abs-complayer-bootstrap-client/client/icons-inline/icon';
5
+ import ReactComponentBase from 'z-abs-corelayer-client/client/react-component/react-component-base';
6
+ import React from 'react';
7
+
8
+
9
+ class ComponentDocumentationAnchor extends ReactComponentBase {
10
+ constructor(props) {
11
+ super(props);
12
+ }
13
+
14
+ shouldUpdate(nextProps, nextState) {
15
+ return !this.shallowCompare(this.props, nextProps);
16
+ }
17
+
18
+ renderIcon() {
19
+ if(!this.props.visible) {
20
+ return null;
21
+ }
22
+ return (
23
+ <Icon name="icon-link" colorMark={this.props.colorMark}/>
24
+ );
25
+ }
26
+
27
+ render() {
28
+ const className = this.props.dataLineStart ? 'document_anchor data-line' : 'document_anchor';
29
+ const style = {
30
+ position: 'absolute',
31
+ top: '6px',
32
+ left: '-6px',
33
+ width: '24px',
34
+ height: '24px'
35
+ };
36
+ return (
37
+ <div className={className} data-line-start={this.props.dataLineStart} data-line-stop={this.props.dataLineStop} data-line-object-index={this.props.dataLineObjectIndex}>
38
+ <a id={this.props.anchor} href={`#${this.props.anchor}`} style={style}>
39
+ {this.renderIcon()}
40
+ </a>
41
+ </div>
42
+ );
43
+ }
44
+ }
45
+
46
+
47
+ module.exports = ComponentDocumentationAnchor;
@@ -0,0 +1,48 @@
1
+
2
+ 'use strict';
3
+
4
+ import Link from 'z-abs-complayer-router-client/client/react-component/link';
5
+ import ReactComponentBase from 'z-abs-corelayer-client/client/react-component/react-component-base';
6
+ import React from 'react';
7
+
8
+
9
+ class ComponentEmbed extends ReactComponentBase {
10
+ constructor(props) {
11
+ super(props);
12
+ }
13
+
14
+ shouldUpdate(nextProps, nextState) {
15
+ return !this.shallowCompare(this.props, nextProps);
16
+ }
17
+
18
+ renderEditEmbed() {
19
+ return (
20
+ <li className="embed_document_choice">
21
+ <Link href={`/${this.props.path}`}>Edit Embed</Link>
22
+ </li>
23
+ );
24
+ }
25
+
26
+ renderEmbedMenu() {
27
+ return (
28
+ <div className="dropdown embed_document_choice">
29
+ <button className="btn btn-xs dropdown-toggle embed_document_choice" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
30
+ <span className="caret"></span>
31
+ </button>
32
+ <ul className="dropdown-menu dropdown-menu-right embed_document_choice" aria-labelledby="dropdownMenu1">
33
+ {this.renderEditEmbed()}
34
+ </ul>
35
+ </div>
36
+ );
37
+ }
38
+
39
+ render() {
40
+ return (
41
+ <>
42
+ {this.renderEmbedMenu()}
43
+ </>
44
+ );
45
+ }
46
+ }
47
+
48
+ module.exports = ComponentEmbed;