ngx-edyta-entity 0.1.20 → 0.2.0

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 (61) hide show
  1. package/fesm2022/ngx-edyta-entity.mjs +124 -106
  2. package/fesm2022/ngx-edyta-entity.mjs.map +1 -1
  3. package/package.json +5 -4
  4. package/types/ngx-edyta-entity.d.ts +989 -0
  5. package/index.d.ts +0 -5
  6. package/lib/canvas.component.d.ts +0 -31
  7. package/lib/canvas.module.d.ts +0 -34
  8. package/lib/entity/entity-bottom-pane/entity-bottom-pane.component.d.ts +0 -18
  9. package/lib/form/form-type/form-type-checkbox/form-type-checkbox.component.d.ts +0 -11
  10. package/lib/form/form-type/form-type-date/form-type-date.component.d.ts +0 -11
  11. package/lib/form/form-type/form-type-input/form-type-input.component.d.ts +0 -11
  12. package/lib/form/form-type/form-type-item/form-type-item.component.d.ts +0 -15
  13. package/lib/form/form-type/form-type-radio/form-type-radio.component.d.ts +0 -11
  14. package/lib/form/form-type/form-type-select/form-type-select.component.d.ts +0 -11
  15. package/lib/form/form-type/form-type-text/form-type-text.component.d.ts +0 -5
  16. package/lib/form/form-type/form-type-ukulele-chords/form-type-ukulele-chords.component.d.ts +0 -8
  17. package/lib/form/form.component.d.ts +0 -20
  18. package/lib/grammar/grammar.component.d.ts +0 -10
  19. package/lib/grammar/item/grammar-item.component.d.ts +0 -10
  20. package/lib/model/learning-entity/central-service.d.ts +0 -19
  21. package/lib/model/learning-entity/convertors/form-learning-entity-content-convertor.d.ts +0 -5
  22. package/lib/model/learning-entity/convertors/grammar-learning-entity-content-convertor.d.ts +0 -5
  23. package/lib/model/learning-entity/convertors/learning-entity-content-convertor.d.ts +0 -4
  24. package/lib/model/learning-entity/convertors/learning-entity-convertor-factory.d.ts +0 -4
  25. package/lib/model/learning-entity/convertors/puzzle-learning-entity-content-convertor.d.ts +0 -7
  26. package/lib/model/learning-entity/convertors/riddle-learning-entity-content-convertor.d.ts +0 -5
  27. package/lib/model/learning-entity/convertors/vocabulary-learning-entity-content-convertor.d.ts +0 -8
  28. package/lib/model/learning-entity/convertors/yes-no-learning-entity-content-convertor.d.ts +0 -5
  29. package/lib/model/learning-entity/form-learning-entity.d.ts +0 -11
  30. package/lib/model/learning-entity/form-learning-entity.type.d.ts +0 -77
  31. package/lib/model/learning-entity/grammar-learning-entity.d.ts +0 -8
  32. package/lib/model/learning-entity/grammar-learning-entity.type.d.ts +0 -32
  33. package/lib/model/learning-entity/interactive-learning-entity.d.ts +0 -14
  34. package/lib/model/learning-entity/learning-entity-factory.d.ts +0 -12
  35. package/lib/model/learning-entity/learning-entity-progress-service.d.ts +0 -6
  36. package/lib/model/learning-entity/learning-entity-service.d.ts +0 -39
  37. package/lib/model/learning-entity/learning-entity.d.ts +0 -70
  38. package/lib/model/learning-entity/puzzle-learning-entity.d.ts +0 -11
  39. package/lib/model/learning-entity/puzzle-learning-entity.type.d.ts +0 -77
  40. package/lib/model/learning-entity/riddle-learning-entity.d.ts +0 -11
  41. package/lib/model/learning-entity/riddle-learning-entity.type.d.ts +0 -45
  42. package/lib/model/learning-entity/vocabulary-learning-entity.d.ts +0 -18
  43. package/lib/model/learning-entity/vocabulary-learning-entity.type.d.ts +0 -42
  44. package/lib/model/learning-entity/yes-no-learning-entity.d.ts +0 -11
  45. package/lib/model/learning-entity/yes-no-learning-entity.type.d.ts +0 -30
  46. package/lib/puzzle/puzzle-base.component.d.ts +0 -22
  47. package/lib/puzzle/puzzle-drop-target.component.d.ts +0 -30
  48. package/lib/puzzle/puzzle-fact/puzzle-fact.component.d.ts +0 -35
  49. package/lib/puzzle/puzzle-option/puzzle-option-dialog/puzzle-option-dialog.component.d.ts +0 -26
  50. package/lib/puzzle/puzzle-option/puzzle-option.component.d.ts +0 -27
  51. package/lib/puzzle/puzzle-option-dialog-base.component.d.ts +0 -16
  52. package/lib/puzzle/puzzle-target/puzzle-target.component.d.ts +0 -31
  53. package/lib/puzzle/puzzle.component.d.ts +0 -45
  54. package/lib/riddle/convertors/riddle-input-convertor.d.ts +0 -4
  55. package/lib/riddle/riddle.component.d.ts +0 -29
  56. package/lib/vocabulary/vocabulary-card-base.component.d.ts +0 -22
  57. package/lib/vocabulary/vocabulary-card-flip/vocabulary-card-flip.component.d.ts +0 -10
  58. package/lib/vocabulary/vocabulary-card-standard/vocabulary-card-standard.component.d.ts +0 -6
  59. package/lib/vocabulary/vocabulary.component.d.ts +0 -25
  60. package/lib/yesno/yes-no.component.d.ts +0 -17
  61. package/public-api.d.ts +0 -19
