@dataclouder/ngx-lessons 0.1.2 → 0.1.3

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.
Files changed (27) hide show
  1. package/fesm2022/dataclouder-ngx-lessons.mjs +771 -452
  2. package/fesm2022/dataclouder-ngx-lessons.mjs.map +1 -1
  3. package/lib/components/courses/course-detail/course-detail.component.d.ts +5 -0
  4. package/lib/components/courses/course-form/course-form.component.d.ts +35 -0
  5. package/lib/components/courses/course-list/course-list.component.d.ts +25 -0
  6. package/lib/components/courses/courses.component.d.ts +5 -0
  7. package/lib/components/courses/courses.service.d.ts +14 -0
  8. package/lib/components/courses/models/courses.model.d.ts +24 -0
  9. package/lib/components/courses-admin/courses-admin.component.d.ts +8 -0
  10. package/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.d.ts +1 -1
  11. package/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.d.ts +2 -0
  12. package/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.d.ts +11 -5
  13. package/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.d.ts +5 -9
  14. package/lib/components/dynamic-components/dynamic-components-builder.service.d.ts +8 -0
  15. package/lib/components/dynamic-components/dynamic-components.service.d.ts +30 -0
  16. package/lib/components/{lesson-mini-components/components → dynamic-components}/selector/selector-builder/selector-builder.component.d.ts +4 -7
  17. package/lib/components/{lesson-mini-components/components → dynamic-components}/selector/selector.component.d.ts +2 -2
  18. package/lib/components/lesson-mini-components/components/ComponentBuilder.d.ts +8 -6
  19. package/lib/components/lesson-mini-components/components/lessons.clases.d.ts +8 -18
  20. package/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.d.ts +1 -0
  21. package/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.d.ts +2 -9
  22. package/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.d.ts +2 -8
  23. package/lib/models/lessons.pipes.d.ts +16 -0
  24. package/lib/services/courses.service.d.ts +7 -0
  25. package/lib/services/lesson-ai.service.d.ts +2 -1
  26. package/package.json +1 -1
  27. package/public-api.d.ts +10 -2
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CourseDetailComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<CourseDetailComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<CourseDetailComponent, "app-course-detail", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,35 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { ICourse } from '../models/courses.model';
4
+ import { AspectType, ResolutionType, CloudStorageData } from '@dataclouder/ngx-cloud-storage';
5
+ import { FormlyFieldConfig } from '@ngx-formly/core';
6
+ import * as i0 from "@angular/core";
7
+ export declare class CourseFormComponent implements OnInit {
8
+ private route;
9
+ private courseService;
10
+ private fb;
11
+ private router;
12
+ private toastService;
13
+ private cdr;
14
+ storageImgSettings: {
15
+ path: string;
16
+ cropSettings: {
17
+ aspectRatio: AspectType;
18
+ resolutions: ResolutionType[];
19
+ resizeToWidth: number;
20
+ };
21
+ };
22
+ extraFields: FormlyFieldConfig[];
23
+ courseForm: FormGroup<{
24
+ name: import("@angular/forms").FormControl<string>;
25
+ description: import("@angular/forms").FormControl<string>;
26
+ image: import("@angular/forms").FormControl<CloudStorageData>;
27
+ }>;
28
+ course: ICourse | null;
29
+ courseId: any;
30
+ ngOnInit(): Promise<void>;
31
+ save(): Promise<void>;
32
+ handleImageUpload(event: any): void;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<CourseFormComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<CourseFormComponent, "app-source-form", never, {}, {}, never, never, true, never>;
35
+ }
@@ -0,0 +1,25 @@
1
+ import { OnInit, WritableSignal } from '@angular/core';
2
+ import { ListFilterBarOptions, OnActionEvent, PaginationBase } from '@dataclouder/ngx-core';
3
+ import { ICourse } from '../models/courses.model';
4
+ import { MenuItem } from 'primeng/api';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CourseListComponent extends PaginationBase implements OnInit {
7
+ private toastService;
8
+ private sourceService;
9
+ private cdr;
10
+ viewType: 'table' | 'card';
11
+ readonly onlyView: import("@angular/core").InputSignal<boolean>;
12
+ readonly onSelect: import("@angular/core").OutputEmitterRef<ICourse>;
13
+ courses: WritableSignal<ICourse[]>;
14
+ columns: any[];
15
+ filterBarOptions: ListFilterBarOptions;
16
+ getCustomButtons(item: any): MenuItem[];
17
+ ngOnInit(): Promise<void>;
18
+ protected loadData(): Promise<void>;
19
+ onNew(): void;
20
+ toggleView(): void;
21
+ selectItem(course: ICourse): void;
22
+ doAction(actionEvent: OnActionEvent): Promise<void>;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<CourseListComponent, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<CourseListComponent, "app-course-list", never, { "viewType": { "alias": "viewType"; "required": false; }; "onlyView": { "alias": "onlyView"; "required": false; "isSignal": true; }; }, { "onSelect": "onSelect"; }, never, never, true, never>;
25
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CoursesComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<CoursesComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<CoursesComponent, "app-courses", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,14 @@
1
+ import { ICourse } from './models/courses.model';
2
+ import { FiltersConfig, IFilterQueryResponse } from '@dataclouder/ngx-core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CourseService {
5
+ private httpService;
6
+ private toastService;
7
+ getCourses(): Promise<ICourse[]>;
8
+ getFilteredCourses(filter: FiltersConfig): Promise<IFilterQueryResponse<ICourse>>;
9
+ getCourse(id: string): Promise<ICourse>;
10
+ saveCourse(course: ICourse): Promise<ICourse>;
11
+ deleteCourse(id: string): Promise<import("@dataclouder/ngx-core").DeletedData>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<CourseService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<CourseService>;
14
+ }
@@ -0,0 +1,24 @@
1
+ import { CloudStorageData } from '@dataclouder/ngx-cloud-storage';
2
+ export interface AuditDate {
3
+ createdAt?: string;
4
+ updatedAt?: string;
5
+ }
6
+ export declare enum CourseType {
7
+ Gen1 = "gen1",
8
+ Gen2 = "gen2",
9
+ Gen3 = "gen3"
10
+ }
11
+ export interface ICourseRelation {
12
+ id: string;
13
+ name: string;
14
+ description: string;
15
+ }
16
+ export interface ICourse extends AuditDate {
17
+ _id: string;
18
+ id: string;
19
+ name?: string;
20
+ image?: CloudStorageData;
21
+ description?: string;
22
+ type?: string;
23
+ relation?: ICourseRelation;
24
+ }
@@ -0,0 +1,8 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CoursesAdminComponent implements OnInit {
4
+ private httpCoreService;
5
+ ngOnInit(): Promise<void>;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CoursesAdminComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<CoursesAdminComponent, "ngx-courses-admin", never, {}, {}, never, never, true, never>;
8
+ }
@@ -5,7 +5,7 @@ export declare class DCLessonComponentAdderComponent {
5
5
  #private;
6
6
  componentAdded: EventEmitter<any>;
7
7
  lessonComponentEnum: typeof LessonComponentEnum;
8
- openComponentBuilder(type: LessonComponentEnum): void;
8
+ openComponentBuilder(type: string): void;
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<DCLessonComponentAdderComponent, never>;
10
10
  static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonComponentAdderComponent, "dc-lesson-component-adder", never, {}, { "componentAdded": "componentAdded"; }, never, never, true, never>;
11
11
  }
