@dataclouder/ngx-lessons 0.0.31 → 0.0.33

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.
Files changed (86) hide show
  1. package/README.md +56 -10
  2. package/fesm2022/dataclouder-ngx-lessons.mjs +292 -81
  3. package/fesm2022/dataclouder-ngx-lessons.mjs.map +1 -1
  4. package/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.d.ts +9 -5
  5. package/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.d.ts +3 -1
  6. package/lib/components/lesson-mini-components/components/lessons.clases.d.ts +1 -0
  7. package/lib/models/simple-agents.d.ts +2 -0
  8. package/lib/services/lesson-ai.service.d.ts +15 -2
  9. package/lib/services/lesson-utils.service.d.ts +10 -1
  10. package/package.json +1 -1
  11. package/public-api.d.ts +1 -0
  12. package/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.html +0 -40
  13. package/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.scss +0 -120
  14. package/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.ts +0 -82
  15. package/src/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.css +0 -1
  16. package/src/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.html +0 -46
  17. package/src/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.ts +0 -52
  18. package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.css +0 -90
  19. package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.html +0 -67
  20. package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.scss +0 -0
  21. package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.ts +0 -356
  22. package/src/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.css +0 -1
  23. package/src/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.html +0 -72
  24. package/src/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.ts +0 -60
  25. package/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.html +0 -23
  26. package/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.scss +0 -3
  27. package/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.ts +0 -332
  28. package/src/lib/components/dc-lessons/lesson-form/lesson-form.component.html +0 -5
  29. package/src/lib/components/dc-lessons/lesson-form/lesson-form.component.scss +0 -3
  30. package/src/lib/components/dc-lessons/lesson-form/lesson-form.component.ts +0 -14
  31. package/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.html +0 -30
  32. package/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.scss +0 -17
  33. package/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.ts +0 -170
  34. package/src/lib/components/dc-lessons/lessons.component.ts +0 -10
  35. package/src/lib/components/lesson-mini-components/components/ComponentBuilder.ts +0 -82
  36. package/src/lib/components/lesson-mini-components/components/ComponentWithForm.ts +0 -25
  37. package/src/lib/components/lesson-mini-components/components/lesson-dynamic.component.ts +0 -13
  38. package/src/lib/components/lesson-mini-components/components/lessons.clases.ts +0 -220
  39. package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.html +0 -62
  40. package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.scss +0 -15
  41. package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.ts +0 -70
  42. package/src/lib/components/lesson-mini-components/components/selector/selector.component.html +0 -1
  43. package/src/lib/components/lesson-mini-components/components/selector/selector.component.scss +0 -12
  44. package/src/lib/components/lesson-mini-components/components/selector/selector.component.spec.ts +0 -25
  45. package/src/lib/components/lesson-mini-components/components/selector/selector.component.ts +0 -47
  46. package/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.html +0 -13
  47. package/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.scss +0 -0
  48. package/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.ts +0 -40
  49. package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.html +0 -9
  50. package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.scss +0 -3
  51. package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.ts +0 -33
  52. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.html +0 -24
  53. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.scss +0 -15
  54. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.spec.ts +0 -25
  55. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.ts +0 -29
  56. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.html +0 -4
  57. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.scss +0 -8
  58. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.spec.ts +0 -25
  59. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.ts +0 -61
  60. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.css +0 -3
  61. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.html +0 -9
  62. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.ts +0 -32
  63. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.css +0 -3
  64. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.html +0 -28
  65. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.ts +0 -30
  66. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.html +0 -18
  67. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.scss +0 -3
  68. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.spec.ts +0 -25
  69. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.ts +0 -25
  70. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.html +0 -15
  71. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.scss +0 -27
  72. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.spec.ts +0 -25
  73. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.ts +0 -46
  74. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary-builder/word-summary-builder.component.html +0 -19
  75. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary-builder/word-summary-builder.component.scss +0 -0
  76. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary-builder/word-summary-builder.component.ts +0 -27
  77. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary.component.html +0 -14
  78. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary.component.scss +0 -22
  79. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary.component.ts +0 -51
  80. package/src/lib/models/lessons.pipes.ts +0 -38
  81. package/src/lib/models/models.ts +0 -92
  82. package/src/lib/models/notion.models.ts +0 -43
  83. package/src/lib/services/lesson-ai.service.ts +0 -103
  84. package/src/lib/services/lesson-notion.service.ts +0 -161
  85. package/src/lib/services/lesson-utils.service.ts +0 -181
  86. package/src/public-api.ts +0 -25
