diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..b85bbea323 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "eslint.workingDirectories": [ + { "directory": "./assets", "changeProcessCWD": true } + ], + "files.associations": { + "**/src/archive/**/*": "plaintext" + } +} diff --git a/assets/.eslintignore b/assets/.eslintignore new file mode 100644 index 0000000000..8ad0a2b721 --- /dev/null +++ b/assets/.eslintignore @@ -0,0 +1 @@ +/src/archive \ No newline at end of file diff --git a/assets/package.json b/assets/package.json index 484ff488c0..f40e9c3180 100644 --- a/assets/package.json +++ b/assets/package.json @@ -46,7 +46,7 @@ "@nivo/pie": "0.83.0", "@nivo/radial-bar": "0.83.0", "@nivo/tooltip": "0.83.0", - "@pluralsh/design-system": "3.62.1", + "@pluralsh/design-system": "3.64.0", "@react-hooks-library/core": "0.6.0", "@saas-ui/use-hotkeys": "1.1.3", "@tanstack/react-virtual": "3.0.1", @@ -64,10 +64,7 @@ "encrypt-storage": "2.13.2", "escape-carriage": "1.3.1", "filesize": "10.0.12", - "forge-core": "1.4.6", "fuse.js": "6.6.2", - "grommet": "2.34.2", - "grommet-icons": "4.10.0", "highlight.js": "11.9.0", "honorable": "1.0.0-beta.17", "honorable-theme-default": "1.0.0-beta.5", diff --git a/assets/src/App.tsx b/assets/src/App.tsx index 1b0848a927..930cc790bf 100644 --- a/assets/src/App.tsx +++ b/assets/src/App.tsx @@ -1,6 +1,5 @@ import { ReactNode } from 'react' import { RouterProvider, createBrowserRouter } from 'react-router-dom' -import { Grommet } from 'grommet' import { IntercomProvider } from 'react-use-intercom' import { ApolloProvider } from '@apollo/client' import { mergeDeep } from '@apollo/client/utilities' @@ -62,16 +61,7 @@ function ThemeProviders({ children }: { children: ReactNode }) { - - - {children} - - + {children} diff --git a/assets/src/components/repos/Configuration.jsx b/assets/src/archive/components/repos/Configuration.jsx similarity index 96% rename from assets/src/components/repos/Configuration.jsx rename to assets/src/archive/components/repos/Configuration.jsx index 07557c24e5..36d50a6949 100644 --- a/assets/src/components/repos/Configuration.jsx +++ b/assets/src/archive/components/repos/Configuration.jsx @@ -11,16 +11,20 @@ import { import Toggle from 'react-toggle' -import { ModalHeader } from '../utils/Modal' -import { INSTALL_RECIPE, RECIPE_Q } from '../graphql/plural' +import { ModalHeader } from '../../../components/utils/Modal' +import { INSTALL_RECIPE, RECIPE_Q } from '../../../components/graphql/plural' -import { LabelledInput } from '../utils/LabelledInput' -import { appendConnection, deepFetch, updateCache } from '../../utils/graphql' -import { BUILDS_Q } from '../graphql/builds' +import { LabelledInput } from '../../../components/utils/LabelledInput' +import { + appendConnection, + deepFetch, + updateCache, +} from '../../../utils/graphql' +import { BUILDS_Q } from '../../../components/graphql/builds' -import { trimSuffix } from '../../utils/array' +import { trimSuffix } from '../../../utils/array' -import { LoginContext } from '../contexts' +import { LoginContext } from '../../../components/contexts' import { Repository } from './SearchRepositories' import { ConfigurationType, MODAL_WIDTH, OperationType } from './constants' diff --git a/assets/src/components/repos/Container.jsx b/assets/src/archive/components/repos/Container.jsx similarity index 100% rename from assets/src/components/repos/Container.jsx rename to assets/src/archive/components/repos/Container.jsx diff --git a/assets/src/components/repos/Installer.jsx b/assets/src/archive/components/repos/Installer.jsx similarity index 100% rename from assets/src/components/repos/Installer.jsx rename to assets/src/archive/components/repos/Installer.jsx diff --git a/assets/src/components/repos/Recipes.jsx b/assets/src/archive/components/repos/Recipes.jsx similarity index 94% rename from assets/src/components/repos/Recipes.jsx rename to assets/src/archive/components/repos/Recipes.jsx index 4656832495..088eac20ff 100644 --- a/assets/src/components/repos/Recipes.jsx +++ b/assets/src/archive/components/repos/Recipes.jsx @@ -4,8 +4,8 @@ import { ModalHeader } from 'forge-core' import { Box, Text } from 'grommet' import { chunk } from 'lodash' -import { RECIPES_Q } from '../graphql/plural' -import ProviderIcon from '../utils/Provider' +import { RECIPES_Q } from '../../../components/graphql/plural' +import ProviderIcon from '../../../components/utils/Provider' import { MODAL_WIDTH, PROVIDER_WIDTH } from './constants' import { Container } from './Container' diff --git a/assets/src/components/repos/Repositories.jsx b/assets/src/archive/components/repos/Repositories.jsx similarity index 100% rename from assets/src/components/repos/Repositories.jsx rename to assets/src/archive/components/repos/Repositories.jsx diff --git a/assets/src/components/repos/SearchRepositories.jsx b/assets/src/archive/components/repos/SearchRepositories.jsx similarity index 97% rename from assets/src/components/repos/SearchRepositories.jsx rename to assets/src/archive/components/repos/SearchRepositories.jsx index aab2b1f22b..5951aee759 100644 --- a/assets/src/components/repos/SearchRepositories.jsx +++ b/assets/src/archive/components/repos/SearchRepositories.jsx @@ -5,7 +5,7 @@ import { useQuery } from '@apollo/client' import { SearchIcon } from 'components/utils/SearchIcon' -import { SEARCH_REPOS } from '../graphql/plural' +import { SEARCH_REPOS } from '../../../components/graphql/plural' import { MODAL_WIDTH } from './constants' diff --git a/assets/src/components/repos/Tags.jsx b/assets/src/archive/components/repos/Tags.jsx similarity index 98% rename from assets/src/components/repos/Tags.jsx rename to assets/src/archive/components/repos/Tags.jsx index c67605879f..e82c640d40 100644 --- a/assets/src/components/repos/Tags.jsx +++ b/assets/src/archive/components/repos/Tags.jsx @@ -2,7 +2,7 @@ import { useState } from 'react' import { Box, Keyboard, Text, TextInput } from 'grommet' import { Scroller, Tag as TagInner } from 'forge-core' -import { extendConnection } from '../../utils/graphql' +import { extendConnection } from '../../../utils/graphql' export function TagInput({ addTag, removeTag, tags, round, ...rest }) { const [current, setCurrent] = useState('') diff --git a/assets/src/components/repos/constants.ts b/assets/src/archive/components/repos/constants.ts similarity index 100% rename from assets/src/components/repos/constants.ts rename to assets/src/archive/components/repos/constants.ts diff --git a/assets/src/components/repos/installer/Application.tsx b/assets/src/archive/components/repos/installer/Application.tsx similarity index 98% rename from assets/src/components/repos/installer/Application.tsx rename to assets/src/archive/components/repos/installer/Application.tsx index d38d2909f1..2a6e04f591 100644 --- a/assets/src/components/repos/installer/Application.tsx +++ b/assets/src/archive/components/repos/installer/Application.tsx @@ -13,7 +13,7 @@ import { useQuery } from '@apollo/client' import { isNonNullable } from 'utils/isNonNullable' import { RECIPES_Q, RECIPE_Q } from '../../graphql/plural' -import { Recipe, RepositoryContext } from '../../../generated/graphql' +import { Recipe, RepositoryContext } from '../../../../generated/graphql' import { Configuration } from './Configuration' diff --git a/assets/src/components/repos/installer/Configuration.tsx b/assets/src/archive/components/repos/installer/Configuration.tsx similarity index 98% rename from assets/src/components/repos/installer/Configuration.tsx rename to assets/src/archive/components/repos/installer/Configuration.tsx index 27587b9258..f2798e25f3 100644 --- a/assets/src/components/repos/installer/Configuration.tsx +++ b/assets/src/archive/components/repos/installer/Configuration.tsx @@ -13,7 +13,7 @@ import { ConfigurationItem as ConfigurationItemType, Maybe, Recipe, -} from '../../../generated/graphql' +} from '../../../../generated/graphql' import { OperationType } from '../constants' import { ConfigurationItem } from './ConfigurationItem' diff --git a/assets/src/components/repos/installer/ConfigurationFileInput.tsx b/assets/src/archive/components/repos/installer/ConfigurationFileInput.tsx similarity index 100% rename from assets/src/components/repos/installer/ConfigurationFileInput.tsx rename to assets/src/archive/components/repos/installer/ConfigurationFileInput.tsx diff --git a/assets/src/components/repos/installer/ConfigurationItem.tsx b/assets/src/archive/components/repos/installer/ConfigurationItem.tsx similarity index 99% rename from assets/src/components/repos/installer/ConfigurationItem.tsx rename to assets/src/archive/components/repos/installer/ConfigurationItem.tsx index 3f9c7082b2..9f9599b887 100644 --- a/assets/src/components/repos/installer/ConfigurationItem.tsx +++ b/assets/src/archive/components/repos/installer/ConfigurationItem.tsx @@ -2,7 +2,7 @@ import { FormField, Input, Switch, useActive } from '@pluralsh/design-system' import StartCase from 'lodash/startCase' import { useContext, useEffect, useMemo, useState } from 'react' -import { deepFetch } from '../../../utils/graphql' +import { deepFetch } from '../../../../utils/graphql' import { LoginContext } from '../../contexts' import { PluralContext } from '../../contexts/PluralContext' diff --git a/assets/src/components/repos/installer/Installer.tsx b/assets/src/archive/components/repos/installer/Installer.tsx similarity index 98% rename from assets/src/components/repos/installer/Installer.tsx rename to assets/src/archive/components/repos/installer/Installer.tsx index 4d23bffad2..12913d9ea9 100644 --- a/assets/src/components/repos/installer/Installer.tsx +++ b/assets/src/archive/components/repos/installer/Installer.tsx @@ -21,7 +21,7 @@ import LoadingIndicator from 'components/utils/LoadingIndicator' import { InstallationContext } from '../../Installations' import { BUILDS_Q } from '../../graphql/builds' -import { appendConnection } from '../../../utils/graphql' +import { appendConnection } from '../../../../utils/graphql' import { buildSteps, install, toDefaultSteps } from './helpers' import { QUERY_REPOS } from './query' diff --git a/assets/src/components/repos/installer/Modal.tsx b/assets/src/archive/components/repos/installer/Modal.tsx similarity index 100% rename from assets/src/components/repos/installer/Modal.tsx rename to assets/src/archive/components/repos/installer/Modal.tsx diff --git a/assets/src/components/repos/installer/context.tsx b/assets/src/archive/components/repos/installer/context.tsx similarity index 100% rename from assets/src/components/repos/installer/context.tsx rename to assets/src/archive/components/repos/installer/context.tsx diff --git a/assets/src/components/repos/installer/helpers.tsx b/assets/src/archive/components/repos/installer/helpers.tsx similarity index 99% rename from assets/src/components/repos/installer/helpers.tsx rename to assets/src/archive/components/repos/installer/helpers.tsx index 0cad4e28f8..556fef812c 100644 --- a/assets/src/components/repos/installer/helpers.tsx +++ b/assets/src/archive/components/repos/installer/helpers.tsx @@ -12,7 +12,7 @@ import { Recipe, RecipeSection, RepositoryContext, -} from '../../../generated/graphql' +} from '../../../../generated/graphql' import { INSTALL_RECIPE, RECIPES_Q, RECIPE_Q } from '../../graphql/plural' import { Application } from './Application' diff --git a/assets/src/components/repos/installer/query.ts b/assets/src/archive/components/repos/installer/query.ts similarity index 100% rename from assets/src/components/repos/installer/query.ts rename to assets/src/archive/components/repos/installer/query.ts diff --git a/assets/src/components/repos/validation.js b/assets/src/archive/components/repos/validation.js similarity index 100% rename from assets/src/components/repos/validation.js rename to assets/src/archive/components/repos/validation.js diff --git a/assets/src/components/apps/app/cost/PluralCost.tsx b/assets/src/components/apps/app/cost/PluralCost.tsx deleted file mode 100644 index 3b0b714d52..0000000000 --- a/assets/src/components/apps/app/cost/PluralCost.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { Box, Text } from 'grommet' -import { Check } from 'forge-core' - -export default function PluralCost({ license }) { - const { status: plural } = license - - return ( - - - Plural Cost - - - {plural.plan || 'Free'} Plan - - {plural.features && ( - - {plural.features.map((feature) => ( - - ))} - - )} - {plural.limits && } - - ) -} - -function PlanFeature({ feature: { name, description } }) { - return ( - - - - {name} - - {description} - - - - ) -} - -function PlanLimits({ limits }) { - return ( - - {Object.entries(limits).map(([name, val], i) => ( - - - {name} - - {val as any} - - ))} - - ) -} diff --git a/assets/src/components/apps/app/logs/LogContent.tsx b/assets/src/components/apps/app/logs/LogContent.tsx index bb8c356254..ccaf2aeb46 100644 --- a/assets/src/components/apps/app/logs/LogContent.tsx +++ b/assets/src/components/apps/app/logs/LogContent.tsx @@ -2,15 +2,15 @@ import { useEffect, useMemo, useState } from 'react' import TinyQueue from 'tinyqueue' -import LegacyScroller from 'components/utils/LegacyScroller' - import { last } from 'lodash' import { Div } from 'honorable' +import { StandardScroller } from 'components/utils/SmoothScroller' + +import LogInfo from './LogInfo' import LogLine from './LogLine' import { Level } from './misc' -import LogInfo from './LogInfo' export function determineLevel(line) { if (/fatal/i.test(line)) return Level.FATAL @@ -83,7 +83,6 @@ export default function LogContent({ setLoader, addLabel, updateFunc, - fullscreen = false, }) { const [open, setOpen] = useState(null) const [timestamp, setTimestamp] = useState() @@ -104,7 +103,7 @@ export default function LogContent({ return ( <> - setOpen(null)} - marginTop={fullscreen ? '0' : '104px'} /> )} diff --git a/assets/src/components/apps/app/logs/LogInfo.tsx b/assets/src/components/apps/app/logs/LogInfo.tsx index db2dd2782c..2833fab75b 100644 --- a/assets/src/components/apps/app/logs/LogInfo.tsx +++ b/assets/src/components/apps/app/logs/LogInfo.tsx @@ -3,19 +3,12 @@ import { Div, Flex } from 'honorable' import { LogsInfoPanel } from './LogsInfoPanel' import { ts } from './misc' -export default function LogInfo({ - stream, - stamp, - addLabel, - onClose, - marginTop = '0', -}) { +export default function LogInfo({ stream, stamp, addLabel, onClose }) { return ( {[['timestamp', ts(stamp)], ...Object.entries(stream)].map( ([key, value]: any) => ( diff --git a/assets/src/components/apps/app/logs/LogsCard.tsx b/assets/src/components/apps/app/logs/LogsCard.tsx index 97c3bd946b..c7fe771cdb 100644 --- a/assets/src/components/apps/app/logs/LogsCard.tsx +++ b/assets/src/components/apps/app/logs/LogsCard.tsx @@ -11,13 +11,7 @@ import LogsScrollIndicator from './LogsScrollIndicator' const POLL_INTERVAL = 10 * 1000 const LIMIT = 1000 -export function LogsCard({ - namespace, - query, - addLabel, - fullscreen = false, - height = 800, -}: any) { +export function LogsCard({ namespace, query, addLabel, height = 800 }: any) { const [listRef, setListRef] = useState(null) const [live, setLive] = useState(true) const [loader, setLoader] = useState(null) @@ -60,7 +54,6 @@ export function LogsCard({ updateFunc={null} onScroll={(arg) => setLive(!arg)} addLabel={addLabel} - fullscreen={fullscreen} /> ) : ( diff --git a/assets/src/components/apps/app/logs/LogsFilters.tsx b/assets/src/components/apps/app/logs/LogsFilters.tsx index 1ad27b0133..3f0bf46ca9 100644 --- a/assets/src/components/apps/app/logs/LogsFilters.tsx +++ b/assets/src/components/apps/app/logs/LogsFilters.tsx @@ -17,13 +17,7 @@ function selectedFilter(labels, search, spec) { return true } -export default function LogsFilters({ - labels, - search, - setSearch, - setLabels, - fullscreen = false, -}) { +export default function LogsFilters({ labels, search, setSearch, setLabels }) { const { appName } = useParams() const [open, setOpen] = useState(false) const { data } = useQuery(LOG_FILTER_Q, { variables: { namespace: appName } }) @@ -68,7 +62,6 @@ export default function LogsFilters({ title="Filters" subtitle="Select an attribute below to apply a filter." onClose={() => setOpen(false)} - marginTop={fullscreen ? '0' : '104px'} > {logFilters.map(({ metadata: { name }, spec }) => { const selected = selectedFilter(labels, search, spec) diff --git a/assets/src/components/apps/app/logs/LogsFullScreen.tsx b/assets/src/components/apps/app/logs/LogsFullScreen.tsx index 0cb8c93348..47a828cc10 100644 --- a/assets/src/components/apps/app/logs/LogsFullScreen.tsx +++ b/assets/src/components/apps/app/logs/LogsFullScreen.tsx @@ -90,7 +90,6 @@ export default function LogsFullScreen({ setSearch={setSearch} labels={labels} setLabels={setLabels} - fullscreen /> {}, contentHeight = 300, children, - marginTop = '0', }) { return ( - - -
- - - {title} - - onClose(e)} - /> - -
+ - {subtitle} -
-
+ {title} + + onClose(e)} + /> +
- {children} + {subtitle}
-
-
+ +
+ {children} +
+ ) } diff --git a/assets/src/components/apps/app/oidc/UserManagement.tsx b/assets/src/components/apps/app/oidc/UserManagement.tsx index 8fee8b7b8e..a292a43a54 100644 --- a/assets/src/components/apps/app/oidc/UserManagement.tsx +++ b/assets/src/components/apps/app/oidc/UserManagement.tsx @@ -3,7 +3,6 @@ import { useMemo, useState } from 'react' import { useParams } from 'react-router-dom' import { useMutation, useQuery } from '@apollo/client' import { Flex, P } from 'honorable' -import { GqlError } from 'forge-core' import sortBy from 'lodash/sortBy' import uniqBy from 'lodash/uniqBy' @@ -14,6 +13,8 @@ import { ScrollablePage } from 'components/utils/layout/ScrollablePage' import LoadingIndicator from 'components/utils/LoadingIndicator' +import { GqlError } from 'components/utils/Alert' + import { BindingInput, GroupSuggestion, diff --git a/assets/src/components/apps/app/runbooks/Runbooks.tsx b/assets/src/components/apps/app/runbooks/Runbooks.tsx index c567c28575..5aae38f416 100644 --- a/assets/src/components/apps/app/runbooks/Runbooks.tsx +++ b/assets/src/components/apps/app/runbooks/Runbooks.tsx @@ -5,8 +5,6 @@ import { } from '@pluralsh/design-system' import { useMemo } from 'react' import { useNavigate, useParams } from 'react-router-dom' -import { POLL_INTERVAL } from 'components/runbooks/constants' -import { RUNBOOKS_Q } from 'components/runbooks/queries' import { useQuery } from '@apollo/client' import { A, Flex } from 'honorable' import { ScrollablePage } from 'components/utils/layout/ScrollablePage' @@ -16,6 +14,9 @@ import { ListItem } from '../misc' import { getBorderColor } from './misc' import RunbookStatus from './runbook/RunbookStatus' +import { RUNBOOKS_Q } from './queries' + +export const POLL_INTERVAL = 30 * 1000 export default function Runbooks() { const navigate = useNavigate() diff --git a/assets/src/components/runbooks/queries.js b/assets/src/components/apps/app/runbooks/queries.js similarity index 94% rename from assets/src/components/runbooks/queries.js rename to assets/src/components/apps/app/runbooks/queries.js index 8ff5ea5a22..320acdcb0e 100644 --- a/assets/src/components/runbooks/queries.js +++ b/assets/src/components/apps/app/runbooks/queries.js @@ -1,12 +1,12 @@ import gql from 'graphql-tag' -import { PageInfo } from '../graphql/base' +import { PageInfo } from '../../../graphql/base' import { RunbookAlertStatus, RunbookDataFragment, RunbookExecutionFragment, RunbookFragment, -} from '../graphql/runbooks' +} from '../../../graphql/runbooks' export const RUNBOOKS_Q = gql` query Runbooks($namespace: String!, $pinned: Boolean) { diff --git a/assets/src/components/apps/app/runbooks/runbook/Runbook.tsx b/assets/src/components/apps/app/runbooks/runbook/Runbook.tsx index d8e38406cb..a34aa9b952 100644 --- a/assets/src/components/apps/app/runbooks/runbook/Runbook.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/Runbook.tsx @@ -20,8 +20,6 @@ import { Div, Flex, H3 } from 'honorable' import { DURATIONS, SECOND_TO_MILLISECONDS } from 'utils/time' -import { RUNBOOKS_Q, RUNBOOK_Q } from 'components/runbooks/queries' - import { RunbookDisplay } from 'components/apps/app/runbooks/runbook/RunbookDisplay' import { RunbookExecutions } from 'components/apps/app/runbooks/runbook/RunbookExecutions' @@ -37,6 +35,8 @@ import LoadingIndicator from 'components/utils/LoadingIndicator' import RangePicker from '../../../../utils/RangePicker' import { PageTitleSelectButton } from '../../../../utils/PageTitleSelectButton' +import { RUNBOOKS_Q, RUNBOOK_Q } from '../queries' + import { RunbookAlerts } from './RunbookAlerts' const DIRECTORY = [ diff --git a/assets/src/components/apps/app/runbooks/runbook/RunbookAlerts.tsx b/assets/src/components/apps/app/runbooks/runbook/RunbookAlerts.tsx index d786e284e1..22fa0d7942 100644 --- a/assets/src/components/apps/app/runbooks/runbook/RunbookAlerts.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/RunbookAlerts.tsx @@ -1,12 +1,12 @@ import { + Accordion, + AccordionItem, AppIcon, Card, CardProps, Chip, - CollapseIcon, WarningIcon, } from '@pluralsh/design-system' -import { Collapsible } from 'grommet' import capitalize from 'lodash/capitalize' import moment from 'moment' import { ComponentProps, PropsWithChildren, useState } from 'react' @@ -87,7 +87,6 @@ const RunbookAlertWrapper = styled.div<{ $isOpen: boolean }>( align: 'center', color: 'inherit', cursor: 'pointer', - padding: theme.spacing.medium, textDecoration: 'none', width: '100%', ':hover': { backgroundColor: theme.colors['fill-one-hover'] }, @@ -154,81 +153,68 @@ export default function RunbookAlert({ alert }: { alert: RunbookAlertStatus }) { return ( -
setIsOpen(!isOpen)} - > - - } - size="xxsmall" - /> -
-
-
{name}
-

- {moment(startsAt).format('MMM D, YYYY h:mm')} -

-
-
-
- {severity && ( - - )} - + setIsOpen(!isOpen)} + > + } + size="xxsmall" + /> +
+
+
{name}
+

+ {moment(startsAt).format('MMM D, YYYY h:mm')} +

+
+
+
+ {severity && ( + + )} +
} - /> -
- -
- {name && {name}} - {annotations?.summary && ( - {annotations.summary} - )} - {annotations?.description && ( - - {annotations.description} - - )} + > +
+ {name && {name}} + {annotations?.summary && ( + + {annotations.summary} + + )} + {annotations?.description && ( + + {annotations.description} + + )} - {labels && ( - - - {Object.entries(labels).map(([key, val]) => ( - {`${key}: ${val}`} - ))} - - - )} - {true && ( - {fingerprint} - )} -
- + {labels && ( + + + {Object.entries(labels).map(([key, val]) => ( + {`${key}: ${val}`} + ))} + + + )} + {true && ( + {fingerprint} + )} +
+ + ) } diff --git a/assets/src/components/apps/app/runbooks/runbook/RunbookDisplay.tsx b/assets/src/components/apps/app/runbooks/runbook/RunbookDisplay.tsx index 5ab5906beb..de56890783 100644 --- a/assets/src/components/apps/app/runbooks/runbook/RunbookDisplay.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/RunbookDisplay.tsx @@ -1,10 +1,11 @@ -import { createContext, useContext, useMemo, useState } from 'react' -import { ThemeContext } from 'grommet' +import { createContext, useMemo, useState } from 'react' import { Card } from '@pluralsh/design-system' import { Flex } from 'honorable' +import { useTheme } from 'styled-components' + import { recurse } from './display/misc' export const DisplayContext = createContext({}) @@ -14,7 +15,8 @@ export function RunbookDisplay({ root: { children, attributes }, ...props }) { - const theme = useContext(ThemeContext) + const theme = useTheme() + const datasources = useMemo( () => data diff --git a/assets/src/components/apps/app/runbooks/runbook/RunbookExecutions.tsx b/assets/src/components/apps/app/runbooks/runbook/RunbookExecutions.tsx index 718a539278..7dfe1b70e5 100644 --- a/assets/src/components/apps/app/runbooks/runbook/RunbookExecutions.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/RunbookExecutions.tsx @@ -3,7 +3,6 @@ import { createColumnHelper } from '@tanstack/react-table' import { Flex } from 'honorable' import { useCallback, useMemo } from 'react' import update from 'lodash/update' -import { RUNBOOK_EXECUTIONS_Q } from 'components/runbooks/queries' import { useQuery } from '@apollo/client' import { useParams } from 'react-router-dom' import { isEmpty } from 'lodash' @@ -12,6 +11,7 @@ import LoadingIndicator from 'components/utils/LoadingIndicator' import { DateTimeCol } from 'components/utils/table/DateTimeCol' import { FullHeightTableWrap } from '../../../../utils/layout/FullHeightTableWrap' +import { RUNBOOK_EXECUTIONS_Q } from '../queries' const columnHelper = createColumnHelper() diff --git a/assets/src/components/apps/app/runbooks/runbook/display/DisplayAttachment.tsx b/assets/src/components/apps/app/runbooks/runbook/display/DisplayAttachment.tsx index e5e59b302b..94c06c5294 100644 --- a/assets/src/components/apps/app/runbooks/runbook/display/DisplayAttachment.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/display/DisplayAttachment.tsx @@ -1,4 +1,3 @@ -import { normalizeColor } from 'grommet/utils' import { Div } from 'honorable' import { recurse } from './misc' @@ -14,7 +13,7 @@ export function DisplayAttachment({ children, attributes, theme }) { >
diff --git a/assets/src/components/apps/app/runbooks/runbook/display/DisplayBox.tsx b/assets/src/components/apps/app/runbooks/runbook/display/DisplayBox.tsx index 835086d125..1f6e960e02 100644 --- a/assets/src/components/apps/app/runbooks/runbook/display/DisplayBox.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/display/DisplayBox.tsx @@ -1,19 +1,36 @@ -import { Box } from 'grommet' +import { Flex } from '@pluralsh/design-system' import { recurse } from './misc' const border = ({ borderSize, borderSide, border }) => borderSize || borderSide - ? { side: borderSide, color: border, size: borderSize } + ? { [`border${borderSide}`]: `${border} ${borderSize}` } : border export function DisplayBox({ children, attributes }) { return ( - {recurse(children)} - + + ) +} + +// basically like a polyfill to convert grommet box attrs to regular flex syntax +function grommetBoxAttrsToFlex(attrs: Record) { + return Object.fromEntries( + Object.entries(attrs).map(([key, value]) => [ + key === 'align' + ? 'alignItems' + : key === 'justify' + ? 'justifyContent' + : key === 'direction' + ? 'flexDirection' + : key, + value === 'start' ? 'flex-start' : value === 'end' ? 'flex-end' : value, + ]) ) } diff --git a/assets/src/components/apps/app/runbooks/runbook/display/DisplayButton.tsx b/assets/src/components/apps/app/runbooks/runbook/display/DisplayButton.tsx index dc7a6c2c98..3d81cbbdf8 100644 --- a/assets/src/components/apps/app/runbooks/runbook/display/DisplayButton.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/display/DisplayButton.tsx @@ -1,6 +1,5 @@ import { Banner, Button } from '@pluralsh/design-system' import { ApolloError } from 'apollo-boost' -import { EXECUTE_RUNBOOK } from 'components/runbooks/queries' import { useContext, useState } from 'react' import { useMutation } from '@apollo/client' import { useNavigate, useParams } from 'react-router-dom' @@ -10,6 +9,7 @@ import { legacyUrl } from 'helpers/url' import { ActionPortal } from '../Runbook' import { DisplayContext } from '../RunbookDisplay' +import { EXECUTE_RUNBOOK } from '../../queries' function getButton({ primary, key, ...props }: any) { return ( diff --git a/assets/src/components/apps/app/runbooks/runbook/display/DisplayGraph.tsx b/assets/src/components/apps/app/runbooks/runbook/display/DisplayGraph.tsx index fddc7907c7..0132455433 100644 --- a/assets/src/components/apps/app/runbooks/runbook/display/DisplayGraph.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/display/DisplayGraph.tsx @@ -1,10 +1,11 @@ -import { ValueFormats } from 'components/runbooks/utils' import { Graph } from 'components/utils/Graph' import { Div } from 'honorable' import { useContext, useMemo } from 'react' import { DisplayContext } from '../RunbookDisplay' +import { ValueFormats } from './misc' + const convertVals = (v) => v.map(({ timestamp, value }) => ({ x: new Date(timestamp * 1000), diff --git a/assets/src/components/apps/app/runbooks/runbook/display/DisplayLink.tsx b/assets/src/components/apps/app/runbooks/runbook/display/DisplayLink.tsx index 569efe1bf6..e78365f194 100644 --- a/assets/src/components/apps/app/runbooks/runbook/display/DisplayLink.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/display/DisplayLink.tsx @@ -1,18 +1,19 @@ -import { Anchor, Text } from 'grommet' +import { useTheme } from 'styled-components' import { recurse } from './misc' export function DisplayLink({ value, attributes, children }) { + const theme = useTheme() const val = value || attributes.value return ( - - + {val || recurse(children)} - - + + ) } diff --git a/assets/src/components/apps/app/runbooks/runbook/display/DisplayTable.tsx b/assets/src/components/apps/app/runbooks/runbook/display/DisplayTable.tsx index d2d244ee39..e44d91c90b 100644 --- a/assets/src/components/apps/app/runbooks/runbook/display/DisplayTable.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/display/DisplayTable.tsx @@ -1,11 +1,12 @@ import { Table } from '@pluralsh/design-system' import { createColumnHelper } from '@tanstack/react-table' -import { query } from 'components/runbooks/utils' import { get } from 'lodash' import { useContext, useMemo } from 'react' import { DisplayContext } from '../RunbookDisplay' +import { query } from './misc' + const columnHelper = createColumnHelper() // Ignored column widths that are part of children object diff --git a/assets/src/components/apps/app/runbooks/runbook/display/misc.tsx b/assets/src/components/apps/app/runbooks/runbook/display/misc.tsx index 08826f1161..becea8baa3 100644 --- a/assets/src/components/apps/app/runbooks/runbook/display/misc.tsx +++ b/assets/src/components/apps/app/runbooks/runbook/display/misc.tsx @@ -1,6 +1,12 @@ -import { extract, query } from 'components/runbooks/utils' import { useContext } from 'react' +import jp from 'jsonpath' +import { cpuFormat } from 'utils/kubernetes' + +import { filesize } from 'filesize' + +import { deepFetch } from 'utils/graphql' + import { DisplayContext } from '../RunbookDisplay' import { DisplayAttachment } from './DisplayAttachment' @@ -77,3 +83,18 @@ export function parse(struct, index, theme) { return null } } + +export const query = (object, path) => jp.query(object, `$.${path}`)[0] + +export const ValueFormats = { + cpu: cpuFormat, + memory: filesize, +} + +export function extract(data, doc) { + if (!doc) return data + + const raw = deepFetch(data, doc) + + return JSON.parse(raw) +} diff --git a/assets/src/components/builds/UpgradePoliciesList.tsx b/assets/src/components/builds/UpgradePoliciesList.tsx index f957689713..79fd9c5cac 100644 --- a/assets/src/components/builds/UpgradePoliciesList.tsx +++ b/assets/src/components/builds/UpgradePoliciesList.tsx @@ -1,5 +1,5 @@ import { useQuery } from '@apollo/client' -import { ArrowLeftIcon, Button, Card } from '@pluralsh/design-system' +import { Accordion, ArrowLeftIcon, Button } from '@pluralsh/design-system' import { UPGRADE_POLICIES } from 'components/graphql/builds' import { Flex } from 'honorable' import { isEmpty } from 'lodash' @@ -23,10 +23,12 @@ export default function UpgradePoliciesList() { return ( <> {!isEmpty(upgradePolicies) ? ( - {upgradePolicies.map((policy, i) => ( ))} - + ) : ( 'No upgrade policies available.' )} diff --git a/assets/src/components/builds/UpgradePolicy.tsx b/assets/src/components/builds/UpgradePolicy.tsx index 16e8c29310..67a4d5b727 100644 --- a/assets/src/components/builds/UpgradePolicy.tsx +++ b/assets/src/components/builds/UpgradePolicy.tsx @@ -1,18 +1,17 @@ import { useMutation } from '@apollo/client' import { + AccordionItem, Button, Chip, - CollapseIcon, TrashCanIcon, } from '@pluralsh/design-system' import { DELETE_POLICY, UPGRADE_POLICIES } from 'components/graphql/builds' -import { Collapsible } from 'grommet' import { Flex, P } from 'honorable' -import { useState } from 'react' +import { useTheme } from 'styled-components' import { updateCache } from 'utils/graphql' export default function UpgradePolicy({ policy, last = false }) { - const [open, setOpen] = useState(false) + const theme = useTheme() const [mutation] = useMutation(DELETE_POLICY, { variables: { id: policy.id }, update: (cache, { data: { deleteUpgradePolicy } }) => @@ -28,92 +27,73 @@ export default function UpgradePolicy({ policy, last = false }) { }) return ( - <> - setOpen(!open)} - padding="small" - _hover={{ backgroundColor: 'fill-two-hover' }} - > + - + + +

+ {policy.name} +

+ + {policy.type?.toLowerCase()} + +

- {policy.name} + App bindings: {policy.target}

- - {policy.type?.toLowerCase()} -
-

- App bindings: {policy.target} -

+ + Weight: {policy.weight} - - Weight: {policy.weight} - - - + - -

+ + - + Delete + - - + + ) } diff --git a/assets/src/components/cd/logs/LogsCard.tsx b/assets/src/components/cd/logs/LogsCard.tsx index 75a9543e6f..9998653d12 100644 --- a/assets/src/components/cd/logs/LogsCard.tsx +++ b/assets/src/components/cd/logs/LogsCard.tsx @@ -25,13 +25,7 @@ function doUpdate(prev, result) { } } -export function LogsCard({ - serviceId, - clusterId, - query, - addLabel, - fullscreen = false, -}: any) { +export function LogsCard({ serviceId, clusterId, query, addLabel }: any) { const [listRef, setListRef] = useState(null) const [live, setLive] = useState(true) const [loader, setLoader] = useState(null) @@ -96,7 +90,6 @@ export function LogsCard({ } onScroll={(arg) => setLive(!arg)} addLabel={addLabel} - fullscreen={fullscreen} /> ) : ( diff --git a/assets/src/components/cd/utils/RepoKindSelector.tsx b/assets/src/components/cd/utils/RepoKindSelector.tsx index 768c7debb1..2677b57fad 100644 --- a/assets/src/components/cd/utils/RepoKindSelector.tsx +++ b/assets/src/components/cd/utils/RepoKindSelector.tsx @@ -8,7 +8,7 @@ import { TabListStateProps, TabPanel, } from '@pluralsh/design-system' -import { useTheme } from 'styled-components' +import styled, { useTheme } from 'styled-components' import ProviderIcon from 'components/utils/Provider' import { Provider } from 'generated/graphql-plural' @@ -50,27 +50,13 @@ export function RepoKindSelector({ stateProps={tabListStateProps} css={{ width: 'fit-content', - position: 'relative', borderRadius: theme.borderRadiuses.medium, - '&::after': { - pointerEvents: 'none', - content: '""', - outline: theme.borders.default, - position: 'absolute', - top: 0, - right: 0, - bottom: 0, - left: 0, - outlineOffset: -1, - borderRadius: theme.borderRadiuses.medium, - }, + outline: theme.borders.default, + outlineOffset: -1, }} > - @@ -82,12 +68,9 @@ export function RepoKindSelector({ color={theme.colors['icon-success']} /> )} - - + @@ -104,13 +87,10 @@ export function RepoKindSelector({ color={theme.colors['icon-success']} /> )} - + {enableFlux ? ( - @@ -122,7 +102,7 @@ export function RepoKindSelector({ color={theme.colors['icon-success']} /> )} - + ) : null} ) } + +const SelectorSubtabSC = styled(SubTab)<{ $active?: boolean }>( + ({ theme, $active }) => ({ + display: 'flex', + gap: theme.spacing.xsmall, + outline: $active ? theme.borders.input : undefined, + outlineOffset: -1, + '&:focus': { outline: theme.borders.input }, + }) +) diff --git a/assets/src/components/cluster/utils.tsx b/assets/src/components/cluster/utils.tsx index 8f220a077f..b94c6b25b0 100644 --- a/assets/src/components/cluster/utils.tsx +++ b/assets/src/components/cluster/utils.tsx @@ -1,23 +1,3 @@ -import { Box, Text } from 'grommet' - -export function Container({ header, children, ...props }) { - return ( - - - {header} - - {children} - - ) -} - export function roundToTwoPlaces(x: number) { return roundTo(x, 2) } diff --git a/assets/src/components/incidents/AttachmentProvider.jsx b/assets/src/components/incidents/AttachmentProvider.jsx deleted file mode 100644 index e7d69334ee..0000000000 --- a/assets/src/components/incidents/AttachmentProvider.jsx +++ /dev/null @@ -1,47 +0,0 @@ -import { Box } from 'grommet' -import React, { useContext, useState } from 'react' -import { DndProvider, useDrop } from 'react-dnd' -import { HTML5Backend, NativeTypes } from 'react-dnd-html5-backend' - -const DROP_BACKGROUND = 'rgba(255, 255, 255, 0.2)' -const FILE_DROP_PROPS = { - border: { color: 'focus', style: 'dashed', size: '2px' }, - background: DROP_BACKGROUND, -} - -export const AttachmentContext = React.createContext({}) - -export function Dropzone({ children }) { - const { setAttachment } = useContext(AttachmentContext) - - const [{ canDrop, isOver }, drop] = useDrop({ - accept: [NativeTypes.FILE], - drop: ({ files }) => setAttachment(files[0]), - collect: (monitor) => ({ - isOver: monitor.isOver(), - canDrop: monitor.canDrop(), - }), - }) - const dragActive = canDrop && isOver - - return ( - - {children} - - ) -} - -export function AttachmentProvider({ children }) { - const [attachment, setAttachment] = useState(null) - - return ( - // eslint-disable-next-line react/jsx-no-constructed-context-values - - {children} - - ) -} diff --git a/assets/src/components/incidents/ClusterInformation.jsx b/assets/src/components/incidents/ClusterInformation.jsx deleted file mode 100644 index 1831a328d0..0000000000 --- a/assets/src/components/incidents/ClusterInformation.jsx +++ /dev/null @@ -1,82 +0,0 @@ -import { - Box, - Table, - TableBody, - TableCell, - TableHeader, - TableRow, - Text, -} from 'grommet' - -function NoInformation() { - return ( - - No cluster information present - - ) -} - -function Header() { - return ( - - - - Name - - - Value - - - - ) -} - -const truncate = (str) => - str && str.length > 20 ? `${str.substring(0, 17)}...` : str - -function Row({ name, value }) { - return ( - - - {name} - - {truncate(value)} - - ) -} - -export function ClusterInformation({ incident: { clusterInformation } }) { - if (!clusterInformation) return - - const { __typename, ...info } = clusterInformation - - return ( - - -
- - {Object.entries(info).map(([key, value]) => ( - - ))} - -
-
- ) -} diff --git a/assets/src/components/incidents/CreateIncident.jsx b/assets/src/components/incidents/CreateIncident.jsx deleted file mode 100644 index ced3ec4fe2..0000000000 --- a/assets/src/components/incidents/CreateIncident.jsx +++ /dev/null @@ -1,269 +0,0 @@ -import { useCallback, useContext, useEffect, useState } from 'react' -import { Box, Text, TextInput } from 'grommet' -import { Button, Check as Checkmark, SecondaryButton } from 'forge-core' -import { Editable, Slate } from 'slate-react' - -import { useMutation, useQuery } from '@apollo/client' - -import { useEditor } from '../utils/hooks' -import { plainDeserialize, plainSerialize } from '../../utils/slate' - -import { RepoIcon } from '../repos/Repositories' - -import { appendConnection, updateCache } from '../../utils/graphql' - -import { TagInput } from '../repos/Tags' - -import { SeveritySelect } from './Severity' -import { CREATE_INCIDENT, INCIDENTS_Q, INSTALLATIONS_Q } from './queries' - -import { StatusSelector } from './IncidentStatus' - -import { IncidentContext } from './context' -import { IncidentViewContext } from './Incidents' - -export function IncidentForm({ - attributes, - setAttributes, - statusEdit, - children, -}) { - const [editorState, setEditorState] = useState( - plainDeserialize(attributes.description || '') - ) - const editor = useEditor() - const setDescription = useCallback( - (editorState) => { - setEditorState(editorState) - setAttributes({ ...attributes, description: plainSerialize(editorState) }) - }, - [setAttributes, attributes, setEditorState] - ) - - return ( - - - - - Title - - - setAttributes({ ...attributes, title: value }) - } - /> - {statusEdit && ( - setAttributes({ ...attributes, status })} - /> - )} - - setAttributes({ ...attributes, severity })} - /> - - - - - - - - - setAttributes({ - ...attributes, - tags: [tag, ...(attributes.tags || [])], - }) - } - removeTag={(tag) => - setAttributes({ - ...attributes, - tags: attributes.tags.filter((t) => t !== tag), - }) - } - /> - {children} - - - ) -} - -export function RepoOption({ repo, selected, setRepository }) { - return ( - setRepository(repo)} - hoverIndicator="light-3" - pad="small" - focusIndicator={false} - > - - - - {repo.name} - - - {repo.description} - - - {selected.id === repo.id && ( - - )} - - ) -} - -export function RepositorySelect({ repository, setRepository }) { - const { data } = useQuery(INSTALLATIONS_Q, { - fetchPolicy: 'cache-and-network', - }) - - useEffect(() => { - if (data && data.installations && !repository) { - const installation = data.installations.edges[0] - - setRepository(installation && installation.node.repository) - } - }, [data, repository, setRepository]) - if (!data || !repository) return null - - return ( - - {data.installations.edges.map(({ node: { repository: repo } }, i) => ( - - ))} - - ) -} - -export function CreateIncident({ onCompleted }) { - const { clusterInformation } = useContext(IncidentContext) - const { sort, order, filters } = useContext(IncidentViewContext) - const [repository, setRepository] = useState(null) - const [attributes, setAttributes] = useState({ - title: '', - description: '', - severity: 4, - tags: [], - }) - const [mutation, { loading }] = useMutation(CREATE_INCIDENT, { - variables: { - repositoryId: repository && repository.id, - attributes: { - ...attributes, - tags: attributes.tags.map((t) => ({ tag: t })), - clusterInformation, - }, - }, - update: (cache, { data: { createIncident } }) => - updateCache(cache, { - query: INCIDENTS_Q, - variables: { - q: null, - filters, - order, - sort, - }, - update: (prev) => appendConnection(prev, createIncident, 'incidents'), - }), - onCompleted, - }) - - return ( - - - - - - - -

-
- + + ) } diff --git a/assets/src/components/layout/NotificationsPanelOverlay.tsx b/assets/src/components/layout/NotificationsPanelOverlay.tsx index f33b15db39..6567f23b1f 100644 --- a/assets/src/components/layout/NotificationsPanelOverlay.tsx +++ b/assets/src/components/layout/NotificationsPanelOverlay.tsx @@ -5,7 +5,6 @@ import { useTransition } from 'react-spring' import styled from 'styled-components' -import { useContentOverlay } from './Overlay' import { NotificationsPanel } from './NotificationsPanel' const PANEL_WIDTH = 480 @@ -60,8 +59,6 @@ export function NotificationsPanelOverlay({ const notificationsPanelRef = useRef() const [all, setAll] = useState(false) - useContentOverlay(isOpen) - useOutsideClick(notificationsPanelRef, () => { setIsOpen(false) }) diff --git a/assets/src/components/login/CurrentUser.tsx b/assets/src/components/login/CurrentUser.tsx index 4b99397dbb..15b9117596 100644 --- a/assets/src/components/login/CurrentUser.tsx +++ b/assets/src/components/login/CurrentUser.tsx @@ -3,8 +3,6 @@ import React from 'react' import gql from 'graphql-tag' import { useQuery } from '@apollo/client' -import { useNotificationSubscription } from '../incidents/Notifications' - const ME_Q = gql` query { me { @@ -30,8 +28,6 @@ export const CurrentUserContext = React.createContext({}) export default function CurrentUser({ children }) { const { loading, error, data } = useQuery(ME_Q) - useNotificationSubscription() - if (loading) return null if (error || !data || !data.me || !data.me.id) { diff --git a/assets/src/components/login/LinkLogin.tsx b/assets/src/components/login/LinkLogin.tsx index 3eab572644..89cd6f9f1f 100644 --- a/assets/src/components/login/LinkLogin.tsx +++ b/assets/src/components/login/LinkLogin.tsx @@ -1,16 +1,18 @@ -import { Box, Text } from 'grommet' import { useEffect } from 'react' import { useMutation } from '@apollo/client' import { useParams } from 'react-router' -import { LoopingLogo } from '@pluralsh/design-system' +import { Flex, LoopingLogo } from '@pluralsh/design-system' import { useNavigate } from 'react-router-dom' +import { useTheme } from 'styled-components' + import { setRefreshToken, setToken } from '../../helpers/auth' import { LOGIN_LINK } from '../graphql/users' import { LoginPortal } from './LoginPortal' export function LinkLogin() { + const theme = useTheme() const navigate = useNavigate() const { key } = useParams() const [mutation, { error }] = useMutation(LOGIN_LINK, { @@ -31,15 +33,14 @@ export function LinkLogin() { if (error) { return ( - - - This login link is invalid - - + +

This login link is invalid

+
+ ) } diff --git a/assets/src/components/login/Login.tsx b/assets/src/components/login/Login.tsx index 9e30570278..3af935692c 100644 --- a/assets/src/components/login/Login.tsx +++ b/assets/src/components/login/Login.tsx @@ -1,8 +1,7 @@ -import { RefObject, useEffect, useMemo, useRef, useState } from 'react' +import { RefObject, useEffect, useRef, useState } from 'react' import { Button, LoopingLogo } from '@pluralsh/design-system' import { Div, Flex, Form, P } from 'honorable' import { useMutation, useQuery } from '@apollo/client' -import { Box } from 'grommet' import { v4 as uuidv4 } from 'uuid' import gql from 'graphql-tag' import { IntercomProps, useIntercom } from 'react-use-intercom' @@ -12,6 +11,8 @@ import { isValidEmail } from 'utils/email' import { User, useMeQuery } from 'generated/graphql' import { useHelpSpacing } from 'components/help/HelpLauncher' +import { useTheme } from 'styled-components' + import { GqlError } from '../utils/Alert' import { setRefreshToken, @@ -21,7 +22,6 @@ import { } from '../../helpers/auth' import { localized } from '../../helpers/hostname' import { ME_Q, SIGNIN } from '../graphql/users' -import { IncidentContext } from '../incidents/context' import { LabelledInput } from '../utils/LabelledInput' import { LoginContextProvider } from '../contexts' import { LoginPortal } from '../login/LoginPortal' @@ -195,12 +195,6 @@ export function EnsureLogin({ children }) { const loginContextValue = data - const incidentContextValue = useMemo(() => { - const { __typename: _, ...clusterInformation } = data?.clusterInfo || {} - - return { clusterInformation } - }, [data?.clusterInfo]) - if (error || (!loading && !data?.clusterInfo)) { return } @@ -208,11 +202,9 @@ export function EnsureLogin({ children }) { if (!data?.clusterInfo) return null return ( - - - {children} - - + + {children} + ) } @@ -252,6 +244,7 @@ function OIDCLogin({ oidcUri, external, oidcName }) { } export default function Login() { + const theme = useTheme() const navigate = useNavigate() const [form, setForm] = useState({ email: '', password: '' }) const emailRef = useRef() @@ -306,9 +299,13 @@ export default function Login() {
- {loginMError && (
@@ -350,7 +347,7 @@ export default function Login() { > Log in - +
) diff --git a/assets/src/components/login/OauthCallback.tsx b/assets/src/components/login/OauthCallback.tsx index 112709d576..a77148a9b8 100644 --- a/assets/src/components/login/OauthCallback.tsx +++ b/assets/src/components/login/OauthCallback.tsx @@ -1,12 +1,10 @@ import { useEffect, useRef } from 'react' import gql from 'graphql-tag' -import { Box } from 'grommet' -import { Alert, AlertStatus } from 'forge-core' import { useLocation } from 'react-router' import qs from 'query-string' import { useMutation } from '@apollo/client' import { useNavigate } from 'react-router-dom' -import { Button } from '@pluralsh/design-system' +import { Button, Callout } from '@pluralsh/design-system' import { useTheme } from 'styled-components' import { GqlError } from 'components/utils/Alert' @@ -33,21 +31,13 @@ const CALLBACK = gql` function OAuthError({ error: { error, error_description: description } }: any) { return ( - - - - - + + {description || + 'You cannot log into this console instance, make sure your Plural user was added to its OIDC provider'}{' '} + ) } diff --git a/assets/src/components/profile/Profile.tsx b/assets/src/components/profile/Profile.tsx index 4c624e4de0..85b2dd0e75 100644 --- a/assets/src/components/profile/Profile.tsx +++ b/assets/src/components/profile/Profile.tsx @@ -1,4 +1,3 @@ -import { Box } from 'grommet' import { Flex, P } from 'honorable' import { Button, @@ -36,7 +35,10 @@ export function Profile() { maxHeight="100%" overflowY="auto" > - + - + - {error && ( {data.temporaryToken} )}

- 2. Have the recipent enter the code into  + 2. Have the recipient enter the code into  .

-
+
) } diff --git a/assets/src/components/profile/SecurityPassword.tsx b/assets/src/components/profile/SecurityPassword.tsx index 5783133ef4..65a4e3ddc3 100644 --- a/assets/src/components/profile/SecurityPassword.tsx +++ b/assets/src/components/profile/SecurityPassword.tsx @@ -1,6 +1,5 @@ -import { Box } from 'grommet' import { Button, Div } from 'honorable' -import { ContentCard, ValidatedInput } from '@pluralsh/design-system' +import { ContentCard, Flex, ValidatedInput } from '@pluralsh/design-system' import { useContext, useState } from 'react' import { UPDATE_USER } from 'components/graphql/users' import { useMutation } from '@apollo/client' @@ -20,7 +19,10 @@ function UpdatePassword({ cancel }: any) { }) return ( - + - - - + + ) } @@ -87,9 +88,9 @@ export default function SecurityPassword() { return ( -
setPass(false)} />}
-
+
) } diff --git a/assets/src/components/runbooks/PinnedRunbooks.jsx b/assets/src/components/runbooks/PinnedRunbooks.jsx deleted file mode 100644 index abab935124..0000000000 --- a/assets/src/components/runbooks/PinnedRunbooks.jsx +++ /dev/null @@ -1,107 +0,0 @@ -import { useContext } from 'react' -import { useQuery } from '@apollo/client' - -import { Box, Text } from 'grommet' - -import { useNavigate } from 'react-router-dom' - -import { chunk } from 'lodash' - -import { InstallationContext } from '../Installations' - -import { Container } from '../utils/Container' - -import { RUNBOOKS_Q } from './queries' - -import { POLL_INTERVAL } from './constants' -import { StatusIcon } from './StatusIcon' - -function RunbookItem({ runbook, namespace, width }) { - const navigate = useNavigate() - const { name, description } = runbook.spec - - return ( - navigate(`/runbooks/${namespace}/${runbook.name}`)} - > - - - - {name} - - - - {description} - - - ) -} - -export function PinnedRunbooks({ border }) { - const { currentApplication } = useContext(InstallationContext) - const { data } = useQuery(RUNBOOKS_Q, { - variables: { namespace: currentApplication.name, pinned: true }, - fetchPolicy: 'cache-and-network', - pollInterval: POLL_INTERVAL, - }) - - if (!data) return null - - const { runbooks } = data - - if (runbooks.length === 0) return null - - return ( - - {/* - - pinned runbooks - */} - - {chunk(runbooks, 3).map((books, ind) => ( - - {books.map((book) => ( - - ))} - - ))} - - - ) -} diff --git a/assets/src/components/runbooks/StatusIcon.jsx b/assets/src/components/runbooks/StatusIcon.jsx deleted file mode 100644 index 4c7aaf379e..0000000000 --- a/assets/src/components/runbooks/StatusIcon.jsx +++ /dev/null @@ -1,252 +0,0 @@ -import React, { useContext, useRef, useState } from 'react' -import { Previous } from 'grommet-icons' -import { Check } from 'forge-core' -import { Box, Drop, Text, ThemeContext } from 'grommet' -import { normalizeColor } from 'grommet/utils' -import moment from 'moment' - -import { ignoreEvent } from 'components/utils/events' - -import { - LabelsAnnotationsRow, - LabelsAnnotationsTag, -} from 'components/cluster/LabelsAnnotations' - -import { SEVERITY_COLORS } from './constants' - -function Warning({ size, color }) { - return ( - - !! - - ) -} - -const ICON_DATA = { - Healthy: { icon: Check, color: 'success' }, - Alert: { icon: Warning, color: 'orange' }, -} - -const shadow = (color, theme) => ({ - boxShadow: `0 0 10px ${normalizeColor(color, theme)}`, -}) - -export function SeverityNub({ sev }) { - return ( - - - {sev} - - - ) -} - -function AlertDetail({ alert, setAlert }) { - const sev = alert.labels.severity || 'info' - const { summary, description, ...rest } = alert.annotations - - return ( - - - { - ignoreEvent(e) - setAlert(null) - }} - > - - - - - {alert.name} - - - - - {summary} - - - {description} - - - {Object.entries(alert.labels).map(([name, value]) => ( - - ))} - - - {Object.entries(rest).map(([name, value]) => ( - - ))} - - - - ) -} - -function Alert({ alert, setAlert }) { - const sev = alert.labels.severity || 'info' - - return ( - { - ignoreEvent(e) - setAlert(alert) - }} - hoverIndicator="tone-light" - > - - - - {alert.name} - - - - {alert.annotations && alert.annotations.summary} - - - - -- {moment(alert.startsAt).format('lll')} - - - - - - ) -} - -function Alerts({ alerts }) { - const len = alerts.length - const [alert, setAlert] = useState(null) - - if (alert) { - return ( - - ) - } - - return ( - - {alerts.map((alert, ind) => ( - - ))} - - ) -} - -export function StatusIcon({ status, size, innerSize }) { - const ref = useRef() - const theme = useContext(ThemeContext) - const [hover, setHover] = useState(false) - const [open, setOpen] = useState(false) - const outer = `${size}px` - const alerts = status ? status.alerts : [] - const healthy = alerts.length === 0 - const { icon, color } = ICON_DATA[healthy ? 'Healthy' : 'Alert'] - - return ( - <> - { - ignoreEvent(e) - if (!healthy) setOpen(true) - }} - onMouseEnter={() => setHover(true)} - onMouseLeave={() => setHover(false)} - style={hover && !healthy ? null : shadow(color, theme)} - > - {React.createElement(icon, { - size: `${innerSize}px`, - color: 'plrl-white', - })} - - {open && !healthy && ( - setOpen(false)} - > - - - )} - - ) -} diff --git a/assets/src/components/runbooks/constants.js b/assets/src/components/runbooks/constants.js deleted file mode 100644 index e2a3eb61cf..0000000000 --- a/assets/src/components/runbooks/constants.js +++ /dev/null @@ -1,7 +0,0 @@ -export const POLL_INTERVAL = 30 * 1000 - -export const SEVERITY_COLORS = { - critical: 'error', - warning: 'orange', - info: 'progress', -} diff --git a/assets/src/components/runbooks/utils.js b/assets/src/components/runbooks/utils.js deleted file mode 100644 index 22baf046a7..0000000000 --- a/assets/src/components/runbooks/utils.js +++ /dev/null @@ -1,20 +0,0 @@ -import { filesize } from 'filesize' -import jp from 'jsonpath' - -import { deepFetch } from '../../utils/graphql' -import { cpuFormat } from '../../utils/kubernetes' - -export const query = (object, path) => jp.query(object, `$.${path}`)[0] - -export const ValueFormats = { - cpu: cpuFormat, - memory: filesize, -} - -export function extract(data, doc) { - if (!doc) return data - - const raw = deepFetch(data, doc) - - return JSON.parse(raw) -} diff --git a/assets/src/components/terminal/ThemeSelector.jsx b/assets/src/components/terminal/ThemeSelector.jsx deleted file mode 100644 index 9de7e2dc34..0000000000 --- a/assets/src/components/terminal/ThemeSelector.jsx +++ /dev/null @@ -1,91 +0,0 @@ -import { useCallback, useState } from 'react' -import { Box, Text, TextInput } from 'grommet' - -import { Button } from 'forge-core' - -import { normalizedThemes, saveTheme } from './themes' - -const COLOR_SIZE = '14px' - -function ThemeColors({ theme }) { - return ( - - {Object.values(theme).map((color, ind) => ( - - ))} - - ) -} - -function ThemeOption({ name, theme }) { - return ( - - - - {name} - - - ) -} - -const filterThemes = (value) => - Object.entries(normalizedThemes) - .filter(([key]) => key.includes(value)) - .map(([key, theme]) => ({ - value: key, - label: ( - - ), - })) - -export function ThemeSelector({ theme }) { - const [value, setValue] = useState(theme) - const currentTheme = normalizedThemes[theme] - const save = useCallback(() => { - saveTheme(value) - window.location.reload() - }, [value]) - - return ( - - - setValue(value)} - onSelect={({ suggestion: { value } }) => setValue(value)} - suggestions={filterThemes(value)} - /> -
)) }) diff --git a/assets/src/components/utils/Avatar.jsx b/assets/src/components/utils/Avatar.jsx deleted file mode 100644 index 9b7565b150..0000000000 --- a/assets/src/components/utils/Avatar.jsx +++ /dev/null @@ -1,43 +0,0 @@ -import { Box, Text } from 'grommet' -import { last } from 'lodash' - -export function initials(name) { - const initials = name.split(' ').map((n) => n.charAt(0).toUpperCase()) - - if (initials.length <= 1) return initials[0] - - return `${initials[0]}${last(initials)}` -} - -export default function Avatar({ - size, - user: { backgroundColor, avatar, profile, name }, - onClick = undefined, - round = '3px', -}) { - const icon = profile || avatar - - return ( - - {!icon && {initials(name)}} - - ) -} diff --git a/assets/src/components/utils/CellMeasurer.js b/assets/src/components/utils/CellMeasurer.js new file mode 100644 index 0000000000..0970e57a50 --- /dev/null +++ b/assets/src/components/utils/CellMeasurer.js @@ -0,0 +1,125 @@ +// forked from https://github.com/pluralsh/forge-core/blob/main/src/components/CellMeasurer.js +// only so we could remove forge-core and grommet +// this is only used by the old scroller component, which should be deprecated replaced with a table at some point + +import * as React from 'react' +import { findDOMNode } from 'react-dom' + +/** + * Wraps a cell and measures its rendered content. + * Measurements are stored in a per-cell cache. + * Cached-content is not be re-measured. + */ +export class CellMeasurer extends React.PureComponent { + static __internalCellMeasurerFlag = false + + _child = null + + componentDidMount() { + this.refreshOn = null + this._maybeMeasureCell() + } + + componentDidUpdate() { + this._maybeMeasureCell() + } + + render() { + const { children } = this.props + + return typeof children === 'function' + ? children({ + measure: this._measure, + registerChild: this._registerChild, + }) + : children + } + + _getCellMeasurements() { + // eslint-disable-next-line react/no-find-dom-node + const node = this._child || findDOMNode(this) + + // TODO Check for a bad combination of fixedWidth and missing numeric width or vice versa with height + + if ( + node && + node.ownerDocument && + node.ownerDocument.defaultView && + node instanceof node.ownerDocument.defaultView.HTMLElement + ) { + const styleWidth = node.style.width + const styleHeight = node.style.height + + // If we are re-measuring a cell that has already been measured, + // It will have a hard-coded width/height from the previous measurement. + // The fact that we are measuring indicates this measurement is probably stale, + // So explicitly clear it out (eg set to "auto") so we can recalculate. + // See issue #593 for more info. + // Even if we are measuring initially- if we're inside of a MultiGrid component, + // Explicitly clear width/height before measuring to avoid being tainted by another Grid. + // eg top/left Grid renders before bottom/right Grid + // Since the CellMeasurerCache is shared between them this taints derived cell size values. + // if (!cache.hasFixedWidth()) { + // node.style.width = 'auto'; + // } + node.style.height = 'auto' + + const height = Math.ceil(node.offsetHeight) + const width = Math.ceil(node.offsetWidth) + + // Reset after measuring to avoid breaking styles; see #660 + if (styleWidth) { + node.style.width = styleWidth + } + if (styleHeight) { + node.style.height = styleHeight + } + + return { height, width } + } + + return { height: 0, width: 0 } + } + + _maybeMeasureCell() { + const { rowIndex = this.props.index || 0, refreshKey, setSize } = this.props + + if (this.refreshOn !== refreshKey) { + this.refreshOn = refreshKey + const { height } = this._getCellMeasurements() + + setSize(rowIndex, height) + + // // If size has changed, let Grid know to re-render. + // if ( + // parent && + // typeof parent.invalidateCellSizeAfterRender === 'function' + // ) { + // parent.invalidateCellSizeAfterRender({ + // columnIndex, + // rowIndex, + // }); + // } + } + } + + _measure = () => { + const { rowIndex = this.props.index || 0, setSize } = this.props + + const { height } = this._getCellMeasurements() + + setSize(rowIndex, height) + } + + _registerChild = (element) => { + if (element && !(element instanceof Element)) { + console.warn( + 'CellMeasurer registerChild expects to be passed Element or null' + ) + } + this._child = element + if (element) { + this._maybeMeasureCell() + } + } +} diff --git a/assets/src/components/utils/Container.jsx b/assets/src/components/utils/Container.jsx deleted file mode 100644 index 751b271281..0000000000 --- a/assets/src/components/utils/Container.jsx +++ /dev/null @@ -1,35 +0,0 @@ -import { useContext } from 'react' -import { Box, ThemeContext } from 'grommet' - -import { normalizeColor } from 'grommet/utils' - -import { alpha } from '../../utils/color' - -export const boxShadow = (theme) => ({ - boxShadow: `2px 2px 2px ${alpha( - normalizeColor('backgroundDark', theme), - 0.3 - )}`, -}) - -export function Container({ onClick, gap, children, ...rest }) { - const theme = useContext(ThemeContext) - - return ( - - {children} - - ) -} diff --git a/assets/src/components/utils/Graph.tsx b/assets/src/components/utils/Graph.tsx index be2331b980..9859102083 100644 --- a/assets/src/components/utils/Graph.tsx +++ b/assets/src/components/utils/Graph.tsx @@ -1,13 +1,12 @@ -import { Key, useContext, useMemo, useState } from 'react' import { ResponsiveLine } from '@nivo/line' -import moment from 'moment' -import { last } from 'lodash' -import { Box, Text, ThemeContext } from 'grommet' import { Card } from '@pluralsh/design-system' -import { useColorMap } from 'utils/color' import { Flex, Span } from 'honorable' -import { DEFAULT_THEME } from 'theme' +import { last } from 'lodash' +import moment from 'moment' +import { Key, useMemo, useState } from 'react' import { DefaultTheme, useTheme } from 'styled-components' +import { DEFAULT_THEME } from 'theme' +import { COLORS } from 'utils/color' export function dateFormat(date) { return moment(date).format('MM/DD h:mm:ss a') @@ -37,23 +36,6 @@ const graphTheme = (theme: DefaultTheme) => ({ }, }) -export function GraphHeader({ text }) { - return ( - - - {text} - - - ) -} - function SliceTooltip({ point: { serieColor, serieId, data } }) { return ( (null) const graph = useMemo(() => { if (data.find(({ id }) => id === selected)) { @@ -101,7 +81,8 @@ export function Graph({ return data }, [data, selected]) - if (graph.length === 0) return no data + if (graph.length === 0) + return no data const hasData = !!graph[0].data[0] @@ -128,7 +109,7 @@ export function Graph({ stacked: true, reverse: false, }} - colors={colors} + colors={COLORS} yFormat={yFormat} xFormat={dateFormat} tooltip={SliceTooltip} @@ -169,19 +150,19 @@ export function Graph({ itemHeight: 20, symbolSize: 12, symbolShape: 'circle', - itemTextColor: styledTheme.colors['text-xlight'], + itemTextColor: theme.colors['text-xlight'], effects: [ { on: 'hover', style: { itemBackground: 'rgba(0, 0, 0, .03)', - itemTextColor: styledTheme.colors['text-light'], + itemTextColor: theme.colors['text-light'], }, }, ], }, ]} - theme={graphTheme(styledTheme)} + theme={graphTheme(theme)} /> ) } diff --git a/assets/src/components/utils/Info.tsx b/assets/src/components/utils/Info.tsx index 3bf689c5e9..612077d7b6 100644 --- a/assets/src/components/utils/Info.tsx +++ b/assets/src/components/utils/Info.tsx @@ -1,16 +1,15 @@ -import { Box } from 'grommet' import { useTheme } from 'styled-components' -export function Info({ text, description, ...box }: any) { +export function Info({ text, description, ...props }: any) { const theme = useTheme() return ( - {text} {description} - + ) } diff --git a/assets/src/components/utils/LegacyScroller.jsx b/assets/src/components/utils/LegacyScroller.jsx deleted file mode 100644 index 6aa15e5c1a..0000000000 --- a/assets/src/components/utils/LegacyScroller.jsx +++ /dev/null @@ -1,221 +0,0 @@ -import React, { useCallback, useEffect, useRef, useState } from 'react' -import { Box } from 'grommet' -import InfiniteLoader from 'react-window-infinite-loader' -import { VariableSizeList } from 'react-window' -import Autosizer from 'react-virtualized-auto-sizer' -import memoize from 'memoize-one' -import { CellMeasurer } from 'forge-core' - -function shallowDiffers(prev, next) { - for (const attribute in prev) { - if (!(attribute in next)) { - return true - } - } - for (const attribute in next) { - if (prev[attribute] !== next[attribute]) { - return true - } - } - - return false -} - -function areEqual(prevProps, nextProps) { - const { style: prevStyle, ...prevRest } = prevProps - const { style: nextStyle, ...nextRest } = nextProps - - return ( - !shallowDiffers(prevStyle, nextStyle) && !shallowDiffers(prevRest, nextRest) - ) -} - -const Item = ({ - index, - mapper, - parentRef, - isItemLoaded, - placeholder, - items, - style, -}) => { - if (!isItemLoaded(index)) { - return placeholder && placeholder(index) - } - - return mapper(items[index], items[index + 1] || {}, parentRef, style) -} - -const ItemWrapper = React.memo( - ({ - data: { setSize, width, refreshKey, items, ...rest }, - style, - index, - ...props - }) => { - const [rowRef, setRowRef] = useState(null) - const item = items[index] - - useEffect(() => { - if (!rowRef) return - const onTimeout = () => { - setSize(index, rowRef.getBoundingClientRect().height) - } - - onTimeout() - const timeouts = [10, 50, 100, 500, 1000].map((timeout) => - setTimeout(onTimeout, timeout) - ) - - return () => timeouts.map(clearTimeout) - }, [rowRef, width, item, index]) - - return ( - - {({ registerChild }) => ( -
- { - registerChild(ref) - setRowRef(ref) - }} - margin={index === 0 ? { bottom: 'small' } : null} - > - - -
- )} -
- ) - }, - areEqual -) - -const buildItemData = memoize( - ( - setSize, - mapper, - isItemLoaded, - items, - parentRef, - width, - placeholder, - refreshKey, - props - ) => ({ - setSize, - mapper, - isItemLoaded, - items, - parentRef, - width, - placeholder, - refreshKey, - ...props, - }) -) - -export default function SmoothScroller({ - hasNextPage, - placeholder, - loading, - items, - loadNextPage, - mapper, - listRef, - setListRef, - setLoader, - handleScroll, - refreshKey, - ...props -}) { - const sizeMap = useRef({}) - const mounted = useRef(false) - const loader = useRef() - const setSize = useCallback( - (index, size) => { - sizeMap.current = { ...sizeMap.current, [index]: size } - if (listRef) listRef.resetAfterIndex(index, true) - }, - [sizeMap, listRef] - ) - const getSize = useCallback( - (index) => sizeMap.current[index] || 50, - [sizeMap] - ) - const count = items.length - const itemCount = hasNextPage ? count + 7 : count - const loadMoreItems = loading ? () => {} : loadNextPage - const isItemLoaded = useCallback( - (index) => !hasNextPage || index < count, - [hasNextPage, count] - ) - - useEffect(() => { - if (loader.current && mounted.current) { - loader.current.resetloadMoreItemsCache() - } - mounted.current = true - if (loader.current) setLoader(loader.current) - }, [refreshKey, mounted, loader, setLoader]) - - return ( - - {({ onItemsRendered, ref }) => ( - - {({ height, width }) => ( - `${refreshKey}:${index}`} - itemData={buildItemData( - setSize, - mapper, - isItemLoaded, - items, - listRef, - width, - placeholder, - refreshKey, - props - )} - onScroll={({ scrollOffset }) => - handleScroll && handleScroll(scrollOffset > height / 2) - } - onItemsRendered={(ctx) => { - if (props.onRendered) props.onRendered(ctx) - onItemsRendered(ctx) - }} - ref={(listRef) => { - if (setListRef) setListRef(listRef) - ref(listRef) - }} - {...props} - > - {ItemWrapper} - - )} - - )} - - ) -} diff --git a/assets/src/components/utils/Modal.jsx b/assets/src/components/utils/Modal.jsx deleted file mode 100644 index a1ea224162..0000000000 --- a/assets/src/components/utils/Modal.jsx +++ /dev/null @@ -1,48 +0,0 @@ -import { Box, Text } from 'grommet' -import { Close } from 'grommet-icons' - -export function ModalHeader({ text, setOpen }) { - return ( - - - - {text} - - - setOpen(false)} - > - - - - ) -} - -export function ModalContent({ pad, children, ...props }) { - return ( - - {children} - - ) -} diff --git a/assets/src/components/utils/SearchIcon.jsx b/assets/src/components/utils/SearchIcon.jsx deleted file mode 100644 index 7a75960987..0000000000 --- a/assets/src/components/utils/SearchIcon.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import { Box, Text } from 'grommet' - -export function SearchIcon({ border, size }) { - return ( - - - / - - - ) -} diff --git a/assets/src/components/utils/SmoothScroller.jsx b/assets/src/components/utils/SmoothScroller.jsx index f9f54836a8..2811b203b5 100644 --- a/assets/src/components/utils/SmoothScroller.jsx +++ b/assets/src/components/utils/SmoothScroller.jsx @@ -12,7 +12,8 @@ import { } from 'react-window' import Autosizer from 'react-virtualized-auto-sizer' import memoize from 'memoize-one' -import { CellMeasurer } from 'forge-core' + +import { CellMeasurer } from './CellMeasurer' class SmartLoader extends PureComponent { _listRef = null diff --git a/assets/src/components/utils/Tooltip.jsx b/assets/src/components/utils/Tooltip.jsx deleted file mode 100644 index 51f22a387c..0000000000 --- a/assets/src/components/utils/Tooltip.jsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Box, Drop } from 'grommet' - -export function Tooltip({ - children, - background, - align, - target, - side, - ...props -}) { - return ( - - - {children} - - - ) -} diff --git a/assets/src/components/vpn/actions/Download.tsx b/assets/src/components/vpn/actions/Download.tsx index 6a1a890455..594e660815 100644 --- a/assets/src/components/vpn/actions/Download.tsx +++ b/assets/src/components/vpn/actions/Download.tsx @@ -1,8 +1,9 @@ import { Dispatch, ReactElement, useEffect } from 'react' -import { Layer } from 'grommet' import { useQuery } from '@apollo/client' import LoadingIndicator from 'components/utils/LoadingIndicator' +import { Modal } from '@pluralsh/design-system' + import { WireguardPeer } from '../graphql/queries' import { RootQueryType, @@ -31,9 +32,12 @@ function DownloadConfig({ name, onClose }: DownloadConfigProps): ReactElement { }, [name, wireguardPeer?.config, onClose]) return ( - + - + ) } diff --git a/assets/src/index.css b/assets/src/index.css index 30ee385430..4b23359fdc 100644 --- a/assets/src/index.css +++ b/assets/src/index.css @@ -12,8 +12,7 @@ body { overflow: auto hidden; } -#root, -.grommet-root { +#root { align-items: stretch; display: flex; flex-direction: column; diff --git a/assets/src/utils/color.ts b/assets/src/utils/color.ts index db43a3323e..aab44080d8 100644 --- a/assets/src/utils/color.ts +++ b/assets/src/utils/color.ts @@ -1,6 +1,3 @@ -import { normalizeColor } from 'grommet/utils' -import { useMemo } from 'react' - export const COLORS = [ '#99DAFF', '#D596F4', @@ -51,10 +48,3 @@ export function shadeColor(color, percent) { .toString(16) .slice(1)}` } - -export function useColorMap(theme, colors = COLORS) { - return useMemo( - () => colors.map((c) => normalizeColor(c, theme)), - [theme, colors] - ) -} diff --git a/assets/tsconfig.eslint.json b/assets/tsconfig.eslint.json index d1c5c44bbd..b847a7bbe1 100644 --- a/assets/tsconfig.eslint.json +++ b/assets/tsconfig.eslint.json @@ -6,5 +6,6 @@ "noEmit": true, "allowJs": true }, - "include": ["src/**/*", "vite.config.ts", "vitest.config.ts", ".eslintrc.js"] + "include": ["src", "vite.config.mts", "vitest.config.mts", ".eslintrc.js"], + "exclude": ["src/archive"] } diff --git a/assets/tsconfig.json b/assets/tsconfig.json index 1e70a06da8..bdb6e1d051 100644 --- a/assets/tsconfig.json +++ b/assets/tsconfig.json @@ -20,4 +20,5 @@ "types": ["vite/client", "vitest/globals"] }, "include": ["src"], + "exclude": ["src/archive"] } diff --git a/assets/vite.config.mts b/assets/vite.config.mts index 225b3a5481..3623366cd7 100644 --- a/assets/vite.config.mts +++ b/assets/vite.config.mts @@ -1,9 +1,9 @@ -import {defineConfig, mergeConfig, splitVendorChunkPlugin} from 'vite' +import { defineConfig, mergeConfig, splitVendorChunkPlugin } from 'vite' import react from '@vitejs/plugin-react' import basicSsl from '@vitejs/plugin-basic-ssl' import tsconfigPaths from 'vite-tsconfig-paths' import pluginRewriteAll from 'vite-plugin-rewrite-all' -import {VitePWA} from 'vite-plugin-pwa' +import { VitePWA } from 'vite-plugin-pwa' import vitestConfig from './vitest.config.mjs' @@ -73,9 +73,9 @@ export default defineConfig(() => if (id.includes('lodash')) { return 'lodash' } - } - } - } + }, + }, + }, }, }) ) diff --git a/assets/yarn.lock b/assets/yarn.lock index 590e50564c..14ac779a64 100644 --- a/assets/yarn.lock +++ b/assets/yarn.lock @@ -805,7 +805,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.0.0, @babel/plugin-proposal-class-properties@npm:^7.10.4": +"@babel/plugin-proposal-class-properties@npm:^7.0.0": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" dependencies: @@ -1971,7 +1971,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.25.0 resolution: "@babel/runtime@npm:7.25.0" dependencies: @@ -2177,7 +2177,7 @@ __metadata: languageName: node linkType: hard -"@emotion/babel-plugin@npm:^11.11.0, @emotion/babel-plugin@npm:^11.12.0": +"@emotion/babel-plugin@npm:^11.11.0": version: 11.12.0 resolution: "@emotion/babel-plugin@npm:11.12.0" dependencies: @@ -2208,7 +2208,7 @@ __metadata: languageName: node linkType: hard -"@emotion/cache@npm:^11.11.0, @emotion/cache@npm:^11.13.0, @emotion/cache@npm:^11.4.0": +"@emotion/cache@npm:^11.11.0": version: 11.13.1 resolution: "@emotion/cache@npm:11.13.1" dependencies: @@ -2279,27 +2279,6 @@ __metadata: languageName: node linkType: hard -"@emotion/react@npm:^11.1.1": - version: 11.13.0 - resolution: "@emotion/react@npm:11.13.0" - dependencies: - "@babel/runtime": ^7.18.3 - "@emotion/babel-plugin": ^11.12.0 - "@emotion/cache": ^11.13.0 - "@emotion/serialize": ^1.3.0 - "@emotion/use-insertion-effect-with-fallbacks": ^1.1.0 - "@emotion/utils": ^1.4.0 - "@emotion/weak-memoize": ^0.4.0 - hoist-non-react-statics: ^3.3.1 - peerDependencies: - react: ">=16.8.0" - peerDependenciesMeta: - "@types/react": - optional: true - checksum: aa6bff49ac0c15a97cc310a36e89146c4851dcb84ba25bc284d68e19a9b9d5d78235b74915a58404d59cfa369ddaf33dc280d881ca089e4ad70310dce87e0853 - languageName: node - linkType: hard - "@emotion/serialize@npm:^0.11.15, @emotion/serialize@npm:^0.11.16": version: 0.11.16 resolution: "@emotion/serialize@npm:0.11.16" @@ -2313,7 +2292,7 @@ __metadata: languageName: node linkType: hard -"@emotion/serialize@npm:^1.1.2, @emotion/serialize@npm:^1.2.0, @emotion/serialize@npm:^1.3.0": +"@emotion/serialize@npm:^1.1.2, @emotion/serialize@npm:^1.2.0": version: 1.3.0 resolution: "@emotion/serialize@npm:1.3.0" dependencies: @@ -2381,7 +2360,7 @@ __metadata: languageName: node linkType: hard -"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1, @emotion/use-insertion-effect-with-fallbacks@npm:^1.1.0": +"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1": version: 1.1.0 resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.1.0" peerDependencies: @@ -4302,9 +4281,9 @@ __metadata: languageName: node linkType: hard -"@pluralsh/design-system@npm:3.62.1": - version: 3.62.1 - resolution: "@pluralsh/design-system@npm:3.62.1" +"@pluralsh/design-system@npm:3.64.0": + version: 3.64.0 + resolution: "@pluralsh/design-system@npm:3.64.0" dependencies: "@floating-ui/react-dom-interactions": 0.13.3 "@loomhq/loom-embed": 1.5.0 @@ -4324,13 +4303,11 @@ __metadata: babel-plugin-styled-components: 2.1.4 chroma-js: 2.4.2 classnames: 2.3.2 - grommet: 2.34.2 highlight.js: 11.9.0 honorable-recipe-mapper: 0.2.0 immer: 10.0.3 lodash-es: 4.17.21 moment: 2.29.4 - prop-types: 15.8.1 react-animate-height: 3.2.3 react-aria: 3.31.1 react-embed: 3.7.0 @@ -4353,7 +4330,7 @@ __metadata: react-dom: ">=18.3.1" react-transition-group: ">=4.4.5" styled-components: ">=5.3.11" - checksum: da5840974e5fa6b0b6e2ff2b43f62fd4b887faf0057feb9930dafff8d8fb8d5757a4ab6f3208a99423c0edac4f22e25f7588207add0a939ebbc4bb30cc3010b1 + checksum: c0c9908f28f33ae7c2217a4ed1bf9e31515012c1d284f05e3ebf1c5850e4915aa19ab12e7724b8ed64c13ad5c2aa951e3b1a047790b11e7942cbe64bd8b305bf languageName: node linkType: hard @@ -8364,18 +8341,6 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^5.0.0": - version: 5.5.2 - resolution: "ajv@npm:5.5.2" - dependencies: - co: ^4.6.0 - fast-deep-equal: ^1.0.0 - fast-json-stable-stringify: ^2.0.0 - json-schema-traverse: ^0.3.0 - checksum: a69645c843e1676b0ae1c5192786e546427f808f386d26127c6585479378066c64341ceec0b127b6789d79628e71d2a732d402f575b98f9262db230d7b715a94 - languageName: node - linkType: hard - "ajv@npm:^6.12.4": version: 6.12.6 resolution: "ajv@npm:6.12.6" @@ -8915,15 +8880,6 @@ __metadata: languageName: node linkType: hard -"async@npm:^2.4.1": - version: 2.6.4 - resolution: "async@npm:2.6.4" - dependencies: - lodash: ^4.17.14 - checksum: a52083fb32e1ebe1d63e5c5624038bb30be68ff07a6c8d7dfe35e47c93fc144bd8652cbec869e0ac07d57dde387aa5f1386be3559cdee799cb1f789678d88e19 - languageName: node - linkType: hard - "async@npm:^3.2.0, async@npm:^3.2.3": version: 3.2.5 resolution: "async@npm:3.2.5" @@ -9022,17 +8978,6 @@ __metadata: languageName: node linkType: hard -"babel-helper-builder-react-jsx@npm:^6.24.1": - version: 6.26.0 - resolution: "babel-helper-builder-react-jsx@npm:6.26.0" - dependencies: - babel-runtime: ^6.26.0 - babel-types: ^6.26.0 - esutils: ^2.0.2 - checksum: 1a2c4ab7aea9236ccaa874e41702508383f58418cd8a210259240b537a21764c152a64bcd183ad2d141a4b643651116ffab25994470ff01771d456ff865d6d72 - languageName: node - linkType: hard - "babel-plugin-emotion@npm:^10.0.27": version: 10.2.2 resolution: "babel-plugin-emotion@npm:10.2.2" @@ -9073,19 +9018,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-module-resolver@npm:^4.0.0": - version: 4.1.0 - resolution: "babel-plugin-module-resolver@npm:4.1.0" - dependencies: - find-babel-config: ^1.2.0 - glob: ^7.1.6 - pkg-up: ^3.1.0 - reselect: ^4.0.0 - resolve: ^1.13.1 - checksum: 3907fba21ca3c66a081e01fbd16bb09c84781749db16aa57805becc376bb5ee8dc373d4b209613e1453d30ea6c836d13073e9e7b6d239ff1806dd1763a9ab18f - languageName: node - linkType: hard - "babel-plugin-polyfill-corejs2@npm:^0.4.10, babel-plugin-polyfill-corejs2@npm:^0.4.6": version: 0.4.11 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.11" @@ -9160,20 +9092,13 @@ __metadata: languageName: node linkType: hard -"babel-plugin-syntax-jsx@npm:^6.18.0, babel-plugin-syntax-jsx@npm:^6.8.0": +"babel-plugin-syntax-jsx@npm:^6.18.0": version: 6.18.0 resolution: "babel-plugin-syntax-jsx@npm:6.18.0" checksum: 0c7ce5b81d6cfc01a7dd7a76a9a8f090ee02ba5c890310f51217ef1a7e6163fb7848994bbc14fd560117892e82240df9c7157ad0764da67ca5f2afafb73a7d27 languageName: node linkType: hard -"babel-plugin-syntax-object-rest-spread@npm:^6.8.0": - version: 6.13.0 - resolution: "babel-plugin-syntax-object-rest-spread@npm:6.13.0" - checksum: 14083f2783c760f5f199160f48e42ad4505fd35fc7cf9c4530812b176705259562b77db6d3ddc5e3cbce9e9b2b61ec9db3065941f0949b68e77cae3e395a6eef - languageName: node - linkType: hard - "babel-plugin-syntax-trailing-function-commas@npm:^7.0.0-beta.0": version: 7.0.0-beta.0 resolution: "babel-plugin-syntax-trailing-function-commas@npm:7.0.0-beta.0" @@ -9181,27 +9106,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-transform-object-rest-spread@npm:^6.26.0": - version: 6.26.0 - resolution: "babel-plugin-transform-object-rest-spread@npm:6.26.0" - dependencies: - babel-plugin-syntax-object-rest-spread: ^6.8.0 - babel-runtime: ^6.26.0 - checksum: aad583fb0d08073678838f77fa822788b9a0b842ba33e34f8d131246852f7ed31cfb5fdf57644dec952f84dcae862a27dbf3d12ccbee6bdb0aed6e7ed13ca9ba - languageName: node - linkType: hard - -"babel-plugin-transform-react-jsx@npm:^6.24.1": - version: 6.24.1 - resolution: "babel-plugin-transform-react-jsx@npm:6.24.1" - dependencies: - babel-helper-builder-react-jsx: ^6.24.1 - babel-plugin-syntax-jsx: ^6.8.0 - babel-runtime: ^6.22.0 - checksum: fa91aeda9cdcb33d28c4757ebf302430173a854a833e17a5acdd66442247c38e815ee4ae8d4a44b44a7238bca0c04b4794a61fe2372b88ee668e260b51aa2544 - languageName: node - linkType: hard - "babel-polyfill@npm:6.26.0": version: 6.26.0 resolution: "babel-polyfill@npm:6.26.0" @@ -9250,7 +9154,7 @@ __metadata: languageName: node linkType: hard -"babel-runtime@npm:6.26.0, babel-runtime@npm:^6.22.0, babel-runtime@npm:^6.26.0": +"babel-runtime@npm:6.26.0, babel-runtime@npm:^6.26.0": version: 6.26.0 resolution: "babel-runtime@npm:6.26.0" dependencies: @@ -9260,18 +9164,6 @@ __metadata: languageName: node linkType: hard -"babel-types@npm:^6.26.0": - version: 6.26.0 - resolution: "babel-types@npm:6.26.0" - dependencies: - babel-runtime: ^6.26.0 - esutils: ^2.0.2 - lodash: ^4.17.4 - to-fast-properties: ^1.0.3 - checksum: d16b0fa86e9b0e4c2623be81d0a35679faff24dd2e43cde4ca58baf49f3e39415a011a889e6c2259ff09e1228e4c3a3db6449a62de59e80152fe1ce7398fde76 - languageName: node - linkType: hard - "bail@npm:^2.0.0": version: 2.0.2 resolution: "bail@npm:2.0.2" @@ -9309,13 +9201,6 @@ __metadata: languageName: node linkType: hard -"big.js@npm:^5.2.2": - version: 5.2.2 - resolution: "big.js@npm:5.2.2" - checksum: b89b6e8419b097a8fb4ed2399a1931a68c612bce3cfd5ca8c214b2d017531191070f990598de2fc6f3f993d91c0f08aa82697717f6b3b8732c9731866d233c9e - languageName: node - linkType: hard - "bl@npm:^4.1.0": version: 4.1.0 resolution: "bl@npm:4.1.0" @@ -10005,13 +9890,6 @@ __metadata: languageName: node linkType: hard -"co@npm:^4.6.0": - version: 4.6.0 - resolution: "co@npm:4.6.0" - checksum: 5210d9223010eb95b29df06a91116f2cf7c8e0748a9013ed853b53f362ea0e822f1e5bb054fb3cefc645239a4cf966af1f6133a3b43f40d591f3b68ed6cf0510 - languageName: node - linkType: hard - "color-convert@npm:^1.9.0": version: 1.9.3 resolution: "color-convert@npm:1.9.3" @@ -10185,7 +10063,7 @@ __metadata: "@nivo/pie": 0.83.0 "@nivo/radial-bar": 0.83.0 "@nivo/tooltip": 0.83.0 - "@pluralsh/design-system": 3.62.1 + "@pluralsh/design-system": 3.64.0 "@pluralsh/eslint-config-typescript": 2.5.150 "@pluralsh/stylelint-config": 2.0.10 "@react-hooks-library/core": 0.6.0 @@ -10234,10 +10112,7 @@ __metadata: eslint-plugin-react: 7.33.2 eslint-plugin-react-hooks: 4.6.0 filesize: 10.0.12 - forge-core: 1.4.6 fuse.js: 6.6.2 - grommet: 2.34.2 - grommet-icons: 4.10.0 highlight.js: 11.9.0 honorable: 1.0.0-beta.17 honorable-theme-default: 1.0.0-beta.5 @@ -11512,13 +11387,6 @@ __metadata: languageName: node linkType: hard -"emojis-list@npm:^3.0.0": - version: 3.0.0 - resolution: "emojis-list@npm:3.0.0" - checksum: ddaaa02542e1e9436c03970eeed445f4ed29a5337dfba0fe0c38dfdd2af5da2429c2a0821304e8a8d1cadf27fdd5b22ff793571fa803ae16852a6975c65e8e70 - languageName: node - linkType: hard - "emotion@npm:^10.0.14": version: 10.0.27 resolution: "emotion@npm:10.0.27" @@ -12582,20 +12450,6 @@ __metadata: languageName: node linkType: hard -"extract-text-webpack-plugin@npm:^3.0.2": - version: 3.0.2 - resolution: "extract-text-webpack-plugin@npm:3.0.2" - dependencies: - async: ^2.4.1 - loader-utils: ^1.1.0 - schema-utils: ^0.3.0 - webpack-sources: ^1.0.1 - peerDependencies: - webpack: ^3.1.0 - checksum: b3a39b58d8827ea09507c2cf3aec4c154bd0ce54d708f9ec4d0d26d3fa0238cc1c62d023bba48ed5df179cebe029fb8ef50dbbb44cc818023f8db3781b65fce7 - languageName: node - linkType: hard - "extract-zip@npm:2.0.1": version: 2.0.1 resolution: "extract-zip@npm:2.0.1" @@ -12648,13 +12502,6 @@ __metadata: languageName: node linkType: hard -"fast-deep-equal@npm:^1.0.0": - version: 1.1.0 - resolution: "fast-deep-equal@npm:1.1.0" - checksum: 69b4c9534d9805f13a341aa72f69641d0b9ae3cc8beb25c64e68a257241c7bb34370266db27ae4fc3c4da0518448c01a5f587a096a211471c86a38facd9a1486 - languageName: node - linkType: hard - "fast-diff@npm:^1.1.2": version: 1.3.0 resolution: "fast-diff@npm:1.3.0" @@ -12866,16 +12713,6 @@ __metadata: languageName: node linkType: hard -"find-babel-config@npm:^1.2.0": - version: 1.2.2 - resolution: "find-babel-config@npm:1.2.2" - dependencies: - json5: ^1.0.2 - path-exists: ^3.0.0 - checksum: 9dd8ef0f47c5d83f6bf4106c1e21c6e62dd8b11d32ce0df3700b141ca119c63bd849cc3ade7e54c39c8a235b9c2a6ac598acda801f82582514b7b9c64027771d - languageName: node - linkType: hard - "find-root@npm:^1.1.0": version: 1.1.0 resolution: "find-root@npm:1.1.0" @@ -12883,15 +12720,6 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^3.0.0": - version: 3.0.0 - resolution: "find-up@npm:3.0.0" - dependencies: - locate-path: ^3.0.0 - checksum: 38eba3fe7a66e4bc7f0f5a1366dc25508b7cfc349f852640e3678d26ad9a6d7e2c43eff0a472287de4a9753ef58f066a0ea892a256fa3636ad51b3fe1e17fae9 - languageName: node - linkType: hard - "find-up@npm:^4.1.0": version: 4.1.0 resolution: "find-up@npm:4.1.0" @@ -12980,34 +12808,6 @@ __metadata: languageName: node linkType: hard -"forge-core@npm:1.4.6": - version: 1.4.6 - resolution: "forge-core@npm:1.4.6" - dependencies: - "@babel/plugin-proposal-class-properties": ^7.10.4 - babel-plugin-module-resolver: ^4.0.0 - babel-plugin-transform-object-rest-spread: ^6.26.0 - babel-plugin-transform-react-jsx: ^6.24.1 - extract-text-webpack-plugin: ^3.0.2 - react: ^16.13.1 - react-dom: ^16.13.1 - react-select: ^4.3.1 - styled-components: ^5.1.1 - peerDependencies: - grommet: ^2.14.0 - grommet-icons: ^4.4.0 - lodash: ^4.17.19 - react: ^16.13.1 - react-collapsible: ^2.8.0 - react-copy-to-clipboard: ^5.0.2 - react-dom: ^16.13.1 - react-is: ^16.13.1 - react-spinners: ^0.13.3 - styled-components: ^5.1.1 - checksum: e895103fcd78550e944ea90e7574e3510ed0572c65026d6927d64a8aa8ee9b89bd02413e1119508e61b2a36a358ffa76becd6b907f7e100a0e6df7dfce9153c6 - languageName: node - linkType: hard - "form-data@npm:^4.0.0": version: 4.0.0 resolution: "form-data@npm:4.0.0" @@ -13446,57 +13246,6 @@ __metadata: languageName: node linkType: hard -"grommet-icons@npm:4.10.0": - version: 4.10.0 - resolution: "grommet-icons@npm:4.10.0" - dependencies: - grommet-styles: ^0.2.0 - peerDependencies: - react: ^16.6.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.6.0 || ^17.0.0 || ^18.0.0 - styled-components: ">= 5.x" - checksum: 69745341a65f4e4d05bd5b207f7243b5ffa54d13a8195093cae7fb32d57b38ab55ed30cfee341b9f1f659b99743f721ee04c7ab9decd7dd7f171fcc4947af048 - languageName: node - linkType: hard - -"grommet-icons@npm:^4.10.0": - version: 4.12.1 - resolution: "grommet-icons@npm:4.12.1" - peerDependencies: - react: ^16.6.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.6.0 || ^17.0.0 || ^18.0.0 - styled-components: ">= 5.x" - checksum: 2cacc5c45b2b7a8633564f084f28fa9c2cb1ae30e2c8865523353da6f407b9c52df8c6f2462b9c478b667bbff9a2bc9ef10f9597fdc83445b8f1879803a47f42 - languageName: node - linkType: hard - -"grommet-styles@npm:^0.2.0": - version: 0.2.0 - resolution: "grommet-styles@npm:0.2.0" - peerDependencies: - react: ">= 16.4.1" - react-dom: ">= 16.4.1" - styled-components: ">= 4.X" - checksum: 7b29e6fd773a29a9f7b48e5b0a163e1c51b3b196891228d88a0e5b99faab4ece03b5410a97665105fe886402016a337237b956d5f46af06ec2e06e2b328a0757 - languageName: node - linkType: hard - -"grommet@npm:2.34.2": - version: 2.34.2 - resolution: "grommet@npm:2.34.2" - dependencies: - grommet-icons: ^4.10.0 - hoist-non-react-statics: ^3.2.0 - markdown-to-jsx: ^7.2.0 - prop-types: ^15.8.1 - peerDependencies: - react: ^16.6.1 || ^17.0.0 || ^18.0.0 - react-dom: ^16.6.1 || ^17.0.0 || ^18.0.0 - styled-components: ^5.1.0 - checksum: 2592d9ca2108225fb8c2d053cac86c9bff90ad09f7950231538449a24736471340c58c9e7abbffe060d2c5ecc9347ce8f7c4592a2157b83d5341dc06c56e12bd - languageName: node - linkType: hard - "hard-rejection@npm:^2.1.0": version: 2.1.0 resolution: "hard-rejection@npm:2.1.0" @@ -13738,7 +13487,7 @@ __metadata: languageName: node linkType: hard -"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.2.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.1, hoist-non-react-statics@npm:^3.3.2": +"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.1, hoist-non-react-statics@npm:^3.3.2": version: 3.3.2 resolution: "hoist-non-react-statics@npm:3.3.2" dependencies: @@ -15015,13 +14764,6 @@ __metadata: languageName: node linkType: hard -"json-schema-traverse@npm:^0.3.0": - version: 0.3.1 - resolution: "json-schema-traverse@npm:0.3.1" - checksum: a685c36222023471c25c86cddcff506306ecb8f8941922fd356008419889c41c38e1c16d661d5499d0a561b34f417693e9bb9212ba2b2b2f8f8a345a49e4ec1a - languageName: node - linkType: hard - "json-schema-traverse@npm:^0.4.1": version: 0.4.1 resolution: "json-schema-traverse@npm:0.4.1" @@ -15067,7 +14809,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^1.0.1, json5@npm:^1.0.2": +"json5@npm:^1.0.2": version: 1.0.2 resolution: "json5@npm:1.0.2" dependencies: @@ -15364,17 +15106,6 @@ __metadata: languageName: node linkType: hard -"loader-utils@npm:^1.1.0": - version: 1.4.2 - resolution: "loader-utils@npm:1.4.2" - dependencies: - big.js: ^5.2.2 - emojis-list: ^3.0.0 - json5: ^1.0.1 - checksum: eb6fb622efc0ffd1abdf68a2022f9eac62bef8ec599cf8adb75e94d1d338381780be6278534170e99edc03380a6d29bc7eb1563c89ce17c5fed3a0b17f1ad804 - languageName: node - linkType: hard - "local-pkg@npm:^0.5.0": version: 0.5.0 resolution: "local-pkg@npm:0.5.0" @@ -15385,16 +15116,6 @@ __metadata: languageName: node linkType: hard -"locate-path@npm:^3.0.0": - version: 3.0.0 - resolution: "locate-path@npm:3.0.0" - dependencies: - p-locate: ^3.0.0 - path-exists: ^3.0.0 - checksum: 53db3996672f21f8b0bf2a2c645ae2c13ffdae1eeecfcd399a583bce8516c0b88dcb4222ca6efbbbeb6949df7e46860895be2c02e8d3219abd373ace3bfb4e11 - languageName: node - linkType: hard - "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -15476,7 +15197,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:~4.17.0": +"lodash@npm:4.17.21, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:~4.17.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -15676,15 +15397,6 @@ __metadata: languageName: node linkType: hard -"markdown-to-jsx@npm:^7.2.0": - version: 7.4.7 - resolution: "markdown-to-jsx@npm:7.4.7" - peerDependencies: - react: ">= 0.14.0" - checksum: bb8a696c8a95dd67ac1eb44255f31cf17e60b6c2ff03bfcd51b5e28da17856c57d7a16da59fda7f3a4eedb01d7e92eeef57a10ff3abd5431e5c80059d4565016 - languageName: node - linkType: hard - "mathml-tag-names@npm:^2.1.3": version: 2.1.3 resolution: "mathml-tag-names@npm:2.1.3" @@ -15838,7 +15550,7 @@ __metadata: languageName: node linkType: hard -"memoize-one@npm:>=3.1.1 <6, memoize-one@npm:^5.0.0, memoize-one@npm:^5.0.4": +"memoize-one@npm:>=3.1.1 <6, memoize-one@npm:^5.0.4": version: 5.2.1 resolution: "memoize-one@npm:5.2.1" checksum: a3cba7b824ebcf24cdfcd234aa7f86f3ad6394b8d9be4c96ff756dafb8b51c7f71320785fbc2304f1af48a0467cbbd2a409efc9333025700ed523f254cb52e3d @@ -16901,7 +16613,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": +"p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" dependencies: @@ -16919,15 +16631,6 @@ __metadata: languageName: node linkType: hard -"p-locate@npm:^3.0.0": - version: 3.0.0 - resolution: "p-locate@npm:3.0.0" - dependencies: - p-limit: ^2.0.0 - checksum: 83991734a9854a05fe9dbb29f707ea8a0599391f52daac32b86f08e21415e857ffa60f0e120bfe7ce0cc4faf9274a50239c7895fc0d0579d08411e513b83a4ae - languageName: node - linkType: hard - "p-locate@npm:^4.1.0": version: 4.1.0 resolution: "p-locate@npm:4.1.0" @@ -17091,13 +16794,6 @@ __metadata: languageName: node linkType: hard -"path-exists@npm:^3.0.0": - version: 3.0.0 - resolution: "path-exists@npm:3.0.0" - checksum: 96e92643aa34b4b28d0de1cd2eba52a1c5313a90c6542d03f62750d82480e20bfa62bc865d5cfc6165f5fcd5aeb0851043c40a39be5989646f223300021bae0a - languageName: node - linkType: hard - "path-exists@npm:^4.0.0": version: 4.0.0 resolution: "path-exists@npm:4.0.0" @@ -17287,15 +16983,6 @@ __metadata: languageName: node linkType: hard -"pkg-up@npm:^3.1.0": - version: 3.1.0 - resolution: "pkg-up@npm:3.1.0" - dependencies: - find-up: ^3.0.0 - checksum: 5bac346b7c7c903613c057ae3ab722f320716199d753f4a7d053d38f2b5955460f3e6ab73b4762c62fd3e947f58e04f1343e92089e7bb6091c90877406fcd8c8 - languageName: node - linkType: hard - "pluralize@npm:8.0.0": version: 8.0.0 resolution: "pluralize@npm:8.0.0" @@ -17497,7 +17184,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:15.8.1, prop-types@npm:^15.5.8, prop-types@npm:^15.6.0, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": +"prop-types@npm:^15.5.8, prop-types@npm:^15.6.0, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -17823,20 +17510,6 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:^16.13.1": - version: 16.14.0 - resolution: "react-dom@npm:16.14.0" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - prop-types: ^15.6.2 - scheduler: ^0.19.1 - peerDependencies: - react: ^16.14.0 - checksum: 5a5c49da0f106b2655a69f96c622c347febcd10532db391c262b26aec225b235357d9da1834103457683482ab1b229af7a50f6927a6b70e53150275e31785544 - languageName: node - linkType: hard - "react-dropzone@npm:14.2.3": version: 14.2.3 resolution: "react-dropzone@npm:14.2.3" @@ -17923,17 +17596,6 @@ __metadata: languageName: node linkType: hard -"react-input-autosize@npm:^3.0.0": - version: 3.0.0 - resolution: "react-input-autosize@npm:3.0.0" - dependencies: - prop-types: ^15.5.8 - peerDependencies: - react: ^16.3.0 || ^17.0.0 - checksum: cc3309ddc87446ade742c7d0e88ef089dd8b6981f21506a2bb27daf01a8803ac697f64157c4ffc7e81dfcf3892b54a4072dbc3652fd9addcf6d22dd0b87ab723 - languageName: node - linkType: hard - "react-instagram-embed@npm:^1.5.0": version: 1.5.0 resolution: "react-instagram-embed@npm:1.5.0" @@ -18119,24 +17781,6 @@ __metadata: languageName: node linkType: hard -"react-select@npm:^4.3.1": - version: 4.3.1 - resolution: "react-select@npm:4.3.1" - dependencies: - "@babel/runtime": ^7.12.0 - "@emotion/cache": ^11.4.0 - "@emotion/react": ^11.1.1 - memoize-one: ^5.0.0 - prop-types: ^15.6.0 - react-input-autosize: ^3.0.0 - react-transition-group: ^4.3.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0 - react-dom: ^16.8.0 || ^17.0.0 - checksum: e87e0b42a662ddce7957a69a3029ea769b22264c197cbd1d8bde1ce631e49c5c5f42414773364674a7a6a8431340e1ede49220583bf1dcd966b63e9bd25cfc12 - languageName: node - linkType: hard - "react-simple-player@npm:^1.1.0": version: 1.1.0 resolution: "react-simple-player@npm:1.1.0" @@ -18262,7 +17906,7 @@ __metadata: languageName: node linkType: hard -"react-transition-group@npm:^4.3.0, react-transition-group@npm:^4.4.5": +"react-transition-group@npm:^4.4.5": version: 4.4.5 resolution: "react-transition-group@npm:4.4.5" dependencies: @@ -18413,17 +18057,6 @@ __metadata: languageName: node linkType: hard -"react@npm:^16.13.1": - version: 16.14.0 - resolution: "react@npm:16.14.0" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - prop-types: ^15.6.2 - checksum: 8484f3ecb13414526f2a7412190575fc134da785c02695eb92bb6028c930bfe1c238d7be2a125088fec663cc7cda0a3623373c46807cf2c281f49c34b79881ac - languageName: node - linkType: hard - "reactflow@npm:11.10.1": version: 11.10.1 resolution: "reactflow@npm:11.10.1" @@ -18793,13 +18426,6 @@ __metadata: languageName: node linkType: hard -"reselect@npm:^4.0.0": - version: 4.1.8 - resolution: "reselect@npm:4.1.8" - checksum: a4ac87cedab198769a29be92bc221c32da76cfdad6911eda67b4d3e7136dca86208c3b210e31632eae31ebd2cded18596f0dd230d3ccc9e978df22f233b5583e - languageName: node - linkType: hard - "resize-observer-polyfill@npm:1.5.1, resize-observer-polyfill@npm:^1.5.1": version: 1.5.1 resolution: "resize-observer-polyfill@npm:1.5.1" @@ -18828,7 +18454,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.13.1, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4": +"resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -18854,7 +18480,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.13.1#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.4#~builtin": +"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.4#~builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -19162,16 +18788,6 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.19.1": - version: 0.19.1 - resolution: "scheduler@npm:0.19.1" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - checksum: 73e185a59e2ff5aa3609f5b9cb97ddd376f89e1610579d29939d952411ca6eb7a24907a4ea4556569dacb931467a1a4a56d94fe809ef713aa76748642cd96a6c - languageName: node - linkType: hard - "scheduler@npm:^0.23.2": version: 0.23.2 resolution: "scheduler@npm:0.23.2" @@ -19181,15 +18797,6 @@ __metadata: languageName: node linkType: hard -"schema-utils@npm:^0.3.0": - version: 0.3.0 - resolution: "schema-utils@npm:0.3.0" - dependencies: - ajv: ^5.0.0 - checksum: 441fa4bd4900afb19eb9da1d8d6271056b71ce3d8b1b73bbece791de1d4c90ac7e97ffc9787607aa53611aaf2996711af7c18ba8669f06b084b218cab1e701e3 - languageName: node - linkType: hard - "screenfull@npm:^5.1.0": version: 5.2.0 resolution: "screenfull@npm:5.2.0" @@ -19575,13 +19182,6 @@ __metadata: languageName: node linkType: hard -"source-list-map@npm:^2.0.0": - version: 2.0.1 - resolution: "source-list-map@npm:2.0.1" - checksum: 806efc6f75e7cd31e4815e7a3aaf75a45c704871ea4075cb2eb49882c6fca28998f44fc5ac91adb6de03b2882ee6fb02f951fdc85e6a22b338c32bfe19557938 - languageName: node - linkType: hard - "source-map-js@npm:^1.0.1, source-map-js@npm:^1.2.0": version: 1.2.0 resolution: "source-map-js@npm:1.2.0" @@ -20116,7 +19716,7 @@ __metadata: languageName: node linkType: hard -"styled-components@npm:5.3.11, styled-components@npm:^5.1.1": +"styled-components@npm:5.3.11": version: 5.3.11 resolution: "styled-components@npm:5.3.11" dependencies: @@ -20553,13 +20153,6 @@ __metadata: languageName: node linkType: hard -"to-fast-properties@npm:^1.0.3": - version: 1.0.3 - resolution: "to-fast-properties@npm:1.0.3" - checksum: bd0abb58c4722851df63419de3f6d901d5118f0440d3f71293ed776dd363f2657edaaf2dc470e3f6b7b48eb84aa411193b60db8a4a552adac30de9516c5cc580 - languageName: node - linkType: hard - "to-fast-properties@npm:^2.0.0": version: 2.0.0 resolution: "to-fast-properties@npm:2.0.0" @@ -21691,16 +21284,6 @@ __metadata: languageName: node linkType: hard -"webpack-sources@npm:^1.0.1": - version: 1.4.3 - resolution: "webpack-sources@npm:1.4.3" - dependencies: - source-list-map: ^2.0.0 - source-map: ~0.6.1 - checksum: 37463dad8d08114930f4bc4882a9602941f07c9f0efa9b6bc78738cd936275b990a596d801ef450d022bb005b109b9f451dd087db2f3c9baf53e8e22cf388f79 - languageName: node - linkType: hard - "whatwg-encoding@npm:^2.0.0": version: 2.0.0 resolution: "whatwg-encoding@npm:2.0.0"