-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
front: add asu support in lmr's help module
- Loading branch information
Showing
5 changed files
with
109 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 16 additions & 20 deletions
36
front/src/applications/stdcm/components/StdcmHelpModule/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,38 @@ | ||
export type Section = { | ||
id: string; // Identifiant unique de la section | ||
title: string; // Titre de la section | ||
content?: Content[]; // Tableau des contenus de la section, | ||
subSections?: Omit<Section, 'subSection'>[]; // Tableau des sous-sections | ||
id: string; | ||
title: string; | ||
content?: Content[]; | ||
subSections?: Omit<Section, 'subSection'>[]; | ||
}; | ||
|
||
// Définition des différents types de contenu qu'une section peut avoir | ||
export type Content = ListContent | TextContent | FAQContent | GlossaryContent; | ||
|
||
// Contenu sous forme de liste | ||
export type ListContent = { | ||
type: 'list'; // Indique qu'il s'agit d'une liste | ||
items: Record<string, string>[]; // Tableau des éléments de la liste | ||
type: 'list'; | ||
items: Record<string, string>[]; | ||
}; | ||
|
||
// Contenu sous forme de texte | ||
export type TextContent = { | ||
type: 'text'; // Indique qu'il s'agit d'un texte | ||
value: string; // Texte contenant éventuellement du HTML | ||
type: 'text'; | ||
value: string; | ||
}; | ||
|
||
export type FAQItem = { | ||
question: string; // La question | ||
answer: string; // La réponse | ||
question: string; | ||
answer: string; | ||
}; | ||
|
||
export type FAQContent = { | ||
type: 'faq'; // Indique qu'il s'agit d'une FAQ | ||
questions: FAQItem[]; // La question | ||
type: 'faq'; | ||
questions: FAQItem[]; | ||
}; | ||
|
||
// Contenu sous forme de glossaire (clé/valeur) | ||
export type GlossaryContent = { | ||
type: 'definitions'; // Indique qu'il s'agit d'un glossaire | ||
definitions: GlossaryItem[]; // Dictionnaire terme -> définition | ||
type: 'definitions'; | ||
definitions: GlossaryItem[]; | ||
}; | ||
|
||
export type GlossaryItem = { | ||
term: string; // Terme du glossaire | ||
definition: string; // Définition du terme | ||
term: string; | ||
definition: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters