@dataclouder/ngx-lessons 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,6 @@ export declare class DCLessonEditorComponent {
8
8
  #private;
9
9
  private defaultLessonsService;
10
10
  private promptService;
11
- private agentChatService;
12
11
  private ngxVertexService;
13
12
  private cdr;
14
13
  target: ViewContainerRef;
@@ -10,6 +10,7 @@ export declare class DCLessonMetadataEditorComponent {
10
10
  improveNotionRequest: EventEmitter<void>;
11
11
  onRootPropertyChange(property: keyof ILesson, value: any): void;
12
12
  onMetadataPropertyChange(property: keyof ContentMetadata, value: any): void;
13
+ onAppExtensionPropChange(property: string, value: any): void;
13
14
  emitSaveRequest(): void;
14
15
  emitImportNotionRequest(): void;
15
16
  emitImproveNotionRequest(): void;
@@ -25,6 +26,13 @@ export declare class DCLessonMetadataEditorComponent {
25
26
  * @returns The processed HTML string with text replacements.
26
27
  */
27
28
  private _extractTextFromEncodedJson;
29
+ /**
30
+ * Converts improved Markdown content to HTML, updates the lesson signal,
31
+ * and saves the lesson.
32
+ * @param improvedMarkdown The Markdown content generated by AI.
33
+ * @throws Error if the markdown is empty/null or if saving fails.
34
+ */
35
+ private _convertMarkdownToHtmlAndSave;
28
36
  /**
29
37
  * Calls the LessonUtilsService to generate a description using AI
30
38
  * and updates the lesson signal if successful.
@@ -1,12 +1,13 @@
1
- import { ElementRef } from '@angular/core';
1
+ import { ElementRef, EventEmitter } from '@angular/core';
2
2
  import { FormGroup, FormControl } from '@angular/forms';
3
3
  import { ILesson } from '../../lesson-mini-components/components/lessons.clases';
4
- import { IAgentCard, IConversationSettings, IMiniAgentCard, SimpleAgentTask } from '@dataclouder/ngx-agent-cards';
4
+ import { IAgentCard, IConversationSettings, IMiniAgentCard, SimpleAgentTask, ChatEvent, WordData } from '@dataclouder/ngx-agent-cards';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class DCLessonRendererComponent {
7
7
  lessonInput: import("@angular/core").InputSignal<ILesson>;
8
8
  lessonIdInput: import("@angular/core").InputSignal<string>;
9
9
  test: import("@angular/core").InputSignal<boolean>;
10
+ wordClicked: EventEmitter<WordData>;
10
11
  dynamicLesson: ElementRef<HTMLElement>;
11
12
  private readonly renderer;
12
13
  private readonly viewContainerRef;
@@ -38,6 +39,7 @@ export declare class DCLessonRendererComponent {
38
39
  startAI(): Promise<void>;
39
40
  onVisibleChange(isVisible: boolean): void;
40
41
  handleGoalCompleted(event: any): void;
42
+ onChatMessage(event: ChatEvent): void;
41
43
  static ɵfac: i0.ɵɵFactoryDeclaration<DCLessonRendererComponent, never>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonRendererComponent, "dc-lesson-renderer", never, { "lessonInput": { "alias": "lessonInput"; "required": false; "isSignal": true; }; "lessonIdInput": { "alias": "lessonIdInput"; "required": false; "isSignal": true; }; "test": { "alias": "test"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
44
+ static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonRendererComponent, "dc-lesson-renderer", never, { "lessonInput": { "alias": "lessonInput"; "required": false; "isSignal": true; }; "lessonIdInput": { "alias": "lessonIdInput"; "required": false; "isSignal": true; }; "test": { "alias": "test"; "required": false; "isSignal": true; }; }, { "wordClicked": "wordClicked"; }, never, never, true, never>;
43
45
  }
@@ -119,11 +119,12 @@ export interface ILesson {
119
119
  appExtension: Record<string, any>;
120
120
  generatedByAI: boolean;
121
121
  prompt: string;
122
- level: number;
123
122
  extras: ILessonExtra;
124
123
  }
125
124
  export interface ILessonWithTaken extends ILesson {
126
125
  taken: any;
126
+ createdAt: Date;
127
+ updatedAt: Date;
127
128
  }
128
129
  export interface ILessonTaken {
129
130
  id: string;
@@ -12,9 +12,9 @@ export declare class LessonUtilsService {
12
12
  */
13
13
  validateAudios(lesson: ILesson | undefined): void;
14
14
  /**
15
- * Updates the lesson signal with a new cover image.
15
+ * Updates the lesson signal with a new banner image in metadata.
16
16
  * @param lessonSignal The signal holding the lesson data.
17
- * @param imageUploaded The image data object from the upload event.
17
+ * @param imageUploaded The image data object from the upload event. Should conform to LessonImage structure partially.
18
18
  */
19
19
  uploadCover(lessonSignal: WritableSignal<ILesson | undefined>, imageUploaded: any): void;
20
20
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-lessons",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
@@ -1,6 +0,0 @@
1
- export declare const PROMPTS: {
2
- generateLesson: string;
3
- GetImageSuggestion: string;
4
- };
5
- export declare const getImageSuggestion: (language: string, lessonTopic: string) => string;
6
- export declare const getPromptGenerateLesson: (baseLang: string, targetLang: string, lessonTopic: string, aditionalPrompt: string) => string;