-
Notifications
You must be signed in to change notification settings - Fork 671
Expand file tree
/
Copy pathposition.ts
More file actions
124 lines (99 loc) · 3.11 KB
/
position.ts
File metadata and controls
124 lines (99 loc) · 3.11 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* tslint:disable:max-line-length */
import {
Component,
OnInit,
OnDestroy,
NgModule,
Host,
SkipSelf,
Input
} from '@angular/core';
import type { PositionAlignment, HorizontalAlignment, VerticalAlignment } from 'devextreme/common';
import type { CollisionResolutionCombination, CollisionResolution } from 'devextreme/common/core/animation';
import {
DxIntegrationModule,
NestedOptionHost,
} from 'devextreme-angular/core';
import { NestedOption } from 'devextreme-angular/core';
@Component({
selector: 'dxo-autocomplete-position',
template: '',
styles: [''],
imports: [ DxIntegrationModule ],
providers: [NestedOptionHost]
})
export class DxoAutocompletePositionComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get at(): PositionAlignment | { x?: HorizontalAlignment, y?: VerticalAlignment } {
return this._getOption('at');
}
set at(value: PositionAlignment | { x?: HorizontalAlignment, y?: VerticalAlignment }) {
this._setOption('at', value);
}
@Input()
get boundary(): any | string {
return this._getOption('boundary');
}
set boundary(value: any | string) {
this._setOption('boundary', value);
}
@Input()
get boundaryOffset(): string | { x?: number, y?: number } {
return this._getOption('boundaryOffset');
}
set boundaryOffset(value: string | { x?: number, y?: number }) {
this._setOption('boundaryOffset', value);
}
@Input()
get collision(): CollisionResolutionCombination | { x?: CollisionResolution, y?: CollisionResolution } {
return this._getOption('collision');
}
set collision(value: CollisionResolutionCombination | { x?: CollisionResolution, y?: CollisionResolution }) {
this._setOption('collision', value);
}
@Input()
get my(): PositionAlignment | { x?: HorizontalAlignment, y?: VerticalAlignment } {
return this._getOption('my');
}
set my(value: PositionAlignment | { x?: HorizontalAlignment, y?: VerticalAlignment }) {
this._setOption('my', value);
}
@Input()
get of(): any | string {
return this._getOption('of');
}
set of(value: any | string) {
this._setOption('of', value);
}
@Input()
get offset(): string | { x?: number, y?: number } {
return this._getOption('offset');
}
set offset(value: string | { x?: number, y?: number }) {
this._setOption('offset', value);
}
protected get _optionPath() {
return 'position';
}
constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost,
@Host() optionHost: NestedOptionHost) {
super();
parentOptionHost.setNestedOption(this);
optionHost.setHost(this, this._fullOptionPath.bind(this));
}
ngOnInit() {
this._addRecreatedComponent();
}
ngOnDestroy() {
this._addRemovedOption(this._getOptionPath());
}
}
@NgModule({
imports: [
DxoAutocompletePositionComponent
],
exports: [
DxoAutocompletePositionComponent
],
})
export class DxoAutocompletePositionModule { }