@dataclouder/ngx-lessons 0.1.14 → 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/fesm2022/dataclouder-ngx-lessons.mjs +1302 -1156
- package/fesm2022/dataclouder-ngx-lessons.mjs.map +1 -1
- package/index.d.ts +23 -25
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -7,10 +7,9 @@ import { EntityCommunicationService, FiltersConfig, IFilterQueryResponse, IExten
|
|
|
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-
|
|
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
14
|
|
|
16
15
|
declare const LangCodeDescription: {
|
|
@@ -310,6 +309,7 @@ interface ContentMetadata {
|
|
|
310
309
|
interface ILesson {
|
|
311
310
|
_id?: any;
|
|
312
311
|
id: string;
|
|
312
|
+
name: string;
|
|
313
313
|
title: string;
|
|
314
314
|
description: string;
|
|
315
315
|
markdown: string;
|
|
@@ -317,11 +317,10 @@ interface ILesson {
|
|
|
317
317
|
tags: string[];
|
|
318
318
|
media: Media;
|
|
319
319
|
format: 'html' | 'markdown';
|
|
320
|
-
components: Array<LessonComponentConfiguration<any>>;
|
|
321
320
|
dynamicComponents: Record<string, DynamicContentComponent>;
|
|
322
321
|
baseLang: string;
|
|
323
322
|
targetLang: string;
|
|
324
|
-
extensions
|
|
323
|
+
extensions?: IExtensionable;
|
|
325
324
|
assets?: IAssetable;
|
|
326
325
|
learnable: ILearnable;
|
|
327
326
|
auditable: IAuditable;
|
|
@@ -399,8 +398,7 @@ declare class DCLessonFormComponent {
|
|
|
399
398
|
|
|
400
399
|
declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
401
400
|
private lessonFormEditorService;
|
|
402
|
-
|
|
403
|
-
form: FormGroup<{
|
|
401
|
+
form: _angular_forms.FormGroup<{
|
|
404
402
|
version: _angular_forms.FormControl<string>;
|
|
405
403
|
id: _angular_forms.FormControl<string>;
|
|
406
404
|
name: _angular_forms.FormControl<string>;
|
|
@@ -412,8 +410,8 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
412
410
|
metaApp: _angular_forms.FormControl<any>;
|
|
413
411
|
conversationFlow: _angular_forms.FormControl<any>;
|
|
414
412
|
textCoded: _angular_forms.FormControl<string>;
|
|
415
|
-
manageable: FormGroup<any>;
|
|
416
|
-
learnable: FormGroup<{
|
|
413
|
+
manageable: _angular_forms.FormGroup<any>;
|
|
414
|
+
learnable: _angular_forms.FormGroup<{
|
|
417
415
|
level: _angular_forms.FormControl<number | null>;
|
|
418
416
|
takenCount: _angular_forms.FormControl<number | null>;
|
|
419
417
|
tags: _angular_forms.FormArray<_angular_forms.FormControl<string | null>>;
|
|
@@ -424,7 +422,6 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
424
422
|
value: string;
|
|
425
423
|
}[];
|
|
426
424
|
protected entityCommunicationService: DefaultLessonsService;
|
|
427
|
-
htmlTemporal: string;
|
|
428
425
|
protected patchForm(entity: ILesson): void;
|
|
429
426
|
private activatedRoute;
|
|
430
427
|
private lessonNotionService;
|
|
@@ -436,11 +433,10 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
436
433
|
private ngxVertexService;
|
|
437
434
|
private dynamicComponentsBuilderService;
|
|
438
435
|
isLoadingLesson: i0.WritableSignal<boolean>;
|
|
439
|
-
readonly dynamicComponentsArray: i0.Signal<
|
|
436
|
+
readonly dynamicComponentsArray: i0.Signal<DynamicContentComponent[]>;
|
|
440
437
|
components: {
|
|
441
438
|
[key: string]: ComponentRef<LessonComponentInterface>;
|
|
442
439
|
};
|
|
443
|
-
editor: typeof BalloonEditor;
|
|
444
440
|
lessonComponentEnum: typeof LessonComponentEnum;
|
|
445
441
|
coverStorageSettings: StorageImageSettings;
|
|
446
442
|
/**
|
|
@@ -450,8 +446,8 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
450
446
|
* @param value The new value for the property.
|
|
451
447
|
*/
|
|
452
448
|
updateLessonProperty<K extends keyof ILesson>(property: K, value: ILesson[K]): void;
|
|
453
|
-
updateHtmlTextCoded(_: string, value: string): void;
|
|
454
449
|
onAssetsChange(updatedAssets: IAssetable): void;
|
|
450
|
+
updateLesson(event: ILesson): void;
|
|
455
451
|
saveLesson(event?: Event): Promise<ILesson | undefined>;
|
|
456
452
|
/**
|
|
457
453
|
* Handles the event emitted when a component is added via the adder component.
|
|
@@ -459,6 +455,7 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
459
455
|
*/
|
|
460
456
|
onComponentAdded(result: ComponentBuildData): void;
|
|
461
457
|
improveNotionWithAI(): Promise<void>;
|
|
458
|
+
onNewDynamicComponent(result: ComponentBuildData): void;
|
|
462
459
|
showComponentDetails(data: any): void;
|
|
463
460
|
generateBanner(): Promise<void>;
|
|
464
461
|
editComponent(comp: any): void;
|
|
@@ -536,7 +533,7 @@ declare class DCLessonRendererComponent implements OnInit {
|
|
|
536
533
|
lessonIdInput: i0.InputSignal<string>;
|
|
537
534
|
settings: i0.InputSignal<ILessonsSettings>;
|
|
538
535
|
wordClicked: EventEmitter<WordData>;
|
|
539
|
-
|
|
536
|
+
dynamicLessonRef: i0.Signal<ElementRef<HTMLElement>>;
|
|
540
537
|
private readonly renderer;
|
|
541
538
|
private readonly viewContainerRef;
|
|
542
539
|
private readonly toastrService;
|
|
@@ -576,21 +573,22 @@ interface DynamicComponentData {
|
|
|
576
573
|
component: LessonComponentEnum;
|
|
577
574
|
inputs?: InputCompoennt;
|
|
578
575
|
}
|
|
579
|
-
declare const
|
|
580
|
-
|
|
576
|
+
declare const DefaultDynamicComponentBuilders: DynamicComponentMap;
|
|
577
|
+
declare const DefaultDynamicComponents: DynamicComponentMap;
|
|
578
|
+
type DynamicComponentMap = {
|
|
579
|
+
[key: string]: Type<any>;
|
|
581
580
|
};
|
|
582
|
-
declare
|
|
583
|
-
speaker: typeof SpeakerComponent;
|
|
584
|
-
};
|
|
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<
|
|
593
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
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 {
|
|
@@ -719,5 +717,5 @@ declare class CourseListComponent extends PaginationBase implements OnInit {
|
|
|
719
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>;
|
|
720
718
|
}
|
|
721
719
|
|
|
722
|
-
export { ComponentBuilder, ComponentWithForm, CourseDetailComponent, CourseFormComponent, CourseListComponent, CourseService, CoursesAdminComponent, CoursesComponent, CoursesService, DCLessonEditorComponent, DCLessonFormComponent, DCLessonListComponent, DCLessonRendererComponent, DcLessonCardComponent,
|
|
723
|
-
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 };
|