package/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="ngx-edyta-entity" />
5
- export * from './public-api';
@@ -1,31 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class CanvasComponent {
4
- static _dependencies: {
5
- EventEmitter: {
6
- new (isAsync?: boolean): EventEmitter<any>;
7
- new <T>(isAsync?: boolean): EventEmitter<T>;
8
- readonly prototype: EventEmitter<any>;
9
- };
10
- };
11
- private _title;
12
- private _picture;
13
- private _contentChange;
14
- private _evaluate;
15
- checkButtonText: string;
16
- previousButtonText: string;
17
- nextButtonText: string;
18
- showBottomPane: boolean;
19
- constructor();
20
- get contentChange(): EventEmitter<unknown>;
21
- set contentChange(value: EventEmitter<unknown>);
22
- get evaluate(): EventEmitter<void>;
23
- set evaluate(value: EventEmitter<void>);
24
- get title(): string;
25
- set title(value: string);
26
- get picture(): string | null;
27
- set picture(value: string | null);
28
- onEvaluate(): void;
29
- static ɵfac: i0.ɵɵFactoryDeclaration<CanvasComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<CanvasComponent, "edyta-canvas", never, { "checkButtonText": { "alias": "checkButtonText"; "required": true; }; "previousButtonText": { "alias": "previousButtonText"; "required": true; }; "nextButtonText": { "alias": "nextButtonText"; "required": true; }; "showBottomPane": { "alias": "showBottomPane"; "required": false; }; "title": { "alias": "title"; "required": false; }; "picture": { "alias": "picture"; "required": false; }; }, { "contentChange": "contentChange"; "evaluate": "evaluate"; }, never, ["[breadcrumb]", "[control-panel]", "*"], false, never>;
31
- }
@@ -1,34 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./canvas.component";
3
- import * as i2 from "./entity/entity-bottom-pane/entity-bottom-pane.component";
4
- import * as i3 from "./puzzle/puzzle.component";
5
- import * as i4 from "./puzzle/puzzle-target/puzzle-target.component";
6
- import * as i5 from "./puzzle/puzzle-option/puzzle-option.component";
7
- import * as i6 from "./puzzle/puzzle-option/puzzle-option-dialog/puzzle-option-dialog.component";
8
- import * as i7 from "./puzzle/puzzle-fact/puzzle-fact.component";
9
- import * as i8 from "./grammar/grammar.component";
10
- import * as i9 from "./vocabulary/vocabulary.component";
11
- import * as i10 from "./form/form.component";
12
- import * as i11 from "./form/form-type/form-type-text/form-type-text.component";
13
- import * as i12 from "./form/form-type/form-type-input/form-type-input.component";
14
- import * as i13 from "./form/form-type/form-type-select/form-type-select.component";
15
- import * as i14 from "./form/form-type/form-type-radio/form-type-radio.component";
16
- import * as i15 from "./form/form-type/form-type-checkbox/form-type-checkbox.component";
17
- import * as i16 from "./form/form-type/form-type-date/form-type-date.component";
18
- import * as i17 from "./form/form-type/form-type-ukulele-chords/form-type-ukulele-chords.component";
19
- import * as i18 from "./form/form-type/form-type-item/form-type-item.component";
20
- import * as i19 from "./vocabulary/vocabulary-card-flip/vocabulary-card-flip.component";
21
- import * as i20 from "./vocabulary/vocabulary-card-standard/vocabulary-card-standard.component";
22
- import * as i21 from "./grammar/item/grammar-item.component";
23
- import * as i22 from "./riddle/riddle.component";
24
- import * as i23 from "./yesno/yes-no.component";
25
- import * as i24 from "@angular/common";
26
- import * as i25 from "@angular/router";
27
- import * as i26 from "@angular/forms";
28
- import * as i27 from "ngx-edyta-fe-elements";
29
- import * as i28 from "ngx-edyta-chords";
30
- export declare class CanvasModule {
31
- static ɵfac: i0.ɵɵFactoryDeclaration<CanvasModule, never>;
32
- static ɵmod: i0.ɵɵNgModuleDeclaration<CanvasModule, [typeof i1.CanvasComponent, typeof i2.EntityBottomPaneComponent, typeof i3.PuzzleComponent, typeof i4.PuzzleTargetComponent, typeof i5.PuzzleOptionComponent, typeof i6.PuzzleOptionDialogComponent, typeof i7.PuzzleFactComponent, typeof i8.GrammarComponent, typeof i9.VocabularyComponent, typeof i10.FormComponent, typeof i11.FormTypeTextComponent, typeof i12.FormTypeInputComponent, typeof i13.FormTypeSelectComponent, typeof i14.FormTypeRadioComponent, typeof i15.FormTypeCheckboxComponent, typeof i16.FormTypeDateComponent, typeof i17.FormTypeUkuleleChordsComponent, typeof i18.FormTypeItemComponent, typeof i19.VocabularyCardFlipComponent, typeof i20.VocabularyCardStandardComponent, typeof i21.GrammarItemComponent, typeof i22.RiddleComponent, typeof i23.YesnoComponent], [typeof i24.CommonModule, typeof i25.RouterModule, typeof i26.FormsModule, typeof i27.ElementModule, typeof i28.ChordModule], [typeof i1.CanvasComponent, typeof i2.EntityBottomPaneComponent, typeof i3.PuzzleComponent, typeof i8.GrammarComponent, typeof i9.VocabularyComponent, typeof i10.FormComponent, typeof i22.RiddleComponent, typeof i23.YesnoComponent]>;
33
- static ɵinj: i0.ɵɵInjectorDeclaration<CanvasModule>;
34
- }
@@ -1,18 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { LearningEntity } from '../../model/learning-entity/learning-entity';
3
- import * as i0 from "@angular/core";
4
- export declare class EntityBottomPaneComponent {
5
- private _entity;
6
- private _evaluate;
7
- checkButtonText: string;
8
- previousButtonText: string;
9
- nextButtonText: string;
10
- constructor();
11
- get entity(): LearningEntity;
12
- set entity(entity: LearningEntity);
13
- get evaluate(): EventEmitter<void>;
14
- set evaluate(value: EventEmitter<void>);
15
- onEvaluate(): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<EntityBottomPaneComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<EntityBottomPaneComponent, "edyta-entity-bottom-pane", never, { "checkButtonText": { "alias": "checkButtonText"; "required": true; }; "previousButtonText": { "alias": "previousButtonText"; "required": true; }; "nextButtonText": { "alias": "nextButtonText"; "required": true; }; "entity": { "alias": "entity"; "required": true; }; }, { "evaluate": "evaluate"; }, never, never, false, never>;
18
- }
@@ -1,11 +0,0 @@
1
- import { CanvasComponent } from '../../../canvas.component';
2
- import { Form } from '../../../model/learning-entity/form-learning-entity.type';
3
- import * as i0 from "@angular/core";
4
- export declare class FormTypeCheckboxComponent extends CanvasComponent {
5
- private _content;
6
- get content(): Form.Checkbox;
7
- set content(value: Form.Checkbox);
8
- onChange(): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<FormTypeCheckboxComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<FormTypeCheckboxComponent, "edyta-form-type-checkbox", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, false, never>;
11
- }
@@ -1,11 +0,0 @@
1
- import { CanvasComponent } from '../../../canvas.component';
2
- import { Form } from '../../../model/learning-entity/form-learning-entity.type';
3
- import * as i0 from "@angular/core";
4
- export declare class FormTypeDateComponent extends CanvasComponent {
5
- private _content;
6
- get content(): Form.Date;
7
- set content(value: Form.Date);
8
- onChange(): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<FormTypeDateComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<FormTypeDateComponent, "edyta-form-type-date", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, false, never>;
11
- }
@@ -1,11 +0,0 @@
1
- import { CanvasComponent } from '../../../canvas.component';
2
- import { Form } from '../../../model/learning-entity/form-learning-entity.type';
3
- import * as i0 from "@angular/core";
4
- export declare class FormTypeInputComponent extends CanvasComponent {
5
- private _content;
6
- get content(): Form.Input;
7
- set content(value: Form.Input);
8
- onChange(): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<FormTypeInputComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<FormTypeInputComponent, "edyta-form-type-input", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, false, never>;
11
- }
@@ -1,15 +0,0 @@
1
- import { CanvasComponent } from '../../../canvas.component';
2
- import { Form } from '../../../model/learning-entity/form-learning-entity.type';
3
- import * as i0 from "@angular/core";
4
- export declare class FormTypeItemComponent extends CanvasComponent {
5
- private _content;
6
- get content(): Form.Input | Form.Text | Form.Checkbox | Form.Date | Form.Radio | Form.Select;
7
- set content(value: Form.Input | Form.Text | Form.Checkbox | Form.Date | Form.Radio | Form.Select);
8
- showDecriptionSection(): boolean;
9
- showMedia(): boolean;
10
- showPicture(): boolean;
11
- isPictureAlwaysVisible(): boolean;
12
- onChange(): void;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<FormTypeItemComponent, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<FormTypeItemComponent, "edyta-form-type-item", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, false, never>;
15
- }
@@ -1,11 +0,0 @@
1
- import { CanvasComponent } from '../../../canvas.component';
2
- import { Form } from '../../../model/learning-entity/form-learning-entity.type';
3
- import * as i0 from "@angular/core";
4
- export declare class FormTypeRadioComponent extends CanvasComponent {
5
- private _content;
6
- get content(): Form.Radio;
7
- set content(value: Form.Radio);
8
- onChange(): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<FormTypeRadioComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<FormTypeRadioComponent, "edyta-form-type-radio", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, false, never>;
11
- }
@@ -1,11 +0,0 @@
1
- import { CanvasComponent } from '../../../canvas.component';
2
- import { Form } from '../../../model/learning-entity/form-learning-entity.type';
3
- import * as i0 from "@angular/core";
4
- export declare class FormTypeSelectComponent extends CanvasComponent {
5
- private _content;
6
- get content(): Form.Select;
7
- set content(value: Form.Select);
8
- onChange(): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<FormTypeSelectComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<FormTypeSelectComponent, "edyta-form-type-select", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, false, never>;
11
- }
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class FormTypeTextComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<FormTypeTextComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<FormTypeTextComponent, "edyta-form-type-text", never, {}, {}, never, never, false, never>;
5
- }
@@ -1,8 +0,0 @@
1
- import { Form } from '../../../model/learning-entity/form-learning-entity.type';
2
- import { CanvasComponent } from '../../../canvas.component';
3
- import * as i0 from "@angular/core";
4
- export declare class FormTypeUkuleleChordsComponent extends CanvasComponent {
5
- content: Form.UkuleleChord;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<FormTypeUkuleleChordsComponent, never>;
7
- static ɵcmp: i0.ɵɵComponentDeclaration<FormTypeUkuleleChordsComponent, "edyta-form-type-ukulele-chords", never, { "content": { "alias": "content"; "required": true; }; }, {}, never, never, false, never>;
8
- }
@@ -1,20 +0,0 @@
1
- import { CanvasComponent } from '../canvas.component';
2
- import { FormLearningEntity } from '../model/learning-entity/form-learning-entity';
3
- import { Form } from '../model/learning-entity/form-learning-entity.type';
4
- import * as i0 from "@angular/core";
5
- export declare class FormComponent extends CanvasComponent {
6
- private _entity;
7
- private _formItems;
8
- constructor();
9
- get entity(): FormLearningEntity;
10
- set entity(entity: FormLearningEntity);
11
- get formItems(): Form.Items;
12
- set formItems(form: Form.Items);
13
- onChange(): void;
14
- private _process;
15
- private _prepareState;
16
- private _buildProgressSnapshot;
17
- private _applyProgress2State;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "edyta-form", never, { "entity": { "alias": "entity"; "required": true; }; }, {}, never, never, false, never>;
20
- }
@@ -1,10 +0,0 @@
1
- import { GrammarLearningEntity } from '../model/learning-entity/grammar-learning-entity';
2
- import { CanvasComponent } from '../canvas.component';
3
- import * as i0 from "@angular/core";
4
- export declare class GrammarComponent extends CanvasComponent {
5
- private _entity;
6
- get entity(): GrammarLearningEntity;
7
- set entity(entity: GrammarLearningEntity);
8
- static ɵfac: i0.ɵɵFactoryDeclaration<GrammarComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<GrammarComponent, "edyta-grammar", never, { "entity": { "alias": "entity"; "required": true; }; }, {}, never, never, false, never>;
10
- }
@@ -1,10 +0,0 @@
1
- import { Grammar } from '../../model/learning-entity/grammar-learning-entity.type';
2
- import * as i0 from "@angular/core";
3
- export declare class GrammarItemComponent {
4
- content: Grammar.Item;
5
- showMedia(): boolean;
6
- showPictureOnLeft(): boolean;
7
- showPictureOnRight(): boolean;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<GrammarItemComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<GrammarItemComponent, "edyta-grammar-item", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, false, never>;
10
- }
@@ -1,19 +0,0 @@
1
- import { TranslateService } from '@ngx-translate/core';
2
- export interface LanguageService {
3
- getDefault(): string;
4
- get(): string;
5
- set(language: string): void;
6
- remove(): void;
7
- supportedLanguages(): string[];
8
- }
9
- export interface NotificationService {
10
- info(message: string): void;
11
- success(message: string): void;
12
- warning(message: string): void;
13
- error(message: string): void;
14
- }
15
- export interface CentralService {
16
- getLanguageService(): LanguageService;
17
- getNotificationService(): NotificationService;
18
- getTranslateService(): TranslateService;
19
- }
@@ -1,5 +0,0 @@
1
- import { Form } from '../form-learning-entity.type';
2
- import { LearningEntityContentConvertor } from './learning-entity-content-convertor';
3
- export declare class FormLearningEntityContentConvertor implements LearningEntityContentConvertor {
4
- toInternal(entity: Form.Set): Form.Items;
5
- }
@@ -1,5 +0,0 @@
1
- import { Grammar } from '../grammar-learning-entity.type';
2
- import { LearningEntityContentConvertor } from './learning-entity-content-convertor';
3
- export declare class GrammarLearningEntityContentConvertor implements LearningEntityContentConvertor {
4
- toInternal(entity: Grammar.Set): Grammar.Items;
5
- }
@@ -1,4 +0,0 @@
1
- import { CentralService } from '../central-service';
2
- export interface LearningEntityContentConvertor {
3
- toInternal(entity: unknown, centralService: CentralService): unknown;
4
- }
@@ -1,4 +0,0 @@
1
- import { LearningEntityContentConvertor } from './learning-entity-content-convertor';
2
- export declare class LearningEntityConvertorFactory {
3
- static getContentConvertor(entityType: string): LearningEntityContentConvertor;
4
- }
@@ -1,7 +0,0 @@
1
- import { Original as PuzzleOriginal, Puzzle } from '../puzzle-learning-entity.type';
2
- import { LearningEntityContentConvertor } from './learning-entity-content-convertor';
3
- export declare class PuzzleLearningEntityContentConvertor implements LearningEntityContentConvertor {
4
- toInternal(entity: PuzzleOriginal.Puzzle.Set): Puzzle.Set;
5
- private _shuffle;
6
- private _calculateColor;
7
- }
@@ -1,5 +0,0 @@
1
- import { Riddle } from '../riddle-learning-entity.type';
2
- import { LearningEntityContentConvertor } from './learning-entity-content-convertor';
3
- export declare class RiddleLearningEntityContentConvertor implements LearningEntityContentConvertor {
4
- toInternal(entity: Riddle.Set): Riddle.Content;
5
- }
@@ -1,8 +0,0 @@
1
- import { Vocabulary } from '../vocabulary-learning-entity.type';
2
- import { LearningEntityContentConvertor } from './learning-entity-content-convertor';
3
- import { CentralService } from '../central-service';
4
- export declare class VocabularyLearningEntityContentConvertor implements LearningEntityContentConvertor {
5
- toInternal(entity: Vocabulary.Set, centralService: CentralService): Vocabulary.TransformedItems;
6
- private _deriveMeaningByLanguage;
7
- private _deriveDescriptionByLanguage;
8
- }
@@ -1,5 +0,0 @@
1
- import { Riddle } from '../riddle-learning-entity.type';
2
- import { LearningEntityContentConvertor } from './learning-entity-content-convertor';
3
- export declare class YesNoLearningEntityContentConvertor implements LearningEntityContentConvertor {
4
- toInternal(entity: Riddle.Set): Riddle.Content;
5
- }
@@ -1,11 +0,0 @@
1
- import { Form } from './form-learning-entity.type';
2
- import { InteractiveLearningEntityBase } from './interactive-learning-entity';
3
- export declare class FormLearningEntity extends InteractiveLearningEntityBase {
4
- private _content;
5
- private _progress;
6
- isCheckable(): boolean;
7
- get progress(): Form.Progress;
8
- set progress(progress: Form.Progress);
9
- get content(): Form.Items;
10
- protected _init(entity: Form.Set): void;
11
- }
@@ -1,77 +0,0 @@
1
- import { ChordKey } from 'ngx-edyta-chords';
2
- import { LearningEntityCommon } from './learning-entity';
3
- export declare namespace Form {
4
- type Option = {
5
- id: string;
6
- text: string;
7
- };
8
- type Media = {
9
- url: string;
10
- mimeType: string;
11
- };
12
- type Picture = {
13
- url: string;
14
- alwaysVisible?: boolean;
15
- };
16
- type GenericInput = {
17
- key: string;
18
- type: string;
19
- text: string;
20
- description?: string;
21
- divider?: boolean;
22
- media?: Media;
23
- picture?: Picture | string;
24
- color?: {
25
- background?: string;
26
- text?: string;
27
- };
28
- options?: Option[];
29
- mandatory?: boolean;
30
- };
31
- type Text = GenericInput;
32
- type Input = Text & {
33
- state: string;
34
- };
35
- type Date = Input;
36
- type Select = Input & {
37
- options: Option[];
38
- };
39
- type Radio = Select;
40
- type CheckboxOption = Option & {
41
- checked: boolean;
42
- };
43
- type Checkbox = GenericInput & {
44
- options: CheckboxOption[];
45
- };
46
- type UkuleleChord = Text & {
47
- ukuleleChords: ChordKey[];
48
- };
49
- type CheckboxProgressStateItem = {
50
- id: string;
51
- checked: boolean;
52
- };
53
- type CheckboxProgressStateItems = CheckboxProgressStateItem[];
54
- type ProgressItem = {
55
- key: string;
56
- state: string | CheckboxProgressStateItems;
57
- };
58
- type Progress = ProgressItem[] | null | undefined;
59
- type Item = (Text | Date | Checkbox | Radio | Select | Input);
60
- type Items = Item[];
61
- type Content = {
62
- type: string;
63
- title: string;
64
- lang: string;
65
- input: Items;
66
- };
67
- type Set = LearningEntityCommon & {
68
- content: Content;
69
- progress: Progress;
70
- };
71
- type ResultItem = {
72
- key: string;
73
- correct: string[] | string;
74
- optional?: string[] | string;
75
- };
76
- type Result = ResultItem[];
77
- }
@@ -1,8 +0,0 @@
1
- import { Grammar } from './grammar-learning-entity.type';
2
- import { LearningEntityBase } from './learning-entity';
3
- export declare class GrammarLearningEntity extends LearningEntityBase {
4
- private _grammars;
5
- isCheckable(): boolean;
6
- get content(): Grammar.Items;
7
- protected _init(entity: Grammar.Set): void;
8
- }
@@ -1,32 +0,0 @@
1
- import { LearningEntityCommon } from './learning-entity';
2
- export declare namespace Grammar {
3
- enum PicturePosition {
4
- Left = "left",
5
- Right = "right"
6
- }
7
- type Media = {
8
- url: string;
9
- mimeType: string;
10
- };
11
- type Item = {
12
- key: string;
13
- color?: {
14
- background?: string;
15
- text?: string;
16
- };
17
- picture?: {
18
- url: string;
19
- position?: PicturePosition;
20
- };
21
- media?: Media;
22
- innerHTML: string;
23
- };
24
- type Items = Item[];
25
- type Content = {
26
- lang: string;
27
- input: Item[];
28
- };
29
- type Set = LearningEntityCommon & {
30
- content: Content;
31
- };
32
- }
@@ -1,14 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { LearningEntity, LearningEntityBase } from './learning-entity';
3
- export interface InteractiveLearningEntity extends LearningEntity {
4
- get progress(): unknown;
5
- set progress(progress: unknown);
6
- updateProgress(): Observable<unknown>;
7
- deleteProgress(): Observable<void>;
8
- }
9
- export declare abstract class InteractiveLearningEntityBase extends LearningEntityBase implements InteractiveLearningEntity {
10
- abstract get progress(): unknown;
11
- abstract set progress(progress: unknown);
12
- updateProgress(): Observable<unknown>;
13
- deleteProgress(): Observable<void>;
14
- }
@@ -1,12 +0,0 @@
1
- import { CentralService } from './central-service';
2
- import { FormLearningEntity } from './form-learning-entity';
3
- import { GrammarLearningEntity } from './grammar-learning-entity';
4
- import { LearningEntityCommon } from './learning-entity';
5
- import { LearningEntityService } from './learning-entity-service';
6
- import { PuzzleLearningEntity } from './puzzle-learning-entity';
7
- import { RiddleLearningEntity } from './riddle-learning-entity';
8
- import { VocabularyLearningEntity } from './vocabulary-learning-entity';
9
- import { YesNoLearningEntity } from './yes-no-learning-entity';
10
- export declare class LearningEntityFactory {
11
- static create(entity: LearningEntityCommon, centralService: CentralService, learningEntityService: LearningEntityService): PuzzleLearningEntity | GrammarLearningEntity | VocabularyLearningEntity | FormLearningEntity | RiddleLearningEntity | YesNoLearningEntity;
12
- }
@@ -1,6 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { InteractiveLearningEntity } from './interactive-learning-entity';
3
- export interface LearningEntityProgressService {
4
- update(entity: InteractiveLearningEntity): Observable<unknown>;
5
- delete(entity: InteractiveLearningEntity): Observable<void>;
6
- }
@@ -1,39 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { LearningEntityProgressService } from './learning-entity-progress-service';
3
- import { LearningEntity } from './learning-entity';
4
- import { InteractiveLearningEntity } from './interactive-learning-entity';
5
- export type Entity = {
6
- id: number;
7
- title: string;
8
- type: {
9
- id: number;
10
- key: string;
11
- title: string;
12
- description?: string | null;
13
- };
14
- version?: {
15
- id: number;
16
- isActive: boolean;
17
- };
18
- organization?: {
19
- id: number;
20
- key: string;
21
- };
22
- level: {
23
- id: number;
24
- };
25
- picture: string | null;
26
- content?: unknown;
27
- result?: unknown | null;
28
- progress?: unknown | null;
29
- };
30
- export type Evaluation = {
31
- correct: boolean;
32
- };
33
- export interface LearningEntityService {
34
- get(organizationKey: string, levelId: number, id: number): Observable<LearningEntity>;
35
- getAll(organizationKey: string, levelId: number): Observable<LearningEntity[]>;
36
- evaluate(entity: InteractiveLearningEntity): Observable<Evaluation>;
37
- getProgressService(): LearningEntityProgressService;
38
- setProgressService(service: LearningEntityProgressService): void;
39
- }
@@ -1,70 +0,0 @@
1
- import { CentralService } from './central-service';
2
- import { LearningEntityService } from './learning-entity-service';
3
- export type LearningEntityAssignment = {
4
- readonly organizationKey: string;
5
- readonly levelId: number;
6
- };
7
- export type LearningEntityCommon = {
8
- id: number;
9
- title: string;
10
- type: {
11
- id: number;
12
- key: string;
13
- };
14
- organization: {
15
- key: string;
16
- };
17
- level: {
18
- id: number;
19
- };
20
- picture: string | null;
21
- previous: number | null;
22
- next: number | null;
23
- };
24
- export interface LearningEntity {
25
- get id(): number;
26
- get title(): string;
27
- get type(): string;
28
- get levelId(): number;
29
- get organizationKey(): string;
30
- get assignment(): LearningEntityAssignment;
31
- get picture(): string | null;
32
- get previousEntityId(): number | null;
33
- get nextEntityId(): number | null;
34
- getCentralService(): CentralService;
35
- setCentralService(service: CentralService): void;
36
- getLearningEntityService(): LearningEntityService;
37
- setLearningEntityService(service: LearningEntityService): void;
38
- get content(): unknown;
39
- isCheckable(): boolean;
40
- }
41
- export declare abstract class LearningEntityBase implements LearningEntity {
42
- private _id;
43
- private _title;
44
- private _type;
45
- private _levelId;
46
- private _organizationKey;
47
- private _picture;
48
- private _assignment;
49
- private _previousEntityId;
50
- private _nextEntityId;
51
- private _centralService;
52
- private _learningEntityService;
53
- constructor(entity: LearningEntityCommon, centralService: CentralService, learningEntityService: LearningEntityService);
54
- get id(): number;
55
- get title(): string;
56
- get type(): string;
57
- get levelId(): number;
58
- get organizationKey(): string;
59
- get assignment(): LearningEntityAssignment;
60
- get picture(): string | null;
61
- get previousEntityId(): number | null;
62
- get nextEntityId(): number | null;
63
- getCentralService(): CentralService;
64
- setCentralService(service: CentralService): void;
65
- getLearningEntityService(): LearningEntityService;
66
- setLearningEntityService(service: LearningEntityService): void;
67
- abstract isCheckable(): boolean;
68
- abstract get content(): unknown;
69
- protected abstract _init(entity: LearningEntityCommon): void;
70
- }
@@ -1,11 +0,0 @@
1
- import { InteractiveLearningEntityBase } from './interactive-learning-entity';
2
- import { Original as PuzzleOriginal, Puzzle } from './puzzle-learning-entity.type';
3
- export declare class PuzzleLearningEntity extends InteractiveLearningEntityBase {
4
- private _content;
5
- private _progress;
6
- isCheckable(): boolean;
7
- get progress(): PuzzleOriginal.Puzzle.Progress;
8
- set progress(progress: PuzzleOriginal.Puzzle.Progress);
9
- get content(): Puzzle.Set;
10
- protected _init(entity: PuzzleOriginal.Puzzle.Set): void;
11
- }