@@ -10,6 +10,7 @@ export declare class DCLessonEditorComponent {
10
10
  private promptService;
11
11
  private ngxVertexService;
12
12
  private cdr;
13
+ private dynamicComponentsBuilderService;
13
14
  target: ViewContainerRef;
14
15
  dhtml: ElementRef;
15
16
  readonly lessonId: import("@angular/core").Signal<string>;
@@ -60,6 +61,7 @@ export declare class DCLessonEditorComponent {
60
61
  promptsVisible: boolean;
61
62
  prompts: any;
62
63
  showPrompts(): void;
64
+ editComponent(comp: any): void;
63
65
  static ɵfac: i0.ɵɵFactoryDeclaration<DCLessonEditorComponent, never>;
64
66
  static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonEditorComponent, "dc-lesson-editor", never, {}, {}, never, never, true, never>;
65
67
  }
@@ -1,12 +1,15 @@
1
- import { ElementRef, EventEmitter } from '@angular/core';
1
+ import { ElementRef, EventEmitter, OnInit } 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, ChatEvent, WordData } from '@dataclouder/ngx-agent-cards';
4
+ import { IAgentCard, IConversationSettings, IMiniAgentCard, SimpleAgentTask, ChatEvent, WordData, ConversationEvents } from '@dataclouder/ngx-agent-cards';
5
5
  import * as i0 from "@angular/core";
