diff --git a/src/core/apollo/generated/apollo-hooks.ts b/src/core/apollo/generated/apollo-hooks.ts index 407275c542..c063e3adf9 100644 --- a/src/core/apollo/generated/apollo-hooks.ts +++ b/src/core/apollo/generated/apollo-hooks.ts @@ -2295,6 +2295,17 @@ export const JourneyCommunityFragmentDoc = gql` ${DashboardLeadUserFragmentDoc} ${AssociatedOrganizationDetailsFragmentDoc} `; +export const JourneyBreadcrumbsProfileFragmentDoc = gql` + fragment JourneyBreadcrumbsProfile on Profile { + id + displayName + avatar: visual(type: AVATAR) { + id + ...VisualUri + } + } + ${VisualUriFragmentDoc} +`; export const OpportunityPageFragmentDoc = gql` fragment OpportunityPage on Opportunity { id @@ -2781,16 +2792,6 @@ export const SpaceDetailsProviderFragmentDoc = gql` ${VisualUriFragmentDoc} ${ContextDetailsProviderFragmentDoc} `; -export const SpaceNameFragmentDoc = gql` - fragment SpaceName on Space { - id - nameID - profile { - id - displayName - } - } -`; export const AdminSpaceFragmentDoc = gql` fragment AdminSpace on Space { id @@ -16548,70 +16549,6 @@ export function refetchChallengeInnovationFlowQuery(variables: SchemaTypes.Chall return { query: ChallengeInnovationFlowDocument, variables: variables }; } -export const ChallengeNameDocument = gql` - query challengeName($spaceId: UUID_NAMEID!, $challengeId: UUID_NAMEID!) { - space(ID: $spaceId) { - id - nameID - challenge(ID: $challengeId) { - id - nameID - profile { - id - displayName - } - } - } - } -`; - -/** - * __useChallengeNameQuery__ - * - * To run a query within a React component, call `useChallengeNameQuery` and pass it any options that fit your needs. - * When your component renders, `useChallengeNameQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useChallengeNameQuery({ - * variables: { - * spaceId: // value for 'spaceId' - * challengeId: // value for 'challengeId' - * }, - * }); - */ -export function useChallengeNameQuery( - baseOptions: Apollo.QueryHookOptions -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - ChallengeNameDocument, - options - ); -} - -export function useChallengeNameLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - ChallengeNameDocument, - options - ); -} - -export type ChallengeNameQueryHookResult = ReturnType; -export type ChallengeNameLazyQueryHookResult = ReturnType; -export type ChallengeNameQueryResult = Apollo.QueryResult< - SchemaTypes.ChallengeNameQuery, - SchemaTypes.ChallengeNameQueryVariables ->; -export function refetchChallengeNameQuery(variables: SchemaTypes.ChallengeNameQueryVariables) { - return { query: ChallengeNameDocument, variables: variables }; -} - export const ChallengeProfileInfoDocument = gql` query challengeProfileInfo($spaceId: UUID_NAMEID!, $challengeId: UUID_NAMEID!) { space(ID: $spaceId) { @@ -17608,6 +17545,291 @@ export function refetchJourneyPrivilegesQuery(variables: SchemaTypes.JourneyPriv return { query: JourneyPrivilegesDocument, variables: variables }; } +export const JourneyBreadcrumbsInnovationHubDocument = gql` + query JourneyBreadcrumbsInnovationHub { + platform { + innovationHub { + id + profile { + id + displayName + avatar: visual(type: BANNER_WIDE) { + id + ...VisualUri + } + } + } + } + } + ${VisualUriFragmentDoc} +`; + +/** + * __useJourneyBreadcrumbsInnovationHubQuery__ + * + * To run a query within a React component, call `useJourneyBreadcrumbsInnovationHubQuery` and pass it any options that fit your needs. + * When your component renders, `useJourneyBreadcrumbsInnovationHubQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useJourneyBreadcrumbsInnovationHubQuery({ + * variables: { + * }, + * }); + */ +export function useJourneyBreadcrumbsInnovationHubQuery( + baseOptions?: Apollo.QueryHookOptions< + SchemaTypes.JourneyBreadcrumbsInnovationHubQuery, + SchemaTypes.JourneyBreadcrumbsInnovationHubQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + SchemaTypes.JourneyBreadcrumbsInnovationHubQuery, + SchemaTypes.JourneyBreadcrumbsInnovationHubQueryVariables + >(JourneyBreadcrumbsInnovationHubDocument, options); +} + +export function useJourneyBreadcrumbsInnovationHubLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.JourneyBreadcrumbsInnovationHubQuery, + SchemaTypes.JourneyBreadcrumbsInnovationHubQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + SchemaTypes.JourneyBreadcrumbsInnovationHubQuery, + SchemaTypes.JourneyBreadcrumbsInnovationHubQueryVariables + >(JourneyBreadcrumbsInnovationHubDocument, options); +} + +export type JourneyBreadcrumbsInnovationHubQueryHookResult = ReturnType; +export type JourneyBreadcrumbsInnovationHubLazyQueryHookResult = ReturnType< + typeof useJourneyBreadcrumbsInnovationHubLazyQuery +>; +export type JourneyBreadcrumbsInnovationHubQueryResult = Apollo.QueryResult< + SchemaTypes.JourneyBreadcrumbsInnovationHubQuery, + SchemaTypes.JourneyBreadcrumbsInnovationHubQueryVariables +>; +export function refetchJourneyBreadcrumbsInnovationHubQuery( + variables?: SchemaTypes.JourneyBreadcrumbsInnovationHubQueryVariables +) { + return { query: JourneyBreadcrumbsInnovationHubDocument, variables: variables }; +} + +export const JourneyBreadcrumbsSpaceDocument = gql` + query JourneyBreadcrumbsSpace($spaceNameId: UUID_NAMEID!) { + space(ID: $spaceNameId) { + id + profile { + id + displayName + avatar: visual(type: BANNER) { + id + ...VisualUri + } + } + } + } + ${VisualUriFragmentDoc} +`; + +/** + * __useJourneyBreadcrumbsSpaceQuery__ + * + * To run a query within a React component, call `useJourneyBreadcrumbsSpaceQuery` and pass it any options that fit your needs. + * When your component renders, `useJourneyBreadcrumbsSpaceQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useJourneyBreadcrumbsSpaceQuery({ + * variables: { + * spaceNameId: // value for 'spaceNameId' + * }, + * }); + */ +export function useJourneyBreadcrumbsSpaceQuery( + baseOptions: Apollo.QueryHookOptions< + SchemaTypes.JourneyBreadcrumbsSpaceQuery, + SchemaTypes.JourneyBreadcrumbsSpaceQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + JourneyBreadcrumbsSpaceDocument, + options + ); +} + +export function useJourneyBreadcrumbsSpaceLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.JourneyBreadcrumbsSpaceQuery, + SchemaTypes.JourneyBreadcrumbsSpaceQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + SchemaTypes.JourneyBreadcrumbsSpaceQuery, + SchemaTypes.JourneyBreadcrumbsSpaceQueryVariables + >(JourneyBreadcrumbsSpaceDocument, options); +} + +export type JourneyBreadcrumbsSpaceQueryHookResult = ReturnType; +export type JourneyBreadcrumbsSpaceLazyQueryHookResult = ReturnType; +export type JourneyBreadcrumbsSpaceQueryResult = Apollo.QueryResult< + SchemaTypes.JourneyBreadcrumbsSpaceQuery, + SchemaTypes.JourneyBreadcrumbsSpaceQueryVariables +>; +export function refetchJourneyBreadcrumbsSpaceQuery(variables: SchemaTypes.JourneyBreadcrumbsSpaceQueryVariables) { + return { query: JourneyBreadcrumbsSpaceDocument, variables: variables }; +} + +export const JourneyBreadcrumbsChallengeDocument = gql` + query JourneyBreadcrumbsChallenge($spaceNameId: UUID_NAMEID!, $challengeNameId: UUID_NAMEID!) { + space(ID: $spaceNameId) { + id + challenge(ID: $challengeNameId) { + id + profile { + ...JourneyBreadcrumbsProfile + } + } + } + } + ${JourneyBreadcrumbsProfileFragmentDoc} +`; + +/** + * __useJourneyBreadcrumbsChallengeQuery__ + * + * To run a query within a React component, call `useJourneyBreadcrumbsChallengeQuery` and pass it any options that fit your needs. + * When your component renders, `useJourneyBreadcrumbsChallengeQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useJourneyBreadcrumbsChallengeQuery({ + * variables: { + * spaceNameId: // value for 'spaceNameId' + * challengeNameId: // value for 'challengeNameId' + * }, + * }); + */ +export function useJourneyBreadcrumbsChallengeQuery( + baseOptions: Apollo.QueryHookOptions< + SchemaTypes.JourneyBreadcrumbsChallengeQuery, + SchemaTypes.JourneyBreadcrumbsChallengeQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + SchemaTypes.JourneyBreadcrumbsChallengeQuery, + SchemaTypes.JourneyBreadcrumbsChallengeQueryVariables + >(JourneyBreadcrumbsChallengeDocument, options); +} + +export function useJourneyBreadcrumbsChallengeLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.JourneyBreadcrumbsChallengeQuery, + SchemaTypes.JourneyBreadcrumbsChallengeQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + SchemaTypes.JourneyBreadcrumbsChallengeQuery, + SchemaTypes.JourneyBreadcrumbsChallengeQueryVariables + >(JourneyBreadcrumbsChallengeDocument, options); +} + +export type JourneyBreadcrumbsChallengeQueryHookResult = ReturnType; +export type JourneyBreadcrumbsChallengeLazyQueryHookResult = ReturnType; +export type JourneyBreadcrumbsChallengeQueryResult = Apollo.QueryResult< + SchemaTypes.JourneyBreadcrumbsChallengeQuery, + SchemaTypes.JourneyBreadcrumbsChallengeQueryVariables +>; +export function refetchJourneyBreadcrumbsChallengeQuery( + variables: SchemaTypes.JourneyBreadcrumbsChallengeQueryVariables +) { + return { query: JourneyBreadcrumbsChallengeDocument, variables: variables }; +} + +export const JourneyBreadcrumbsOpportunityDocument = gql` + query JourneyBreadcrumbsOpportunity($spaceNameId: UUID_NAMEID!, $opportunityNameId: UUID_NAMEID!) { + space(ID: $spaceNameId) { + id + opportunity(ID: $opportunityNameId) { + id + profile { + ...JourneyBreadcrumbsProfile + } + } + } + } + ${JourneyBreadcrumbsProfileFragmentDoc} +`; + +/** + * __useJourneyBreadcrumbsOpportunityQuery__ + * + * To run a query within a React component, call `useJourneyBreadcrumbsOpportunityQuery` and pass it any options that fit your needs. + * When your component renders, `useJourneyBreadcrumbsOpportunityQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useJourneyBreadcrumbsOpportunityQuery({ + * variables: { + * spaceNameId: // value for 'spaceNameId' + * opportunityNameId: // value for 'opportunityNameId' + * }, + * }); + */ +export function useJourneyBreadcrumbsOpportunityQuery( + baseOptions: Apollo.QueryHookOptions< + SchemaTypes.JourneyBreadcrumbsOpportunityQuery, + SchemaTypes.JourneyBreadcrumbsOpportunityQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + SchemaTypes.JourneyBreadcrumbsOpportunityQuery, + SchemaTypes.JourneyBreadcrumbsOpportunityQueryVariables + >(JourneyBreadcrumbsOpportunityDocument, options); +} + +export function useJourneyBreadcrumbsOpportunityLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SchemaTypes.JourneyBreadcrumbsOpportunityQuery, + SchemaTypes.JourneyBreadcrumbsOpportunityQueryVariables + > +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + SchemaTypes.JourneyBreadcrumbsOpportunityQuery, + SchemaTypes.JourneyBreadcrumbsOpportunityQueryVariables + >(JourneyBreadcrumbsOpportunityDocument, options); +} + +export type JourneyBreadcrumbsOpportunityQueryHookResult = ReturnType; +export type JourneyBreadcrumbsOpportunityLazyQueryHookResult = ReturnType< + typeof useJourneyBreadcrumbsOpportunityLazyQuery +>; +export type JourneyBreadcrumbsOpportunityQueryResult = Apollo.QueryResult< + SchemaTypes.JourneyBreadcrumbsOpportunityQuery, + SchemaTypes.JourneyBreadcrumbsOpportunityQueryVariables +>; +export function refetchJourneyBreadcrumbsOpportunityQuery( + variables: SchemaTypes.JourneyBreadcrumbsOpportunityQueryVariables +) { + return { query: JourneyBreadcrumbsOpportunityDocument, variables: variables }; +} + export const OpportunityPageDocument = gql` query opportunityPage($spaceId: UUID_NAMEID!, $opportunityId: UUID_NAMEID!) { space(ID: $spaceId) { @@ -18133,68 +18355,6 @@ export function refetchOpportunityInnovationFlowQuery(variables: SchemaTypes.Opp return { query: OpportunityInnovationFlowDocument, variables: variables }; } -export const OpportunityNameDocument = gql` - query opportunityName($spaceId: UUID_NAMEID!, $opportunityId: UUID_NAMEID!) { - space(ID: $spaceId) { - id - opportunity(ID: $opportunityId) { - id - profile { - id - displayName - } - } - } - } -`; - -/** - * __useOpportunityNameQuery__ - * - * To run a query within a React component, call `useOpportunityNameQuery` and pass it any options that fit your needs. - * When your component renders, `useOpportunityNameQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useOpportunityNameQuery({ - * variables: { - * spaceId: // value for 'spaceId' - * opportunityId: // value for 'opportunityId' - * }, - * }); - */ -export function useOpportunityNameQuery( - baseOptions: Apollo.QueryHookOptions -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - OpportunityNameDocument, - options - ); -} - -export function useOpportunityNameLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - OpportunityNameDocument, - options - ); -} - -export type OpportunityNameQueryHookResult = ReturnType; -export type OpportunityNameLazyQueryHookResult = ReturnType; -export type OpportunityNameQueryResult = Apollo.QueryResult< - SchemaTypes.OpportunityNameQuery, - SchemaTypes.OpportunityNameQueryVariables ->; -export function refetchOpportunityNameQuery(variables: SchemaTypes.OpportunityNameQueryVariables) { - return { query: OpportunityNameDocument, variables: variables }; -} - export const OpportunityProfileInfoDocument = gql` query opportunityProfileInfo($spaceId: UUID_NAMEID!, $opportunityId: UUID_NAMEID!) { space(ID: $spaceId) { @@ -19594,55 +19754,6 @@ export function refetchSpaceInnovationFlowTemplatesQuery( return { query: SpaceInnovationFlowTemplatesDocument, variables: variables }; } -export const SpaceNameDocument = gql` - query spaceName($spaceId: UUID_NAMEID!) { - space(ID: $spaceId) { - ...SpaceName - } - } - ${SpaceNameFragmentDoc} -`; - -/** - * __useSpaceNameQuery__ - * - * To run a query within a React component, call `useSpaceNameQuery` and pass it any options that fit your needs. - * When your component renders, `useSpaceNameQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useSpaceNameQuery({ - * variables: { - * spaceId: // value for 'spaceId' - * }, - * }); - */ -export function useSpaceNameQuery( - baseOptions: Apollo.QueryHookOptions -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery(SpaceNameDocument, options); -} - -export function useSpaceNameLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - SpaceNameDocument, - options - ); -} - -export type SpaceNameQueryHookResult = ReturnType; -export type SpaceNameLazyQueryHookResult = ReturnType; -export type SpaceNameQueryResult = Apollo.QueryResult; -export function refetchSpaceNameQuery(variables: SchemaTypes.SpaceNameQueryVariables) { - return { query: SpaceNameDocument, variables: variables }; -} - export const ChallengeCreatedDocument = gql` subscription ChallengeCreated($spaceID: UUID_NAMEID!) { challengeCreated(spaceID: $spaceID) { diff --git a/src/core/apollo/generated/graphql-schema.ts b/src/core/apollo/generated/graphql-schema.ts index b9512f5620..b3a7e5c514 100644 --- a/src/core/apollo/generated/graphql-schema.ts +++ b/src/core/apollo/generated/graphql-schema.ts @@ -21248,26 +21248,6 @@ export type ChallengeInnovationFlowQuery = { }; }; -export type ChallengeNameQueryVariables = Exact<{ - spaceId: Scalars['UUID_NAMEID']; - challengeId: Scalars['UUID_NAMEID']; -}>; - -export type ChallengeNameQuery = { - __typename?: 'Query'; - space: { - __typename?: 'Space'; - id: string; - nameID: string; - challenge: { - __typename?: 'Challenge'; - id: string; - nameID: string; - profile: { __typename?: 'Profile'; id: string; displayName: string }; - }; - }; -}; - export type ChallengeProfileInfoQueryVariables = Exact<{ spaceId: Scalars['UUID_NAMEID']; challengeId: Scalars['UUID_NAMEID']; @@ -22542,6 +22522,98 @@ export type JourneyPrivilegesQuery = { }; }; +export type JourneyBreadcrumbsInnovationHubQueryVariables = Exact<{ [key: string]: never }>; + +export type JourneyBreadcrumbsInnovationHubQuery = { + __typename?: 'Query'; + platform: { + __typename?: 'Platform'; + innovationHub?: + | { + __typename?: 'InnovationHub'; + id: string; + profile: { + __typename?: 'Profile'; + id: string; + displayName: string; + avatar?: { __typename?: 'Visual'; id: string; uri: string; name: string } | undefined; + }; + } + | undefined; + }; +}; + +export type JourneyBreadcrumbsSpaceQueryVariables = Exact<{ + spaceNameId: Scalars['UUID_NAMEID']; +}>; + +export type JourneyBreadcrumbsSpaceQuery = { + __typename?: 'Query'; + space: { + __typename?: 'Space'; + id: string; + profile: { + __typename?: 'Profile'; + id: string; + displayName: string; + avatar?: { __typename?: 'Visual'; id: string; uri: string; name: string } | undefined; + }; + }; +}; + +export type JourneyBreadcrumbsChallengeQueryVariables = Exact<{ + spaceNameId: Scalars['UUID_NAMEID']; + challengeNameId: Scalars['UUID_NAMEID']; +}>; + +export type JourneyBreadcrumbsChallengeQuery = { + __typename?: 'Query'; + space: { + __typename?: 'Space'; + id: string; + challenge: { + __typename?: 'Challenge'; + id: string; + profile: { + __typename?: 'Profile'; + id: string; + displayName: string; + avatar?: { __typename?: 'Visual'; id: string; uri: string; name: string } | undefined; + }; + }; + }; +}; + +export type JourneyBreadcrumbsOpportunityQueryVariables = Exact<{ + spaceNameId: Scalars['UUID_NAMEID']; + opportunityNameId: Scalars['UUID_NAMEID']; +}>; + +export type JourneyBreadcrumbsOpportunityQuery = { + __typename?: 'Query'; + space: { + __typename?: 'Space'; + id: string; + opportunity: { + __typename?: 'Opportunity'; + id: string; + profile: { + __typename?: 'Profile'; + id: string; + displayName: string; + avatar?: { __typename?: 'Visual'; id: string; uri: string; name: string } | undefined; + }; + }; + }; +}; + +export type JourneyBreadcrumbsProfileFragment = { + __typename?: 'Profile'; + id: string; + displayName: string; + avatar?: { __typename?: 'Visual'; id: string; uri: string; name: string } | undefined; +}; + export type OpportunityPageQueryVariables = Exact<{ spaceId: Scalars['UUID_NAMEID']; opportunityId: Scalars['UUID_NAMEID']; @@ -23688,24 +23760,6 @@ export type OpportunityInnovationFlowQuery = { }; }; -export type OpportunityNameQueryVariables = Exact<{ - spaceId: Scalars['UUID_NAMEID']; - opportunityId: Scalars['UUID_NAMEID']; -}>; - -export type OpportunityNameQuery = { - __typename?: 'Query'; - space: { - __typename?: 'Space'; - id: string; - opportunity: { - __typename?: 'Opportunity'; - id: string; - profile: { __typename?: 'Profile'; id: string; displayName: string }; - }; - }; -}; - export type OpportunityProfileInfoQueryVariables = Exact<{ spaceId: Scalars['UUID_NAMEID']; opportunityId: Scalars['UUID_NAMEID']; @@ -25644,13 +25698,6 @@ export type SpaceDetailsProviderFragment = { | undefined; }; -export type SpaceNameFragment = { - __typename?: 'Space'; - id: string; - nameID: string; - profile: { __typename?: 'Profile'; id: string; displayName: string }; -}; - export type CreateSpaceMutationVariables = Exact<{ input: CreateSpaceInput; }>; @@ -25978,20 +26025,6 @@ export type SpaceInnovationFlowTemplatesQuery = { }; }; -export type SpaceNameQueryVariables = Exact<{ - spaceId: Scalars['UUID_NAMEID']; -}>; - -export type SpaceNameQuery = { - __typename?: 'Query'; - space: { - __typename?: 'Space'; - id: string; - nameID: string; - profile: { __typename?: 'Profile'; id: string; displayName: string }; - }; -}; - export type ChallengeCreatedSubscriptionVariables = Exact<{ spaceID: Scalars['UUID_NAMEID']; }>; diff --git a/src/core/i18n/en/translation.en.json b/src/core/i18n/en/translation.en.json index 4535718ef3..48dbd60a52 100644 --- a/src/core/i18n/en/translation.en.json +++ b/src/core/i18n/en/translation.en.json @@ -791,6 +791,12 @@ } }, "components": { + "search": { + "scope": { + "platform": "Entire platform", + "space": "{{displayName}}" + } + }, "journeyUnauthorizedDialog": { "message": "This is a private Community and most of it’s content is restricted to members only. If you want to join, click here to apply." }, @@ -1823,6 +1829,7 @@ "innovation-flow-info": "Click to display the Innovation Flow" }, "home": { + "title": "My Dashboard", "sections": { "welcome": { "welcome-back": "Welcome back {{username}}!", diff --git a/src/core/ui/navigation/Breadcrumbs.tsx b/src/core/ui/navigation/Breadcrumbs.tsx new file mode 100644 index 0000000000..93fb68cf36 --- /dev/null +++ b/src/core/ui/navigation/Breadcrumbs.tsx @@ -0,0 +1,79 @@ +import React, { cloneElement, PropsWithChildren, ReactElement, ReactNode, useState } from 'react'; +import { Box } from '@mui/material'; +import { DoubleArrow } from '@mui/icons-material'; +import { gutters } from '../grid/utils'; +import { BreadcrumbsItemProps } from './BreadcrumbsItemProps'; + +interface BreadcrumbsProps { + children: ReactElement[]; +} + +const BreadcrumbsSeparator = () => { + return ( + theme.palette.divider }} + > + + + ); +}; + +type JourneyBreadcrumbsExpandedState = Record; + +const Breadcrumbs = ({ + children, +}: PropsWithChildren>) => { + const [expandedState, setExpandedState] = useState({}); + + const [firstChild, ...restChildren] = children.map(child => { + const expanded = (child.key && expandedState[child.key]) || false; + + const onExpand = child.key ? () => onHoverItem(child.key!) : undefined; + + return cloneElement(child, { expanded, onExpand } as Partial); + }); + + const childrenWithSeparator = + firstChild && + restChildren.reduce( + (acc, child, index) => { + acc.push(, child); + + return acc; + }, + [firstChild] + ); + + const onLeave = () => { + setExpandedState({}); + }; + + const onHoverItem = (childKey: string | number) => { + setExpandedState(prevExpandedState => ({ + ...prevExpandedState, + [childKey]: true, + })); + }; + + return ( + + {childrenWithSeparator} + + ); +}; + +export default Breadcrumbs; diff --git a/src/core/ui/navigation/BreadcrumbsItemProps.ts b/src/core/ui/navigation/BreadcrumbsItemProps.ts new file mode 100644 index 0000000000..e6e2b161d2 --- /dev/null +++ b/src/core/ui/navigation/BreadcrumbsItemProps.ts @@ -0,0 +1,4 @@ +export interface BreadcrumbsItemProps { + expanded?: boolean; + onExpand?: () => void; +} diff --git a/src/core/ui/navigation/NavigationBar.tsx b/src/core/ui/navigation/NavigationBar.tsx index a03b7a870f..da67599974 100644 --- a/src/core/ui/navigation/NavigationBar.tsx +++ b/src/core/ui/navigation/NavigationBar.tsx @@ -23,7 +23,13 @@ const NavigationBarContent = ({ transparent, children }: PropsWithChildren - + {children} @@ -35,12 +41,14 @@ interface NavigationBarProps { childrenRight?: ReactNode; } +export const NAVIGATION_HEIGHT_GUTTERS = 4; + const NavigationBar = ({ childrenLeft, childrenRight }: NavigationBarProps) => { const scrollTop = useScrollTop(); const hasScrolledUp = useScrolledUp(); - const navigationHeight = GUTTER_PX * 4; + const navigationHeight = GUTTER_PX * NAVIGATION_HEIGHT_GUTTERS; const hasScrolledPast = scrollTop > navigationHeight; @@ -55,11 +63,11 @@ const NavigationBar = ({ childrenLeft, childrenRight }: NavigationBarProps) => { }} > - + {childrenLeft} - + {childrenRight} diff --git a/src/core/ui/search/SearchBox.tsx b/src/core/ui/search/SearchBox.tsx new file mode 100644 index 0000000000..07a3037dfa --- /dev/null +++ b/src/core/ui/search/SearchBox.tsx @@ -0,0 +1,138 @@ +import React, { useRef, useState } from 'react'; +import { + Box, + ClickAwayListener, + Collapse, + Divider, + IconButton, + InputBase, + InputBaseProps, + MenuItem, + Select, +} from '@mui/material'; +import { ExpandMore, Search } from '@mui/icons-material'; +import { gutters } from '../grid/utils'; +import { BlockSectionTitle } from '../typography'; +import { SelectOption } from '@mui/base/SelectUnstyled/useSelect.types'; + +interface SearchBoxProps