@dataclouder/ngx-lessons 0.0.30 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/fesm2022/dataclouder-ngx-lessons.mjs +1169 -449
  2. package/fesm2022/dataclouder-ngx-lessons.mjs.map +1 -1
  3. package/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.d.ts +2 -2
  4. package/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.d.ts +11 -0
  5. package/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.d.ts +39 -38
  6. package/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.d.ts +22 -0
  7. package/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.d.ts +32 -37
  8. package/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.d.ts +2 -4
  9. package/lib/components/lesson-mini-components/components/ComponentBuilder.d.ts +7 -2
  10. package/lib/components/lesson-mini-components/components/lessons.clases.d.ts +17 -42
  11. package/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.d.ts +13 -0
  12. package/lib/components/lesson-mini-components/components/speaker/speaker.component.d.ts +12 -0
  13. package/lib/services/lesson-ai.service.d.ts +18 -0
  14. package/lib/services/lesson-notion.service.d.ts +35 -0
  15. package/lib/services/lesson-utils.service.d.ts +34 -0
  16. package/package.json +3 -2
  17. package/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.html +0 -35
  18. package/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.scss +0 -107
  19. package/src/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.ts +0 -82
  20. package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.css +0 -90
  21. package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.html +0 -105
  22. package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.scss +0 -0
  23. package/src/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.ts +0 -318
  24. package/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.html +0 -27
  25. package/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.scss +0 -3
  26. package/src/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.ts +0 -271
  27. package/src/lib/components/dc-lessons/lesson-form/lesson-form.component.html +0 -5
  28. package/src/lib/components/dc-lessons/lesson-form/lesson-form.component.scss +0 -3
  29. package/src/lib/components/dc-lessons/lesson-form/lesson-form.component.ts +0 -14
  30. package/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.html +0 -30
  31. package/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.scss +0 -17
  32. package/src/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.ts +0 -170
  33. package/src/lib/components/dc-lessons/lessons.component.ts +0 -10
  34. package/src/lib/components/lesson-mini-components/components/ComponentBuilder.ts +0 -74
  35. package/src/lib/components/lesson-mini-components/components/ComponentWithForm.ts +0 -25
  36. package/src/lib/components/lesson-mini-components/components/lesson-dynamic.component.ts +0 -13
  37. package/src/lib/components/lesson-mini-components/components/lessons.clases.ts +0 -254
  38. package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.html +0 -58
  39. package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.scss +0 -15
  40. package/src/lib/components/lesson-mini-components/components/selector/selector-builder/selector-builder.component.spec.ts +0 -25
  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 -2
  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 -35
  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.spec.ts +0 -25
  49. package/src/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.ts +0 -27
  50. package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.html +0 -7
  51. package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.scss +0 -3
  52. package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.spec.ts +0 -25
  53. package/src/lib/components/lesson-mini-components/components/speaker/speaker.component.ts +0 -29
  54. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.html +0 -24
  55. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.scss +0 -15
  56. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.spec.ts +0 -25
  57. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.ts +0 -29
  58. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.html +0 -4
  59. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.scss +0 -8
  60. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.spec.ts +0 -25
  61. package/src/lib/components/lesson-mini-components/components/text-writer/text-writer.component.ts +0 -61
  62. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.css +0 -3
  63. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.html +0 -9
  64. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.ts +0 -32
  65. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.css +0 -3
  66. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.html +0 -28
  67. package/src/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.ts +0 -30
  68. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.html +0 -18
  69. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.scss +0 -3
  70. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.spec.ts +0 -25
  71. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary-builder/verb-summary-builder.component.ts +0 -25
  72. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.html +0 -15
  73. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.scss +0 -27
  74. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.spec.ts +0 -25
  75. package/src/lib/components/lesson-mini-components/components/verb-summary/verb-summary.component.ts +0 -46
  76. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary-builder/word-summary-builder.component.html +0 -19
  77. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary-builder/word-summary-builder.component.scss +0 -0
  78. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary-builder/word-summary-builder.component.ts +0 -27
  79. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary.component.html +0 -14
  80. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary.component.scss +0 -22
  81. package/src/lib/components/lesson-mini-components/components/word-summary/word-summary.component.ts +0 -51
  82. package/src/lib/models/lessons.pipes.ts +0 -38
  83. package/src/lib/models/models.ts +0 -92
  84. package/src/lib/models/notion.models.ts +0 -43
  85. package/src/public-api.ts +0 -25
@@ -1,24 +0,0 @@
1
- <div>
2
- <div>
3
- <h5>Constructor de formulario con texto</h5>
4
- </div>
5
-
6
- <div>
7
- <form class="builder-form" [formGroup]="formGroup">
8
- <input pInputText type="text" nbInput fullWidth formControlName="response" placeholder="Respuesta" />
9
-
10
- <input pInputText class="form-input" type="" nbInput fullWidth formControlName="hint"
11
- placeholder="Escribe una pista para esta pregunta" />
12
-
13
- <input pInputText class="form-input" type="text" nbInput fullWidth formControlName="explanation"
14
- placeholder="Excribe una explicación para la respuesta" />
15
- </form>
16
- </div>
17
-
18
- <div>
19
- <p-button (click)="copyToClipboard()" [disabled]="formGroup.invalid" label="Copia Código"
20
- [rounded]="true"></p-button>
21
- <p-button (click)="showCode()" [disabled]="formGroup.invalid" label="Mostrar" [rounded]="true"
22
- severity="secondary"></p-button>
23
- </div>
24
- </div>
@@ -1,15 +0,0 @@
1
- nb-card{
2
- width: 60vw;
3
- }
4
-
5
- .builder-form{
6
- padding: 5px;
7
- }
8
-
9
- .form-input{
10
- margin-top: 10px;
11
- }
12
-
13
- .mar-top{
14
- margin: 5px;
15
- }
@@ -1,25 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { TextWriterBuiderComponent } from './text-writer-buider.component';
4
-
5
- describe('TextWriterBuiderComponent', () => {
6
- let component: TextWriterBuiderComponent;
7
- let fixture: ComponentFixture<TextWriterBuiderComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [TextWriterBuiderComponent]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(TextWriterBuiderComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
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
- import { CommonModule } from '@angular/common';
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: [CommonModule, 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
- import { CommonModule } from '@angular/common';
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: [CommonModule, 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
- // }