@akylas/nativescript 8.4.9 → 8.5.2
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 +2 -2
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-properties.d.ts +4 -1
- package/accessibility/accessibility-properties.js +21 -0
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/index.ios.js.map +1 -1
- package/config/config.interface.d.ts +10 -0
- package/data/observable/index.d.ts +19 -18
- package/data/observable/index.js +9 -0
- package/data/observable/index.js.map +1 -1
- package/file-system/file-system-access.android.d.ts +3 -0
- package/file-system/file-system-access.android.js +30 -1
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.d.ts +32 -0
- package/file-system/file-system-access.ios.d.ts +3 -0
- package/file-system/file-system-access.ios.js +62 -0
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.d.ts +3 -1
- package/file-system/index.js +62 -1
- package/file-system/index.js.map +1 -1
- package/global-types.d.ts +11 -3
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/ui/animation/animation-common.js +1 -0
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.d.ts +2 -0
- package/ui/animation/index.ios.d.ts +1 -3
- package/ui/animation/index.ios.js +84 -69
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/builder/component-builder/index.js +1 -1
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.js +1 -1
- package/ui/builder/index.js.map +1 -1
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +15 -0
- package/ui/core/view/index.ios.d.ts +1 -0
- package/ui/core/view/index.ios.js +99 -16
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +10 -0
- package/ui/core/view/view-common.js +46 -6
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.ios.d.ts +0 -2
- package/ui/core/view/view-helper/index.ios.js +40 -95
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view-base/index.d.ts +219 -1
- package/ui/core/view-base/index.js +170 -5
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.d.ts +1 -0
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +4 -0
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.d.ts +7 -1
- package/ui/frame/fragment.transitions.android.js +30 -0
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/fragment.transitions.d.ts +0 -4
- package/ui/frame/frame-common.d.ts +3 -3
- package/ui/frame/frame-common.js +14 -1
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/index.android.d.ts +2 -1
- package/ui/frame/index.android.js +5 -3
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.ios.js +60 -11
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/image/image-common.d.ts +2 -2
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js.map +1 -1
- package/ui/image/index.d.ts +3 -2
- package/ui/image/index.ios.js.map +1 -1
- package/ui/index.d.ts +9 -2
- package/ui/index.js +8 -2
- package/ui/index.js.map +1 -1
- package/ui/layouts/layout-base.ios.js +4 -1
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/root-layout/index.d.ts +1 -1
- package/ui/layouts/root-layout/root-layout-common.d.ts +16 -1
- package/ui/layouts/root-layout/root-layout-common.js +86 -60
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/list-view/index.ios.js +16 -13
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/page/index.ios.d.ts +0 -1
- package/ui/page/index.ios.js +59 -59
- package/ui/page/index.ios.js.map +1 -1
- package/ui/scroll-view/index.ios.js +7 -6
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/styling/style/index.d.ts +4 -1
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +4 -4
- package/ui/styling/style-properties.js +7 -7
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +1 -1
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/text-base/index.ios.js +30 -15
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-field/index.ios.js +24 -9
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/transition/fade-transition.d.ts +1 -3
- package/ui/transition/fade-transition.ios.d.ts +14 -1
- package/ui/transition/fade-transition.ios.js +60 -24
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/index.android.d.ts +6 -4
- package/ui/transition/index.android.js +8 -5
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.d.ts +58 -8
- package/ui/transition/index.ios.d.ts +6 -4
- package/ui/transition/index.ios.js +11 -6
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.d.ts +5 -0
- package/ui/transition/modal-transition.android.js +7 -0
- package/ui/transition/modal-transition.android.js.map +1 -0
- package/ui/transition/modal-transition.d.ts +2 -0
- package/ui/transition/modal-transition.ios.d.ts +34 -0
- package/ui/transition/modal-transition.ios.js +182 -0
- package/ui/transition/modal-transition.ios.js.map +1 -0
- package/ui/transition/page-transition.android.d.ts +7 -0
- package/ui/transition/page-transition.android.js +262 -0
- package/ui/transition/page-transition.android.js.map +1 -0
- package/ui/transition/page-transition.d.ts +2 -0
- package/ui/transition/page-transition.ios.d.ts +35 -0
- package/ui/transition/page-transition.ios.js +199 -0
- package/ui/transition/page-transition.ios.js.map +1 -0
- package/ui/transition/shared-transition-helper.android.d.ts +9 -0
- package/ui/transition/shared-transition-helper.android.js +10 -0
- package/ui/transition/shared-transition-helper.android.js.map +1 -0
- package/ui/transition/shared-transition-helper.d.ts +14 -0
- package/ui/transition/shared-transition-helper.ios.d.ts +14 -0
- package/ui/transition/shared-transition-helper.ios.js +522 -0
- package/ui/transition/shared-transition-helper.ios.js.map +1 -0
- package/ui/transition/shared-transition.d.ts +267 -0
- package/ui/transition/shared-transition.js +215 -0
- package/ui/transition/shared-transition.js.map +1 -0
- package/ui/transition/slide-transition.android.d.ts +1 -1
- package/ui/transition/slide-transition.android.js +1 -1
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/transition/slide-transition.d.ts +1 -1
- package/ui/transition/slide-transition.ios.d.ts +15 -2
- package/ui/transition/slide-transition.ios.js +86 -50
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/utils/common.d.ts +33 -0
- package/utils/common.js +70 -1
- package/utils/common.js.map +1 -1
- package/utils/native-helper.d.ts +36 -0
- package/utils/native-helper.ios.d.ts +16 -0
- package/utils/native-helper.ios.js +57 -0
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/number-utils.d.ts +10 -0
- package/utils/number-utils.js +12 -0
- package/utils/number-utils.js.map +1 -1
- package/ui/builder/module-name-sanitizer.d.ts +0 -6
- package/ui/builder/module-name-sanitizer.js +0 -24
- package/ui/builder/module-name-sanitizer.js.map +0 -1
- package/ui/frame/fragment.transitions.ios.d.ts +0 -2
- package/ui/frame/fragment.transitions.ios.js +0 -85
- package/ui/frame/fragment.transitions.ios.js.map +0 -1
|
@@ -9,47 +9,9 @@ var UILayoutViewController = /** @class */ (function (_super) {
|
|
|
9
9
|
function UILayoutViewController() {
|
|
10
10
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
11
11
|
}
|
|
12
|
-
// private _isRunningLayout: number;
|
|
13
|
-
// private get isRunningLayout() {
|
|
14
|
-
// return this._isRunningLayout !== 0;
|
|
15
|
-
// }
|
|
16
|
-
// private startRunningLayout() {
|
|
17
|
-
// this._isRunningLayout++;
|
|
18
|
-
// }
|
|
19
|
-
// private finishRunningLayout() {
|
|
20
|
-
// this._isRunningLayout--;
|
|
21
|
-
// this.clearScheduledLayout();
|
|
22
|
-
// }
|
|
23
|
-
// private runLayout(cb: () => void) {
|
|
24
|
-
// try {
|
|
25
|
-
// this.startRunningLayout();
|
|
26
|
-
// cb();
|
|
27
|
-
// } finally {
|
|
28
|
-
// this.finishRunningLayout();
|
|
29
|
-
// }
|
|
30
|
-
// }
|
|
31
|
-
// layoutTimer: number;
|
|
32
|
-
// private clearScheduledLayout() {
|
|
33
|
-
// if (this.layoutTimer) {
|
|
34
|
-
// clearTimeout(this.layoutTimer);
|
|
35
|
-
// this.layoutTimer = null;
|
|
36
|
-
// }
|
|
37
|
-
// }
|
|
38
|
-
// private scheduleLayout() {
|
|
39
|
-
// if (this.layoutTimer) {
|
|
40
|
-
// return;
|
|
41
|
-
// }
|
|
42
|
-
// setTimeout(() => {
|
|
43
|
-
// this.layoutTimer = null;
|
|
44
|
-
// if (!this.isRunningLayout) {
|
|
45
|
-
// this.runLayout(() => this.layoutOwner());
|
|
46
|
-
// }
|
|
47
|
-
// });
|
|
48
|
-
// }
|
|
49
12
|
UILayoutViewController.initWithOwner = function (owner) {
|
|
50
13
|
var controller = UILayoutViewController.new();
|
|
51
14
|
controller.owner = owner;
|
|
52
|
-
// controller._isRunningLayout = 0;
|
|
53
15
|
return controller;
|
|
54
16
|
};
|
|
55
17
|
UILayoutViewController.prototype.viewDidLoad = function () {
|
|
@@ -58,10 +20,6 @@ var UILayoutViewController = /** @class */ (function (_super) {
|
|
|
58
20
|
// this.edgesForExtendedLayout = UIRectEdgeBottom;
|
|
59
21
|
this.extendedLayoutIncludesOpaqueBars = true;
|
|
60
22
|
};
|
|
61
|
-
UILayoutViewController.prototype.viewSafeAreaInsetsDidChange = function () {
|
|
62
|
-
_super.prototype.viewSafeAreaInsetsDidChange.call(this);
|
|
63
|
-
// this.scheduleLayout();
|
|
64
|
-
};
|
|
65
23
|
UILayoutViewController.prototype.viewWillLayoutSubviews = function () {
|
|
66
24
|
var _a;
|
|
67
25
|
_super.prototype.viewWillLayoutSubviews.call(this);
|
|
@@ -71,65 +29,52 @@ var UILayoutViewController = /** @class */ (function (_super) {
|
|
|
71
29
|
}
|
|
72
30
|
};
|
|
73
31
|
UILayoutViewController.prototype.viewDidLayoutSubviews = function () {
|
|
74
|
-
|
|
32
|
+
var _a;
|
|
75
33
|
_super.prototype.viewDidLayoutSubviews.call(this);
|
|
76
|
-
this.layoutOwner();
|
|
77
|
-
// this.finishRunningLayout();
|
|
78
|
-
};
|
|
79
|
-
UILayoutViewController.prototype.layoutOwner = function (force) {
|
|
80
|
-
var _a, _b, _c, _d;
|
|
81
|
-
if (force === void 0) { force = false; }
|
|
82
34
|
var owner = (_a = this.owner) === null || _a === void 0 ? void 0 : _a.deref();
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var tabView = tabViewItem && tabViewItem.parent;
|
|
98
|
-
var parent = tabView && tabView.parent;
|
|
99
|
-
// Handle Angular scenario where TabView is in a ProxyViewContainer
|
|
100
|
-
// It is possible to wrap components in ProxyViewContainers indefinitely
|
|
101
|
-
// Not using instanceof ProxyViewContainer to avoid circular dependency
|
|
102
|
-
// TODO: Try moving UILayoutViewController out of view module
|
|
103
|
-
while (parent && !parent.nativeViewProtected) {
|
|
104
|
-
parent = parent.parent;
|
|
105
|
-
}
|
|
106
|
-
if (parent) {
|
|
107
|
-
var parentPageInsetsTop = parent.nativeViewProtected.safeAreaInsets.top;
|
|
108
|
-
var parentPageInsetsBottom = parent.nativeViewProtected.safeAreaInsets.bottom;
|
|
109
|
-
var currentInsetsTop = this.view.safeAreaInsets.top;
|
|
110
|
-
var currentInsetsBottom = this.view.safeAreaInsets.bottom;
|
|
111
|
-
// Safe area insets include additional safe area insets too, so subtract old values
|
|
112
|
-
if (this.additionalSafeAreaInsets) {
|
|
113
|
-
currentInsetsTop -= this.additionalSafeAreaInsets.top;
|
|
114
|
-
currentInsetsBottom -= this.additionalSafeAreaInsets.bottom;
|
|
115
|
-
}
|
|
116
|
-
var additionalInsetsTop = Math.max(parentPageInsetsTop - currentInsetsTop, 0);
|
|
117
|
-
var additionalInsetsBottom = Math.max(parentPageInsetsBottom - currentInsetsBottom, 0);
|
|
118
|
-
if (additionalInsetsTop > 0 || additionalInsetsBottom > 0) {
|
|
119
|
-
var additionalInsets = new UIEdgeInsets({
|
|
120
|
-
top: additionalInsetsTop,
|
|
121
|
-
left: 0,
|
|
122
|
-
bottom: additionalInsetsBottom,
|
|
123
|
-
right: 0,
|
|
124
|
-
});
|
|
125
|
-
this.additionalSafeAreaInsets = additionalInsets;
|
|
35
|
+
if (owner) {
|
|
36
|
+
if (majorVersion >= 11) {
|
|
37
|
+
// Handle nested UILayoutViewController safe area application.
|
|
38
|
+
// Currently, UILayoutViewController can be nested only in a TabView.
|
|
39
|
+
// The TabView itself is handled by the OS, so we check the TabView's parent (usually a Page, but can be a Layout).
|
|
40
|
+
var tabViewItem = owner.parent;
|
|
41
|
+
var tabView = tabViewItem && tabViewItem.parent;
|
|
42
|
+
var parent = tabView && tabView.parent;
|
|
43
|
+
// Handle Angular scenario where TabView is in a ProxyViewContainer
|
|
44
|
+
// It is possible to wrap components in ProxyViewContainers indefinitely
|
|
45
|
+
// Not using instanceof ProxyViewContainer to avoid circular dependency
|
|
46
|
+
// TODO: Try moving UILayoutViewController out of view module
|
|
47
|
+
while (parent && !parent.nativeViewProtected) {
|
|
48
|
+
parent = parent.parent;
|
|
126
49
|
}
|
|
127
|
-
|
|
128
|
-
|
|
50
|
+
if (parent) {
|
|
51
|
+
var parentPageInsetsTop = parent.nativeViewProtected.safeAreaInsets.top;
|
|
52
|
+
var parentPageInsetsBottom = parent.nativeViewProtected.safeAreaInsets.bottom;
|
|
53
|
+
var currentInsetsTop = this.view.safeAreaInsets.top;
|
|
54
|
+
var currentInsetsBottom = this.view.safeAreaInsets.bottom;
|
|
55
|
+
// Safe area insets include additional safe area insets too, so subtract old values
|
|
56
|
+
if (this.additionalSafeAreaInsets) {
|
|
57
|
+
currentInsetsTop -= this.additionalSafeAreaInsets.top;
|
|
58
|
+
currentInsetsBottom -= this.additionalSafeAreaInsets.bottom;
|
|
59
|
+
}
|
|
60
|
+
var additionalInsetsTop = Math.max(parentPageInsetsTop - currentInsetsTop, 0);
|
|
61
|
+
var additionalInsetsBottom = Math.max(parentPageInsetsBottom - currentInsetsBottom, 0);
|
|
62
|
+
if (additionalInsetsTop > 0 || additionalInsetsBottom > 0) {
|
|
63
|
+
var additionalInsets = new UIEdgeInsets({
|
|
64
|
+
top: additionalInsetsTop,
|
|
65
|
+
left: 0,
|
|
66
|
+
bottom: additionalInsetsBottom,
|
|
67
|
+
right: 0,
|
|
68
|
+
});
|
|
69
|
+
this.additionalSafeAreaInsets = additionalInsets;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.additionalSafeAreaInsets = null;
|
|
73
|
+
}
|
|
129
74
|
}
|
|
130
75
|
}
|
|
76
|
+
IOSHelper.layoutView(this, owner);
|
|
131
77
|
}
|
|
132
|
-
IOSHelper.layoutView(this, owner);
|
|
133
78
|
};
|
|
134
79
|
UILayoutViewController.prototype.viewWillAppear = function (animated) {
|
|
135
80
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../../../../packages/core/ui/core/view/view-helper/index.ios.ts"],"names":[],"mappings":"AAGA,WAAW;AACX,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,cAAc,sBAAsB,CAAC;AAErC,MAAM,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources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,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YACtK,UAAU,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SAC3F;QAED,kEAAkE;QAClE,iEAAiE;QACjE,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACpD,IAAI,YAAY,GAAG,gBAAgB,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC;QAC7D,IAAI,WAAW,GAAG,gBAAgB,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC;QAE5D,IAAI,UAAU,EAAE;YACf,YAAY,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;YAC3C,WAAW,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;SAC1C;QAED,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE5F,OAAO;YACN,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,UAAU;YACtB,QAAQ,EAAE,QAAQ;SAClB,CAAC;IACH,CAAC;;AAzMM,oDAA0C,GAAG,uCAAuC,CAAC;AACrF,gCAAsB,GAAG,sBAAsB,CAAC;AAChD,qDAA2C,GAAG,2CAA2C,CAAC;AAC1F,oDAA0C,GAAG,0CAA0C,CAAC"}
|
|
@@ -5,9 +5,16 @@ import { Property, CssProperty, CssAnimationProperty, InheritedProperty } from '
|
|
|
5
5
|
import { BindingOptions } from '../bindable';
|
|
6
6
|
import { Observable } from '../../../data/observable';
|
|
7
7
|
import { Style } from '../../styling/style';
|
|
8
|
+
import type { ModalTransition } from '../../transition/modal-transition';
|
|
8
9
|
import type * as dnm from '../../../debugger/dom-node';
|
|
9
10
|
import * as ssm from '../../styling/style-scope';
|
|
10
11
|
import { ViewBase as ViewBaseDefinition } from '.';
|
|
12
|
+
export interface ModalTransitionType {
|
|
13
|
+
name?: string;
|
|
14
|
+
instance?: ModalTransition;
|
|
15
|
+
duration?: number;
|
|
16
|
+
curve?: any;
|
|
17
|
+
}
|
|
11
18
|
export interface ShowModalOptions {
|
|
12
19
|
/**
|
|
13
20
|
* Any context you want to pass to the modally shown view. This same context will be available in the arguments of the shownModally event handler.
|
|
@@ -29,6 +36,10 @@ export interface ShowModalOptions {
|
|
|
29
36
|
* An optional parameter specifying whether to stretch the modal view when not in full-screen mode.
|
|
30
37
|
*/
|
|
31
38
|
stretched?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* An optional custom transition effect
|
|
41
|
+
*/
|
|
42
|
+
transition?: ModalTransitionType;
|
|
32
43
|
/**
|
|
33
44
|
* An optional parameter that specify options specific to iOS as an object.
|
|
34
45
|
*/
|
|
@@ -63,11 +74,41 @@ export interface ShowModalOptions {
|
|
|
63
74
|
*/
|
|
64
75
|
cancelable?: boolean;
|
|
65
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Gets an ancestor from a given type.
|
|
79
|
+
* @param view - Starting view (child view).
|
|
80
|
+
* @param criterion - The type of ancestor view we are looking for. Could be a string containing a class name or an actual type.
|
|
81
|
+
* Returns an instance of a view (if found), otherwise undefined.
|
|
82
|
+
*/
|
|
66
83
|
export declare function getAncestor(view: ViewBaseDefinition, criterion: string | {
|
|
67
84
|
new (): any;
|
|
68
85
|
}): ViewBaseDefinition;
|
|
86
|
+
/**
|
|
87
|
+
* Gets a child view by id.
|
|
88
|
+
* @param view - The parent (container) view of the view to look for.
|
|
89
|
+
* @param id - The id of the view to look for.
|
|
90
|
+
* Returns an instance of a view (if found), otherwise undefined.
|
|
91
|
+
*/
|
|
69
92
|
export declare function getViewById(view: ViewBaseDefinition, id: string): ViewBaseDefinition;
|
|
93
|
+
/**
|
|
94
|
+
* Gets a child view by domId.
|
|
95
|
+
* @param view - The parent (container) view of the view to look for.
|
|
96
|
+
* @param domId - The id of the view to look for.
|
|
97
|
+
* Returns an instance of a view (if found), otherwise undefined.
|
|
98
|
+
*/
|
|
70
99
|
export declare function getViewByDomId(view: ViewBaseDefinition, domId: number): ViewBaseDefinition;
|
|
100
|
+
/**
|
|
101
|
+
* Gets a child view by selector.
|
|
102
|
+
* @param view - The parent (container) view of the view to look for.
|
|
103
|
+
* @param selector - The selector of the view to look for.
|
|
104
|
+
* Returns an instance of a view (if found), otherwise undefined.
|
|
105
|
+
*/
|
|
106
|
+
export declare function querySelectorAll(view: ViewBaseDefinition, selector: string): Array<ViewBaseDefinition>;
|
|
107
|
+
/**
|
|
108
|
+
* Iterates through all child views (via visual tree) and executes a function.
|
|
109
|
+
* @param view - Starting view (parent container).
|
|
110
|
+
* @param callback - A function to execute on every child. If function returns false it breaks the iteration.
|
|
111
|
+
*/
|
|
71
112
|
export declare function eachDescendant(view: ViewBaseDefinition, callback: (child: ViewBaseDefinition) => boolean): void;
|
|
72
113
|
declare enum SuspendType {
|
|
73
114
|
Incremental = 0,
|
|
@@ -80,9 +121,21 @@ declare namespace SuspendType {
|
|
|
80
121
|
function toString(type: SuspendType): string;
|
|
81
122
|
}
|
|
82
123
|
export declare abstract class ViewBase extends Observable implements ViewBaseDefinition {
|
|
124
|
+
/**
|
|
125
|
+
* String value used when hooking to loaded event.
|
|
126
|
+
*/
|
|
83
127
|
static loadedEvent: string;
|
|
128
|
+
/**
|
|
129
|
+
* String value used when hooking to unloaded event.
|
|
130
|
+
*/
|
|
84
131
|
static unloadedEvent: string;
|
|
132
|
+
/**
|
|
133
|
+
* String value used when hooking to creation event
|
|
134
|
+
*/
|
|
85
135
|
static createdEvent: string;
|
|
136
|
+
/**
|
|
137
|
+
* String value used when hooking to disposeNativeView event
|
|
138
|
+
*/
|
|
86
139
|
static disposeNativeViewEvent: string;
|
|
87
140
|
private _onLoadedCalled;
|
|
88
141
|
private _onUnloadedCalled;
|
|
@@ -95,22 +148,64 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
|
|
|
95
148
|
private __nativeView;
|
|
96
149
|
domNode: dnm.DOMNode;
|
|
97
150
|
recycleNativeView: 'always' | 'never' | 'auto';
|
|
151
|
+
/**
|
|
152
|
+
* returns the native UIViewController.
|
|
153
|
+
*/
|
|
98
154
|
viewController: any;
|
|
99
155
|
bindingContext: any;
|
|
156
|
+
/**
|
|
157
|
+
* read-only. If you want to set out-of-band the nativeView use the setNativeView method.
|
|
158
|
+
*/
|
|
100
159
|
nativeViewProtected: any;
|
|
160
|
+
/**
|
|
161
|
+
* Gets the parent view. This property is read-only.
|
|
162
|
+
*/
|
|
101
163
|
parent: ViewBase;
|
|
164
|
+
/**
|
|
165
|
+
* Returns true if visibility is set to 'collapse'.
|
|
166
|
+
* Default(false) set in prototype
|
|
167
|
+
* Readonly property
|
|
168
|
+
*/
|
|
102
169
|
isCollapsed: any;
|
|
170
|
+
/**
|
|
171
|
+
* Gets or sets the id for this view.
|
|
172
|
+
*/
|
|
103
173
|
id: string;
|
|
174
|
+
/**
|
|
175
|
+
* Gets or sets the CSS class name for this view.
|
|
176
|
+
*/
|
|
104
177
|
className: string;
|
|
105
178
|
disableCss: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Gets or sets the shared transition tag for animated view transitions
|
|
181
|
+
*/
|
|
182
|
+
sharedTransitionTag: string;
|
|
183
|
+
/**
|
|
184
|
+
* Opt out of shared transition under different binding conditions
|
|
185
|
+
*/
|
|
186
|
+
sharedTransitionIgnore: boolean;
|
|
106
187
|
_domId: number;
|
|
107
188
|
_context: any;
|
|
108
189
|
_isAddedToNativeVisualTree: boolean;
|
|
109
190
|
_cssState: ssm.CssState;
|
|
110
191
|
_styleScope: ssm.StyleScope;
|
|
192
|
+
/**
|
|
193
|
+
* A property bag holding suspended native updates.
|
|
194
|
+
* Native setters that had to execute while there was no native view,
|
|
195
|
+
* or the view was detached from the visual tree etc. will accumulate in this object,
|
|
196
|
+
* and will be applied when all prerequisites are met.
|
|
197
|
+
* @private
|
|
198
|
+
*/
|
|
111
199
|
_suspendedUpdates: {
|
|
112
200
|
[propertyName: string]: Property<ViewBase, any> | CssProperty<Style, any> | CssAnimationProperty<Style, any>;
|
|
113
201
|
};
|
|
202
|
+
/**
|
|
203
|
+
* Determines the depth of suspended updates.
|
|
204
|
+
* When the value is 0 the current property updates are not batched nor scoped and must be immediately applied.
|
|
205
|
+
* If the value is 1 or greater, the current updates are batched and does not have to provide immediate update.
|
|
206
|
+
* Do not set this field, the _batchUpdate method is responsible to keep the count up to date,
|
|
207
|
+
* as well as adding/rmoving the view to/from the visual tree.
|
|
208
|
+
*/
|
|
114
209
|
_suspendNativeUpdatesCount: number;
|
|
115
210
|
_isStyleScopeHost: boolean;
|
|
116
211
|
_automaticallyAdjustsScrollViewInsets: boolean;
|
|
@@ -156,14 +251,31 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
|
|
|
156
251
|
_defaultPaddingBottom: number;
|
|
157
252
|
_defaultPaddingLeft: number;
|
|
158
253
|
_isPaddingRelative: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* @private
|
|
256
|
+
* Module name when the view is a module root. Otherwise, it is undefined.
|
|
257
|
+
*/
|
|
159
258
|
_moduleName: string;
|
|
259
|
+
/**
|
|
260
|
+
* Gets or sets if the view is reusable.
|
|
261
|
+
* Reusable views are not automatically destroyed when removed from the View tree.
|
|
262
|
+
*/
|
|
160
263
|
reusable: boolean;
|
|
161
264
|
constructor();
|
|
265
|
+
/**
|
|
266
|
+
* Gets the template parent or the native parent. Sets the template parent.
|
|
267
|
+
*/
|
|
162
268
|
get parentNode(): ViewBase;
|
|
163
269
|
set parentNode(node: ViewBase);
|
|
164
270
|
get nativeView(): any;
|
|
165
271
|
set nativeView(value: any);
|
|
272
|
+
/**
|
|
273
|
+
* Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".
|
|
274
|
+
*/
|
|
166
275
|
get typeName(): string;
|
|
276
|
+
/**
|
|
277
|
+
* Gets the style object associated to this view.
|
|
278
|
+
*/
|
|
167
279
|
get style(): Style;
|
|
168
280
|
set style(inlineStyle: Style);
|
|
169
281
|
get android(): any;
|
|
@@ -171,9 +283,22 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
|
|
|
171
283
|
get isLoaded(): boolean;
|
|
172
284
|
get ['class'](): string;
|
|
173
285
|
set ['class'](v: string);
|
|
286
|
+
/**
|
|
287
|
+
* Returns the child view with the specified id.
|
|
288
|
+
*/
|
|
174
289
|
getViewById<T extends ViewBaseDefinition>(id: string): T;
|
|
290
|
+
/**
|
|
291
|
+
* Returns the child view with the specified domId.
|
|
292
|
+
*/
|
|
175
293
|
getViewByDomId<T extends ViewBaseDefinition>(domId: number): T;
|
|
294
|
+
/**
|
|
295
|
+
* Gets owner page. This is a read-only property.
|
|
296
|
+
*/
|
|
176
297
|
get page(): Page;
|
|
298
|
+
/**
|
|
299
|
+
* @unstable
|
|
300
|
+
* Ensures a dom-node for this view.
|
|
301
|
+
*/
|
|
177
302
|
ensureDomNode(): void;
|
|
178
303
|
set(name: string, value: any): void;
|
|
179
304
|
onLoaded(): void;
|
|
@@ -181,6 +306,9 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
|
|
|
181
306
|
_layoutParent(): void;
|
|
182
307
|
_suspendNativeUpdates(type: SuspendType): void;
|
|
183
308
|
_resumeNativeUpdates(type: SuspendType): void;
|
|
309
|
+
/**
|
|
310
|
+
* Allow multiple updates to be performed on the instance at once.
|
|
311
|
+
*/
|
|
184
312
|
_batchUpdate<T>(callback: () => T): T;
|
|
185
313
|
private setFlag;
|
|
186
314
|
private isFlagSet;
|
|
@@ -192,7 +320,17 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
|
|
|
192
320
|
cssClasses: Set<string>;
|
|
193
321
|
cssPseudoClasses: Set<string>;
|
|
194
322
|
private getAllAliasedStates;
|
|
323
|
+
/**
|
|
324
|
+
* @protected
|
|
325
|
+
* @unstable
|
|
326
|
+
* A widget can call this method to add a matching css pseudo class.
|
|
327
|
+
*/
|
|
195
328
|
addPseudoClass(name: string): void;
|
|
329
|
+
/**
|
|
330
|
+
* @protected
|
|
331
|
+
* @unstable
|
|
332
|
+
* A widget can call this method to discard matching css pseudo class.
|
|
333
|
+
*/
|
|
196
334
|
deletePseudoClass(name: string): void;
|
|
197
335
|
private bindingContextChanged;
|
|
198
336
|
private bindings;
|
|
@@ -206,12 +344,34 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
|
|
|
206
344
|
mSuspendRequestLayout: boolean;
|
|
207
345
|
set suspendRequestLayout(value: boolean);
|
|
208
346
|
get suspendRequestLayout(): boolean;
|
|
347
|
+
/**
|
|
348
|
+
* Invalidates the layout of the view and triggers a new layout pass.
|
|
349
|
+
*/
|
|
209
350
|
requestLayout(): void;
|
|
351
|
+
/**
|
|
352
|
+
* Iterates over children of type ViewBase.
|
|
353
|
+
* @param callback Called for each child of type ViewBase. Iteration stops if this method returns falsy value.
|
|
354
|
+
*/
|
|
210
355
|
eachChild(callback: (child: ViewBase) => boolean): void;
|
|
211
356
|
_addView(view: ViewBase, atIndex?: number): void;
|
|
357
|
+
/**
|
|
358
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
359
|
+
*/
|
|
212
360
|
_addViewCore(view: ViewBase, atIndex?: number): void;
|
|
361
|
+
/**
|
|
362
|
+
* Load view.
|
|
363
|
+
* @param view to load.
|
|
364
|
+
*/
|
|
213
365
|
loadView(view: ViewBase): void;
|
|
366
|
+
/**
|
|
367
|
+
* When returning true the callLoaded method will be run in setTimeout
|
|
368
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
369
|
+
*/
|
|
214
370
|
_shouldDelayLayout(): boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Unload view.
|
|
373
|
+
* @param view to unload.
|
|
374
|
+
*/
|
|
215
375
|
unloadView(view: ViewBase): void;
|
|
216
376
|
/**
|
|
217
377
|
* Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.
|
|
@@ -221,18 +381,50 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
|
|
|
221
381
|
* Method is intended to be overridden by inheritors and used as "protected"
|
|
222
382
|
*/
|
|
223
383
|
_removeViewCore(view: ViewBase): void;
|
|
384
|
+
/**
|
|
385
|
+
* Creates a native view.
|
|
386
|
+
* Returns either android.view.View or UIView.
|
|
387
|
+
*/
|
|
224
388
|
createNativeView(): Object;
|
|
389
|
+
/**
|
|
390
|
+
* Clean up references to the native view.
|
|
391
|
+
*/
|
|
225
392
|
disposeNativeView(): void;
|
|
393
|
+
/**
|
|
394
|
+
* Initializes properties/listeners of the native view.
|
|
395
|
+
*/
|
|
226
396
|
initNativeView(): void;
|
|
397
|
+
/**
|
|
398
|
+
* Resets properties/listeners set to the native view.
|
|
399
|
+
*/
|
|
227
400
|
resetNativeView(): void;
|
|
228
401
|
private resetNativeViewInternal;
|
|
229
402
|
_setupAsRootView(context: any): void;
|
|
403
|
+
/**
|
|
404
|
+
* Setups the UI for ViewBase and all its children recursively.
|
|
405
|
+
* This method should *not* be overridden by derived views.
|
|
406
|
+
*/
|
|
230
407
|
_setupUI(context: any, atIndex?: number, parentIsLoaded?: boolean): void;
|
|
408
|
+
/**
|
|
409
|
+
* Set the nativeView field performing extra checks and updates to the native properties on the new view.
|
|
410
|
+
* Use in cases where the createNativeView is not suitable.
|
|
411
|
+
* As an example use in item controls where the native parent view will create the native views for child items.
|
|
412
|
+
*/
|
|
231
413
|
setNativeView(value: any): void;
|
|
414
|
+
/**
|
|
415
|
+
* Tears down the UI of a reusable node by making it no longer reusable.
|
|
416
|
+
* @see _tearDownUI
|
|
417
|
+
* @param forceDestroyChildren Force destroy the children (even if they are reusable)
|
|
418
|
+
*/
|
|
232
419
|
destroyNode(forceDestroyChildren?: boolean): void;
|
|
420
|
+
/**
|
|
421
|
+
* Tears down the UI for ViewBase and all its children recursively.
|
|
422
|
+
* This method should *not* be overridden by derived views.
|
|
423
|
+
*/
|
|
233
424
|
_tearDownUI(force?: boolean): void;
|
|
234
425
|
_childIndexToNativeChildIndex(index?: number): number;
|
|
235
426
|
/**
|
|
427
|
+
* Performs the core logic of adding a child view to the native visual tree. Returns true if the view's native representation has been successfully added, false otherwise.
|
|
236
428
|
* Method is intended to be overridden by inheritors and used as "protected".
|
|
237
429
|
*/
|
|
238
430
|
_addViewToNativeVisualTree(view: ViewBase, atIndex?: number): boolean;
|
|
@@ -256,11 +448,37 @@ export declare abstract class ViewBase extends Observable implements ViewBaseDef
|
|
|
256
448
|
_parentChanged(oldParent: ViewBase): void;
|
|
257
449
|
onResumeNativeUpdates(): void;
|
|
258
450
|
toString(): string;
|
|
451
|
+
/**
|
|
452
|
+
* @private
|
|
453
|
+
* Notifies each child's css state for change, recursively.
|
|
454
|
+
* Either the style scope, className or id properties were changed.
|
|
455
|
+
*/
|
|
259
456
|
_onCssStateChange(): void;
|
|
260
457
|
_inheritStyleScope(styleScope: ssm.StyleScope): void;
|
|
261
|
-
|
|
458
|
+
/**
|
|
459
|
+
* Shows the view passed as parameter as a modal view.
|
|
460
|
+
* @param view - View instance to be shown modally.
|
|
461
|
+
* @param modalOptions - A ShowModalOptions instance
|
|
462
|
+
*/
|
|
463
|
+
showModal(view: ViewBase, modalOptions?: ShowModalOptions): ViewBase;
|
|
464
|
+
/**
|
|
465
|
+
* Shows the View contained in moduleName as a modal view.
|
|
466
|
+
* @param moduleName - The name of the module to load starting from the application root.
|
|
467
|
+
* @param modalOptions - A ShowModalOptions instance
|
|
468
|
+
*/
|
|
469
|
+
showModal(moduleName: string, modalOptions?: ShowModalOptions): ViewBase;
|
|
470
|
+
/**
|
|
471
|
+
* Closes the current modal view that this page is showing.
|
|
472
|
+
* @param context - Any context you want to pass back to the host when closing the modal view.
|
|
473
|
+
*/
|
|
262
474
|
closeModal(...args: any[]): void;
|
|
475
|
+
/**
|
|
476
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
477
|
+
*/
|
|
263
478
|
_dialogClosed(): void;
|
|
479
|
+
/**
|
|
480
|
+
* Method is intended to be overridden by inheritors and used as "protected"
|
|
481
|
+
*/
|
|
264
482
|
_onRootViewReset(): void;
|
|
265
483
|
}
|
|
266
484
|
export declare const bindingContextProperty: InheritedProperty<ViewBaseDefinition, any>;
|