Files
Megamenu/src/services/ISPTermStorePickerService.ts
T
Torsten Brendgen 50b85468f1 feat: Enhance MegaMenu with localization, caching, and new properties
- Added localization support for loading states, empty navigation, and submenu actions in both German and English.
- Introduced new properties in IMenuItem for description, openInNewWindow, and external links.
- Updated SPTermStorePickerService to handle cache versioning and language-specific caching.
- Implemented a new MegaMenuCore service for handling term properties, cache management, and navigation URL resolution.
- Refactored TaxonomyNavigationService to build menu hierarchy and filter hidden terms.
- Added automated tests for MegaMenu core functionalities and static asset validation.
- Removed unused ItemDictionary service.
- Created a comprehensive ToDo document outlining the implementation status and future tasks.
2026-07-20 21:34:24 +02:00

106 lines
2.1 KiB
TypeScript

// tslint:disable:no-any
/**
* Interfaces for Term store, groups and term sets
* This code is a copy from the library @pnp/sp-dev-fx-controls-react
*/
export interface ITermStore {
_ObjectType_: string; // SP.Taxonomy.TermStore
_ObjectIdentity_: string;
Id: string;
Name: string;
Groups: IGroups;
}
export interface IGroups {
_ObjectType_: string; // SP.Taxonomy.TermGroupCollection
_Child_Items_: IGroup[];
}
export interface IGroup {
_ObjectType_: string; // SP.Taxonomy.TermGroup
_ObjectIdentity_: string;
TermSets: ITermSets;
Id: string;
Name: string;
IsSystemGroup: boolean;
}
export interface ITermSets {
_ObjectType_: string; // SP.Taxonomy.TermSetCollection
_Child_Items_: ITermSet[];
}
export interface ITermSet {
_ObjectType_: string; // SP.Taxonomy.TermSet
_ObjectIdentity_: string;
Id: string;
CustomSortOrder?: string;
Name: string;
Description: string;
Names: ITermSetNames;
Terms?: ITerm[];
}
export interface ITermSetMinimal {
_ObjectType_?: string; // SP.Taxonomy.TermSet
_ObjectIdentity_?: string;
Id: string;
Name: string;
}
export interface ITermSetNames {
[locale: string]: string;
}
/**
* Interfaces for the terms
*/
export interface ITerms {
_ObjectType_: string; // SP.Taxonomy.TermCollection
_Child_Items_: ITerm[];
}
/**
* Term
*/
export interface ITerm {
_ObjectType_: string; // SP.Taxonomy.Term
_ObjectIdentity_: string;
Id: string;
Name: string;
Description: string;
IsDeprecated: boolean;
IsAvailableForTagging: boolean;
IsRoot: boolean;
PathOfTerm: string;
TermSet: ITermSetMinimal;
CustomSortOrderIndex?: number;
PathDepth?: number;
ParentId?: string;
TermsCount?: number;
Labels?: ITermLabelCollection;
LocalCustomProperties?: {
[property: string]: any
};
}
export interface ITermLabelCollection {
_Child_Items_: ITermLabel[];
}
export interface ITermLabel {
Language: number;
Value: string;
IsDefaultForLanguage?: boolean;
}
export interface ISuggestTerm {
Id: string;
DefaultLabel: string;
Description: string;
IsKeyword: boolean;
IsSynonym: boolean;
Paths: Array<string>;
Synonyms: string;
}