@nativescript/core 8.9.0-next-02-18-2025-13383540739 → 8.9.0-next-02-18-2025-13384702309
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/package.json +1 -1
- package/ui/activity-indicator/activity-indicator-common.d.ts +3 -1
- package/ui/activity-indicator/activity-indicator-common.js +5 -0
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
- package/ui/activity-indicator/index.d.ts +7 -0
- package/ui/activity-indicator/index.ios.d.ts +1 -1
- package/ui/activity-indicator/index.ios.js +18 -12
- package/ui/activity-indicator/index.ios.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript/core",
|
|
3
|
-
"version": "8.9.0-next-02-18-2025-
|
|
3
|
+
"version": "8.9.0-next-02-18-2025-13384702309",
|
|
4
4
|
"description": "A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ActivityIndicator as ActivityIndicatorDefinition } from '.';
|
|
1
|
+
import { ActivityIndicator as ActivityIndicatorDefinition, IOSIndicatorViewStyle } from '.';
|
|
2
2
|
import { View } from '../core/view';
|
|
3
3
|
import { Property } from '../core/properties';
|
|
4
4
|
export declare class ActivityIndicatorBase extends View implements ActivityIndicatorDefinition {
|
|
5
5
|
busy: boolean;
|
|
6
|
+
iosIndicatorViewStyle: IOSIndicatorViewStyle;
|
|
6
7
|
}
|
|
7
8
|
export declare const busyProperty: Property<ActivityIndicatorBase, boolean>;
|
|
9
|
+
export declare const iosIndicatorViewStyleProperty: Property<ActivityIndicatorBase, IOSIndicatorViewStyle>;
|
|
@@ -14,4 +14,9 @@ export const busyProperty = new Property({
|
|
|
14
14
|
valueConverter: booleanConverter,
|
|
15
15
|
});
|
|
16
16
|
busyProperty.register(ActivityIndicatorBase);
|
|
17
|
+
export const iosIndicatorViewStyleProperty = new Property({
|
|
18
|
+
name: 'iosIndicatorViewStyle',
|
|
19
|
+
defaultValue: 'medium',
|
|
20
|
+
});
|
|
21
|
+
iosIndicatorViewStyleProperty.register(ActivityIndicatorBase);
|
|
17
22
|
//# sourceMappingURL=activity-indicator-common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-indicator-common.js","sourceRoot":"","sources":["../../../../../packages/core/ui/activity-indicator/activity-indicator-common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGvC,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,IAAI;
|
|
1
|
+
{"version":3,"file":"activity-indicator-common.js","sourceRoot":"","sources":["../../../../../packages/core/ui/activity-indicator/activity-indicator-common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGvC,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,IAAI;CAG9C,CAAA;AAHY,qBAAqB;IADjC,OAAO,CAAC,mBAAmB,CAAC;GAChB,qBAAqB,CAGjC;;AAED,qBAAqB,CAAC,SAAS,CAAC,iBAAiB,GAAG,MAAM,CAAC;AAE3D,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,QAAQ,CAAiC;IACxE,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,gBAAgB;CAChC,CAAC,CAAC;AACH,YAAY,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,QAAQ,CAA+C;IACvG,IAAI,EAAE,uBAAuB;IAC7B,YAAY,EAAE,QAAQ;CACtB,CAAC,CAAC;AACH,6BAA6B,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { View } from '../core/view';
|
|
2
2
|
|
|
3
|
+
export type IOSIndicatorViewStyle = 'medium' | 'large';
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* Represents a UI widget which displays a progress indicator hinting the user for some background operation running.
|
|
5
7
|
*
|
|
@@ -22,4 +24,9 @@ export class ActivityIndicator extends View {
|
|
|
22
24
|
* @nsProperty
|
|
23
25
|
*/
|
|
24
26
|
busy: boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Gets or sets the iOS indicator view style (e.g. medium, large).
|
|
30
|
+
*/
|
|
31
|
+
iosIndicatorViewStyle: IOSIndicatorViewStyle;
|
|
25
32
|
}
|
|
@@ -2,7 +2,7 @@ import { ActivityIndicatorBase } from './activity-indicator-common';
|
|
|
2
2
|
export * from './activity-indicator-common';
|
|
3
3
|
export declare class ActivityIndicator extends ActivityIndicatorBase {
|
|
4
4
|
nativeViewProtected: UIActivityIndicatorView;
|
|
5
|
-
private _activityIndicatorViewStyle;
|
|
6
5
|
createNativeView(): UIActivityIndicatorView;
|
|
7
6
|
get ios(): UIActivityIndicatorView;
|
|
7
|
+
private _getNativeIndicatorViewStyle;
|
|
8
8
|
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { ActivityIndicatorBase, busyProperty } from './activity-indicator-common';
|
|
1
|
+
import { ActivityIndicatorBase, busyProperty, iosIndicatorViewStyleProperty } from './activity-indicator-common';
|
|
2
2
|
import { colorProperty } from '../styling/style-properties';
|
|
3
3
|
import { Color } from '../../color';
|
|
4
4
|
import { iOSNativeHelper } from '../../utils';
|
|
5
5
|
export * from './activity-indicator-common';
|
|
6
6
|
const majorVersion = iOSNativeHelper.MajorVersion;
|
|
7
7
|
export class ActivityIndicator extends ActivityIndicatorBase {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this._activityIndicatorViewStyle = majorVersion <= 12 || !100 /* UIActivityIndicatorViewStyle.Medium */ ? 2 /* UIActivityIndicatorViewStyle.Gray */ : 100 /* UIActivityIndicatorViewStyle.Medium */;
|
|
11
|
-
}
|
|
12
8
|
createNativeView() {
|
|
13
|
-
const viewStyle = this.
|
|
9
|
+
const viewStyle = this._getNativeIndicatorViewStyle(this.iosIndicatorViewStyle);
|
|
14
10
|
const view = UIActivityIndicatorView.alloc().initWithActivityIndicatorStyle(viewStyle);
|
|
15
11
|
view.hidesWhenStopped = true;
|
|
16
12
|
return view;
|
|
@@ -19,13 +15,20 @@ export class ActivityIndicator extends ActivityIndicatorBase {
|
|
|
19
15
|
get ios() {
|
|
20
16
|
return this.nativeViewProtected;
|
|
21
17
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
_getNativeIndicatorViewStyle(value) {
|
|
19
|
+
let viewStyle;
|
|
20
|
+
switch (value) {
|
|
21
|
+
case 'large':
|
|
22
|
+
viewStyle = majorVersion > 12 ? 101 /* UIActivityIndicatorViewStyle.Large */ : 0 /* UIActivityIndicatorViewStyle.WhiteLarge */;
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
viewStyle = majorVersion > 12 ? 100 /* UIActivityIndicatorViewStyle.Medium */ : 2 /* UIActivityIndicatorViewStyle.Gray */;
|
|
26
|
+
break;
|
|
28
27
|
}
|
|
28
|
+
return viewStyle;
|
|
29
|
+
}
|
|
30
|
+
[busyProperty.getDefault]() {
|
|
31
|
+
return this.nativeViewProtected.animating;
|
|
29
32
|
}
|
|
30
33
|
[busyProperty.setNative](value) {
|
|
31
34
|
const nativeView = this.nativeViewProtected;
|
|
@@ -45,5 +48,8 @@ export class ActivityIndicator extends ActivityIndicatorBase {
|
|
|
45
48
|
[colorProperty.setNative](value) {
|
|
46
49
|
this.nativeViewProtected.color = value instanceof Color ? value.ios : value;
|
|
47
50
|
}
|
|
51
|
+
[iosIndicatorViewStyleProperty.setNative](value) {
|
|
52
|
+
this.nativeViewProtected.activityIndicatorViewStyle = this._getNativeIndicatorViewStyle(value);
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
//# sourceMappingURL=index.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/activity-indicator/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/activity-indicator/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjH,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,cAAc,6BAA6B,CAAC;AAE5C,MAAM,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC;AAElD,MAAM,OAAO,iBAAkB,SAAQ,qBAAqB;IAG3D,gBAAgB;QACf,MAAM,SAAS,GAAG,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAChF,MAAM,IAAI,GAAG,uBAAuB,CAAC,KAAK,EAAE,CAAC,8BAA8B,CAAC,SAAS,CAAC,CAAC;QACvF,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAE7B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,aAAa;IACb,IAAI,GAAG;QACN,OAA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