-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
220 lines (220 loc) · 7.66 KB
/
index.js
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Injectable } from '@angular/core';
import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* @name Status Bar
* @description
* Manage the appearance of the native status bar.
*
* Requires Cordova plugin: `cordova-plugin-statusbar`. For more info, please see the [StatusBar plugin docs](https://github.com/apache/cordova-plugin-statusbar).
*
* @usage
* ```typescript
* import { StatusBar } from '@ionic-native/status-bar';
*
* constructor(private statusBar: StatusBar) { }
*
* ...
*
* // let status bar overlay webview
* this.statusBar.overlaysWebView(true);
*
* // set status bar to white
* this.statusBar.backgroundColorByHexString('#ffffff');
* ```
*
*/
var StatusBar = (function (_super) {
__extends(StatusBar, _super);
function StatusBar() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* Set whether the status bar overlays the main app view. The default
* is true.
*
* @param {boolean} doesOverlay Whether the status bar overlays the main app view.
*/
StatusBar.prototype.overlaysWebView = function (doesOverlay) { };
;
/**
* Gets the current height (in CSS pixels) of system statusbar.
*
* **Note that this is implemented currently only on Android**
*
* @param packageSuccess Callback invoked with the current statusbar height.
* @param packageError Optional callback invoked in case of an error.
* @returns {string}
*/
StatusBar.prototype.getStatusBarHeight = function (packageSuccess, packageError) { };
;
/**
* Use the default statusbar (dark text, for light backgrounds).
*/
StatusBar.prototype.styleDefault = function () { };
;
/**
* Use the lightContent statusbar (light text, for dark backgrounds).
*/
StatusBar.prototype.styleLightContent = function () { };
;
/**
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
*/
StatusBar.prototype.styleBlackTranslucent = function () { };
;
/**
* Use the blackOpaque statusbar (light text, for dark backgrounds).
*/
StatusBar.prototype.styleBlackOpaque = function () { };
;
/**
* Set the status bar to a specific named color. Valid options:
* black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown.
*
* iOS note: you must call StatusBar.overlaysWebView(false) to enable color changing.
*
* @param {string} colorName The name of the color (from above)
*/
StatusBar.prototype.backgroundColorByName = function (colorName) { };
;
/**
* Set the status bar to a specific hex color (CSS shorthand supported!).
*
* iOS note: you must call StatusBar.overlaysWebView(false) to enable color changing.
*
* @param {string} hexString The hex value of the color.
*/
StatusBar.prototype.backgroundColorByHexString = function (hexString) { };
;
/**
* Hide the StatusBar
*/
StatusBar.prototype.hide = function () { };
;
/**
* Show the StatusBar
*/
StatusBar.prototype.show = function () { };
;
StatusBar.decorators = [
{ type: Injectable },
];
/** @nocollapse */
StatusBar.ctorParameters = function () { return []; };
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Boolean]),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "overlaysWebView", null);
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Function,
Function]),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "getStatusBarHeight", null);
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "styleDefault", null);
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "styleLightContent", null);
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "styleBlackTranslucent", null);
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "styleBlackOpaque", null);
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "backgroundColorByName", null);
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "backgroundColorByHexString", null);
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "hide", null);
__decorate([
Cordova({
sync: true
}),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], StatusBar.prototype, "show", null);
__decorate([
CordovaProperty,
__metadata("design:type", Boolean)
], StatusBar.prototype, "isVisible", void 0);
StatusBar = __decorate([
Plugin({
pluginName: 'StatusBar',
plugin: 'cordova-plugin-statusbar',
pluginRef: 'StatusBar',
repo: 'https://github.com/apache/cordova-plugin-statusbar',
platforms: ['Android', 'iOS', 'Windows']
})
], StatusBar);
return StatusBar;
}(IonicNativePlugin));
export { StatusBar };
//# sourceMappingURL=index.js.map