diff --git a/css/data_explorer.css b/css/data_explorer.css index c08be25..6bd865a 100644 --- a/css/data_explorer.css +++ b/css/data_explorer.css @@ -133,7 +133,8 @@ /*Limited data message box */ .div_dataLimited { - background-color: #f0f0f1; + background-color: #f5cccb; + color:#856162; padding: 3px 15px; margin: 15px 0 5px 0; border-radius: 6px; diff --git a/de/asset-manifest.json b/de/asset-manifest.json index e3bc82e..a2876ab 100644 --- a/de/asset-manifest.json +++ b/de/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "/static/css/main.cf1d91ad.chunk.css", - "main.js": "/static/js/main.6dc7960f.chunk.js", - "main.js.map": "/static/js/main.6dc7960f.chunk.js.map", + "main.js": "/static/js/main.3dabd794.chunk.js", + "main.js.map": "/static/js/main.3dabd794.chunk.js.map", "runtime~main.js": "/static/js/runtime~main.a8a9905a.js", "runtime~main.js.map": "/static/js/runtime~main.a8a9905a.js.map", "static/css/2.b4c733d1.chunk.css": "/static/css/2.b4c733d1.chunk.css", "static/js/2.dd424e18.chunk.js": "/static/js/2.dd424e18.chunk.js", "static/js/2.dd424e18.chunk.js.map": "/static/js/2.dd424e18.chunk.js.map", "index.html": "/index.html", - "precache-manifest.549d819ee7b0e2695f1481e575a3c212.js": "/precache-manifest.549d819ee7b0e2695f1481e575a3c212.js", + "precache-manifest.fbb2990cfdcdaef20bd91947c21925a1.js": "/precache-manifest.fbb2990cfdcdaef20bd91947c21925a1.js", "service-worker.js": "/service-worker.js", "static/css/2.b4c733d1.chunk.css.map": "/static/css/2.b4c733d1.chunk.css.map", "static/css/main.cf1d91ad.chunk.css.map": "/static/css/main.cf1d91ad.chunk.css.map", diff --git a/de/index.html b/de/index.html index 3c6545c..d5b67dd 100644 --- a/de/index.html +++ b/de/index.html @@ -21,4 +21,4 @@ }; document.getElementById('root').addEventListener('unicef_dataflowLoaded', event => console.log('unicef_dataflowLoaded event dispatched', event.detail), - ); \ No newline at end of file + ); \ No newline at end of file diff --git a/de/precache-manifest.549d819ee7b0e2695f1481e575a3c212.js b/de/precache-manifest.fbb2990cfdcdaef20bd91947c21925a1.js similarity index 89% rename from de/precache-manifest.549d819ee7b0e2695f1481e575a3c212.js rename to de/precache-manifest.fbb2990cfdcdaef20bd91947c21925a1.js index 0df0ed8..db7effb 100644 --- a/de/precache-manifest.549d819ee7b0e2695f1481e575a3c212.js +++ b/de/precache-manifest.fbb2990cfdcdaef20bd91947c21925a1.js @@ -1,6 +1,6 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "b2b85503ed63e146ef8d13864486e711", + "revision": "a533cf230647c48a9389893e183ab7a0", "url": "/index.html" }, { @@ -8,7 +8,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/static/css/2.b4c733d1.chunk.css" }, { - "revision": "6e335125a0f236de0a9b", + "revision": "b0f1c66c47e07ee3dcf0", "url": "/static/css/main.cf1d91ad.chunk.css" }, { @@ -16,8 +16,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/static/js/2.dd424e18.chunk.js" }, { - "revision": "6e335125a0f236de0a9b", - "url": "/static/js/main.6dc7960f.chunk.js" + "revision": "b0f1c66c47e07ee3dcf0", + "url": "/static/js/main.3dabd794.chunk.js" }, { "revision": "42ac5946195a7306e2a5", diff --git a/de/service-worker.js b/de/service-worker.js index 419f9a4..413725d 100644 --- a/de/service-worker.js +++ b/de/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "/precache-manifest.549d819ee7b0e2695f1481e575a3c212.js" + "/precache-manifest.fbb2990cfdcdaef20bd91947c21925a1.js" ); self.addEventListener('message', (event) => { diff --git a/de/static/js/main.3dabd794.chunk.js b/de/static/js/main.3dabd794.chunk.js new file mode 100644 index 0000000..fd126da --- /dev/null +++ b/de/static/js/main.3dabd794.chunk.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{2083:function(e,a,t){},2086:function(e,a,t){"use strict";t.r(a);var n=t(0),r=t.n(n),o=t(20),i=t(52),s=(t(321),t(115)),c=t.n(s),l=t(585),d=t(264),u=t(406),m=t(407),p=t(19),f=t(920),b=t.n(f),v=function(e){var a=e.localeId,t=e.messages,n=e.children;return r.a.createElement(p.b,{locale:a,key:a,messages:t[a]},r.a.Children.only(n))},g=function(e){return"".concat(e,"/").concat(e)},y=t(153),h=t(408),E=t(586),w=t(410),j=t(411),O=function(e,a){return{type:"@@app/SET_PENDING",payload:{id:e,is:a}}},I=t(65),S=t(179),D=t(55),x=t(662),C=t(590),A=t(420),N=t(178),T=t(661),L=t(655),F=t(102),R=t(685),k=t(433),_=t(176),G=t(678),P=t(671),B=t(413),H=t(668),q=t(414),M=t(415),U=t(421),V=t(591),z=t(683),X=t(69),W=t(268),Y=t(917),K=t(684),Q=t(687),$=t(269),J=t(672),Z=t(670),ee=t(690),ae=t(428),te=t(665),ne=t(423),re=t(272),oe=t(57),ie=t(270),se=t(921),ce=t.n(se),le=t(589),de=t(412),ue=t(416),me=le.a({},"sdmx",window.SETTINGS),pe=_.a(d.a)(d.a("datasources",me)),fe=d.a("range",me),be=F.a(["period","default"],me),ve=de.a([],["period","boundaries"],me),ge={min:q.a(ve),max:M.a(ve)},ye=function(e){return k.a(de.a([],["attributes",e]),C.a(ue.a(Array),N.a,_.a(V.a)([])))(me)},he=le.a({},"chart",window.SETTINGS),Ee=d.a("options",he),we=F.a(["unicef","indicatorProfileUrl"],window.SETTINGS),je=t(71),Oe=t(156),Ie=t(89),Se=t(916),De=t(658),xe=t(657),Ce=t(677),Ae=t(915),Ne=t(177),Te=t(128),Le=t(659),Fe=t(660),Re=t(654),ke=t(686),_e=t(924),Ge=t.n(_e),Pe=Le.a(ue.a(Number),Fe.a(D.a(NaN))),Be=function(e){var a=e.index,t=e.id,n=e.annotations,r=e.selection;return ne.a(Z.a(r),u.a(r))?C.a(Z.a,Re.a,k.a(Ae.a(K.a("type","DEFAULT")),Boolean))(n):!!d.a(Ge()("".concat(a).concat(t)))(r)},He=function(e){var a=k.a(de.a([],["meta","content-languages"]),q.a)(e),t=k.a(de.a([],["data","dataStructures"]),q.a,de.a([],["dataStructureComponents","dimensionList","dimensions"]))(e),n=de.a([],["data","conceptSchemes"])(e);if(Se.a(De.a([u.a,Z.a]))([a,t,n]))return{dimensions:[],dataflow:{}};var r=de.a([],["data","codelists"])(e),o=function(e){return k.a(de.a("",["name",a]),C.a(Z.a,S.a("[".concat(e,"]")),N.a))},i=k.a(de.a([],["data","dataflows"]),q.a,z.a(["id","version","agencyID","name"]),function(e){var a=e.id,t=e.agencyID,n=Object(Ie.a)(e,["id","agencyID"]);return Object(I.a)({},n,{code:a,agencyId:t,name:o(a)(n)})});return{dimensions:xe.a(X.a)(function(e,t,i){var s=le.a(null,"conceptIdentity");if(u.a(s(t)))return e;var c=s(t),l=Ce.a(/[^urn:sdmx:org.sdmx.infomodel][^.|=]+/g);if(Z.a(l(c)))return e;var m=l(c),p=M.a(m),f=Ae.a(function(e){var a=e.agencyID,t=e.id,n=e.version,r=Ce.a(/=(.*\))/),o=Ne.a(q.a(r(c)));return"".concat(a,":").concat(t,"(").concat(n,")")===o})(n),b=le.a(null,"concepts");if(u.a(b(f)))return e;var v=b(f),g=Ae.a(K.a("id",p));if(u.a(g(v)))return e;var y=g(v),h=le.a(null,"id");if(u.a(h(t)))return e;var E=h(t),w=de.a(null,["localRepresentation","enumeration"]);if(u.a(w(t)))return[];var j=w(t),O=Te.a(1)(l(j)),D=Ae.a(function(e){var a=e.agencyID,t=e.id,n=e.version,r=Ce.a(/=(.*\))/),o=Ne.a(q.a(r(j)));return"".concat(a,":").concat(t,"(").concat(n,")")===o&&"Codelist"===O});if(Z.a(r)||Z.a(le.a([],"codes")(D(r))))return e;var x=function(e){return ke.a(k.a(le.a([],"annotations"),Ae.a(K.a("type","ORDER")),d.a("text"),le.a(0,e),Number,C.a(Pe,N.a,S.a(0))))}(a)(le.a([],"codes")(D(r))),A={id:E,index:i,roles:u.a(t.conceptRoles)?[]:t.conceptRoles,values:function(e){return oe.a(function(a){var t=a.id,n=a.parent,r=a.name,i=a.annotations;return{id:t,parentId:n,isDefaultSelected:Be({index:e,id:t,annotations:void 0===i?[]:i}),label:o(t)({name:r})}})}(i)(x)};return[].concat(Object(Oe.a)(e),[Object(I.a)({},A,{label:o(A.id)(y)})])},[],t),dataflow:i(e)}},qe=function(e){var a=e.type;return function(e){var t=e.configArgs;if(A.a(H.a(a,["structure","data"])))throw new Error("Invalid type: type=".concat(a));var n=d.a("dataflow",t),r=n.datasourceId,o=n.dataflowId,i=n.agencyId,s=n.version,c=pe(r);if(u.a(c))throw new Error("Datasource undefined: datasourceId=".concat(r));var l=D.a(a,"structure"),m=l?"dataflow":"data",p=P.a(l?"/":",",[i,o,B.a("latest",s)]),f=l?"":"/".concat(B.a("all",d.a("dataquery",t)));return{url:"".concat(d.a("url",c),"/").concat(m,"/").concat(p).concat(f),datasource:c}}},Me=function(e){var a=e.configArgs,t=e.requestArgs,n=d.a("period",t),r=d.a("url",qe({type:"data"})({configArgs:a})),o=ce.a.stringify({startPeriod:q.a(n),endPeriod:M.a(n)},{addQueryPrefix:!0});return"".concat(r).concat(o)},Ue=k.a(U.a(V.a,[k.a(d.a("dataquery"),C.a(u.a,S.a("all"),N.a)),k.a(d.a("dataflow"),z.a(["datasourceId","dataflowId","agencyId","version"]),m.a)]),P.a("_")),Ve=k.a(ae.a,_.a(te.a)(1)),ze=k.a(re.a(function(e){return ne.a(je.rules.isTimeDimension(d.a("id")(e)),Ve(d.a("values")(e)))}),oe.a(d.a("id"))),Xe=function(e,a){return k.a(W.a(a),ie.a)(e)},We=t(16),Ye=t(129),Ke=t(673),Qe=t(175),$e=t(429),Je=t(674),Ze=t(580),ea=t.n(Ze),aa=t(155),ta=t(444),na=t(267),ra=t(58),oa=(t(675),t(682)),ia=t(656),sa=(t(430),t(688)),ca=(t(664),t(422),t(17)),la=(na.a(function(e,a){return X.a(function(t,n){return Qe.a(e[n]||n,a[n],t)},{},ra.a(a))}),Le.a(ue.a(Number),Fe.a(D.a(NaN))),xe.a(oe.a)(function(e,a){return Qe.a("index",a)(e)})),da={label:je.rules.dimensionValueDisplay("label"),code:je.rules.dimensionValueDisplay("code"),both:je.rules.dimensionValueDisplay("both")},ua=d.a("vis"),ma=Object(We.a)(ua,k.a(d.a("period"),C.a(k.a(ae.a,D.a(2)),N.a,S.a(be)))),pa=Object(We.a)(ua,d.a("viewer")),fa=Object(We.a)(ua,d.a("action")),ba=Object(We.a)(ua,d.a("display")),va=Object(We.a)(ua,d.a("filter")),ga=Object(We.a)(ua,d.a("dataflow")),ya=Object(We.a)(ua,d.a("dataquery")),ha=Object(We.a)(ua,d.a("isFullscreen")),Ea=Object(We.a)(ua,d.a("timeDimensionInverted")),wa=Object(We.a)(ua,d.a("layout")),ja=Object(We.a)(ua,d.a("dimensionGetter")),Oa=Object(We.a)(ja,_.a(d.a)(da)),Ia=d.a("sdmx"),Sa=Object(We.a)(Ia,d.a("dimensions")),Da=Object(We.a)(Ia,d.a("data")),xa=Object(We.a)(Ia,d.a("layout")),Ca=Object(We.a)(ya,Sa,function(e,a){return A.a(De.a([Z.a,u.a])(e))?e:k.a(oe.a(k.a(d.a("values"),re.a(K.a("isDefaultSelected",!0)),Ye.a("id"),P.a("+"))),P.a("."))(a)}),Aa=Object(We.a)(Da,Oa,function(e,a){var t=new ea.a(ye("flags")),n=de.a([],["structure","attributes","observation"])(e);return xe.a(X.a)(function(e,n,r){var o=n.id,i=n.name,s=n.values,c=Object(Ie.a)(n,["id","name","values"]),l=Object(I.a)({},c,{id:o,values:s,index:r,isFootnote:!0,label:a({id:o,name:i})});return t.has(o)?R.a(Ke.a(["flags",r]),l,e):H.a(o,ye("decimals"))?Qe.a("decimals",l,e):k.a(ae.a,D.a(1))(s)?h.a(E.a("footnotes"),V.a(l),e):k.a(Z.a,A.a)(s)?R.a(Ke.a(["flags",r]),l,e):e},{flags:{},footnotes:[]})(n)}),Na=Object(We.a)(Sa,Ca,k.a($e.a(function(e,a){return xe.a(oe.a)(function(e,t){if(k.a(Te.a(t),Z.a)(a))return e;if(k.a(Te.a(t),u.a)(a))return e;var n=new ea.a(k.a(Te.a(t),Q.a("+"))(a));return h.a(E.a("values"),oe.a(C.a(function(e){var a=e.id;return n.has(a)},Qe.a("isSelected",!0),N.a)),e)},e)},[N.a,Q.a(".")]),re.a(k.a(d.a("values"),ae.a,Je.a(1))))),Ta=Object(We.a)(Na,k.a(oe.a(h.a(E.a("values"),re.a(K.a("isSelected",!0)))),re.a(k.a(d.a("values"),ae.a,_.a(te.a)(0))))),La=function(e){return{type:"@@vis/CHANGE_VIEWER",payload:{viewerId:e}}},Fa=function(e){return{type:"@@vis/CHANGE_ACTION",payload:{actionId:e}}},Ra=function(e){return{type:"@@vis/sdmx/CHANGE_DATAFLOW",payload:{dataflow:e}}},ka=function(e,a){return function(t,n){return t({type:"@@vis/sdmx/CHANGE_DATAQUERY",payload:{filterId:e,valueId:a,dimensions:Sa(n())}})}},_a=t(667),Ga=d.a("app"),Pa=Object(We.a)(Ga,d.a("locale")),Ba=Object(We.a)(Ga,d.a("pending")),Ha=function(e){return Object(We.a)(Ba,k.a(d.a(e),D.a(!0)))},qa=Object(We.a)(Pa,K.a("isRtl",!0)),Ma=t(680),Ua=t(217),Va=t(449),za=t.n(Va),Xa=t(930),Wa=t.n(Xa);var Ya=function(e){var a={};return e.forEach(function(e){a[e.locale]=e.value}),a},Ka=function(e,a,t){e[a]&&(e[t]=e[a],delete e[a])},Qa=function(e,a,t){return[{rel:e,urn:a,type:t}]},$a=function(e,a){if(null==e)return null;var t={};return t[a]=e,t},Ja=function(e,a){e&&e.forEach(function(e){!function(e,a){e.name=$a(e.name,a),e.roles=[e.id],e.values&&e.values.forEach(function(e){e.name=$a(e.name,a)})}(e,a)})},Za=de.a("en",["locale","id"]),et={getStructure:function(e){var a=e.configArgs,t="FUSION"==d.a("backendId",a.dataflow)?function(e){var a=e.configArgs,t=d.a("dataflow",a),n=t.datasourceId,r=t.dataflowId,o=t.agencyId,i=t.version,s=pe(n);if(u.a(s))throw new Error("Datasource undefined: datasourceId=".concat(n));var c=P.a(",",[o,r,B.a("latest",i)]);return{url:"".concat(d.a("url",s),"/availableconstraint/").concat(c),datasource:s}}({configArgs:a}):qe({type:"structure"})({configArgs:a}),n=t.url,r=t.datasource,o="FUSION"==d.a("backendId",a.dataflow)?{references:"all",format:"sdmx-json",detail:"structureOnly",includeMetrics:!0}:{references:"all"},i="FUSION"==d.a("backendId",a.dataflow)?{"Accept-Language":Za(a)}:{Accept:"application/vnd.sdmx.structure+json;version=1.0","Accept-Language":Za(a)},s="FUSION"==d.a("backendId",a.dataflow)?function(e){return function(e,a){var t={};t.meta={"content-languages":[a],schema:"https://raw.githubusercontent.com/sdmx-twg/sdmx-json/develop/structure-message/tools/schemas/1.0/sdmx-json-structure-schema.json"},t.data={},t.data.dataflows=e.Dataflow,Ka(t.data.dataflows[0],"agencyId","agencyID"),t.data.dataflows[0].name=Ya(e.Dataflow[0].names),delete e.Dataflow[0].names,t.data.dataflows[0].structure=e.Dataflow[0].dataStructureRef,t.data.dataflows[0].links=Qa("self",e.Dataflow[0].urn,"dataflow"),t.data.dataflows[0].links=t.data.dataflows[0].links.concat(Qa("structure",e.Dataflow[0].dataStructureRef,"datastructure")),t.data.conceptSchemes=e.ConceptScheme,t.data.conceptSchemes[0].name=Ya(e.ConceptScheme[0].names),delete t.data.conceptSchemes[0].names,Ka(t.data.conceptSchemes[0],"agencyId","agencyID"),Ka(t.data.conceptSchemes[0],"items","concepts"),t.data.conceptSchemes[0].concepts.forEach(function(e){e.name=Ya(e.names),delete e.names}),t.data.conceptSchemes[0].links=Qa("self",e.ConceptScheme[0].urn,"conceptscheme"),t.data.codelists=e.Codelist,t.data.codelists.forEach(function(e){if(Ka(e,"agencyId","agencyID"),e.name=Ya(e.names),delete e.names,Ka(e,"items","codes"),e.links=Qa("self",e.urn,"codelist"),e.codes){var a=function(e){if(!e)return!1;for(var a=0,t=0;t1)return!1;return!0}(e.codes);e.codes.forEach(function(e){e.name=Ya(e.names),delete e.names,e.parentCode&&!a&&Ka(e,"parentCode","parent"),e.links=Qa("self",e.urn,"code")})}}),t.data.dataStructures=e.DataStructure,Ka(t.data.dataStructures[0],"agencyId","agencyID"),t.data.dataStructures[0].dataStructureComponents={},t.data.dataStructures[0].name=Ya(t.data.dataStructures[0].names),delete t.data.dataStructures[0].names,t.data.dataStructures[0].links=Qa("self",t.data.dataStructures[0].urn,"datastructure"),t.data.dataStructures[0].dataStructureComponents.dimensionList=e.DataStructure[0].dimensionList;var n=0,r=-1;return t.data.dataStructures[0].dimensionList.dimensions.forEach(function(e){e.links=Qa("self",e.urn,"dimension"),e.type="Dimension",Ka(e,"concept","conceptIdentity"),e.position=n++,e.representation&&e.representation.representation&&(e.localRepresentation={enumeration:e.representation.representation}),e.isTimeDimension&&(r=n-1,t.data.dataStructures[0].dimensionList.timeDimensions=[{id:e.id,urn:e.urn,links:Qa(e.links[0].rel,e.links[0].urn,e.links[0].type),position:e.position,type:e.type,conceptIdentity:e.conceptIdentity,localRepresentation:{textFormat:{textType:"ObservationalTimePeriod",isSequence:!1,isMultiLingual:!1}}}])}),-1!=r&&t.data.dataStructures[0].dimensionList.dimensions.splice(r,r),delete t.data.dataStructures[0].dimensionList,t.data.dataStructures[0].dataStructureComponents.measureList={},t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure=e.DataStructure[0].primaryMeasure,t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.links=Qa("self",t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.urn,"primarymeasure"),Ka(t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure,"concept","conceptIdentity"),Ka(t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure,"representation","localRepresentation"),delete t.data.dataStructures[0].primaryMeasure,t.data.dataStructures[0].dataStructureComponents.attributeList=e.DataStructure[0].attributeList,t.data.dataStructures[0].dataStructureComponents.attributeList&&t.data.dataStructures[0].dataStructureComponents.attributeList.attributes.forEach(function(e){e.mandatory?e.assignmentStatus="Mandatory":e.assignmentStatus="Conditional",e.attributeRelationship={dimensions:e.dimensionReferences},Ka(e,"concept","conceptIdentity"),e.links=Qa("self",e.urn,"dataattribute"),e.representation&&e.representation.representation&&(e.localRepresentation={enumeration:e.representation.representation})}),delete t.data.dataStructures[0].attributeList,t}(e.data,a.locale.id)}:function(e){return e.data};return za.a.get(n,{params:T.a([[S.a(d.a("supportsReferencePartial",r)),Qe.a("detail","referencepartial")],[L.a,N.a]])(o),headers:i}).then(k.a(s,He))},getData:function(e){var a=e.configArgs,t=e.requestArgs,n=qe({type:"data"})({configArgs:a}),r=n.url,o=n.datasource,i=function(e){var a=Object.keys(e.data.dataSets[0].observations);if(a.length>800){e.data.dataSets[0].limited={returnedKeyCount:a.length,limitedTo:800};for(var t=800;t0&&void 0!==arguments[0]?arguments[0]:{}).shouldRequestStructure;return function(a,t){(function(e){var a=e.shouldRequestStructure;return function(e,t){if(A.a(a))return Promise.resolve();var n={locale:Pa(t()),dataflow:ga(t())};return nt(e,{method:"getStructure",configArgs:n}).then(function(a){e({type:"@@sdmx/HANDLE_STRUCTURE",structure:a})})}})({shouldRequestStructure:e})(a,t).then(function(){var e={startPeriod:q.a(ma(t())),endPeriod:M.a(ma(t()))},n=Ca(t()),r=ga(t()),o={locale:Pa(t()),dataflow:r,dataquery:n};return a({type:"@@vis/sdmx/OVERRIDE_DATAQUERY",dataquery:n}),nt(a,{method:"getData",configArgs:o,requestArgs:e}).then(function(e){var t=e.data,n=e.layout;document.getElementById("root").dispatchEvent(new CustomEvent("unicef_dataflowLoaded",{detail:{dataflow:r,data:t}})),a({type:"@@sdmx/HANDLE_DATA",data:t,layout:n})}).catch(function(e){a({type:"@@sdmx/HANDLE_DATA",nodata:null,nolayout:null})})})}},ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.isDownloadAllData,t=e.dataflow;return function(e,n){var r=a?{}:{startPeriod:q.a(ma(n())),endPeriod:M.a(ma(n()))},o=T.a([[S.a(A.a(a)),Qe.a("dataquery",Ca(n()))],[L.a,N.a]])({locale:Pa(n()),dataflow:t}),i=C.a(_a.a("id"),k.a(d.a("id"),function(e){return"getDataFile/".concat(e)}),S.a("requestingDataFile"))(t);return nt(e,{method:"getDataFile",configArgs:o,requestArgs:r,pendingId:i})}},it=Object(y.combineReducers)({app:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(a.type){case"@@app/PUSH_LOG":return h.a(E.a("logs"),w.a(a.payload.log),e);case"@@app/SET_PENDING":return j.a(["pending",a.payload.id],a.payload.is,e);default:return e}},sdmx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(a.type){case"@@sdmx/HANDLE_STRUCTURE":return R.a(E.a("dimensions"),F.a(["structure","dimensions"],a),e);case"@@sdmx/HANDLE_DATA":return k.a(R.a(E.a("data"),d.a("data",a)),R.a(E.a("layout"),d.a("layout",a)))(e);default:return e}},vis:function(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t.type){case"@@vis/CHANGE_ACTION":var n=S.a(D.a(t.payload.actionId,"fullscreen"));return x.a({isFullscreen:C.a(n,A.a,N.a),action:T.a([[n,N.a],[D.a(t.payload.actionId),S.a(void 0)],[L.a,S.a(t.payload.actionId)]])})(a);case"@@vis/CHANGE_FILTER":return h.a(E.a("filter"),function(e){return C.a(D.a(e),S.a(void 0),N.a)(F.a(["payload","filterId"],t))},a);case"@@vis/sdmx/CHANGE_PERIOD":return R.a(E.a("period"),F.a(["payload","period"],t),a);case"@@vis/CHANGE_VIEWER":return R.a(E.a("viewer"),F.a(["payload","viewerId"],t),a);case"@@vis/CHANGE_LAYOUT":return R.a(E.a("layout"),F.a(["payload","layout"],t),a);case"@@vis/CHANGE_DIMENSION_GETTER":return R.a(E.a("dimensionGetter"),F.a(["payload","dimensionGetter"],t),a);case"@@vis/CHANGE_IS_TIME_DIMENSION_INVERTED":return Object(I.a)({},a,{timeDimensionInverted:R.a(E.a(t.payload.id),!t.payload.isTimeDimensionInverted,a.timeDimensionInverted)});case"@@vis/sdmx/CHANGE_DATAQUERY":return h.a(E.a("dataquery"),(e=F.a(["payload","dimensions"],t),function(a,t){return function(n){if(u.a(a))return X.a(W.a("."),"",e);var r=Y.a(K.a("id",a),e),o=u.a(n)?X.a(W.a("."),"",e):n;return u.a(t)?k.a(Q.a("."),$.a(r,""),P.a("."))(o):k.a(Q.a("."),h.a(J.a(r),k.a(C.a(Z.a,S.a([]),Q.a("+")),C.a(H.a(t),ee.a([t]),V.a(t)),P.a("+"))),P.a("."))(o)}})(F.a(["payload","filterId"],t),F.a(["payload","valueId"],t)),a);case"@@vis/sdmx/OVERRIDE_DATAQUERY":return R.a(E.a("dataquery"),d.a("dataquery",t),a);case"@@vis/sdmx/CHANGE_DATAFLOW":return k.a(R.a(E.a("viewer"),"table"),R.a(E.a("dataquery"),F.a(["payload","dataflow","dataquery"],t)),R.a(E.a("period"),F.a(["payload","dataflow","period"],t)),_.a(G.a)(d.a("payload",t)))(a);default:return a}}}),st=t(931),ct=(t(932),function(e){var a=e.dispatch;return function(e){return function(t){var n=e(t);return k.a(d.a("type"),_.a(H.a)(["@@vis/sdmx/CHANGE_DATAQUERY","@@vis/sdmx/CHANGE_PERIOD"]))(t)&&a(rt()),k.a(d.a("type"),_.a(H.a)(["@@vis/sdmx/CHANGE_DATAFLOW"]))(t)&&a(rt({shouldRequestStructure:!0})),n}}}),lt=function(e){return e},dt=t(679),ut=t(275),mt=t(577),pt=t.n(mt),ft=t(263),bt=t(51),vt="#F0F0F0",gt="#494444",yt="#FFFFFF",ht=1e3,Et=360,wt=350,jt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ltr";return Object(bt.createMuiTheme)({overrides:{MuiButton:{text:{textTransform:"none"}}},palette:{primary:{main:"#137cbd",mainAlpha:"#137cbd26",light:"#5dabf0",dark:"#00508c",contrastText:"#ffffff"},secondary:{main:"#bdd7ee",light:"#f0ffff",dark:"#8ca6bc",contrastText:"#ff0000"},action:{hover:"#bdd7ee",selected:"#137cbd",active:"rgba(19,124,189,.3)"},typography:{fontFamily:["Segoe UI"]},raisedButton:{textColor:"#ffffff",primaryTextColor:"#ffffff"},default:{backgroundColor:"#00000026"},configLabelBG:"#B5CEEB",configLabelCol:"#1C2768"},app:{appSize:ht,appMinSize:Et,itemMinSize:wt},scopeListContainer:{maxHeight:250},scopeList:{divider:"#000000"},direction:e,typography:{useNextVariants:!0},configLabel:{backgroundColor:"#B5CEEB",color:"#43679F",fontFamily:"Segoe UI",fontSize:16},configButtonRegular:{backgroundColor:"#B5CEEB",color:"#43679F",fontFamily:"Segoe UI",fontSize:16,fontWeight:"inherit",textTransform:"none"},configButtonSelected:{backgroundColor:"#778899",color:"#B5CEEB",fontFamily:"Segoe UI",fontSize:16,fontWeight:"inherit",textTransform:"none"},panelSummary:{backgroundColor:"#137cbd",color:"white",fontFamily:"Segoe UI",fontSize:16},panelIcon:{color:"white"},configInputs:{backgroundColor:"white"},alert:{color:"#c23030",hover:{backgroundColor:"rgba(219,55,55,.15)"},active:{backgroundColor:"rgba(219,55,55,.3)"}},table:{yBg:"#B5CEEB",yBgHover:"#c3d7ef",yBgActive:"#7e90a4",yFontHeader:"#1C2768",yFont:"#43679F",zBg:"#386CAA",zBgHover:"#5f89bb",zBgActive:"#274b76",zFontHeader:"#A2C2E4",zFont:yt,xBg:yt,xBgHeader:"#D7E6F4",xBgHover:"#dfebf6",xBgActive:"#96a1aa",xFontHeader:"#1C2768",xFont:"#43679F",oFont:gt,sBg:vt}})},Ot=t(578),It=t.n(Ot),St=Object(ft.create)({plugins:[].concat(Object(Oe.a)(Object(bt.jssPreset)().plugins),[pt()()])}),Dt=Object(bt.createGenerateClassName)(),xt=function(e){var a=e.theme,t=e.children,n=e.isRtl;return r.a.createElement(It.a,{jss:St,generateClassName:Dt},r.a.createElement(bt.MuiThemeProvider,{theme:jt(n?"rtl":"ltr")},r.a.createElement(ut.a,{theme:Object(dt.a)(ca.mainTheme,a)},r.a.Children.only(t))))},Ct=t(442),At=t(933),Nt=t(446),Tt=t(443),Lt=t(447),Ft=t(934),Rt=t.n(Ft),kt=function(e){function a(e){var t;return Object(Ct.a)(this,a),(t=Object(Nt.a)(this,Object(Tt.a)(a).call(this,e))).state={hasError:!1},t}return Object(Lt.a)(a,e),Object(At.a)(a,[{key:"componentDidCatch",value:function(){this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?this.props.isFinal?r.a.createElement("h1",null,"Whoops, something went wrong on our end."):r.a.createElement(ca.DELayout,{isHome:!0},r.a.createElement(ca.DELayoutContent,null,r.a.createElement(ca.DESplash,{title:r.a.createElement(p.a,{id:"de.error.title"}),logo:Rt.a}))):this.props.children}}]),a}(r.a.Component),_t=t(11),Gt=t(582),Pt=t.n(Gt),Bt=function(e){return r.a.createElement(Pt.a,Object.assign({},e,{query:"(max-width: ".concat(700,"px)")}))},Ht=function(e){return r.a.createElement(Pt.a,Object.assign({},e,{query:"(min-width: ".concat(701,"px)")}))},qt=Object(_t.compose)(Object(i.b)(Object(We.b)({period:ma}),{changePeriod:function(e){return{type:"@@vis/sdmx/CHANGE_PERIOD",payload:{period:e}}}}),Object(_t.withProps)({titleLabel:r.a.createElement(p.a,{id:"de.filter.period.title"}),tagLabel:"",periodBoundaries:ve,options:Object(I.a)({},ge,{labelStepSize:10})}),_t.pure)(ca.DEFilterPeriod),Mt=Object(_t.compose)(Object(i.b)(Object(We.b)({items:Ta}),{changeFilters:ka}),Object(_t.withProps)({titleLabel:r.a.createElement(p.a,{id:"vx.filters.current.title"}),clearAllLabel:r.a.createElement(p.a,{id:"vx.filters.current.clear"}),blankLabel:r.a.createElement(p.a,{id:"vx.filters.current.blank"}),noScroll:!0}),_t.pure)(ca.VXFiltersCurrent),Ut=t(666),Vt=Object(_t.pure)(ca.VXScopeList),zt=Object(_t.compose)(p.d,Object(i.b)(Object(We.b)({filters:Na,activePanelId:va}),{changeSelection:ka,onChangeActivePanel:function(e){return{type:"@@vis/CHANGE_FILTER",payload:{filterId:e}}}}),Object(_t.withProps)(function(e){var a=e.intl;return{optionsSpotlight:{hasClearAll:!0,mainPlaceholder:a.formatMessage({id:"vx.spotlight.placeholder.primary"}),secondaryPlaceholder:a.formatMessage({id:"vx.spotlight.placeholder.secondary"})},spotlight:{engine:ca.spotlightScopeListEngine,placeholder:a.formatMessage({id:"vx.spotlight.placeholder"}),fields:{"vx.spotlight.field.label":{id:"vx.spotlight.field.label",accessor:k.a(le.a(null,"label"),C.a(u.a,S.a(""),N.a)),isSelected:!0}}},topElementComponent:function(e){return Ut.a(ae.a(e),8)?ca.VXSpotlight:null}}}),_t.pure)(function(e){var a=e.topElementComponent,t=e.filters,n=Object(Ie.a)(e,["topElementComponent","filters"]);return oe.a(function(e){var t=e.id,o=e.label,i=e.values;return r.a.createElement(Vt,Object.assign({},n,{id:t,key:t,label:o,items:i,TopElementComponent:a(i)}))},t)}),Xt=t(669),Wt=t(689),Yt=t(319),Kt=t(681),Qt=t(663),$t=t(676),Jt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return W.a(a,e)}},Zt=k.a(m.a,Qt.a),en=na.a(function(e,a){var t=_.a(Yt.a)(e);if(k.a(d.a("rows"),t,Z.a)(a)){var n=k.a(d.a("sections"),t,Z.a)(a)?"header":"sections",r=k.a(d.a(n),t,q.a)(a);return k.a(Qe.a("rows",W.a([r],le.a([],"rows")(a))),function(e){return Object(I.a)({},e,Object(aa.a)({},n,(a=n,t=r,k.a(d.a(a),re.a(function(e){return A.a(D.a(e,t))})))(e)));var a,t})(a)}return a}),an=function(e,a,t){return ne.a(function(e){return k.a(_.a(Yt.a)(e),Z.a,A.a)}(e)(a),Z.a(t))},tn=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=function(e){var a=ra.a(e),t=Ae.a(je.rules.isTimeDimension)(a),n=Ae.a(je.rules.isAreaDimension)(a),r=function(e,a){return k.a(Kt.a(e),C.a(_a.a(a),d.a(a),k.a(m.a,q.a)),d.a("id"))},o=r([],n)(e),i=r([n,o],t)(e),s=k.a(Kt.a([o,i]),m.a,Ye.a("id"))(e);return{rows:C.a(u.a,S.a([]),_.a(V.a)([]))(o),header:C.a(u.a,S.a([]),_.a(V.a)([]))(i),sections:s}}(e),n=k.a(Zt,a)(t);return h.a(E.a("sections"),Jt(n))(t)},nn=function(){return Object(We.a)(Da,k.a(de.a([],["structure","dimensions","observation"]),xe.a(oe.a)(function(e,a){return k.a(Qe.a("index",a),R.a(E.a("values"),la(le.a([],"values")(e))))(e)})))},rn=function(){return Object(We.a)(nn(),k.a(oa.a(k.a(le.a([],"values"),ae.a,_.a(te.a)(1))),U.a(function(e,a){return{many:Xt.a(d.a("id"))(e),one:Xt.a(d.a("id"))(a)}},[q.a,M.a])))},on=Object(We.a)(rn(),Oa,Ea,function(e,a,t){var n=e.many,r=e.one;return Ma.a(function(e){return $t.a(function(a,t){return{id:t,label:e(a),value:t,isOne:!0}})}(a)(r),function(e,a){return $t.a(function(t,n){return{id:n,isTimePeriod:je.rules.isTimeDimension(n),isTimeDimensionInverted:d.a(n)(a),label:e(t),value:n}})}(a,t)(n))}),sn=function(){return Object(We.a)(wa,xa,Object(We.a)(Sa,nn(),function(e,a){return $e.a(Xe,[ze,ze])(e,a)}),rn(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=n.many,o=n.one,i=k.a(C.a(Z.a,S.a(a),N.a),Ma.a({sections:[],rows:[],header:[]}))(e),s=Yt.a(t),c=ra.a(o),l=Zt(i);if(an(t,l,i))return tn(r,s);var d=s(l);return Z.a(d)?en(c,i):function(e,a){return k.a(h.a(E.a("sections"),Jt(e)),en(a))}(d,c)(i)})},cn=function(e){var a=e.title,t=Object(Ie.a)(e,["title"]);return r.a.createElement(ca.VXFilterContainer,{titleLabel:a,noCollapse:!0,noScroll:!0},r.a.createElement(ca.DETableConfig,t))},ln=Object(_t.compose)(Object(i.b)(Object(We.b)({dimensions:on,dimensionGetter:ja,layout:sn()}),{changeLayout:function(e){return{type:"@@vis/CHANGE_LAYOUT",payload:{layout:e}}},changeGetter:function(e){return{type:"@@vis/CHANGE_DIMENSION_GETTER",payload:{dimensionGetter:e}}},changeIsTimeDimensionInverted:function(e,a){return{type:"@@vis/CHANGE_IS_TIME_DIMENSION_INVERTED",payload:{id:e,isTimeDimensionInverted:a}}}}),p.d,Object(_t.withProps)(function(e){var a=e.intl;return{isNarrow:!0,noPreview:!0,title:r.a.createElement(p.a,{id:"de.table.layout.title"}),labels:{commit:r.a.createElement(p.a,{id:"de.table.layout.apply"}),cancel:r.a.createElement(p.a,{id:"de.table.layout.cancel"}),row:r.a.createElement(p.a,{id:"de.table.layout.x"}),column:r.a.createElement(p.a,{id:"de.table.layout.y"}),section:r.a.createElement(p.a,{id:"de.table.layout.z"}),d:r.a.createElement(p.a,{id:"de.table.layout.getter.dimension"}),o:r.a.createElement(p.a,{id:"de.table.layout.getter.observation"}),time:r.a.createElement(p.a,{id:"de.table.layout.time"}),asc:r.a.createElement(p.a,{id:"de.table.layout.time.asc"}),desc:r.a.createElement(p.a,{id:"de.table.layout.time.desc"}),help:r.a.createElement(p.a,{id:"de.table.layout.help"}),table:r.a.createElement(p.a,{id:"de.table.layout.table"}),one:r.a.createElement(p.a,{id:"de.table.layout.value.one"})},dimensionGetters:X.a(function(e,t){return Object(I.a)({},e,Object(aa.a)({},t,a.formatMessage({id:"vx.config.display.".concat(t)})))},{},ra.a(da))}}))(cn),dn=[],un=function(e){var a=e.changeActionId,t=e.requestDataFile,n=e.dataflow,o=e.isFullscreen,i=e.isNarrow,s=[{icon:"import",id:"download",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download"}),children:[{id:"csv-selection",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download.csv.selection"}),action:function(){return t({dataflow:n})}},{id:"csv-full",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download.csv.all"}),action:function(){return t({isDownloadAllData:!0,dataflow:n})}}]},{icon:o?"minimize":"maximize",id:"fullscreen",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.fullscreen"}),action:function(){return a("fullscreen")}}],c={icon:"filter-list",id:"filters",label:r.a.createElement(p.a,{id:"de.side.filters.action"}),action:function(){return a("filters")}};return k.a(C.a(S.a(i),w.a(c),N.a))(s)},mn=Object(_t.compose)(Object(i.b)(Object(We.b)({isDownloading:Ha("requestingDataFile"),dataflow:ga}),{changeMenu:La,changeActionId:Fa,requestDataFile:ot}),Object(_t.withProps)(function(e){var a=e.isDownloading,t=e.viewerId,n=e.actionId,o=Object(Ie.a)(e,["isDownloading","viewerId","actionId"]);return{loadingActionId:a?"download":null,selectedMenuId:t,selectedActionId:n,actions:un(Object(I.a)({},o,{viewerId:t})),menus:dn,showLabel:r.a.createElement(p.a,{id:"de.visualisation.toolbar.show"})}}))(ca.DEVisualisationToolbar),pn=function(e){var a=e.isNarrow,t=e.isRtl,n=e.isFullscreen,o=e.actionId,i=e.isFilters;return r.a.createElement(r.a.Fragment,null,r.a.createElement(mn,{isNarrow:a,isRtl:t,isFull:n,actionId:o}),a&&r.a.createElement(ca.VXFilterContainer,{isOpen:i,noScroll:!0,noHeader:!0},r.a.createElement(Mt,{isNarrow:a,isRtl:t}),r.a.createElement(qt,{isNarrow:a,isRtl:t}),r.a.createElement(zt,{isNarrow:a,isRtl:t}),r.a.createElement(ln,{isNarrow:a,isRtl:t})))},fn=(Object(_t.compose)(Object(i.b)(Object(We.b)({actionId:fa,viewerId:pa})),Object(_t.withProps)(function(e){var a=e.actionId,t=e.viewerId;return{isChartConfig:D.a("config",a)&&!D.a("table",t),isFilters:D.a("filters",a)}}))(pn),t(574)),bn=t.n(fn),vn=function(e){var a=e.label,t=e.showCopyrightSymbol;return r.a.createElement("div",{className:"div_footer"},t?"\xa9":null,a)},gn=ut.b.div({width:"100%",height:"100%",padding:"4px 6px",fontSize:16,textAlign:"right"},function(e){var a=e.isYLast,t=e.isXLast,n=e.theme;return{color:n.table.oFont,borderTop:"1px solid ".concat(n.table.border),borderLeft:"1px solid ".concat(n.table.border),borderRight:a?"1px solid ".concat(n.table.border):null,borderBottom:t?null:"1px solid ".concat(n.table.border),backgroundColor:n.table.xBg}}),yn=function(e){var a=e.renderObservation,t=e.variant;return r.a.createElement(r.a.Fragment,null,r.a.createElement(gn,{isXLast:!0,isYLast:!0},r.a.createElement(ca.DETableCell,{value:"Value",variant:t})),r.a.createElement(gn,{isYLast:!0},a()))},hn=[],En=function(e){var a=e.requestDataFile,t=e.dataflow;return[{icon:"import",id:"download",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download"}),children:[{id:"csv-selection",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download.csv.selection"}),action:function(){return a({dataflow:t})}},{id:"csv-full",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download.csv.all"}),action:function(){return a({isDownloadAllData:!0,dataflow:t})}}]}]},wn=Object(_t.compose)(Object(i.b)(Object(We.b)({isDownloading:Ha("requestingDataFile"),dataflow:ga,actionId:fa,viewerId:pa}),{changeMenu:La,changeActionId:Fa,requestDataFile:ot}),Object(_t.withProps)(function(e){var a=e.isDownloading,t=e.viewerId,n=e.actionId,o=Object(Ie.a)(e,["isDownloading","viewerId","actionId"]);return{loadingActionId:a?"download":null,selectedMenuId:t,selectedActionId:n,actions:En(Object(I.a)({},o,{viewerId:t})),menus:hn,showLabel:r.a.createElement(p.a,{id:"de.visualisation.toolbar.show"}),isFilters:D.a("filters",n)}}))(ca.DEVisualisationToolbar),jn=function(e){var a=e.returnedKeyCount,t=e.limitedTo;e.animationMillis;if(!a)return null;if(!t)return null;if(0==t)return null;var o="dataLimited_msgBox";return Object(n.useEffect)(function(){setTimeout(function(){var e=document.getElementById(o);e.addEventListener("transitionend",function a(){document.getElementById(o).style.display="none",e.removeEventListener("transitionend",a)},!1),document.getElementById(o).classList.add("dataLimited_msgBox_trans")},5e3)}),r.a.createElement("div",{className:"div_dataLimited",id:o,style:{position:"relative"}},r.a.createElement("p",null,"Your selection returned ",a," values, the visualization has been limited to"," "+t," values to avoid slowing down your browser."),r.a.createElement("p",null,'Please limit your query by further filtering your data, or use the "Download" button to download the entire dataset in CSV format.'),r.a.createElement("div",{style:{position:"absolute",top:"-20px",right:"-20px"},className:"pt-tag-remove"}))},On=function(e){e.data;var a=e.selItems,t=null;if(a&&a.forEach(function(e){"INDICATOR"==e.id&&(t=e.values)}),!t)return null;var n=[];return t.forEach(function(e){var a;n.push(r.a.createElement("span",{key:e.id,className:"indicatorEntry"},r.a.createElement("a",{href:(a=e.id,we+"/"+a)},e.label)))}),r.a.createElement("div",{className:"div_IndicatorLink"},r.a.createElement("span",{className:"goToIndic"},r.a.createElement(p.a,{id:"de.IndicatorLinkUnicef.goToIndicator"})),n)},In=ut.b.div({borderLeftWidth:0,borderRightWidth:0,marginTop:10,overflowX:"auto"}),Sn=function(e){var a=e.header,t=e.viewerConfig,n=e.data,o=e.layoutIds,i=e.renderObservation,s=e.itemFormatter,c=e.isNotATable,l=(e.footnotes,e.variant),d=e.limited,u=e.selItems;return r.a.createElement(In,null,r.a.createElement("div",{className:"header_download"},r.a.createElement(bn.a,Object.assign({},a,{fonts:t.fonts.header})),r.a.createElement(wn,null)),r.a.createElement(jn,{limitedTo:d.limitedTo,returnedKeyCount:d.returnedKeyCount,animationMillis:8e3}),r.a.createElement(On,{data:n,selItems:u}),c?r.a.createElement(yn,{renderObservation:i,variant:l}):r.a.createElement(ca.SDMXTable,{data:n,layoutIds:o,renderObservation:i,itemFormatter:s}),r.a.createElement(vn,{label:"UNICEF",showCopyrightSymbol:!0}))},Dn=Object(i.b)(Object(We.b)({variant:ja}))(ca.DETableCell),xn=Object(_t.compose)(Object(i.b)(Object(We.b)({dimensions:rn(),customAttributes:Aa,layoutIds:Object(We.a)(sn(),rn(),function(e,a){var t=a.many,n=Yt.a(Zt(e),ra.a(t));return oe.a(_.a(Yt.a)(n))(e)}),itemFormatter:Oa,data:Object(We.a)(Ea,Da,Wt.a(2,je.rules.getTableData)),variant:ja,limited:u.a(Da)?function(){return{limitedTo:0,returnedKeyCount:0}}:k.a(Da,de.a({limitedTo:0},["dataSets",0,"limited"])),selItems:Ta})),Object(_t.mapProps)(function(e){var a=e.chartData,t=e.viewerConfig,n=e.data,r=e.customAttributes,o=e.dimensions,i=e.layoutIds,s=e.itemFormatter,c=e.variant,l=e.limited,u=e.selItems;return{viewerConfig:t,data:n,layoutIds:i,itemFormatter:s,renderObservation:je.rules.observationGetter(Dn)({observations:d.a("observations",n),dimensions:o,customAttributes:r,isRtl:!1})(N.a),header:z.a(["title","subtitle","uprs"],a),footnotes:d.a("footnotes",a),isNotATable:k.a(d.a("observations"),m.a,ae.a,D.a(1))(n),variant:c,limited:l,selItems:u}}))(Sn),Cn=Object(_t.mapProps)(function(e){return{data:e.chartData,options:e.chartOptions,config:e.viewerConfig,type:e.type}})(je.Chart),An={fontFamily:"Segoe UI"},Nn={owner:"UNICEF",logo:"",footer_visible:!1,fonts:{header:{subtitle:An,title:An,uprs:An,tooltip:An},chart:{axisLegend:An,chartLegend:An,tooltip:{primary:An,secondary:An}},footer:{copyright:An,source:An}}},Tn=Object(_t.compose)(Object(i.b)(Object(We.b)({type:pa})),Object(_t.withProps)({viewerConfig:Nn}),Object(_t.branch)(k.a(d.a("data"),u.a),Object(_t.renderComponent)(function(){return r.a.createElement(ca.VXNoData,{message:r.a.createElement(p.a,{id:"vx.no.data"})})})),Object(_t.branch)(function(e){var a=e.type;return D.a(a,"table")},Object(_t.renderComponent)(xn)))(Cn),Ln=t(181),Fn=t(431),Rn=t.n(Fn),kn=t(432),_n=t.n(kn),Gn=t(579),Pn=t.n(Gn),Bn=function(e){var a=e.footnotes;return r.a.createElement(ca.VXFilterContainerCollapsible,{titleLabel:r.a.createElement(p.a,{id:"footnotes"}),isOpen:!0,noScroll:!0},r.a.createElement(Rn.a,{dense:!0},oe.a(function(e){var a=e.id,t=e.label,n=e.values;return r.a.createElement(_n.a,{key:a},r.a.createElement(Pn.a,{primary:B.a(a,t),secondary:k.a(Ye.a("name"),P.a(" | "))(n)}))})(a)))},Hn=Object(_t.compose)(Object(i.b)(Object(We.b)({attributes:Aa})),Object(_t.mapProps)(k.a(d.a("attributes"),z.a(["footnotes"]),d.a("footnotes"),Ln.a(k.a(d.a("id"),_.a(H.a)(["UNIT_MEASURE"]))),Qe.a("footnotes",ia.a,{}))))(Bn),qn=function(e){var a=e.data,t=e.enhancedData,n=e.isRtl,o=e.isNarrow,i=(e.isFullscreen,e.isLoadingData),s=e.display,c=e.formaterIds,l=e.type,d=e.options,u=e.dataUrl;return r.a.createElement(je.RulesDriver,{data:t,display:s,formaterIds:c,type:l,options:d,sdmxUrl:u,source:{link:window.location.href},render:function(e){var t=e.chartData,s=e.chartOptions;return e.properties,r.a.createElement("div",null,i&&r.a.createElement(ca.VXLoader,{isNarrow:o,isRtl:n,loadingLabel:r.a.createElement(p.a,{id:"de.visualisation.data.loading"}),isLarge:!0}),!i&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Tn,{chartData:t,chartOptions:s,data:a,isNarrow:o,isRtl:n}),r.a.createElement("br",null),r.a.createElement(Hn,null)))}})},Mn=Object(_t.compose)(Object(i.b)(Object(We.b)({isLoadingData:Ha("getData"),display:ba,type:pa,data:Da,dataflow:ga,dataquery:ya,locale:Pa,period:ma})),Object(_t.withProps)(function(e){var a=e.data,t=e.dataflow,n=e.dataquery,r=e.locale,o=e.period;return{dataUrl:Me({configArgs:{dataflow:t,dataquery:n,locale:r},requestArgs:{period:o}}),options:Ee,formaterIds:{decimals:ye("decimals"),prefscale:ye("prefscale")},enhancedData:a}}))(qn),Un=function(e){var a=e.isNarrow,t=e.isRtl,n=e.isLoadingStructure,o=e.isLoadingData,i=e.isFullscreen;return r.a.createElement(ca.DELayout,{isNarrow:a,isRtl:t,isFull:i},r.a.createElement(ca.DELayoutContent,null,n&&r.a.createElement(ca.VXLoader,{isNarrow:a,isRtl:t,loadingLabel:r.a.createElement(p.a,{id:"de.visualisation.loading"}),isLarge:!0})),!(n||a)&&r.a.createElement(ca.DELayoutSide,null,r.a.createElement(qt,{isNarrow:a,isRtl:t}),r.a.createElement(Mt,{isNarrow:a,isRtl:t}),r.a.createElement(zt,{isNarrow:a,isRtl:t}),r.a.createElement("div",{className:"TableConfig_wrapper"},!o&&r.a.createElement(ln,{isRtl:t}))),!n&&r.a.createElement(ca.DELayoutMain,null,r.a.createElement(Mn,{isNarrow:a,isRtl:t,isFullscreen:i})))},Vn=Object(_t.compose)(function(e){return function(a){function t(){var a,o;Object(Ct.a)(this,t);for(var i=arguments.length,s=new Array(i),c=0;c0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0,t=[st.a,ct],n=[y.applyMiddleware.apply(void 0,Object(Oe.a)(lt(t)))];return Object(y.createStore)(a,e,y.compose.apply(void 0,n))}({app:{logs:[],pending:{},locale:Wn},vis:{filter:void 0,viewer:"table",action:void 0,period:void 0,dataflow:void 0,isFullscreen:!1,dataquery:void 0,display:"label",timeDimensionInverted:{},layout:void 0,dimensionGetter:"label"},sdmx:{dimensions:[],data:void 0,layout:{}}},it);console.log("initialized with DATAFLOW:",window.DATAFLOW),Yn.dispatch(Ra(window.DATAFLOW));var Kn=document.getElementById("root");Kn.addEventListener("unicef_changeDataflow",function(e){return Yn.dispatch(Ra(e.detail))}),console.log("listen unicef_changeDataflow event"),Object(o.render)(r.a.createElement(kt,{isFinal:!0},r.a.createElement(i.a,{store:Yn},r.a.createElement(xt,{theme:{},isRtl:Wn.isRtl},r.a.createElement(v,{localeId:Wn.id,messages:window.I18N},r.a.createElement(kt,null,r.a.createElement(Vn,null)))))),Kn)},583:function(e){e.exports={name:"unicef-data-explorer",version:"0.1.0",author:"redpelicans",license:"PRIVATE",private:!0,dependencies:{"@babel/core":"7.4.3","@sis-cc/dotstatsuite-components":"git+https://dotstatComponents:YgT9DjxaXYutK1pckX-J@gitlab.com/Daniele600/dotstatsuite-components.git","@sis-cc/dotstatsuite-ui-components":"git+https://dotstatComponents:YgT9DjxaXYutK1pckX-J@gitlab.com/Daniele600/dotstatsuite-ui-components.git#additionalGuiChanges","@svgr/webpack":"4.1.0","@typescript-eslint/eslint-plugin":"^1.7.0","@typescript-eslint/parser":"^1.7.0",add:"^2.0.6",axios:"^0.18.0","babel-eslint":"10.0.1","babel-jest":"24.7.1","babel-loader":"8.0.5","babel-plugin-named-asset-import":"^0.3.4","babel-preset-react-app":"^8.0.0","case-sensitive-paths-webpack-plugin":"2.2.0","cross-env":"^5.2.1","css-loader":"2.1.1",dotenv:"6.2.0","dotenv-expand":"4.2.0","es6-set":"^0.1.5",eslint:"^5.16.0","eslint-config-prettier":"^4.1.0","eslint-config-react-app":"^4.0.0","eslint-loader":"2.1.2","eslint-plugin-flowtype":"2.50.1","eslint-plugin-import":"2.16.0","eslint-plugin-jsx-a11y":"6.2.1","eslint-plugin-prettier":"^2.0.0","eslint-plugin-react":"7.12.4","eslint-plugin-react-hooks":"^1.5.0","file-loader":"3.0.1","file-saver":"^2.0.1","fs-extra":"7.0.1",git:"^0.1.5",glamorous:"^5.0.0","html-webpack-plugin":"4.0.0-beta.5",husky:"^2.0.0","identity-obj-proxy":"3.0.0","is-wsl":"^1.1.0",jest:"24.7.1","jest-environment-jsdom-fourteen":"0.1.0","jest-resolve":"24.7.1","jest-watch-typeahead":"0.3.0","jss-rtl":"^0.2.3",md5:"^2.2.1","mini-css-extract-plugin":"0.5.0",numeral:"^2.0.6","optimize-css-assets-webpack-plugin":"5.0.1","pnp-webpack-plugin":"1.2.1","postcss-flexbugs-fixes":"4.1.0","postcss-loader":"3.0.0","postcss-normalize":"7.0.1","postcss-preset-env":"6.6.0","postcss-safe-parser":"4.0.1",prettier:"1.12.1","pretty-quick":"^1.10.0",ramda:"^0.26.1",react:"^16.11.0","react-app-polyfill":"^1.0.4","react-dev-utils":"^9.1.0","react-dom":"^16.11.0","react-intl":"^2.8.0","react-jss":"^8.6.1","react-redux":"^7.1.1","react-responsive":"^6.1.1",redux:"^4.0.1","redux-logger":"^3.0.6","redux-thunk":"^2.3.0",reselect:"^4.0.0",resolve:"^1.10.0","sass-loader":"7.1.0",semver:"6.0.0","style-loader":"0.23.1","terser-webpack-plugin":"1.2.3","url-loader":"1.1.2",webpack:"4.29.6","webpack-dev-server":"3.2.1","webpack-manifest-plugin":"2.0.4","workbox-webpack-plugin":"4.2.0",yarn:"^1.19.1"},scripts:{"eslint-check":"eslint --print-config .eslintrc.json | eslint-config-prettier-check",lint:"eslint src --color",start:"cross-env NODE_ENV=development node scripts/start.js",build:"cross-env NODE_ENV=production node scripts/build.js",test:"cross-env NODE_ENV=test node scripts/test.js"},eslintConfig:{env:{browser:!0,jest:!0,node:!0,es6:!0},extends:["eslint:recommended","plugin:react/recommended"],parser:"babel-eslint",parserOptions:{ecmaFeatures:{experimentalObjectRestSpread:!0,jsx:!0},sourceType:"module"},plugins:["prettier","react","import"],rules:{"no-console":"warn","no-unused-vars":"warn","react/display-name":"off"}},browserslist:{production:[">0.2%","not dead","not op_mini all"],development:["last 1 chrome version","last 1 firefox version","last 1 safari version"]},jest:{verbose:!0,collectCoverageFrom:["src/**/*.{js,jsx,ts,tsx}","!src/**/*.d.ts"],setupFiles:["react-app-polyfill/jsdom"],setupFilesAfterEnv:[],testMatch:["/src/**/__tests__/**/*.{js,jsx,ts,tsx}","/src/**/*.{spec,test}.{js,jsx,ts,tsx}"],testEnvironment:"jest-environment-jsdom-fourteen",transform:{"^.+\\.(js|jsx|ts|tsx)$":"/node_modules/babel-jest","^.+\\.css$":"/config/jest/cssTransform.js","^(?!.*\\.(js|jsx|ts|tsx|css|json)$)":"/config/jest/fileTransform.js"},transformIgnorePatterns:["[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$","^.+\\.module\\.(css|sass|scss)$"],modulePaths:[],moduleNameMapper:{"^react-native$":"react-native-web","^.+\\.module\\.(css|sass|scss)$":"identity-obj-proxy"},moduleFileExtensions:["web.js","js","web.ts","ts","web.tsx","tsx","json","web.jsx","jsx","node"],watchPlugins:["jest-watch-typeahead/filename","jest-watch-typeahead/testname"]},babel:{presets:["react-app"]},husky:{hooks:{"pre-commit":"pretty-quick --staged"}},prettier:{useTabs:!1,printWidth:100,tabWidth:2,singleQuote:!0,trailingComma:"all",jsxBracketSameLine:!1,bracketSpacing:!0,parser:"babylon",semi:!0}}},919:function(e,a){},934:function(e,a,t){e.exports=t.p+"static/media/data-explorer-logo.707f6ef1.png"},936:function(e,a,t){e.exports=t(2086)},952:function(e,a){},958:function(e,a){}},[[936,1,2]]]); +//# sourceMappingURL=main.3dabd794.chunk.js.map \ No newline at end of file diff --git a/de/static/js/main.3dabd794.chunk.js.map b/de/static/js/main.3dabd794.chunk.js.map new file mode 100644 index 0000000..f24596d --- /dev/null +++ b/de/static/js/main.3dabd794.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["web/i18n/provider.js","web/i18n/index.js","web/ducks/app.js","web/lib/settings.js","web/lib/sdmx/annotations.js","web/lib/sdmx/structure.js","web/lib/sdmx/index.js","web/lib/utils/index.js","web/selectors/vis.js","web/selectors/sdmx.js","web/ducks/vis.js","web/selectors/app.js","web/api/formatMapper.js","web/api/sdmx.js","web/ducks/sdmx.js","web/core/reducer.js","web/core/middlewares.js","web/core/store.js","web/theme/theme.js","web/theme/index.js","web/components/Error.js","web/hocs/withResponsiveness.js","web/components/FilterPeriod/index.js","web/components/FilterSelection/index.js","web/components/Filters/index.js","web/lib/layout/index.js","web/selectors/table.js","web/components/TableConfig/TableConfig.js","web/components/TableConfig/index.js","web/components/Toolbar/menus.js","web/components/Toolbar/actions.js","web/components/Toolbar/index.js","web/components/Tools/Tools.js","web/components/Tools/index.js","web/components/FooterUnicef/index.js","web/components/Table/Cell.js","web/components/ToolbarUnicef/menus.js","web/components/ToolbarUnicef/actions.js","web/components/ToolbarUnicef/index.js","web/components/TableMessageUnicef/index.js","web/components/IndicatorLinkUnicef/index.js","web/components/Table/Table.js","web/components/Table/index.js","web/components/Chart/index.js","web/components/Viewer/config.js","web/components/Viewer/index.js","web/components/Footnotes/Footnotes.js","web/components/Footnotes/index.js","web/components/Main/Main.js","web/components/Main/index.js","web/components/App/App.js","web/components/App/index.js","web/index.js","web/assets/data-explorer-logo.png"],"names":["Provider","_ref","localeId","messages","children","react_default","a","createElement","index_es","locale","key","React","Children","only","model","concat","setPending","id","is","type","payload","sdmx","R","window","SETTINGS","getDatasource","sdmxRange","sdmxPeriod","sdmxPeriodBoundaries","sdmxPeriodBoundariesMinMax","min","max","getSdmxAttribute","Array","chart","chartOptions","getIndicatorProfileUrl","isValidNumber","Number","NaN","getIsSelected","index","annotations","selection","Boolean","md5","sdmx_structure","structure","lang","dimensions","conceptSchemes","dataflow","codelists","getCodelists","getLocalisedName","getDataflow","agencyID","rest","Object","objectWithoutProperties","objectSpread","code","agencyId","name","acc","dimension","getConceptIdentity","conceptIdentity","getUrnToParse","conceptIdentityUrnToParse","conceptIdentityRepresentationCode","conceptScheme","_ref2","version","getSdmxId","sdmxId","getConceptScheme","getConcepts","concepts","getConcept","concept","getId","getLocalRepresentation","localRepresentation","getCodeList","_ref3","codes","getSortedCodes","parsedDimension","roles","conceptRoles","values","_ref4","parent","_ref4$annotations","parentId","isDefaultSelected","label","localisedCodes","toConsumableArray","getConfig","configArgs","Error","_R$prop2","datasourceId","dataflowId","datasource","isStructure","keyword","identifiers","dataquery","url","getDataUrl","requestArgs","period","params","qs","stringify","startPeriod","endPeriod","addQueryPrefix","getFilename","greaterThanOne","getDimensionsIds","d","rules","isTimeDimension","getUniq","array1","array2","withIndex","keysMap","obj","value","dimensionFormats","dimensionValueDisplay","both","getVis","getPeriod","createSelector","getViewer","getAction","getDisplay","getFilter","getDataquery","getIsFullscreen","getTimeDimensionInverted","getLayout","getDimensionGetter","getDimensionFormat","getSdmx","getDimensions","getData","getVisDataquery","getCustomAttributes","data","format","flagsSet","Set","attrs","memo","rattr","attr","isFootnote","has","flags","footnotes","getFilters","filters","filter","valueIdsSet","getSelection","changeViewer","viewerId","changeAction","actionId","changeDataflow","changeDataquery","filterId","valueId","dispatch","getState","getApp","getLocale","getPending","getIsPending","getIsRtl","convertName","names","ret","forEach","v","renameKey","object","oldKey","newKey","createLinkNode","rel","urn","convertLanguageNode","text","convert_struct_component","comp","cl","convertCodelist","methods","getStructure","_R$prop","getFusionConfig","qStringParams","references","detail","includeMetrics","acceptParam","Accept-Language","Accept","sdmxMapperStruct","s","meta","content-languages","schema","dataflows","Dataflow","dataStructureRef","links","ConceptScheme","Codelist","hasUniqueRoot","noParentCount","i","length","parentCode","isUniqueRoot","c","dataStructures","DataStructure","dataStructureComponents","dimensionList","pos","timePos","position","representation","enumeration","timeDimensions","textFormat","textType","isSequence","isMultiLingual","splice","measureList","primaryMeasure","attributeList","attributes","mandatory","assignmentStatus","attributeRelationship","dimensionReferences","fm","axios","get","headers","then","structureParser","_getConfig","limitData","keys","dataSets","observations","limited","returnedKeyCount","limitedTo","sdmxMapperData","header","k","description","dataSet","dataset","series","observation","hasOwnProperty","isNaN","parseFloat","dimensionAtObservation","v8Transformer","getDataFile","responseType","response","blob","Blob","FileSaver","saveAs","main","_ref5","method","error","_ref6","_ref7","slicedToArray","fn","request","ctx","pendingId","sdmxApi","res","catch","log","errorCode","statusCode","status","pushLog","requestData","shouldRequestStructure","arguments","undefined","Promise","resolve","requestStructure","layout","document","getElementById","dispatchEvent","CustomEvent","nodata","nolayout","requestDataFile","isDownloadAllData","combineReducers","app","state","action","vis","isFullscreen","timeDimensionInverted","isTimeDimensionInverted","filterIndex","safeDataquery","requestDataMiddleware","next","future","withLogger","middlewares","Colors","Formats","theme","rtl","createMuiTheme","overrides","MuiButton","textTransform","palette","primary","mainAlpha","light","dark","contrastText","secondary","hover","selected","active","typography","fontFamily","raisedButton","textColor","primaryTextColor","default","backgroundColor","configLabelBG","configLabelCol","appSize","appMinSize","itemMinSize","scopeListContainer","maxHeight","scopeList","divider","direction","useNextVariants","configLabel","color","fontSize","configButtonRegular","fontWeight","configButtonSelected","panelSummary","panelIcon","configInputs","alert","table","yBg","yBgHover","yBgActive","yFontHeader","yFont","zBg","zBgHover","zBgActive","zFontHeader","zFont","xBg","xBgHeader","xBgHover","xBgActive","xFontHeader","xFont","oFont","sBg","jss","create","plugins","jssPreset","generateClassName","createGenerateClassName","isRtl","JssProvider_default","styles","muiTheme","glamorous_esm","mergeDeepRight","mainTheme","ErrorBoundary","props","_this","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","hasError","setState","isFinal","build","isHome","title","logo","Component","Narrow","react_responsive_default","assign","query","Default","compose","connect","createStructuredSelector","changePeriod","withProps","titleLabel","tagLabel","periodBoundaries","options","labelStepSize","pure","DEFilterPeriod","items","changeFilters","clearAllLabel","blankLabel","noScroll","VXFiltersCurrent","Filter","VXScopeList","injectIntl","activePanelId","changeSelection","onChangeActivePanel","intl","optionsSpotlight","hasClearAll","mainPlaceholder","formatMessage","secondaryPlaceholder","spotlight","engine","spotlightScopeListEngine","placeholder","fields","vx.spotlight.field.label","accessor","isSelected","topElementComponent","VXSpotlight","parentProps","TopElementComponent","defaultConcat","getValuesFlat","adjustment","notAvailableIds","withoutNotAvailableIds","pivot","defineProperty","prop","isInvalid","dimensionIds","layoutIds","hasInvalidIds","getDefaultLayout","many","getMissingIds","defaultLayout","ids","timeId","areaId","isAreaDimension","helper","omitIds","pickId","x","y","z","rows","sections","defaultLayoutBuilder","defaultMissingIds","getDataDimensions","getVisDataDimensions","one","getTableConfigDimensions","isOne","Layout","isTimePeriod","getVisTableConfigLayout","getVisLayout","structureDimensions","dataDimensions","Sdmx","visLayout","sdmxLayout","dimensionsIds","oneIds","missingIds","TableConfig","tableProps","noCollapse","dimensionGetter","changeLayout","changeGetter","changeIsTimeDimensionInverted","isNarrow","noPreview","labels","commit","cancel","row","column","section","o","time","asc","desc","help","dimensionGetters","menus","Toolbar_actions","changeActionId","actions","icon","filtersBtn","isDownloading","changeMenu","loadingActionId","selectedMenuId","selectedActionId","showLabel","DEVisualisationToolbar","Tools","isFilters","Fragment","Toolbar","isFull","isOpen","noHeader","FilterSelection","FilterPeriod","Filters","components_TableConfig","isChartConfig","FooterUnicef","showCopyrightSymbol","className","StyledCell","glamorous","div","width","height","padding","textAlign","isYLast","isXLast","borderTop","border","borderLeft","borderRight","borderBottom","Cell","renderObservation","variant","ToolbarUnicef_menus","ToolbarUnicef_actions","TableMessageUnicef","animationMillis","msgBoxId","useEffect","setTimeout","el","addEventListener","onTransEnd","style","display","removeEventListener","classList","add","top","right","IndicatorLinkUnicef","selItems","indicators","element","indId","push","href","TableContainer","borderLeftWidth","borderRightWidth","marginTop","overflowX","Table","viewerConfig","itemFormatter","isNotATable","dotstatsuite_ui_header_lib_default","fonts","ToolbarUnicef","components_TableMessageUnicef","components_IndicatorLinkUnicef","Table_Cell","components_FooterUnicef","DETableCell","customAttributes","idsNotInMany","getTableData","mapProps","chartData","observationGetter","config","Chart","owner","footer_visible","subtitle","uprs","tooltip","axisLegend","chartLegend","footer","copyright","source","branch","renderComponent","message","Footnotes","List_default","dense","ListItem_default","ListItemText_default","Main","enhancedData","isLoadingData","formaterIds","dataUrl","dotstatsuite_components_lib","sdmxUrl","link","location","render","properties","loadingLabel","isLarge","Viewer","components_Footnotes","decimals","prefscale","App","isLoadingStructure","components_Main","_React$Component","_temp","_getPrototypeOf2","_len","args","_key","apply","react","withResponsiveness_Narrow","withResponsiveness_Default","inherits","renderNothing","ES6_Error","console","info","_ref$locales","locales","_ref$localeId","addLocaleData","enLocaleData","numeral","delimiters","register","initializeI18n","i18n","store","initialState","rootReducer","thunk","enhancers","applyMiddleware","createStore","logs","pending","viewer","reducer","DATAFLOW","ROOT","event","components_Error","es","web_theme","provider","I18N","components_App","module","exports","__webpack_require__","p"],"mappings":"sPAgBeA,EAZE,SAAAC,GAAA,IAAGC,EAAHD,EAAGC,SAAUC,EAAbF,EAAaE,SAAUC,EAAvBH,EAAuBG,SAAvB,OACfC,EAAAC,EAAAC,cAACC,EAAA,EAAD,CAAcC,OAAQP,EAAUQ,IAAKR,EAAUC,SAAUA,EAASD,IAC/DS,IAAMC,SAASC,KAAKT,KCDnBU,EAAQ,SAAAL,GAAM,SAAAM,OAAON,EAAP,KAAAM,OAAiBN,iDCIxBO,EAAa,SAACC,EAAIC,GAAL,MAAa,CAAEC,KAJd,oBAIiCC,QAAS,CAAEH,KAAIC,2YCP9DG,GAAOC,KAAS,GAAI,OAAQC,OAAOC,UACnCC,GAAgBH,IAAOA,IAAPA,CAAeA,IAAO,cAAeD,KACrDK,GAAYJ,IAAO,QAASD,IAC5BM,GAAaL,IAAO,CAAC,SAAU,WAAYD,IAC3CO,GAAuBN,KAAS,GAAI,CAAC,SAAU,cAAeD,IAC9DQ,GAA6B,CACxCC,IAAKR,IAAOM,IACZG,IAAKT,IAAOM,KAEDI,GAAmB,SAAAf,GAAE,OAChCK,IAAOA,KAAS,GAAI,CAAC,aAAcL,IAAMK,IAASA,KAAKW,OAAQX,IAAYA,IAAOA,IAAPA,CAAiB,KAA5FA,CACED,KAESa,GAAQZ,KAAS,GAAI,QAASC,OAAOC,UACrCW,GAAeb,IAAO,UAAWY,IAEjCE,GAAyBd,IAAO,CAAC,SAAU,uBAAwBC,OAAOC,yKCfjFa,GAAgBf,KAAOA,KAAKgB,QAAShB,KAAaA,IAASiB,OAEpDC,GAAgB,SAAAvC,GAA2C,IAAxCwC,EAAwCxC,EAAxCwC,MAAOxB,EAAiChB,EAAjCgB,GAAIyB,EAA6BzC,EAA7ByC,YAAaC,EAAgB1C,EAAhB0C,UACt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AM/gB,SAASJ,GAAegiB,EAAM7f,WAEtCoe,QAAQtY,IAAR,sCAEA8W,iBACE1pB,EAAAC,EAAAC,cAAC0sB,GAAD,CAAepS,SAAO,GACpBxa,EAAAC,EAAAC,cAAC2sB,EAAA,EAAD,CAAUf,MAAOA,IACf9rB,EAAAC,EAAAC,cAAC4sB,GAAD,CAAe5X,MAAO,GAAIqE,MAAOnZ,GAAOmZ,OACtCvZ,EAAAC,EAAAC,cAAC6sB,EAAD,CAAcltB,SAAUO,GAAOQ,GAAId,SAAUoB,OAAO8rB,MAClDhtB,EAAAC,EAAAC,cAAC0sB,GAAD,KACE5sB,EAAAC,EAAAC,cAAC+sB,GAAD,WAMVP,8xIC1EFQ,EAAAC,QAAiBC,EAAAC,EAAuB","file":"static/js/main.3dabd794.chunk.js","sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { IntlProvider } from 'react-intl';\r\n\r\nconst Provider = ({ localeId, messages, children }) => (\r\n \r\n {React.Children.only(children)}\r\n \r\n);\r\n\r\nProvider.propTypes = {\r\n localeId: PropTypes.string,\r\n messages: PropTypes.object,\r\n children: PropTypes.element.isRequired,\r\n};\r\n\r\nexport default Provider;\r\n","import numeral from 'numeral';\r\nimport * as R from 'ramda';\r\nimport { addLocaleData } from 'react-intl';\r\nimport enLocaleData from 'react-intl/locale-data/en';\r\n\r\nconst model = locale => `${locale}/${locale}`;\r\n\r\nexport const setLocale = locale => numeral.locale(model(locale));\r\n\r\nexport const initialize = ({ locales = [], localeId = 'en' }) => {\r\n addLocaleData(enLocaleData);\r\n\r\n setLocale(localeId);\r\n\r\n R.forEach(locale => {\r\n const delimiters = R.prop('delimiters')(locale);\r\n if (R.isNil(delimiters)) return;\r\n numeral.register('locale', model(R.prop('id')(locale)), { delimiters });\r\n }, R.values(locales));\r\n};\r\n\r\nexport { default as I18nProvider } from './provider';\r\n","import * as R from 'ramda';\r\n\r\n//-----------------------------------------------------------------------------------------constants\r\nexport const LOG_ERROR = '@@app/LOG_ERROR';\r\nexport const PUSH_LOG = '@@app/PUSH_LOG';\r\nexport const SET_PENDING = '@@app/SET_PENDING';\r\n\r\n//------------------------------------------------------------------------------------------creators\r\nexport const pushLog = log => ({ type: PUSH_LOG, payload: { log } });\r\nexport const setPending = (id, is) => ({ type: SET_PENDING, payload: { id, is } });\r\n\r\n//-------------------------------------------------------------------------------------------reducer\r\nexport default (state = {}, action = {}) => {\r\n switch (action.type) {\r\n case PUSH_LOG:\r\n return R.over(R.lensProp('logs'), R.prepend(action.payload.log), state);\r\n case SET_PENDING:\r\n return R.assocPath(['pending', action.payload.id], action.payload.is, state);\r\n default:\r\n return state;\r\n }\r\n};\r\n","import * as R from 'ramda';\r\n\r\nexport const sdmx = R.propOr({}, 'sdmx', window.SETTINGS);\r\nexport const getDatasource = R.flip(R.prop)(R.prop('datasources', sdmx));\r\nexport const sdmxRange = R.prop('range', sdmx);\r\nexport const sdmxPeriod = R.path(['period', 'default'], sdmx);\r\nexport const sdmxPeriodBoundaries = R.pathOr([], ['period', 'boundaries'], sdmx);\r\nexport const sdmxPeriodBoundariesMinMax = {\r\n min: R.head(sdmxPeriodBoundaries),\r\n max: R.last(sdmxPeriodBoundaries),\r\n};\r\nexport const getSdmxAttribute = id =>\r\n R.pipe(R.pathOr([], ['attributes', id]), R.ifElse(R.is(Array), R.identity, R.flip(R.append)([])))(\r\n sdmx,\r\n );\r\nexport const chart = R.propOr({}, 'chart', window.SETTINGS);\r\nexport const chartOptions = R.prop('options', chart);\r\n\r\nexport const getIndicatorProfileUrl = R.path(['unicef', 'indicatorProfileUrl'], window.SETTINGS);\r\n","import * as R from 'ramda';\r\nimport md5 from 'md5';\r\n\r\nconst isValidNumber = R.both(R.is(Number), R.complement(R.equals(NaN)));\r\n\r\nexport const getIsSelected = ({ index, id, annotations, selection }) => {\r\n if (R.or(R.isEmpty(selection), R.isNil(selection))) {\r\n return R.ifElse(R.isEmpty, R.F, R.pipe(R.find(R.propEq('type', 'DEFAULT')), Boolean))(\r\n annotations,\r\n );\r\n }\r\n return !!R.prop(md5(`${index}${id}`))(selection);\r\n};\r\n\r\nexport const getSortedCodes = lang =>\r\n R.sortBy(\r\n R.pipe(\r\n R.propOr([], 'annotations'),\r\n R.find(R.propEq('type', 'ORDER')),\r\n R.prop('text'),\r\n R.propOr(0, lang),\r\n Number,\r\n R.ifElse(isValidNumber, R.identity, R.always(0)),\r\n ),\r\n );\r\n","import * as R from 'ramda';\r\nimport { getIsSelected, getSortedCodes } from './annotations';\r\n\r\nexport default structure => {\r\n const lang = R.pipe(R.pathOr([], ['meta', 'content-languages']), R.head)(structure);\r\n const dimensions = R.pipe(\r\n R.pathOr([], ['data', 'dataStructures']),\r\n R.head,\r\n R.pathOr([], ['dataStructureComponents', 'dimensionList', 'dimensions']),\r\n )(structure);\r\n const conceptSchemes = R.pathOr([], ['data', 'conceptSchemes'])(structure);\r\n\r\n if (R.any(R.anyPass([R.isNil, R.isEmpty]))([lang, dimensions, conceptSchemes])) {\r\n return { dimensions: [], dataflow: {} };\r\n }\r\n\r\n const getCodelists = R.pathOr([], ['data', 'codelists']);\r\n const codelists = getCodelists(structure);\r\n\r\n const getLocalisedName = id =>\r\n R.pipe(R.pathOr('', ['name', lang]), R.ifElse(R.isEmpty, R.always(`[${id}]`), R.identity));\r\n\r\n const getDataflow = R.pipe(\r\n R.pathOr([], ['data', 'dataflows']),\r\n R.head,\r\n R.pick(['id', 'version', 'agencyID', 'name']),\r\n ({ id, agencyID, ...rest }) => ({\r\n ...rest,\r\n code: id,\r\n agencyId: agencyID,\r\n name: getLocalisedName(id)(rest),\r\n }),\r\n );\r\n const filters = R.addIndex(R.reduce)(\r\n (acc, dimension, index) => {\r\n const getConceptIdentity = R.propOr(null, 'conceptIdentity');\r\n if (R.isNil(getConceptIdentity(dimension))) return acc;\r\n const conceptIdentity = getConceptIdentity(dimension);\r\n\r\n const getUrnToParse = R.match(/[^urn:sdmx:org.sdmx.infomodel][^.|=]+/g);\r\n if (R.isEmpty(getUrnToParse(conceptIdentity))) return acc;\r\n const conceptIdentityUrnToParse = getUrnToParse(conceptIdentity);\r\n const conceptIdentityRepresentationCode = R.last(conceptIdentityUrnToParse);\r\n\r\n const getConceptScheme = R.find(({ agencyID, id, version }) => {\r\n const getSdmxId = R.match(/=(.*\\))/);\r\n const sdmxId = R.tail(R.head(getSdmxId(conceptIdentity)));\r\n const sdmxIdRecomposed = `${agencyID}:${id}(${version})`;\r\n return sdmxIdRecomposed === sdmxId;\r\n });\r\n const conceptScheme = getConceptScheme(conceptSchemes);\r\n const getConcepts = R.propOr(null, 'concepts');\r\n if (R.isNil(getConcepts(conceptScheme))) return acc;\r\n const concepts = getConcepts(conceptScheme);\r\n\r\n const getConcept = R.find(R.propEq('id', conceptIdentityRepresentationCode));\r\n if (R.isNil(getConcept(concepts))) return acc;\r\n const concept = getConcept(concepts);\r\n\r\n const getId = R.propOr(null, 'id');\r\n if (R.isNil(getId(dimension))) return acc;\r\n const id = getId(dimension);\r\n\r\n // ---------------------------------------------------------------------------------------------\r\n // values [ ]\r\n // ---------------------------------------------------------------------------------------------\r\n\r\n const getLocalRepresentation = R.pathOr(null, ['localRepresentation', 'enumeration']);\r\n if (R.isNil(getLocalRepresentation(dimension))) return [];\r\n\r\n const localRepresentation = getLocalRepresentation(dimension);\r\n\r\n const type = R.nth(1)(getUrnToParse(localRepresentation));\r\n\r\n const getCodeList = R.find(({ agencyID, id, version }) => {\r\n const getSdmxId = R.match(/=(.*\\))/);\r\n const sdmxId = R.tail(R.head(getSdmxId(localRepresentation)));\r\n const sdmxIdRecomposed = `${agencyID}:${id}(${version})`;\r\n return sdmxIdRecomposed === sdmxId && type === 'Codelist';\r\n });\r\n\r\n if (R.isEmpty(codelists) || R.isEmpty(R.propOr([], 'codes')(getCodeList(codelists)))) {\r\n return acc;\r\n }\r\n const codes = getSortedCodes(lang)(R.propOr([], 'codes')(getCodeList(codelists)));\r\n\r\n const localisedCodes = index =>\r\n R.map(({ id, parent, name, annotations = [] }) => ({\r\n id,\r\n parentId: parent,\r\n isDefaultSelected: getIsSelected({ index, id, annotations }),\r\n //isDefaultSelected: id === 'DSB_STATUS_TOTAL' || id === 'SEX_T',\r\n label: getLocalisedName(id)({ name }),\r\n }));\r\n\r\n const parsedDimension = {\r\n id,\r\n index,\r\n roles: !R.isNil(dimension.conceptRoles) ? dimension.conceptRoles : [],\r\n values: localisedCodes(index)(codes),\r\n };\r\n\r\n return [\r\n ...acc,\r\n {\r\n ...parsedDimension,\r\n label: getLocalisedName(parsedDimension.id)(concept),\r\n },\r\n ];\r\n },\r\n [],\r\n dimensions,\r\n );\r\n return { dimensions: filters, dataflow: getDataflow(structure) };\r\n};\r\n","import * as R from 'ramda';\r\nimport qs from 'qs';\r\nimport { getDatasource } from '../settings';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nexport { default as structureParser } from './structure';\r\n\r\nexport const getFusionConfig = ({ configArgs }) => {\r\n const { datasourceId, dataflowId, agencyId, version } = R.prop('dataflow', configArgs);\r\n\r\n const datasource = getDatasource(datasourceId);\r\n if (R.isNil(datasource)) throw new Error(`Datasource undefined: datasourceId=${datasourceId}`);\r\n\r\n const identifiers = R.join(',', [agencyId, dataflowId, R.defaultTo('latest', version)]);\r\n return {\r\n url: `${R.prop('url', datasource)}/availableconstraint/${identifiers}`,\r\n datasource,\r\n };\r\n};\r\n\r\nexport const getConfig = ({ type }) => ({ configArgs }) => {\r\n if (R.not(R.includes(type, ['structure', 'data']))) throw new Error(`Invalid type: type=${type}`);\r\n\r\n const { datasourceId, dataflowId, agencyId, version } = R.prop('dataflow', configArgs);\r\n\r\n const datasource = getDatasource(datasourceId);\r\n if (R.isNil(datasource)) throw new Error(`Datasource undefined: datasourceId=${datasourceId}`);\r\n\r\n const isStructure = R.equals(type, 'structure');\r\n\r\n const keyword = isStructure ? 'dataflow' : 'data';\r\n\r\n const identifiers = R.join(isStructure ? '/' : ',', [\r\n agencyId,\r\n dataflowId,\r\n R.defaultTo('latest', version),\r\n ]);\r\n\r\n const dataquery = isStructure ? '' : `/${R.defaultTo('all', R.prop('dataquery', configArgs))}`;\r\n\r\n return {\r\n url: `${R.prop('url', datasource)}/${keyword}/${identifiers}${dataquery}`,\r\n datasource,\r\n };\r\n};\r\n\r\nexport const getDataUrl = ({ configArgs, requestArgs }) => {\r\n const period = R.prop('period', requestArgs);\r\n const url = R.prop('url', getConfig({ type: 'data' })({ configArgs }));\r\n const params = qs.stringify(\r\n { startPeriod: R.head(period), endPeriod: R.last(period) },\r\n { addQueryPrefix: true },\r\n );\r\n\r\n return `${url}${params}`;\r\n};\r\n\r\nexport const getFilename = R.pipe(\r\n R.converge(R.append, [\r\n R.pipe(R.prop('dataquery'), R.ifElse(R.isNil, R.always('all'), R.identity)),\r\n R.pipe(\r\n R.prop('dataflow'),\r\n R.pick(['datasourceId', 'dataflowId', 'agencyId', 'version']),\r\n R.values,\r\n ),\r\n ]),\r\n R.join('_'),\r\n);\r\n\r\nexport const updateDataquery = dimensions => (filterId, valueId) => dataquery => {\r\n // undefined filterId <=> no selection\r\n if (R.isNil(filterId)) return R.reduce(R.concat('.'), '', dimensions);\r\n\r\n const filterIndex = R.findIndex(R.propEq('id', filterId), dimensions);\r\n\r\n const safeDataquery = R.isNil(dataquery) ? R.reduce(R.concat('.'), '', dimensions) : dataquery;\r\n\r\n // undefined valueId <=> remove filter from selection\r\n if (R.isNil(valueId)) {\r\n return R.pipe(R.split('.'), R.update(filterIndex, ''), R.join('.'))(safeDataquery);\r\n }\r\n\r\n return R.pipe(\r\n R.split('.'),\r\n R.over(\r\n R.lensIndex(filterIndex),\r\n R.pipe(\r\n R.ifElse(R.isEmpty, R.always([]), R.split('+')),\r\n R.ifElse(R.includes(valueId), R.without([valueId]), R.append(valueId)),\r\n R.join('+'),\r\n ),\r\n ),\r\n R.join('.'),\r\n )(safeDataquery);\r\n};\r\n\r\nconst greaterThanOne = R.pipe(R.length, R.flip(R.gt)(1));\r\nconst isMany = d =>\r\n R.or(rules.isTimeDimension(R.prop('id')(d)), greaterThanOne(R.prop('values')(d)));\r\nexport const getDimensionsIds = R.pipe(R.filter(isMany), R.map(R.prop('id')));\r\nexport const getUniq = (array1, array2) => R.pipe(R.concat(array2), R.uniq)(array1);\r\n","import React from 'react';\r\nimport * as R from 'ramda';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nimport numeral from 'numeral';\r\nimport { DETableCell } from '@sis-cc/dotstatsuite-ui-components';\r\n\r\nexport const renameKeys = R.curry((keysMap, obj) =>\r\n R.reduce((acc, key) => R.assoc(keysMap[key] || key, obj[key], acc), {}, R.keys(obj)),\r\n);\r\n\r\nexport const isValidNumber = R.both(R.is(Number), R.complement(R.equals(NaN)));\r\nexport const withIndex = R.addIndex(R.map)((value, index) => R.assoc('index', index)(value));\r\n\r\nexport const observationGetter = ({\r\n observations,\r\n dimensions,\r\n customAttributes,\r\n isRtl,\r\n}) => () => coordinates => {\r\n const isUncoded = R.anyPass([\r\n R.prop('isFootnote'),\r\n () => R.equals(R.prop('name'), R.prop('id')),\r\n R.pipe(R.prop('id'), R.length, R.lte(4)),\r\n ]);\r\n\r\n const cellProps = isRtl => (value, valueFlags) => {\r\n const [uncodedFlags, codedFlags] = R.partition(isUncoded)(valueFlags);\r\n return { isRtl, value, codedFlags, uncodedFlags };\r\n };\r\n\r\n const getValueId = valueIndexes =>\r\n R.pipe(\r\n R.converge(R.prop, [R.pipe(R.prop('index'), R.nth(R.__, valueIndexes)), R.prop('values')]),\r\n R.prop('id'),\r\n );\r\n\r\n const formatDecimal = ({ customAttributes, valueIndexes }) => {\r\n const attr = R.prop('decimals', customAttributes);\r\n\r\n if (R.isNil(attr)) return R.identity;\r\n\r\n const d = Number(getValueId(valueIndexes)(attr));\r\n if (R.complement(isValidNumber)(d)) return R.identity;\r\n const format = R.equals(d, 0) ? '0' : `0,0.[${R.join('', R.times(R.always('0'), d))}]`;\r\n\r\n return value => numeral(value).format(format);\r\n };\r\n\r\n const formatScale = ({ customAttributes, valueIndexes }) => {\r\n const attr = R.prop('prefscale', customAttributes);\r\n if (R.isNil(attr)) return R.identity;\r\n\r\n const e = Number(getValueId(valueIndexes)(attr));\r\n if (R.complement(isValidNumber)(e)) return R.identity;\r\n\r\n return value => numeral(value).multiply(Math.pow(10, -1 * e));\r\n };\r\n\r\n const formatSeparator = value => {\r\n if (isValidNumber(value)) return numeral(value).format(`0,0.[0000000]`);\r\n return R.identity(value);\r\n };\r\n\r\n const getValue = customAttributes => values => {\r\n const valueIndexes = R.tail(values);\r\n\r\n return R.ifElse(\r\n isValidNumber,\r\n R.pipe(\r\n formatScale({ customAttributes, valueIndexes }),\r\n formatDecimal({ customAttributes, valueIndexes }),\r\n formatSeparator,\r\n ),\r\n R.always('-'),\r\n )(R.nth(0)(values));\r\n };\r\n\r\n const getValueFlags = attributeFlags =>\r\n R.addIndex(R.reduce)((acc, valueIndex, attributeIndex) => {\r\n if (R.isNil(valueIndex)) return acc;\r\n const flag = R.prop(attributeIndex)(attributeFlags);\r\n if (R.isNil(flag)) return acc;\r\n return R.append(\r\n R.pipe(\r\n R.prop('values'),\r\n R.nth(valueIndex),\r\n R.assoc('isFootnote')(R.prop('isFootnote')(flag)),\r\n )(flag),\r\n )(acc);\r\n }, []);\r\n\r\n const observation = R.pipe(\r\n R.toPairs,\r\n R.sortBy(\r\n R.pipe(R.prop(0), R.flip(R.prop)({ ...dimensions.many, ...dimensions.one }), R.prop('index')),\r\n ),\r\n R.pluck(1),\r\n R.join(':'),\r\n R.flip(R.propOr([]))(observations),\r\n R.converge(cellProps(isRtl), [\r\n getValue(customAttributes),\r\n R.pipe(R.tail, getValueFlags(R.prop('flags')(customAttributes))),\r\n ]),\r\n )({\r\n ...coordinates,\r\n ...R.reduce((memo, { id }) => ({ ...memo, [id]: 0 }), {})(R.values(dimensions.one)),\r\n });\r\n\r\n return ;\r\n};\r\n\r\nexport const observationFormat = ({ isRtl }) => ({ observations, dimensions, customAttributes }) =>\r\n observationGetter({\r\n dimensions,\r\n observations,\r\n customAttributes,\r\n isRtl,\r\n })(R.identity);\r\n\r\nexport const dimensionFormats = {\r\n label: rules.dimensionValueDisplay('label'),\r\n code: rules.dimensionValueDisplay('code'),\r\n both: rules.dimensionValueDisplay('both'),\r\n};\r\n\r\nexport const getDimensionGetters = intl =>\r\n R.reduce(\r\n (memo, key) => ({\r\n ...memo,\r\n [key]: intl.formatMessage({ id: `vx.config.display.${key}` }),\r\n }),\r\n {},\r\n R.keys(dimensionFormats),\r\n );\r\n\r\nexport const makeTree = items => {\r\n const hierarchy = R.reduce(\r\n (index, item) =>\r\n item.parent in index\r\n ? R.assoc(item.id, [], R.assoc(item.parent, R.append(item.id, index[item.parent]), index))\r\n : R.assoc(item.id, [], index),\r\n {},\r\n items,\r\n ); //=> E.g. {\"1\":[2],\"2\":[3],\"3\":[],\"4\":[]}\r\n const index = R.map(R.head, R.groupBy(R.prop('id'), items)); //=> E.g. {\"!\": , \"2\": , ...}\r\n const assoc = id => {\r\n const childNodes = id => R.map(makeNode, hierarchy[id]);\r\n return R.isEmpty(childNodes(id)) ? index[id] : R.assoc('childNodes', childNodes(id), index[id]);\r\n };\r\n const makeNode = id => R.dissoc('parent', assoc(id));\r\n return R.map(makeNode, R.pluck('id', R.filter(item => R.isNil(item.parent), items)));\r\n};\r\n\r\nexport const computeHasSpotlight = values => {\r\n const LIMIT = 8;\r\n if (R.gt(R.length(values), LIMIT)) return true;\r\n\r\n const computeflatArray = (acc, item) => {\r\n if (item.childNodes) return R.reduce(computeflatArray, acc, item.childNodes);\r\n return [...acc, item.id];\r\n };\r\n\r\n return R.gt(R.length(R.reduce(computeflatArray, [], values)), LIMIT);\r\n};\r\n","import { createSelector } from 'reselect';\r\nimport * as R from 'ramda';\r\nimport { sdmxPeriod } from '../lib/settings';\r\nimport { dimensionFormats } from '../lib/utils';\r\n\r\n//------------------------------------------------------------------------------------------------#0\r\nconst getVis = R.prop('vis');\r\n\r\n//------------------------------------------------------------------------------------------------#1\r\nexport const getPeriod = createSelector(\r\n getVis,\r\n R.pipe(\r\n R.prop('period'),\r\n R.ifElse(R.pipe(R.length, R.equals(2)), R.identity, R.always(sdmxPeriod)),\r\n ),\r\n);\r\n\r\nexport const getViewer = createSelector(getVis, R.prop('viewer'));\r\n\r\nexport const getAction = createSelector(getVis, R.prop('action'));\r\n\r\nexport const getDisplay = createSelector(getVis, R.prop('display'));\r\n\r\nexport const getFilter = createSelector(getVis, R.prop('filter'));\r\n\r\nexport const getDataflow = createSelector(getVis, R.prop('dataflow'));\r\n\r\nexport const getDataquery = createSelector(getVis, R.prop('dataquery'));\r\n\r\nexport const getIsFullscreen = createSelector(getVis, R.prop('isFullscreen'));\r\n\r\nexport const getTimeDimensionInverted = createSelector(getVis, R.prop('timeDimensionInverted'));\r\n\r\nexport const getLayout = createSelector(getVis, R.prop('layout'));\r\n\r\nexport const getDimensionGetter = createSelector(getVis, R.prop('dimensionGetter'));\r\n\r\nexport const getDimensionFormat = createSelector(\r\n getDimensionGetter,\r\n R.flip(R.prop)(dimensionFormats),\r\n);\r\n","import { createSelector } from 'reselect';\r\nimport * as R from 'ramda';\r\nimport Set from 'es6-set';\r\nimport { getDataquery as getVisDataquery, getDimensionFormat } from './vis';\r\nimport { getSdmxAttribute } from '../lib/settings';\r\n\r\n//------------------------------------------------------------------------------------------------#0\r\nconst getSdmx = R.prop('sdmx');\r\n\r\n//------------------------------------------------------------------------------------------------#1\r\nexport const getDimensions = createSelector(getSdmx, R.prop('dimensions'));\r\n\r\nexport const getData = createSelector(getSdmx, R.prop('data'));\r\n\r\nexport const getLayout = createSelector(getSdmx, R.prop('layout'));\r\n\r\n//------------------------------------------------------------------------------------------------#2\r\nexport const getDataquery = createSelector(\r\n getVisDataquery,\r\n getDimensions,\r\n (dataquery, dimensions) => {\r\n // dataquery in state is priority 1\r\n if (R.not(R.anyPass([R.isEmpty, R.isNil])(dataquery))) return dataquery;\r\n\r\n // dataquery extracted from dimensions default selection is priority 2\r\n return R.pipe(\r\n R.map(\r\n R.pipe(\r\n R.prop('values'),\r\n R.filter(R.propEq('isDefaultSelected', true)),\r\n R.pluck('id'),\r\n R.join('+'),\r\n ),\r\n ),\r\n R.join('.'),\r\n )(dimensions);\r\n },\r\n);\r\n\r\nexport const getCustomAttributes = createSelector(getData, getDimensionFormat, (data, format) => {\r\n const flagsSet = new Set(getSdmxAttribute('flags'));\r\n const attrs = R.pathOr([], ['structure', 'attributes', 'observation'])(data);\r\n const isFootnote = true;\r\n\r\n const customAttrs = R.addIndex(R.reduce)(\r\n (memo, { id, name, values, ...rattr }, index) => {\r\n const attr = { ...rattr, id, values, index, isFootnote, label: format({ id, name }) };\r\n\r\n // flags defined in SETTINGS are *forced* footnotes\r\n // footnote is annotation...\r\n if (flagsSet.has(id)) return R.set(R.lensPath(['flags', index]), attr, memo);\r\n\r\n // decimals is used to format the obs value\r\n // should not be considered as a footnote\r\n if (R.includes(id, getSdmxAttribute('decimals'))) return R.assoc('decimals', attr, memo);\r\n\r\n // real footnotes handling: if single valued then footnote\r\n if (R.pipe(R.length, R.equals(1))(values))\r\n return R.over(R.lensProp('footnotes'), R.append(attr), memo);\r\n\r\n // if multi valued then flag\r\n if (R.pipe(R.isEmpty, R.not)(values)) return R.set(R.lensPath(['flags', index]), attr, memo);\r\n\r\n return memo;\r\n },\r\n { flags: {} /* , decimals: undefined */, footnotes: [] },\r\n )(attrs);\r\n\r\n return customAttrs;\r\n});\r\n\r\n//------------------------------------------------------------------------------------------------#3\r\nexport const getFilters = createSelector(\r\n getDimensions,\r\n getDataquery,\r\n R.pipe(\r\n R.useWith(\r\n (filters, dataquery) =>\r\n R.addIndex(R.map)((filter, index) => {\r\n if (R.pipe(R.nth(index), R.isEmpty)(dataquery)) return filter;\r\n if (R.pipe(R.nth(index), R.isNil)(dataquery)) return filter;\r\n\r\n const valueIdsSet = new Set(R.pipe(R.nth(index), R.split('+'))(dataquery));\r\n return R.over(\r\n R.lensProp('values'),\r\n R.map(\r\n R.ifElse(({ id }) => valueIdsSet.has(id), R.assoc('isSelected', true), R.identity),\r\n ),\r\n filter,\r\n );\r\n }, filters),\r\n [R.identity, R.split('.')],\r\n ),\r\n R.filter(R.pipe(R.prop('values'), R.length, R.lt(1))),\r\n ),\r\n);\r\n\r\n//------------------------------------------------------------------------------------------------#4\r\nexport const getSelection = createSelector(\r\n getFilters,\r\n R.pipe(\r\n R.map(R.over(R.lensProp('values'), R.filter(R.propEq('isSelected', true)))),\r\n R.filter(R.pipe(R.prop('values'), R.length, R.flip(R.gt)(0))),\r\n ),\r\n);\r\n","import * as R from 'ramda';\r\nimport { updateDataquery } from '../lib/sdmx';\r\nimport { getDimensions } from '../selectors/sdmx';\r\n\r\n//-----------------------------------------------------------------------------------------constants\r\nexport const CHANGE_PERIOD = '@@vis/sdmx/CHANGE_PERIOD';\r\nexport const CHANGE_FILTER = '@@vis/CHANGE_FILTER';\r\nexport const CHANGE_VIEWER = '@@vis/CHANGE_VIEWER';\r\nexport const CHANGE_ACTION = '@@vis/CHANGE_ACTION';\r\nexport const CHANGE_DATAFLOW = '@@vis/sdmx/CHANGE_DATAFLOW';\r\nexport const CHANGE_DATAQUERY = '@@vis/sdmx/CHANGE_DATAQUERY';\r\nexport const OVERRIDE_DATAQUERY = '@@vis/sdmx/OVERRIDE_DATAQUERY';\r\nexport const CHANGE_LAYOUT = '@@vis/CHANGE_LAYOUT';\r\nexport const CHANGE_DIMENSION_GETTER = '@@vis/CHANGE_DIMENSION_GETTER';\r\nexport const CHANGE_IS_TIME_DIMENSION_INVERTED = '@@vis/CHANGE_IS_TIME_DIMENSION_INVERTED';\r\n\r\n//------------------------------------------------------------------------------------------creators\r\nexport const changePeriod = period => ({ type: CHANGE_PERIOD, payload: { period } });\r\nexport const changeFilter = filterId => ({ type: CHANGE_FILTER, payload: { filterId } });\r\nexport const changeViewer = viewerId => ({ type: CHANGE_VIEWER, payload: { viewerId } });\r\nexport const changeAction = actionId => ({ type: CHANGE_ACTION, payload: { actionId } });\r\nexport const changeDataflow = dataflow => ({ type: CHANGE_DATAFLOW, payload: { dataflow } });\r\nexport const changeLayout = layout => ({ type: CHANGE_LAYOUT, payload: { layout } });\r\nexport const changeDimensionGetter = dimensionGetter => ({\r\n type: CHANGE_DIMENSION_GETTER,\r\n payload: { dimensionGetter },\r\n});\r\nexport const changeIsTimeDimensionInverted = (id, isTimeDimensionInverted) => ({\r\n type: CHANGE_IS_TIME_DIMENSION_INVERTED,\r\n payload: { id, isTimeDimensionInverted },\r\n});\r\nexport const changeDataquery = (filterId, valueId) => (dispatch, getState) =>\r\n dispatch({\r\n type: CHANGE_DATAQUERY,\r\n payload: { filterId, valueId, dimensions: getDimensions(getState()) },\r\n });\r\n\r\n//-------------------------------------------------------------------------------------------reducer\r\nexport default (state = {}, action = {}) => {\r\n switch (action.type) {\r\n case CHANGE_ACTION:\r\n var isFullscreen = R.always(R.equals(action.payload.actionId, 'fullscreen'));\r\n return R.evolve({\r\n isFullscreen: R.ifElse(isFullscreen, R.not, R.identity),\r\n action: R.cond([\r\n [isFullscreen, R.identity],\r\n [R.equals(action.payload.actionId), R.always(undefined)],\r\n [R.T, R.always(action.payload.actionId)],\r\n ]),\r\n })(state);\r\n case CHANGE_FILTER:\r\n return R.over(\r\n R.lensProp('filter'),\r\n filter =>\r\n R.ifElse(R.equals(filter), R.always(undefined), R.identity)(\r\n R.path(['payload', 'filterId'], action),\r\n ),\r\n state,\r\n );\r\n case CHANGE_PERIOD:\r\n return R.set(R.lensProp('period'), R.path(['payload', 'period'], action), state);\r\n case CHANGE_VIEWER:\r\n return R.set(R.lensProp('viewer'), R.path(['payload', 'viewerId'], action), state);\r\n case CHANGE_LAYOUT:\r\n return R.set(R.lensProp('layout'), R.path(['payload', 'layout'], action), state);\r\n case CHANGE_DIMENSION_GETTER:\r\n return R.set(\r\n R.lensProp('dimensionGetter'),\r\n R.path(['payload', 'dimensionGetter'], action),\r\n state,\r\n );\r\n case CHANGE_IS_TIME_DIMENSION_INVERTED:\r\n return {\r\n ...state,\r\n timeDimensionInverted: R.set(\r\n R.lensProp(action.payload.id),\r\n !action.payload.isTimeDimensionInverted,\r\n state.timeDimensionInverted,\r\n ),\r\n };\r\n case CHANGE_DATAQUERY:\r\n return R.over(\r\n R.lensProp('dataquery'),\r\n updateDataquery(R.path(['payload', 'dimensions'], action))(\r\n R.path(['payload', 'filterId'], action),\r\n R.path(['payload', 'valueId'], action),\r\n ),\r\n state,\r\n );\r\n case OVERRIDE_DATAQUERY:\r\n return R.set(R.lensProp('dataquery'), R.prop('dataquery', action), state);\r\n case CHANGE_DATAFLOW:\r\n return R.pipe(\r\n R.set(R.lensProp('viewer'), 'table'),\r\n R.set(R.lensProp('dataquery'), R.path(['payload', 'dataflow', 'dataquery'], action)),\r\n R.set(R.lensProp('period'), R.path(['payload', 'dataflow', 'period'], action)),\r\n R.flip(R.merge)(R.prop('payload', action)),\r\n )(state);\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { createSelector } from 'reselect';\r\nimport * as R from 'ramda';\r\n\r\n//------------------------------------------------------------------------------------------------#0\r\nconst getApp = R.prop('app');\r\n\r\n//------------------------------------------------------------------------------------------------#1\r\nexport const getLocale = createSelector(getApp, R.prop('locale'));\r\n\r\nexport const getPending = createSelector(getApp, R.prop('pending'));\r\n\r\n//------------------------------------------------------------------------------------------------#2\r\nexport const getIsPending = id => createSelector(getPending, R.pipe(R.prop(id), R.equals(true)));\r\n\r\nexport const getIsRtl = createSelector(getLocale, R.propEq('isRtl', true));\r\n","'use strict';\r\n\r\nexport const mapStructure = (s, lang) => {\r\n const ret = {};\r\n ret.meta = {\r\n 'content-languages': [lang],\r\n schema:\r\n 'https://raw.githubusercontent.com/sdmx-twg/sdmx-json/develop/structure-message/tools/schemas/1.0/sdmx-json-structure-schema.json',\r\n };\r\n\r\n ret.data = {};\r\n\r\n //Dataflow\r\n ret.data.dataflows = s.Dataflow;\r\n renameKey(ret.data.dataflows[0], 'agencyId', 'agencyID');\r\n ret.data.dataflows[0].name = convertName(s.Dataflow[0].names);\r\n delete s.Dataflow[0].names;\r\n ret.data.dataflows[0].structure = s.Dataflow[0].dataStructureRef;\r\n ret.data.dataflows[0].links = createLinkNode('self', s.Dataflow[0].urn, 'dataflow');\r\n ret.data.dataflows[0].links = ret.data.dataflows[0].links.concat(\r\n createLinkNode('structure', s.Dataflow[0].dataStructureRef, 'datastructure'),\r\n );\r\n\r\n //conceptscheme\r\n ret.data.conceptSchemes = s.ConceptScheme;\r\n ret.data.conceptSchemes[0].name = convertName(s.ConceptScheme[0].names);\r\n delete ret.data.conceptSchemes[0].names;\r\n renameKey(ret.data.conceptSchemes[0], 'agencyId', 'agencyID');\r\n renameKey(ret.data.conceptSchemes[0], 'items', 'concepts');\r\n\r\n ret.data.conceptSchemes[0].concepts.forEach(v => {\r\n v.name = convertName(v.names);\r\n delete v.names;\r\n });\r\n ret.data.conceptSchemes[0].links = createLinkNode(\r\n 'self',\r\n s.ConceptScheme[0].urn,\r\n 'conceptscheme',\r\n );\r\n\r\n //codelists\r\n ret.data.codelists = s.Codelist;\r\n\r\n ret.data.codelists.forEach(cl => {\r\n renameKey(cl, 'agencyId', 'agencyID');\r\n cl.name = convertName(cl.names);\r\n delete cl.names;\r\n renameKey(cl, 'items', 'codes');\r\n cl.links = createLinkNode('self', cl.urn, 'codelist');\r\n\r\n if (cl.codes) {\r\n let hasUniqueRoot = isUniqueRoot(cl.codes);\r\n cl.codes.forEach(c => {\r\n c.name = convertName(c.names);\r\n delete c.names;\r\n if (c.parentCode && !hasUniqueRoot) {\r\n renameKey(c, 'parentCode', 'parent');\r\n }\r\n c.links = createLinkNode('self', c.urn, 'code');\r\n });\r\n }\r\n });\r\n\r\n /*\r\n ret.data.dataStructures = s.DataStructure;\r\n ret.data.dataStructures[0].dataStructureComponents = {};\r\n ret.data.dataStructures[0].dataStructureComponents.dimensionList = s.DataStructure[0].dimensionList;\r\n \r\n */\r\n //dataStructures\r\n ret.data.dataStructures = s.DataStructure;\r\n renameKey(ret.data.dataStructures[0], 'agencyId', 'agencyID');\r\n ret.data.dataStructures[0].dataStructureComponents = {};\r\n ret.data.dataStructures[0].name = convertName(ret.data.dataStructures[0].names);\r\n delete ret.data.dataStructures[0].names;\r\n ret.data.dataStructures[0].links = createLinkNode(\r\n 'self',\r\n ret.data.dataStructures[0].urn,\r\n 'datastructure',\r\n );\r\n //dataStructures - DimensionsList\r\n ret.data.dataStructures[0].dataStructureComponents.dimensionList =\r\n s.DataStructure[0].dimensionList;\r\n var pos = 0;\r\n var timePos = -1;\r\n ret.data.dataStructures[0].dimensionList.dimensions.forEach(d => {\r\n d.links = createLinkNode('self', d.urn, 'dimension');\r\n d.type = 'Dimension';\r\n renameKey(d, 'concept', 'conceptIdentity');\r\n d.position = pos++;\r\n if (d.representation && d.representation.representation) {\r\n d.localRepresentation = { enumeration: d.representation.representation };\r\n }\r\n if (d.isTimeDimension) {\r\n timePos = pos - 1;\r\n ret.data.dataStructures[0].dimensionList.timeDimensions = [\r\n {\r\n id: d.id,\r\n urn: d.urn,\r\n links: createLinkNode(d.links[0].rel, d.links[0].urn, d.links[0].type),\r\n position: d.position,\r\n type: d.type,\r\n conceptIdentity: d.conceptIdentity,\r\n localRepresentation: {\r\n textFormat: {\r\n textType: 'ObservationalTimePeriod',\r\n isSequence: false,\r\n isMultiLingual: false,\r\n },\r\n },\r\n },\r\n ];\r\n }\r\n });\r\n\r\n if (timePos != -1) ret.data.dataStructures[0].dimensionList.dimensions.splice(timePos, timePos);\r\n delete ret.data.dataStructures[0].dimensionList;\r\n\r\n //dataStructures - measureList\r\n ret.data.dataStructures[0].dataStructureComponents.measureList = {};\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure =\r\n s.DataStructure[0].primaryMeasure;\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.links = createLinkNode(\r\n 'self',\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.urn,\r\n 'primarymeasure',\r\n );\r\n renameKey(\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure,\r\n 'concept',\r\n 'conceptIdentity',\r\n );\r\n renameKey(\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure,\r\n 'representation',\r\n 'localRepresentation',\r\n );\r\n\r\n /* ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.localRepresentation={\r\n \"textFormat\": {\r\n \"textType\": \"Double\",\r\n \"sequence\": false\r\n }\r\n };*/\r\n delete ret.data.dataStructures[0].primaryMeasure;\r\n\r\n //dataStructures - attributeList\r\n ret.data.dataStructures[0].dataStructureComponents.attributeList =\r\n s.DataStructure[0].attributeList;\r\n\r\n if (ret.data.dataStructures[0].dataStructureComponents.attributeList) {\r\n ret.data.dataStructures[0].dataStructureComponents.attributeList.attributes.forEach(a => {\r\n if (a.mandatory) {\r\n a.assignmentStatus = 'Mandatory';\r\n } else {\r\n a.assignmentStatus = 'Conditional';\r\n }\r\n a.attributeRelationship = {\r\n dimensions: a.dimensionReferences,\r\n };\r\n renameKey(a, 'concept', 'conceptIdentity');\r\n a.links = createLinkNode('self', a.urn, 'dataattribute');\r\n if (a.representation && a.representation.representation)\r\n a.localRepresentation = { enumeration: a.representation.representation };\r\n });\r\n }\r\n\r\n delete ret.data.dataStructures[0].attributeList;\r\n\r\n /*console.log('RETURNING STRUCTURE');\r\n console.log(JSON.stringify(ret));\r\n console.log(ret);*/\r\n\r\n return ret;\r\n};\r\n\r\nfunction isUniqueRoot(codes) {\r\n if (!codes) {\r\n return false;\r\n }\r\n let noParentCount = 0;\r\n //two roots\r\n for (let i = 0; i < codes.length; i++) {\r\n if (!codes[i].parentCode) {\r\n noParentCount++;\r\n }\r\n if (noParentCount > 1) return false;\r\n }\r\n return true;\r\n}\r\n\r\nconst convertName = names => {\r\n const ret = {};\r\n names.forEach(v => {\r\n ret[v.locale] = v.value;\r\n });\r\n return ret;\r\n};\r\n\r\nconst renameKey = (object, oldKey, newKey) => {\r\n if (!object[oldKey]) return;\r\n object[newKey] = object[oldKey];\r\n delete object[oldKey];\r\n};\r\n\r\nconst createLinkNode = (rel, urn, type) => {\r\n return [{ rel: rel, urn: urn, type: type }];\r\n};\r\n\r\n/*\r\nDATA\r\n*/\r\n\r\nconst convertLanguageNode = (text, lang) => {\r\n if (text == null) return null;\r\n var ret = {};\r\n ret[lang] = text;\r\n return ret;\r\n};\r\n\r\nconst convertCodelist = (cl, lang) => {\r\n cl.name = convertLanguageNode(cl.name, lang);\r\n cl.roles = [cl.id];\r\n if (cl.values) {\r\n cl.values.forEach(v => {\r\n v.name = convertLanguageNode(v.name, lang);\r\n });\r\n }\r\n};\r\n\r\nconst convert_struct_component = (comp, lang) => {\r\n if (comp) {\r\n comp.forEach(v => {\r\n convertCodelist(v, lang);\r\n /*v.relationship= {\r\n \"primaryMeasure\": \"OBS_VALUE\"\r\n };*/\r\n });\r\n }\r\n};\r\n\r\nexport const mapData = (d, lang) => {\r\n const ret = {};\r\n //meta\r\n ret.meta = d.header;\r\n ret.meta['content-languages'] = [lang];\r\n\r\n if (!d.dataSets[0].observations) {\r\n return null;\r\n }\r\n\r\n //data\r\n ret.data = {};\r\n ret.data.dataSets = d.dataSets;\r\n ret.data.structure = {};\r\n\r\n ret.data.structure.name = {};\r\n ret.data.structure.name[lang] = d.structure.name;\r\n ret.data.structure.description = convertLanguageNode(d.structure.description);\r\n ret.data.structure.dimensions = d.structure.dimensions;\r\n ret.data.structure.attributes = d.structure.attributes;\r\n ret.data.structure.attributes.dataSet = d.structure.attributes.dataset;\r\n\r\n convert_struct_component(ret.data.structure.dimensions.dataset, lang);\r\n convert_struct_component(ret.data.structure.dimensions.series, lang);\r\n convert_struct_component(ret.data.structure.dimensions.observation, lang);\r\n convert_struct_component(ret.data.structure.attributes.dataset, lang);\r\n convert_struct_component(ret.data.structure.attributes.series, lang);\r\n convert_struct_component(ret.data.structure.attributes.observation, lang);\r\n\r\n //let toParse = true;\r\n for (let k in ret.data.dataSets[0].observations) {\r\n if (ret.data.dataSets[0].observations.hasOwnProperty(k)) {\r\n if (\r\n ret.data.dataSets[0].observations[k][0] &&\r\n !isNaN(ret.data.dataSets[0].observations[k][0])\r\n ) {\r\n ret.data.dataSets[0].observations[k][0] = parseFloat(\r\n ret.data.dataSets[0].observations[k][0],\r\n );\r\n }\r\n }\r\n }\r\n\r\n return ret;\r\n};\r\n","import * as R from 'ramda';\r\nimport axios from 'axios';\r\nimport FileSaver from 'file-saver';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nimport { structureParser, getConfig, getFilename, getFusionConfig } from '../lib/sdmx';\r\nimport { sdmxRange } from '../lib/settings';\r\nimport * as fm from './formatMapper';\r\n\r\nconst getLocale = R.pathOr('en', ['locale', 'id']);\r\nconst keysLimit = 800;\r\n\r\nconst getStructure = ({ configArgs }) => {\r\n const { url, datasource } =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION'\r\n ? getFusionConfig({ configArgs })\r\n : getConfig({ type: 'structure' })({ configArgs });\r\n\r\n const qStringParams =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION'\r\n ? { references: 'all', format: 'sdmx-json', detail: 'structureOnly', includeMetrics: true }\r\n : { references: 'all' };\r\n\r\n const acceptParam =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION'\r\n ? {\r\n 'Accept-Language': getLocale(configArgs),\r\n }\r\n : {\r\n Accept: 'application/vnd.sdmx.structure+json;version=1.0',\r\n 'Accept-Language': getLocale(configArgs),\r\n };\r\n\r\n const mapSDMX_structure = data => {\r\n return data.data;\r\n };\r\n const mapSDMX_structureFusion = data => {\r\n return fm.mapStructure(data.data, configArgs.locale.id);\r\n };\r\n\r\n const sdmxMapperStruct =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION'\r\n ? mapSDMX_structureFusion\r\n : mapSDMX_structure;\r\n\r\n return (\r\n axios\r\n .get(url, {\r\n params: R.cond([\r\n [\r\n R.always(R.prop('supportsReferencePartial', datasource)),\r\n R.assoc('detail', 'referencepartial'),\r\n ],\r\n [R.T, R.identity],\r\n ])(qStringParams),\r\n headers: acceptParam,\r\n })\r\n //.then(R.pipe(R.prop('data'), structureParser));\r\n .then(R.pipe(sdmxMapperStruct, structureParser))\r\n );\r\n};\r\n\r\nconst getData = ({ configArgs, requestArgs }) => {\r\n const { url, datasource } = getConfig({ type: 'data' })({ configArgs });\r\n\r\n const limitData = data => {\r\n const keys = Object.keys(data.data.dataSets[0].observations);\r\n if (keys.length > keysLimit) {\r\n data.data.dataSets[0].limited = {\r\n returnedKeyCount: keys.length,\r\n limitedTo: keysLimit,\r\n };\r\n for (let i = keysLimit; i < keys.length; i++) {\r\n delete data.data.dataSets[0].observations[keys[i]];\r\n }\r\n }\r\n };\r\n\r\n const mapSDMX_data = data => {\r\n limitData(data);\r\n return data.data;\r\n };\r\n const mapSDMX_dataFusion = data => {\r\n limitData(data);\r\n return fm.mapData(data.data, configArgs.locale.id);\r\n };\r\n\r\n const sdmxMapperData =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION' ? mapSDMX_dataFusion : mapSDMX_data;\r\n\r\n return (\r\n axios\r\n .get(url, {\r\n params: R.mergeRight({ dimensionAtObservation: 'AllDimensions' }, requestArgs),\r\n headers: R.cond([\r\n [\r\n R.always(R.prop('hasRangeHeader', datasource)),\r\n R.assoc('Range', `values=${R.head(sdmxRange)}-${R.last(sdmxRange)}`),\r\n ],\r\n [R.T, R.identity],\r\n ])({\r\n Accept: 'application/vnd.sdmx.data+json;version=1.0.0-wd',\r\n 'Accept-Language': getLocale(configArgs),\r\n }),\r\n })\r\n //.then(R.pipe(R.prop('data'), rules.v8Transformer));\r\n .then(R.pipe(sdmxMapperData, rules.v8Transformer))\r\n );\r\n};\r\n\r\nconst getDataFile = ({ configArgs, requestArgs }) => {\r\n const { url } = getConfig({ type: 'data' })({ configArgs });\r\n\r\n return axios\r\n .get(url, {\r\n params: requestArgs,\r\n headers: {\r\n Accept: 'application/vnd.sdmx.data+csv;file=true',\r\n 'Accept-Language': getLocale(configArgs),\r\n },\r\n responseType: 'blob',\r\n })\r\n .then(response => {\r\n const blob = new Blob([R.prop('data')(response)], {\r\n type: R.pathOr('text/csv', ['headers', 'content-type'])(response),\r\n });\r\n FileSaver.saveAs(blob, `${getFilename(configArgs)}.csv`);\r\n });\r\n};\r\n\r\nconst methods = { getStructure, getData, getDataFile };\r\n\r\nconst error = method => () => {\r\n throw new Error(`Unkown method: ${method}`);\r\n};\r\nconst main = ({ method, ...rest }) => (methods[method] || error(method))(rest);\r\nR.compose(R.forEach(([name, fn]) => (main[name] = fn)), R.toPairs)(methods);\r\n\r\nexport default main;\r\n","import * as R from 'ramda';\r\nimport { getDataflow, getPeriod } from '../selectors/vis';\r\nimport { getLocale } from '../selectors/app';\r\nimport { getDataquery } from '../selectors/sdmx';\r\nimport sdmxApi from '../api/sdmx';\r\nimport { OVERRIDE_DATAQUERY } from './vis';\r\nimport { setPending, pushLog, LOG_ERROR } from './app';\r\n\r\nconst isDev = process.env.NODE_ENV === 'development';\r\n\r\n//-----------------------------------------------------------------------------------------constants\r\nexport const HANDLE_STRUCTURE = '@@sdmx/HANDLE_STRUCTURE';\r\nexport const HANDLE_DATA = '@@sdmx/HANDLE_DATA';\r\n\r\n//--------------------------------------------------------------------------------------thunks (api)\r\nconst request = (dispatch, ctx) => {\r\n const { method } = ctx;\r\n const pendingId = ctx.pendingId || method;\r\n\r\n // eslint-disable-next-line no-console\r\n if (isDev) console.info(`request: ${pendingId}`);\r\n\r\n dispatch(setPending(pendingId, true));\r\n return sdmxApi(ctx)\r\n .then(res => {\r\n dispatch(setPending(pendingId));\r\n return res;\r\n })\r\n .catch(error => {\r\n const log = error.response\r\n ? { method, errorCode: error.response.data.errorCode, statusCode: error.response.status }\r\n : { method, error };\r\n\r\n dispatch(setPending(pendingId));\r\n dispatch(pushLog({ type: LOG_ERROR, payload: { log } }));\r\n\r\n // required to break the promised chain\r\n throw error;\r\n });\r\n};\r\n\r\nexport const requestStructure = ({ shouldRequestStructure }) => (dispatch, getState) => {\r\n if (R.not(shouldRequestStructure)) return Promise.resolve();\r\n\r\n const configArgs = {\r\n locale: getLocale(getState()),\r\n dataflow: getDataflow(getState()),\r\n };\r\n return request(dispatch, { method: 'getStructure', configArgs }).then(structure => {\r\n dispatch({ type: HANDLE_STRUCTURE, structure });\r\n });\r\n};\r\n\r\nexport const requestData = ({ shouldRequestStructure } = {}) => (dispatch, getState) => {\r\n requestStructure({ shouldRequestStructure })(dispatch, getState).then(() => {\r\n const requestArgs = {\r\n startPeriod: R.head(getPeriod(getState())),\r\n endPeriod: R.last(getPeriod(getState())),\r\n };\r\n const dataquery = getDataquery(getState());\r\n const dataflow = getDataflow(getState());\r\n const configArgs = {\r\n locale: getLocale(getState()),\r\n dataflow,\r\n dataquery,\r\n };\r\n dispatch({ type: OVERRIDE_DATAQUERY, dataquery });\r\n return request(dispatch, { method: 'getData', configArgs, requestArgs })\r\n .then(({ data, layout }) => {\r\n // UNICEF specific\r\n document.getElementById('root').dispatchEvent(\r\n new CustomEvent('unicef_dataflowLoaded', {\r\n detail: {\r\n dataflow,\r\n data,\r\n },\r\n }),\r\n );\r\n\r\n dispatch({ type: HANDLE_DATA, data, layout });\r\n })\r\n .catch(error => {\r\n let nodata = null;\r\n let nolayout = null;\r\n dispatch({ type: HANDLE_DATA, nodata, nolayout });\r\n });\r\n });\r\n};\r\n\r\nexport const requestDataFile = ({ isDownloadAllData, dataflow } = {}) => (dispatch, getState) => {\r\n const requestArgs = isDownloadAllData\r\n ? {}\r\n : { startPeriod: R.head(getPeriod(getState())), endPeriod: R.last(getPeriod(getState())) };\r\n const configArgs = R.cond([\r\n [R.always(R.not(isDownloadAllData)), R.assoc('dataquery', getDataquery(getState()))],\r\n [R.T, R.identity],\r\n ])({\r\n locale: getLocale(getState()),\r\n dataflow,\r\n });\r\n const pendingId = R.ifElse(\r\n R.has('id'),\r\n R.pipe(R.prop('id'), id => `getDataFile/${id}`),\r\n R.always('requestingDataFile'),\r\n )(dataflow);\r\n return request(dispatch, { method: 'getDataFile', configArgs, requestArgs, pendingId });\r\n};\r\n\r\n//-------------------------------------------------------------------------------------------reducer\r\nexport default (state = {}, action = {}) => {\r\n switch (action.type) {\r\n case HANDLE_STRUCTURE:\r\n return R.set(R.lensProp('dimensions'), R.path(['structure', 'dimensions'], action), state);\r\n case HANDLE_DATA:\r\n return R.pipe(\r\n R.set(R.lensProp('data'), R.prop('data', action)),\r\n R.set(R.lensProp('layout'), R.prop('layout', action)),\r\n )(state);\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport app from '../ducks/app';\r\nimport vis from '../ducks/vis';\r\nimport sdmx from '../ducks/sdmx';\r\n\r\nexport default combineReducers({ app, sdmx, vis });\r\n","import * as R from 'ramda';\r\nimport { CHANGE_DATAQUERY, CHANGE_PERIOD, CHANGE_DATAFLOW } from '../ducks/vis';\r\nimport { requestData } from '../ducks/sdmx';\r\n\r\nconst isDev = process.env.NODE_ENV === 'development';\r\n\r\nexport const requestDataMiddleware = ({ dispatch }) => next => action => {\r\n const future = next(action);\r\n\r\n if (R.pipe(R.prop('type'), R.flip(R.includes)([CHANGE_DATAQUERY, CHANGE_PERIOD]))(action)) {\r\n // eslint-disable-next-line no-console\r\n if (isDev) console.info(`requestDataMiddleware: ${action.type}`);\r\n\r\n dispatch(requestData());\r\n }\r\n\r\n if (R.pipe(R.prop('type'), R.flip(R.includes)([CHANGE_DATAFLOW]))(action)) {\r\n // eslint-disable-next-line no-console\r\n if (isDev) console.info(`requestStructureMiddleware: ${action.type}`);\r\n\r\n dispatch(requestData({ shouldRequestStructure: true }));\r\n }\r\n\r\n return future;\r\n};\r\n","import { createStore, applyMiddleware, compose } from 'redux';\r\nimport thunk from 'redux-thunk';\r\nimport { createLogger } from 'redux-logger';\r\nimport { requestDataMiddleware } from './middlewares';\r\n\r\nexport const withLogger = middlewares => {\r\n if (process.env.NODE_ENV === 'production') return middlewares;\r\n\r\n const logger = createLogger({\r\n duration: true,\r\n timestamp: false,\r\n collapsed: true,\r\n diff: true,\r\n });\r\n\r\n return [...middlewares, logger];\r\n};\r\n\r\nexport default (initialState = {}, rootReducer) => {\r\n const middlewares = [thunk, requestDataMiddleware];\r\n\r\n const enhancers = [applyMiddleware(...withLogger(middlewares))];\r\n\r\n const store = createStore(rootReducer, initialState, compose(...enhancers));\r\n\r\n return store;\r\n};\r\n","import { createMuiTheme } from '@material-ui/core/styles';\r\n\r\nexport const Colors = {\r\n GREY1: '#F0F0F0',\r\n GREY2: '#CCCCCC',\r\n GREY3: '#494444',\r\n GREY4: '#A4A1A1',\r\n GREY5: '#666666',\r\n BLUE1: '#2973BD',\r\n BLUE2: '#0965C1',\r\n BLUE3: '#2F75B5',\r\n BLUE4: '#BDD7EE',\r\n BLUE5: '#DDEBF7',\r\n BLUE6: '#1E226A',\r\n WHITE1: '#FFFFFF',\r\n BLACK1: '#000000',\r\n GREEN1: '#8CC841',\r\n ORANGE: '#f7a32c',\r\n};\r\n\r\nexport const FontSizes = {\r\n SIZE1: 18,\r\n SIZE2: 14,\r\n SIZE3: 12,\r\n};\r\n\r\nexport const Formats = {\r\n WIDE: 'initial',\r\n NARROW: 400,\r\n APP: 1000,\r\n APP_MIN_SIZE: 360,\r\n ITEM_MIN_SIZE: 350,\r\n};\r\n\r\nexport const Layout = {\r\n PADDING: '5%',\r\n SIDE_WIDTH: 300,\r\n FILTER_MAX_HEIGHT: 250,\r\n};\r\n\r\nexport const theme = (rtl = 'ltr') =>\r\n createMuiTheme({\r\n overrides: {\r\n MuiButton: {\r\n text: {\r\n textTransform: 'none',\r\n },\r\n },\r\n },\r\n palette: {\r\n primary: {\r\n main: '#137cbd',\r\n mainAlpha: '#137cbd26',\r\n light: '#5dabf0',\r\n dark: '#00508c',\r\n contrastText: '#ffffff',\r\n },\r\n secondary: {\r\n main: '#bdd7ee',\r\n light: '#f0ffff',\r\n dark: '#8ca6bc',\r\n contrastText: '#ff0000',\r\n },\r\n action: {\r\n hover: '#bdd7ee',\r\n selected: '#137cbd',\r\n active: 'rgba(19,124,189,.3)',\r\n },\r\n typography: {\r\n fontFamily: ['Segoe UI'],\r\n },\r\n raisedButton: {\r\n textColor: '#ffffff',\r\n primaryTextColor: '#ffffff',\r\n },\r\n default: {\r\n backgroundColor: '#00000026', // grey with alpha\r\n },\r\n configLabelBG: '#B5CEEB',\r\n configLabelCol: '#1C2768',\r\n },\r\n app: {\r\n appSize: Formats.APP,\r\n appMinSize: Formats.APP_MIN_SIZE,\r\n itemMinSize: Formats.ITEM_MIN_SIZE,\r\n },\r\n scopeListContainer: {\r\n maxHeight: 250,\r\n },\r\n scopeList: {\r\n divider: '#000000',\r\n },\r\n direction: rtl,\r\n typography: {\r\n // until v4 https://material-ui.com/style/typography/#migration-to-typography-v2\r\n useNextVariants: true,\r\n },\r\n configLabel: {\r\n backgroundColor: '#B5CEEB',\r\n color: '#43679F',\r\n fontFamily: 'Segoe UI',\r\n fontSize: 16,\r\n },\r\n configButtonRegular: {\r\n backgroundColor: '#B5CEEB',\r\n color: '#43679F',\r\n fontFamily: 'Segoe UI',\r\n fontSize: 16,\r\n fontWeight: 'inherit',\r\n textTransform: 'none',\r\n },\r\n configButtonSelected: {\r\n backgroundColor: '#778899',\r\n color: '#B5CEEB',\r\n fontFamily: 'Segoe UI',\r\n fontSize: 16,\r\n fontWeight: 'inherit',\r\n textTransform: 'none',\r\n },\r\n panelSummary: {\r\n backgroundColor: '#137cbd',\r\n color: 'white',\r\n fontFamily: 'Segoe UI',\r\n fontSize: 16,\r\n },\r\n panelIcon: {\r\n color: 'white',\r\n },\r\n configInputs: {\r\n backgroundColor: 'white',\r\n },\r\n alert: {\r\n color: '#c23030',\r\n hover: {\r\n backgroundColor: 'rgba(219,55,55,.15)',\r\n },\r\n active: {\r\n backgroundColor: 'rgba(219,55,55,.3)',\r\n },\r\n },\r\n table: {\r\n yBg: '#B5CEEB',\r\n yBgHover: '#c3d7ef',\r\n yBgActive: '#7e90a4',\r\n yFontHeader: '#1C2768',\r\n yFont: '#43679F',\r\n zBg: '#386CAA',\r\n zBgHover: '#5f89bb',\r\n zBgActive: '#274b76',\r\n zFontHeader: '#A2C2E4',\r\n zFont: Colors.WHITE1,\r\n xBg: Colors.WHITE1,\r\n xBgHeader: '#D7E6F4',\r\n xBgHover: '#dfebf6',\r\n xBgActive: '#96a1aa',\r\n xFontHeader: '#1C2768',\r\n xFont: '#43679F',\r\n oFont: Colors.GREY3,\r\n sBg: Colors.GREY1,\r\n },\r\n });\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeDeepRight } from 'ramda';\r\nimport { ThemeProvider } from 'glamorous';\r\nimport { mainTheme } from '@sis-cc/dotstatsuite-ui-components';\r\nimport rtl from 'jss-rtl';\r\nimport { create } from 'jss';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { theme as muiTheme } from './theme';\r\nimport JssProvider from 'react-jss/lib/JssProvider';\r\nimport { createGenerateClassName, jssPreset } from '@material-ui/core/styles';\r\n\r\n// Configure JSS\r\nconst jss = create({ plugins: [...jssPreset().plugins, rtl()] });\r\n// Custom Material-UI class name generator.\r\nconst generateClassName = createGenerateClassName();\r\n\r\nconst Provider = ({ theme, children, isRtl }) => (\r\n \r\n \r\n \r\n {React.Children.only(children)}\r\n \r\n \r\n \r\n);\r\n\r\nProvider.propTypes = {\r\n theme: PropTypes.object,\r\n children: PropTypes.element.isRequired,\r\n isRtl: PropTypes.bool,\r\n};\r\n\r\nexport default Provider;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { DELayout, DELayoutContent, DESplash } from '@sis-cc/dotstatsuite-ui-components';\r\nimport logo from '../assets/data-explorer-logo.png';\r\n\r\nclass ErrorBoundary extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { hasError: false };\r\n }\r\n\r\n componentDidCatch() {\r\n this.setState({ hasError: true });\r\n }\r\n\r\n render() {\r\n if (!this.state.hasError) return this.props.children;\r\n\r\n if (this.props.isFinal) return

Whoops, something went wrong on our end.

;\r\n\r\n return (\r\n \r\n \r\n } logo={logo} />\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nErrorBoundary.propTypes = {\r\n children: PropTypes.node,\r\n isFinal: PropTypes.bool,\r\n};\r\n\r\nexport default ErrorBoundary;\r\n","import React, { Fragment } from 'react';\r\nimport Responsive from 'react-responsive';\r\n\r\nconst Narrow = props => ;\r\nconst Default = props => ;\r\n\r\nexport default Component =>\r\n class extends React.Component {\r\n render = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n };\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps, pure } from 'recompose';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { DEFilterPeriod } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { changePeriod } from '../../ducks/vis';\r\nimport { getPeriod } from '../../selectors/vis';\r\nimport { sdmxPeriodBoundariesMinMax, sdmxPeriodBoundaries } from '../../lib/settings';\r\n\r\nexport default compose(\r\n connect(createStructuredSelector({ period: getPeriod }), { changePeriod }),\r\n withProps({\r\n titleLabel: ,\r\n //tagLabel: ,\r\n tagLabel: '',\r\n periodBoundaries: sdmxPeriodBoundaries,\r\n options: { ...sdmxPeriodBoundariesMinMax, labelStepSize: 10 },\r\n }),\r\n pure,\r\n)(DEFilterPeriod);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps, pure } from 'recompose';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { VXFiltersCurrent } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { changeDataquery } from '../../ducks/vis';\r\nimport { getSelection } from '../../selectors/sdmx';\r\n\r\nexport default compose(\r\n connect(createStructuredSelector({ items: getSelection }), { changeFilters: changeDataquery }),\r\n withProps({\r\n titleLabel: ,\r\n clearAllLabel: ,\r\n blankLabel: ,\r\n noScroll: true,\r\n }),\r\n pure,\r\n)(VXFiltersCurrent);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps, pure } from 'recompose';\r\nimport * as R from 'ramda';\r\nimport { injectIntl } from 'react-intl';\r\nimport {\r\n spotlightScopeListEngine,\r\n VXScopeList,\r\n VXSpotlight,\r\n} from '@sis-cc/dotstatsuite-ui-components';\r\nimport { changeFilter, changeDataquery } from '../../ducks/vis';\r\nimport { getFilter } from '../../selectors/vis';\r\nimport { getFilters } from '../../selectors/sdmx';\r\n\r\nconst Filter = pure(VXScopeList);\r\n\r\nexport default compose(\r\n injectIntl,\r\n connect(createStructuredSelector({ filters: getFilters, activePanelId: getFilter }), {\r\n changeSelection: changeDataquery,\r\n onChangeActivePanel: changeFilter,\r\n }),\r\n withProps(({ intl }) => ({\r\n optionsSpotlight: {\r\n hasClearAll: true,\r\n mainPlaceholder: intl.formatMessage({ id: 'vx.spotlight.placeholder.primary' }),\r\n secondaryPlaceholder: intl.formatMessage({ id: 'vx.spotlight.placeholder.secondary' }),\r\n },\r\n spotlight: {\r\n engine: spotlightScopeListEngine,\r\n placeholder: intl.formatMessage({ id: 'vx.spotlight.placeholder' }),\r\n fields: {\r\n 'vx.spotlight.field.label': {\r\n id: 'vx.spotlight.field.label',\r\n accessor: R.pipe(R.propOr(null, 'label'), R.ifElse(R.isNil, R.always(''), R.identity)),\r\n isSelected: true,\r\n },\r\n },\r\n },\r\n topElementComponent: values => (R.gte(R.length(values), 8) ? VXSpotlight : null),\r\n })),\r\n pure,\r\n)(({ topElementComponent, filters, ...parentProps }) =>\r\n R.map(\r\n ({ id, label, values }) => (\r\n \r\n ),\r\n filters,\r\n ),\r\n);\r\n","import * as R from 'ramda';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\n\r\nexport const defaultLayoutBuilder = dimensions => {\r\n const ids = R.keys(dimensions);\r\n const timeId = R.find(rules.isTimeDimension)(ids);\r\n const areaId = R.find(rules.isAreaDimension)(ids);\r\n const helper = (omitIds, pickId) =>\r\n R.pipe(\r\n R.omit(omitIds),\r\n R.ifElse(R.has(pickId), R.prop(pickId), R.pipe(R.values, R.head)),\r\n R.prop('id'),\r\n );\r\n const x = helper([], areaId)(dimensions);\r\n const y = helper([areaId, x], timeId)(dimensions);\r\n const z = R.pipe(R.omit([x, y]), R.values, R.pluck('id'))(dimensions);\r\n\r\n return {\r\n rows: R.ifElse(R.isNil, R.always([]), R.flip(R.append)([]))(x),\r\n header: R.ifElse(R.isNil, R.always([]), R.flip(R.append)([]))(y),\r\n sections: z,\r\n };\r\n};\r\n\r\nexport const defaultConcat = (array1 = []) => (array2 = []) => R.concat(array2, array1);\r\nexport const deleteItem = (key, prop) =>\r\n R.pipe(R.prop(key), R.filter(v => R.not(R.equals(v, prop))));\r\nexport const getValuesFlat = R.pipe(R.values, R.flatten);\r\n\r\nexport const adjustment = R.curry((notAvailableIds, layout) => {\r\n const withoutNotAvailableIds = R.flip(R.difference)(notAvailableIds);\r\n if (R.pipe(R.prop('rows'), withoutNotAvailableIds, R.isEmpty)(layout)) {\r\n const pivot = R.pipe(R.prop('sections'), withoutNotAvailableIds, R.isEmpty)(layout)\r\n ? 'header'\r\n : 'sections';\r\n const id = R.pipe(R.prop(pivot), withoutNotAvailableIds, R.head)(layout);\r\n return R.pipe(R.assoc('rows', R.concat([id], R.propOr([], 'rows')(layout))), layout => ({\r\n ...layout,\r\n [pivot]: deleteItem(pivot, id)(layout),\r\n }))(layout);\r\n }\r\n return layout;\r\n});\r\n\r\nexport const hasInvalidIds = layoutIds => R.pipe(R.flip(R.difference)(layoutIds), R.isEmpty, R.not);\r\nexport const isInvalid = (dimensionIds, layoutIds, layout) =>\r\n R.or(hasInvalidIds(dimensionIds)(layoutIds), R.isEmpty(layout));\r\n\r\nexport const manyFormat = (format, timeDimensionInverted) =>\r\n R.mapObjIndexed((dimension, id) => ({\r\n id,\r\n isTimePeriod: rules.isTimeDimension(id),\r\n isTimeDimensionInverted: R.prop(id)(timeDimensionInverted),\r\n label: format(dimension),\r\n value: id,\r\n }));\r\nexport const oneFormat = format =>\r\n R.mapObjIndexed((dimension, id) => ({\r\n id,\r\n label: format(dimension),\r\n value: id,\r\n isOne: true,\r\n }));\r\n\r\nexport const getDefaultLayout = (many, getMissingIds = []) => {\r\n const defaultLayout = defaultLayoutBuilder(many);\r\n const defaultMissingIds = R.pipe(getValuesFlat, getMissingIds)(defaultLayout);\r\n return R.over(R.lensProp('sections'), defaultConcat(defaultMissingIds))(defaultLayout);\r\n};\r\nexport const getLayout = (missingIds, dimensionsIds) =>\r\n R.pipe(R.over(R.lensProp('sections'), defaultConcat(missingIds)), adjustment(dimensionsIds));\r\n","import { createSelector } from 'reselect';\r\nimport * as R from 'ramda';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nimport { getData, getLayout, getDimensions } from './sdmx';\r\nimport { getTimeDimensionInverted, getLayout as getVisLayout, getDimensionFormat } from './vis';\r\nimport { withIndex } from '../lib/utils';\r\nimport * as Layout from '../lib/layout';\r\nimport * as Sdmx from '../lib/sdmx';\r\n\r\nexport const getDataDimensions = () =>\r\n createSelector(\r\n getData,\r\n R.pipe(\r\n R.pathOr([], ['structure', 'dimensions', 'observation']),\r\n R.addIndex(R.map)((dimension, index) =>\r\n R.pipe(\r\n R.assoc('index', index),\r\n R.set(R.lensProp('values'), withIndex(R.propOr([], 'values')(dimension))),\r\n )(dimension),\r\n ),\r\n ),\r\n );\r\n\r\nexport const getVisDataDimensions = () =>\r\n createSelector(\r\n getDataDimensions(),\r\n R.pipe(\r\n R.partition(R.pipe(R.propOr([], 'values'), R.length, R.flip(R.gt)(1))),\r\n R.converge(\r\n (many, one) => ({\r\n many: R.indexBy(R.prop('id'))(many),\r\n one: R.indexBy(R.prop('id'))(one),\r\n }),\r\n [R.head, R.last],\r\n ),\r\n ),\r\n );\r\n\r\nexport const getTableConfigDimensions = createSelector(\r\n getVisDataDimensions(),\r\n getDimensionFormat,\r\n getTimeDimensionInverted,\r\n ({ many, one }, format, timeDimensionInverted) =>\r\n R.mergeRight(\r\n Layout.oneFormat(format)(one),\r\n Layout.manyFormat(format, timeDimensionInverted)(many),\r\n ),\r\n);\r\n\r\nexport const getVisTableData = () =>\r\n createSelector(getTimeDimensionInverted, getData, R.uncurryN(2, rules.getTableData));\r\n\r\n//export const getLimitedTo = ()=>{return getData;}\r\nexport const getLimited = () => {\r\n //const r = R.pipe(getData,R.pathOr({limitedTo:0},['dataSets',0,'limited']));\r\n\r\n if (R.isNil(getData)) {\r\n return () => {\r\n return { limitedTo: 0, returnedKeyCount: 0 };\r\n };\r\n }\r\n const r = R.pipe(getData, R.pathOr({ limitedTo: 0 }, ['dataSets', 0, 'limited']));\r\n return r;\r\n};\r\n//data.data.dataSets[0].limitedTo=keysLimit;\r\n\r\nexport const getFlatDimensionsIds = () =>\r\n createSelector(getDimensions, getDataDimensions(), (structureDimensions, dataDimensions) =>\r\n R.useWith(Sdmx.getUniq, [Sdmx.getDimensionsIds, Sdmx.getDimensionsIds])(\r\n structureDimensions,\r\n dataDimensions,\r\n ),\r\n );\r\n\r\nexport const getVisTableConfigLayout = () =>\r\n createSelector(\r\n getVisLayout,\r\n getLayout,\r\n getFlatDimensionsIds(),\r\n getVisDataDimensions(),\r\n (visLayout = {}, sdmxLayout = {}, dimensionsIds, { many, one }) => {\r\n const layout = R.pipe(\r\n R.ifElse(R.isEmpty, R.always(sdmxLayout), R.identity),\r\n R.mergeRight({ sections: [], rows: [], header: [] }),\r\n )(visLayout);\r\n const getMissingIds = R.difference(dimensionsIds);\r\n const oneIds = R.keys(one);\r\n const layoutIds = Layout.getValuesFlat(layout);\r\n\r\n if (Layout.isInvalid(dimensionsIds, layoutIds, layout))\r\n return Layout.getDefaultLayout(many, getMissingIds);\r\n\r\n const missingIds = getMissingIds(layoutIds);\r\n if (R.isEmpty(missingIds)) return Layout.adjustment(oneIds, layout);\r\n\r\n return Layout.getLayout(missingIds, oneIds)(layout);\r\n },\r\n );\r\n\r\nexport const getVisTableLayout = () =>\r\n createSelector(getVisTableConfigLayout(), getVisDataDimensions(), (layout, { many }) => {\r\n const idsNotInMany = R.difference(Layout.getValuesFlat(layout), R.keys(many));\r\n return R.map(R.flip(R.difference)(idsNotInMany))(layout);\r\n });\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DETableConfig, VXFilterContainer } from '@sis-cc/dotstatsuite-ui-components';\r\n\r\nconst TableConfig = ({ title, ...tableProps }) => (\r\n \r\n \r\n \r\n);\r\n\r\nTableConfig.propTypes = {\r\n title: PropTypes.object,\r\n};\r\n\r\nexport default TableConfig;\r\n","import React from 'react';\r\nimport * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport { FormattedMessage, injectIntl } from 'react-intl';\r\nimport { getDimensionGetter } from '../../selectors/vis';\r\nimport { getTableConfigDimensions, getVisTableConfigLayout } from '../../selectors/table';\r\nimport {\r\n changeLayout,\r\n changeDimensionGetter,\r\n changeIsTimeDimensionInverted,\r\n} from '../../ducks/vis';\r\nimport { dimensionFormats } from '../../lib/utils';\r\nimport TableConfig from './TableConfig';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n dimensions: getTableConfigDimensions,\r\n dimensionGetter: getDimensionGetter,\r\n layout: getVisTableConfigLayout(),\r\n }),\r\n { changeLayout, changeGetter: changeDimensionGetter, changeIsTimeDimensionInverted },\r\n ),\r\n injectIntl,\r\n withProps(({ intl }) => ({\r\n isNarrow: true,\r\n noPreview: true,\r\n title: ,\r\n labels: {\r\n commit: ,\r\n cancel: ,\r\n row: ,\r\n column: ,\r\n section: ,\r\n d: ,\r\n o: ,\r\n time: ,\r\n asc: ,\r\n desc: ,\r\n help: ,\r\n table: ,\r\n one: ,\r\n },\r\n dimensionGetters: R.reduce(\r\n (memo, key) => ({ ...memo, [key]: intl.formatMessage({ id: `vx.config.display.${key}` }) }),\r\n {},\r\n R.keys(dimensionFormats),\r\n ),\r\n })),\r\n)(TableConfig);\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\n//temp disable the charts\r\n\r\nexport default [\r\n /*\r\n {\r\n label: ,\r\n id: 'table',\r\n },\r\n {\r\n label: ,\r\n id: 'chart',\r\n children: [\r\n {\r\n icon: 'timeline-line-chart',\r\n label: ,\r\n id: 'TimelineChart',\r\n },\r\n {\r\n icon: 'timeline-bar-chart',\r\n id: 'BarChart',\r\n label: ,\r\n },\r\n {\r\n icon: 'horizontal-bar-chart',\r\n id: 'RowChart',\r\n label: ,\r\n },\r\n /*{\r\n icon: 'stacked-chart',\r\n label: ,\r\n id: 'StackedBarChart',\r\n },*/\r\n /*],\r\n },*/\r\n];\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport * as R from 'ramda';\r\n\r\nexport default ({ changeActionId, requestDataFile, dataflow, isFullscreen, isNarrow }) => {\r\n const actions = [\r\n /*{\r\n icon: 'cog',\r\n id: 'config',\r\n label: ,\r\n action: () => changeActionId('config'),\r\n },*/\r\n {\r\n icon: 'import',\r\n id: 'download',\r\n label: ,\r\n children: [\r\n {\r\n id: 'csv-selection',\r\n label: ,\r\n action: () => requestDataFile({ dataflow }),\r\n },\r\n {\r\n id: 'csv-full',\r\n label: ,\r\n action: () => requestDataFile({ isDownloadAllData: true, dataflow }),\r\n },\r\n ],\r\n },\r\n {\r\n icon: isFullscreen ? 'minimize' : 'maximize',\r\n id: 'fullscreen',\r\n label: ,\r\n action: () => changeActionId('fullscreen'),\r\n },\r\n ];\r\n\r\n const filtersBtn = {\r\n icon: 'filter-list',\r\n id: 'filters',\r\n label: ,\r\n action: () => changeActionId('filters'),\r\n };\r\n\r\n return R.pipe(R.ifElse(R.always(isNarrow), R.prepend(filtersBtn), R.identity))(actions);\r\n};\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { DEVisualisationToolbar } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { getIsPending } from '../../selectors/app';\r\nimport { getDataflow } from '../../selectors/vis';\r\nimport { changeViewer, changeAction } from '../../ducks/vis';\r\nimport { requestDataFile } from '../../ducks/sdmx';\r\nimport menus from './menus';\r\nimport actions from './actions';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isDownloading: getIsPending('requestingDataFile'),\r\n dataflow: getDataflow,\r\n }),\r\n { changeMenu: changeViewer, changeActionId: changeAction, requestDataFile },\r\n ),\r\n withProps(({ isDownloading, viewerId, actionId, ...rest }) => ({\r\n loadingActionId: isDownloading ? 'download' : null,\r\n selectedMenuId: viewerId,\r\n selectedActionId: actionId,\r\n actions: actions({ ...rest, viewerId }),\r\n menus,\r\n showLabel: ,\r\n })),\r\n)(DEVisualisationToolbar);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { VXFilterContainer } from '@sis-cc/dotstatsuite-ui-components';\r\nimport FilterPeriod from '../FilterPeriod';\r\nimport FilterSelection from '../FilterSelection';\r\nimport Filters from '../Filters';\r\nimport Toolbar from '../Toolbar';\r\nimport TableConfig from '../TableConfig';\r\n\r\nconst Tools = ({\r\n isNarrow,\r\n isRtl,\r\n isFullscreen,\r\n actionId,\r\n /*isChartConfig,*/\r\n isFilters,\r\n}) => (\r\n \r\n \r\n {/*\r\n \r\n */}\r\n {isNarrow && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n);\r\n\r\nTools.propTypes = {\r\n isNarrow: PropTypes.bool,\r\n isRtl: PropTypes.bool,\r\n isFullscreen: PropTypes.bool,\r\n isChartConfig: PropTypes.bool,\r\n isFilters: PropTypes.bool,\r\n actionId: PropTypes.string,\r\n};\r\n\r\nexport default Tools;\r\n","import { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport * as R from 'ramda';\r\nimport { getViewer, getAction } from '../../selectors/vis';\r\nimport Tools from './Tools';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n actionId: getAction,\r\n viewerId: getViewer,\r\n }),\r\n ),\r\n withProps(({ actionId, viewerId }) => ({\r\n isChartConfig: R.equals('config', actionId) && !R.equals('table', viewerId),\r\n isFilters: R.equals('filters', actionId),\r\n })),\r\n)(Tools);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst FooterUnicef = ({ label, showCopyrightSymbol }) => {\r\n let copy = '\\u00a9';\r\n return (\r\n
\r\n {showCopyrightSymbol ? copy : null}\r\n {label}\r\n
\r\n );\r\n};\r\n\r\nFooterUnicef.propTypes = {\r\n label: PropTypes.string,\r\n showCopyrightSymbol: PropTypes.bool,\r\n};\r\n\r\nexport default FooterUnicef;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DETableCell } from '@sis-cc/dotstatsuite-ui-components';\r\nimport glamorous from 'glamorous';\r\n\r\nconst StyledCell = glamorous.div(\r\n {\r\n width: '100%',\r\n height: '100%',\r\n padding: '4px 6px',\r\n fontSize: 16,\r\n textAlign: 'right',\r\n },\r\n ({ isYLast, isXLast, theme }) => ({\r\n color: theme.table.oFont,\r\n borderTop: `1px solid ${theme.table.border}`,\r\n borderLeft: `1px solid ${theme.table.border}`,\r\n borderRight: isYLast ? `1px solid ${theme.table.border}` : null,\r\n borderBottom: isXLast ? null : `1px solid ${theme.table.border}`,\r\n backgroundColor: theme.table.xBg,\r\n }),\r\n);\r\n\r\nconst Cell = ({ renderObservation, variant }) => (\r\n \r\n \r\n \r\n \r\n {renderObservation()}\r\n \r\n);\r\n\r\nCell.propTypes = {\r\n renderObservation: PropTypes.func,\r\n variant: PropTypes.string,\r\n};\r\n\r\nexport default Cell;\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\n//temp disable the charts\r\n\r\nexport default [\r\n /*\r\n {\r\n label: ,\r\n id: 'table',\r\n },\r\n {\r\n label: ,\r\n id: 'chart',\r\n children: [\r\n {\r\n icon: 'timeline-line-chart',\r\n label: ,\r\n id: 'TimelineChart',\r\n },\r\n {\r\n icon: 'timeline-bar-chart',\r\n id: 'BarChart',\r\n label: ,\r\n },\r\n {\r\n icon: 'horizontal-bar-chart',\r\n id: 'RowChart',\r\n label: ,\r\n },\r\n /*{\r\n icon: 'stacked-chart',\r\n label: ,\r\n id: 'StackedBarChart',\r\n },*/\r\n /*],\r\n },*/\r\n];\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport * as R from 'ramda';\r\n\r\nexport default ({ requestDataFile, dataflow }) => {\r\n const actions = [\r\n {\r\n icon: 'import',\r\n id: 'download',\r\n label: ,\r\n children: [\r\n {\r\n id: 'csv-selection',\r\n label: ,\r\n action: () => requestDataFile({ dataflow }),\r\n },\r\n {\r\n id: 'csv-full',\r\n label: ,\r\n action: () => requestDataFile({ isDownloadAllData: true, dataflow }),\r\n },\r\n ],\r\n },\r\n ];\r\n\r\n return actions;\r\n};\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { DEVisualisationToolbar } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { getIsPending } from '../../selectors/app';\r\nimport { getDataflow, getAction, getViewer } from '../../selectors/vis';\r\nimport { changeViewer, changeAction } from '../../ducks/vis';\r\nimport { requestDataFile } from '../../ducks/sdmx';\r\nimport menus from './menus';\r\nimport actions from './actions';\r\nimport * as R from 'ramda';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isDownloading: getIsPending('requestingDataFile'),\r\n dataflow: getDataflow,\r\n actionId: getAction,\r\n viewerId: getViewer,\r\n }),\r\n { changeMenu: changeViewer, changeActionId: changeAction, requestDataFile },\r\n ),\r\n withProps(({ isDownloading, viewerId, actionId, ...rest }) => ({\r\n loadingActionId: isDownloading ? 'download' : null,\r\n selectedMenuId: viewerId,\r\n selectedActionId: actionId,\r\n actions: actions({ ...rest, viewerId }),\r\n menus,\r\n showLabel: ,\r\n isFilters: R.equals('filters', actionId),\r\n })),\r\n)(DEVisualisationToolbar);\r\n\r\n/*\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isDownloading: getIsPending('requestingDataFile'),\r\n dataflow: getDataflow,\r\n actionId:getAction,\r\n viewerId:getViewer,\r\n }),\r\n { changeMenu: changeViewer, changeActionId: changeAction, requestDataFile },\r\n ),\r\n withProps(({ isDownloading, viewerId, actionId, ...rest }) => ({\r\n loadingActionId: isDownloading ? 'download' : null,\r\n selectedMenuId: viewerId,\r\n selectedActionId: actionId,\r\n actions: actions({ ...rest, viewerId }),\r\n menus,\r\n showLabel: ,\r\n isFilters:R.equals('filters', actionId),\r\n })),\r\n)(DEVisualisationToolbar);*/\r\n","import React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst TableMessageUnicef = ({ returnedKeyCount, limitedTo, animationMillis }) => {\r\n if (!returnedKeyCount) {\r\n return null;\r\n }\r\n if (!limitedTo) {\r\n return null;\r\n }\r\n if (limitedTo == 0) return null;\r\n\r\n const msgBoxId = 'dataLimited_msgBox';\r\n\r\n useEffect(() => {\r\n setTimeout(() => {\r\n const el = document.getElementById(msgBoxId);\r\n const onTransEnd = () => {\r\n document.getElementById(msgBoxId).style.display = 'none';\r\n el.removeEventListener('transitionend', onTransEnd);\r\n };\r\n\r\n el.addEventListener('transitionend', onTransEnd, false);\r\n document.getElementById(msgBoxId).classList.add('dataLimited_msgBox_trans');\r\n }, 5000);\r\n });\r\n\r\n return (\r\n
\r\n

\r\n Your selection returned {returnedKeyCount} values, the visualization has been limited to\r\n {' ' + limitedTo} values to avoid slowing down your browser.\r\n

\r\n

\r\n Please limit your query by further filtering your data, or use the "Download"\r\n button to download the entire dataset in CSV format.\r\n

\r\n \r\n
\r\n );\r\n};\r\n\r\nTableMessageUnicef.propTypes = {\r\n returnedKeyCount: PropTypes.number,\r\n limitedTo: PropTypes.number,\r\n animationMillis: PropTypes.number,\r\n};\r\n\r\nexport default TableMessageUnicef;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { getIndicatorProfileUrl } from '../../lib/settings';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst createLink = indId => {\r\n const url = getIndicatorProfileUrl + '/' + indId;\r\n return url;\r\n};\r\n\r\nconst IndicatorLinkUnicef = ({ data, selItems }) => {\r\n let indicators = null;\r\n if (selItems) {\r\n selItems.forEach(element => {\r\n if (element.id == 'INDICATOR') indicators = element.values;\r\n });\r\n }\r\n if (!indicators) {\r\n return null;\r\n }\r\n const items = [];\r\n indicators.forEach(el => {\r\n items.push(\r\n \r\n {el.label}\r\n ,\r\n );\r\n });\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n\r\n {items}\r\n
\r\n );\r\n};\r\n\r\nIndicatorLinkUnicef.propTypes = {\r\n data: PropTypes.object,\r\n selItems: PropTypes.array,\r\n};\r\n\r\nexport default IndicatorLinkUnicef;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { SDMXTable } from '@sis-cc/dotstatsuite-ui-components';\r\nimport SisHeader from '@sis-cc/dotstatsuite-ui-header';\r\n//import SisFooter from '@sis-cc/dotstatsuite-ui-footer';\r\nimport FooterUnicef from '../FooterUnicef';\r\nimport glamorous from 'glamorous';\r\nimport Cell from './Cell';\r\n//import Tools from '../Tools';\r\nimport Toolbar from '../ToolbarUnicef';\r\nimport TableMessageUnicef from '../TableMessageUnicef';\r\nimport IndicatorLinkUnicef from '../IndicatorLinkUnicef';\r\n\r\nconst TableContainer = glamorous.div({\r\n borderLeftWidth: 0,\r\n borderRightWidth: 0,\r\n marginTop: 10, // sync style with chart\r\n\r\n overflowX: 'auto',\r\n});\r\n\r\nconst Table = ({\r\n header,\r\n viewerConfig,\r\n data,\r\n layoutIds,\r\n renderObservation,\r\n itemFormatter,\r\n isNotATable,\r\n footnotes,\r\n variant,\r\n limited,\r\n selItems,\r\n}) => (\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n {isNotATable ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
\r\n);\r\n\r\nTable.propTypes = {\r\n header: PropTypes.object,\r\n viewerConfig: PropTypes.object,\r\n source: PropTypes.object,\r\n data: PropTypes.object,\r\n footnotes: PropTypes.object,\r\n layoutIds: PropTypes.object,\r\n renderObservation: PropTypes.func,\r\n itemFormatter: PropTypes.func,\r\n isNotATable: PropTypes.bool,\r\n variant: PropTypes.string,\r\n limited: PropTypes.object,\r\n selItems: PropTypes.array,\r\n};\r\n\r\nexport default Table;\r\n","import * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, mapProps } from 'recompose';\r\nimport {\r\n getVisDataDimensions,\r\n getVisTableLayout,\r\n getVisTableData,\r\n getLimited,\r\n} from '../../selectors/table';\r\nimport { getDimensionFormat, getDimensionGetter } from '../../selectors/vis';\r\nimport { getCustomAttributes } from '../../selectors/sdmx';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nimport { DETableCell } from '@sis-cc/dotstatsuite-ui-components';\r\nimport Table from './Table';\r\nimport { getSelection } from '../../selectors/sdmx';\r\n\r\nconst Cell = connect(createStructuredSelector({ variant: getDimensionGetter }))(DETableCell);\r\n\r\n/*export default compose(\r\n connect(createStructuredSelector({ items: getSelection }), { changeFilters: changeDataquery }),\r\n withProps({\r\n titleLabel: ,\r\n clearAllLabel: ,\r\n blankLabel: ,\r\n noScroll: true,\r\n }),\r\n pure,\r\n)(VXFiltersCurrent);\r\n*/\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n dimensions: getVisDataDimensions(),\r\n customAttributes: getCustomAttributes,\r\n layoutIds: getVisTableLayout(),\r\n itemFormatter: getDimensionFormat,\r\n data: getVisTableData(),\r\n variant: getDimensionGetter,\r\n limited: getLimited(),\r\n selItems: getSelection,\r\n }),\r\n ),\r\n mapProps(\r\n ({\r\n chartData,\r\n viewerConfig,\r\n data,\r\n customAttributes,\r\n dimensions,\r\n layoutIds,\r\n itemFormatter,\r\n variant,\r\n limited,\r\n selItems,\r\n }) => ({\r\n viewerConfig,\r\n data,\r\n layoutIds,\r\n itemFormatter,\r\n renderObservation: rules.observationGetter(Cell)({\r\n observations: R.prop('observations', data),\r\n dimensions,\r\n customAttributes,\r\n isRtl: false,\r\n })(R.identity),\r\n // little dirty for now, in the wait of a better common mgmt of table and charts\r\n header: R.pick(['title', 'subtitle', 'uprs'], chartData),\r\n footnotes: R.prop('footnotes', chartData),\r\n isNotATable: R.pipe(R.prop('observations'), R.values, R.length, R.equals(1))(data),\r\n variant,\r\n limited,\r\n selItems,\r\n }),\r\n ),\r\n)(Table);\r\n","import { Chart } from '@sis-cc/dotstatsuite-components';\r\nimport { mapProps } from 'recompose';\r\n\r\nexport default mapProps(({ chartData, chartOptions, viewerConfig, type }) => ({\r\n data: chartData,\r\n options: chartOptions,\r\n config: viewerConfig,\r\n type,\r\n}))(Chart);\r\n","const fonts = { fontFamily: 'Segoe UI' };\r\n\r\nexport default {\r\n owner: 'UNICEF',\r\n logo: '',\r\n footer_visible: false,\r\n fonts: {\r\n header: { subtitle: fonts, title: fonts, uprs: fonts, tooltip: fonts },\r\n chart: {\r\n axisLegend: fonts,\r\n chartLegend: fonts,\r\n tooltip: { primary: fonts, secondary: fonts },\r\n },\r\n footer: { copyright: fonts, source: fonts },\r\n },\r\n};\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, branch, renderComponent, withProps } from 'recompose';\r\nimport * as R from 'ramda';\r\nimport { VXNoData } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { getViewer } from '../../selectors/vis';\r\nimport Table from '../Table';\r\nimport Chart from '../Chart';\r\nimport viewerConfig from './config';\r\n\r\nexport default compose(\r\n connect(createStructuredSelector({ type: getViewer })),\r\n withProps({ viewerConfig }),\r\n branch(\r\n R.pipe(R.prop('data'), R.isNil),\r\n renderComponent(() => } />),\r\n ),\r\n branch(({ type }) => R.equals(type, 'table'), renderComponent(Table)),\r\n)(Chart);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport * as R from 'ramda';\r\nimport { VXFilterContainerCollapsible } from '@sis-cc/dotstatsuite-ui-components';\r\nimport List from '@material-ui/core/List';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport ListItemText from '@material-ui/core/ListItemText';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst Footnotes = ({ footnotes }) => (\r\n }\r\n isOpen={true}\r\n noScroll\r\n >\r\n \r\n {R.map(({ id, label, values }) => (\r\n \r\n \r\n \r\n ))(footnotes)}\r\n \r\n \r\n);\r\n\r\nFootnotes.propTypes = {\r\n footnotes: PropTypes.array,\r\n};\r\n\r\nexport default Footnotes;\r\n","import * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, mapProps } from 'recompose';\r\nimport { getCustomAttributes } from '../../selectors/sdmx';\r\nimport Footnotes from './Footnotes';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n attributes: getCustomAttributes,\r\n }),\r\n ),\r\n mapProps(\r\n R.pipe(\r\n R.prop('attributes'),\r\n R.pick(['footnotes']),\r\n R.prop('footnotes'),\r\n R.reject(\r\n R.pipe(\r\n R.prop('id'),\r\n R.flip(R.includes)(['UNIT_MEASURE']), // UNICEF specific\r\n ),\r\n ),\r\n R.assoc('footnotes', R.__, {}),\r\n ),\r\n ),\r\n)(Footnotes);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { VXLoader } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { RulesDriver } from '@sis-cc/dotstatsuite-components';\r\nimport Tools from '../Tools';\r\nimport Viewer from '../Viewer';\r\nimport Footnotes from '../Footnotes';\r\n\r\nconst Main = ({\r\n data,\r\n enhancedData,\r\n isRtl,\r\n isNarrow,\r\n isFullscreen,\r\n isLoadingData,\r\n display,\r\n formaterIds,\r\n type,\r\n options,\r\n dataUrl,\r\n}) => (\r\n (\r\n
\r\n {/* */}\r\n {isLoadingData && (\r\n }\r\n isLarge\r\n />\r\n )}\r\n {!isLoadingData && (\r\n \r\n \r\n
\r\n \r\n
\r\n )}\r\n
\r\n )}\r\n />\r\n);\r\n\r\nMain.propTypes = {\r\n data: PropTypes.object,\r\n enhancedData: PropTypes.object,\r\n display: PropTypes.string,\r\n formaterIds: PropTypes.object,\r\n type: PropTypes.string,\r\n options: PropTypes.object,\r\n dataUrl: PropTypes.string,\r\n isNarrow: PropTypes.bool,\r\n isRtl: PropTypes.bool,\r\n isLoadingData: PropTypes.bool,\r\n isFullscreen: PropTypes.bool,\r\n};\r\n\r\nexport default Main;\r\n","import * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport { getData } from '../../selectors/sdmx';\r\nimport { getLocale, getIsPending } from '../../selectors/app';\r\nimport { getDisplay, getPeriod, getDataquery, getDataflow, getViewer } from '../../selectors/vis';\r\nimport { getDataUrl } from '../../lib/sdmx';\r\nimport { getSdmxAttribute, chartOptions } from '../../lib/settings';\r\nimport Main from './Main';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isLoadingData: getIsPending('getData'),\r\n display: getDisplay,\r\n type: getViewer,\r\n data: getData,\r\n dataflow: getDataflow,\r\n dataquery: getDataquery,\r\n locale: getLocale,\r\n period: getPeriod,\r\n }),\r\n ),\r\n withProps(({ data, dataflow, dataquery, locale, period }) => ({\r\n dataUrl: getDataUrl({ configArgs: { dataflow, dataquery, locale }, requestArgs: { period } }),\r\n options: chartOptions,\r\n formaterIds: {\r\n decimals: getSdmxAttribute('decimals'),\r\n prefscale: getSdmxAttribute('prefscale'),\r\n },\r\n enhancedData: data,\r\n })),\r\n)(Main);\r\n\r\n/*\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isLoadingData: getIsPending('getData'),\r\n display: getDisplay,\r\n type: getViewer,\r\n data: getData,\r\n dataflow: getDataflow,\r\n dataquery: getDataquery,\r\n locale: getLocale,\r\n period: getPeriod,\r\n }),\r\n ),\r\n withProps(({ data, dataflow, dataquery, locale, period }) => ({\r\n dataUrl: getDataUrl({ configArgs: { dataflow, dataquery, locale }, requestArgs: { period } }),\r\n options: chartOptions,\r\n formaterIds: {\r\n decimals: getSdmxAttribute('decimals'),\r\n prefscale: getSdmxAttribute('prefscale'),\r\n },\r\n enhancedData: R.over(\r\n R.lensPath(['structure', 'dimensions', 'observation']),\r\n //R.append({ id: 'FREQ', values: [{ id: 'A' }] }), is this hardcoded?\r\n R.append({ id: 'Frequency', values: [{ id: 'Annual' }] }),\r\n data,\r\n ),\r\n })),\r\n)(Main);\r\n*/\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport {\r\n DELayout,\r\n DELayoutContent,\r\n DELayoutSide,\r\n DELayoutMain,\r\n VXLoader,\r\n} from '@sis-cc/dotstatsuite-ui-components';\r\nimport FilterPeriod from '../FilterPeriod';\r\nimport FilterSelection from '../FilterSelection';\r\nimport Filters from '../Filters';\r\nimport TableConfig from '../TableConfig';\r\nimport Main from '../Main';\r\n\r\nconst App = ({ isNarrow, isRtl, isLoadingStructure, isLoadingData, isFullscreen }) => (\r\n \r\n \r\n {isLoadingStructure && (\r\n }\r\n isLarge\r\n />\r\n )}\r\n \r\n {!(isLoadingStructure || isNarrow) && (\r\n \r\n \r\n \r\n \r\n
{!isLoadingData && }
\r\n
\r\n )}\r\n {!isLoadingStructure && (\r\n \r\n
\r\n \r\n )}\r\n \r\n);\r\n\r\nApp.propTypes = {\r\n isNarrow: PropTypes.bool,\r\n isRtl: PropTypes.bool,\r\n isLoadingStructure: PropTypes.bool,\r\n isLoadingData: PropTypes.bool,\r\n isFullscreen: PropTypes.bool,\r\n};\r\n\r\nexport default App;\r\n","import * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, branch, renderNothing } from 'recompose';\r\nimport { getIsPending, getIsRtl } from '../../selectors/app';\r\nimport { getIsFullscreen, getDataflow } from '../../selectors/vis';\r\nimport withResponsiveness from '../../hocs/withResponsiveness';\r\nimport App from './App';\r\n\r\nexport default compose(\r\n withResponsiveness,\r\n connect(\r\n createStructuredSelector({\r\n isLoadingStructure: getIsPending('getStructure'),\r\n isLoadingData: getIsPending('getData'),\r\n isRtl: getIsRtl,\r\n isFullscreen: getIsFullscreen,\r\n dataflow: getDataflow,\r\n }),\r\n ),\r\n branch(R.pipe(R.prop('dataflow'), R.isNil), renderNothing),\r\n)(App);\r\n","import React from 'react';\r\nimport { render } from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport '@blueprintjs/core/dist/blueprint.css';\r\nimport { I18nProvider, initialize as initializeI18n } from './i18n';\r\nimport { createStore, reducer } from './core';\r\nimport ThemeProvider from './theme';\r\nimport ErrorBoundary from './components/Error';\r\nimport App from './components/App';\r\nimport { changeDataflow } from './ducks/vis';\r\nimport './index.css';\r\nimport meta from '../../package.json';\r\n\r\nvar ES6_Error = false;\r\nif (!(typeof window.ES6_Error === 'undefined')) {\r\n ES6_Error = window.ES6_Error;\r\n}\r\nif (ES6_Error) {\r\n throw new Error('Browser not Supported');\r\n}\r\n\r\nconsole.info(`${meta.name}@${meta.version}`); // eslint-disable-line no-console\r\n\r\ninitializeI18n(window.SETTINGS.i18n);\r\nconst locale = window.SETTINGS.i18n.locales[window.SETTINGS.i18n.localeId];\r\n\r\nconst initialState = {\r\n app: {\r\n logs: [],\r\n pending: {},\r\n locale,\r\n },\r\n vis: {\r\n filter: undefined, // id of the expanded filter: ''\r\n viewer: 'table', // id of the viewer element to display\r\n action: undefined, // id of the current tool action: ''\r\n period: undefined, // period: [start, end]\r\n dataflow: undefined, // dataflow identifiers: {datasourceId, dataflowId, agencyId, version}\r\n isFullscreen: false, // fullscreen mode\r\n dataquery: undefined, // dataquery: ''\r\n display: 'label', // sdmx display mode: '' in label, code, both\r\n timeDimensionInverted: {}, // sdmx time direction: obj of bools, true asc - false desc\r\n layout: undefined, // layout of the table\r\n dimensionGetter: 'label', // accessor of the dimension for labelling\r\n },\r\n sdmx: {\r\n dimensions: [],\r\n data: undefined,\r\n layout: {},\r\n },\r\n};\r\nconst store = createStore(initialState, reducer);\r\n\r\nconsole.log('initialized with DATAFLOW:', window.DATAFLOW); // eslint-disable-line no-console\r\nstore.dispatch(changeDataflow(window.DATAFLOW));\r\n\r\nconst ROOT = document.getElementById('root');\r\nROOT.addEventListener('unicef_changeDataflow', event =>\r\n store.dispatch(changeDataflow(event.detail)),\r\n);\r\nconsole.log(`listen unicef_changeDataflow event`); // eslint-disable-line no-console\r\n\r\nrender(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n ROOT,\r\n);\r\n","module.exports = __webpack_public_path__ + \"static/media/data-explorer-logo.707f6ef1.png\";"],"sourceRoot":""} \ No newline at end of file diff --git a/de/static/js/main.6dc7960f.chunk.js b/de/static/js/main.6dc7960f.chunk.js deleted file mode 100644 index 8895738..0000000 --- a/de/static/js/main.6dc7960f.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{2083:function(e,a,t){},2086:function(e,a,t){"use strict";t.r(a);var n=t(0),r=t.n(n),o=t(20),i=t(52),s=(t(321),t(115)),c=t.n(s),l=t(585),d=t(264),u=t(406),m=t(407),p=t(19),f=t(920),b=t.n(f),v=function(e){var a=e.localeId,t=e.messages,n=e.children;return r.a.createElement(p.b,{locale:a,key:a,messages:t[a]},r.a.Children.only(n))},g=function(e){return"".concat(e,"/").concat(e)},y=t(153),h=t(408),E=t(586),w=t(410),j=t(411),O=function(e,a){return{type:"@@app/SET_PENDING",payload:{id:e,is:a}}},I=t(65),S=t(179),D=t(55),x=t(662),C=t(590),A=t(420),N=t(178),T=t(661),L=t(655),F=t(102),R=t(685),k=t(433),_=t(176),G=t(678),P=t(671),B=t(413),H=t(668),q=t(414),M=t(415),U=t(421),V=t(591),z=t(683),X=t(69),W=t(268),Y=t(917),K=t(684),Q=t(687),$=t(269),J=t(672),Z=t(670),ee=t(690),ae=t(428),te=t(665),ne=t(423),re=t(272),oe=t(57),ie=t(270),se=t(921),ce=t.n(se),le=t(589),de=t(412),ue=t(416),me=le.a({},"sdmx",window.SETTINGS),pe=_.a(d.a)(d.a("datasources",me)),fe=d.a("range",me),be=F.a(["period","default"],me),ve=de.a([],["period","boundaries"],me),ge={min:q.a(ve),max:M.a(ve)},ye=function(e){return k.a(de.a([],["attributes",e]),C.a(ue.a(Array),N.a,_.a(V.a)([])))(me)},he=le.a({},"chart",window.SETTINGS),Ee=d.a("options",he),we=F.a(["unicef","indicatorProfileUrl"],window.SETTINGS),je=t(71),Oe=t(156),Ie=t(89),Se=t(916),De=t(658),xe=t(657),Ce=t(677),Ae=t(915),Ne=t(177),Te=t(128),Le=t(659),Fe=t(660),Re=t(654),ke=t(686),_e=t(924),Ge=t.n(_e),Pe=Le.a(ue.a(Number),Fe.a(D.a(NaN))),Be=function(e){var a=e.index,t=e.id,n=e.annotations,r=e.selection;return ne.a(Z.a(r),u.a(r))?C.a(Z.a,Re.a,k.a(Ae.a(K.a("type","DEFAULT")),Boolean))(n):!!d.a(Ge()("".concat(a).concat(t)))(r)},He=function(e){var a=k.a(de.a([],["meta","content-languages"]),q.a)(e),t=k.a(de.a([],["data","dataStructures"]),q.a,de.a([],["dataStructureComponents","dimensionList","dimensions"]))(e),n=de.a([],["data","conceptSchemes"])(e);if(Se.a(De.a([u.a,Z.a]))([a,t,n]))return{dimensions:[],dataflow:{}};var r=de.a([],["data","codelists"])(e),o=function(e){return k.a(de.a("",["name",a]),C.a(Z.a,S.a("[".concat(e,"]")),N.a))},i=k.a(de.a([],["data","dataflows"]),q.a,z.a(["id","version","agencyID","name"]),function(e){var a=e.id,t=e.agencyID,n=Object(Ie.a)(e,["id","agencyID"]);return Object(I.a)({},n,{code:a,agencyId:t,name:o(a)(n)})});return{dimensions:xe.a(X.a)(function(e,t,i){var s=le.a(null,"conceptIdentity");if(u.a(s(t)))return e;var c=s(t),l=Ce.a(/[^urn:sdmx:org.sdmx.infomodel][^.|=]+/g);if(Z.a(l(c)))return e;var m=l(c),p=M.a(m),f=Ae.a(function(e){var a=e.agencyID,t=e.id,n=e.version,r=Ce.a(/=(.*\))/),o=Ne.a(q.a(r(c)));return"".concat(a,":").concat(t,"(").concat(n,")")===o})(n),b=le.a(null,"concepts");if(u.a(b(f)))return e;var v=b(f),g=Ae.a(K.a("id",p));if(u.a(g(v)))return e;var y=g(v),h=le.a(null,"id");if(u.a(h(t)))return e;var E=h(t),w=de.a(null,["localRepresentation","enumeration"]);if(u.a(w(t)))return[];var j=w(t),O=Te.a(1)(l(j)),D=Ae.a(function(e){var a=e.agencyID,t=e.id,n=e.version,r=Ce.a(/=(.*\))/),o=Ne.a(q.a(r(j)));return"".concat(a,":").concat(t,"(").concat(n,")")===o&&"Codelist"===O});if(Z.a(r)||Z.a(le.a([],"codes")(D(r))))return e;var x=function(e){return ke.a(k.a(le.a([],"annotations"),Ae.a(K.a("type","ORDER")),d.a("text"),le.a(0,e),Number,C.a(Pe,N.a,S.a(0))))}(a)(le.a([],"codes")(D(r))),A={id:E,index:i,roles:u.a(t.conceptRoles)?[]:t.conceptRoles,values:function(e){return oe.a(function(a){var t=a.id,n=a.parent,r=a.name,i=a.annotations;return{id:t,parentId:n,isDefaultSelected:Be({index:e,id:t,annotations:void 0===i?[]:i}),label:o(t)({name:r})}})}(i)(x)};return[].concat(Object(Oe.a)(e),[Object(I.a)({},A,{label:o(A.id)(y)})])},[],t),dataflow:i(e)}},qe=function(e){var a=e.type;return function(e){var t=e.configArgs;if(A.a(H.a(a,["structure","data"])))throw new Error("Invalid type: type=".concat(a));var n=d.a("dataflow",t),r=n.datasourceId,o=n.dataflowId,i=n.agencyId,s=n.version,c=pe(r);if(u.a(c))throw new Error("Datasource undefined: datasourceId=".concat(r));var l=D.a(a,"structure"),m=l?"dataflow":"data",p=P.a(l?"/":",",[i,o,B.a("latest",s)]),f=l?"":"/".concat(B.a("all",d.a("dataquery",t)));return{url:"".concat(d.a("url",c),"/").concat(m,"/").concat(p).concat(f),datasource:c}}},Me=function(e){var a=e.configArgs,t=e.requestArgs,n=d.a("period",t),r=d.a("url",qe({type:"data"})({configArgs:a})),o=ce.a.stringify({startPeriod:q.a(n),endPeriod:M.a(n)},{addQueryPrefix:!0});return"".concat(r).concat(o)},Ue=k.a(U.a(V.a,[k.a(d.a("dataquery"),C.a(u.a,S.a("all"),N.a)),k.a(d.a("dataflow"),z.a(["datasourceId","dataflowId","agencyId","version"]),m.a)]),P.a("_")),Ve=k.a(ae.a,_.a(te.a)(1)),ze=k.a(re.a(function(e){return ne.a(je.rules.isTimeDimension(d.a("id")(e)),Ve(d.a("values")(e)))}),oe.a(d.a("id"))),Xe=function(e,a){return k.a(W.a(a),ie.a)(e)},We=t(16),Ye=t(129),Ke=t(673),Qe=t(175),$e=t(429),Je=t(674),Ze=t(580),ea=t.n(Ze),aa=t(155),ta=t(444),na=t(267),ra=t(58),oa=(t(675),t(682)),ia=t(656),sa=(t(430),t(688)),ca=(t(664),t(422),t(17)),la=(na.a(function(e,a){return X.a(function(t,n){return Qe.a(e[n]||n,a[n],t)},{},ra.a(a))}),Le.a(ue.a(Number),Fe.a(D.a(NaN))),xe.a(oe.a)(function(e,a){return Qe.a("index",a)(e)})),da={label:je.rules.dimensionValueDisplay("label"),code:je.rules.dimensionValueDisplay("code"),both:je.rules.dimensionValueDisplay("both")},ua=d.a("vis"),ma=Object(We.a)(ua,k.a(d.a("period"),C.a(k.a(ae.a,D.a(2)),N.a,S.a(be)))),pa=Object(We.a)(ua,d.a("viewer")),fa=Object(We.a)(ua,d.a("action")),ba=Object(We.a)(ua,d.a("display")),va=Object(We.a)(ua,d.a("filter")),ga=Object(We.a)(ua,d.a("dataflow")),ya=Object(We.a)(ua,d.a("dataquery")),ha=Object(We.a)(ua,d.a("isFullscreen")),Ea=Object(We.a)(ua,d.a("timeDimensionInverted")),wa=Object(We.a)(ua,d.a("layout")),ja=Object(We.a)(ua,d.a("dimensionGetter")),Oa=Object(We.a)(ja,_.a(d.a)(da)),Ia=d.a("sdmx"),Sa=Object(We.a)(Ia,d.a("dimensions")),Da=Object(We.a)(Ia,d.a("data")),xa=Object(We.a)(Ia,d.a("layout")),Ca=Object(We.a)(ya,Sa,function(e,a){return A.a(De.a([Z.a,u.a])(e))?e:k.a(oe.a(k.a(d.a("values"),re.a(K.a("isDefaultSelected",!0)),Ye.a("id"),P.a("+"))),P.a("."))(a)}),Aa=Object(We.a)(Da,Oa,function(e,a){var t=new ea.a(ye("flags")),n=de.a([],["structure","attributes","observation"])(e);return xe.a(X.a)(function(e,n,r){var o=n.id,i=n.name,s=n.values,c=Object(Ie.a)(n,["id","name","values"]),l=Object(I.a)({},c,{id:o,values:s,index:r,isFootnote:!0,name:a({id:o,name:i})});return t.has(o)?R.a(Ke.a(["flags",r]),l,e):H.a(o,ye("decimals"))?Qe.a("decimals",l,e):k.a(ae.a,D.a(1))(s)?h.a(E.a("footnotes"),V.a(l),e):k.a(Z.a,A.a)(s)?R.a(Ke.a(["flags",r]),l,e):e},{flags:{},footnotes:[]})(n)}),Na=Object(We.a)(Sa,Ca,k.a($e.a(function(e,a){return xe.a(oe.a)(function(e,t){if(k.a(Te.a(t),Z.a)(a))return e;if(k.a(Te.a(t),u.a)(a))return e;var n=new ea.a(k.a(Te.a(t),Q.a("+"))(a));return h.a(E.a("values"),oe.a(C.a(function(e){var a=e.id;return n.has(a)},Qe.a("isSelected",!0),N.a)),e)},e)},[N.a,Q.a(".")]),re.a(k.a(d.a("values"),ae.a,Je.a(1))))),Ta=Object(We.a)(Na,k.a(oe.a(h.a(E.a("values"),re.a(K.a("isSelected",!0)))),re.a(k.a(d.a("values"),ae.a,_.a(te.a)(0))))),La=function(e){return{type:"@@vis/CHANGE_VIEWER",payload:{viewerId:e}}},Fa=function(e){return{type:"@@vis/CHANGE_ACTION",payload:{actionId:e}}},Ra=function(e){return{type:"@@vis/sdmx/CHANGE_DATAFLOW",payload:{dataflow:e}}},ka=function(e,a){return function(t,n){return t({type:"@@vis/sdmx/CHANGE_DATAQUERY",payload:{filterId:e,valueId:a,dimensions:Sa(n())}})}},_a=t(667),Ga=d.a("app"),Pa=Object(We.a)(Ga,d.a("locale")),Ba=Object(We.a)(Ga,d.a("pending")),Ha=function(e){return Object(We.a)(Ba,k.a(d.a(e),D.a(!0)))},qa=Object(We.a)(Pa,K.a("isRtl",!0)),Ma=t(680),Ua=t(217),Va=t(449),za=t.n(Va),Xa=t(930),Wa=t.n(Xa);var Ya=function(e){var a={};return e.forEach(function(e){a[e.locale]=e.value}),a},Ka=function(e,a,t){e[a]&&(e[t]=e[a],delete e[a])},Qa=function(e,a,t){return[{rel:e,urn:a,type:t}]},$a=function(e,a){if(null==e)return null;var t={};return t[a]=e,t},Ja=function(e,a){e&&e.forEach(function(e){!function(e,a){e.name=$a(e.name,a),e.roles=[e.id],e.values&&e.values.forEach(function(e){e.name=$a(e.name,a)})}(e,a)})},Za=de.a("en",["locale","id"]),et={getStructure:function(e){var a=e.configArgs,t="FUSION"==d.a("backendId",a.dataflow)?function(e){var a=e.configArgs,t=d.a("dataflow",a),n=t.datasourceId,r=t.dataflowId,o=t.agencyId,i=t.version,s=pe(n);if(u.a(s))throw new Error("Datasource undefined: datasourceId=".concat(n));var c=P.a(",",[o,r,B.a("latest",i)]);return{url:"".concat(d.a("url",s),"/availableconstraint/").concat(c),datasource:s}}({configArgs:a}):qe({type:"structure"})({configArgs:a}),n=t.url,r=t.datasource,o="FUSION"==d.a("backendId",a.dataflow)?{references:"all",format:"sdmx-json",detail:"structureOnly",includeMetrics:!0}:{references:"all"},i="FUSION"==d.a("backendId",a.dataflow)?{"Accept-Language":Za(a)}:{Accept:"application/vnd.sdmx.structure+json;version=1.0","Accept-Language":Za(a)},s="FUSION"==d.a("backendId",a.dataflow)?function(e){return function(e,a){var t={};t.meta={"content-languages":[a],schema:"https://raw.githubusercontent.com/sdmx-twg/sdmx-json/develop/structure-message/tools/schemas/1.0/sdmx-json-structure-schema.json"},t.data={},t.data.dataflows=e.Dataflow,Ka(t.data.dataflows[0],"agencyId","agencyID"),t.data.dataflows[0].name=Ya(e.Dataflow[0].names),delete e.Dataflow[0].names,t.data.dataflows[0].structure=e.Dataflow[0].dataStructureRef,t.data.dataflows[0].links=Qa("self",e.Dataflow[0].urn,"dataflow"),t.data.dataflows[0].links=t.data.dataflows[0].links.concat(Qa("structure",e.Dataflow[0].dataStructureRef,"datastructure")),t.data.conceptSchemes=e.ConceptScheme,t.data.conceptSchemes[0].name=Ya(e.ConceptScheme[0].names),delete t.data.conceptSchemes[0].names,Ka(t.data.conceptSchemes[0],"agencyId","agencyID"),Ka(t.data.conceptSchemes[0],"items","concepts"),t.data.conceptSchemes[0].concepts.forEach(function(e){e.name=Ya(e.names),delete e.names}),t.data.conceptSchemes[0].links=Qa("self",e.ConceptScheme[0].urn,"conceptscheme"),t.data.codelists=e.Codelist,t.data.codelists.forEach(function(e){if(Ka(e,"agencyId","agencyID"),e.name=Ya(e.names),delete e.names,Ka(e,"items","codes"),e.links=Qa("self",e.urn,"codelist"),e.codes){var a=function(e){if(!e)return!1;for(var a=0,t=0;t1)return!1;return!0}(e.codes);e.codes.forEach(function(e){e.name=Ya(e.names),delete e.names,e.parentCode&&!a&&Ka(e,"parentCode","parent"),e.links=Qa("self",e.urn,"code")})}}),t.data.dataStructures=e.DataStructure,Ka(t.data.dataStructures[0],"agencyId","agencyID"),t.data.dataStructures[0].dataStructureComponents={},t.data.dataStructures[0].name=Ya(t.data.dataStructures[0].names),delete t.data.dataStructures[0].names,t.data.dataStructures[0].links=Qa("self",t.data.dataStructures[0].urn,"datastructure"),t.data.dataStructures[0].dataStructureComponents.dimensionList=e.DataStructure[0].dimensionList;var n=0,r=-1;return t.data.dataStructures[0].dimensionList.dimensions.forEach(function(e){e.links=Qa("self",e.urn,"dimension"),e.type="Dimension",Ka(e,"concept","conceptIdentity"),e.position=n++,e.representation&&e.representation.representation&&(e.localRepresentation={enumeration:e.representation.representation}),e.isTimeDimension&&(r=n-1,t.data.dataStructures[0].dimensionList.timeDimensions=[{id:e.id,urn:e.urn,links:Qa(e.links[0].rel,e.links[0].urn,e.links[0].type),position:e.position,type:e.type,conceptIdentity:e.conceptIdentity,localRepresentation:{textFormat:{textType:"ObservationalTimePeriod",isSequence:!1,isMultiLingual:!1}}}])}),-1!=r&&t.data.dataStructures[0].dimensionList.dimensions.splice(r,r),delete t.data.dataStructures[0].dimensionList,t.data.dataStructures[0].dataStructureComponents.measureList={},t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure=e.DataStructure[0].primaryMeasure,t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.links=Qa("self",t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.urn,"primarymeasure"),Ka(t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure,"concept","conceptIdentity"),Ka(t.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure,"representation","localRepresentation"),delete t.data.dataStructures[0].primaryMeasure,t.data.dataStructures[0].dataStructureComponents.attributeList=e.DataStructure[0].attributeList,t.data.dataStructures[0].dataStructureComponents.attributeList&&t.data.dataStructures[0].dataStructureComponents.attributeList.attributes.forEach(function(e){e.mandatory?e.assignmentStatus="Mandatory":e.assignmentStatus="Conditional",e.attributeRelationship={dimensions:e.dimensionReferences},Ka(e,"concept","conceptIdentity"),e.links=Qa("self",e.urn,"dataattribute"),e.representation&&e.representation.representation&&(e.localRepresentation={enumeration:e.representation.representation})}),delete t.data.dataStructures[0].attributeList,t}(e.data,a.locale.id)}:function(e){return e.data};return za.a.get(n,{params:T.a([[S.a(d.a("supportsReferencePartial",r)),Qe.a("detail","referencepartial")],[L.a,N.a]])(o),headers:i}).then(k.a(s,He))},getData:function(e){var a=e.configArgs,t=e.requestArgs,n=qe({type:"data"})({configArgs:a}),r=n.url,o=n.datasource,i=function(e){var a=Object.keys(e.data.dataSets[0].observations);if(a.length>800){e.data.dataSets[0].limited={returnedKeyCount:a.length,limitedTo:800};for(var t=800;t0&&void 0!==arguments[0]?arguments[0]:{}).shouldRequestStructure;return function(a,t){(function(e){var a=e.shouldRequestStructure;return function(e,t){if(A.a(a))return Promise.resolve();var n={locale:Pa(t()),dataflow:ga(t())};return nt(e,{method:"getStructure",configArgs:n}).then(function(a){e({type:"@@sdmx/HANDLE_STRUCTURE",structure:a})})}})({shouldRequestStructure:e})(a,t).then(function(){var e={startPeriod:q.a(ma(t())),endPeriod:M.a(ma(t()))},n=Ca(t()),r=ga(t()),o={locale:Pa(t()),dataflow:r,dataquery:n};return a({type:"@@vis/sdmx/OVERRIDE_DATAQUERY",dataquery:n}),nt(a,{method:"getData",configArgs:o,requestArgs:e}).then(function(e){var t=e.data,n=e.layout;document.getElementById("root").dispatchEvent(new CustomEvent("unicef_dataflowLoaded",{detail:{dataflow:r,data:t}})),a({type:"@@sdmx/HANDLE_DATA",data:t,layout:n})}).catch(function(e){a({type:"@@sdmx/HANDLE_DATA",nodata:null,nolayout:null})})})}},ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.isDownloadAllData,t=e.dataflow;return function(e,n){var r=a?{}:{startPeriod:q.a(ma(n())),endPeriod:M.a(ma(n()))},o=T.a([[S.a(A.a(a)),Qe.a("dataquery",Ca(n()))],[L.a,N.a]])({locale:Pa(n()),dataflow:t}),i=C.a(_a.a("id"),k.a(d.a("id"),function(e){return"getDataFile/".concat(e)}),S.a("requestingDataFile"))(t);return nt(e,{method:"getDataFile",configArgs:o,requestArgs:r,pendingId:i})}},it=Object(y.combineReducers)({app:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(a.type){case"@@app/PUSH_LOG":return h.a(E.a("logs"),w.a(a.payload.log),e);case"@@app/SET_PENDING":return j.a(["pending",a.payload.id],a.payload.is,e);default:return e}},sdmx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(a.type){case"@@sdmx/HANDLE_STRUCTURE":return R.a(E.a("dimensions"),F.a(["structure","dimensions"],a),e);case"@@sdmx/HANDLE_DATA":return k.a(R.a(E.a("data"),d.a("data",a)),R.a(E.a("layout"),d.a("layout",a)))(e);default:return e}},vis:function(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t.type){case"@@vis/CHANGE_ACTION":var n=S.a(D.a(t.payload.actionId,"fullscreen"));return x.a({isFullscreen:C.a(n,A.a,N.a),action:T.a([[n,N.a],[D.a(t.payload.actionId),S.a(void 0)],[L.a,S.a(t.payload.actionId)]])})(a);case"@@vis/CHANGE_FILTER":return h.a(E.a("filter"),function(e){return C.a(D.a(e),S.a(void 0),N.a)(F.a(["payload","filterId"],t))},a);case"@@vis/sdmx/CHANGE_PERIOD":return R.a(E.a("period"),F.a(["payload","period"],t),a);case"@@vis/CHANGE_VIEWER":return R.a(E.a("viewer"),F.a(["payload","viewerId"],t),a);case"@@vis/CHANGE_LAYOUT":return R.a(E.a("layout"),F.a(["payload","layout"],t),a);case"@@vis/CHANGE_DIMENSION_GETTER":return R.a(E.a("dimensionGetter"),F.a(["payload","dimensionGetter"],t),a);case"@@vis/CHANGE_IS_TIME_DIMENSION_INVERTED":return Object(I.a)({},a,{timeDimensionInverted:R.a(E.a(t.payload.id),!t.payload.isTimeDimensionInverted,a.timeDimensionInverted)});case"@@vis/sdmx/CHANGE_DATAQUERY":return h.a(E.a("dataquery"),(e=F.a(["payload","dimensions"],t),function(a,t){return function(n){if(u.a(a))return X.a(W.a("."),"",e);var r=Y.a(K.a("id",a),e),o=u.a(n)?X.a(W.a("."),"",e):n;return u.a(t)?k.a(Q.a("."),$.a(r,""),P.a("."))(o):k.a(Q.a("."),h.a(J.a(r),k.a(C.a(Z.a,S.a([]),Q.a("+")),C.a(H.a(t),ee.a([t]),V.a(t)),P.a("+"))),P.a("."))(o)}})(F.a(["payload","filterId"],t),F.a(["payload","valueId"],t)),a);case"@@vis/sdmx/OVERRIDE_DATAQUERY":return R.a(E.a("dataquery"),d.a("dataquery",t),a);case"@@vis/sdmx/CHANGE_DATAFLOW":return k.a(R.a(E.a("viewer"),"table"),R.a(E.a("dataquery"),F.a(["payload","dataflow","dataquery"],t)),R.a(E.a("period"),F.a(["payload","dataflow","period"],t)),_.a(G.a)(d.a("payload",t)))(a);default:return a}}}),st=t(931),ct=(t(932),function(e){var a=e.dispatch;return function(e){return function(t){var n=e(t);return k.a(d.a("type"),_.a(H.a)(["@@vis/sdmx/CHANGE_DATAQUERY","@@vis/sdmx/CHANGE_PERIOD"]))(t)&&a(rt()),k.a(d.a("type"),_.a(H.a)(["@@vis/sdmx/CHANGE_DATAFLOW"]))(t)&&a(rt({shouldRequestStructure:!0})),n}}}),lt=function(e){return e},dt=t(679),ut=t(275),mt=t(577),pt=t.n(mt),ft=t(263),bt=t(51),vt="#F0F0F0",gt="#494444",yt="#FFFFFF",ht=1e3,Et=360,wt=350,jt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ltr";return Object(bt.createMuiTheme)({overrides:{MuiButton:{text:{textTransform:"none"}}},palette:{primary:{main:"#137cbd",mainAlpha:"#137cbd26",light:"#5dabf0",dark:"#00508c",contrastText:"#ffffff"},secondary:{main:"#bdd7ee",light:"#f0ffff",dark:"#8ca6bc",contrastText:"#ff0000"},action:{hover:"#bdd7ee",selected:"#137cbd",active:"rgba(19,124,189,.3)"},typography:{fontFamily:["Segoe UI"]},raisedButton:{textColor:"#ffffff",primaryTextColor:"#ffffff"},default:{backgroundColor:"#00000026"},configLabelBG:"#B5CEEB",configLabelCol:"#1C2768"},app:{appSize:ht,appMinSize:Et,itemMinSize:wt},scopeListContainer:{maxHeight:250},scopeList:{divider:"#000000"},direction:e,typography:{useNextVariants:!0},configLabel:{backgroundColor:"#B5CEEB",color:"#43679F",fontFamily:"Segoe UI",fontSize:16},configButtonRegular:{backgroundColor:"#B5CEEB",color:"#43679F",fontFamily:"Segoe UI",fontSize:16,fontWeight:"inherit",textTransform:"none"},configButtonSelected:{backgroundColor:"#778899",color:"#B5CEEB",fontFamily:"Segoe UI",fontSize:16,fontWeight:"inherit",textTransform:"none"},panelSummary:{backgroundColor:"#137cbd",color:"white",fontFamily:"Segoe UI",fontSize:16},panelIcon:{color:"white"},configInputs:{backgroundColor:"white"},alert:{color:"#c23030",hover:{backgroundColor:"rgba(219,55,55,.15)"},active:{backgroundColor:"rgba(219,55,55,.3)"}},table:{yBg:"#B5CEEB",yBgHover:"#c3d7ef",yBgActive:"#7e90a4",yFontHeader:"#1C2768",yFont:"#43679F",zBg:"#386CAA",zBgHover:"#5f89bb",zBgActive:"#274b76",zFontHeader:"#A2C2E4",zFont:yt,xBg:yt,xBgHeader:"#D7E6F4",xBgHover:"#dfebf6",xBgActive:"#96a1aa",xFontHeader:"#1C2768",xFont:"#43679F",oFont:gt,sBg:vt}})},Ot=t(578),It=t.n(Ot),St=Object(ft.create)({plugins:[].concat(Object(Oe.a)(Object(bt.jssPreset)().plugins),[pt()()])}),Dt=Object(bt.createGenerateClassName)(),xt=function(e){var a=e.theme,t=e.children,n=e.isRtl;return r.a.createElement(It.a,{jss:St,generateClassName:Dt},r.a.createElement(bt.MuiThemeProvider,{theme:jt(n?"rtl":"ltr")},r.a.createElement(ut.a,{theme:Object(dt.a)(ca.mainTheme,a)},r.a.Children.only(t))))},Ct=t(442),At=t(933),Nt=t(446),Tt=t(443),Lt=t(447),Ft=t(934),Rt=t.n(Ft),kt=function(e){function a(e){var t;return Object(Ct.a)(this,a),(t=Object(Nt.a)(this,Object(Tt.a)(a).call(this,e))).state={hasError:!1},t}return Object(Lt.a)(a,e),Object(At.a)(a,[{key:"componentDidCatch",value:function(){this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?this.props.isFinal?r.a.createElement("h1",null,"Whoops, something went wrong on our end."):r.a.createElement(ca.DELayout,{isHome:!0},r.a.createElement(ca.DELayoutContent,null,r.a.createElement(ca.DESplash,{title:r.a.createElement(p.a,{id:"de.error.title"}),logo:Rt.a}))):this.props.children}}]),a}(r.a.Component),_t=t(11),Gt=t(582),Pt=t.n(Gt),Bt=function(e){return r.a.createElement(Pt.a,Object.assign({},e,{query:"(max-width: ".concat(700,"px)")}))},Ht=function(e){return r.a.createElement(Pt.a,Object.assign({},e,{query:"(min-width: ".concat(701,"px)")}))},qt=Object(_t.compose)(Object(i.b)(Object(We.b)({period:ma}),{changePeriod:function(e){return{type:"@@vis/sdmx/CHANGE_PERIOD",payload:{period:e}}}}),Object(_t.withProps)({titleLabel:r.a.createElement(p.a,{id:"de.filter.period.title"}),tagLabel:"",periodBoundaries:ve,options:Object(I.a)({},ge,{labelStepSize:10})}),_t.pure)(ca.DEFilterPeriod),Mt=Object(_t.compose)(Object(i.b)(Object(We.b)({items:Ta}),{changeFilters:ka}),Object(_t.withProps)({titleLabel:r.a.createElement(p.a,{id:"vx.filters.current.title"}),clearAllLabel:r.a.createElement(p.a,{id:"vx.filters.current.clear"}),blankLabel:r.a.createElement(p.a,{id:"vx.filters.current.blank"}),noScroll:!0}),_t.pure)(ca.VXFiltersCurrent),Ut=t(666),Vt=Object(_t.pure)(ca.VXScopeList),zt=Object(_t.compose)(p.d,Object(i.b)(Object(We.b)({filters:Na,activePanelId:va}),{changeSelection:ka,onChangeActivePanel:function(e){return{type:"@@vis/CHANGE_FILTER",payload:{filterId:e}}}}),Object(_t.withProps)(function(e){var a=e.intl;return{optionsSpotlight:{hasClearAll:!0,mainPlaceholder:a.formatMessage({id:"vx.spotlight.placeholder.primary"}),secondaryPlaceholder:a.formatMessage({id:"vx.spotlight.placeholder.secondary"})},spotlight:{engine:ca.spotlightScopeListEngine,placeholder:a.formatMessage({id:"vx.spotlight.placeholder"}),fields:{"vx.spotlight.field.label":{id:"vx.spotlight.field.label",accessor:k.a(le.a(null,"label"),C.a(u.a,S.a(""),N.a)),isSelected:!0}}},topElementComponent:function(e){return Ut.a(ae.a(e),8)?ca.VXSpotlight:null}}}),_t.pure)(function(e){var a=e.topElementComponent,t=e.filters,n=Object(Ie.a)(e,["topElementComponent","filters"]);return oe.a(function(e){var t=e.id,o=e.label,i=e.values;return r.a.createElement(Vt,Object.assign({},n,{id:t,key:t,label:o,items:i,TopElementComponent:a(i)}))},t)}),Xt=t(669),Wt=t(689),Yt=t(319),Kt=t(681),Qt=t(663),$t=t(676),Jt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return W.a(a,e)}},Zt=k.a(m.a,Qt.a),en=na.a(function(e,a){var t=_.a(Yt.a)(e);if(k.a(d.a("rows"),t,Z.a)(a)){var n=k.a(d.a("sections"),t,Z.a)(a)?"header":"sections",r=k.a(d.a(n),t,q.a)(a);return k.a(Qe.a("rows",W.a([r],le.a([],"rows")(a))),function(e){return Object(I.a)({},e,Object(aa.a)({},n,(a=n,t=r,k.a(d.a(a),re.a(function(e){return A.a(D.a(e,t))})))(e)));var a,t})(a)}return a}),an=function(e,a,t){return ne.a(function(e){return k.a(_.a(Yt.a)(e),Z.a,A.a)}(e)(a),Z.a(t))},tn=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=function(e){var a=ra.a(e),t=Ae.a(je.rules.isTimeDimension)(a),n=Ae.a(je.rules.isAreaDimension)(a),r=function(e,a){return k.a(Kt.a(e),C.a(_a.a(a),d.a(a),k.a(m.a,q.a)),d.a("id"))},o=r([],n)(e),i=r([n,o],t)(e),s=k.a(Kt.a([o,i]),m.a,Ye.a("id"))(e);return{rows:C.a(u.a,S.a([]),_.a(V.a)([]))(o),header:C.a(u.a,S.a([]),_.a(V.a)([]))(i),sections:s}}(e),n=k.a(Zt,a)(t);return h.a(E.a("sections"),Jt(n))(t)},nn=function(){return Object(We.a)(Da,k.a(de.a([],["structure","dimensions","observation"]),xe.a(oe.a)(function(e,a){return k.a(Qe.a("index",a),R.a(E.a("values"),la(le.a([],"values")(e))))(e)})))},rn=function(){return Object(We.a)(nn(),k.a(oa.a(k.a(le.a([],"values"),ae.a,_.a(te.a)(1))),U.a(function(e,a){return{many:Xt.a(d.a("id"))(e),one:Xt.a(d.a("id"))(a)}},[q.a,M.a])))},on=Object(We.a)(rn(),Oa,Ea,function(e,a,t){var n=e.many,r=e.one;return Ma.a(function(e){return $t.a(function(a,t){return{id:t,label:e(a),value:t,isOne:!0}})}(a)(r),function(e,a){return $t.a(function(t,n){return{id:n,isTimePeriod:je.rules.isTimeDimension(n),isTimeDimensionInverted:d.a(n)(a),label:e(t),value:n}})}(a,t)(n))}),sn=function(){return Object(We.a)(wa,xa,Object(We.a)(Sa,nn(),function(e,a){return $e.a(Xe,[ze,ze])(e,a)}),rn(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=n.many,o=n.one,i=k.a(C.a(Z.a,S.a(a),N.a),Ma.a({sections:[],rows:[],header:[]}))(e),s=Yt.a(t),c=ra.a(o),l=Zt(i);if(an(t,l,i))return tn(r,s);var d=s(l);return Z.a(d)?en(c,i):function(e,a){return k.a(h.a(E.a("sections"),Jt(e)),en(a))}(d,c)(i)})},cn=function(e){var a=e.title,t=Object(Ie.a)(e,["title"]);return r.a.createElement(ca.VXFilterContainer,{titleLabel:a,noCollapse:!0,noScroll:!0},r.a.createElement(ca.DETableConfig,t))},ln=Object(_t.compose)(Object(i.b)(Object(We.b)({dimensions:on,dimensionGetter:ja,layout:sn()}),{changeLayout:function(e){return{type:"@@vis/CHANGE_LAYOUT",payload:{layout:e}}},changeGetter:function(e){return{type:"@@vis/CHANGE_DIMENSION_GETTER",payload:{dimensionGetter:e}}},changeIsTimeDimensionInverted:function(e,a){return{type:"@@vis/CHANGE_IS_TIME_DIMENSION_INVERTED",payload:{id:e,isTimeDimensionInverted:a}}}}),p.d,Object(_t.withProps)(function(e){var a=e.intl;return{isNarrow:!0,noPreview:!0,title:r.a.createElement(p.a,{id:"de.table.layout.title"}),labels:{commit:r.a.createElement(p.a,{id:"de.table.layout.apply"}),cancel:r.a.createElement(p.a,{id:"de.table.layout.cancel"}),row:r.a.createElement(p.a,{id:"de.table.layout.x"}),column:r.a.createElement(p.a,{id:"de.table.layout.y"}),section:r.a.createElement(p.a,{id:"de.table.layout.z"}),d:r.a.createElement(p.a,{id:"de.table.layout.getter.dimension"}),o:r.a.createElement(p.a,{id:"de.table.layout.getter.observation"}),time:r.a.createElement(p.a,{id:"de.table.layout.time"}),asc:r.a.createElement(p.a,{id:"de.table.layout.time.asc"}),desc:r.a.createElement(p.a,{id:"de.table.layout.time.desc"}),help:r.a.createElement(p.a,{id:"de.table.layout.help"}),table:r.a.createElement(p.a,{id:"de.table.layout.table"}),one:r.a.createElement(p.a,{id:"de.table.layout.value.one"})},dimensionGetters:X.a(function(e,t){return Object(I.a)({},e,Object(aa.a)({},t,a.formatMessage({id:"vx.config.display.".concat(t)})))},{},ra.a(da))}}))(cn),dn=[],un=function(e){var a=e.changeActionId,t=e.requestDataFile,n=e.dataflow,o=e.isFullscreen,i=e.isNarrow,s=[{icon:"import",id:"download",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download"}),children:[{id:"csv-selection",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download.csv.selection"}),action:function(){return t({dataflow:n})}},{id:"csv-full",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download.csv.all"}),action:function(){return t({isDownloadAllData:!0,dataflow:n})}}]},{icon:o?"minimize":"maximize",id:"fullscreen",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.fullscreen"}),action:function(){return a("fullscreen")}}],c={icon:"filter-list",id:"filters",label:r.a.createElement(p.a,{id:"de.side.filters.action"}),action:function(){return a("filters")}};return k.a(C.a(S.a(i),w.a(c),N.a))(s)},mn=Object(_t.compose)(Object(i.b)(Object(We.b)({isDownloading:Ha("requestingDataFile"),dataflow:ga}),{changeMenu:La,changeActionId:Fa,requestDataFile:ot}),Object(_t.withProps)(function(e){var a=e.isDownloading,t=e.viewerId,n=e.actionId,o=Object(Ie.a)(e,["isDownloading","viewerId","actionId"]);return{loadingActionId:a?"download":null,selectedMenuId:t,selectedActionId:n,actions:un(Object(I.a)({},o,{viewerId:t})),menus:dn,showLabel:r.a.createElement(p.a,{id:"de.visualisation.toolbar.show"})}}))(ca.DEVisualisationToolbar),pn=function(e){var a=e.isNarrow,t=e.isRtl,n=e.isFullscreen,o=e.actionId,i=e.isFilters;return r.a.createElement(r.a.Fragment,null,r.a.createElement(mn,{isNarrow:a,isRtl:t,isFull:n,actionId:o}),a&&r.a.createElement(ca.VXFilterContainer,{isOpen:i,noScroll:!0,noHeader:!0},r.a.createElement(Mt,{isNarrow:a,isRtl:t}),r.a.createElement(qt,{isNarrow:a,isRtl:t}),r.a.createElement(zt,{isNarrow:a,isRtl:t}),r.a.createElement(ln,{isNarrow:a,isRtl:t})))},fn=(Object(_t.compose)(Object(i.b)(Object(We.b)({actionId:fa,viewerId:pa})),Object(_t.withProps)(function(e){var a=e.actionId,t=e.viewerId;return{isChartConfig:D.a("config",a)&&!D.a("table",t),isFilters:D.a("filters",a)}}))(pn),t(574)),bn=t.n(fn),vn=function(e){var a=e.label,t=e.showCopyrightSymbol;return r.a.createElement("div",{className:"div_footer"},t?"\xa9":null,a)},gn=ut.b.div({width:"100%",height:"100%",padding:"4px 6px",fontSize:16,textAlign:"right"},function(e){var a=e.isYLast,t=e.isXLast,n=e.theme;return{color:n.table.oFont,borderTop:"1px solid ".concat(n.table.border),borderLeft:"1px solid ".concat(n.table.border),borderRight:a?"1px solid ".concat(n.table.border):null,borderBottom:t?null:"1px solid ".concat(n.table.border),backgroundColor:n.table.xBg}}),yn=function(e){var a=e.renderObservation,t=e.variant;return r.a.createElement(r.a.Fragment,null,r.a.createElement(gn,{isXLast:!0,isYLast:!0},r.a.createElement(ca.DETableCell,{value:"Value",variant:t})),r.a.createElement(gn,{isYLast:!0},a()))},hn=[],En=function(e){var a=e.requestDataFile,t=e.dataflow;return[{icon:"import",id:"download",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download"}),children:[{id:"csv-selection",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download.csv.selection"}),action:function(){return a({dataflow:t})}},{id:"csv-full",label:r.a.createElement(p.a,{id:"de.visualisation.toolbar.action.download.csv.all"}),action:function(){return a({isDownloadAllData:!0,dataflow:t})}}]}]},wn=Object(_t.compose)(Object(i.b)(Object(We.b)({isDownloading:Ha("requestingDataFile"),dataflow:ga,actionId:fa,viewerId:pa}),{changeMenu:La,changeActionId:Fa,requestDataFile:ot}),Object(_t.withProps)(function(e){var a=e.isDownloading,t=e.viewerId,n=e.actionId,o=Object(Ie.a)(e,["isDownloading","viewerId","actionId"]);return{loadingActionId:a?"download":null,selectedMenuId:t,selectedActionId:n,actions:En(Object(I.a)({},o,{viewerId:t})),menus:hn,showLabel:r.a.createElement(p.a,{id:"de.visualisation.toolbar.show"}),isFilters:D.a("filters",n)}}))(ca.DEVisualisationToolbar),jn=function(e){var a=e.returnedKeyCount,t=e.limitedTo;e.animationMillis;if(!a)return null;if(!t)return null;if(0==t)return null;var o="dataLimited_msgBox";return Object(n.useEffect)(function(){setTimeout(function(){var e=document.getElementById(o);e.addEventListener("transitionend",function a(){document.getElementById(o).style.display="none",e.removeEventListener("transitionend",a)},!1),document.getElementById(o).classList.add("dataLimited_msgBox_trans")},5e3)}),r.a.createElement("div",{className:"div_dataLimited",id:o,style:{position:"relative"}},r.a.createElement("p",null,"Your selection returned ",a," values, the visualization has been limited to"," "+t," values to avoid slowing down your browser."),r.a.createElement("p",null,'Please limit your query by further filtering your data, or use the "Download" button to download the entire dataset in CSV format.'),r.a.createElement("div",{style:{position:"absolute",top:"-20px",right:"-20px"},className:"pt-tag-remove"}))},On=function(e){e.data;var a=e.selItems,t=null;if(a&&a.forEach(function(e){"INDICATOR"==e.id&&(t=e.values)}),!t)return null;var n=[];return t.forEach(function(e){var a;n.push(r.a.createElement("span",{key:e.id,className:"indicatorEntry"},r.a.createElement("a",{href:(a=e.id,we+"/"+a)},e.label)))}),r.a.createElement("div",{className:"div_IndicatorLink"},r.a.createElement("span",{className:"goToIndic"},r.a.createElement(p.a,{id:"de.IndicatorLinkUnicef.goToIndicator"})),n)},In=ut.b.div({borderLeftWidth:0,borderRightWidth:0,marginTop:10,overflowX:"auto"}),Sn=function(e){var a=e.header,t=e.viewerConfig,n=e.data,o=e.layoutIds,i=e.renderObservation,s=e.itemFormatter,c=e.isNotATable,l=(e.footnotes,e.variant),d=e.limited,u=e.selItems;return r.a.createElement(In,null,r.a.createElement("div",{className:"header_download"},r.a.createElement(bn.a,Object.assign({},a,{fonts:t.fonts.header})),r.a.createElement(wn,null)),r.a.createElement(jn,{limitedTo:d.limitedTo,returnedKeyCount:d.returnedKeyCount,animationMillis:5e3}),r.a.createElement(On,{data:n,selItems:u}),c?r.a.createElement(yn,{renderObservation:i,variant:l}):r.a.createElement(ca.SDMXTable,{data:n,layoutIds:o,renderObservation:i,itemFormatter:s}),r.a.createElement(vn,{label:"UNICEF",showCopyrightSymbol:!0}))},Dn=Object(i.b)(Object(We.b)({variant:ja}))(ca.DETableCell),xn=Object(_t.compose)(Object(i.b)(Object(We.b)({dimensions:rn(),customAttributes:Aa,layoutIds:Object(We.a)(sn(),rn(),function(e,a){var t=a.many,n=Yt.a(Zt(e),ra.a(t));return oe.a(_.a(Yt.a)(n))(e)}),itemFormatter:Oa,data:Object(We.a)(Ea,Da,Wt.a(2,je.rules.getTableData)),variant:ja,limited:u.a(Da)?function(){return{limitedTo:0,returnedKeyCount:0}}:k.a(Da,de.a({limitedTo:0},["dataSets",0,"limited"])),selItems:Ta})),Object(_t.mapProps)(function(e){var a=e.chartData,t=e.viewerConfig,n=e.data,r=e.customAttributes,o=e.dimensions,i=e.layoutIds,s=e.itemFormatter,c=e.variant,l=e.limited,u=e.selItems;return{viewerConfig:t,data:n,layoutIds:i,itemFormatter:s,renderObservation:je.rules.observationGetter(Dn)({observations:d.a("observations",n),dimensions:o,customAttributes:r,isRtl:!1})(N.a),header:z.a(["title","subtitle","uprs"],a),footnotes:d.a("footnotes",a),isNotATable:k.a(d.a("observations"),m.a,ae.a,D.a(1))(n),variant:c,limited:l,selItems:u}}))(Sn),Cn=Object(_t.mapProps)(function(e){return{data:e.chartData,options:e.chartOptions,config:e.viewerConfig,type:e.type}})(je.Chart),An={fontFamily:"Segoe UI"},Nn={owner:"UNICEF",logo:"",footer_visible:!1,fonts:{header:{subtitle:An,title:An,uprs:An,tooltip:An},chart:{axisLegend:An,chartLegend:An,tooltip:{primary:An,secondary:An}},footer:{copyright:An,source:An}}},Tn=Object(_t.compose)(Object(i.b)(Object(We.b)({type:pa})),Object(_t.withProps)({viewerConfig:Nn}),Object(_t.branch)(k.a(d.a("data"),u.a),Object(_t.renderComponent)(function(){return r.a.createElement(ca.VXNoData,{message:r.a.createElement(p.a,{id:"vx.no.data"})})})),Object(_t.branch)(function(e){var a=e.type;return D.a(a,"table")},Object(_t.renderComponent)(xn)))(Cn),Ln=t(181),Fn=t(431),Rn=t.n(Fn),kn=t(432),_n=t.n(kn),Gn=t(579),Pn=t.n(Gn),Bn=function(e){var a=e.footnotes;return r.a.createElement(ca.VXFilterContainerCollapsible,{titleLabel:r.a.createElement(p.a,{id:"footnotes"}),isOpen:!0,noScroll:!0},r.a.createElement(Rn.a,{dense:!0},oe.a(function(e){var a=e.id,t=e.name,n=e.values;return r.a.createElement(_n.a,{key:a},r.a.createElement(Pn.a,{primary:B.a(a,t),secondary:k.a(Ye.a("name"),P.a(" | "))(n)}))})(a)))},Hn=Object(_t.compose)(Object(i.b)(Object(We.b)({attributes:Aa})),Object(_t.mapProps)(k.a(d.a("attributes"),z.a(["footnotes"]),d.a("footnotes"),Ln.a(k.a(d.a("id"),_.a(H.a)(["UNIT_MEASURE"]))),Qe.a("footnotes",ia.a,{}))))(Bn),qn=function(e){var a=e.data,t=e.enhancedData,n=e.isRtl,o=e.isNarrow,i=(e.isFullscreen,e.isLoadingData),s=e.display,c=e.formaterIds,l=e.type,d=e.options,u=e.dataUrl;return r.a.createElement(je.RulesDriver,{data:t,display:s,formaterIds:c,type:l,options:d,sdmxUrl:u,source:{link:window.location.href},render:function(e){var t=e.chartData,s=e.chartOptions;return e.properties,r.a.createElement("div",null,i&&r.a.createElement(ca.VXLoader,{isNarrow:o,isRtl:n,loadingLabel:r.a.createElement(p.a,{id:"de.visualisation.data.loading"}),isLarge:!0}),!i&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Tn,{chartData:t,chartOptions:s,data:a,isNarrow:o,isRtl:n}),r.a.createElement("br",null),r.a.createElement(Hn,null)))}})},Mn=Object(_t.compose)(Object(i.b)(Object(We.b)({isLoadingData:Ha("getData"),display:ba,type:pa,data:Da,dataflow:ga,dataquery:ya,locale:Pa,period:ma})),Object(_t.withProps)(function(e){var a=e.data,t=e.dataflow,n=e.dataquery,r=e.locale,o=e.period;return{dataUrl:Me({configArgs:{dataflow:t,dataquery:n,locale:r},requestArgs:{period:o}}),options:Ee,formaterIds:{decimals:ye("decimals"),prefscale:ye("prefscale")},enhancedData:a}}))(qn),Un=function(e){var a=e.isNarrow,t=e.isRtl,n=e.isLoadingStructure,o=e.isLoadingData,i=e.isFullscreen;return r.a.createElement(ca.DELayout,{isNarrow:a,isRtl:t,isFull:i},r.a.createElement(ca.DELayoutContent,null,n&&r.a.createElement(ca.VXLoader,{isNarrow:a,isRtl:t,loadingLabel:r.a.createElement(p.a,{id:"de.visualisation.loading"}),isLarge:!0})),!(n||a)&&r.a.createElement(ca.DELayoutSide,null,r.a.createElement(qt,{isNarrow:a,isRtl:t}),r.a.createElement(Mt,{isNarrow:a,isRtl:t}),r.a.createElement(zt,{isNarrow:a,isRtl:t}),r.a.createElement("div",{className:"TableConfig_wrapper"},!o&&r.a.createElement(ln,{isRtl:t}))),!n&&r.a.createElement(ca.DELayoutMain,null,r.a.createElement(Mn,{isNarrow:a,isRtl:t,isFullscreen:i})))},Vn=Object(_t.compose)(function(e){return function(a){function t(){var a,o;Object(Ct.a)(this,t);for(var i=arguments.length,s=new Array(i),c=0;c0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0,t=[st.a,ct],n=[y.applyMiddleware.apply(void 0,Object(Oe.a)(lt(t)))];return Object(y.createStore)(a,e,y.compose.apply(void 0,n))}({app:{logs:[],pending:{},locale:Wn},vis:{filter:void 0,viewer:"table",action:void 0,period:void 0,dataflow:void 0,isFullscreen:!1,dataquery:void 0,display:"label",timeDimensionInverted:{},layout:void 0,dimensionGetter:"label"},sdmx:{dimensions:[],data:void 0,layout:{}}},it);console.log("initialized with DATAFLOW:",window.DATAFLOW),Yn.dispatch(Ra(window.DATAFLOW));var Kn=document.getElementById("root");Kn.addEventListener("unicef_changeDataflow",function(e){return Yn.dispatch(Ra(e.detail))}),console.log("listen unicef_changeDataflow event"),Object(o.render)(r.a.createElement(kt,{isFinal:!0},r.a.createElement(i.a,{store:Yn},r.a.createElement(xt,{theme:{},isRtl:Wn.isRtl},r.a.createElement(v,{localeId:Wn.id,messages:window.I18N},r.a.createElement(kt,null,r.a.createElement(Vn,null)))))),Kn)},583:function(e){e.exports={name:"unicef-data-explorer",version:"0.1.0",author:"redpelicans",license:"PRIVATE",private:!0,dependencies:{"@babel/core":"7.4.3","@sis-cc/dotstatsuite-components":"git+https://dotstatComponents:YgT9DjxaXYutK1pckX-J@gitlab.com/Daniele600/dotstatsuite-components.git","@sis-cc/dotstatsuite-ui-components":"git+https://dotstatComponents:YgT9DjxaXYutK1pckX-J@gitlab.com/Daniele600/dotstatsuite-ui-components.git#additionalGuiChanges","@svgr/webpack":"4.1.0","@typescript-eslint/eslint-plugin":"^1.7.0","@typescript-eslint/parser":"^1.7.0",add:"^2.0.6",axios:"^0.18.0","babel-eslint":"10.0.1","babel-jest":"24.7.1","babel-loader":"8.0.5","babel-plugin-named-asset-import":"^0.3.4","babel-preset-react-app":"^8.0.0","case-sensitive-paths-webpack-plugin":"2.2.0","cross-env":"^5.2.1","css-loader":"2.1.1",dotenv:"6.2.0","dotenv-expand":"4.2.0","es6-set":"^0.1.5",eslint:"^5.16.0","eslint-config-prettier":"^4.1.0","eslint-config-react-app":"^4.0.0","eslint-loader":"2.1.2","eslint-plugin-flowtype":"2.50.1","eslint-plugin-import":"2.16.0","eslint-plugin-jsx-a11y":"6.2.1","eslint-plugin-prettier":"^2.0.0","eslint-plugin-react":"7.12.4","eslint-plugin-react-hooks":"^1.5.0","file-loader":"3.0.1","file-saver":"^2.0.1","fs-extra":"7.0.1",git:"^0.1.5",glamorous:"^5.0.0","html-webpack-plugin":"4.0.0-beta.5",husky:"^2.0.0","identity-obj-proxy":"3.0.0","is-wsl":"^1.1.0",jest:"24.7.1","jest-environment-jsdom-fourteen":"0.1.0","jest-resolve":"24.7.1","jest-watch-typeahead":"0.3.0","jss-rtl":"^0.2.3",md5:"^2.2.1","mini-css-extract-plugin":"0.5.0",numeral:"^2.0.6","optimize-css-assets-webpack-plugin":"5.0.1","pnp-webpack-plugin":"1.2.1","postcss-flexbugs-fixes":"4.1.0","postcss-loader":"3.0.0","postcss-normalize":"7.0.1","postcss-preset-env":"6.6.0","postcss-safe-parser":"4.0.1",prettier:"1.12.1","pretty-quick":"^1.10.0",ramda:"^0.26.1",react:"^16.11.0","react-app-polyfill":"^1.0.4","react-dev-utils":"^9.1.0","react-dom":"^16.11.0","react-intl":"^2.8.0","react-jss":"^8.6.1","react-redux":"^7.1.1","react-responsive":"^6.1.1",redux:"^4.0.1","redux-logger":"^3.0.6","redux-thunk":"^2.3.0",reselect:"^4.0.0",resolve:"^1.10.0","sass-loader":"7.1.0",semver:"6.0.0","style-loader":"0.23.1","terser-webpack-plugin":"1.2.3","url-loader":"1.1.2",webpack:"4.29.6","webpack-dev-server":"3.2.1","webpack-manifest-plugin":"2.0.4","workbox-webpack-plugin":"4.2.0",yarn:"^1.19.1"},scripts:{"eslint-check":"eslint --print-config .eslintrc.json | eslint-config-prettier-check",lint:"eslint src --color",start:"cross-env NODE_ENV=development node scripts/start.js",build:"cross-env NODE_ENV=production node scripts/build.js",test:"cross-env NODE_ENV=test node scripts/test.js"},eslintConfig:{env:{browser:!0,jest:!0,node:!0,es6:!0},extends:["eslint:recommended","plugin:react/recommended"],parser:"babel-eslint",parserOptions:{ecmaFeatures:{experimentalObjectRestSpread:!0,jsx:!0},sourceType:"module"},plugins:["prettier","react","import"],rules:{"no-console":"warn","no-unused-vars":"warn","react/display-name":"off"}},browserslist:{production:[">0.2%","not dead","not op_mini all"],development:["last 1 chrome version","last 1 firefox version","last 1 safari version"]},jest:{verbose:!0,collectCoverageFrom:["src/**/*.{js,jsx,ts,tsx}","!src/**/*.d.ts"],setupFiles:["react-app-polyfill/jsdom"],setupFilesAfterEnv:[],testMatch:["/src/**/__tests__/**/*.{js,jsx,ts,tsx}","/src/**/*.{spec,test}.{js,jsx,ts,tsx}"],testEnvironment:"jest-environment-jsdom-fourteen",transform:{"^.+\\.(js|jsx|ts|tsx)$":"/node_modules/babel-jest","^.+\\.css$":"/config/jest/cssTransform.js","^(?!.*\\.(js|jsx|ts|tsx|css|json)$)":"/config/jest/fileTransform.js"},transformIgnorePatterns:["[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$","^.+\\.module\\.(css|sass|scss)$"],modulePaths:[],moduleNameMapper:{"^react-native$":"react-native-web","^.+\\.module\\.(css|sass|scss)$":"identity-obj-proxy"},moduleFileExtensions:["web.js","js","web.ts","ts","web.tsx","tsx","json","web.jsx","jsx","node"],watchPlugins:["jest-watch-typeahead/filename","jest-watch-typeahead/testname"]},babel:{presets:["react-app"]},husky:{hooks:{"pre-commit":"pretty-quick --staged"}},prettier:{useTabs:!1,printWidth:100,tabWidth:2,singleQuote:!0,trailingComma:"all",jsxBracketSameLine:!1,bracketSpacing:!0,parser:"babylon",semi:!0}}},919:function(e,a){},934:function(e,a,t){e.exports=t.p+"static/media/data-explorer-logo.707f6ef1.png"},936:function(e,a,t){e.exports=t(2086)},952:function(e,a){},958:function(e,a){}},[[936,1,2]]]); -//# sourceMappingURL=main.6dc7960f.chunk.js.map \ No newline at end of file diff --git a/de/static/js/main.6dc7960f.chunk.js.map b/de/static/js/main.6dc7960f.chunk.js.map deleted file mode 100644 index 6b060b4..0000000 --- a/de/static/js/main.6dc7960f.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["web/i18n/provider.js","web/i18n/index.js","web/ducks/app.js","web/lib/settings.js","web/lib/sdmx/annotations.js","web/lib/sdmx/structure.js","web/lib/sdmx/index.js","web/lib/utils/index.js","web/selectors/vis.js","web/selectors/sdmx.js","web/ducks/vis.js","web/selectors/app.js","web/api/formatMapper.js","web/api/sdmx.js","web/ducks/sdmx.js","web/core/reducer.js","web/core/middlewares.js","web/core/store.js","web/theme/theme.js","web/theme/index.js","web/components/Error.js","web/hocs/withResponsiveness.js","web/components/FilterPeriod/index.js","web/components/FilterSelection/index.js","web/components/Filters/index.js","web/lib/layout/index.js","web/selectors/table.js","web/components/TableConfig/TableConfig.js","web/components/TableConfig/index.js","web/components/Toolbar/menus.js","web/components/Toolbar/actions.js","web/components/Toolbar/index.js","web/components/Tools/Tools.js","web/components/Tools/index.js","web/components/FooterUnicef/index.js","web/components/Table/Cell.js","web/components/ToolbarUnicef/menus.js","web/components/ToolbarUnicef/actions.js","web/components/ToolbarUnicef/index.js","web/components/TableMessageUnicef/index.js","web/components/IndicatorLinkUnicef/index.js","web/components/Table/Table.js","web/components/Table/index.js","web/components/Chart/index.js","web/components/Viewer/config.js","web/components/Viewer/index.js","web/components/Footnotes/Footnotes.js","web/components/Footnotes/index.js","web/components/Main/Main.js","web/components/Main/index.js","web/components/App/App.js","web/components/App/index.js","web/index.js","web/assets/data-explorer-logo.png"],"names":["Provider","_ref","localeId","messages","children","react_default","a","createElement","index_es","locale","key","React","Children","only","model","concat","setPending","id","is","type","payload","sdmx","R","window","SETTINGS","getDatasource","sdmxRange","sdmxPeriod","sdmxPeriodBoundaries","sdmxPeriodBoundariesMinMax","min","max","getSdmxAttribute","Array","chart","chartOptions","getIndicatorProfileUrl","isValidNumber","Number","NaN","getIsSelected","index","annotations","selection","Boolean","md5","sdmx_structure","structure","lang","dimensions","conceptSchemes","dataflow","codelists","getCodelists","getLocalisedName","getDataflow","agencyID","rest","Object","objectWithoutProperties","objectSpread","code","agencyId","name","acc","dimension","getConceptIdentity","conceptIdentity","getUrnToParse","conceptIdentityUrnToParse","conceptIdentityRepresentationCode","conceptScheme","_ref2","version","getSdmxId","sdmxId","getConceptScheme","getConcepts","concepts","getConcept","concept","getId","getLocalRepresentation","localRepresentation","getCodeList","_ref3","codes","getSortedCodes","parsedDimension","roles","conceptRoles","values","_ref4","parent","_ref4$annotations","parentId","isDefaultSelected","label","localisedCodes","toConsumableArray","getConfig","configArgs","Error","_R$prop2","datasourceId","dataflowId","datasource","isStructure","keyword","identifiers","dataquery","url","getDataUrl","requestArgs","period","params","qs","stringify","startPeriod","endPeriod","addQueryPrefix","getFilename","greaterThanOne","getDimensionsIds","d","rules","isTimeDimension","getUniq","array1","array2","withIndex","keysMap","obj","value","dimensionFormats","dimensionValueDisplay","both","getVis","getPeriod","createSelector","getViewer","getAction","getDisplay","getFilter","getDataquery","getIsFullscreen","getTimeDimensionInverted","getLayout","getDimensionGetter","getDimensionFormat","getSdmx","getDimensions","getData","getVisDataquery","getCustomAttributes","data","format","flagsSet","Set","attrs","memo","rattr","attr","isFootnote","has","flags","footnotes","getFilters","filters","filter","valueIdsSet","getSelection","changeViewer","viewerId","changeAction","actionId","changeDataflow","changeDataquery","filterId","valueId","dispatch","getState","getApp","getLocale","getPending","getIsPending","getIsRtl","convertName","names","ret","forEach","v","renameKey","object","oldKey","newKey","createLinkNode","rel","urn","convertLanguageNode","text","convert_struct_component","comp","cl","convertCodelist","methods","getStructure","_R$prop","getFusionConfig","qStringParams","references","detail","includeMetrics","acceptParam","Accept-Language","Accept","sdmxMapperStruct","s","meta","content-languages","schema","dataflows","Dataflow","dataStructureRef","links","ConceptScheme","Codelist","hasUniqueRoot","noParentCount","i","length","parentCode","isUniqueRoot","c","dataStructures","DataStructure","dataStructureComponents","dimensionList","pos","timePos","position","representation","enumeration","timeDimensions","textFormat","textType","isSequence","isMultiLingual","splice","measureList","primaryMeasure","attributeList","attributes","mandatory","assignmentStatus","attributeRelationship","dimensionReferences","fm","axios","get","headers","then","structureParser","_getConfig","limitData","keys","dataSets","observations","limited","returnedKeyCount","limitedTo","sdmxMapperData","header","k","description","dataSet","dataset","series","observation","hasOwnProperty","isNaN","parseFloat","dimensionAtObservation","v8Transformer","getDataFile","responseType","response","blob","Blob","FileSaver","saveAs","main","_ref5","method","error","_ref6","_ref7","slicedToArray","fn","request","ctx","pendingId","sdmxApi","res","catch","log","errorCode","statusCode","status","pushLog","requestData","shouldRequestStructure","arguments","undefined","Promise","resolve","requestStructure","layout","document","getElementById","dispatchEvent","CustomEvent","nodata","nolayout","requestDataFile","isDownloadAllData","combineReducers","app","state","action","vis","isFullscreen","timeDimensionInverted","isTimeDimensionInverted","filterIndex","safeDataquery","requestDataMiddleware","next","future","withLogger","middlewares","Colors","Formats","theme","rtl","createMuiTheme","overrides","MuiButton","textTransform","palette","primary","mainAlpha","light","dark","contrastText","secondary","hover","selected","active","typography","fontFamily","raisedButton","textColor","primaryTextColor","default","backgroundColor","configLabelBG","configLabelCol","appSize","appMinSize","itemMinSize","scopeListContainer","maxHeight","scopeList","divider","direction","useNextVariants","configLabel","color","fontSize","configButtonRegular","fontWeight","configButtonSelected","panelSummary","panelIcon","configInputs","alert","table","yBg","yBgHover","yBgActive","yFontHeader","yFont","zBg","zBgHover","zBgActive","zFontHeader","zFont","xBg","xBgHeader","xBgHover","xBgActive","xFontHeader","xFont","oFont","sBg","jss","create","plugins","jssPreset","generateClassName","createGenerateClassName","isRtl","JssProvider_default","styles","muiTheme","glamorous_esm","mergeDeepRight","mainTheme","ErrorBoundary","props","_this","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","hasError","setState","isFinal","build","isHome","title","logo","Component","Narrow","react_responsive_default","assign","query","Default","compose","connect","createStructuredSelector","changePeriod","withProps","titleLabel","tagLabel","periodBoundaries","options","labelStepSize","pure","DEFilterPeriod","items","changeFilters","clearAllLabel","blankLabel","noScroll","VXFiltersCurrent","Filter","VXScopeList","injectIntl","activePanelId","changeSelection","onChangeActivePanel","intl","optionsSpotlight","hasClearAll","mainPlaceholder","formatMessage","secondaryPlaceholder","spotlight","engine","spotlightScopeListEngine","placeholder","fields","vx.spotlight.field.label","accessor","isSelected","topElementComponent","VXSpotlight","parentProps","TopElementComponent","defaultConcat","getValuesFlat","adjustment","notAvailableIds","withoutNotAvailableIds","pivot","defineProperty","prop","isInvalid","dimensionIds","layoutIds","hasInvalidIds","getDefaultLayout","many","getMissingIds","defaultLayout","ids","timeId","areaId","isAreaDimension","helper","omitIds","pickId","x","y","z","rows","sections","defaultLayoutBuilder","defaultMissingIds","getDataDimensions","getVisDataDimensions","one","getTableConfigDimensions","isOne","Layout","isTimePeriod","getVisTableConfigLayout","getVisLayout","structureDimensions","dataDimensions","Sdmx","visLayout","sdmxLayout","dimensionsIds","oneIds","missingIds","TableConfig","tableProps","noCollapse","dimensionGetter","changeLayout","changeGetter","changeIsTimeDimensionInverted","isNarrow","noPreview","labels","commit","cancel","row","column","section","o","time","asc","desc","help","dimensionGetters","menus","Toolbar_actions","changeActionId","actions","icon","filtersBtn","isDownloading","changeMenu","loadingActionId","selectedMenuId","selectedActionId","showLabel","DEVisualisationToolbar","Tools","isFilters","Fragment","Toolbar","isFull","isOpen","noHeader","FilterSelection","FilterPeriod","Filters","components_TableConfig","isChartConfig","FooterUnicef","showCopyrightSymbol","className","StyledCell","glamorous","div","width","height","padding","textAlign","isYLast","isXLast","borderTop","border","borderLeft","borderRight","borderBottom","Cell","renderObservation","variant","ToolbarUnicef_menus","ToolbarUnicef_actions","TableMessageUnicef","animationMillis","msgBoxId","useEffect","setTimeout","el","addEventListener","onTransEnd","style","display","removeEventListener","classList","add","top","right","IndicatorLinkUnicef","selItems","indicators","element","indId","push","href","TableContainer","borderLeftWidth","borderRightWidth","marginTop","overflowX","Table","viewerConfig","itemFormatter","isNotATable","dotstatsuite_ui_header_lib_default","fonts","ToolbarUnicef","components_TableMessageUnicef","components_IndicatorLinkUnicef","Table_Cell","components_FooterUnicef","DETableCell","customAttributes","idsNotInMany","getTableData","mapProps","chartData","observationGetter","config","Chart","owner","footer_visible","subtitle","uprs","tooltip","axisLegend","chartLegend","footer","copyright","source","branch","renderComponent","message","Footnotes","List_default","dense","ListItem_default","ListItemText_default","Main","enhancedData","isLoadingData","formaterIds","dataUrl","dotstatsuite_components_lib","sdmxUrl","link","location","render","properties","loadingLabel","isLarge","Viewer","components_Footnotes","decimals","prefscale","App","isLoadingStructure","components_Main","_React$Component","_temp","_getPrototypeOf2","_len","args","_key","apply","react","withResponsiveness_Narrow","withResponsiveness_Default","inherits","renderNothing","ES6_Error","console","info","_ref$locales","locales","_ref$localeId","addLocaleData","enLocaleData","numeral","delimiters","register","initializeI18n","i18n","store","initialState","rootReducer","thunk","enhancers","applyMiddleware","createStore","logs","pending","viewer","reducer","DATAFLOW","ROOT","event","components_Error","es","web_theme","provider","I18N","components_App","module","exports","__webpack_require__","p"],"mappings":"sPAgBeA,EAZE,SAAAC,GAAA,IAAGC,EAAHD,EAAGC,SAAUC,EAAbF,EAAaE,SAAUC,EAAvBH,EAAuBG,SAAvB,OACfC,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Z,GAAOmZ,OACtCvZ,EAAAC,EAAAC,cAAC6sB,EAAD,CAAcltB,SAAUO,GAAOQ,GAAId,SAAUoB,OAAO8rB,MAClDhtB,EAAAC,EAAAC,cAAC0sB,GAAD,KACE5sB,EAAAC,EAAAC,cAAC+sB,GAAD,WAMVP,8xIC1EFQ,EAAAC,QAAiBC,EAAAC,EAAuB","file":"static/js/main.6dc7960f.chunk.js","sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { IntlProvider } from 'react-intl';\r\n\r\nconst Provider = ({ localeId, messages, children }) => (\r\n \r\n {React.Children.only(children)}\r\n \r\n);\r\n\r\nProvider.propTypes = {\r\n localeId: PropTypes.string,\r\n messages: PropTypes.object,\r\n children: PropTypes.element.isRequired,\r\n};\r\n\r\nexport default Provider;\r\n","import numeral from 'numeral';\r\nimport * as R from 'ramda';\r\nimport { addLocaleData } from 'react-intl';\r\nimport enLocaleData from 'react-intl/locale-data/en';\r\n\r\nconst model = locale => `${locale}/${locale}`;\r\n\r\nexport const setLocale = locale => numeral.locale(model(locale));\r\n\r\nexport const initialize = ({ locales = [], localeId = 'en' }) => {\r\n addLocaleData(enLocaleData);\r\n\r\n setLocale(localeId);\r\n\r\n R.forEach(locale => {\r\n const delimiters = R.prop('delimiters')(locale);\r\n if (R.isNil(delimiters)) return;\r\n numeral.register('locale', model(R.prop('id')(locale)), { delimiters });\r\n }, R.values(locales));\r\n};\r\n\r\nexport { default as I18nProvider } from './provider';\r\n","import * as R from 'ramda';\r\n\r\n//-----------------------------------------------------------------------------------------constants\r\nexport const LOG_ERROR = '@@app/LOG_ERROR';\r\nexport const PUSH_LOG = '@@app/PUSH_LOG';\r\nexport const SET_PENDING = '@@app/SET_PENDING';\r\n\r\n//------------------------------------------------------------------------------------------creators\r\nexport const pushLog = log => ({ type: PUSH_LOG, payload: { log } });\r\nexport const setPending = (id, is) => ({ type: SET_PENDING, payload: { id, is } });\r\n\r\n//-------------------------------------------------------------------------------------------reducer\r\nexport default (state = {}, action = {}) => {\r\n switch (action.type) {\r\n case PUSH_LOG:\r\n return R.over(R.lensProp('logs'), R.prepend(action.payload.log), state);\r\n case SET_PENDING:\r\n return R.assocPath(['pending', action.payload.id], action.payload.is, state);\r\n default:\r\n return state;\r\n }\r\n};\r\n","import * as R from 'ramda';\r\n\r\nexport const sdmx = R.propOr({}, 'sdmx', window.SETTINGS);\r\nexport const getDatasource = R.flip(R.prop)(R.prop('datasources', sdmx));\r\nexport const sdmxRange = R.prop('range', sdmx);\r\nexport const sdmxPeriod = R.path(['period', 'default'], sdmx);\r\nexport const sdmxPeriodBoundaries = R.pathOr([], ['period', 'boundaries'], sdmx);\r\nexport const sdmxPeriodBoundariesMinMax = {\r\n min: R.head(sdmxPeriodBoundaries),\r\n max: R.last(sdmxPeriodBoundaries),\r\n};\r\nexport const getSdmxAttribute = id =>\r\n R.pipe(R.pathOr([], ['attributes', id]), R.ifElse(R.is(Array), R.identity, R.flip(R.append)([])))(\r\n sdmx,\r\n );\r\nexport const chart = R.propOr({}, 'chart', window.SETTINGS);\r\nexport const chartOptions = R.prop('options', chart);\r\n\r\nexport const getIndicatorProfileUrl = R.path(['unicef', 'indicatorProfileUrl'], window.SETTINGS);\r\n","import * as R from 'ramda';\r\nimport md5 from 'md5';\r\n\r\nconst isValidNumber = R.both(R.is(Number), R.complement(R.equals(NaN)));\r\n\r\nexport const getIsSelected = ({ index, id, annotations, selection }) => {\r\n if (R.or(R.isEmpty(selection), R.isNil(selection))) {\r\n return R.ifElse(R.isEmpty, R.F, R.pipe(R.find(R.propEq('type', 'DEFAULT')), Boolean))(\r\n annotations,\r\n );\r\n }\r\n return !!R.prop(md5(`${index}${id}`))(selection);\r\n};\r\n\r\nexport const getSortedCodes = lang =>\r\n R.sortBy(\r\n R.pipe(\r\n R.propOr([], 'annotations'),\r\n R.find(R.propEq('type', 'ORDER')),\r\n R.prop('text'),\r\n R.propOr(0, lang),\r\n Number,\r\n R.ifElse(isValidNumber, R.identity, R.always(0)),\r\n ),\r\n );\r\n","import * as R from 'ramda';\r\nimport { getIsSelected, getSortedCodes } from './annotations';\r\n\r\nexport default structure => {\r\n const lang = R.pipe(R.pathOr([], ['meta', 'content-languages']), R.head)(structure);\r\n const dimensions = R.pipe(\r\n R.pathOr([], ['data', 'dataStructures']),\r\n R.head,\r\n R.pathOr([], ['dataStructureComponents', 'dimensionList', 'dimensions']),\r\n )(structure);\r\n const conceptSchemes = R.pathOr([], ['data', 'conceptSchemes'])(structure);\r\n\r\n if (R.any(R.anyPass([R.isNil, R.isEmpty]))([lang, dimensions, conceptSchemes])) {\r\n return { dimensions: [], dataflow: {} };\r\n }\r\n\r\n const getCodelists = R.pathOr([], ['data', 'codelists']);\r\n const codelists = getCodelists(structure);\r\n\r\n const getLocalisedName = id =>\r\n R.pipe(R.pathOr('', ['name', lang]), R.ifElse(R.isEmpty, R.always(`[${id}]`), R.identity));\r\n\r\n const getDataflow = R.pipe(\r\n R.pathOr([], ['data', 'dataflows']),\r\n R.head,\r\n R.pick(['id', 'version', 'agencyID', 'name']),\r\n ({ id, agencyID, ...rest }) => ({\r\n ...rest,\r\n code: id,\r\n agencyId: agencyID,\r\n name: getLocalisedName(id)(rest),\r\n }),\r\n );\r\n const filters = R.addIndex(R.reduce)(\r\n (acc, dimension, index) => {\r\n const getConceptIdentity = R.propOr(null, 'conceptIdentity');\r\n if (R.isNil(getConceptIdentity(dimension))) return acc;\r\n const conceptIdentity = getConceptIdentity(dimension);\r\n\r\n const getUrnToParse = R.match(/[^urn:sdmx:org.sdmx.infomodel][^.|=]+/g);\r\n if (R.isEmpty(getUrnToParse(conceptIdentity))) return acc;\r\n const conceptIdentityUrnToParse = getUrnToParse(conceptIdentity);\r\n const conceptIdentityRepresentationCode = R.last(conceptIdentityUrnToParse);\r\n\r\n const getConceptScheme = R.find(({ agencyID, id, version }) => {\r\n const getSdmxId = R.match(/=(.*\\))/);\r\n const sdmxId = R.tail(R.head(getSdmxId(conceptIdentity)));\r\n const sdmxIdRecomposed = `${agencyID}:${id}(${version})`;\r\n return sdmxIdRecomposed === sdmxId;\r\n });\r\n const conceptScheme = getConceptScheme(conceptSchemes);\r\n const getConcepts = R.propOr(null, 'concepts');\r\n if (R.isNil(getConcepts(conceptScheme))) return acc;\r\n const concepts = getConcepts(conceptScheme);\r\n\r\n const getConcept = R.find(R.propEq('id', conceptIdentityRepresentationCode));\r\n if (R.isNil(getConcept(concepts))) return acc;\r\n const concept = getConcept(concepts);\r\n\r\n const getId = R.propOr(null, 'id');\r\n if (R.isNil(getId(dimension))) return acc;\r\n const id = getId(dimension);\r\n\r\n // ---------------------------------------------------------------------------------------------\r\n // values [ ]\r\n // ---------------------------------------------------------------------------------------------\r\n\r\n const getLocalRepresentation = R.pathOr(null, ['localRepresentation', 'enumeration']);\r\n if (R.isNil(getLocalRepresentation(dimension))) return [];\r\n\r\n const localRepresentation = getLocalRepresentation(dimension);\r\n\r\n const type = R.nth(1)(getUrnToParse(localRepresentation));\r\n\r\n const getCodeList = R.find(({ agencyID, id, version }) => {\r\n const getSdmxId = R.match(/=(.*\\))/);\r\n const sdmxId = R.tail(R.head(getSdmxId(localRepresentation)));\r\n const sdmxIdRecomposed = `${agencyID}:${id}(${version})`;\r\n return sdmxIdRecomposed === sdmxId && type === 'Codelist';\r\n });\r\n\r\n if (R.isEmpty(codelists) || R.isEmpty(R.propOr([], 'codes')(getCodeList(codelists)))) {\r\n return acc;\r\n }\r\n const codes = getSortedCodes(lang)(R.propOr([], 'codes')(getCodeList(codelists)));\r\n\r\n const localisedCodes = index =>\r\n R.map(({ id, parent, name, annotations = [] }) => ({\r\n id,\r\n parentId: parent,\r\n isDefaultSelected: getIsSelected({ index, id, annotations }),\r\n //isDefaultSelected: id === 'DSB_STATUS_TOTAL' || id === 'SEX_T',\r\n label: getLocalisedName(id)({ name }),\r\n }));\r\n\r\n const parsedDimension = {\r\n id,\r\n index,\r\n roles: !R.isNil(dimension.conceptRoles) ? dimension.conceptRoles : [],\r\n values: localisedCodes(index)(codes),\r\n };\r\n\r\n return [\r\n ...acc,\r\n {\r\n ...parsedDimension,\r\n label: getLocalisedName(parsedDimension.id)(concept),\r\n },\r\n ];\r\n },\r\n [],\r\n dimensions,\r\n );\r\n return { dimensions: filters, dataflow: getDataflow(structure) };\r\n};\r\n","import * as R from 'ramda';\r\nimport qs from 'qs';\r\nimport { getDatasource } from '../settings';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nexport { default as structureParser } from './structure';\r\n\r\nexport const getFusionConfig = ({ configArgs }) => {\r\n const { datasourceId, dataflowId, agencyId, version } = R.prop('dataflow', configArgs);\r\n\r\n const datasource = getDatasource(datasourceId);\r\n if (R.isNil(datasource)) throw new Error(`Datasource undefined: datasourceId=${datasourceId}`);\r\n\r\n const identifiers = R.join(',', [agencyId, dataflowId, R.defaultTo('latest', version)]);\r\n return {\r\n url: `${R.prop('url', datasource)}/availableconstraint/${identifiers}`,\r\n datasource,\r\n };\r\n};\r\n\r\nexport const getConfig = ({ type }) => ({ configArgs }) => {\r\n if (R.not(R.includes(type, ['structure', 'data']))) throw new Error(`Invalid type: type=${type}`);\r\n\r\n const { datasourceId, dataflowId, agencyId, version } = R.prop('dataflow', configArgs);\r\n\r\n const datasource = getDatasource(datasourceId);\r\n if (R.isNil(datasource)) throw new Error(`Datasource undefined: datasourceId=${datasourceId}`);\r\n\r\n const isStructure = R.equals(type, 'structure');\r\n\r\n const keyword = isStructure ? 'dataflow' : 'data';\r\n\r\n const identifiers = R.join(isStructure ? '/' : ',', [\r\n agencyId,\r\n dataflowId,\r\n R.defaultTo('latest', version),\r\n ]);\r\n\r\n const dataquery = isStructure ? '' : `/${R.defaultTo('all', R.prop('dataquery', configArgs))}`;\r\n\r\n return {\r\n url: `${R.prop('url', datasource)}/${keyword}/${identifiers}${dataquery}`,\r\n datasource,\r\n };\r\n};\r\n\r\nexport const getDataUrl = ({ configArgs, requestArgs }) => {\r\n const period = R.prop('period', requestArgs);\r\n const url = R.prop('url', getConfig({ type: 'data' })({ configArgs }));\r\n const params = qs.stringify(\r\n { startPeriod: R.head(period), endPeriod: R.last(period) },\r\n { addQueryPrefix: true },\r\n );\r\n\r\n return `${url}${params}`;\r\n};\r\n\r\nexport const getFilename = R.pipe(\r\n R.converge(R.append, [\r\n R.pipe(R.prop('dataquery'), R.ifElse(R.isNil, R.always('all'), R.identity)),\r\n R.pipe(\r\n R.prop('dataflow'),\r\n R.pick(['datasourceId', 'dataflowId', 'agencyId', 'version']),\r\n R.values,\r\n ),\r\n ]),\r\n R.join('_'),\r\n);\r\n\r\nexport const updateDataquery = dimensions => (filterId, valueId) => dataquery => {\r\n // undefined filterId <=> no selection\r\n if (R.isNil(filterId)) return R.reduce(R.concat('.'), '', dimensions);\r\n\r\n const filterIndex = R.findIndex(R.propEq('id', filterId), dimensions);\r\n\r\n const safeDataquery = R.isNil(dataquery) ? R.reduce(R.concat('.'), '', dimensions) : dataquery;\r\n\r\n // undefined valueId <=> remove filter from selection\r\n if (R.isNil(valueId)) {\r\n return R.pipe(R.split('.'), R.update(filterIndex, ''), R.join('.'))(safeDataquery);\r\n }\r\n\r\n return R.pipe(\r\n R.split('.'),\r\n R.over(\r\n R.lensIndex(filterIndex),\r\n R.pipe(\r\n R.ifElse(R.isEmpty, R.always([]), R.split('+')),\r\n R.ifElse(R.includes(valueId), R.without([valueId]), R.append(valueId)),\r\n R.join('+'),\r\n ),\r\n ),\r\n R.join('.'),\r\n )(safeDataquery);\r\n};\r\n\r\nconst greaterThanOne = R.pipe(R.length, R.flip(R.gt)(1));\r\nconst isMany = d =>\r\n R.or(rules.isTimeDimension(R.prop('id')(d)), greaterThanOne(R.prop('values')(d)));\r\nexport const getDimensionsIds = R.pipe(R.filter(isMany), R.map(R.prop('id')));\r\nexport const getUniq = (array1, array2) => R.pipe(R.concat(array2), R.uniq)(array1);\r\n","import React from 'react';\r\nimport * as R from 'ramda';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nimport numeral from 'numeral';\r\nimport { DETableCell } from '@sis-cc/dotstatsuite-ui-components';\r\n\r\nexport const renameKeys = R.curry((keysMap, obj) =>\r\n R.reduce((acc, key) => R.assoc(keysMap[key] || key, obj[key], acc), {}, R.keys(obj)),\r\n);\r\n\r\nexport const isValidNumber = R.both(R.is(Number), R.complement(R.equals(NaN)));\r\nexport const withIndex = R.addIndex(R.map)((value, index) => R.assoc('index', index)(value));\r\n\r\nexport const observationGetter = ({\r\n observations,\r\n dimensions,\r\n customAttributes,\r\n isRtl,\r\n}) => () => coordinates => {\r\n const isUncoded = R.anyPass([\r\n R.prop('isFootnote'),\r\n () => R.equals(R.prop('name'), R.prop('id')),\r\n R.pipe(R.prop('id'), R.length, R.lte(4)),\r\n ]);\r\n\r\n const cellProps = isRtl => (value, valueFlags) => {\r\n const [uncodedFlags, codedFlags] = R.partition(isUncoded)(valueFlags);\r\n return { isRtl, value, codedFlags, uncodedFlags };\r\n };\r\n\r\n const getValueId = valueIndexes =>\r\n R.pipe(\r\n R.converge(R.prop, [R.pipe(R.prop('index'), R.nth(R.__, valueIndexes)), R.prop('values')]),\r\n R.prop('id'),\r\n );\r\n\r\n const formatDecimal = ({ customAttributes, valueIndexes }) => {\r\n const attr = R.prop('decimals', customAttributes);\r\n\r\n if (R.isNil(attr)) return R.identity;\r\n\r\n const d = Number(getValueId(valueIndexes)(attr));\r\n if (R.complement(isValidNumber)(d)) return R.identity;\r\n const format = R.equals(d, 0) ? '0' : `0,0.[${R.join('', R.times(R.always('0'), d))}]`;\r\n\r\n return value => numeral(value).format(format);\r\n };\r\n\r\n const formatScale = ({ customAttributes, valueIndexes }) => {\r\n const attr = R.prop('prefscale', customAttributes);\r\n if (R.isNil(attr)) return R.identity;\r\n\r\n const e = Number(getValueId(valueIndexes)(attr));\r\n if (R.complement(isValidNumber)(e)) return R.identity;\r\n\r\n return value => numeral(value).multiply(Math.pow(10, -1 * e));\r\n };\r\n\r\n const formatSeparator = value => {\r\n if (isValidNumber(value)) return numeral(value).format(`0,0.[0000000]`);\r\n return R.identity(value);\r\n };\r\n\r\n const getValue = customAttributes => values => {\r\n const valueIndexes = R.tail(values);\r\n\r\n return R.ifElse(\r\n isValidNumber,\r\n R.pipe(\r\n formatScale({ customAttributes, valueIndexes }),\r\n formatDecimal({ customAttributes, valueIndexes }),\r\n formatSeparator,\r\n ),\r\n R.always('-'),\r\n )(R.nth(0)(values));\r\n };\r\n\r\n const getValueFlags = attributeFlags =>\r\n R.addIndex(R.reduce)((acc, valueIndex, attributeIndex) => {\r\n if (R.isNil(valueIndex)) return acc;\r\n const flag = R.prop(attributeIndex)(attributeFlags);\r\n if (R.isNil(flag)) return acc;\r\n return R.append(\r\n R.pipe(\r\n R.prop('values'),\r\n R.nth(valueIndex),\r\n R.assoc('isFootnote')(R.prop('isFootnote')(flag)),\r\n )(flag),\r\n )(acc);\r\n }, []);\r\n\r\n const observation = R.pipe(\r\n R.toPairs,\r\n R.sortBy(\r\n R.pipe(R.prop(0), R.flip(R.prop)({ ...dimensions.many, ...dimensions.one }), R.prop('index')),\r\n ),\r\n R.pluck(1),\r\n R.join(':'),\r\n R.flip(R.propOr([]))(observations),\r\n R.converge(cellProps(isRtl), [\r\n getValue(customAttributes),\r\n R.pipe(R.tail, getValueFlags(R.prop('flags')(customAttributes))),\r\n ]),\r\n )({\r\n ...coordinates,\r\n ...R.reduce((memo, { id }) => ({ ...memo, [id]: 0 }), {})(R.values(dimensions.one)),\r\n });\r\n\r\n return ;\r\n};\r\n\r\nexport const observationFormat = ({ isRtl }) => ({ observations, dimensions, customAttributes }) =>\r\n observationGetter({\r\n dimensions,\r\n observations,\r\n customAttributes,\r\n isRtl,\r\n })(R.identity);\r\n\r\nexport const dimensionFormats = {\r\n label: rules.dimensionValueDisplay('label'),\r\n code: rules.dimensionValueDisplay('code'),\r\n both: rules.dimensionValueDisplay('both'),\r\n};\r\n\r\nexport const getDimensionGetters = intl =>\r\n R.reduce(\r\n (memo, key) => ({\r\n ...memo,\r\n [key]: intl.formatMessage({ id: `vx.config.display.${key}` }),\r\n }),\r\n {},\r\n R.keys(dimensionFormats),\r\n );\r\n\r\nexport const makeTree = items => {\r\n const hierarchy = R.reduce(\r\n (index, item) =>\r\n item.parent in index\r\n ? R.assoc(item.id, [], R.assoc(item.parent, R.append(item.id, index[item.parent]), index))\r\n : R.assoc(item.id, [], index),\r\n {},\r\n items,\r\n ); //=> E.g. {\"1\":[2],\"2\":[3],\"3\":[],\"4\":[]}\r\n const index = R.map(R.head, R.groupBy(R.prop('id'), items)); //=> E.g. {\"!\": , \"2\": , ...}\r\n const assoc = id => {\r\n const childNodes = id => R.map(makeNode, hierarchy[id]);\r\n return R.isEmpty(childNodes(id)) ? index[id] : R.assoc('childNodes', childNodes(id), index[id]);\r\n };\r\n const makeNode = id => R.dissoc('parent', assoc(id));\r\n return R.map(makeNode, R.pluck('id', R.filter(item => R.isNil(item.parent), items)));\r\n};\r\n\r\nexport const computeHasSpotlight = values => {\r\n const LIMIT = 8;\r\n if (R.gt(R.length(values), LIMIT)) return true;\r\n\r\n const computeflatArray = (acc, item) => {\r\n if (item.childNodes) return R.reduce(computeflatArray, acc, item.childNodes);\r\n return [...acc, item.id];\r\n };\r\n\r\n return R.gt(R.length(R.reduce(computeflatArray, [], values)), LIMIT);\r\n};\r\n","import { createSelector } from 'reselect';\r\nimport * as R from 'ramda';\r\nimport { sdmxPeriod } from '../lib/settings';\r\nimport { dimensionFormats } from '../lib/utils';\r\n\r\n//------------------------------------------------------------------------------------------------#0\r\nconst getVis = R.prop('vis');\r\n\r\n//------------------------------------------------------------------------------------------------#1\r\nexport const getPeriod = createSelector(\r\n getVis,\r\n R.pipe(\r\n R.prop('period'),\r\n R.ifElse(R.pipe(R.length, R.equals(2)), R.identity, R.always(sdmxPeriod)),\r\n ),\r\n);\r\n\r\nexport const getViewer = createSelector(getVis, R.prop('viewer'));\r\n\r\nexport const getAction = createSelector(getVis, R.prop('action'));\r\n\r\nexport const getDisplay = createSelector(getVis, R.prop('display'));\r\n\r\nexport const getFilter = createSelector(getVis, R.prop('filter'));\r\n\r\nexport const getDataflow = createSelector(getVis, R.prop('dataflow'));\r\n\r\nexport const getDataquery = createSelector(getVis, R.prop('dataquery'));\r\n\r\nexport const getIsFullscreen = createSelector(getVis, R.prop('isFullscreen'));\r\n\r\nexport const getTimeDimensionInverted = createSelector(getVis, R.prop('timeDimensionInverted'));\r\n\r\nexport const getLayout = createSelector(getVis, R.prop('layout'));\r\n\r\nexport const getDimensionGetter = createSelector(getVis, R.prop('dimensionGetter'));\r\n\r\nexport const getDimensionFormat = createSelector(\r\n getDimensionGetter,\r\n R.flip(R.prop)(dimensionFormats),\r\n);\r\n","import { createSelector } from 'reselect';\r\nimport * as R from 'ramda';\r\nimport Set from 'es6-set';\r\nimport { getDataquery as getVisDataquery, getDimensionFormat } from './vis';\r\nimport { getSdmxAttribute } from '../lib/settings';\r\n\r\n//------------------------------------------------------------------------------------------------#0\r\nconst getSdmx = R.prop('sdmx');\r\n\r\n//------------------------------------------------------------------------------------------------#1\r\nexport const getDimensions = createSelector(getSdmx, R.prop('dimensions'));\r\n\r\nexport const getData = createSelector(getSdmx, R.prop('data'));\r\n\r\nexport const getLayout = createSelector(getSdmx, R.prop('layout'));\r\n\r\n//------------------------------------------------------------------------------------------------#2\r\nexport const getDataquery = createSelector(\r\n getVisDataquery,\r\n getDimensions,\r\n (dataquery, dimensions) => {\r\n // dataquery in state is priority 1\r\n if (R.not(R.anyPass([R.isEmpty, R.isNil])(dataquery))) return dataquery;\r\n\r\n // dataquery extracted from dimensions default selection is priority 2\r\n return R.pipe(\r\n R.map(\r\n R.pipe(\r\n R.prop('values'),\r\n R.filter(R.propEq('isDefaultSelected', true)),\r\n R.pluck('id'),\r\n R.join('+'),\r\n ),\r\n ),\r\n R.join('.'),\r\n )(dimensions);\r\n },\r\n);\r\n\r\nexport const getCustomAttributes = createSelector(getData, getDimensionFormat, (data, format) => {\r\n const flagsSet = new Set(getSdmxAttribute('flags'));\r\n const attrs = R.pathOr([], ['structure', 'attributes', 'observation'])(data);\r\n const isFootnote = true;\r\n\r\n const customAttrs = R.addIndex(R.reduce)(\r\n (memo, { id, name, values, ...rattr }, index) => {\r\n const attr = { ...rattr, id, values, index, isFootnote, name: format({ id, name }) };\r\n\r\n // flags defined in SETTINGS are *forced* footnotes\r\n // footnote is annotation...\r\n if (flagsSet.has(id)) return R.set(R.lensPath(['flags', index]), attr, memo);\r\n\r\n // decimals is used to format the obs value\r\n // should not be considered as a footnote\r\n if (R.includes(id, getSdmxAttribute('decimals'))) return R.assoc('decimals', attr, memo);\r\n\r\n // real footnotes handling: if single valued then footnote\r\n if (R.pipe(R.length, R.equals(1))(values))\r\n return R.over(R.lensProp('footnotes'), R.append(attr), memo);\r\n\r\n // if multi valued then flag\r\n if (R.pipe(R.isEmpty, R.not)(values)) return R.set(R.lensPath(['flags', index]), attr, memo);\r\n\r\n return memo;\r\n },\r\n { flags: {} /* , decimals: undefined */, footnotes: [] },\r\n )(attrs);\r\n\r\n return customAttrs;\r\n});\r\n\r\n//------------------------------------------------------------------------------------------------#3\r\nexport const getFilters = createSelector(\r\n getDimensions,\r\n getDataquery,\r\n R.pipe(\r\n R.useWith(\r\n (filters, dataquery) =>\r\n R.addIndex(R.map)((filter, index) => {\r\n if (R.pipe(R.nth(index), R.isEmpty)(dataquery)) return filter;\r\n if (R.pipe(R.nth(index), R.isNil)(dataquery)) return filter;\r\n\r\n const valueIdsSet = new Set(R.pipe(R.nth(index), R.split('+'))(dataquery));\r\n return R.over(\r\n R.lensProp('values'),\r\n R.map(\r\n R.ifElse(({ id }) => valueIdsSet.has(id), R.assoc('isSelected', true), R.identity),\r\n ),\r\n filter,\r\n );\r\n }, filters),\r\n [R.identity, R.split('.')],\r\n ),\r\n R.filter(R.pipe(R.prop('values'), R.length, R.lt(1))),\r\n ),\r\n);\r\n\r\n//------------------------------------------------------------------------------------------------#4\r\nexport const getSelection = createSelector(\r\n getFilters,\r\n R.pipe(\r\n R.map(R.over(R.lensProp('values'), R.filter(R.propEq('isSelected', true)))),\r\n R.filter(R.pipe(R.prop('values'), R.length, R.flip(R.gt)(0))),\r\n ),\r\n);\r\n","import * as R from 'ramda';\r\nimport { updateDataquery } from '../lib/sdmx';\r\nimport { getDimensions } from '../selectors/sdmx';\r\n\r\n//-----------------------------------------------------------------------------------------constants\r\nexport const CHANGE_PERIOD = '@@vis/sdmx/CHANGE_PERIOD';\r\nexport const CHANGE_FILTER = '@@vis/CHANGE_FILTER';\r\nexport const CHANGE_VIEWER = '@@vis/CHANGE_VIEWER';\r\nexport const CHANGE_ACTION = '@@vis/CHANGE_ACTION';\r\nexport const CHANGE_DATAFLOW = '@@vis/sdmx/CHANGE_DATAFLOW';\r\nexport const CHANGE_DATAQUERY = '@@vis/sdmx/CHANGE_DATAQUERY';\r\nexport const OVERRIDE_DATAQUERY = '@@vis/sdmx/OVERRIDE_DATAQUERY';\r\nexport const CHANGE_LAYOUT = '@@vis/CHANGE_LAYOUT';\r\nexport const CHANGE_DIMENSION_GETTER = '@@vis/CHANGE_DIMENSION_GETTER';\r\nexport const CHANGE_IS_TIME_DIMENSION_INVERTED = '@@vis/CHANGE_IS_TIME_DIMENSION_INVERTED';\r\n\r\n//------------------------------------------------------------------------------------------creators\r\nexport const changePeriod = period => ({ type: CHANGE_PERIOD, payload: { period } });\r\nexport const changeFilter = filterId => ({ type: CHANGE_FILTER, payload: { filterId } });\r\nexport const changeViewer = viewerId => ({ type: CHANGE_VIEWER, payload: { viewerId } });\r\nexport const changeAction = actionId => ({ type: CHANGE_ACTION, payload: { actionId } });\r\nexport const changeDataflow = dataflow => ({ type: CHANGE_DATAFLOW, payload: { dataflow } });\r\nexport const changeLayout = layout => ({ type: CHANGE_LAYOUT, payload: { layout } });\r\nexport const changeDimensionGetter = dimensionGetter => ({\r\n type: CHANGE_DIMENSION_GETTER,\r\n payload: { dimensionGetter },\r\n});\r\nexport const changeIsTimeDimensionInverted = (id, isTimeDimensionInverted) => ({\r\n type: CHANGE_IS_TIME_DIMENSION_INVERTED,\r\n payload: { id, isTimeDimensionInverted },\r\n});\r\nexport const changeDataquery = (filterId, valueId) => (dispatch, getState) =>\r\n dispatch({\r\n type: CHANGE_DATAQUERY,\r\n payload: { filterId, valueId, dimensions: getDimensions(getState()) },\r\n });\r\n\r\n//-------------------------------------------------------------------------------------------reducer\r\nexport default (state = {}, action = {}) => {\r\n switch (action.type) {\r\n case CHANGE_ACTION:\r\n var isFullscreen = R.always(R.equals(action.payload.actionId, 'fullscreen'));\r\n return R.evolve({\r\n isFullscreen: R.ifElse(isFullscreen, R.not, R.identity),\r\n action: R.cond([\r\n [isFullscreen, R.identity],\r\n [R.equals(action.payload.actionId), R.always(undefined)],\r\n [R.T, R.always(action.payload.actionId)],\r\n ]),\r\n })(state);\r\n case CHANGE_FILTER:\r\n return R.over(\r\n R.lensProp('filter'),\r\n filter =>\r\n R.ifElse(R.equals(filter), R.always(undefined), R.identity)(\r\n R.path(['payload', 'filterId'], action),\r\n ),\r\n state,\r\n );\r\n case CHANGE_PERIOD:\r\n return R.set(R.lensProp('period'), R.path(['payload', 'period'], action), state);\r\n case CHANGE_VIEWER:\r\n return R.set(R.lensProp('viewer'), R.path(['payload', 'viewerId'], action), state);\r\n case CHANGE_LAYOUT:\r\n return R.set(R.lensProp('layout'), R.path(['payload', 'layout'], action), state);\r\n case CHANGE_DIMENSION_GETTER:\r\n return R.set(\r\n R.lensProp('dimensionGetter'),\r\n R.path(['payload', 'dimensionGetter'], action),\r\n state,\r\n );\r\n case CHANGE_IS_TIME_DIMENSION_INVERTED:\r\n return {\r\n ...state,\r\n timeDimensionInverted: R.set(\r\n R.lensProp(action.payload.id),\r\n !action.payload.isTimeDimensionInverted,\r\n state.timeDimensionInverted,\r\n ),\r\n };\r\n case CHANGE_DATAQUERY:\r\n return R.over(\r\n R.lensProp('dataquery'),\r\n updateDataquery(R.path(['payload', 'dimensions'], action))(\r\n R.path(['payload', 'filterId'], action),\r\n R.path(['payload', 'valueId'], action),\r\n ),\r\n state,\r\n );\r\n case OVERRIDE_DATAQUERY:\r\n return R.set(R.lensProp('dataquery'), R.prop('dataquery', action), state);\r\n case CHANGE_DATAFLOW:\r\n return R.pipe(\r\n R.set(R.lensProp('viewer'), 'table'),\r\n R.set(R.lensProp('dataquery'), R.path(['payload', 'dataflow', 'dataquery'], action)),\r\n R.set(R.lensProp('period'), R.path(['payload', 'dataflow', 'period'], action)),\r\n R.flip(R.merge)(R.prop('payload', action)),\r\n )(state);\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { createSelector } from 'reselect';\r\nimport * as R from 'ramda';\r\n\r\n//------------------------------------------------------------------------------------------------#0\r\nconst getApp = R.prop('app');\r\n\r\n//------------------------------------------------------------------------------------------------#1\r\nexport const getLocale = createSelector(getApp, R.prop('locale'));\r\n\r\nexport const getPending = createSelector(getApp, R.prop('pending'));\r\n\r\n//------------------------------------------------------------------------------------------------#2\r\nexport const getIsPending = id => createSelector(getPending, R.pipe(R.prop(id), R.equals(true)));\r\n\r\nexport const getIsRtl = createSelector(getLocale, R.propEq('isRtl', true));\r\n","'use strict';\r\n\r\nexport const mapStructure = (s, lang) => {\r\n const ret = {};\r\n ret.meta = {\r\n 'content-languages': [lang],\r\n schema:\r\n 'https://raw.githubusercontent.com/sdmx-twg/sdmx-json/develop/structure-message/tools/schemas/1.0/sdmx-json-structure-schema.json',\r\n };\r\n\r\n ret.data = {};\r\n\r\n //Dataflow\r\n ret.data.dataflows = s.Dataflow;\r\n renameKey(ret.data.dataflows[0], 'agencyId', 'agencyID');\r\n ret.data.dataflows[0].name = convertName(s.Dataflow[0].names);\r\n delete s.Dataflow[0].names;\r\n ret.data.dataflows[0].structure = s.Dataflow[0].dataStructureRef;\r\n ret.data.dataflows[0].links = createLinkNode('self', s.Dataflow[0].urn, 'dataflow');\r\n ret.data.dataflows[0].links = ret.data.dataflows[0].links.concat(\r\n createLinkNode('structure', s.Dataflow[0].dataStructureRef, 'datastructure'),\r\n );\r\n\r\n //conceptscheme\r\n ret.data.conceptSchemes = s.ConceptScheme;\r\n ret.data.conceptSchemes[0].name = convertName(s.ConceptScheme[0].names);\r\n delete ret.data.conceptSchemes[0].names;\r\n renameKey(ret.data.conceptSchemes[0], 'agencyId', 'agencyID');\r\n renameKey(ret.data.conceptSchemes[0], 'items', 'concepts');\r\n\r\n ret.data.conceptSchemes[0].concepts.forEach(v => {\r\n v.name = convertName(v.names);\r\n delete v.names;\r\n });\r\n ret.data.conceptSchemes[0].links = createLinkNode(\r\n 'self',\r\n s.ConceptScheme[0].urn,\r\n 'conceptscheme',\r\n );\r\n\r\n //codelists\r\n ret.data.codelists = s.Codelist;\r\n\r\n ret.data.codelists.forEach(cl => {\r\n renameKey(cl, 'agencyId', 'agencyID');\r\n cl.name = convertName(cl.names);\r\n delete cl.names;\r\n renameKey(cl, 'items', 'codes');\r\n cl.links = createLinkNode('self', cl.urn, 'codelist');\r\n\r\n if (cl.codes) {\r\n let hasUniqueRoot = isUniqueRoot(cl.codes);\r\n cl.codes.forEach(c => {\r\n c.name = convertName(c.names);\r\n delete c.names;\r\n if (c.parentCode && !hasUniqueRoot) {\r\n renameKey(c, 'parentCode', 'parent');\r\n }\r\n c.links = createLinkNode('self', c.urn, 'code');\r\n });\r\n }\r\n });\r\n\r\n /*\r\n ret.data.dataStructures = s.DataStructure;\r\n ret.data.dataStructures[0].dataStructureComponents = {};\r\n ret.data.dataStructures[0].dataStructureComponents.dimensionList = s.DataStructure[0].dimensionList;\r\n \r\n */\r\n //dataStructures\r\n ret.data.dataStructures = s.DataStructure;\r\n renameKey(ret.data.dataStructures[0], 'agencyId', 'agencyID');\r\n ret.data.dataStructures[0].dataStructureComponents = {};\r\n ret.data.dataStructures[0].name = convertName(ret.data.dataStructures[0].names);\r\n delete ret.data.dataStructures[0].names;\r\n ret.data.dataStructures[0].links = createLinkNode(\r\n 'self',\r\n ret.data.dataStructures[0].urn,\r\n 'datastructure',\r\n );\r\n //dataStructures - DimensionsList\r\n ret.data.dataStructures[0].dataStructureComponents.dimensionList =\r\n s.DataStructure[0].dimensionList;\r\n var pos = 0;\r\n var timePos = -1;\r\n ret.data.dataStructures[0].dimensionList.dimensions.forEach(d => {\r\n d.links = createLinkNode('self', d.urn, 'dimension');\r\n d.type = 'Dimension';\r\n renameKey(d, 'concept', 'conceptIdentity');\r\n d.position = pos++;\r\n if (d.representation && d.representation.representation) {\r\n d.localRepresentation = { enumeration: d.representation.representation };\r\n }\r\n if (d.isTimeDimension) {\r\n timePos = pos - 1;\r\n ret.data.dataStructures[0].dimensionList.timeDimensions = [\r\n {\r\n id: d.id,\r\n urn: d.urn,\r\n links: createLinkNode(d.links[0].rel, d.links[0].urn, d.links[0].type),\r\n position: d.position,\r\n type: d.type,\r\n conceptIdentity: d.conceptIdentity,\r\n localRepresentation: {\r\n textFormat: {\r\n textType: 'ObservationalTimePeriod',\r\n isSequence: false,\r\n isMultiLingual: false,\r\n },\r\n },\r\n },\r\n ];\r\n }\r\n });\r\n\r\n if (timePos != -1) ret.data.dataStructures[0].dimensionList.dimensions.splice(timePos, timePos);\r\n delete ret.data.dataStructures[0].dimensionList;\r\n\r\n //dataStructures - measureList\r\n ret.data.dataStructures[0].dataStructureComponents.measureList = {};\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure =\r\n s.DataStructure[0].primaryMeasure;\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.links = createLinkNode(\r\n 'self',\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.urn,\r\n 'primarymeasure',\r\n );\r\n renameKey(\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure,\r\n 'concept',\r\n 'conceptIdentity',\r\n );\r\n renameKey(\r\n ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure,\r\n 'representation',\r\n 'localRepresentation',\r\n );\r\n\r\n /* ret.data.dataStructures[0].dataStructureComponents.measureList.primaryMeasure.localRepresentation={\r\n \"textFormat\": {\r\n \"textType\": \"Double\",\r\n \"sequence\": false\r\n }\r\n };*/\r\n delete ret.data.dataStructures[0].primaryMeasure;\r\n\r\n //dataStructures - attributeList\r\n ret.data.dataStructures[0].dataStructureComponents.attributeList =\r\n s.DataStructure[0].attributeList;\r\n\r\n if (ret.data.dataStructures[0].dataStructureComponents.attributeList) {\r\n ret.data.dataStructures[0].dataStructureComponents.attributeList.attributes.forEach(a => {\r\n if (a.mandatory) {\r\n a.assignmentStatus = 'Mandatory';\r\n } else {\r\n a.assignmentStatus = 'Conditional';\r\n }\r\n a.attributeRelationship = {\r\n dimensions: a.dimensionReferences,\r\n };\r\n renameKey(a, 'concept', 'conceptIdentity');\r\n a.links = createLinkNode('self', a.urn, 'dataattribute');\r\n if (a.representation && a.representation.representation)\r\n a.localRepresentation = { enumeration: a.representation.representation };\r\n });\r\n }\r\n\r\n delete ret.data.dataStructures[0].attributeList;\r\n\r\n /*console.log('RETURNING STRUCTURE');\r\n console.log(JSON.stringify(ret));\r\n console.log(ret);*/\r\n\r\n return ret;\r\n};\r\n\r\nfunction isUniqueRoot(codes) {\r\n if (!codes) {\r\n return false;\r\n }\r\n let noParentCount = 0;\r\n //two roots\r\n for (let i = 0; i < codes.length; i++) {\r\n if (!codes[i].parentCode) {\r\n noParentCount++;\r\n }\r\n if (noParentCount > 1) return false;\r\n }\r\n return true;\r\n}\r\n\r\nconst convertName = names => {\r\n const ret = {};\r\n names.forEach(v => {\r\n ret[v.locale] = v.value;\r\n });\r\n return ret;\r\n};\r\n\r\nconst renameKey = (object, oldKey, newKey) => {\r\n if (!object[oldKey]) return;\r\n object[newKey] = object[oldKey];\r\n delete object[oldKey];\r\n};\r\n\r\nconst createLinkNode = (rel, urn, type) => {\r\n return [{ rel: rel, urn: urn, type: type }];\r\n};\r\n\r\n/*\r\nDATA\r\n*/\r\n\r\nconst convertLanguageNode = (text, lang) => {\r\n if (text == null) return null;\r\n var ret = {};\r\n ret[lang] = text;\r\n return ret;\r\n};\r\n\r\nconst convertCodelist = (cl, lang) => {\r\n cl.name = convertLanguageNode(cl.name, lang);\r\n cl.roles = [cl.id];\r\n if (cl.values) {\r\n cl.values.forEach(v => {\r\n v.name = convertLanguageNode(v.name, lang);\r\n });\r\n }\r\n};\r\n\r\nconst convert_struct_component = (comp, lang) => {\r\n if (comp) {\r\n comp.forEach(v => {\r\n convertCodelist(v, lang);\r\n /*v.relationship= {\r\n \"primaryMeasure\": \"OBS_VALUE\"\r\n };*/\r\n });\r\n }\r\n};\r\n\r\nexport const mapData = (d, lang) => {\r\n const ret = {};\r\n //meta\r\n ret.meta = d.header;\r\n ret.meta['content-languages'] = [lang];\r\n\r\n if (!d.dataSets[0].observations) {\r\n return null;\r\n }\r\n\r\n //data\r\n ret.data = {};\r\n ret.data.dataSets = d.dataSets;\r\n ret.data.structure = {};\r\n\r\n ret.data.structure.name = {};\r\n ret.data.structure.name[lang] = d.structure.name;\r\n ret.data.structure.description = convertLanguageNode(d.structure.description);\r\n ret.data.structure.dimensions = d.structure.dimensions;\r\n ret.data.structure.attributes = d.structure.attributes;\r\n ret.data.structure.attributes.dataSet = d.structure.attributes.dataset;\r\n\r\n convert_struct_component(ret.data.structure.dimensions.dataset, lang);\r\n convert_struct_component(ret.data.structure.dimensions.series, lang);\r\n convert_struct_component(ret.data.structure.dimensions.observation, lang);\r\n convert_struct_component(ret.data.structure.attributes.dataset, lang);\r\n convert_struct_component(ret.data.structure.attributes.series, lang);\r\n convert_struct_component(ret.data.structure.attributes.observation, lang);\r\n\r\n //let toParse = true;\r\n for (let k in ret.data.dataSets[0].observations) {\r\n if (ret.data.dataSets[0].observations.hasOwnProperty(k)) {\r\n if (\r\n ret.data.dataSets[0].observations[k][0] &&\r\n !isNaN(ret.data.dataSets[0].observations[k][0])\r\n ) {\r\n ret.data.dataSets[0].observations[k][0] = parseFloat(\r\n ret.data.dataSets[0].observations[k][0],\r\n );\r\n }\r\n }\r\n }\r\n\r\n return ret;\r\n};\r\n","import * as R from 'ramda';\r\nimport axios from 'axios';\r\nimport FileSaver from 'file-saver';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nimport { structureParser, getConfig, getFilename, getFusionConfig } from '../lib/sdmx';\r\nimport { sdmxRange } from '../lib/settings';\r\nimport * as fm from './formatMapper';\r\n\r\nconst getLocale = R.pathOr('en', ['locale', 'id']);\r\nconst keysLimit = 800;\r\n\r\nconst getStructure = ({ configArgs }) => {\r\n const { url, datasource } =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION'\r\n ? getFusionConfig({ configArgs })\r\n : getConfig({ type: 'structure' })({ configArgs });\r\n\r\n const qStringParams =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION'\r\n ? { references: 'all', format: 'sdmx-json', detail: 'structureOnly', includeMetrics: true }\r\n : { references: 'all' };\r\n\r\n const acceptParam =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION'\r\n ? {\r\n 'Accept-Language': getLocale(configArgs),\r\n }\r\n : {\r\n Accept: 'application/vnd.sdmx.structure+json;version=1.0',\r\n 'Accept-Language': getLocale(configArgs),\r\n };\r\n\r\n const mapSDMX_structure = data => {\r\n return data.data;\r\n };\r\n const mapSDMX_structureFusion = data => {\r\n return fm.mapStructure(data.data, configArgs.locale.id);\r\n };\r\n\r\n const sdmxMapperStruct =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION'\r\n ? mapSDMX_structureFusion\r\n : mapSDMX_structure;\r\n\r\n return (\r\n axios\r\n .get(url, {\r\n params: R.cond([\r\n [\r\n R.always(R.prop('supportsReferencePartial', datasource)),\r\n R.assoc('detail', 'referencepartial'),\r\n ],\r\n [R.T, R.identity],\r\n ])(qStringParams),\r\n headers: acceptParam,\r\n })\r\n //.then(R.pipe(R.prop('data'), structureParser));\r\n .then(R.pipe(sdmxMapperStruct, structureParser))\r\n );\r\n};\r\n\r\nconst getData = ({ configArgs, requestArgs }) => {\r\n const { url, datasource } = getConfig({ type: 'data' })({ configArgs });\r\n\r\n const limitData = data => {\r\n const keys = Object.keys(data.data.dataSets[0].observations);\r\n if (keys.length > keysLimit) {\r\n data.data.dataSets[0].limited = {\r\n returnedKeyCount: keys.length,\r\n limitedTo: keysLimit,\r\n };\r\n for (let i = keysLimit; i < keys.length; i++) {\r\n delete data.data.dataSets[0].observations[keys[i]];\r\n }\r\n }\r\n };\r\n\r\n const mapSDMX_data = data => {\r\n limitData(data);\r\n return data.data;\r\n };\r\n const mapSDMX_dataFusion = data => {\r\n limitData(data);\r\n return fm.mapData(data.data, configArgs.locale.id);\r\n };\r\n\r\n const sdmxMapperData =\r\n R.prop('backendId', configArgs.dataflow) == 'FUSION' ? mapSDMX_dataFusion : mapSDMX_data;\r\n\r\n return (\r\n axios\r\n .get(url, {\r\n params: R.mergeRight({ dimensionAtObservation: 'AllDimensions' }, requestArgs),\r\n headers: R.cond([\r\n [\r\n R.always(R.prop('hasRangeHeader', datasource)),\r\n R.assoc('Range', `values=${R.head(sdmxRange)}-${R.last(sdmxRange)}`),\r\n ],\r\n [R.T, R.identity],\r\n ])({\r\n Accept: 'application/vnd.sdmx.data+json;version=1.0.0-wd',\r\n 'Accept-Language': getLocale(configArgs),\r\n }),\r\n })\r\n //.then(R.pipe(R.prop('data'), rules.v8Transformer));\r\n .then(R.pipe(sdmxMapperData, rules.v8Transformer))\r\n );\r\n};\r\n\r\nconst getDataFile = ({ configArgs, requestArgs }) => {\r\n const { url } = getConfig({ type: 'data' })({ configArgs });\r\n\r\n return axios\r\n .get(url, {\r\n params: requestArgs,\r\n headers: {\r\n Accept: 'application/vnd.sdmx.data+csv;file=true',\r\n 'Accept-Language': getLocale(configArgs),\r\n },\r\n responseType: 'blob',\r\n })\r\n .then(response => {\r\n const blob = new Blob([R.prop('data')(response)], {\r\n type: R.pathOr('text/csv', ['headers', 'content-type'])(response),\r\n });\r\n FileSaver.saveAs(blob, `${getFilename(configArgs)}.csv`);\r\n });\r\n};\r\n\r\nconst methods = { getStructure, getData, getDataFile };\r\n\r\nconst error = method => () => {\r\n throw new Error(`Unkown method: ${method}`);\r\n};\r\nconst main = ({ method, ...rest }) => (methods[method] || error(method))(rest);\r\nR.compose(R.forEach(([name, fn]) => (main[name] = fn)), R.toPairs)(methods);\r\n\r\nexport default main;\r\n","import * as R from 'ramda';\r\nimport { getDataflow, getPeriod } from '../selectors/vis';\r\nimport { getLocale } from '../selectors/app';\r\nimport { getDataquery } from '../selectors/sdmx';\r\nimport sdmxApi from '../api/sdmx';\r\nimport { OVERRIDE_DATAQUERY } from './vis';\r\nimport { setPending, pushLog, LOG_ERROR } from './app';\r\n\r\nconst isDev = process.env.NODE_ENV === 'development';\r\n\r\n//-----------------------------------------------------------------------------------------constants\r\nexport const HANDLE_STRUCTURE = '@@sdmx/HANDLE_STRUCTURE';\r\nexport const HANDLE_DATA = '@@sdmx/HANDLE_DATA';\r\n\r\n//--------------------------------------------------------------------------------------thunks (api)\r\nconst request = (dispatch, ctx) => {\r\n const { method } = ctx;\r\n const pendingId = ctx.pendingId || method;\r\n\r\n // eslint-disable-next-line no-console\r\n if (isDev) console.info(`request: ${pendingId}`);\r\n\r\n dispatch(setPending(pendingId, true));\r\n return sdmxApi(ctx)\r\n .then(res => {\r\n dispatch(setPending(pendingId));\r\n return res;\r\n })\r\n .catch(error => {\r\n const log = error.response\r\n ? { method, errorCode: error.response.data.errorCode, statusCode: error.response.status }\r\n : { method, error };\r\n\r\n dispatch(setPending(pendingId));\r\n dispatch(pushLog({ type: LOG_ERROR, payload: { log } }));\r\n\r\n // required to break the promised chain\r\n throw error;\r\n });\r\n};\r\n\r\nexport const requestStructure = ({ shouldRequestStructure }) => (dispatch, getState) => {\r\n if (R.not(shouldRequestStructure)) return Promise.resolve();\r\n\r\n const configArgs = {\r\n locale: getLocale(getState()),\r\n dataflow: getDataflow(getState()),\r\n };\r\n return request(dispatch, { method: 'getStructure', configArgs }).then(structure => {\r\n dispatch({ type: HANDLE_STRUCTURE, structure });\r\n });\r\n};\r\n\r\nexport const requestData = ({ shouldRequestStructure } = {}) => (dispatch, getState) => {\r\n requestStructure({ shouldRequestStructure })(dispatch, getState).then(() => {\r\n const requestArgs = {\r\n startPeriod: R.head(getPeriod(getState())),\r\n endPeriod: R.last(getPeriod(getState())),\r\n };\r\n const dataquery = getDataquery(getState());\r\n const dataflow = getDataflow(getState());\r\n const configArgs = {\r\n locale: getLocale(getState()),\r\n dataflow,\r\n dataquery,\r\n };\r\n dispatch({ type: OVERRIDE_DATAQUERY, dataquery });\r\n return request(dispatch, { method: 'getData', configArgs, requestArgs })\r\n .then(({ data, layout }) => {\r\n // UNICEF specific\r\n document.getElementById('root').dispatchEvent(\r\n new CustomEvent('unicef_dataflowLoaded', {\r\n detail: {\r\n dataflow,\r\n data,\r\n },\r\n }),\r\n );\r\n\r\n dispatch({ type: HANDLE_DATA, data, layout });\r\n })\r\n .catch(error => {\r\n let nodata = null;\r\n let nolayout = null;\r\n dispatch({ type: HANDLE_DATA, nodata, nolayout });\r\n });\r\n });\r\n};\r\n\r\nexport const requestDataFile = ({ isDownloadAllData, dataflow } = {}) => (dispatch, getState) => {\r\n const requestArgs = isDownloadAllData\r\n ? {}\r\n : { startPeriod: R.head(getPeriod(getState())), endPeriod: R.last(getPeriod(getState())) };\r\n const configArgs = R.cond([\r\n [R.always(R.not(isDownloadAllData)), R.assoc('dataquery', getDataquery(getState()))],\r\n [R.T, R.identity],\r\n ])({\r\n locale: getLocale(getState()),\r\n dataflow,\r\n });\r\n const pendingId = R.ifElse(\r\n R.has('id'),\r\n R.pipe(R.prop('id'), id => `getDataFile/${id}`),\r\n R.always('requestingDataFile'),\r\n )(dataflow);\r\n return request(dispatch, { method: 'getDataFile', configArgs, requestArgs, pendingId });\r\n};\r\n\r\n//-------------------------------------------------------------------------------------------reducer\r\nexport default (state = {}, action = {}) => {\r\n switch (action.type) {\r\n case HANDLE_STRUCTURE:\r\n return R.set(R.lensProp('dimensions'), R.path(['structure', 'dimensions'], action), state);\r\n case HANDLE_DATA:\r\n return R.pipe(\r\n R.set(R.lensProp('data'), R.prop('data', action)),\r\n R.set(R.lensProp('layout'), R.prop('layout', action)),\r\n )(state);\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport app from '../ducks/app';\r\nimport vis from '../ducks/vis';\r\nimport sdmx from '../ducks/sdmx';\r\n\r\nexport default combineReducers({ app, sdmx, vis });\r\n","import * as R from 'ramda';\r\nimport { CHANGE_DATAQUERY, CHANGE_PERIOD, CHANGE_DATAFLOW } from '../ducks/vis';\r\nimport { requestData } from '../ducks/sdmx';\r\n\r\nconst isDev = process.env.NODE_ENV === 'development';\r\n\r\nexport const requestDataMiddleware = ({ dispatch }) => next => action => {\r\n const future = next(action);\r\n\r\n if (R.pipe(R.prop('type'), R.flip(R.includes)([CHANGE_DATAQUERY, CHANGE_PERIOD]))(action)) {\r\n // eslint-disable-next-line no-console\r\n if (isDev) console.info(`requestDataMiddleware: ${action.type}`);\r\n\r\n dispatch(requestData());\r\n }\r\n\r\n if (R.pipe(R.prop('type'), R.flip(R.includes)([CHANGE_DATAFLOW]))(action)) {\r\n // eslint-disable-next-line no-console\r\n if (isDev) console.info(`requestStructureMiddleware: ${action.type}`);\r\n\r\n dispatch(requestData({ shouldRequestStructure: true }));\r\n }\r\n\r\n return future;\r\n};\r\n","import { createStore, applyMiddleware, compose } from 'redux';\r\nimport thunk from 'redux-thunk';\r\nimport { createLogger } from 'redux-logger';\r\nimport { requestDataMiddleware } from './middlewares';\r\n\r\nexport const withLogger = middlewares => {\r\n if (process.env.NODE_ENV === 'production') return middlewares;\r\n\r\n const logger = createLogger({\r\n duration: true,\r\n timestamp: false,\r\n collapsed: true,\r\n diff: true,\r\n });\r\n\r\n return [...middlewares, logger];\r\n};\r\n\r\nexport default (initialState = {}, rootReducer) => {\r\n const middlewares = [thunk, requestDataMiddleware];\r\n\r\n const enhancers = [applyMiddleware(...withLogger(middlewares))];\r\n\r\n const store = createStore(rootReducer, initialState, compose(...enhancers));\r\n\r\n return store;\r\n};\r\n","import { createMuiTheme } from '@material-ui/core/styles';\r\n\r\nexport const Colors = {\r\n GREY1: '#F0F0F0',\r\n GREY2: '#CCCCCC',\r\n GREY3: '#494444',\r\n GREY4: '#A4A1A1',\r\n GREY5: '#666666',\r\n BLUE1: '#2973BD',\r\n BLUE2: '#0965C1',\r\n BLUE3: '#2F75B5',\r\n BLUE4: '#BDD7EE',\r\n BLUE5: '#DDEBF7',\r\n BLUE6: '#1E226A',\r\n WHITE1: '#FFFFFF',\r\n BLACK1: '#000000',\r\n GREEN1: '#8CC841',\r\n ORANGE: '#f7a32c',\r\n};\r\n\r\nexport const FontSizes = {\r\n SIZE1: 18,\r\n SIZE2: 14,\r\n SIZE3: 12,\r\n};\r\n\r\nexport const Formats = {\r\n WIDE: 'initial',\r\n NARROW: 400,\r\n APP: 1000,\r\n APP_MIN_SIZE: 360,\r\n ITEM_MIN_SIZE: 350,\r\n};\r\n\r\nexport const Layout = {\r\n PADDING: '5%',\r\n SIDE_WIDTH: 300,\r\n FILTER_MAX_HEIGHT: 250,\r\n};\r\n\r\nexport const theme = (rtl = 'ltr') =>\r\n createMuiTheme({\r\n overrides: {\r\n MuiButton: {\r\n text: {\r\n textTransform: 'none',\r\n },\r\n },\r\n },\r\n palette: {\r\n primary: {\r\n main: '#137cbd',\r\n mainAlpha: '#137cbd26',\r\n light: '#5dabf0',\r\n dark: '#00508c',\r\n contrastText: '#ffffff',\r\n },\r\n secondary: {\r\n main: '#bdd7ee',\r\n light: '#f0ffff',\r\n dark: '#8ca6bc',\r\n contrastText: '#ff0000',\r\n },\r\n action: {\r\n hover: '#bdd7ee',\r\n selected: '#137cbd',\r\n active: 'rgba(19,124,189,.3)',\r\n },\r\n typography: {\r\n fontFamily: ['Segoe UI'],\r\n },\r\n raisedButton: {\r\n textColor: '#ffffff',\r\n primaryTextColor: '#ffffff',\r\n },\r\n default: {\r\n backgroundColor: '#00000026', // grey with alpha\r\n },\r\n configLabelBG: '#B5CEEB',\r\n configLabelCol: '#1C2768',\r\n },\r\n app: {\r\n appSize: Formats.APP,\r\n appMinSize: Formats.APP_MIN_SIZE,\r\n itemMinSize: Formats.ITEM_MIN_SIZE,\r\n },\r\n scopeListContainer: {\r\n maxHeight: 250,\r\n },\r\n scopeList: {\r\n divider: '#000000',\r\n },\r\n direction: rtl,\r\n typography: {\r\n // until v4 https://material-ui.com/style/typography/#migration-to-typography-v2\r\n useNextVariants: true,\r\n },\r\n configLabel: {\r\n backgroundColor: '#B5CEEB',\r\n color: '#43679F',\r\n fontFamily: 'Segoe UI',\r\n fontSize: 16,\r\n },\r\n configButtonRegular: {\r\n backgroundColor: '#B5CEEB',\r\n color: '#43679F',\r\n fontFamily: 'Segoe UI',\r\n fontSize: 16,\r\n fontWeight: 'inherit',\r\n textTransform: 'none',\r\n },\r\n configButtonSelected: {\r\n backgroundColor: '#778899',\r\n color: '#B5CEEB',\r\n fontFamily: 'Segoe UI',\r\n fontSize: 16,\r\n fontWeight: 'inherit',\r\n textTransform: 'none',\r\n },\r\n panelSummary: {\r\n backgroundColor: '#137cbd',\r\n color: 'white',\r\n fontFamily: 'Segoe UI',\r\n fontSize: 16,\r\n },\r\n panelIcon: {\r\n color: 'white',\r\n },\r\n configInputs: {\r\n backgroundColor: 'white',\r\n },\r\n alert: {\r\n color: '#c23030',\r\n hover: {\r\n backgroundColor: 'rgba(219,55,55,.15)',\r\n },\r\n active: {\r\n backgroundColor: 'rgba(219,55,55,.3)',\r\n },\r\n },\r\n table: {\r\n yBg: '#B5CEEB',\r\n yBgHover: '#c3d7ef',\r\n yBgActive: '#7e90a4',\r\n yFontHeader: '#1C2768',\r\n yFont: '#43679F',\r\n zBg: '#386CAA',\r\n zBgHover: '#5f89bb',\r\n zBgActive: '#274b76',\r\n zFontHeader: '#A2C2E4',\r\n zFont: Colors.WHITE1,\r\n xBg: Colors.WHITE1,\r\n xBgHeader: '#D7E6F4',\r\n xBgHover: '#dfebf6',\r\n xBgActive: '#96a1aa',\r\n xFontHeader: '#1C2768',\r\n xFont: '#43679F',\r\n oFont: Colors.GREY3,\r\n sBg: Colors.GREY1,\r\n },\r\n });\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeDeepRight } from 'ramda';\r\nimport { ThemeProvider } from 'glamorous';\r\nimport { mainTheme } from '@sis-cc/dotstatsuite-ui-components';\r\nimport rtl from 'jss-rtl';\r\nimport { create } from 'jss';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { theme as muiTheme } from './theme';\r\nimport JssProvider from 'react-jss/lib/JssProvider';\r\nimport { createGenerateClassName, jssPreset } from '@material-ui/core/styles';\r\n\r\n// Configure JSS\r\nconst jss = create({ plugins: [...jssPreset().plugins, rtl()] });\r\n// Custom Material-UI class name generator.\r\nconst generateClassName = createGenerateClassName();\r\n\r\nconst Provider = ({ theme, children, isRtl }) => (\r\n \r\n \r\n \r\n {React.Children.only(children)}\r\n \r\n \r\n \r\n);\r\n\r\nProvider.propTypes = {\r\n theme: PropTypes.object,\r\n children: PropTypes.element.isRequired,\r\n isRtl: PropTypes.bool,\r\n};\r\n\r\nexport default Provider;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { DELayout, DELayoutContent, DESplash } from '@sis-cc/dotstatsuite-ui-components';\r\nimport logo from '../assets/data-explorer-logo.png';\r\n\r\nclass ErrorBoundary extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { hasError: false };\r\n }\r\n\r\n componentDidCatch() {\r\n this.setState({ hasError: true });\r\n }\r\n\r\n render() {\r\n if (!this.state.hasError) return this.props.children;\r\n\r\n if (this.props.isFinal) return

Whoops, something went wrong on our end.

;\r\n\r\n return (\r\n \r\n \r\n } logo={logo} />\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nErrorBoundary.propTypes = {\r\n children: PropTypes.node,\r\n isFinal: PropTypes.bool,\r\n};\r\n\r\nexport default ErrorBoundary;\r\n","import React, { Fragment } from 'react';\r\nimport Responsive from 'react-responsive';\r\n\r\nconst Narrow = props => ;\r\nconst Default = props => ;\r\n\r\nexport default Component =>\r\n class extends React.Component {\r\n render = () => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n };\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps, pure } from 'recompose';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { DEFilterPeriod } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { changePeriod } from '../../ducks/vis';\r\nimport { getPeriod } from '../../selectors/vis';\r\nimport { sdmxPeriodBoundariesMinMax, sdmxPeriodBoundaries } from '../../lib/settings';\r\n\r\nexport default compose(\r\n connect(createStructuredSelector({ period: getPeriod }), { changePeriod }),\r\n withProps({\r\n titleLabel: ,\r\n //tagLabel: ,\r\n tagLabel: '',\r\n periodBoundaries: sdmxPeriodBoundaries,\r\n options: { ...sdmxPeriodBoundariesMinMax, labelStepSize: 10 },\r\n }),\r\n pure,\r\n)(DEFilterPeriod);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps, pure } from 'recompose';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { VXFiltersCurrent } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { changeDataquery } from '../../ducks/vis';\r\nimport { getSelection } from '../../selectors/sdmx';\r\n\r\nexport default compose(\r\n connect(createStructuredSelector({ items: getSelection }), { changeFilters: changeDataquery }),\r\n withProps({\r\n titleLabel: ,\r\n clearAllLabel: ,\r\n blankLabel: ,\r\n noScroll: true,\r\n }),\r\n pure,\r\n)(VXFiltersCurrent);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps, pure } from 'recompose';\r\nimport * as R from 'ramda';\r\nimport { injectIntl } from 'react-intl';\r\nimport {\r\n spotlightScopeListEngine,\r\n VXScopeList,\r\n VXSpotlight,\r\n} from '@sis-cc/dotstatsuite-ui-components';\r\nimport { changeFilter, changeDataquery } from '../../ducks/vis';\r\nimport { getFilter } from '../../selectors/vis';\r\nimport { getFilters } from '../../selectors/sdmx';\r\n\r\nconst Filter = pure(VXScopeList);\r\n\r\nexport default compose(\r\n injectIntl,\r\n connect(createStructuredSelector({ filters: getFilters, activePanelId: getFilter }), {\r\n changeSelection: changeDataquery,\r\n onChangeActivePanel: changeFilter,\r\n }),\r\n withProps(({ intl }) => ({\r\n optionsSpotlight: {\r\n hasClearAll: true,\r\n mainPlaceholder: intl.formatMessage({ id: 'vx.spotlight.placeholder.primary' }),\r\n secondaryPlaceholder: intl.formatMessage({ id: 'vx.spotlight.placeholder.secondary' }),\r\n },\r\n spotlight: {\r\n engine: spotlightScopeListEngine,\r\n placeholder: intl.formatMessage({ id: 'vx.spotlight.placeholder' }),\r\n fields: {\r\n 'vx.spotlight.field.label': {\r\n id: 'vx.spotlight.field.label',\r\n accessor: R.pipe(R.propOr(null, 'label'), R.ifElse(R.isNil, R.always(''), R.identity)),\r\n isSelected: true,\r\n },\r\n },\r\n },\r\n topElementComponent: values => (R.gte(R.length(values), 8) ? VXSpotlight : null),\r\n })),\r\n pure,\r\n)(({ topElementComponent, filters, ...parentProps }) =>\r\n R.map(\r\n ({ id, label, values }) => (\r\n \r\n ),\r\n filters,\r\n ),\r\n);\r\n","import * as R from 'ramda';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\n\r\nexport const defaultLayoutBuilder = dimensions => {\r\n const ids = R.keys(dimensions);\r\n const timeId = R.find(rules.isTimeDimension)(ids);\r\n const areaId = R.find(rules.isAreaDimension)(ids);\r\n const helper = (omitIds, pickId) =>\r\n R.pipe(\r\n R.omit(omitIds),\r\n R.ifElse(R.has(pickId), R.prop(pickId), R.pipe(R.values, R.head)),\r\n R.prop('id'),\r\n );\r\n const x = helper([], areaId)(dimensions);\r\n const y = helper([areaId, x], timeId)(dimensions);\r\n const z = R.pipe(R.omit([x, y]), R.values, R.pluck('id'))(dimensions);\r\n\r\n return {\r\n rows: R.ifElse(R.isNil, R.always([]), R.flip(R.append)([]))(x),\r\n header: R.ifElse(R.isNil, R.always([]), R.flip(R.append)([]))(y),\r\n sections: z,\r\n };\r\n};\r\n\r\nexport const defaultConcat = (array1 = []) => (array2 = []) => R.concat(array2, array1);\r\nexport const deleteItem = (key, prop) =>\r\n R.pipe(R.prop(key), R.filter(v => R.not(R.equals(v, prop))));\r\nexport const getValuesFlat = R.pipe(R.values, R.flatten);\r\n\r\nexport const adjustment = R.curry((notAvailableIds, layout) => {\r\n const withoutNotAvailableIds = R.flip(R.difference)(notAvailableIds);\r\n if (R.pipe(R.prop('rows'), withoutNotAvailableIds, R.isEmpty)(layout)) {\r\n const pivot = R.pipe(R.prop('sections'), withoutNotAvailableIds, R.isEmpty)(layout)\r\n ? 'header'\r\n : 'sections';\r\n const id = R.pipe(R.prop(pivot), withoutNotAvailableIds, R.head)(layout);\r\n return R.pipe(R.assoc('rows', R.concat([id], R.propOr([], 'rows')(layout))), layout => ({\r\n ...layout,\r\n [pivot]: deleteItem(pivot, id)(layout),\r\n }))(layout);\r\n }\r\n return layout;\r\n});\r\n\r\nexport const hasInvalidIds = layoutIds => R.pipe(R.flip(R.difference)(layoutIds), R.isEmpty, R.not);\r\nexport const isInvalid = (dimensionIds, layoutIds, layout) =>\r\n R.or(hasInvalidIds(dimensionIds)(layoutIds), R.isEmpty(layout));\r\n\r\nexport const manyFormat = (format, timeDimensionInverted) =>\r\n R.mapObjIndexed((dimension, id) => ({\r\n id,\r\n isTimePeriod: rules.isTimeDimension(id),\r\n isTimeDimensionInverted: R.prop(id)(timeDimensionInverted),\r\n label: format(dimension),\r\n value: id,\r\n }));\r\nexport const oneFormat = format =>\r\n R.mapObjIndexed((dimension, id) => ({\r\n id,\r\n label: format(dimension),\r\n value: id,\r\n isOne: true,\r\n }));\r\n\r\nexport const getDefaultLayout = (many, getMissingIds = []) => {\r\n const defaultLayout = defaultLayoutBuilder(many);\r\n const defaultMissingIds = R.pipe(getValuesFlat, getMissingIds)(defaultLayout);\r\n return R.over(R.lensProp('sections'), defaultConcat(defaultMissingIds))(defaultLayout);\r\n};\r\nexport const getLayout = (missingIds, dimensionsIds) =>\r\n R.pipe(R.over(R.lensProp('sections'), defaultConcat(missingIds)), adjustment(dimensionsIds));\r\n","import { createSelector } from 'reselect';\r\nimport * as R from 'ramda';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nimport { getData, getLayout, getDimensions } from './sdmx';\r\nimport { getTimeDimensionInverted, getLayout as getVisLayout, getDimensionFormat } from './vis';\r\nimport { withIndex } from '../lib/utils';\r\nimport * as Layout from '../lib/layout';\r\nimport * as Sdmx from '../lib/sdmx';\r\n\r\nexport const getDataDimensions = () =>\r\n createSelector(\r\n getData,\r\n R.pipe(\r\n R.pathOr([], ['structure', 'dimensions', 'observation']),\r\n R.addIndex(R.map)((dimension, index) =>\r\n R.pipe(\r\n R.assoc('index', index),\r\n R.set(R.lensProp('values'), withIndex(R.propOr([], 'values')(dimension))),\r\n )(dimension),\r\n ),\r\n ),\r\n );\r\n\r\nexport const getVisDataDimensions = () =>\r\n createSelector(\r\n getDataDimensions(),\r\n R.pipe(\r\n R.partition(R.pipe(R.propOr([], 'values'), R.length, R.flip(R.gt)(1))),\r\n R.converge(\r\n (many, one) => ({\r\n many: R.indexBy(R.prop('id'))(many),\r\n one: R.indexBy(R.prop('id'))(one),\r\n }),\r\n [R.head, R.last],\r\n ),\r\n ),\r\n );\r\n\r\nexport const getTableConfigDimensions = createSelector(\r\n getVisDataDimensions(),\r\n getDimensionFormat,\r\n getTimeDimensionInverted,\r\n ({ many, one }, format, timeDimensionInverted) =>\r\n R.mergeRight(\r\n Layout.oneFormat(format)(one),\r\n Layout.manyFormat(format, timeDimensionInverted)(many),\r\n ),\r\n);\r\n\r\nexport const getVisTableData = () =>\r\n createSelector(getTimeDimensionInverted, getData, R.uncurryN(2, rules.getTableData));\r\n\r\n//export const getLimitedTo = ()=>{return getData;}\r\nexport const getLimited = () => {\r\n //const r = R.pipe(getData,R.pathOr({limitedTo:0},['dataSets',0,'limited']));\r\n\r\n if (R.isNil(getData)) {\r\n return () => {\r\n return { limitedTo: 0, returnedKeyCount: 0 };\r\n };\r\n }\r\n const r = R.pipe(getData, R.pathOr({ limitedTo: 0 }, ['dataSets', 0, 'limited']));\r\n return r;\r\n};\r\n//data.data.dataSets[0].limitedTo=keysLimit;\r\n\r\nexport const getFlatDimensionsIds = () =>\r\n createSelector(getDimensions, getDataDimensions(), (structureDimensions, dataDimensions) =>\r\n R.useWith(Sdmx.getUniq, [Sdmx.getDimensionsIds, Sdmx.getDimensionsIds])(\r\n structureDimensions,\r\n dataDimensions,\r\n ),\r\n );\r\n\r\nexport const getVisTableConfigLayout = () =>\r\n createSelector(\r\n getVisLayout,\r\n getLayout,\r\n getFlatDimensionsIds(),\r\n getVisDataDimensions(),\r\n (visLayout = {}, sdmxLayout = {}, dimensionsIds, { many, one }) => {\r\n const layout = R.pipe(\r\n R.ifElse(R.isEmpty, R.always(sdmxLayout), R.identity),\r\n R.mergeRight({ sections: [], rows: [], header: [] }),\r\n )(visLayout);\r\n const getMissingIds = R.difference(dimensionsIds);\r\n const oneIds = R.keys(one);\r\n const layoutIds = Layout.getValuesFlat(layout);\r\n\r\n if (Layout.isInvalid(dimensionsIds, layoutIds, layout))\r\n return Layout.getDefaultLayout(many, getMissingIds);\r\n\r\n const missingIds = getMissingIds(layoutIds);\r\n if (R.isEmpty(missingIds)) return Layout.adjustment(oneIds, layout);\r\n\r\n return Layout.getLayout(missingIds, oneIds)(layout);\r\n },\r\n );\r\n\r\nexport const getVisTableLayout = () =>\r\n createSelector(getVisTableConfigLayout(), getVisDataDimensions(), (layout, { many }) => {\r\n const idsNotInMany = R.difference(Layout.getValuesFlat(layout), R.keys(many));\r\n return R.map(R.flip(R.difference)(idsNotInMany))(layout);\r\n });\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DETableConfig, VXFilterContainer } from '@sis-cc/dotstatsuite-ui-components';\r\n\r\nconst TableConfig = ({ title, ...tableProps }) => (\r\n \r\n \r\n \r\n);\r\n\r\nTableConfig.propTypes = {\r\n title: PropTypes.object,\r\n};\r\n\r\nexport default TableConfig;\r\n","import React from 'react';\r\nimport * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport { FormattedMessage, injectIntl } from 'react-intl';\r\nimport { getDimensionGetter } from '../../selectors/vis';\r\nimport { getTableConfigDimensions, getVisTableConfigLayout } from '../../selectors/table';\r\nimport {\r\n changeLayout,\r\n changeDimensionGetter,\r\n changeIsTimeDimensionInverted,\r\n} from '../../ducks/vis';\r\nimport { dimensionFormats } from '../../lib/utils';\r\nimport TableConfig from './TableConfig';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n dimensions: getTableConfigDimensions,\r\n dimensionGetter: getDimensionGetter,\r\n layout: getVisTableConfigLayout(),\r\n }),\r\n { changeLayout, changeGetter: changeDimensionGetter, changeIsTimeDimensionInverted },\r\n ),\r\n injectIntl,\r\n withProps(({ intl }) => ({\r\n isNarrow: true,\r\n noPreview: true,\r\n title: ,\r\n labels: {\r\n commit: ,\r\n cancel: ,\r\n row: ,\r\n column: ,\r\n section: ,\r\n d: ,\r\n o: ,\r\n time: ,\r\n asc: ,\r\n desc: ,\r\n help: ,\r\n table: ,\r\n one: ,\r\n },\r\n dimensionGetters: R.reduce(\r\n (memo, key) => ({ ...memo, [key]: intl.formatMessage({ id: `vx.config.display.${key}` }) }),\r\n {},\r\n R.keys(dimensionFormats),\r\n ),\r\n })),\r\n)(TableConfig);\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\n//temp disable the charts\r\n\r\nexport default [\r\n /*\r\n {\r\n label: ,\r\n id: 'table',\r\n },\r\n {\r\n label: ,\r\n id: 'chart',\r\n children: [\r\n {\r\n icon: 'timeline-line-chart',\r\n label: ,\r\n id: 'TimelineChart',\r\n },\r\n {\r\n icon: 'timeline-bar-chart',\r\n id: 'BarChart',\r\n label: ,\r\n },\r\n {\r\n icon: 'horizontal-bar-chart',\r\n id: 'RowChart',\r\n label: ,\r\n },\r\n /*{\r\n icon: 'stacked-chart',\r\n label: ,\r\n id: 'StackedBarChart',\r\n },*/\r\n /*],\r\n },*/\r\n];\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport * as R from 'ramda';\r\n\r\nexport default ({ changeActionId, requestDataFile, dataflow, isFullscreen, isNarrow }) => {\r\n const actions = [\r\n /*{\r\n icon: 'cog',\r\n id: 'config',\r\n label: ,\r\n action: () => changeActionId('config'),\r\n },*/\r\n {\r\n icon: 'import',\r\n id: 'download',\r\n label: ,\r\n children: [\r\n {\r\n id: 'csv-selection',\r\n label: ,\r\n action: () => requestDataFile({ dataflow }),\r\n },\r\n {\r\n id: 'csv-full',\r\n label: ,\r\n action: () => requestDataFile({ isDownloadAllData: true, dataflow }),\r\n },\r\n ],\r\n },\r\n {\r\n icon: isFullscreen ? 'minimize' : 'maximize',\r\n id: 'fullscreen',\r\n label: ,\r\n action: () => changeActionId('fullscreen'),\r\n },\r\n ];\r\n\r\n const filtersBtn = {\r\n icon: 'filter-list',\r\n id: 'filters',\r\n label: ,\r\n action: () => changeActionId('filters'),\r\n };\r\n\r\n return R.pipe(R.ifElse(R.always(isNarrow), R.prepend(filtersBtn), R.identity))(actions);\r\n};\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { DEVisualisationToolbar } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { getIsPending } from '../../selectors/app';\r\nimport { getDataflow } from '../../selectors/vis';\r\nimport { changeViewer, changeAction } from '../../ducks/vis';\r\nimport { requestDataFile } from '../../ducks/sdmx';\r\nimport menus from './menus';\r\nimport actions from './actions';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isDownloading: getIsPending('requestingDataFile'),\r\n dataflow: getDataflow,\r\n }),\r\n { changeMenu: changeViewer, changeActionId: changeAction, requestDataFile },\r\n ),\r\n withProps(({ isDownloading, viewerId, actionId, ...rest }) => ({\r\n loadingActionId: isDownloading ? 'download' : null,\r\n selectedMenuId: viewerId,\r\n selectedActionId: actionId,\r\n actions: actions({ ...rest, viewerId }),\r\n menus,\r\n showLabel: ,\r\n })),\r\n)(DEVisualisationToolbar);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { VXFilterContainer } from '@sis-cc/dotstatsuite-ui-components';\r\nimport FilterPeriod from '../FilterPeriod';\r\nimport FilterSelection from '../FilterSelection';\r\nimport Filters from '../Filters';\r\nimport Toolbar from '../Toolbar';\r\nimport TableConfig from '../TableConfig';\r\n\r\nconst Tools = ({\r\n isNarrow,\r\n isRtl,\r\n isFullscreen,\r\n actionId,\r\n /*isChartConfig,*/\r\n isFilters,\r\n}) => (\r\n \r\n \r\n {/*\r\n \r\n */}\r\n {isNarrow && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n);\r\n\r\nTools.propTypes = {\r\n isNarrow: PropTypes.bool,\r\n isRtl: PropTypes.bool,\r\n isFullscreen: PropTypes.bool,\r\n isChartConfig: PropTypes.bool,\r\n isFilters: PropTypes.bool,\r\n actionId: PropTypes.string,\r\n};\r\n\r\nexport default Tools;\r\n","import { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport * as R from 'ramda';\r\nimport { getViewer, getAction } from '../../selectors/vis';\r\nimport Tools from './Tools';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n actionId: getAction,\r\n viewerId: getViewer,\r\n }),\r\n ),\r\n withProps(({ actionId, viewerId }) => ({\r\n isChartConfig: R.equals('config', actionId) && !R.equals('table', viewerId),\r\n isFilters: R.equals('filters', actionId),\r\n })),\r\n)(Tools);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst FooterUnicef = ({ label, showCopyrightSymbol }) => {\r\n let copy = '\\u00a9';\r\n return (\r\n
\r\n {showCopyrightSymbol ? copy : null}\r\n {label}\r\n
\r\n );\r\n};\r\n\r\nFooterUnicef.propTypes = {\r\n label: PropTypes.string,\r\n showCopyrightSymbol: PropTypes.bool,\r\n};\r\n\r\nexport default FooterUnicef;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { DETableCell } from '@sis-cc/dotstatsuite-ui-components';\r\nimport glamorous from 'glamorous';\r\n\r\nconst StyledCell = glamorous.div(\r\n {\r\n width: '100%',\r\n height: '100%',\r\n padding: '4px 6px',\r\n fontSize: 16,\r\n textAlign: 'right',\r\n },\r\n ({ isYLast, isXLast, theme }) => ({\r\n color: theme.table.oFont,\r\n borderTop: `1px solid ${theme.table.border}`,\r\n borderLeft: `1px solid ${theme.table.border}`,\r\n borderRight: isYLast ? `1px solid ${theme.table.border}` : null,\r\n borderBottom: isXLast ? null : `1px solid ${theme.table.border}`,\r\n backgroundColor: theme.table.xBg,\r\n }),\r\n);\r\n\r\nconst Cell = ({ renderObservation, variant }) => (\r\n \r\n \r\n \r\n \r\n {renderObservation()}\r\n \r\n);\r\n\r\nCell.propTypes = {\r\n renderObservation: PropTypes.func,\r\n variant: PropTypes.string,\r\n};\r\n\r\nexport default Cell;\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\n//temp disable the charts\r\n\r\nexport default [\r\n /*\r\n {\r\n label: ,\r\n id: 'table',\r\n },\r\n {\r\n label: ,\r\n id: 'chart',\r\n children: [\r\n {\r\n icon: 'timeline-line-chart',\r\n label: ,\r\n id: 'TimelineChart',\r\n },\r\n {\r\n icon: 'timeline-bar-chart',\r\n id: 'BarChart',\r\n label: ,\r\n },\r\n {\r\n icon: 'horizontal-bar-chart',\r\n id: 'RowChart',\r\n label: ,\r\n },\r\n /*{\r\n icon: 'stacked-chart',\r\n label: ,\r\n id: 'StackedBarChart',\r\n },*/\r\n /*],\r\n },*/\r\n];\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport * as R from 'ramda';\r\n\r\nexport default ({ requestDataFile, dataflow }) => {\r\n const actions = [\r\n {\r\n icon: 'import',\r\n id: 'download',\r\n label: ,\r\n children: [\r\n {\r\n id: 'csv-selection',\r\n label: ,\r\n action: () => requestDataFile({ dataflow }),\r\n },\r\n {\r\n id: 'csv-full',\r\n label: ,\r\n action: () => requestDataFile({ isDownloadAllData: true, dataflow }),\r\n },\r\n ],\r\n },\r\n ];\r\n\r\n return actions;\r\n};\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { DEVisualisationToolbar } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { getIsPending } from '../../selectors/app';\r\nimport { getDataflow, getAction, getViewer } from '../../selectors/vis';\r\nimport { changeViewer, changeAction } from '../../ducks/vis';\r\nimport { requestDataFile } from '../../ducks/sdmx';\r\nimport menus from './menus';\r\nimport actions from './actions';\r\nimport * as R from 'ramda';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isDownloading: getIsPending('requestingDataFile'),\r\n dataflow: getDataflow,\r\n actionId: getAction,\r\n viewerId: getViewer,\r\n }),\r\n { changeMenu: changeViewer, changeActionId: changeAction, requestDataFile },\r\n ),\r\n withProps(({ isDownloading, viewerId, actionId, ...rest }) => ({\r\n loadingActionId: isDownloading ? 'download' : null,\r\n selectedMenuId: viewerId,\r\n selectedActionId: actionId,\r\n actions: actions({ ...rest, viewerId }),\r\n menus,\r\n showLabel: ,\r\n isFilters: R.equals('filters', actionId),\r\n })),\r\n)(DEVisualisationToolbar);\r\n\r\n/*\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isDownloading: getIsPending('requestingDataFile'),\r\n dataflow: getDataflow,\r\n actionId:getAction,\r\n viewerId:getViewer,\r\n }),\r\n { changeMenu: changeViewer, changeActionId: changeAction, requestDataFile },\r\n ),\r\n withProps(({ isDownloading, viewerId, actionId, ...rest }) => ({\r\n loadingActionId: isDownloading ? 'download' : null,\r\n selectedMenuId: viewerId,\r\n selectedActionId: actionId,\r\n actions: actions({ ...rest, viewerId }),\r\n menus,\r\n showLabel: ,\r\n isFilters:R.equals('filters', actionId),\r\n })),\r\n)(DEVisualisationToolbar);*/\r\n","import React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst TableMessageUnicef = ({ returnedKeyCount, limitedTo, animationMillis }) => {\r\n if (!returnedKeyCount) {\r\n return null;\r\n }\r\n if (!limitedTo) {\r\n return null;\r\n }\r\n if (limitedTo == 0) return null;\r\n \r\n const msgBoxId = 'dataLimited_msgBox';\r\n\r\n useEffect(() => {\r\n setTimeout(() => {\r\n const el = document.getElementById(msgBoxId);\r\n const onTransEnd = () => {\r\n document.getElementById(msgBoxId).style.display = \"none\";\r\n el.removeEventListener('transitionend', onTransEnd);\r\n };\r\n\r\n el.addEventListener('transitionend', onTransEnd, false);\r\n document.getElementById(msgBoxId).classList.add(\"dataLimited_msgBox_trans\");\r\n }, 5000);\r\n\r\n });\r\n\r\n\r\n return (\r\n
\r\n

\r\n Your selection returned {returnedKeyCount} values, the visualization has been limited to\r\n {\" \" + limitedTo} values to avoid slowing down your browser.\r\n

\r\n

Please limit your query by further filtering your data, or use the "Download" button to download the entire dataset in CSV format.

\r\n
\r\n
\r\n );\r\n};\r\n\r\nTableMessageUnicef.propTypes = {\r\n returnedKeyCount: PropTypes.number,\r\n limitedTo: PropTypes.number,\r\n animationMillis: PropTypes.number\r\n};\r\n\r\nexport default TableMessageUnicef;","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { getIndicatorProfileUrl } from '../../lib/settings';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst createLink = indId => {\r\n const url = getIndicatorProfileUrl + '/' + indId;\r\n return url;\r\n};\r\n\r\nconst IndicatorLinkUnicef = ({ data, selItems }) => {\r\n let indicators = null;\r\n if (selItems) {\r\n selItems.forEach(element => {\r\n if (element.id == 'INDICATOR') indicators = element.values;\r\n });\r\n }\r\n if (!indicators) {\r\n return null;\r\n }\r\n const items = [];\r\n indicators.forEach(el => {\r\n items.push(\r\n \r\n {el.label}\r\n ,\r\n );\r\n });\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n\r\n {items}\r\n
\r\n );\r\n};\r\n\r\nIndicatorLinkUnicef.propTypes = {\r\n data: PropTypes.object,\r\n selItems: PropTypes.array,\r\n};\r\n\r\nexport default IndicatorLinkUnicef;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { SDMXTable } from '@sis-cc/dotstatsuite-ui-components';\r\nimport SisHeader from '@sis-cc/dotstatsuite-ui-header';\r\n//import SisFooter from '@sis-cc/dotstatsuite-ui-footer';\r\nimport FooterUnicef from '../FooterUnicef';\r\nimport glamorous from 'glamorous';\r\nimport Cell from './Cell';\r\n//import Tools from '../Tools';\r\nimport Toolbar from '../ToolbarUnicef';\r\nimport TableMessageUnicef from '../TableMessageUnicef';\r\nimport IndicatorLinkUnicef from '../IndicatorLinkUnicef';\r\n\r\nconst TableContainer = glamorous.div({\r\n borderLeftWidth: 0,\r\n borderRightWidth: 0,\r\n marginTop: 10, // sync style with chart\r\n\r\n overflowX: 'auto',\r\n});\r\n\r\nconst Table = ({\r\n header,\r\n viewerConfig,\r\n data,\r\n layoutIds,\r\n renderObservation,\r\n itemFormatter,\r\n isNotATable,\r\n footnotes,\r\n variant,\r\n limited,\r\n selItems,\r\n}) => (\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n {isNotATable ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
\r\n);\r\n\r\nTable.propTypes = {\r\n header: PropTypes.object,\r\n viewerConfig: PropTypes.object,\r\n source: PropTypes.object,\r\n data: PropTypes.object,\r\n footnotes: PropTypes.object,\r\n layoutIds: PropTypes.object,\r\n renderObservation: PropTypes.func,\r\n itemFormatter: PropTypes.func,\r\n isNotATable: PropTypes.bool,\r\n variant: PropTypes.string,\r\n limited: PropTypes.object,\r\n selItems: PropTypes.array,\r\n};\r\n\r\nexport default Table;\r\n","import * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, mapProps } from 'recompose';\r\nimport {\r\n getVisDataDimensions,\r\n getVisTableLayout,\r\n getVisTableData,\r\n getLimited,\r\n} from '../../selectors/table';\r\nimport { getDimensionFormat, getDimensionGetter } from '../../selectors/vis';\r\nimport { getCustomAttributes } from '../../selectors/sdmx';\r\nimport { rules } from '@sis-cc/dotstatsuite-components';\r\nimport { DETableCell } from '@sis-cc/dotstatsuite-ui-components';\r\nimport Table from './Table';\r\nimport { getSelection } from '../../selectors/sdmx';\r\n\r\nconst Cell = connect(createStructuredSelector({ variant: getDimensionGetter }))(DETableCell);\r\n\r\n/*export default compose(\r\n connect(createStructuredSelector({ items: getSelection }), { changeFilters: changeDataquery }),\r\n withProps({\r\n titleLabel: ,\r\n clearAllLabel: ,\r\n blankLabel: ,\r\n noScroll: true,\r\n }),\r\n pure,\r\n)(VXFiltersCurrent);\r\n*/\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n dimensions: getVisDataDimensions(),\r\n customAttributes: getCustomAttributes,\r\n layoutIds: getVisTableLayout(),\r\n itemFormatter: getDimensionFormat,\r\n data: getVisTableData(),\r\n variant: getDimensionGetter,\r\n limited: getLimited(),\r\n selItems: getSelection,\r\n }),\r\n ),\r\n mapProps(\r\n ({\r\n chartData,\r\n viewerConfig,\r\n data,\r\n customAttributes,\r\n dimensions,\r\n layoutIds,\r\n itemFormatter,\r\n variant,\r\n limited,\r\n selItems,\r\n }) => ({\r\n viewerConfig,\r\n data,\r\n layoutIds,\r\n itemFormatter,\r\n renderObservation: rules.observationGetter(Cell)({\r\n observations: R.prop('observations', data),\r\n dimensions,\r\n customAttributes,\r\n isRtl: false,\r\n })(R.identity),\r\n // little dirty for now, in the wait of a better common mgmt of table and charts\r\n header: R.pick(['title', 'subtitle', 'uprs'], chartData),\r\n footnotes: R.prop('footnotes', chartData),\r\n isNotATable: R.pipe(R.prop('observations'), R.values, R.length, R.equals(1))(data),\r\n variant,\r\n limited,\r\n selItems,\r\n }),\r\n ),\r\n)(Table);\r\n","import { Chart } from '@sis-cc/dotstatsuite-components';\r\nimport { mapProps } from 'recompose';\r\n\r\nexport default mapProps(({ chartData, chartOptions, viewerConfig, type }) => ({\r\n data: chartData,\r\n options: chartOptions,\r\n config: viewerConfig,\r\n type,\r\n}))(Chart);\r\n","const fonts = { fontFamily: 'Segoe UI' };\r\n\r\nexport default {\r\n owner: 'UNICEF',\r\n logo: '',\r\n footer_visible: false,\r\n fonts: {\r\n header: { subtitle: fonts, title: fonts, uprs: fonts, tooltip: fonts },\r\n chart: {\r\n axisLegend: fonts,\r\n chartLegend: fonts,\r\n tooltip: { primary: fonts, secondary: fonts },\r\n },\r\n footer: { copyright: fonts, source: fonts },\r\n },\r\n};\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, branch, renderComponent, withProps } from 'recompose';\r\nimport * as R from 'ramda';\r\nimport { VXNoData } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { getViewer } from '../../selectors/vis';\r\nimport Table from '../Table';\r\nimport Chart from '../Chart';\r\nimport viewerConfig from './config';\r\n\r\nexport default compose(\r\n connect(createStructuredSelector({ type: getViewer })),\r\n withProps({ viewerConfig }),\r\n branch(\r\n R.pipe(R.prop('data'), R.isNil),\r\n renderComponent(() => } />),\r\n ),\r\n branch(({ type }) => R.equals(type, 'table'), renderComponent(Table)),\r\n)(Chart);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport * as R from 'ramda';\r\nimport { VXFilterContainerCollapsible } from '@sis-cc/dotstatsuite-ui-components';\r\nimport List from '@material-ui/core/List';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport ListItemText from '@material-ui/core/ListItemText';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst Footnotes = ({ footnotes }) => (\r\n }\r\n isOpen={true}\r\n noScroll\r\n >\r\n \r\n {R.map(({ id, name, values }) => (\r\n \r\n \r\n \r\n ))(footnotes)}\r\n \r\n \r\n);\r\n\r\nFootnotes.propTypes = {\r\n footnotes: PropTypes.array,\r\n};\r\n\r\nexport default Footnotes;\r\n","import * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, mapProps } from 'recompose';\r\nimport { getCustomAttributes } from '../../selectors/sdmx';\r\nimport Footnotes from './Footnotes';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n attributes: getCustomAttributes,\r\n }),\r\n ),\r\n mapProps(\r\n R.pipe(\r\n R.prop('attributes'),\r\n R.pick(['footnotes']),\r\n R.prop('footnotes'),\r\n R.reject(\r\n R.pipe(\r\n R.prop('id'),\r\n R.flip(R.includes)(['UNIT_MEASURE']), // UNICEF specific\r\n ),\r\n ),\r\n R.assoc('footnotes', R.__, {}),\r\n ),\r\n ),\r\n)(Footnotes);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { VXLoader } from '@sis-cc/dotstatsuite-ui-components';\r\nimport { RulesDriver } from '@sis-cc/dotstatsuite-components';\r\nimport Tools from '../Tools';\r\nimport Viewer from '../Viewer';\r\nimport Footnotes from '../Footnotes';\r\n\r\nconst Main = ({\r\n data,\r\n enhancedData,\r\n isRtl,\r\n isNarrow,\r\n isFullscreen,\r\n isLoadingData,\r\n display,\r\n formaterIds,\r\n type,\r\n options,\r\n dataUrl,\r\n}) => (\r\n (\r\n
\r\n {/* */}\r\n {isLoadingData && (\r\n }\r\n isLarge\r\n />\r\n )}\r\n {!isLoadingData && (\r\n \r\n \r\n
\r\n \r\n
\r\n )}\r\n
\r\n )}\r\n />\r\n);\r\n\r\nMain.propTypes = {\r\n data: PropTypes.object,\r\n enhancedData: PropTypes.object,\r\n display: PropTypes.string,\r\n formaterIds: PropTypes.object,\r\n type: PropTypes.string,\r\n options: PropTypes.object,\r\n dataUrl: PropTypes.string,\r\n isNarrow: PropTypes.bool,\r\n isRtl: PropTypes.bool,\r\n isLoadingData: PropTypes.bool,\r\n isFullscreen: PropTypes.bool,\r\n};\r\n\r\nexport default Main;\r\n","import * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, withProps } from 'recompose';\r\nimport { getData } from '../../selectors/sdmx';\r\nimport { getLocale, getIsPending } from '../../selectors/app';\r\nimport { getDisplay, getPeriod, getDataquery, getDataflow, getViewer } from '../../selectors/vis';\r\nimport { getDataUrl } from '../../lib/sdmx';\r\nimport { getSdmxAttribute, chartOptions } from '../../lib/settings';\r\nimport Main from './Main';\r\n\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isLoadingData: getIsPending('getData'),\r\n display: getDisplay,\r\n type: getViewer,\r\n data: getData,\r\n dataflow: getDataflow,\r\n dataquery: getDataquery,\r\n locale: getLocale,\r\n period: getPeriod,\r\n }),\r\n ),\r\n withProps(({ data, dataflow, dataquery, locale, period }) => ({\r\n dataUrl: getDataUrl({ configArgs: { dataflow, dataquery, locale }, requestArgs: { period } }),\r\n options: chartOptions,\r\n formaterIds: {\r\n decimals: getSdmxAttribute('decimals'),\r\n prefscale: getSdmxAttribute('prefscale'),\r\n },\r\n enhancedData: data,\r\n })),\r\n)(Main);\r\n\r\n/*\r\nexport default compose(\r\n connect(\r\n createStructuredSelector({\r\n isLoadingData: getIsPending('getData'),\r\n display: getDisplay,\r\n type: getViewer,\r\n data: getData,\r\n dataflow: getDataflow,\r\n dataquery: getDataquery,\r\n locale: getLocale,\r\n period: getPeriod,\r\n }),\r\n ),\r\n withProps(({ data, dataflow, dataquery, locale, period }) => ({\r\n dataUrl: getDataUrl({ configArgs: { dataflow, dataquery, locale }, requestArgs: { period } }),\r\n options: chartOptions,\r\n formaterIds: {\r\n decimals: getSdmxAttribute('decimals'),\r\n prefscale: getSdmxAttribute('prefscale'),\r\n },\r\n enhancedData: R.over(\r\n R.lensPath(['structure', 'dimensions', 'observation']),\r\n //R.append({ id: 'FREQ', values: [{ id: 'A' }] }), is this hardcoded?\r\n R.append({ id: 'Frequency', values: [{ id: 'Annual' }] }),\r\n data,\r\n ),\r\n })),\r\n)(Main);\r\n*/\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport {\r\n DELayout,\r\n DELayoutContent,\r\n DELayoutSide,\r\n DELayoutMain,\r\n VXLoader,\r\n} from '@sis-cc/dotstatsuite-ui-components';\r\nimport FilterPeriod from '../FilterPeriod';\r\nimport FilterSelection from '../FilterSelection';\r\nimport Filters from '../Filters';\r\nimport TableConfig from '../TableConfig';\r\nimport Main from '../Main';\r\n\r\nconst App = ({ isNarrow, isRtl, isLoadingStructure, isLoadingData, isFullscreen }) => (\r\n \r\n \r\n {isLoadingStructure && (\r\n }\r\n isLarge\r\n />\r\n )}\r\n \r\n {!(isLoadingStructure || isNarrow) && (\r\n \r\n \r\n \r\n \r\n
{!isLoadingData && }
\r\n
\r\n )}\r\n {!isLoadingStructure && (\r\n \r\n
\r\n \r\n )}\r\n \r\n);\r\n\r\nApp.propTypes = {\r\n isNarrow: PropTypes.bool,\r\n isRtl: PropTypes.bool,\r\n isLoadingStructure: PropTypes.bool,\r\n isLoadingData: PropTypes.bool,\r\n isFullscreen: PropTypes.bool,\r\n};\r\n\r\nexport default App;\r\n","import * as R from 'ramda';\r\nimport { connect } from 'react-redux';\r\nimport { createStructuredSelector } from 'reselect';\r\nimport { compose, branch, renderNothing } from 'recompose';\r\nimport { getIsPending, getIsRtl } from '../../selectors/app';\r\nimport { getIsFullscreen, getDataflow } from '../../selectors/vis';\r\nimport withResponsiveness from '../../hocs/withResponsiveness';\r\nimport App from './App';\r\n\r\nexport default compose(\r\n withResponsiveness,\r\n connect(\r\n createStructuredSelector({\r\n isLoadingStructure: getIsPending('getStructure'),\r\n isLoadingData: getIsPending('getData'),\r\n isRtl: getIsRtl,\r\n isFullscreen: getIsFullscreen,\r\n dataflow: getDataflow,\r\n }),\r\n ),\r\n branch(R.pipe(R.prop('dataflow'), R.isNil), renderNothing),\r\n)(App);\r\n","import React from 'react';\r\nimport { render } from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport '@blueprintjs/core/dist/blueprint.css';\r\nimport { I18nProvider, initialize as initializeI18n } from './i18n';\r\nimport { createStore, reducer } from './core';\r\nimport ThemeProvider from './theme';\r\nimport ErrorBoundary from './components/Error';\r\nimport App from './components/App';\r\nimport { changeDataflow } from './ducks/vis';\r\nimport './index.css';\r\nimport meta from '../../package.json';\r\n\r\nvar ES6_Error = false;\r\nif (!(typeof window.ES6_Error === 'undefined')) {\r\n ES6_Error = window.ES6_Error;\r\n}\r\nif (ES6_Error) {\r\n throw new Error('Browser not Supported');\r\n}\r\n\r\nconsole.info(`${meta.name}@${meta.version}`); // eslint-disable-line no-console\r\n\r\ninitializeI18n(window.SETTINGS.i18n);\r\nconst locale = window.SETTINGS.i18n.locales[window.SETTINGS.i18n.localeId];\r\n\r\nconst initialState = {\r\n app: {\r\n logs: [],\r\n pending: {},\r\n locale,\r\n },\r\n vis: {\r\n filter: undefined, // id of the expanded filter: ''\r\n viewer: 'table', // id of the viewer element to display\r\n action: undefined, // id of the current tool action: ''\r\n period: undefined, // period: [start, end]\r\n dataflow: undefined, // dataflow identifiers: {datasourceId, dataflowId, agencyId, version}\r\n isFullscreen: false, // fullscreen mode\r\n dataquery: undefined, // dataquery: ''\r\n display: 'label', // sdmx display mode: '' in label, code, both\r\n timeDimensionInverted: {}, // sdmx time direction: obj of bools, true asc - false desc\r\n layout: undefined, // layout of the table\r\n dimensionGetter: 'label', // accessor of the dimension for labelling\r\n },\r\n sdmx: {\r\n dimensions: [],\r\n data: undefined,\r\n layout: {},\r\n },\r\n};\r\nconst store = createStore(initialState, reducer);\r\n\r\nconsole.log('initialized with DATAFLOW:', window.DATAFLOW); // eslint-disable-line no-console\r\nstore.dispatch(changeDataflow(window.DATAFLOW));\r\n\r\nconst ROOT = document.getElementById('root');\r\nROOT.addEventListener('unicef_changeDataflow', event =>\r\n store.dispatch(changeDataflow(event.detail)),\r\n);\r\nconsole.log(`listen unicef_changeDataflow event`); // eslint-disable-line no-console\r\n\r\nrender(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n ROOT,\r\n);\r\n","module.exports = __webpack_public_path__ + \"static/media/data-explorer-logo.707f6ef1.png\";"],"sourceRoot":""} \ No newline at end of file diff --git a/dotstat_data_explorer.php b/dotstat_data_explorer.php index 0df401d..35c3950 100644 --- a/dotstat_data_explorer.php +++ b/dotstat_data_explorer.php @@ -157,9 +157,9 @@ function de_add_data_explorer() //att the styles for ($i = 0; $i < count($css_list); $i++) { //remove the main as it seems to contain body elements already present in the hosting Wordpress page - if (strpos(basename($css_list[$i]), "main") === false) { + //if (strpos(basename($css_list[$i]), "main") === false) { wp_enqueue_style('de_style' . $i, $css_url . basename($css_list[$i])); - } + //} } //add the js files in the same order they're added by react in the main page @@ -197,7 +197,7 @@ function de_enqueue_style() if (is_single() && get_post_type() == 'data_explorer') { $css_url = plugins_url('css/', __FILE__); - wp_enqueue_style('data_expl_css', $css_url . 'data_explorer.css?v=2.04'); + wp_enqueue_style('data_expl_css', $css_url . 'data_explorer.css?v=2.05'); // $js_url = plugins_url('js/', __FILE__); // wp_enqueue_script('related_search', $js_url . 'related_search.js', array('jquery', 'algoliasearchLite', 'algolia_instantsearch'), NULL, true);