@dataclouder/ngx-lessons 0.1.14 → 0.1.16
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 +1301 -1190
- package/fesm2022/dataclouder-ngx-lessons.mjs.map +1 -1
- package/index.d.ts +49 -61
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { PipeTransform, InjectionToken, Type, Provider, OnInit,
|
|
2
|
+
import { PipeTransform, InjectionToken, Type, Provider, OnInit, ComponentRef, EventEmitter, ViewContainerRef, Renderer2, ElementRef, WritableSignal } from '@angular/core';
|
|
3
3
|
import { ISimpleAgent, IConversationSettings, IConversationFlow, SimpleAgentTask, WordData, ChatEvent } from '@dataclouder/ngx-agent-cards';
|
|
4
|
-
import { NgComponentOutlet } from '@angular/common';
|
|
5
4
|
import { MenuItem } from 'primeng/api';
|
|
6
|
-
import { EntityCommunicationService, FiltersConfig, IFilterQueryResponse, IExtensionable, ILearnable, IAuditable, IManageable, IReactable,
|
|
5
|
+
import { EntityCommunicationService, FiltersConfig, IFilterQueryResponse, IExtensionable, ILearnable, IAuditable, IManageable, IReactable, EntityBaseListComponent, ICustomFilter, PColumn, OnActionEvent, EntityBaseFormComponent, UiStateService, MobileService, PaginationBase, ListFilterBarOptions } from '@dataclouder/ngx-core';
|
|
7
6
|
import * as _angular_forms from '@angular/forms';
|
|
8
7
|
import { FormBuilder, FormControl, FormArray, UntypedFormControl, UntypedFormArray, FormGroup } from '@angular/forms';
|
|
9
8
|
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
10
|
-
import { TTSGenerated } from '@dataclouder/ngx-
|
|
9
|
+
import { TTSGenerated } from '@dataclouder/ngx-ai-services';
|
|
11
10
|
import { IAssetable, StorageImageSettings, AspectType, ResolutionType } from '@dataclouder/ngx-cloud-storage';
|
|
12
11
|
import { UserService } from '@dataclouder/ngx-users';
|
|
13
|
-
import BalloonEditor from '@ckeditor/ckeditor5-build-balloon-block';
|
|
14
12
|
import * as _angular_router from '@angular/router';
|
|
15
13
|
|
|
16
14
|
declare const LangCodeDescription: {
|
|
@@ -310,6 +308,7 @@ interface ContentMetadata {
|
|
|
310
308
|
interface ILesson {
|
|
311
309
|
_id?: any;
|
|
312
310
|
id: string;
|
|
311
|
+
name: string;
|
|
313
312
|
title: string;
|
|
314
313
|
description: string;
|
|
315
314
|
markdown: string;
|
|
@@ -317,11 +316,10 @@ interface ILesson {
|
|
|
317
316
|
tags: string[];
|
|
318
317
|
media: Media;
|
|
319
318
|
format: 'html' | 'markdown';
|
|
320
|
-
components: Array<LessonComponentConfiguration<any>>;
|
|
321
319
|
dynamicComponents: Record<string, DynamicContentComponent>;
|
|
322
320
|
baseLang: string;
|
|
323
321
|
targetLang: string;
|
|
324
|
-
extensions
|
|
322
|
+
extensions?: IExtensionable;
|
|
325
323
|
assets?: IAssetable;
|
|
326
324
|
learnable: ILearnable;
|
|
327
325
|
auditable: IAuditable;
|
|
@@ -347,49 +345,18 @@ interface LessonPrompts {
|
|
|
347
345
|
}
|
|
348
346
|
declare function provideLessonsService(serviceImplementation: Type<DefaultLessonsService>): Provider[];
|
|
349
347
|
|
|
350
|
-
declare
|
|
351
|
-
Edit = "edit",
|
|
352
|
-
Delete = "delete",
|
|
353
|
-
Select = "select",
|
|
354
|
-
Qr = "qr",
|
|
355
|
-
Clone = "clone"
|
|
356
|
-
}
|
|
357
|
-
declare class DcLessonCardComponent implements OnInit {
|
|
348
|
+
declare class DCLessonListComponent extends EntityBaseListComponent<ILesson> {
|
|
358
349
|
userService: UserService;
|
|
359
|
-
lesson: ILessonWithTaken | ILesson | any;
|
|
360
|
-
showOptions: boolean;
|
|
361
|
-
cardHeight: string;
|
|
362
|
-
onAction: EventEmitter<OnActionEvent>;
|
|
363
|
-
coverUrl: string;
|
|
364
|
-
eventType: typeof EventCard;
|
|
365
|
-
items: MenuItem[];
|
|
366
|
-
ngOnInit(): void;
|
|
367
|
-
eventCard(eventType: EventCard): void;
|
|
368
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DcLessonCardComponent, never>;
|
|
369
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DcLessonCardComponent, "dc-lesson-card", never, { "lesson": { "alias": "lesson"; "required": false; }; "showOptions": { "alias": "showOptions"; "required": false; }; "cardHeight": { "alias": "cardHeight"; "required": false; }; }, { "onAction": "onAction"; }, never, never, true, never>;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
declare class DCLessonListComponent extends EntityBaseListComponent<ILesson> implements OnDestroy, AfterViewInit {
|
|
373
|
-
userService: UserService;
|
|
374
|
-
customCardComponent?: Type<DcLessonCardComponent>;
|
|
375
350
|
customFilters: ICustomFilter[];
|
|
376
351
|
protected entityCommunicationService: DefaultLessonsService;
|
|
377
|
-
outlets: QueryList<NgComponentOutlet>;
|
|
378
|
-
cardComponent: Type<DcLessonCardComponent>;
|
|
379
352
|
columns: PColumn[];
|
|
380
|
-
private cardEventSubs;
|
|
381
353
|
constructor();
|
|
382
|
-
ngOnInit(): Promise<void>;
|
|
383
|
-
ngAfterViewInit(): void;
|
|
384
|
-
ngOnDestroy(): void;
|
|
385
354
|
getCustomButtons(item: ILesson): MenuItem[];
|
|
386
355
|
handleAction(actionEvent: OnActionEvent): void;
|
|
387
356
|
applyFilterBarEvent(filterEvent: OnActionEvent): void;
|
|
388
|
-
private subscribeToCardEvents;
|
|
389
|
-
private clearCardEventSubs;
|
|
390
357
|
protected loadData(): Promise<void>;
|
|
391
358
|
static ɵfac: i0.ɵɵFactoryDeclaration<DCLessonListComponent, never>;
|
|
392
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonListComponent, "dc-lesson-list", never, { "
|
|
359
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonListComponent, "dc-lesson-list", never, { "customFilters": { "alias": "customFilters"; "required": false; }; }, {}, never, never, true, never>;
|
|
393
360
|
}
|
|
394
361
|
|
|
395
362
|
declare class DCLessonFormComponent {
|
|
@@ -399,8 +366,7 @@ declare class DCLessonFormComponent {
|
|
|
399
366
|
|
|
400
367
|
declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
401
368
|
private lessonFormEditorService;
|
|
402
|
-
|
|
403
|
-
form: FormGroup<{
|
|
369
|
+
form: _angular_forms.FormGroup<{
|
|
404
370
|
version: _angular_forms.FormControl<string>;
|
|
405
371
|
id: _angular_forms.FormControl<string>;
|
|
406
372
|
name: _angular_forms.FormControl<string>;
|
|
@@ -412,8 +378,8 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
412
378
|
metaApp: _angular_forms.FormControl<any>;
|
|
413
379
|
conversationFlow: _angular_forms.FormControl<any>;
|
|
414
380
|
textCoded: _angular_forms.FormControl<string>;
|
|
415
|
-
manageable: FormGroup<any>;
|
|
416
|
-
learnable: FormGroup<{
|
|
381
|
+
manageable: _angular_forms.FormGroup<any>;
|
|
382
|
+
learnable: _angular_forms.FormGroup<{
|
|
417
383
|
level: _angular_forms.FormControl<number | null>;
|
|
418
384
|
takenCount: _angular_forms.FormControl<number | null>;
|
|
419
385
|
tags: _angular_forms.FormArray<_angular_forms.FormControl<string | null>>;
|
|
@@ -424,7 +390,6 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
424
390
|
value: string;
|
|
425
391
|
}[];
|
|
426
392
|
protected entityCommunicationService: DefaultLessonsService;
|
|
427
|
-
htmlTemporal: string;
|
|
428
393
|
protected patchForm(entity: ILesson): void;
|
|
429
394
|
private activatedRoute;
|
|
430
395
|
private lessonNotionService;
|
|
@@ -436,11 +401,10 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
436
401
|
private ngxVertexService;
|
|
437
402
|
private dynamicComponentsBuilderService;
|
|
438
403
|
isLoadingLesson: i0.WritableSignal<boolean>;
|
|
439
|
-
readonly dynamicComponentsArray: i0.Signal<
|
|
404
|
+
readonly dynamicComponentsArray: i0.Signal<DynamicContentComponent[]>;
|
|
440
405
|
components: {
|
|
441
406
|
[key: string]: ComponentRef<LessonComponentInterface>;
|
|
442
407
|
};
|
|
443
|
-
editor: typeof BalloonEditor;
|
|
444
408
|
lessonComponentEnum: typeof LessonComponentEnum;
|
|
445
409
|
coverStorageSettings: StorageImageSettings;
|
|
446
410
|
/**
|
|
@@ -450,8 +414,8 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
450
414
|
* @param value The new value for the property.
|
|
451
415
|
*/
|
|
452
416
|
updateLessonProperty<K extends keyof ILesson>(property: K, value: ILesson[K]): void;
|
|
453
|
-
updateHtmlTextCoded(_: string, value: string): void;
|
|
454
417
|
onAssetsChange(updatedAssets: IAssetable): void;
|
|
418
|
+
updateLesson(event: ILesson): void;
|
|
455
419
|
saveLesson(event?: Event): Promise<ILesson | undefined>;
|
|
456
420
|
/**
|
|
457
421
|
* Handles the event emitted when a component is added via the adder component.
|
|
@@ -459,6 +423,7 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
459
423
|
*/
|
|
460
424
|
onComponentAdded(result: ComponentBuildData): void;
|
|
461
425
|
improveNotionWithAI(): Promise<void>;
|
|
426
|
+
onNewDynamicComponent(result: ComponentBuildData): void;
|
|
462
427
|
showComponentDetails(data: any): void;
|
|
463
428
|
generateBanner(): Promise<void>;
|
|
464
429
|
editComponent(comp: any): void;
|
|
@@ -469,6 +434,28 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
469
434
|
static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonEditorComponent, "dc-lesson-editor", never, {}, {}, never, never, true, never>;
|
|
470
435
|
}
|
|
471
436
|
|
|
437
|
+
declare enum EventCard {
|
|
438
|
+
Edit = "edit",
|
|
439
|
+
Delete = "delete",
|
|
440
|
+
Select = "select",
|
|
441
|
+
Qr = "qr",
|
|
442
|
+
Clone = "clone"
|
|
443
|
+
}
|
|
444
|
+
declare class DcLessonCardComponent implements OnInit {
|
|
445
|
+
userService: UserService;
|
|
446
|
+
lesson: ILessonWithTaken | ILesson | any;
|
|
447
|
+
showOptions: boolean;
|
|
448
|
+
cardHeight: string;
|
|
449
|
+
onAction: EventEmitter<OnActionEvent>;
|
|
450
|
+
coverUrl: string;
|
|
451
|
+
eventType: typeof EventCard;
|
|
452
|
+
items: MenuItem[];
|
|
453
|
+
ngOnInit(): void;
|
|
454
|
+
eventCard(eventType: EventCard): void;
|
|
455
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DcLessonCardComponent, never>;
|
|
456
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DcLessonCardComponent, "dc-lesson-card", never, { "lesson": { "alias": "lesson"; "required": false; }; "showOptions": { "alias": "showOptions"; "required": false; }; "cardHeight": { "alias": "cardHeight"; "required": false; }; }, { "onAction": "onAction"; }, never, never, true, never>;
|
|
457
|
+
}
|
|
458
|
+
|
|
472
459
|
declare class LessonsV2Component {
|
|
473
460
|
static ɵfac: i0.ɵɵFactoryDeclaration<LessonsV2Component, never>;
|
|
474
461
|
static ɵcmp: i0.ɵɵComponentDeclaration<LessonsV2Component, "app-lessonsv2", never, {}, {}, never, never, true, never>;
|
|
@@ -536,7 +523,7 @@ declare class DCLessonRendererComponent implements OnInit {
|
|
|
536
523
|
lessonIdInput: i0.InputSignal<string>;
|
|
537
524
|
settings: i0.InputSignal<ILessonsSettings>;
|
|
538
525
|
wordClicked: EventEmitter<WordData>;
|
|
539
|
-
|
|
526
|
+
dynamicLessonRef: i0.Signal<ElementRef<HTMLElement>>;
|
|
540
527
|
private readonly renderer;
|
|
541
528
|
private readonly viewContainerRef;
|
|
542
529
|
private readonly toastrService;
|
|
@@ -576,21 +563,22 @@ interface DynamicComponentData {
|
|
|
576
563
|
component: LessonComponentEnum;
|
|
577
564
|
inputs?: InputCompoennt;
|
|
578
565
|
}
|
|
579
|
-
declare const
|
|
580
|
-
|
|
566
|
+
declare const DefaultDynamicComponentBuilders: DynamicComponentMap;
|
|
567
|
+
declare const DefaultDynamicComponents: DynamicComponentMap;
|
|
568
|
+
type DynamicComponentMap = {
|
|
569
|
+
[key: string]: Type<any>;
|
|
581
570
|
};
|
|
582
|
-
declare
|
|
583
|
-
speaker: typeof SpeakerComponent;
|
|
584
|
-
};
|
|
585
|
-
declare class DynamicComponentsService {
|
|
571
|
+
declare class DynamicComponentsRegisterService {
|
|
586
572
|
private _dynamicComponentBuilders;
|
|
587
573
|
private _dynamicComponents;
|
|
574
|
+
constructor();
|
|
575
|
+
registerComponentAndBuilder(components: DynamicComponentMap, builders: DynamicComponentMap): void;
|
|
588
576
|
registerCustomComponent(component: Type<any>, name?: string): void;
|
|
589
577
|
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<
|
|
578
|
+
getDynamicComponentBuilders(type: any): Type<any>;
|
|
579
|
+
getDynamicComponentClass(type: LessonComponentEnum | string): Type<any>;
|
|
580
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentsRegisterService, never>;
|
|
581
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DynamicComponentsRegisterService>;
|
|
594
582
|
}
|
|
595
583
|
|
|
596
584
|
declare class CoursesService {
|
|
@@ -719,5 +707,5 @@ declare class CourseListComponent extends PaginationBase implements OnInit {
|
|
|
719
707
|
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
708
|
}
|
|
721
709
|
|
|
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 };
|
|
710
|
+
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 };
|
|
711
|
+
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 };
|