theme.keycloak.v2.account.resources.content.applications-page.ApplicationsPage.js.map Maven / Gradle / Ivy
{"version":3,"file":"ApplicationsPage.js","names":["React","DataList","DataListItem","DataListItemRow","DataListCell","DataListToggle","DataListContent","DataListItemCells","DescriptionList","DescriptionListTerm","DescriptionListGroup","DescriptionListDescription","Grid","GridItem","Button","PageSection","PageSectionVariants","Stack","InfoAltIcon","CheckIcon","ExternalLinkAltIcon","ContentPage","ContinueCancelModal","AccountServiceContext","Msg","ApplicationsPage","Component","constructor","props","context","_defineProperty","clientId","doDelete","encodeURIComponent","then","fetchApplications","row","newIsRowOpen","state","isRowOpen","setState","applications","doGet","response","data","Array","length","fill","elementId","item","application","render","createElement","title","localize","introMessage","isFilled","variant","light","hasGutter","id","style","visibility","height","isExpanded","dataListCells","key","width","className","msgKey","map","appIndex","onClick","onToggle","component","window","open","effectiveUrl","clientName","userConsentRequired","offlineAccess","inUse","hasNoPadding","isHidden","description","split","consent","Fragment","grantedScopes","scope","scopeIndex","name","tosUri","policyUri","logoUri","src","Intl","DateTimeFormat","locale","year","month","day","hour","minute","second","format","createDate","buttonTitle","buttonVariant","modalTitle","modalMessage","modalContinueButtonLabel","onContinue","removeConsent"],"sources":["../../../src/app/content/applications-page/ApplicationsPage.tsx"],"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 {\n DataList,\n DataListItem,\n DataListItemRow,\n DataListCell,\n DataListToggle,\n DataListContent,\n DataListItemCells,\n DescriptionList,\n DescriptionListTerm,\n DescriptionListGroup,\n DescriptionListDescription,\n Grid,\n GridItem,\n Button,\n PageSection,\n PageSectionVariants,\n Stack,\n StackItem,\n SplitItem,\n Split,\n TextContent\n} from '@patternfly/react-core';\n\nimport { InfoAltIcon, CheckIcon, ExternalLinkAltIcon } from '@patternfly/react-icons';\nimport { ContentPage } from '../ContentPage';\nimport { ContinueCancelModal } from '../../widgets/ContinueCancelModal';\nimport { HttpResponse } from '../../account-service/account.service';\nimport { AccountServiceContext } from '../../account-service/AccountServiceContext';\nimport { Msg } from '../../widgets/Msg';\n\ndeclare const locale: string;\n\nexport interface ApplicationsPageProps {\n}\n\nexport interface ApplicationsPageState {\n isRowOpen: boolean[];\n applications: Application[];\n}\n\nexport interface GrantedScope {\n displayTest: string;\n id: string;\n name: string;\n}\n\nexport interface Consent {\n createDate: number;\n grantedScopes: GrantedScope[];\n lastUpdatedDate: number;\n}\n\ninterface Application {\n effectiveUrl: string;\n clientId: string;\n clientName: string;\n consent: Consent;\n description: string;\n inUse: boolean;\n offlineAccess: boolean;\n userConsentRequired: boolean;\n scope: string[];\n logoUri: string;\n policyUri: string;\n tosUri: string;\n}\n\nexport class ApplicationsPage extends React.Component {\n static contextType = AccountServiceContext;\n context: React.ContextType;\n\n public constructor(props: ApplicationsPageProps, context: React.ContextType) {\n super(props);\n this.context = context;\n this.state = {\n isRowOpen: [],\n applications: []\n };\n\n this.fetchApplications();\n }\n\n private removeConsent = (clientId: string) => {\n this.context!.doDelete(\"/applications/\" + encodeURIComponent(clientId) + \"/consent\")\n .then(() => {\n this.fetchApplications();\n });\n }\n\n private onToggle = (row: number): void => {\n const newIsRowOpen: boolean[] = this.state.isRowOpen;\n newIsRowOpen[row] = !newIsRowOpen[row];\n this.setState({ isRowOpen: newIsRowOpen });\n };\n\n private fetchApplications(): void {\n this.context!.doGet(\"/applications\")\n .then((response: HttpResponse) => {\n const applications = response.data || [];\n this.setState({\n isRowOpen: new Array(applications.length).fill(false),\n applications: applications\n });\n });\n }\n\n private elementId(item: string, application: Application): string {\n return `application-${item}-${application.clientId}`;\n }\n\n public render(): React.ReactNode {\n return (\n \n \n\n \n \n \n \n \n );\n }\n};\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK;AAEjB,SACEC,QAAQ,EACRC,YAAY,EACZC,eAAe,EACfC,YAAY,EACZC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,eAAe,EACfC,mBAAmB,EACnBC,oBAAoB,EACpBC,0BAA0B,EAC1BC,IAAI,EACJC,QAAQ,EACRC,MAAM,EACNC,WAAW,EACXC,mBAAmB,EACnBC,KAAK;AAOP,SAASC,WAAW,EAAEC,SAAS,EAAEC,mBAAmB;AACpD,SAASC,WAAW;AACpB,SAASC,mBAAmB;AAE5B,SAASC,qBAAqB;AAC9B,SAASC,GAAG;AAuCZ,OAAO,MAAMC,gBAAgB,SAASzB,KAAK,CAAC0B,SAAS,CAA+C;EAI3FC,WAAWA,CAACC,KAA4B,EAAEC,OAAwD,EAAE;IACzG,KAAK,CAACD,KAAK,CAAC;IAACE,eAAA;IAAAA,eAAA,wBAUUC,QAAgB,IAAK;MAC5C,IAAI,CAACF,OAAO,CAAEG,QAAQ,CAAC,gBAAgB,GAAGC,kBAAkB,CAACF,QAAQ,CAAC,GAAG,UAAU,CAAC,CACjFG,IAAI,CAAC,MAAM;QACV,IAAI,CAACC,iBAAiB,CAAC,CAAC;MAC1B,CAAC,CAAC;IACN,CAAC;IAAAL,eAAA,mBAEmBM,GAAW,IAAW;MACxC,MAAMC,YAAuB,GAAG,IAAI,CAACC,KAAK,CAACC,SAAS;MACpDF,YAAY,CAACD,GAAG,CAAC,GAAG,CAACC,YAAY,CAACD,GAAG,CAAC;MACtC,IAAI,CAACI,QAAQ,CAAC;QAAED,SAAS,EAAEF;MAAa,CAAC,CAAC;IAC5C,CAAC;IApBC,IAAI,CAACR,OAAO,GAAGA,OAAO;IACtB,IAAI,CAAC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