@dataclouder/ngx-lessons 0.0.30 → 0.0.32
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 +1169 -449
- package/fesm2022/dataclouder-ngx-lessons.mjs.map +1 -1
- package/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.d.ts +2 -2
- package/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.d.ts +11 -0
- package/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.d.ts +39 -38
- package/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.d.ts +22 -0
- package/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.d.ts +32 -37
- package/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.d.ts +2 -4
- package/lib/components/lesson-mini-components/components/ComponentBuilder.d.ts +7 -2
- package/lib/components/lesson-mini-components/components/lessons.clases.d.ts +17 -42
- package/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.d.ts +13 -0
- package/lib/components/lesson-mini-components/components/speaker/speaker.component.d.ts +12 -0
- package/lib/services/lesson-ai.service.d.ts +18 -0
- package/lib/services/lesson-notion.service.d.ts +35 -0
- package/lib/services/lesson-utils.service.d.ts +34 -0
- package/package.json +3 -2
- package/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.html +0 -35
- package/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.scss +0 -107
- package/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.ts +0 -82
- package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.css +0 -90
- package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.html +0 -105
- package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.scss +0 -0
- package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.ts +0 -318
- package/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.html +0 -27
- package/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.scss +0 -3
- package/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.ts +0 -271
- package/src/lib/components/dc-lessons/lesson-form/lesson-form.component.html +0 -5
- package/src/lib/components/dc-lessons/lesson-form/lesson-form.component.scss +0 -3
- package/src/lib/components/dc-lessons/lesson-form/lesson-form.component.ts +0 -14
- package/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.html +0 -30
- package/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.scss +0 -17
- package/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.ts +0 -170
- package/src/lib/components/dc-lessons/lessons.component.ts +0 -10
- package/src/lib/components/lesson-mini-components/components/ComponentBuilder.ts +0 -74
- package/src/lib/components/lesson-mini-components/components/ComponentWithForm.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/lesson-dynamic.component.ts +0 -13
- package/src/lib/components/lesson-mini-components/components/lessons.clases.ts +0 -254
- package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.html +0 -58
- package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.scss +0 -15
- package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.spec.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.ts +0 -70
- package/src/lib/components/lesson-mini-components/components/selector/selector.component.html +0 -2
- package/src/lib/components/lesson-mini-components/components/selector/selector.component.scss +0 -12
- package/src/lib/components/lesson-mini-components/components/selector/selector.component.spec.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/selector/selector.component.ts +0 -47
- package/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.html +0 -35
- package/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.scss +0 -0
- package/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.spec.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.ts +0 -27
- package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.html +0 -7
- package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.scss +0 -3
- package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.spec.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.ts +0 -29
- package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.html +0 -24
- package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.scss +0 -15
- package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.spec.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.ts +0 -29
- package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.html +0 -4
- package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.scss +0 -8
- package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.spec.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.ts +0 -61
- package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.css +0 -3
- package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.html +0 -9
- package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.ts +0 -32
- package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.css +0 -3
- package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.html +0 -28
- package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.ts +0 -30
- package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.html +0 -18
- package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.scss +0 -3
- package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.spec.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.html +0 -15
- package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.scss +0 -27
- package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.spec.ts +0 -25
- package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.ts +0 -46
- package/src/lib/components/lesson-mini-components/components/word-summary/word-summary-builder/word-summary-builder.component.html +0 -19
- package/src/lib/components/lesson-mini-components/components/word-summary/word-summary-builder/word-summary-builder.component.scss +0 -0
- package/src/lib/components/lesson-mini-components/components/word-summary/word-summary-builder/word-summary-builder.component.ts +0 -27
- package/src/lib/components/lesson-mini-components/components/word-summary/word-summary.component.html +0 -14
- package/src/lib/components/lesson-mini-components/components/word-summary/word-summary.component.scss +0 -22
- package/src/lib/components/lesson-mini-components/components/word-summary/word-summary.component.ts +0 -51
- package/src/lib/models/lessons.pipes.ts +0 -38
- package/src/lib/models/models.ts +0 -92
- package/src/lib/models/notion.models.ts +0 -43
- package/src/public-api.ts +0 -25
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Pipe, type PipeTransform } from '@angular/core';
|
|
2
|
-
import { LangCodeDescription, LangCodeDescriptionEs } from '../components/lesson-mini-components/components/lessons.clases';
|
|
3
|
-
|
|
4
|
-
@Pipe({
|
|
5
|
-
name: 'langDesc',
|
|
6
|
-
standalone: true,
|
|
7
|
-
})
|
|
8
|
-
export class LangDescTranslationPipe implements PipeTransform {
|
|
9
|
-
transform(value: string, lang: string): boolean {
|
|
10
|
-
if (lang === 'es') {
|
|
11
|
-
return LangCodeDescriptionEs[value];
|
|
12
|
-
} else {
|
|
13
|
-
return LangCodeDescription[value];
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@Pipe({
|
|
19
|
-
name: 'flagEmoji',
|
|
20
|
-
standalone: true,
|
|
21
|
-
})
|
|
22
|
-
export class FlagLanguagePipe implements PipeTransform {
|
|
23
|
-
transform(lang: string): string {
|
|
24
|
-
if (lang === 'en') {
|
|
25
|
-
return '🇺🇸';
|
|
26
|
-
} else if (lang === 'es') {
|
|
27
|
-
return '🇲🇽';
|
|
28
|
-
} else if (lang === 'fr') {
|
|
29
|
-
return '🇫🇷';
|
|
30
|
-
} else if (lang === 'it') {
|
|
31
|
-
return '🇮🇹';
|
|
32
|
-
} else if (lang === 'pt') {
|
|
33
|
-
return '🇧🇷';
|
|
34
|
-
} else {
|
|
35
|
-
return '';
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
package/src/lib/models/models.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
export const VoiceOptions = [
|
|
2
|
-
{
|
|
3
|
-
provider: 'openai',
|
|
4
|
-
name: 'Fable',
|
|
5
|
-
id: 'fable',
|
|
6
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/openai_fable.mp3',
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
provider: 'openai',
|
|
10
|
-
name: 'Onyx',
|
|
11
|
-
id: 'onyx',
|
|
12
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/open_onyx.mp3',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
provider: 'openai',
|
|
16
|
-
name: 'Alloy',
|
|
17
|
-
id: 'alloy',
|
|
18
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/openai_alloy.mp3',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
provider: 'openai',
|
|
22
|
-
name: 'Nova',
|
|
23
|
-
id: 'nova',
|
|
24
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/openai_nova.mp3',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
provider: 'openai',
|
|
28
|
-
name: 'Shimmer',
|
|
29
|
-
id: 'shimmer',
|
|
30
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/openai_shimmer.mp3',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
provider: 'google',
|
|
34
|
-
name: 'Woman Studio O',
|
|
35
|
-
id: 'en-US-Studio-O',
|
|
36
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/google_Studio-O.mp3',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
provider: 'google',
|
|
40
|
-
name: 'Man Studio Q',
|
|
41
|
-
id: 'en-US-Studio-Q',
|
|
42
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/google_Studio-Q.mp3',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
provider: 'elevenlabs',
|
|
46
|
-
name: 'Charlotte',
|
|
47
|
-
id: 'XB0fDUnXU5powFXDhCwa',
|
|
48
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/elevenlab_Charlotte.mp3',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
provider: 'elevenlabs',
|
|
52
|
-
name: 'Grace',
|
|
53
|
-
id: 'oWAxZDx7w5VEj9dCyTzz',
|
|
54
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/elevenlab_Grace.mp3',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
provider: 'elevenlabs',
|
|
58
|
-
name: 'Nicole',
|
|
59
|
-
id: 'piTKgcLEGmPE4e6mEKli',
|
|
60
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/elevenlab_Nicole.mp3',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
provider: 'elevenlabs',
|
|
64
|
-
name: 'Emily',
|
|
65
|
-
id: 'LcfcDJNUP1GQjkzn1xUU',
|
|
66
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/elevenlab_Emily.mp3',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
provider: 'elevenlabs',
|
|
70
|
-
name: 'Thomas',
|
|
71
|
-
id: 'GBv7mTt0atIp3Br8iCZE',
|
|
72
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/elevenlab_Thomas.mp3',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
provider: 'elevenlabs',
|
|
76
|
-
name: 'Chris',
|
|
77
|
-
id: 'iP95p4xoKVk53GoZ742B',
|
|
78
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/elevenlab_Chris.mp3',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
provider: 'elevenlabs',
|
|
82
|
-
name: 'Harry',
|
|
83
|
-
id: 'SOYHLrjzK2X1ezoPC6cr',
|
|
84
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/elevenlab_Harry.mp3',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
provider: 'elevenlabs',
|
|
88
|
-
name: 'Gigi',
|
|
89
|
-
id: 'jBpfuIE2acCO8z3wKNLl',
|
|
90
|
-
exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/elevenlab_Gigi.mp3',
|
|
91
|
-
},
|
|
92
|
-
];
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// NOTE: what to do? IAgent Deponds on ngx-agent-cards but lessons don't
|
|
2
|
-
// import { IAgentCard } from '@dataclouder/ngx-agent-cards';
|
|
3
|
-
|
|
4
|
-
import { InjectionToken, Provider, Type } from '@angular/core';
|
|
5
|
-
|
|
6
|
-
export type NotionDBResponse = {
|
|
7
|
-
success: boolean;
|
|
8
|
-
databases: { id: string; title: string; url: string; created_time: string }[];
|
|
9
|
-
error?: string;
|
|
10
|
-
count: number;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export type NotionPageResponse = {
|
|
14
|
-
success: boolean;
|
|
15
|
-
pages: { id: string; title: string; url: string; created_time: string }[];
|
|
16
|
-
error?: string;
|
|
17
|
-
count: number;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const NOTION_SERVICE_TOKEN = new InjectionToken<NotionAbstractService>('notion.service');
|
|
21
|
-
|
|
22
|
-
export abstract class NotionAbstractService {
|
|
23
|
-
abstract getDBAvailible(): Promise<NotionDBResponse>;
|
|
24
|
-
abstract getPagesAvailable(): Promise<NotionPageResponse>;
|
|
25
|
-
abstract createNotionPage(card: any): Promise<{ success: boolean; error: string; page: any }>;
|
|
26
|
-
abstract getPageInSpecificFormat(pageId: string, format: NotionExportType): Promise<any>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function provideNotionService(serviceImplementation: Type<NotionAbstractService>): Provider[] {
|
|
30
|
-
return [
|
|
31
|
-
{
|
|
32
|
-
provide: NOTION_SERVICE_TOKEN,
|
|
33
|
-
useExisting: serviceImplementation,
|
|
34
|
-
},
|
|
35
|
-
];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export enum NotionExportType {
|
|
39
|
-
HTML = 'html',
|
|
40
|
-
MARKDOWN = 'markdown',
|
|
41
|
-
PLAIN_TEXT = 'plain_text',
|
|
42
|
-
SIMPLE_BLOCKS = 'simple_blocks',
|
|
43
|
-
}
|
package/src/public-api.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of lessons
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export * from './lib/models/lessons.pipes';
|
|
6
|
-
export * from './lib/models/notion.models';
|
|
7
|
-
|
|
8
|
-
export * from './lib/components/dc-lessons/lesson-list/dc-lesson-list.component';
|
|
9
|
-
export * from './lib/components/dc-lessons/lesson-form/lesson-form.component';
|
|
10
|
-
export * from './lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component';
|
|
11
|
-
export * from './lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component';
|
|
12
|
-
|
|
13
|
-
export * from './lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component';
|
|
14
|
-
|
|
15
|
-
export * from './lib/components/lesson-mini-components/components/ComponentWithForm';
|
|
16
|
-
export * from './lib/components/lesson-mini-components/components/lesson-dynamic.component';
|
|
17
|
-
export * from './lib/components/lesson-mini-components/components/lessons.clases';
|
|
18
|
-
|
|
19
|
-
export * from './lib/components/lesson-mini-components/components/ComponentBuilder';
|
|
20
|
-
export * from './lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component';
|
|
21
|
-
export * from './lib/components/lesson-mini-components/components/text-writer/text-writer.component';
|
|
22
|
-
export * from './lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component';
|
|
23
|
-
export * from './lib/components/lesson-mini-components/components/selector/selector.component';
|
|
24
|
-
export * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component';
|
|
25
|
-
export * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component';
|