@dataclouder/ngx-lessons 0.1.16 → 0.1.17
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 +119 -135
- package/fesm2022/dataclouder-ngx-lessons.mjs.map +1 -1
- package/index.d.ts +48 -37
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ISimpleAgent, IConversationSettings, IConversationFlow, SimpleAgentTask
|
|
|
4
4
|
import { MenuItem } from 'primeng/api';
|
|
5
5
|
import { EntityCommunicationService, FiltersConfig, IFilterQueryResponse, IExtensionable, ILearnable, IAuditable, IManageable, IReactable, EntityBaseListComponent, ICustomFilter, PColumn, OnActionEvent, EntityBaseFormComponent, UiStateService, MobileService, PaginationBase, ListFilterBarOptions } from '@dataclouder/ngx-core';
|
|
6
6
|
import * as _angular_forms from '@angular/forms';
|
|
7
|
-
import { FormBuilder, FormControl, FormArray, UntypedFormControl,
|
|
7
|
+
import { FormBuilder, FormControl, FormArray, UntypedFormControl, FormGroup, UntypedFormArray } from '@angular/forms';
|
|
8
8
|
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
9
9
|
import { TTSGenerated } from '@dataclouder/ngx-ai-services';
|
|
10
10
|
import { IAssetable, StorageImageSettings, AspectType, ResolutionType } from '@dataclouder/ngx-cloud-storage';
|
|
@@ -81,9 +81,9 @@ type LessonCompSettingsForm = {
|
|
|
81
81
|
};
|
|
82
82
|
interface ComponentBuildData {
|
|
83
83
|
str: string;
|
|
84
|
-
obj:
|
|
84
|
+
obj: IDynamicContentComponent;
|
|
85
85
|
}
|
|
86
|
-
declare abstract class ComponentBuilder {
|
|
86
|
+
declare abstract class ComponentBuilder implements OnInit {
|
|
87
87
|
inputs: Record<string, any>;
|
|
88
88
|
id: string;
|
|
89
89
|
abstract componentName: string;
|
|
@@ -97,8 +97,18 @@ declare abstract class ComponentBuilder {
|
|
|
97
97
|
hint: FormControl<string>;
|
|
98
98
|
explanation: FormControl<string>;
|
|
99
99
|
}>;
|
|
100
|
+
ngOnInit(): void;
|
|
101
|
+
protected populateForm(): void;
|
|
100
102
|
get questionType(): LessonComponentEnum;
|
|
101
|
-
protected
|
|
103
|
+
protected getFormValue(): Partial<{
|
|
104
|
+
response: string;
|
|
105
|
+
responses: string;
|
|
106
|
+
options: any;
|
|
107
|
+
text: string;
|
|
108
|
+
hint: string;
|
|
109
|
+
explanation: string;
|
|
110
|
+
}>;
|
|
111
|
+
protected getCode(): IDynamicContentComponent;
|
|
102
112
|
showCode(): void;
|
|
103
113
|
getComponentData(): ComponentBuildData;
|
|
104
114
|
copyToClipboard(): Promise<void>;
|
|
@@ -150,13 +160,13 @@ declare class TranslationSwitcherComponent implements OnInit {
|
|
|
150
160
|
static ɵcmp: i0.ɵɵComponentDeclaration<TranslationSwitcherComponent, "app-translation-switcher", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
151
161
|
}
|
|
152
162
|
|
|
153
|
-
declare class SpeakerBuilderComponent extends ComponentBuilder {
|
|
163
|
+
declare class SpeakerBuilderComponent extends ComponentBuilder implements OnInit {
|
|
154
164
|
componentName: string;
|
|
165
|
+
form: FormGroup;
|
|
155
166
|
tts: i0.WritableSignal<TTSGenerated>;
|
|
156
167
|
handleTtsGenerated(event: TTSGenerated): void;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}>;
|
|
168
|
+
ngOnInit(): void;
|
|
169
|
+
protected getFormValue(): any;
|
|
160
170
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpeakerBuilderComponent, never>;
|
|
161
171
|
static ɵcmp: i0.ɵɵComponentDeclaration<SpeakerBuilderComponent, "app-speaker-builder", never, {}, {}, never, never, true, never>;
|
|
162
172
|
}
|
|
@@ -165,9 +175,10 @@ declare class SpeakerComponent implements OnInit {
|
|
|
165
175
|
ngOnInit(): void;
|
|
166
176
|
config: SpeakerCompConfiguration;
|
|
167
177
|
tts: TTSGenerated | undefined;
|
|
178
|
+
text: string;
|
|
168
179
|
speach(): void;
|
|
169
180
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpeakerComponent, never>;
|
|
170
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpeakerComponent, "app-speaker", never, { "config": { "alias": "config"; "required": false; }; "tts": { "alias": "tts"; "required": false; }; }, {}, never, never, true, never>;
|
|
181
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpeakerComponent, "app-speaker", never, { "config": { "alias": "config"; "required": false; }; "tts": { "alias": "tts"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, {}, never, never, true, never>;
|
|
171
182
|
}
|
|
172
183
|
|
|
173
184
|
declare class SelectorBuilderComponent extends ComponentBuilder implements OnInit {
|
|
@@ -213,25 +224,25 @@ declare class DefaultLessonsService extends EntityCommunicationService<ILesson>
|
|
|
213
224
|
|
|
214
225
|
type LessonComponentsType = 'selector' | 'speaker' | 'text-writer' | 'verb-summary' | 'word-summary';
|
|
215
226
|
declare enum LessonComponentEnum {
|
|
216
|
-
Selector = "
|
|
217
|
-
Speaker = "
|
|
218
|
-
TextWriter = "
|
|
219
|
-
VerbSummary = "
|
|
220
|
-
WordSummary = "
|
|
221
|
-
TranslationSwitcher = "
|
|
222
|
-
PlayWord = "
|
|
227
|
+
Selector = "Selector",
|
|
228
|
+
Speaker = "Speaker",
|
|
229
|
+
TextWriter = "TextWriter",
|
|
230
|
+
VerbSummary = "VerbSummary",
|
|
231
|
+
WordSummary = "WordSummary",
|
|
232
|
+
TranslationSwitcher = "TranslationSwitcher",
|
|
233
|
+
PlayWord = "PlayWord"
|
|
223
234
|
}
|
|
224
235
|
declare const LessonComponentBuilders: {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
236
|
+
Selector: typeof SelectorBuilderComponent;
|
|
237
|
+
Speaker: typeof SpeakerBuilderComponent;
|
|
238
|
+
TextWriter: typeof TextWriterBuiderComponent;
|
|
239
|
+
TranslationSwitcher: typeof TranslationSwitcherBuilderComponent;
|
|
229
240
|
};
|
|
230
241
|
declare const LessonComponents: {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
242
|
+
Selector: typeof SelectorComponent;
|
|
243
|
+
Speaker: typeof SpeakerComponent;
|
|
244
|
+
TextWriter: typeof TextWriterComponent;
|
|
245
|
+
TranslationSwitcher: typeof TranslationSwitcherComponent;
|
|
235
246
|
};
|
|
236
247
|
declare function getLessonComponentClass(type: LessonComponentsType): any;
|
|
237
248
|
interface LessonCompSettings {
|
|
@@ -280,11 +291,11 @@ interface ImgStorageData extends StorageFile {
|
|
|
280
291
|
type LessonImage = ImgStorageData & {
|
|
281
292
|
type: string;
|
|
282
293
|
};
|
|
283
|
-
interface
|
|
284
|
-
id
|
|
285
|
-
component:
|
|
294
|
+
interface IDynamicContentComponent {
|
|
295
|
+
id?: string;
|
|
296
|
+
component: string;
|
|
286
297
|
inputs: Record<string, any>;
|
|
287
|
-
config
|
|
298
|
+
config?: LessonComponentConfiguration<any>;
|
|
288
299
|
}
|
|
289
300
|
type StorageType = StorageFile & {
|
|
290
301
|
type: string;
|
|
@@ -316,7 +327,7 @@ interface ILesson {
|
|
|
316
327
|
tags: string[];
|
|
317
328
|
media: Media;
|
|
318
329
|
format: 'html' | 'markdown';
|
|
319
|
-
dynamicComponents: Record<string,
|
|
330
|
+
dynamicComponents: Record<string, IDynamicContentComponent>;
|
|
320
331
|
baseLang: string;
|
|
321
332
|
targetLang: string;
|
|
322
333
|
extensions?: IExtensionable;
|
|
@@ -346,7 +357,7 @@ interface LessonPrompts {
|
|
|
346
357
|
declare function provideLessonsService(serviceImplementation: Type<DefaultLessonsService>): Provider[];
|
|
347
358
|
|
|
348
359
|
declare class DCLessonListComponent extends EntityBaseListComponent<ILesson> {
|
|
349
|
-
userService: UserService
|
|
360
|
+
userService: UserService<any>;
|
|
350
361
|
customFilters: ICustomFilter[];
|
|
351
362
|
protected entityCommunicationService: DefaultLessonsService;
|
|
352
363
|
columns: PColumn[];
|
|
@@ -401,7 +412,7 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
401
412
|
private ngxVertexService;
|
|
402
413
|
private dynamicComponentsBuilderService;
|
|
403
414
|
isLoadingLesson: i0.WritableSignal<boolean>;
|
|
404
|
-
readonly dynamicComponentsArray: i0.Signal<
|
|
415
|
+
readonly dynamicComponentsArray: i0.Signal<IDynamicContentComponent[]>;
|
|
405
416
|
components: {
|
|
406
417
|
[key: string]: ComponentRef<LessonComponentInterface>;
|
|
407
418
|
};
|
|
@@ -426,7 +437,7 @@ declare class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {
|
|
|
426
437
|
onNewDynamicComponent(result: ComponentBuildData): void;
|
|
427
438
|
showComponentDetails(data: any): void;
|
|
428
439
|
generateBanner(): Promise<void>;
|
|
429
|
-
editComponent(comp:
|
|
440
|
+
editComponent(comp: IDynamicContentComponent): void;
|
|
430
441
|
onAssetUpdate(event: {
|
|
431
442
|
assets: Partial<IAssetable>;
|
|
432
443
|
}): void;
|
|
@@ -442,7 +453,7 @@ declare enum EventCard {
|
|
|
442
453
|
Clone = "clone"
|
|
443
454
|
}
|
|
444
455
|
declare class DcLessonCardComponent implements OnInit {
|
|
445
|
-
userService: UserService
|
|
456
|
+
userService: UserService<any>;
|
|
446
457
|
lesson: ILessonWithTaken | ILesson | any;
|
|
447
458
|
showOptions: boolean;
|
|
448
459
|
cardHeight: string;
|
|
@@ -468,7 +479,7 @@ declare class LessonRendererService {
|
|
|
468
479
|
mainForm: FormGroup<{
|
|
469
480
|
[key: string]: FormControl<any>;
|
|
470
481
|
}>;
|
|
471
|
-
|
|
482
|
+
buildAndRenderDynamicComponents(lessonData: ILesson, viewContainerRef: ViewContainerRef, dynamicLessonElement: HTMLElement, renderer: Renderer2): {
|
|
472
483
|
[key: string]: ComponentRef<LessonComponentInterface>;
|
|
473
484
|
};
|
|
474
485
|
clearLessonRendering(dynamicLessonElement: HTMLElement): void;
|
|
@@ -491,7 +502,7 @@ declare class LessonRendererService {
|
|
|
491
502
|
|
|
492
503
|
declare class LessonConversationService {
|
|
493
504
|
lessonsService: DefaultLessonsService;
|
|
494
|
-
userService: UserService
|
|
505
|
+
userService: UserService<any>;
|
|
495
506
|
conversationSettings: i0.WritableSignal<IConversationSettings>;
|
|
496
507
|
conversationFlow: i0.WritableSignal<IConversationFlow>;
|
|
497
508
|
evalAgentTask: i0.WritableSignal<SimpleAgentTask>;
|
|
@@ -688,7 +699,7 @@ declare class CourseFormComponent extends EntityBaseFormComponent<ICourse> imple
|
|
|
688
699
|
declare class CourseListComponent extends PaginationBase implements OnInit {
|
|
689
700
|
private toastService;
|
|
690
701
|
private courseService;
|
|
691
|
-
userService: UserService
|
|
702
|
+
userService: UserService<any>;
|
|
692
703
|
private cdr;
|
|
693
704
|
viewType: 'table' | 'card';
|
|
694
705
|
readonly onlyView: i0.InputSignal<boolean>;
|
|
@@ -708,4 +719,4 @@ declare class CourseListComponent extends PaginationBase implements OnInit {
|
|
|
708
719
|
}
|
|
709
720
|
|
|
710
721
|
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,
|
|
722
|
+
export type { AudioStorage, ComponentBuildData, ContentMetadata, DynamicComponentData, DynamicComponentMap, IDynamicContentComponent, ILesson, ILessonExtra, ILessonTaken, ILessonWithTaken, ILessonsSettings, ImgStorageData, InputCompoennt, LessonCompSettings, LessonCompSettingsForm, LessonComponentConfiguration, LessonComponentInterface, LessonComponentsType, LessonImage, LessonPrompts, Media, NotionDBResponse, NotionPageResponse, SpeakerCompConfiguration, StorageFile, TextContent };
|