6
- export declare class DCLessonRendererComponent {
6
+ export interface ILessonsSettings {
7
+ additionalPrompt: string;
8
+ }
9
+ export declare class DCLessonRendererComponent implements OnInit {
7
10
  lessonInput: import("@angular/core").InputSignal<ILesson>;
8
11
  lessonIdInput: import("@angular/core").InputSignal<string>;
9
- test: import("@angular/core").InputSignal<boolean>;
12
+ settings: import("@angular/core").InputSignal<ILessonsSettings>;
10
13
  wordClicked: EventEmitter<WordData>;
11
14
  dynamicLesson: ElementRef<HTMLElement>;
12
15
  private readonly renderer;
@@ -15,12 +18,14 @@ export declare class DCLessonRendererComponent {
15
18
  private readonly lessonService;
16
19
  private readonly lessonAIService;
17
20
  private readonly userDataExchange;
21
+ private readonly dynamicComponentsService;
18
22
  lesson: import("@angular/core").WritableSignal<ILesson>;
19
23
  chatVisible: import("@angular/core").WritableSignal<boolean>;
20
24
  agentMasterLesson: import("@angular/core").WritableSignal<IAgentCard>;
21
25
  evaluatorAgentCard: import("@angular/core").WritableSignal<IMiniAgentCard>;
22
26
  conversationSettings: import("@angular/core").WritableSignal<IConversationSettings>;
23
27
  evalAgentTask: import("@angular/core").WritableSignal<SimpleAgentTask>;
28
+ backgroundTasks: Record<ConversationEvents | string, SimpleAgentTask>;
24
29
  imageCover: import("@angular/core").Signal<string>;
25
30
  private components;
26
31
  mainForm: FormGroup<{
@@ -28,6 +33,7 @@ export declare class DCLessonRendererComponent {
28
33
  }>;
29
34
  private previousTextCoded;
30
35
  constructor();
36
+ ngOnInit(): void;
31
37
  private _clearLessonRendering;
32
38
  private _renderLesson;
33
39
  private _parseAndCreateComponents;
@@ -41,5 +47,5 @@ export declare class DCLessonRendererComponent {
41
47
  handleGoalCompleted(event: any): void;
42
48
  onChatMessage(event: ChatEvent): void;
43
49
  static ɵfac: i0.ɵɵFactoryDeclaration<DCLessonRendererComponent, 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>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonRendererComponent, "dc-lesson-renderer", never, { "lessonInput": { "alias": "lessonInput"; "required": false; "isSignal": true; }; "lessonIdInput": { "alias": "lessonIdInput"; "required": false; "isSignal": true; }; "settings": { "alias": "settings"; "required": false; "isSignal": true; }; }, { "wordClicked": "wordClicked"; }, never, never, true, never>;
45
51
  }
@@ -1,28 +1,24 @@
1
1
  import { ChangeDetectorRef, OnInit, Type, QueryList, OnDestroy } from '@angular/core';
2
2
  import { NgComponentOutlet } from '@angular/common';
3
- import { ActivatedRoute, Router } from '@angular/router';
4
3
  import { Subscription } from 'rxjs';
5
- import { ICustomFilter, OnActionEvent, PaginationBase, PColumn, ToastAlertsAbstractService } from '@dataclouder/ngx-core';
6
- import { LessonsAbstractService } from '../../lesson-mini-components/components/lessons.clases';
4
+ import { ICustomFilter, OnActionEvent, PaginationBase, PColumn, ListFilterBarOptions } from '@dataclouder/ngx-core';
7
5
  import { DcLessonCardComponent } from '../dc-lesson-card/dc-lesson-card.component';
8
6
  import * as i0 from "@angular/core";
9
7
  export declare class DCLessonListComponent extends PaginationBase implements OnInit, OnDestroy {
10
- private cdr;
11
- router: Router;
12
- route: ActivatedRoute;
13
- private lessonsService;
14
- private toastrService;
15
8
  showOptions: boolean;
16
9
  customCardComponent?: Type<DcLessonCardComponent>;
17
10
  customFilters: ICustomFilter[];
18
11
  viewType: 'table' | 'cards';
12
+ cdr: ChangeDetectorRef;
13
+ lessonsService: import("@dataclouder/ngx-lessons").LessonsAbstractService;
14
+ toastrService: import("@dataclouder/ngx-core").ToastAlertsAbstractService;
15
+ filterBarOptions: ListFilterBarOptions;
19
16
  columns: PColumn[];
20
17
  outlets: QueryList<NgComponentOutlet>;
21
18
  cardComponent: Type<DcLessonCardComponent>;
22
19
  cardEventSubs: Subscription[];
23
20
  lessons: any[];
24
21
  isLoadingLessons: boolean;
25
- constructor(cdr: ChangeDetectorRef, router: Router, route: ActivatedRoute, lessonsService: LessonsAbstractService, toastrService: ToastAlertsAbstractService);
26
22
  ngOnInit(): void;
27
23
  subscribeDinamicInstantToEvents(): void;
28
24
  private subscribeToCardEvents;
@@ -0,0 +1,8 @@
1
+ import { DynamicDialogRef } from 'primeng/dynamicdialog';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DynamicComponentsBuilderService {
4
+ #private;
5
+ openComponentBuilder(componentType: string, data?: any): DynamicDialogRef | undefined;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentsBuilderService, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<DynamicComponentsBuilderService>;
8
+ }
@@ -0,0 +1,30 @@
1
+ import { Type } from '@angular/core';
2
+ import { LessonComponentEnum } from '../lesson-mini-components/components/lessons.clases';
3
+ import { SpeakerBuilderComponent } from '../lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component';
4
+ import { SpeakerComponent } from '../lesson-mini-components/components/speaker/speaker.component';
5
+ import * as i0 from "@angular/core";
6
+ export interface InputCompoennt {
7
+ text?: string;
8
+ [key: string]: any;
9
+ }
10
+ export interface DynamicComponentData {
11
+ id?: string;
12
+ component: LessonComponentEnum;
13
+ inputs?: InputCompoennt;
14
+ }
15
+ export declare const DynamicComponentBuilders: {
16
+ speaker: typeof SpeakerBuilderComponent;
17
+ };
18
+ export declare const DynamicComponents: {
19
+ speaker: typeof SpeakerComponent;
20
+ };
21
+ export declare class DynamicComponentsService {
22
+ private _dynamicComponentBuilders;
23
+ private _dynamicComponents;
24
+ registerCustomComponent(component: Type<any>, name?: string): void;
25
+ registerCustomComponentBuilder(component: Type<any>, name?: string): void;
26
+ getDynamicComponentBuilders(type: any): any;
27
+ getDynamicComponentClass(type: LessonComponentEnum | string): any;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentsService, never>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<DynamicComponentsService>;
30
+ }
@@ -1,13 +1,10 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { UntypedFormArray, FormBuilder } from '@angular/forms';
3
- import { DynamicDialogRef } from 'primeng/dynamicdialog';
4
- import { ComponentBuilder } from '../../ComponentBuilder';
5
- import { LessonComponentConfiguration } from '../../lessons.clases';
2
+ import { UntypedFormArray } from '@angular/forms';
3
+ import { ComponentBuilder } from '../../../lesson-mini-components/components/ComponentBuilder';
4
+ import { LessonComponentConfiguration } from '../../../lesson-mini-components/components/lessons.clases';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class SelectorBuilderComponent extends ComponentBuilder implements OnInit {
8
- protected formBuilder: FormBuilder;
9
- protected ref: DynamicDialogRef;
10
- constructor(formBuilder: FormBuilder, ref: DynamicDialogRef);
7
+ componentName: string;
11
8
  sampleConfig: LessonComponentConfiguration;
12
9
  ngOnInit(): void;
13
10
  isRendered: any;
@@ -1,5 +1,5 @@
1
- import { ComponentWithForm } from '../ComponentWithForm';
2
- import { LessonComponentConfiguration, LessonComponentInterface } from '../lessons.clases';
1
+ import { ComponentWithForm } from '../../lesson-mini-components/components/ComponentWithForm';
2
+ import { LessonComponentConfiguration, LessonComponentInterface } from '../../lesson-mini-components/components/lessons.clases';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class SelectorComponent extends ComponentWithForm implements LessonComponentInterface {
5
5
  isFilled: boolean;
@@ -1,4 +1,4 @@
1
- import { FormBuilder, FormControl } from '@angular/forms';
1
+ import { FormArray, FormBuilder, FormControl } from '@angular/forms';
2
2
  import { DynamicDialogRef } from 'primeng/dynamicdialog';
3
3
  import { LessonComponentConfiguration, LessonComponentEnum, LessonCompSettings } from './lessons.clases';
4
4
  import * as i0 from "@angular/core";
@@ -9,14 +9,16 @@ export interface ComponentBuildData {
9
9
  str: string;
10
10
  obj: LessonComponentConfiguration;
11
11
  }
12
- export declare class ComponentBuilder {
12
+ export declare abstract class ComponentBuilder {
13
+ inputs: Record<string, any>;
14
+ id: string;
15
+ abstract componentName: string;
13
16
  protected formBuilder: FormBuilder;
14
- protected ref: DynamicDialogRef;
15
- constructor(formBuilder: FormBuilder, ref: DynamicDialogRef);
17
+ protected ref: DynamicDialogRef<any>;
16
18
  formGroup: import("@angular/forms").FormGroup<{
17
19
  response: FormControl<string>;
18
20
  responses: FormControl<string>;
19
- options: import("@angular/forms").FormArray<FormControl<unknown>>;
21
+ options: FormArray<any>;
20
22
  text: FormControl<string>;
21
23
  hint: FormControl<string>;
22
24
  explanation: FormControl<string>;
@@ -27,5 +29,5 @@ export declare class ComponentBuilder {
27
29
  getComponentData(): ComponentBuildData;
28
30
  copyToClipboard(): Promise<void>;
29
31
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentBuilder, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<ComponentBuilder, "app-component-builder", never, {}, {}, never, never, true, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComponentBuilder, "app-component-builder", never, { "inputs": { "alias": "inputs"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
31
33
  }
@@ -1,14 +1,14 @@
1
1
  import { UntypedFormControl } from '@angular/forms';
2
2
  import { InjectionToken, Type } from '@angular/core';
3
3
  import { Provider } from '@angular/core';
4
- import { SelectorBuilderComponent } from './selector/selector-builder/selector-builder.component';
5
- import { SelectorComponent } from './selector/selector.component';
6
4
  import { TextWriterBuiderComponent } from './text-writer/text-writer-buider/text-writer-buider.component';
7
5
  import { TextWriterComponent } from './text-writer/text-writer.component';
8
6
  import { TranslationSwitcherBuilderComponent } from './translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component';
9
7
  import { TranslationSwitcherComponent } from './translationSwitcher/translationSwitcher.component';
10
8
  import { SpeakerBuilderComponent } from './speaker/speaker-builder/speaker-builder.component';
11
9
  import { SpeakerComponent } from './speaker/speaker.component';
10
+ import { SelectorBuilderComponent } from '../../dynamic-components/selector/selector-builder/selector-builder.component';
11
+ import { SelectorComponent } from '../../dynamic-components/selector/selector.component';
12
12
  export type LessonComponentsType = 'selector' | 'speaker' | 'text-writer' | 'verb-summary' | 'word-summary';
13
13
  export declare enum LessonComponentEnum {
14
14
  Selector = "selector",
@@ -16,7 +16,8 @@ export declare enum LessonComponentEnum {
16
16
  TextWriter = "textWriter",
17
17
  VerbSummary = "verbSummary",
18
18
  WordSummary = "wordSummary",
19
- TranslationSwitcher = "translationSwitcher"
19
+ TranslationSwitcher = "translationSwitcher",
20
+ PlayWord = "playWord"
20
21
  }
21
22
  export declare const LessonComponentBuilders: {
22
23
  selector: typeof SelectorBuilderComponent;
@@ -39,9 +40,12 @@ export interface LessonCompSettings {
39
40
  hint?: string;
40
41
  explanation?: string;
41
42
  }
43
+ export interface TextContent {
44
+ text: string;
45
+ }
42
46
  export interface LessonComponentConfiguration<T extends LessonCompSettings = LessonCompSettings> {
43
47
  id?: string;
44
- component: LessonComponentEnum;
48
+ component: LessonComponentEnum | string;
45
49
  settings?: T;
46
50
  inputs?: Record<string, any>;
47
51
  }
@@ -152,18 +156,4 @@ export declare abstract class LessonsAbstractService {
152
156
  abstract getPrompts(): LessonPrompts;
153
157
  }
154
158
  export declare function provideLessonsService(serviceImplementation: Type<LessonsAbstractService>): Provider[];
155
- export declare const LangCodeDescription: {
156
- es: string;
157
- en: string;
158
- it: string;
159
- pt: string;
160
- fr: string;
161
- };
162
- export declare const LangCodeDescriptionEs: {
163
- es: string;
164
- en: string;
165
- it: string;
166
- pt: string;
167
- fr: string;
168
- };
169
159
  export {};
@@ -3,6 +3,7 @@ import { TTSGenerated } from '@dataclouder/ngx-tts';
3
3
  import { LessonComponentConfiguration, LessonCompSettings } from '../../lessons.clases';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class SpeakerBuilderComponent extends ComponentBuilder {
6
+ componentName: string;
6
7
  tts: import("@angular/core").WritableSignal<TTSGenerated>;
7
8
  handleTtsGenerated(event: TTSGenerated): void;
8
9
  protected getCode(): LessonComponentConfiguration<LessonCompSettings & {
@@ -1,14 +1,7 @@
1
- import { OnInit } from '@angular/core';
2
- import { UntypedFormBuilder } from '@angular/forms';
3
- import { DynamicDialogRef } from 'primeng/dynamicdialog';
4
1
  import { ComponentBuilder } from '../../ComponentBuilder';
5
2
  import * as i0 from "@angular/core";
6
- export declare class TextWriterBuiderComponent extends ComponentBuilder implements OnInit {
7
- protected formBuilder: UntypedFormBuilder;
8
- protected ref: DynamicDialogRef;
9
- constructor(formBuilder: UntypedFormBuilder, ref: DynamicDialogRef);
10
- formGroup: import("@angular/forms").UntypedFormGroup;
11
- ngOnInit(): void;
3
+ export declare class TextWriterBuiderComponent extends ComponentBuilder {
4
+ componentName: string;
12
5
  static ɵfac: i0.ɵɵFactoryDeclaration<TextWriterBuiderComponent, never>;
13
6
  static ɵcmp: i0.ɵɵComponentDeclaration<TextWriterBuiderComponent, "app-text-writer-buider", never, {}, {}, never, never, true, never>;
14
7
  }
@@ -1,13 +1,7 @@
1
- import { OnInit } from '@angular/core';
2
- import { FormBuilder } from '@angular/forms';
3
- import { DynamicDialogRef } from 'primeng/dynamicdialog';
4
1
  import { ComponentBuilder } from '../../ComponentBuilder';
5
2
  import * as i0 from "@angular/core";
6
- export declare class TranslationSwitcherBuilderComponent extends ComponentBuilder implements OnInit {
7
- protected formBuilder: FormBuilder;
8
- protected ref: DynamicDialogRef;
9
- constructor(formBuilder: FormBuilder, ref: DynamicDialogRef);
10
- ngOnInit(): void;
3
+ export declare class TranslationSwitcherBuilderComponent extends ComponentBuilder {
4
+ componentName: string;
11
5
  static ɵfac: i0.ɵɵFactoryDeclaration<TranslationSwitcherBuilderComponent, never>;
12
6
  static ɵcmp: i0.ɵɵComponentDeclaration<TranslationSwitcherBuilderComponent, "app-translation-switcher-builder", never, {}, {}, never, never, true, never>;
13
7
  }
@@ -1,5 +1,21 @@
1
1
  import { type PipeTransform } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
+ export declare const LangCodeDescription: {
4
+ es: string;
5
+ en: string;
6
+ it: string;
7
+ pt: string;
8
+ fr: string;
9
+ ja: string;
10
+ };
11
+ export declare const LangCodeDescriptionEs: {
12
+ es: string;
13
+ en: string;
14
+ it: string;
15
+ pt: string;
16
+ fr: string;
17
+ ja: string;
18
+ };
3
19
  export declare class LangDescTranslationPipe implements PipeTransform {
4
20
  transform(value: string, lang: string): boolean;
5
21
  static ɵfac: i0.ɵɵFactoryDeclaration<LangDescTranslationPipe, never>;
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CoursesService {
3
+ private httpCoreService;
4
+ getCourses(): Promise<any>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CoursesService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<CoursesService>;
7
+ }
@@ -1,5 +1,6 @@
1
1
  import { IAgentCard, IMiniAgentCard, IConversationSettings } from '@dataclouder/ngx-agent-cards';
2
2
  import { ILesson } from '../components/lesson-mini-components/components/lessons.clases';
3
+ import { ILessonsSettings } from '../components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class LessonAIService {
5
6
  private readonly lessonService;
@@ -25,7 +26,7 @@ export declare class LessonAIService {
25
26
  * @param lesson The lesson data.
26
27
  * @returns An IConversationSettings object configured for the lesson scenario.
27
28
  */
28
- generateConversationSettingsForLesson(lesson: ILesson): Promise<IConversationSettings | null>;
29
+ generateConversationSettingsForLesson(lesson: ILesson, settings: ILessonsSettings): Promise<IConversationSettings | null>;
29
30
  static ɵfac: i0.ɵɵFactoryDeclaration<LessonAIService, never>;
30
31
  static ɵprov: i0.ɵɵInjectableDeclaration<LessonAIService>;
31
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-lessons",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
package/public-api.d.ts CHANGED
@@ -13,7 +13,15 @@ export * from './lib/components/lesson-mini-components/components/lessons.clases
13
13
  export * from './lib/components/lesson-mini-components/components/ComponentBuilder';
14
14
  export * from './lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component';
15
15
  export * from './lib/components/lesson-mini-components/components/text-writer/text-writer.component';
16
- export * from './lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component';
17
- export * from './lib/components/lesson-mini-components/components/selector/selector.component';
18
16
  export * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component';
19
17
  export * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component';
18
+ export * from './lib/components/dynamic-components/selector/selector.component';
19
+ export * from './lib/components/dynamic-components/selector/selector-builder/selector-builder.component';
20
+ export * from './lib/components/dynamic-components/dynamic-components.service';
21
+ export * from './lib/services/courses.service';
22
+ export * from './lib/components/courses-admin/courses-admin.component';
23
+ export * from './lib/components/courses/courses.component';
24
+ export * from './lib/components/courses/course-detail/course-detail.component';
25
+ export * from './lib/components/courses/course-form/course-form.component';
26
+ export * from './lib/components/courses/course-list/course-list.component';
27
+ export * from './lib/components/courses/courses.service';