@aj-shadow/z-abs-complayer-visualizationsequencediagram-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.
- package/.gitattributes +26 -0
- package/LICENSE.txt +96 -0
- package/README.md +5 -0
- package/npm-shrinkwrap.json +13 -0
- package/package.json +10 -0
- package/project/client/_build/Bundle-CompLayer-VisualizationSequenceDiagram-client.bld +36 -0
- package/project/client/_build/Client-CompLayer-VisualizationSequenceDiagram-client-jsx.bld +10 -0
- package/project/client/_build/Client-CompLayer-VisualizationSequenceDiagram-client.bld +10 -0
- package/project/client/_build/Client-css-CompLayer-VisualizationSequenceDiagram-bundle.bld +9 -0
- package/project/client/_build/z-abs-complayer-visualizationsequencediagram-client.prj +36 -0
- package/project/client/content-decoders/content-decoder.js +22 -0
- package/project/client/content-decoders/image-decoder.js +98 -0
- package/project/client/content-decoders/text-decoder.js +65 -0
- package/project/client/css/seq-dia-buttons.css +40 -0
- package/project/client/css/seq-dia-connection-closed.css +11 -0
- package/project/client/css/seq-dia-connection-closing.css +11 -0
- package/project/client/css/seq-dia-connection-connected-not.css +16 -0
- package/project/client/css/seq-dia-connection-connected.css +5 -0
- package/project/client/css/seq-dia-connection-connecting.css +5 -0
- package/project/client/css/seq-dia-connection-half-closed.css +11 -0
- package/project/client/css/seq-dia-connection-half-closing.css +11 -0
- package/project/client/css/seq-dia-connection-upgrading.css +5 -0
- package/project/client/css/seq-dia-connection.css +27 -0
- package/project/client/css/seq-dia-event-gui.css +86 -0
- package/project/client/css/seq-dia-event-state.css +13 -0
- package/project/client/css/seq-dia-event.css +55 -0
- package/project/client/css/seq-dia-inner.css +246 -0
- package/project/client/css/seq-dia-ip-address-name.css +14 -0
- package/project/client/css/seq-dia-phase.css +90 -0
- package/project/client/css/seq-dia-protocol.css +119 -0
- package/project/client/css/seq-dia-receive.css +5 -0
- package/project/client/css/seq-dia-send.css +5 -0
- package/project/client/css/seq-dia-sequence-diagram.css +10 -0
- package/project/client/css/seq-dia-server-accepted.css +5 -0
- package/project/client/css/seq-dia-server-accepting.css +5 -0
- package/project/client/css/seq-dia-server-attached.css +5 -0
- package/project/client/css/seq-dia-server-detached.css +5 -0
- package/project/client/css/seq-dia-server-not-started.css +5 -0
- package/project/client/css/seq-dia-server-started.css +5 -0
- package/project/client/css/seq-dia-server-starting.css +5 -0
- package/project/client/css/seq-dia-server-stopped.css +5 -0
- package/project/client/css/seq-dia-server-stopping.css +5 -0
- package/project/client/css/seq-dia-stack.css +51 -0
- package/project/client/css/seq-dia-state.css +188 -0
- package/project/client/css/seq-dia-template-msg.css +0 -0
- package/project/client/css/seq-dia-test-case-end.css +45 -0
- package/project/client/css/seq-dia-test-case-header.css +20 -0
- package/project/client/css/seq-dia-test-case-start.css +17 -0
- package/project/client/data/data-seq-dia-client-connected-not.js +69 -0
- package/project/client/data/data-seq-dia-client-connected.js +78 -0
- package/project/client/data/data-seq-dia-client-connecting.js +84 -0
- package/project/client/data/data-seq-dia-client-dns-failure.js +29 -0
- package/project/client/data/data-seq-dia-connection-closed.js +73 -0
- package/project/client/data/data-seq-dia-connection-closing.js +71 -0
- package/project/client/data/data-seq-dia-connection-half-closed.js +73 -0
- package/project/client/data/data-seq-dia-connection-half-closing.js +71 -0
- package/project/client/data/data-seq-dia-connection-upgrading.js +32 -0
- package/project/client/data/data-seq-dia-gui-result.js +48 -0
- package/project/client/data/data-seq-dia-gui.js +78 -0
- package/project/client/data/data-seq-dia-phase-end-result.js +31 -0
- package/project/client/data/data-seq-dia-phase-end.js +57 -0
- package/project/client/data/data-seq-dia-phase-start-result.js +30 -0
- package/project/client/data/data-seq-dia-phase-start.js +57 -0
- package/project/client/data/data-seq-dia-protocol-single-node-result.js +61 -0
- package/project/client/data/data-seq-dia-protocol-single-node.js +81 -0
- package/project/client/data/data-seq-dia-protocol-two-nodes-result.js +91 -0
- package/project/client/data/data-seq-dia-protocol-two-nodes.js +64 -0
- package/project/client/data/data-seq-dia-receive.js +90 -0
- package/project/client/data/data-seq-dia-send.js +90 -0
- package/project/client/data/data-seq-dia-server-accepted.js +70 -0
- package/project/client/data/data-seq-dia-server-accepting.js +61 -0
- package/project/client/data/data-seq-dia-server-attached.js +61 -0
- package/project/client/data/data-seq-dia-server-detached.js +61 -0
- package/project/client/data/data-seq-dia-server-not-started.js +61 -0
- package/project/client/data/data-seq-dia-server-started.js +61 -0
- package/project/client/data/data-seq-dia-server-starting.js +61 -0
- package/project/client/data/data-seq-dia-server-stopped.js +61 -0
- package/project/client/data/data-seq-dia-server-stopping.js +61 -0
- package/project/client/data/data-seq-dia-stack-result.js +40 -0
- package/project/client/data/data-seq-dia-stack.js +73 -0
- package/project/client/data/data-seq-dia-state-result.js +38 -0
- package/project/client/data/data-seq-dia-state.js +70 -0
- package/project/client/data/data-seq-dia-test-case-end-result.js +30 -0
- package/project/client/data/data-seq-dia-test-case-end.js +49 -0
- package/project/client/data/data-seq-dia-test-case-header-result.js +30 -0
- package/project/client/data/data-seq-dia-test-case-header.js +49 -0
- package/project/client/data/data-seq-dia-test-case-start-result.js +30 -0
- package/project/client/data/data-seq-dia-test-case-start.js +50 -0
- package/project/client/logic/analyze.js +41 -0
- package/project/client/logic/cache-array.js +45 -0
- package/project/client/logic/cache-map-double.js +64 -0
- package/project/client/logic/cache-map-shared.js +73 -0
- package/project/client/logic/cache-map.js +48 -0
- package/project/client/logic/cache-type-connection-closed.js +56 -0
- package/project/client/logic/cache-type-connection-closing.js +56 -0
- package/project/client/logic/cache-type-connection-connected.js +58 -0
- package/project/client/logic/cache-type-connection-connecting.js +58 -0
- package/project/client/logic/cache-type-connection-half-closed.js +56 -0
- package/project/client/logic/cache-type-connection-half-closing.js +56 -0
- package/project/client/logic/cache-type-connection-not-connected.js +58 -0
- package/project/client/logic/cache-type-phase-end.js +49 -0
- package/project/client/logic/cache-type-phase-start.js +49 -0
- package/project/client/logic/cache-type-receive.js +58 -0
- package/project/client/logic/cache-type-send.js +58 -0
- package/project/client/logic/cache-type-server-accepted.js +36 -0
- package/project/client/logic/cache-type-server-accepting.js +64 -0
- package/project/client/logic/cache-type-server-attached.js +64 -0
- package/project/client/logic/cache-type-server-detached.js +55 -0
- package/project/client/logic/cache-type-server-not-started.js +64 -0
- package/project/client/logic/cache-type-server-started.js +66 -0
- package/project/client/logic/cache-type-server-starting.js +53 -0
- package/project/client/logic/cache-type-server-stopped.js +64 -0
- package/project/client/logic/cache-type-server-stopping.js +64 -0
- package/project/client/logic/cache-type-stack.js +64 -0
- package/project/client/logic/cache-type-state.js +53 -0
- package/project/client/logic/cache-type-test-case-end.js +30 -0
- package/project/client/logic/cache-type-test-case-header.js +30 -0
- package/project/client/logic/cache-type-test-case-start.js +30 -0
- package/project/client/logic/cache.js +202 -0
- package/project/client/logic/connection-data.js +60 -0
- package/project/client/logic/const.js +207 -0
- package/project/client/logic/content-cache.js +23 -0
- package/project/client/logic/data-log-row.js +24 -0
- package/project/client/logic/filter-size.js +81 -0
- package/project/client/logic/seq-dia-filter.js +496 -0
- package/project/client/logic/shared-template-data.js +62 -0
- package/project/client/react-component/sequence-diagram.jsx +387 -0
- package/project/client/templates/components/component-seq-dia-arrow.js +26 -0
- package/project/client/templates/components/component-seq-dia-caption.js +44 -0
- package/project/client/templates/components/component-seq-dia-envelope.js +188 -0
- package/project/client/templates/components/component-seq-dia-event-info.js +108 -0
- package/project/client/templates/components/component-seq-dia-event-row.js +147 -0
- package/project/client/templates/components/component-seq-dia-protocol.js +314 -0
- package/project/client/templates/components/component-seq-dia-shared.js +58 -0
- package/project/client/templates/template-seq-dia-client-connected-not.js +67 -0
- package/project/client/templates/template-seq-dia-client-connected.js +67 -0
- package/project/client/templates/template-seq-dia-client-connecting.js +71 -0
- package/project/client/templates/template-seq-dia-client-dns-failure.js +82 -0
- package/project/client/templates/template-seq-dia-connection-closed.js +70 -0
- package/project/client/templates/template-seq-dia-connection-closing.js +72 -0
- package/project/client/templates/template-seq-dia-connection-half-closed.js +70 -0
- package/project/client/templates/template-seq-dia-connection-half-closing.js +80 -0
- package/project/client/templates/template-seq-dia-connection-upgraded-not.js +82 -0
- package/project/client/templates/template-seq-dia-connection-upgraded.js +57 -0
- package/project/client/templates/template-seq-dia-connection-upgrading.js +57 -0
- package/project/client/templates/template-seq-dia-gui.js +250 -0
- package/project/client/templates/template-seq-dia-msg.js +500 -0
- package/project/client/templates/template-seq-dia-phase-end.js +59 -0
- package/project/client/templates/template-seq-dia-phase-start.js +59 -0
- package/project/client/templates/template-seq-dia-protocol-base.js +107 -0
- package/project/client/templates/template-seq-dia-receive.js +119 -0
- package/project/client/templates/template-seq-dia-send.js +121 -0
- package/project/client/templates/template-seq-dia-server-accepted.js +61 -0
- package/project/client/templates/template-seq-dia-server-accepting.js +45 -0
- package/project/client/templates/template-seq-dia-server-attached.js +72 -0
- package/project/client/templates/template-seq-dia-server-detached.js +60 -0
- package/project/client/templates/template-seq-dia-server-not-started.js +77 -0
- package/project/client/templates/template-seq-dia-server-started.js +49 -0
- package/project/client/templates/template-seq-dia-server-starting.js +49 -0
- package/project/client/templates/template-seq-dia-server-stopped.js +45 -0
- package/project/client/templates/template-seq-dia-server-stopping.js +45 -0
- package/project/client/templates/template-seq-dia-stack.js +195 -0
- package/project/client/templates/template-seq-dia-state.js +118 -0
- package/project/client/templates/template-seq-dia-test-case-end.js +73 -0
- package/project/client/templates/template-seq-dia-test-case-header.js +70 -0
- package/project/client/templates/template-seq-dia-test-case-start.js +68 -0
- package/project/z-abs-complayer-visualizationsequencediagram-client.tree +171 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import LogDataAction from 'z-abs-funclayer-engine-cs/clientServer/log/log-data-action';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Const {
|
|
8
|
+
static DATA_TEST_CASE_START = LogDataAction.LOG.length;
|
|
9
|
+
static DATA_TEST_CASE_HEADER = LogDataAction.LOG.length + 1;
|
|
10
|
+
static DATA_TEST_CASE_END = LogDataAction.LOG.length + 2;
|
|
11
|
+
static DATA_PHASE_START = LogDataAction.LOG.length + 3;
|
|
12
|
+
static DATA_PHASE_END = LogDataAction.LOG.length + 4;
|
|
13
|
+
static DATA_STATE = LogDataAction.LOG.length + 5;
|
|
14
|
+
|
|
15
|
+
static SIZE_PHASE_ID = 3;
|
|
16
|
+
static SIZE_STATE_INDEX = 3;
|
|
17
|
+
static SIZE_STATE_RESULT_INDEX = 4;
|
|
18
|
+
static SIZE_ACTOR_INDEX = 14;
|
|
19
|
+
static SIZE_NBR_OF_ACTORS = 14;
|
|
20
|
+
static SIZE_RENDER_NODES = 1;
|
|
21
|
+
static SIZE_REVERSE_DIRECTION = 1;
|
|
22
|
+
static SIZE_PROTOCOL_INDEX = 12;
|
|
23
|
+
static SIZE_RENDER_POSITION = 1;
|
|
24
|
+
static SIZE_DATA_TYPE = 5;
|
|
25
|
+
static SIZE_TYPE = 3;
|
|
26
|
+
|
|
27
|
+
static RENDER_SINGLE_NODE = 0;
|
|
28
|
+
static RENDER_TWO_NODES = 1;
|
|
29
|
+
|
|
30
|
+
static PART_LEFT = 0;
|
|
31
|
+
static PART_RIGHT = 1;
|
|
32
|
+
static PART_MIDDLE = 2;
|
|
33
|
+
static PART_MIDDLE_NODE_CONTINUED = 3;
|
|
34
|
+
static PART_MIDDLE_NODE_LAST = 4;
|
|
35
|
+
|
|
36
|
+
static TRANSPORT_TYPE_TCP = 0;
|
|
37
|
+
static TRANSPORT_TYPE_UDP = 1;
|
|
38
|
+
static TRANSPORT_TYPE_MC = 2;
|
|
39
|
+
static TRANSPORT_TYPE_TLS = 3;
|
|
40
|
+
|
|
41
|
+
static transportTypeNames = [
|
|
42
|
+
'tcp',
|
|
43
|
+
'udp',
|
|
44
|
+
'mc',
|
|
45
|
+
'tls'
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
static TRANSPORT_LINE_CSSES = [
|
|
49
|
+
'seq_dia_protocol_tcp_line',
|
|
50
|
+
'seq_dia_protocol_udp_line',
|
|
51
|
+
'seq_dia_protocol_mc_line',
|
|
52
|
+
'seq_dia_protocol_tls_line'
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
static PROTOCOL_LINE_NONE = -1;
|
|
56
|
+
static PROTOCOL_LINE_CONNECTION = 0;
|
|
57
|
+
static PROTOCOL_LINE_MESSAGE = 1;
|
|
58
|
+
static PROTOCOL_LINE_MESSAGE_PART = 2;
|
|
59
|
+
static PROTOCOL_LINE_CSSES = [
|
|
60
|
+
'seq_dia_protocol_connection_line',
|
|
61
|
+
'seq_dia_protocol_message_line',
|
|
62
|
+
'seq_dia_protocol_message_part_line'
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
static PART_TYPE_CLIENT = 0;
|
|
66
|
+
static PART_TYPE_SERVER = 1;
|
|
67
|
+
|
|
68
|
+
static RENDER_POSITION_NORMAL = 0;
|
|
69
|
+
static RENDER_POSITION_BOTTOM = 1;
|
|
70
|
+
|
|
71
|
+
static LOCAL_PART = 0;
|
|
72
|
+
static REMOTE_PART = 1;
|
|
73
|
+
static EAST_START = 0;
|
|
74
|
+
static EAST_STOP = 1;
|
|
75
|
+
static WEST_START = 2;
|
|
76
|
+
static WEST_STOP = 3;
|
|
77
|
+
static UNKNOWN_START = 4;
|
|
78
|
+
static EAST_MIDDLE = 5;
|
|
79
|
+
static WEST_MIDDLE = 6;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
Const.MESSAGE_DIRECTION_RECEIVED = 0;
|
|
84
|
+
Const.MESSAGE_DIRECTION_SENT = 1;
|
|
85
|
+
Const.MESSAGE_DIRECTION = [
|
|
86
|
+
'seq_dia_msg_nbr_received',
|
|
87
|
+
'seq_dia_msg_nbr_sent'
|
|
88
|
+
];
|
|
89
|
+
Const.MESSAGE_DIRECTION_FILTER = [
|
|
90
|
+
'seq_dia_show__message_event__received_numbers',
|
|
91
|
+
'seq_dia_show__message_event__sent_numbers'
|
|
92
|
+
];
|
|
93
|
+
|
|
94
|
+
Const.MESSAGE_NORMAL = 0;
|
|
95
|
+
Const.MESSAGE_DETAIL = 1;
|
|
96
|
+
|
|
97
|
+
Const.EVENT_CONNECTING = 0;
|
|
98
|
+
Const.EVENT_TCP = 1;
|
|
99
|
+
Const.EVENT_UDP = 2;
|
|
100
|
+
Const.EVENT_MC = 3;
|
|
101
|
+
Const.EVENT_TLS = 4;
|
|
102
|
+
|
|
103
|
+
Const.events = new Map([['connecting', {
|
|
104
|
+
index: Const.EVENT_CONNECTING,
|
|
105
|
+
classLine: 'seq_dia_protocol_connection_line'
|
|
106
|
+
}], ['tcp', {
|
|
107
|
+
index: Const.EVENT_TCP,
|
|
108
|
+
classLine: 'event_tcp_line'
|
|
109
|
+
}], ['udp', {
|
|
110
|
+
index: Const.EVENT_UDP,
|
|
111
|
+
classLine: 'event_udp_line'
|
|
112
|
+
}], ['mc', {
|
|
113
|
+
index: Const.EVENT_MC,
|
|
114
|
+
classLine: 'event_mc_line'
|
|
115
|
+
}], ['tls', {
|
|
116
|
+
index: Const.EVENT_TLS,
|
|
117
|
+
classLine: 'event_tls_line'
|
|
118
|
+
}]]);
|
|
119
|
+
|
|
120
|
+
Const.transportTypes = new Map(
|
|
121
|
+
[[0, {
|
|
122
|
+
lineEventId: Const.EVENT_TCP
|
|
123
|
+
}], [1, {
|
|
124
|
+
lineEventId: Const.EVENT_UDP
|
|
125
|
+
}], [2, {
|
|
126
|
+
lineEventId: Const.EVENT_MC
|
|
127
|
+
}], [3, {
|
|
128
|
+
lineEventId: Const.EVENT_TLS
|
|
129
|
+
}]]);
|
|
130
|
+
|
|
131
|
+
Const.REVERS_DIRECTION_FALSE = 0;
|
|
132
|
+
Const.REVERS_DIRECTION_TRUE = 1;
|
|
133
|
+
|
|
134
|
+
Const.HIDE = 0;
|
|
135
|
+
Const.SHOW = 1;
|
|
136
|
+
|
|
137
|
+
Const.EAST = 0;
|
|
138
|
+
Const.WEST = 1;
|
|
139
|
+
Const.CLOSED = 0;
|
|
140
|
+
Const.OPEN = 1;
|
|
141
|
+
|
|
142
|
+
Const.TEST_CASE_Y_BIAS = 10;
|
|
143
|
+
|
|
144
|
+
Const.ACTOR_X_MARGIN = 30;
|
|
145
|
+
Const.ACTOR_X_PADDING = 100;
|
|
146
|
+
Const.ACTOR_STATIC_ACTORS = 10;
|
|
147
|
+
|
|
148
|
+
Const.ACTOR_Y_BIAS = 10;
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
Const.ACTOR_EVENT_HEIGHT = 10;
|
|
152
|
+
Const.ACTOR_EVENT_HALF_HEIGHT = Const.ACTOR_EVENT_HEIGHT / 2;
|
|
153
|
+
Const.ACTOR_EVENT_Y_BIAS = Const.TEST_CASE_Y_BIAS + Const.ACTOR_Y_BIAS + Const.ACTOR_EVENT_HEIGHT;
|
|
154
|
+
|
|
155
|
+
Const.STATE_EVENT_HEIGHT = 10;
|
|
156
|
+
Const.STATE_EVENT_HALF_HEIGHT = Const.STATE_EVENT_HEIGHT / 2;
|
|
157
|
+
|
|
158
|
+
Const.MESSAGE_EVENT_HEIGHT = 10;
|
|
159
|
+
Const.MESSAGE_EVENT_HEIGHT_HALF = Const.MESSAGE_EVENT_HEIGHT / 2;
|
|
160
|
+
Const.MESSAGE_EVENT_HEIGHT_DOUBLE = 2 * Const.MESSAGE_EVENT_HEIGHT;
|
|
161
|
+
Const.MESSAGE_EVENT_HEIGHT_ONE_AND_HALF = Const.MESSAGE_EVENT_HEIGHT + Const.MESSAGE_EVENT_HEIGHT_HALF;
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
Const.PHASE_X_BIAS = 10;
|
|
165
|
+
Const.PHASE_HEIGHT = 5;
|
|
166
|
+
Const.PHASE_HEIGHT_DOUBLE = 2 * Const.PHASE_HEIGHT;
|
|
167
|
+
|
|
168
|
+
Const.PHASE_Y_BIAS = 0.5;
|
|
169
|
+
Const.PHASE_WIDTH = 40;
|
|
170
|
+
Const.PHASE_WIDTH_DOUBLE = 2 * Const.PHASE_WIDTH;
|
|
171
|
+
|
|
172
|
+
Const.PHASE_BIAS_WIDTH = Const.PHASE_X_BIAS + Const.PHASE_WIDTH;
|
|
173
|
+
Const.PHASE_BIAS_WIDTH_DOUBLE = 2 * Const.PHASE_BIAS_WIDTH;
|
|
174
|
+
|
|
175
|
+
Const.HEADER_Y_HEIGHT = 30;
|
|
176
|
+
|
|
177
|
+
Const.LINE_WIDTH = 2.0;
|
|
178
|
+
Const.LINE_WIDTH_HALF = Const.LINE_WIDTH / 2;
|
|
179
|
+
|
|
180
|
+
Const.TEXT_BIAS = 17;
|
|
181
|
+
|
|
182
|
+
Const.phaseClasses = [
|
|
183
|
+
'seq_dia_phase_data',
|
|
184
|
+
'seq_dia_phase_pre',
|
|
185
|
+
'seq_dia_phase_exec',
|
|
186
|
+
'seq_dia_phase_post',
|
|
187
|
+
'seq_dia_phase_none'
|
|
188
|
+
];
|
|
189
|
+
|
|
190
|
+
Const.phaseDarkClasses = [
|
|
191
|
+
'seq_dia_dark_phase_data',
|
|
192
|
+
'seq_dia_dark_phase_pre',
|
|
193
|
+
'seq_dia_dark_phase_exec',
|
|
194
|
+
'seq_dia_dark_phase_post',
|
|
195
|
+
'seq_dia_dark_phase_none'
|
|
196
|
+
];
|
|
197
|
+
|
|
198
|
+
Const.phaseNames = [
|
|
199
|
+
'Data',
|
|
200
|
+
'Precondition',
|
|
201
|
+
'Execution',
|
|
202
|
+
'Postcondition',
|
|
203
|
+
'None'
|
|
204
|
+
];
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
module.exports = Const;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class ContentCache {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.cache = new Map();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
add(name, content) {
|
|
11
|
+
this.cache.set(name, {
|
|
12
|
+
raw: true,
|
|
13
|
+
content: content
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
clear() {
|
|
18
|
+
this.cache.clear();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
module.exports = new ContentCache();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class DataLogRow {
|
|
6
|
+
static create(logRow, protocolIndex, phaseId) {
|
|
7
|
+
return {
|
|
8
|
+
logRow: logRow,
|
|
9
|
+
phaseId: phaseId,
|
|
10
|
+
protocolIndex: protocolIndex
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static clone(dataLogRow, phaseId) {
|
|
15
|
+
return {
|
|
16
|
+
logRow: dataLogRow.logRow,
|
|
17
|
+
phaseId: phaseId,
|
|
18
|
+
protocolIndex: dataLogRow.protocolIndex
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
module.exports = DataLogRow;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
import Const from './const';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class FilterSize {
|
|
8
|
+
static MAX_COLUMNS = 20;
|
|
9
|
+
|
|
10
|
+
constructor() {
|
|
11
|
+
this.filterRules = new Map();
|
|
12
|
+
|
|
13
|
+
this.eventMargin = 10;
|
|
14
|
+
this.eventPadding = 80;
|
|
15
|
+
this.eventWidth = 200;
|
|
16
|
+
this.eventWidthHalf = this.eventWidth / 2;
|
|
17
|
+
this.eventWidthQuarter = this.eventWidth / 4;
|
|
18
|
+
this.eventWidthEighth = this.eventWidth / 8;
|
|
19
|
+
this.eventWidthAndHalf = this.eventWidth + this.eventWidthHalf;
|
|
20
|
+
this.event2Width = this.eventWidth + this.eventWidth;
|
|
21
|
+
this.event2WidthAndHalf = this.eventWidth + this.event2Width;
|
|
22
|
+
|
|
23
|
+
this.filterCss = document.createElement('style');
|
|
24
|
+
document.head.appendChild(this.filterCss);
|
|
25
|
+
this.styleSheet = this.filterCss.sheet;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
update(eventMargin, eventPadding, eventWidth) {
|
|
29
|
+
if(this.eventMargin !== eventMargin || this.eventPadding !== eventPadding || this.eventWidth !== eventWidth) {
|
|
30
|
+
this.eventMargin = eventMargin;
|
|
31
|
+
this.eventPadding = eventPadding;
|
|
32
|
+
this.eventWidth = eventWidth;
|
|
33
|
+
this.eventWidthHalf = this.eventWidth / 2;
|
|
34
|
+
this.eventWidthQuarter = this.eventWidth / 4;
|
|
35
|
+
this.eventWidthEighth = this.eventWidth / 8;
|
|
36
|
+
this.event2Width = this.eventWidth + this.eventWidth;
|
|
37
|
+
this.event2WidthAndHalf = this.eventWidthHalf + this.event2Width;
|
|
38
|
+
|
|
39
|
+
this._createFilter('seq_dia__event_column_left', 'div', `left:${eventMargin}px;width:${eventPadding}px`, -1);
|
|
40
|
+
this._createFilter('seq__dia_event_actor_line', 'div', `margin:0px ${this.eventWidthHalf - 1}px;`, -1);
|
|
41
|
+
let left = eventMargin + eventPadding;
|
|
42
|
+
for(let i = 0; i < FilterSize.MAX_COLUMNS; ++i) {
|
|
43
|
+
this._createFilter(`seq_dia__event_column_middle_${i}`, 'div', `left:${left}px;width:${eventWidth}px`, -1);
|
|
44
|
+
this._createFilter(`seq_dia__event_column_right_${i}`, 'div', `left:${left}px;width:${eventPadding}px`, -1);
|
|
45
|
+
left += eventWidth;
|
|
46
|
+
}
|
|
47
|
+
this.seq_dia__event_lrBorder = this._createFilter('seq_dia__event_lrBorder', 'div', `display:grid!important;width:${eventMargin + eventPadding}px`, -1);
|
|
48
|
+
this.seq_dia__event_Width = this._createFilter('seq_dia__event_Width', 'div', `display:grid!important;width:${eventWidth}px`, -1);
|
|
49
|
+
|
|
50
|
+
const newFilterCss = document.createElement('style');
|
|
51
|
+
document.head.replaceChild(newFilterCss, this.filterCss);
|
|
52
|
+
this.filterCss = newFilterCss;
|
|
53
|
+
this.styleSheet = this.filterCss.sheet;
|
|
54
|
+
|
|
55
|
+
const cssRules = this.styleSheet.cssRules;
|
|
56
|
+
this.filterRules.forEach((filterRule) => {
|
|
57
|
+
const index = this.styleSheet.insertRule(`${filterRule.type}.${filterRule.name} { ${filterRule.rule} }`, cssRules.length);
|
|
58
|
+
filterRule.index = index;
|
|
59
|
+
});
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
getClassEventBorder() {
|
|
68
|
+
return 'seq_dia__event_lrBorder';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
getClassEventWidth() {
|
|
72
|
+
return 'seq_dia__event_Width';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
_createFilter(name, type, rule, index) {
|
|
76
|
+
this.filterRules.set(name, {name: name, type: type, rule: rule, index: index});
|
|
77
|
+
return name;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
module.exports = new FilterSize();
|