@apipass/inputs 1.0.1 → 1.0.8

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 (66) hide show
  1. package/ace-editor/component.d.ts +52 -52
  2. package/ace-editor/directive.d.ts +39 -39
  3. package/custom-select/custom-select-item.d.ts +5 -5
  4. package/custom-select/custom-select.component.d.ts +51 -51
  5. package/debounce-model-directive/debouceInput.directive.d.ts +14 -14
  6. package/esm2022/ace-editor/component.mjs +200 -0
  7. package/esm2022/ace-editor/directive.mjs +153 -0
  8. package/{esm2020 → esm2022}/apipass-inputs.mjs +4 -4
  9. package/esm2022/custom-select/custom-select-item.mjs +9 -0
  10. package/esm2022/custom-select/custom-select.component.mjs +213 -0
  11. package/esm2022/debounce-model-directive/debouceInput.directive.mjs +34 -0
  12. package/esm2022/field/field.component.mjs +56 -0
  13. package/esm2022/input-avatar/input-avatar.component.mjs +91 -0
  14. package/esm2022/input-boolean/input-boolean.component.mjs +54 -0
  15. package/esm2022/input-file/input-file.component.mjs +82 -0
  16. package/esm2022/input-number/input-number.component.mjs +60 -0
  17. package/esm2022/input-password/input-password.component.mjs +94 -0
  18. package/esm2022/input-text/input-text.component.mjs +60 -0
  19. package/esm2022/inputs.module.mjs +150 -0
  20. package/esm2022/public-api.mjs +17 -0
  21. package/esm2022/select-box/mat-select-infinite-scroll.directive.mjs +91 -0
  22. package/esm2022/select-box/select-box.component.mjs +226 -0
  23. package/esm2022/select-enum/select-enum.component.mjs +47 -0
  24. package/esm2022/select-interpolation/select-interpolation.component.mjs +177 -0
  25. package/esm2022/value-acessor-base.mjs +30 -0
  26. package/fesm2022/apipass-inputs.mjs +1711 -0
  27. package/fesm2022/apipass-inputs.mjs.map +1 -0
  28. package/field/field.component.d.ts +15 -15
  29. package/index.d.ts +5 -5
  30. package/input-avatar/input-avatar.component.d.ts +29 -29
  31. package/input-boolean/input-boolean.component.d.ts +15 -15
  32. package/input-file/input-file.component.d.ts +31 -31
  33. package/input-number/input-number.component.d.ts +17 -17
  34. package/input-password/input-password.component.d.ts +28 -29
  35. package/input-text/input-text.component.d.ts +17 -17
  36. package/inputs.module.d.ts +36 -36
  37. package/package.json +18 -24
  38. package/public-api.d.ts +16 -16
  39. package/select-box/mat-select-infinite-scroll.directive.d.ts +26 -26
  40. package/select-box/select-box.component.d.ts +57 -57
  41. package/select-enum/select-enum.component.d.ts +12 -12
  42. package/select-interpolation/select-interpolation.component.d.ts +44 -44
  43. package/value-acessor-base.d.ts +13 -13
  44. package/esm2020/ace-editor/component.mjs +0 -199
  45. package/esm2020/ace-editor/directive.mjs +0 -150
  46. package/esm2020/custom-select/custom-select-item.mjs +0 -7
  47. package/esm2020/custom-select/custom-select.component.mjs +0 -204
  48. package/esm2020/debounce-model-directive/debouceInput.directive.mjs +0 -31
  49. package/esm2020/field/field.component.mjs +0 -51
  50. package/esm2020/input-avatar/input-avatar.component.mjs +0 -92
  51. package/esm2020/input-boolean/input-boolean.component.mjs +0 -56
  52. package/esm2020/input-file/input-file.component.mjs +0 -82
  53. package/esm2020/input-number/input-number.component.mjs +0 -62
  54. package/esm2020/input-password/input-password.component.mjs +0 -96
  55. package/esm2020/input-text/input-text.component.mjs +0 -62
  56. package/esm2020/inputs.module.mjs +0 -149
  57. package/esm2020/public-api.mjs +0 -17
  58. package/esm2020/select-box/mat-select-infinite-scroll.directive.mjs +0 -86
  59. package/esm2020/select-box/select-box.component.mjs +0 -220
  60. package/esm2020/select-enum/select-enum.component.mjs +0 -48
  61. package/esm2020/select-interpolation/select-interpolation.component.mjs +0 -169
  62. package/esm2020/value-acessor-base.mjs +0 -31
  63. package/fesm2015/apipass-inputs.mjs +0 -1704
  64. package/fesm2015/apipass-inputs.mjs.map +0 -1
  65. package/fesm2020/apipass-inputs.mjs +0 -1697
  66. package/fesm2020/apipass-inputs.mjs.map +0 -1
