-
Notifications
You must be signed in to change notification settings - Fork 671
Expand file tree
/
Copy pathbutton-dxi.ts
More file actions
93 lines (73 loc) · 2.03 KB
/
Copy pathbutton-dxi.ts
File metadata and controls
93 lines (73 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/* tslint:disable:max-line-length */
import {
Component,
NgModule,
Host,
SkipSelf,
Input
} from '@angular/core';
import type { TextEditorButtonLocation } from 'devextreme/common';
import type { dxButtonOptions } from 'devextreme/ui/button';
import {
DxIntegrationModule,
NestedOptionHost,
} from 'devextreme-angular/core';
import { CollectionNestedOption } from 'devextreme-angular/core';
import { PROPERTY_TOKEN_buttons } from 'devextreme-angular/core/tokens';
@Component({
selector: 'dxi-autocomplete-button',
template: '',
styles: [''],
imports: [ DxIntegrationModule ],
providers: [
NestedOptionHost,
{
provide: PROPERTY_TOKEN_buttons,
useExisting: DxiAutocompleteButtonComponent,
}
]
})
export class DxiAutocompleteButtonComponent extends CollectionNestedOption {
@Input()
get location(): TextEditorButtonLocation {
return this._getOption('location');
}
set location(value: TextEditorButtonLocation) {
this._setOption('location', value);
}
@Input()
get name(): string | undefined {
return this._getOption('name');
}
set name(value: string | undefined) {
this._setOption('name', value);
}
@Input()
get options(): dxButtonOptions | undefined {
return this._getOption('options');
}
set options(value: dxButtonOptions | undefined) {
this._setOption('options', value);
}
protected get _optionPath() {
return 'buttons';
}
constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost,
@Host() optionHost: NestedOptionHost) {
super();
parentOptionHost.setNestedOption(this);
optionHost.setHost(this, this._fullOptionPath.bind(this));
}
ngOnDestroy() {
this._deleteRemovedOptions(this._fullOptionPath());
}
}
@NgModule({
imports: [
DxiAutocompleteButtonComponent
],
exports: [
DxiAutocompleteButtonComponent
],
})
export class DxiAutocompleteButtonModule { }