viral-viewer-2 1.8.6 → 1.8.7
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.
|
@@ -1,10 +1,168 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ViralSpinner = void 0;
|
|
4
|
+
const html_1 = require("../../utils/html");
|
|
4
5
|
class ViralSpinner {
|
|
5
6
|
constructor(viralViewerApi) {
|
|
6
7
|
this.viralViewerApi = viralViewerApi;
|
|
7
8
|
this.spinner = null;
|
|
9
|
+
this.logo = `<svg
|
|
10
|
+
viewBox="0 0 135.46667 135.46667"
|
|
11
|
+
version="1.1"
|
|
12
|
+
id="svg7238"
|
|
13
|
+
sodipodi:docname="viral2-green.svg"
|
|
14
|
+
inkscape:export-filename="viral2-512.png"
|
|
15
|
+
inkscape:export-xdpi="96"
|
|
16
|
+
inkscape:export-ydpi="96"
|
|
17
|
+
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
|
|
18
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
19
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
20
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
21
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
22
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
23
|
+
<sodipodi:namedview
|
|
24
|
+
id="namedview7240"
|
|
25
|
+
pagecolor="#ffffff"
|
|
26
|
+
bordercolor="#000000"
|
|
27
|
+
borderopacity="0.25"
|
|
28
|
+
inkscape:showpageshadow="2"
|
|
29
|
+
inkscape:pageopacity="0.0"
|
|
30
|
+
inkscape:pagecheckerboard="0"
|
|
31
|
+
inkscape:deskcolor="#d1d1d1"
|
|
32
|
+
inkscape:document-units="px"
|
|
33
|
+
showgrid="false"
|
|
34
|
+
showborder="false"
|
|
35
|
+
inkscape:zoom="0.99327643"
|
|
36
|
+
inkscape:cx="-5.53723"
|
|
37
|
+
inkscape:cy="208.4012"
|
|
38
|
+
inkscape:window-width="1920"
|
|
39
|
+
inkscape:window-height="1025"
|
|
40
|
+
inkscape:window-x="-8"
|
|
41
|
+
inkscape:window-y="-8"
|
|
42
|
+
inkscape:window-maximized="1"
|
|
43
|
+
inkscape:current-layer="layer1" />
|
|
44
|
+
<defs
|
|
45
|
+
id="defs7235">
|
|
46
|
+
<linearGradient
|
|
47
|
+
inkscape:collect="always"
|
|
48
|
+
id="linearGradient1616">
|
|
49
|
+
<stop
|
|
50
|
+
style="stop-color:#56674d;stop-opacity:1;"
|
|
51
|
+
offset="0"
|
|
52
|
+
id="stop1612" />
|
|
53
|
+
<stop
|
|
54
|
+
style="stop-color:#ffffff;stop-opacity:0;"
|
|
55
|
+
offset="1"
|
|
56
|
+
id="stop1614" />
|
|
57
|
+
</linearGradient>
|
|
58
|
+
<linearGradient
|
|
59
|
+
inkscape:collect="always"
|
|
60
|
+
xlink:href="#linearGradient15690"
|
|
61
|
+
id="linearGradient18609"
|
|
62
|
+
gradientUnits="userSpaceOnUse"
|
|
63
|
+
gradientTransform="translate(-166.15654,32.013661)"
|
|
64
|
+
x1="307.17484"
|
|
65
|
+
y1="52.350281"
|
|
66
|
+
x2="326.05994"
|
|
67
|
+
y2="54.673866" />
|
|
68
|
+
<linearGradient
|
|
69
|
+
inkscape:collect="always"
|
|
70
|
+
id="linearGradient15690">
|
|
71
|
+
<stop
|
|
72
|
+
style="stop-color:#56674d;stop-opacity:1;"
|
|
73
|
+
offset="0"
|
|
74
|
+
id="stop15686" />
|
|
75
|
+
<stop
|
|
76
|
+
style="stop-color:#496e7c;stop-opacity:0;"
|
|
77
|
+
offset="1"
|
|
78
|
+
id="stop15688" />
|
|
79
|
+
</linearGradient>
|
|
80
|
+
<linearGradient
|
|
81
|
+
inkscape:collect="always"
|
|
82
|
+
xlink:href="#linearGradient15766"
|
|
83
|
+
id="linearGradient16111-2"
|
|
84
|
+
gradientUnits="userSpaceOnUse"
|
|
85
|
+
x1="94.716965"
|
|
86
|
+
y1="77.459938"
|
|
87
|
+
x2="120.0867"
|
|
88
|
+
y2="65.915489" />
|
|
89
|
+
<linearGradient
|
|
90
|
+
inkscape:collect="always"
|
|
91
|
+
id="linearGradient15766">
|
|
92
|
+
<stop
|
|
93
|
+
style="stop-color:#56674d;stop-opacity:1;"
|
|
94
|
+
offset="0"
|
|
95
|
+
id="stop15762" />
|
|
96
|
+
<stop
|
|
97
|
+
style="stop-color:#496e7c;stop-opacity:0;"
|
|
98
|
+
offset="1"
|
|
99
|
+
id="stop15764" />
|
|
100
|
+
</linearGradient>
|
|
101
|
+
<linearGradient
|
|
102
|
+
inkscape:collect="always"
|
|
103
|
+
xlink:href="#linearGradient15924"
|
|
104
|
+
id="linearGradient18611"
|
|
105
|
+
gradientUnits="userSpaceOnUse"
|
|
106
|
+
gradientTransform="translate(-166.15654,32.013661)"
|
|
107
|
+
x1="252.87965"
|
|
108
|
+
y1="104.78405"
|
|
109
|
+
x2="305.49805"
|
|
110
|
+
y2="61.56583" />
|
|
111
|
+
<linearGradient
|
|
112
|
+
inkscape:collect="always"
|
|
113
|
+
id="linearGradient15924">
|
|
114
|
+
<stop
|
|
115
|
+
style="stop-color:#56674d;stop-opacity:1;"
|
|
116
|
+
offset="0"
|
|
117
|
+
id="stop15920" />
|
|
118
|
+
<stop
|
|
119
|
+
style="stop-color:#ffffff;stop-opacity:0;"
|
|
120
|
+
offset="1"
|
|
121
|
+
id="stop15922" />
|
|
122
|
+
</linearGradient>
|
|
123
|
+
<linearGradient
|
|
124
|
+
inkscape:collect="always"
|
|
125
|
+
xlink:href="#linearGradient1616"
|
|
126
|
+
id="linearGradient18613"
|
|
127
|
+
gradientUnits="userSpaceOnUse"
|
|
128
|
+
gradientTransform="translate(-166.15654,32.013661)"
|
|
129
|
+
x1="262.83365"
|
|
130
|
+
y1="98.616089"
|
|
131
|
+
x2="303.40704"
|
|
132
|
+
y2="56.86591" />
|
|
133
|
+
</defs>
|
|
134
|
+
<g
|
|
135
|
+
inkscape:label="Layer 1"
|
|
136
|
+
inkscape:groupmode="layer"
|
|
137
|
+
id="layer1"
|
|
138
|
+
transform="translate(-81.132986,-92.575601)">
|
|
139
|
+
<g
|
|
140
|
+
id="g489"
|
|
141
|
+
transform="matrix(1.5365255,0,0,1.474116,-14.471343,-5.8524295)">
|
|
142
|
+
<path
|
|
143
|
+
id="path11327-0-0-0"
|
|
144
|
+
style="fill:url(#linearGradient18609);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
145
|
+
d="m 130.56075,85.04143 c 0.52476,0.26239 -18.03983,28.95537 -21.66379,32.11329 -3.42113,2.98116 -7.7736,3.69559 -11.21431,3.82302 -3.4407,0.12743 -10.95953,-1.27434 -10.95953,-1.27434 l 9.53171,15.82074 c 10.00038,14.90295 18.17614,-1.81278 29.33516,-18.06246 3.96568,-5.77479 7.78809,-12.47359 12.92015,-21.46123 4.04139,-7.0776 -7.96539,-10.97224 -7.94939,-10.95902 z" />
|
|
146
|
+
<path
|
|
147
|
+
style="fill:url(#linearGradient16111-2);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
148
|
+
d="m 95.83013,56.198256 16.05664,29.946913 c 0,0 -10.06725,0.637171 -12.870796,-1.019467 L 87.652946,64.863746 c 0,0 -2.527248,-8.028321 8.177184,-8.66549 z"
|
|
149
|
+
id="path11425-3-4-8"
|
|
150
|
+
sodipodi:nodetypes="ccccc"
|
|
151
|
+
class="UnoptimicedTransforms"
|
|
152
|
+
transform="translate(-14.07671,30.372343)" />
|
|
153
|
+
<path
|
|
154
|
+
id="path11327-0-5-6-6-4-3"
|
|
155
|
+
style="fill:url(#linearGradient18611);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
156
|
+
d="m 130.56075,85.04143 c -1.47647,3.17228 -18.24916,29.13777 -21.66379,32.11329 -3.42112,2.98116 -7.7736,3.69559 -11.2143,3.82302 -3.4407,0.12743 -10.95954,-1.27434 -10.95954,-1.27434 l 4.7656,7.91063 h 5.2e-4 c 0.002,0.001 10.85017,15.99897 19.37348,5.76286 2.99574,-3.59774 5.15135,-6.65533 6.98187,-9.54746 2.95629,-4.67075 5.06469,-8.90995 8.4947,-14.29586 14.90527,-23.40477 3.86084,-23.27687 4.22146,-24.49214 z"
|
|
157
|
+
sodipodi:nodetypes="csscccsssc" />
|
|
158
|
+
<path
|
|
159
|
+
id="path11327-0-5-6-6-7-5-9"
|
|
160
|
+
style="fill:url(#linearGradient18613);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
|
161
|
+
d="m 130.56075,85.04143 c -1.47647,3.17228 -18.24916,29.13777 -21.66379,32.11329 -3.42112,2.98116 -7.7736,3.69559 -11.2143,3.82302 -3.4407,0.12743 -10.95954,-1.27434 -10.95954,-1.27434 l 4.7656,7.91063 h 5.2e-4 c 0.002,0.001 12.41225,10.17869 19.50733,-1.0945 10.41305,-16.54503 3.05221,-4.8499 9.84606,-15.81454 14.04378,-22.66534 9.3575,-24.44829 9.71812,-25.66356 z"
|
|
162
|
+
sodipodi:nodetypes="csscccssc" />
|
|
163
|
+
</g>
|
|
164
|
+
</g>
|
|
165
|
+
</svg>`;
|
|
8
166
|
this.injectSpinner();
|
|
9
167
|
}
|
|
10
168
|
injectSpinner() {
|
|
@@ -21,9 +179,15 @@ class ViralSpinner {
|
|
|
21
179
|
if (this.viralViewerApi.targetElement) {
|
|
22
180
|
this.spinner = document.createElement('div');
|
|
23
181
|
this.spinner.setAttribute('style', "position: absolute;top:0px;left:0px;right:0px;bottom:0px;background-color: rgb(226, 230, 220,0.5);justify-content: center;align-items: center;display:none; z-index: 100");
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
182
|
+
const divWrapperDiv = document.createElement('div');
|
|
183
|
+
const spinnerCircle = document.createElement('div');
|
|
184
|
+
spinnerCircle.setAttribute('style', 'width: 200px; height: 200px; border-radius: 50%; border: 2px solid #ccc; border-top: 2px solid #56674d; animation: spin 1.5s linear infinite;');
|
|
185
|
+
//logo
|
|
186
|
+
const logo = (0, html_1.createElementFromHTML)(this.logo);
|
|
187
|
+
logo.setAttribute('style', "height:150px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)");
|
|
188
|
+
divWrapperDiv.appendChild(spinnerCircle);
|
|
189
|
+
divWrapperDiv.appendChild(logo);
|
|
190
|
+
this.spinner.appendChild(divWrapperDiv);
|
|
27
191
|
this.viralViewerApi.targetElement.appendChild(this.spinner);
|
|
28
192
|
}
|
|
29
193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viral-spinner.js","sourceRoot":"","sources":["../../../src/components/spinner/viral-spinner.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"viral-spinner.js","sourceRoot":"","sources":["../../../src/components/spinner/viral-spinner.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AAGzD,MAAa,YAAY;IA+JtB,YAAmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QA9JzC,YAAO,GAAuB,IAAI,CAAA;QAClC,SAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4JV,CAAA;QAEF,IAAI,CAAC,aAAa,EAAE,CAAC;IACxB,CAA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