c91a2ee3 by Jeff Balicki

clean up blocks

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent a171116e
Showing 39 changed files with 0 additions and 1249 deletions
1 <?php
2
3
4 // Create id attribute allowing for custom "anchor" value.
5 $id = 'msf-pi-' . $block['id'];
6 if( !empty($block['anchor']) ) {
7 $id = $block['anchor'];
8 }
9
10 // Create class attribute allowing for custom "className" and "align" values.
11 $className = 'msf-pi';
12 if( !empty($block['className']) ) {
13 $className .= ' ' . $block['className'];
14 }
15 if( !empty($block['align']) ) {
16 $className .= ' align' . $block['align'];
17 }
18
19 $title = get_field('title') ?: null;
20 $theme = null;
21 $inner_blocks = get_field('data') ?: null;
22 $color = get_field('foreground_color') ?: null;
23
24 $data = [];
25
26 foreach($inner_blocks as $ib) {
27 $data[] = [ "name" => $ib['name'], "value" => (int)$ib['value'], 'color' => $ib['color'], 'font_color' => $color ];
28 }
29
30 ?>
31
32 <script>
33
34 window.addEventListener('scroll', function(event) {
35 if(!jQuery("#<?= $id ?>").hasClass('visible') && window.tz_checkVisible(jQuery("#<?= $id ?>"), null, 200)) {
36 jQuery("#<?= $id ?>").addClass('visible');
37 jQuery("#<?= $id ?>").addClass('is-visible');
38 window.renderPI(document.getElementById("<?= $id ?>"))
39 }
40 });
41
42
43 </script>
44 <div class='pi <?= $theme ?>' class="<?php echo esc_attr($className); ?>" style='width:100%;'>
45 <h3><?= $title ?></h3>
46 <div id="<?= $id ?>" data-points='<?= json_encode($data) ?>' data-color="<?= $color ?>"></div>
47 </div>
1 # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
3 # dependencies
4 /node_modules
5 /.pnp
6 .pnp.js
7
8 # testing
9 /coverage
10
11 # misc
12 .DS_Store
13 .env.local
14 .env.development.local
15 .env.test.local
16 .env.production.local
17
18 npm-debug.log*
19 yarn-debug.log*
20 yarn-error.log*
1 # Getting Started with Create React App
2
3 This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4
5 ## Available Scripts
6
7 In the project directory, you can run:
8
9 ### `yarn start`
10
11 Runs the app in the development mode.\
12 Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13
14 The page will reload if you make edits.\
15 You will also see any lint errors in the console.
16
17 ### `yarn test`
18
19 Launches the test runner in the interactive watch mode.\
20 See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21
22 ### `yarn build`
23
24 Builds the app for production to the `build` folder.\
25 It correctly bundles React in production mode and optimizes the build for the best performance.
26
27 The build is minified and the filenames include the hashes.\
28 Your app is ready to be deployed!
29
30 See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31
32 ### `yarn eject`
33
34 **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35
36 If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37
38 Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39
40 You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41
42 ## Learn More
43
44 You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45
46 To learn React, check out the [React documentation](https://reactjs.org/).
47
48 ### Code Splitting
49
50 This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51
52 ### Analyzing the Bundle Size
53
54 This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55
56 ### Making a Progressive Web App
57
58 This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59
60 ### Advanced Configuration
61
62 This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63
64 ### Deployment
65
66 This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67
68 ### `yarn build` fails to minify
69
70 This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
1 {
2 "files": {
3 "main.js": "/static/js/main.a7bb4a96.chunk.js",
4 "main.js.map": "/static/js/main.a7bb4a96.chunk.js.map",
5 "runtime-main.js": "/static/js/runtime-main.a933fda7.js",
6 "runtime-main.js.map": "/static/js/runtime-main.a933fda7.js.map",
7 "static/js/2.c3c99db9.chunk.js": "/static/js/2.c3c99db9.chunk.js",
8 "static/js/2.c3c99db9.chunk.js.map": "/static/js/2.c3c99db9.chunk.js.map",
9 "index.html": "/index.html",
10 "static/js/2.c3c99db9.chunk.js.LICENSE.txt": "/static/js/2.c3c99db9.chunk.js.LICENSE.txt"
11 },
12 "entrypoints": [
13 "static/js/runtime-main.a933fda7.js",
14 "static/js/2.c3c99db9.chunk.js",
15 "static/js/main.a7bb4a96.chunk.js"
16 ]
17 }
...\ No newline at end of file ...\ No newline at end of file
1 <!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>React App</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="cbv-globe"></div><script>!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],p=0,s=[];p<f.length;p++)l=f[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(c&&c(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=this["webpackJsonpcbv-globe"]=this["webpackJsonpcbv-globe"]||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var c=i;t()}([])</script><script src="/static/js/2.c3c99db9.chunk.js"></script><script src="/static/js/main.a7bb4a96.chunk.js"></script></body><script>window.renderProgression(document.getElementById("cbv-globe"))</script></html>
...\ No newline at end of file ...\ No newline at end of file
1 {
2 "short_name": "React App",
3 "name": "Create React App Sample",
4 "icons": [
5 {
6 "src": "favicon.ico",
7 "sizes": "64x64 32x32 24x24 16x16",
8 "type": "image/x-icon"
9 },
10 {
11 "src": "logo192.png",
12 "type": "image/png",
13 "sizes": "192x192"
14 },
15 {
16 "src": "logo512.png",
17 "type": "image/png",
18 "sizes": "512x512"
19 }
20 ],
21 "start_url": ".",
22 "display": "standalone",
23 "theme_color": "#000000",
24 "background_color": "#ffffff"
25 }
1 # https://www.robotstxt.org/robotstxt.html
2 User-agent: *
3 Disallow:
1 /*
2 object-assign
3 (c) Sindre Sorhus
4 @license MIT
5 */
6
7 /*!
8 Copyright (c) 2018 Jed Watson.
9 Licensed under the MIT License (MIT), see
10 http://jedwatson.github.io/classnames
11 */
12
13 /*! Conditions:: INITIAL */
14
15 /*! Production:: $accept : expression $end */
16
17 /*! Production:: css_value : ANGLE */
18
19 /*! Production:: css_value : CHS */
20
21 /*! Production:: css_value : EMS */
22
23 /*! Production:: css_value : EXS */
24
25 /*! Production:: css_value : FREQ */
26
27 /*! Production:: css_value : LENGTH */
28
29 /*! Production:: css_value : PERCENTAGE */
30
31 /*! Production:: css_value : REMS */
32
33 /*! Production:: css_value : RES */
34
35 /*! Production:: css_value : SUB css_value */
36
37 /*! Production:: css_value : TIME */
38
39 /*! Production:: css_value : VHS */
40
41 /*! Production:: css_value : VMAXS */
42
43 /*! Production:: css_value : VMINS */
44
45 /*! Production:: css_value : VWS */
46
47 /*! Production:: css_variable : CSS_VAR LPAREN CSS_CPROP COMMA math_expression RPAREN */
48
49 /*! Production:: css_variable : CSS_VAR LPAREN CSS_CPROP RPAREN */
50
51 /*! Production:: expression : math_expression EOF */
52
53 /*! Production:: math_expression : LPAREN math_expression RPAREN */
54
55 /*! Production:: math_expression : NESTED_CALC LPAREN math_expression RPAREN */
56
57 /*! Production:: math_expression : SUB PREFIX SUB NESTED_CALC LPAREN math_expression RPAREN */
58
59 /*! Production:: math_expression : css_value */
60
61 /*! Production:: math_expression : css_variable */
62
63 /*! Production:: math_expression : math_expression ADD math_expression */
64
65 /*! Production:: math_expression : math_expression DIV math_expression */
66
67 /*! Production:: math_expression : math_expression MUL math_expression */
68
69 /*! Production:: math_expression : math_expression SUB math_expression */
70
71 /*! Production:: math_expression : value */
72
73 /*! Production:: value : NUMBER */
74
75 /*! Production:: value : SUB NUMBER */
76
77 /*! Rule:: $ */
78
79 /*! Rule:: (--[0-9a-z-A-Z-]*) */
80
81 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)% */
82
83 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)Hz\b */
84
85 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)\b */
86
87 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ch\b */
88
89 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)cm\b */
90
91 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)deg\b */
92
93 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dpcm\b */
94
95 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dpi\b */
96
97 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)dppx\b */
98
99 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)em\b */
100
101 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ex\b */
102
103 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)grad\b */
104
105 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)in\b */
106
107 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)kHz\b */
108
109 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)mm\b */
110
111 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)ms\b */
112
113 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)pc\b */
114
115 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)pt\b */
116
117 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)px\b */
118
119 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)rad\b */
120
121 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)rem\b */
122
123 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)s\b */
124
125 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)turn\b */
126
127 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vh\b */
128
129 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vmax\b */
130
131 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vmin\b */
132
133 /*! Rule:: ([0-9]+(\.[0-9]*)?|\.[0-9]+)vw\b */
134
135 /*! Rule:: ([a-z]+) */
136
137 /*! Rule:: (calc) */
138
139 /*! Rule:: (var) */
140
141 /*! Rule:: , */
142
143 /*! Rule:: - */
144
145 /*! Rule:: \( */
146
147 /*! Rule:: \) */
148
149 /*! Rule:: \* */
150
151 /*! Rule:: \+ */
152
153 /*! Rule:: \/ */
154
155 /*! Rule:: \s+ */
156
157 /*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */
158
159 /** @license React v0.20.2
160 * scheduler.production.min.js
161 *
162 * Copyright (c) Facebook, Inc. and its affiliates.
163 *
164 * This source code is licensed under the MIT license found in the
165 * LICENSE file in the root directory of this source tree.
166 */
167
168 /** @license React v16.10.2
169 * react-is.production.min.js
170 *
171 * Copyright (c) Facebook, Inc. and its affiliates.
172 *
173 * This source code is licensed under the MIT license found in the
174 * LICENSE file in the root directory of this source tree.
175 */
176
177 /** @license React v17.0.2
178 * react-dom.production.min.js
179 *
180 * Copyright (c) Facebook, Inc. and its affiliates.
181 *
182 * This source code is licensed under the MIT license found in the
183 * LICENSE file in the root directory of this source tree.
184 */
185
186 /** @license React v17.0.2
187 * react-jsx-runtime.production.min.js
188 *
189 * Copyright (c) Facebook, Inc. and its affiliates.
190 *
191 * This source code is licensed under the MIT license found in the
192 * LICENSE file in the root directory of this source tree.
193 */
194
195 /** @license React v17.0.2
196 * react.production.min.js
197 *
198 * Copyright (c) Facebook, Inc. and its affiliates.
199 *
200 * This source code is licensed under the MIT license found in the
201 * LICENSE file in the root directory of this source tree.
202 */
1 !function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],p=0,s=[];p<f.length;p++)l=f[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(c&&c(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=this["webpackJsonpcbv-globe"]=this["webpackJsonpcbv-globe"]||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var c=i;t()}([]);
2 //# sourceMappingURL=runtime-main.a933fda7.js.map
...\ No newline at end of file ...\ No newline at end of file
1 {"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU8B,QAGnC,IAAIC,EAASH,EAAiB5B,GAAY,CACzCK,EAAGL,EACHgC,GAAG,EACHF,QAAS,IAUV,OANAhB,EAAQd,GAAUW,KAAKoB,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAG/DK,EAAOC,GAAI,EAGJD,EAAOD,QAKfJ,EAAoBO,EAAInB,EAGxBY,EAAoBQ,EAAIN,EAGxBF,EAAoBS,EAAI,SAASL,EAASM,EAAMC,GAC3CX,EAAoBY,EAAER,EAASM,IAClC5B,OAAO+B,eAAeT,EAASM,EAAM,CAAEI,YAAY,EAAMC,IAAKJ,KAKhEX,EAAoBgB,EAAI,SAASZ,GACX,qBAAXa,QAA0BA,OAAOC,aAC1CpC,OAAO+B,eAAeT,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DrC,OAAO+B,eAAeT,EAAS,aAAc,CAAEe,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKzC,OAAO0C,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBzC,OAAO+B,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOnB,EAAoBS,EAAEc,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRvB,EAAoB2B,EAAI,SAAStB,GAChC,IAAIM,EAASN,GAAUA,EAAOiB,WAC7B,WAAwB,OAAOjB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAL,EAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,EAAoBY,EAAI,SAASgB,EAAQC,GAAY,OAAO/C,OAAOC,UAAUC,eAAeC,KAAK2C,EAAQC,IAGzG7B,EAAoB8B,EAAI,IAExB,IAAIC,EAAaC,KAAK,yBAA2BA,KAAK,0BAA4B,GAC9EC,EAAmBF,EAAW5C,KAAKuC,KAAKK,GAC5CA,EAAW5C,KAAOf,EAClB2D,EAAaA,EAAWG,QACxB,IAAI,IAAIvD,EAAI,EAAGA,EAAIoD,EAAWlD,OAAQF,IAAKP,EAAqB2D,EAAWpD,IAC3E,IAAIU,EAAsB4C,EAI1BxC,I","file":"static/js/runtime-main.a933fda7.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = this[\"webpackJsonpcbv-globe\"] = this[\"webpackJsonpcbv-globe\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 {
2 "name": "cbv-globe",
3 "version": "0.1.0",
4 "private": true,
5 "dependencies": {
6 "@testing-library/jest-dom": "^5.11.4",
7 "@testing-library/react": "^11.1.0",
8 "@testing-library/user-event": "^12.1.10",
9 "babel-loader": "8.1.0",
10 "i18next": "^20.3.1",
11 "i18next-browser-languagedetector": "^6.1.1",
12 "react": "^17.0.2",
13 "react-dom": "^17.0.2",
14 "react-i18next": "^11.10.0",
15 "react-scripts": "4.0.3",
16 "react-simple-maps": "2.1.2",
17 "react-spring": "^9.2.1",
18 "react-tooltip": "latest",
19 "react-visibility-sensor": "^5.1.1",
20 "recharts": "^2.0.9",
21 "web-vitals": "^1.0.1"
22 },
23 "scripts": {
24 "start": "react-scripts start",
25 "build": "react-scripts build",
26 "test": "react-scripts test",
27 "eject": "react-scripts eject"
28 },
29 "eslintConfig": {
30 "extends": [
31 "react-app",
32 "react-app/jest"
33 ]
34 },
35 "browserslist": {
36 "production": [
37 ">0.2%",
38 "not dead",
39 "not op_mini all"
40 ],
41 "development": [
42 "last 1 chrome version",
43 "last 1 firefox version",
44 "last 1 safari version"
45 ]
46 }
47 }
1 <svg width="768px" height="318px" viewBox="0 0 768 318" version="1.1">
2 <title>sectors-2</title>
3 <desc>Created with Sketch.</desc>
4 <defs></defs>
5 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
6 <g id="sectors-2">
7 <circle cx="300" cy="152" r="58" data-r="58" id="Fill-115" fill="#A4D6CF"></circle>
8 <circle cx="450" cy="150" r="24" data-r="24" id="Fill-116" fill="#6BC1BA"></circle>
9 <circle cx="470" cy="225" r="2425" data-r="24" id="Fill-117" fill="#A4D6CF"></circle>
10 <circle cx="375" cy="280" r="47" data-r="47" id="Fill-118" fill="#DAEEEB"></circle>
11 <g id="Professional-Valuation-Services" className="115" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(50.000000, 83.000000)" : "translate(50.000000, 83.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="18" font-weight="300">
12 <text id="Professional-Valuati">
13 <tspan x="0.273" y="14">{t('pro.professional')}</tspan>
14 <tspan x={t('pro.valuation.x')} y="35.6000073">{t('pro.Valuation')}</tspan>
15 <tspan x={t('pro.services.x')} y="57.2000146">{t('pro.Services')}</tspan>
16 </text>
17 </g>
18 <g id="Financial-Services" className="118" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(125.000000, 224.000000)" : "translate(125.000000, 224.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="13" font-weight="300">
19 <text>
20 <tspan x="0.677" y="10">{t('pro.Financial Services')}</tspan>
21 <tspan x="17.395" y="25.6000053">{t('pro.Industry')}</tspan>
22 <tspan x="18.5585" y="41.2000105">{t('pro.Government')}</tspan>
23 </text>
24 </g>
25 <g id="Other" className="116" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(55.000000, 224.000000)" : "translate(63.000000, 224.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="10" font-weight="300">
26 <text>
27 <tspan x="0.802" y="10">{t('pro.Retired')}</tspan>
28 </text>
29 </g>
30 <g id="50%" class="115" opacity="1" transform="translate(270.000000, 147.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="36" font-weight="bold" style="opacity: 1;"><text id="49%"><tspan x="0.8076" y="14.8007812">50%</tspan></text></g>
31 <g id="34%" class="118" opacity="1" transform="translate(345.000000, 275.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="34" font-weight="bold" style="opacity: 1;"><text><tspan x="0.5856" y="14.800781">39%</tspan></text></g>
32 <g id="10%" class="116" opacity="1" transform="translate(437.000000, 143.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="22" font-weight="bold" style="opacity: 1;"><text><tspan x="0.2997" y="14.800781">3%</tspan></text></g>
33 <g id="Retired" className="117" opacity={0} transform="translate(76.000000, 308.000000)" fill="#FFFFFF" font-family="Gotham-ExtraLight, Gotham" font-size="11" font-weight="300">
34 <text>
35 <tspan x="0" y="9">{t('pro.Other')}</tspan>
36 </text>
37 </g>
38 <g id="6%" class="117" opacity="1" transform="translate(455.000000, 217.000000)" fill="#221D58" font-family="Gotham-Bold, Gotham" font-size="22" font-weight="700" style="opacity: 1;"><text><tspan x="0.2495" y="14.800781">3%</tspan></text></g>
39 <path className="117" opacity={0} d="M94.4777,289.2349 L94.4777,263.4129" id="Stroke-210" stroke="#FFFFFF" stroke-width="0.5"></path>
40 </g>
41 </g>
42 </svg>
...\ No newline at end of file ...\ No newline at end of file
1 <!DOCTYPE html>
2 <html lang="en">
3
4 <head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7 <meta name="theme-color" content="#000000">
8 <!--
9 manifest.json provides metadata used when your web app is added to the
10 homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
11 -->
12 <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
13 <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
14 <!--
15 Notice the use of %PUBLIC_URL% in the tags above.
16 It will be replaced with the URL of the `public` folder during the build.
17 Only files inside the `public` folder can be referenced from the HTML.
18
19 Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
20 work correctly both with client-side routing and a non-root public URL.
21 Learn how to configure a non-root public URL by running `npm run build`.
22 -->
23 <title>React App</title>
24 </head>
25
26 <body>
27 <noscript>
28 You need to enable JavaScript to run this app.
29 </noscript>
30 <div id="cbv-globe"></div>
31 <!--
32 This HTML file is a template.
33 If you open it directly in the browser, you will see an empty page.
34
35 You can add webfonts, meta tags, or analytics to this file.
36 The build step will place the bundled scripts into the <body> tag.
37
38 To begin the development, run `npm start` or `yarn start`.
39 To create a production bundle, use `npm run build` or `yarn build`.
40 -->
41 </body>
42
43 <script>
44 window.renderProgression(document.getElementById('cbv-globe'));
45 </script>
46
47 </html>
...\ No newline at end of file ...\ No newline at end of file
1 {
2 "short_name": "React App",
3 "name": "Create React App Sample",
4 "icons": [
5 {
6 "src": "favicon.ico",
7 "sizes": "64x64 32x32 24x24 16x16",
8 "type": "image/x-icon"
9 },
10 {
11 "src": "logo192.png",
12 "type": "image/png",
13 "sizes": "192x192"
14 },
15 {
16 "src": "logo512.png",
17 "type": "image/png",
18 "sizes": "512x512"
19 }
20 ],
21 "start_url": ".",
22 "display": "standalone",
23 "theme_color": "#000000",
24 "background_color": "#ffffff"
25 }
1 # https://www.robotstxt.org/robotstxt.html
2 User-agent: *
3 Disallow:
This diff could not be displayed because it is too large.
1 import React, { memo } from "react";
2 import { BarChart, Bar, ResponsiveContainer, LabelList, XAxis, YAxis, Cell } from 'recharts';
3 import { useTranslation, Trans } from 'react-i18next';
4
5 const renderCustomizedLabel = (props) => {
6 const {
7 x, y, width, height, name, fill
8 } = props;
9
10 return (
11 <text x={20} y={y + 35} fill={"#fff"} offset={15} height={55} textAnchor="start">
12 {(name < 900)?name+"*":name}
13 </text>
14 );
15 };
16
17 const CBVBars = ({ data }) => {
18
19 const { t } = useTranslation();
20
21 return (
22 <>
23 <ResponsiveContainer width={'100%'} >
24 <BarChart layout="vertical" data={ data } height={600}>
25 <XAxis type="number" dataKey="value" axisLine={false} tick={false} />
26 <YAxis dataKey="name" type="category" axisLine={false} tick={false}/>
27 <Bar dataKey="value">
28 {
29 data.map((entry, index) => (
30 <Cell x={0} height={55} key={`cell-${index}`} fill={(index % 2 == 0)?"#706B88":"#453E61"} />
31 ))
32 }
33 <LabelList dataKey="name" content={renderCustomizedLabel} />
34 </Bar>
35 </BarChart>
36 </ResponsiveContainer>
37 <small>&nbsp;{t("one-term-only")}</small>
38 </>
39 )
40 }
41
42 export default memo(CBVBars);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { BarChart, Bar, ResponsiveContainer, LabelList, XAxis, YAxis, Cell } from 'recharts';
3 import { useTranslation, Trans } from 'react-i18next';
4
5 const renderCustomizedLabel2021 = (props) => {
6 const {
7 x, y, width, height, name, fill
8 } = props;
9
10 return (
11 <text x={20} y={y + 30} fill={"#fff"} offset={15} height={55} textAnchor="start">
12 {(name < 900)?name+"*":name}
13 </text>
14 );
15 };
16
17 const CBVBars2021 = ({ data }) => {
18
19 const { t } = useTranslation();
20
21 return (
22 <>
23 <ResponsiveContainer width={'100%'} >
24 <BarChart layout="vertical" data={ data } height={600}>
25 <XAxis type="number" dataKey="value" axisLine={false} tick={false} />
26 <YAxis dataKey="name" type="category" axisLine={false} tick={false}/>
27 <Bar dataKey="value">
28 {
29 data.map((entry, index) => (
30 <Cell x={0} height={45} key={`cell-${index}`} fill={(index % 2 == 0)?"#6AC9C8":"#b0e0df"} />
31 ))
32 }
33 <LabelList dataKey="name" content={renderCustomizedLabel2021} />
34 </Bar>
35 </BarChart>
36 </ResponsiveContainer>
37 </>
38 )
39 }
40
41 export default memo(CBVBars2021);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { AreaChart, Area, XAxis, YAxis, Tooltip, ResponsiveContainer } from 'recharts';
3 import { useTranslation, Trans } from 'react-i18next';
4
5 const CustomTooltip = ({ active, payload, label }) => {
6
7 const { t } = useTranslation();
8
9 if (active && payload && payload.length) {
10 return (
11 <div className="custom-tooltip">
12 <p className="label" style={ {'color':'#221d58'} } >{`${label}`}</p>
13 </div>
14 );
15 }
16
17 return null;
18 };
19
20 const GraphChart = ({ data }) => {
21 var first_val = data[0]['name'];
22 var last_val = data[data.length - 1]['name'];
23
24 var ticks = Math.floor(last_val / 500);
25 var tick_array = [];
26 for(var i = 0;i < ticks;++i) {
27 tick_array.push((i+1) * 500);
28 }
29 return (
30 <>
31 <ResponsiveContainer width={'99%'} height={475}>
32 <AreaChart>
33 <defs>
34 <linearGradient id="colorUv" x1="0" y1="0" x2="0" y2="1">
35 <stop offset="0%" stopColor="#b4eded" stopOpacity={1}/>
36 <stop offset="100%" stopColor="#FFFFFF" stopOpacity={0.1}/>
37 </linearGradient>
38 </defs>
39 <XAxis tick={{ fill: '#FFFFFF' }} stroke="#BFBECF" dataKey="name" ticks={[first_val, last_val]} />
40 <YAxis tick={{ fill: '#FFFFFF' }} stroke="#BFBECF" ticks={tick_array} />
41 <Tooltip content={<CustomTooltip />} />
42 <Area dot={false} strokeWidth={2} data={ data } fill="url(#colorUv)" dataKey="value" stroke="#FFFFFF" />
43 </AreaChart></ResponsiveContainer>
44 </>
45 )
46 }
47
48 export default memo(GraphChart);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import {
3 ComposableMap,
4 Geographies,
5 Geography
6 } from "react-simple-maps";
7 import { useTranslation, Trans } from 'react-i18next';
8
9 const geoUrl =
10 // "http://arreport.test/world-110m.json";
11 "https://yearinreview.cbvinstitute.com/world-110m.json";
12
13
14 const MapChart = ({ setTooltipContent, countries }) => {
15
16 const { t } = useTranslation();
17
18 return (
19 <>
20 <ComposableMap data-tip="" projection="geoMercator" >
21 <Geographies geography={geoUrl}>
22 {({ geographies }) =>
23 geographies.map(geo => {
24 var found = false;
25 for(var i = 0;i < countries.length;++i) {
26 for(const cprop in geo.properties) {
27 if(typeof geo.properties[cprop].indexOf == 'function' && geo.properties[cprop].indexOf(countries[i].name) !== -1) {
28 geo.properties.NICENAME = countries[i].name
29 found = true;
30 break;
31 }
32 }
33 }
34
35 var style = {};
36
37 if(found) {
38 style = {
39 default: {
40 fill: "#5CBFBC",
41 outline: "#0F1647",
42 stroke: "#0F1647",
43 strokeWidth: "0.25px"
44 },
45 hover: {
46 fill: "white",
47 outline: "none"
48 }
49 }
50 } else {
51 style = {
52 default: {
53 fill: "#594D78",
54 outline: "none",
55 },
56 hover: {
57 fill: "#594D78",
58 outline: "none"
59 },
60 pressed: {
61 fill: "#594D78",
62 outline: "none"
63 }
64 }
65 }
66
67 return (
68 <Geography
69 key={geo.rsmKey}
70 geography={geo}
71 onMouseEnter={() => {
72 if(found) {
73 const { NICENAME } = geo.properties;
74 setTooltipContent(`${NICENAME}`);
75 }
76 }}
77 onMouseLeave={() => {
78 setTooltipContent("");
79 }}
80 style={style}
81 />
82 ) } )
83 }
84 </Geographies>
85 </ComposableMap>
86 </>
87 );
88 };
89
90 export default memo(MapChart);
1 import React, { memo } from "react";
2 import { Pie, PieChart, Sector, ResponsiveContainer } from 'recharts';
3
4 const renderActiveShape = (props) => {
5
6 const RADIAN = Math.PI / 180;
7 const { cx, cy, midAngle, innerRadius, outerRadius, startAngle, endAngle, fill, payload, percent, value, name, color, font_color } = props;
8 const sin = Math.sin(-RADIAN * midAngle);
9 const cos = Math.cos(-RADIAN * midAngle);
10 const sx = cx + (outerRadius + 10) * cos;
11 const sy = cy + (outerRadius + 10) * sin;
12 const mx = cx + (outerRadius + 30) * cos;
13 const my = cy + (outerRadius + 30) * sin;
14 const ex = mx + (cos >= 0 ? 1 : -1) * 22;
15 const ey = my;
16 const textAnchor = cos >= 0 ? 'start' : 'end';
17
18 return (
19 <g>
20 <Sector
21 cx={cx}
22 cy={cy}
23 innerRadius={innerRadius}
24 outerRadius={outerRadius}
25 startAngle={startAngle}
26 endAngle={endAngle}
27 fill={color}
28 />
29 <Sector
30 cx={cx}
31 cy={cy}
32 startAngle={startAngle}
33 endAngle={endAngle}
34 innerRadius={outerRadius + 6}
35 outerRadius={outerRadius + 10}
36 fill={color}
37 />
38 <path d={`M${sx},${sy}L${mx},${my}L${ex},${ey}`} stroke={color} fill="none" />
39 <circle cx={ex} cy={ey} r={2} fill={color} stroke="none" />
40 <text x={ex + (cos >= 0 ? 1 : -1) * 12} y={ey} style={{fontWeight:'bold'}} textAnchor={textAnchor} fill={font_color}>{`${name}`}</text>
41 <text x={ex + (cos >= 0 ? 1 : -1) * 12} y={ey} dy={18} textAnchor={textAnchor} fill={font_color}>
42 {`${(value)}%`}
43 </text>
44 </g>
45 );
46 };
47
48 const PiChart = ({ data, color }) => {
49 return (
50 <>
51 <ResponsiveContainer width={'100%'} height={300}><PieChart>
52 <Pie
53 activeIndex={Array.from({length: data.length}, (_, i) => (i-1) + 1)}
54 activeShape={renderActiveShape}
55 data={ data } dataKey="value" cx="50%" cy="50%" innerRadius={70} outerRadius={100} fill="#82ca9d" />
56 </PieChart></ResponsiveContainer>
57 </>
58 )
59 }
60
61 export default memo(PiChart);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { useTranslation, Trans } from 'react-i18next';
3
4 const ProgressionChart = (props) => {
5
6 const { t } = useTranslation();
7
8 return (
9 <>
10 <svg width="240px" height="318px" viewBox="0 0 240 318" version="1.1">
11 <title>sectors-2</title>
12 <desc>Created with Sketch.</desc>
13 <defs></defs>
14 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15 <g id="sectors-2">
16 <circle cx="94" cy="102" r="0" data-r="85" id="Fill-115" fill="#A4D6CF" ></circle>
17 <circle cx="78" cy="217" r="0" data-r="31" id="Fill-116" fill="#6BC1BA"></circle>
18 <circle cx="96" cy="265" r="0" data-r="21" id="Fill-117" fill="#A4D6CF"></circle>
19 <circle cx="175" cy="230" r="0" data-r="65" id="Fill-118" fill="#DAEEEB"></circle>
20 <g id="Professional-Valuation-Services" className="115" opacity={0} transform="translate(41.000000, 83.000000)" fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="18" font-weight="300">
21 <text id="Professional-Valuati">
22 <tspan x="0.273" y="14">{t('pro.professional')}</tspan>
23 <tspan x={t('pro.valuation.x')} y="35.6000073">{t('pro.Valuation')}</tspan>
24 <tspan x={t('pro.services.x')} y="57.2000146">{t('pro.Services')}</tspan>
25 </text>
26 </g>
27 <g id="Financial-Services" className="118" opacity={0} transform="translate(117.000000, 224.000000)" fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="13" font-weight="300">
28 <text>
29 <tspan x="0.677" y="10">{t('pro.Financial Services')}</tspan>
30 <tspan x="17.395" y="25.6000053">{t('pro.Industry')}</tspan>
31 <tspan x="18.5585" y="41.2000105">{t('pro.Government')}</tspan>
32 </text>
33 </g>
34 <g id="Other" className="116" opacity={0} transform="translate(59.000000, 224.000000)" fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="12" font-weight="300">
35 <text>
36 <tspan x="0.802" y="10">{t('pro.Other')}</tspan>
37 </text>
38 </g>
39 <g id="50%" className="115" opacity={0} transform="translate(73.000000, 58.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
40 <text id="49%">
41 <tspan x="0.8076" y="14.8007812">49%</tspan>
42 </text>
43 </g>
44 <g id="34%" className="118" opacity={0} transform="translate(154.000000, 201.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
45 <text>
46 <tspan x="0.5856" y="14.800781">36%</tspan>
47 </text>
48 </g>
49 <g id="10%" className="116" opacity={0} transform="translate(59.000000, 204.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
50 <text>
51 <tspan x="0.2997" y="14.800781">9%</tspan>
52 </text>
53 </g>
54 <g id="Retired" className="117" opacity={0} transform="translate(76.000000, 308.000000)" fill="#FFFFFF" font-family="Gotham-ExtraLight, Gotham" font-size="11" font-weight="300">
55 <text>
56 <tspan x="0" y="9">{t('pro.Retired')}</tspan>
57 </text>
58 </g>
59 <g id="6%" className="117" opacity={0} transform="translate(81.000000, 288.000000)" fill="#FFFFFF" font-family="Gotham-Medium, Gotham" font-size="18" font-weight="400">
60 <text>
61 <tspan x="0.2495" y="14.800781">6%</tspan>
62 </text>
63 </g>
64 <path className="117" opacity={0} d="M94.4777,289.2349 L94.4777,263.4129" id="Stroke-210" stroke="#FFFFFF" stroke-width="0.5"></path>
65 </g>
66 </g>
67 </svg>
68 </>
69 )
70 }
71
72 export default memo(ProgressionChart);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { useTranslation, Trans } from 'react-i18next';
3
4 const ProgressionChart2021 = () => {
5
6 const { t } = useTranslation();
7
8 return (
9 <>
10 <svg width="240px" height="318px" viewBox="0 0 240 318" version="1.1">
11 <title>sectors-2</title>
12 <desc>Created with Sketch.</desc>
13 <defs></defs>
14 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15 <g id="sectors-2">
16 <circle cx="94" cy="102" r="0" data-r="85" id="Fill-115" fill="#A4D6CF" ></circle>
17 <circle cx="78" cy="217" r="0" data-r="31" id="Fill-116" fill="#6BC1BA"></circle>
18 <circle cx="96" cy="265" r="0" data-r="21" id="Fill-117" fill="#A4D6CF"></circle>
19 <circle cx="175" cy="230" r="0" data-r="65" id="Fill-118" fill="#DAEEEB"></circle>
20 <g id="Professional-Valuation-Services" className="115" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(50.000000, 83.000000)" : "translate(50.000000, 83.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="18" font-weight="300">
21 <text id="Professional-Valuati">
22 <tspan x="0.273" y="14">{t('pro.professional')}</tspan>
23 <tspan x={t('pro.valuation.x')} y="35.6000073">{t('pro.Valuation')}</tspan>
24 <tspan x={t('pro.services.x')} y="57.2000146">{t('pro.Services')}</tspan>
25 </text>
26 </g>
27 <g id="Financial-Services" className="118" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(125.000000, 224.000000)" : "translate(125.000000, 224.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="13" font-weight="300">
28 <text>
29 <tspan x="0.677" y="10">{t('pro.Financial Services')}</tspan>
30 <tspan x="17.395" y="25.6000053">{t('pro.Industry')}</tspan>
31 <tspan x="18.5585" y="41.2000105">{t('pro.Government')}</tspan>
32 </text>
33 </g>
34 <g id="Other" className="116" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(55.000000, 224.000000)" : "translate(63.000000, 224.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="10" font-weight="300">
35 <text>
36 <tspan x="0.802" y="10">{t('pro.Retired')}</tspan>
37 </text>
38 </g>
39 <g id="50%" className="115" opacity={0} transform="translate(73.000000, 58.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
40 <text id="49%">
41 <tspan x="0.8076" y="14.8007812">50%</tspan>
42 </text>
43 </g>
44 <g id="34%" className="118" opacity={0} transform="translate(154.000000, 201.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
45 <text>
46 <tspan x="0.5856" y="14.800781">39%</tspan>
47 </text>
48 </g>
49 <g id="10%" className="116" opacity={0} transform="translate(66.000000, 204.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="18" font-weight="bold">
50 <text>
51 <tspan x="0.2997" y="14.800781">7%</tspan>
52 </text>
53 </g>
54 <g id="Retired" className="117" opacity={0} transform="translate(76.000000, 308.000000)" fill="#FFFFFF" font-family="Gotham-ExtraLight, Gotham" font-size="11" font-weight="300">
55 <text>
56 <tspan x="0" y="9">{t('pro.Other')}</tspan>
57 </text>
58 </g>
59 <g id="6%" className="117" opacity={0} transform="translate(81.000000, 288.000000)" fill="#FFFFFF" font-family="Gotham-Medium, Gotham" font-size="18" font-weight="400">
60 <text>
61 <tspan x="0.2495" y="14.800781">4%</tspan>
62 </text>
63 </g>
64 <path className="117" opacity={0} d="M94.4777,289.2349 L94.4777,263.4129" id="Stroke-210" stroke="#FFFFFF" stroke-width="0.5"></path>
65 </g>
66 </g>
67 </svg>
68 </>
69 )
70 }
71
72 export default memo(ProgressionChart2021);
...\ No newline at end of file ...\ No newline at end of file
1 import React, { memo } from "react";
2 import { useTranslation, Trans } from 'react-i18next';
3
4 const ProgressionChart2022 = () => {
5
6 const { t } = useTranslation();
7
8 return (
9 <>
10 <svg width="1024px" height="400px" viewBox="0 0 1024 400" version="1.1">
11 <title>sectors-2</title>
12 <desc>Created with Sketch.</desc>
13 <defs></defs>
14 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15 <g id="sectors-2">
16 <circle cx="450" cy="152" r="15" data-r="15" id="Fill-115" fill="#A4D6CF"></circle>
17 <circle cx="570" cy="165" r="6" data-r="6" id="Fill-116" fill="#6BC1BA"></circle>
18 <circle cx="600" cy="225" r="6" data-r="6" id="Fill-117" fill="#A4D6CF"></circle>
19 <circle cx="505" cy="270" r="10" data-r="10" id="Fill-118" fill="#DAEEEB"></circle>
20 <g id="Professional-Valuation-Services" className="115" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(0.000000, 160.000000)" : "translate(30.000000, 160.000000)" } fill="#1B193F" font-family="Gotham-Book, Gotham" font-size="18" font-weight="300">
21 <text id="Professional-Valuati">
22 <tspan x="0" y="0">{t('pro.professional')}</tspan>
23 <tspan x={document.documentElement.lang === "fr-FR" ? "78" : "115" } y="0">{t('pro.Valuation')}</tspan>
24 <tspan x={document.documentElement.lang === "fr-FR" ? "210" : "205" } y="0">{t('pro.Services')}</tspan>
25 </text>
26 </g>
27 <g id="Financial-Services" className="118" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(175.000000, 262.000000)" : "translate(175.000000, 262.000000)" } fill="#1B193F" font-family="Gotham-Book, Gotham" font-size="17" font-weight="300">
28 <text>
29 <tspan x={document.documentElement.lang === "fr-FR" ? "50" : "0" } y="0">{t('pro.Financial Services')}</tspan>
30 <tspan x="85" y="25">{t('pro.Government')}</tspan>
31 </text>
32 </g>
33 <g id="Other" className="116" opacity={0} transform={document.documentElement.lang === "fr-FR" ? "translate(710.000000, 218.000000)" : "translate(710.000000, 218.000000)" } fill="#1B193F" font-family="Gotham-ExtraLight, Gotham" font-size="16" font-weight="300">
34 <text>
35 <tspan x="0.802" y="10">{t('pro.Retired')}</tspan>
36 </text>
37 </g>
38 <g id="50%" class="115" opacity={0} transform="translate(415.000000, 165.000000)" fill="#221D58" font-family="Gotham-Bold, Gotham" font-size="36" font-weight="bold"><text id="49%"><tspan x="0" y="0">52%</tspan></text></g>
39 <g id="34%" class="118" opacity={0} transform="translate(470, 265)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="34" font-weight="bold"><text><tspan x="0.5856" y="14.800781">41%</tspan></text></g>
40 <g id="10%" class="116" opacity={0} transform="translate(557.000000, 158.000000)" fill="#1B193F" font-family="Gotham-Bold, Gotham" font-size="22" font-weight="bold"><text><tspan x="0.2997" y="14.800781">4%</tspan></text></g>
41 <g id="Retired" className="117" opacity={0} transform="translate(695.000000, 160.000000)" fill="#FFFFFF" font-family="Gotham-Bold, Gotham" font-size="16" font-weight="300">
42 <text>
43 <tspan x="0" y="9">{t('pro.Other')}</tspan>
44 </text>
45 </g>
46 <g id="6%" class="117" opacity={0} transform="translate(585.000000, 218.000000)" fill="#221D58" font-family="Gotham-Bold, Gotham" font-size="22" font-weight="700"><text><tspan x="0.2495" y="14.800781">3%</tspan></text></g>
47 <path class="115-line" opacity={0} d="M320,155 L390,155" id="Stroke-210" stroke="#AED5CF" stroke-width="1.5"></path>
48 <path class="118-line" opacity={0} d="M410,270 L460,270" id="Stroke-210" stroke="#DEEDEB" stroke-width="1.5"></path>
49 <path class="116-line" opacity={0} d="M680,165 L595,165" id="Stroke-210" stroke="#7FBFBA" stroke-width="1.5"></path>
50 <path class="117-line" opacity={0} d="M700,225 L625,225" id="Stroke-210" stroke="#AED5CF" stroke-width="1.5"></path>
51 </g>
52 </g>
53 </svg>
54 </>
55 )
56 }
57
58 export default memo(ProgressionChart2022);
...\ No newline at end of file ...\ No newline at end of file
1 import i18n from 'i18next';
2 import { initReactI18next } from 'react-i18next';
3 import LanguageDetector from 'i18next-browser-languagedetector';
4
5
6 i18n
7 // detect user language
8 // learn more: https://github.com/i18next/i18next-browser-languageDetector
9 .use(LanguageDetector)
10 // pass the i18n instance to react-i18next.
11 .use(initReactI18next)
12 // init i18next
13 // for all options read: https://www.i18next.com/overview/configuration-options
14 .init({
15 detection: {
16 order: ['querystring'],
17 "lookupQuerystring": 'lang',
18 lookupCookie: '',
19 lookupLocalStorage: '',
20 lookupSessionStorage: '',
21 caches: [],
22 },
23 debug: false,
24 fallbackLng: 'en',
25 interpolation: {
26 escapeValue: false, // not needed for react as it escapes by default
27 },
28 resources: {
29 en: {
30 translation: {
31 "one-term-only":"* ONE TERM ONLY",
32 "pro.valuation.x":"11.991",
33 "pro.services.x":"16.401",
34 "pro.professional":"Professional",
35 "pro.Valuation":"Valuation",
36 "pro.Services":"Services",
37 "pro.Financial Services":"Financial Services, Industry",
38 "pro.Industry":"Industry",
39 "pro.Government":"and Government",
40 "pro.Retired":"Retired",
41 "charts.members":"Members",
42 "pro.Other":"Other",
43 }
44 },
45 fr: {
46 translation: {
47 "pro.valuation.x":"0",
48 "pro.services.x":"0",
49 "one-term-only":"*UN TRIMESTRE SEULEMENT",
50 "pro.professional":"Services",
51 "pro.Valuation":"professionnels",
52 "pro.Services":"d’évaluation",
53 "pro.Financial Services":"Services financiers,",
54 "pro.Industry":"industrie, et",
55 "pro.Government":"gouvernement",
56 "pro.Retired":"À la retraite",
57 "charts.members":"Membres",
58 "pro.Other":"Autres",
59 }
60 }
61 }
62 });
63
64 export default i18n;
...\ No newline at end of file ...\ No newline at end of file
1 import React, { useState } from "react";
2 import ReactDOM from "react-dom";
3 import ReactTooltip from "react-tooltip";
4
5 import './i18n';
6 import MapChart from "./MapChart";
7 import GraphChart from "./GraphChart";
8 import PiChart from './PiChart';
9 import CBVBars from './BarChart';
10 import ProgressionChart from './ProgressionChart';
11 import ProgressionChart2021 from './ProgressionChart2021';
12 import ProgressionChart2022 from './ProgressionChart2022';
13 import CBVBars2021 from './BarChart2021';
14
15 function CBVGlobe(props) {
16 const [content, setContent] = useState("");
17 const [countries] = useState(props.countries);
18 return (
19 <div>
20 <MapChart setTooltipContent={setContent} countries={countries} />
21 <ReactTooltip backgroundColor="#715f8a" textColor="white">{content}</ReactTooltip>
22 </div>
23 );
24 }
25
26 window.renderGlobe = (el) => {
27 ReactDOM.render(<CBVGlobe countries={JSON.parse(el.dataset.countries)} />, el);
28 }
29
30
31 function CBVGraph(props) {
32 const [data] = useState(props.data);
33 return (
34 <div>
35 <GraphChart data={data} />
36 </div>
37 );
38 }
39
40 window.renderGraph = (el) => {
41 ReactDOM.render(<CBVGraph data={JSON.parse(el.dataset.points)} />, el);
42 }
43
44 function CBVPI(props) {
45 const [data] = useState(props.data);
46 const [color] = useState(props.color);
47 return (
48 <PiChart data={data} color={color} />
49 );
50 }
51
52 window.renderPI = (el) => {
53 ReactDOM.render(<CBVPI color={el.dataset.color} data={JSON.parse(el.dataset.points)} />, el);
54 }
55
56 function CBVBarChart2021(props) {
57 const [data] = useState(props.data);
58 return (
59 <CBVBars2021 data={data} />
60 );
61 }
62
63 window.renderBarChart2021 = (el) => {
64 ReactDOM.render(<CBVBarChart2021 data={JSON.parse(el.dataset.points)} />, el);
65 }
66
67 function CBVBarChart(props) {
68 const [data] = useState(props.data);
69 return (
70 <CBVBars data={data} />
71 );
72 }
73
74 window.renderBarChart = (el) => {
75 ReactDOM.render(<CBVBarChart data={JSON.parse(el.dataset.points)} />, el);
76 }
77
78 function CBVProgression(props) {
79 return (
80 <ProgressionChart />
81 );
82 }
83
84 window.renderProgression = (el) => {
85 ReactDOM.render(<CBVProgression />, el);
86 }
87
88 function CBVProgression2021(props) {
89 return (
90 <ProgressionChart2021 />
91 );
92 }
93
94 window.renderProgression2021 = (el) => {
95 ReactDOM.render(<CBVProgression2021 />, el);
96 }
97
98 function CBVProgression2022(props) {
99 return (
100 <ProgressionChart2022 />
101 );
102 }
103
104 window.renderProgression2022 = (el) => {
105 ReactDOM.render(<CBVProgression2022 />, el);
106 }
...\ No newline at end of file ...\ No newline at end of file
...@@ -19,13 +19,6 @@ if( function_exists('acf_add_options_page') ) { ...@@ -19,13 +19,6 @@ if( function_exists('acf_add_options_page') ) {
19 19
20 20
21 acf_register_block_type( array( 21 acf_register_block_type( array(
22 'title' => __( 'MSF PI Chart', 'client_textdomain' ),
23 'name' => 'msf-pi',
24 'render_template' => 'blocks/msf-PI/msf-PI.php',
25 'mode' => 'edit'
26 ));
27
28 acf_register_block_type( array(
29 'title' => __( 'Promo Area', 'client_textdomain' ), 22 'title' => __( 'Promo Area', 'client_textdomain' ),
30 'name' => 'msf-promo-area', 23 'name' => 'msf-promo-area',
31 'render_template' => 'blocks/promo-area/promo-area.php', 24 'render_template' => 'blocks/promo-area/promo-area.php',
...@@ -38,46 +31,20 @@ if( function_exists('acf_add_options_page') ) { ...@@ -38,46 +31,20 @@ if( function_exists('acf_add_options_page') ) {
38 'mode' => 'edit' 31 'mode' => 'edit'
39 )); 32 ));
40 33
41
42
43 acf_register_block(array( 34 acf_register_block(array(
44 'name' => 'call-out-block', 35 'name' => 'call-out-block',
45 'title' => __('Call Out Block'), 36 'title' => __('Call Out Block'),
46 'description' => __('A custom block for Call Out Block items.'), 37 'description' => __('A custom block for Call Out Block items.'),
47 'render_template' => 'blocks/call-out-block/call-out-block.php', 38 'render_template' => 'blocks/call-out-block/call-out-block.php',
48 'category' => 'layout',
49 'icon' => 'excerpt-view',
50 'mode' => 'edit', 39 'mode' => 'edit',
51 'supports' => [
52 'align' => false,
53 'anchor' => true,
54 'customClassName' => true
55 ]
56 )); 40 ));
57 41
58 42
59 acf_register_block_type( array( 43 acf_register_block_type( array(
60 'title' => __( 'Carousel', 'client_textdomain' ),
61 'name' => 'carousel',
62 'render_template' => 'blocks/carousel/carousel.php',
63 'mode' => 'edit',
64 'supports' => [
65 'align' => false,
66 'anchor' => true,
67 'customClassName' => true
68 ]
69 ));
70
71 acf_register_block_type( array(
72 'title' => __( 'Mixed Carousel', 'client_textdomain' ), 44 'title' => __( 'Mixed Carousel', 'client_textdomain' ),
73 'name' => 'carouse-mixed', 45 'name' => 'carouse-mixed',
74 'render_template' => 'blocks/carousel-mixed/carousel.php', 46 'render_template' => 'blocks/carousel-mixed/carousel.php',
75 'mode' => 'edit', 47 'mode' => 'edit',
76 'supports' => [
77 'align' => false,
78 'anchor' => true,
79 'customClassName' => true
80 ]
81 )); 48 ));
82 49
83 acf_register_block_type( array( 50 acf_register_block_type( array(
...@@ -85,11 +52,6 @@ if( function_exists('acf_add_options_page') ) { ...@@ -85,11 +52,6 @@ if( function_exists('acf_add_options_page') ) {
85 'name' => 'relevant-resources', 52 'name' => 'relevant-resources',
86 'render_template' => 'blocks/relevant-resources/relevant-resources.php', 53 'render_template' => 'blocks/relevant-resources/relevant-resources.php',
87 'mode' => 'edit', 54 'mode' => 'edit',
88 'supports' => [
89 'align' => false,
90 'anchor' => true,
91 'customClassName' => true
92 ]
93 )); 55 ));
94 56
95 acf_register_block_type( array( 57 acf_register_block_type( array(
...@@ -97,11 +59,6 @@ if( function_exists('acf_add_options_page') ) { ...@@ -97,11 +59,6 @@ if( function_exists('acf_add_options_page') ) {
97 'name' => 'post-list-load-more', 59 'name' => 'post-list-load-more',
98 'render_template' => 'blocks/post-list-load-more/post-list-load-more.php', 60 'render_template' => 'blocks/post-list-load-more/post-list-load-more.php',
99 'mode' => 'edit', 61 'mode' => 'edit',
100 'supports' => [
101 'align' => false,
102 'anchor' => true,
103 'customClassName' => true
104 ]
105 )); 62 ));
106 63
107 } 64 }
...\ No newline at end of file ...\ No newline at end of file
......