@@ -1,29 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { UntypedFormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
3
-
4
- import { ButtonModule } from 'primeng/button';
5
- import { InputTextModule } from 'primeng/inputtext';
6
- import { DynamicDialogRef } from 'primeng/dynamicdialog';
7
-
8
- import { ComponentBuilder } from '../../ComponentBuilder';
9
-
10
- @Component({
11
- selector: 'app-text-writer-buider',
12
- templateUrl: './text-writer-buider.component.html',
13
- styleUrls: ['./text-writer-buider.component.scss'],
14
- standalone: true,
15
- imports: [FormsModule, ReactiveFormsModule, ButtonModule, InputTextModule],
16
- })
17
- export class TextWriterBuiderComponent extends ComponentBuilder implements OnInit {
18
- constructor(
19
- protected override formBuilder: UntypedFormBuilder,
20
- // protected override toastrService: ToastService,
21
- protected override ref: DynamicDialogRef,
22
- ) {
23
- super(formBuilder, null);
24
- }
25
-
26
- override formGroup = this.formBuilder.group({ response: ['', Validators.required], hint: [], explanation: [] });
27
-
28
- ngOnInit(): void {}
29
- }
@@ -1,4 +0,0 @@
1
- <input [class]="this.status" pInputText [formControl]="control" fieldSize="small" type="text" placeholder="Respuesta"
2
- [size]="size" />
3
-
4
- <!-- [ngClass]="{ 'selected-radio': 'true']}" -->
@@ -1,8 +0,0 @@
1
-
2
- .warning{
3
- border-color: #f0ad4e;
4
- }
5
-
6
- .danger{
7
- border-color: #e1211b;
8
- }
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { TextWriterComponent } from './text-writer.component';
4
-
5
- describe('TextWriterComponent', () => {
6
- let component: TextWriterComponent;
7
- let fixture: ComponentFixture<TextWriterComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [TextWriterComponent]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(TextWriterComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,61 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
3
- import { InputTextModule } from 'primeng/inputtext';
4
-
5
- import { ComponentWithForm } from '../ComponentWithForm';
6
- import { LessonComponentConfiguration, LessonComponentInterface } from '../lessons.clases';
7
-
8
- @Component({
9
- selector: 'app-text-writer',
10
- templateUrl: './text-writer.component.html',
11
- styleUrls: ['./text-writer.component.scss'],
12
- standalone: true,
13
- imports: [FormsModule, ReactiveFormsModule, InputTextModule],
14
- })
15
- export class TextWriterComponent extends ComponentWithForm implements OnInit, LessonComponentInterface {
16
- @Input() config: LessonComponentConfiguration;
17
-
18
- constructor() {
19
- super();
20
- }
21
-
22
- public size: number;
23
- // esta por decidir como va a funcionar los hits, explanation and hint.
24
- public hint: string;
25
-
26
- override ngOnInit(): void {
27
- super.ngOnInit();
28
- this.size = this.getSize();
29
- }
30
-
31
- private getSize(): number {
32
- return this.config.settings.response.length < 20 ? this.config.settings.response.length : 20;
33
- }
34
-
35
- public evaluate() {
36
- let result;
37
- if (this.control.value == null) {
38
- result = null;
39
- } else {
40
- result = this.control.value.toLowerCase().trim() == this.config.settings.response.toLowerCase().trim();
41
- }
42
-
43
- if (result) {
44
- this.status = 'success';
45
- } else {
46
- this.status = 'danger';
47
-
48
- this.hint = this.config.settings.explanation;
49
- }
50
-
51
- return result;
52
- }
53
-
54
- public override validate() {
55
- if (this.control.invalid) {
56
- this.status = 'warning';
57
- this.hint = this.config.settings.hint;
58
- }
59
- return true;
60
- }
61
- }
@@ -1,9 +0,0 @@
1
- <button
2
- pButton
3
- style="padding: 0px 2px"
4
- severity="help"
5
- size="small"
6
- (click)="switchTranslation()"
7
- [label]="visibleText"
8
- [text]="true"
9
- [rounded]="true"></button>
@@ -1,32 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
2
-
3
-
4
- import { ButtonModule } from 'primeng/button';
5
-
6
- import { SpeakerCompConfiguration } from '../lessons.clases';
7
-
8
- @Component({
9
- selector: 'app-translation-switcher',
10
- standalone: true,
11
- imports: [ButtonModule],
12
- templateUrl: './translationSwitcher.component.html',
13
- styleUrl: './translationSwitcher.component.css',
14
- changeDetection: ChangeDetectionStrategy.Default,
15
- })
16
- export class TranslationSwitcherComponent implements OnInit {
17
- @Input() config: SpeakerCompConfiguration;
18
-
19
- public visibleText = '';
20
- ngOnInit(): void {
21
- this.visibleText = this.config.settings.text;
22
- console.log('config', this.config);
23
- }
24
-
25
- public switchTranslation() {
26
- if (this.visibleText === this.config.settings.text) {
27
- this.visibleText = this.config.settings.response;
28
- } else {
29
- this.visibleText = this.config.settings.text;
30
- }
31
- }
32
- }
@@ -1,28 +0,0 @@
1
- <div>
2
- <div>
3
- <h5>Constructor de translation switcher</h5>
4
- </div>
5
-
6
- <div>
7
- <form class="builder-form" [formGroup]="formGroup">
8
- <input style="width: 100%" pInputText type="text" nbInput fullWidth formControlName="text" placeholder="Texto para visualizar" />
9
-
10
- <br /><br />
11
-
12
- <input
13
- style="width: 100%"
14
- pInputText
15
- class="form-input"
16
- type=""
17
- nbInput
18
- fullWidth
19
- formControlName="response"
20
- placeholder="Traducción al hacer clic" />
21
- </form>
22
- </div>
23
- <br />
24
- <div>
25
- <p-button (click)="copyToClipboard()" [disabled]="formGroup.invalid" label="Copia Código" [rounded]="true"></p-button>
26
- <p-button (click)="showCode()" [disabled]="formGroup.invalid" label="Mostrar" [rounded]="true" severity="secondary"></p-button>
27
- </div>
28
- </div>
@@ -1,30 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
2
- import { FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';
3
-
4
-
5
- import { ButtonModule } from 'primeng/button';
6
- import { InputTextModule } from 'primeng/inputtext';
7
- import { DynamicDialogRef } from 'primeng/dynamicdialog';
8
-
9
- import { ComponentBuilder } from '../../ComponentBuilder';
10
-
11
- @Component({
12
- selector: 'app-translation-switcher-builder',
13
- standalone: true,
14
- imports: [FormsModule, ReactiveFormsModule, ButtonModule, InputTextModule],
15
- templateUrl: './translationSwitcherBuilder.component.html',
16
- styleUrl: './translationSwitcherBuilder.component.css',
17
- changeDetection: ChangeDetectionStrategy.OnPush,
18
- })
19
- export class TranslationSwitcherBuilderComponent extends ComponentBuilder implements OnInit {
20
- constructor(
21
- protected override formBuilder: FormBuilder,
22
- // protected override toastrService: ToastService,
23
- protected override ref: DynamicDialogRef,
24
- ) {
25
- super(formBuilder, null);
26
- }
27
- // Este componente reutiliza completamente el form del padre y todos los métodos
28
-
29
- ngOnInit(): void {}
30
- }
@@ -1,18 +0,0 @@
1
- <div>
2
- <div>
3
- <h5>Constructor de Selección</h5>
4
- </div>
5
-
6
- <div>
7
- <form [formGroup]="formGroup">
8
- <input type="text" pInputText fullWidth formControlName="text" placeholder="Escribe el verbo" />
9
- </form>
10
- </div>
11
-
12
- <div>
13
- <p-button (click)="copyToClipboard()" [disabled]="formGroup.invalid" label="Copia Código"
14
- [rounded]="true"></p-button>
15
- <p-button (click)="showCode()" [disabled]="formGroup.invalid" label="Mostrar" [rounded]="true"
16
- severity="secondary"></p-button>
17
- </div>
18
- </div>
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { VerbSummaryBuilderComponent } from './verb-summary-builder.component';
4
-
5
- describe('VerbSummaryBuilderComponent', () => {
6
- let component: VerbSummaryBuilderComponent;
7
- let fixture: ComponentFixture<VerbSummaryBuilderComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [VerbSummaryBuilderComponent]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(VerbSummaryBuilderComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,25 +0,0 @@
1
- // import { Component, OnInit } from '@angular/core';
2
- // import { UntypedFormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
3
- // import { ComponentBuilder } from '../../ComponentBuilder';
4
- // import { InputTextModule } from 'primeng/inputtext';
5
- // import { ButtonModule } from 'primeng/button';
6
- // import { DynamicDialogRef } from 'primeng/dynamicdialog';
7
-
8
- // @Component({
9
- // selector: 'app-verb-summary-builder',
10
- // templateUrl: './verb-summary-builder.component.html',
11
- // styleUrls: ['./verb-summary-builder.component.scss'],
12
- // standalone: true,
13
- // imports: [FormsModule, ReactiveFormsModule, InputTextModule, ButtonModule],
14
- // })
15
- // export class VerbSummaryBuilderComponent extends ComponentBuilder implements OnInit {
16
- // constructor(
17
- // protected override formBuilder: UntypedFormBuilder,
18
- // // protected override toastrService: ToastService, // protected ref: NbDialogRef<ComponentBuilder>,
19
- // public override ref: DynamicDialogRef,
20
- // ) {
21
- // super(formBuilder, null);
22
- // }
23
-
24
- // ngOnInit(): void {}
25
- // }
@@ -1,15 +0,0 @@
1
- <p-button [label]="config?.settings?.text" [text]="true" [plain]="true" [rounded]="true" size="small"
2
- (click)="open($event)"></p-button>
3
-
4
- <!-- (click)="open(verbCard)" -->
5
-
6
- <p-overlayPanel #verbCard>
7
-
8
- <div class="panel" *ngIf="verb">
9
- <!-- <p-button *ngIf="!isWordInUserList" label="Agregar a mis Palabras" icon="pi pi-check-circle"
10
- (click)="addToUserWord(word.word)" [rounded]="true"></p-button>
11
- <span *ngIf="isWordInUserList">Tienes palabra en tu vocabulario </span> -->
12
-
13
- <app-word-previewer [word]="verb" wordType="verb"></app-word-previewer>
14
- <!-- <app-learning-examples *ngIf='word' [word]="word"></app-learning-examples> -->
15
- </div>
@@ -1,27 +0,0 @@
1
- .verb-tags{
2
- display: flex;
3
- justify-content: space-evenly;
4
- }
5
-
6
- .max-view{
7
- max-height: 75vh;
8
- }
9
- .definitions{
10
- font-size: 10px;
11
- color: rgb(76, 76, 76);
12
- margin-bottom: -4px;
13
- }
14
-
15
- .header{
16
- display: flex;
17
- justify-content: space-between;
18
- }
19
-
20
- nb-card {
21
- max-width: 700px;
22
- }
23
-
24
- .panel {
25
- max-height: 600px;
26
- overflow-y: auto;
27
- }
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { VerbSummaryComponent } from './verb-summary.component';
4
-
5
- describe('VerbSummaryComponent', () => {
6
- let component: VerbSummaryComponent;
7
- let fixture: ComponentFixture<VerbSummaryComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [VerbSummaryComponent]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(VerbSummaryComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
@@ -1,46 +0,0 @@
1
- // import { Component, Input, OnInit, TemplateRef, ViewChild } from '@angular/core';
2
-
3
- // import { LessonDynamicComponent } from '../lesson-dynamic.component';
4
- // // import { SharedModule } from '../../../../shared/shared.module';
5
- // import { NgIf } from '@angular/common';
6
- // import { DialogService } from 'primeng/dynamicdialog';
7
- // import { ButtonModule } from 'primeng/button';
8
- // import { LessonComponentConfiguration } from '../lessons.clases';
9
- // import { OverlayPanelModule } from 'primeng/overlaypanel';
10
-
11
- // @Component({
12
- // selector: 'app-verb-summary',
13
- // templateUrl: './verb-summary.component.html',
14
- // styleUrls: ['./verb-summary.component.scss'],
15
- // standalone: true,
16
- // imports: [SharedModule, NgIf, ButtonModule, OverlayPanelModule, WordPreviewerComponent],
17
- // })
18
- // export class VerbSummaryComponent extends LessonDynamicComponent {
19
- // constructor(private dialogService: DialogService, private verbService: VerbService, private wordService: WordService) {
20
- // super();
21
- // }
22
- // @Input() config: LessonComponentConfiguration;
23
-
24
- // public verb: EnglishVerb;
25
- // public isVerbInUserList = false;
26
- // @ViewChild('verbCard') verbCard: any;
27
-
28
- // // TODO: arreglar los verbos.
29
-
30
- // async open(event): Promise<void> {
31
- // this.verbCard.toggle(event);
32
- // this.isVerbInUserList = this.verbService.isVerbInUserList(this.config.settings.text);
33
- // this.verb = (await this.wordService.getSingleWord(this.config.settings.text)) as any;
34
- // // this.verb = await this.verbService.getSingleVerb(this.config.settings.text);
35
- // // this.modalRef = this.dialogService.open(dialog, {});
36
- // }
37
-
38
- // public closeModal(): void {
39
- // // this.modalRef.close();
40
- // }
41
-
42
- // public async addToUserVerbs(verb: string): Promise<void> {
43
- // await this.verbService.saveVerbToUserList(verb);
44
- // this.isVerbInUserList = true;
45
- // }
46
- // }
@@ -1,19 +0,0 @@
1
- <div>
2
- <div>
3
- <h5>Constructor de Selección</h5>
4
- </div>
5
-
6
- <div>
7
- <form [formGroup]="formGroup">
8
- <input type="text" pInputText fullWidth formControlName="text" placeholder="Escribe una palabra" />
9
- </form>
10
- </div>
11
- <br>
12
-
13
- <div>
14
- <p-button (click)="copyToClipboard()" [disabled]="formGroup.invalid" label="Copia Código"
15
- [rounded]="true"></p-button>
16
- <p-button (click)="showCode()" [disabled]="formGroup.invalid" label="Mostrar" [rounded]="true"
17
- severity="secondary"></p-button>
18
- </div>
19
- </div>
@@ -1,27 +0,0 @@
1
- // import { Component, OnInit } from '@angular/core';
2
- // import { FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';
3
- // import { ComponentBuilder } from '../../ComponentBuilder';
4
- // import { DynamicDialogRef } from 'primeng/dynamicdialog';
5
- // import { ButtonModule } from 'primeng/button';
6
- // import { InputTextModule } from 'primeng/inputtext';
7
-
8
- // @Component({
9
- // selector: 'app-word-summary-builder',
10
- // templateUrl: './word-summary-builder.component.html',
11
- // styleUrls: ['./word-summary-builder.component.scss'],
12
- // standalone: true,
13
- // imports: [FormsModule, ReactiveFormsModule, ButtonModule, InputTextModule],
14
- // })
15
- // export class WordSummaryBuilderComponent extends ComponentBuilder implements OnInit {
16
- // constructor(
17
- // protected override formBuilder: FormBuilder,
18
- // // protected override toastrService: ToastService,
19
- // public override ref: DynamicDialogRef, // protected ref: NbDialogRef<ComponentBuilder>,
20
- // ) {
21
- // super(formBuilder, null);
22
- // }
23
-
24
- // ngOnInit(): void {
25
- // console.log('WordSummaryBuilderComponent');
26
- // }
27
- // }
@@ -1,14 +0,0 @@
1
- <p-button [label]="config?.settings?.text" [text]="true" [plain]="true" [outlined]="true" size="small"
2
- (click)="open($event)"></p-button>
3
-
4
-
5
- <p-overlayPanel #wordCard>
6
- <div class="panel" *ngIf="word">
7
- <p-button *ngIf="!isWordInUserList" label="Agregar a mis Palabras" icon="pi pi-check-circle"
8
- (click)="addToUserWord(word.word)" [rounded]="true"></p-button>
9
- <span *ngIf="isWordInUserList">Tienes palabra en tu vocabulario </span>
10
-
11
- <app-word-previewer [word]="word" [wordType]="type"></app-word-previewer>
12
- <!-- <app-learning-examples *ngIf='word' [word]="word"></app-learning-examples> -->
13
- </div>
14
- </p-overlayPanel>
@@ -1,22 +0,0 @@
1
- .header{
2
- display: flex;
3
- justify-content: space-between;
4
- }
5
-
6
- .max-view{
7
- max-height: 75vh;
8
- }
9
-
10
-
11
-
12
- .definitions {
13
- font-size: 10px;
14
- color: rgb(76, 76, 76);
15
- margin-bottom: -4px;
16
- }
17
-
18
-
19
- .panel {
20
- max-height: 600px;
21
- overflow-y: auto;
22
- }
@@ -1,51 +0,0 @@
1
- // import { Component, Input, OnInit, ViewChild } from '@angular/core';
2
- // import { LessonDynamicComponent } from '../lesson-dynamic.component';
3
- // // import { WordService } from '../../../../core/data-services/word.service';
4
- // // import { SharedModule } from '../../../../shared/shared.module';
5
- // import { NgIf } from '@angular/common';
6
- // import { DialogService } from 'primeng/dynamicdialog';
7
- // import { LessonComponentConfiguration } from '../lessons.clases';
8
- // import { ButtonModule } from 'primeng/button';
9
- // import { OverlayPanelModule } from 'primeng/overlaypanel';
10
-
11
- // @Component({
12
- // selector: 'app-word-summary',
13
- // templateUrl: './word-summary.component.html',
14
- // styleUrls: ['./word-summary.component.scss'],
15
- // standalone: true,
16
- // imports: [NgIf, ButtonModule, OverlayPanelModule, ButtonModule, WordPreviewerComponent],
17
- // })
18
- // export class WordSummaryComponent extends LessonDynamicComponent implements OnInit {
19
- // public word;
20
- // public isWordInUserList: boolean;
21
-
22
- // @Input() config: LessonComponentConfiguration;
23
- // type: WordType;
24
-
25
- // constructor(private wordService: WordService, private dialogService: DialogService) {
26
- // super();
27
- // }
28
- // @ViewChild('wordCard') wordCard: any;
29
-
30
- // // public modalRef: DialogRef<WordSummaryComponent>;
31
-
32
- // ngOnInit(): void {
33
- // console.log('WordSummaryComponent', this.settings);
34
- // }
35
-
36
- // public async open(event: any): Promise<void> {
37
- // this.wordCard.toggle(event);
38
- // this.isWordInUserList = this.wordService.isWordInUserList(this.settings.text);
39
- // this.word = await this.wordService.getSingleWord(this.config.settings.text);
40
- // console.log('word', this.word);
41
- // }
42
-
43
- // public async addToUserWord(word: string): Promise<void> {
44
- // await this.wordService.saveWordToVocabulary(word);
45
- // this.isWordInUserList = true;
46
- // }
47
-
48
- // public closeModal(): void {
49
- // // this.modalRef.close();
50
- // }
51
- // }
@@ -1,38 +0,0 @@
1
- import { Pipe, type PipeTransform } from '@angular/core';
2
- import { LangCodeDescription, LangCodeDescriptionEs } from '../components/lesson-mini-components/components/lessons.clases';
3
-
4
- @Pipe({
5
- name: 'langDesc',
6
- standalone: true,
7
- })
8
- export class LangDescTranslationPipe implements PipeTransform {
9
- transform(value: string, lang: string): boolean {
10
- if (lang === 'es') {
11
- return LangCodeDescriptionEs[value];
12
- } else {
13
- return LangCodeDescription[value];
14
- }
15
- }
16
- }
17
-
18
- @Pipe({
19
- name: 'flagEmoji',
20
- standalone: true,
21
- })
22
- export class FlagLanguagePipe implements PipeTransform {
23
- transform(lang: string): string {
24
- if (lang === 'en') {
25
- return '🇺🇸';
26
- } else if (lang === 'es') {
27
- return '🇲🇽';
28
- } else if (lang === 'fr') {
29
- return '🇫🇷';
30
- } else if (lang === 'it') {
31
- return '🇮🇹';
32
- } else if (lang === 'pt') {
33
- return '🇧🇷';
34
- } else {
35
- return '';
36
- }
37
- }
38
- }