AppInitiatedActionPage.js.map 5.1 KB

1
  1. {"version":3,"sources":["../../../src/app/content/aia-page/AppInitiatedActionPage.tsx"],"names":["React","withRouter","AIACommand","Msg","Title","TitleLevel","Button","EmptyState","EmptyStateVariant","EmptyStateIcon","EmptyStateBody","PassportIcon","KeycloakContext","ApplicationInitiatedActionPage","Component","constructor","props","keycloak","pageDef","kcAction","execute","render","full","h5","label","labelParams","handleClick","AppInitiatedActionPage"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAO,KAAKA,KAAZ;AACA,SAAQC,UAAR;AAEA,SAAQC,UAAR;AAEA,SAAQC,GAAR;AAEA,SACEC,KADF,EAEEC,UAFF,EAGEC,MAHF,EAIEC,UAJF,EAKEC,iBALF,EAMEC,cANF,EAOEC,cAPF;AASA,SAASC,YAAT;AAEA,SAASC,eAAT,oD,CAEA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA,MAAMC,8BAAN,SAA6Cb,KAAK,CAACc,SAAnD,CAA0F;AAE/EC,EAAAA,WAAW,CAACC,KAAD,EAAqC;AACnD,UAAMA,KAAN;;AADmD,yCAIhCC,QAAD,IAAqC;AACvD,UAAIf,UAAJ,CAAee,QAAf,EAAyB,KAAKD,KAAL,CAAWE,OAAX,CAAmBC,QAA5C,EAAsDC,OAAtD;AACH,KANsD;AAEtD;;AAMMC,EAAAA,MAAM,GAAoB;AAC7B,WACI,oBAAC,UAAD;AAAY,MAAA,OAAO,EAAEb,iBAAiB,CAACc;AAAvC,OACI,oBAAC,cAAD;AAAgB,MAAA,IAAI,EAAEX;AAAtB,MADJ,EAEI,oBAAC,KAAD;AAAO,MAAA,YAAY,EAAEN,UAAU,CAACkB,EAAhC;AAAoC,MAAA,IAAI,EAAC;AAAzC,OACE,oBAAC,GAAD;AAAK,MAAA,MAAM,EAAE,KAAKP,KAAL,CAAWE,OAAX,CAAmBM,KAAhC;AAAuC,MAAA,MAAM,EAAE,KAAKR,KAAL,CAAWE,OAAX,CAAmBO;AAAlE,MADF,CAFJ,EAKI,oBAAC,cAAD,QACE,oBAAC,GAAD;AAAK,MAAA,MAAM,EAAC;AAAZ,MADF,CALJ,EAQI,oBAAC,eAAD,CAAiB,QAAjB,QACER,QAAQ,IACN,oBAAC,MAAD;AAAQ,MAAA,OAAO,EAAC,SAAhB;AACQ,MAAA,OAAO,EAAE,MAAM,KAAKS,WAAL,CAAiBT,QAAjB,CADvB;AAEQ,MAAA,MAAM,EAAC;AAFf,OAEwB,oBAAC,GAAD;AAAK,MAAA,MAAM,EAAC;AAAZ,MAFxB,CAFJ,CARJ,CADJ;AAmBH;;AA9BqF;;AA+BzF,C,CAED;AACA;;AACA,OAAO,MAAMU,sBAAsB,GAAG1B,UAAU,CAACY,8BAAD,CAAzC","sourcesContent":["/*\n * Copyright 2019 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';\nimport {withRouter, RouteComponentProps} from 'react-router-dom';\n\nimport {AIACommand} from '../../util/AIACommand';\nimport {PageDef} from '../../ContentPages';\nimport {Msg} from '../../widgets/Msg';\n\nimport {\n Title,\n TitleLevel,\n Button,\n EmptyState,\n EmptyStateVariant,\n EmptyStateIcon,\n EmptyStateBody\n} from '@patternfly/react-core';\nimport { PassportIcon } from '@patternfly/react-icons';\nimport { KeycloakService } from '../../keycloak-service/keycloak.service';\nimport { KeycloakContext } from '../../keycloak-service/KeycloakContext';\n\n// Note: This class demonstrates two features of the ContentPages framework:\n// 1) The PageDef is available as a React property.\n// 2) You can add additional custom properties to the PageDef. In this case,\n// we add a value called kcAction in content.js and access it by extending the\n// PageDef interface.\ninterface ActionPageDef extends PageDef {\n kcAction: string;\n}\n\n// Extend RouteComponentProps to get access to router information such as\n// the hash-routed path associated with this page. See this.props.location.pathname\n// as used below.\ninterface AppInitiatedActionPageProps extends RouteComponentProps {\n pageDef: ActionPageDef;\n}\n\n/**\n * @author Stan Silvert\n */\nclass ApplicationInitiatedActionPage extends React.Component<AppInitiatedActionPageProps> {\n\n public constructor(props: AppInitiatedActionPageProps) {\n super(props);\n }\n\n private handleClick = (keycloak: KeycloakService): void => {\n new AIACommand(keycloak, this.props.pageDef.kcAction).execute();\n }\n\n public render(): React.ReactNode {\n return (\n <EmptyState variant={EmptyStateVariant.full}>\n <EmptyStateIcon icon={PassportIcon} />\n <Title headingLevel={TitleLevel.h5} size=\"lg\">\n <Msg msgKey={this.props.pageDef.label} params={this.props.pageDef.labelParams}/>\n </Title>\n <EmptyStateBody>\n <Msg msgKey=\"actionRequiresIDP\"/>\n </EmptyStateBody>\n <KeycloakContext.Consumer>\n { keycloak => (\n <Button variant=\"primary\"\n onClick={() => this.handleClick(keycloak!)}\n target=\"_blank\"><Msg msgKey=\"continue\"/></Button>\n )}\n </KeycloakContext.Consumer>\n \n </EmptyState>\n );\n }\n};\n\n// Note that the class name is not exported above. To get access to the router,\n// we use withRouter() and export a different name.\nexport const AppInitiatedActionPage = withRouter(ApplicationInitiatedActionPage);"],"file":"AppInitiatedActionPage.js"}