@devgateway/dvz-ui-react 1.7.16 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +180 -5
- package/README.md +1 -1
- package/dist/cjs/embeddable/chart/Line.js +1 -1
- package/dist/cjs/embeddable/posts-filter/CategoricalFilter.js +1 -1
- package/dist/cjs/embeddable/posts-filter/index.js +1 -1
- package/dist/cjs/embeddable/posts-filters-reset-button/index.js +1 -1
- package/dist/cjs/layout/Header.js +2 -2
- package/dist/esm/embeddable/chart/Line.js +1 -1
- package/dist/esm/embeddable/posts-filter/CategoricalFilter.js +50 -48
- package/dist/esm/embeddable/posts-filter/index.js +83 -83
- package/dist/esm/embeddable/posts-filters-reset-button/index.js +29 -23
- package/dist/esm/layout/Header.js +116 -116
- package/dist/types/layout/Header.d.ts +2 -0
- package/package.json +6 -3
package/LICENSE
CHANGED
|
@@ -1,9 +1,184 @@
|
|
|
1
|
-
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
1. Definitions.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship made available under
|
|
36
|
+
the License, as indicated by a copyright notice that is included in
|
|
37
|
+
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and the Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
+
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
+
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
+
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
+
or written communication sent to the Licensor or its representatives,
|
|
52
|
+
including but not limited to communication on electronic mailing lists,
|
|
53
|
+
source code control systems, and issue tracking systems that are managed
|
|
54
|
+
by, or on behalf of, the Licensor for the purpose of discussing and
|
|
55
|
+
improving the Work, but excluding communication that is conspicuously
|
|
56
|
+
marked or designated in writing by the copyright owner as "Not a
|
|
57
|
+
Contribution."
|
|
58
|
+
|
|
59
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
+
whom a Contribution has been received by the Licensor and incorporated
|
|
61
|
+
within the Work.
|
|
62
|
+
|
|
63
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
+
Work and such Derivative Works in Source or Object form.
|
|
69
|
+
|
|
70
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
+
(except as stated in this section) patent license to make, have made,
|
|
74
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
+
where such license applies only to those patent claims licensable
|
|
76
|
+
by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
78
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
+
institute patent litigation against any entity (including a
|
|
80
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
81
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
82
|
+
or contributory patent infringement, then any patent licenses
|
|
83
|
+
granted to You under this License for that Work shall terminate
|
|
84
|
+
as of the date such litigation is filed.
|
|
85
|
+
|
|
86
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
88
|
+
modifications, and in Source or Object form, provided that You
|
|
89
|
+
meet the following conditions:
|
|
90
|
+
|
|
91
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
92
|
+
Works a copy of this License; and
|
|
93
|
+
|
|
94
|
+
(b) You must cause any modified files to carry prominent notices
|
|
95
|
+
stating that You changed the files; and
|
|
96
|
+
|
|
97
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
98
|
+
that You distribute, all copyright, patent, trademark, and
|
|
99
|
+
attribution notices from the Source form of the Work,
|
|
100
|
+
excluding those notices that do not pertain to any part of
|
|
101
|
+
the Derivative Works; and
|
|
102
|
+
|
|
103
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
104
|
+
distribution, You must include a readable copy of the
|
|
105
|
+
attribution notices contained within such NOTICE file, in
|
|
106
|
+
at least one of the following places: within a NOTICE text
|
|
107
|
+
file distributed as part of the Derivative Works; within
|
|
108
|
+
the Source form or documentation, if provided along with the
|
|
109
|
+
Derivative Works; or, within a display generated by the
|
|
110
|
+
Derivative Works, if and wherever such third-party notices
|
|
111
|
+
normally appear. The contents of the NOTICE file are for
|
|
112
|
+
informational purposes only and do not modify the License.
|
|
113
|
+
You may add Your own attribution notices within Derivative
|
|
114
|
+
Works that You distribute, alongside or in addition to the
|
|
115
|
+
NOTICE text from the Work, provided that such additional
|
|
116
|
+
attribution notices cannot be construed as modifying the License.
|
|
117
|
+
|
|
118
|
+
You may add Your own license statement for Your modifications and
|
|
119
|
+
may provide additional grant of rights to use, reproduce, modify,
|
|
120
|
+
prepare derivative works of, collect, publish, distribute,
|
|
121
|
+
sublicense, and/or sell copies of the Contribution, either alone
|
|
122
|
+
or combined with the Work.
|
|
123
|
+
|
|
124
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
125
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
126
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
127
|
+
this License, without any additional terms or conditions.
|
|
128
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
129
|
+
the terms of any separate license agreement you may have executed
|
|
130
|
+
with Licensor regarding such Contributions.
|
|
131
|
+
|
|
132
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
133
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
134
|
+
except as required for reasonable and customary use in describing the
|
|
135
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
136
|
+
|
|
137
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
138
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
139
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
140
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
141
|
+
implied, including, without limitation, any warranties or conditions
|
|
142
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
143
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
144
|
+
appropriateness of using or reproducing the Work and assume any
|
|
145
|
+
risks associated with Your exercise of permissions under this License.
|
|
146
|
+
|
|
147
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
148
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
149
|
+
unless required by applicable law (such as deliberate and grossly
|
|
150
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
151
|
+
liable to You for damages, including any direct, indirect, special,
|
|
152
|
+
incidental, or exemplary damages of any character arising as a
|
|
153
|
+
result of this License or out of the use or inability to use the
|
|
154
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
155
|
+
work stoppage, computer failure or malfunction, or all other
|
|
156
|
+
commercial damages or losses), even if such Contributor has been
|
|
157
|
+
advised of the possibility of such damages.
|
|
158
|
+
|
|
159
|
+
9. Accepting Warranty or Liability. While redistributing the Work or
|
|
160
|
+
Derivative Works thereof, You may choose to offer, and charge a fee
|
|
161
|
+
for, acceptance of support, warranty, indemnity, or other liability
|
|
162
|
+
obligations and/or rights consistent with this License. However, in
|
|
163
|
+
accepting such obligations, You may offer such obligations only on
|
|
164
|
+
Your own behalf and on Your sole responsibility, not on behalf of
|
|
165
|
+
any other Contributor, and only if You agree to indemnify, defend,
|
|
166
|
+
and hold each Contributor harmless for any liability incurred by,
|
|
167
|
+
or claims asserted against, such Contributor by reason of your
|
|
168
|
+
accepting any warranty or additional liability.
|
|
169
|
+
|
|
170
|
+
END OF TERMS AND CONDITIONS
|
|
171
|
+
|
|
172
|
+
Copyright 2021-present Development Gateway
|
|
173
|
+
|
|
174
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
175
|
+
you may not use this file except in compliance with the License.
|
|
176
|
+
You may obtain a copy of the License at
|
|
177
|
+
|
|
178
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
179
|
+
|
|
180
|
+
Unless required by applicable law or agreed to in writing, software
|
|
181
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
182
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
183
|
+
See the License for the specific language governing permissions and
|
|
184
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),j=require("react"),lt=require("react-intl"),ct=require("@nivo/line"),it=require("./Tooltip.js"),pe=require("d3-shape"),ot=require("@nivo/theming"),dt=require("../../layout/FlexWrapDetector.js"),V=require("../../utils/deviceType.js"),ht="#66676d",G="#f0f0f1",ye=["mobile","tablet","midTablet"].includes(V.default()),ge=V.default()==="mobile",be=["tablet","midTablet"].includes(V.default()),ut=(d,p)=>{const v=document.createElement("canvas").getContext("2d");return v.font=p,v.measureText(d).width},mt=({editing:d,previewMode:p,app:Y,legends:v,tooltip:k,tooltipEnabled:je,options:h,intl:D,groupMode:J,reverse:xt,marginLeft:ve,lineLabelPosition:Ee,marginTop:K,marginRight:Ne,marginBottom:Z,format:E,colors:pt,offsetY:Oe,height:Me,showLegends:P,legendPosition:u,tickRotation:y,offsetText:_,tickColor:w,legendLabel:Q,xLabelColor:N,colorGenerator:X,legendCheckBack:z,legendLabelBack:Te,legendLabelColor:C,highlightXAxisLine:ke,showTickLine:A,showRightAxis:De,valueScale:yt,enableArea:Ie,areaShadingCriteria:ee,areaLowerBound:te,areaUpperBound:ae,showPoints:$e,maxValue:Fe,fixedMinValue:B,fixedMaxValue:q,offsetBottom:Le,yAxisTickValues:Se,enableGridY:We,enableGridX:_e,overrideTickColor:H,offsetRight:we,selectedMeasures:ze,tooltipEnableMarkdown:Ae,minMaxClamp:Be,reverseLegend:qe,customAxisFormat:I,mobileCustomization:He,lineCurve:Re,customLabels:R,lineXAxisTickMode:se,lineXAxisTickCount:Ue,lineXAxisTickEvery:Ge})=>{var me,fe,xe;const c=JSON.parse(decodeURIComponent(He)),ne=ye&&((c==null?void 0:c.showCustomization)??!1),$=ne&&p!=="Desktop",F=!d&&ne,[re,Ve]=j.useState(50),[le,Ye]=j.useState(K),[gt,ce]=j.useState(0),[ie,Je]=j.useState(Z),[O,Ke]=j.useState([]),L=h.data.map(e=>({id:e.id,label:R&&R[e.id]?R[e.id]:e.label||e.id,color:X.getColor(e.id,e)})),oe=()=>(qe&&L.reverse(),n.jsx(n.Fragment,{children:P&&L.map((e,a)=>n.jsxs("div",{className:"legend item",onClick:()=>Qe(e.id),children:[n.jsx("input",{className:"ignore",type:"checkbox",checked:O.length===0||!O.includes(e.id),readOnly:!0,style:{backgroundColor:z===!0?e.color:"none",color:C}}),n.jsx("span",{className:z===!0?"checkmark-with-bg":"checkmark",style:{backgroundColor:z===!0?e.color:"transparent"}}),n.jsx("label",{style:{backgroundColor:Te===!0?e.color:"transparent",color:C},children:e.label})]},a))}));j.useEffect(()=>{(()=>{const l=5*Math.max(L.length-5,0);Ve(l)})()},[L]);const Ze={bottom:`-${re}px`},Pe={bottom:`-${re}px`,gap:"0px",top:"0px"},S=e=>O.length?e.filter(a=>O.indexOf(a.id)===-1):e,Qe=e=>{const a=O.slice();if(a.indexOf(e)>-1){const l=a.indexOf(e);a.splice(l,1)}else a.push(e);Ke(a)},Xe=e=>{const a=Object.assign({},e),l=ot.useTheme();($||F)&&he.includes(String(a.value))&&(a.value="");let t=[],s="";if($||F){const i=String(a.value).split(" ");let o=25;d&&p==="Mobile"||ge&&!d?o=(c==null?void 0:c.mobileMaxTickLength)??25:d&&p==="Tablet"||be&&!d?o=(c==null?void 0:c.tabletMaxTickLength)??25:window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches&&!d&&(o=15),i.forEach(g=>{s.length+String(g).length<=o?s+=(s?" ":"")+g:(t.push(s),s=g)}),s&&t.push(s)}else t=[a.value];let r=12;return d&&p==="Mobile"||ge&&!d?r=(c==null?void 0:c.mobileYAxisLineHeight)??12:(d&&p==="Tablet"||be&&!d)&&(r=(c==null?void 0:c.tabletYAxisLineHeight)??12),ut(a.value,"12px Roboto")+15,y>0&&y<180?n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:t.map((i,o)=>n.jsx("text",{transform:`rotate(${y})`,textAnchor:"start",y:typeof e.value=="number"?0:o*r,dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N==="null"?"black":N,fontSize:"12px",fontFamily:"sans-serif"},children:i},i))})]}):y>180&&y<360?n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:n.jsx("text",{transform:`rotate(${y})`,textAnchor:"end",dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N,fontSize:"12px"},children:a.value})})]}):n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:t.map((i,o)=>n.jsx("text",{transform:`rotate(${y})`,textAnchor:"middle",y:typeof e.value=="number"?0:o*r,dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N==="null"?"black":N,fontSize:"12px",fontFamily:"sans-serif"},children:i},i))})]})},Ce=({series:e,xScale:a,yScale:l,innerHeight:t})=>{const s=e&&e.length>0?e[0].color:"#3daff7",r=[];e[0]&&e[0].data.forEach(x=>{Y=="csv"?h.keys.forEach(b=>{r.push({measure:b,min:x.data.variables[b]})}):ze.forEach(b=>{r.push({measure:b,min:x.data.variables[b]})})});const i=r.sort((x,b)=>x.min-b.min),o=ee=="CUSTOM_BETWEEN_TWO_LINES"&&te?te:i[0].measure,g=ee=="CUSTOM_BETWEEN_TWO_LINES"&&ae?ae:i[i.length-1].measure,rt=pe.area().x(x=>a(x.data.x)).y0(x=>l(x.data.variables[o])).y1(x=>l(x.data.variables[g]));return n.jsx(n.Fragment,{children:e&&e[0]&&n.jsx("path",{d:rt(e[0].data),fill:s,fillOpacity:.4})})},et=({series:e,xScale:a,yScale:l,innerHeight:t,innerWidth:s})=>{const r=[0,s],i=pe.line().x((o,g)=>g===0?-10:o).y(o=>l(0));return n.jsx(j.Fragment,{children:n.jsx("path",{d:i(r),fill:"none",stroke:ht,style:{pointerEvents:"none",strokeDasharray:"4 4"}})})},M=["grid","axes","lines","legends"];Ie&&M.push(Ce),$e&&(M.push("points"),M.push("mesh")),ke&&M.push(et);let T=[];S(h.data).forEach(e=>{e.data&&(T=[...T,...e.data.map(a=>a.y)])});const tt=()=>{if(J==="stacked"){const e=[];S(h.data).forEach(t=>{e.push(...t.data)});const l=[];e.forEach(t=>{l.indexOf(t.x)==-1&&l.push(t.x)}),f=Math.max(...l.map(t=>e.filter(s=>s.x==t).map(s=>s.y).reduce((s,r)=>Math.max(s+r,s+0)))),m=Math.min(...l.map(t=>e.filter(s=>s.x==t).map(s=>s.y).reduce((s,r)=>Math.min(s-r,r-s))))}else T.length>0&&(f=Math.max(...T),m=Math.min(...T));return f=f<0?f*.9:f*1.1,m=m>0?m*.9:m*1.1,{min:m,max:f}};let m="auto",f="auto";const W=tt();Fe=="fixed"?(m=B!=null&&B!=""?B:W.min,f=q!=null&&q!=""?q:W.max):(m=W.min,f=W.max);const de=()=>n.jsx(n.Fragment,{children:P&&Q&&n.jsx("div",{className:"legend item",children:n.jsx("label",{className:"legend-title",children:Q})})}),at={top:le,right:Ne,bottom:ie,left:ve};let U=parseInt(Se);const st=h.data&&((fe=(me=h.data)==null?void 0:me.filter(e=>{var a;return((a=e==null?void 0:e.data)==null?void 0:a.length)>0}))==null?void 0:fe.length),he=[];if($||F){U=Number.parseInt(c.yAxisTickValues);const e=new Map(Object.entries(((xe=c==null?void 0:c.labels)==null?void 0:xe.xAxis)??{}));for(const[a,l]of e)l||he.push(a)}const ue=S(h.data),nt=["grid","axes","legends"];if(h!=null&&h.data&&st>0){let e=S(h.data);const a=[];e.forEach(t=>{t&&Array.isArray(t.data)&&t.data.forEach(s=>{const r=s&&s.x;r!==void 0&&a.indexOf(r)===-1&&a.push(r)})});let l;if(se==="count"){const t=Math.max(1,parseInt(Ue));if(a.length>0&&t>0)if(a.length<=t)l=a.slice();else{const s=(a.length-1)/(t-1),r=new Array(t);for(let i=0;i<t;i++)r[i]=Math.floor(i*s);r[t-1]=a.length-1,l=r.map(i=>a[i])}}else if(se==="every"){const t=Math.max(1,parseInt(Ge));if(a.length>0){const s=[];for(let r=0;r<a.length;r++)r%t===0&&s.push(a[r]);s[s.length-1]!==a[a.length-1]&&s.push(a[a.length-1]),l=s}}return n.jsxs("div",{style:{height:Me},children:[n.jsx(ct.ResponsiveLine,{curve:Re,data:ue,margin:at,xScale:{type:"point"},yScale:{type:"linear",min:m,max:f,stacked:J=="stacked",reverse:!1,clamp:Be},layers:ue.length===0?nt:M,axisTop:null,axisRight:De?{tickSize:5,tickValues:U,tickPadding:5,tickRotation:0,legend:v.right,legendPosition:"middle",legendOffset:parseInt(we),format:t=>{const s=I||E;return D.formatNumber(s.style==="percent"?t/100:t,{...s})}}:null,enableGridY:We,enableGridX:_e,enablePointLabel:Ee==="top",pointLabel:t=>D.formatNumber(E.style==="percent"?t.yFormatted/100:t.yFormatted,E),lineWidth:3,colors:t=>X.getColor(t.id,t),axisBottom:($||F)&&(c==null?void 0:c.xAxisDisabled)===!0?null:{...l?{tickValues:l}:{},renderTick:Xe,legend:v.bottom,legendPosition:"middle",legendOffset:Number.parseInt(Le)},axisLeft:{tickSize:5,tickValues:U,tickPadding:5,tickRotation:0,legend:v.left,legendPosition:"middle",legendOffset:Number.parseInt(Oe),format:t=>{const s=I||E;return D.formatNumber(s.style==="percent"?t/100:t,{...s})}},tooltip:t=>je&&k&&k.trim().length>0?n.jsx(it.default,{intl:D,format:E,d:t,tooltip:k,tooltipEnableMarkdown:Ae}):null,pointSize:10,pointBorderWidth:2,pointBorderColor:{from:"serieColor"},useMesh:e.length>0&&e[0].data.length>0},new Date),(u==="top"||u==="bottom")&&n.jsx("div",{className:`legends container has-standard-12-font-size ${u}`,style:u==="top"?{marginTop:ye&&`${le}px`}:u==="bottom"?{marginBottom:`${ie}px`}:{},children:n.jsxs("div",{className:"legend-sections",children:[n.jsx("div",{className:"title-section",children:de()}),n.jsx(dt.default,{onWrapChange:t=>{if(u==="top"){const s=K+t/2*40;Ye(s),ce(t)}else Je(Z+t/2*25),ce(t)},className:"legends container has-standard-12-font-size items-section",children:oe()})]})}),(u==="right"||u==="left")&&n.jsxs("div",{className:`legends container has-standard-12-font-size ${u}`,style:u==="right"?Ze:Pe,children:[de(),oe()]})]})}return n.jsx("div",{})},ft=lt.injectIntl(mt);exports.default=ft;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),j=require("react"),lt=require("react-intl"),ct=require("@nivo/line"),it=require("./Tooltip.js"),pe=require("d3-shape"),ot=require("@nivo/theming"),dt=require("../../layout/FlexWrapDetector.js"),V=require("../../utils/deviceType.js"),ht="#66676d",G="#f0f0f1",ye=["mobile","tablet","midTablet"].includes(V.default()),ge=V.default()==="mobile",be=["tablet","midTablet"].includes(V.default()),ut=(d,p)=>{const v=document.createElement("canvas").getContext("2d");return v.font=p,v.measureText(d).width},mt=({editing:d,previewMode:p,app:Y,legends:v,tooltip:k,tooltipEnabled:je,options:h,intl:D,groupMode:J,reverse:xt,marginLeft:ve,lineLabelPosition:Ee,marginTop:K,marginRight:Ne,marginBottom:Z,format:E,colors:pt,offsetY:Oe,height:Me,showLegends:P,legendPosition:u,tickRotation:y,offsetText:_,tickColor:w,legendLabel:Q,xLabelColor:N,colorGenerator:X,legendCheckBack:z,legendLabelBack:Te,legendLabelColor:C,highlightXAxisLine:ke,showTickLine:A,showRightAxis:De,valueScale:yt,enableArea:Ie,areaShadingCriteria:ee,areaLowerBound:te,areaUpperBound:ae,showPoints:$e,maxValue:Fe,fixedMinValue:B,fixedMaxValue:q,offsetBottom:Le,yAxisTickValues:Se,enableGridY:We,enableGridX:_e,overrideTickColor:H,offsetRight:we,selectedMeasures:ze,tooltipEnableMarkdown:Ae,minMaxClamp:Be,reverseLegend:qe,customAxisFormat:I,mobileCustomization:He,lineCurve:Re,customLabels:R,lineXAxisTickMode:se,lineXAxisTickCount:Ue,lineXAxisTickEvery:Ge})=>{var me,fe,xe;const c=JSON.parse(decodeURIComponent(He)),ne=ye&&((c==null?void 0:c.showCustomization)??!1),$=ne&&p!=="Desktop",F=!d&&ne,[re,Ve]=j.useState(50),[le,Ye]=j.useState(K),[gt,ce]=j.useState(0),[ie,Je]=j.useState(Z),[O,Ke]=j.useState([]),L=h.data.map(e=>({id:e.id,label:R&&R[e.id]?R[e.id]:e.label||e.id,color:X.getColor(e.id,e)})),oe=()=>(qe&&L.reverse(),n.jsx(n.Fragment,{children:P&&L.map((e,a)=>n.jsxs("div",{className:"legend item",onClick:()=>Qe(e.id),children:[n.jsx("input",{className:"ignore",type:"checkbox",checked:O.length===0||!O.includes(e.id),readOnly:!0,style:{backgroundColor:z===!0?e.color:"none",color:C}}),n.jsx("span",{className:z===!0?"checkmark-with-bg":"checkmark",style:{backgroundColor:z===!0?e.color:"transparent"}}),n.jsx("label",{style:{backgroundColor:Te===!0?e.color:"transparent",color:C},children:e.label})]},a))}));j.useEffect(()=>{(()=>{const l=5*Math.max(L.length-5,0);Ve(l)})()},[L]);const Ze={bottom:`-${re}px`},Pe={bottom:`-${re}px`,gap:"0px",top:"0px"},S=e=>O.length?e.filter(a=>O.indexOf(a.id)===-1):e,Qe=e=>{const a=O.slice();if(a.indexOf(e)>-1){const l=a.indexOf(e);a.splice(l,1)}else a.push(e);Ke(a)},Xe=e=>{const a=Object.assign({},e),l=ot.useTheme();($||F)&&he.includes(String(a.value))&&(a.value="");let t=[],s="";if($||F){const i=String(a.value).split(" ");let o=25;d&&p==="Mobile"||ge&&!d?o=(c==null?void 0:c.mobileMaxTickLength)??25:d&&p==="Tablet"||be&&!d?o=(c==null?void 0:c.tabletMaxTickLength)??25:window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches&&!d&&(o=15),i.forEach(g=>{s.length+String(g).length<=o?s+=(s?" ":"")+g:(t.push(s),s=g)}),s&&t.push(s)}else t=[a.value];let r=12;return d&&p==="Mobile"||ge&&!d?r=(c==null?void 0:c.mobileYAxisLineHeight)??12:(d&&p==="Tablet"||be&&!d)&&(r=(c==null?void 0:c.tabletYAxisLineHeight)??12),ut(a.value,"12px Roboto")+15,y>0&&y<180?n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:t.map((i,o)=>n.jsx("text",{transform:`rotate(${y})`,textAnchor:"start",y:typeof e.value=="number"?0:o*r,dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N==="null"?"black":N,fontSize:"12px",fontFamily:"sans-serif"},children:i},i))})]}):y>180&&y<360?n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:n.jsx("text",{transform:`rotate(${y})`,textAnchor:"end",dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N,fontSize:"12px"},children:a.value})})]}):n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:t.map((i,o)=>n.jsx("text",{transform:`rotate(${y})`,textAnchor:"middle",y:typeof e.value=="number"?0:o*r,dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N==="null"?"black":N,fontSize:"12px",fontFamily:"sans-serif"},children:i},i))})]})},Ce=({series:e,xScale:a,yScale:l,innerHeight:t})=>{const s=e&&e.length>0?e[0].color:"#3daff7",r=[];e[0]&&e[0].data.forEach(x=>{Y=="csv"?h.keys.forEach(b=>{r.push({measure:b,min:x.data.variables[b]})}):ze.forEach(b=>{r.push({measure:b,min:x.data.variables[b]})})});const i=r.sort((x,b)=>x.min-b.min),o=ee=="CUSTOM_BETWEEN_TWO_LINES"&&te?te:i[0].measure,g=ee=="CUSTOM_BETWEEN_TWO_LINES"&&ae?ae:i[i.length-1].measure,rt=pe.area().x(x=>a(x.data.x)).y0(x=>l(x.data.variables[o])).y1(x=>l(x.data.variables[g]));return n.jsx(n.Fragment,{children:e&&e[0]&&n.jsx("path",{d:rt(e[0].data),fill:s,fillOpacity:.4})})},et=({series:e,xScale:a,yScale:l,innerHeight:t,innerWidth:s})=>{const r=[0,s],i=pe.line().x((o,g)=>g===0?-10:o).y(o=>l(0));return n.jsx(j.Fragment,{children:n.jsx("path",{d:i(r),fill:"none",stroke:ht,style:{pointerEvents:"none",strokeDasharray:"4 4"}})})},M=["grid","axes","lines","legends"];Ie&&M.push(Ce),$e&&(M.push("points"),M.push("mesh")),ke&&M.push(et);let T=[];S(h.data).forEach(e=>{e.data&&(T=[...T,...e.data.map(a=>a.y)])});const tt=()=>{if(J==="stacked"){const e=[];S(h.data).forEach(t=>{e.push(...t.data)});const l=[];e.forEach(t=>{l.indexOf(t.x)==-1&&l.push(t.x)}),f=Math.max(...l.map(t=>e.filter(s=>s.x==t).map(s=>s.y).reduce((s,r)=>Math.max(s+r,s+0)))),m=Math.min(...l.map(t=>e.filter(s=>s.x==t).map(s=>s.y).reduce((s,r)=>Math.min(s-r,r-s))))}else T.length>0&&(f=Math.max(...T),m=Math.min(...T));return f=f<0?f*.9:f*1.1,m=m>0?m*.9:m*1.1,{min:m,max:f}};let m="auto",f="auto";const W=tt();Fe=="fixed"?(m=B!=null&&B!=""?B:W.min,f=q!=null&&q!=""?q:W.max):(m=W.min,f=W.max);const de=()=>n.jsx(n.Fragment,{children:P&&Q&&n.jsx("div",{className:"legend item",children:n.jsx("label",{className:"legend-title",children:Q})})}),at={top:le,right:Ne,bottom:ie,left:ve};let U=parseInt(Se);const st=h.data&&((fe=(me=h.data)==null?void 0:me.filter(e=>{var a;return((a=e==null?void 0:e.data)==null?void 0:a.length)>0}))==null?void 0:fe.length),he=[];if($||F){U=Number.parseInt(c.yAxisTickValues);const e=new Map(Object.entries(((xe=c==null?void 0:c.labels)==null?void 0:xe.xAxis)??{}));for(const[a,l]of e)l||he.push(a)}const ue=S(h.data),nt=["grid","axes","legends"];if(h!=null&&h.data&&st>0){let e=S(h.data);const a=[];e.forEach(t=>{t&&Array.isArray(t.data)&&t.data.forEach(s=>{const r=s&&s.x;r!==void 0&&a.indexOf(r)===-1&&a.push(r)})});let l;if(se==="count"){const t=Math.max(1,parseInt(Ue));if(a.length>0&&t>0)if(a.length<=t)l=a.slice();else{const s=(a.length-1)/(t-1),r=new Array(t);for(let i=0;i<t;i++)r[i]=Math.floor(i*s);r[t-1]=a.length-1,l=r.map(i=>a[i])}}else if(se==="every"){const t=Math.max(1,parseInt(Ge));if(a.length>0){const s=[];for(let r=0;r<a.length;r++)r%t===0&&s.push(a[r]);s[s.length-1]!==a[a.length-1]&&s.push(a[a.length-1]),l=s}}return n.jsxs("div",{style:{height:Me},children:[n.jsx(ct.ResponsiveLine,{curve:Re,data:ue,margin:at,xScale:{type:"point"},yScale:{type:"linear",min:m,max:f,stacked:J=="stacked",reverse:!1,clamp:Be},layers:ue.length===0?nt:M,axisTop:null,axisRight:De?{tickSize:5,tickValues:U,tickPadding:5,tickRotation:0,legend:v.right,legendPosition:"middle",legendOffset:parseInt(we),format:t=>{const s=I||E;return D.formatNumber(s.style==="percent"?t/100:t,{...s})}}:null,enableGridY:We,enableGridX:_e,enablePointLabel:Ee==="top",pointLabel:t=>D.formatNumber(E.style==="percent"?t.data.yFormatted/100:t.data.yFormatted,E),lineWidth:3,colors:t=>X.getColor(t.id,t),axisBottom:($||F)&&(c==null?void 0:c.xAxisDisabled)===!0?null:{...l?{tickValues:l}:{},renderTick:Xe,legend:v.bottom,legendPosition:"middle",legendOffset:Number.parseInt(Le)},axisLeft:{tickSize:5,tickValues:U,tickPadding:5,tickRotation:0,legend:v.left,legendPosition:"middle",legendOffset:Number.parseInt(Oe),format:t=>{const s=I||E;return D.formatNumber(s.style==="percent"?t/100:t,{...s})}},tooltip:t=>je&&k&&k.trim().length>0?n.jsx(it.default,{intl:D,format:E,d:t,tooltip:k,tooltipEnableMarkdown:Ae}):null,pointSize:10,pointBorderWidth:2,pointBorderColor:{from:"serieColor"},useMesh:e.length>0&&e[0].data.length>0},new Date),(u==="top"||u==="bottom")&&n.jsx("div",{className:`legends container has-standard-12-font-size ${u}`,style:u==="top"?{marginTop:ye&&`${le}px`}:u==="bottom"?{marginBottom:`${ie}px`}:{},children:n.jsxs("div",{className:"legend-sections",children:[n.jsx("div",{className:"title-section",children:de()}),n.jsx(dt.default,{onWrapChange:t=>{if(u==="top"){const s=K+t/2*40;Ye(s),ce(t)}else Je(Z+t/2*25),ce(t)},className:"legends container has-standard-12-font-size items-section",children:oe()})]})}),(u==="right"||u==="left")&&n.jsxs("div",{className:`legends container has-standard-12-font-size ${u}`,style:u==="right"?Ze:Pe,children:[de(),oe()]})]})}return n.jsx("div",{})},ft=lt.injectIntl(mt);exports.default=ft;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("react/jsx-runtime"),u=require("react"),D=require("./PostsFilterDropdown.js"),E=require("../../conf/index.js"),F=p=>{const{taxonomy:n,group:f,placeholder:d,allLabel:g,noneLabel:m,useSingleColumn:y,enableTextSearch:b,filterType:h,showNoDataOption:x,closeOnSelect:O,allNoneSameBehaviour:P,autoApply:S,alphabeticalSort:v,ascOrder:A,type:N,categories:s,onChange:T,wpApiBase:t,locale:r,...w}=p,[B,e]=u.useState([]),C=async()=>{if(!n||n==="none"){e([]);return}const _=t!=null&&t!==""?t:E.Config.REACT_APP_WP_API,j=r?`?lang=${r}`:"?lang=en",l=await(await fetch(_+"/wp/v2/"+n+j)).json();if(l){const c=l.map(o=>({key:o.id,value:o.id,text:o.name}));if(s){const o=s.map(a=>Number(a)).filter(a=>!Number.isNaN(a)),q=c.filter(a=>o.indexOf(Number(a.value))>-1);e([]),e(q)}else e([]),e(c)}};return u.useEffect(()=>{let i=!1;return i||(e([]),C()),()=>{i=!0}},[N,n,s,t,r]),R.jsx(D.default,{...w,group:f,placeholder:d,allLabel:g,noneLabel:m,useSingleColumn:y,enableTextSearch:b,filterType:h,showNoDataOption:x,closeOnSelect:O,allNoneSameBehaviour:P,autoApply:S,alphabeticalSort:v,ascOrder:A,options:B,onChange:T})};exports.default=F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react/jsx-runtime"),i=require("react"),ue=require("semantic-ui-react"),s=require("../../utils/data.js"),ye=require("../../redux/hooks.js"),pe=require("react-redux"),de=require("./CategoricalFilter.js"),Fe=require("./YearFilter.js"),v=require("react-intl"),ge=M=>{const{"data-alphabetical-sort":j,"data-asc-order":D,"data-group":c,"data-placeholder":h,"data-all-label":T,"data-none-label":C,"data-use-single-column":P,"data-enable-text-search":z,"data-filter-type":d,"data-show-no-data-option":J,"data-close-on-select":K,"data-all-none-same-behaviour":U,"data-auto-apply":k,"data-taxonomy":u,"data-categories":F="[]","data-is-country-filter":$,"data-is-year-filter":G,"data-type":H,"data-sort-first-by":b,"data-default-values":Q="[]","data-wordpress-source-type":Se,"data-wordpress-source":B,editing:O=!1}=M,p=ye.useAppDispatch(),{locale:W}=v.useIntl(),t=pe.useSelector(e=>e.getIn(["data","posts",c]))||{},a=d==="multi-select",[x,he]=i.useState(0),V=e=>O?e:decodeURIComponent(e),N=e=>{try{return JSON.parse(V(e))}catch(o){return console.warn("JSON parsing failed for value:",e,"- treating as plain string. Error:",o),V(e)}};let l=N(Q);l||(l=[]),typeof l=="string"&&(l=l.split(",").map(Number)),typeof l=="number"&&(l=[l]);const X=s.toBoolean(j),Z=s.toBoolean(D),A=s.toBoolean(J),I=s.toBoolean(K),_=s.toBoolean(U),w=s.toBoolean(k),r=s.toBoolean($),n=s.toBoolean(G),Y=s.toBoolean(P),E=s.toBoolean(z),g=b!=="none"?s.toNumber(b):null,[y,ee]=i.useState([]),[m,te]=i.useState(!1),S=(e,o)=>o?Array.isArray(e)?e:e!=null?[e]:[]:e||void 0,re=i.useMemo(()=>S(t.countryFilter,a),[t.countryFilter,a]),oe=i.useMemo(()=>S(t.categoryFilter,a),[t.categoryFilter,a]),ae=i.useMemo(()=>n?S(t.yearFilter,a):void 0,[t.yearFilter,a,n]),L=i.useMemo(()=>{if(!F)return[];const e=N(F);return Array.isArray(e)?e:typeof e=="string"||typeof e=="number"?e.toString().split(",").filter(o=>o.trim()!==""):[]},[F,O]),le=e=>{p({type:"SET_POSTS_FILTER",group:c,...t,isYearFilter:n,yearFilter:n?e:null,isCountryFilter:r,categoryFilter:t.categoryFilter,countryFilter:t.countryFilter,sortFirstBy:g})},ne=e=>{p({type:"SET_POSTS_FILTER",group:c,...t,categoryFilter:r?t.categoryFilter:e,countryFilter:r?e:t.countryFilter,isYearFilter:t.isYearFilter,yearFilter:t.yearFilter,isCountryFilter:t.isCountryFilter,sortFirstBy:r?g:t.sortFirstBy,countryCategory:r?u:t.countryCategory,categoryCategory:r?t.categoryCategory:e,categoryTaxonomy:r?t.categoryTaxonomy:u,countryTaxonomy:r?u:t.countryTaxonomy})};return i.useEffect(()=>{const e=l.length>0,o=a?l:l[0],R=L.map(Number),q=r?t.categoryFilter:e?o:a?R:t.categoryFilter,se=r?e?o:a?R:t.countryFilter:t.countryFilter,ie=n&&a?y.length>0?y.map(ce=>ce.value):[]:t.yearFilter;p({type:"SET_INITIAL_POSTS_FILTER",group:c,categoryFilter:q,countryFilter:se,isYearFilter:n,isCountryFilter:r,sortFirstBy:g,yearFilter:n?ie:null,categoryCategory:r?null:q,categoryTaxonomy:r?null:u,countryCategory:r?u:null,countryTaxonomy:r?u:null,page:1})},[]),i.useEffect(()=>{if(n&&!m&&a&&y.length>0){const e=y.map(o=>o.value);p({type:"SET_INITIAL_POSTS_FILTER",group:c,isYearFilter:n,yearFilter:e})}},[m]),f.jsxs(ue.Container,{fluid:!0,className:"filter post-filter",children:[n&&f.jsx(Fe.default,{group:c,placeholder:h,allLabel:T,noneLabel:C,useSingleColumn:Y,enableTextSearch:E,filterType:d,showNoDataOption:A,closeOnSelect:I,allNoneSameBehaviour:_,autoApply:w,alphabeticalSort:X,ascOrder:Z,options:y,value:ae,yearOptions:y,setYearOptions:ee,yearFilterLoading:m,setYearFilterLoading:te,onChange:(e,o)=>{le(o)},resetKey:x,wpApiBase:B??void 0}),!n&&f.jsx(de.default,{group:c,placeholder:h,allLabel:T,noneLabel:C,useSingleColumn:Y,enableTextSearch:E,filterType:d,showNoDataOption:A,closeOnSelect:I,allNoneSameBehaviour:_,autoApply:w,taxonomy:u,type:H,value:r?re:oe,onChange:(e,o)=>{ne(o)},categories:L,resetKey:x,wpApiBase:B??void 0,locale:W},`cat-${c}`)]})},me=v.injectIntl(i.memo(ge));exports.default=me;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react/jsx-runtime"),p=require("react"),l=require("react-redux"),d=require("semantic-ui-react"),f=require("lodash.isequal"),g=require("react-intl"),a=e=>e==null?e:Array.isArray(e)?[...e].map(a).sort((t,r)=>{const i=JSON.stringify(t),s=JSON.stringify(r);return i<s?-1:i>s?1:0}):typeof e=="object"?Object.keys(e).sort().reduce((t,r)=>(t[r]=a(e[r]),t),{}):typeof e=="number"||typeof e=="string"?String(e):e,m=e=>{const{"data-group":t,"data-reset-label":r="Reset All Filters"}=e,i=l.useDispatch(),s=l.useSelector(u=>u.getIn(["data","posts",t])),o=l.useSelector(u=>u.getIn(["data","posts","initialFilters",t])),n=p.useMemo(()=>s&&o?!f(a(s),a(o)):!1,[s,o]);return c.jsxs(d.Container,{fluid:!0,style:{pointerEvents:n?"auto":"none",cursor:n?"pointer":"not-allowed",opacity:n?1:.5},className:`data-filters-reset ignore ${n?"":"disabled"}`,onClick:()=>{i({type:"SET_INITIAL_POSTS_FILTER",group:t,...o,reset:!0,page:1})},children:[c.jsx("span",{children:r}),c.jsx("span",{children:c.jsx(d.Icon,{disabled:!n,name:"undo alternate",className:"custom-undo-icon"})})]})},y=g.injectIntl(m);exports.default=y;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("semantic-ui-react"),i=require("react"),f=require("@devgateway/wp-react-lib"),R=require("react-intl"),k=require("react-router"),O=require("./SearchControl.js"),T=require("./LangSwitcher.js"),D=(n,t)=>{const u=[];return n.items.forEach(l=>{l.child_items?l.child_items.forEach(a=>{a.slug==t.slug&&(u.push(l),u.push(a))}):l.slug==t.slug&&l.url!="/"&&u.push(l)}),u},S=(n,t)=>{if(n){const u=n.indexOf("/wp");if(u!==-1){const l=n.substr(u+3);return l.startsWith("/"+t)?l:"/"+t+l}else return n.startsWith("/"+t)?n:"/"+t+n}return""},q=R.injectIntl(({menu:n,intl:t})=>{const u=k.useParams(),l=D(n,u);return e.jsx(i.Fragment,{children:l.filter(a=>a.url!="#wpm-languages").map(a=>a.child_items?e.jsxs("span",{children:[a.post_title," "]}):e.jsxs("a",{className:a.slug==u.slug?"active":"",href:f.utils.replaceLink(a.url,t.locale),children:[" ",a.post_title]}))})}),z=R.injectIntl(({settings:n,withIcons:t,active:u,menu:l,onSetSelected:a,selected:d,intl:{locale:x},isSmallScreen:I})=>{const M=k.useParams();i.useEffect(s=>{const r=D(l,M).filter(j=>j.menu_item_parent==0);r&&r.length>0?a(r[0]):a(null)},[l,a,M.slug]);const[g,_]=i.useState(null);i.useEffect(()=>{_(l)},[l]),i.useEffect(()=>{if(n&&n.menu_settings&&g){const s=[],m=l.items.map(r=>(n.menu_settings&&n.menu_settings["nav_menu_item["+r.ID+"]"]===!1&&s.push(r.ID),n.menu_settings&&n.menu_settings["nav_menu_item["+r.ID+"]"]?(n.menu_settings["nav_menu_item["+r.ID+"]"],{...r,...n.menu_settings["nav_menu_item["+r.ID+"]"]}):r));Object.keys(n.menu_settings).map(r=>{const j=n.menu_settings[r];if(j.type=="nav_menu_item"){const b=/(-)?[0-9]+/g.exec(r),N=parseInt(b[0]);m.find(C=>C.ID==N)||m.push(j.value)}}),_({...l,items:m.filter(r=>s.indexOf(r.ID)===-1)})}},[n]);const[w,p]=i.useState(!1);return i.useEffect(()=>{const s=()=>{p(window.innerWidth<=1200)};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),g&&e.jsx(i.Fragment,{children:g.items.filter(s=>s.url!=="#wpm-languages").map((s,m)=>e.jsxs(i.Fragment,{children:[e.jsxs(c.Menu.Item,{className:`divided ${s.child_items?"has-child-items":""}
|
|
2
2
|
${d&&d.ID===s.ID?"selected":""}
|
|
3
|
-
${
|
|
3
|
+
${u===s.slug?"active":""}`,children:[t&&e.jsx("a",{href:S(s.url,x),children:e.jsx("div",{className:"mark",children:e.jsx("span",{className:"sr-only",children:s.title})})}),I?s.child_items?e.jsx("span",{onClick:()=>a(d===s?null:s),children:s.title}):e.jsx("a",{href:S(s.url,x),children:s.title}):s.child_items?e.jsx("span",{onMouseOver:r=>a(s),onClick:()=>a(d===s?null:s),children:s.title}):e.jsx("a",{onMouseOut:r=>a(null),onMouseOver:r=>a(s),href:S(s.url,x),children:s.title})]}),w&&d&&d.ID===s.ID&&d.child_items&&e.jsx(i.Fragment,{children:d.child_items.map(r=>e.jsxs(c.Menu.Item,{className:`divided child-item ${u===r.slug?"active":""}`,children:[e.jsx("div",{className:"mark"}),e.jsx("a",{href:S(r.url,x),children:r.title})]},r.ID))})]},s.ID))})}),y=({intl:n,settings:t,logoSmallSrc:u="/logo_small.png"})=>{const[l,a]=i.useState(),[d,x]=i.useState(!1),[I,M]=i.useState(!1),[g,_]=i.useState(!1),[w,p]=i.useState(!1),{slug:s}=k.useParams(),m=i.useRef(null),r=i.useRef(null),j=()=>{p(!w),x(!d)};i.useEffect(()=>{const o=h=>{(m.current&&!m.current.contains(h.target)&&!r.current.contains(h.target)||h.target.closest(".desktop")||h.target.closest(".breadcrumbs"))&&(x(!1),p(!1))},v=h=>{h.key==="Escape"&&(x(!1),p(!1))};return document.addEventListener("mousedown",o),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",v)}},[]),i.useEffect(()=>{let o;const v=()=>{const $=window.innerWidth<=1200;M($),_(!1)},h=()=>{_(!0),clearTimeout(o),o=setTimeout(v,300)};return v(),window.addEventListener("resize",h),()=>{clearTimeout(o),window.removeEventListener("resize",h)}},[]);const[E,b]=i.useState(!1);i.useEffect(()=>{const o=()=>{b(window.innerWidth<=1364)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]);const N=({media:o})=>o?e.jsx(c.Image,{src:o.guid.rendered}):e.jsx("img",{className:"brand logo",size:"large",src:"/logo_full.png"}),L=(t==null?void 0:t.landing_page_url)&&t.landing_page_url!==!1&&t.landing_page_url!==void 0&&t.landing_page_url!=="",C=L?t.landing_page_url:`/${n.locale}`;return e.jsx(i.Fragment,{children:e.jsxs(f.MenuProvider,{slug:"main",locale:n.locale,children:[e.jsxs(c.Container,{fluid:!0,className:"header",children:[e.jsx(c.Container,{fluid:!0,className:"background",ref:m,children:e.jsxs(c.Menu,{className:"branding",text:!0,children:[e.jsx(c.Menu.Item,{children:e.jsxs("a",{href:`${C}`,target:L?"_blank":"_self",rel:"noopener noreferrer",id:"site_url",children:[t.site_logo!==0&&!E&&e.jsx(f.MediaProvider,{id:t.site_logo,children:e.jsx(f.MediaConsumer,{children:e.jsx(N,{},"logo")})}),t.site_logo===0&&!E&&e.jsx("img",{className:"brand logo",size:"large",src:"/logo_full.png"}),E&&e.jsx("img",{className:"brand logo small",size:"small",src:u})]})}),e.jsx(c.Menu.Item,{className:"divider",children:e.jsx("div",{})}),e.jsxs(c.Menu.Item,{fitted:!0,href:"/",children:[e.jsx(c.Flag,{name:"za"}),e.jsx("div",{className:"site name",children:t.name})]}),!g&&(I?e.jsx(c.Menu,{className:`pages ${d?"show":""}`,children:e.jsx(c.Container,{fluid:!0,children:e.jsx(f.MenuConsumer,{children:e.jsx(z,{settings:t,active:s,selected:l,onSetSelected:a,isSmallScreen:I},"items")})})}):e.jsx(c.Menu.Menu,{className:"pages",children:e.jsx(f.MenuConsumer,{children:e.jsx(z,{settings:t,active:s,selected:l,onSetSelected:a},"items")})})),e.jsx(c.Menu.Item,{children:e.jsx(f.MenuConsumer,{children:e.jsx(T.default,{locale:n.locale},"lang")})}),e.jsx(c.Menu.Item,{fitted:!0,children:e.jsx(f.MenuConsumer,{children:e.jsx(O.default,{onSetSelected:a,settings:t})})}),e.jsxs("div",{ref:r,className:`hamburger-menu ${w?"animate":""} ${d?"open":"close"}`,onClick:j,children:[e.jsx("div",{}),e.jsx("div",{className:"middle-line"}),e.jsx("div",{})]})]})}),e.jsx(c.Container,{fluid:!0,className:"child",children:l&&l.child_items&&e.jsx(c.Menu,{fluid:!0,text:!0,children:e.jsx(z,{active:s,locale:n.locale,withIcons:!0,onSetSelected:o=>null,menu:{items:l.child_items}})})})]},"header-container"),e.jsx(c.Container,{className:"url breadcrumbs",children:e.jsx(f.MenuConsumer,{children:e.jsx(q,{})})})]})})},P=R.injectIntl(y);exports.default=P;
|
|
@@ -366,7 +366,7 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
|
|
|
366
366
|
enableGridX: Ae,
|
|
367
367
|
enablePointLabel: Oe === "top",
|
|
368
368
|
pointLabel: (t) => I.formatNumber(
|
|
369
|
-
N.style === "percent" ? t.yFormatted / 100 : t.yFormatted,
|
|
369
|
+
N.style === "percent" ? t.data.yFormatted / 100 : t.data.yFormatted,
|
|
370
370
|
N
|
|
371
371
|
),
|
|
372
372
|
lineWidth: 3,
|
|
@@ -1,72 +1,74 @@
|
|
|
1
1
|
import { jsx as D } from "react/jsx-runtime";
|
|
2
2
|
import { useState as E, useEffect as F } from "react";
|
|
3
3
|
import L from "./PostsFilterDropdown.js";
|
|
4
|
-
import { Config as
|
|
5
|
-
const q = (
|
|
4
|
+
import { Config as k } from "../../conf/index.js";
|
|
5
|
+
const q = (c) => {
|
|
6
6
|
const {
|
|
7
|
-
taxonomy:
|
|
8
|
-
group:
|
|
7
|
+
taxonomy: n,
|
|
8
|
+
group: m,
|
|
9
9
|
placeholder: f,
|
|
10
|
-
allLabel:
|
|
11
|
-
noneLabel:
|
|
12
|
-
useSingleColumn:
|
|
13
|
-
enableTextSearch:
|
|
14
|
-
filterType:
|
|
15
|
-
showNoDataOption:
|
|
16
|
-
closeOnSelect:
|
|
17
|
-
allNoneSameBehaviour:
|
|
18
|
-
autoApply:
|
|
19
|
-
alphabeticalSort:
|
|
20
|
-
ascOrder:
|
|
21
|
-
type:
|
|
22
|
-
categories:
|
|
23
|
-
onChange:
|
|
10
|
+
allLabel: u,
|
|
11
|
+
noneLabel: g,
|
|
12
|
+
useSingleColumn: d,
|
|
13
|
+
enableTextSearch: y,
|
|
14
|
+
filterType: h,
|
|
15
|
+
showNoDataOption: x,
|
|
16
|
+
closeOnSelect: O,
|
|
17
|
+
allNoneSameBehaviour: P,
|
|
18
|
+
autoApply: b,
|
|
19
|
+
alphabeticalSort: A,
|
|
20
|
+
ascOrder: N,
|
|
21
|
+
type: S,
|
|
22
|
+
categories: s,
|
|
23
|
+
onChange: w,
|
|
24
24
|
wpApiBase: o,
|
|
25
|
-
locale:
|
|
26
|
-
...
|
|
27
|
-
} =
|
|
28
|
-
if (!
|
|
25
|
+
locale: r,
|
|
26
|
+
...B
|
|
27
|
+
} = c, [C, e] = E([]), T = async () => {
|
|
28
|
+
if (!n || n === "none") {
|
|
29
29
|
e([]);
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
32
|
+
const v = o != null && o !== "" ? o : k.REACT_APP_WP_API, _ = r ? `?lang=${r}` : "?lang=en", l = await (await fetch(v + "/wp/v2/" + n + _)).json();
|
|
33
|
+
if (l) {
|
|
34
|
+
const p = l.map((t) => ({
|
|
35
35
|
key: t.id,
|
|
36
36
|
value: t.id,
|
|
37
37
|
text: t.name
|
|
38
38
|
}));
|
|
39
|
-
if (
|
|
40
|
-
const t =
|
|
41
|
-
|
|
39
|
+
if (s) {
|
|
40
|
+
const t = s.map((a) => Number(a)).filter((a) => !Number.isNaN(a)), j = p.filter(
|
|
41
|
+
(a) => t.indexOf(Number(a.value)) > -1
|
|
42
|
+
);
|
|
43
|
+
e([]), e(j);
|
|
42
44
|
} else
|
|
43
|
-
e([]), e(
|
|
45
|
+
e([]), e(p);
|
|
44
46
|
}
|
|
45
47
|
};
|
|
46
48
|
return F(() => {
|
|
47
|
-
let
|
|
48
|
-
return
|
|
49
|
-
|
|
49
|
+
let i = !1;
|
|
50
|
+
return i || (e([]), T()), () => {
|
|
51
|
+
i = !0;
|
|
50
52
|
};
|
|
51
|
-
}, [
|
|
53
|
+
}, [S, n, s, o, r]), /* @__PURE__ */ D(
|
|
52
54
|
L,
|
|
53
55
|
{
|
|
54
|
-
...
|
|
55
|
-
group:
|
|
56
|
+
...B,
|
|
57
|
+
group: m,
|
|
56
58
|
placeholder: f,
|
|
57
|
-
allLabel:
|
|
58
|
-
noneLabel:
|
|
59
|
-
useSingleColumn:
|
|
60
|
-
enableTextSearch:
|
|
61
|
-
filterType:
|
|
62
|
-
showNoDataOption:
|
|
63
|
-
closeOnSelect:
|
|
64
|
-
allNoneSameBehaviour:
|
|
65
|
-
autoApply:
|
|
66
|
-
alphabeticalSort:
|
|
67
|
-
ascOrder:
|
|
68
|
-
options:
|
|
69
|
-
onChange:
|
|
59
|
+
allLabel: u,
|
|
60
|
+
noneLabel: g,
|
|
61
|
+
useSingleColumn: d,
|
|
62
|
+
enableTextSearch: y,
|
|
63
|
+
filterType: h,
|
|
64
|
+
showNoDataOption: x,
|
|
65
|
+
closeOnSelect: O,
|
|
66
|
+
allNoneSameBehaviour: P,
|
|
67
|
+
autoApply: b,
|
|
68
|
+
alphabeticalSort: A,
|
|
69
|
+
ascOrder: N,
|
|
70
|
+
options: C,
|
|
71
|
+
onChange: w
|
|
70
72
|
}
|
|
71
73
|
);
|
|
72
74
|
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Container as
|
|
4
|
-
import { toBoolean as i, toNumber as
|
|
5
|
-
import { useAppDispatch as
|
|
6
|
-
import { useSelector as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { injectIntl as
|
|
10
|
-
const
|
|
1
|
+
import { jsxs as ue, jsx as D } from "react/jsx-runtime";
|
|
2
|
+
import pe, { useState as S, useMemo as p, useEffect as P } from "react";
|
|
3
|
+
import { Container as de } from "semantic-ui-react";
|
|
4
|
+
import { toBoolean as i, toNumber as Fe } from "../../utils/data.js";
|
|
5
|
+
import { useAppDispatch as me } from "../../redux/hooks.js";
|
|
6
|
+
import { useSelector as ge } from "react-redux";
|
|
7
|
+
import fe from "./CategoricalFilter.js";
|
|
8
|
+
import Se from "./YearFilter.js";
|
|
9
|
+
import { injectIntl as he, useIntl as Ce } from "react-intl";
|
|
10
|
+
const Te = (z) => {
|
|
11
11
|
const {
|
|
12
|
-
"data-alphabetical-sort":
|
|
13
|
-
"data-asc-order":
|
|
12
|
+
"data-alphabetical-sort": j,
|
|
13
|
+
"data-asc-order": J,
|
|
14
14
|
"data-group": s,
|
|
15
|
-
"data-placeholder":
|
|
16
|
-
"data-all-label":
|
|
17
|
-
"data-none-label":
|
|
18
|
-
"data-use-single-column":
|
|
19
|
-
"data-enable-text-search":
|
|
15
|
+
"data-placeholder": h,
|
|
16
|
+
"data-all-label": C,
|
|
17
|
+
"data-none-label": T,
|
|
18
|
+
"data-use-single-column": K,
|
|
19
|
+
"data-enable-text-search": M,
|
|
20
20
|
"data-filter-type": d,
|
|
21
|
-
"data-show-no-data-option":
|
|
22
|
-
"data-close-on-select":
|
|
23
|
-
"data-all-none-same-behaviour":
|
|
24
|
-
"data-auto-apply":
|
|
21
|
+
"data-show-no-data-option": U,
|
|
22
|
+
"data-close-on-select": $,
|
|
23
|
+
"data-all-none-same-behaviour": k,
|
|
24
|
+
"data-auto-apply": q,
|
|
25
25
|
"data-taxonomy": c,
|
|
26
26
|
"data-categories": F = "[]",
|
|
27
|
-
"data-is-country-filter":
|
|
28
|
-
"data-is-year-filter":
|
|
29
|
-
"data-type":
|
|
27
|
+
"data-is-country-filter": G,
|
|
28
|
+
"data-is-year-filter": H,
|
|
29
|
+
"data-type": Q,
|
|
30
30
|
"data-sort-first-by": O,
|
|
31
|
-
"data-default-values":
|
|
32
|
-
"data-wordpress-source-type":
|
|
33
|
-
"data-wordpress-source":
|
|
34
|
-
editing:
|
|
35
|
-
} =
|
|
31
|
+
"data-default-values": W = "[]",
|
|
32
|
+
"data-wordpress-source-type": Oe,
|
|
33
|
+
"data-wordpress-source": b,
|
|
34
|
+
editing: x = !1
|
|
35
|
+
} = z, u = me(), { locale: X } = Ce(), t = ge((e) => e.getIn(["data", "posts", s])) || {}, o = d === "multi-select", [V, xe] = S(0), N = (e) => x ? e : decodeURIComponent(e), A = (e) => {
|
|
36
36
|
try {
|
|
37
|
-
return JSON.parse(
|
|
37
|
+
return JSON.parse(N(e));
|
|
38
38
|
} catch (a) {
|
|
39
|
-
return console.warn("JSON parsing failed for value:", e, "- treating as plain string. Error:", a),
|
|
39
|
+
return console.warn("JSON parsing failed for value:", e, "- treating as plain string. Error:", a), N(e);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
let l =
|
|
42
|
+
let l = A(W);
|
|
43
43
|
l || (l = []), typeof l == "string" && (l = l.split(",").map(Number)), typeof l == "number" && (l = [l]);
|
|
44
|
-
const
|
|
44
|
+
const Z = i(j), ee = i(J), I = i(U), B = i($), w = i(k), Y = i(q), r = i(G), n = i(H), _ = i(K), E = i(M), m = O !== "none" ? Fe(O) : null, [y, te] = S([]), [g, re] = S(!1), f = (e, a) => a ? Array.isArray(e) ? e : e != null ? [e] : [] : e || void 0, ae = p(
|
|
45
45
|
() => f(t.countryFilter, o),
|
|
46
46
|
[t.countryFilter, o]
|
|
47
|
-
),
|
|
47
|
+
), oe = p(
|
|
48
48
|
() => f(t.categoryFilter, o),
|
|
49
49
|
[t.categoryFilter, o]
|
|
50
|
-
),
|
|
50
|
+
), le = p(
|
|
51
51
|
() => n ? f(t.yearFilter, o) : void 0,
|
|
52
52
|
[t.yearFilter, o, n]
|
|
53
|
-
),
|
|
53
|
+
), L = p(() => {
|
|
54
54
|
if (!F) return [];
|
|
55
|
-
const e =
|
|
56
|
-
return Array.isArray(e) ? e : typeof e == "string" || typeof e == "number" ? e.toString().split(",").filter(
|
|
57
|
-
}, [F,
|
|
55
|
+
const e = A(F);
|
|
56
|
+
return Array.isArray(e) ? e : typeof e == "string" || typeof e == "number" ? e.toString().split(",").filter((a) => a.trim() !== "") : [];
|
|
57
|
+
}, [F, x]), ne = (e) => {
|
|
58
58
|
u({
|
|
59
59
|
type: "SET_POSTS_FILTER",
|
|
60
60
|
group: s,
|
|
@@ -66,7 +66,7 @@ const Ce = (D) => {
|
|
|
66
66
|
countryFilter: t.countryFilter,
|
|
67
67
|
sortFirstBy: m
|
|
68
68
|
});
|
|
69
|
-
},
|
|
69
|
+
}, ie = (e) => {
|
|
70
70
|
u({
|
|
71
71
|
type: "SET_POSTS_FILTER",
|
|
72
72
|
group: s,
|
|
@@ -84,24 +84,24 @@ const Ce = (D) => {
|
|
|
84
84
|
countryTaxonomy: r ? c : t.countryTaxonomy
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
|
-
return
|
|
88
|
-
const e = l.length > 0, a = o ? l : l[0],
|
|
87
|
+
return P(() => {
|
|
88
|
+
const e = l.length > 0, a = o ? l : l[0], R = L.map(Number), v = r ? t.categoryFilter : e ? a : o ? R : t.categoryFilter, se = r ? e ? a : o ? R : t.countryFilter : t.countryFilter, ce = n && o ? y.length > 0 ? y.map((ye) => ye.value) : [] : t.yearFilter;
|
|
89
89
|
u({
|
|
90
90
|
type: "SET_INITIAL_POSTS_FILTER",
|
|
91
91
|
group: s,
|
|
92
|
-
categoryFilter:
|
|
93
|
-
countryFilter:
|
|
92
|
+
categoryFilter: v,
|
|
93
|
+
countryFilter: se,
|
|
94
94
|
isYearFilter: n,
|
|
95
95
|
isCountryFilter: r,
|
|
96
96
|
sortFirstBy: m,
|
|
97
|
-
yearFilter: n ?
|
|
98
|
-
categoryCategory: r ? null :
|
|
97
|
+
yearFilter: n ? ce : null,
|
|
98
|
+
categoryCategory: r ? null : v,
|
|
99
99
|
categoryTaxonomy: r ? null : c,
|
|
100
100
|
countryCategory: r ? c : null,
|
|
101
101
|
countryTaxonomy: r ? c : null,
|
|
102
102
|
page: 1
|
|
103
103
|
});
|
|
104
|
-
}, []),
|
|
104
|
+
}, []), P(() => {
|
|
105
105
|
if (n && !g && o && y.length > 0) {
|
|
106
106
|
const e = y.map((a) => a.value);
|
|
107
107
|
u({
|
|
@@ -111,65 +111,65 @@ const Ce = (D) => {
|
|
|
111
111
|
yearFilter: e
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
}, [g]), /* @__PURE__ */
|
|
115
|
-
n && /* @__PURE__ */
|
|
116
|
-
|
|
114
|
+
}, [g]), /* @__PURE__ */ ue(de, { fluid: !0, className: "filter post-filter", children: [
|
|
115
|
+
n && /* @__PURE__ */ D(
|
|
116
|
+
Se,
|
|
117
117
|
{
|
|
118
118
|
group: s,
|
|
119
|
-
placeholder:
|
|
120
|
-
allLabel:
|
|
121
|
-
noneLabel:
|
|
122
|
-
useSingleColumn:
|
|
123
|
-
enableTextSearch:
|
|
119
|
+
placeholder: h,
|
|
120
|
+
allLabel: C,
|
|
121
|
+
noneLabel: T,
|
|
122
|
+
useSingleColumn: _,
|
|
123
|
+
enableTextSearch: E,
|
|
124
124
|
filterType: d,
|
|
125
125
|
showNoDataOption: I,
|
|
126
|
-
closeOnSelect:
|
|
127
|
-
allNoneSameBehaviour:
|
|
128
|
-
autoApply:
|
|
129
|
-
alphabeticalSort:
|
|
130
|
-
ascOrder:
|
|
126
|
+
closeOnSelect: B,
|
|
127
|
+
allNoneSameBehaviour: w,
|
|
128
|
+
autoApply: Y,
|
|
129
|
+
alphabeticalSort: Z,
|
|
130
|
+
ascOrder: ee,
|
|
131
131
|
options: y,
|
|
132
|
-
value:
|
|
132
|
+
value: le,
|
|
133
133
|
yearOptions: y,
|
|
134
|
-
setYearOptions:
|
|
134
|
+
setYearOptions: te,
|
|
135
135
|
yearFilterLoading: g,
|
|
136
|
-
setYearFilterLoading:
|
|
136
|
+
setYearFilterLoading: re,
|
|
137
137
|
onChange: (e, a) => {
|
|
138
|
-
|
|
138
|
+
ne(a);
|
|
139
139
|
},
|
|
140
140
|
resetKey: V,
|
|
141
|
-
wpApiBase:
|
|
141
|
+
wpApiBase: b ?? void 0
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
|
-
!n && /* @__PURE__ */
|
|
145
|
-
|
|
144
|
+
!n && /* @__PURE__ */ D(
|
|
145
|
+
fe,
|
|
146
146
|
{
|
|
147
147
|
group: s,
|
|
148
|
-
placeholder:
|
|
149
|
-
allLabel:
|
|
150
|
-
noneLabel:
|
|
151
|
-
useSingleColumn:
|
|
152
|
-
enableTextSearch:
|
|
148
|
+
placeholder: h,
|
|
149
|
+
allLabel: C,
|
|
150
|
+
noneLabel: T,
|
|
151
|
+
useSingleColumn: _,
|
|
152
|
+
enableTextSearch: E,
|
|
153
153
|
filterType: d,
|
|
154
154
|
showNoDataOption: I,
|
|
155
|
-
closeOnSelect:
|
|
156
|
-
allNoneSameBehaviour:
|
|
157
|
-
autoApply:
|
|
155
|
+
closeOnSelect: B,
|
|
156
|
+
allNoneSameBehaviour: w,
|
|
157
|
+
autoApply: Y,
|
|
158
158
|
taxonomy: c,
|
|
159
|
-
type:
|
|
160
|
-
value: r ?
|
|
159
|
+
type: Q,
|
|
160
|
+
value: r ? ae : oe,
|
|
161
161
|
onChange: (e, a) => {
|
|
162
|
-
|
|
162
|
+
ie(a);
|
|
163
163
|
},
|
|
164
|
-
categories:
|
|
164
|
+
categories: L,
|
|
165
165
|
resetKey: V,
|
|
166
|
-
wpApiBase:
|
|
167
|
-
locale:
|
|
166
|
+
wpApiBase: b ?? void 0,
|
|
167
|
+
locale: X
|
|
168
168
|
},
|
|
169
169
|
`cat-${s}`
|
|
170
170
|
)
|
|
171
171
|
] });
|
|
172
|
-
},
|
|
172
|
+
}, Re = he(pe.memo(Te));
|
|
173
173
|
export {
|
|
174
|
-
|
|
174
|
+
Re as default
|
|
175
175
|
};
|
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useDispatch as
|
|
4
|
-
import { Container as
|
|
5
|
-
import
|
|
6
|
-
import { injectIntl as
|
|
7
|
-
const
|
|
1
|
+
import { jsxs as d, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
|
+
import { useDispatch as m, useSelector as l } from "react-redux";
|
|
4
|
+
import { Container as u, Icon as g } from "semantic-ui-react";
|
|
5
|
+
import y from "lodash.isequal";
|
|
6
|
+
import { injectIntl as b } from "react-intl";
|
|
7
|
+
const a = (t) => t == null ? t : Array.isArray(t) ? [...t].map(a).sort((r, e) => {
|
|
8
|
+
const o = JSON.stringify(r), n = JSON.stringify(e);
|
|
9
|
+
return o < n ? -1 : o > n ? 1 : 0;
|
|
10
|
+
}) : typeof t == "object" ? Object.keys(t).sort().reduce((r, e) => (r[e] = a(t[e]), r), {}) : typeof t == "number" || typeof t == "string" ? String(t) : t, I = (t) => {
|
|
8
11
|
const {
|
|
9
|
-
"data-group":
|
|
10
|
-
"data-reset-label":
|
|
11
|
-
} =
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
"data-group": r,
|
|
13
|
+
"data-reset-label": e = "Reset All Filters"
|
|
14
|
+
} = t, o = m(), n = l((c) => c.getIn(["data", "posts", r])), i = l((c) => c.getIn(["data", "posts", "initialFilters", r])), s = f.useMemo(() => n && i ? !y(
|
|
15
|
+
a(n),
|
|
16
|
+
a(i)
|
|
17
|
+
) : !1, [n, i]);
|
|
18
|
+
return /* @__PURE__ */ d(
|
|
19
|
+
u,
|
|
14
20
|
{
|
|
15
21
|
fluid: !0,
|
|
16
22
|
style: {
|
|
17
|
-
pointerEvents:
|
|
18
|
-
cursor:
|
|
19
|
-
opacity:
|
|
23
|
+
pointerEvents: s ? "auto" : "none",
|
|
24
|
+
cursor: s ? "pointer" : "not-allowed",
|
|
25
|
+
opacity: s ? 1 : 0.5
|
|
20
26
|
},
|
|
21
|
-
className: `data-filters-reset ignore ${
|
|
27
|
+
className: `data-filters-reset ignore ${s ? "" : "disabled"}`,
|
|
22
28
|
onClick: () => {
|
|
23
|
-
|
|
29
|
+
o({
|
|
24
30
|
type: "SET_INITIAL_POSTS_FILTER",
|
|
25
|
-
group:
|
|
26
|
-
...
|
|
31
|
+
group: r,
|
|
32
|
+
...i,
|
|
27
33
|
reset: !0,
|
|
28
34
|
page: 1
|
|
29
35
|
});
|
|
30
36
|
},
|
|
31
37
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ p("span", { children: e }),
|
|
39
|
+
/* @__PURE__ */ p("span", { children: /* @__PURE__ */ p(g, { disabled: !s, name: "undo alternate", className: "custom-undo-icon" }) })
|
|
34
40
|
]
|
|
35
41
|
}
|
|
36
42
|
);
|
|
37
|
-
},
|
|
43
|
+
}, A = b(I);
|
|
38
44
|
export {
|
|
39
|
-
|
|
45
|
+
A as default
|
|
40
46
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { Menu as d, Container as
|
|
3
|
-
import
|
|
4
|
-
import { utils as
|
|
5
|
-
import { injectIntl as
|
|
6
|
-
import { useParams as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
2
|
+
import { Menu as d, Container as N, Flag as U, Image as j } from "semantic-ui-react";
|
|
3
|
+
import E, { useEffect as p, useState as g, useRef as W } from "react";
|
|
4
|
+
import { utils as H, MenuProvider as A, MediaProvider as V, MediaConsumer as B, MenuConsumer as b } from "@devgateway/wp-react-lib";
|
|
5
|
+
import { injectIntl as T } from "react-intl";
|
|
6
|
+
import { useParams as y } from "react-router";
|
|
7
|
+
import K from "./SearchControl.js";
|
|
8
|
+
import q from "./LangSwitcher.js";
|
|
9
|
+
const F = (r, l) => {
|
|
10
10
|
const t = [];
|
|
11
11
|
return r.items.forEach((i) => {
|
|
12
12
|
i.child_items ? i.child_items.forEach((a) => {
|
|
13
|
-
a.slug ==
|
|
14
|
-
}) : i.slug ==
|
|
13
|
+
a.slug == l.slug && (t.push(i), t.push(a));
|
|
14
|
+
}) : i.slug == l.slug && i.url != "/" && t.push(i);
|
|
15
15
|
}), t;
|
|
16
|
-
},
|
|
16
|
+
}, S = (r, l) => {
|
|
17
17
|
if (r) {
|
|
18
18
|
const t = r.indexOf("/wp");
|
|
19
19
|
if (t !== -1) {
|
|
20
20
|
const i = r.substr(t + 3);
|
|
21
|
-
return i.startsWith("/" +
|
|
21
|
+
return i.startsWith("/" + l) ? i : "/" + l + i;
|
|
22
22
|
} else
|
|
23
|
-
return r.startsWith("/" +
|
|
23
|
+
return r.startsWith("/" + l) ? r : "/" + l + r;
|
|
24
24
|
}
|
|
25
25
|
return "";
|
|
26
|
-
},
|
|
27
|
-
const t =
|
|
28
|
-
return /* @__PURE__ */ e(
|
|
26
|
+
}, G = T(({ menu: r, intl: l }) => {
|
|
27
|
+
const t = y(), i = F(r, t);
|
|
28
|
+
return /* @__PURE__ */ e(E.Fragment, { children: i.filter((a) => a.url != "#wpm-languages").map(
|
|
29
29
|
(a) => a.child_items ? /* @__PURE__ */ u("span", { children: [
|
|
30
30
|
a.post_title,
|
|
31
31
|
" "
|
|
@@ -33,7 +33,7 @@ const W = (r, s) => {
|
|
|
33
33
|
"a",
|
|
34
34
|
{
|
|
35
35
|
className: a.slug == t.slug ? "active" : "",
|
|
36
|
-
href:
|
|
36
|
+
href: H.replaceLink(a.url, l.locale),
|
|
37
37
|
children: [
|
|
38
38
|
" ",
|
|
39
39
|
a.post_title
|
|
@@ -41,53 +41,53 @@ const W = (r, s) => {
|
|
|
41
41
|
}
|
|
42
42
|
)
|
|
43
43
|
) });
|
|
44
|
-
}),
|
|
44
|
+
}), O = T(
|
|
45
45
|
({
|
|
46
46
|
settings: r,
|
|
47
|
-
withIcons:
|
|
47
|
+
withIcons: l,
|
|
48
48
|
active: t,
|
|
49
49
|
menu: i,
|
|
50
50
|
onSetSelected: a,
|
|
51
51
|
selected: o,
|
|
52
|
-
intl: { locale:
|
|
53
|
-
isSmallScreen:
|
|
52
|
+
intl: { locale: f },
|
|
53
|
+
isSmallScreen: L
|
|
54
54
|
}) => {
|
|
55
|
-
const z =
|
|
56
|
-
|
|
55
|
+
const z = y();
|
|
56
|
+
p(
|
|
57
57
|
(n) => {
|
|
58
|
-
const
|
|
59
|
-
|
|
58
|
+
const s = F(i, z).filter((_) => _.menu_item_parent == 0);
|
|
59
|
+
s && s.length > 0 ? a(s[0]) : a(null);
|
|
60
60
|
},
|
|
61
61
|
[i, a, z.slug]
|
|
62
62
|
);
|
|
63
|
-
const [v,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, [i]),
|
|
63
|
+
const [v, w] = g(null);
|
|
64
|
+
p(() => {
|
|
65
|
+
w(i);
|
|
66
|
+
}, [i]), p(() => {
|
|
67
67
|
if (r && r.menu_settings && v) {
|
|
68
|
-
const n = [],
|
|
69
|
-
...
|
|
70
|
-
...r.menu_settings["nav_menu_item[" +
|
|
71
|
-
}) :
|
|
72
|
-
Object.keys(r.menu_settings).map((
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
75
|
-
const
|
|
76
|
-
|
|
68
|
+
const n = [], m = i.items.map((s) => (r.menu_settings && r.menu_settings["nav_menu_item[" + s.ID + "]"] === !1 && n.push(s.ID), r.menu_settings && r.menu_settings["nav_menu_item[" + s.ID + "]"] ? (r.menu_settings["nav_menu_item[" + s.ID + "]"], {
|
|
69
|
+
...s,
|
|
70
|
+
...r.menu_settings["nav_menu_item[" + s.ID + "]"]
|
|
71
|
+
}) : s));
|
|
72
|
+
Object.keys(r.menu_settings).map((s) => {
|
|
73
|
+
const _ = r.menu_settings[s];
|
|
74
|
+
if (_.type == "nav_menu_item") {
|
|
75
|
+
const D = /(-)?[0-9]+/g.exec(s), C = parseInt(D[0]);
|
|
76
|
+
m.find(($) => $.ID == C) || m.push(_.value);
|
|
77
77
|
}
|
|
78
|
-
}),
|
|
78
|
+
}), w({
|
|
79
79
|
...i,
|
|
80
|
-
items:
|
|
80
|
+
items: m.filter((s) => n.indexOf(s.ID) === -1)
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}, [r]);
|
|
84
|
-
const [
|
|
85
|
-
return
|
|
84
|
+
const [k, I] = g(!1);
|
|
85
|
+
return p(() => {
|
|
86
86
|
const n = () => {
|
|
87
|
-
|
|
87
|
+
I(window.innerWidth <= 1200);
|
|
88
88
|
};
|
|
89
89
|
return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
90
|
-
}, []), v && /* @__PURE__ */ e(
|
|
90
|
+
}, []), v && /* @__PURE__ */ e(E.Fragment, { children: v.items.filter((n) => n.url !== "#wpm-languages").map((n, m) => /* @__PURE__ */ u(E.Fragment, { children: [
|
|
91
91
|
/* @__PURE__ */ u(
|
|
92
92
|
d.Item,
|
|
93
93
|
{
|
|
@@ -95,84 +95,84 @@ const W = (r, s) => {
|
|
|
95
95
|
${o && o.ID === n.ID ? "selected" : ""}
|
|
96
96
|
${t === n.slug ? "active" : ""}`,
|
|
97
97
|
children: [
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
l && /* @__PURE__ */ e("a", { href: S(n.url, f), children: /* @__PURE__ */ e("div", { className: "mark", children: /* @__PURE__ */ e("span", { className: "sr-only", children: n.title }) }) }),
|
|
99
|
+
L ? n.child_items ? /* @__PURE__ */ e(
|
|
100
100
|
"span",
|
|
101
101
|
{
|
|
102
102
|
onClick: () => a(o === n ? null : n),
|
|
103
103
|
children: n.title
|
|
104
104
|
}
|
|
105
|
-
) : /* @__PURE__ */ e("a", { href:
|
|
105
|
+
) : /* @__PURE__ */ e("a", { href: S(n.url, f), children: n.title }) : n.child_items ? /* @__PURE__ */ e(
|
|
106
106
|
"span",
|
|
107
107
|
{
|
|
108
|
-
onMouseOver: (
|
|
108
|
+
onMouseOver: (s) => a(n),
|
|
109
109
|
onClick: () => a(o === n ? null : n),
|
|
110
110
|
children: n.title
|
|
111
111
|
}
|
|
112
112
|
) : /* @__PURE__ */ e(
|
|
113
113
|
"a",
|
|
114
114
|
{
|
|
115
|
-
onMouseOut: (
|
|
116
|
-
onMouseOver: (
|
|
117
|
-
href:
|
|
115
|
+
onMouseOut: (s) => a(null),
|
|
116
|
+
onMouseOver: (s) => a(n),
|
|
117
|
+
href: S(n.url, f),
|
|
118
118
|
children: n.title
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
]
|
|
122
122
|
}
|
|
123
123
|
),
|
|
124
|
-
|
|
124
|
+
k && o && o.ID === n.ID && o.child_items && /* @__PURE__ */ e(E.Fragment, { children: o.child_items.map((s) => /* @__PURE__ */ u(
|
|
125
125
|
d.Item,
|
|
126
126
|
{
|
|
127
|
-
className: `divided child-item ${t ===
|
|
127
|
+
className: `divided child-item ${t === s.slug ? "active" : ""}`,
|
|
128
128
|
children: [
|
|
129
129
|
/* @__PURE__ */ e("div", { className: "mark" }),
|
|
130
|
-
/* @__PURE__ */ e("a", { href:
|
|
130
|
+
/* @__PURE__ */ e("a", { href: S(s.url, f), children: s.title })
|
|
131
131
|
]
|
|
132
132
|
},
|
|
133
|
-
|
|
133
|
+
s.ID
|
|
134
134
|
)) })
|
|
135
135
|
] }, n.ID)) });
|
|
136
136
|
}
|
|
137
|
-
),
|
|
138
|
-
const [
|
|
139
|
-
|
|
137
|
+
), J = ({ intl: r, settings: l, logoSmallSrc: t = "/logo_small.png" }) => {
|
|
138
|
+
const [i, a] = g(), [o, f] = g(!1), [L, z] = g(!1), [v, w] = g(!1), [k, I] = g(!1), { slug: n } = y(), m = W(null), s = W(null), _ = () => {
|
|
139
|
+
I(!k), f(!o);
|
|
140
140
|
};
|
|
141
|
-
|
|
142
|
-
const c = (
|
|
143
|
-
(
|
|
144
|
-
},
|
|
145
|
-
|
|
141
|
+
p(() => {
|
|
142
|
+
const c = (h) => {
|
|
143
|
+
(m.current && !m.current.contains(h.target) && !s.current.contains(h.target) || h.target.closest(".desktop") || h.target.closest(".breadcrumbs")) && (f(!1), I(!1));
|
|
144
|
+
}, M = (h) => {
|
|
145
|
+
h.key === "Escape" && (f(!1), I(!1));
|
|
146
146
|
};
|
|
147
|
-
return document.addEventListener("mousedown", c), document.addEventListener("keydown",
|
|
148
|
-
document.removeEventListener("mousedown", c), document.removeEventListener("keydown",
|
|
147
|
+
return document.addEventListener("mousedown", c), document.addEventListener("keydown", M), () => {
|
|
148
|
+
document.removeEventListener("mousedown", c), document.removeEventListener("keydown", M);
|
|
149
149
|
};
|
|
150
|
-
}, []),
|
|
150
|
+
}, []), p(() => {
|
|
151
151
|
let c;
|
|
152
|
-
const
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
|
|
152
|
+
const M = () => {
|
|
153
|
+
const P = window.innerWidth <= 1200;
|
|
154
|
+
z(P), w(!1);
|
|
155
|
+
}, h = () => {
|
|
156
|
+
w(!0), clearTimeout(c), c = setTimeout(M, 300);
|
|
157
157
|
};
|
|
158
|
-
return
|
|
159
|
-
clearTimeout(c), window.removeEventListener("resize",
|
|
158
|
+
return M(), window.addEventListener("resize", h), () => {
|
|
159
|
+
clearTimeout(c), window.removeEventListener("resize", h);
|
|
160
160
|
};
|
|
161
161
|
}, []);
|
|
162
|
-
const [
|
|
163
|
-
|
|
162
|
+
const [x, D] = g(!1);
|
|
163
|
+
p(() => {
|
|
164
164
|
const c = () => {
|
|
165
|
-
|
|
165
|
+
D(window.innerWidth <= 1364);
|
|
166
166
|
};
|
|
167
167
|
return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
|
|
168
168
|
}, []);
|
|
169
|
-
const
|
|
170
|
-
return /* @__PURE__ */ e(
|
|
171
|
-
/* @__PURE__ */ u(
|
|
172
|
-
/* @__PURE__ */ e(
|
|
173
|
-
/* @__PURE__ */ e(d.Item, { children: /* @__PURE__ */ u("a", { href: `${
|
|
174
|
-
|
|
175
|
-
|
|
169
|
+
const C = ({ media: c }) => c ? /* @__PURE__ */ e(j, { src: c.guid.rendered }) : /* @__PURE__ */ e("img", { className: "brand logo", size: "large", src: "/logo_full.png" }), R = (l == null ? void 0 : l.landing_page_url) && l.landing_page_url !== !1 && l.landing_page_url !== void 0 && l.landing_page_url !== "", $ = R ? l.landing_page_url : `/${r.locale}`;
|
|
170
|
+
return /* @__PURE__ */ e(E.Fragment, { children: /* @__PURE__ */ u(A, { slug: "main", locale: r.locale, children: [
|
|
171
|
+
/* @__PURE__ */ u(N, { fluid: !0, className: "header", children: [
|
|
172
|
+
/* @__PURE__ */ e(N, { fluid: !0, className: "background", ref: m, children: /* @__PURE__ */ u(d, { className: "branding", text: !0, children: [
|
|
173
|
+
/* @__PURE__ */ e(d.Item, { children: /* @__PURE__ */ u("a", { href: `${$}`, target: R ? "_blank" : "_self", rel: "noopener noreferrer", id: "site_url", children: [
|
|
174
|
+
l.site_logo !== 0 && !x && /* @__PURE__ */ e(V, { id: l.site_logo, children: /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(C, {}, "logo") }) }),
|
|
175
|
+
l.site_logo === 0 && !x && /* @__PURE__ */ e(
|
|
176
176
|
"img",
|
|
177
177
|
{
|
|
178
178
|
className: "brand logo",
|
|
@@ -180,60 +180,60 @@ const W = (r, s) => {
|
|
|
180
180
|
src: "/logo_full.png"
|
|
181
181
|
}
|
|
182
182
|
),
|
|
183
|
-
|
|
183
|
+
x && /* @__PURE__ */ e(
|
|
184
184
|
"img",
|
|
185
185
|
{
|
|
186
186
|
className: "brand logo small",
|
|
187
187
|
size: "small",
|
|
188
|
-
src:
|
|
188
|
+
src: t
|
|
189
189
|
}
|
|
190
190
|
)
|
|
191
191
|
] }) }),
|
|
192
192
|
/* @__PURE__ */ e(d.Item, { className: "divider", children: /* @__PURE__ */ e("div", {}) }),
|
|
193
193
|
/* @__PURE__ */ u(d.Item, { fitted: !0, href: "/", children: [
|
|
194
|
-
/* @__PURE__ */ e(
|
|
195
|
-
/* @__PURE__ */ e("div", { className: "site name", children:
|
|
194
|
+
/* @__PURE__ */ e(U, { name: "za" }),
|
|
195
|
+
/* @__PURE__ */ e("div", { className: "site name", children: l.name })
|
|
196
196
|
] }),
|
|
197
|
-
!
|
|
198
|
-
|
|
197
|
+
!v && (L ? /* @__PURE__ */ e(d, { className: `pages ${o ? "show" : ""}`, children: /* @__PURE__ */ e(N, { fluid: !0, children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(
|
|
198
|
+
O,
|
|
199
199
|
{
|
|
200
|
-
settings:
|
|
201
|
-
active:
|
|
202
|
-
selected:
|
|
203
|
-
onSetSelected:
|
|
204
|
-
isSmallScreen:
|
|
200
|
+
settings: l,
|
|
201
|
+
active: n,
|
|
202
|
+
selected: i,
|
|
203
|
+
onSetSelected: a,
|
|
204
|
+
isSmallScreen: L
|
|
205
205
|
},
|
|
206
206
|
"items"
|
|
207
|
-
) }) }) }) : /* @__PURE__ */ e(d.Menu, { className: "pages", children: /* @__PURE__ */ e(
|
|
208
|
-
|
|
207
|
+
) }) }) }) : /* @__PURE__ */ e(d.Menu, { className: "pages", children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(
|
|
208
|
+
O,
|
|
209
209
|
{
|
|
210
|
-
settings:
|
|
211
|
-
active:
|
|
212
|
-
selected:
|
|
213
|
-
onSetSelected:
|
|
210
|
+
settings: l,
|
|
211
|
+
active: n,
|
|
212
|
+
selected: i,
|
|
213
|
+
onSetSelected: a
|
|
214
214
|
},
|
|
215
215
|
"items"
|
|
216
216
|
) }) })),
|
|
217
|
-
/* @__PURE__ */ e(d.Item, { children: /* @__PURE__ */ e(
|
|
218
|
-
|
|
217
|
+
/* @__PURE__ */ e(d.Item, { children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(
|
|
218
|
+
q,
|
|
219
219
|
{
|
|
220
220
|
locale: r.locale
|
|
221
221
|
},
|
|
222
222
|
"lang"
|
|
223
223
|
) }) }),
|
|
224
|
-
/* @__PURE__ */ e(d.Item, { fitted: !0, children: /* @__PURE__ */ e(
|
|
225
|
-
|
|
224
|
+
/* @__PURE__ */ e(d.Item, { fitted: !0, children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(
|
|
225
|
+
K,
|
|
226
226
|
{
|
|
227
|
-
onSetSelected:
|
|
228
|
-
settings:
|
|
227
|
+
onSetSelected: a,
|
|
228
|
+
settings: l
|
|
229
229
|
}
|
|
230
230
|
) }) }),
|
|
231
231
|
/* @__PURE__ */ u(
|
|
232
232
|
"div",
|
|
233
233
|
{
|
|
234
|
-
ref:
|
|
235
|
-
className: `hamburger-menu ${
|
|
236
|
-
onClick:
|
|
234
|
+
ref: s,
|
|
235
|
+
className: `hamburger-menu ${k ? "animate" : ""} ${o ? "open" : "close"}`,
|
|
236
|
+
onClick: _,
|
|
237
237
|
children: [
|
|
238
238
|
/* @__PURE__ */ e("div", {}),
|
|
239
239
|
/* @__PURE__ */ e("div", { className: "middle-line" }),
|
|
@@ -242,20 +242,20 @@ const W = (r, s) => {
|
|
|
242
242
|
}
|
|
243
243
|
)
|
|
244
244
|
] }) }),
|
|
245
|
-
/* @__PURE__ */ e(
|
|
246
|
-
|
|
245
|
+
/* @__PURE__ */ e(N, { fluid: !0, className: "child", children: i && i.child_items && /* @__PURE__ */ e(d, { fluid: !0, text: !0, children: /* @__PURE__ */ e(
|
|
246
|
+
O,
|
|
247
247
|
{
|
|
248
|
-
active:
|
|
248
|
+
active: n,
|
|
249
249
|
locale: r.locale,
|
|
250
250
|
withIcons: !0,
|
|
251
251
|
onSetSelected: (c) => null,
|
|
252
|
-
menu: { items:
|
|
252
|
+
menu: { items: i.child_items }
|
|
253
253
|
}
|
|
254
254
|
) }) })
|
|
255
255
|
] }, "header-container"),
|
|
256
|
-
/* @__PURE__ */ e(
|
|
256
|
+
/* @__PURE__ */ e(N, { className: "url breadcrumbs", children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(G, {}) }) })
|
|
257
257
|
] }) });
|
|
258
|
-
},
|
|
258
|
+
}, le = T(J);
|
|
259
259
|
export {
|
|
260
|
-
|
|
260
|
+
le as default
|
|
261
261
|
};
|
|
@@ -2,10 +2,12 @@ import { default as React } from 'react';
|
|
|
2
2
|
declare const _default: React.FC<import('react-intl').WithIntlProps<{
|
|
3
3
|
intl: any;
|
|
4
4
|
settings: any;
|
|
5
|
+
logoSmallSrc?: string | undefined;
|
|
5
6
|
}>> & {
|
|
6
7
|
WrappedComponent: React.ComponentType<{
|
|
7
8
|
intl: any;
|
|
8
9
|
settings: any;
|
|
10
|
+
logoSmallSrc?: string | undefined;
|
|
9
11
|
}>;
|
|
10
12
|
};
|
|
11
13
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devgateway/dvz-ui-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -20,8 +20,11 @@
|
|
|
20
20
|
"react-ui-library",
|
|
21
21
|
"react-ui-components"
|
|
22
22
|
],
|
|
23
|
-
"author": "
|
|
24
|
-
"
|
|
23
|
+
"author": "Sebastian Dimunzio <sdimunzio@gmail.com>",
|
|
24
|
+
"contributors": [
|
|
25
|
+
"Timothy Gachengo (https://github.com/timothygachengo)"
|
|
26
|
+
],
|
|
27
|
+
"license": "Apache-2.0",
|
|
25
28
|
"description": "A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.",
|
|
26
29
|
"repository": {
|
|
27
30
|
"type": "git",
|