All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.account.resources.content.my-resources-page.SharedResourcesTable.js.map Maven / Gradle / Ivy

There is a newer version: 26.0.5
Show newest version
{"version":3,"file":"SharedResourcesTable.js","names":["React","DataList","DataListItem","DataListItemRow","DataListCell","DataListItemCells","ChipGroup","Chip","RepositoryIcon","Msg","AbstractResourcesTable","EmptyMessageState","SharedResourcesTable","constructor","props","state","permissions","Map","render","resources","data","length","createElement","icon","messageKey","localize","id","key","dataListCells","width","msgKey","map","resource","row","name","href","client","baseUrl","getClientName","scopes","categoryName","scope","isReadOnly","displayName","shareRequests"],"sources":["../../../src/app/content/my-resources-page/SharedResourcesTable.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    DataListItemCells,\n    ChipGroup,\n    Chip\n  } from '@patternfly/react-core';\nimport { RepositoryIcon } from '@patternfly/react-icons';\n\n\nimport { PaginatedResources, Resource, Scope } from \"./resource-model\";\nimport { Msg } from '../../widgets/Msg';\nimport { AbstractResourcesTable, ResourcesTableState } from './AbstractResourceTable';\nimport EmptyMessageState from '../../widgets/EmptyMessageState';\n\nexport interface ResourcesTableProps {\n    resources: PaginatedResources;\n    noResourcesMessage: string;\n}\n\nexport class SharedResourcesTable extends AbstractResourcesTable {\n\n    public constructor(props: ResourcesTableProps) {\n        super(props);\n        this.state = {\n            permissions: new Map()\n        }\n    }\n\n    public render(): React.ReactNode {\n        if (this.props.resources.data.length === 0) {\n            return (\n                \n            );\n        }\n        return (\n            \n                \n                    \n                        \n                                    \n                                ,\n                                \n                                    \n                                ,\n                                ,\n                                ,\n                            ]}\n                        />\n                    \n                \n                {this.props.resources.data.map((resource: Resource, row: number) => (\n                    \n                        \n                            \n                                        \n                                    ,\n                                    \n                                        {this.getClientName(resource.client)}\n                                    ,\n                                    \n                                        { resource.scopes.length > 0 &&\n                                        \n                                            {\n                                                resource.scopes.map(scope => (\n                                                    \n                                                        {scope.displayName || scope.name}\n                                                    \n                                                ))\n                                            }\n                                        }\n                                    ,\n                                    \n                                        {resource.shareRequests.length > 0 &&\n                                        \n                                            {\n                                                (resource.shareRequests[0].scopes as Scope[]).map(scope => (\n                                                    \n                                                        {scope.displayName || scope.name}\n                                                    \n                                                ))\n                                            }\n                                        \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,SACIC,QAAQ,EACRC,YAAY,EACZC,eAAe,EACfC,YAAY,EACZC,iBAAiB,EACjBC,SAAS,EACTC,IAAI;AAER,SAASC,cAAc;AAIvB,SAASC,GAAG;AACZ,SAASC,sBAAsB;AAC/B,OAAOC,iBAAiB;AAOxB,OAAO,MAAMC,oBAAoB,SAASF,sBAAsB,CAAsB;EAE3EG,WAAWA,CAACC,KAA0B,EAAE;IAC3C,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACC,KAAK,GAAG;MACTC,WAAW,EAAE,IAAIC,GAAG,CAAC;IACzB,CAAC;EACL;EAEOC,MAAMA,CAAA,EAAoB;IAC7B,IAAI,IAAI,CAACJ,KAAK,CAACK,SAAS,CAACC,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;MACxC,oBACIrB,KAAA,CAAAsB,aAAA,CAACX,iBAAiB;QAACY,IAAI,E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