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AAA,YDhC3DhD,EAAAA,EAAAA,IAAeyB,EAAcC,IAAcG,QAAwB2B,IAAZ3B,MADfH,IAAAA,GCmCxC+B,EAAAA,EAAAA,YAAU,KACRF,GAAgBf,GAASQ,EAAAA,EAAAA,SACxB,KAGQX,EAAmBzK,IAC9B,MAAM4K,GAAWC,EAAAA,EAAAA,eACX3L,GAAS0G,EAAAA,EAAAA,cAAaC,GAAmC4C,EAAW5C,EAAO7F,KAE3E8L,IADiBlG,EAAAA,EAAAA,aAAYoE,EAAuBsB,EAAAA,GAAAA,cACrBpM,IAAWA,EAAO6M,SAEvDF,EAAAA,EAAAA,YAAU,KACRC,GAAelB,GAASU,EAAAA,EAAAA,IAAatL,MACpC,CAACd,KAGO+G,EAAiB,KAC5B,MAAM2E,GAAWC,EAAAA,EAAAA,eAGjB,MAAO,CACLhJ,aAHkB+D,EAAAA,EAAAA,aAAY0C,GAI9BtC,eAAiBgG,GAA6BpB,GAAS5E,EAAAA,EAAAA,IAAegG","sources":["webpack://grafana/./public/app/features/plugins/admin/components/Badges/PluginDisabledBadge.tsx","webpack://grafana/./public/app/features/plugins/admin/components/Badges/sharedStyles.ts","webpack://grafana/./public/app/features/plugins/admin/components/Badges/PluginInstallBadge.tsx","webpack://grafana/./public/app/features/plugins/admin/components/Badges/PluginEnterpriseBadge.tsx","webpack://grafana/./public/app/features/plugins/admin/components/Badges/PluginUpdateAvailableBadge.tsx","webpack://grafana/./public/app/features/plugins/admin/components/PluginLogo.tsx","webpack://grafana/./public/app/features/plugins/admin/components/HorizontalGroup.tsx","webpack://grafana/./public/app/features/plugins/admin/components/PluginListItemBadges.tsx","webpack://grafana/./public/app/features/plugins/admin/components/PluginListItem.tsx","webpack://grafana/./public/app/features/plugins/admin/components/PluginList.tsx","webpack://grafana/./public/app/features/plugins/admin/components/SearchField.tsx","webpack://grafana/./public/app/features/plugins/admin/pages/Browse.tsx","webpack://grafana/./public/app/features/plugins/admin/hooks/useHistory.tsx","webpack://grafana/./public/app/features/plugins/admin/state/selectors.ts","webpack://grafana/./public/app/features/plugins/admin/state/hooks.ts"],"sourcesContent":["import React from 'react';\n\nimport { PluginErrorCode } from '@grafana/data';\nimport { Badge } from '@grafana/ui';\n\ntype Props = { error?: PluginErrorCode };\n\nexport function PluginDisabledBadge({ error }: Props): React.ReactElement {\n const tooltip = errorCodeToTooltip(error);\n return <Badge icon=\"exclamation-triangle\" text=\"Disabled\" color=\"red\" tooltip={tooltip} />;\n}\n\nfunction errorCodeToTooltip(error?: PluginErrorCode): string | undefined {\n switch (error) {\n case PluginErrorCode.modifiedSignature:\n return 'Plugin disabled due to modified content';\n case PluginErrorCode.invalidSignature:\n return 'Plugin disabled due to invalid plugin signature';\n case PluginErrorCode.missingSignature:\n return 'Plugin disabled due to missing plugin signature';\n default:\n return `Plugin disabled due to unkown error: ${error}`;\n }\n}\n","import { css } from '@emotion/css';\n\nimport { GrafanaTheme2 } from '@grafana/data';\n\nexport const getBadgeColor = (theme: GrafanaTheme2) => css`\n background: ${theme.colors.background.primary};\n border-color: ${theme.colors.border.strong};\n color: ${theme.colors.text.secondary};\n`;\n","import React from 'react';\n\nimport { Badge, useStyles2 } from '@grafana/ui';\n\nimport { getBadgeColor } from './sharedStyles';\n\nexport function PluginInstalledBadge(): React.ReactElement {\n const customBadgeStyles = useStyles2(getBadgeColor);\n return <Badge text=\"Installed\" color=\"orange\" className={customBadgeStyles} />;\n}\n","import React from 'react';\n\nimport { featureEnabled } from '@grafana/runtime';\nimport { Badge, Button, HorizontalGroup, PluginSignatureBadge, useStyles2 } from '@grafana/ui';\n\nimport { CatalogPlugin } from '../../types';\n\nimport { getBadgeColor } from './sharedStyles';\n\ntype Props = { plugin: CatalogPlugin };\n\nexport function PluginEnterpriseBadge({ plugin }: Props): React.ReactElement {\n const customBadgeStyles = useStyles2(getBadgeColor);\n const onClick = (ev: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n ev.preventDefault();\n window.open(\n `https://grafana.com/grafana/plugins/${plugin.id}?utm_source=grafana_catalog_learn_more`,\n '_blank',\n 'noopener,noreferrer'\n );\n };\n\n if (featureEnabled('enterprise.plugins')) {\n return <Badge text=\"Enterprise\" color=\"blue\" />;\n }\n\n return (\n <HorizontalGroup>\n <PluginSignatureBadge status={plugin.signature} />\n <Badge icon=\"lock\" aria-label=\"lock icon\" text=\"Enterprise\" color=\"blue\" className={customBadgeStyles} />\n <Button size=\"sm\" fill=\"text\" icon=\"external-link-alt\" onClick={onClick}>\n Learn more\n </Button>\n </HorizontalGroup>\n );\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2, PluginType } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\n\nimport { CatalogPlugin } from '../../types';\n\ntype Props = {\n plugin: CatalogPlugin;\n};\n\nexport function PluginUpdateAvailableBadge({ plugin }: Props): React.ReactElement | null {\n const styles = useStyles2(getStyles);\n\n // Currently renderer plugins are not supported by the catalog due to complications related to installation / update / uninstall.\n if (plugin.hasUpdate && !plugin.isCore && plugin.type !== PluginType.renderer) {\n return <p className={styles.hasUpdate}>Update available!</p>;\n }\n\n return null;\n}\n\nexport const getStyles = (theme: GrafanaTheme2) => {\n return {\n hasUpdate: css`\n color: ${theme.colors.text.secondary};\n font-size: ${theme.typography.bodySmall.fontSize};\n margin-bottom: 0;\n `,\n };\n};\n","import React from 'react';\n\ntype PluginLogoProps = {\n alt: string;\n className?: string;\n src: string;\n height?: string | number;\n};\n\nexport function PluginLogo({ alt, className, src, height }: PluginLogoProps): React.ReactElement {\n // @ts-ignore - react doesn't know about loading attr.\n return <img src={src} className={className} alt={alt} loading=\"lazy\" height={height} />;\n}\n","import { css, cx } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useTheme2 } from '@grafana/ui';\n\ninterface HorizontalGroupProps {\n children: React.ReactNode;\n wrap?: boolean;\n className?: string;\n}\n\nexport const HorizontalGroup = ({ children, wrap, className }: HorizontalGroupProps) => {\n const theme = useTheme2();\n const styles = getStyles(theme, wrap);\n\n return <div className={cx(styles.container, className)}>{children}</div>;\n};\n\nconst getStyles = (theme: GrafanaTheme2, wrap?: boolean) => ({\n container: css`\n display: flex;\n flex-direction: row;\n flex-wrap: ${wrap ? 'wrap' : 'no-wrap'};\n & > * {\n margin-bottom: ${theme.spacing()};\n margin-right: ${theme.spacing()};\n }\n & > *:last-child {\n margin-right: 0;\n }\n `,\n});\n","import React from 'react';\n\nimport { HorizontalGroup, PluginSignatureBadge } from '@grafana/ui';\n\nimport { CatalogPlugin } from '../types';\n\nimport { PluginEnterpriseBadge, PluginDisabledBadge, PluginInstalledBadge, PluginUpdateAvailableBadge } from './Badges';\n\ntype PluginBadgeType = {\n plugin: CatalogPlugin;\n};\n\nexport function PluginListItemBadges({ plugin }: PluginBadgeType) {\n if (plugin.isEnterprise) {\n return (\n <HorizontalGroup height=\"auto\" wrap>\n <PluginEnterpriseBadge plugin={plugin} />\n {plugin.isDisabled && <PluginDisabledBadge error={plugin.error} />}\n <PluginUpdateAvailableBadge plugin={plugin} />\n </HorizontalGroup>\n );\n }\n\n return (\n <HorizontalGroup height=\"auto\" wrap>\n <PluginSignatureBadge status={plugin.signature} />\n {plugin.isDisabled && <PluginDisabledBadge error={plugin.error} />}\n {plugin.isInstalled && <PluginInstalledBadge />}\n <PluginUpdateAvailableBadge plugin={plugin} />\n </HorizontalGroup>\n );\n}\n","import { css, cx } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Icon, useStyles2 } from '@grafana/ui';\n\nimport { CatalogPlugin, PluginIconName, PluginListDisplayMode } from '../types';\n\nimport { PluginListItemBadges } from './PluginListItemBadges';\nimport { PluginLogo } from './PluginLogo';\n\nexport const LOGO_SIZE = '48px';\n\ntype Props = {\n plugin: CatalogPlugin;\n pathName: string;\n displayMode?: PluginListDisplayMode;\n};\n\nexport function PluginListItem({ plugin, pathName, displayMode = PluginListDisplayMode.Grid }: Props) {\n const styles = useStyles2(getStyles);\n const isList = displayMode === PluginListDisplayMode.List;\n\n return (\n <a href={`${pathName}/${plugin.id}`} className={cx(styles.container, { [styles.list]: isList })}>\n <PluginLogo src={plugin.info.logos.small} className={styles.pluginLogo} height={LOGO_SIZE} alt=\"\" />\n <h2 className={cx(styles.name, 'plugin-name')}>{plugin.name}</h2>\n <div className={cx(styles.content, 'plugin-content')}>\n <p>By {plugin.orgName}</p>\n <PluginListItemBadges plugin={plugin} />\n </div>\n <div className={styles.pluginType}>\n {plugin.type && <Icon name={PluginIconName[plugin.type]} title={`${plugin.type} plugin`} />}\n </div>\n </a>\n );\n}\n\n// Styles shared between the different type of list items\nexport const getStyles = (theme: GrafanaTheme2) => {\n return {\n container: css`\n display: grid;\n grid-template-columns: ${LOGO_SIZE} 1fr ${theme.spacing(3)};\n grid-template-rows: auto;\n gap: ${theme.spacing(2)};\n grid-auto-flow: row;\n background: ${theme.colors.background.secondary};\n border-radius: ${theme.shape.borderRadius()};\n padding: ${theme.spacing(3)};\n transition: ${theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {\n duration: theme.transitions.duration.short,\n })};\n\n &:hover {\n background: ${theme.colors.emphasize(theme.colors.background.secondary, 0.03)};\n }\n `,\n list: css`\n row-gap: 0px;\n\n > img {\n align-self: start;\n }\n\n > .plugin-content {\n min-height: 0px;\n grid-area: 2 / 2 / 4 / 3;\n\n > p {\n margin: ${theme.spacing(0, 0, 0.5, 0)};\n }\n }\n\n > .plugin-name {\n align-self: center;\n grid-area: 1 / 2 / 2 / 3;\n }\n `,\n pluginType: css`\n grid-area: 1 / 3 / 2 / 4;\n color: ${theme.colors.text.secondary};\n `,\n pluginLogo: css`\n grid-area: 1 / 1 / 3 / 2;\n max-width: 100%;\n align-self: center;\n object-fit: contain;\n `,\n content: css`\n grid-area: 3 / 1 / 4 / 3;\n color: ${theme.colors.text.secondary};\n `,\n name: css`\n grid-area: 1 / 2 / 3 / 3;\n align-self: center;\n font-size: ${theme.typography.h4.fontSize};\n color: ${theme.colors.text.primary};\n margin: 0;\n `,\n };\n};\n","import { css, cx } from '@emotion/css';\nimport React from 'react';\nimport { useLocation } from 'react-router-dom';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\n\nimport { CatalogPlugin, PluginListDisplayMode } from '../types';\n\nimport { PluginListItem } from './PluginListItem';\n\ninterface Props {\n plugins: CatalogPlugin[];\n displayMode: PluginListDisplayMode;\n}\n\nexport const PluginList = ({ plugins, displayMode }: Props) => {\n const isList = displayMode === PluginListDisplayMode.List;\n const styles = useStyles2(getStyles);\n const location = useLocation();\n\n return (\n <div className={cx(styles.container, { [styles.list]: isList })} data-testid=\"plugin-list\">\n {plugins.map((plugin) => (\n <PluginListItem key={plugin.id} plugin={plugin} pathName={location.pathname} displayMode={displayMode} />\n ))}\n </div>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n container: css`\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));\n gap: ${theme.spacing(3)};\n `,\n list: css`\n grid-template-columns: 1fr;\n `,\n };\n};\n","import React, { useState, useRef } from 'react';\nimport { useDebounce } from 'react-use';\n\nimport { FilterInput } from '@grafana/ui';\n\ninterface Props {\n value?: string;\n onSearch: (value: string) => void;\n}\n\n// useDebounce has a bug which causes it to fire on first render. This wrapper prevents that.\n// https://github.com/streamich/react-use/issues/759\nconst useDebounceWithoutFirstRender = (callBack: () => any, delay = 0, deps: React.DependencyList = []) => {\n const isFirstRender = useRef(true);\n const debounceDeps = [...deps, isFirstRender];\n\n return useDebounce(\n () => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n return callBack();\n },\n delay,\n debounceDeps\n );\n};\n\nexport const SearchField = ({ value, onSearch }: Props) => {\n const [query, setQuery] = useState(value);\n\n useDebounceWithoutFirstRender(() => onSearch(query ?? ''), 500, [query]);\n\n return (\n <FilterInput\n value={query}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.keyCode === 13) {\n onSearch(e.currentTarget.value);\n }\n }}\n placeholder=\"Search Grafana plugins\"\n onChange={(value) => {\n setQuery(value);\n }}\n width={46}\n />\n );\n};\n","import { css } from '@emotion/css';\nimport React, { ReactElement } from 'react';\nimport { useSelector } from 'react-redux';\nimport { useLocation } from 'react-router-dom';\n\nimport { SelectableValue, GrafanaTheme2 } from '@grafana/data';\nimport { locationSearchToObject } from '@grafana/runtime';\nimport { LoadingPlaceholder, Select, RadioButtonGroup, useStyles2, Tooltip } from '@grafana/ui';\nimport { Page } from 'app/core/components/Page/Page';\nimport { GrafanaRouteComponentProps } from 'app/core/navigation/types';\nimport { getNavModel } from 'app/core/selectors/navModel';\nimport { StoreState } from 'app/types/store';\n\nimport { HorizontalGroup } from '../components/HorizontalGroup';\nimport { PluginList } from '../components/PluginList';\nimport { SearchField } from '../components/SearchField';\nimport { Sorters } from '../helpers';\nimport { useHistory } from '../hooks/useHistory';\nimport { useGetAllWithFilters, useIsRemotePluginsAvailable, useDisplayMode } from '../state/hooks';\nimport { PluginAdminRoutes, PluginListDisplayMode } from '../types';\n\nexport default function Browse({ route }: GrafanaRouteComponentProps): ReactElement | null {\n const location = useLocation();\n const locationSearch = locationSearchToObject(location.search);\n const navModelId = getNavModelId(route.routeName);\n const navModel = useSelector((state: StoreState) => getNavModel(state.navIndex, navModelId));\n const { displayMode, setDisplayMode } = useDisplayMode();\n const styles = useStyles2(getStyles);\n const history = useHistory();\n const remotePluginsAvailable = useIsRemotePluginsAvailable();\n const query = (locationSearch.q as string) || '';\n const filterBy = (locationSearch.filterBy as string) || 'installed';\n const filterByType = (locationSearch.filterByType as string) || 'all';\n const sortBy = (locationSearch.sortBy as Sorters) || Sorters.nameAsc;\n const { isLoading, error, plugins } = useGetAllWithFilters({\n query,\n filterBy,\n filterByType,\n sortBy,\n });\n const filterByOptions = [\n { value: 'all', label: 'All' },\n { value: 'installed', label: 'Installed' },\n ];\n\n const onSortByChange = (value: SelectableValue<string>) => {\n history.push({ query: { sortBy: value.value } });\n };\n\n const onFilterByChange = (value: string) => {\n history.push({ query: { filterBy: value } });\n };\n\n const onFilterByTypeChange = (value: string) => {\n history.push({ query: { filterByType: value } });\n };\n\n const onSearch = (q: any) => {\n history.push({ query: { filterBy: 'all', filterByType: 'all', q } });\n };\n\n // How should we handle errors?\n if (error) {\n console.error(error.message);\n return null;\n }\n\n return (\n <Page navModel={navModel}>\n <Page.Contents>\n <HorizontalGroup wrap>\n <SearchField value={query} onSearch={onSearch} />\n <HorizontalGroup wrap className={styles.actionBar}>\n {/* Filter by type */}\n <div>\n <RadioButtonGroup\n value={filterByType}\n onChange={onFilterByTypeChange}\n options={[\n { value: 'all', label: 'All' },\n { value: 'datasource', label: 'Data sources' },\n { value: 'panel', label: 'Panels' },\n { value: 'app', label: 'Applications' },\n ]}\n />\n </div>\n\n {/* Filter by installed / all */}\n {remotePluginsAvailable ? (\n <div>\n <RadioButtonGroup value={filterBy} onChange={onFilterByChange} options={filterByOptions} />\n </div>\n ) : (\n <Tooltip\n content=\"This filter has been disabled because the Grafana server cannot access grafana.com\"\n placement=\"top\"\n >\n <div>\n <RadioButtonGroup\n disabled={true}\n value={filterBy}\n onChange={onFilterByChange}\n options={filterByOptions}\n />\n </div>\n </Tooltip>\n )}\n\n {/* Sorting */}\n <div>\n <Select\n aria-label=\"Sort Plugins List\"\n width={24}\n value={sortBy}\n onChange={onSortByChange}\n options={[\n { value: 'nameAsc', label: 'Sort by name (A-Z)' },\n { value: 'nameDesc', label: 'Sort by name (Z-A)' },\n { value: 'updated', label: 'Sort by updated date' },\n { value: 'published', label: 'Sort by published date' },\n { value: 'downloads', label: 'Sort by downloads' },\n ]}\n />\n </div>\n\n {/* Display mode */}\n <div>\n <RadioButtonGroup<PluginListDisplayMode>\n className={styles.displayAs}\n value={displayMode}\n onChange={setDisplayMode}\n options={[\n {\n value: PluginListDisplayMode.Grid,\n icon: 'table',\n description: 'Display plugins in a grid layout',\n },\n { value: PluginListDisplayMode.List, icon: 'list-ul', description: 'Display plugins in list' },\n ]}\n />\n </div>\n </HorizontalGroup>\n </HorizontalGroup>\n <div className={styles.listWrap}>\n {isLoading ? (\n <LoadingPlaceholder\n className={css`\n margin-bottom: 0;\n `}\n text=\"Loading results\"\n />\n ) : (\n <PluginList plugins={plugins} displayMode={displayMode} />\n )}\n </div>\n </Page.Contents>\n </Page>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n actionBar: css`\n ${theme.breakpoints.up('xl')} {\n margin-left: auto;\n }\n `,\n listWrap: css`\n margin-top: ${theme.spacing(2)};\n `,\n displayAs: css`\n svg {\n margin-right: 0;\n }\n `,\n});\n\n// Because the component is used under multiple paths (/plugins and /admin/plugins) we need to get\n// the correct navModel from the store\nconst getNavModelId = (routeName?: string) => {\n if (routeName === PluginAdminRoutes.HomeAdmin || routeName === PluginAdminRoutes.BrowseAdmin) {\n return 'admin-plugins';\n }\n\n return 'plugins';\n};\n","import { locationService } from '@grafana/runtime';\n\nexport const useHistory = () => {\n return {\n push: ({ query }: any) => {\n locationService.partial(query);\n },\n };\n};\n","import { createSelector } from '@reduxjs/toolkit';\n\nimport { PluginError, PluginErrorCode } from '@grafana/data';\n\nimport { RequestStatus, PluginCatalogStoreState } from '../types';\n\nimport { pluginsAdapter } from './reducer';\n\nexport const selectRoot = (state: PluginCatalogStoreState) => state.plugins;\n\nexport const selectItems = createSelector(selectRoot, ({ items }) => items);\n\nexport const selectDisplayMode = createSelector(selectRoot, ({ settings }) => settings.displayMode);\n\nexport const { selectAll, selectById } = pluginsAdapter.getSelectors(selectItems);\n\nconst selectInstalled = (filterBy: string) =>\n createSelector(selectAll, (plugins) =>\n plugins.filter((plugin) => (filterBy === 'installed' ? plugin.isInstalled : !plugin.isCore))\n );\n\nconst findByInstallAndType = (filterBy: string, filterByType: string) =>\n createSelector(selectInstalled(filterBy), (plugins) =>\n plugins.filter((plugin) => filterByType === 'all' || plugin.type === filterByType)\n );\n\nconst findByKeyword = (searchBy: string) =>\n createSelector(selectAll, (plugins) => {\n if (searchBy === '') {\n return [];\n }\n\n return plugins.filter((plugin) => {\n const fields: String[] = [];\n if (plugin.name) {\n fields.push(plugin.name.toLowerCase());\n }\n\n if (plugin.orgName) {\n fields.push(plugin.orgName.toLowerCase());\n }\n\n return fields.some((f) => f.includes(searchBy.toLowerCase()));\n });\n });\n\nexport const find = (searchBy: string, filterBy: string, filterByType: string) =>\n createSelector(\n findByInstallAndType(filterBy, filterByType),\n findByKeyword(searchBy),\n (filteredPlugins, searchedPlugins) => {\n return searchBy === '' ? filteredPlugins : searchedPlugins;\n }\n );\n\nexport const selectPluginErrors = createSelector(selectAll, (plugins) =>\n plugins\n ? plugins\n .filter((p) => Boolean(p.error))\n .map(\n (p): PluginError => ({\n pluginId: p.id,\n errorCode: p!.error as PluginErrorCode,\n })\n )\n : []\n);\n\n// The following selectors are used to get information about the outstanding or completed plugins-related network requests.\nexport const selectRequest = (actionType: string) =>\n createSelector(selectRoot, ({ requests = {} }) => requests[actionType]);\n\nexport const selectIsRequestPending = (actionType: string) =>\n createSelector(selectRequest(actionType), (request) => request?.status === RequestStatus.Pending);\n\nexport const selectRequestError = (actionType: string) =>\n createSelector(selectRequest(actionType), (request) =>\n request?.status === RequestStatus.Rejected ? request?.error : null\n );\n\nexport const selectIsRequestNotFetched = (actionType: string) =>\n createSelector(selectRequest(actionType), (request) => request === undefined);\n","import { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { PluginError } from '@grafana/data';\n\nimport { sortPlugins, Sorters } from '../helpers';\nimport { CatalogPlugin, PluginCatalogStoreState, PluginListDisplayMode } from '../types';\n\nimport { fetchAll, fetchDetails, fetchRemotePlugins, install, uninstall } from './actions';\nimport { setDisplayMode } from './reducer';\nimport {\n find,\n selectAll,\n selectById,\n selectIsRequestPending,\n selectRequestError,\n selectIsRequestNotFetched,\n selectDisplayMode,\n selectPluginErrors,\n} from './selectors';\n\ntype Filters = {\n query?: string;\n filterBy?: string;\n filterByType?: string;\n sortBy?: Sorters;\n};\n\nexport const useGetAllWithFilters = ({\n query = '',\n filterBy = 'installed',\n filterByType = 'all',\n sortBy = Sorters.nameAsc,\n}: Filters) => {\n useFetchAll();\n\n const filtered = useSelector(find(query, filterBy, filterByType));\n const { isLoading, error } = useFetchStatus();\n const sortedAndFiltered = sortPlugins(filtered, sortBy);\n\n return {\n isLoading,\n error,\n plugins: sortedAndFiltered,\n };\n};\n\nexport const useGetAll = (): CatalogPlugin[] => {\n useFetchAll();\n\n return useSelector(selectAll);\n};\n\nexport const useGetSingle = (id: string): CatalogPlugin | undefined => {\n useFetchAll();\n useFetchDetails(id);\n\n return useSelector((state: PluginCatalogStoreState) => selectById(state, id));\n};\n\nexport const useGetErrors = (): PluginError[] => {\n useFetchAll();\n\n return useSelector(selectPluginErrors);\n};\n\nexport const useInstall = () => {\n const dispatch = useDispatch();\n return (id: string, version?: string, isUpdating?: boolean) => dispatch(install({ id, version, isUpdating }));\n};\n\nexport const useUninstall = () => {\n const dispatch = useDispatch();\n\n return (id: string) => dispatch(uninstall(id));\n};\n\nexport const useIsRemotePluginsAvailable = () => {\n const error = useSelector(selectRequestError(fetchRemotePlugins.typePrefix));\n return error === null;\n};\n\nexport const useFetchStatus = () => {\n const isLoading = useSelector(selectIsRequestPending(fetchAll.typePrefix));\n const error = useSelector(selectRequestError(fetchAll.typePrefix));\n\n return { isLoading, error };\n};\n\nexport const useFetchDetailsStatus = () => {\n const isLoading = useSelector(selectIsRequestPending(fetchDetails.typePrefix));\n const error = useSelector(selectRequestError(fetchDetails.typePrefix));\n\n return { isLoading, error };\n};\n\nexport const useInstallStatus = () => {\n const isInstalling = useSelector(selectIsRequestPending(install.typePrefix));\n const error = useSelector(selectRequestError(install.typePrefix));\n\n return { isInstalling, error };\n};\n\nexport const useUninstallStatus = () => {\n const isUninstalling = useSelector(selectIsRequestPending(uninstall.typePrefix));\n const error = useSelector(selectRequestError(uninstall.typePrefix));\n\n return { isUninstalling, error };\n};\n\n// Only fetches in case they were not fetched yet\nexport const useFetchAll = () => {\n const dispatch = useDispatch();\n const isNotFetched = useSelector(selectIsRequestNotFetched(fetchAll.typePrefix));\n\n useEffect(() => {\n isNotFetched && dispatch(fetchAll());\n }, []); // eslint-disable-line\n};\n\nexport const useFetchDetails = (id: string) => {\n const dispatch = useDispatch();\n const plugin = useSelector((state: PluginCatalogStoreState) => selectById(state, id));\n const isNotFetching = !useSelector(selectIsRequestPending(fetchDetails.typePrefix));\n const shouldFetch = isNotFetching && plugin && !plugin.details;\n\n useEffect(() => {\n shouldFetch && dispatch(fetchDetails(id));\n }, [plugin]); // eslint-disable-line\n};\n\nexport const useDisplayMode = () => {\n const dispatch = useDispatch();\n const displayMode = useSelector(selectDisplayMode);\n\n return {\n displayMode,\n setDisplayMode: (v: PluginListDisplayMode) => dispatch(setDisplayMode(v)),\n };\n};\n"],"names":["PluginDisabledBadge","error","tooltip","PluginErrorCode","errorCodeToTooltip","Badge","icon","text","color","getBadgeColor","theme","css","colors","background","primary","border","strong","secondary","PluginInstalledBadge","customBadgeStyles","useStyles2","className","PluginEnterpriseBadge","plugin","featureEnabled","HorizontalGroup","PluginSignatureBadge","status","signature","Button","size","fill","onClick","ev","preventDefault","window","open","id","PluginUpdateAvailableBadge","styles","getStyles","hasUpdate","isCore","type","PluginType","typography","bodySmall","fontSize","PluginLogo","alt","src","height","loading","children","wrap","useTheme2","cx","container","spacing","PluginListItemBadges","isEnterprise","isDisabled","isInstalled","LOGO_SIZE","PluginListItem","pathName","displayMode","PluginListDisplayMode","isList","href","list","info","logos","small","pluginLogo","name","content","orgName","pluginType","Icon","PluginIconName","title","shape","borderRadius","transitions","create","duration","short","emphasize","h4","PluginList","plugins","location","useLocation","map","pathname","SearchField","value","onSearch","query","setQuery","useState","callBack","delay","deps","isFirstRender","useRef","debounceDeps","useDebounce","current","useDebounceWithoutFirstRender","FilterInput","onKeyDown","e","key","keyCode","currentTarget","placeholder","onChange","width","Browse","route","locationSearch","locationSearchToObject","search","navModelId","getNavModelId","routeName","navModel","useSelector","state","getNavModel","navIndex","setDisplayMode","useDisplayMode","history","push","locationService","remotePluginsAvailable","useIsRemotePluginsAvailable","q","filterBy","filterByType","sortBy","Sorters","isLoading","useGetAllWithFilters","filterByOptions","label","onFilterByChange","console","message","Page","actionBar","RadioButtonGroup","options","Tooltip","placement","disabled","Select","displayAs","description","listWrap","LoadingPlaceholder","breakpoints","up","PluginAdminRoutes","selectRoot","selectItems","createSelector","items","selectDisplayMode","settings","selectAll","selectById","pluginsAdapter","findByInstallAndType","filter","selectInstalled","find","searchBy","fields","toLowerCase","some","f","includes","findByKeyword","filteredPlugins","searchedPlugins","selectPluginErrors","p","Boolean","pluginId","errorCode","selectRequest","actionType","requests","selectIsRequestPending","request","RequestStatus","selectRequestError","useFetchAll","filtered","useFetchStatus","sortPlugins","useGetSingle","useFetchDetails","useGetErrors","useInstall","dispatch","useDispatch","version","isUpdating","install","useUninstall","uninstall","fetchRemotePlugins","fetchAll","useFetchDetailsStatus","fetchDetails","useInstallStatus","isInstalling","useUninstallStatus","isUninstalling","isNotFetched","undefined","useEffect","shouldFetch","details","v"],"sourceRoot":""}
|