@nativescript/core 9.0.0-alpha.24 → 9.0.0-alpha.25
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/application/application.android.d.ts +9 -2
- package/application/application.android.js +83 -6
- package/application/application.android.js.map +1 -1
- package/application/application.d.ts +8 -1
- package/application/application.ios.d.ts +13 -1
- package/application/application.ios.js +30 -3
- package/application/application.ios.js.map +1 -1
- package/application/helpers.android.d.ts +0 -9
- package/application/helpers.android.js +0 -54
- package/application/helpers.android.js.map +1 -1
- package/application/helpers.d.ts +0 -10
- package/application/helpers.ios.d.ts +0 -19
- package/application/helpers.ios.js +0 -38
- package/application/helpers.ios.js.map +1 -1
- package/connectivity/index.android.js +3 -3
- package/connectivity/index.android.js.map +1 -1
- package/core-types/index.d.ts +68 -63
- package/core-types/index.js.map +1 -1
- package/image-source/index.d.ts +2 -2
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/references.d.ts +1 -1
- package/ui/button/index.ios.js.map +1 -1
- package/ui/core/view/index.android.d.ts +4 -6
- package/ui/core/view/index.android.js +126 -271
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +1 -1
- package/ui/core/view/index.ios.d.ts +7 -0
- package/ui/core/view/index.ios.js +74 -35
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +37 -5
- package/ui/core/view/view-common.js +21 -0
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-interfaces.d.ts +3 -0
- package/ui/frame/index.android.js +55 -2
- package/ui/frame/index.android.js.map +1 -1
- package/ui/index.d.ts +1 -1
- package/ui/layouts/index.d.ts +2 -0
- package/ui/layouts/index.js +2 -0
- package/ui/layouts/index.js.map +1 -1
- package/ui/layouts/liquid-glass/index.android.d.ts +5 -0
- package/ui/layouts/liquid-glass/index.android.js +8 -0
- package/ui/layouts/liquid-glass/index.android.js.map +1 -0
- package/ui/layouts/liquid-glass/index.d.ts +10 -0
- package/ui/layouts/liquid-glass/index.ios.d.ts +10 -0
- package/ui/layouts/liquid-glass/index.ios.js +59 -0
- package/ui/layouts/liquid-glass/index.ios.js.map +1 -0
- package/ui/layouts/liquid-glass/liquid-glass-common.d.ts +3 -0
- package/ui/layouts/liquid-glass/liquid-glass-common.js +4 -0
- package/ui/layouts/liquid-glass/liquid-glass-common.js.map +1 -0
- package/ui/layouts/liquid-glass-container/index.android.d.ts +3 -0
- package/ui/layouts/liquid-glass-container/index.android.js +4 -0
- package/ui/layouts/liquid-glass-container/index.android.js.map +1 -0
- package/ui/layouts/liquid-glass-container/index.d.ts +3 -0
- package/ui/layouts/liquid-glass-container/index.ios.d.ts +14 -0
- package/ui/layouts/liquid-glass-container/index.ios.js +121 -0
- package/ui/layouts/liquid-glass-container/index.ios.js.map +1 -0
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.d.ts +4 -0
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js +5 -0
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +1 -0
- package/ui/list-view/index.android.d.ts +26 -1
- package/ui/list-view/index.android.js +701 -23
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +122 -0
- package/ui/list-view/index.ios.d.ts +34 -2
- package/ui/list-view/index.ios.js +560 -9
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.d.ts +22 -1
- package/ui/list-view/list-view-common.js +85 -0
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/styling/background-common.d.ts +4 -4
- package/ui/styling/background-common.js +8 -8
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.d.ts +0 -3
- package/ui/styling/background.ios.d.ts +2 -1
- package/ui/styling/background.ios.js +47 -38
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/css-utils.d.ts +1 -0
- package/ui/styling/css-utils.js +15 -4
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/style/index.d.ts +2 -1
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.js +23 -11
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/tab-view/index.android.js +22 -8
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.ios.d.ts +1 -1
- package/ui/tab-view/index.ios.js +28 -9
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.d.ts +2 -0
- package/ui/tab-view/tab-view-common.js +5 -0
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/utils/common.d.ts +3 -1
- package/utils/common.js +9 -3
- package/utils/common.js.map +1 -1
- package/utils/index.d.ts +6 -0
- package/utils/native-helper-for-android.d.ts +14 -3
- package/utils/native-helper-for-android.js +57 -54
- package/utils/native-helper-for-android.js.map +1 -1
- package/utils/native-helper.android.d.ts +3 -3
- package/utils/native-helper.android.js +2 -2
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.d.ts +22 -5
package/index.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// Init globals first (use import to ensure it's always at the top)
|
|
4
4
|
import './globals';
|
|
5
5
|
export * from './application';
|
|
6
|
-
export { androidRegisterBroadcastReceiver, androidUnregisterBroadcastReceiver, androidRegisteredReceivers, iosAddNotificationObserver, iosRemoveNotificationObserver, iosNotificationObservers } from './application/helpers';
|
|
7
6
|
export { getNativeApp, setNativeApp } from './application/helpers-common';
|
|
8
7
|
export * as ApplicationSettings from './application-settings';
|
|
9
8
|
import * as Accessibility from './accessibility';
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/core/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,4CAA4C;AAC5C,mEAAmE;AACnE,OAAO,WAAW,CAAC;AACnB,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceR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AAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAElG,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,OAAO,IAAI,gBAAgB,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,IAAI,eAAe,EAAE,KAAK,IAAI,cAAc,EAAE,IAAI,IAAI,aAAa,EAAE,SAAS,IAAI,kBAAkB,EAAE,YAAY,IAAI,qBAAqB,EAAE,aAAa,IAAI,sBAAsB,EAAE,eAAe,IAAI,iBAAiB,EAAE,cAAc,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE3X,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAChE,cAAc,MAAM,CAAC"}
|
package/package.json
CHANGED
|
Binary file
|
package/references.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/// <reference path="../types-ios/src/lib/ios/objc-x86_64/objc!Darwin.d.ts" />
|
|
5
5
|
/// <reference path="../types-ios/src/lib/ios/objc-x86_64/objc!DarwinFoundation.d.ts" />
|
|
6
6
|
/// <reference path="../types-ios/src/lib/ios/objc-x86_64/objc!Symbols.d.ts" />
|
|
7
|
-
/// <reference path="../types-android/src/lib/android-
|
|
7
|
+
/// <reference path="../types-android/src/lib/android-33.d.ts" />
|
|
8
8
|
/// <reference path="./platforms/ios/typings/objc!MaterialComponents.d.ts" />
|
|
9
9
|
/// <reference path="./platforms/ios/typings/objc!NativeScriptUtils.d.ts" />
|
|
10
10
|
/// <reference path="./global-types.d.ts" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/button/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzO,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/button/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzO,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,oBAA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E,cAAc,CAAC,CAAC;QAC1D,CAAC;IACF,CAAC;CACD;AAlQA;IADC,kBAAkB,CAAC,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,CAAC;;;;6DA2BhE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Point, Position } from './view-interfaces';
|
|
2
2
|
import type { GestureTypes, GestureEventData } from '../../gestures';
|
|
3
|
-
import { ViewCommon, isEnabledProperty, originXProperty, originYProperty, isUserInteractionEnabledProperty, testIDProperty, statusBarStyleProperty } from './view-common';
|
|
3
|
+
import { ViewCommon, isEnabledProperty, originXProperty, originYProperty, isUserInteractionEnabledProperty, testIDProperty, androidOverflowEdgeProperty, statusBarStyleProperty } from './view-common';
|
|
4
4
|
import { ShowModalOptions, hiddenProperty } from '../view-base';
|
|
5
5
|
import { EventData } from '../../../data/observable';
|
|
6
6
|
import { perspectiveProperty, visibilityProperty, opacityProperty, horizontalAlignmentProperty, verticalAlignmentProperty, minWidthProperty, minHeightProperty, rotateProperty, rotateXProperty, rotateYProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, androidElevationProperty, androidDynamicElevationOffsetProperty } from '../../styling/style-properties';
|
|
@@ -13,6 +13,7 @@ export * from './view-common';
|
|
|
13
13
|
export * from './view-helper';
|
|
14
14
|
export * from '../properties';
|
|
15
15
|
export declare class View extends ViewCommon {
|
|
16
|
+
[androidOverflowEdgeProperty.setNative]: (value: CoreTypes.AndroidOverflow) => void;
|
|
16
17
|
[isEnabledProperty.setNative]: (value: boolean) => void;
|
|
17
18
|
[originXProperty.getDefault]: () => number;
|
|
18
19
|
[originXProperty.setNative]: (value: number) => void;
|
|
@@ -81,10 +82,6 @@ export declare class View extends ViewCommon {
|
|
|
81
82
|
_getChildFragmentManager(): androidx.fragment.app.FragmentManager;
|
|
82
83
|
_getRootFragmentManager(): androidx.fragment.app.FragmentManager;
|
|
83
84
|
_getFragmentManager(): androidx.fragment.app.FragmentManager;
|
|
84
|
-
protected _defaultOverflowEdge: number;
|
|
85
|
-
protected _defaultOverflowEdgeValue: string;
|
|
86
|
-
set androidOverflowEdge(value: string);
|
|
87
|
-
get androidOverflowEdge(): string;
|
|
88
85
|
onLoaded(): void;
|
|
89
86
|
onUnloaded(): void;
|
|
90
87
|
onBackPressed(): boolean;
|
|
@@ -124,7 +121,7 @@ export declare class View extends ViewCommon {
|
|
|
124
121
|
protected getDefaultDynamicElevationOffset(): number;
|
|
125
122
|
private refreshStateListAnimator;
|
|
126
123
|
_applyBackground(background: Background, isBorderDrawable: boolean, onlyColor: boolean, backgroundDrawable: android.graphics.drawable.Drawable): void;
|
|
127
|
-
protected _drawBoxShadow(
|
|
124
|
+
protected _drawBoxShadow(boxShadows: BoxShadow[]): void;
|
|
128
125
|
_redrawNativeBackground(value: android.graphics.drawable.Drawable | Background): void;
|
|
129
126
|
protected onBackgroundOrBorderPropertyChanged(): void;
|
|
130
127
|
accessibilityAnnouncement(message?: string): void;
|
|
@@ -132,6 +129,7 @@ export declare class View extends ViewCommon {
|
|
|
132
129
|
}
|
|
133
130
|
export declare class ContainerView extends View {
|
|
134
131
|
iosOverflowSafeArea: boolean;
|
|
132
|
+
constructor();
|
|
135
133
|
}
|
|
136
134
|
export declare class CustomLayoutView extends ContainerView {
|
|
137
135
|
nativeViewProtected: android.view.ViewGroup;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getNativeScriptGlobals } from '../../../globals/global-utils';
|
|
2
|
-
import { ViewCommon, isEnabledProperty, originXProperty, originYProperty, isUserInteractionEnabledProperty, testIDProperty, AndroidHelper, statusBarStyleProperty } from './view-common';
|
|
2
|
+
import { ViewCommon, isEnabledProperty, originXProperty, originYProperty, isUserInteractionEnabledProperty, testIDProperty, AndroidHelper, androidOverflowEdgeProperty, statusBarStyleProperty } from './view-common';
|
|
3
3
|
import { paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty } from '../../styling/style-properties';
|
|
4
|
-
import { Length } from '../../styling/length-shared';
|
|
5
4
|
import { layout } from '../../../utils';
|
|
6
5
|
import { Trace } from '../../../trace';
|
|
7
6
|
import { hiddenProperty } from '../view-base';
|
|
@@ -44,6 +43,38 @@ const STATUS_BAR_DARK_BCKG = 1711276032;
|
|
|
44
43
|
const modalMap = new Map();
|
|
45
44
|
let TouchListener;
|
|
46
45
|
let DialogFragment;
|
|
46
|
+
let OnBackPressedCallback;
|
|
47
|
+
if (SDK_VERSION >= 33) {
|
|
48
|
+
OnBackPressedCallback = androidx.activity.OnBackPressedCallback.extend({
|
|
49
|
+
handleOnBackPressed() {
|
|
50
|
+
console.log('OnBackPressedCallback handleOnBackPressed called');
|
|
51
|
+
const dialog = this['_dialog']?.get();
|
|
52
|
+
if (!dialog) {
|
|
53
|
+
// disable the callback and call super to avoid infinite loop
|
|
54
|
+
this.setEnabled(false);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const view = dialog.fragment.owner;
|
|
58
|
+
const args = {
|
|
59
|
+
eventName: 'activityBackPressed',
|
|
60
|
+
object: view,
|
|
61
|
+
activity: view._context,
|
|
62
|
+
cancel: false,
|
|
63
|
+
};
|
|
64
|
+
// Fist fire application.android global event
|
|
65
|
+
getNativeScriptGlobals().events.notify(args);
|
|
66
|
+
if (args.cancel) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
view.notify(args);
|
|
70
|
+
if (!args.cancel) {
|
|
71
|
+
this.setEnabled(false);
|
|
72
|
+
dialog.getOnBackPressedDispatcher().onBackPressed();
|
|
73
|
+
this.setEnabled(true);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
47
78
|
function initializeTouchListener() {
|
|
48
79
|
if (TouchListener) {
|
|
49
80
|
return;
|
|
@@ -85,6 +116,12 @@ function initializeDialogFragment() {
|
|
|
85
116
|
function DialogImpl(fragment, context, themeResId) {
|
|
86
117
|
var _this = _super.call(this, context, themeResId) || this;
|
|
87
118
|
_this.fragment = fragment;
|
|
119
|
+
if (SDK_VERSION >= 33 && OnBackPressedCallback) {
|
|
120
|
+
var callback = new OnBackPressedCallback(true);
|
|
121
|
+
callback['_dialog'] = new WeakRef(_this);
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
_this.getOnBackPressedDispatcher().addCallback(_this, callback);
|
|
124
|
+
}
|
|
88
125
|
return global.__native(_this);
|
|
89
126
|
}
|
|
90
127
|
DialogImpl.prototype.onDetachedFromWindow = function () {
|
|
@@ -92,6 +129,10 @@ function initializeDialogFragment() {
|
|
|
92
129
|
this.fragment = null;
|
|
93
130
|
};
|
|
94
131
|
DialogImpl.prototype.onBackPressed = function () {
|
|
132
|
+
if (SDK_VERSION >= 33) {
|
|
133
|
+
_super.prototype.onBackPressed.call(this);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
95
136
|
var view = this.fragment.owner;
|
|
96
137
|
var args = {
|
|
97
138
|
eventName: 'activityBackPressed',
|
|
@@ -110,7 +151,7 @@ function initializeDialogFragment() {
|
|
|
110
151
|
}
|
|
111
152
|
};
|
|
112
153
|
return DialogImpl;
|
|
113
|
-
}(
|
|
154
|
+
}(androidx.appcompat.app.AppCompatDialog));
|
|
114
155
|
var DialogFragmentImpl = /** @class */ (function (_super) {
|
|
115
156
|
__extends(DialogFragmentImpl, _super);
|
|
116
157
|
function DialogFragmentImpl() {
|
|
@@ -253,20 +294,21 @@ const INSET_LEFT_CONSUMED = 16;
|
|
|
253
294
|
const INSET_TOP_CONSUMED = 20;
|
|
254
295
|
const INSET_RIGHT_CONSUMED = 24;
|
|
255
296
|
const INSET_BOTTOM_CONSUMED = 28;
|
|
297
|
+
const OverflowEdgeIgnore = -1;
|
|
256
298
|
const OverflowEdgeNone = 0;
|
|
257
|
-
const OverflowEdgeLeft = 1;
|
|
258
|
-
const OverflowEdgeTop = 1 <<
|
|
259
|
-
const OverflowEdgeRight = 1 <<
|
|
260
|
-
const OverflowEdgeBottom = 1 <<
|
|
261
|
-
const OverflowEdgeDontApply = 1 <<
|
|
262
|
-
const OverflowEdgeLeftDontConsume = 1 <<
|
|
263
|
-
const OverflowEdgeTopDontConsume = 1 <<
|
|
264
|
-
const OverflowEdgeRightDontConsume = 1 <<
|
|
265
|
-
const OverflowEdgeBottomDontConsume = 1 <<
|
|
266
|
-
const OverflowEdgeAllButLeft = 1 <<
|
|
267
|
-
const OverflowEdgeAllButTop = 1 <<
|
|
268
|
-
const OverflowEdgeAllButRight = 1 <<
|
|
269
|
-
const OverflowEdgeAllButBottom = 1 <<
|
|
299
|
+
const OverflowEdgeLeft = 1 << 1;
|
|
300
|
+
const OverflowEdgeTop = 1 << 2;
|
|
301
|
+
const OverflowEdgeRight = 1 << 3;
|
|
302
|
+
const OverflowEdgeBottom = 1 << 4;
|
|
303
|
+
const OverflowEdgeDontApply = 1 << 5;
|
|
304
|
+
const OverflowEdgeLeftDontConsume = 1 << 6;
|
|
305
|
+
const OverflowEdgeTopDontConsume = 1 << 7;
|
|
306
|
+
const OverflowEdgeRightDontConsume = 1 << 8;
|
|
307
|
+
const OverflowEdgeBottomDontConsume = 1 << 9;
|
|
308
|
+
const OverflowEdgeAllButLeft = 1 << 10;
|
|
309
|
+
const OverflowEdgeAllButTop = 1 << 11;
|
|
310
|
+
const OverflowEdgeAllButRight = 1 << 12;
|
|
311
|
+
const OverflowEdgeAllButBottom = 1 << 13;
|
|
270
312
|
class Inset {
|
|
271
313
|
constructor(data) {
|
|
272
314
|
this.data = ArrayBuffer.from(data);
|
|
@@ -337,11 +379,6 @@ class Inset {
|
|
|
337
379
|
}
|
|
338
380
|
}
|
|
339
381
|
export class View extends ViewCommon {
|
|
340
|
-
constructor() {
|
|
341
|
-
super(...arguments);
|
|
342
|
-
this._defaultOverflowEdge = OverflowEdgeNone;
|
|
343
|
-
this._defaultOverflowEdgeValue = 'none';
|
|
344
|
-
}
|
|
345
382
|
// TODO: Implement unobserve that detach the touchListener.
|
|
346
383
|
_observe(type, callback, thisArg) {
|
|
347
384
|
super._observe(type, callback, thisArg);
|
|
@@ -449,128 +486,30 @@ export class View extends ViewCommon {
|
|
|
449
486
|
}
|
|
450
487
|
return manager;
|
|
451
488
|
}
|
|
452
|
-
|
|
453
|
-
set androidOverflowEdge(value) {
|
|
454
|
-
if (typeof value !== 'string') {
|
|
455
|
-
return;
|
|
456
|
-
}
|
|
489
|
+
[androidOverflowEdgeProperty.setNative](value) {
|
|
457
490
|
const nativeView = this.nativeViewProtected;
|
|
458
|
-
if (nativeView
|
|
459
|
-
|
|
460
|
-
nativeView.setOverflowEdge(OverflowEdgeNone);
|
|
461
|
-
}
|
|
462
|
-
else {
|
|
463
|
-
const newValue = parseEdges(value);
|
|
464
|
-
if (newValue !== null) {
|
|
465
|
-
nativeView.setOverflowEdge(newValue);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
491
|
+
if (typeof value !== 'string' || nativeView === null || nativeView == undefined) {
|
|
492
|
+
return;
|
|
468
493
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
if (edge === null) {
|
|
472
|
-
return;
|
|
473
|
-
}
|
|
474
|
-
this._defaultOverflowEdgeValue = value;
|
|
475
|
-
this._defaultOverflowEdge = edge;
|
|
494
|
+
if (!('setOverflowEdge' in nativeView)) {
|
|
495
|
+
return;
|
|
476
496
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
case OverflowEdgeRight:
|
|
490
|
-
return 'right';
|
|
491
|
-
case OverflowEdgeBottom:
|
|
492
|
-
return 'bottom';
|
|
493
|
-
case OverflowEdgeDontApply:
|
|
494
|
-
return 'dont-apply';
|
|
495
|
-
case OverflowEdgeLeftDontConsume:
|
|
496
|
-
return 'left-dont-consume';
|
|
497
|
-
case OverflowEdgeTopDontConsume:
|
|
498
|
-
return 'top-dont-consume';
|
|
499
|
-
case OverflowEdgeRightDontConsume:
|
|
500
|
-
return 'right-dont-consume';
|
|
501
|
-
case OverflowEdgeBottomDontConsume:
|
|
502
|
-
return 'bottom-dont-consume';
|
|
503
|
-
case OverflowEdgeAllButLeft:
|
|
504
|
-
return 'all-but-left';
|
|
505
|
-
case OverflowEdgeAllButTop:
|
|
506
|
-
return 'all-but-top';
|
|
507
|
-
case OverflowEdgeAllButRight:
|
|
508
|
-
return 'all-but-right';
|
|
509
|
-
case OverflowEdgeAllButBottom:
|
|
510
|
-
return 'all-but-bottom';
|
|
511
|
-
default:
|
|
512
|
-
{
|
|
513
|
-
let value = '';
|
|
514
|
-
const overflowLeftConsume = (overflowEdge & OverflowEdgeLeft) == OverflowEdgeLeft;
|
|
515
|
-
const overflowTopConsume = (overflowEdge & OverflowEdgeTop) == OverflowEdgeTop;
|
|
516
|
-
const overflowRightConsume = (overflowEdge & OverflowEdgeRight) == OverflowEdgeRight;
|
|
517
|
-
const overflowBottomConsume = (overflowEdge & OverflowEdgeBottom) == OverflowEdgeBottom;
|
|
518
|
-
const overflowLeft = (overflowEdge & OverflowEdgeLeftDontConsume) == OverflowEdgeLeftDontConsume;
|
|
519
|
-
const overflowTop = (overflowEdge & OverflowEdgeTopDontConsume) == OverflowEdgeTopDontConsume;
|
|
520
|
-
const overflowRight = (overflowEdge & OverflowEdgeRightDontConsume) == OverflowEdgeRightDontConsume;
|
|
521
|
-
const overflowBottom = (overflowEdge & OverflowEdgeBottomDontConsume) == OverflowEdgeBottomDontConsume;
|
|
522
|
-
if (overflowLeftConsume) {
|
|
523
|
-
value += 'left';
|
|
524
|
-
}
|
|
525
|
-
if (overflowTopConsume) {
|
|
526
|
-
if (value.length > 0) {
|
|
527
|
-
value += ',';
|
|
528
|
-
}
|
|
529
|
-
value += 'top';
|
|
530
|
-
}
|
|
531
|
-
if (overflowRightConsume) {
|
|
532
|
-
if (value.length > 0) {
|
|
533
|
-
value += ',';
|
|
534
|
-
}
|
|
535
|
-
value += 'right';
|
|
536
|
-
}
|
|
537
|
-
if (overflowBottomConsume) {
|
|
538
|
-
if (value.length > 0) {
|
|
539
|
-
value += ',';
|
|
540
|
-
}
|
|
541
|
-
value += 'bottom';
|
|
542
|
-
}
|
|
543
|
-
if (overflowLeft) {
|
|
544
|
-
value += 'left-dont-consume';
|
|
545
|
-
}
|
|
546
|
-
if (overflowTop) {
|
|
547
|
-
if (value.length > 0) {
|
|
548
|
-
value += ',';
|
|
549
|
-
}
|
|
550
|
-
value += 'top-dont-consume';
|
|
551
|
-
}
|
|
552
|
-
if (overflowRight) {
|
|
553
|
-
if (value.length > 0) {
|
|
554
|
-
value += ',';
|
|
555
|
-
}
|
|
556
|
-
value += 'right-dont-consume';
|
|
557
|
-
}
|
|
558
|
-
if (overflowBottom) {
|
|
559
|
-
if (value.length > 0) {
|
|
560
|
-
value += ',';
|
|
561
|
-
}
|
|
562
|
-
value += 'bottom-dont-consume';
|
|
563
|
-
}
|
|
497
|
+
switch (value) {
|
|
498
|
+
case 'none':
|
|
499
|
+
nativeView.setOverflowEdge(OverflowEdgeNone);
|
|
500
|
+
break;
|
|
501
|
+
case 'ignore':
|
|
502
|
+
nativeView.setOverflowEdge(OverflowEdgeIgnore);
|
|
503
|
+
break;
|
|
504
|
+
default:
|
|
505
|
+
{
|
|
506
|
+
const edge = parseEdges(value);
|
|
507
|
+
if (edge != null) {
|
|
508
|
+
nativeView.setOverflowEdge(edge);
|
|
564
509
|
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
}
|
|
568
|
-
else {
|
|
569
|
-
if (this._defaultOverflowEdgeValue) {
|
|
570
|
-
return this._defaultOverflowEdgeValue;
|
|
571
|
-
}
|
|
510
|
+
}
|
|
511
|
+
break;
|
|
572
512
|
}
|
|
573
|
-
return 'none';
|
|
574
513
|
}
|
|
575
514
|
onLoaded() {
|
|
576
515
|
this._manager = null;
|
|
@@ -614,12 +553,6 @@ export class View extends ViewCommon {
|
|
|
614
553
|
if (!this.insetListenerIsSet && this.needsInsetListener) {
|
|
615
554
|
this.setInsetListener();
|
|
616
555
|
}
|
|
617
|
-
const nativeView = this.nativeViewProtected;
|
|
618
|
-
if (typeof this._defaultOverflowEdge === 'number') {
|
|
619
|
-
if (nativeView && nativeView.setOverflowEdge) {
|
|
620
|
-
nativeView.setOverflowEdge(this._defaultOverflowEdge);
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
556
|
}
|
|
624
557
|
needsOnLayoutChangeListener() {
|
|
625
558
|
return this.hasListeners(ViewCommon.layoutChangedEvent);
|
|
@@ -1303,17 +1236,21 @@ export class View extends ViewCommon {
|
|
|
1303
1236
|
}
|
|
1304
1237
|
}
|
|
1305
1238
|
}
|
|
1306
|
-
_drawBoxShadow(
|
|
1239
|
+
_drawBoxShadow(boxShadows) {
|
|
1307
1240
|
const nativeView = this.nativeViewProtected;
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1241
|
+
const valueCount = 6;
|
|
1242
|
+
const nativeArray = Array.create('int', boxShadows.length * valueCount);
|
|
1243
|
+
for (let i = 0, length = boxShadows.length; i < length; i++) {
|
|
1244
|
+
const boxShadow = boxShadows[i];
|
|
1245
|
+
const nativeIndex = i * valueCount;
|
|
1246
|
+
nativeArray[nativeIndex + 0] = boxShadow.color.android;
|
|
1247
|
+
nativeArray[nativeIndex + 1] = boxShadow.spreadRadius;
|
|
1248
|
+
nativeArray[nativeIndex + 2] = boxShadow.blurRadius;
|
|
1249
|
+
nativeArray[nativeIndex + 3] = boxShadow.offsetX;
|
|
1250
|
+
nativeArray[nativeIndex + 4] = boxShadow.offsetY;
|
|
1251
|
+
nativeArray[nativeIndex + 5] = boxShadow.inset ? 1 : 0;
|
|
1252
|
+
}
|
|
1253
|
+
org.nativescript.widgets.Utils.drawBoxShadow(nativeView, nativeArray);
|
|
1317
1254
|
}
|
|
1318
1255
|
_redrawNativeBackground(value) {
|
|
1319
1256
|
if (value instanceof Background) {
|
|
@@ -1356,13 +1293,13 @@ export class View extends ViewCommon {
|
|
|
1356
1293
|
// prettier-ignore
|
|
1357
1294
|
const onlyColor = !background.hasBorderWidth()
|
|
1358
1295
|
&& !background.hasBorderRadius()
|
|
1359
|
-
&& !background.
|
|
1296
|
+
&& !background.hasBoxShadows()
|
|
1360
1297
|
&& !background.clipPath
|
|
1361
1298
|
&& !background.image
|
|
1362
1299
|
&& !!background.color;
|
|
1363
1300
|
this._applyBackground(background, isBorderDrawable, onlyColor, drawable);
|
|
1364
|
-
if (background.
|
|
1365
|
-
this._drawBoxShadow(background.
|
|
1301
|
+
if (background.hasBoxShadows()) {
|
|
1302
|
+
this._drawBoxShadow(background.getBoxShadows());
|
|
1366
1303
|
}
|
|
1367
1304
|
// TODO: Can we move BorderWidths as separate native setter?
|
|
1368
1305
|
// This way we could skip setPadding if borderWidth is not changed.
|
|
@@ -1410,123 +1347,41 @@ __decorate([
|
|
|
1410
1347
|
__metadata("design:paramtypes", []),
|
|
1411
1348
|
__metadata("design:returntype", void 0)
|
|
1412
1349
|
], View.prototype, "requestLayout", null);
|
|
1350
|
+
const edgeMap = {
|
|
1351
|
+
none: OverflowEdgeNone,
|
|
1352
|
+
left: OverflowEdgeLeft,
|
|
1353
|
+
top: OverflowEdgeTop,
|
|
1354
|
+
right: OverflowEdgeRight,
|
|
1355
|
+
bottom: OverflowEdgeBottom,
|
|
1356
|
+
'dont-apply': OverflowEdgeDontApply,
|
|
1357
|
+
'left-dont-consume': OverflowEdgeLeftDontConsume,
|
|
1358
|
+
'top-dont-consume': OverflowEdgeTopDontConsume,
|
|
1359
|
+
'right-dont-consume': OverflowEdgeRightDontConsume,
|
|
1360
|
+
'bottom-dont-consume': OverflowEdgeBottomDontConsume,
|
|
1361
|
+
'all-but-left': OverflowEdgeAllButLeft,
|
|
1362
|
+
'all-but-top': OverflowEdgeAllButTop,
|
|
1363
|
+
'all-but-right': OverflowEdgeAllButRight,
|
|
1364
|
+
'all-but-bottom': OverflowEdgeAllButBottom,
|
|
1365
|
+
};
|
|
1413
1366
|
function parseEdges(edges) {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
for (
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
break;
|
|
1427
|
-
case 'left':
|
|
1428
|
-
if (newValue === -1) {
|
|
1429
|
-
newValue = OverflowEdgeLeft;
|
|
1430
|
-
}
|
|
1431
|
-
else {
|
|
1432
|
-
newValue |= OverflowEdgeLeft;
|
|
1433
|
-
}
|
|
1434
|
-
break;
|
|
1435
|
-
case 'top':
|
|
1436
|
-
if (newValue === -1) {
|
|
1437
|
-
newValue = OverflowEdgeTop;
|
|
1438
|
-
}
|
|
1439
|
-
else {
|
|
1440
|
-
newValue |= OverflowEdgeTop;
|
|
1441
|
-
}
|
|
1442
|
-
break;
|
|
1443
|
-
case 'right':
|
|
1444
|
-
if (newValue === -1) {
|
|
1445
|
-
newValue = OverflowEdgeRight;
|
|
1446
|
-
}
|
|
1447
|
-
else {
|
|
1448
|
-
newValue |= OverflowEdgeRight;
|
|
1449
|
-
}
|
|
1450
|
-
break;
|
|
1451
|
-
case 'bottom':
|
|
1452
|
-
if (newValue === -1) {
|
|
1453
|
-
newValue = OverflowEdgeBottom;
|
|
1454
|
-
}
|
|
1455
|
-
else {
|
|
1456
|
-
newValue |= OverflowEdgeBottom;
|
|
1457
|
-
}
|
|
1458
|
-
break;
|
|
1459
|
-
case 'dont-apply':
|
|
1460
|
-
newValue = OverflowEdgeDontApply;
|
|
1461
|
-
break;
|
|
1462
|
-
case 'left-dont-consume':
|
|
1463
|
-
if (newValue === -1) {
|
|
1464
|
-
newValue = OverflowEdgeLeftDontConsume;
|
|
1465
|
-
}
|
|
1466
|
-
else {
|
|
1467
|
-
newValue |= OverflowEdgeLeftDontConsume;
|
|
1468
|
-
}
|
|
1469
|
-
break;
|
|
1470
|
-
case 'top-dont-consume':
|
|
1471
|
-
if (newValue === -1) {
|
|
1472
|
-
newValue = OverflowEdgeTopDontConsume;
|
|
1473
|
-
}
|
|
1474
|
-
else {
|
|
1475
|
-
newValue |= OverflowEdgeTopDontConsume;
|
|
1476
|
-
}
|
|
1477
|
-
break;
|
|
1478
|
-
case 'right-dont-consume':
|
|
1479
|
-
if (newValue === -1) {
|
|
1480
|
-
newValue = OverflowEdgeRightDontConsume;
|
|
1481
|
-
}
|
|
1482
|
-
else {
|
|
1483
|
-
newValue |= OverflowEdgeRightDontConsume;
|
|
1484
|
-
}
|
|
1485
|
-
break;
|
|
1486
|
-
case 'bottom-dont-consume':
|
|
1487
|
-
if (newValue === -1) {
|
|
1488
|
-
newValue = OverflowEdgeBottomDontConsume;
|
|
1489
|
-
}
|
|
1490
|
-
else {
|
|
1491
|
-
newValue |= OverflowEdgeBottomDontConsume;
|
|
1492
|
-
}
|
|
1493
|
-
case 'all-but-left':
|
|
1494
|
-
if (newValue === -1) {
|
|
1495
|
-
newValue = OverflowEdgeAllButLeft;
|
|
1496
|
-
}
|
|
1497
|
-
else {
|
|
1498
|
-
newValue |= OverflowEdgeAllButLeft;
|
|
1499
|
-
}
|
|
1500
|
-
case 'all-but-top':
|
|
1501
|
-
if (newValue === -1) {
|
|
1502
|
-
newValue = OverflowEdgeAllButTop;
|
|
1503
|
-
}
|
|
1504
|
-
else {
|
|
1505
|
-
newValue |= OverflowEdgeAllButTop;
|
|
1506
|
-
}
|
|
1507
|
-
case 'all-but-right':
|
|
1508
|
-
if (newValue === -1) {
|
|
1509
|
-
newValue = OverflowEdgeAllButRight;
|
|
1510
|
-
}
|
|
1511
|
-
else {
|
|
1512
|
-
newValue |= OverflowEdgeAllButRight;
|
|
1513
|
-
}
|
|
1514
|
-
case 'all-but-bottom':
|
|
1515
|
-
if (newValue === -1) {
|
|
1516
|
-
newValue = OverflowEdgeAllButBottom;
|
|
1517
|
-
}
|
|
1518
|
-
else {
|
|
1519
|
-
newValue |= OverflowEdgeAllButBottom;
|
|
1520
|
-
}
|
|
1521
|
-
break;
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
if (newValue === -1) {
|
|
1525
|
-
return null;
|
|
1526
|
-
}
|
|
1527
|
-
return newValue;
|
|
1367
|
+
let result = 0;
|
|
1368
|
+
const values = edges.split(',');
|
|
1369
|
+
for (const raw of values) {
|
|
1370
|
+
const value = edgeMap[raw.trim()];
|
|
1371
|
+
if (value === undefined)
|
|
1372
|
+
continue;
|
|
1373
|
+
// dont-apply overrides everything else
|
|
1374
|
+
if (value === OverflowEdgeDontApply)
|
|
1375
|
+
return value;
|
|
1376
|
+
result |= value;
|
|
1377
|
+
}
|
|
1378
|
+
return result === 0 ? null : result;
|
|
1528
1379
|
}
|
|
1529
1380
|
export class ContainerView extends View {
|
|
1381
|
+
constructor() {
|
|
1382
|
+
super();
|
|
1383
|
+
this.androidOverflowEdge = 'none';
|
|
1384
|
+
}
|
|
1530
1385
|
}
|
|
1531
1386
|
export class CustomLayoutView extends ContainerView {
|
|
1532
1387
|
createNativeView() {
|