App.js.map 4.3 KB

1
  1. {"version":3,"sources":["../src/app/App.tsx"],"names":["React","PageNav","PageToolbar","makeRoutes","Brand","Page","PageHeader","PageSection","PageSidebar","KeycloakContext","App","Component","constructor","props","context","toggleReact","render","authenticated","isWelcomePage","login","username","marginLeft","loggedInUserName","Header","brandUrl","brandImg","Sidebar","height"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAO,KAAKA,KAAZ;AAIA,SAAQC,OAAR;AACA,SAAQC,WAAR;AACA,SAAQC,UAAR;AAEA,SACIC,KADJ,EAEIC,IAFJ,EAGIC,UAHJ,EAIIC,WAJJ,EAKIC,WALJ;AAQA,SAASC,eAAT;AAS4B;AAC5B,OAAO,MAAMC,GAAN,SAAkBV,KAAK,CAACW,SAAxB,CAA4C;AAIxCC,EAAAA,WAAW,CAACC,KAAD,EAAkBC,OAAlB,EAAsE;AACpF,UAAMD,KAAN;;AADoF;;AAEpF,SAAKC,OAAL,GAAeA,OAAf;AACAC,IAAAA,WAAW;AACd;;AAEMC,EAAAA,MAAM,GAAoB;AAC7BD,IAAAA,WAAW,GADkB,CAG7B;;AACA,QAAI,CAAC,KAAKD,OAAL,CAAcG,aAAd,EAAD,IAAkC,CAACC,aAAa,EAApD,EAAwD;AACpD,WAAKJ,OAAL,CAAcK,KAAd;AACH;;AAED,UAAMC,QAAQ,GACV;AAAM,MAAA,KAAK,EAAE;AAACC,QAAAA,UAAU,EAAE;AAAb,OAAb;AAAmC,MAAA,EAAE,EAAC;AAAtC,OAAsDC,gBAAgB,EAAtE,CADJ;AAGA,UAAMC,MAAM,GACR,oBAAC,UAAD;AACI,MAAA,IAAI,EAAE;AAAG,QAAA,EAAE,EAAC,WAAN;AAAkB,QAAA,IAAI,EAAEC;AAAxB,SAAkC,oBAAC,KAAD;AAAO,QAAA,GAAG,EAAEC,QAAZ;AAAsB,QAAA,GAAG,EAAC,MAA1B;AAAiC,QAAA,SAAS,EAAC;AAA3C,QAAlC,CADV;AAEI,MAAA,OAAO,EAAE,oBAAC,WAAD,OAFb;AAGI,MAAA,MAAM,EAAEL,QAHZ;AAII,MAAA,aAAa;AAJjB,MADJ;AASA,UAAMM,OAAO,GAAG,oBAAC,WAAD;AAAa,MAAA,GAAG,EAAE,oBAAC,OAAD;AAAlB,MAAhB;AAEA,WACI;AAAM,MAAA,KAAK,EAAE;AAAEC,QAAAA,MAAM,EAAE;AAAV;AAAb,OACI,oBAAC,IAAD;AAAM,MAAA,MAAM,EAAEJ,MAAd;AAAsB,MAAA,OAAO,EAAEG,OAA/B;AAAwC,MAAA,gBAAgB;AAAxD,OACI,oBAAC,WAAD,QACKvB,UAAU,EADf,CADJ,CADJ,CADJ;AASH;;AAzC8C;;gBAAtCO,G,iBACYD,e;;AAyCxB","sourcesContent":["/*\n * Copyright 2018 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as React from 'react';\n\nimport {KeycloakService} from './keycloak-service/keycloak.service';\n\nimport {PageNav} from './PageNav';\nimport {PageToolbar} from './PageToolbar';\nimport {makeRoutes} from './ContentPages';\n\nimport {\n Brand,\n Page,\n PageHeader,\n PageSection,\n PageSidebar,\n} from '@patternfly/react-core';\n\nimport { KeycloakContext } from './keycloak-service/KeycloakContext';\n\ndeclare function toggleReact(): void;\ndeclare function isWelcomePage(): boolean;\ndeclare function loggedInUserName(): string;\n\ndeclare const brandImg: string;\ndeclare const brandUrl: string;\n\nexport interface AppProps {};\nexport class App extends React.Component<AppProps> {\n static contextType = KeycloakContext;\n context: React.ContextType<typeof KeycloakContext>;\n\n public constructor(props: AppProps, context: React.ContextType<typeof KeycloakContext>) {\n super(props);\n this.context = context;\n toggleReact();\n }\n\n public render(): React.ReactNode {\n toggleReact();\n\n // check login\n if (!this.context!.authenticated() && !isWelcomePage()) {\n this.context!.login();\n }\n\n const username = (\n <span style={{marginLeft: '10px'}} id=\"loggedInUser\">{loggedInUserName()}</span>\n );\n const Header = (\n <PageHeader\n logo={<a id=\"brandLink\" href={brandUrl}><Brand src={brandImg} alt=\"Logo\" className=\"brand\"/></a>}\n toolbar={<PageToolbar/>}\n avatar={username}\n showNavToggle\n />\n );\n\n const Sidebar = <PageSidebar nav={<PageNav/>} />;\n\n return (\n <span style={{ height: '100%'}}>\n <Page header={Header} sidebar={Sidebar} isManagedSidebar>\n <PageSection>\n {makeRoutes()}\n </PageSection>\n </Page>\n </span>\n );\n }\n};"],"file":"App.js"}