@dataclouder/ngx-lessons 0.1.3 → 0.1.4
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 +543 -537
- package/fesm2022/dataclouder-ngx-lessons.mjs.map +1 -1
- package/index.d.ts +643 -5
- package/package.json +1 -1
- package/lib/components/courses/course-detail/course-detail.component.d.ts +0 -5
- package/lib/components/courses/course-form/course-form.component.d.ts +0 -35
- package/lib/components/courses/course-list/course-list.component.d.ts +0 -25
- package/lib/components/courses/courses.component.d.ts +0 -5
- package/lib/components/courses/courses.service.d.ts +0 -14
- package/lib/components/courses/models/courses.model.d.ts +0 -24
- package/lib/components/courses-admin/courses-admin.component.d.ts +0 -8
- package/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.d.ts +0 -25
- package/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.d.ts +0 -11
- package/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.d.ts +0 -67
- package/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.d.ts +0 -43
- package/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.d.ts +0 -51
- package/lib/components/dc-lessons/dc-lesson-renderer/eval-agents-skills.d.ts +0 -1
- package/lib/components/dc-lessons/lesson-form/lesson-form.component.d.ts +0 -5
- package/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.d.ts +0 -36
- package/lib/components/dynamic-components/dynamic-components-builder.service.d.ts +0 -8
- package/lib/components/dynamic-components/dynamic-components.service.d.ts +0 -30
- package/lib/components/dynamic-components/selector/selector-builder/selector-builder.component.d.ts +0 -16
- package/lib/components/dynamic-components/selector/selector.component.d.ts +0 -12
- package/lib/components/lesson-mini-components/components/ComponentBuilder.d.ts +0 -33
- package/lib/components/lesson-mini-components/components/ComponentWithForm.d.ts +0 -12
- package/lib/components/lesson-mini-components/components/lesson-dynamic.component.d.ts +0 -7
- package/lib/components/lesson-mini-components/components/lessons.clases.d.ts +0 -159
- package/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.d.ts +0 -14
- package/lib/components/lesson-mini-components/components/speaker/speaker.component.d.ts +0 -12
- package/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.d.ts +0 -7
- package/lib/components/lesson-mini-components/components/text-writer/text-writer.component.d.ts +0 -16
- package/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.d.ts +0 -11
- package/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.d.ts +0 -7
- package/lib/models/lessons.pipes.d.ts +0 -28
- package/lib/models/notion.models.d.ts +0 -41
- package/lib/models/simple-agents.d.ts +0 -2
- package/lib/services/courses.service.d.ts +0 -7
- package/lib/services/default-lessons.service.d.ts +0 -20
- package/lib/services/lesson-ai.service.d.ts +0 -32
- package/lib/services/lesson-notion.service.d.ts +0 -35
- package/lib/services/lesson-utils.service.d.ts +0 -56
- package/public-api.d.ts +0 -27
package/index.d.ts
CHANGED
|
@@ -1,5 +1,643 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { PipeTransform, InjectionToken, Type, Provider, OnInit, EventEmitter, OnDestroy, AfterViewInit, QueryList, ViewContainerRef, ElementRef, ComponentRef, WritableSignal } from '@angular/core';
|
|
3
|
+
import { ISimpleAgent, WordData, IAgentCard, SimpleAgentTask, IConversationSettings, IConversationFlow, ChatEvent } from '@dataclouder/ngx-agent-cards';
|
|
4
|
+
import { NgComponentOutlet } from '@angular/common';
|
|
5
|
+
import { MenuItem } from 'primeng/api';
|
|
6
|
+
import { EntityCommunicationService, FiltersConfig, IFilterQueryResponse, IExtensionable, ILearnable, IAuditable, IManageable, IReactable, OnActionEvent, EntityBaseListComponent, ICustomFilter, PColumn, UiStateService, EntityBaseFormComponent, PaginationBase, ListFilterBarOptions } from '@dataclouder/ngx-core';
|
|
7
|
+
import * as _angular_forms from '@angular/forms';
|
|
8
|
+
import { FormBuilder, FormControl, FormArray, UntypedFormControl, UntypedFormArray, FormGroup } from '@angular/forms';
|
|
9
|
+
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
10
|
+
import { TTSGenerated } from '@dataclouder/ngx-vertex';
|
|
11
|
+
import { IAssetable, StorageImageSettings, CloudStorageData, AspectType, ResolutionType } from '@dataclouder/ngx-cloud-storage';
|
|
12
|
+
import * as _dataclouder_ngx_lessons from '@dataclouder/ngx-lessons';
|
|
13
|
+
import BalloonEditor from '@ckeditor/ckeditor5-build-balloon-block';
|
|
14
|
+
import * as _angular_router from '@angular/router';
|
|
15
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
16
|
+
|
|
17
|
+
declare const LangCodeDescription: {
|
|
18
|
+
es: string;
|
|
19
|
+
en: string;
|
|
20
|
+
it: string;
|
|
21
|
+
pt: string;
|
|
22
|
+
fr: string;
|
|
23
|
+
ja: string;
|
|
24
|
+
};
|
|
25
|
+
declare const LangCodeDescriptionEs: {
|
|
26
|
+
es: string;
|
|
27
|
+
en: string;
|
|
28
|
+
it: string;
|
|
29
|
+
pt: string;
|
|
30
|
+
fr: string;
|
|
31
|
+
ja: string;
|
|
32
|
+
};
|
|
33
|
+
declare class LangDescTranslationPipe implements PipeTransform {
|
|
34
|
+
transform(value: string, lang: string): boolean;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LangDescTranslationPipe, never>;
|
|
36
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<LangDescTranslationPipe, "langDesc", true>;
|
|
37
|
+
}
|
|
38
|
+
declare class FlagLanguagePipe implements PipeTransform {
|
|
39
|
+
transform(lang: string): string;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlagLanguagePipe, never>;
|
|
41
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FlagLanguagePipe, "flagEmoji", true>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
type NotionDBResponse = {
|
|
45
|
+
success: boolean;
|
|
46
|
+
databases: {
|
|
47
|
+
id: string;
|
|
48
|
+
title: string;
|
|
49
|
+
url: string;
|
|
50
|
+
created_time: string;
|
|
51
|
+
}[];
|
|
52
|
+
error?: string;
|
|
53
|
+
count: number;
|
|
54
|
+
};
|
|
55
|
+
type NotionPageResponse = {
|
|
56
|
+
success: boolean;
|
|
57
|
+
pages: {
|
|
58
|
+
id: string;
|
|
59
|
+
title: string;
|
|
60
|
+
url: string;
|
|
61
|
+
created_time: string;
|
|
62
|
+
}[];
|
|
63
|
+
error?: string;
|
|
64
|
+
count: number;
|
|
65
|
+
};
|
|
66
|
+
declare const NOTION_SERVICE_TOKEN: InjectionToken<NotionAbstractService>;
|
|
67
|
+
declare abstract class NotionAbstractService {
|
|
68
|
+
abstract getDBAvailible(): Promise<NotionDBResponse>;
|
|
69
|
+
abstract getPagesAvailable(): Promise<NotionPageResponse>;
|
|
70
|
+
abstract createNotionPage(card: any): Promise<{
|
|
71
|
+
success: boolean;
|
|
72
|
+
error: string;
|
|
73
|
+
page: any;
|
|
74
|
+
}>;
|
|
75
|
+
abstract getPageInSpecificFormat(pageId: string, format: NotionExportType): Promise<any>;
|
|
76
|
+
}
|
|
77
|
+
declare function provideNotionService(serviceImplementation: Type<NotionAbstractService>): Provider[];
|
|
78
|
+
declare enum NotionExportType {
|
|
79
|
+
HTML = "html",
|
|
80
|
+
MARKDOWN = "markdown",
|
|
81
|
+
PLAIN_TEXT = "plain_text",
|
|
82
|
+
SIMPLE_BLOCKS = "simple_blocks"
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare const getLanguageSimpleAgent: (langBase: string, langTarget: string) => ISimpleAgent;
|
|
86
|
+
|
|
87
|
+
type LessonCompSettingsForm = {
|
|
88
|
+
[K in keyof Required<LessonCompSettings>]: FormControl<LessonCompSettings[K]>;
|
|
89
|
+
};
|
|
90
|
+
interface ComponentBuildData {
|
|
91
|
+
str: string;
|
|
92
|
+
obj: LessonComponentConfiguration;
|
|
93
|
+
}
|
|
94
|
+
declare abstract class ComponentBuilder {
|
|
95
|
+
inputs: Record<string, any>;
|
|
96
|
+
id: string;
|
|
97
|
+
abstract componentName: string;
|
|
98
|
+
protected formBuilder: FormBuilder;
|
|
99
|
+
protected ref: DynamicDialogRef<any>;
|
|
100
|
+
formGroup: _angular_forms.FormGroup<{
|
|
101
|
+
response: FormControl<string>;
|
|
102
|
+
responses: FormControl<string>;
|
|
103
|
+
options: FormArray<any>;
|
|
104
|
+
text: FormControl<string>;
|
|
105
|
+
hint: FormControl<string>;
|
|
106
|
+
explanation: FormControl<string>;
|
|
107
|
+
}>;
|
|
108
|
+
get questionType(): LessonComponentEnum;
|
|
109
|
+
protected getCode(): LessonComponentConfiguration;
|
|
110
|
+
showCode(): void;
|
|
111
|
+
getComponentData(): ComponentBuildData;
|
|
112
|
+
copyToClipboard(): Promise<void>;
|
|
113
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentBuilder, never>;
|
|
114
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentBuilder, "app-component-builder", never, { "inputs": { "alias": "inputs"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
declare class TextWriterBuiderComponent extends ComponentBuilder {
|
|
118
|
+
componentName: string;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextWriterBuiderComponent, never>;
|
|
120
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextWriterBuiderComponent, "app-text-writer-buider", never, {}, {}, never, never, true, never>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
declare abstract class ComponentWithForm implements OnInit {
|
|
124
|
+
control: UntypedFormControl;
|
|
125
|
+
status: string;
|
|
126
|
+
ngOnInit(): void;
|
|
127
|
+
validate(): void;
|
|
128
|
+
abstract evaluate(): boolean;
|
|
129
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentWithForm, never>;
|
|
130
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentWithForm, "app-component-form", never, {}, {}, never, never, true, never>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare class TextWriterComponent extends ComponentWithForm implements OnInit, LessonComponentInterface {
|
|
134
|
+
config: LessonComponentConfiguration;
|
|
135
|
+
constructor();
|
|
136
|
+
size: number;
|
|
137
|
+
hint: string;
|
|
138
|
+
ngOnInit(): void;
|
|
139
|
+
private getSize;
|
|
140
|
+
evaluate(): any;
|
|
141
|
+
validate(): boolean;
|
|
142
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextWriterComponent, never>;
|
|
143
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextWriterComponent, "app-text-writer", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare class TranslationSwitcherBuilderComponent extends ComponentBuilder {
|
|
147
|
+
componentName: string;
|
|
148
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationSwitcherBuilderComponent, never>;
|
|
149
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TranslationSwitcherBuilderComponent, "app-translation-switcher-builder", never, {}, {}, never, never, true, never>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
declare class TranslationSwitcherComponent implements OnInit {
|
|
153
|
+
config: SpeakerCompConfiguration;
|
|
154
|
+
visibleText: string;
|
|
155
|
+
ngOnInit(): void;
|
|
156
|
+
switchTranslation(): void;
|
|
157
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationSwitcherComponent, never>;
|
|
158
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TranslationSwitcherComponent, "app-translation-switcher", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare class SpeakerBuilderComponent extends ComponentBuilder {
|
|
162
|
+
componentName: string;
|
|
163
|
+
tts: i0.WritableSignal<TTSGenerated>;
|
|
164
|
+
handleTtsGenerated(event: TTSGenerated): void;
|
|
165
|
+
protected getCode(): LessonComponentConfiguration<LessonCompSettings & {
|
|
166
|
+
voice: string;
|
|
167
|
+
}>;
|
|
168
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpeakerBuilderComponent, never>;
|
|
169
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpeakerBuilderComponent, "app-speaker-builder", never, {}, {}, never, never, true, never>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
declare class SpeakerComponent implements OnInit {
|
|
173
|
+
ngOnInit(): void;
|
|
174
|
+
config: SpeakerCompConfiguration;
|
|
175
|
+
tts: TTSGenerated | undefined;
|
|
176
|
+
speach(): void;
|
|
177
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpeakerComponent, never>;
|
|
178
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpeakerComponent, "app-speaker", never, { "config": { "alias": "config"; "required": false; }; "tts": { "alias": "tts"; "required": false; }; }, {}, never, never, true, never>;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
declare class SelectorBuilderComponent extends ComponentBuilder implements OnInit {
|
|
182
|
+
componentName: string;
|
|
183
|
+
sampleConfig: LessonComponentConfiguration;
|
|
184
|
+
ngOnInit(): void;
|
|
185
|
+
isRendered: any;
|
|
186
|
+
pushControlToFormArray(controlName: string): void;
|
|
187
|
+
deleteFormArrayByIndex(controlName: string, index: number): void;
|
|
188
|
+
get optionsForm(): UntypedFormArray;
|
|
189
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectorBuilderComponent, never>;
|
|
190
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectorBuilderComponent, "app-selector-builder", never, {}, {}, never, never, true, never>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
declare class SelectorComponent extends ComponentWithForm implements LessonComponentInterface {
|
|
194
|
+
isFilled: boolean;
|
|
195
|
+
constructor();
|
|
196
|
+
config: LessonComponentConfiguration;
|
|
197
|
+
evaluate(): any;
|
|
198
|
+
validate(): boolean;
|
|
199
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectorComponent, never>;
|
|
200
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectorComponent, "app-selector", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
declare class DefaultLessonsService extends EntityCommunicationService<ILesson> {
|
|
204
|
+
constructor();
|
|
205
|
+
private endpoints;
|
|
206
|
+
getLessons(filters?: FiltersConfig): Promise<IFilterQueryResponse<ILesson>>;
|
|
207
|
+
getLesson(id: string): Promise<ILesson>;
|
|
208
|
+
postLesson(lesson: ILesson): Promise<ILesson>;
|
|
209
|
+
updateLesson(lesson: ILesson): Promise<ILesson>;
|
|
210
|
+
deleteLesson(id: string): Promise<any>;
|
|
211
|
+
saveTakenLesson(lesson: ILessonTaken): Promise<any>;
|
|
212
|
+
generateLesson(lesson: ILesson): Promise<ILesson>;
|
|
213
|
+
postGenerateByAI(id: string): Promise<ILesson>;
|
|
214
|
+
postImproveMDWithAI(lessonId: string, markdownText: string): Promise<ILesson>;
|
|
215
|
+
generateBanner(prompt: string, lessonId: string): Promise<IFilterQueryResponse<ILesson>>;
|
|
216
|
+
extractTextFromHtml(html: string): string;
|
|
217
|
+
getPrompts(): LessonPrompts;
|
|
218
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultLessonsService, never>;
|
|
219
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DefaultLessonsService>;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
type LessonComponentsType = 'selector' | 'speaker' | 'text-writer' | 'verb-summary' | 'word-summary';
|
|
223
|
+
declare enum LessonComponentEnum {
|
|
224
|
+
Selector = "selector",
|
|
225
|
+
Speaker = "speaker",
|
|
226
|
+
TextWriter = "textWriter",
|
|
227
|
+
VerbSummary = "verbSummary",
|
|
228
|
+
WordSummary = "wordSummary",
|
|
229
|
+
TranslationSwitcher = "translationSwitcher",
|
|
230
|
+
PlayWord = "playWord"
|
|
231
|
+
}
|
|
232
|
+
declare const LessonComponentBuilders: {
|
|
233
|
+
selector: typeof SelectorBuilderComponent;
|
|
234
|
+
speaker: typeof SpeakerBuilderComponent;
|
|
235
|
+
textWriter: typeof TextWriterBuiderComponent;
|
|
236
|
+
translationSwitcher: typeof TranslationSwitcherBuilderComponent;
|
|
237
|
+
};
|
|
238
|
+
declare const LessonComponents: {
|
|
239
|
+
selector: typeof SelectorComponent;
|
|
240
|
+
speaker: typeof SpeakerComponent;
|
|
241
|
+
textWriter: typeof TextWriterComponent;
|
|
242
|
+
translationSwitcher: typeof TranslationSwitcherComponent;
|
|
243
|
+
};
|
|
244
|
+
declare function getLessonComponentClass(type: LessonComponentsType): any;
|
|
245
|
+
interface LessonCompSettings {
|
|
246
|
+
response?: string;
|
|
247
|
+
responses?: string;
|
|
248
|
+
options?: string[];
|
|
249
|
+
text?: string;
|
|
250
|
+
hint?: string;
|
|
251
|
+
explanation?: string;
|
|
252
|
+
}
|
|
253
|
+
interface TextContent {
|
|
254
|
+
text: string;
|
|
255
|
+
}
|
|
256
|
+
interface LessonComponentConfiguration<T extends LessonCompSettings = LessonCompSettings> {
|
|
257
|
+
id?: string;
|
|
258
|
+
component: LessonComponentEnum | string;
|
|
259
|
+
settings?: T;
|
|
260
|
+
inputs?: Record<string, any>;
|
|
261
|
+
}
|
|
262
|
+
interface StorageFile {
|
|
263
|
+
bucket: string;
|
|
264
|
+
url: string;
|
|
265
|
+
path: string;
|
|
266
|
+
}
|
|
267
|
+
interface AudioStorage extends StorageFile {
|
|
268
|
+
text?: string;
|
|
269
|
+
voiceType?: string;
|
|
270
|
+
}
|
|
271
|
+
interface SpeakerCompConfiguration extends LessonComponentConfiguration<LessonCompSettings & {
|
|
272
|
+
voice: string;
|
|
273
|
+
}> {
|
|
274
|
+
audio: AudioStorage;
|
|
275
|
+
}
|
|
276
|
+
interface LessonComponentInterface {
|
|
277
|
+
config: LessonComponentConfiguration<any>;
|
|
278
|
+
control?: UntypedFormControl;
|
|
279
|
+
validate?(): boolean | null;
|
|
280
|
+
evaluate?(): boolean | null;
|
|
281
|
+
}
|
|
282
|
+
declare const LESSONS_TOKEN: InjectionToken<DefaultLessonsService>;
|
|
283
|
+
interface ImgStorageData extends StorageFile {
|
|
284
|
+
fullPath: string;
|
|
285
|
+
resolutions: any;
|
|
286
|
+
resolution: string;
|
|
287
|
+
}
|
|
288
|
+
type LessonImage = ImgStorageData & {
|
|
289
|
+
type: string;
|
|
290
|
+
};
|
|
291
|
+
interface DynamicContentComponent {
|
|
292
|
+
id: string;
|
|
293
|
+
component: LessonComponentEnum;
|
|
294
|
+
inputs: Record<string, any>;
|
|
295
|
+
config: LessonComponentConfiguration<any>;
|
|
296
|
+
}
|
|
297
|
+
type StorageType = StorageFile & {
|
|
298
|
+
type: string;
|
|
299
|
+
};
|
|
300
|
+
interface Media {
|
|
301
|
+
audios?: StorageType[];
|
|
302
|
+
images?: StorageType[];
|
|
303
|
+
}
|
|
304
|
+
interface ILessonExtra {
|
|
305
|
+
notionPageId?: string;
|
|
306
|
+
}
|
|
307
|
+
interface ContentMetadata {
|
|
308
|
+
title: string;
|
|
309
|
+
description: string;
|
|
310
|
+
isPublished: boolean;
|
|
311
|
+
tags: string[];
|
|
312
|
+
banner: StorageType;
|
|
313
|
+
prompt: string;
|
|
314
|
+
generatedByAI: boolean;
|
|
315
|
+
}
|
|
316
|
+
interface ILesson {
|
|
317
|
+
_id?: any;
|
|
318
|
+
id: string;
|
|
319
|
+
title: string;
|
|
320
|
+
description: string;
|
|
321
|
+
textCoded: string;
|
|
322
|
+
tags: string[];
|
|
323
|
+
media: Media;
|
|
324
|
+
components: Array<LessonComponentConfiguration<any>>;
|
|
325
|
+
dynamicComponents: Record<string, DynamicContentComponent>;
|
|
326
|
+
baseLang: string;
|
|
327
|
+
targetLang: string;
|
|
328
|
+
extensions: IExtensionable;
|
|
329
|
+
assets?: IAssetable;
|
|
330
|
+
learnable: ILearnable;
|
|
331
|
+
auditable: IAuditable;
|
|
332
|
+
manageable?: IManageable;
|
|
333
|
+
reactions?: IReactable;
|
|
334
|
+
}
|
|
335
|
+
interface ILessonWithTaken extends ILesson {
|
|
336
|
+
taken: any;
|
|
337
|
+
createdAt: Date;
|
|
338
|
+
updatedAt: Date;
|
|
339
|
+
}
|
|
340
|
+
interface ILessonTaken {
|
|
341
|
+
id: string;
|
|
342
|
+
score: number;
|
|
343
|
+
goalCompleted: boolean;
|
|
344
|
+
status: string;
|
|
345
|
+
lastAccess: Date;
|
|
346
|
+
}
|
|
347
|
+
interface LessonPrompts {
|
|
348
|
+
description: (lesson: ILesson) => string;
|
|
349
|
+
banner: (lesson: ILesson) => string;
|
|
350
|
+
content: (lesson: ILesson) => string;
|
|
351
|
+
}
|
|
352
|
+
declare function provideLessonsService(serviceImplementation: Type<DefaultLessonsService>): Provider[];
|
|
353
|
+
|
|
354
|
+
declare enum EventCard {
|
|
355
|
+
Edit = "edit",
|
|
356
|
+
Delete = "delete",
|
|
357
|
+
Select = "select",
|
|
358
|
+
Qr = "qr",
|
|
359
|
+
Clone = "clone"
|
|
360
|
+
}
|
|
361
|
+
declare class DcLessonCardComponent implements OnInit {
|
|
362
|
+
lesson: ILessonWithTaken | ILesson | any;
|
|
363
|
+
showOptions: boolean;
|
|
364
|
+
cardHeight: string;
|
|
365
|
+
onAction: EventEmitter<OnActionEvent>;
|
|
366
|
+
coverUrl: string;
|
|
367
|
+
eventType: typeof EventCard;
|
|
368
|
+
items: MenuItem[];
|
|
369
|
+
ngOnInit(): void;
|
|
370
|
+
eventCard(eventType: EventCard): void;
|
|
371
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DcLessonCardComponent, never>;
|
|
372
|
+
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>;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
declare class DCLessonListComponent extends EntityBaseListComponent<ILesson> implements OnDestroy, AfterViewInit {
|
|
376
|
+
customCardComponent?: Type<DcLessonCardComponent>;
|
|
377
|
+
customFilters: ICustomFilter[];
|
|
378
|
+
protected entityCommunicationService: DefaultLessonsService;
|
|
379
|
+
outlets: QueryList<NgComponentOutlet>;
|
|
380
|
+
cardComponent: Type<DcLessonCardComponent>;
|
|
381
|
+
columns: PColumn[];
|
|
382
|
+
private cardEventSubs;
|
|
383
|
+
constructor();
|
|
384
|
+
ngOnInit(): Promise<void>;
|
|
385
|
+
ngAfterViewInit(): void;
|
|
386
|
+
ngOnDestroy(): void;
|
|
387
|
+
getCustomButtons(item: ILesson): MenuItem[];
|
|
388
|
+
handleAction(actionEvent: OnActionEvent): void;
|
|
389
|
+
applyFilterBarEvent(filterEvent: OnActionEvent): void;
|
|
390
|
+
private subscribeToCardEvents;
|
|
391
|
+
private clearCardEventSubs;
|
|
392
|
+
protected loadData(): Promise<void>;
|
|
393
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DCLessonListComponent, never>;
|
|
394
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonListComponent, "dc-lesson-list", never, { "customCardComponent": { "alias": "customCardComponent"; "required": false; }; "customFilters": { "alias": "customFilters"; "required": false; }; }, {}, never, never, true, never>;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
declare class DCLessonFormComponent {
|
|
398
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DCLessonFormComponent, never>;
|
|
399
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonFormComponent, "dc-lesson-form", never, {}, {}, never, never, true, never>;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
declare class DCLessonEditorComponent {
|
|
403
|
+
#private;
|
|
404
|
+
lessonsService: DefaultLessonsService;
|
|
405
|
+
private defaultLessonsService;
|
|
406
|
+
private promptService;
|
|
407
|
+
private ngxVertexService;
|
|
408
|
+
private cdr;
|
|
409
|
+
private dynamicComponentsBuilderService;
|
|
410
|
+
target: ViewContainerRef;
|
|
411
|
+
dhtml: ElementRef;
|
|
412
|
+
lessonId: i0.Signal<string>;
|
|
413
|
+
lesson: i0.WritableSignal<ILesson>;
|
|
414
|
+
isLoadingLesson: i0.WritableSignal<boolean>;
|
|
415
|
+
lessonForm: FormGroup;
|
|
416
|
+
coverImageUrl: i0.Signal<string>;
|
|
417
|
+
readonly dynamicComponentsArray: i0.Signal<_dataclouder_ngx_lessons.DynamicContentComponent[]>;
|
|
418
|
+
components: {
|
|
419
|
+
[key: string]: ComponentRef<LessonComponentInterface>;
|
|
420
|
+
};
|
|
421
|
+
editor: typeof BalloonEditor;
|
|
422
|
+
lessonComponentEnum: typeof LessonComponentEnum;
|
|
423
|
+
coverStorageSettings: StorageImageSettings;
|
|
424
|
+
constructor();
|
|
425
|
+
/**
|
|
426
|
+
* Updates a specific property on the lesson signal.
|
|
427
|
+
* Used for ngModelChange events to simulate two-way binding with signals.
|
|
428
|
+
* @param property The key of the ILesson property to update.
|
|
429
|
+
* @param value The new value for the property.
|
|
430
|
+
*/
|
|
431
|
+
updateLessonProperty<K extends keyof ILesson>(property: K, value: ILesson[K]): void;
|
|
432
|
+
onAssetsChange(updatedAssets: IAssetable): void;
|
|
433
|
+
onTagRemove(tag: any): void;
|
|
434
|
+
onTagAdd(tag: {
|
|
435
|
+
value: string;
|
|
436
|
+
input: any;
|
|
437
|
+
}): void;
|
|
438
|
+
saveLesson(event?: Event): Promise<ILesson | undefined>;
|
|
439
|
+
/**
|
|
440
|
+
* Handles the event emitted when a component is added via the adder component.
|
|
441
|
+
* @param result The configuration data returned from the component builder dialog. Expected format: { obj: LessonComponentConfiguration }
|
|
442
|
+
*/
|
|
443
|
+
onComponentAdded(result: ComponentBuildData): void;
|
|
444
|
+
/**
|
|
445
|
+
* Handles the image upload event, updates the lesson signal via the service, and saves.
|
|
446
|
+
* @param event The image upload event data.
|
|
447
|
+
*/
|
|
448
|
+
onImageUploaded(event: any): Promise<void>;
|
|
449
|
+
/**
|
|
450
|
+
* Imports lesson content from Notion using the LessonNotionService.
|
|
451
|
+
*/
|
|
452
|
+
importFromNotion(): Promise<void>;
|
|
453
|
+
/**
|
|
454
|
+
* Calls the LessonNotionService to improve the lesson using AI based on Notion content.
|
|
455
|
+
*/
|
|
456
|
+
improveNotionWithAI(): Promise<void>;
|
|
457
|
+
showComponentDetails(data: any): void;
|
|
458
|
+
generateBanner(): Promise<void>;
|
|
459
|
+
promptsVisible: boolean;
|
|
460
|
+
prompts: any;
|
|
461
|
+
showPrompts(): void;
|
|
462
|
+
editComponent(comp: any): void;
|
|
463
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DCLessonEditorComponent, never>;
|
|
464
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCLessonEditorComponent, "dc-lesson-editor", never, {}, {}, never, never, true, never>;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
interface ILessonsSettings {
|
|
468
|
+
additionalPrompt: string;
|
|
469
|
+
}
|
|
470
|
+
declare class DCLessonRendererComponent implements OnInit {
|
|
471
|
+
lessonInput: i0.InputSignal<ILesson>;
|
|
472
|
+
lessonIdInput: i0.InputSignal<string>;
|
|
473
|
+
settings: i0.InputSignal<ILessonsSettings>;
|
|
474
|
+
wordClicked: EventEmitter<WordData>;
|
|
475
|
+
dynamicLesson: ElementRef<HTMLElement>;
|
|
476
|
+
private readonly renderer;
|
|
477
|
+
private readonly viewContainerRef;
|
|
478
|
+
private readonly toastrService;
|
|
479
|
+
private lessonsService;
|
|
480
|
+
private readonly lessonAIService;
|
|
481
|
+
private readonly userDataExchange;
|
|
482
|
+
private readonly dynamicComponentsService;
|
|
483
|
+
readonly uiStateService: UiStateService;
|
|
484
|
+
lesson: i0.WritableSignal<ILesson>;
|
|
485
|
+
agentMasterLesson: i0.WritableSignal<IAgentCard>;
|
|
486
|
+
evaluatorAgentCard: i0.WritableSignal<SimpleAgentTask>;
|
|
487
|
+
conversationSettings: i0.WritableSignal<IConversationSettings>;
|
|
488
|
+
evalAgentTask: i0.WritableSignal<SimpleAgentTask>;
|
|
489
|
+
conversationFlow: i0.WritableSignal<IConversationFlow>;
|
|
490
|
+
imageCover: i0.Signal<string>;
|
|
491
|
+
private components;
|
|
492
|
+
mainForm: FormGroup<{
|
|
493
|
+
[key: string]: FormControl<any>;
|
|
494
|
+
}>;
|
|
495
|
+
private previousTextCoded;
|
|
496
|
+
constructor();
|
|
497
|
+
ngOnInit(): void;
|
|
498
|
+
private _clearLessonRendering;
|
|
499
|
+
private _renderLesson;
|
|
500
|
+
private _parseAndCreateComponents;
|
|
501
|
+
private _aggregateFormControls;
|
|
502
|
+
private _injectComponentsIntoDom;
|
|
503
|
+
private _addComponentToNode;
|
|
504
|
+
private _createComponentReferenceWithJson;
|
|
505
|
+
evaluateForms(): Promise<void>;
|
|
506
|
+
startAI(): Promise<void>;
|
|
507
|
+
onVisibleChange(isVisible: boolean): void;
|
|
508
|
+
handleGoalCompleted(event?: any): Promise<void>;
|
|
509
|
+
onChatMessage(event: ChatEvent): void;
|
|
510
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DCLessonRendererComponent, never>;
|
|
511
|
+
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>;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
declare class LessonDynamicComponent {
|
|
515
|
+
settings: LessonCompSettings;
|
|
516
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LessonDynamicComponent, never>;
|
|
517
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LessonDynamicComponent, "app-lesson-component", never, { "settings": { "alias": "settings"; "required": false; }; }, {}, never, never, true, never>;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
interface InputCompoennt {
|
|
521
|
+
text?: string;
|
|
522
|
+
[key: string]: any;
|
|
523
|
+
}
|
|
524
|
+
interface DynamicComponentData {
|
|
525
|
+
id?: string;
|
|
526
|
+
component: LessonComponentEnum;
|
|
527
|
+
inputs?: InputCompoennt;
|
|
528
|
+
}
|
|
529
|
+
declare const DynamicComponentBuilders: {
|
|
530
|
+
speaker: typeof SpeakerBuilderComponent;
|
|
531
|
+
};
|
|
532
|
+
declare const DynamicComponents: {
|
|
533
|
+
speaker: typeof SpeakerComponent;
|
|
534
|
+
};
|
|
535
|
+
declare class DynamicComponentsService {
|
|
536
|
+
private _dynamicComponentBuilders;
|
|
537
|
+
private _dynamicComponents;
|
|
538
|
+
registerCustomComponent(component: Type<any>, name?: string): void;
|
|
539
|
+
registerCustomComponentBuilder(component: Type<any>, name?: string): void;
|
|
540
|
+
getDynamicComponentBuilders(type: any): any;
|
|
541
|
+
getDynamicComponentClass(type: LessonComponentEnum | string): any;
|
|
542
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentsService, never>;
|
|
543
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DynamicComponentsService>;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
declare class CoursesService {
|
|
547
|
+
private httpCoreService;
|
|
548
|
+
getCourses(): Promise<any>;
|
|
549
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoursesService, never>;
|
|
550
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CoursesService>;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
declare class CoursesAdminComponent implements OnInit {
|
|
554
|
+
private httpCoreService;
|
|
555
|
+
ngOnInit(): Promise<void>;
|
|
556
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoursesAdminComponent, never>;
|
|
557
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CoursesAdminComponent, "ngx-courses-admin", never, {}, {}, never, never, true, never>;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
declare class CoursesComponent {
|
|
561
|
+
static routes: _angular_router.Routes;
|
|
562
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoursesComponent, never>;
|
|
563
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CoursesComponent, "app-courses", never, {}, {}, never, never, true, never>;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
declare class CourseDetailComponent {
|
|
567
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CourseDetailComponent, never>;
|
|
568
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CourseDetailComponent, "app-course-detail", never, {}, {}, never, never, true, never>;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
interface AuditDate {
|
|
572
|
+
createdAt?: string;
|
|
573
|
+
updatedAt?: string;
|
|
574
|
+
}
|
|
575
|
+
interface ICourseRelation {
|
|
576
|
+
id: string;
|
|
577
|
+
name: string;
|
|
578
|
+
description: string;
|
|
579
|
+
}
|
|
580
|
+
interface ICourse extends AuditDate {
|
|
581
|
+
_id: string;
|
|
582
|
+
id: string;
|
|
583
|
+
name?: string;
|
|
584
|
+
image?: CloudStorageData;
|
|
585
|
+
description?: string;
|
|
586
|
+
type?: string;
|
|
587
|
+
relation?: ICourseRelation;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
declare class CourseService extends EntityCommunicationService<ICourse> {
|
|
591
|
+
constructor();
|
|
592
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CourseService, never>;
|
|
593
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CourseService>;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
declare class CourseFormComponent extends EntityBaseFormComponent<ICourse> {
|
|
597
|
+
protected entityCommunicationService: CourseService;
|
|
598
|
+
private fb;
|
|
599
|
+
languageOptions: {
|
|
600
|
+
value: string;
|
|
601
|
+
label: string;
|
|
602
|
+
}[];
|
|
603
|
+
form: FormGroup;
|
|
604
|
+
readonly onSave: i0.OutputEmitterRef<any>;
|
|
605
|
+
storageImgSettings: {
|
|
606
|
+
path: string;
|
|
607
|
+
cropSettings: {
|
|
608
|
+
aspectRatio: AspectType;
|
|
609
|
+
resolutions: ResolutionType[];
|
|
610
|
+
resizeToWidth: number;
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
extraFields: FormlyFieldConfig[];
|
|
614
|
+
protected patchForm(entity: ICourse): void;
|
|
615
|
+
save(): Promise<ICourse | undefined>;
|
|
616
|
+
handleImageUpload(event: any): void;
|
|
617
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CourseFormComponent, never>;
|
|
618
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CourseFormComponent, "app-source-form", never, {}, { "onSave": "onSave"; }, never, never, true, never>;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
declare class CourseListComponent extends PaginationBase implements OnInit {
|
|
622
|
+
private toastService;
|
|
623
|
+
private courseService;
|
|
624
|
+
private cdr;
|
|
625
|
+
viewType: 'table' | 'card';
|
|
626
|
+
readonly onlyView: i0.InputSignal<boolean>;
|
|
627
|
+
readonly onSelect: i0.OutputEmitterRef<ICourse>;
|
|
628
|
+
courses: WritableSignal<ICourse[]>;
|
|
629
|
+
columns: any[];
|
|
630
|
+
filterBarOptions: ListFilterBarOptions;
|
|
631
|
+
getCustomButtons(item: any): MenuItem[];
|
|
632
|
+
ngOnInit(): Promise<void>;
|
|
633
|
+
protected loadData(): Promise<void>;
|
|
634
|
+
onNew(): void;
|
|
635
|
+
toggleView(): void;
|
|
636
|
+
selectItem(course: ICourse): void;
|
|
637
|
+
doAction(actionEvent: OnActionEvent): Promise<void>;
|
|
638
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CourseListComponent, never>;
|
|
639
|
+
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>;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
export { ComponentBuilder, ComponentWithForm, CourseDetailComponent, CourseFormComponent, CourseListComponent, CourseService, CoursesAdminComponent, CoursesComponent, CoursesService, DCLessonEditorComponent, DCLessonFormComponent, DCLessonListComponent, DCLessonRendererComponent, DcLessonCardComponent, DefaultLessonsService, DynamicComponentBuilders, DynamicComponents, DynamicComponentsService, FlagLanguagePipe, LESSONS_TOKEN, LangCodeDescription, LangCodeDescriptionEs, LangDescTranslationPipe, LessonComponentBuilders, LessonComponentEnum, LessonComponents, LessonDynamicComponent, NOTION_SERVICE_TOKEN, NotionAbstractService, NotionExportType, SelectorBuilderComponent, SelectorComponent, TextWriterBuiderComponent, TextWriterComponent, TranslationSwitcherBuilderComponent, TranslationSwitcherComponent, getLanguageSimpleAgent, getLessonComponentClass, provideLessonsService, provideNotionService };
|
|
643
|
+
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 };
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
}
|