@dataclouder/ngx-lessons 0.1.13 → 0.1.15

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.
package/index.d.ts CHANGED
@@ -3,16 +3,14 @@ import { PipeTransform, InjectionToken, Type, Provider, OnInit, EventEmitter, On
3
3
  import { ISimpleAgent, IConversationSettings, IConversationFlow, SimpleAgentTask, WordData, ChatEvent } from '@dataclouder/ngx-agent-cards';
4
4
  import { NgComponentOutlet } from '@angular/common';
5
5
  import { MenuItem } from 'primeng/api';
6
- import { EntityCommunicationService, FiltersConfig, IFilterQueryResponse, IExtensionable, ILearnable, IAuditable, IManageable, IReactable, OnActionEvent, EntityBaseListComponent, ICustomFilter, PColumn, EntityBaseFormComponent, UiStateService, PaginationBase, ListFilterBarOptions } from '@dataclouder/ngx-core';
6
+ import { EntityCommunicationService, FiltersConfig, IFilterQueryResponse, IExtensionable, ILearnable, IAuditable, IManageable, IReactable, OnActionEvent, EntityBaseListComponent, ICustomFilter, PColumn, EntityBaseFormComponent, UiStateService, MobileService, PaginationBase, ListFilterBarOptions } from '@dataclouder/ngx-core';
7
7
  import * as _angular_forms from '@angular/forms';
8
8
  import { FormBuilder, FormControl, FormArray, UntypedFormControl, UntypedFormArray, FormGroup } from '@angular/forms';
9
9
  import { DynamicDialogRef } from 'primeng/dynamicdialog';
10
- import { TTSGenerated } from '@dataclouder/ngx-vertex';
10
+ import { TTSGenerated } from '@dataclouder/ngx-ai-services';
11
11
  import { IAssetable, StorageImageSettings, AspectType, ResolutionType } from '@dataclouder/ngx-cloud-storage';
12
12
  import { UserService } from '@dataclouder/ngx-users';
13
- import BalloonEditor from '@ckeditor/ckeditor5-build-balloon-block';
14
13
  import * as _angular_router from '@angular/router';
15
- import { FormlyFieldConfig } from '@ngx-formly/core';
16
14
 
17
15
  declare const LangCodeDescription: {
18
16
  es: string;
@@ -311,6 +309,7 @@ interface ContentMetadata {
311
309
  interface ILesson {
312
310
  _id?: any;
313
311
  id: string;
312
+ name: string;
314
313
  title: string;
315
314
  description: string;
316
315
  markdown: string;
@@ -318,11 +317,10 @@ interface ILesson {
318
317
  tags: string[];
319
318
  media: Media;
320
319
  format: 'html' | 'markdown';
321
- components: Array<LessonComponentConfiguration<any>>;
322
320
  dynamicComponents: Record<string, DynamicContentComponent>;
323
321
  baseLang: string;
324
322
  targetLang: string;
325
- extensions: IExtensionable;
323
+ extensions?: IExtensionable;
326
324
  assets?: IAssetable;
327
325
  learnable: ILearnable;
328
326
  auditable: IAuditable;
@@ -400,8 +398,7 @@ declare class DCLessonFormComponent {
400
398
 
401
399
  declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
402
400
  private lessonFormEditorService;
403
- private markdownService;
404
- form: FormGroup<{
401
+ form: _angular_forms.FormGroup<{
405
402
  version: _angular_forms.FormControl<string>;
406
403
  id: _angular_forms.FormControl<string>;
407
404
  name: _angular_forms.FormControl<string>;
@@ -413,8 +410,8 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
413
410
  metaApp: _angular_forms.FormControl<any>;
414
411
  conversationFlow: _angular_forms.FormControl<any>;
415
412
  textCoded: _angular_forms.FormControl<string>;
416
- manageable: FormGroup<any>;
417
- learnable: FormGroup<{
413
+ manageable: _angular_forms.FormGroup<any>;
414
+ learnable: _angular_forms.FormGroup<{
418
415
  level: _angular_forms.FormControl<number | null>;
419
416
  takenCount: _angular_forms.FormControl<number | null>;
420
417
  tags: _angular_forms.FormArray<_angular_forms.FormControl<string | null>>;
@@ -425,7 +422,6 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
425
422
  value: string;
426
423
  }[];
427
424
  protected entityCommunicationService: DefaultLessonsService;
428
- htmlTemporal: string;
429
425
  protected patchForm(entity: ILesson): void;
430
426
  private activatedRoute;
431
427
  private lessonNotionService;
@@ -437,11 +433,10 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
437
433
  private ngxVertexService;
438
434
  private dynamicComponentsBuilderService;
439
435
  isLoadingLesson: i0.WritableSignal<boolean>;
440
- readonly dynamicComponentsArray: i0.Signal<any[]>;
436
+ readonly dynamicComponentsArray: i0.Signal<DynamicContentComponent[]>;
441
437
  components: {
442
438
  [key: string]: ComponentRef<LessonComponentInterface>;
443
439
  };
444
- editor: typeof BalloonEditor;
445
440
  lessonComponentEnum: typeof LessonComponentEnum;
446
441
  coverStorageSettings: StorageImageSettings;
447
442
  /**
@@ -451,8 +446,8 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
451
446
  * @param value The new value for the property.
452
447
  */
453
448
  updateLessonProperty<K extends keyof ILesson>(property: K, value: ILesson[K]): void;
454
- updateHtmlTextCoded(_: string, value: string): void;
455
449
  onAssetsChange(updatedAssets: IAssetable): void;
450
+ updateLesson(event: ILesson): void;
456
451
  saveLesson(event?: Event): Promise<ILesson | undefined>;
457
452
  /**
458
453
  * Handles the event emitted when a component is added via the adder component.
@@ -460,6 +455,7 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
460
455
  */
461
456
  onComponentAdded(result: ComponentBuildData): void;
462
457
  improveNotionWithAI(): Promise<void>;
458
+ onNewDynamicComponent(result: ComponentBuildData): void;
463
459
  showComponentDetails(data: any): void;
464
460
  generateBanner(): Promise<void>;
465
461
  editComponent(comp: any): void;
@@ -537,7 +533,7 @@ declare class DCLessonRendererComponent implements OnInit {
537
533
  lessonIdInput: i0.InputSignal<string>;
538
534
  settings: i0.InputSignal<ILessonsSettings>;
539
535
  wordClicked: EventEmitter<WordData>;
540
- dynamicLesson: i0.Signal<ElementRef<HTMLElement>>;
536
+ dynamicLessonRef: i0.Signal<ElementRef<HTMLElement>>;
541
537
  private readonly renderer;
542
538
  private readonly viewContainerRef;
543
539
  private readonly toastrService;
@@ -545,6 +541,7 @@ declare class DCLessonRendererComponent implements OnInit {
545
541
  readonly uiStateService: UiStateService;
546
542
  readonly lessonRendererService: LessonRendererService;
547
543
  readonly lessonConversationService: LessonConversationService;
544
+ readonly mobileService: MobileService;
548
545
  lesson: i0.WritableSignal<ILesson>;
549
546
  imageCover: i0.Signal<string>;
550
547
  private components;
@@ -576,21 +573,22 @@ interface DynamicComponentData {
576
573
  component: LessonComponentEnum;
577
574
  inputs?: InputCompoennt;
578
575
  }
579
- declare const DynamicComponentBuilders: {
580
- speaker: typeof SpeakerBuilderComponent;
581
- };
582
- declare const DynamicComponents: {
583
- speaker: typeof SpeakerComponent;
576
+ declare const DefaultDynamicComponentBuilders: DynamicComponentMap;
577
+ declare const DefaultDynamicComponents: DynamicComponentMap;
578
+ type DynamicComponentMap = {
579
+ [key: string]: Type<any>;
584
580
  };
585
- declare class DynamicComponentsService {
581
+ declare class DynamicComponentsRegisterService {
586
582
  private _dynamicComponentBuilders;
587
583
  private _dynamicComponents;
584
+ constructor();
585
+ registerComponentAndBuilder(components: DynamicComponentMap, builders: DynamicComponentMap): void;
588
586
  registerCustomComponent(component: Type<any>, name?: string): void;
589
587
  registerCustomComponentBuilder(component: Type<any>, name?: string): void;
590
- getDynamicComponentBuilders(type: any): any;
591
- getDynamicComponentClass(type: LessonComponentEnum | string): any;
592
- static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentsService, never>;
593
- static ɵprov: i0.ɵɵInjectableDeclaration<DynamicComponentsService>;
588
+ getDynamicComponentBuilders(type: any): Type<any>;
589
+ getDynamicComponentClass(type: LessonComponentEnum | string): Type<any>;
590
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentsRegisterService, never>;
591
+ static ɵprov: i0.ɵɵInjectableDeclaration<DynamicComponentsRegisterService>;
594
592
  }
595
593
 
596
594
  declare class CoursesService {
@@ -617,12 +615,14 @@ interface ICourseLesson {
617
615
  _id: any;
618
616
  id: string;
619
617
  title: string;
618
+ name: string;
620
619
  description: string;
621
620
  generated: boolean;
622
621
  }
623
622
  interface ICourseModule {
624
623
  _id: any;
625
624
  id: string;
625
+ name: string;
626
626
  title: string;
627
627
  description: string;
628
628
  lessonCount: number;
@@ -687,7 +687,6 @@ declare class CourseFormComponent extends EntityBaseFormComponent<ICourse> imple
687
687
  resizeToWidth: number;
688
688
  };
689
689
  };
690
- extraFields: FormlyFieldConfig[];
691
690
  protected patchForm(entity: ICourse): void;
692
691
  save(): Promise<ICourse | undefined>;
693
692
  handleImageUpload(event: any): void;
@@ -718,5 +717,5 @@ declare class CourseListComponent extends PaginationBase implements OnInit {
718
717
  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>;
719
718
  }
720
719
 
721
- export { ComponentBuilder, ComponentWithForm, CourseDetailComponent, CourseFormComponent, CourseListComponent, CourseService, CoursesAdminComponent, CoursesComponent, CoursesService, DCLessonEditorComponent, DCLessonFormComponent, DCLessonListComponent, DCLessonRendererComponent, DcLessonCardComponent, DefaultLessonsService, DynamicComponentBuilders, DynamicComponents, DynamicComponentsService, FlagLanguagePipe, LESSONS_TOKEN, LangCodeDescription, LangCodeDescriptionEs, LessonComponentBuilders, LessonComponentEnum, LessonComponents, LessonConversationService, LessonDynamicComponent, LessonRendererService, LessonsV2Component, NOTION_SERVICE_TOKEN, NotionAbstractService, NotionExportType, SelectorBuilderComponent, SelectorComponent, TextWriterBuiderComponent, TextWriterComponent, TranslationSwitcherBuilderComponent, TranslationSwitcherComponent, getLanguageSimpleAgent, getLessonComponentClass, provideLessonsService, provideNotionService };
722
- export type { AudioStorage, ComponentBuildData, ContentMetadata, DynamicComponentData, DynamicContentComponent, ILesson, ILessonExtra, ILessonTaken, ILessonWithTaken, ILessonsSettings, ImgStorageData, InputCompoennt, LessonCompSettings, LessonCompSettingsForm, LessonComponentConfiguration, LessonComponentInterface, LessonComponentsType, LessonImage, LessonPrompts, Media, NotionDBResponse, NotionPageResponse, SpeakerCompConfiguration, StorageFile, TextContent };
720
+ export { ComponentBuilder, ComponentWithForm, CourseDetailComponent, CourseFormComponent, CourseListComponent, CourseService, CoursesAdminComponent, CoursesComponent, CoursesService, DCLessonEditorComponent, DCLessonFormComponent, DCLessonListComponent, DCLessonRendererComponent, DcLessonCardComponent, DefaultDynamicComponentBuilders, DefaultDynamicComponents, DefaultLessonsService, DynamicComponentsRegisterService, FlagLanguagePipe, LESSONS_TOKEN, LangCodeDescription, LangCodeDescriptionEs, LessonComponentBuilders, LessonComponentEnum, LessonComponents, LessonConversationService, LessonDynamicComponent, LessonRendererService, LessonsV2Component, NOTION_SERVICE_TOKEN, NotionAbstractService, NotionExportType, SelectorBuilderComponent, SelectorComponent, TextWriterBuiderComponent, TextWriterComponent, TranslationSwitcherBuilderComponent, TranslationSwitcherComponent, getLanguageSimpleAgent, getLessonComponentClass, provideLessonsService, provideNotionService };
721
+ export type { AudioStorage, ComponentBuildData, ContentMetadata, DynamicComponentData, DynamicComponentMap, DynamicContentComponent, ILesson, ILessonExtra, ILessonTaken, ILessonWithTaken, ILessonsSettings, ImgStorageData, InputCompoennt, LessonCompSettings, LessonCompSettingsForm, LessonComponentConfiguration, LessonComponentInterface, LessonComponentsType, LessonImage, LessonPrompts, Media, NotionDBResponse, NotionPageResponse, SpeakerCompConfiguration, StorageFile, TextContent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-lessons",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",