@nativescript/core 8.5.3 → 8.5.4-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accessibility/accessibility-css-helper.js +5 -6
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-service.android.js +24 -23
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js +1 -1
- package/accessibility/accessibility-service.ios.js.map +1 -1
- package/accessibility/font-scale.android.js +1 -1
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js +1 -1
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.js +1 -1
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.ios.js +1 -1
- package/accessibility/index.ios.js.map +1 -1
- package/application/application-common.d.ts +197 -41
- package/application/application-common.js +411 -151
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +116 -28
- package/application/application-shims.d.ts +351 -0
- package/application/application-shims.js +353 -0
- package/application/application-shims.js.map +1 -0
- package/application/application.android.d.ts +64 -0
- package/application/application.android.js +434 -0
- package/application/application.android.js.map +1 -0
- package/application/application.d.ts +60 -0
- package/application/application.ios.d.ts +72 -0
- package/application/application.ios.js +375 -0
- package/application/application.ios.js.map +1 -0
- package/application/index.android.d.ts +2 -77
- package/application/index.android.js +2 -455
- package/application/index.android.js.map +1 -1
- package/application/index.d.ts +2 -759
- package/application/index.ios.d.ts +2 -65
- package/application/index.ios.js +2 -516
- package/application/index.ios.js.map +1 -1
- package/application-settings/index.android.js +2 -2
- package/application-settings/index.android.js.map +1 -1
- package/connectivity/index.android.js +4 -5
- package/connectivity/index.android.js.map +1 -1
- package/css/LICENSE +9 -0
- package/css/Readme.md +278 -0
- package/css-value/LICENSE +9 -0
- package/css-value/Readme.md +45 -0
- package/fetch/LICENSE +20 -0
- package/fetch/README.md +1 -0
- package/file-system/file-system-access.android.d.ts +18 -0
- package/file-system/file-system-access.android.js +205 -3
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.d.ts +67 -0
- package/file-system/file-system-access.ios.d.ts +9 -0
- package/file-system/file-system-access.ios.js +106 -0
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.d.ts +60 -0
- package/file-system/index.js +197 -3
- package/file-system/index.js.map +1 -1
- package/image-source/index.android.js +2 -2
- package/image-source/index.android.js.map +1 -1
- package/index.d.ts +22 -139
- package/index.js +15 -156
- package/index.js.map +1 -1
- package/js-libs/easysax/LICENSE +20 -0
- package/js-libs/easysax/README.md +46 -0
- package/module-name-resolver/index.js +5 -5
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js +2 -2
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/package.json +1 -1
- package/platform/index.android.js +5 -5
- package/platform/index.android.js.map +1 -1
- package/platforms/README.md +1 -0
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/ios/TNSWidgets.xcframework/Info.plist +7 -7
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +1 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +1 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +4 -4
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSWidgets.h +1 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +4 -4
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +1 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +14 -3
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/ui/action-bar/index.android.js +5 -5
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/core/view/index.android.js +2 -2
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.ios.js +5 -6
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/dialogs/index.ios.js +9 -3
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/frame/activity.android.js +2 -2
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/index.android.d.ts +1 -1
- package/ui/frame/index.android.js +45 -82
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.ios.js +2 -2
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/styling/background.android.js +3 -5
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/style-scope.js +5 -5
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/tab-view/index.android.js +2 -2
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +19 -19
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +1 -2
- package/ui/transition/shared-transition.js.map +1 -1
- package/utils/android/index.d.ts +21 -0
- package/utils/android/index.js +157 -0
- package/utils/android/index.js.map +1 -0
- package/utils/index.android.d.ts +8 -3
- package/utils/index.android.js +15 -10
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +7 -7
- package/utils/index.ios.d.ts +8 -3
- package/utils/index.ios.js +13 -8
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.d.ts +36 -0
- package/utils/ios/index.js +276 -0
- package/utils/ios/index.js.map +1 -0
- package/utils/layout-helper/index.android.js +3 -3
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/mainthread-helper.android.js +2 -2
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/native-helper.android.d.ts +8 -23
- package/utils/native-helper.android.js +10 -169
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.d.ts +272 -255
- package/utils/native-helper.ios.d.ts +8 -38
- package/utils/native-helper.ios.js +10 -295
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/platform-check.d.ts +4 -0
- package/utils/platform-check.js +21 -0
- package/utils/platform-check.js.map +1 -0
package/utils/native-helper.d.ts
CHANGED
|
@@ -9,262 +9,279 @@ export function dataSerialize(data?: any, wrapPrimitives?: boolean): any;
|
|
|
9
9
|
*/
|
|
10
10
|
export function dataDeserialize(nativeData?: any): any;
|
|
11
11
|
|
|
12
|
+
// /**
|
|
13
|
+
// * Module with android specific utilities.
|
|
14
|
+
// */
|
|
15
|
+
// declare namespace AndroidUtils {
|
|
16
|
+
// /**
|
|
17
|
+
// * Gets the native Android application instance.
|
|
18
|
+
// */
|
|
19
|
+
// export function getApplication(): any; /* android.app.Application */
|
|
20
|
+
|
|
21
|
+
// /**
|
|
22
|
+
// * Get the current native Android activity.
|
|
23
|
+
// */
|
|
24
|
+
// export function getCurrentActivity(): any; /* android.app.Activity */
|
|
25
|
+
// /**
|
|
26
|
+
// * Gets the native Android application resources.
|
|
27
|
+
// */
|
|
28
|
+
// export function getResources(): any; /* android.content.res.Resources */
|
|
29
|
+
|
|
30
|
+
// /**
|
|
31
|
+
// * Gets the Android application context.
|
|
32
|
+
// */
|
|
33
|
+
// export function getApplicationContext(): any; /* android.content.Context */
|
|
34
|
+
|
|
35
|
+
// /**
|
|
36
|
+
// * Gets the native Android input method manager.
|
|
37
|
+
// */
|
|
38
|
+
// export function getInputMethodManager(): any; /* android.view.inputmethod.InputMethodManager */
|
|
39
|
+
|
|
40
|
+
// /**
|
|
41
|
+
// * Hides the soft input method, usually a soft keyboard.
|
|
42
|
+
// */
|
|
43
|
+
// export function dismissSoftInput(nativeView?: any /* android.view.View */): void;
|
|
44
|
+
|
|
45
|
+
// /**
|
|
46
|
+
// * Shows the soft input method, usually a soft keyboard.
|
|
47
|
+
// */
|
|
48
|
+
// export function showSoftInput(nativeView: any /* android.view.View */): void;
|
|
49
|
+
|
|
50
|
+
// /**
|
|
51
|
+
// * Utility module dealing with some android collections.
|
|
52
|
+
// */
|
|
53
|
+
// namespace collections {
|
|
54
|
+
// /**
|
|
55
|
+
// * Converts string array into a String [hash set](http://developer.android.com/reference/java/util/HashSet.html).
|
|
56
|
+
// * @param str - An array of strings to convert.
|
|
57
|
+
// */
|
|
58
|
+
// export function stringArrayToStringSet(str: string[]): any;
|
|
59
|
+
|
|
60
|
+
// /**
|
|
61
|
+
// * Converts string hash set into array of strings.
|
|
62
|
+
// * @param stringSet - A string hash set to convert.
|
|
63
|
+
// */
|
|
64
|
+
// export function stringSetToStringArray(stringSet: any): string[];
|
|
65
|
+
// }
|
|
66
|
+
|
|
67
|
+
// /**
|
|
68
|
+
// * Utility module related to android resources.
|
|
69
|
+
// */
|
|
70
|
+
// export namespace resources {
|
|
71
|
+
// /**
|
|
72
|
+
// * Gets the drawable id from a given name.
|
|
73
|
+
// * @param name - Name of the resource.
|
|
74
|
+
// */
|
|
75
|
+
// export function getDrawableId(name);
|
|
76
|
+
|
|
77
|
+
// /**
|
|
78
|
+
// * Gets the string id from a given name.
|
|
79
|
+
// * @param name - Name of the resource.
|
|
80
|
+
// */
|
|
81
|
+
// export function getStringId(name);
|
|
82
|
+
|
|
83
|
+
// /**
|
|
84
|
+
// * Gets the id from a given name.
|
|
85
|
+
// * @param name - Name of the resource.
|
|
86
|
+
// */
|
|
87
|
+
// export function getId(name: string): number;
|
|
88
|
+
|
|
89
|
+
// /**
|
|
90
|
+
// * Gets the id from a given name with optional type.
|
|
91
|
+
// * This sets an explicit package name.
|
|
92
|
+
// * https://developer.android.com/reference/android/content/res/Resources#getIdentifier(java.lang.String,%20java.lang.String,%20java.lang.String)
|
|
93
|
+
// * @param name - Name of the resource.
|
|
94
|
+
// * @param type - (Optional) type
|
|
95
|
+
// */
|
|
96
|
+
// export function getResource(name: string, type?: string): number;
|
|
97
|
+
|
|
98
|
+
// /**
|
|
99
|
+
// * [Obsolete - please use getPaletteColor] Gets a color from current theme.
|
|
100
|
+
// * @param name - Name of the color
|
|
101
|
+
// */
|
|
102
|
+
// export function getPalleteColor();
|
|
103
|
+
|
|
104
|
+
// /**
|
|
105
|
+
// * Gets a color from the current theme.
|
|
106
|
+
// * @param name - Name of the color resource.
|
|
107
|
+
// */
|
|
108
|
+
// export function getPaletteColor(name: string, context: any /* android.content.Context */): number;
|
|
109
|
+
// }
|
|
110
|
+
|
|
111
|
+
// /**
|
|
112
|
+
// * Checks whether the application is running on real device and not on emulator.
|
|
113
|
+
// */
|
|
114
|
+
// export function isRealDevice(): boolean;
|
|
115
|
+
// }
|
|
116
|
+
|
|
117
|
+
// /**
|
|
118
|
+
// * Module with ios specific utilities.
|
|
119
|
+
// */
|
|
120
|
+
// declare namespace iOSUtils {
|
|
121
|
+
// // Common properties between UILabel, UITextView and UITextField
|
|
122
|
+
// export interface TextUIView {
|
|
123
|
+
// font: any;
|
|
124
|
+
// textAlignment: number;
|
|
125
|
+
// textColor: any;
|
|
126
|
+
// text: string;
|
|
127
|
+
// attributedText: any;
|
|
128
|
+
// lineBreakMode: number;
|
|
129
|
+
// numberOfLines: number;
|
|
130
|
+
// }
|
|
131
|
+
|
|
132
|
+
// /**
|
|
133
|
+
// * Utility module dealing with some iOS collections.
|
|
134
|
+
// */
|
|
135
|
+
// export namespace collections {
|
|
136
|
+
// /**
|
|
137
|
+
// * Converts JavaScript array to [NSArray](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/).
|
|
138
|
+
// * @param str - JavaScript string array to convert.
|
|
139
|
+
// */
|
|
140
|
+
// export function jsArrayToNSArray<T>(str: T[]): NSArray<T>;
|
|
141
|
+
|
|
142
|
+
// /**
|
|
143
|
+
// * Converts NSArray to JavaScript array.
|
|
144
|
+
// * @param a - NSArray to convert.
|
|
145
|
+
// */
|
|
146
|
+
// export function nsArrayToJSArray<T>(a: NSArray<T>): T[];
|
|
147
|
+
// }
|
|
148
|
+
|
|
149
|
+
// /**
|
|
150
|
+
// * Get the root UIViewController of the app
|
|
151
|
+
// */
|
|
152
|
+
// export function getRootViewController(): any; /* UIViewController */
|
|
153
|
+
|
|
154
|
+
// /**
|
|
155
|
+
// * Get the UIWindow of the app
|
|
156
|
+
// */
|
|
157
|
+
// export function getWindow(): any; /* UIWindow */
|
|
158
|
+
|
|
159
|
+
// /**
|
|
160
|
+
// * Set the window background color of base view of the app.
|
|
161
|
+
// * Often this is shown when opening a modal as the view underneath scales down revealing the window color.
|
|
162
|
+
// * @param value color (hex, rgb, rgba, etc.)
|
|
163
|
+
// */
|
|
164
|
+
// export function setWindowBackgroundColor(value: string): void;
|
|
165
|
+
|
|
166
|
+
// /**
|
|
167
|
+
// * Data serialize and deserialize helpers
|
|
168
|
+
// */
|
|
169
|
+
// export function dataSerialize(data?: any): any;
|
|
170
|
+
// export function dataDeserialize(nativeData?: any): any;
|
|
171
|
+
|
|
172
|
+
// /**
|
|
173
|
+
// * @deprecated use application.orientation instead
|
|
174
|
+
// *
|
|
175
|
+
// * Gets an information about if current mode is Landscape.
|
|
176
|
+
// */
|
|
177
|
+
// export function isLandscape(): boolean;
|
|
178
|
+
|
|
179
|
+
// /**
|
|
180
|
+
// * Gets the iOS device major version (for 8.1 will return 8).
|
|
181
|
+
// */
|
|
182
|
+
// export const MajorVersion: number;
|
|
183
|
+
|
|
184
|
+
// /**
|
|
185
|
+
// * Opens file with associated application.
|
|
186
|
+
// * @param filePath The file path.
|
|
187
|
+
// */
|
|
188
|
+
// export function openFile(filePath: string): boolean;
|
|
189
|
+
|
|
190
|
+
// /**
|
|
191
|
+
// * Joins an array of file paths.
|
|
192
|
+
// * @param paths An array of paths.
|
|
193
|
+
// * Returns the joined path.
|
|
194
|
+
// */
|
|
195
|
+
// export function joinPaths(...paths: string[]): string;
|
|
196
|
+
|
|
197
|
+
// /**
|
|
198
|
+
// * Gets the root folder for the current application. This Folder is private for the application and not accessible from Users/External apps.
|
|
199
|
+
// * iOS - this folder is read-only and contains the app and all its resources.
|
|
200
|
+
// */
|
|
201
|
+
// export function getCurrentAppPath(): string;
|
|
202
|
+
|
|
203
|
+
// /**
|
|
204
|
+
// * Gets the currently visible(topmost) UIViewController.
|
|
205
|
+
// * @param rootViewController The root UIViewController instance to start searching from (normally window.rootViewController).
|
|
206
|
+
// * Returns the visible UIViewController.
|
|
207
|
+
// */
|
|
208
|
+
// export function getVisibleViewController(rootViewController: any /* UIViewController*/): any; /* UIViewController*/
|
|
209
|
+
|
|
210
|
+
// /**
|
|
211
|
+
// *
|
|
212
|
+
// * @param transform Applies a rotation transform over X,Y and Z axis
|
|
213
|
+
// * @param x Rotation over X axis in degrees
|
|
214
|
+
// * @param y Rotation over Y axis in degrees
|
|
215
|
+
// * @param z Rotation over Z axis in degrees
|
|
216
|
+
// */
|
|
217
|
+
// export function applyRotateTransform(transform: any /* CATransform3D*/, x: number, y: number, z: number): any; /* CATransform3D*/
|
|
218
|
+
|
|
219
|
+
// /**
|
|
220
|
+
// * @param nativeView UIView to find shadow layer with
|
|
221
|
+
// * @param name Name of the shadow layer if looking for specifically named layer
|
|
222
|
+
// * @param create should we create a new layer if not found
|
|
223
|
+
// */
|
|
224
|
+
// export function getShadowLayer(nativeView: any /* UIView */, name?: string, create?: boolean): any; /* CALayer */
|
|
225
|
+
|
|
226
|
+
// /**
|
|
227
|
+
// * Create a UIDocumentInteractionControllerDelegate implementation for use with UIDocumentInteractionController
|
|
228
|
+
// */
|
|
229
|
+
// export function createUIDocumentInteractionControllerDelegate(): any;
|
|
230
|
+
|
|
231
|
+
// /**
|
|
232
|
+
// * Checks whether the application is running on real device and not on simulator.
|
|
233
|
+
// */
|
|
234
|
+
// export function isRealDevice(): boolean;
|
|
235
|
+
|
|
236
|
+
// /**
|
|
237
|
+
// * Debug utility to insert CGRect values into logging output.
|
|
238
|
+
// * Note: when printing a CGRect directly it will print blank so this helps show the values.
|
|
239
|
+
// * @param rect CGRect
|
|
240
|
+
// */
|
|
241
|
+
// export function printCGRect(rect: CGRect): void;
|
|
242
|
+
|
|
243
|
+
// /**
|
|
244
|
+
// * Take a snapshot of a View on screen.
|
|
245
|
+
// * @param view view to snapshot
|
|
246
|
+
// * @param scale screen scale
|
|
247
|
+
// */
|
|
248
|
+
// export function snapshotView(view: UIView, scale: number): UIImage;
|
|
249
|
+
|
|
250
|
+
// /**
|
|
251
|
+
// * Copy layer properties from one view to another.
|
|
252
|
+
// * @param view a view to copy layer properties to
|
|
253
|
+
// * @param toView a view to copy later properties from
|
|
254
|
+
// * @param (optional) custom properties to copy between both views
|
|
255
|
+
// */
|
|
256
|
+
// export function copyLayerProperties(view: UIView, toView: UIView, customProperties?: { view?: Array<string> /* Array<keyof UIView> */; layer?: Array<string> /* Array<keyof CALayer> */ }): void;
|
|
257
|
+
|
|
258
|
+
// /**
|
|
259
|
+
// * Animate views with a configurable spring effect
|
|
260
|
+
// * @param options various animation settings for the spring
|
|
261
|
+
// * - tension: number
|
|
262
|
+
// * - friction: number
|
|
263
|
+
// * - mass: number
|
|
264
|
+
// * - delay: number
|
|
265
|
+
// * - velocity: number
|
|
266
|
+
// * - animateOptions: UIViewAnimationOptions
|
|
267
|
+
// * - animations: () => void, Callback containing the property changes you want animated
|
|
268
|
+
// * - completion: (finished: boolean) => void, Callback when animation is finished
|
|
269
|
+
// */
|
|
270
|
+
// export function animateWithSpring(options?: { tension?: number; friction?: number; mass?: number; delay?: number; velocity?: number; animateOptions?: UIViewAnimationOptions; animations?: () => void; completion?: (finished?: boolean) => void });
|
|
271
|
+
// }
|
|
272
|
+
|
|
273
|
+
import * as AndroidUtils from './android';
|
|
274
|
+
export import android = AndroidUtils;
|
|
275
|
+
|
|
12
276
|
/**
|
|
13
|
-
*
|
|
277
|
+
* @deprecated use Utils.android instead.
|
|
14
278
|
*/
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Get the current native Android activity.
|
|
23
|
-
*/
|
|
24
|
-
export function getCurrentActivity(): any; /* android.app.Activity */
|
|
25
|
-
/**
|
|
26
|
-
* Gets the native Android application resources.
|
|
27
|
-
*/
|
|
28
|
-
export function getResources(): any; /* android.content.res.Resources */
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Gets the Android application context.
|
|
32
|
-
*/
|
|
33
|
-
export function getApplicationContext(): any; /* android.content.Context */
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Gets the native Android input method manager.
|
|
37
|
-
*/
|
|
38
|
-
export function getInputMethodManager(): any; /* android.view.inputmethod.InputMethodManager */
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Hides the soft input method, usually a soft keyboard.
|
|
42
|
-
*/
|
|
43
|
-
export function dismissSoftInput(nativeView?: any /* android.view.View */): void;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Shows the soft input method, usually a soft keyboard.
|
|
47
|
-
*/
|
|
48
|
-
export function showSoftInput(nativeView: any /* android.view.View */): void;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Utility module dealing with some android collections.
|
|
52
|
-
*/
|
|
53
|
-
namespace collections {
|
|
54
|
-
/**
|
|
55
|
-
* Converts string array into a String [hash set](http://developer.android.com/reference/java/util/HashSet.html).
|
|
56
|
-
* @param str - An array of strings to convert.
|
|
57
|
-
*/
|
|
58
|
-
export function stringArrayToStringSet(str: string[]): any;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Converts string hash set into array of strings.
|
|
62
|
-
* @param stringSet - A string hash set to convert.
|
|
63
|
-
*/
|
|
64
|
-
export function stringSetToStringArray(stringSet: any): string[];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Utility module related to android resources.
|
|
69
|
-
*/
|
|
70
|
-
export namespace resources {
|
|
71
|
-
/**
|
|
72
|
-
* Gets the drawable id from a given name.
|
|
73
|
-
* @param name - Name of the resource.
|
|
74
|
-
*/
|
|
75
|
-
export function getDrawableId(name);
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Gets the string id from a given name.
|
|
79
|
-
* @param name - Name of the resource.
|
|
80
|
-
*/
|
|
81
|
-
export function getStringId(name);
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Gets the id from a given name.
|
|
85
|
-
* @param name - Name of the resource.
|
|
86
|
-
*/
|
|
87
|
-
export function getId(name: string): number;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Gets the id from a given name with optional type.
|
|
91
|
-
* This sets an explicit package name.
|
|
92
|
-
* https://developer.android.com/reference/android/content/res/Resources#getIdentifier(java.lang.String,%20java.lang.String,%20java.lang.String)
|
|
93
|
-
* @param name - Name of the resource.
|
|
94
|
-
* @param type - (Optional) type
|
|
95
|
-
*/
|
|
96
|
-
export function getResource(name: string, type?: string): number;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* [Obsolete - please use getPaletteColor] Gets a color from current theme.
|
|
100
|
-
* @param name - Name of the color
|
|
101
|
-
*/
|
|
102
|
-
export function getPalleteColor();
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Gets a color from the current theme.
|
|
106
|
-
* @param name - Name of the color resource.
|
|
107
|
-
*/
|
|
108
|
-
export function getPaletteColor(name: string, context: any /* android.content.Context */): number;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Checks whether the application is running on real device and not on emulator.
|
|
113
|
-
*/
|
|
114
|
-
export function isRealDevice(): boolean;
|
|
115
|
-
}
|
|
279
|
+
export import ad = AndroidUtils;
|
|
280
|
+
|
|
281
|
+
import * as iOSUtils from './ios';
|
|
282
|
+
export import ios = iOSUtils;
|
|
283
|
+
|
|
116
284
|
/**
|
|
117
|
-
*
|
|
285
|
+
* @deprecated use Utils.ios instead.
|
|
118
286
|
*/
|
|
119
|
-
export
|
|
120
|
-
// Common properties between UILabel, UITextView and UITextField
|
|
121
|
-
export interface TextUIView {
|
|
122
|
-
font: any;
|
|
123
|
-
textAlignment: number;
|
|
124
|
-
textColor: any;
|
|
125
|
-
text: string;
|
|
126
|
-
attributedText: any;
|
|
127
|
-
lineBreakMode: number;
|
|
128
|
-
numberOfLines: number;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Utility module dealing with some iOS collections.
|
|
133
|
-
*/
|
|
134
|
-
export namespace collections {
|
|
135
|
-
/**
|
|
136
|
-
* Converts JavaScript array to [NSArray](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/).
|
|
137
|
-
* @param str - JavaScript string array to convert.
|
|
138
|
-
*/
|
|
139
|
-
export function jsArrayToNSArray<T>(str: T[]): NSArray<T>;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Converts NSArray to JavaScript array.
|
|
143
|
-
* @param a - NSArray to convert.
|
|
144
|
-
*/
|
|
145
|
-
export function nsArrayToJSArray<T>(a: NSArray<T>): T[];
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Get the root UIViewController of the app
|
|
150
|
-
*/
|
|
151
|
-
export function getRootViewController(): any; /* UIViewController */
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Get the UIWindow of the app
|
|
155
|
-
*/
|
|
156
|
-
export function getWindow(): any; /* UIWindow */
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Set the window background color of base view of the app.
|
|
160
|
-
* Often this is shown when opening a modal as the view underneath scales down revealing the window color.
|
|
161
|
-
* @param value color (hex, rgb, rgba, etc.)
|
|
162
|
-
*/
|
|
163
|
-
export function setWindowBackgroundColor(value: string): void;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Data serialize and deserialize helpers
|
|
167
|
-
*/
|
|
168
|
-
export function dataSerialize(data?: any): any;
|
|
169
|
-
export function dataDeserialize(nativeData?: any): any;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* @deprecated use application.orientation instead
|
|
173
|
-
*
|
|
174
|
-
* Gets an information about if current mode is Landscape.
|
|
175
|
-
*/
|
|
176
|
-
export function isLandscape(): boolean;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Gets the iOS device major version (for 8.1 will return 8).
|
|
180
|
-
*/
|
|
181
|
-
export const MajorVersion: number;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Opens file with associated application.
|
|
185
|
-
* @param filePath The file path.
|
|
186
|
-
*/
|
|
187
|
-
export function openFile(filePath: string): boolean;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Joins an array of file paths.
|
|
191
|
-
* @param paths An array of paths.
|
|
192
|
-
* Returns the joined path.
|
|
193
|
-
*/
|
|
194
|
-
export function joinPaths(...paths: string[]): string;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Gets the root folder for the current application. This Folder is private for the application and not accessible from Users/External apps.
|
|
198
|
-
* iOS - this folder is read-only and contains the app and all its resources.
|
|
199
|
-
*/
|
|
200
|
-
export function getCurrentAppPath(): string;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Gets the currently visible(topmost) UIViewController.
|
|
204
|
-
* @param rootViewController The root UIViewController instance to start searching from (normally window.rootViewController).
|
|
205
|
-
* Returns the visible UIViewController.
|
|
206
|
-
*/
|
|
207
|
-
export function getVisibleViewController(rootViewController: any /* UIViewController*/): any; /* UIViewController*/
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
*
|
|
211
|
-
* @param transform Applies a rotation transform over X,Y and Z axis
|
|
212
|
-
* @param x Rotation over X axis in degrees
|
|
213
|
-
* @param y Rotation over Y axis in degrees
|
|
214
|
-
* @param z Rotation over Z axis in degrees
|
|
215
|
-
*/
|
|
216
|
-
export function applyRotateTransform(transform: any /* CATransform3D*/, x: number, y: number, z: number): any; /* CATransform3D*/
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* @param nativeView UIView to find shadow layer with
|
|
220
|
-
* @param name Name of the shadow layer if looking for specifically named layer
|
|
221
|
-
* @param create should we create a new layer if not found
|
|
222
|
-
*/
|
|
223
|
-
export function getShadowLayer(nativeView: any /* UIView */, name?: string, create?: boolean): any; /* CALayer */
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Create a UIDocumentInteractionControllerDelegate implementation for use with UIDocumentInteractionController
|
|
227
|
-
*/
|
|
228
|
-
export function createUIDocumentInteractionControllerDelegate(): any;
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Checks whether the application is running on real device and not on simulator.
|
|
232
|
-
*/
|
|
233
|
-
export function isRealDevice(): boolean;
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Debug utility to insert CGRect values into logging output.
|
|
237
|
-
* Note: when printing a CGRect directly it will print blank so this helps show the values.
|
|
238
|
-
* @param rect CGRect
|
|
239
|
-
*/
|
|
240
|
-
export function printCGRect(rect: CGRect): void;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Take a snapshot of a View on screen.
|
|
244
|
-
* @param view view to snapshot
|
|
245
|
-
* @param scale screen scale
|
|
246
|
-
*/
|
|
247
|
-
export function snapshotView(view: UIView, scale: number): UIImage;
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Copy layer properties from one view to another.
|
|
251
|
-
* @param view a view to copy layer properties to
|
|
252
|
-
* @param toView a view to copy later properties from
|
|
253
|
-
* @param (optional) custom properties to copy between both views
|
|
254
|
-
*/
|
|
255
|
-
export function copyLayerProperties(view: UIView, toView: UIView, customProperties?: { view?: Array<string> /* Array<keyof UIView> */; layer?: Array<string> /* Array<keyof CALayer> */ }): void;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Animate views with a configurable spring effect
|
|
259
|
-
* @param options various animation settings for the spring
|
|
260
|
-
* - tension: number
|
|
261
|
-
* - friction: number
|
|
262
|
-
* - mass: number
|
|
263
|
-
* - delay: number
|
|
264
|
-
* - velocity: number
|
|
265
|
-
* - animateOptions: UIViewAnimationOptions
|
|
266
|
-
* - animations: () => void, Callback containing the property changes you want animated
|
|
267
|
-
* - completion: (finished: boolean) => void, Callback when animation is finished
|
|
268
|
-
*/
|
|
269
|
-
export function animateWithSpring(options?: { tension?: number; friction?: number; mass?: number; delay?: number; velocity?: number; animateOptions?: UIViewAnimationOptions; animations?: () => void; completion?: (finished?: boolean) => void });
|
|
270
|
-
}
|
|
287
|
+
export import iOSNativeHelper = iOSUtils;
|
|
@@ -1,40 +1,10 @@
|
|
|
1
|
+
import * as iOSUtils from './ios';
|
|
1
2
|
export declare function dataDeserialize(nativeData?: any): any;
|
|
2
3
|
export declare function dataSerialize(data: any, wrapPrimitives?: boolean): any;
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
function getRootViewController(): UIViewController;
|
|
12
|
-
function getWindow(): UIWindow;
|
|
13
|
-
function setWindowBackgroundColor(value: string): void;
|
|
14
|
-
function isLandscape(): boolean;
|
|
15
|
-
const MajorVersion: number;
|
|
16
|
-
function openFile(filePath: string): boolean;
|
|
17
|
-
function getCurrentAppPath(): string;
|
|
18
|
-
function joinPaths(...paths: string[]): string;
|
|
19
|
-
function getVisibleViewController(rootViewController: UIViewController): UIViewController;
|
|
20
|
-
function applyRotateTransform(transform: CATransform3D, x: number, y: number, z: number): CATransform3D;
|
|
21
|
-
function getShadowLayer(nativeView: UIView, name?: string, create?: boolean): CALayer;
|
|
22
|
-
function createUIDocumentInteractionControllerDelegate(): NSObject;
|
|
23
|
-
function isRealDevice(): true | NSArray<string>;
|
|
24
|
-
function printCGRect(rect: CGRect): string;
|
|
25
|
-
function snapshotView(view: UIView, scale: number): UIImage;
|
|
26
|
-
function copyLayerProperties(view: UIView, toView: UIView, customProperties?: {
|
|
27
|
-
view?: Array<keyof UIView>;
|
|
28
|
-
layer?: Array<keyof CALayer>;
|
|
29
|
-
}): void;
|
|
30
|
-
function animateWithSpring(options?: {
|
|
31
|
-
tension?: number;
|
|
32
|
-
friction?: number;
|
|
33
|
-
mass?: number;
|
|
34
|
-
delay?: number;
|
|
35
|
-
velocity?: number;
|
|
36
|
-
animateOptions?: UIViewAnimationOptions;
|
|
37
|
-
animations?: () => void;
|
|
38
|
-
completion?: (finished?: boolean) => void;
|
|
39
|
-
}): void;
|
|
40
|
-
}
|
|
4
|
+
export declare const ad: {};
|
|
5
|
+
export declare const android: {};
|
|
6
|
+
export import ios = iOSUtils;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use `Utils.ios` instead.
|
|
9
|
+
*/
|
|
10
|
+
export import iOSNativeHelper = iOSUtils;
|