@dataclouder/ngx-lessons 0.1.11 → 0.1.12

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.
@@ -1 +1 @@
1
- {"version":3,"file":"dataclouder-ngx-lessons.mjs","sources":["../../../../projects/dataclouder/ngx-lessons/src/lib/models/lessons.pipes.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/models/notion.models.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/models/simple-agents.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/ComponentBuilder.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/ComponentWithForm.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/speaker/speaker.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/speaker/speaker.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/selector/selector.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/selector/selector.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/selector/selector-builder/selector-builder.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/selector/selector-builder/selector-builder.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/lessons.clases.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/services/default-lessons.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lesson-form/lesson-form.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lesson-form/lesson-form.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/dynamic-components.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/services/lesson-renderer.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-renderer/eval-agents-skills.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/services/lesson-conversation.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/services/lesson-notion.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/services/lesson-utils.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/dynamic-components-builder.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-editor/lesson-form.utils.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lessons.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/lesson-dynamic.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/services/courses.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses-admin/courses-admin.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses-admin/courses-admin.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/courses.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-list/course-list.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-list/course-list.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-detail/course-detail.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-detail/course-detail.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-form/course-form.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-form/course-form.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/courses.routes.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/courses.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/courses.component.html","../../../../projects/dataclouder/ngx-lessons/src/public-api.ts","../../../../projects/dataclouder/ngx-lessons/src/dataclouder-ngx-lessons.ts"],"sourcesContent":["import { Pipe, type PipeTransform } from '@angular/core';\n\n// This pipe should not be here in the lessons, refactor when is posible and remove LangCodeDescription\nexport const LangCodeDescription = {\n es: 'Spanish',\n en: 'English',\n it: 'Italian',\n pt: 'Portuguese',\n fr: 'French',\n ja: 'Japanese',\n};\n\nexport const LangCodeDescriptionEs = {\n es: 'Español',\n en: 'Inglés',\n it: 'Italiano',\n pt: 'Portugués',\n fr: 'Frances',\n ja: 'Japonés',\n};\n\n@Pipe({\n name: 'flagEmoji',\n standalone: true,\n})\nexport class FlagLanguagePipe implements PipeTransform {\n transform(lang: string): string {\n if (lang === 'en') {\n return '🇺🇸';\n } else if (lang === 'es') {\n return '🇲🇽';\n } else if (lang === 'fr') {\n return '🇫🇷';\n } else if (lang === 'it') {\n return '🇮🇹';\n } else if (lang === 'pt') {\n return '🇧🇷';\n } else {\n return '';\n }\n }\n}\n","// NOTE: what to do? IAgent Deponds on ngx-agent-cards but lessons don't\n// import { IAgentCard } from '@dataclouder/ngx-agent-cards';\n\nimport { InjectionToken, Provider, Type } from '@angular/core';\n\nexport type NotionDBResponse = {\n success: boolean;\n databases: { id: string; title: string; url: string; created_time: string }[];\n error?: string;\n count: number;\n};\n\nexport type NotionPageResponse = {\n success: boolean;\n pages: { id: string; title: string; url: string; created_time: string }[];\n error?: string;\n count: number;\n};\n\nexport const NOTION_SERVICE_TOKEN = new InjectionToken<NotionAbstractService>('notion.service');\n\nexport abstract class NotionAbstractService {\n abstract getDBAvailible(): Promise<NotionDBResponse>;\n abstract getPagesAvailable(): Promise<NotionPageResponse>;\n abstract createNotionPage(card: any): Promise<{ success: boolean; error: string; page: any }>;\n abstract getPageInSpecificFormat(pageId: string, format: NotionExportType): Promise<any>;\n}\n\nexport function provideNotionService(serviceImplementation: Type<NotionAbstractService>): Provider[] {\n return [\n {\n provide: NOTION_SERVICE_TOKEN,\n useExisting: serviceImplementation,\n },\n ];\n}\n\nexport enum NotionExportType {\n HTML = 'html',\n MARKDOWN = 'markdown',\n PLAIN_TEXT = 'plain_text',\n SIMPLE_BLOCKS = 'simple_blocks',\n}\n","import { ISimpleAgent } from '@dataclouder/ngx-agent-cards';\n\nconst MarkdownWriterSkill = `\nYou are an Expert Markdown Writer with the following qualities:\nYou are a world-class Markdown formatting specialist who excels at organizing information in a visually appealing and highly accessible manner. Your writing combines technical precision with creative presentation to engage readers of all backgrounds.\nYour Core Skills 📝\n\nYou transform complex information into beautifully structured Markdown documents\nYou strategically use headings, lists, and formatting to create clear visual hierarchies\nYou incorporate helpful emojis to enhance readability and engagement\nYou write in a clear, concise style that's accessible to general audiences\n\nYour Process Approach 🔄\n\nYou always begin with a logical document structure before adding content\nYou organize information into clearly defined sections with descriptive headings\nYou balance visual elements with textual content for optimal readability\nYou maintain consistent formatting patterns throughout documents\n\nYour Writing Style ✨\n\nYou use simple, direct language that's easy for everyone to understand\nYou explain technical concepts using everyday examples and analogies\nYou create a friendly, conversational tone while maintaining professionalism\nYou break down complex ideas into manageable segments\n\nYour Special Touches 🎯\n\nYou know exactly when and where to add emojis for maximum impact\nYou create custom tables to present comparative information effectively\nYou use blockquotes to highlight important takeaways\nYou incorporate visual dividers to separate major content sections\n\nWhen responding to requests, you'll first understand the subject matter, then organize it into a logical structure with clear headings, appropriate formatting elements, and helpful visual enhancements. Your goal is always to create content that's not only informative but also visually engaging and accessible to all readers.\n`;\n\nconst UserRequirements = `\n User also can provide additional instructions or requirements for the lesson or current lesson to improve it.\n`;\n\nconst LanguageLessonSkill = (langBase: string, langTarget: string) => `\n\nYou are also a ${langTarget} lesson professor, you write lessons for ${langBase} learners.\nexplain the best you can will all your experience teaching.\n\nYou can infer the level of the lesson from the content or user request, so can increase difficulty\n\nFor Basic Level: generate a ${langTarget} lesson for ${langBase} learners at a basic level (A1-A2).\n\nInclude:\n\n- Simple dialogues or short texts.\n- Key vocabulary with simple definitions or ${langBase} translations.\n- Basic grammar points explained simply (e.g., \"to be\" verb, simple present).\n- Practice exercises (e.g., fill-in-the-blanks, simple questions).\n\nFor Intermediate Level: generate a ${langTarget} lesson for ${langBase} learners at a medium level (B1-B2).\n\nInclude:\n\n- Texts or dialogues of moderate length and complexity.\n- New vocabulary and common phrasal verbs with context.\n- Explanation and practice of intermediate grammar points (e.g., past simple vs. present perfect, conditionals).\n- Exercises that require more detailed responses or understanding.\n- The content should be engaging and cover topics relevant to daily life, work, or hobbies.\n\nFor Advanced Level: generate a ${langTarget} lesson for ${langBase} learners at an advanced level (C1-C2).\n\nInclude:\n\n- Challenging texts or discussions.\n- Advanced vocabulary, idioms, and nuanced expressions.\n- Exploration of complex grammar or stylistic points.\n- Exercises that encourage critical thinking, debate, or detailed writing.\n- The content should be stimulating and cover a wide range of topics, including academic or professional contexts.\n`;\n\nexport const getLanguageSimpleAgent = (langBase: string, langTarget: string): ISimpleAgent => {\n return {\n systemPrompt: `\n ${MarkdownWriterSkill}\n ${LanguageLessonSkill(langBase, langTarget)}\n ${UserRequirements}\n\n `,\n model: { id: 'gemini-2.5-flash-preview-04-17', provider: 'google' },\n };\n};\n","import { Component, inject, Input } from '@angular/core';\r\nimport { FormArray, FormBuilder, FormControl } from '@angular/forms';\r\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\r\n\r\nimport { LessonComponentBuilders, LessonComponentConfiguration, LessonComponentEnum, LessonCompSettings } from './lessons.clases';\r\nimport { nanoid } from 'nanoid';\r\n\r\n// Create a type that maps the interface to FormControls\r\nexport type LessonCompSettingsForm = {\r\n [K in keyof Required<LessonCompSettings>]: FormControl<LessonCompSettings[K]>;\r\n};\r\n\r\nexport interface ComponentBuildData {\r\n str: string;\r\n obj: LessonComponentConfiguration;\r\n}\r\n\r\n@Component({\r\n selector: 'app-component-builder',\r\n template: '<div>no template</div>',\r\n})\r\nexport abstract class ComponentBuilder {\r\n @Input() inputs: Record<string, any>;\r\n @Input() id: string;\r\n\r\n // Added abstract\r\n abstract componentName: string; // Added abstract property\r\n\r\n protected formBuilder = inject(FormBuilder);\r\n protected ref = inject(DynamicDialogRef);\r\n\r\n // Sobreescribir si es necesario\r\n // public formGroup = this.formBuilder.group<LessonCompSettings>({});\r\n\r\n public formGroup = this.formBuilder.group({\r\n response: new FormControl<string | null>(null),\r\n responses: new FormControl<string | null>(null),\r\n options: new FormArray([]),\r\n text: new FormControl<string | null>(null),\r\n hint: new FormControl<string | null>(null),\r\n explanation: new FormControl<string | null>(null),\r\n });\r\n\r\n // Every component knows its type by comparing agains LessonComponentBuilders\r\n get questionType(): LessonComponentEnum {\r\n const self = this;\r\n\r\n const name = Object.keys(LessonComponentBuilders).find((componentName: any) => {\r\n const componentClass = LessonComponentBuilders[componentName];\r\n if (self instanceof componentClass) {\r\n return componentName;\r\n }\r\n });\r\n\r\n return <LessonComponentEnum>name;\r\n }\r\n\r\n protected getCode(): LessonComponentConfiguration {\r\n const data = this.formGroup.value;\r\n // Deleting null values\r\n Object.keys(data).forEach((key) => {\r\n if (data[key] === null) {\r\n delete data[key];\r\n }\r\n });\r\n const code: LessonComponentConfiguration = { component: this.componentName, inputs: { ...data } };\r\n return code;\r\n }\r\n\r\n public showCode() {\r\n const code = this.getCode();\r\n const stringCode = `~${JSON.stringify(code)}~`;\r\n alert(stringCode);\r\n }\r\n\r\n public getComponentData(): ComponentBuildData {\r\n const code = this.getCode();\r\n\r\n if (this.id) {\r\n code.id = this.id;\r\n } else {\r\n const id = nanoid().replace(/-/g, '_');\r\n code.id = id;\r\n }\r\n return { str: `~${JSON.stringify(code)}~`, obj: code };\r\n }\r\n\r\n // TODO: for now copyToClipboard is the that that closes modal and return data.\r\n public async copyToClipboard() {\r\n const data = this.getComponentData();\r\n await navigator.clipboard.writeText(data.str);\r\n this.ref.close(data);\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntypedFormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\r\n\r\nimport { ComponentBuilder } from '../../ComponentBuilder';\r\n\r\n@Component({\r\n selector: 'app-text-writer-buider',\r\n templateUrl: './text-writer-buider.component.html',\r\n styleUrls: ['./text-writer-buider.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, ButtonModule, InputTextModule],\r\n})\r\nexport class TextWriterBuiderComponent extends ComponentBuilder {\r\n public componentName = 'TextWriter';\r\n}\r\n","<div>\r\n <div>\r\n <h5>Constructor de formulario con texto</h5>\r\n </div>\r\n\r\n <div>\r\n <form class=\"builder-form\" [formGroup]=\"formGroup\">\r\n <input pInputText type=\"text\" nbInput fullWidth formControlName=\"response\" placeholder=\"Respuesta\" />\r\n\r\n <input pInputText class=\"form-input\" type=\"\" nbInput fullWidth formControlName=\"hint\"\r\n placeholder=\"Escribe una pista para esta pregunta\" />\r\n\r\n <input pInputText class=\"form-input\" type=\"text\" nbInput fullWidth formControlName=\"explanation\"\r\n placeholder=\"Excribe una explicación para la respuesta\" />\r\n </form>\r\n </div>\r\n\r\n <div>\r\n <p-button (click)=\"copyToClipboard()\" [disabled]=\"formGroup.invalid\" label=\"Copia Código\"\r\n [rounded]=\"true\"></p-button>\r\n <p-button (click)=\"showCode()\" [disabled]=\"formGroup.invalid\" label=\"Mostrar\" [rounded]=\"true\"\r\n severity=\"secondary\"></p-button>\r\n </div>\r\n</div>","import { Component, Input, OnInit } from '@angular/core';\nimport { UntypedFormControl } from '@angular/forms';\n\n@Component({\n selector: 'app-component-form',\n template: '<div>no template</div>',\n})\nexport abstract class ComponentWithForm implements OnInit {\n // @Input() settings: LessonCompSettings;\n\n public control: UntypedFormControl = new UntypedFormControl();\n public status: string;\n\n ngOnInit(): void {\n this.control.valueChanges.subscribe(() => {\n this.status = 'basic';\n });\n }\n\n public validate(): void {\n // TODO: generic method to evaluate\n }\n\n public abstract evaluate(): boolean;\n}\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\n\r\nimport { ComponentWithForm } from '../ComponentWithForm';\r\nimport { LessonComponentConfiguration, LessonComponentInterface } from '../lessons.clases';\r\n\r\n@Component({\r\n selector: 'app-text-writer',\r\n templateUrl: './text-writer.component.html',\r\n styleUrls: ['./text-writer.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, InputTextModule],\r\n})\r\nexport class TextWriterComponent extends ComponentWithForm implements OnInit, LessonComponentInterface {\r\n @Input() config: LessonComponentConfiguration;\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n public size: number;\r\n // esta por decidir como va a funcionar los hits, explanation and hint.\r\n public hint: string;\r\n\r\n override ngOnInit(): void {\r\n super.ngOnInit();\r\n this.size = this.getSize();\r\n }\r\n\r\n private getSize(): number {\r\n return this.config.settings.response.length < 20 ? this.config.settings.response.length : 20;\r\n }\r\n\r\n public evaluate() {\r\n let result;\r\n if (this.control.value == null) {\r\n result = null;\r\n } else {\r\n result = this.control.value.toLowerCase().trim() == this.config.settings.response.toLowerCase().trim();\r\n }\r\n\r\n if (result) {\r\n this.status = 'success';\r\n } else {\r\n this.status = 'danger';\r\n\r\n this.hint = this.config.settings.explanation;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public override validate() {\r\n if (this.control.invalid) {\r\n this.status = 'warning';\r\n this.hint = this.config.settings.hint;\r\n }\r\n return true;\r\n }\r\n}\r\n","<input [class]=\"this.status\" pInputText [formControl]=\"control\" fieldSize=\"small\" type=\"text\" placeholder=\"Respuesta\"\n [size]=\"size\" />\n\n<!-- [ngClass]=\"{ 'selected-radio': 'true']}\" -->","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';\n\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\n\nimport { ComponentBuilder } from '../../ComponentBuilder';\n\n@Component({\n selector: 'app-translation-switcher-builder',\n standalone: true,\n imports: [FormsModule, ReactiveFormsModule, ButtonModule, InputTextModule],\n templateUrl: './translationSwitcherBuilder.component.html',\n styleUrl: './translationSwitcherBuilder.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TranslationSwitcherBuilderComponent extends ComponentBuilder {\n public componentName = 'TranslationSwitcher';\n}\n","<div>\n <div>\n <h5>Constructor de translation switcher</h5>\n </div>\n\n <div>\n <form class=\"builder-form\" [formGroup]=\"formGroup\">\n <input style=\"width: 100%\" pInputText type=\"text\" nbInput fullWidth formControlName=\"text\" placeholder=\"Texto para visualizar\" />\n\n <br /><br />\n\n <input\n style=\"width: 100%\"\n pInputText\n class=\"form-input\"\n type=\"\"\n nbInput\n fullWidth\n formControlName=\"response\"\n placeholder=\"Traducción al hacer clic\" />\n </form>\n </div>\n <br />\n <div>\n <p-button (click)=\"copyToClipboard()\" [disabled]=\"formGroup.invalid\" label=\"Copia Código\" [rounded]=\"true\"></p-button>\n <p-button (click)=\"showCode()\" [disabled]=\"formGroup.invalid\" label=\"Mostrar\" [rounded]=\"true\" severity=\"secondary\"></p-button>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\n\nimport { ButtonModule } from 'primeng/button';\n\nimport { SpeakerCompConfiguration } from '../lessons.clases';\n\n@Component({\n selector: 'app-translation-switcher',\n standalone: true,\n imports: [ButtonModule],\n templateUrl: './translationSwitcher.component.html',\n styleUrl: './translationSwitcher.component.css',\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TranslationSwitcherComponent implements OnInit {\n @Input() config: SpeakerCompConfiguration;\n\n public visibleText = '';\n ngOnInit(): void {\n this.visibleText = this.config.settings.text;\n console.log('config', this.config);\n }\n\n public switchTranslation() {\n if (this.visibleText === this.config.settings.text) {\n this.visibleText = this.config.settings.response;\n } else {\n this.visibleText = this.config.settings.text;\n }\n }\n}\n","<button\n pButton\n style=\"padding: 0px 2px\"\n severity=\"help\"\n size=\"small\"\n (click)=\"switchTranslation()\"\n [label]=\"visibleText\"\n [text]=\"true\"\n [rounded]=\"true\"></button>\n","import { Component, signal } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { ComponentBuilder } from '../../ComponentBuilder';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { SelectModule } from 'primeng/select';\r\nimport { TTSPlayground, TTSGenerated } from '@dataclouder/ngx-vertex';\r\nimport { LessonComponentConfiguration, LessonCompSettings } from '../../lessons.clases';\r\n\r\n@Component({\r\n selector: 'app-speaker-builder',\r\n templateUrl: './speaker-builder.component.html',\r\n styleUrls: ['./speaker-builder.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, InputTextModule, ButtonModule, SelectModule, TTSPlayground],\r\n})\r\nexport class SpeakerBuilderComponent extends ComponentBuilder {\r\n override componentName = 'Speaker';\r\n public tts = signal<TTSGenerated | undefined>(undefined);\r\n\r\n public handleTtsGenerated(event: TTSGenerated): void {\r\n console.log('TTS generated:', event);\r\n this.tts.set(event);\r\n }\r\n\r\n // Update return type and add settings object\r\n protected override getCode(): LessonComponentConfiguration<LessonCompSettings & { voice: string }> {\r\n const ttsValue = this.tts();\r\n if (!ttsValue) {\r\n // Handle the case where tts is undefined, maybe throw an error or return a default config\r\n console.error('TTS data is not generated yet.');\r\n // Depending on requirements, you might return a default/empty config or throw\r\n return { component: this.questionType, inputs: {} }; // Example: return empty inputs\r\n }\r\n const code: LessonComponentConfiguration<LessonCompSettings & { voice: string }> = {\r\n component: this.questionType,\r\n inputs: { tts: ttsValue },\r\n };\r\n return code;\r\n }\r\n}\r\n","<div>\r\n <div>\r\n <h5>Constructor de Speaker</h5>\r\n </div>\r\n\r\n <tts-playground (ttsGenerated)=\"handleTtsGenerated($event)\"></tts-playground>\r\n\r\n <br />\r\n <div>\r\n <p-button (click)=\"copyToClipboard()\" [disabled]=\"formGroup.invalid\" label=\"Copia Código\" [rounded]=\"true\"></p-button>\r\n <p-button (click)=\"showCode()\" [disabled]=\"!tts()\" label=\"Mostrar\" [rounded]=\"true\" severity=\"secondary\"></p-button>\r\n </div>\r\n</div>\r\n","// ❌ can use this until i copy services to this lib\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { SpeakerCompConfiguration } from '../lessons.clases';\r\nimport { TTSGenerated } from '@dataclouder/ngx-vertex';\r\n\r\n@Component({\r\n selector: 'app-speaker',\r\n templateUrl: './speaker.component.html',\r\n styleUrls: ['./speaker.component.scss'],\r\n standalone: true,\r\n imports: [ButtonModule],\r\n})\r\nexport class SpeakerComponent implements OnInit {\r\n ngOnInit(): void {\r\n // throw new Error('Method not implemented.');\r\n }\r\n @Input() config: SpeakerCompConfiguration;\r\n @Input() tts: TTSGenerated | undefined;\r\n\r\n // voiceOptions = VoiceOptions;\r\n // constructor(private speachService: SpeechService, private audioService: AudioService) {}\r\n // ngOnInit(): void {}\r\n public speach() {\r\n console.log('should speech but will do in next version');\r\n }\r\n}\r\n","<button\r\n pButton\r\n style=\"padding: 0px 2px\"\r\n severity=\"help\"\r\n size=\"small\"\r\n (click)=\"speach()\"\r\n [label]=\"config?.settings?.text\"\r\n [text]=\"true\"\r\n [rounded]=\"true\"></button>\r\n","import { Component, Input } from '@angular/core';\r\n\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SelectModule } from 'primeng/select';\r\nimport { ComponentWithForm } from '../../lesson-mini-components/components/ComponentWithForm';\r\nimport { LessonComponentConfiguration, LessonComponentInterface } from '../../lesson-mini-components/components/lessons.clases';\r\n\r\n@Component({\r\n selector: 'app-selector',\r\n templateUrl: './selector.component.html',\r\n styleUrls: ['./selector.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, SelectModule],\r\n})\r\nexport class SelectorComponent extends ComponentWithForm implements LessonComponentInterface {\r\n public isFilled = false;\r\n\r\n constructor() {\r\n super();\r\n }\r\n @Input() config: LessonComponentConfiguration;\r\n\r\n public evaluate() {\r\n let result;\r\n if (this.control.value == null) {\r\n result = null;\r\n } else {\r\n result = this.control.value?.toLowerCase().trim() === this.config.settings.response.toLowerCase().trim();\r\n }\r\n\r\n if (result) {\r\n this.status = 'success';\r\n } else {\r\n this.status = 'danger';\r\n }\r\n this.isFilled = true;\r\n return result;\r\n }\r\n\r\n public override validate() {\r\n if (this.control.invalid) {\r\n this.status = 'warning';\r\n }\r\n return true;\r\n }\r\n}\r\n","<p-select [class]=\"status\" placeholder=\"Selecciona\" [options]=\"config.settings.options\" [formControl]=\"control\"></p-select>\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntypedFormArray, FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';\r\n\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\r\nimport { MessageModule } from 'primeng/message';\r\n\r\nimport { SelectorComponent } from '../selector.component';\r\nimport { ComponentBuilder } from '../../../lesson-mini-components/components/ComponentBuilder';\r\nimport { LessonComponentConfiguration, LessonComponentEnum } from '../../../lesson-mini-components/components/lessons.clases';\r\n\r\n@Component({\r\n selector: 'app-selector-builder',\r\n templateUrl: './selector-builder.component.html',\r\n styleUrls: ['./selector-builder.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, SelectorComponent, InputTextModule, ButtonModule, MessageModule],\r\n})\r\nexport class SelectorBuilderComponent extends ComponentBuilder implements OnInit {\r\n override componentName = 'Selector';\r\n\r\n public sampleConfig: LessonComponentConfiguration = {\r\n id: '1',\r\n component: LessonComponentEnum.Selector,\r\n settings: {\r\n options: ['fourteen ninety-two', 'fourteen ninety-six', 'fifteen ninety-one'],\r\n response: 'fourteen ninety-two',\r\n hint: 'Pista para la respuesta',\r\n explanation: 'Explicación de la respuesta',\r\n responses: 'Opción 1, Opción 2, Opción 3',\r\n text: 'Texto de la pregunta',\r\n },\r\n };\r\n\r\n // public formGroup = this.formBuilder.group({\r\n // options: this.formBuilder.array([]),\r\n // response: ['', Validators.required],\r\n // hint: [],\r\n // explanation: [],\r\n // });\r\n\r\n ngOnInit(): void {\r\n this.formGroup.get('response');\r\n }\r\n\r\n public isRendered;\r\n\r\n //TODO Probablemente estos 3 pueden irse a una clase abstracta\r\n\r\n public pushControlToFormArray(controlName: string): void {\r\n this.formGroup.controls.options.push(this.formBuilder.control(''));\r\n // (this.formGroup.get(controlName) as UntypedFormArray).push(this.formBuilder.control(''));\r\n console.log(this.formGroup.controls.options);\r\n }\r\n\r\n public deleteFormArrayByIndex(controlName: string, index: number): void {\r\n (this.formGroup.get(controlName) as UntypedFormArray).removeAt(index);\r\n }\r\n\r\n get optionsForm(): UntypedFormArray {\r\n return this.formGroup.get('options') as UntypedFormArray;\r\n }\r\n}\r\n","<div>\n <div>\n <p-message>Construcción del componente de Selección, sirve para hacer una pregunta y mostrar varias opciones, ejemplo:</p-message>\n </div>\n\n <div>\n <span>En que año llegó cristobal colon a america?</span>\n <app-selector [config]=\"sampleConfig\"></app-selector>\n </div>\n\n <hr />\n\n <div>\n <form class=\"builder-form\" [formGroup]=\"formGroup\">\n <input class=\"form-input\" type=\"text\" pInputText fullWidth formControlName=\"response\" placeholder=\"Respuesta Correcta...\" />\n <br />\n\n <input class=\"form-input\" type=\"\" pInputText fullWidth formControlName=\"hint\" placeholder=\"Escribe una pista para esta pregunta\" />\n\n <br />\n <input\n class=\"form-input\"\n type=\"text\"\n pInputText\n fullWidth\n formControlName=\"explanation\"\n placeholder=\"Excribe una explicación para la respuesta\" />\n\n <hr />\n <h6>Opciones</h6>\n\n <div class=\"form-group\" formArrayName=\"options\">\n @for (item of optionsForm.controls; track item; let i = $index) {\n <div\n style=\"display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-direction: column\"\n >\n <div>\n <input type=\"text\" pInputText fullWidth [formControlName]=\"i\" />\n <p-button (click)=\"deleteFormArrayByIndex('options', i)\" icon=\"pi pi-times\" severity=\"danger\"></p-button>\n </div>\n </div>\n }\n </div>\n\n <p-button (click)=\"pushControlToFormArray('options')\" label=\"Agregar Opción\" [text]=\"true\" severity=\"help\"></p-button>\n </form>\n\n <!-- <button nbButton (click)=\"isRendered = !isRendered\"> Renderizar </button> -->\n\n @if (isRendered) {\n <div>\n <!-- TODO: probably i need to pass some params -->\n <app-selector></app-selector>\n </div>\n }\n </div>\n\n <div>\n <p-button (click)=\"copyToClipboard()\" [disabled]=\"formGroup.invalid\" label=\"Copia Código\" [rounded]=\"true\"></p-button>\n <p-button (click)=\"showCode()\" [disabled]=\"formGroup.invalid\" label=\"Mostrar\" [rounded]=\"true\" severity=\"secondary\"></p-button>\n </div>\n </div>\n","import { UntypedFormControl } from '@angular/forms';\nimport { InjectionToken, Type } from '@angular/core';\nimport { Provider } from '@angular/core';\n\nimport { TextWriterBuiderComponent } from './text-writer/text-writer-buider/text-writer-buider.component';\nimport { TextWriterComponent } from './text-writer/text-writer.component';\nimport { TranslationSwitcherBuilderComponent } from './translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component';\nimport { TranslationSwitcherComponent } from './translationSwitcher/translationSwitcher.component';\nimport { SpeakerBuilderComponent } from './speaker/speaker-builder/speaker-builder.component';\nimport { SpeakerComponent } from './speaker/speaker.component';\nimport { SelectorBuilderComponent } from '../../dynamic-components/selector/selector-builder/selector-builder.component';\nimport { SelectorComponent } from '../../dynamic-components/selector/selector.component';\nimport { EntityCommunicationService, IAuditable, IExtensionable, ILearnable, IManageable, IReactable } from '@dataclouder/ngx-core';\nimport { IAssetable } from '@dataclouder/ngx-cloud-storage';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\n\nexport type LessonComponentsType = 'selector' | 'speaker' | 'text-writer' | 'verb-summary' | 'word-summary';\n\nexport enum LessonComponentEnum {\n Selector = 'selector',\n Speaker = 'speaker',\n TextWriter = 'textWriter',\n VerbSummary = 'verbSummary',\n WordSummary = 'wordSummary',\n TranslationSwitcher = 'translationSwitcher',\n PlayWord = 'playWord',\n}\n\nexport const LessonComponentBuilders = {\n [LessonComponentEnum.Selector]: SelectorBuilderComponent,\n [LessonComponentEnum.Speaker]: SpeakerBuilderComponent,\n [LessonComponentEnum.TextWriter]: TextWriterBuiderComponent,\n // [LessonComponentEnum.VerbSummary]: VerbSummaryBuilderComponent,\n // [LessonComponentEnum.WordSummary]: WordSummaryBuilderComponent,\n [LessonComponentEnum.TranslationSwitcher]: TranslationSwitcherBuilderComponent,\n // [LessonComponentEnum.PlayWord]: PlayWordBuilderComponent,\n};\n\nexport const LessonComponents = {\n [LessonComponentEnum.Selector]: SelectorComponent,\n [LessonComponentEnum.Speaker]: SpeakerComponent,\n [LessonComponentEnum.TextWriter]: TextWriterComponent,\n // [LessonComponentEnum.VerbSummary]: VerbSummaryComponent,\n // [LessonComponentEnum.WordSummary]: WordSummaryComponent,\n [LessonComponentEnum.TranslationSwitcher]: TranslationSwitcherComponent,\n // [LessonComponentEnum.PlayWord]: PlayWordComponent,\n};\n\nexport function getLessonComponentClass(type: LessonComponentsType) {\n return LessonComponents[type];\n}\n\nexport interface LessonCompSettings {\n response?: string;\n responses?: string; // en caso de que haya multiples respuestas\n options?: string[]; // optiones para visualizar\n text?: string;\n hint?: string;\n explanation?: string;\n}\n\n// When the text should be extracted from the component and pass to the lesson/content to be saved/read process by AI.\nexport interface TextContent {\n text: string;\n}\n\n// Make LessonComponentConfiguration generic for settings\nexport interface LessonComponentConfiguration<T extends LessonCompSettings = LessonCompSettings> {\n id?: string;\n component: LessonComponentEnum | string;\n settings?: T; // for component that need and standards\n inputs?: Record<string, any>; // for whatever component.\n}\n\nexport interface StorageFile {\n bucket: string;\n url: string;\n path: string; // path where the file is in the storage\n}\n\nexport interface AudioStorage extends StorageFile {\n text?: string;\n voiceType?: string;\n}\n// Make SpeakerCompConfiguration extend the generic base interface\nexport interface SpeakerCompConfiguration extends LessonComponentConfiguration<LessonCompSettings & { voice: string }> {\n audio: AudioStorage;\n // settings is now inherited correctly via the generic type argument\n}\n\nexport interface LessonComponentInterface {\n // Update config to use the generic form\n config: LessonComponentConfiguration<any>;\n\n control?: UntypedFormControl;\n\n validate?(): boolean | null;\n evaluate?(): boolean | null;\n}\n\nexport const LESSONS_TOKEN = new InjectionToken<DefaultLessonsService>('Lessons Service');\n\nexport interface ImgStorageData extends StorageFile {\n fullPath: string; // path + name\n resolutions: any;\n resolution: string;\n}\n\nexport type LessonImage = ImgStorageData & { type: string };\n\nexport interface DynamicContentComponent {\n id: string; // duplicated id\n component: LessonComponentEnum; // name of the component\n inputs: Record<string, any>;\n config: LessonComponentConfiguration<any>;\n}\n\ntype StorageType = StorageFile & { type: string };\n\nexport interface Media {\n audios?: StorageType[];\n images?: StorageType[];\n}\n\nexport interface ILessonExtra {\n notionPageId?: string;\n}\n\n// Lesson will renamed to content\nexport interface ContentMetadata {\n title: string;\n description: string;\n isPublished: boolean;\n tags: string[];\n banner: StorageType;\n prompt: string;\n generatedByAI: boolean;\n}\n\nexport interface ILesson {\n // me faltan los comentarios\n _id?: any;\n id: string;\n\n title: string;\n description: string;\n markdown: string;\n\n textCoded: string;\n\n tags: string[];\n media: Media;\n format: 'html' | 'markdown';\n\n components: Array<LessonComponentConfiguration<any>>;\n dynamicComponents: Record<string, DynamicContentComponent>;\n\n // TODO: Voy a mandar esto a extensions despues\n baseLang: string;\n targetLang: string;\n\n // Features\n extensions: IExtensionable;\n assets?: IAssetable;\n learnable: ILearnable;\n auditable: IAuditable;\n manageable?: IManageable;\n reactions?: IReactable;\n}\n\nexport interface ILessonWithTaken extends ILesson {\n // FIXME: moved to lessons lib\n\n taken: any;\n createdAt: Date;\n updatedAt: Date;\n}\n\n// Think on someway of getting the toast alerts service\n\nexport interface ILessonTaken {\n id: string;\n score: number;\n goalCompleted: boolean;\n status: string;\n lastAccess: Date;\n}\n\nexport interface LessonPrompts {\n description: (lesson: ILesson) => string;\n banner: (lesson: ILesson) => string;\n content: (lesson: ILesson) => string;\n}\n\n// export abstract class LessonsAbstractService extends EntityCommunicationService<ILesson> {\n// abstract getLessons(paginator?: any): Promise<any>;\n// abstract getLesson(id: string): Promise<any>;\n// abstract postLesson(lesson: ILesson): Promise<any>;\n// abstract updateLesson(lesson: ILesson): Promise<any>;\n// abstract deleteLesson(id: string): Promise<any>;\n// abstract generateLesson(lesson: ILesson): Promise<any>;\n// abstract postGenerateByAI(id: string): Promise<any>;\n// abstract extractTextFromHtml(html: string): string;\n// abstract postImproveMDWithAI(lessonId: string, markdownText: string): Promise<any>; // Added for AI Markdown improvement\n// abstract saveTakenLesson(lesson: ILessonTaken): Promise<any>;\n// abstract getPrompts(): LessonPrompts;\n// }\n\n// my-service.provider.ts\nexport function provideLessonsService(serviceImplementation: Type<DefaultLessonsService>): Provider[] {\n return [\n {\n provide: LESSONS_TOKEN,\n useExisting: serviceImplementation,\n },\n ];\n}\n","import { Component, EventEmitter, inject, Input, OnInit, Output } from '@angular/core';\r\nimport { DatePipe } from '@angular/common';\r\n\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { PopoverModule } from 'primeng/popover';\r\nimport { TagModule } from 'primeng/tag';\r\n\r\nimport { SpeedDialModule } from 'primeng/speeddial';\r\nimport { MenuItem } from 'primeng/api';\r\nimport { CardModule } from 'primeng/card';\r\n\r\nimport { ILesson, ILessonWithTaken } from '../../lesson-mini-components/components/lessons.clases';\r\nimport { OnActionEvent } from '@dataclouder/ngx-core';\r\nimport { UserService } from '@dataclouder/ngx-users';\r\n\r\nenum EventCard {\r\n Edit = 'edit',\r\n Delete = 'delete',\r\n Select = 'select',\r\n Qr = 'qr',\r\n Clone = 'clone',\r\n}\r\n@Component({\r\n selector: 'dc-lesson-card',\r\n templateUrl: './dc-lesson-card.component.html',\r\n styleUrls: ['./dc-lesson-card.component.scss'],\r\n standalone: true,\r\n imports: [DatePipe, ButtonModule, PopoverModule, SpeedDialModule, CardModule, TagModule],\r\n})\r\nexport class DcLessonCardComponent implements OnInit {\r\n public userService = inject(UserService);\r\n\r\n @Input() lesson: ILessonWithTaken | ILesson | any;\r\n @Input() showOptions: boolean = true;\r\n @Input() cardHeight: string = '200px';\r\n\r\n @Output() onAction: EventEmitter<OnActionEvent> = new EventEmitter();\r\n\r\n public coverUrl: string = 'assets/defaults/background/default-background.webp';\r\n public eventType = EventCard;\r\n\r\n public items: MenuItem[] = [\r\n { label: 'Clonar', icon: 'pi pi-copy', command: () => this.eventCard(EventCard.Clone) },\r\n { label: 'Editar', icon: 'pi pi-pencil', command: () => this.eventCard(EventCard.Edit) },\r\n { label: 'Eliminar', icon: 'pi pi-trash', command: () => this.eventCard(EventCard.Delete) },\r\n ];\r\n\r\n ngOnInit() {\r\n this.coverUrl = this.lesson?.assets?.banner?.url || this.lesson?.media?.images?.[0]?.url || 'assets/defaults/background/default-background.webp';\r\n }\r\n\r\n public eventCard(eventType: EventCard) {\r\n this.onAction.emit({ action: eventType, item: this.lesson });\r\n }\r\n}\r\n","<div class=\"card-container\">\n @if(showOptions){\n <p-speeddial\n class=\"dial-button\"\n [model]=\"items\"\n [radius]=\"70\"\n type=\"quarter-circle\"\n direction=\"down-left\"\n [buttonProps]=\"{ severity: 'primary', rounded: true, outlined: true, raised: true }\"\n [tooltipOptions]=\"{ tooltipPosition: 'top' }\" />\n }\n <p-card>\n <div class=\"lesson-card\" [style.height]=\"cardHeight\">\n <div class=\"photo\">\n <img [src]=\"coverUrl\" alt=\"\" />\n </div>\n\n <span class=\"date\">{{ lesson.createdAt | date : 'dd/MM/yyyy' }}</span>\n\n <div class=\"description\">\n <h1>{{ lesson?.name || 'No title available' }}</h1>\n <p>{{ lesson.description || 'No description available' }}</p>\n <div class=\"card-footer\">\n <div class=\"status-tags\">\n @if (lesson.learnable?.level){\n <p-tag>Nivel {{ lesson.learnable?.level }}</p-tag>\n } @if (lesson.taken?.status == 'passed') {\n <p-tag severity=\"success\" value=\"Tomada\" [rounded]=\"true\" />\n } @if (lesson.taken?.status == 'failed') {\n <p-tag severity=\"danger\" value=\"Fallida\" [rounded]=\"true\" />\n } @if (lesson.taken) {\n <p-tag severity=\"success\" value=\"Tomada 📖\" [rounded]=\"true\" />\n } @if ( userService.isAdmin()) {\n <p-tag severity=\"contrast\" [value]=\"lesson.manageable?.isPublic ? 'Pública' : 'No pública'\" [rounded]=\"true\" />\n <p-tag severity=\"contrast\" [value]=\"lesson.manageable?.status\" [rounded]=\"true\" />\n }\n </div>\n\n <div style=\"position: absolute; bottom: 0px; right: 0px\">\n <p-button label=\"Tomar lección\" (onClick)=\"eventCard(eventType.Select)\" severity=\"primary\"> </p-button>\n </div>\n </div>\n </div>\n </div>\n </p-card>\n</div>\n","import { Injectable } from '@angular/core';\nimport { EntityCommunicationService, FiltersConfig, IFilterQueryResponse } from '@dataclouder/ngx-core';\nimport { ILesson, ILessonTaken, LessonPrompts } from '../components/lesson-mini-components/components/lessons.clases';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DefaultLessonsService extends EntityCommunicationService<ILesson> {\n constructor() {\n super('lesson');\n }\n\n // --- Endpoint Definitions for methods not in EntityCommunicationService ---\n private endpoints = {\n saveTakenLesson: `api/user/saveLesson`,\n generateLesson: `api/lesson/generate`,\n generateByAI: `api/lesson/generate-ai`,\n improveMDWithAI: `api/lesson/improve-markdown-ai`,\n GenerateBanner: 'api/lesson/generate-banner',\n };\n\n // --- Method Implementations from LessonsAbstractService ---\n\n async getLessons(filters: FiltersConfig = {}): Promise<IFilterQueryResponse<ILesson>> {\n if (!filters.returnProps) {\n filters.returnProps = {\n level: 1,\n title: 1,\n name: 1,\n description: 1,\n createdDate: 1,\n banner: 1, // deprecated\n metadata: 1, // deprecated\n manageable: 1,\n assets: 1,\n learnable: 1,\n appExtensions: 1,\n media: 1, // deprecated\n };\n }\n return this.query(filters);\n }\n\n async getLesson(id: string): Promise<ILesson> {\n return this.findOne(id);\n }\n\n async postLesson(lesson: ILesson): Promise<ILesson> {\n return this.createOrUpdate(lesson);\n }\n\n async updateLesson(lesson: ILesson): Promise<ILesson> {\n if (!lesson._id) {\n throw new Error('Lesson ID is required for update.');\n }\n return this.createOrUpdate(lesson);\n }\n\n async deleteLesson(id: string): Promise<any> {\n await this.remove(id);\n }\n\n // --- Methods specific to lessons ---\n\n saveTakenLesson(lesson: ILessonTaken): Promise<any> {\n return this.httpService.post(this.endpoints.saveTakenLesson, lesson);\n }\n\n async generateLesson(lesson: ILesson): Promise<ILesson> {\n return this.httpService.post<ILesson>(this.endpoints.generateLesson, lesson);\n }\n\n async postGenerateByAI(id: string): Promise<ILesson> {\n return this.httpService.post<ILesson>(this.endpoints.generateByAI, { id });\n }\n\n async postImproveMDWithAI(lessonId: string, markdownText: string): Promise<ILesson> {\n return this.httpService.post<ILesson>(this.endpoints.improveMDWithAI, { id: lessonId, markdown: markdownText });\n }\n\n public generateBanner(prompt: string, lessonId: string): Promise<IFilterQueryResponse<ILesson>> {\n return this.httpService.post<IFilterQueryResponse<ILesson>>(this.endpoints.GenerateBanner, { prompt, lessonId });\n }\n\n extractTextFromHtml(html: string): string {\n const r1 = new RegExp('~(.+?)~', 'g');\n const lessonHtml = html.replace(r1, (_matching, jsonCoded) => {\n try {\n const data = JSON.parse(jsonCoded);\n return `<span>${data?.settings?.text || ''}</span>`;\n } catch (e) {\n console.error('Error parsing JSON in extractTextFromHtml:', jsonCoded, e);\n return '';\n }\n });\n let text = lessonHtml.replace(/<[^>]*>/g, ' ');\n text = text.replace(/<style[^>]*>[\\s\\S]*?<\\/style>/gi, ' ');\n text = text.replace(/<script[^>]*>[\\s\\S]*?<\\/script>/gi, ' ');\n text = text.replace(/&nbsp;/g, ' ');\n text = text.replace(/&/g, '&');\n text = text.replace(/</g, '<');\n text = text.replace(/>/g, '>');\n text = text.replace(/\\s+/g, ' ').trim();\n return text;\n }\n\n getPrompts(): LessonPrompts {\n return null;\n }\n}\n","import { Component, Input, Type, ViewChildren, QueryList, OnDestroy, inject, AfterViewInit, effect } from '@angular/core';\nimport { NgComponentOutlet } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { MenuItem } from 'primeng/api';\n\nimport { DCFilterBarComponent, EntityBaseListComponent, ICustomFilter, OnActionEvent, PColumn, QuickTableComponent } from '@dataclouder/ngx-core';\nimport { ILesson, LESSONS_TOKEN } from '../../lesson-mini-components/components/lessons.clases';\n\nimport { DcLessonCardComponent } from '../dc-lesson-card/dc-lesson-card.component';\nimport { PaginatorModule } from 'primeng/paginator';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\nimport { UserService } from '@dataclouder/ngx-users';\n\nconst tableViewColumns: PColumn[] = [\n { field: 'media.images[0].url', header: 'Image', type: 'image' },\n { field: 'title', header: 'Título' },\n { field: 'description', header: 'Descripción' },\n];\n\n@Component({\n selector: 'dc-lesson-list',\n templateUrl: './dc-lesson-list.component.html',\n styleUrls: ['./dc-lesson-list.component.scss'],\n standalone: true,\n imports: [RouterModule, DCFilterBarComponent, NgComponentOutlet, QuickTableComponent, PaginatorModule],\n})\nexport class DCLessonListComponent extends EntityBaseListComponent<ILesson> implements OnDestroy, AfterViewInit {\n // Services\n public userService = inject(UserService);\n\n // Inputs\n @Input() customCardComponent?: Type<DcLessonCardComponent>;\n @Input() customFilters: ICustomFilter[] = [];\n\n // Injected Services\n // I dont rename so use the same in EntityBaseListComponent and Pagination\n protected override entityCommunicationService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n\n // View Children\n @ViewChildren('outlet') outlets!: QueryList<NgComponentOutlet>;\n\n // Public properties\n public cardComponent: Type<DcLessonCardComponent>;\n public override columns: PColumn[] = tableViewColumns;\n\n // Private properties\n private cardEventSubs: Subscription[] = [];\n\n constructor() {\n super();\n this.filterConfig.returnProps = {\n title: 1,\n name: 1,\n description: 1,\n media: 1,\n manageable: 1,\n learnable: 1,\n assets: 1,\n _id: 1,\n id: 1,\n };\n\n effect(() => {\n // When items signal changes, re-subscribe to card events\n this.items(); // a little hack to make the effect run when items change\n setTimeout(() => this.subscribeToCardEvents());\n });\n }\n\n override async ngOnInit(): Promise<void> {\n this.cardComponent = this.customCardComponent || DcLessonCardComponent;\n await super.ngOnInit();\n }\n\n ngAfterViewInit(): void {\n this.outlets.changes.subscribe(() => this.subscribeToCardEvents());\n }\n\n ngOnDestroy() {\n this.clearCardEventSubs();\n }\n\n public getCustomButtons(item: ILesson): MenuItem[] {\n return [\n { label: 'Select', icon: 'pi pi-check', command: () => this.handleAction({ action: 'select', item }) },\n { label: 'QR', icon: 'pi pi-qrcode', command: () => this.handleAction({ action: 'qr', item }) },\n ];\n }\n\n public handleAction(actionEvent: OnActionEvent): void {\n if (['select', 'qr'].includes(actionEvent.action)) {\n this.onAction.emit(actionEvent);\n } else {\n super.doAction(actionEvent);\n }\n }\n\n public applyFilterBarEvent(filterEvent: OnActionEvent): void {\n if (filterEvent.action === 'changeView') {\n this.toggleView();\n return;\n }\n this.filterConfig = { ...this.filterConfig, ...filterEvent.item };\n this.loadData();\n }\n\n private subscribeToCardEvents(): void {\n this.clearCardEventSubs();\n this.outlets.forEach((outlet) => {\n const instance = outlet.componentInstance as DcLessonCardComponent;\n if (instance?.onAction) {\n this.cardEventSubs.push(\n instance.onAction.subscribe((event: OnActionEvent) => {\n this.handleAction(event);\n }),\n );\n }\n });\n }\n\n private clearCardEventSubs(): void {\n this.cardEventSubs.forEach((sub) => sub.unsubscribe());\n this.cardEventSubs = [];\n }\n\n protected override async loadData(): Promise<void> {\n try {\n this.isLoading = true;\n const response = await this.entityCommunicationService.getLessons(this.filterConfig);\n this.items.set(response.rows);\n this.totalRecordsSignal.set(response.count);\n } catch (error) {\n console.error('Error loading data', error);\n } finally {\n this.isLoading = false;\n }\n }\n}\n","<dc-filter-bar\n [isAdmin]=\"userService.isAdmin()\"\n [options]=\"filterBarOptions\"\n [customFilters]=\"customFilters\"\n (onFilterAction)=\"applyFilterBarEvent($event)\"\n (onNew)=\"onNew()\"></dc-filter-bar>\n@if(viewType() === 'table') {\n\n<app-quick-table [tableData]=\"items()\" (onAction)=\"doAction($event)\"></app-quick-table>\n\n} @else {\n<div class=\"lesson-list-container\">\n @if (items()?.length > 0) { @for (lesson of items(); track lesson._id) {\n <ng-container\n #outlet=\"ngComponentOutlet\"\n [ngComponentOutlet]=\"cardComponent\"\n [ngComponentOutletInputs]=\"{\n lesson: lesson,\n showOptions: true\n }\">\n </ng-container>\n\n } } @else {\n <p>No se encontraron lecciones disponibles</p>\n }\n</div>\n}\n\n<p-paginator\n class=\"paginator-container\"\n currentPageReportTemplate=\"{{ totalRecords }} lecciones\"\n [showCurrentPageReport]=\"true\"\n (onPageChange)=\"onPageChange($event)\"\n [totalRecords]=\"totalRecords\"\n [first]=\"first\"\n [rows]=\"rows\"\n [rowsPerPageOptions]=\"[10, 20, 30]\">\n</p-paginator>\n","import { Component } from '@angular/core';\n\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@Component({\n selector: 'dc-lesson-form',\n templateUrl: './lesson-form.component.html',\n styleUrls: ['./lesson-form.component.scss'],\n standalone: true,\n imports: [ReactiveFormsModule],\n})\nexport class DCLessonFormComponent {\n // Form implementation will go here\n}\n","<div class=\"lesson-form-container\">\n <h2>Lesson Form</h2>\n <p>Esto es dentro del componente de la leccion</p>\n <!-- Form implementation will go here -->\n</div>\n","import { Injectable, Type } from '@angular/core';\nimport { LessonComponentEnum } from '../lesson-mini-components/components/lessons.clases';\nimport { SpeakerBuilderComponent } from '../lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component';\nimport { SpeakerComponent } from '../lesson-mini-components/components/speaker/speaker.component';\n\nexport interface InputCompoennt {\n text?: string; // Text is the text will extract in case of show as text and not component.\n [key: string]: any;\n}\n\nexport interface DynamicComponentData {\n id?: string;\n component: LessonComponentEnum;\n inputs?: InputCompoennt; // for whatever component.\n}\n\n// TODO: check LessonComponentBuilders in lessons.clases.ts for origianl implementation\nexport const DynamicComponentBuilders = {\n [LessonComponentEnum.Speaker]: SpeakerBuilderComponent,\n};\n\nexport const DynamicComponents = {\n [LessonComponentEnum.Speaker]: SpeakerComponent,\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DynamicComponentsService {\n private _dynamicComponentBuilders = { ...DynamicComponentBuilders };\n private _dynamicComponents = { ...DynamicComponents };\n\n public registerCustomComponent(component: Type<any>, name?: string) {\n // this._dynamicComponentBuilders[name || component.name] = component;\n this._dynamicComponents[name || component.name] = component;\n }\n\n public registerCustomComponentBuilder(component: Type<any>, name?: string) {\n this._dynamicComponentBuilders[name || component.name] = component;\n }\n\n public getDynamicComponentBuilders(type: any) {\n return this._dynamicComponentBuilders[type];\n }\n\n public getDynamicComponentClass(type: LessonComponentEnum | string) {\n return this._dynamicComponents[type];\n }\n}\n","import { ComponentRef, inject, Injectable, ViewContainerRef, Renderer2 } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { DynamicComponentsService } from '../components/dynamic-components/dynamic-components.service';\nimport { ILesson, ILessonTaken, LessonComponentConfiguration, LessonComponentInterface } from '../components/lesson-mini-components/components/lessons.clases';\nimport { TOAST_ALERTS_TOKEN, ToastAlertsAbstractService } from '@dataclouder/ngx-core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LessonRendererService {\n private readonly dynamicComponentsService = inject(DynamicComponentsService);\n private readonly toastrService = inject<ToastAlertsAbstractService>(TOAST_ALERTS_TOKEN);\n\n private components: { [key: string]: ComponentRef<LessonComponentInterface> } = {};\n\n public mainForm: FormGroup<{ [key: string]: FormControl<any> }> = new FormGroup({});\n\n public renderLesson(\n lessonData: ILesson,\n viewContainerRef: ViewContainerRef,\n dynamicLessonElement: HTMLElement,\n renderer: Renderer2,\n ): { [key: string]: ComponentRef<LessonComponentInterface> } {\n this.clearLessonRendering(dynamicLessonElement);\n console.log('Rendering lesson:', lessonData.id);\n\n const { htmlContent, components } = this.parseAndCreateComponents(lessonData, viewContainerRef);\n this.components = components;\n\n this.aggregateFormControls(this.components);\n dynamicLessonElement.innerHTML = htmlContent;\n this.injectComponentsIntoDom(this.components, renderer);\n return this.components;\n }\n\n public clearLessonRendering(dynamicLessonElement: HTMLElement): void {\n Object.values(this.components).forEach((compRef) => compRef.destroy());\n this.components = {};\n this.mainForm = new FormGroup({});\n if (dynamicLessonElement) {\n dynamicLessonElement.innerHTML = '';\n }\n }\n\n private parseAndCreateComponents(\n lessonData: ILesson,\n viewContainerRef: ViewContainerRef,\n ): { htmlContent: string; components: { [key: string]: ComponentRef<LessonComponentInterface> } } {\n const r1 = new RegExp('~(.+?)~', 'g');\n let count = 0;\n const createdComponents: { [key: string]: ComponentRef<LessonComponentInterface> } = {};\n\n const htmlContent = lessonData.textCoded.replace(r1, (_matching, jsonCoded) => {\n const componentName = `dynamicComp${count}`;\n count++;\n const componentRef = this.createComponentReferenceWithJson(jsonCoded, lessonData, viewContainerRef);\n if (!componentRef) {\n console.error(`Failed to create component for: ${jsonCoded}`);\n return '<!-- component creation failed -->';\n }\n createdComponents[componentName] = componentRef;\n return `<span id=\"${componentName}\"></span>`;\n });\n\n return { htmlContent, components: createdComponents };\n }\n\n private createComponentReferenceWithJson(\n json: string,\n currentLesson: ILesson,\n viewContainerRef: ViewContainerRef,\n ): ComponentRef<LessonComponentInterface> | null {\n try {\n let lessonCodedConfig: LessonComponentConfiguration = JSON.parse(json);\n\n if (lessonCodedConfig.id && currentLesson?.dynamicComponents[lessonCodedConfig.id]) {\n const foundConfig = currentLesson.dynamicComponents[lessonCodedConfig.id];\n if (foundConfig) {\n lessonCodedConfig = { ...lessonCodedConfig, ...foundConfig };\n }\n }\n\n const LessonClass = this.dynamicComponentsService.getDynamicComponentClass(lessonCodedConfig.component);\n\n if (!LessonClass) {\n console.error(`Component class not found for type: ${lessonCodedConfig.component}. JSON: ${json}`);\n return null;\n }\n\n const componentRef = viewContainerRef.createComponent<LessonComponentInterface>(LessonClass);\n\n if (lessonCodedConfig.inputs) {\n for (const key in lessonCodedConfig.inputs) {\n if (lessonCodedConfig.inputs.hasOwnProperty(key)) {\n componentRef.instance[key] = lessonCodedConfig.inputs[key];\n }\n }\n }\n if (lessonCodedConfig.settings) {\n componentRef.instance.config = lessonCodedConfig;\n }\n return componentRef;\n } catch (error) {\n console.error(`Error processing component JSON: ${json}`, error);\n return null;\n }\n }\n\n private aggregateFormControls(components: { [key: string]: ComponentRef<LessonComponentInterface> }): void {\n const newFormControls: { [key: string]: FormControl<any> } = {};\n Object.entries(components).forEach(([name, componentRef]) => {\n if (componentRef.instance?.control instanceof FormControl) {\n newFormControls[name] = componentRef.instance.control;\n newFormControls[name].addValidators(Validators.required);\n }\n });\n this.mainForm = new FormGroup(newFormControls);\n }\n\n private injectComponentsIntoDom(components: { [key: string]: ComponentRef<LessonComponentInterface> }, renderer: Renderer2): void {\n Object.entries(components).forEach(([name, componentRef]) => {\n const elementRef = document.getElementById(name);\n if (elementRef) {\n this.addComponentToNode(componentRef, elementRef, renderer);\n } else {\n console.warn(`Placeholder element with ID '${name}' not found in the DOM.`);\n }\n });\n }\n\n private addComponentToNode(componentRef: ComponentRef<LessonComponentInterface>, nodeDOM: HTMLElement, renderer: Renderer2): void {\n renderer.appendChild(nodeDOM, componentRef.location.nativeElement);\n }\n\n public evaluateForms(): { rates: { correct: number; incorrect: number; score: number }; takenLesson: ILessonTaken | null } | null {\n this.mainForm.markAllAsTouched();\n\n if (!this.mainForm.valid) {\n Object.keys(this.mainForm.controls).forEach((controlName) => {\n if (this.components[controlName]?.instance?.validate) {\n this.components[controlName].instance.validate();\n }\n });\n this.toastrService.warn({ subtitle: 'Por favor completa todos los ejercicios', title: 'Incompleto' });\n return null;\n }\n\n const rates = { correct: 0, incorrect: 0, score: 0 };\n\n Object.keys(this.mainForm.controls).forEach((controlName) => {\n const instance = this.components[controlName]?.instance;\n if (instance && typeof instance.evaluate === 'function') {\n try {\n const result = instance.evaluate();\n if (result) {\n rates.correct++;\n } else {\n rates.incorrect++;\n }\n } catch (err) {\n console.error('Error during evaluation for component:', controlName, instance, err);\n rates.incorrect++;\n }\n }\n });\n\n const totalQuestions = rates.correct + rates.incorrect;\n rates.score = totalQuestions > 0 ? rates.correct / totalQuestions : 0;\n\n const status = rates.score >= 0.7 ? 'passed' : 'failed';\n\n if (status === 'passed') {\n this.toastrService.success({ subtitle: `Calificación: ${Math.round(rates.score * 100)}%.`, title: '¡Muy bien!' });\n } else {\n this.toastrService.warn({ subtitle: `Calificación: ${Math.round(rates.score * 100)}%. Revisa tus respuestas.`, title: 'Casi lo logras' });\n }\n\n return { rates, takenLesson: null };\n }\n}\n","export const EnglishEvaluationSkill = `\nYou are a virtual professor for the Polilan English learning app. Your primary role is to evaluate a student's English conversational performance.\n\nYou will be provided with two pieces of information for each evaluation:\n1. **The student's English level:** This will be one of \"Beginner\", \"Intermediate\", or \"Advanced\".\n2. **A conversation transcript:** This will be the dialogue between the Student and an Assistant, with each turn clearly labeled (e.g., \"Student or User: ...\", \"Assistant: ...\").\n\nYour sole task is to evaluate the *Student's* contribution to the conversation. **Do NOT evaluate the Assistant's turns.**\n\nEvaluate the student's performance based on the following aspects, *always keeping the student's provided level in mind* and adjusting your expectations accordingly specially with beginners give them credits just for trying:\n\n* **Grammar & Syntax:** Evaluate accuracy and complexity *relative to the expected level*. (Beginners: focus on basic accuracy; Advanced: expect complex structures with high accuracy).\n* **Vocabulary & Usage:** Evaluate the range and appropriateness of words used *relative to the expected level*. (Beginners: focus on using basic words correctly; Advanced: expect varied and idiomatic language).\n* **Cohesion & Coherence:** Evaluate how well their turns connect and make sense within the conversation *relative to the expected level*. (Beginners: focus on simple, clear responses; Advanced: expect logical flow and detailed contributions).\n* **Task Completion/Relevance:** Evaluate how effectively they participate and respond to the conversation's goals or topics *relative to the expected level*.\n\nAssign a rating from 0 to 3 based on how well the student performs *compared to the typical expectations for their provided level*:\n\n* **0: Bad** - Performance is significantly below what is expected for this level. Many errors impede communication.\n* **1: Not Bad** - Performance is below expectations for this level, but communication is sometimes possible despite frequent errors.\n* **2: Good** - Performance meets expectations for this level, demonstrating solid understanding and usage with only occasional minor errors.\n* **3: Very Good** - Performance exceeds expectations for this level, demonstrating a strong command and potential to progress quickly.\n\nProvide detailed, constructive feedback that explains the rating. Point out specific strengths and areas for improvement based on their performance *at their given level*. Use examples from the dialog if helpful. Maintain a supportive, encouraging, and educational tone appropriate for a virtual professor guiding a student at their specific stage.\n`;\n","import { inject, Injectable, signal } from '@angular/core';\nimport {\n ChatMessage,\n ChatRole,\n ConditionOperator,\n ConditionType,\n ConversationEvents,\n ConversationType,\n EDoActionType,\n EvalResultStringDefinition,\n IConversationFlow,\n IConversationSettings,\n SimpleAgentTask,\n SystemPromptType,\n TextEngines,\n} from '@dataclouder/ngx-agent-cards';\nimport { EModelQuality } from '@dataclouder/ngx-core';\nimport { getRandomQuickVoice } from '@dataclouder/ngx-vertex';\nimport { ILessonsSettings } from '../components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component';\nimport { EnglishEvaluationSkill } from '../components/dc-lessons/dc-lesson-renderer/eval-agents-skills';\nimport { ILesson, LESSONS_TOKEN } from '../components/lesson-mini-components/components/lessons.clases';\nimport { DefaultLessonsService } from './default-lessons.service';\nimport { UserService } from '@dataclouder/ngx-users';\n\nconst EngagementSkill = `\nYou are an engagement assistant, start by greeting the user, asking something about the lesson, and then continue the conversation. always ask one or two friendly questions.\nthat makes sense for the lesson.\n`;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LessonConversationService {\n public lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n public userService = inject(UserService);\n\n public conversationSettings = signal<IConversationSettings | undefined>(undefined);\n public conversationFlow = signal<IConversationFlow | undefined>(undefined);\n public evalAgentTask = signal<SimpleAgentTask | undefined>(undefined);\n\n public initializeConversationFlow(): void {\n this.evalAgentTask.set({\n systemPrompt: EnglishEvaluationSkill,\n model: { provider: 'google' },\n task: `Please evaluate the user conversation student data is: \\n ${this.userService.getUserDataInformation()}`,\n expectedResponseType: EvalResultStringDefinition,\n });\n\n this.conversationFlow.set({\n goal: {\n enabled: true,\n task: `User is learning is taking a lesson about languages, evaluate how good are the responses.`,\n model: { quality: EModelQuality.FAST },\n },\n triggerTasks: {\n [ConversationEvents.OnUserMessage]: {\n enabled: true,\n ...this.evalAgentTask(),\n },\n },\n challenges: null,\n dynamicConditions: [\n {\n what: ConditionType.Goal,\n when: ConditionOperator.GreaterThanOrEqual,\n value: 100,\n do: [\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.SystemPrompt,\n prompt:\n 'You were talking with the user, user finish the conversation, in the next message you must try to finish the conversation and say good bye.',\n },\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.CharacterDescription,\n prompt: '',\n },\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.UserInformation,\n prompt: '',\n },\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.MessageExamples,\n prompt: '',\n },\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.ScenarioDescription,\n prompt: '',\n },\n ],\n },\n ],\n moodStateEnabled: false,\n });\n }\n\n public async startAI(lesson: ILesson, settings: ILessonsSettings): Promise<IConversationSettings | null> {\n console.log('Requesting agent cards from LessonAIService...');\n try {\n const conversationSettings = await this.generateConversationSettingsForLesson(lesson, settings);\n if (conversationSettings) {\n this.conversationSettings.set(conversationSettings);\n console.log('Agent cards received and set.');\n return conversationSettings;\n } else {\n console.error('Failed to generate agent cards (service returned null).');\n return null;\n }\n } catch (error) {\n console.error('Error generating agent cards:', error);\n return null;\n }\n }\n\n /**\n * Builds the scenario prompt string based on lesson content and user info.\n * @param lessonText The extracted text content of the lesson.\n * @param userInformationPrompt The formatted string containing user details.\n * @returns The complete scenario prompt string.\n */\n private _buildLessonInstructionsPrompt(lessonText: string, userInformationPrompt: string, settings: ILessonsSettings): string {\n return `\n${settings.instructionsPrompt}\n\n<Lesson Text>\n ${lessonText}\n</Lesson Text>\n\n${EngagementSkill}\n\n<User Information>\n${userInformationPrompt}`;\n }\n\n /**\n * Generates conversation settings for a lesson, using the lesson scenario as the initial prompt.\n * @param lesson The lesson data.\n * @returns An IConversationSettings object configured for the lesson scenario.\n */\n async generateConversationSettingsForLesson(lesson: ILesson, settings: ILessonsSettings): Promise<IConversationSettings | null> {\n // TODO: Consolidate user fetching logic if possible, or ensure consistency\n\n const baseLang = this.userService.user().settings.baseLanguage || 'en';\n let lessonText = '';\n if (lesson.textCoded) {\n lessonText = this.lessonsService.extractTextFromHtml(lesson.textCoded);\n } else {\n lessonText = lesson.markdown;\n }\n const userInformationPrompt = this.userService.getUserDataInformation();\n\n let lessonInstructionsPrompt = this._buildLessonInstructionsPrompt(lessonText, userInformationPrompt, settings);\n\n if (settings.additionalPrompt) {\n lessonInstructionsPrompt += '\\n\\n' + settings.additionalPrompt;\n }\n\n const initialMessage: ChatMessage = {\n role: ChatRole.System,\n content: lessonInstructionsPrompt,\n messageId: SystemPromptType.SystemPrompt,\n };\n\n // Use defaults similar to DEFAULT_LESSON_AGENT_CARD but adjust for prompt-based start\n const conversationSettings: IConversationSettings = {\n conversationType: ConversationType.General,\n textEngine: TextEngines.SimpleText,\n autoStart: true,\n messages: [initialMessage],\n model: { provider: 'google' },\n tts: { voice: getRandomQuickVoice((baseLang as any) || 'en', 'female') },\n };\n\n return conversationSettings;\n }\n}\n","import {\n Component,\n ComponentRef,\n ElementRef,\n Renderer2,\n viewChild,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n signal,\n Output,\n EventEmitter,\n OnInit,\n} from '@angular/core'; // Added signal imports, Output, EventEmitter\nimport { UiStateService } from '@dataclouder/ngx-core';\nimport { FormGroup } from '@angular/forms'; // Use typed forms\nimport { KeyValuePipe } from '@angular/common';\nimport { ButtonModule } from 'primeng/button';\nimport { ILesson, ILessonTaken, LESSONS_TOKEN } from '../../lesson-mini-components/components/lessons.clases';\nimport { TOAST_ALERTS_TOKEN, ToastAlertsAbstractService } from '@dataclouder/ngx-core';\nimport { LessonComponentInterface } from '../../lesson-mini-components/components/lessons.clases';\nimport { DCChatComponent, ChatEvent, ChatEventType, WordData } from '@dataclouder/ngx-agent-cards';\nimport { DrawerModule } from 'primeng/drawer';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\nimport { LessonRendererService } from '../../../services/lesson-renderer.service';\nimport { LessonConversationService } from '../../../services/lesson-conversation.service';\nimport { MarkdownComponent } from 'ngx-markdown';\n\nexport interface ILessonsSettings {\n additionalPrompt: string;\n instructionsPrompt: string;\n}\n\n@Component({\n selector: 'dc-lesson-renderer',\n templateUrl: './dc-lesson-renderer.component.html',\n styleUrls: ['./dc-lesson-renderer.component.css'],\n standalone: true,\n imports: [KeyValuePipe, ButtonModule, DCChatComponent, DrawerModule, MarkdownComponent],\n})\nexport class DCLessonRendererComponent implements OnInit {\n // --- Signal Inputs ---\n lessonInput = input<ILesson>(); // Input signal for lesson object\n lessonIdInput = input<string>(); // Input signal for lesson ID\n settings = input<ILessonsSettings>();\n\n // --- Outputs ---\n @Output() wordClicked = new EventEmitter<WordData>(); // New output event\n\n // --- View Childs ---\n dynamicLesson = viewChild<ElementRef<HTMLElement>>('dynamicLesson');\n\n // --- Services ---\n private readonly renderer = inject(Renderer2);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly toastrService = inject<ToastAlertsAbstractService>(TOAST_ALERTS_TOKEN);\n private lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n public readonly uiStateService = inject<UiStateService>(UiStateService);\n public readonly lessonRendererService = inject(LessonRendererService);\n public readonly lessonConversationService = inject(LessonConversationService);\n\n // --- State Signals ---\n lesson = signal<ILesson | undefined>(undefined); // Internal lesson state signal\n\n // --- Computed Signals ---\n imageCover = computed(() => this.lesson()?.media?.images?.find((img) => img.type === 'cover')?.url); // Computed signal for imageCover\n\n // --- Properties ---\n private components: { [key: string]: ComponentRef<LessonComponentInterface> } = {};\n public mainForm: FormGroup = new FormGroup({});\n private previousTextCoded: string | undefined | null = undefined; // Store previous value\n\n constructor() {\n // Effect to fetch lesson data if ID is provided and lesson object isn't\n effect(\n async () => {\n const lessonInput = this.lessonInput();\n const lessonId = this.lessonIdInput();\n\n if (lessonInput) {\n this.lesson.set(lessonInput); // Use input lesson directly\n } else if (lessonId && !this.lesson()) {\n // Fetch only if ID exists and internal lesson is not set\n console.log(`[Renderer] Effect 1: Fetching lesson ${lessonId}`);\n try {\n // Consider adding a loading state signal here\n const fetchedLesson = await this.lessonsService.getLesson(lessonId);\n this.lesson.set(fetchedLesson);\n console.log('Fetched lesson:', fetchedLesson);\n } catch (error) {\n console.error(`Failed to fetch lesson with ID: ${lessonId}`, error);\n this.toastrService.error({ subtitle: 'Failed to load lesson data.', title: 'Error' });\n this.lesson.set(undefined); // Reset lesson on error\n } finally {\n // Reset loading state signal here\n }\n } else if (!lessonInput && !lessonId) {\n // Handle case where neither input is provided, maybe clear the lesson?\n this.lesson.set(undefined);\n }\n },\n { allowSignalWrites: true },\n ); // Allow signal writes inside effect\n\n // Effect to render the lesson only when textCoded value actually changes\n effect(() => {\n const dynamicLessonEl = this.dynamicLesson();\n const currentLesson = this.lesson(); // Read the lesson signal\n\n if (!dynamicLessonEl || !currentLesson) {\n return;\n }\n\n if (currentLesson?.format === 'markdown') {\n // If markdown content exists, we clear any dynamically rendered components\n // and prevent the textCoded logic from running.\n if (this.previousTextCoded) {\n this.lessonRendererService.clearLessonRendering(dynamicLessonEl.nativeElement);\n this.mainForm = this.lessonRendererService.mainForm;\n this.previousTextCoded = undefined;\n }\n return;\n }\n\n const newTextCoded = currentLesson?.textCoded; // Get the current textCoded value\n\n // Quick fix to only render on changes textCode not all the lesson\n if (newTextCoded !== this.previousTextCoded) {\n if (newTextCoded !== undefined && newTextCoded !== null && currentLesson) {\n this.components = this.lessonRendererService.renderLesson(currentLesson, this.viewContainerRef, dynamicLessonEl.nativeElement, this.renderer);\n this.mainForm = this.lessonRendererService.mainForm;\n } else {\n this.lessonRendererService.clearLessonRendering(dynamicLessonEl.nativeElement);\n this.mainForm = this.lessonRendererService.mainForm;\n }\n // Update the stored previous value *after* comparison and action\n this.previousTextCoded = newTextCoded;\n } else {\n console.log('[Renderer] textCoded has NOT changed. Skipping render/clear.');\n }\n });\n }\n ngOnInit(): void {\n this.lessonConversationService.initializeConversationFlow();\n }\n\n public async evaluateForms() {\n const result = this.lessonRendererService.evaluateForms();\n if (!result) {\n return;\n }\n\n const currentLesson = this.lesson();\n if (!currentLesson) {\n console.error('Cannot save result, lesson data is missing.');\n this.toastrService.error({ subtitle: 'Cannot save result, lesson data missing.', title: 'Error' });\n return;\n }\n\n const status = result.rates.score >= 0.7 ? 'passed' : 'failed';\n const takenLesson: ILessonTaken = {\n id: currentLesson.id,\n goalCompleted: null,\n score: result.rates.score,\n status: status,\n lastAccess: new Date(),\n };\n\n console.log('Lesson evaluation result:', takenLesson);\n // TODO: Re-implement saving the taken lesson status via lessonService\n }\n\n // --- AI Chat Logic ---\n\n public async startAI() {\n const currentLesson = this.lesson();\n if (!currentLesson) {\n console.error('Cannot start AI without a lesson.');\n this.toastrService.error({ subtitle: 'Lesson data not available.', title: 'Cannot Start Chat' });\n return;\n }\n\n const conversationSettings = await this.lessonConversationService.startAI(currentLesson, this.settings());\n if (conversationSettings) {\n this.uiStateService.chatDrawerVisible.set(true);\n } else {\n this.toastrService.error({ subtitle: 'Could not prepare the AI chat session.', title: 'Error' });\n }\n }\n\n public onVisibleChange(isVisible: boolean) {\n if (isVisible === false) {\n this.uiStateService.chatDrawerVisible.set(false);\n }\n }\n\n public async handleGoalCompleted(event: any = {}) {\n console.log('Goal completed:', event);\n const lesson = this.lesson();\n\n const takenLesson: ILessonTaken = { id: lesson.id, goalCompleted: true, score: 100, status: 'finished', lastAccess: new Date() };\n\n const res = await this.lessonsService.saveTakenLesson(takenLesson);\n if (res) {\n // this.lessonsMemStateService.updateUserState(res);\n }\n\n this.toastrService.success({ subtitle: '¡Has completado la lección! , pero puedes seguir conversando', title: '¡Muy bien, guardaremos tu progreso!' });\n }\n\n public onChatMessage(event: ChatEvent): void {\n console.log('Received chat event:', event);\n\n switch (event.type) {\n case ChatEventType.WordClicked: {\n const wordClickedData = event.payload as WordData;\n console.log('Word clicked event received, emitting output:', wordClickedData);\n // Removed: this.wordPopupService.showWordPopup(wordClicked); // Use the service\n this.wordClicked.emit(wordClickedData); // Emit the event instead\n break;\n }\n\n default:\n console.log('Unhandled chat event type:', event.type);\n }\n }\n}\n","@if (lesson()?.format === 'markdown') {\n<h3>Mostrando markdown</h3>\n\n<markdown>\n {{ lesson()?.markdown }}\n</markdown>\n} @else {\n<h5>Lesson not available</h5>\n<div>\n <div #dynamicLesson class=\"targetclass\">\n <ng-template #target></ng-template>\n </div>\n</div>\n}\n\n<br />\n<div style=\"display: flex; gap: 10px\">\n @if ((mainForm.controls | keyvalue)?.length) {\n <div>\n <p-button label=\"Calificar Lección\" icon=\"pi pi-check-circle\" (click)=\"evaluateForms()\" [rounded]=\"true\"></p-button>\n </div>\n }\n\n <p-button icon=\"pi pi-verified\" [rounded]=\"true\" (click)=\"startAI()\" label=\"Repasar con IA\" />\n</div>\n<br /><br />\n\n@if(uiStateService?.chatDrawerVisible()) {\n<p-drawer\n header=\"Conversation\"\n [visible]=\"uiStateService?.chatDrawerVisible()\"\n (visibleChange)=\"onVisibleChange($event)\"\n position=\"bottom\"\n styleClass=\"app-bottom-overlay\">\n <dc-chat\n [conversationFlow]=\"lessonConversationService.conversationFlow()\"\n [conversationSettings]=\"lessonConversationService.conversationSettings()\"\n (goalCompleted)=\"handleGoalCompleted($event)\"\n (chatEvent)=\"onChatMessage($event)\"></dc-chat>\n</p-drawer>\n}\n","import { Injectable, inject, signal } from '@angular/core';\nimport { ILesson, LESSONS_TOKEN } from '../components/lesson-mini-components/components/lessons.clases';\nimport { NOTION_SERVICE_TOKEN, NotionExportType } from '../models/notion.models';\nimport { TOAST_ALERTS_TOKEN } from '@dataclouder/ngx-core';\nimport { DefaultLessonsService } from './default-lessons.service';\n\n@Injectable() // Consider providing in root or specific module/component\nexport class LessonNotionService {\n #notionService = inject(NOTION_SERVICE_TOKEN);\n public lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n #toastService = inject(TOAST_ALERTS_TOKEN);\n\n // Keep track of loading state specific to Notion operations\n isLoading = signal(false);\n\n /**\n * Extracts the Notion Page ID from a URL.\n * @param url The Notion page URL.\n * @returns The extracted page ID or null if invalid.\n */\n private extractNotionPageId(url: string): string | null {\n const notionIdRegex = /[a-f0-9]{32}(?=\\?|$)/;\n const match = url.match(notionIdRegex);\n const notionId = match ? match[0] : null;\n if (!notionId) {\n this.#toastService.error({\n title: 'URL inválido',\n subtitle: 'Por favor ingresa una URL válida de Notion.',\n });\n return null;\n }\n return notionId;\n }\n\n /**\n * Links an existing lesson with a Notion page ID by updating the lesson's extras.\n * @param lesson The current lesson data.\n * @param notionPageId The Notion page ID to link.\n * @returns The updated lesson data from the backend or undefined on failure.\n */\n public async linkLessonWithNotion(lesson: ILesson, notionPageId: string): Promise<ILesson | undefined> {\n if (!lesson || !lesson.id) {\n // Ensure lesson exists and has an ID\n this.#toastService.warn({ title: 'No se puede enlazar', subtitle: 'La lección debe existir y tener un ID.' });\n return undefined;\n }\n\n const updatedLesson = {\n ...lesson,\n extensions: {\n ...(lesson.extensions || {}),\n extras: {\n ...(lesson.extensions?.['extras'] || {}),\n notionPageId: notionPageId,\n },\n },\n };\n\n this.isLoading.set(true);\n try {\n const savedLesson = await this.lessonsService.postLesson(updatedLesson);\n this.#toastService.success({ title: 'Listo', subtitle: 'Se enlazó la lección con Notion.' });\n return savedLesson;\n } catch (error) {\n // Remove explicit type, rely on tsconfig setting\n console.error('Error linking with Notion:', error);\n this.#toastService.error({ title: 'Error al enlazar', subtitle: 'Ocurrió un error inesperado.' });\n return undefined;\n } finally {\n this.isLoading.set(false);\n }\n }\n\n /**\n * Handles the process of importing lesson content from Notion.\n * It prompts the user for a URL if necessary, extracts the ID, fetches content,\n * and potentially links the lesson if it's an existing one.\n * @param currentLesson The current lesson data (can be a new or existing lesson).\n * @param lessonId The current lesson ID (null if it's a new lesson).\n * @returns The fetched HTML content from Notion, or null if the process fails.\n */\n public async importAndLinkLessonFromNotion(currentLesson: ILesson | undefined, lessonId: string | null): Promise<string | null> {\n if (!currentLesson) return null;\n\n let notionPageId: string | null = null;\n\n if (currentLesson.extensions?.['extras']?.['notionPageId']) {\n const useExisting = confirm(`Ya tenemos el id ${currentLesson.extensions?.['extras']?.['notionPageId']} ¿Quieres usar este id para importar?`);\n if (useExisting) {\n notionPageId = currentLesson.extensions?.['extras']?.['notionPageId'];\n } else {\n const inputUrl = prompt('Ingresa la NUEVA URL de Notion para importar (este ID NO se guardará automáticamente si la lección ya existe)');\n if (!inputUrl) return null; // User cancelled\n notionPageId = this.extractNotionPageId(inputUrl);\n }\n } else {\n const inputUrl = prompt('Ingresa el URL de Notion para importar la lección (se enlazará si la lección ya existe)');\n if (!inputUrl) return null; // User cancelled\n notionPageId = this.extractNotionPageId(inputUrl);\n // Link automatically only if we got a valid Notion ID AND the lesson already exists (has an ID)\n if (notionPageId && lessonId) {\n const linkedLesson = await this.linkLessonWithNotion(currentLesson, notionPageId);\n if (!linkedLesson) {\n // Linking failed, maybe stop the import? Or proceed without linking?\n // For now, let's stop.\n this.#toastService.error({ title: 'Error de Enlace', subtitle: 'No se pudo enlazar con Notion antes de importar.' });\n return null;\n }\n // If linking succeeded, the lesson object might have changed, but we proceed with the import using the notionPageId.\n }\n }\n\n if (!notionPageId) {\n this.#toastService.warn({ title: 'Sin ID de Notion', subtitle: 'No se proporcionó un ID de Notion válido para importar.' });\n return null;\n }\n\n this.isLoading.set(true);\n try {\n this.#toastService.info({ title: 'Importando lección...', subtitle: 'Espera unos segundos' });\n const md = await this.#notionService.getPageInSpecificFormat(notionPageId, NotionExportType.HTML);\n console.log('Imported MD/HTML:', md);\n this.#toastService.success({ title: 'Contenido Importado', subtitle: 'Contenido de Notion obtenido.' });\n return md.content; // Return the fetched content\n } catch (error) {\n // Remove explicit type, rely on tsconfig setting\n console.error('Error importing from Notion:', error);\n this.#toastService.error({ title: 'Error de importación', subtitle: 'Ocurrió un error inesperado.' });\n return null; // Return null on failure\n } finally {\n this.isLoading.set(false);\n }\n }\n\n /**\n * Fetches content from the linked Notion page for AI improvement (placeholder).\n * @param lesson The current lesson data.\n */\n public async improveLessonWithNotionAI(lesson: ILesson | undefined): Promise<void> {\n if (!lesson) return;\n const notionId = lesson.extensions?.['extras']?.['notionPageId'];\n\n if (!notionId) {\n this.#toastService.warn({ title: 'Sin ID de Notion', subtitle: 'Enlaza la lección con Notion primero.' });\n return;\n }\n\n this.isLoading.set(true);\n try {\n this.#toastService.info({ title: 'Mejorando con IA...', subtitle: 'Obteniendo contenido de Notion.' });\n const md = await this.#notionService.getPageInSpecificFormat(notionId, NotionExportType.HTML);\n console.log('Content to improve:', md);\n // TODO: Add actual AI improvement logic here\n // e.g., call another service: await this.aiImprovementService.improve(md.content);\n // Then potentially update the lesson via lessonService or return data\n this.#toastService.success({ title: 'Contenido Obtenido', subtitle: 'Listo para mejorar con IA (lógica no implementada).' });\n } catch (error) {\n // Remove explicit type, rely on tsconfig setting\n console.error('Error improving with AI:', error);\n this.#toastService.error({ title: 'Error de IA', subtitle: 'Ocurrió un error inesperado.' });\n } finally {\n this.isLoading.set(false);\n }\n }\n}\n","import { Injectable, inject, WritableSignal } from '@angular/core';\nimport { ILesson, LESSONS_TOKEN, DynamicContentComponent } from '../components/lesson-mini-components/components/lessons.clases'; // Added DynamicContentComponent, ContentMetadata\nimport { LoadingBarService, TOAST_ALERTS_TOKEN } from '@dataclouder/ngx-core';\nimport { ChatRole, CONVERSATION_AI_TOKEN } from '@dataclouder/ngx-agent-cards';\nimport { DefaultLessonsService } from './default-lessons.service';\n\n@Injectable({\n providedIn: 'root', // Provide globally or in a specific module if preferred\n})\nexport class LessonUtilsService {\n public lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n #toastService = inject(TOAST_ALERTS_TOKEN);\n #agentService = inject(CONVERSATION_AI_TOKEN);\n\n loadingBarService = inject(LoadingBarService);\n\n /**\n * Validates if audios need generation for the given lesson.\n * Currently logs a placeholder message.\n * @param lesson The lesson object (or signal) to validate.\n */\n public validateAudios(lesson: ILesson | undefined): void {\n // Access lesson data directly\n if (!lesson?.components) {\n return;\n }\n // Placeholder logic - adapt as needed from original component\n console.log('Validating audios for lesson:', lesson.id);\n }\n\n /**\n * Updates the lesson signal with a new banner image in metadata.\n * @param lessonSignal The signal holding the lesson data.\n * @param imageUploaded The image data object from the upload event. Should conform to LessonImage structure partially.\n */\n public uploadCover(lessonSignal: WritableSignal<ILesson | undefined>, imageUploaded: any): void {\n lessonSignal.update((currentLesson) => {\n if (!currentLesson) return undefined;\n\n const assets = { ...(currentLesson.assets ?? {}) };\n assets.banner = imageUploaded;\n\n return {\n ...currentLesson,\n assets,\n };\n });\n }\n\n // I want to deprecate this method\n\n /**\n * @deprecated Use create new method.\n * Generates lesson content using AI. Assumes the lesson is already saved.\n * @param lessonId The ID of the lesson to generate content for.\n * @returns The updated lesson object after AI generation, or null on failure.\n */\n public async generateByAI(lessonId: string): Promise<ILesson | null> {\n if (!lessonId) {\n this.#toastService.warn({ title: 'ID Requerido', subtitle: 'Se necesita un ID de lección para usar IA.' });\n return null;\n }\n\n // No need to save here, component should ensure it's saved before calling.\n try {\n await this.lessonsService.postGenerateByAI(lessonId);\n // Re-fetch the lesson data to get AI updates\n const updatedLesson = await this.lessonsService.getLesson(lessonId);\n if (updatedLesson) {\n this.#toastService.success({ title: 'IA completada', subtitle: 'Lección actualizada con IA.' });\n return updatedLesson;\n } else {\n throw new Error('Failed to fetch lesson after AI generation');\n }\n } catch (error: any) {\n // Type the error object\n console.error('Error during AI generation in service:', error);\n this.#toastService.error({ title: 'Error de IA', subtitle: 'No se pudo generar la lección con IA.' });\n return null; // Return null in catch block\n }\n // Loading state should be managed by the component calling this service.\n }\n\n /**\n * Improves the provided Markdown text using AI and updates the lesson.\n * Assumes the lesson is already saved before calling this.\n * @param lesson The lesson object containing the prompt and other context.\n * @param markdownText The Markdown text generated from the lesson's HTML content.\n * @returns The improved Markdown string, or null on failure.\n */\n public async improveMDWithAI(lesson: ILesson, markdownText: string): Promise<string | null> {\n if (!markdownText) {\n this.#toastService.warn({ title: 'Texto Requerido', subtitle: 'Se necesita texto Markdown para mejorar con IA.' });\n return null;\n }\n\n try {\n this.loadingBarService.showIndeterminate();\n\n const textPrompt = this.lessonsService.getPrompts().content(lesson);\n\n const messages = [{ content: textPrompt, role: ChatRole.User }];\n\n const response = await this.#agentService.callChatCompletion({ messages, model: { provider: 'google' } });\n let improvedMarkdown = (response.content as string)?.trim() ?? null;\n\n // Remove potential markdown fences\n const markdownFenceStart = '```markdown\\n';\n const markdownFenceEnd = '\\n```';\n if (improvedMarkdown?.startsWith(markdownFenceStart) && improvedMarkdown.endsWith(markdownFenceEnd)) {\n improvedMarkdown = improvedMarkdown.slice(markdownFenceStart.length, -markdownFenceEnd.length);\n } else {\n // Also handle cases where it might just be ``` at the start/end\n const simpleFence = '```';\n if (improvedMarkdown?.startsWith(simpleFence)) {\n improvedMarkdown = improvedMarkdown.slice(simpleFence.length);\n }\n if (improvedMarkdown?.endsWith(simpleFence)) {\n improvedMarkdown = improvedMarkdown.slice(0, -simpleFence.length);\n }\n }\n // Trim any leading/trailing whitespace that might remain after removing fences\n improvedMarkdown = improvedMarkdown?.trim() ?? null;\n\n console.log('Improved Markdown:', improvedMarkdown);\n\n return improvedMarkdown; // Return only the string\n } catch (error: any) {\n console.error('Error during AI Markdown improvement in service:', error);\n this.#toastService.error({ title: 'Error de IA', subtitle: 'No se pudo mejorar la lección con IA.' });\n return null; // Return null in catch block\n } finally {\n this.loadingBarService.successAndHide();\n }\n }\n\n /**\n * Generates a concise description for the lesson using AI based on its content.\n * @param lesson The lesson object containing the content.\n * @returns A promise resolving to the generated description string, or null on failure.\n */\n public async generateDescriptionWithAI(lesson: ILesson): Promise<string | null> {\n if (!lesson || !lesson.textCoded) {\n this.#toastService.warn({ title: 'Contenido Requerido', subtitle: 'Se necesita contenido en la lección para generar una descripción.' });\n return null;\n }\n\n try {\n this.loadingBarService.showIndeterminate(); // Corrected: No argument needed\n\n // Extract plain text from the lesson's HTML content\n const plainTextContent = this._extractTextFromHtml(lesson.textCoded);\n if (!plainTextContent || plainTextContent.trim().length === 0) {\n this.#toastService.warn({ title: 'Texto Vacío', subtitle: 'No se pudo extraer texto útil del contenido de la lección.' });\n return null;\n }\n\n const descriptionPrompt = this.lessonsService.getPrompts().description(lesson);\n\n const messages = [{ content: descriptionPrompt, role: ChatRole.User }];\n\n const response = await this.#agentService.callChatCompletion({ messages, model: { provider: 'google' } });\n\n let generatedDescription = (response.content as string)?.trim() ?? null;\n\n // Basic cleanup (remove potential quotes if the AI wraps the response)\n if (generatedDescription && generatedDescription.startsWith('\"') && generatedDescription.endsWith('\"')) {\n generatedDescription = generatedDescription.substring(1, generatedDescription.length - 1);\n }\n\n if (generatedDescription) {\n this.#toastService.success({ title: 'Descripción Generada', subtitle: 'Se generó la descripción con IA.' });\n return generatedDescription;\n } else {\n throw new Error('AI did not return a valid description.');\n }\n } catch (error: any) {\n console.error('Error during AI description generation in service:', error);\n this.#toastService.error({ title: 'Error de IA', subtitle: 'No se pudo generar la descripción con IA.' });\n return null;\n } finally {\n this.loadingBarService.successAndHide();\n }\n }\n\n /**\n * Extracts plain text from an HTML string, removing encoded JSON components.\n * @param htmlInput The HTML string potentially containing encoded JSON (~...~).\n * @returns The plain text representation.\n */\n private _extractTextFromHtml(htmlInput: string): string {\n if (!htmlInput) return '';\n\n // 1. Replace encoded JSON blocks with their 'settings.text' or an empty string\n const jsonRegex = /~(.+?)~/g;\n const textWithPlaceholders = htmlInput.replace(jsonRegex, (match, jsonCoded) => {\n try {\n const decodedJson = jsonCoded.replace(/\"/g, '\"').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');\n const data = JSON.parse(decodedJson);\n return data?.settings?.text || ''; // Return text or empty string if not found\n } catch (error) {\n console.error('Failed to parse JSON inside HTML during text extraction:', jsonCoded, error);\n return ''; // Return empty string on error\n }\n });\n\n // 2. Strip remaining HTML tags to get plain text\n // Create a temporary DOM element to parse the HTML\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = textWithPlaceholders;\n // Use textContent to get the plain text, effectively stripping tags\n // Replace multiple whitespace characters (including newlines) with a single space\n return (tempDiv.textContent || tempDiv.innerText || '').replace(/\\s+/g, ' ').trim();\n }\n\n /**\n * Cleans orphaned components from the lesson's dynamicComponents.\n * An orphaned component is one present in dynamicComponents but its ID is not found in the textCoded HTML.\n * @param lesson The lesson object to clean.\n * @returns A new lesson object with orphaned components removed from dynamicComponents.\n */\n public cleanOrphanedComponents(lesson: ILesson): ILesson {\n if (!lesson || !lesson.textCoded || !lesson.dynamicComponents) {\n // Return the original lesson if essential parts are missing\n return lesson;\n }\n\n const textCoded = lesson.textCoded;\n const existingComponents = lesson.dynamicComponents;\n const existingComponentIds = new Set(Object.keys(existingComponents));\n\n // Regex to find \"id\":\"<component_id>\" within the textCoded string\n const idRegex = /\"id\":\"([^\"]+)\"/g;\n const foundIdsInText = new Set<string>();\n let match;\n\n while ((match = idRegex.exec(textCoded)) !== null) {\n const potentialId = match[1];\n // Check if the found ID actually exists in our dynamic components map\n // This ensures we only count IDs that correspond to known components.\n if (existingComponentIds.has(potentialId)) {\n foundIdsInText.add(potentialId);\n }\n }\n\n const orphanedIds: string[] = [];\n const cleanedDynamicComponents: Record<string, DynamicContentComponent> = {};\n\n // Iterate through existing component IDs\n for (const componentId of existingComponentIds) {\n if (foundIdsInText.has(componentId)) {\n // Keep the component if its ID was found in the text\n cleanedDynamicComponents[componentId] = existingComponents[componentId];\n } else {\n // Mark as orphaned if not found\n orphanedIds.push(componentId);\n }\n }\n\n if (orphanedIds.length > 0) {\n console.warn(`[LessonUtilsService] Orphaned components detected and will be removed from lesson data (IDs not found in textCoded):`, orphanedIds);\n this.#toastService.warn({\n title: 'Componentes Huérfanos Detectados',\n subtitle: `Se removerán ${orphanedIds.length} componentes no usados del editor.`,\n // life: 5000, // Removed 'life' property as it might not be supported by ToastData\n });\n }\n\n // Return a new lesson object with the cleaned components\n return {\n ...lesson,\n dynamicComponents: cleanedDynamicComponents,\n };\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';\nimport { TOAST_ALERTS_TOKEN, ToastAlertsAbstractService } from '@dataclouder/ngx-core';\nimport { DynamicComponentsService } from './dynamic-components.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DynamicComponentsBuilderService {\n #dialogService = inject(DialogService);\n #toastService = inject(TOAST_ALERTS_TOKEN);\n #dynamicComponentsService = inject(DynamicComponentsService);\n\n public openComponentBuilder(componentType: string, data: any = null): DynamicDialogRef | undefined {\n const componentToBuild = this.#dynamicComponentsService.getDynamicComponentBuilders(componentType);\n if (!componentToBuild) {\n console.error(`No component builder found for type: ${componentType}`);\n this.#toastService.error({ title: 'Error', subtitle: `Componente desconocido: ${componentType}` });\n return undefined;\n }\n const dialogRef: DynamicDialogRef = this.#dialogService.open(componentToBuild, {\n inputValues: {\n // inputValues was removed in newer PrimeNG versions, use 'data'\n inputs: data.inputs,\n id: data.id,\n },\n\n width: '80vw',\n header: 'Agregar componente',\n closable: true,\n });\n return dialogRef;\n }\n}\n","import { Component, EventEmitter, Output, inject } from '@angular/core'; // Added inject\nimport { CommonModule } from '@angular/common';\n// PrimeNG\nimport { ButtonModule } from 'primeng/button';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog'; // Added DialogService, DynamicDialogRef\n// Project specific\nimport { LessonComponentEnum } from '../../lesson-mini-components/components/lessons.clases';\nimport { DynamicComponentsBuilderService } from '../../dynamic-components/dynamic-components-builder.service';\n\n@Component({\n selector: 'dc-lesson-component-adder',\n standalone: true,\n imports: [CommonModule, ButtonModule, TooltipModule],\n templateUrl: './dc-lesson-component-adder.component.html',\n styleUrls: ['./dc-lesson-component-adder.component.css'],\n providers: [DialogService], // Provide DialogService here\n})\nexport class DCLessonComponentAdderComponent {\n // Services\n #dynamicComponentsBuilderService = inject(DynamicComponentsBuilderService);\n\n @Output() componentAdded = new EventEmitter<any>(); // Changed Output name and type\n\n // Expose enum to the template\n public lessonComponentEnum = LessonComponentEnum;\n\n // Logic to open component builder, now utilizing DynamicComponentsBuilderService\n public openComponentBuilder(type: string): void {\n const dialogRef: DynamicDialogRef | undefined = this.#dynamicComponentsBuilderService.openComponentBuilder(type);\n\n if (dialogRef) {\n // Handle the result and emit the new event\n dialogRef.onClose.subscribe((result) => {\n if (result) {\n console.log('Component builder closed:', result);\n this.componentAdded.emit(result); // Emit the result when dialog closes successfully\n }\n });\n } else {\n // Optional: Log if the dialog couldn't be opened, though the service already logs an error.\n console.warn(`Dialog could not be opened for type via component: ${type}`);\n }\n }\n}\n","<span>Componentes: </span>\n<div style=\"display: flex; gap: 10px; flex-wrap: wrap\">\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.Selector)\"\n pTooltip=\"Agrega un selector con multiples opciones\"\n tooltipPosition=\"bottom\">\n Selector\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.Speaker)\"\n pTooltip=\"Para que una palabra o frase sea reproducible\"\n tooltipPosition=\"bottom\">\n Speaker\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.TextWriter)\"\n pTooltip=\"Escribe una respuesta en un cuadro de texto\"\n tooltipPosition=\"bottom\">\n Text\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.VerbSummary)\"\n pTooltip=\"Muestra la información de un verbo\"\n tooltipPosition=\"bottom\">\n Verb\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.WordSummary)\"\n pTooltip=\"Muestra la información de una palabra\"\n tooltipPosition=\"bottom\">\n Palabra\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.TranslationSwitcher)\"\n pTooltip=\"Muestra el texto pero al pica cambia de idioma\"\n tooltipPosition=\"bottom\">\n Traducción\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.PlayWord)\"\n pTooltip=\"Muestra el texto pero al pica cambia de idioma\"\n tooltipPosition=\"bottom\">\n Play Word\n </p-button>\n <!-- Add other buttons here if needed, following the same pattern -->\n</div>\n","import { Component, EventEmitter, Input, Output, WritableSignal, signal, inject, OnInit } from '@angular/core'; // Added inject\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport TurndownService from 'turndown'; // Added TurndownService\nimport { marked } from 'marked'; // Added marked\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TooltipModule } from 'primeng/tooltip'; // Added TooltipModule\nimport { ILesson, LESSONS_TOKEN, ContentMetadata } from '../../lesson-mini-components/components/lessons.clases'; // Added LESSONS_TOKEN and ContentMetadata\nimport { InputGroupModule } from 'primeng/inputgroup';\nimport { LessonUtilsService } from '../../../services/lesson-utils.service'; // Added LessonUtilsService\nimport { TOAST_ALERTS_TOKEN, IManageable, IAuditable } from '@dataclouder/ngx-core'; // Added TOAST_ALERTS_TOKEN\nimport { DividerModule } from 'primeng/divider';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\n\n@Component({\n selector: 'dc-lesson-metadata-editor',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ButtonModule,\n InputTextModule,\n ReactiveFormsModule,\n TooltipModule, // Added TooltipModule\n InputGroupModule,\n DividerModule,\n ],\n templateUrl: './dc-lesson-metadata-editor.component.html',\n styleUrls: ['./dc-lesson-metadata-editor.component.css'],\n})\nexport class DCLessonMetadataEditorComponent implements OnInit {\n // Use signal for input lesson data\n @Input({ required: true }) form;\n\n @Input({ required: true }) lesson!: ILesson; // The lesson data itself\n // @Input({ required: true }) lessonForm!: FormGroup;\n\n @Input({ required: true }) isLoadingLesson!: boolean; // Shared loading state\n\n // Outputs for actions\n @Output() saveRequest = new EventEmitter<void>();\n @Output() importNotionRequest = new EventEmitter<void>();\n @Output() improveNotionRequest = new EventEmitter<void>();\n\n // Injected Services\n #lessonUtilsService = inject(LessonUtilsService);\n #toastService = inject(TOAST_ALERTS_TOKEN);\n private lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n private turndownService = new TurndownService(); // Instantiate TurndownService\n\n ngOnInit(): void {\n // console.log(this.lesson(), this.form);\n }\n\n onManageablePropertyChange(property: keyof IManageable, value: any): void {\n // this.lesson.update((current) => {\n // if (!current) return undefined;\n // const updatedManageable = { ...(current.manageable ?? {}), [property]: value };\n // return { ...current, manageable: updatedManageable as IManageable };\n // });\n }\n\n onAuditablePropertyChange(property: keyof IAuditable, value: any): void {\n // this.lesson.update((current) => {\n // if (!current) return undefined;\n // const updatedAuditable = { ...(current.auditable ?? {}), [property]: value };\n // return { ...current, auditable: updatedAuditable as IAuditable };\n // });\n }\n\n // New methods to handle events with proper casting\n handlePromptInputChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n this.onAuditablePropertyChange('prompt', target.value);\n }\n\n handleStatusChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n this.onManageablePropertyChange('status', target.checked ? 'published' : 'draft');\n }\n\n /**\n * Generates lesson content using AI, saving the current state first.\n * Moved from DCLessonEditorComponent.\n */\n public async generateByAI(): Promise<void> {\n const currentLesson = this.lesson; // Get current value\n if (!currentLesson?.id) {\n this.#toastService.warn({ title: 'Guardar primero', subtitle: 'Guarda la lección antes de usar IA.' });\n return;\n }\n\n this.isLoadingLesson = true;\n try {\n const rawHtmlContent = currentLesson.textCoded || '';\n if (!rawHtmlContent) {\n console.warn('No HTML content found in lesson to process. taking just description');\n this.#toastService.info({ title: 'Contenido lección desde 0', subtitle: 'Solo se usará el prompt' });\n\n const improvedMarkdown = await this.#lessonUtilsService.improveMDWithAI(this.lesson, 'Create content from description');\n // Convert and save the generated content\n await this._convertMarkdownToHtmlAndSave(improvedMarkdown); // Use extracted method\n } else {\n // Clean orphaned and Save before Improve\n const lessonToSave = this.#lessonUtilsService.cleanOrphanedComponents(currentLesson);\n const savedLesson = await this.lessonsService.postLesson(lessonToSave);\n\n if (!savedLesson) {\n this.#toastService.error({ title: 'Error al guardar', subtitle: 'No se pudo guardar antes de generar con IA.' });\n throw new Error('Failed to save before AI generation');\n }\n this.lesson = savedLesson;\n\n // Replace encoded JSON with actual text before Markdown conversion\n const processedHtmlContent = this._extractTextFromEncodedJson(rawHtmlContent);\n\n // Convert the processed HTML (with text instead of JSON) to Markdown\n const markdownText = this.turndownService.turndown(processedHtmlContent);\n\n // Use the updated lesson signal value for AI improvement\n const improvedMarkdown = await this.#lessonUtilsService.improveMDWithAI(this.lesson, markdownText);\n\n // Convert and save the improved content\n await this._convertMarkdownToHtmlAndSave(improvedMarkdown); // Use extracted method\n }\n } catch (error: any) {\n console.error('Error during AI generation process in metadata editor:', error);\n // Service handles specific AI error toasts, maybe add a general one here if needed\n // this.#toastService.error({ title: 'Error General', subtitle: 'Ocurrió un problema durante el proceso de IA.' });\n } finally {\n this.isLoadingLesson = false; // Stop loading\n }\n }\n\n /**\n * Replaces encoded JSON blocks (~...~) in HTML with their 'settings.text' value.\n * Moved from DCLessonEditorComponent.\n * @param htmlInput The HTML string containing encoded JSON.\n * @returns The processed HTML string with text replacements.\n */\n private _extractTextFromEncodedJson(htmlInput: string): string {\n const jsonRegex = /~(.+?)~/g; // Global flag to replace all occurrences\n\n return htmlInput.replace(jsonRegex, (match, jsonCoded) => {\n try {\n // Attempt to decode HTML entities that might be present in the JSON string\n const decodedJson = jsonCoded.replace(/\"/g, '\"').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');\n const data = JSON.parse(decodedJson);\n // Return the text if available, otherwise keep the original match (or an error placeholder)\n return data?.settings?.text || match;\n } catch (error) {\n console.error('Failed to parse JSON inside HTML:', jsonCoded, error);\n return '<!-- invalid component data -->'; // Placeholder for parsing errors\n }\n });\n }\n\n /**\n * Converts improved Markdown content to HTML, updates the lesson signal,\n * and saves the lesson.\n * @param improvedMarkdown The Markdown content generated by AI.\n * @throws Error if the markdown is empty/null or if saving fails.\n */\n private async _convertMarkdownToHtmlAndSave(improvedMarkdown: string | null | undefined): Promise<void> {\n if (improvedMarkdown) {\n // Convert the improved Markdown back to HTML before setting it\n const improvedHtml = marked(improvedMarkdown) as string;\n // Update the signal directly\n // this.lesson.update((current) => (current ? { ...current, textCoded: improvedHtml } : undefined));\n // Save the AI-generated content\n // Ensure lesson() is not undefined before saving\n const lessonToSave = this.lesson;\n if (lessonToSave) {\n await this.lessonsService.postLesson(lessonToSave);\n this.#toastService.success({ title: 'Contenido generado', subtitle: 'Se generó y guardó el contenido con IA.' });\n } else {\n console.error('Lesson signal is undefined, cannot save.');\n this.#toastService.error({ title: 'Error Interno', subtitle: 'No se pudo guardar la lección.' });\n // Throw an error to be caught by the calling method's try/catch\n throw new Error('Lesson signal is undefined during save operation.');\n }\n } else {\n // Log the error, the toast might be handled by the calling service/context\n console.error('AI generation failed or provided markdown was empty.');\n // Let the caller handle the specific user feedback if needed\n // Throw an error to be caught by the calling method's try/catch\n throw new Error('AI generation failed or the resulting markdown was empty.');\n }\n }\n\n /**\n * Calls the LessonUtilsService to generate a description using AI\n * and updates the lesson signal if successful.\n */\n async triggerGenerateDescriptionAI(): Promise<void> {\n const currentLesson = this.lesson;\n if (!currentLesson) {\n this.#toastService.warn({ title: 'Lección no cargada', subtitle: 'Espera a que la lección se cargue.' });\n return;\n }\n\n const generatedDescription = await this.#lessonUtilsService.generateDescriptionWithAI(currentLesson);\n\n if (generatedDescription) {\n // this.form.controls['description'].setValue(generatedDescription);\n }\n }\n}\n","<div>\n <!-- <div style=\"display: flex; gap: 10px; padding: 10px\">\n <p-button label=\"Guardar\" severity=\"primary\" (click)=\"emitSaveRequest()\" />\n <p-button label=\"Importar de Notion\" severity=\"help\" (click)=\"emitImportNotionRequest()\" />\n <p-button label=\"Mejorar Notion con AI\" severity=\"help\" (click)=\"emitImproveNotionRequest()\" />\n </div> -->\n\n <div>\n <div>\n <span>Nombre de La lección</span>\n <input pInputText style=\"width: 100%\" [formControl]=\"form.controls['name']\" type=\"text\" placeholder=\"Agrega un nombre\" />\n </div>\n <!-- <div>\n <span>Título </span>\n <input pInputText style=\"width: 100%\" [formControl]=\"form.controls['title']\" type=\"text\" placeholder=\"Agrega un título\" />\n </div> -->\n\n <div style=\"margin-top: 4px\">\n <span>Descripción </span>\n <p-inputgroup>\n <input pInputText style=\"width: 100%\" [formControl]=\"form.controls['description']\" type=\"text\" placeholder=\"Agrega una descripción\" />\n <p-button\n icon=\"pi pi-sparkles\"\n styleClass=\"p-button-secondary p-button-outlined\"\n pTooltip=\"Generar descripción con IA\"\n tooltipPosition=\"top\"\n [disabled]=\"isLoadingLesson\"\n (click)=\"triggerGenerateDescriptionAI()\" />\n </p-inputgroup>\n </div>\n </div>\n\n <div style=\"display: flex; align-items: center; margin-top: 10px\">\n <input\n pInputText\n style=\"flex: auto; margin-right: 5px\"\n [value]=\"lesson?.auditable?.prompt || ''\"\n (input)=\"handlePromptInputChange($event)\"\n type=\"text\"\n placeholder=\"Prompt para IA (opcional)\" />\n <p-button severity=\"primary\" label=\"Generar con IA\" icon=\"pi pi-sparkles\" [disabled]=\"isLoadingLesson\" (click)=\"generateByAI()\" />\n </div>\n\n <p-divider />\n\n <!-- <div style=\"display: flex; align-items: center; margin-top: 10px; gap: 10px\">\n <input pInputText [value]=\"lesson?.extensions?.['level'] || ''\" type=\"number\" placeholder=\"Nivel\" style=\"width: 80px\" />\n\n @if (lesson?.extensions) {\n <div>\n {{ lesson?.extensions?.['baseLang'] | flagEmoji }} -> {{ lesson?.extensions?.['targetLang'] | flagEmoji }} Lección para hablantes de\n {{ lesson?.extensions?.['baseLang'] | langDesc : 'es' }} que aprenden\n {{ lesson?.extensions?.['targetLang'] | langDesc : 'es' }}\n </div>\n }\n </div> -->\n</div>\n","import { Injectable } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { FormUtilsService } from '@dataclouder/ngx-core';\nimport { inject } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LessonFormEditorService {\n private fb = inject(FormBuilder);\n private formUtils = inject(FormUtilsService);\n\n public readonly formatOptions = [\n { label: 'HTML', value: 'html' },\n { label: 'Markdown', value: 'markdown' },\n ];\n\n createLessonForm() {\n return this.fb.group({\n version: ['1.0'],\n id: [''],\n name: [''],\n description: [''],\n format: ['html'],\n lang: [''],\n characterCard: [],\n conversationSettings: [],\n metaApp: [],\n conversationFlow: [],\n textCoded: [''],\n manageable: this.formUtils.createManageableFormGroup(),\n learnable: this.formUtils.createLearnableFormGroup(),\n });\n }\n}\n","import { Component, ComponentRef, ElementRef, computed, effect, inject, signal, ViewChild, ViewContainerRef, ChangeDetectorRef } from '@angular/core';\nimport { ActivatedRoute, Router, ParamMap } from '@angular/router';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport BalloonEditor from '@ckeditor/ckeditor5-build-balloon-block';\nimport { CKEditorModule } from '@ckeditor/ckeditor5-angular';\n// PrimeNG\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { SelectButtonModule } from 'primeng/selectbutton';\nimport { SplitterModule } from 'primeng/splitter';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { AspectType, IAssetable, ResolutionType, StorageImageSettings } from '@dataclouder/ngx-cloud-storage';\nimport { LoadingBarService, PromptService, EntityBaseFormComponent, DcManageableFormComponent } from '@dataclouder/ngx-core';\n\nimport { DCLessonRendererComponent } from '../dc-lesson-renderer/dc-lesson-renderer.component';\nimport { DialogModule } from 'primeng/dialog';\nimport { AssetsLoaderComponent } from '@dataclouder/ngx-cloud-storage';\nimport { MarkdownService } from 'ngx-markdown';\n\nimport {\n LessonComponentEnum,\n ILesson,\n LessonComponentInterface,\n LESSONS_TOKEN,\n LessonComponentConfiguration,\n} from '../../lesson-mini-components/components/lessons.clases';\n\nimport { LessonNotionService } from '../../../services/lesson-notion.service';\nimport { LessonUtilsService } from '../../../services/lesson-utils.service'; // Import the new utils service\nimport { DCLessonComponentAdderComponent } from '../dc-lesson-component-adder/dc-lesson-component-adder.component'; // Import the component adder\nimport { DCLessonMetadataEditorComponent } from '../dc-lesson-metadata-editor/dc-lesson-metadata-editor.component'; // Import the metadata editor\nimport { ComponentBuildData } from '../../lesson-mini-components/components/ComponentBuilder';\n\nimport { ChatRoleVertex, NgxVertexService } from '@dataclouder/ngx-vertex';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\nimport { DynamicComponentsBuilderService } from '../../dynamic-components/dynamic-components-builder.service';\nimport {\n DcAuditableViewerComponent,\n DcExtensionsViewerComponent,\n DcLearnableViewerComponent,\n DcReactionsViewerComponent,\n DcLearnableFormComponent,\n} from '@dataclouder/ngx-core';\nimport { LessonFormEditorService } from './lesson-form.utils.service';\n\n@Component({\n selector: 'dc-lesson-editor',\n templateUrl: './dc-lesson-editor.component.html',\n styleUrls: ['./dc-lesson-editor.component.css'],\n standalone: true,\n imports: [\n ButtonModule,\n CKEditorModule,\n DCLessonRendererComponent,\n FormsModule,\n InputTextModule,\n ReactiveFormsModule,\n SelectButtonModule,\n SplitterModule,\n TooltipModule,\n DCLessonComponentAdderComponent, // Add the component adder here\n DialogModule,\n\n AssetsLoaderComponent,\n DCLessonMetadataEditorComponent,\n DcManageableFormComponent,\n DcLearnableFormComponent,\n ],\n providers: [LessonNotionService], // Provide the service here\n})\nexport class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {\n private lessonFormEditorService = inject(LessonFormEditorService);\n private markdownService = inject(MarkdownService);\n\n public override form = this.lessonFormEditorService.createLessonForm();\n public readonly formatOptions = this.lessonFormEditorService.formatOptions;\n\n protected entityCommunicationService = inject(LESSONS_TOKEN);\n\n public htmlTemporal = '';\n\n protected override patchForm(entity: ILesson): void {\n console.log(this.form);\n\n if (this.entity().format === 'markdown') {\n this.htmlTemporal = this.markdownService.parse(entity.markdown) as string;\n } else {\n this.htmlTemporal = entity.textCoded;\n }\n\n // console.log(this.htmlTemporal);\n this.form.patchValue(entity);\n }\n\n // Services\n private activatedRoute = inject(ActivatedRoute); // Re-inject as it's needed for navigation\n private lessonNotionService = inject(LessonNotionService);\n private lessonUtilsService = inject(LessonUtilsService);\n public lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n private loadingBarService = inject(LoadingBarService);\n private defaultLessonsService = inject(DefaultLessonsService);\n private promptService = inject(PromptService);\n private ngxVertexService = inject(NgxVertexService);\n private dynamicComponentsBuilderService = inject(DynamicComponentsBuilderService);\n\n public isLoadingLesson = signal(false);\n\n // Computed signal to get dynamic components as an array for easier iteration in the template\n readonly dynamicComponentsArray = computed(() => {\n // const currentLesson = this.lesson();\n // if (currentLesson?.dynamicComponents) {\n // return Object.values(currentLesson.dynamicComponents);\n // }\n return []; // Return empty array if no lesson or no dynamic components\n });\n\n // States\n public components: { [key: string]: ComponentRef<LessonComponentInterface> } = {}; // Current Dynamic components\n public editor = BalloonEditor;\n public lessonComponentEnum = LessonComponentEnum;\n\n public coverStorageSettings: StorageImageSettings = {\n path: `lessons/${this.entityId()}/covers`,\n fileName: 'cover',\n cropSettings: { resizeToWidth: 850, aspectRatio: AspectType.RectangleLarge, resolutions: [ResolutionType.Medium] },\n };\n\n /**\n * Updates a specific property on the lesson signal.\n * Used for ngModelChange events to simulate two-way binding with signals.\n * @param property The key of the ILesson property to update.\n * @param value The new value for the property.\n */\n public updateLessonProperty<K extends keyof ILesson>(property: K, value: ILesson[K]): void {\n console.log('Updating property:', property, value);\n this.entity.update((currentLesson) => {\n if (!currentLesson) return undefined;\n return { ...currentLesson, [property]: value };\n });\n }\n\n public updateHtmlTextCoded(_: string, value: string): void {\n this.entity.update((currentLesson) => {\n if (!currentLesson) return undefined;\n return { ...currentLesson, textCoded: value };\n });\n this.form.controls.textCoded.setValue(value);\n }\n\n public onAssetsChange(updatedAssets: IAssetable): void {\n console.log(updatedAssets);\n this.entity.update((currentLesson) => {\n if (!currentLesson) return undefined;\n return { ...currentLesson, assets: updatedAssets };\n });\n }\n\n public async saveLesson(event?: Event): Promise<ILesson | undefined> {\n // TODO: Revisar por ahora uso el método del padre para guardar. pero creo que este era para guardar la lección.\n event?.preventDefault();\n\n const currentLesson = this.entity();\n if (!currentLesson) {\n this.toastService.error({ title: 'Error', subtitle: 'No hay datos de lección para guardar' });\n return undefined;\n }\n\n // Clean orphaned components before saving\n const lessonToSave = this.lessonUtilsService.cleanOrphanedComponents(currentLesson);\n\n // TODO: Implement optimization for saving only changed data.\n // This requires comparing lessonToSave with the initially fetched state.\n this.isLoadingLesson.set(true); // Indicate saving\n try {\n // Use the cleaned lesson object for saving\n const savedLesson = await this.lessonsService.postLesson(lessonToSave);\n const currentId = this.entityId();\n\n if (!currentId) {\n // No se como guardar los extras aunt\n\n // It was a new lesson, now it has an ID. Navigate.\n this.toastService.success({ title: 'Se creó la lección', subtitle: 'Éxito' });\n // The effect should automatically fetch the lesson again after navigation due to paramMap change.\n this.router.navigate(['./', savedLesson.id], { relativeTo: this.activatedRoute });\n } else {\n // It was an existing lesson, update the signal with the potentially updated data from the backend.\n this.entity.set(savedLesson);\n this.toastService.info({ title: 'Se guardaron los cambios en la lección', subtitle: 'Guardado' });\n // Call the service method for validation\n this.lessonUtilsService.validateAudios(this.entity());\n }\n return savedLesson;\n } catch (error: any) {\n // Type error\n console.error('Error saving lesson:', error);\n this.toastService.error({ title: 'Error al guardar', subtitle: 'No se pudieron guardar los cambios' });\n return undefined;\n } finally {\n this.isLoadingLesson.set(false); // Finish saving indication\n }\n }\n\n // Removed openComponentBuilder method\n\n /**\n * Handles the event emitted when a component is added via the adder component.\n * @param result The configuration data returned from the component builder dialog. Expected format: { obj: LessonComponentConfiguration }\n */\n public onComponentAdded(result: ComponentBuildData): void {\n // Check if result and result.obj.id exist\n\n const newComponent = result?.obj;\n if (newComponent?.id) {\n console.log('Component builder closed, result received in editor:', newComponent);\n\n // Update the lesson signal, adding the transformed component to the dynamicComponents object\n this.entity.update((currentLesson: any) => {\n if (!currentLesson) return undefined;\n\n // Ensure dynamicComponents object exists, initialize if not\n const currentDynamicComponents = currentLesson.dynamicComponents || {};\n\n // Create the updated dynamicComponents object\n const updatedDynamicComponents: Record<string, LessonComponentConfiguration<any>> = {\n ...currentDynamicComponents,\n [newComponent.id]: newComponent, // Use component's id as the key\n };\n\n // Return the updated lesson state\n return { ...currentLesson, dynamicComponents: updatedDynamicComponents };\n });\n }\n }\n\n public async improveNotionWithAI(): Promise<void> {\n await this.lessonNotionService.improveLessonWithNotionAI(this.entity());\n }\n\n public showComponentDetails(data: any) {\n alert('showComponentDetails' + JSON.stringify(data));\n }\n\n public async generateBanner() {\n this.toastService.info({ title: 'Generando prompt de sugerencia', subtitle: 'Por favor, espera' });\n\n const prompt = this.lessonsService.getPrompts().banner(this.entity()!);\n\n const geminiRes = await this.ngxVertexService.generateText([{ role: ChatRoleVertex.User, content: prompt }]);\n\n this.promptService\n .openPrompt({\n title: 'Generar Banner',\n initialValue: geminiRes.content || '',\n message: 'Ingresa una idea de lo que quieres ver',\n acceptText: 'Generar',\n cancelText: 'Cancelar',\n })\n .then((promptResult) => {\n if (promptResult) {\n this.loadingBarService.showIndeterminate();\n this.defaultLessonsService.generateBanner(promptResult, this.entityId()).then((result) => {\n if (result) {\n alert('Revisar como actualizar el banner');\n // this.updateLessonProperty('banner', (result as any).banner);\n }\n this.loadingBarService.successAndHide();\n });\n }\n });\n }\n\n public editComponent(comp: any) {\n console.log('Edit component:', comp);\n this.dynamicComponentsBuilderService.openComponentBuilder(comp.component, comp).onClose.subscribe((result) => {\n this.onComponentAdded(result);\n });\n }\n\n public onAssetUpdate(event: { assets: Partial<IAssetable> }) {\n this.entityCommunicationService.partialUpdate(this.entityId(), { assets: event.assets });\n }\n}\n","<div class=\"p-grid\">\n <div class=\"p-col-4\">\n <assets-loader\n [assets]=\"entity()?.assets\"\n storagePath=\"lessons/{{ entityId() }}\"\n (assetsChange)=\"onAssetsChange($event)\"\n (assetUpdate)=\"onAssetUpdate($event)\"></assets-loader>\n </div>\n\n <!-- <div class=\"p-col-4\">\n <h3>Auditable</h3>\n <dc-auditable-viewer [data]=\"entity()?.auditable\"></dc-auditable-viewer>\n </div> -->\n <div class=\"p-col-4\">\n <h3>Gestión</h3>\n <dc-manageable-form [form]=\"form.controls.manageable\"></dc-manageable-form>\n </div>\n <div class=\"p-col-4\">\n <h3>Categorias y Etiquetas</h3>\n <dc-learnable-form [form]=\"form.controls.learnable\"></dc-learnable-form>\n </div>\n <!-- <div class=\"p-col-4\">\n <h3>Reactions</h3>\n <dc-reactions-viewer [data]=\"entity()?.reactions\"></dc-reactions-viewer>\n </div> -->\n\n <!-- <div class=\"p-col-4\">\n <h3>Extensions</h3>\n <dc-extensions-viewer [data]=\"entity()?.extensions\"></dc-extensions-viewer>\n </div> -->\n</div>\n\n<!-- Lesson Metadata Editor -->\n<br />\n<div [formGroup]=\"form\">\n <p-selectButton [options]=\"formatOptions\" formControlName=\"format\" optionLabel=\"label\" optionValue=\"value\" />\n</div>\n<dc-lesson-metadata-editor [lesson]=\"entity()\" [form]=\"form\" [isLoadingLesson]=\"isLoadingLesson()\"></dc-lesson-metadata-editor>\n\n<div style=\"margin-top: 30px\"></div>\n\n<!-- Component Adder -->\n<dc-lesson-component-adder (componentAdded)=\"onComponentAdded($event)\"></dc-lesson-component-adder>\n\n<!-- Display Added Components -->\n<div class=\"added-components-list\" style=\"margin-top: 15px; margin-bottom: 15px\">\n <h4>Componentes Agregados:</h4>\n @if (dynamicComponentsArray().length > 0) {\n <ul>\n @for (comp of dynamicComponentsArray(); track comp.id) {\n <li\n >ID: {{ comp.id }} - Tipo: {{ comp.component }}\n\n <button pButton icon=\"pi pi-info\" (click)=\"showComponentDetails(comp)\"></button>\n <p-button icon=\"pi pi-pencil\" [rounded]=\"true\" severity=\"warn\" (click)=\"editComponent(comp)\"></p-button>\n </li>\n }\n </ul>\n } @else {\n <p>Aún no se han agregado componentes.</p>\n }\n</div>\n\n<hr />\n\n<!-- Text Editor and Renderer -->\n<p-splitter [style]=\"{ height: '80vh' }\">\n <ng-template pTemplate>\n <ckeditor\n (keydown.control.s)=\"saveLesson($event)\"\n class=\"text-editor\"\n [editor]=\"editor\"\n [ngModel]=\"htmlTemporal\"\n (ngModelChange)=\"updateHtmlTextCoded('textCoded', $event)\">\n </ckeditor>\n </ng-template>\n\n <ng-template pTemplate>\n <dc-lesson-renderer class=\"text-editor\" [lessonInput]=\"entity()\"></dc-lesson-renderer>\n </ng-template>\n</p-splitter>\n\n<div class=\"float-button\">\n <p-button icon=\"pi pi-save\" (click)=\"save()\" severity=\"primary\" [rounded]=\"true\" [raised]=\"true\" pTooltip=\"Guardar (Ctrl + S)\"> </p-button>\n</div>\n\n<hr />\n\n<!-- <p-dialog header=\"Prompts\" [modal]=\"true\" [(visible)]=\"promptsVisible\" [style]=\"{ width: '70%' }\">\n <div>\n <h1>Banner</h1>\n <p>{{ prompts?.banner }}</p>\n <h1>Contenido</h1>\n <p>{{ prompts?.content }}</p>\n <h1>Descripción</h1>\n <p>{{ prompts?.description }}</p>\n </div>\n</p-dialog> -->\n","import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'app-lessonsv2',\n template: '<router-outlet></router-outlet>',\n standalone: true,\n imports: [RouterOutlet],\n})\nexport class LessonsV2Component {}\n","import { Component, Input } from '@angular/core';\n\nimport { LessonCompSettings } from './lessons.clases';\n\n@Component({\n selector: 'app-lesson-component',\n template: '<div>no template</div>',\n standalone: true,\n})\n// This is the base class for all the components that are going to be used in the lessons.\nexport class LessonDynamicComponent {\n @Input() settings: LessonCompSettings = {} as LessonCompSettings;\n}\n","import { Injectable, inject } from '@angular/core';\n\nimport { HttpCoreService } from '@dataclouder/ngx-core';\n\nconst Endpoints = {\n courses: 'api/courses',\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CoursesService {\n private httpCoreService: HttpCoreService = inject(HttpCoreService);\n\n // Not sure how to implement this yet.\n\n public getCourses() {\n return this.httpCoreService.get(Endpoints.courses);\n }\n}\n","import { Component, inject, OnInit } from '@angular/core';\nimport { HttpCoreService } from '@dataclouder/ngx-core';\n\n@Component({\n selector: 'ngx-courses-admin',\n templateUrl: './courses-admin.component.html',\n styleUrls: ['./courses-admin.component.scss'],\n standalone: true,\n})\nexport class CoursesAdminComponent implements OnInit {\n private httpCoreService: HttpCoreService = inject(HttpCoreService);\n\n async ngOnInit(): Promise<void> {\n const courses = await this.httpCoreService.get('courses');\n console.log(courses);\n }\n}\n","<p>welcome to courses creation</p>\n","import { Injectable } from '@angular/core';\nimport { EntityCommunicationService } from '@dataclouder/ngx-core';\nimport { ICourse } from './models/courses.model';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CourseService extends EntityCommunicationService<ICourse> {\n constructor() {\n super('courses');\n }\n generateLanguageCourse(base: string, target: string, id: string = ''): Promise<ICourse> {\n return this.httpService.post<ICourse>(`api/courses/generate-language`, { base, target, id });\n }\n autogenerateLessons(id: string): Promise<void> {\n return this.httpService.post<void>(`api/courses/autogenerate-lessons`, { id });\n }\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, input, inject, output, signal, WritableSignal } from '@angular/core';\nimport { CardModule } from 'primeng/card';\nimport { ButtonModule } from 'primeng/button';\n\nimport {\n DCFilterBarComponent,\n ListFilterBarOptions,\n OnActionEvent,\n PaginationBase,\n QuickTableComponent,\n TOAST_ALERTS_TOKEN,\n ToastAlertsAbstractService,\n} from '@dataclouder/ngx-core';\nimport { CourseService } from '../courses.service';\nimport { ICourse } from '../models/courses.model';\nimport { RouterModule } from '@angular/router';\nimport { SpeedDialModule } from 'primeng/speeddial';\nimport { MenuItem } from 'primeng/api';\nimport { DatePipe, SlicePipe } from '@angular/common';\nimport { PaginatorModule } from 'primeng/paginator';\nimport { TableModule } from 'primeng/table';\nimport { TagModule } from 'primeng/tag';\nimport { UserService } from '@dataclouder/ngx-users';\nimport { LangDescTranslation } from '@dataclouder/ngx-core';\n\n@Component({\n selector: 'app-course-list',\n imports: [\n CardModule,\n ButtonModule,\n DCFilterBarComponent,\n SpeedDialModule,\n DatePipe,\n SlicePipe,\n PaginatorModule,\n RouterModule,\n TableModule,\n QuickTableComponent,\n TagModule,\n LangDescTranslation,\n ],\n templateUrl: './course-list.component.html',\n styleUrl: './course-list.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CourseListComponent extends PaginationBase implements OnInit {\n // Services\n private toastService = inject<ToastAlertsAbstractService>(TOAST_ALERTS_TOKEN);\n private courseService = inject(CourseService);\n public userService = inject(UserService);\n private cdr = inject(ChangeDetectorRef);\n\n // Inputs\n @Input() viewType: 'table' | 'card' = 'card';\n readonly onlyView = input<boolean>(true);\n readonly onSelect = output<ICourse>();\n\n // States\n courses: WritableSignal<ICourse[]> = signal<ICourse[]>([]);\n columns: any[] = ['name', 'description', 'updatedAt', 'image'];\n filterBarOptions: ListFilterBarOptions = { showActions: true, showCreateButton: true, showViewButton: true };\n\n getCustomButtons(item: any): MenuItem[] {\n return [\n {\n tooltipOptions: { tooltipLabel: 'Ver detalles', tooltipPosition: 'bottom' },\n icon: 'pi pi-eye',\n command: () => this.doAction({ item, action: 'view' }),\n },\n {\n label: 'Editar',\n icon: 'pi pi-pencil',\n command: () => this.doAction({ item, action: 'edit' }),\n },\n {\n label: 'Eliminar',\n icon: 'pi pi-trash',\n command: () => this.doAction({ item, action: 'delete' }),\n },\n ];\n }\n\n async ngOnInit(): Promise<void> {\n const user: any = this.userService.user();\n const targetLang = user?.settings?.['targetLanguage'];\n const baseLang = user?.settings?.['baseLanguage'];\n // console.log(user?.settings?.['targetLanguage']);\n this.filterConfig.filters = { baseLang: baseLang, targetLang: targetLang };\n this.filterConfig.returnProps = { _id: 1, id: 1, name: 1, description: 1, updatedAt: 1, image: 1, baseLang: 1, targetLang: 1, auditable: 1 };\n\n // this.filterConfig.filters = { targetLang: 'de', baseLang: 'es' };\n\n const response = await this.courseService.query(this.filterConfig);\n this.courses.set(response.rows);\n this.cdr.detectChanges();\n console.log(this.courses(), this.viewType);\n this.cdr.detectChanges();\n }\n\n protected override loadData(): Promise<void> {\n throw new Error('Method not implemented.');\n }\n\n onNew() {\n console.log('onNew');\n this.router.navigate(['./edit'], { relativeTo: this.route });\n }\n\n public toggleView() {\n this.viewType = this.viewType === 'card' ? 'table' : 'card';\n console.log(this.viewType, this.courses());\n\n this.cdr.detectChanges();\n }\n\n public selectItem(course: ICourse) {\n console.log('onSelect');\n this.onSelect.emit(course);\n }\n\n public override async doAction(actionEvent: OnActionEvent) {\n const { item, action } = actionEvent;\n\n if (action == 'changeView') {\n this.toggleView();\n }\n const id = item.id || item._id;\n\n switch (action) {\n case 'view':\n this.router.navigate(['./details', id], { relativeTo: this.route });\n break;\n case 'delete':\n const areYouSure = confirm('¿Estás seguro de querer eliminar este origen?');\n if (areYouSure) {\n await this.courseService.remove(id);\n this.courses.set(this.courses().filter((course) => course._id !== id));\n this.toastService.success({\n title: 'Origen eliminado',\n subtitle: 'El origen ha sido eliminado correctamente',\n });\n this.cdr.detectChanges();\n }\n break;\n case 'edit':\n this.router.navigate(['./edit', id], { relativeTo: this.route });\n break;\n }\n }\n}\n","@if (!onlyView()) {\n<p-button [icon]=\"viewType === 'card' ? 'pi pi-table' : 'pi pi-list'\" label=\"Change View\" [link]=\"true\" (click)=\"toggleView()\" />\n}\n<div class=\"course-list-container\">\n <dc-filter-bar [isAdmin]=\"userService.isAdmin()\" [options]=\"filterBarOptions\" (onNew)=\"onNew()\" (onFilterAction)=\"doAction($event)\"></dc-filter-bar>\n\n @if (viewType === 'card') {\n <div class=\"course-list-content\">\n @for (course of courses(); track course.id) {\n <div class=\"card-source\">\n <div style=\"position: absolute; top: 4px; right: 4px; z-index: 1000\">\n <p-speeddial\n [model]=\"getCustomButtons(course)\"\n [radius]=\"70\"\n type=\"quarter-circle\"\n direction=\"down-left\"\n [buttonProps]=\"{ severity: 'primary', rounded: true, outlined: true }\"\n [tooltipOptions]=\"{ tooltipPosition: 'top' }\" />\n </div>\n <p-card [header]=\"course.name\">\n <p class=\"m-0\">{{ course.description | slice : 0 : 250 }}...</p>\n <span>{{ course?.auditable?.createdAt | date : 'dd/MM/yyyy HH:mm' }}</span>\n\n <p-tag severity=\"success\" [value]=\"course.baseLang | langDesc : 'es'\" [rounded]=\"true\" />\n ->\n <p-tag severity=\"info\" [value]=\"course.targetLang | langDesc : 'es'\" [rounded]=\"true\" />\n </p-card>\n </div>\n } @if (courses().length === 0) {\n <p-card>\n <p>No courses found</p>\n </p-card>\n }\n </div>\n } @else if ( viewType == 'table'){\n\n <app-quick-table [tableData]=\"courses()\"></app-quick-table>\n\n }\n\n <div class=\"paginator-container\">\n <p-paginator\n currentPageReportTemplate=\"{{ totalRecords }} conversations\"\n [showCurrentPageReport]=\"true\"\n (onPageChange)=\"onPageChange($event)\"\n [totalRecords]=\"totalRecords\"\n [rowsPerPageOptions]=\"[10, 20, 30]\">\n </p-paginator>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { CourseService } from '../courses.service';\nimport { ICourse } from '../models/courses.model';\nimport { CommonModule } from '@angular/common';\nimport { PanelModule } from 'primeng/panel';\nimport { ButtonModule } from 'primeng/button';\nimport { CardModule } from 'primeng/card';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\nimport { ToastModule } from 'primeng/toast';\nimport { MessageService } from 'primeng/api';\nimport { TagModule } from 'primeng/tag';\n\n@Component({\n selector: 'app-course-detail',\n imports: [CommonModule, CardModule, PanelModule, ButtonModule, ProgressSpinnerModule, ToastModule, TagModule],\n templateUrl: './course-detail.component.html',\n styleUrl: './course-detail.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MessageService],\n})\nexport class CourseDetailComponent implements OnInit {\n protected entityCommunicationService = inject(CourseService);\n private activatedRoute = inject(ActivatedRoute);\n private messageService = inject(MessageService);\n\n public courseId: string = this.activatedRoute.snapshot.paramMap.get('id') as string;\n\n public course = signal<ICourse | null>(null);\n public generatingLessons = signal(false);\n public generatingLesson = signal('');\n\n ngOnInit(): void {\n this.loadCourse();\n }\n\n public async generatePendingLessons() {\n this.generatingLessons.set(true);\n try {\n await this.entityCommunicationService.autogenerateLessons(this.courseId);\n this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Lessons generated successfully' });\n this.loadCourse();\n } catch (error) {\n this.messageService.add({ severity: 'error', summary: 'Error', detail: 'Error generating lessons' });\n } finally {\n this.generatingLessons.set(false);\n }\n }\n\n public async generateLesson(lessonId: string) {\n this.generatingLesson.set(lessonId);\n try {\n // TODO: Implement the generateLesson method\n // await this.entityCommunicationService.autogenerateLesson(this.courseId, lessonId);\n this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Lesson generated successfully' });\n this.loadCourse();\n } catch (error) {\n this.messageService.add({ severity: 'error', summary: 'Error', detail: 'Error generating lesson' });\n } finally {\n this.generatingLesson.set('');\n }\n }\n\n private async loadCourse() {\n const course = await this.entityCommunicationService.findOne(this.courseId);\n this.course.set(course);\n }\n}\n","@if (course(); as course) {\n<div class=\"course-detail-container p-4\">\n <p-card>\n <ng-template pTemplate=\"title\">\n <div class=\"flex justify-content-between align-items-center\">\n <span>{{ course.name }}</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"subtitle\">\n <div class=\"flex align-items-center gap-2\">\n <i class=\"pi pi-book\"></i>\n <span>{{ course.moduleCount }} Modules / {{ course.totalLessons }} Lessons</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\">\n <p>{{ course.description }}</p>\n\n <div class=\"grid mt-3\">\n @for (module of course.modules; track module.id) {\n <div class=\"col-12 md:col-6\">\n <p-panel [toggleable]=\"true\">\n <ng-template pTemplate=\"header\">\n <div class=\"flex align-items-center gap-2 w-full\">\n <i class=\"pi pi-list\"></i>\n <span class=\"font-bold white-space-nowrap\">{{ module.title }}</span>\n <span class=\"text-sm text-color-secondary ml-auto\">{{ module.lessonCount }} lessons</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\">\n <p>{{ module.description }}</p>\n <ul class=\"list-none p-0 m-0 lessons-list\">\n @for (lesson of module.lessons; track lesson.id) {\n <li class=\"flex align-items-center justify-content-between p-2 border-bottom-1 surface-border\">\n <div class=\"flex align-items-center gap-2\">\n @if(lesson.generated) {\n <i class=\"pi pi-play-circle text-green-500\"></i>\n } @else {\n <i class=\"pi pi-lock text-gray-500\"></i>\n }\n <span>{{ lesson.title }}</span>\n </div>\n @if(lesson.generated) {\n <p-button icon=\"pi pi-chevron-right\" [text]=\"true\" [rounded]=\"true\"></p-button>\n } @else {\n <p-button label=\"Generate\" icon=\"pi pi-cog\" [text]=\"true\" size=\"small\"></p-button>\n }\n </li>\n }\n </ul>\n </ng-template>\n </p-panel>\n </div>\n }\n </div>\n </ng-template>\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-content-end\">\n <p-button label=\"Generate Pending Lessons\" icon=\"pi pi-cogs\" (onClick)=\"generatePendingLessons()\" [loading]=\"generatingLessons()\"></p-button>\n </div>\n </ng-template>\n </p-card>\n</div>\n} @else {\n<div class=\"flex justify-content-center align-items-center h-full\">\n <p-progressSpinner></p-progressSpinner>\n</div>\n}\n","import { ChangeDetectionStrategy, Component, effect, inject, output } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { ICourse } from '../models/courses.model';\nimport { CourseService } from '../courses.service';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { CardModule } from 'primeng/card';\nimport { ButtonModule } from 'primeng/button';\nimport { SelectModule } from 'primeng/select';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TextareaModule } from 'primeng/textarea';\nimport { ChipModule } from 'primeng/chip';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { AspectType, CropperComponentModal, ResolutionType, BasicStorage } from '@dataclouder/ngx-cloud-storage';\nimport { EntityBaseFormComponent, getSupportedLanguageOptions, LoadingBarService } from '@dataclouder/ngx-core';\nimport { FormlyFieldConfig, FormlyModule } from '@ngx-formly/core';\nimport { DialogModule } from 'primeng/dialog';\nimport { MessageModule } from 'primeng/message';\nimport { RouterLink } from '@angular/router';\n\n@Component({\n selector: 'app-source-form',\n imports: [\n ReactiveFormsModule,\n CardModule,\n TextareaModule,\n ButtonModule,\n SelectModule,\n InputTextModule,\n ChipModule,\n TooltipModule,\n CropperComponentModal,\n FormlyModule,\n DialogModule,\n MessageModule,\n RouterLink,\n ],\n templateUrl: './course-form.component.html',\n styleUrl: './course-form.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class CourseFormComponent extends EntityBaseFormComponent<ICourse> {\n protected entityCommunicationService = inject(CourseService);\n private loadingBarService = inject(LoadingBarService);\n private fb = inject(FormBuilder);\n public languageOptions = getSupportedLanguageOptions('en');\n\n constructor() {\n super();\n effect(() => {\n console.log(this.entity());\n });\n }\n\n public form: FormGroup = this.fb.group({\n name: ['', Validators.required],\n description: [''],\n image: [{} as BasicStorage],\n targetLang: ['', Validators.required],\n baseLang: ['', Validators.required],\n });\n readonly onSave = output<any>();\n\n public storageImgSettings = {\n path: `courses`,\n cropSettings: { aspectRatio: AspectType.Square, resolutions: [ResolutionType.MediumLarge], resizeToWidth: 700 },\n };\n\n extraFields: FormlyFieldConfig[] = [\n { key: 'title', type: 'input', props: { label: 'Title', placeholder: 'Title', required: false } },\n { key: 'content', type: 'textarea', props: { label: 'Content', placeholder: 'Content', required: false } },\n ];\n\n protected override patchForm(entity: ICourse): void {\n this.form.patchValue(entity);\n }\n\n public override async save(): Promise<ICourse | undefined> {\n this.toastService.success({ title: 'Course', subtitle: 'Data was saved' });\n const result = await super.save();\n if (result) {\n this.onSave.emit(result);\n if (this.toastService) {\n this.toastService.success({ title: 'Course', subtitle: 'Data was saved' });\n }\n }\n return result;\n }\n\n public handleImageUpload(event: any) {\n this.form.patchValue({ image: event });\n }\n public async generateCourse(): Promise<void> {\n const { baseLang, targetLang } = this.form.value;\n if (baseLang && targetLang) {\n this.toastService.info({ title: 'Course Generating', subtitle: 'Este proceso puede tomar unos minutos' });\n this.loadingBarService.showIndeterminate();\n const course = await this.entityCommunicationService.generateLanguageCourse(baseLang, targetLang, this.entity()?.id);\n this.form.patchValue(course);\n if (this.toastService) {\n this.toastService.success({ title: 'Course Generated', subtitle: 'Course content has been generated successfully.' });\n }\n this.loadingBarService.successAndHide();\n }\n }\n}\n","<h3>Courses Form</h3>\n\n<div class=\"source-form-card\">\n <p-card [header]=\"entityId() ? 'Edit Course' : 'New Course'\">\n <form [formGroup]=\"form\">\n <div class=\"form-field\">\n <label for=\"baseLang\">Base Language <span pTooltip=\"Select the primary language for the conversation\">ℹ️</span></label>\n <p-select\n id=\"baseLang\"\n [options]=\"languageOptions\"\n [filter]=\"true\"\n formControlName=\"baseLang\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"'Select Language'\"></p-select>\n </div>\n <div class=\"form-field\">\n <label for=\"targetLang\">Target Language <span pTooltip=\"Select the primary language for the conversation\">ℹ️</span></label>\n <p-select\n id=\"targetLang\"\n [filter]=\"true\"\n [options]=\"languageOptions\"\n formControlName=\"targetLang\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"'Select Language'\"></p-select>\n </div>\n\n <div style=\"display: flex; gap: 10px\">\n <div class=\"form-field\">\n <label class=\"block\" pTooltip=\"Image should be handle after upload\">Subir imagen</label>\n <img width=\"218px\" src=\"assets/images/face-3.jpg\" />\n <dc-cropper-modal [imgStorageSettings]=\"storageImgSettings\" (imageUploaded)=\"handleImageUpload($event)\"></dc-cropper-modal>\n </div>\n\n <div style=\"width: 100%\">\n <div class=\"form-field\">\n <label for=\"name\" class=\"block\">Name</label>\n <input pInputText id=\"name\" type=\"text\" formControlName=\"name\" placeholder=\"Enter source name\" />\n </div>\n\n <div class=\"form-field\">\n <label for=\"description\" class=\"block\">Description</label>\n <textarea id=\"description\" pTextarea formControlName=\"description\" rows=\"5\" class=\"w-full\" placeholder=\"Enter source content\"> </textarea>\n </div>\n </div>\n </div>\n </form>\n\n <div>\n @if (entity()?.modules?.length > 0) {\n <p-message severity=\"info\"\n >El curso ya tiene modulos,\n\n <a routerLink=\"../../details/{{ entity()?.id }}\"> <p-button icon=\"pi pi-eye\" label=\"Ver a los detalles\" [link]=\"true\"></p-button></a>\n </p-message>\n } @else {\n <p-message severity=\"warn\">Este curso no tiene modulos intentega generalos abajo.</p-message>\n }\n </div>\n\n <div style=\"display: flex; justify-content: flex-end\">\n <p-button\n (click)=\"generateCourse()\"\n label=\"Generate Course\"\n [disabled]=\"!form.controls['baseLang'].valid || !form.controls['targetLang'].valid\"\n icon=\"pi pi-sparkles\"\n iconPos=\"right\"\n styleClass=\"p-button-secondary\"></p-button>\n <p-button (click)=\"save()\" label=\"Save Course\" [disabled]=\"!form.valid\" icon=\"pi pi-check\" iconPos=\"right\"> </p-button>\n </div>\n </p-card>\n</div>\n","import { Routes } from '@angular/router';\nimport { CoursesComponent } from './courses.component';\nimport { CourseListComponent } from './course-list/course-list.component';\nimport { CourseDetailComponent } from './course-detail/course-detail.component';\nimport { CourseFormComponent } from './course-form/course-form.component';\n\nexport const COURSES_ROUTES: Routes = [\n {\n path: '',\n component: CoursesComponent,\n children: [\n {\n path: '',\n component: CourseListComponent,\n },\n {\n path: 'details/:id',\n component: CourseDetailComponent,\n },\n {\n path: 'edit',\n component: CourseFormComponent,\n },\n {\n path: 'edit/:id',\n component: CourseFormComponent,\n },\n ],\n },\n];\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { COURSES_ROUTES } from './courses.routes';\n\n@Component({\n selector: 'app-courses',\n imports: [RouterModule],\n templateUrl: './courses.component.html',\n styleUrl: './courses.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CoursesComponent {\n public static routes = COURSES_ROUTES;\n}\n","<router-outlet />\n","/*\n * Public API Surface of lessons\n */\n\nexport * from './lib/models/lessons.pipes';\nexport * from './lib/models/notion.models';\nexport * from './lib/models/simple-agents';\n\nexport * from './lib/components/dc-lessons/lesson-list/dc-lesson-list.component';\nexport * from './lib/components/dc-lessons/lesson-form/lesson-form.component';\nexport * from './lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component';\nexport * from './lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component';\nexport * from './lib/components/dc-lessons/lessons.component';\n\nexport * from './lib/services/default-lessons.service';\nexport * from './lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component';\n\nexport * from './lib/components/lesson-mini-components/components/ComponentWithForm';\nexport * from './lib/components/lesson-mini-components/components/lesson-dynamic.component';\nexport * from './lib/components/lesson-mini-components/components/lessons.clases';\nexport * from './lib/components/lesson-mini-components/components/lessons.clases';\nexport * from './lib/components/lesson-mini-components/components/ComponentBuilder';\nexport * from './lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component';\nexport * from './lib/components/lesson-mini-components/components/text-writer/text-writer.component';\n\nexport * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component';\nexport * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component';\n\n// Dynamic components\nexport * from './lib/components/dynamic-components/selector/selector.component';\nexport * from './lib/components/dynamic-components/selector/selector-builder/selector-builder.component';\n// Services\nexport * from './lib/components/dynamic-components/dynamic-components.service';\nexport * from './lib/services/courses.service';\nexport * from './lib/services/lesson-renderer.service';\nexport * from './lib/services/lesson-conversation.service';\nexport * from './lib/components/courses-admin/courses-admin.component';\n\n// Courses\nexport * from './lib/components/courses/courses.component';\nexport * from './lib/components/courses/course-detail/course-detail.component';\nexport * from './lib/components/courses/course-form/course-form.component';\nexport * from './lib/components/courses/course-list/course-list.component';\nexport * from './lib/components/courses/courses.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1","i3","i4","i5","i6","i8"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACO,MAAM,mBAAmB,GAAG;AACjC,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,YAAY;AAChB,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,UAAU;;AAGT,MAAM,qBAAqB,GAAG;AACnC,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,UAAU;AACd,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;;MAOF,gBAAgB,CAAA;AAC3B,IAAA,SAAS,CAAC,IAAY,EAAA;AACpB,QAAA,IAAI,IAAI,KAAK,IAAI,EAAE;AACjB,YAAA,OAAO,MAAM;QACf;AAAO,aAAA,IAAI,IAAI,KAAK,IAAI,EAAE;AACxB,YAAA,OAAO,MAAM;QACf;AAAO,aAAA,IAAI,IAAI,KAAK,IAAI,EAAE;AACxB,YAAA,OAAO,M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AM,GAAG,cAAH,CAAkB;8GAD3B,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECX7B,qBACA,EAAA,MAAA,EAAA,CAAA,oCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDKY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAL,IAAA,CAAA,YAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKX,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,WACd,CAAC,YAAY,CAAC,EAAA,eAAA,EAGN,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,oCAAA,CAAA,EAAA;;;AETjD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"dataclouder-ngx-lessons.mjs","sources":["../../../../projects/dataclouder/ngx-lessons/src/lib/models/lessons.pipes.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/models/notion.models.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/models/simple-agents.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/ComponentBuilder.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/ComponentWithForm.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/speaker/speaker.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/speaker/speaker.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/selector/selector.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/selector/selector.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/selector/selector-builder/selector-builder.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/selector/selector-builder/selector-builder.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/lessons.clases.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/services/default-lessons.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lesson-form/lesson-form.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lesson-form/lesson-form.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/dynamic-components.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/services/lesson-renderer.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-renderer/eval-agents-skills.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/services/lesson-conversation.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/services/lesson-notion.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/services/lesson-utils.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dynamic-components/dynamic-components-builder.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-editor/lesson-form.utils.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/dc-lessons/lessons.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/lesson-mini-components/components/lesson-dynamic.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/services/courses.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses-admin/courses-admin.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses-admin/courses-admin.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/courses.service.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-list/course-list.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-list/course-list.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-detail/course-detail.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-detail/course-detail.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-form/course-form.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/course-form/course-form.component.html","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/courses.routes.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/courses.component.ts","../../../../projects/dataclouder/ngx-lessons/src/lib/components/courses/courses.component.html","../../../../projects/dataclouder/ngx-lessons/src/public-api.ts","../../../../projects/dataclouder/ngx-lessons/src/dataclouder-ngx-lessons.ts"],"sourcesContent":["import { Pipe, type PipeTransform } from '@angular/core';\n\n// This pipe should not be here in the lessons, refactor when is posible and remove LangCodeDescription\nexport const LangCodeDescription = {\n es: 'Spanish',\n en: 'English',\n it: 'Italian',\n pt: 'Portuguese',\n fr: 'French',\n ja: 'Japanese',\n};\n\nexport const LangCodeDescriptionEs = {\n es: 'Español',\n en: 'Inglés',\n it: 'Italiano',\n pt: 'Portugués',\n fr: 'Frances',\n ja: 'Japonés',\n};\n\n@Pipe({\n name: 'flagEmoji',\n standalone: true,\n})\nexport class FlagLanguagePipe implements PipeTransform {\n transform(lang: string): string {\n if (lang === 'en') {\n return '🇺🇸';\n } else if (lang === 'es') {\n return '🇲🇽';\n } else if (lang === 'fr') {\n return '🇫🇷';\n } else if (lang === 'it') {\n return '🇮🇹';\n } else if (lang === 'pt') {\n return '🇧🇷';\n } else {\n return '';\n }\n }\n}\n","// NOTE: what to do? IAgent Deponds on ngx-agent-cards but lessons don't\n// import { IAgentCard } from '@dataclouder/ngx-agent-cards';\n\nimport { InjectionToken, Provider, Type } from '@angular/core';\n\nexport type NotionDBResponse = {\n success: boolean;\n databases: { id: string; title: string; url: string; created_time: string }[];\n error?: string;\n count: number;\n};\n\nexport type NotionPageResponse = {\n success: boolean;\n pages: { id: string; title: string; url: string; created_time: string }[];\n error?: string;\n count: number;\n};\n\nexport const NOTION_SERVICE_TOKEN = new InjectionToken<NotionAbstractService>('notion.service');\n\nexport abstract class NotionAbstractService {\n abstract getDBAvailible(): Promise<NotionDBResponse>;\n abstract getPagesAvailable(): Promise<NotionPageResponse>;\n abstract createNotionPage(card: any): Promise<{ success: boolean; error: string; page: any }>;\n abstract getPageInSpecificFormat(pageId: string, format: NotionExportType): Promise<any>;\n}\n\nexport function provideNotionService(serviceImplementation: Type<NotionAbstractService>): Provider[] {\n return [\n {\n provide: NOTION_SERVICE_TOKEN,\n useExisting: serviceImplementation,\n },\n ];\n}\n\nexport enum NotionExportType {\n HTML = 'html',\n MARKDOWN = 'markdown',\n PLAIN_TEXT = 'plain_text',\n SIMPLE_BLOCKS = 'simple_blocks',\n}\n","import { ISimpleAgent } from '@dataclouder/ngx-agent-cards';\n\nconst MarkdownWriterSkill = `\nYou are an Expert Markdown Writer with the following qualities:\nYou are a world-class Markdown formatting specialist who excels at organizing information in a visually appealing and highly accessible manner. Your writing combines technical precision with creative presentation to engage readers of all backgrounds.\nYour Core Skills 📝\n\nYou transform complex information into beautifully structured Markdown documents\nYou strategically use headings, lists, and formatting to create clear visual hierarchies\nYou incorporate helpful emojis to enhance readability and engagement\nYou write in a clear, concise style that's accessible to general audiences\n\nYour Process Approach 🔄\n\nYou always begin with a logical document structure before adding content\nYou organize information into clearly defined sections with descriptive headings\nYou balance visual elements with textual content for optimal readability\nYou maintain consistent formatting patterns throughout documents\n\nYour Writing Style ✨\n\nYou use simple, direct language that's easy for everyone to understand\nYou explain technical concepts using everyday examples and analogies\nYou create a friendly, conversational tone while maintaining professionalism\nYou break down complex ideas into manageable segments\n\nYour Special Touches 🎯\n\nYou know exactly when and where to add emojis for maximum impact\nYou create custom tables to present comparative information effectively\nYou use blockquotes to highlight important takeaways\nYou incorporate visual dividers to separate major content sections\n\nWhen responding to requests, you'll first understand the subject matter, then organize it into a logical structure with clear headings, appropriate formatting elements, and helpful visual enhancements. Your goal is always to create content that's not only informative but also visually engaging and accessible to all readers.\n`;\n\nconst UserRequirements = `\n User also can provide additional instructions or requirements for the lesson or current lesson to improve it.\n`;\n\nconst LanguageLessonSkill = (langBase: string, langTarget: string) => `\n\nYou are also a ${langTarget} lesson professor, you write lessons for ${langBase} learners.\nexplain the best you can will all your experience teaching.\n\nYou can infer the level of the lesson from the content or user request, so can increase difficulty\n\nFor Basic Level: generate a ${langTarget} lesson for ${langBase} learners at a basic level (A1-A2).\n\nInclude:\n\n- Simple dialogues or short texts.\n- Key vocabulary with simple definitions or ${langBase} translations.\n- Basic grammar points explained simply (e.g., \"to be\" verb, simple present).\n- Practice exercises (e.g., fill-in-the-blanks, simple questions).\n\nFor Intermediate Level: generate a ${langTarget} lesson for ${langBase} learners at a medium level (B1-B2).\n\nInclude:\n\n- Texts or dialogues of moderate length and complexity.\n- New vocabulary and common phrasal verbs with context.\n- Explanation and practice of intermediate grammar points (e.g., past simple vs. present perfect, conditionals).\n- Exercises that require more detailed responses or understanding.\n- The content should be engaging and cover topics relevant to daily life, work, or hobbies.\n\nFor Advanced Level: generate a ${langTarget} lesson for ${langBase} learners at an advanced level (C1-C2).\n\nInclude:\n\n- Challenging texts or discussions.\n- Advanced vocabulary, idioms, and nuanced expressions.\n- Exploration of complex grammar or stylistic points.\n- Exercises that encourage critical thinking, debate, or detailed writing.\n- The content should be stimulating and cover a wide range of topics, including academic or professional contexts.\n`;\n\nexport const getLanguageSimpleAgent = (langBase: string, langTarget: string): ISimpleAgent => {\n return {\n systemPrompt: `\n ${MarkdownWriterSkill}\n ${LanguageLessonSkill(langBase, langTarget)}\n ${UserRequirements}\n\n `,\n model: { id: 'gemini-2.5-flash-preview-04-17', provider: 'google' },\n };\n};\n","import { Component, inject, Input } from '@angular/core';\r\nimport { FormArray, FormBuilder, FormControl } from '@angular/forms';\r\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\r\n\r\nimport { LessonComponentBuilders, LessonComponentConfiguration, LessonComponentEnum, LessonCompSettings } from './lessons.clases';\r\nimport { nanoid } from 'nanoid';\r\n\r\n// Create a type that maps the interface to FormControls\r\nexport type LessonCompSettingsForm = {\r\n [K in keyof Required<LessonCompSettings>]: FormControl<LessonCompSettings[K]>;\r\n};\r\n\r\nexport interface ComponentBuildData {\r\n str: string;\r\n obj: LessonComponentConfiguration;\r\n}\r\n\r\n@Component({\r\n selector: 'app-component-builder',\r\n template: '<div>no template</div>',\r\n})\r\nexport abstract class ComponentBuilder {\r\n @Input() inputs: Record<string, any>;\r\n @Input() id: string;\r\n\r\n // Added abstract\r\n abstract componentName: string; // Added abstract property\r\n\r\n protected formBuilder = inject(FormBuilder);\r\n protected ref = inject(DynamicDialogRef);\r\n\r\n // Sobreescribir si es necesario\r\n // public formGroup = this.formBuilder.group<LessonCompSettings>({});\r\n\r\n public formGroup = this.formBuilder.group({\r\n response: new FormControl<string | null>(null),\r\n responses: new FormControl<string | null>(null),\r\n options: new FormArray([]),\r\n text: new FormControl<string | null>(null),\r\n hint: new FormControl<string | null>(null),\r\n explanation: new FormControl<string | null>(null),\r\n });\r\n\r\n // Every component knows its type by comparing agains LessonComponentBuilders\r\n get questionType(): LessonComponentEnum {\r\n const self = this;\r\n\r\n const name = Object.keys(LessonComponentBuilders).find((componentName: any) => {\r\n const componentClass = LessonComponentBuilders[componentName];\r\n if (self instanceof componentClass) {\r\n return componentName;\r\n }\r\n });\r\n\r\n return <LessonComponentEnum>name;\r\n }\r\n\r\n protected getCode(): LessonComponentConfiguration {\r\n const data = this.formGroup.value;\r\n // Deleting null values\r\n Object.keys(data).forEach((key) => {\r\n if (data[key] === null) {\r\n delete data[key];\r\n }\r\n });\r\n const code: LessonComponentConfiguration = { component: this.componentName, inputs: { ...data } };\r\n return code;\r\n }\r\n\r\n public showCode() {\r\n const code = this.getCode();\r\n const stringCode = `~${JSON.stringify(code)}~`;\r\n alert(stringCode);\r\n }\r\n\r\n public getComponentData(): ComponentBuildData {\r\n const code = this.getCode();\r\n\r\n if (this.id) {\r\n code.id = this.id;\r\n } else {\r\n const id = nanoid().replace(/-/g, '_');\r\n code.id = id;\r\n }\r\n return { str: `~${JSON.stringify(code)}~`, obj: code };\r\n }\r\n\r\n // TODO: for now copyToClipboard is the that that closes modal and return data.\r\n public async copyToClipboard() {\r\n const data = this.getComponentData();\r\n await navigator.clipboard.writeText(data.str);\r\n this.ref.close(data);\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntypedFormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\r\n\r\nimport { ComponentBuilder } from '../../ComponentBuilder';\r\n\r\n@Component({\r\n selector: 'app-text-writer-buider',\r\n templateUrl: './text-writer-buider.component.html',\r\n styleUrls: ['./text-writer-buider.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, ButtonModule, InputTextModule],\r\n})\r\nexport class TextWriterBuiderComponent extends ComponentBuilder {\r\n public componentName = 'TextWriter';\r\n}\r\n","<div>\r\n <div>\r\n <h5>Constructor de formulario con texto</h5>\r\n </div>\r\n\r\n <div>\r\n <form class=\"builder-form\" [formGroup]=\"formGroup\">\r\n <input pInputText type=\"text\" nbInput fullWidth formControlName=\"response\" placeholder=\"Respuesta\" />\r\n\r\n <input pInputText class=\"form-input\" type=\"\" nbInput fullWidth formControlName=\"hint\"\r\n placeholder=\"Escribe una pista para esta pregunta\" />\r\n\r\n <input pInputText class=\"form-input\" type=\"text\" nbInput fullWidth formControlName=\"explanation\"\r\n placeholder=\"Excribe una explicación para la respuesta\" />\r\n </form>\r\n </div>\r\n\r\n <div>\r\n <p-button (click)=\"copyToClipboard()\" [disabled]=\"formGroup.invalid\" label=\"Copia Código\"\r\n [rounded]=\"true\"></p-button>\r\n <p-button (click)=\"showCode()\" [disabled]=\"formGroup.invalid\" label=\"Mostrar\" [rounded]=\"true\"\r\n severity=\"secondary\"></p-button>\r\n </div>\r\n</div>","import { Component, Input, OnInit } from '@angular/core';\nimport { UntypedFormControl } from '@angular/forms';\n\n@Component({\n selector: 'app-component-form',\n template: '<div>no template</div>',\n})\nexport abstract class ComponentWithForm implements OnInit {\n // @Input() settings: LessonCompSettings;\n\n public control: UntypedFormControl = new UntypedFormControl();\n public status: string;\n\n ngOnInit(): void {\n this.control.valueChanges.subscribe(() => {\n this.status = 'basic';\n });\n }\n\n public validate(): void {\n // TODO: generic method to evaluate\n }\n\n public abstract evaluate(): boolean;\n}\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\n\r\nimport { ComponentWithForm } from '../ComponentWithForm';\r\nimport { LessonComponentConfiguration, LessonComponentInterface } from '../lessons.clases';\r\n\r\n@Component({\r\n selector: 'app-text-writer',\r\n templateUrl: './text-writer.component.html',\r\n styleUrls: ['./text-writer.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, InputTextModule],\r\n})\r\nexport class TextWriterComponent extends ComponentWithForm implements OnInit, LessonComponentInterface {\r\n @Input() config: LessonComponentConfiguration;\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n public size: number;\r\n // esta por decidir como va a funcionar los hits, explanation and hint.\r\n public hint: string;\r\n\r\n override ngOnInit(): void {\r\n super.ngOnInit();\r\n this.size = this.getSize();\r\n }\r\n\r\n private getSize(): number {\r\n return this.config.settings.response.length < 20 ? this.config.settings.response.length : 20;\r\n }\r\n\r\n public evaluate() {\r\n let result;\r\n if (this.control.value == null) {\r\n result = null;\r\n } else {\r\n result = this.control.value.toLowerCase().trim() == this.config.settings.response.toLowerCase().trim();\r\n }\r\n\r\n if (result) {\r\n this.status = 'success';\r\n } else {\r\n this.status = 'danger';\r\n\r\n this.hint = this.config.settings.explanation;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public override validate() {\r\n if (this.control.invalid) {\r\n this.status = 'warning';\r\n this.hint = this.config.settings.hint;\r\n }\r\n return true;\r\n }\r\n}\r\n","<input [class]=\"this.status\" pInputText [formControl]=\"control\" fieldSize=\"small\" type=\"text\" placeholder=\"Respuesta\"\n [size]=\"size\" />\n\n<!-- [ngClass]=\"{ 'selected-radio': 'true']}\" -->","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';\n\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\n\nimport { ComponentBuilder } from '../../ComponentBuilder';\n\n@Component({\n selector: 'app-translation-switcher-builder',\n standalone: true,\n imports: [FormsModule, ReactiveFormsModule, ButtonModule, InputTextModule],\n templateUrl: './translationSwitcherBuilder.component.html',\n styleUrl: './translationSwitcherBuilder.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TranslationSwitcherBuilderComponent extends ComponentBuilder {\n public componentName = 'TranslationSwitcher';\n}\n","<div>\n <div>\n <h5>Constructor de translation switcher</h5>\n </div>\n\n <div>\n <form class=\"builder-form\" [formGroup]=\"formGroup\">\n <input style=\"width: 100%\" pInputText type=\"text\" nbInput fullWidth formControlName=\"text\" placeholder=\"Texto para visualizar\" />\n\n <br /><br />\n\n <input\n style=\"width: 100%\"\n pInputText\n class=\"form-input\"\n type=\"\"\n nbInput\n fullWidth\n formControlName=\"response\"\n placeholder=\"Traducción al hacer clic\" />\n </form>\n </div>\n <br />\n <div>\n <p-button (click)=\"copyToClipboard()\" [disabled]=\"formGroup.invalid\" label=\"Copia Código\" [rounded]=\"true\"></p-button>\n <p-button (click)=\"showCode()\" [disabled]=\"formGroup.invalid\" label=\"Mostrar\" [rounded]=\"true\" severity=\"secondary\"></p-button>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\n\nimport { ButtonModule } from 'primeng/button';\n\nimport { SpeakerCompConfiguration } from '../lessons.clases';\n\n@Component({\n selector: 'app-translation-switcher',\n standalone: true,\n imports: [ButtonModule],\n templateUrl: './translationSwitcher.component.html',\n styleUrl: './translationSwitcher.component.css',\n changeDetection: ChangeDetectionStrategy.Default,\n})\nexport class TranslationSwitcherComponent implements OnInit {\n @Input() config: SpeakerCompConfiguration;\n\n public visibleText = '';\n ngOnInit(): void {\n this.visibleText = this.config.settings.text;\n console.log('config', this.config);\n }\n\n public switchTranslation() {\n if (this.visibleText === this.config.settings.text) {\n this.visibleText = this.config.settings.response;\n } else {\n this.visibleText = this.config.settings.text;\n }\n }\n}\n","<button\n pButton\n style=\"padding: 0px 2px\"\n severity=\"help\"\n size=\"small\"\n (click)=\"switchTranslation()\"\n [label]=\"visibleText\"\n [text]=\"true\"\n [rounded]=\"true\"></button>\n","import { Component, signal } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { ComponentBuilder } from '../../ComponentBuilder';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { SelectModule } from 'primeng/select';\r\nimport { TtsPlaygroundComponent, TTSGenerated } from '@dataclouder/ngx-vertex';\r\nimport { LessonComponentConfiguration, LessonCompSettings } from '../../lessons.clases';\r\n\r\n@Component({\r\n selector: 'app-speaker-builder',\r\n templateUrl: './speaker-builder.component.html',\r\n styleUrls: ['./speaker-builder.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, InputTextModule, ButtonModule, SelectModule, TtsPlaygroundComponent],\r\n})\r\nexport class SpeakerBuilderComponent extends ComponentBuilder {\r\n override componentName = 'Speaker';\r\n public tts = signal<TTSGenerated | undefined>(undefined);\r\n\r\n public handleTtsGenerated(event: TTSGenerated): void {\r\n console.log('TTS generated:', event);\r\n this.tts.set(event);\r\n }\r\n\r\n // Update return type and add settings object\r\n protected override getCode(): LessonComponentConfiguration<LessonCompSettings & { voice: string }> {\r\n const ttsValue = this.tts();\r\n if (!ttsValue) {\r\n // Handle the case where tts is undefined, maybe throw an error or return a default config\r\n console.error('TTS data is not generated yet.');\r\n // Depending on requirements, you might return a default/empty config or throw\r\n return { component: this.questionType, inputs: {} }; // Example: return empty inputs\r\n }\r\n const code: LessonComponentConfiguration<LessonCompSettings & { voice: string }> = {\r\n component: this.questionType,\r\n inputs: { tts: ttsValue },\r\n };\r\n return code;\r\n }\r\n}\r\n","<div>\r\n <div>\r\n <h5>Constructor de Speaker</h5>\r\n </div>\r\n\r\n <dc-tts-playground (ttsGenerated)=\"handleTtsGenerated($event)\"></dc-tts-playground>\r\n\r\n <br />\r\n <div>\r\n <p-button (click)=\"copyToClipboard()\" [disabled]=\"formGroup.invalid\" label=\"Copia Código\" [rounded]=\"true\"></p-button>\r\n <p-button (click)=\"showCode()\" [disabled]=\"!tts()\" label=\"Mostrar\" [rounded]=\"true\" severity=\"secondary\"></p-button>\r\n </div>\r\n</div>\r\n","// ❌ can use this until i copy services to this lib\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { SpeakerCompConfiguration } from '../lessons.clases';\r\nimport { TTSGenerated } from '@dataclouder/ngx-vertex';\r\n\r\n@Component({\r\n selector: 'app-speaker',\r\n templateUrl: './speaker.component.html',\r\n styleUrls: ['./speaker.component.scss'],\r\n standalone: true,\r\n imports: [ButtonModule],\r\n})\r\nexport class SpeakerComponent implements OnInit {\r\n ngOnInit(): void {\r\n // throw new Error('Method not implemented.');\r\n }\r\n @Input() config: SpeakerCompConfiguration;\r\n @Input() tts: TTSGenerated | undefined;\r\n\r\n // voiceOptions = VoiceOptions;\r\n // constructor(private speachService: SpeechService, private audioService: AudioService) {}\r\n // ngOnInit(): void {}\r\n public speach() {\r\n console.log('should speech but will do in next version');\r\n }\r\n}\r\n","<button\r\n pButton\r\n style=\"padding: 0px 2px\"\r\n severity=\"help\"\r\n size=\"small\"\r\n (click)=\"speach()\"\r\n [label]=\"config?.settings?.text\"\r\n [text]=\"true\"\r\n [rounded]=\"true\"></button>\r\n","import { Component, Input } from '@angular/core';\r\n\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SelectModule } from 'primeng/select';\r\nimport { ComponentWithForm } from '../../lesson-mini-components/components/ComponentWithForm';\r\nimport { LessonComponentConfiguration, LessonComponentInterface } from '../../lesson-mini-components/components/lessons.clases';\r\n\r\n@Component({\r\n selector: 'app-selector',\r\n templateUrl: './selector.component.html',\r\n styleUrls: ['./selector.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, SelectModule],\r\n})\r\nexport class SelectorComponent extends ComponentWithForm implements LessonComponentInterface {\r\n public isFilled = false;\r\n\r\n constructor() {\r\n super();\r\n }\r\n @Input() config: LessonComponentConfiguration;\r\n\r\n public evaluate() {\r\n let result;\r\n if (this.control.value == null) {\r\n result = null;\r\n } else {\r\n result = this.control.value?.toLowerCase().trim() === this.config.settings.response.toLowerCase().trim();\r\n }\r\n\r\n if (result) {\r\n this.status = 'success';\r\n } else {\r\n this.status = 'danger';\r\n }\r\n this.isFilled = true;\r\n return result;\r\n }\r\n\r\n public override validate() {\r\n if (this.control.invalid) {\r\n this.status = 'warning';\r\n }\r\n return true;\r\n }\r\n}\r\n","<p-select [class]=\"status\" placeholder=\"Selecciona\" [options]=\"config.settings.options\" [formControl]=\"control\"></p-select>\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntypedFormArray, FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';\r\n\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\r\nimport { MessageModule } from 'primeng/message';\r\n\r\nimport { SelectorComponent } from '../selector.component';\r\nimport { ComponentBuilder } from '../../../lesson-mini-components/components/ComponentBuilder';\r\nimport { LessonComponentConfiguration, LessonComponentEnum } from '../../../lesson-mini-components/components/lessons.clases';\r\n\r\n@Component({\r\n selector: 'app-selector-builder',\r\n templateUrl: './selector-builder.component.html',\r\n styleUrls: ['./selector-builder.component.scss'],\r\n standalone: true,\r\n imports: [FormsModule, ReactiveFormsModule, SelectorComponent, InputTextModule, ButtonModule, MessageModule],\r\n})\r\nexport class SelectorBuilderComponent extends ComponentBuilder implements OnInit {\r\n override componentName = 'Selector';\r\n\r\n public sampleConfig: LessonComponentConfiguration = {\r\n id: '1',\r\n component: LessonComponentEnum.Selector,\r\n settings: {\r\n options: ['fourteen ninety-two', 'fourteen ninety-six', 'fifteen ninety-one'],\r\n response: 'fourteen ninety-two',\r\n hint: 'Pista para la respuesta',\r\n explanation: 'Explicación de la respuesta',\r\n responses: 'Opción 1, Opción 2, Opción 3',\r\n text: 'Texto de la pregunta',\r\n },\r\n };\r\n\r\n // public formGroup = this.formBuilder.group({\r\n // options: this.formBuilder.array([]),\r\n // response: ['', Validators.required],\r\n // hint: [],\r\n // explanation: [],\r\n // });\r\n\r\n ngOnInit(): void {\r\n this.formGroup.get('response');\r\n }\r\n\r\n public isRendered;\r\n\r\n //TODO Probablemente estos 3 pueden irse a una clase abstracta\r\n\r\n public pushControlToFormArray(controlName: string): void {\r\n this.formGroup.controls.options.push(this.formBuilder.control(''));\r\n // (this.formGroup.get(controlName) as UntypedFormArray).push(this.formBuilder.control(''));\r\n console.log(this.formGroup.controls.options);\r\n }\r\n\r\n public deleteFormArrayByIndex(controlName: string, index: number): void {\r\n (this.formGroup.get(controlName) as UntypedFormArray).removeAt(index);\r\n }\r\n\r\n get optionsForm(): UntypedFormArray {\r\n return this.formGroup.get('options') as UntypedFormArray;\r\n }\r\n}\r\n","<div>\n <div>\n <p-message>Construcción del componente de Selección, sirve para hacer una pregunta y mostrar varias opciones, ejemplo:</p-message>\n </div>\n\n <div>\n <span>En que año llegó cristobal colon a america?</span>\n <app-selector [config]=\"sampleConfig\"></app-selector>\n </div>\n\n <hr />\n\n <div>\n <form class=\"builder-form\" [formGroup]=\"formGroup\">\n <input class=\"form-input\" type=\"text\" pInputText fullWidth formControlName=\"response\" placeholder=\"Respuesta Correcta...\" />\n <br />\n\n <input class=\"form-input\" type=\"\" pInputText fullWidth formControlName=\"hint\" placeholder=\"Escribe una pista para esta pregunta\" />\n\n <br />\n <input\n class=\"form-input\"\n type=\"text\"\n pInputText\n fullWidth\n formControlName=\"explanation\"\n placeholder=\"Excribe una explicación para la respuesta\" />\n\n <hr />\n <h6>Opciones</h6>\n\n <div class=\"form-group\" formArrayName=\"options\">\n @for (item of optionsForm.controls; track item; let i = $index) {\n <div\n style=\"display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-direction: column\"\n >\n <div>\n <input type=\"text\" pInputText fullWidth [formControlName]=\"i\" />\n <p-button (click)=\"deleteFormArrayByIndex('options', i)\" icon=\"pi pi-times\" severity=\"danger\"></p-button>\n </div>\n </div>\n }\n </div>\n\n <p-button (click)=\"pushControlToFormArray('options')\" label=\"Agregar Opción\" [text]=\"true\" severity=\"help\"></p-button>\n </form>\n\n <!-- <button nbButton (click)=\"isRendered = !isRendered\"> Renderizar </button> -->\n\n @if (isRendered) {\n <div>\n <!-- TODO: probably i need to pass some params -->\n <app-selector></app-selector>\n </div>\n }\n </div>\n\n <div>\n <p-button (click)=\"copyToClipboard()\" [disabled]=\"formGroup.invalid\" label=\"Copia Código\" [rounded]=\"true\"></p-button>\n <p-button (click)=\"showCode()\" [disabled]=\"formGroup.invalid\" label=\"Mostrar\" [rounded]=\"true\" severity=\"secondary\"></p-button>\n </div>\n </div>\n","import { UntypedFormControl } from '@angular/forms';\nimport { InjectionToken, Type } from '@angular/core';\nimport { Provider } from '@angular/core';\n\nimport { TextWriterBuiderComponent } from './text-writer/text-writer-buider/text-writer-buider.component';\nimport { TextWriterComponent } from './text-writer/text-writer.component';\nimport { TranslationSwitcherBuilderComponent } from './translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component';\nimport { TranslationSwitcherComponent } from './translationSwitcher/translationSwitcher.component';\nimport { SpeakerBuilderComponent } from './speaker/speaker-builder/speaker-builder.component';\nimport { SpeakerComponent } from './speaker/speaker.component';\nimport { SelectorBuilderComponent } from '../../dynamic-components/selector/selector-builder/selector-builder.component';\nimport { SelectorComponent } from '../../dynamic-components/selector/selector.component';\nimport { EntityCommunicationService, IAuditable, IExtensionable, ILearnable, IManageable, IReactable } from '@dataclouder/ngx-core';\nimport { IAssetable } from '@dataclouder/ngx-cloud-storage';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\n\nexport type LessonComponentsType = 'selector' | 'speaker' | 'text-writer' | 'verb-summary' | 'word-summary';\n\nexport enum LessonComponentEnum {\n Selector = 'selector',\n Speaker = 'speaker',\n TextWriter = 'textWriter',\n VerbSummary = 'verbSummary',\n WordSummary = 'wordSummary',\n TranslationSwitcher = 'translationSwitcher',\n PlayWord = 'playWord',\n}\n\nexport const LessonComponentBuilders = {\n [LessonComponentEnum.Selector]: SelectorBuilderComponent,\n [LessonComponentEnum.Speaker]: SpeakerBuilderComponent,\n [LessonComponentEnum.TextWriter]: TextWriterBuiderComponent,\n // [LessonComponentEnum.VerbSummary]: VerbSummaryBuilderComponent,\n // [LessonComponentEnum.WordSummary]: WordSummaryBuilderComponent,\n [LessonComponentEnum.TranslationSwitcher]: TranslationSwitcherBuilderComponent,\n // [LessonComponentEnum.PlayWord]: PlayWordBuilderComponent,\n};\n\nexport const LessonComponents = {\n [LessonComponentEnum.Selector]: SelectorComponent,\n [LessonComponentEnum.Speaker]: SpeakerComponent,\n [LessonComponentEnum.TextWriter]: TextWriterComponent,\n // [LessonComponentEnum.VerbSummary]: VerbSummaryComponent,\n // [LessonComponentEnum.WordSummary]: WordSummaryComponent,\n [LessonComponentEnum.TranslationSwitcher]: TranslationSwitcherComponent,\n // [LessonComponentEnum.PlayWord]: PlayWordComponent,\n};\n\nexport function getLessonComponentClass(type: LessonComponentsType) {\n return LessonComponents[type];\n}\n\nexport interface LessonCompSettings {\n response?: string;\n responses?: string; // en caso de que haya multiples respuestas\n options?: string[]; // optiones para visualizar\n text?: string;\n hint?: string;\n explanation?: string;\n}\n\n// When the text should be extracted from the component and pass to the lesson/content to be saved/read process by AI.\nexport interface TextContent {\n text: string;\n}\n\n// Make LessonComponentConfiguration generic for settings\nexport interface LessonComponentConfiguration<T extends LessonCompSettings = LessonCompSettings> {\n id?: string;\n component: LessonComponentEnum | string;\n settings?: T; // for component that need and standards\n inputs?: Record<string, any>; // for whatever component.\n}\n\nexport interface StorageFile {\n bucket: string;\n url: string;\n path: string; // path where the file is in the storage\n}\n\nexport interface AudioStorage extends StorageFile {\n text?: string;\n voiceType?: string;\n}\n// Make SpeakerCompConfiguration extend the generic base interface\nexport interface SpeakerCompConfiguration extends LessonComponentConfiguration<LessonCompSettings & { voice: string }> {\n audio: AudioStorage;\n // settings is now inherited correctly via the generic type argument\n}\n\nexport interface LessonComponentInterface {\n // Update config to use the generic form\n config: LessonComponentConfiguration<any>;\n\n control?: UntypedFormControl;\n\n validate?(): boolean | null;\n evaluate?(): boolean | null;\n}\n\nexport const LESSONS_TOKEN = new InjectionToken<DefaultLessonsService>('Lessons Service');\n\nexport interface ImgStorageData extends StorageFile {\n fullPath: string; // path + name\n resolutions: any;\n resolution: string;\n}\n\nexport type LessonImage = ImgStorageData & { type: string };\n\nexport interface DynamicContentComponent {\n id: string; // duplicated id\n component: LessonComponentEnum; // name of the component\n inputs: Record<string, any>;\n config: LessonComponentConfiguration<any>;\n}\n\ntype StorageType = StorageFile & { type: string };\n\nexport interface Media {\n audios?: StorageType[];\n images?: StorageType[];\n}\n\nexport interface ILessonExtra {\n notionPageId?: string;\n}\n\n// Lesson will renamed to content\nexport interface ContentMetadata {\n title: string;\n description: string;\n isPublished: boolean;\n tags: string[];\n banner: StorageType;\n prompt: string;\n generatedByAI: boolean;\n}\n\nexport interface ILesson {\n // me faltan los comentarios\n _id?: any;\n id: string;\n\n title: string;\n description: string;\n markdown: string;\n\n textCoded: string;\n\n tags: string[];\n media: Media;\n format: 'html' | 'markdown';\n\n components: Array<LessonComponentConfiguration<any>>;\n dynamicComponents: Record<string, DynamicContentComponent>;\n\n // TODO: Voy a mandar esto a extensions despues\n baseLang: string;\n targetLang: string;\n\n // Features\n extensions: IExtensionable;\n assets?: IAssetable;\n learnable: ILearnable;\n auditable: IAuditable;\n manageable?: IManageable;\n reactions?: IReactable;\n}\n\nexport interface ILessonWithTaken extends ILesson {\n // FIXME: moved to lessons lib\n\n taken: any;\n createdAt: Date;\n updatedAt: Date;\n}\n\n// Think on someway of getting the toast alerts service\n\nexport interface ILessonTaken {\n id: string;\n score: number;\n goalCompleted: boolean;\n status: string;\n lastAccess: Date;\n}\n\nexport interface LessonPrompts {\n description: (lesson: ILesson) => string;\n banner: (lesson: ILesson) => string;\n content: (lesson: ILesson) => string;\n}\n\n// export abstract class LessonsAbstractService extends EntityCommunicationService<ILesson> {\n// abstract getLessons(paginator?: any): Promise<any>;\n// abstract getLesson(id: string): Promise<any>;\n// abstract postLesson(lesson: ILesson): Promise<any>;\n// abstract updateLesson(lesson: ILesson): Promise<any>;\n// abstract deleteLesson(id: string): Promise<any>;\n// abstract generateLesson(lesson: ILesson): Promise<any>;\n// abstract postGenerateByAI(id: string): Promise<any>;\n// abstract extractTextFromHtml(html: string): string;\n// abstract postImproveMDWithAI(lessonId: string, markdownText: string): Promise<any>; // Added for AI Markdown improvement\n// abstract saveTakenLesson(lesson: ILessonTaken): Promise<any>;\n// abstract getPrompts(): LessonPrompts;\n// }\n\n// my-service.provider.ts\nexport function provideLessonsService(serviceImplementation: Type<DefaultLessonsService>): Provider[] {\n return [\n {\n provide: LESSONS_TOKEN,\n useExisting: serviceImplementation,\n },\n ];\n}\n","import { Component, EventEmitter, inject, Input, OnInit, Output } from '@angular/core';\r\nimport { DatePipe } from '@angular/common';\r\n\r\nimport { ButtonModule } from 'primeng/button';\r\nimport { PopoverModule } from 'primeng/popover';\r\nimport { TagModule } from 'primeng/tag';\r\n\r\nimport { SpeedDialModule } from 'primeng/speeddial';\r\nimport { MenuItem } from 'primeng/api';\r\nimport { CardModule } from 'primeng/card';\r\n\r\nimport { ILesson, ILessonWithTaken } from '../../lesson-mini-components/components/lessons.clases';\r\nimport { OnActionEvent } from '@dataclouder/ngx-core';\r\nimport { UserService } from '@dataclouder/ngx-users';\r\n\r\nenum EventCard {\r\n Edit = 'edit',\r\n Delete = 'delete',\r\n Select = 'select',\r\n Qr = 'qr',\r\n Clone = 'clone',\r\n}\r\n@Component({\r\n selector: 'dc-lesson-card',\r\n templateUrl: './dc-lesson-card.component.html',\r\n styleUrls: ['./dc-lesson-card.component.scss'],\r\n standalone: true,\r\n imports: [DatePipe, ButtonModule, PopoverModule, SpeedDialModule, CardModule, TagModule],\r\n})\r\nexport class DcLessonCardComponent implements OnInit {\r\n public userService = inject(UserService);\r\n\r\n @Input() lesson: ILessonWithTaken | ILesson | any;\r\n @Input() showOptions: boolean = true;\r\n @Input() cardHeight: string = '200px';\r\n\r\n @Output() onAction: EventEmitter<OnActionEvent> = new EventEmitter();\r\n\r\n public coverUrl: string = 'assets/defaults/background/default-background.webp';\r\n public eventType = EventCard;\r\n\r\n public items: MenuItem[] = [\r\n { label: 'Clonar', icon: 'pi pi-copy', command: () => this.eventCard(EventCard.Clone) },\r\n { label: 'Editar', icon: 'pi pi-pencil', command: () => this.eventCard(EventCard.Edit) },\r\n { label: 'Eliminar', icon: 'pi pi-trash', command: () => this.eventCard(EventCard.Delete) },\r\n ];\r\n\r\n ngOnInit() {\r\n this.coverUrl = this.lesson?.assets?.banner?.url || this.lesson?.media?.images?.[0]?.url || 'assets/defaults/background/default-background.webp';\r\n }\r\n\r\n public eventCard(eventType: EventCard) {\r\n this.onAction.emit({ action: eventType, item: this.lesson });\r\n }\r\n}\r\n","<div class=\"card-container\">\n @if(showOptions){\n <p-speeddial\n class=\"dial-button\"\n [model]=\"items\"\n [radius]=\"70\"\n type=\"quarter-circle\"\n direction=\"down-left\"\n [buttonProps]=\"{ severity: 'primary', rounded: true, outlined: true, raised: true }\"\n [tooltipOptions]=\"{ tooltipPosition: 'top' }\" />\n }\n <p-card>\n <div class=\"lesson-card\" [style.height]=\"cardHeight\">\n <div class=\"photo\">\n <img [src]=\"coverUrl\" alt=\"\" />\n </div>\n\n <span class=\"date\">{{ lesson.createdAt | date : 'dd/MM/yyyy' }}</span>\n\n <div class=\"description\">\n <h1>{{ lesson?.name || 'No title available' }}</h1>\n <p>{{ lesson.description || 'No description available' }}</p>\n <div class=\"card-footer\">\n <div class=\"status-tags\">\n @if (lesson.learnable?.level){\n <p-tag>Nivel {{ lesson.learnable?.level }}</p-tag>\n } @if (lesson.taken?.status == 'passed') {\n <p-tag severity=\"success\" value=\"Tomada\" [rounded]=\"true\" />\n } @if (lesson.taken?.status == 'failed') {\n <p-tag severity=\"danger\" value=\"Fallida\" [rounded]=\"true\" />\n } @if (lesson.taken) {\n <p-tag severity=\"success\" value=\"Tomada 📖\" [rounded]=\"true\" />\n } @if ( userService.isAdmin()) {\n <p-tag severity=\"contrast\" [value]=\"lesson.manageable?.isPublic ? 'Pública' : 'No pública'\" [rounded]=\"true\" />\n <p-tag severity=\"contrast\" [value]=\"lesson.manageable?.status\" [rounded]=\"true\" />\n }\n </div>\n\n <div style=\"position: absolute; bottom: 0px; right: 0px\">\n <p-button label=\"Tomar lección\" (onClick)=\"eventCard(eventType.Select)\" severity=\"primary\"> </p-button>\n </div>\n </div>\n </div>\n </div>\n </p-card>\n</div>\n","import { Injectable } from '@angular/core';\nimport { EntityCommunicationService, FiltersConfig, IFilterQueryResponse } from '@dataclouder/ngx-core';\nimport { ILesson, ILessonTaken, LessonPrompts } from '../components/lesson-mini-components/components/lessons.clases';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DefaultLessonsService extends EntityCommunicationService<ILesson> {\n constructor() {\n super('lesson');\n }\n\n // --- Endpoint Definitions for methods not in EntityCommunicationService ---\n private endpoints = {\n saveTakenLesson: `api/user/saveLesson`,\n generateLesson: `api/lesson/generate`,\n generateByAI: `api/lesson/generate-ai`,\n improveMDWithAI: `api/lesson/improve-markdown-ai`,\n GenerateBanner: 'api/lesson/generate-banner',\n };\n\n // --- Method Implementations from LessonsAbstractService ---\n\n async getLessons(filters: FiltersConfig = {}): Promise<IFilterQueryResponse<ILesson>> {\n if (!filters.returnProps) {\n filters.returnProps = {\n level: 1,\n title: 1,\n name: 1,\n description: 1,\n createdDate: 1,\n banner: 1, // deprecated\n metadata: 1, // deprecated\n manageable: 1,\n assets: 1,\n learnable: 1,\n appExtensions: 1,\n media: 1, // deprecated\n };\n }\n return this.query(filters);\n }\n\n async getLesson(id: string): Promise<ILesson> {\n return this.findOne(id);\n }\n\n async postLesson(lesson: ILesson): Promise<ILesson> {\n return this.createOrUpdate(lesson);\n }\n\n async updateLesson(lesson: ILesson): Promise<ILesson> {\n if (!lesson._id) {\n throw new Error('Lesson ID is required for update.');\n }\n return this.createOrUpdate(lesson);\n }\n\n async deleteLesson(id: string): Promise<any> {\n await this.remove(id);\n }\n\n // --- Methods specific to lessons ---\n\n saveTakenLesson(lesson: ILessonTaken): Promise<any> {\n return this.httpService.post(this.endpoints.saveTakenLesson, lesson);\n }\n\n async generateLesson(lesson: ILesson): Promise<ILesson> {\n return this.httpService.post<ILesson>(this.endpoints.generateLesson, lesson);\n }\n\n async postGenerateByAI(id: string): Promise<ILesson> {\n return this.httpService.post<ILesson>(this.endpoints.generateByAI, { id });\n }\n\n async postImproveMDWithAI(lessonId: string, markdownText: string): Promise<ILesson> {\n return this.httpService.post<ILesson>(this.endpoints.improveMDWithAI, { id: lessonId, markdown: markdownText });\n }\n\n public generateBanner(prompt: string, lessonId: string): Promise<IFilterQueryResponse<ILesson>> {\n return this.httpService.post<IFilterQueryResponse<ILesson>>(this.endpoints.GenerateBanner, { prompt, lessonId });\n }\n\n extractTextFromHtml(html: string): string {\n const r1 = new RegExp('~(.+?)~', 'g');\n const lessonHtml = html.replace(r1, (_matching, jsonCoded) => {\n try {\n const data = JSON.parse(jsonCoded);\n return `<span>${data?.settings?.text || ''}</span>`;\n } catch (e) {\n console.error('Error parsing JSON in extractTextFromHtml:', jsonCoded, e);\n return '';\n }\n });\n let text = lessonHtml.replace(/<[^>]*>/g, ' ');\n text = text.replace(/<style[^>]*>[\\s\\S]*?<\\/style>/gi, ' ');\n text = text.replace(/<script[^>]*>[\\s\\S]*?<\\/script>/gi, ' ');\n text = text.replace(/&nbsp;/g, ' ');\n text = text.replace(/&/g, '&');\n text = text.replace(/</g, '<');\n text = text.replace(/>/g, '>');\n text = text.replace(/\\s+/g, ' ').trim();\n return text;\n }\n\n getPrompts(): LessonPrompts {\n return null;\n }\n}\n","import { Component, Input, Type, ViewChildren, QueryList, OnDestroy, inject, AfterViewInit, effect } from '@angular/core';\nimport { NgComponentOutlet } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { MenuItem } from 'primeng/api';\n\nimport { DCFilterBarComponent, EntityBaseListComponent, ICustomFilter, OnActionEvent, PColumn, QuickTableComponent } from '@dataclouder/ngx-core';\nimport { ILesson, LESSONS_TOKEN } from '../../lesson-mini-components/components/lessons.clases';\n\nimport { DcLessonCardComponent } from '../dc-lesson-card/dc-lesson-card.component';\nimport { PaginatorModule } from 'primeng/paginator';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\nimport { UserService } from '@dataclouder/ngx-users';\n\nconst tableViewColumns: PColumn[] = [\n { field: 'media.images[0].url', header: 'Image', type: 'image' },\n { field: 'title', header: 'Título' },\n { field: 'description', header: 'Descripción' },\n];\n\n@Component({\n selector: 'dc-lesson-list',\n templateUrl: './dc-lesson-list.component.html',\n styleUrls: ['./dc-lesson-list.component.scss'],\n standalone: true,\n imports: [RouterModule, DCFilterBarComponent, NgComponentOutlet, QuickTableComponent, PaginatorModule],\n})\nexport class DCLessonListComponent extends EntityBaseListComponent<ILesson> implements OnDestroy, AfterViewInit {\n // Services\n public userService = inject(UserService);\n\n // Inputs\n @Input() customCardComponent?: Type<DcLessonCardComponent>;\n @Input() customFilters: ICustomFilter[] = [];\n\n // Injected Services\n // I dont rename so use the same in EntityBaseListComponent and Pagination\n protected override entityCommunicationService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n\n // View Children\n @ViewChildren('outlet') outlets!: QueryList<NgComponentOutlet>;\n\n // Public properties\n public cardComponent: Type<DcLessonCardComponent>;\n public override columns: PColumn[] = tableViewColumns;\n\n // Private properties\n private cardEventSubs: Subscription[] = [];\n\n constructor() {\n super();\n this.filterConfig.returnProps = {\n title: 1,\n name: 1,\n description: 1,\n media: 1,\n manageable: 1,\n learnable: 1,\n assets: 1,\n _id: 1,\n id: 1,\n };\n\n effect(() => {\n // When items signal changes, re-subscribe to card events\n this.items(); // a little hack to make the effect run when items change\n setTimeout(() => this.subscribeToCardEvents());\n });\n }\n\n override async ngOnInit(): Promise<void> {\n this.cardComponent = this.customCardComponent || DcLessonCardComponent;\n await super.ngOnInit();\n }\n\n ngAfterViewInit(): void {\n this.outlets.changes.subscribe(() => this.subscribeToCardEvents());\n }\n\n ngOnDestroy() {\n this.clearCardEventSubs();\n }\n\n public getCustomButtons(item: ILesson): MenuItem[] {\n return [\n { label: 'Select', icon: 'pi pi-check', command: () => this.handleAction({ action: 'select', item }) },\n { label: 'QR', icon: 'pi pi-qrcode', command: () => this.handleAction({ action: 'qr', item }) },\n ];\n }\n\n public handleAction(actionEvent: OnActionEvent): void {\n if (['select', 'qr'].includes(actionEvent.action)) {\n this.onAction.emit(actionEvent);\n } else {\n super.doAction(actionEvent);\n }\n }\n\n public applyFilterBarEvent(filterEvent: OnActionEvent): void {\n if (filterEvent.action === 'changeView') {\n this.toggleView();\n return;\n }\n this.filterConfig = { ...this.filterConfig, ...filterEvent.item };\n this.loadData();\n }\n\n private subscribeToCardEvents(): void {\n this.clearCardEventSubs();\n this.outlets.forEach((outlet) => {\n const instance = outlet.componentInstance as DcLessonCardComponent;\n if (instance?.onAction) {\n this.cardEventSubs.push(\n instance.onAction.subscribe((event: OnActionEvent) => {\n this.handleAction(event);\n }),\n );\n }\n });\n }\n\n private clearCardEventSubs(): void {\n this.cardEventSubs.forEach((sub) => sub.unsubscribe());\n this.cardEventSubs = [];\n }\n\n protected override async loadData(): Promise<void> {\n try {\n this.isLoading = true;\n const response = await this.entityCommunicationService.getLessons(this.filterConfig);\n this.items.set(response.rows);\n this.totalRecordsSignal.set(response.count);\n } catch (error) {\n console.error('Error loading data', error);\n } finally {\n this.isLoading = false;\n }\n }\n}\n","<dc-filter-bar\n [isAdmin]=\"userService.isAdmin()\"\n [options]=\"filterBarOptions\"\n [customFilters]=\"customFilters\"\n (onFilterAction)=\"applyFilterBarEvent($event)\"\n (onNew)=\"onNew()\"></dc-filter-bar>\n@if(viewType() === 'table') {\n\n<app-quick-table [tableData]=\"items()\" (onAction)=\"doAction($event)\"></app-quick-table>\n\n} @else {\n<div class=\"lesson-list-container\">\n @if (items()?.length > 0) { @for (lesson of items(); track lesson._id) {\n <ng-container\n #outlet=\"ngComponentOutlet\"\n [ngComponentOutlet]=\"cardComponent\"\n [ngComponentOutletInputs]=\"{\n lesson: lesson,\n showOptions: true\n }\">\n </ng-container>\n\n } } @else {\n <p>No se encontraron lecciones disponibles</p>\n }\n</div>\n}\n\n<p-paginator\n class=\"paginator-container\"\n currentPageReportTemplate=\"{{ totalRecords }} lecciones\"\n [showCurrentPageReport]=\"true\"\n (onPageChange)=\"onPageChange($event)\"\n [totalRecords]=\"totalRecords\"\n [first]=\"first\"\n [rows]=\"rows\"\n [rowsPerPageOptions]=\"[10, 20, 30]\">\n</p-paginator>\n","import { Component } from '@angular/core';\n\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@Component({\n selector: 'dc-lesson-form',\n templateUrl: './lesson-form.component.html',\n styleUrls: ['./lesson-form.component.scss'],\n standalone: true,\n imports: [ReactiveFormsModule],\n})\nexport class DCLessonFormComponent {\n // Form implementation will go here\n}\n","<div class=\"lesson-form-container\">\n <h2>Lesson Form</h2>\n <p>Esto es dentro del componente de la leccion</p>\n <!-- Form implementation will go here -->\n</div>\n","import { Injectable, Type } from '@angular/core';\nimport { LessonComponentEnum } from '../lesson-mini-components/components/lessons.clases';\nimport { SpeakerBuilderComponent } from '../lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component';\nimport { SpeakerComponent } from '../lesson-mini-components/components/speaker/speaker.component';\n\nexport interface InputCompoennt {\n text?: string; // Text is the text will extract in case of show as text and not component.\n [key: string]: any;\n}\n\nexport interface DynamicComponentData {\n id?: string;\n component: LessonComponentEnum;\n inputs?: InputCompoennt; // for whatever component.\n}\n\n// TODO: check LessonComponentBuilders in lessons.clases.ts for origianl implementation\nexport const DynamicComponentBuilders = {\n [LessonComponentEnum.Speaker]: SpeakerBuilderComponent,\n};\n\nexport const DynamicComponents = {\n [LessonComponentEnum.Speaker]: SpeakerComponent,\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DynamicComponentsService {\n private _dynamicComponentBuilders = { ...DynamicComponentBuilders };\n private _dynamicComponents = { ...DynamicComponents };\n\n public registerCustomComponent(component: Type<any>, name?: string) {\n // this._dynamicComponentBuilders[name || component.name] = component;\n this._dynamicComponents[name || component.name] = component;\n }\n\n public registerCustomComponentBuilder(component: Type<any>, name?: string) {\n this._dynamicComponentBuilders[name || component.name] = component;\n }\n\n public getDynamicComponentBuilders(type: any) {\n return this._dynamicComponentBuilders[type];\n }\n\n public getDynamicComponentClass(type: LessonComponentEnum | string) {\n return this._dynamicComponents[type];\n }\n}\n","import { ComponentRef, inject, Injectable, ViewContainerRef, Renderer2 } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { DynamicComponentsService } from '../components/dynamic-components/dynamic-components.service';\nimport { ILesson, ILessonTaken, LessonComponentConfiguration, LessonComponentInterface } from '../components/lesson-mini-components/components/lessons.clases';\nimport { TOAST_ALERTS_TOKEN, ToastAlertsAbstractService } from '@dataclouder/ngx-core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LessonRendererService {\n private readonly dynamicComponentsService = inject(DynamicComponentsService);\n private readonly toastrService = inject<ToastAlertsAbstractService>(TOAST_ALERTS_TOKEN);\n\n private components: { [key: string]: ComponentRef<LessonComponentInterface> } = {};\n\n public mainForm: FormGroup<{ [key: string]: FormControl<any> }> = new FormGroup({});\n\n public renderLesson(\n lessonData: ILesson,\n viewContainerRef: ViewContainerRef,\n dynamicLessonElement: HTMLElement,\n renderer: Renderer2,\n ): { [key: string]: ComponentRef<LessonComponentInterface> } {\n this.clearLessonRendering(dynamicLessonElement);\n console.log('Rendering lesson:', lessonData.id);\n\n const { htmlContent, components } = this.parseAndCreateComponents(lessonData, viewContainerRef);\n this.components = components;\n\n this.aggregateFormControls(this.components);\n dynamicLessonElement.innerHTML = htmlContent;\n this.injectComponentsIntoDom(this.components, renderer);\n return this.components;\n }\n\n public clearLessonRendering(dynamicLessonElement: HTMLElement): void {\n Object.values(this.components).forEach((compRef) => compRef.destroy());\n this.components = {};\n this.mainForm = new FormGroup({});\n if (dynamicLessonElement) {\n dynamicLessonElement.innerHTML = '';\n }\n }\n\n private parseAndCreateComponents(\n lessonData: ILesson,\n viewContainerRef: ViewContainerRef,\n ): { htmlContent: string; components: { [key: string]: ComponentRef<LessonComponentInterface> } } {\n const r1 = new RegExp('~(.+?)~', 'g');\n let count = 0;\n const createdComponents: { [key: string]: ComponentRef<LessonComponentInterface> } = {};\n\n const htmlContent = lessonData.textCoded.replace(r1, (_matching, jsonCoded) => {\n const componentName = `dynamicComp${count}`;\n count++;\n const componentRef = this.createComponentReferenceWithJson(jsonCoded, lessonData, viewContainerRef);\n if (!componentRef) {\n console.error(`Failed to create component for: ${jsonCoded}`);\n return '<!-- component creation failed -->';\n }\n createdComponents[componentName] = componentRef;\n return `<span id=\"${componentName}\"></span>`;\n });\n\n return { htmlContent, components: createdComponents };\n }\n\n private createComponentReferenceWithJson(\n json: string,\n currentLesson: ILesson,\n viewContainerRef: ViewContainerRef,\n ): ComponentRef<LessonComponentInterface> | null {\n try {\n let lessonCodedConfig: LessonComponentConfiguration = JSON.parse(json);\n\n if (lessonCodedConfig.id && currentLesson?.dynamicComponents[lessonCodedConfig.id]) {\n const foundConfig = currentLesson.dynamicComponents[lessonCodedConfig.id];\n if (foundConfig) {\n lessonCodedConfig = { ...lessonCodedConfig, ...foundConfig };\n }\n }\n\n const LessonClass = this.dynamicComponentsService.getDynamicComponentClass(lessonCodedConfig.component);\n\n if (!LessonClass) {\n console.error(`Component class not found for type: ${lessonCodedConfig.component}. JSON: ${json}`);\n return null;\n }\n\n const componentRef = viewContainerRef.createComponent<LessonComponentInterface>(LessonClass);\n\n if (lessonCodedConfig.inputs) {\n for (const key in lessonCodedConfig.inputs) {\n if (lessonCodedConfig.inputs.hasOwnProperty(key)) {\n componentRef.instance[key] = lessonCodedConfig.inputs[key];\n }\n }\n }\n if (lessonCodedConfig.settings) {\n componentRef.instance.config = lessonCodedConfig;\n }\n return componentRef;\n } catch (error) {\n console.error(`Error processing component JSON: ${json}`, error);\n return null;\n }\n }\n\n private aggregateFormControls(components: { [key: string]: ComponentRef<LessonComponentInterface> }): void {\n const newFormControls: { [key: string]: FormControl<any> } = {};\n Object.entries(components).forEach(([name, componentRef]) => {\n if (componentRef.instance?.control instanceof FormControl) {\n newFormControls[name] = componentRef.instance.control;\n newFormControls[name].addValidators(Validators.required);\n }\n });\n this.mainForm = new FormGroup(newFormControls);\n }\n\n private injectComponentsIntoDom(components: { [key: string]: ComponentRef<LessonComponentInterface> }, renderer: Renderer2): void {\n Object.entries(components).forEach(([name, componentRef]) => {\n const elementRef = document.getElementById(name);\n if (elementRef) {\n this.addComponentToNode(componentRef, elementRef, renderer);\n } else {\n console.warn(`Placeholder element with ID '${name}' not found in the DOM.`);\n }\n });\n }\n\n private addComponentToNode(componentRef: ComponentRef<LessonComponentInterface>, nodeDOM: HTMLElement, renderer: Renderer2): void {\n renderer.appendChild(nodeDOM, componentRef.location.nativeElement);\n }\n\n public evaluateForms(): { rates: { correct: number; incorrect: number; score: number }; takenLesson: ILessonTaken | null } | null {\n this.mainForm.markAllAsTouched();\n\n if (!this.mainForm.valid) {\n Object.keys(this.mainForm.controls).forEach((controlName) => {\n if (this.components[controlName]?.instance?.validate) {\n this.components[controlName].instance.validate();\n }\n });\n this.toastrService.warn({ subtitle: 'Por favor completa todos los ejercicios', title: 'Incompleto' });\n return null;\n }\n\n const rates = { correct: 0, incorrect: 0, score: 0 };\n\n Object.keys(this.mainForm.controls).forEach((controlName) => {\n const instance = this.components[controlName]?.instance;\n if (instance && typeof instance.evaluate === 'function') {\n try {\n const result = instance.evaluate();\n if (result) {\n rates.correct++;\n } else {\n rates.incorrect++;\n }\n } catch (err) {\n console.error('Error during evaluation for component:', controlName, instance, err);\n rates.incorrect++;\n }\n }\n });\n\n const totalQuestions = rates.correct + rates.incorrect;\n rates.score = totalQuestions > 0 ? rates.correct / totalQuestions : 0;\n\n const status = rates.score >= 0.7 ? 'passed' : 'failed';\n\n if (status === 'passed') {\n this.toastrService.success({ subtitle: `Calificación: ${Math.round(rates.score * 100)}%.`, title: '¡Muy bien!' });\n } else {\n this.toastrService.warn({ subtitle: `Calificación: ${Math.round(rates.score * 100)}%. Revisa tus respuestas.`, title: 'Casi lo logras' });\n }\n\n return { rates, takenLesson: null };\n }\n}\n","export const EnglishEvaluationSkill = `\nYou are a virtual professor for the Polilan English learning app. Your primary role is to evaluate a student's English conversational performance.\n\nYou will be provided with two pieces of information for each evaluation:\n1. **The student's English level:** This will be one of \"Beginner\", \"Intermediate\", or \"Advanced\".\n2. **A conversation transcript:** This will be the dialogue between the Student and an Assistant, with each turn clearly labeled (e.g., \"Student or User: ...\", \"Assistant: ...\").\n\nYour sole task is to evaluate the *Student's* contribution to the conversation. **Do NOT evaluate the Assistant's turns.**\n\nEvaluate the student's performance based on the following aspects, *always keeping the student's provided level in mind* and adjusting your expectations accordingly specially with beginners give them credits just for trying:\n\n* **Grammar & Syntax:** Evaluate accuracy and complexity *relative to the expected level*. (Beginners: focus on basic accuracy; Advanced: expect complex structures with high accuracy).\n* **Vocabulary & Usage:** Evaluate the range and appropriateness of words used *relative to the expected level*. (Beginners: focus on using basic words correctly; Advanced: expect varied and idiomatic language).\n* **Cohesion & Coherence:** Evaluate how well their turns connect and make sense within the conversation *relative to the expected level*. (Beginners: focus on simple, clear responses; Advanced: expect logical flow and detailed contributions).\n* **Task Completion/Relevance:** Evaluate how effectively they participate and respond to the conversation's goals or topics *relative to the expected level*.\n\nAssign a rating from 0 to 3 based on how well the student performs *compared to the typical expectations for their provided level*:\n\n* **0: Bad** - Performance is significantly below what is expected for this level. Many errors impede communication.\n* **1: Not Bad** - Performance is below expectations for this level, but communication is sometimes possible despite frequent errors.\n* **2: Good** - Performance meets expectations for this level, demonstrating solid understanding and usage with only occasional minor errors.\n* **3: Very Good** - Performance exceeds expectations for this level, demonstrating a strong command and potential to progress quickly.\n\nProvide detailed, constructive feedback that explains the rating. Point out specific strengths and areas for improvement based on their performance *at their given level*. Use examples from the dialog if helpful. Maintain a supportive, encouraging, and educational tone appropriate for a virtual professor guiding a student at their specific stage.\n`;\n","import { inject, Injectable, signal } from '@angular/core';\nimport {\n ChatMessage,\n ChatRole,\n ConditionOperator,\n ConditionType,\n ConversationEvents,\n ConversationType,\n EDoActionType,\n EvalResultStringDefinition,\n IConversationFlow,\n IConversationSettings,\n SimpleAgentTask,\n SystemPromptType,\n TextEngines,\n} from '@dataclouder/ngx-agent-cards';\nimport { EModelQuality } from '@dataclouder/ngx-core';\nimport { getRandomQuickVoice } from '@dataclouder/ngx-vertex';\nimport { ILessonsSettings } from '../components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component';\nimport { EnglishEvaluationSkill } from '../components/dc-lessons/dc-lesson-renderer/eval-agents-skills';\nimport { ILesson, LESSONS_TOKEN } from '../components/lesson-mini-components/components/lessons.clases';\nimport { DefaultLessonsService } from './default-lessons.service';\nimport { UserService } from '@dataclouder/ngx-users';\n\nconst EngagementSkill = `\nYou are an engagement assistant, start by greeting the user, asking something about the lesson, and then continue the conversation. always ask one or two friendly questions.\nthat makes sense for the lesson.\n`;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LessonConversationService {\n public lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n public userService = inject(UserService);\n\n public conversationSettings = signal<IConversationSettings | undefined>(undefined);\n public conversationFlow = signal<IConversationFlow | undefined>(undefined);\n public evalAgentTask = signal<SimpleAgentTask | undefined>(undefined);\n\n public initializeConversationFlow(): void {\n this.evalAgentTask.set({\n systemPrompt: EnglishEvaluationSkill,\n model: { provider: 'google' },\n task: `Please evaluate the user conversation student data is: \\n ${this.userService.getUserDataInformation()}`,\n expectedResponseType: EvalResultStringDefinition,\n });\n\n this.conversationFlow.set({\n goal: {\n enabled: true,\n task: `User is learning is taking a lesson about languages, evaluate how good are the responses.`,\n model: { quality: EModelQuality.FAST },\n },\n triggerTasks: {\n [ConversationEvents.OnUserMessage]: {\n enabled: true,\n ...this.evalAgentTask(),\n },\n },\n challenges: null,\n dynamicConditions: [\n {\n what: ConditionType.Goal,\n when: ConditionOperator.GreaterThanOrEqual,\n value: 100,\n do: [\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.SystemPrompt,\n prompt:\n 'You were talking with the user, user finish the conversation, in the next message you must try to finish the conversation and say good bye.',\n },\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.CharacterDescription,\n prompt: '',\n },\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.UserInformation,\n prompt: '',\n },\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.MessageExamples,\n prompt: '',\n },\n {\n actionType: EDoActionType.ChangePrompt,\n systemPromptType: SystemPromptType.ScenarioDescription,\n prompt: '',\n },\n ],\n },\n ],\n moodStateEnabled: false,\n });\n }\n\n public async startAI(lesson: ILesson, settings: ILessonsSettings): Promise<IConversationSettings | null> {\n console.log('Requesting agent cards from LessonAIService...');\n try {\n const conversationSettings = await this.generateConversationSettingsForLesson(lesson, settings);\n if (conversationSettings) {\n this.conversationSettings.set(conversationSettings);\n console.log('Agent cards received and set.');\n return conversationSettings;\n } else {\n console.error('Failed to generate agent cards (service returned null).');\n return null;\n }\n } catch (error) {\n console.error('Error generating agent cards:', error);\n return null;\n }\n }\n\n /**\n * Builds the scenario prompt string based on lesson content and user info.\n * @param lessonText The extracted text content of the lesson.\n * @param userInformationPrompt The formatted string containing user details.\n * @returns The complete scenario prompt string.\n */\n private _buildLessonInstructionsPrompt(lessonText: string, userInformationPrompt: string, settings: ILessonsSettings): string {\n return `\n${settings.instructionsPrompt}\n\n<Lesson Text>\n ${lessonText}\n</Lesson Text>\n\n${EngagementSkill}\n\n<User Information>\n${userInformationPrompt}`;\n }\n\n /**\n * Generates conversation settings for a lesson, using the lesson scenario as the initial prompt.\n * @param lesson The lesson data.\n * @returns An IConversationSettings object configured for the lesson scenario.\n */\n async generateConversationSettingsForLesson(lesson: ILesson, settings: ILessonsSettings): Promise<IConversationSettings | null> {\n // TODO: Consolidate user fetching logic if possible, or ensure consistency\n\n const baseLang = this.userService.user().settings.baseLanguage || 'en';\n let lessonText = '';\n if (lesson.textCoded) {\n lessonText = this.lessonsService.extractTextFromHtml(lesson.textCoded);\n } else {\n lessonText = lesson.markdown;\n }\n const userInformationPrompt = this.userService.getUserDataInformation();\n\n let lessonInstructionsPrompt = this._buildLessonInstructionsPrompt(lessonText, userInformationPrompt, settings);\n\n if (settings.additionalPrompt) {\n lessonInstructionsPrompt += '\\n\\n' + settings.additionalPrompt;\n }\n\n const initialMessage: ChatMessage = {\n role: ChatRole.System,\n content: lessonInstructionsPrompt,\n messageId: SystemPromptType.SystemPrompt,\n };\n\n // Use defaults similar to DEFAULT_LESSON_AGENT_CARD but adjust for prompt-based start\n const conversationSettings: IConversationSettings = {\n conversationType: ConversationType.General,\n textEngine: TextEngines.SimpleText,\n autoStart: true,\n messages: [initialMessage],\n model: { provider: 'google' },\n tts: { voice: getRandomQuickVoice((baseLang as any) || 'en', 'female') },\n };\n\n return conversationSettings;\n }\n}\n","import {\n Component,\n ComponentRef,\n ElementRef,\n Renderer2,\n viewChild,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n signal,\n Output,\n EventEmitter,\n OnInit,\n} from '@angular/core'; // Added signal imports, Output, EventEmitter\nimport { UiStateService } from '@dataclouder/ngx-core';\nimport { FormGroup } from '@angular/forms'; // Use typed forms\nimport { KeyValuePipe } from '@angular/common';\nimport { ButtonModule } from 'primeng/button';\nimport { ILesson, ILessonTaken, LESSONS_TOKEN } from '../../lesson-mini-components/components/lessons.clases';\nimport { TOAST_ALERTS_TOKEN, ToastAlertsAbstractService } from '@dataclouder/ngx-core';\nimport { LessonComponentInterface } from '../../lesson-mini-components/components/lessons.clases';\nimport { DCChatComponent, ChatEvent, ChatEventType, WordData } from '@dataclouder/ngx-agent-cards';\nimport { DrawerModule } from 'primeng/drawer';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\nimport { LessonRendererService } from '../../../services/lesson-renderer.service';\nimport { LessonConversationService } from '../../../services/lesson-conversation.service';\nimport { MarkdownComponent } from 'ngx-markdown';\n\nexport interface ILessonsSettings {\n additionalPrompt: string;\n instructionsPrompt: string;\n}\n\n@Component({\n selector: 'dc-lesson-renderer',\n templateUrl: './dc-lesson-renderer.component.html',\n styleUrls: ['./dc-lesson-renderer.component.css'],\n standalone: true,\n imports: [KeyValuePipe, ButtonModule, DCChatComponent, DrawerModule, MarkdownComponent],\n})\nexport class DCLessonRendererComponent implements OnInit {\n // --- Signal Inputs ---\n lessonInput = input<ILesson>(); // Input signal for lesson object\n lessonIdInput = input<string>(); // Input signal for lesson ID\n settings = input<ILessonsSettings>();\n\n // --- Outputs ---\n @Output() wordClicked = new EventEmitter<WordData>(); // New output event\n\n // --- View Childs ---\n dynamicLesson = viewChild<ElementRef<HTMLElement>>('dynamicLesson');\n\n // --- Services ---\n private readonly renderer = inject(Renderer2);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly toastrService = inject<ToastAlertsAbstractService>(TOAST_ALERTS_TOKEN);\n private lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n public readonly uiStateService = inject<UiStateService>(UiStateService);\n public readonly lessonRendererService = inject(LessonRendererService);\n public readonly lessonConversationService = inject(LessonConversationService);\n\n // --- State Signals ---\n lesson = signal<ILesson | undefined>(undefined); // Internal lesson state signal\n\n // --- Computed Signals ---\n imageCover = computed(() => this.lesson()?.media?.images?.find((img) => img.type === 'cover')?.url); // Computed signal for imageCover\n\n // --- Properties ---\n private components: { [key: string]: ComponentRef<LessonComponentInterface> } = {};\n public mainForm: FormGroup = new FormGroup({});\n private previousTextCoded: string | undefined | null = undefined; // Store previous value\n\n constructor() {\n // Effect to fetch lesson data if ID is provided and lesson object isn't\n effect(\n async () => {\n const lessonInput = this.lessonInput();\n const lessonId = this.lessonIdInput();\n\n if (lessonInput) {\n this.lesson.set(lessonInput); // Use input lesson directly\n } else if (lessonId && !this.lesson()) {\n // Fetch only if ID exists and internal lesson is not set\n console.log(`[Renderer] Effect 1: Fetching lesson ${lessonId}`);\n try {\n // Consider adding a loading state signal here\n const fetchedLesson = await this.lessonsService.getLesson(lessonId);\n this.lesson.set(fetchedLesson);\n console.log('Fetched lesson:', fetchedLesson);\n } catch (error) {\n console.error(`Failed to fetch lesson with ID: ${lessonId}`, error);\n this.toastrService.error({ subtitle: 'Failed to load lesson data.', title: 'Error' });\n this.lesson.set(undefined); // Reset lesson on error\n } finally {\n // Reset loading state signal here\n }\n } else if (!lessonInput && !lessonId) {\n // Handle case where neither input is provided, maybe clear the lesson?\n this.lesson.set(undefined);\n }\n },\n { allowSignalWrites: true },\n ); // Allow signal writes inside effect\n\n // Effect to render the lesson only when textCoded value actually changes\n effect(() => {\n const dynamicLessonEl = this.dynamicLesson();\n const currentLesson = this.lesson(); // Read the lesson signal\n\n if (!dynamicLessonEl || !currentLesson) {\n return;\n }\n\n if (currentLesson?.format === 'markdown') {\n // If markdown content exists, we clear any dynamically rendered components\n // and prevent the textCoded logic from running.\n if (this.previousTextCoded) {\n this.lessonRendererService.clearLessonRendering(dynamicLessonEl.nativeElement);\n this.mainForm = this.lessonRendererService.mainForm;\n this.previousTextCoded = undefined;\n }\n return;\n }\n\n const newTextCoded = currentLesson?.textCoded; // Get the current textCoded value\n\n // Quick fix to only render on changes textCode not all the lesson\n if (newTextCoded !== this.previousTextCoded) {\n if (newTextCoded !== undefined && newTextCoded !== null && currentLesson) {\n this.components = this.lessonRendererService.renderLesson(currentLesson, this.viewContainerRef, dynamicLessonEl.nativeElement, this.renderer);\n this.mainForm = this.lessonRendererService.mainForm;\n } else {\n this.lessonRendererService.clearLessonRendering(dynamicLessonEl.nativeElement);\n this.mainForm = this.lessonRendererService.mainForm;\n }\n // Update the stored previous value *after* comparison and action\n this.previousTextCoded = newTextCoded;\n } else {\n console.log('[Renderer] textCoded has NOT changed. Skipping render/clear.');\n }\n });\n }\n ngOnInit(): void {\n this.lessonConversationService.initializeConversationFlow();\n }\n\n public async evaluateForms() {\n const result = this.lessonRendererService.evaluateForms();\n if (!result) {\n return;\n }\n\n const currentLesson = this.lesson();\n if (!currentLesson) {\n console.error('Cannot save result, lesson data is missing.');\n this.toastrService.error({ subtitle: 'Cannot save result, lesson data missing.', title: 'Error' });\n return;\n }\n\n const status = result.rates.score >= 0.7 ? 'passed' : 'failed';\n const takenLesson: ILessonTaken = {\n id: currentLesson.id,\n goalCompleted: null,\n score: result.rates.score,\n status: status,\n lastAccess: new Date(),\n };\n\n console.log('Lesson evaluation result:', takenLesson);\n // TODO: Re-implement saving the taken lesson status via lessonService\n }\n\n // --- AI Chat Logic ---\n\n public async startAI() {\n const currentLesson = this.lesson();\n if (!currentLesson) {\n console.error('Cannot start AI without a lesson.');\n this.toastrService.error({ subtitle: 'Lesson data not available.', title: 'Cannot Start Chat' });\n return;\n }\n\n const conversationSettings = await this.lessonConversationService.startAI(currentLesson, this.settings());\n if (conversationSettings) {\n this.uiStateService.chatDrawerVisible.set(true);\n } else {\n this.toastrService.error({ subtitle: 'Could not prepare the AI chat session.', title: 'Error' });\n }\n }\n\n public onVisibleChange(isVisible: boolean) {\n if (isVisible === false) {\n this.uiStateService.chatDrawerVisible.set(false);\n }\n }\n\n public async handleGoalCompleted(event: any = {}) {\n console.log('Goal completed:', event);\n const lesson = this.lesson();\n\n const takenLesson: ILessonTaken = { id: lesson.id, goalCompleted: true, score: 100, status: 'finished', lastAccess: new Date() };\n\n const res = await this.lessonsService.saveTakenLesson(takenLesson);\n if (res) {\n // this.lessonsMemStateService.updateUserState(res);\n }\n\n this.toastrService.success({ subtitle: '¡Has completado la lección! , pero puedes seguir conversando', title: '¡Muy bien, guardaremos tu progreso!' });\n }\n\n public onChatMessage(event: ChatEvent): void {\n console.log('Received chat event:', event);\n\n switch (event.type) {\n case ChatEventType.WordClicked: {\n const wordClickedData = event.payload as WordData;\n console.log('Word clicked event received, emitting output:', wordClickedData);\n // Removed: this.wordPopupService.showWordPopup(wordClicked); // Use the service\n this.wordClicked.emit(wordClickedData); // Emit the event instead\n break;\n }\n\n default:\n console.log('Unhandled chat event type:', event.type);\n }\n }\n}\n","@if (lesson()?.format === 'markdown' || !lesson()?.textCoded) {\n<h3>Mostrando markdown</h3>\n\n<markdown>\n {{ lesson()?.markdown }}\n</markdown>\n} @else {\n<h5>Lesson not available</h5>\n<div>\n <div #dynamicLesson class=\"targetclass\">\n <ng-template #target></ng-template>\n </div>\n</div>\n}\n\n<br />\n<div style=\"display: flex; gap: 10px\">\n @if ((mainForm.controls | keyvalue)?.length) {\n <div>\n <p-button label=\"Calificar Lección\" icon=\"pi pi-check-circle\" (click)=\"evaluateForms()\" [rounded]=\"true\"></p-button>\n </div>\n }\n\n <p-button icon=\"pi pi-verified\" [rounded]=\"true\" (click)=\"startAI()\" label=\"Repasar con IA\" />\n</div>\n<br /><br />\n\n@if(uiStateService?.chatDrawerVisible()) {\n<p-drawer\n header=\"Conversation\"\n [visible]=\"uiStateService?.chatDrawerVisible()\"\n (visibleChange)=\"onVisibleChange($event)\"\n position=\"bottom\"\n styleClass=\"app-bottom-overlay\">\n <dc-chat\n [conversationFlow]=\"lessonConversationService.conversationFlow()\"\n [conversationSettings]=\"lessonConversationService.conversationSettings()\"\n (goalCompleted)=\"handleGoalCompleted($event)\"\n (chatEvent)=\"onChatMessage($event)\"></dc-chat>\n</p-drawer>\n}\n","import { Injectable, inject, signal } from '@angular/core';\nimport { ILesson, LESSONS_TOKEN } from '../components/lesson-mini-components/components/lessons.clases';\nimport { NOTION_SERVICE_TOKEN, NotionExportType } from '../models/notion.models';\nimport { TOAST_ALERTS_TOKEN } from '@dataclouder/ngx-core';\nimport { DefaultLessonsService } from './default-lessons.service';\n\n@Injectable() // Consider providing in root or specific module/component\nexport class LessonNotionService {\n #notionService = inject(NOTION_SERVICE_TOKEN);\n public lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n #toastService = inject(TOAST_ALERTS_TOKEN);\n\n // Keep track of loading state specific to Notion operations\n isLoading = signal(false);\n\n /**\n * Extracts the Notion Page ID from a URL.\n * @param url The Notion page URL.\n * @returns The extracted page ID or null if invalid.\n */\n private extractNotionPageId(url: string): string | null {\n const notionIdRegex = /[a-f0-9]{32}(?=\\?|$)/;\n const match = url.match(notionIdRegex);\n const notionId = match ? match[0] : null;\n if (!notionId) {\n this.#toastService.error({\n title: 'URL inválido',\n subtitle: 'Por favor ingresa una URL válida de Notion.',\n });\n return null;\n }\n return notionId;\n }\n\n /**\n * Links an existing lesson with a Notion page ID by updating the lesson's extras.\n * @param lesson The current lesson data.\n * @param notionPageId The Notion page ID to link.\n * @returns The updated lesson data from the backend or undefined on failure.\n */\n public async linkLessonWithNotion(lesson: ILesson, notionPageId: string): Promise<ILesson | undefined> {\n if (!lesson || !lesson.id) {\n // Ensure lesson exists and has an ID\n this.#toastService.warn({ title: 'No se puede enlazar', subtitle: 'La lección debe existir y tener un ID.' });\n return undefined;\n }\n\n const updatedLesson = {\n ...lesson,\n extensions: {\n ...(lesson.extensions || {}),\n extras: {\n ...(lesson.extensions?.['extras'] || {}),\n notionPageId: notionPageId,\n },\n },\n };\n\n this.isLoading.set(true);\n try {\n const savedLesson = await this.lessonsService.postLesson(updatedLesson);\n this.#toastService.success({ title: 'Listo', subtitle: 'Se enlazó la lección con Notion.' });\n return savedLesson;\n } catch (error) {\n // Remove explicit type, rely on tsconfig setting\n console.error('Error linking with Notion:', error);\n this.#toastService.error({ title: 'Error al enlazar', subtitle: 'Ocurrió un error inesperado.' });\n return undefined;\n } finally {\n this.isLoading.set(false);\n }\n }\n\n /**\n * Handles the process of importing lesson content from Notion.\n * It prompts the user for a URL if necessary, extracts the ID, fetches content,\n * and potentially links the lesson if it's an existing one.\n * @param currentLesson The current lesson data (can be a new or existing lesson).\n * @param lessonId The current lesson ID (null if it's a new lesson).\n * @returns The fetched HTML content from Notion, or null if the process fails.\n */\n public async importAndLinkLessonFromNotion(currentLesson: ILesson | undefined, lessonId: string | null): Promise<string | null> {\n if (!currentLesson) return null;\n\n let notionPageId: string | null = null;\n\n if (currentLesson.extensions?.['extras']?.['notionPageId']) {\n const useExisting = confirm(`Ya tenemos el id ${currentLesson.extensions?.['extras']?.['notionPageId']} ¿Quieres usar este id para importar?`);\n if (useExisting) {\n notionPageId = currentLesson.extensions?.['extras']?.['notionPageId'];\n } else {\n const inputUrl = prompt('Ingresa la NUEVA URL de Notion para importar (este ID NO se guardará automáticamente si la lección ya existe)');\n if (!inputUrl) return null; // User cancelled\n notionPageId = this.extractNotionPageId(inputUrl);\n }\n } else {\n const inputUrl = prompt('Ingresa el URL de Notion para importar la lección (se enlazará si la lección ya existe)');\n if (!inputUrl) return null; // User cancelled\n notionPageId = this.extractNotionPageId(inputUrl);\n // Link automatically only if we got a valid Notion ID AND the lesson already exists (has an ID)\n if (notionPageId && lessonId) {\n const linkedLesson = await this.linkLessonWithNotion(currentLesson, notionPageId);\n if (!linkedLesson) {\n // Linking failed, maybe stop the import? Or proceed without linking?\n // For now, let's stop.\n this.#toastService.error({ title: 'Error de Enlace', subtitle: 'No se pudo enlazar con Notion antes de importar.' });\n return null;\n }\n // If linking succeeded, the lesson object might have changed, but we proceed with the import using the notionPageId.\n }\n }\n\n if (!notionPageId) {\n this.#toastService.warn({ title: 'Sin ID de Notion', subtitle: 'No se proporcionó un ID de Notion válido para importar.' });\n return null;\n }\n\n this.isLoading.set(true);\n try {\n this.#toastService.info({ title: 'Importando lección...', subtitle: 'Espera unos segundos' });\n const md = await this.#notionService.getPageInSpecificFormat(notionPageId, NotionExportType.HTML);\n console.log('Imported MD/HTML:', md);\n this.#toastService.success({ title: 'Contenido Importado', subtitle: 'Contenido de Notion obtenido.' });\n return md.content; // Return the fetched content\n } catch (error) {\n // Remove explicit type, rely on tsconfig setting\n console.error('Error importing from Notion:', error);\n this.#toastService.error({ title: 'Error de importación', subtitle: 'Ocurrió un error inesperado.' });\n return null; // Return null on failure\n } finally {\n this.isLoading.set(false);\n }\n }\n\n /**\n * Fetches content from the linked Notion page for AI improvement (placeholder).\n * @param lesson The current lesson data.\n */\n public async improveLessonWithNotionAI(lesson: ILesson | undefined): Promise<void> {\n if (!lesson) return;\n const notionId = lesson.extensions?.['extras']?.['notionPageId'];\n\n if (!notionId) {\n this.#toastService.warn({ title: 'Sin ID de Notion', subtitle: 'Enlaza la lección con Notion primero.' });\n return;\n }\n\n this.isLoading.set(true);\n try {\n this.#toastService.info({ title: 'Mejorando con IA...', subtitle: 'Obteniendo contenido de Notion.' });\n const md = await this.#notionService.getPageInSpecificFormat(notionId, NotionExportType.HTML);\n console.log('Content to improve:', md);\n // TODO: Add actual AI improvement logic here\n // e.g., call another service: await this.aiImprovementService.improve(md.content);\n // Then potentially update the lesson via lessonService or return data\n this.#toastService.success({ title: 'Contenido Obtenido', subtitle: 'Listo para mejorar con IA (lógica no implementada).' });\n } catch (error) {\n // Remove explicit type, rely on tsconfig setting\n console.error('Error improving with AI:', error);\n this.#toastService.error({ title: 'Error de IA', subtitle: 'Ocurrió un error inesperado.' });\n } finally {\n this.isLoading.set(false);\n }\n }\n}\n","import { Injectable, inject, WritableSignal } from '@angular/core';\nimport { ILesson, LESSONS_TOKEN, DynamicContentComponent } from '../components/lesson-mini-components/components/lessons.clases'; // Added DynamicContentComponent, ContentMetadata\nimport { LoadingBarService, TOAST_ALERTS_TOKEN } from '@dataclouder/ngx-core';\nimport { ChatRole, CONVERSATION_AI_TOKEN } from '@dataclouder/ngx-agent-cards';\nimport { DefaultLessonsService } from './default-lessons.service';\n\n@Injectable({\n providedIn: 'root', // Provide globally or in a specific module if preferred\n})\nexport class LessonUtilsService {\n public lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n #toastService = inject(TOAST_ALERTS_TOKEN);\n #agentService = inject(CONVERSATION_AI_TOKEN);\n\n loadingBarService = inject(LoadingBarService);\n\n /**\n * Validates if audios need generation for the given lesson.\n * Currently logs a placeholder message.\n * @param lesson The lesson object (or signal) to validate.\n */\n public validateAudios(lesson: ILesson | undefined): void {\n // Access lesson data directly\n if (!lesson?.components) {\n return;\n }\n // Placeholder logic - adapt as needed from original component\n console.log('Validating audios for lesson:', lesson.id);\n }\n\n /**\n * Updates the lesson signal with a new banner image in metadata.\n * @param lessonSignal The signal holding the lesson data.\n * @param imageUploaded The image data object from the upload event. Should conform to LessonImage structure partially.\n */\n public uploadCover(lessonSignal: WritableSignal<ILesson | undefined>, imageUploaded: any): void {\n lessonSignal.update((currentLesson) => {\n if (!currentLesson) return undefined;\n\n const assets = { ...(currentLesson.assets ?? {}) };\n assets.banner = imageUploaded;\n\n return {\n ...currentLesson,\n assets,\n };\n });\n }\n\n // I want to deprecate this method\n\n /**\n * @deprecated Use create new method.\n * Generates lesson content using AI. Assumes the lesson is already saved.\n * @param lessonId The ID of the lesson to generate content for.\n * @returns The updated lesson object after AI generation, or null on failure.\n */\n public async generateByAI(lessonId: string): Promise<ILesson | null> {\n if (!lessonId) {\n this.#toastService.warn({ title: 'ID Requerido', subtitle: 'Se necesita un ID de lección para usar IA.' });\n return null;\n }\n\n // No need to save here, component should ensure it's saved before calling.\n try {\n await this.lessonsService.postGenerateByAI(lessonId);\n // Re-fetch the lesson data to get AI updates\n const updatedLesson = await this.lessonsService.getLesson(lessonId);\n if (updatedLesson) {\n this.#toastService.success({ title: 'IA completada', subtitle: 'Lección actualizada con IA.' });\n return updatedLesson;\n } else {\n throw new Error('Failed to fetch lesson after AI generation');\n }\n } catch (error: any) {\n // Type the error object\n console.error('Error during AI generation in service:', error);\n this.#toastService.error({ title: 'Error de IA', subtitle: 'No se pudo generar la lección con IA.' });\n return null; // Return null in catch block\n }\n // Loading state should be managed by the component calling this service.\n }\n\n /**\n * Improves the provided Markdown text using AI and updates the lesson.\n * Assumes the lesson is already saved before calling this.\n * @param lesson The lesson object containing the prompt and other context.\n * @param markdownText The Markdown text generated from the lesson's HTML content.\n * @returns The improved Markdown string, or null on failure.\n */\n public async improveMDWithAI(lesson: ILesson, markdownText: string): Promise<string | null> {\n if (!markdownText) {\n this.#toastService.warn({ title: 'Texto Requerido', subtitle: 'Se necesita texto Markdown para mejorar con IA.' });\n return null;\n }\n\n try {\n this.loadingBarService.showIndeterminate();\n\n const textPrompt = this.lessonsService.getPrompts().content(lesson);\n\n const messages = [{ content: textPrompt, role: ChatRole.User }];\n\n const response = await this.#agentService.callChatCompletion({ messages, model: { provider: 'google' } });\n let improvedMarkdown = (response.content as string)?.trim() ?? null;\n\n // Remove potential markdown fences\n const markdownFenceStart = '```markdown\\n';\n const markdownFenceEnd = '\\n```';\n if (improvedMarkdown?.startsWith(markdownFenceStart) && improvedMarkdown.endsWith(markdownFenceEnd)) {\n improvedMarkdown = improvedMarkdown.slice(markdownFenceStart.length, -markdownFenceEnd.length);\n } else {\n // Also handle cases where it might just be ``` at the start/end\n const simpleFence = '```';\n if (improvedMarkdown?.startsWith(simpleFence)) {\n improvedMarkdown = improvedMarkdown.slice(simpleFence.length);\n }\n if (improvedMarkdown?.endsWith(simpleFence)) {\n improvedMarkdown = improvedMarkdown.slice(0, -simpleFence.length);\n }\n }\n // Trim any leading/trailing whitespace that might remain after removing fences\n improvedMarkdown = improvedMarkdown?.trim() ?? null;\n\n console.log('Improved Markdown:', improvedMarkdown);\n\n return improvedMarkdown; // Return only the string\n } catch (error: any) {\n console.error('Error during AI Markdown improvement in service:', error);\n this.#toastService.error({ title: 'Error de IA', subtitle: 'No se pudo mejorar la lección con IA.' });\n return null; // Return null in catch block\n } finally {\n this.loadingBarService.successAndHide();\n }\n }\n\n /**\n * Generates a concise description for the lesson using AI based on its content.\n * @param lesson The lesson object containing the content.\n * @returns A promise resolving to the generated description string, or null on failure.\n */\n public async generateDescriptionWithAI(lesson: ILesson): Promise<string | null> {\n if (!lesson || !lesson.textCoded) {\n this.#toastService.warn({ title: 'Contenido Requerido', subtitle: 'Se necesita contenido en la lección para generar una descripción.' });\n return null;\n }\n\n try {\n this.loadingBarService.showIndeterminate(); // Corrected: No argument needed\n\n // Extract plain text from the lesson's HTML content\n const plainTextContent = this._extractTextFromHtml(lesson.textCoded);\n if (!plainTextContent || plainTextContent.trim().length === 0) {\n this.#toastService.warn({ title: 'Texto Vacío', subtitle: 'No se pudo extraer texto útil del contenido de la lección.' });\n return null;\n }\n\n const descriptionPrompt = this.lessonsService.getPrompts().description(lesson);\n\n const messages = [{ content: descriptionPrompt, role: ChatRole.User }];\n\n const response = await this.#agentService.callChatCompletion({ messages, model: { provider: 'google' } });\n\n let generatedDescription = (response.content as string)?.trim() ?? null;\n\n // Basic cleanup (remove potential quotes if the AI wraps the response)\n if (generatedDescription && generatedDescription.startsWith('\"') && generatedDescription.endsWith('\"')) {\n generatedDescription = generatedDescription.substring(1, generatedDescription.length - 1);\n }\n\n if (generatedDescription) {\n this.#toastService.success({ title: 'Descripción Generada', subtitle: 'Se generó la descripción con IA.' });\n return generatedDescription;\n } else {\n throw new Error('AI did not return a valid description.');\n }\n } catch (error: any) {\n console.error('Error during AI description generation in service:', error);\n this.#toastService.error({ title: 'Error de IA', subtitle: 'No se pudo generar la descripción con IA.' });\n return null;\n } finally {\n this.loadingBarService.successAndHide();\n }\n }\n\n /**\n * Extracts plain text from an HTML string, removing encoded JSON components.\n * @param htmlInput The HTML string potentially containing encoded JSON (~...~).\n * @returns The plain text representation.\n */\n private _extractTextFromHtml(htmlInput: string): string {\n if (!htmlInput) return '';\n\n // 1. Replace encoded JSON blocks with their 'settings.text' or an empty string\n const jsonRegex = /~(.+?)~/g;\n const textWithPlaceholders = htmlInput.replace(jsonRegex, (match, jsonCoded) => {\n try {\n const decodedJson = jsonCoded.replace(/\"/g, '\"').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');\n const data = JSON.parse(decodedJson);\n return data?.settings?.text || ''; // Return text or empty string if not found\n } catch (error) {\n console.error('Failed to parse JSON inside HTML during text extraction:', jsonCoded, error);\n return ''; // Return empty string on error\n }\n });\n\n // 2. Strip remaining HTML tags to get plain text\n // Create a temporary DOM element to parse the HTML\n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = textWithPlaceholders;\n // Use textContent to get the plain text, effectively stripping tags\n // Replace multiple whitespace characters (including newlines) with a single space\n return (tempDiv.textContent || tempDiv.innerText || '').replace(/\\s+/g, ' ').trim();\n }\n\n /**\n * Cleans orphaned components from the lesson's dynamicComponents.\n * An orphaned component is one present in dynamicComponents but its ID is not found in the textCoded HTML.\n * @param lesson The lesson object to clean.\n * @returns A new lesson object with orphaned components removed from dynamicComponents.\n */\n public cleanOrphanedComponents(lesson: ILesson): ILesson {\n if (!lesson || !lesson.textCoded || !lesson.dynamicComponents) {\n // Return the original lesson if essential parts are missing\n return lesson;\n }\n\n const textCoded = lesson.textCoded;\n const existingComponents = lesson.dynamicComponents;\n const existingComponentIds = new Set(Object.keys(existingComponents));\n\n // Regex to find \"id\":\"<component_id>\" within the textCoded string\n const idRegex = /\"id\":\"([^\"]+)\"/g;\n const foundIdsInText = new Set<string>();\n let match;\n\n while ((match = idRegex.exec(textCoded)) !== null) {\n const potentialId = match[1];\n // Check if the found ID actually exists in our dynamic components map\n // This ensures we only count IDs that correspond to known components.\n if (existingComponentIds.has(potentialId)) {\n foundIdsInText.add(potentialId);\n }\n }\n\n const orphanedIds: string[] = [];\n const cleanedDynamicComponents: Record<string, DynamicContentComponent> = {};\n\n // Iterate through existing component IDs\n for (const componentId of existingComponentIds) {\n if (foundIdsInText.has(componentId)) {\n // Keep the component if its ID was found in the text\n cleanedDynamicComponents[componentId] = existingComponents[componentId];\n } else {\n // Mark as orphaned if not found\n orphanedIds.push(componentId);\n }\n }\n\n if (orphanedIds.length > 0) {\n console.warn(`[LessonUtilsService] Orphaned components detected and will be removed from lesson data (IDs not found in textCoded):`, orphanedIds);\n this.#toastService.warn({\n title: 'Componentes Huérfanos Detectados',\n subtitle: `Se removerán ${orphanedIds.length} componentes no usados del editor.`,\n // life: 5000, // Removed 'life' property as it might not be supported by ToastData\n });\n }\n\n // Return a new lesson object with the cleaned components\n return {\n ...lesson,\n dynamicComponents: cleanedDynamicComponents,\n };\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';\nimport { TOAST_ALERTS_TOKEN, ToastAlertsAbstractService } from '@dataclouder/ngx-core';\nimport { DynamicComponentsService } from './dynamic-components.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DynamicComponentsBuilderService {\n #dialogService = inject(DialogService);\n #toastService = inject(TOAST_ALERTS_TOKEN);\n #dynamicComponentsService = inject(DynamicComponentsService);\n\n public openComponentBuilder(componentType: string, data: any = null): DynamicDialogRef | undefined {\n const componentToBuild = this.#dynamicComponentsService.getDynamicComponentBuilders(componentType);\n if (!componentToBuild) {\n console.error(`No component builder found for type: ${componentType}`);\n this.#toastService.error({ title: 'Error', subtitle: `Componente desconocido: ${componentType}` });\n return undefined;\n }\n const dialogRef: DynamicDialogRef = this.#dialogService.open(componentToBuild, {\n inputValues: {\n // inputValues was removed in newer PrimeNG versions, use 'data'\n inputs: data.inputs,\n id: data.id,\n },\n\n width: '80vw',\n header: 'Agregar componente',\n closable: true,\n });\n return dialogRef;\n }\n}\n","import { Component, EventEmitter, Output, inject } from '@angular/core'; // Added inject\nimport { CommonModule } from '@angular/common';\n// PrimeNG\nimport { ButtonModule } from 'primeng/button';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog'; // Added DialogService, DynamicDialogRef\n// Project specific\nimport { LessonComponentEnum } from '../../lesson-mini-components/components/lessons.clases';\nimport { DynamicComponentsBuilderService } from '../../dynamic-components/dynamic-components-builder.service';\n\n@Component({\n selector: 'dc-lesson-component-adder',\n standalone: true,\n imports: [CommonModule, ButtonModule, TooltipModule],\n templateUrl: './dc-lesson-component-adder.component.html',\n styleUrls: ['./dc-lesson-component-adder.component.css'],\n providers: [DialogService], // Provide DialogService here\n})\nexport class DCLessonComponentAdderComponent {\n // Services\n #dynamicComponentsBuilderService = inject(DynamicComponentsBuilderService);\n\n @Output() componentAdded = new EventEmitter<any>(); // Changed Output name and type\n\n // Expose enum to the template\n public lessonComponentEnum = LessonComponentEnum;\n\n // Logic to open component builder, now utilizing DynamicComponentsBuilderService\n public openComponentBuilder(type: string): void {\n const dialogRef: DynamicDialogRef | undefined = this.#dynamicComponentsBuilderService.openComponentBuilder(type);\n\n if (dialogRef) {\n // Handle the result and emit the new event\n dialogRef.onClose.subscribe((result) => {\n if (result) {\n console.log('Component builder closed:', result);\n this.componentAdded.emit(result); // Emit the result when dialog closes successfully\n }\n });\n } else {\n // Optional: Log if the dialog couldn't be opened, though the service already logs an error.\n console.warn(`Dialog could not be opened for type via component: ${type}`);\n }\n }\n}\n","<span>Componentes: </span>\n<div style=\"display: flex; gap: 10px; flex-wrap: wrap\">\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.Selector)\"\n pTooltip=\"Agrega un selector con multiples opciones\"\n tooltipPosition=\"bottom\">\n Selector\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.Speaker)\"\n pTooltip=\"Para que una palabra o frase sea reproducible\"\n tooltipPosition=\"bottom\">\n Speaker\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.TextWriter)\"\n pTooltip=\"Escribe una respuesta en un cuadro de texto\"\n tooltipPosition=\"bottom\">\n Text\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.VerbSummary)\"\n pTooltip=\"Muestra la información de un verbo\"\n tooltipPosition=\"bottom\">\n Verb\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.WordSummary)\"\n pTooltip=\"Muestra la información de una palabra\"\n tooltipPosition=\"bottom\">\n Palabra\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.TranslationSwitcher)\"\n pTooltip=\"Muestra el texto pero al pica cambia de idioma\"\n tooltipPosition=\"bottom\">\n Traducción\n </p-button>\n <p-button\n severity=\"info\"\n (click)=\"openComponentBuilder(lessonComponentEnum.PlayWord)\"\n pTooltip=\"Muestra el texto pero al pica cambia de idioma\"\n tooltipPosition=\"bottom\">\n Play Word\n </p-button>\n <!-- Add other buttons here if needed, following the same pattern -->\n</div>\n","import { Component, EventEmitter, Input, Output, WritableSignal, signal, inject, OnInit } from '@angular/core'; // Added inject\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport TurndownService from 'turndown'; // Added TurndownService\nimport { marked } from 'marked'; // Added marked\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TooltipModule } from 'primeng/tooltip'; // Added TooltipModule\nimport { ILesson, LESSONS_TOKEN, ContentMetadata } from '../../lesson-mini-components/components/lessons.clases'; // Added LESSONS_TOKEN and ContentMetadata\nimport { InputGroupModule } from 'primeng/inputgroup';\nimport { LessonUtilsService } from '../../../services/lesson-utils.service'; // Added LessonUtilsService\nimport { TOAST_ALERTS_TOKEN, IManageable, IAuditable } from '@dataclouder/ngx-core'; // Added TOAST_ALERTS_TOKEN\nimport { DividerModule } from 'primeng/divider';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\n\n@Component({\n selector: 'dc-lesson-metadata-editor',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ButtonModule,\n InputTextModule,\n ReactiveFormsModule,\n TooltipModule, // Added TooltipModule\n InputGroupModule,\n DividerModule,\n ],\n templateUrl: './dc-lesson-metadata-editor.component.html',\n styleUrls: ['./dc-lesson-metadata-editor.component.css'],\n})\nexport class DCLessonMetadataEditorComponent implements OnInit {\n // Use signal for input lesson data\n @Input({ required: true }) form;\n\n @Input({ required: true }) lesson!: ILesson; // The lesson data itself\n // @Input({ required: true }) lessonForm!: FormGroup;\n\n @Input({ required: true }) isLoadingLesson!: boolean; // Shared loading state\n\n // Outputs for actions\n @Output() saveRequest = new EventEmitter<void>();\n @Output() importNotionRequest = new EventEmitter<void>();\n @Output() improveNotionRequest = new EventEmitter<void>();\n\n // Injected Services\n #lessonUtilsService = inject(LessonUtilsService);\n #toastService = inject(TOAST_ALERTS_TOKEN);\n private lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n private turndownService = new TurndownService(); // Instantiate TurndownService\n\n ngOnInit(): void {\n // console.log(this.lesson(), this.form);\n }\n\n onManageablePropertyChange(property: keyof IManageable, value: any): void {\n // this.lesson.update((current) => {\n // if (!current) return undefined;\n // const updatedManageable = { ...(current.manageable ?? {}), [property]: value };\n // return { ...current, manageable: updatedManageable as IManageable };\n // });\n }\n\n onAuditablePropertyChange(property: keyof IAuditable, value: any): void {\n // this.lesson.update((current) => {\n // if (!current) return undefined;\n // const updatedAuditable = { ...(current.auditable ?? {}), [property]: value };\n // return { ...current, auditable: updatedAuditable as IAuditable };\n // });\n }\n\n // New methods to handle events with proper casting\n handlePromptInputChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n this.onAuditablePropertyChange('prompt', target.value);\n }\n\n handleStatusChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n this.onManageablePropertyChange('status', target.checked ? 'published' : 'draft');\n }\n\n /**\n * Generates lesson content using AI, saving the current state first.\n * Moved from DCLessonEditorComponent.\n */\n public async generateByAI(): Promise<void> {\n const currentLesson = this.lesson; // Get current value\n if (!currentLesson?.id) {\n this.#toastService.warn({ title: 'Guardar primero', subtitle: 'Guarda la lección antes de usar IA.' });\n return;\n }\n\n this.isLoadingLesson = true;\n try {\n const rawHtmlContent = currentLesson.textCoded || '';\n if (!rawHtmlContent) {\n console.warn('No HTML content found in lesson to process. taking just description');\n this.#toastService.info({ title: 'Contenido lección desde 0', subtitle: 'Solo se usará el prompt' });\n\n const improvedMarkdown = await this.#lessonUtilsService.improveMDWithAI(this.lesson, 'Create content from description');\n // Convert and save the generated content\n await this._convertMarkdownToHtmlAndSave(improvedMarkdown); // Use extracted method\n } else {\n // Clean orphaned and Save before Improve\n const lessonToSave = this.#lessonUtilsService.cleanOrphanedComponents(currentLesson);\n const savedLesson = await this.lessonsService.postLesson(lessonToSave);\n\n if (!savedLesson) {\n this.#toastService.error({ title: 'Error al guardar', subtitle: 'No se pudo guardar antes de generar con IA.' });\n throw new Error('Failed to save before AI generation');\n }\n this.lesson = savedLesson;\n\n // Replace encoded JSON with actual text before Markdown conversion\n const processedHtmlContent = this._extractTextFromEncodedJson(rawHtmlContent);\n\n // Convert the processed HTML (with text instead of JSON) to Markdown\n const markdownText = this.turndownService.turndown(processedHtmlContent);\n\n // Use the updated lesson signal value for AI improvement\n const improvedMarkdown = await this.#lessonUtilsService.improveMDWithAI(this.lesson, markdownText);\n\n // Convert and save the improved content\n await this._convertMarkdownToHtmlAndSave(improvedMarkdown); // Use extracted method\n }\n } catch (error: any) {\n console.error('Error during AI generation process in metadata editor:', error);\n // Service handles specific AI error toasts, maybe add a general one here if needed\n // this.#toastService.error({ title: 'Error General', subtitle: 'Ocurrió un problema durante el proceso de IA.' });\n } finally {\n this.isLoadingLesson = false; // Stop loading\n }\n }\n\n /**\n * Replaces encoded JSON blocks (~...~) in HTML with their 'settings.text' value.\n * Moved from DCLessonEditorComponent.\n * @param htmlInput The HTML string containing encoded JSON.\n * @returns The processed HTML string with text replacements.\n */\n private _extractTextFromEncodedJson(htmlInput: string): string {\n const jsonRegex = /~(.+?)~/g; // Global flag to replace all occurrences\n\n return htmlInput.replace(jsonRegex, (match, jsonCoded) => {\n try {\n // Attempt to decode HTML entities that might be present in the JSON string\n const decodedJson = jsonCoded.replace(/\"/g, '\"').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');\n const data = JSON.parse(decodedJson);\n // Return the text if available, otherwise keep the original match (or an error placeholder)\n return data?.settings?.text || match;\n } catch (error) {\n console.error('Failed to parse JSON inside HTML:', jsonCoded, error);\n return '<!-- invalid component data -->'; // Placeholder for parsing errors\n }\n });\n }\n\n /**\n * Converts improved Markdown content to HTML, updates the lesson signal,\n * and saves the lesson.\n * @param improvedMarkdown The Markdown content generated by AI.\n * @throws Error if the markdown is empty/null or if saving fails.\n */\n private async _convertMarkdownToHtmlAndSave(improvedMarkdown: string | null | undefined): Promise<void> {\n if (improvedMarkdown) {\n // Convert the improved Markdown back to HTML before setting it\n const improvedHtml = marked(improvedMarkdown) as string;\n // Update the signal directly\n // this.lesson.update((current) => (current ? { ...current, textCoded: improvedHtml } : undefined));\n // Save the AI-generated content\n // Ensure lesson() is not undefined before saving\n const lessonToSave = this.lesson;\n if (lessonToSave) {\n await this.lessonsService.postLesson(lessonToSave);\n this.#toastService.success({ title: 'Contenido generado', subtitle: 'Se generó y guardó el contenido con IA.' });\n } else {\n console.error('Lesson signal is undefined, cannot save.');\n this.#toastService.error({ title: 'Error Interno', subtitle: 'No se pudo guardar la lección.' });\n // Throw an error to be caught by the calling method's try/catch\n throw new Error('Lesson signal is undefined during save operation.');\n }\n } else {\n // Log the error, the toast might be handled by the calling service/context\n console.error('AI generation failed or provided markdown was empty.');\n // Let the caller handle the specific user feedback if needed\n // Throw an error to be caught by the calling method's try/catch\n throw new Error('AI generation failed or the resulting markdown was empty.');\n }\n }\n\n /**\n * Calls the LessonUtilsService to generate a description using AI\n * and updates the lesson signal if successful.\n */\n async triggerGenerateDescriptionAI(): Promise<void> {\n const currentLesson = this.lesson;\n if (!currentLesson) {\n this.#toastService.warn({ title: 'Lección no cargada', subtitle: 'Espera a que la lección se cargue.' });\n return;\n }\n\n const generatedDescription = await this.#lessonUtilsService.generateDescriptionWithAI(currentLesson);\n\n if (generatedDescription) {\n // this.form.controls['description'].setValue(generatedDescription);\n }\n }\n}\n","<div>\n <!-- <div style=\"display: flex; gap: 10px; padding: 10px\">\n <p-button label=\"Guardar\" severity=\"primary\" (click)=\"emitSaveRequest()\" />\n <p-button label=\"Importar de Notion\" severity=\"help\" (click)=\"emitImportNotionRequest()\" />\n <p-button label=\"Mejorar Notion con AI\" severity=\"help\" (click)=\"emitImproveNotionRequest()\" />\n </div> -->\n\n <div>\n <div>\n <span>Nombre de La lección</span>\n <input pInputText style=\"width: 100%\" [formControl]=\"form.controls['name']\" type=\"text\" placeholder=\"Agrega un nombre\" />\n </div>\n <!-- <div>\n <span>Título </span>\n <input pInputText style=\"width: 100%\" [formControl]=\"form.controls['title']\" type=\"text\" placeholder=\"Agrega un título\" />\n </div> -->\n\n <div style=\"margin-top: 4px\">\n <span>Descripción </span>\n <p-inputgroup>\n <input pInputText style=\"width: 100%\" [formControl]=\"form.controls['description']\" type=\"text\" placeholder=\"Agrega una descripción\" />\n <p-button\n icon=\"pi pi-sparkles\"\n styleClass=\"p-button-secondary p-button-outlined\"\n pTooltip=\"Generar descripción con IA\"\n tooltipPosition=\"top\"\n [disabled]=\"isLoadingLesson\"\n (click)=\"triggerGenerateDescriptionAI()\" />\n </p-inputgroup>\n </div>\n </div>\n\n <div style=\"display: flex; align-items: center; margin-top: 10px\">\n <input\n pInputText\n style=\"flex: auto; margin-right: 5px\"\n [value]=\"lesson?.auditable?.prompt || ''\"\n (input)=\"handlePromptInputChange($event)\"\n type=\"text\"\n placeholder=\"Prompt para IA (opcional)\" />\n <p-button severity=\"primary\" label=\"Generar con IA\" icon=\"pi pi-sparkles\" [disabled]=\"isLoadingLesson\" (click)=\"generateByAI()\" />\n </div>\n\n <p-divider />\n\n <!-- <div style=\"display: flex; align-items: center; margin-top: 10px; gap: 10px\">\n <input pInputText [value]=\"lesson?.extensions?.['level'] || ''\" type=\"number\" placeholder=\"Nivel\" style=\"width: 80px\" />\n\n @if (lesson?.extensions) {\n <div>\n {{ lesson?.extensions?.['baseLang'] | flagEmoji }} -> {{ lesson?.extensions?.['targetLang'] | flagEmoji }} Lección para hablantes de\n {{ lesson?.extensions?.['baseLang'] | langDesc : 'es' }} que aprenden\n {{ lesson?.extensions?.['targetLang'] | langDesc : 'es' }}\n </div>\n }\n </div> -->\n</div>\n","import { Injectable } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { FormUtilsService } from '@dataclouder/ngx-core';\nimport { inject } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LessonFormEditorService {\n private fb = inject(FormBuilder);\n private formUtils = inject(FormUtilsService);\n\n public readonly formatOptions = [\n { label: 'HTML', value: 'html' },\n { label: 'Markdown', value: 'markdown' },\n ];\n\n createLessonForm() {\n return this.fb.group({\n version: ['1.0'],\n id: [''],\n name: [''],\n description: [''],\n format: ['html'],\n lang: [''],\n characterCard: [],\n conversationSettings: [],\n metaApp: [],\n conversationFlow: [],\n textCoded: [''],\n manageable: this.formUtils.createManageableFormGroup(),\n learnable: this.formUtils.createLearnableFormGroup(),\n });\n }\n}\n","import { Component, ComponentRef, ElementRef, computed, effect, inject, signal, ViewChild, ViewContainerRef, ChangeDetectorRef } from '@angular/core';\nimport { ActivatedRoute, Router, ParamMap } from '@angular/router';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport BalloonEditor from '@ckeditor/ckeditor5-build-balloon-block';\nimport { CKEditorModule } from '@ckeditor/ckeditor5-angular';\n// PrimeNG\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { SelectButtonModule } from 'primeng/selectbutton';\nimport { SplitterModule } from 'primeng/splitter';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { AspectType, IAssetable, ResolutionType, StorageImageSettings } from '@dataclouder/ngx-cloud-storage';\nimport { LoadingBarService, PromptService, EntityBaseFormComponent, DcManageableFormComponent } from '@dataclouder/ngx-core';\n\nimport { DCLessonRendererComponent } from '../dc-lesson-renderer/dc-lesson-renderer.component';\nimport { DialogModule } from 'primeng/dialog';\nimport { AssetsLoaderComponent } from '@dataclouder/ngx-cloud-storage';\nimport { MarkdownService } from 'ngx-markdown';\n\nimport {\n LessonComponentEnum,\n ILesson,\n LessonComponentInterface,\n LESSONS_TOKEN,\n LessonComponentConfiguration,\n} from '../../lesson-mini-components/components/lessons.clases';\n\nimport { LessonNotionService } from '../../../services/lesson-notion.service';\nimport { LessonUtilsService } from '../../../services/lesson-utils.service'; // Import the new utils service\nimport { DCLessonComponentAdderComponent } from '../dc-lesson-component-adder/dc-lesson-component-adder.component'; // Import the component adder\nimport { DCLessonMetadataEditorComponent } from '../dc-lesson-metadata-editor/dc-lesson-metadata-editor.component'; // Import the metadata editor\nimport { ComponentBuildData } from '../../lesson-mini-components/components/ComponentBuilder';\n\nimport { ChatRoleVertex, NgxVertexService } from '@dataclouder/ngx-vertex';\nimport { DefaultLessonsService } from '../../../services/default-lessons.service';\nimport { DynamicComponentsBuilderService } from '../../dynamic-components/dynamic-components-builder.service';\nimport {\n DcAuditableViewerComponent,\n DcExtensionsViewerComponent,\n DcLearnableViewerComponent,\n DcReactionsViewerComponent,\n DcLearnableFormComponent,\n} from '@dataclouder/ngx-core';\nimport { LessonFormEditorService } from './lesson-form.utils.service';\n\n@Component({\n selector: 'dc-lesson-editor',\n templateUrl: './dc-lesson-editor.component.html',\n styleUrls: ['./dc-lesson-editor.component.css'],\n standalone: true,\n imports: [\n ButtonModule,\n CKEditorModule,\n DCLessonRendererComponent,\n FormsModule,\n InputTextModule,\n ReactiveFormsModule,\n SelectButtonModule,\n SplitterModule,\n TooltipModule,\n DCLessonComponentAdderComponent, // Add the component adder here\n DialogModule,\n\n AssetsLoaderComponent,\n DCLessonMetadataEditorComponent,\n DcManageableFormComponent,\n DcLearnableFormComponent,\n ],\n providers: [LessonNotionService], // Provide the service here\n})\nexport class DCLessonEditorComponent extends EntityBaseFormComponent<ILesson> {\n private lessonFormEditorService = inject(LessonFormEditorService);\n private markdownService = inject(MarkdownService);\n\n public override form = this.lessonFormEditorService.createLessonForm();\n public readonly formatOptions = this.lessonFormEditorService.formatOptions;\n\n protected entityCommunicationService = inject(LESSONS_TOKEN);\n\n public htmlTemporal = '';\n\n protected override patchForm(entity: ILesson): void {\n console.log(this.form);\n\n if (this.entity().format === 'markdown') {\n this.htmlTemporal = this.markdownService.parse(entity.markdown) as string;\n } else {\n this.htmlTemporal = entity.textCoded;\n }\n\n // console.log(this.htmlTemporal);\n this.form.patchValue(entity);\n }\n\n // Services\n private activatedRoute = inject(ActivatedRoute); // Re-inject as it's needed for navigation\n private lessonNotionService = inject(LessonNotionService);\n private lessonUtilsService = inject(LessonUtilsService);\n public lessonsService = inject(LESSONS_TOKEN, { optional: true }) ?? inject(DefaultLessonsService);\n private loadingBarService = inject(LoadingBarService);\n private defaultLessonsService = inject(DefaultLessonsService);\n private promptService = inject(PromptService);\n private ngxVertexService = inject(NgxVertexService);\n private dynamicComponentsBuilderService = inject(DynamicComponentsBuilderService);\n\n public isLoadingLesson = signal(false);\n\n // Computed signal to get dynamic components as an array for easier iteration in the template\n readonly dynamicComponentsArray = computed(() => {\n // const currentLesson = this.lesson();\n // if (currentLesson?.dynamicComponents) {\n // return Object.values(currentLesson.dynamicComponents);\n // }\n return []; // Return empty array if no lesson or no dynamic components\n });\n\n // States\n public components: { [key: string]: ComponentRef<LessonComponentInterface> } = {}; // Current Dynamic components\n public editor = BalloonEditor;\n public lessonComponentEnum = LessonComponentEnum;\n\n public coverStorageSettings: StorageImageSettings = {\n path: `lessons/${this.entityId()}/covers`,\n fileName: 'cover',\n cropSettings: { resizeToWidth: 850, aspectRatio: AspectType.RectangleLarge, resolutions: [ResolutionType.Medium] },\n };\n\n /**\n * Updates a specific property on the lesson signal.\n * Used for ngModelChange events to simulate two-way binding with signals.\n * @param property The key of the ILesson property to update.\n * @param value The new value for the property.\n */\n public updateLessonProperty<K extends keyof ILesson>(property: K, value: ILesson[K]): void {\n console.log('Updating property:', property, value);\n this.entity.update((currentLesson) => {\n if (!currentLesson) return undefined;\n return { ...currentLesson, [property]: value };\n });\n }\n\n public updateHtmlTextCoded(_: string, value: string): void {\n this.entity.update((currentLesson) => {\n if (!currentLesson) return undefined;\n return { ...currentLesson, textCoded: value };\n });\n this.form.controls.textCoded.setValue(value);\n }\n\n public onAssetsChange(updatedAssets: IAssetable): void {\n console.log(updatedAssets);\n this.entity.update((currentLesson) => {\n if (!currentLesson) return undefined;\n return { ...currentLesson, assets: updatedAssets };\n });\n }\n\n public async saveLesson(event?: Event): Promise<ILesson | undefined> {\n // TODO: Revisar por ahora uso el método del padre para guardar. pero creo que este era para guardar la lección.\n event?.preventDefault();\n\n const currentLesson = this.entity();\n if (!currentLesson) {\n this.toastService.error({ title: 'Error', subtitle: 'No hay datos de lección para guardar' });\n return undefined;\n }\n\n // Clean orphaned components before saving\n const lessonToSave = this.lessonUtilsService.cleanOrphanedComponents(currentLesson);\n\n // TODO: Implement optimization for saving only changed data.\n // This requires comparing lessonToSave with the initially fetched state.\n this.isLoadingLesson.set(true); // Indicate saving\n try {\n // Use the cleaned lesson object for saving\n const savedLesson = await this.lessonsService.postLesson(lessonToSave);\n const currentId = this.entityId();\n\n if (!currentId) {\n // No se como guardar los extras aunt\n\n // It was a new lesson, now it has an ID. Navigate.\n this.toastService.success({ title: 'Se creó la lección', subtitle: 'Éxito' });\n // The effect should automatically fetch the lesson again after navigation due to paramMap change.\n this.router.navigate(['./', savedLesson.id], { relativeTo: this.activatedRoute });\n } else {\n // It was an existing lesson, update the signal with the potentially updated data from the backend.\n this.entity.set(savedLesson);\n this.toastService.info({ title: 'Se guardaron los cambios en la lección', subtitle: 'Guardado' });\n // Call the service method for validation\n this.lessonUtilsService.validateAudios(this.entity());\n }\n return savedLesson;\n } catch (error: any) {\n // Type error\n console.error('Error saving lesson:', error);\n this.toastService.error({ title: 'Error al guardar', subtitle: 'No se pudieron guardar los cambios' });\n return undefined;\n } finally {\n this.isLoadingLesson.set(false); // Finish saving indication\n }\n }\n\n // Removed openComponentBuilder method\n\n /**\n * Handles the event emitted when a component is added via the adder component.\n * @param result The configuration data returned from the component builder dialog. Expected format: { obj: LessonComponentConfiguration }\n */\n public onComponentAdded(result: ComponentBuildData): void {\n // Check if result and result.obj.id exist\n\n const newComponent = result?.obj;\n if (newComponent?.id) {\n console.log('Component builder closed, result received in editor:', newComponent);\n\n // Update the lesson signal, adding the transformed component to the dynamicComponents object\n this.entity.update((currentLesson: any) => {\n if (!currentLesson) return undefined;\n\n // Ensure dynamicComponents object exists, initialize if not\n const currentDynamicComponents = currentLesson.dynamicComponents || {};\n\n // Create the updated dynamicComponents object\n const updatedDynamicComponents: Record<string, LessonComponentConfiguration<any>> = {\n ...currentDynamicComponents,\n [newComponent.id]: newComponent, // Use component's id as the key\n };\n\n // Return the updated lesson state\n return { ...currentLesson, dynamicComponents: updatedDynamicComponents };\n });\n }\n }\n\n public async improveNotionWithAI(): Promise<void> {\n await this.lessonNotionService.improveLessonWithNotionAI(this.entity());\n }\n\n public showComponentDetails(data: any) {\n alert('showComponentDetails' + JSON.stringify(data));\n }\n\n public async generateBanner() {\n this.toastService.info({ title: 'Generando prompt de sugerencia', subtitle: 'Por favor, espera' });\n\n const prompt = this.lessonsService.getPrompts().banner(this.entity()!);\n\n const geminiRes = await this.ngxVertexService.generateText([{ role: ChatRoleVertex.User, content: prompt }]);\n\n this.promptService\n .openPrompt({\n title: 'Generar Banner',\n initialValue: geminiRes.content || '',\n message: 'Ingresa una idea de lo que quieres ver',\n acceptText: 'Generar',\n cancelText: 'Cancelar',\n })\n .then((promptResult) => {\n if (promptResult) {\n this.loadingBarService.showIndeterminate();\n this.defaultLessonsService.generateBanner(promptResult, this.entityId()).then((result) => {\n if (result) {\n alert('Revisar como actualizar el banner');\n // this.updateLessonProperty('banner', (result as any).banner);\n }\n this.loadingBarService.successAndHide();\n });\n }\n });\n }\n\n public editComponent(comp: any) {\n console.log('Edit component:', comp);\n this.dynamicComponentsBuilderService.openComponentBuilder(comp.component, comp).onClose.subscribe((result) => {\n this.onComponentAdded(result);\n });\n }\n\n public onAssetUpdate(event: { assets: Partial<IAssetable> }) {\n this.entityCommunicationService.partialUpdate(this.entityId(), { assets: event.assets });\n }\n}\n","<div class=\"p-grid\">\n <div class=\"p-col-4\">\n <assets-loader\n [assets]=\"entity()?.assets\"\n storagePath=\"lessons/{{ entityId() }}\"\n (assetsChange)=\"onAssetsChange($event)\"\n (assetUpdate)=\"onAssetUpdate($event)\"></assets-loader>\n </div>\n\n <!-- <div class=\"p-col-4\">\n <h3>Auditable</h3>\n <dc-auditable-viewer [data]=\"entity()?.auditable\"></dc-auditable-viewer>\n </div> -->\n <div class=\"p-col-4\">\n <h3>Gestión</h3>\n <dc-manageable-form [form]=\"form.controls.manageable\"></dc-manageable-form>\n </div>\n <div class=\"p-col-4\">\n <h3>Categorias y Etiquetas</h3>\n <dc-learnable-form [form]=\"form.controls.learnable\"></dc-learnable-form>\n </div>\n <!-- <div class=\"p-col-4\">\n <h3>Reactions</h3>\n <dc-reactions-viewer [data]=\"entity()?.reactions\"></dc-reactions-viewer>\n </div> -->\n\n <!-- <div class=\"p-col-4\">\n <h3>Extensions</h3>\n <dc-extensions-viewer [data]=\"entity()?.extensions\"></dc-extensions-viewer>\n </div> -->\n</div>\n\n<!-- Lesson Metadata Editor -->\n<br />\n<div [formGroup]=\"form\">\n <p-selectButton [options]=\"formatOptions\" formControlName=\"format\" optionLabel=\"label\" optionValue=\"value\" />\n</div>\n<dc-lesson-metadata-editor [lesson]=\"entity()\" [form]=\"form\" [isLoadingLesson]=\"isLoadingLesson()\"></dc-lesson-metadata-editor>\n\n<div style=\"margin-top: 30px\"></div>\n\n<!-- Component Adder -->\n<dc-lesson-component-adder (componentAdded)=\"onComponentAdded($event)\"></dc-lesson-component-adder>\n\n<!-- Display Added Components -->\n<div class=\"added-components-list\" style=\"margin-top: 15px; margin-bottom: 15px\">\n <h4>Componentes Agregados:</h4>\n @if (dynamicComponentsArray().length > 0) {\n <ul>\n @for (comp of dynamicComponentsArray(); track comp.id) {\n <li\n >ID: {{ comp.id }} - Tipo: {{ comp.component }}\n\n <button pButton icon=\"pi pi-info\" (click)=\"showComponentDetails(comp)\"></button>\n <p-button icon=\"pi pi-pencil\" [rounded]=\"true\" severity=\"warn\" (click)=\"editComponent(comp)\"></p-button>\n </li>\n }\n </ul>\n } @else {\n <p>Aún no se han agregado componentes.</p>\n }\n</div>\n\n<hr />\n\n<!-- Text Editor and Renderer -->\n<p-splitter [style]=\"{ height: '80vh' }\">\n <ng-template pTemplate>\n <ckeditor\n (keydown.control.s)=\"saveLesson($event)\"\n class=\"text-editor\"\n [editor]=\"editor\"\n [ngModel]=\"htmlTemporal\"\n (ngModelChange)=\"updateHtmlTextCoded('textCoded', $event)\">\n </ckeditor>\n </ng-template>\n\n <ng-template pTemplate>\n <dc-lesson-renderer class=\"text-editor\" [lessonInput]=\"entity()\"></dc-lesson-renderer>\n </ng-template>\n</p-splitter>\n\n<div class=\"float-button\">\n <p-button icon=\"pi pi-save\" (click)=\"save()\" severity=\"primary\" [rounded]=\"true\" [raised]=\"true\" pTooltip=\"Guardar (Ctrl + S)\"> </p-button>\n</div>\n\n<hr />\n\n<!-- <p-dialog header=\"Prompts\" [modal]=\"true\" [(visible)]=\"promptsVisible\" [style]=\"{ width: '70%' }\">\n <div>\n <h1>Banner</h1>\n <p>{{ prompts?.banner }}</p>\n <h1>Contenido</h1>\n <p>{{ prompts?.content }}</p>\n <h1>Descripción</h1>\n <p>{{ prompts?.description }}</p>\n </div>\n</p-dialog> -->\n","import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'app-lessonsv2',\n template: '<router-outlet></router-outlet>',\n standalone: true,\n imports: [RouterOutlet],\n})\nexport class LessonsV2Component {}\n","import { Component, Input } from '@angular/core';\n\nimport { LessonCompSettings } from './lessons.clases';\n\n@Component({\n selector: 'app-lesson-component',\n template: '<div>no template</div>',\n standalone: true,\n})\n// This is the base class for all the components that are going to be used in the lessons.\nexport class LessonDynamicComponent {\n @Input() settings: LessonCompSettings = {} as LessonCompSettings;\n}\n","import { Injectable, inject } from '@angular/core';\n\nimport { HttpCoreService } from '@dataclouder/ngx-core';\n\nconst Endpoints = {\n courses: 'api/courses',\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CoursesService {\n private httpCoreService: HttpCoreService = inject(HttpCoreService);\n\n // Not sure how to implement this yet.\n\n public getCourses() {\n return this.httpCoreService.get(Endpoints.courses);\n }\n}\n","import { Component, inject, OnInit } from '@angular/core';\nimport { HttpCoreService } from '@dataclouder/ngx-core';\n\n@Component({\n selector: 'ngx-courses-admin',\n templateUrl: './courses-admin.component.html',\n styleUrls: ['./courses-admin.component.scss'],\n standalone: true,\n})\nexport class CoursesAdminComponent implements OnInit {\n private httpCoreService: HttpCoreService = inject(HttpCoreService);\n\n async ngOnInit(): Promise<void> {\n const courses = await this.httpCoreService.get('courses');\n console.log(courses);\n }\n}\n","<p>welcome to courses creation</p>\n","import { Injectable } from '@angular/core';\nimport { EntityCommunicationService } from '@dataclouder/ngx-core';\nimport { ICourse } from './models/courses.model';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CourseService extends EntityCommunicationService<ICourse> {\n constructor() {\n super('courses');\n }\n generateLanguageCourse(base: string, target: string, id: string = ''): Promise<ICourse> {\n return this.httpService.post<ICourse>(`api/courses/generate-language`, { base, target, id });\n }\n autogenerateLessons(id: string): Promise<void> {\n return this.httpService.post<void>(`api/courses/autogenerate-lessons`, { id });\n }\n}\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, input, inject, output, signal, WritableSignal } from '@angular/core';\nimport { CardModule } from 'primeng/card';\nimport { ButtonModule } from 'primeng/button';\n\nimport {\n DCFilterBarComponent,\n ListFilterBarOptions,\n OnActionEvent,\n PaginationBase,\n QuickTableComponent,\n TOAST_ALERTS_TOKEN,\n ToastAlertsAbstractService,\n} from '@dataclouder/ngx-core';\nimport { CourseService } from '../courses.service';\nimport { ICourse } from '../models/courses.model';\nimport { RouterModule } from '@angular/router';\nimport { SpeedDialModule } from 'primeng/speeddial';\nimport { MenuItem } from 'primeng/api';\nimport { DatePipe, SlicePipe } from '@angular/common';\nimport { PaginatorModule } from 'primeng/paginator';\nimport { TableModule } from 'primeng/table';\nimport { TagModule } from 'primeng/tag';\nimport { UserService } from '@dataclouder/ngx-users';\nimport { LangDescTranslation } from '@dataclouder/ngx-core';\n\n@Component({\n selector: 'app-course-list',\n imports: [\n CardModule,\n ButtonModule,\n DCFilterBarComponent,\n SpeedDialModule,\n DatePipe,\n SlicePipe,\n PaginatorModule,\n RouterModule,\n TableModule,\n QuickTableComponent,\n TagModule,\n LangDescTranslation,\n ],\n templateUrl: './course-list.component.html',\n styleUrl: './course-list.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CourseListComponent extends PaginationBase implements OnInit {\n // Services\n private toastService = inject<ToastAlertsAbstractService>(TOAST_ALERTS_TOKEN);\n private courseService = inject(CourseService);\n public userService = inject(UserService);\n private cdr = inject(ChangeDetectorRef);\n\n // Inputs\n @Input() viewType: 'table' | 'card' = 'card';\n readonly onlyView = input<boolean>(true);\n readonly onSelect = output<ICourse>();\n\n // States\n courses: WritableSignal<ICourse[]> = signal<ICourse[]>([]);\n columns: any[] = ['name', 'description', 'updatedAt', 'image'];\n filterBarOptions: ListFilterBarOptions = { showActions: true, showCreateButton: true, showViewButton: true };\n\n getCustomButtons(item: any): MenuItem[] {\n return [\n {\n tooltipOptions: { tooltipLabel: 'Ver detalles', tooltipPosition: 'bottom' },\n icon: 'pi pi-eye',\n command: () => this.doAction({ item, action: 'view' }),\n },\n {\n label: 'Editar',\n icon: 'pi pi-pencil',\n command: () => this.doAction({ item, action: 'edit' }),\n },\n {\n label: 'Eliminar',\n icon: 'pi pi-trash',\n command: () => this.doAction({ item, action: 'delete' }),\n },\n ];\n }\n\n async ngOnInit(): Promise<void> {\n const user: any = this.userService.user();\n const targetLang = user?.settings?.['targetLanguage'];\n const baseLang = user?.settings?.['baseLanguage'];\n // console.log(user?.settings?.['targetLanguage']);\n this.filterConfig.filters = { baseLang: baseLang, targetLang: targetLang };\n this.filterConfig.returnProps = { _id: 1, id: 1, name: 1, description: 1, updatedAt: 1, image: 1, baseLang: 1, targetLang: 1, auditable: 1 };\n\n // this.filterConfig.filters = { targetLang: 'de', baseLang: 'es' };\n\n const response = await this.courseService.query(this.filterConfig);\n this.courses.set(response.rows);\n this.cdr.detectChanges();\n console.log(this.courses(), this.viewType);\n this.cdr.detectChanges();\n }\n\n protected override loadData(): Promise<void> {\n throw new Error('Method not implemented.');\n }\n\n onNew() {\n console.log('onNew');\n this.router.navigate(['./edit'], { relativeTo: this.route });\n }\n\n public toggleView() {\n this.viewType = this.viewType === 'card' ? 'table' : 'card';\n console.log(this.viewType, this.courses());\n\n this.cdr.detectChanges();\n }\n\n public selectItem(course: ICourse) {\n console.log('onSelect');\n this.onSelect.emit(course);\n }\n\n public override async doAction(actionEvent: OnActionEvent) {\n const { item, action } = actionEvent;\n\n if (action == 'changeView') {\n this.toggleView();\n }\n const id = item.id || item._id;\n\n switch (action) {\n case 'view':\n this.router.navigate(['./details', id], { relativeTo: this.route });\n break;\n case 'delete':\n const areYouSure = confirm('¿Estás seguro de querer eliminar este origen?');\n if (areYouSure) {\n await this.courseService.remove(id);\n this.courses.set(this.courses().filter((course) => course._id !== id));\n this.toastService.success({\n title: 'Origen eliminado',\n subtitle: 'El origen ha sido eliminado correctamente',\n });\n this.cdr.detectChanges();\n }\n break;\n case 'edit':\n this.router.navigate(['./edit', id], { relativeTo: this.route });\n break;\n }\n }\n}\n","@if (!onlyView()) {\n<p-button [icon]=\"viewType === 'card' ? 'pi pi-table' : 'pi pi-list'\" label=\"Change View\" [link]=\"true\" (click)=\"toggleView()\" />\n}\n<div class=\"course-list-container\">\n <dc-filter-bar [isAdmin]=\"userService.isAdmin()\" [options]=\"filterBarOptions\" (onNew)=\"onNew()\" (onFilterAction)=\"doAction($event)\"></dc-filter-bar>\n\n @if (viewType === 'card') {\n <div class=\"course-list-content\">\n @for (course of courses(); track course.id) {\n <div class=\"card-source\">\n <div style=\"position: absolute; top: 4px; right: 4px; z-index: 1000\">\n <p-speeddial\n [model]=\"getCustomButtons(course)\"\n [radius]=\"70\"\n type=\"quarter-circle\"\n direction=\"down-left\"\n [buttonProps]=\"{ severity: 'primary', rounded: true, outlined: true }\"\n [tooltipOptions]=\"{ tooltipPosition: 'top' }\" />\n </div>\n <p-card [header]=\"course.name\">\n <p class=\"m-0\">{{ course.description | slice : 0 : 250 }}...</p>\n <span>{{ course?.auditable?.createdAt | date : 'dd/MM/yyyy HH:mm' }}</span>\n\n <p-tag severity=\"success\" [value]=\"course.baseLang | langDesc : 'es'\" [rounded]=\"true\" />\n ->\n <p-tag severity=\"info\" [value]=\"course.targetLang | langDesc : 'es'\" [rounded]=\"true\" />\n </p-card>\n </div>\n } @if (courses().length === 0) {\n <p-card>\n <p>No courses found</p>\n </p-card>\n }\n </div>\n } @else if ( viewType == 'table'){\n\n <app-quick-table [tableData]=\"courses()\"></app-quick-table>\n\n }\n\n <div class=\"paginator-container\">\n <p-paginator\n currentPageReportTemplate=\"{{ totalRecords }} conversations\"\n [showCurrentPageReport]=\"true\"\n (onPageChange)=\"onPageChange($event)\"\n [totalRecords]=\"totalRecords\"\n [rowsPerPageOptions]=\"[10, 20, 30]\">\n </p-paginator>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { CourseService } from '../courses.service';\nimport { ICourse } from '../models/courses.model';\nimport { CommonModule } from '@angular/common';\nimport { PanelModule } from 'primeng/panel';\nimport { ButtonModule } from 'primeng/button';\nimport { CardModule } from 'primeng/card';\nimport { ProgressSpinnerModule } from 'primeng/progressspinner';\nimport { ToastModule } from 'primeng/toast';\nimport { MessageService } from 'primeng/api';\nimport { TagModule } from 'primeng/tag';\n\n@Component({\n selector: 'app-course-detail',\n imports: [CommonModule, CardModule, PanelModule, ButtonModule, ProgressSpinnerModule, ToastModule, TagModule],\n templateUrl: './course-detail.component.html',\n styleUrl: './course-detail.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MessageService],\n})\nexport class CourseDetailComponent implements OnInit {\n protected entityCommunicationService = inject(CourseService);\n private activatedRoute = inject(ActivatedRoute);\n private messageService = inject(MessageService);\n\n public courseId: string = this.activatedRoute.snapshot.paramMap.get('id') as string;\n\n public course = signal<ICourse | null>(null);\n public generatingLessons = signal(false);\n public generatingLesson = signal('');\n\n ngOnInit(): void {\n this.loadCourse();\n }\n\n public async generatePendingLessons() {\n this.generatingLessons.set(true);\n try {\n await this.entityCommunicationService.autogenerateLessons(this.courseId);\n this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Lessons generated successfully' });\n this.loadCourse();\n } catch (error) {\n this.messageService.add({ severity: 'error', summary: 'Error', detail: 'Error generating lessons' });\n } finally {\n this.generatingLessons.set(false);\n }\n }\n\n public async generateLesson(lessonId: string) {\n this.generatingLesson.set(lessonId);\n try {\n // TODO: Implement the generateLesson method\n // await this.entityCommunicationService.autogenerateLesson(this.courseId, lessonId);\n this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Lesson generated successfully' });\n this.loadCourse();\n } catch (error) {\n this.messageService.add({ severity: 'error', summary: 'Error', detail: 'Error generating lesson' });\n } finally {\n this.generatingLesson.set('');\n }\n }\n\n private async loadCourse() {\n const course = await this.entityCommunicationService.findOne(this.courseId);\n this.course.set(course);\n }\n}\n","@if (course(); as course) {\n<div class=\"course-detail-container p-4\">\n <p-card>\n <ng-template pTemplate=\"title\">\n <div class=\"flex justify-content-between align-items-center\">\n <span>{{ course.name }}</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"subtitle\">\n <div class=\"flex align-items-center gap-2\">\n <i class=\"pi pi-book\"></i>\n <span>{{ course.moduleCount }} Modules / {{ course.totalLessons }} Lessons</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\">\n <p>{{ course.description }}</p>\n\n <div class=\"grid mt-3\">\n @for (module of course.modules; track module.id) {\n <div class=\"col-12 md:col-6\">\n <p-panel [toggleable]=\"true\">\n <ng-template pTemplate=\"header\">\n <div class=\"flex align-items-center gap-2 w-full\">\n <i class=\"pi pi-list\"></i>\n <span class=\"font-bold white-space-nowrap\">{{ module.title }}</span>\n <span class=\"text-sm text-color-secondary ml-auto\">{{ module.lessonCount }} lessons</span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\">\n <p>{{ module.description }}</p>\n <ul class=\"list-none p-0 m-0 lessons-list\">\n @for (lesson of module.lessons; track lesson.id) {\n <li class=\"flex align-items-center justify-content-between p-2 border-bottom-1 surface-border\">\n <div class=\"flex align-items-center gap-2\">\n @if(lesson.generated) {\n <i class=\"pi pi-play-circle text-green-500\"></i>\n } @else {\n <i class=\"pi pi-lock text-gray-500\"></i>\n }\n <span>{{ lesson.title }}</span>\n </div>\n @if(lesson.generated) {\n <p-button icon=\"pi pi-chevron-right\" [text]=\"true\" [rounded]=\"true\"></p-button>\n } @else {\n <p-button label=\"Generate\" icon=\"pi pi-cog\" [text]=\"true\" size=\"small\"></p-button>\n }\n </li>\n }\n </ul>\n </ng-template>\n </p-panel>\n </div>\n }\n </div>\n </ng-template>\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-content-end\">\n <p-button label=\"Generate Pending Lessons\" icon=\"pi pi-cogs\" (onClick)=\"generatePendingLessons()\" [loading]=\"generatingLessons()\"></p-button>\n </div>\n </ng-template>\n </p-card>\n</div>\n} @else {\n<div class=\"flex justify-content-center align-items-center h-full\">\n <p-progressSpinner></p-progressSpinner>\n</div>\n}\n","import { ChangeDetectionStrategy, Component, effect, inject, OnInit, output } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { ICourse } from '../models/courses.model';\nimport { CourseService } from '../courses.service';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { CardModule } from 'primeng/card';\nimport { ButtonModule } from 'primeng/button';\nimport { SelectModule } from 'primeng/select';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { TextareaModule } from 'primeng/textarea';\nimport { ChipModule } from 'primeng/chip';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { AspectType, CropperComponentModal, ResolutionType, BasicStorage } from '@dataclouder/ngx-cloud-storage';\nimport { EntityBaseFormComponent, getSupportedLanguageOptions, LoadingBarService } from '@dataclouder/ngx-core';\nimport { FormlyFieldConfig, FormlyModule } from '@ngx-formly/core';\nimport { DialogModule } from 'primeng/dialog';\nimport { MessageModule } from 'primeng/message';\nimport { RouterLink } from '@angular/router';\nimport { UserService } from '@dataclouder/ngx-users';\n\n@Component({\n selector: 'app-source-form',\n imports: [\n ReactiveFormsModule,\n CardModule,\n TextareaModule,\n ButtonModule,\n SelectModule,\n InputTextModule,\n ChipModule,\n TooltipModule,\n CropperComponentModal,\n FormlyModule,\n DialogModule,\n MessageModule,\n RouterLink,\n ],\n templateUrl: './course-form.component.html',\n styleUrl: './course-form.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class CourseFormComponent extends EntityBaseFormComponent<ICourse> implements OnInit {\n private userService = inject(UserService);\n protected entityCommunicationService = inject(CourseService);\n private loadingBarService = inject(LoadingBarService);\n private fb = inject(FormBuilder);\n public languageOptions = getSupportedLanguageOptions('en');\n\n constructor() {\n super();\n effect(() => {\n console.log(this.entity());\n });\n }\n ngOnInit(): void {\n this.form.patchValue({ baseLang: this.userService.user()?.['baseLang'] });\n this.form.patchValue({ targetLang: this.userService.user()?.['targetLang'] });\n }\n\n public form: FormGroup = this.fb.group({\n name: ['', Validators.required],\n description: [''],\n image: [{} as BasicStorage],\n targetLang: ['', Validators.required],\n baseLang: ['', Validators.required],\n });\n\n readonly onSave = output<any>();\n\n public storageImgSettings = {\n path: `courses`,\n cropSettings: { aspectRatio: AspectType.Square, resolutions: [ResolutionType.MediumLarge], resizeToWidth: 700 },\n };\n\n extraFields: FormlyFieldConfig[] = [\n { key: 'title', type: 'input', props: { label: 'Title', placeholder: 'Title', required: false } },\n { key: 'content', type: 'textarea', props: { label: 'Content', placeholder: 'Content', required: false } },\n ];\n\n protected override patchForm(entity: ICourse): void {\n this.form.patchValue(entity);\n }\n\n public override async save(): Promise<ICourse | undefined> {\n this.toastService.success({ title: 'Course', subtitle: 'Data was saved' });\n const result = await super.save();\n if (result) {\n this.onSave.emit(result);\n if (this.toastService) {\n this.toastService.success({ title: 'Course', subtitle: 'Data was saved' });\n }\n }\n return result;\n }\n\n public handleImageUpload(event: any) {\n this.form.patchValue({ image: event });\n }\n public async generateCourse(): Promise<void> {\n const { baseLang, targetLang } = this.form.value;\n if (baseLang && targetLang) {\n this.toastService.info({ title: 'Course Generating', subtitle: 'Este proceso puede tomar unos minutos' });\n this.loadingBarService.showIndeterminate();\n const course = await this.entityCommunicationService.generateLanguageCourse(baseLang, targetLang, this.entity()?.id);\n this.form.patchValue(course);\n if (this.toastService) {\n this.toastService.success({ title: 'Course Generated', subtitle: 'Course content has been generated successfully.' });\n }\n this.loadingBarService.successAndHide();\n }\n }\n}\n","<h3>Courses Form</h3>\n\n<div class=\"source-form-card\">\n <p-card [header]=\"entityId() ? 'Edit Course' : 'New Course'\">\n <form [formGroup]=\"form\">\n <div class=\"form-field\">\n <label for=\"baseLang\">Base Language <span pTooltip=\"Select the primary language for the conversation\">ℹ️</span></label>\n <p-select\n id=\"baseLang\"\n [options]=\"languageOptions\"\n [filter]=\"true\"\n formControlName=\"baseLang\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"'Select Language'\"></p-select>\n </div>\n <div class=\"form-field\">\n <label for=\"targetLang\">Target Language <span pTooltip=\"Select the primary language for the conversation\">ℹ️</span></label>\n <p-select\n id=\"targetLang\"\n [filter]=\"true\"\n [options]=\"languageOptions\"\n formControlName=\"targetLang\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"'Select Language'\"></p-select>\n </div>\n\n <div style=\"display: flex; gap: 10px\">\n <div class=\"form-field\">\n <label class=\"block\" pTooltip=\"Image should be handle after upload\">Subir imagen</label>\n <img width=\"218px\" src=\"assets/images/face-3.jpg\" />\n <dc-cropper-modal [imgStorageSettings]=\"storageImgSettings\" (imageUploaded)=\"handleImageUpload($event)\"></dc-cropper-modal>\n </div>\n\n <div style=\"width: 100%\">\n <div class=\"form-field\">\n <label for=\"name\" class=\"block\">Name</label>\n <input pInputText id=\"name\" type=\"text\" formControlName=\"name\" placeholder=\"Enter source name\" />\n </div>\n\n <div class=\"form-field\">\n <label for=\"description\" class=\"block\">Description</label>\n <textarea id=\"description\" pTextarea formControlName=\"description\" rows=\"5\" class=\"w-full\" placeholder=\"Enter source content\"> </textarea>\n </div>\n </div>\n </div>\n </form>\n\n <div>\n @if (entity()?.modules?.length > 0) {\n <p-message severity=\"info\"\n >El curso ya tiene modulos,\n\n <a routerLink=\"../../details/{{ entity()?.id }}\"> <p-button icon=\"pi pi-eye\" label=\"Ver a los detalles\" [link]=\"true\"></p-button></a>\n </p-message>\n } @else {\n <p-message severity=\"warn\">Este curso no tiene modulos intentega generalos abajo.</p-message>\n }\n </div>\n\n <div style=\"display: flex; justify-content: flex-end\">\n <p-button\n (click)=\"generateCourse()\"\n label=\"Generate Course\"\n [disabled]=\"!form.controls['baseLang'].valid || !form.controls['targetLang'].valid\"\n icon=\"pi pi-sparkles\"\n iconPos=\"right\"\n styleClass=\"p-button-secondary\"></p-button>\n <p-button (click)=\"save()\" label=\"Save Course\" [disabled]=\"!form.valid\" icon=\"pi pi-check\" iconPos=\"right\"> </p-button>\n </div>\n </p-card>\n</div>\n","import { Routes } from '@angular/router';\nimport { CoursesComponent } from './courses.component';\nimport { CourseListComponent } from './course-list/course-list.component';\nimport { CourseDetailComponent } from './course-detail/course-detail.component';\nimport { CourseFormComponent } from './course-form/course-form.component';\n\nexport const COURSES_ROUTES: Routes = [\n {\n path: '',\n component: CoursesComponent,\n children: [\n {\n path: '',\n component: CourseListComponent,\n },\n {\n path: 'details/:id',\n component: CourseDetailComponent,\n },\n {\n path: 'edit',\n component: CourseFormComponent,\n },\n {\n path: 'edit/:id',\n component: CourseFormComponent,\n },\n ],\n },\n];\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { COURSES_ROUTES } from './courses.routes';\n\n@Component({\n selector: 'app-courses',\n imports: [RouterModule],\n templateUrl: './courses.component.html',\n styleUrl: './courses.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CoursesComponent {\n public static routes = COURSES_ROUTES;\n}\n","<router-outlet />\n","/*\n * Public API Surface of lessons\n */\n\nexport * from './lib/models/lessons.pipes';\nexport * from './lib/models/notion.models';\nexport * from './lib/models/simple-agents';\n\nexport * from './lib/components/dc-lessons/lesson-list/dc-lesson-list.component';\nexport * from './lib/components/dc-lessons/lesson-form/lesson-form.component';\nexport * from './lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component';\nexport * from './lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component';\nexport * from './lib/components/dc-lessons/lessons.component';\n\nexport * from './lib/services/default-lessons.service';\nexport * from './lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component';\n\nexport * from './lib/components/lesson-mini-components/components/ComponentWithForm';\nexport * from './lib/components/lesson-mini-components/components/lesson-dynamic.component';\nexport * from './lib/components/lesson-mini-components/components/lessons.clases';\nexport * from './lib/components/lesson-mini-components/components/lessons.clases';\nexport * from './lib/components/lesson-mini-components/components/ComponentBuilder';\nexport * from './lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component';\nexport * from './lib/components/lesson-mini-components/components/text-writer/text-writer.component';\n\nexport * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component';\nexport * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component';\n\n// Dynamic components\nexport * from './lib/components/dynamic-components/selector/selector.component';\nexport * from './lib/components/dynamic-components/selector/selector-builder/selector-builder.component';\n// Services\nexport * from './lib/components/dynamic-components/dynamic-components.service';\nexport * from './lib/services/courses.service';\nexport * from './lib/services/lesson-renderer.service';\nexport * from './lib/services/lesson-conversation.service';\nexport * from './lib/components/courses-admin/courses-admin.component';\n\n// Courses\nexport * from './lib/components/courses/courses.component';\nexport * from './lib/components/courses/course-detail/course-detail.component';\nexport * from './lib/components/courses/course-form/course-form.component';\nexport * from './lib/components/courses/course-list/course-list.component';\nexport * from './lib/components/courses/courses.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1","i3","i4","i5","i6","i8"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACO,MAAM,mBAAmB,GAAG;AACjC,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,YAAY;AAChB,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,UAAU;;AAGT,MAAM,qBAAqB,GAAG;AACnC,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,UAAU;AACd,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;;MAOF,gBAAgB,CAAA;AAC3B,IAAA,SAAS,CAAC,IAAY,EAAA;AACpB,QAAA,IAAI,IAAI,KAAK,IAAI,EAAE;AACjB,YAAA,OAAO,MAAM;QACf;AAAO,aAAA,IAAI,IAAI,KAAK,IAAI,EAAE;AACxB,YAAA,OAAO,MAAM;QACf;AAAO,aAAA,IAAI,IAAI,KAAK,IAAI,EAAE;AACxB,YAAA,OAAO,MAAM;QACf;AAAO,aAAA,IAAI,IAAI,KAAK,IAAI,EAAE;AACxB,YAAA,OAAO,MAAM;QACf;AAAO,aAAA,IAAI,IAAI,KAAK,IAAI,EAAE;AACxB,YAAA,OAAO,MAAM;QACf;aAAO;AACL,YAAA,OAAO,EAAE;QACX;IACF;8GAfW,gBAAgB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