-
Notifications
You must be signed in to change notification settings - Fork 5
/
carousel-view-common.ts
158 lines (131 loc) · 5.13 KB
/
carousel-view-common.ts
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import view = require("ui/core/view");
import definition = require("nativescript-carousel-view");
import dependencyObservable = require("ui/core/dependency-observable");
import proxy = require("ui/core/proxy");
import observableArrayModule = require("data/observable-array");
export class CarouselView extends view.View implements definition.CarouselView {
public static positionProperty = new dependencyObservable.Property(
"position",
"CarouselView",
new proxy.PropertyMetadata(0)
);
public static templateSelectorProperty = new dependencyObservable.Property(
"templateSelector",
"CarouselView",
new proxy.PropertyMetadata(null)
);
public static itemsSourceProperty = new dependencyObservable.Property(
"itemsSource",
"CarouselView",
new proxy.PropertyMetadata(null)
);
public static interPageSpacingProperty = new dependencyObservable.Property(
"interPageSpacing",
"CarouselView",
new proxy.PropertyMetadata(0)
);
public static interPageSpacingColorProperty = new dependencyObservable.Property(
"interPageSpacingColor",
"CarouselView",
new proxy.PropertyMetadata("#FFFFFF")
);
public static orientationProperty = new dependencyObservable.Property(
"orientation",
"CarouselView",
new proxy.PropertyMetadata("horizontal")
);
public static showIndicatorsProperty = new dependencyObservable.Property(
"showIndicators",
"CarouselView",
new proxy.PropertyMetadata(true)
);
public static indicatorsShapeProperty = new dependencyObservable.Property(
"indicatorsShape",
"CarouselView",
new proxy.PropertyMetadata("Circle")
);
public static indicatorsTintColorProperty = new dependencyObservable.Property(
"indicatorsTintColor",
"CarouselView",
new proxy.PropertyMetadata("#c0c0c0")
);
public static indicatorsCurrentPageColorProperty = new dependencyObservable.Property(
"indicatorsCurrentPageColor",
"CarouselView",
new proxy.PropertyMetadata("#808080")
);
public static animateTransitionProperty = new dependencyObservable.Property(
"animateTransition",
"CarouselView",
new proxy.PropertyMetadata(true)
);
get position(): number {
return this._getValue(CarouselView.positionProperty);
}
set position(value: number) {
this._setValue(CarouselView.positionProperty, value);
}
get templateSelector(): definition.ITemplateSelector {
return this._getValue(CarouselView.templateSelectorProperty);
}
set templateSelector(value: definition.ITemplateSelector) {
this._setValue(CarouselView.templateSelectorProperty, value);
}
get itemsSource(): observableArrayModule.ObservableArray<any> {
return this._getValue(CarouselView.itemsSourceProperty);
}
set itemsSource(value: observableArrayModule.ObservableArray<any>) {
this._setValue(CarouselView.itemsSourceProperty, value);
}
get interPageSpacing(): number {
return this._getValue(CarouselView.interPageSpacingProperty);
}
set interPageSpacing(value: number) {
this._setValue(CarouselView.interPageSpacingProperty, value);
}
get interPageSpacingColor(): string {
return this._getValue(CarouselView.interPageSpacingColorProperty);
}
set interPageSpacingColor(value: string) {
this._setValue(CarouselView.interPageSpacingColorProperty, value);
}
get orientation(): string {
return this._getValue(CarouselView.orientationProperty);
}
set orientation(value: string) {
this._setValue(CarouselView.orientationProperty, value);
}
get showIndicators(): boolean {
return this._getValue(CarouselView.showIndicatorsProperty);
}
set showIndicators(value: boolean) {
this._setValue(CarouselView.showIndicatorsProperty, value);
}
get indicatorsShape(): string {
return this._getValue(CarouselView.indicatorsShapeProperty);
}
set indicatorsShape(value: string) {
this._setValue(CarouselView.indicatorsShapeProperty, value);
}
get indicatorsTintColor(): string {
return this._getValue(CarouselView.indicatorsTintColorProperty);
}
set indicatorsTintColor(value: string) {
this._setValue(CarouselView.indicatorsTintColorProperty, value);
}
get indicatorsCurrentPageColor(): string {
return this._getValue(CarouselView.indicatorsCurrentPageColorProperty);
}
set indicatorsCurrentPageColor(value: string) {
this._setValue(CarouselView.indicatorsCurrentPageColorProperty, value);
}
get animateTransition(): boolean {
return this._getValue(CarouselView.animateTransitionProperty);
}
set animateTransition(value: boolean) {
this._setValue(CarouselView.animateTransitionProperty, value);
}
public async insertPage(position: number, bindingContext: any) {}
public async removePage(position: number) {}
public setCurrentPage(position: number): void {}
}