forked from DevExpress/DevExtreme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresources.ts
More file actions
100 lines (78 loc) · 2.35 KB
/
resources.ts
File metadata and controls
100 lines (78 loc) · 2.35 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
/* tslint:disable:max-line-length */
import {
Component,
OnInit,
OnDestroy,
NgModule,
Host,
SkipSelf,
Input
} from '@angular/core';
import type { default as DataSource, DataSourceOptions } from 'devextreme/data/data_source';
import type { Store } from 'devextreme/data/store';
import {
DxIntegrationModule,
NestedOptionHost,
} from 'devextreme-angular/core';
import { NestedOption } from 'devextreme-angular/core';
@Component({
selector: 'dxo-gantt-resources',
template: '',
styles: [''],
imports: [ DxIntegrationModule ],
providers: [NestedOptionHost]
})
export class DxoGanttResourcesComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get colorExpr(): ((resource: any, value: any) => any) | string {
return this._getOption('colorExpr');
}
set colorExpr(value: ((resource: any, value: any) => any) | string) {
this._setOption('colorExpr', value);
}
@Input()
get dataSource(): Array<any> | DataSource | DataSourceOptions | null | Store | string {
return this._getOption('dataSource');
}
set dataSource(value: Array<any> | DataSource | DataSourceOptions | null | Store | string) {
this._setOption('dataSource', value);
}
@Input()
get keyExpr(): ((resource: any) => any) | string {
return this._getOption('keyExpr');
}
set keyExpr(value: ((resource: any) => any) | string) {
this._setOption('keyExpr', value);
}
@Input()
get textExpr(): ((resource: any, value: any) => string) | string {
return this._getOption('textExpr');
}
set textExpr(value: ((resource: any, value: any) => string) | string) {
this._setOption('textExpr', value);
}
protected get _optionPath() {
return 'resources';
}
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: [
DxoGanttResourcesComponent
],
exports: [
DxoGanttResourcesComponent
],
})
export class DxoGanttResourcesModule { }