@@ -1,52 +1,52 @@
1
- import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
3
- import 'brace';
4
- import 'brace/theme/monokai';
5
- import * as i0 from "@angular/core";
6
- export declare class AceEditorComponent implements ControlValueAccessor, OnInit, OnDestroy {
7
- private zone;
8
- textChanged: EventEmitter<any>;
9
- textChange: EventEmitter<any>;
10
- style: any;
11
- _options: any;
12
- _readOnly: false;
13
- _theme: string;
14
- _mode: string;
15
- _autoUpdateContent: boolean;
16
- _editor: any;
17
- _durationBeforeCallback: number;
18
- _text: string;
19
- oldText: any;
20
- timeoutSaving: any;
21
- constructor(elementRef: ElementRef, zone: NgZone);
22
- ngOnInit(): void;
23
- ngOnDestroy(): void;
24
- init(): void;
25
- initEvents(): void;
26
- updateText(): void;
27
- set options(options: any);
28
- setOptions(options: any): void;
29
- set readOnly(readOnly: any);
30
- setReadOnly(readOnly: any): void;
31
- set theme(theme: any);
32
- setTheme(theme: any): void;
33
- set mode(mode: any);
34
- setMode(mode: any): void;
35
- get value(): string;
36
- set value(value: string);
37
- writeValue(value: any): void;
38
- private _onChange;
39
- registerOnChange(fn: any): void;
40
- private _onTouched;
41
- registerOnTouched(fn: any): void;
42
- get text(): string;
43
- set text(text: string);
44
- setText(text: any): void;
45
- set autoUpdateContent(status: any);
46
- setAutoUpdateContent(status: any): void;
47
- set durationBeforeCallback(num: number);
48
- setDurationBeforeCallback(num: number): void;
49
- getEditor(): any;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<AceEditorComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<AceEditorComponent, "ace-editor", never, { "style": "style"; "options": "options"; "readOnly": "readOnly"; "theme": "theme"; "mode": "mode"; "value": "value"; "text": "text"; "autoUpdateContent": "autoUpdateContent"; "durationBeforeCallback": "durationBeforeCallback"; }, { "textChanged": "textChanged"; "textChange": "textChange"; }, never, never, false, never>;
52
- }
1
+ import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import 'brace';
4
+ import 'brace/theme/monokai';
5
+ import * as i0 from "@angular/core";
6
+ export declare class AceEditorComponent implements ControlValueAccessor, OnInit, OnDestroy {
7
+ private readonly zone;
8
+ textChanged: EventEmitter<any>;
9
+ textChange: EventEmitter<any>;
10
+ style: any;
11
+ _options: any;
12
+ _readOnly: false;
13
+ _theme: string;
14
+ _mode: string;
15
+ _autoUpdateContent: boolean;
16
+ _editor: any;
17
+ _durationBeforeCallback: number;
18
+ _text: string;
19
+ oldText: any;
20
+ timeoutSaving: any;
21
+ constructor(elementRef: ElementRef, zone: NgZone);
22
+ ngOnInit(): void;
23
+ ngOnDestroy(): void;
24
+ init(): void;
25
+ initEvents(): void;
26
+ updateText(): void;
27
+ set options(options: any);
28
+ setOptions(options: any): void;
29
+ set readOnly(readOnly: any);
30
+ setReadOnly(readOnly: any): void;
31
+ set theme(theme: any);
32
+ setTheme(theme: any): void;
33
+ set mode(mode: any);
34
+ setMode(mode: any): void;
35
+ get value(): string;
36
+ set value(value: string);
37
+ writeValue(value: any): void;
38
+ private _onChange;
39
+ registerOnChange(fn: any): void;
40
+ private _onTouched;
41
+ registerOnTouched(fn: any): void;
42
+ get text(): string;
43
+ set text(text: string);
44
+ setText(text: any): void;
45
+ set autoUpdateContent(status: any);
46
+ setAutoUpdateContent(status: any): void;
47
+ set durationBeforeCallback(num: number);
48
+ setDurationBeforeCallback(num: number): void;
49
+ getEditor(): any;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<AceEditorComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<AceEditorComponent, "ace-editor", never, { "style": { "alias": "style"; "required": false; }; "options": { "alias": "options"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "value": { "alias": "value"; "required": false; }; "text": { "alias": "text"; "required": false; }; "autoUpdateContent": { "alias": "autoUpdateContent"; "required": false; }; "durationBeforeCallback": { "alias": "durationBeforeCallback"; "required": false; }; }, { "textChanged": "textChanged"; "textChange": "textChange"; }, never, never, false, never>;
52
+ }
@@ -1,39 +1,39 @@
1
- import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
2
- import 'brace';
3
- import 'brace/theme/monokai';
4
- import * as i0 from "@angular/core";
5
- export declare class AceEditorDirective implements OnInit, OnDestroy {
6
- private zone;
7
- textChanged: EventEmitter<any>;
8
- textChange: EventEmitter<any>;
9
- _options: any;
10
- _readOnly: boolean;
11
- _theme: string;
12
- _mode: string;
13
- _autoUpdateContent: boolean;
14
- _durationBeforeCallback: number;
15
- _text: string;
16
- editor: any;
17
- oldText: any;
18
- timeoutSaving: any;
19
- constructor(elementRef: ElementRef, zone: NgZone);
20
- ngOnInit(): void;
21
- ngOnDestroy(): void;
22
- init(): void;
23
- initEvents(): void;
24
- updateText(): void;
25
- set options(options: any);
26
- set readOnly(readOnly: any);
27
- set theme(theme: any);
28
- set mode(mode: any);
29
- setMode(mode: any): void;
30
- get text(): string;
31
- set text(text: string);
32
- setText(text: any): void;
33
- set autoUpdateContent(status: any);
34
- set durationBeforeCallback(num: number);
35
- setDurationBeforeCallback(num: number): void;
36
- get aceEditor(): any;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<AceEditorDirective, never>;
38
- static ɵdir: i0.ɵɵDirectiveDeclaration<AceEditorDirective, "[ace-editor]", never, { "options": "options"; "readOnly": "readOnly"; "theme": "theme"; "mode": "mode"; "text": "text"; "autoUpdateContent": "autoUpdateContent"; "durationBeforeCallback": "durationBeforeCallback"; }, { "textChanged": "textChanged"; "textChange": "textChange"; }, never, never, false, never>;
39
- }
1
+ import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
2
+ import 'brace';
3
+ import 'brace/theme/monokai';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AceEditorDirective implements OnInit, OnDestroy {
6
+ private readonly zone;
7
+ textChanged: EventEmitter<any>;
8
+ textChange: EventEmitter<any>;
9
+ _options: any;
10
+ _readOnly: boolean;
11
+ _theme: string;
12
+ _mode: string;
13
+ _autoUpdateContent: boolean;
14
+ _durationBeforeCallback: number;
15
+ _text: string;
16
+ editor: any;
17
+ oldText: any;
18
+ timeoutSaving: any;
19
+ constructor(elementRef: ElementRef, zone: NgZone);
20
+ ngOnInit(): void;
21
+ ngOnDestroy(): void;
22
+ init(): void;
23
+ initEvents(): void;
24
+ updateText(): void;
25
+ set options(options: any);
26
+ set readOnly(readOnly: any);
27
+ set theme(theme: any);
28
+ set mode(mode: any);
29
+ setMode(mode: any): void;
30
+ get text(): string;
31
+ set text(text: string);
32
+ setText(text: any): void;
33
+ set autoUpdateContent(status: any);
34
+ set durationBeforeCallback(num: number);
35
+ setDurationBeforeCallback(num: number): void;
36
+ get aceEditor(): any;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<AceEditorDirective, never>;
38
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AceEditorDirective, "[ace-editor]", never, { "options": { "alias": "options"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "text": { "alias": "text"; "required": false; }; "autoUpdateContent": { "alias": "autoUpdateContent"; "required": false; }; "durationBeforeCallback": { "alias": "durationBeforeCallback"; "required": false; }; }, { "textChanged": "textChanged"; "textChange": "textChange"; }, never, never, false, never>;
39
+ }
@@ -1,5 +1,5 @@
1
- export declare class CustomSelectItem {
2
- id: string | undefined | null;
3
- text: string;
4
- constructor(id: string | undefined | null, text: string);
5
- }
1
+ export declare class CustomSelectItem {
2
+ id: string | undefined | null;
3
+ text: string;
4
+ constructor(id: string | undefined | null, text: string);
5
+ }
@@ -1,51 +1,51 @@
1
- import { AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
3
- import { CustomSelectItem } from './custom-select-item';
4
- import { ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';
5
- import * as i0 from "@angular/core";
6
- export declare class CustomSelectComponent implements ControlValueAccessor, AfterViewInit {
7
- private readonly sso;
8
- scrollStrategy: ScrollStrategy;
9
- _triggerRect: ClientRect | undefined;
10
- disabled: boolean;
11
- items: CustomSelectItem[];
12
- allowTyping: boolean;
13
- allowRemove: boolean;
14
- allowAddItem: boolean;
15
- addItemLabel: string;
16
- placeHolder: string;
17
- findPlaceHolder: string;
18
- searchText: string;
19
- onSelect: EventEmitter<CustomSelectItem>;
20
- onUnSelect: EventEmitter<any>;
21
- onAddItem: EventEmitter<any>;
22
- trigger: ElementRef | undefined;
23
- input: ElementRef | undefined;
24
- opened: boolean;
25
- selectedItem: CustomSelectItem | undefined;
26
- private innerValue;
27
- private selectedModelValue;
28
- private edited;
29
- tabindex: string;
30
- onBlur(target: any): void;
31
- constructor(sso: ScrollStrategyOptions);
32
- ngAfterViewInit(): void;
33
- private setTriggerRect;
34
- selectItem(item: CustomSelectItem): void;
35
- addItem(): void;
36
- keyPress(): any;
37
- clicked(): void;
38
- private onTouchedCallback;
39
- private onChangeCallback;
40
- get value(): any;
41
- set value(value: any);
42
- writeValue(value: any): void;
43
- registerOnChange(fn: any): void;
44
- registerOnTouched(fn: any): void;
45
- setDisabledState(isDisabled: boolean): void;
46
- arrowClick(event: any): void;
47
- removeClick(event: any): void;
48
- onDrop($event: any): void;
49
- static ɵfac: i0.ɵɵFactoryDeclaration<CustomSelectComponent, never>;
50
- static ɵcmp: i0.ɵɵComponentDeclaration<CustomSelectComponent, "custom-select", never, { "disabled": "disabled"; "items": "items"; "allowTyping": "allowTyping"; "allowRemove": "allowRemove"; "allowAddItem": "allowAddItem"; "addItemLabel": "addItemLabel"; "placeHolder": "placeHolder"; "findPlaceHolder": "findPlaceHolder"; "searchText": "searchText"; }, { "onSelect": "onSelect"; "onUnSelect": "onUnSelect"; "onAddItem": "onAddItem"; }, never, never, false, never>;
51
- }
1
+ import { AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { CustomSelectItem } from './custom-select-item';
4
+ import { ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CustomSelectComponent implements ControlValueAccessor, AfterViewInit {
7
+ private readonly sso;
8
+ scrollStrategy: ScrollStrategy;
9
+ _triggerRect: ClientRect | undefined;
10
+ disabled: boolean;
11
+ items: CustomSelectItem[];
12
+ allowTyping: boolean;
13
+ allowRemove: boolean;
14
+ allowAddItem: boolean;
15
+ addItemLabel: string;
16
+ placeHolder: string;
17
+ findPlaceHolder: string;
18
+ searchText: string;
19
+ onSelect: EventEmitter<CustomSelectItem>;
20
+ onUnSelect: EventEmitter<any>;
21
+ onAddItem: EventEmitter<any>;
22
+ trigger: ElementRef | undefined;
23
+ input: ElementRef | undefined;
24
+ opened: boolean;
25
+ selectedItem: CustomSelectItem | undefined;
26
+ private innerValue;
27
+ private selectedModelValue;
28
+ private edited;
29
+ tabindex: string;
30
+ onBlur(target: any): void;
31
+ constructor(sso: ScrollStrategyOptions);
32
+ ngAfterViewInit(): void;
33
+ private setTriggerRect;
34
+ selectItem(item: CustomSelectItem): void;
35
+ addItem(): void;
36
+ keyPress(): any;
37
+ clicked(): void;
38
+ private onTouchedCallback;
39
+ private onChangeCallback;
40
+ get value(): any;
41
+ set value(value: any);
42
+ writeValue(value: any): void;
43
+ registerOnChange(fn: any): void;
44
+ registerOnTouched(fn: any): void;
45
+ setDisabledState(isDisabled: boolean): void;
46
+ arrowClick(event: any): void;
47
+ removeClick(event: any): void;
48
+ onDrop($event: any): void;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomSelectComponent, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomSelectComponent, "custom-select", never, { "disabled": { "alias": "disabled"; "required": false; }; "items": { "alias": "items"; "required": false; }; "allowTyping": { "alias": "allowTyping"; "required": false; }; "allowRemove": { "alias": "allowRemove"; "required": false; }; "allowAddItem": { "alias": "allowAddItem"; "required": false; }; "addItemLabel": { "alias": "addItemLabel"; "required": false; }; "placeHolder": { "alias": "placeHolder"; "required": false; }; "findPlaceHolder": { "alias": "findPlaceHolder"; "required": false; }; "searchText": { "alias": "searchText"; "required": false; }; }, { "onSelect": "onSelect"; "onUnSelect": "onUnSelect"; "onAddItem": "onAddItem"; }, never, never, false, never>;
51
+ }
@@ -1,14 +1,14 @@
1
- import { EventEmitter, OnDestroy } from '@angular/core';
2
- import { NgModel } from '@angular/forms';
3
- import { Subscription } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- export declare class DebouceInputDirective implements OnDestroy {
6
- private ngModel;
7
- debounceTime: number;
8
- onDebounceTriggered: EventEmitter<any>;
9
- subscription: Subscription;
10
- constructor(ngModel: NgModel);
11
- ngOnDestroy(): void;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<DebouceInputDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<DebouceInputDirective, "[debounceInput]", never, { "debounceTime": "debounceTime"; }, { "onDebounceTriggered": "onDebounceTriggered"; }, never, never, false, never>;
14
- }
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
+ import { NgModel } from '@angular/forms';
3
+ import { Subscription } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DebouceInputDirective implements OnDestroy {
6
+ private readonly ngModel;
7
+ debounceTime: number;
8
+ onDebounceTriggered: EventEmitter<any>;
9
+ subscription: Subscription;
10
+ constructor(ngModel: NgModel);
11
+ ngOnDestroy(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<DebouceInputDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DebouceInputDirective, "[debounceInput]", never, { "debounceTime": { "alias": "debounceTime"; "required": false; }; }, { "onDebounceTriggered": "onDebounceTriggered"; }, never, never, false, never>;
14
+ }
@@ -0,0 +1,200 @@
1
+ import { Component, ElementRef, EventEmitter, forwardRef, Input, NgZone, Output } from '@angular/core';
2
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import 'brace';
4
+ import 'brace/theme/monokai';
5
+ import * as i0 from "@angular/core";
6
+ class AceEditorComponent {
7
+ zone;
8
+ textChanged = new EventEmitter();
9
+ textChange = new EventEmitter();
10
+ style = {};
11
+ _options = {};
12
+ _readOnly = false;
13
+ _theme = 'monokai';
14
+ _mode = 'html';
15
+ _autoUpdateContent = true;
16
+ _editor;
17
+ _durationBeforeCallback = 0;
18
+ _text = '';
19
+ oldText;
20
+ timeoutSaving;
21
+ constructor(elementRef, zone) {
22
+ this.zone = zone;
23
+ const el = elementRef.nativeElement;
24
+ this.zone.runOutsideAngular(() => {
25
+ this._editor = ace.edit(el);
26
+ });
27
+ this._editor.$blockScrolling = Infinity;
28
+ }
29
+ ngOnInit() {
30
+ this.init();
31
+ this.initEvents();
32
+ }
33
+ ngOnDestroy() {
34
+ this._editor.destroy();
35
+ }
36
+ init() {
37
+ this.setOptions(this._options || {});
38
+ this.setTheme(this._theme);
39
+ this.setMode(this._mode);
40
+ this.setReadOnly(this._readOnly);
41
+ }
42
+ initEvents() {
43
+ this._editor.on('change', () => {
44
+ this.updateText();
45
+ });
46
+ this._editor.on('paste', () => {
47
+ this.updateText();
48
+ });
49
+ }
50
+ updateText() {
51
+ const newVal = this._editor.getValue();
52
+ if (newVal === this.oldText) {
53
+ return;
54
+ }
55
+ if (!this._durationBeforeCallback) {
56
+ this._text = newVal;
57
+ this.zone.run(() => {
58
+ this.textChange.emit(newVal);
59
+ this.textChanged.emit(newVal);
60
+ });
61
+ this._onChange(newVal);
62
+ }
63
+ else {
64
+ if (this.timeoutSaving) {
65
+ clearTimeout(this.timeoutSaving);
66
+ }
67
+ this.timeoutSaving = setTimeout(() => {
68
+ this._text = newVal;
69
+ this.zone.run(() => {
70
+ this.textChange.emit(newVal);
71
+ this.textChanged.emit(newVal);
72
+ });
73
+ this.timeoutSaving = null;
74
+ }, this._durationBeforeCallback);
75
+ }
76
+ this.oldText = newVal;
77
+ }
78
+ set options(options) {
79
+ this.setOptions(options);
80
+ }
81
+ setOptions(options) {
82
+ this._options = options;
83
+ this._editor.setOptions(options || {});
84
+ }
85
+ set readOnly(readOnly) {
86
+ this.setReadOnly(readOnly);
87
+ }
88
+ setReadOnly(readOnly) {
89
+ this._readOnly = readOnly;
90
+ this._editor.setReadOnly(readOnly);
91
+ }
92
+ set theme(theme) {
93
+ this.setTheme(theme);
94
+ }
95
+ setTheme(theme) {
96
+ this._theme = theme;
97
+ this._editor.setTheme(`ace/theme/${theme}`);
98
+ }
99
+ set mode(mode) {
100
+ this.setMode(mode);
101
+ }
102
+ setMode(mode) {
103
+ this._mode = mode;
104
+ if (typeof this._mode === 'object') {
105
+ this._editor.getSession().setMode(this._mode);
106
+ }
107
+ else {
108
+ this._editor.getSession().setMode(`ace/mode/${this._mode}`);
109
+ }
110
+ }
111
+ get value() {
112
+ return this.text;
113
+ }
114
+ set value(value) {
115
+ this.setText(value);
116
+ }
117
+ writeValue(value) {
118
+ this.setText(value);
119
+ }
120
+ _onChange = (_) => {
121
+ };
122
+ registerOnChange(fn) {
123
+ this._onChange = fn;
124
+ }
125
+ _onTouched = () => {
126
+ };
127
+ registerOnTouched(fn) {
128
+ this._onTouched = fn;
129
+ }
130
+ get text() {
131
+ return this._text;
132
+ }
133
+ set text(text) {
134
+ this.setText(text);
135
+ }
136
+ setText(text) {
137
+ if (text === null || text === undefined) {
138
+ text = '';
139
+ }
140
+ if (this._text !== text && this._autoUpdateContent) {
141
+ this._text = text;
142
+ this._editor.setValue(text);
143
+ this._onChange(text);
144
+ this._editor.clearSelection();
145
+ }
146
+ }
147
+ set autoUpdateContent(status) {
148
+ this.setAutoUpdateContent(status);
149
+ }
150
+ setAutoUpdateContent(status) {
151
+ this._autoUpdateContent = status;
152
+ }
153
+ set durationBeforeCallback(num) {
154
+ this.setDurationBeforeCallback(num);
155
+ }
156
+ setDurationBeforeCallback(num) {
157
+ this._durationBeforeCallback = num;
158
+ }
159
+ getEditor() {
160
+ return this._editor;
161
+ }
162
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AceEditorComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
163
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: AceEditorComponent, selector: "ace-editor", inputs: { style: "style", options: "options", readOnly: "readOnly", theme: "theme", mode: "mode", value: "value", text: "text", autoUpdateContent: "autoUpdateContent", durationBeforeCallback: "durationBeforeCallback" }, outputs: { textChanged: "textChanged", textChange: "textChange" }, providers: [{
164
+ provide: NG_VALUE_ACCESSOR,
165
+ useExisting: forwardRef(() => AceEditorComponent),
166
+ multi: true
167
+ }], ngImport: i0, template: '', isInline: true, styles: [":host{display:block;width:100%}\n"] });
168
+ }
169
+ export { AceEditorComponent };
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AceEditorComponent, decorators: [{
171
+ type: Component,
172
+ args: [{ selector: 'ace-editor', template: '', providers: [{
173
+ provide: NG_VALUE_ACCESSOR,
174
+ useExisting: forwardRef(() => AceEditorComponent),
175
+ multi: true
176
+ }], styles: [":host{display:block;width:100%}\n"] }]
177
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { textChanged: [{
178
+ type: Output
179
+ }], textChange: [{
180
+ type: Output
181
+ }], style: [{
182
+ type: Input
183
+ }], options: [{
184
+ type: Input
185
+ }], readOnly: [{
186
+ type: Input
187
+ }], theme: [{
188
+ type: Input
189
+ }], mode: [{
190
+ type: Input
191
+ }], value: [{
192
+ type: Input
193
+ }], text: [{
194
+ type: Input
195
+ }], autoUpdateContent: [{
196
+ type: Input
197
+ }], durationBeforeCallback: [{
198
+ type: Input
199
+ }] } });
200
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LmpzIiwic291cmNlUm9vdC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