-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-about-categories-js-9f018b06635740e34032.js
2 lines (2 loc) · 7.41 KB
/
component---src-pages-about-categories-js-9f018b06635740e34032.js
1
2
"use strict";(self.webpackChunkopenousd=self.webpackChunkopenousd||[]).push([[773],{79312:function(e,t,n){var a=n(8580),r=n(1022);t.Z=void 0;var o=r(n(67294)),l=(0,a(n(58786)).default)(o.createElement("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt");t.Z=l},563:function(e,t,n){var a,r=n(54038),o=n(81531),l=n(80732),c=n.n(l),i=n(67294),s=n(47942),u=n(20949),m=n(49059),d=["className","children"],E=((a={})[s.d0]="show",a[s.cn]="show",a),f=i.forwardRef((function(e,t){var n=e.className,a=e.children,l=(0,o.Z)(e,d),f=(0,i.useCallback)((function(e){(0,m.Z)(e),l.onEnter&&l.onEnter(e)}),[l]);return i.createElement(s.ZP,(0,r.Z)({ref:t,addEndListener:u.Z},l,{onEnter:f}),(function(e,t){return i.cloneElement(a,(0,r.Z)({},t,{className:c()("fade",n,a.props.className,E[e])}))}))}));f.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},f.displayName="Fade",t.Z=f},92949:function(e,t,n){n.r(t),n.d(t,{default:function(){return H}});var a=n(67294),r=n(55750),o=n(25513),l=n(45777),c=n(8120),i=function(e){var t=(0,o.Ch)(e,{activeKey:"onSelect"}),n=t.id,r=t.generateChildId,i=t.onSelect,s=t.activeKey,u=t.transition,m=t.mountOnEnter,d=t.unmountOnExit,E=t.children,f=(0,a.useMemo)((function(){return r||function(e,t){return n?n+"-"+t+"-"+e:null}}),[n,r]),v=(0,a.useMemo)((function(){return{onSelect:i,activeKey:s,transition:u,mountOnEnter:m||!1,unmountOnExit:d||!1,getControlledId:function(e){return f(e,"tabpane")},getControllerId:function(e){return f(e,"tab")}}}),[i,s,u,m,d,f]);return a.createElement(l.Z.Provider,{value:v},a.createElement(c.Z.Provider,{value:i||null},E))},s=n(54038),u=n(81531),m=n(80732),d=n.n(m),E=n(99541),f=["bsPrefix","as","className"],v=a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.as,o=void 0===r?"div":r,l=e.className,c=(0,u.Z)(e,f),i=(0,E.vE)(n,"tab-content");return a.createElement(o,(0,s.Z)({ref:t},c,{className:d()(l,i)}))})),g=n(563),p=["activeKey","getControlledId","getControllerId"],b=["bsPrefix","className","active","onEnter","onEntering","onEntered","onExit","onExiting","onExited","mountOnEnter","unmountOnExit","transition","as","eventKey"];var Z=a.forwardRef((function(e,t){var n=function(e){var t=(0,a.useContext)(l.Z);if(!t)return e;var n=t.activeKey,r=t.getControlledId,o=t.getControllerId,i=(0,u.Z)(t,p),m=!1!==e.transition&&!1!==i.transition,d=(0,c.h)(e.eventKey);return(0,s.Z)({},e,{active:null==e.active&&null!=d?(0,c.h)(n)===d:e.active,id:r(e.eventKey),"aria-labelledby":o(e.eventKey),transition:m&&(e.transition||i.transition||g.Z),mountOnEnter:null!=e.mountOnEnter?e.mountOnEnter:i.mountOnEnter,unmountOnExit:null!=e.unmountOnExit?e.unmountOnExit:i.unmountOnExit})}(e),r=n.bsPrefix,o=n.className,i=n.active,m=n.onEnter,f=n.onEntering,v=n.onEntered,Z=n.onExit,h=n.onExiting,x=n.onExited,y=n.mountOnEnter,C=n.unmountOnExit,N=n.transition,O=n.as,P=void 0===O?"div":O,K=(n.eventKey,(0,u.Z)(n,b)),I=(0,E.vE)(r,"tab-pane");if(!i&&!N&&C)return null;var k=a.createElement(P,(0,s.Z)({},K,{ref:t,role:"tabpanel","aria-hidden":!i,className:d()(o,I,{active:i})}));return N&&(k=a.createElement(N,{in:i,onEnter:m,onEntering:f,onEntered:v,onExit:Z,onExiting:h,onExited:x,mountOnEnter:y,unmountOnExit:C},k)),a.createElement(l.Z.Provider,{value:null},a.createElement(c.Z.Provider,{value:null},k))}));Z.displayName="TabPane";var h=Z,x=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.Z)(t,e),t.prototype.render=function(){throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")},t}(a.Component);x.Container=i,x.Content=v,x.Pane=h;var y=x,C=n(33639),N=n(20994),O=n(7408),P=n(46594),K=n(28022),I=n(65761),k=n(43318),w=n(64609),F=n(14632),S=n(47404),T=n(79312),j=w.ol.SearchBar,L=w.ol.ClearSearchButton,R=w.ZZ.ExportCSVButton,z=function(e,t){return"asc"===e?a.createElement(S.Z,{className:"text-dark"}):"desc"===e?a.createElement(F.Z,{className:"text-dark"}):a.createElement(F.Z,{className:"invisible"})},B=function(e){var t=e.data,n=e.colName,r=e.tableInfo,o=r.columns.find((function(e){return"category"===e.dataFieldName})).displayName,l=function(e){var t=e.firstColName,n=e.categoryColName;return[{dataField:"name",sortCaret:z,text:t,headerFormatter:function(e,n,r){return a.createElement("div",{className:"table-header"},t," ",r.sortElement)},sort:!0,searchable:!0},{dataField:"category",text:n,headerFormatter:function(e,t,r){return a.createElement("div",{className:"table-header text-left"},n," ",r.sortElement)},sortCaret:z,sort:!0,align:"left",searchable:!0}]}({firstColName:n,categoryColName:o});return a.createElement(w.ZP,{keyField:"code",data:t,columns:l,exportCSV:{fileName:"openousd-"+n+"-categories.csv"},bootstrap4:!0,search:!0},(function(e){return a.createElement("div",null,a.createElement(j,Object.assign({},e.searchProps,{placeholder:r.labels.searchLabel+" "+n.toLowerCase(),className:"table-search-bar my-3"})),a.createElement(L,Object.assign({},e.searchProps,{className:"clear-btn"})),a.createElement(k.Z,Object.assign({classes:"",bordered:!1},e.baseProps,{defaultSorted:[{dataField:"category",order:"asc"}]})),a.createElement("div",null,a.createElement(R,Object.assign({},e.csvProps,{className:"btn-link download"}),a.createElement(T.Z,null),r.labels.downloadDataLabel)))}))};B.defaultProps={data:[]};var M=B,V=n(18158),A=n(36179),D=n(36092),H=function(e){var t=e.data,n=e.pageContext,r=(0,a.useState)("funding-sources"),o=r[0],l=r[1],c=t.allCentralProgramsJson,i=t.allCentralProgramsResourcesJson,s=t.contentfulPage,u=(0,D.PU)(n.language),m=c.nodes.map((function(e){return Object.assign({},e,{category:u(e.category)})})),d=i.nodes.map((function(e){return Object.assign({},e,{category:u(e.category)})})),E=s.content,f=E.introText,v=E.categoryDescriptions,g=E.categoriesTable,p=function(e){return v.find((function(t){return t.blockId===e}))},b=p("funding-sources"),Z=p("program-expenses"),h=function(e){return g.columns.find((function(t){return t.dataFieldName===e}))},x=h("resourceId"),k=h("name");return a.createElement(V.Z,{pageClassName:"about-categories-page"},a.createElement(A.Z,{title:s.title}),a.createElement(C.Z,null,a.createElement("h1",null,s.title),a.createElement(N.Z,null,a.createElement(O.Z,{md:8},a.createElement("div",null,a.createElement("div",null,(0,I.Z)(f))))),a.createElement(K.Z,null,a.createElement(P.Z,{size:"lg",onClick:function(){return l("funding-sources")},active:"funding-sources"===o},b.heading),a.createElement(P.Z,{size:"lg",onClick:function(){return l("program-expenses")},active:"program-expenses"===o},Z.heading)),a.createElement(y.Container,{defaultActiveKey:"funding-sources",activeKey:o,id:"categories-tabs"},a.createElement(y.Content,null,a.createElement(y.Pane,{eventKey:"funding-sources"},a.createElement(N.Z,null,a.createElement(O.Z,{md:8},a.createElement("div",{className:"description"},a.createElement("div",null,(0,I.Z)(b.content))))),a.createElement(N.Z,null,a.createElement(O.Z,{lg:8},a.createElement(M,{data:d,colName:x.displayName,tableInfo:g})))),a.createElement(y.Pane,{eventKey:"program-expenses"},a.createElement(N.Z,null,a.createElement(O.Z,{md:8},a.createElement("div",{className:"description"},a.createElement("div",null,(0,I.Z)(Z.content))))),a.createElement(N.Z,null,a.createElement(O.Z,{lg:6},a.createElement(M,{data:m,colName:k.displayName,tableInfo:g}))))))))}}}]);
//# sourceMappingURL=component---src-pages-about-categories-js-9f018b06635740e34032.js.map