feat: library section and subsection page (#2032)
* Adds section and subsection library pages. * Refactors routing to support them and fix routing from collections page to other pages. * Refactors library context to reliably set component, unit, and other container ids even when the url changes when user goes back in history rapidly.
This commit is contained in:
@@ -3,6 +3,7 @@ import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
|
||||
import type {
|
||||
Filter, MeiliSearch, MultiSearchQuery,
|
||||
} from 'meilisearch';
|
||||
import { ContainerType } from '../../generic/key-utils';
|
||||
|
||||
export const getContentSearchConfigUrl = () => new URL(
|
||||
'api/content_search/v2/studio/',
|
||||
@@ -181,12 +182,14 @@ interface ContainerHitContent {
|
||||
}
|
||||
export interface ContainerHit extends BaseContentHit {
|
||||
type: 'library_container';
|
||||
blockType: 'unit'; // This should be expanded to include other container types
|
||||
blockType: ContainerType; // This should be expanded to include other container types
|
||||
numChildren?: number;
|
||||
published?: ContentPublishedData;
|
||||
publishStatus: PublishStatus;
|
||||
formatted: BaseContentHit['formatted'] & { published?: ContentPublishedData, };
|
||||
content?: ContainerHitContent;
|
||||
sections?: { displayName?: string[], key?: string[] };
|
||||
subsections?: { displayName?: string[], key?: string[] };
|
||||
}
|
||||
|
||||
export type HitType = ContentHit | CollectionHit | ContainerHit;
|
||||
|
||||
Reference in New Issue
Block a user