@nativescript/core 8.5.0-alpha.0 → 8.5.0-alpha.1
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/abortcontroller/abortsignal.js +5 -5
- package/abortcontroller/abortsignal.js.map +1 -1
- package/accessibility/accessibility-common.d.ts +1 -1
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/index.android.d.ts +2 -2
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.d.ts +1 -2
- package/accessibility/index.ios.d.ts +1 -2
- package/accessibility/index.ios.js.map +1 -1
- package/application/application-common.d.ts +5 -4
- package/application/application-common.js +5 -5
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +27 -5
- package/application/index.android.d.ts +12 -12
- package/application/index.android.js.map +1 -1
- package/application/index.d.ts +30 -35
- package/application/index.ios.d.ts +1 -0
- package/application/index.ios.js +23 -28
- package/application/index.ios.js.map +1 -1
- package/core-types/index.d.ts +10 -10
- package/css/CSS3Parser.d.ts +3 -3
- package/css/parser.d.ts +17 -17
- package/data/observable/index.d.ts +139 -165
- package/data/observable/index.js +93 -6
- package/data/observable/index.js.map +1 -1
- package/file-system/file-system-access.android.js +8 -1
- package/file-system/file-system-access.android.js.map +1 -1
- package/global-types.d.ts +2 -12
- package/image-source/index.android.js +5 -5
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js +5 -5
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/ui/action-bar/action-bar-common.js +4 -4
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.d.ts +2 -2
- package/ui/animation/animation-interfaces.d.ts +4 -4
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js +3 -3
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/index.d.ts +2 -2
- package/ui/core/properties/index.js +6 -6
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.d.ts +1 -1
- package/ui/core/view/index.android.js +22 -1
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.ios.js +15 -15
- package/ui/core/view/view-common.d.ts +1 -1
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +9 -9
- package/ui/core/view-base/index.d.ts +16 -3
- package/ui/core/view-base/index.js +18 -0
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/dialogs/dialogs-common.js +1 -0
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.js +1 -2
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +2 -7
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/frame/frame-common.d.ts +6 -0
- package/ui/frame/frame-common.js +3 -2
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/index.android.d.ts +2 -1
- package/ui/frame/index.android.js +15 -7
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +3 -3
- package/ui/frame/index.ios.js +1 -0
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.js +5 -5
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.js +3 -3
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.d.ts +2 -2
- package/ui/gestures/index.ios.js +6 -6
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +2 -2
- package/ui/image-cache/image-cache-common.d.ts +5 -5
- package/ui/image-cache/image-cache-common.js +2 -2
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.d.ts +3 -3
- package/ui/index.d.ts +5 -2
- package/ui/index.js +5 -2
- package/ui/index.js.map +1 -1
- package/ui/label/index.android.js +1 -0
- package/ui/label/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +12 -12
- package/ui/layouts/grid-layout/grid-layout-common.d.ts +1 -1
- package/ui/layouts/root-layout/root-layout-common.js +45 -36
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/list-view/index.d.ts +6 -6
- package/ui/list-view/list-view-common.js +8 -2
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.ios.js +5 -0
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +72 -39
- package/ui/placeholder/index.android.d.ts +2 -2
- package/ui/placeholder/index.d.ts +2 -2
- package/ui/repeater/index.js +2 -1
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.d.ts +4 -4
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.d.ts +3 -3
- package/ui/segmented-bar/index.d.ts +2 -2
- package/ui/segmented-bar/segmented-bar-common.d.ts +2 -2
- package/ui/styling/css-selector.d.ts +1 -1
- package/ui/styling/font-common.js +6 -6
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font-interfaces.d.ts +3 -3
- package/ui/styling/style-properties.js +4 -0
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +5 -4
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/tab-view/index.d.ts +2 -2
- package/ui/tab-view/tab-view-common.d.ts +2 -2
- package/ui/text-base/span.js.map +1 -1
- package/ui/transition/index.android.d.ts +7 -5
- package/ui/transition/index.android.js +8 -5
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.d.ts +19 -15
- package/ui/transition/index.ios.d.ts +7 -10
- package/ui/transition/index.ios.js +37 -21
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.d.ts +6 -0
- package/ui/transition/modal-transition.android.js +54 -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 +40 -0
- package/ui/transition/modal-transition.ios.js +251 -0
- package/ui/transition/modal-transition.ios.js.map +1 -0
- package/ui/transition/page-transition.android.d.ts +6 -0
- package/ui/transition/page-transition.android.js +54 -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 +25 -0
- package/ui/transition/page-transition.ios.js +202 -0
- package/ui/transition/page-transition.ios.js.map +1 -0
- package/ui/transition/shared-transition.d.ts +66 -0
- package/ui/transition/shared-transition.js +76 -0
- package/ui/transition/shared-transition.js.map +1 -0
- package/ui/web-view/index.d.ts +3 -3
- package/ui/web-view/web-view-interfaces.d.ts +1 -1
- package/utils/index.d.ts +0 -82
- package/utils/typescript-utils.d.ts +6 -0
- package/xhr/index.js +28 -28
- package/xhr/index.js.map +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { Transition, iosMatchLayerProperties, iosSnapshotView, iosPrintRect } from '.';
|
|
2
|
+
import { Screen } from '../../platform';
|
|
3
|
+
import { SharedTransition, SharedTransitionAnimationType, DEFAULT_DURATION } from './shared-transition';
|
|
4
|
+
export class PageTransition extends Transition {
|
|
5
|
+
animateIOSTransition(transitionContext, fromViewCtrl, toViewCtrl, operation) {
|
|
6
|
+
console.log('--- PageTransitionController animateTransition');
|
|
7
|
+
console.log('toViewCtrl:', toViewCtrl);
|
|
8
|
+
console.log('fromViewCtrl:', fromViewCtrl);
|
|
9
|
+
// console.log('owner.id:', owner.id);
|
|
10
|
+
const state = SharedTransition.getState(this.id);
|
|
11
|
+
if (!state) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
console.log('state.activeType:', state.activeType);
|
|
15
|
+
console.log('operation:', operation);
|
|
16
|
+
// switch (state.activeType) {
|
|
17
|
+
switch (operation) {
|
|
18
|
+
case 1 /* UINavigationControllerOperation.Push */: {
|
|
19
|
+
this.presented = toViewCtrl;
|
|
20
|
+
console.log('-- Transition present --', this.presented);
|
|
21
|
+
// transitionContext.containerView.addSubview(this.presented.view);
|
|
22
|
+
transitionContext.containerView.insertSubviewAboveSubview(this.presented.view, fromViewCtrl.view);
|
|
23
|
+
this.presented.view.layoutIfNeeded();
|
|
24
|
+
const { sharedElements, presented } = SharedTransition.getSharedElements(state.page, state.toPage);
|
|
25
|
+
console.log(' ');
|
|
26
|
+
console.log(`1. Found sharedTransitionTags to animate:`, sharedElements.map((v) => v.sharedTransitionTag));
|
|
27
|
+
console.log(`2. Take snapshots of shared elements and position them based on presenting view:`);
|
|
28
|
+
for (const presentingView of sharedElements) {
|
|
29
|
+
if (!this.sharedElements) {
|
|
30
|
+
this.sharedElements = {
|
|
31
|
+
presented: [],
|
|
32
|
+
presenting: [],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const presentingSharedElement = presentingView.ios;
|
|
36
|
+
// console.log('fromTarget instanceof UIImageView:', fromTarget instanceof UIImageView)
|
|
37
|
+
// TODO: discuss whether we should check if UIImage/UIImageView type to always snapshot images or if other view types could be duped/added vs. snapshotted
|
|
38
|
+
// Note: snapshot may be most efficient/simple
|
|
39
|
+
// console.log('---> ', presentingView.sharedTransitionTag, ': ', presentingSharedElement)
|
|
40
|
+
const presentedView = presented.find((v) => v.sharedTransitionTag === presentingView.sharedTransitionTag);
|
|
41
|
+
const presentedSharedElement = presentedView.ios;
|
|
42
|
+
const sharedElementSnapshot = UIImageView.alloc().init(); // WithImage(snapshotView(presentedSharedElement));
|
|
43
|
+
// treat images differently...
|
|
44
|
+
if (presentedSharedElement instanceof UIImageView) {
|
|
45
|
+
// in case the image is loaded async, we need to update the snapshot when it changes
|
|
46
|
+
// todo: remove listener on transition end
|
|
47
|
+
presentedView.on('imageSourceChange', () => {
|
|
48
|
+
sharedElementSnapshot.image = iosSnapshotView(presentedSharedElement);
|
|
49
|
+
sharedElementSnapshot.tintColor = presentedSharedElement.tintColor;
|
|
50
|
+
});
|
|
51
|
+
sharedElementSnapshot.tintColor = presentedSharedElement.tintColor;
|
|
52
|
+
sharedElementSnapshot.contentMode = presentedSharedElement.contentMode;
|
|
53
|
+
}
|
|
54
|
+
iosMatchLayerProperties(sharedElementSnapshot, presentingSharedElement);
|
|
55
|
+
sharedElementSnapshot.clipsToBounds = true;
|
|
56
|
+
// console.log('---> snapshot: ', sharedElementSnapshot);
|
|
57
|
+
const startFrame = presentingSharedElement.convertRectToView(presentingSharedElement.bounds, transitionContext.containerView);
|
|
58
|
+
const endFrame = presentedSharedElement.convertRectToView(presentedSharedElement.bounds, transitionContext.containerView);
|
|
59
|
+
sharedElementSnapshot.frame = startFrame;
|
|
60
|
+
console.log('---> ', presentingView.sharedTransitionTag, ' frame:', iosPrintRect(sharedElementSnapshot.frame));
|
|
61
|
+
this.sharedElements.presenting.push({
|
|
62
|
+
view: presentingView,
|
|
63
|
+
startFrame,
|
|
64
|
+
endFrame,
|
|
65
|
+
snapshot: sharedElementSnapshot,
|
|
66
|
+
startOpacity: presentingView.opacity,
|
|
67
|
+
endOpacity: presentedView.opacity,
|
|
68
|
+
});
|
|
69
|
+
this.sharedElements.presented.push({
|
|
70
|
+
view: presentedView,
|
|
71
|
+
startFrame: endFrame,
|
|
72
|
+
endFrame: startFrame,
|
|
73
|
+
startOpacity: presentedView.opacity,
|
|
74
|
+
endOpacity: presentingView.opacity,
|
|
75
|
+
});
|
|
76
|
+
// set initial opacity to match the source view opacity
|
|
77
|
+
sharedElementSnapshot.alpha = presentingView.opacity;
|
|
78
|
+
// hide both while animating within the transition context
|
|
79
|
+
presentingView.opacity = 0;
|
|
80
|
+
presentedView.opacity = 0;
|
|
81
|
+
// add snapshot to animate
|
|
82
|
+
// transitionContext.containerView.addSubview(sharedElementSnapshot);
|
|
83
|
+
transitionContext.containerView.insertSubviewAboveSubview(sharedElementSnapshot, this.presented.view);
|
|
84
|
+
}
|
|
85
|
+
const cleanupPresent = () => {
|
|
86
|
+
for (const presented of this.sharedElements.presented) {
|
|
87
|
+
presented.view.opacity = presented.startOpacity;
|
|
88
|
+
}
|
|
89
|
+
// TODO: Discuss with Igor whether this is necessary
|
|
90
|
+
// potential this could help smooth some shared element transitions
|
|
91
|
+
UIView.animateWithDurationAnimationsCompletion(0, // Igor: disabled for now, we'll talk about this and decide
|
|
92
|
+
() => {
|
|
93
|
+
for (const presenting of this.sharedElements.presenting) {
|
|
94
|
+
presenting.snapshot.alpha = presenting.endOpacity;
|
|
95
|
+
}
|
|
96
|
+
}, () => {
|
|
97
|
+
for (const presenting of this.sharedElements.presenting) {
|
|
98
|
+
presenting.snapshot.removeFromSuperview();
|
|
99
|
+
}
|
|
100
|
+
SharedTransition.updateState({
|
|
101
|
+
id: this.id,
|
|
102
|
+
activeType: SharedTransitionAnimationType.dismiss,
|
|
103
|
+
});
|
|
104
|
+
transitionContext.completeTransition(true);
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const updateFramePresent = () => {
|
|
108
|
+
// https://stackoverflow.com/a/27997678/1418981
|
|
109
|
+
// In order to have proper layout. Seems mostly needed when presenting.
|
|
110
|
+
// For instance during presentation, destination view doesn't account navigation bar height.
|
|
111
|
+
// Not sure if best to leave all the time?
|
|
112
|
+
// owner.presented.view.setNeedsLayout();
|
|
113
|
+
// owner.presented.view.layoutIfNeeded();
|
|
114
|
+
console.log('3. Animating shared elements:');
|
|
115
|
+
for (const presented of this.sharedElements.presented) {
|
|
116
|
+
const presentingMatch = this.sharedElements.presenting.find((v) => v.view.sharedTransitionTag === presented.view.sharedTransitionTag);
|
|
117
|
+
// Workaround wrong origin due ongoing layout process.
|
|
118
|
+
const updatedEndFrame = presented.view.ios.convertRectToView(presented.view.ios.bounds, transitionContext.containerView);
|
|
119
|
+
const correctedEndFrame = CGRectMake(updatedEndFrame.origin.x, updatedEndFrame.origin.y, presentingMatch.endFrame.size.width, presentingMatch.endFrame.size.height);
|
|
120
|
+
presentingMatch.snapshot.frame = correctedEndFrame;
|
|
121
|
+
// apply view and layer properties to the snapshot view to match the source/presented view
|
|
122
|
+
iosMatchLayerProperties(presentingMatch.snapshot, presented.view.ios);
|
|
123
|
+
// create a snapshot of the presented view
|
|
124
|
+
presentingMatch.snapshot.image = iosSnapshotView(presented.view.ios);
|
|
125
|
+
// apply correct alpha
|
|
126
|
+
presentingMatch.snapshot.alpha = presentingMatch.endOpacity;
|
|
127
|
+
console.log(`---> ${presentingMatch.view.sharedTransitionTag} animate to: `, iosPrintRect(correctedEndFrame));
|
|
128
|
+
}
|
|
129
|
+
console.log(' ');
|
|
130
|
+
};
|
|
131
|
+
// starting page properties
|
|
132
|
+
this.presented.view.alpha = typeof state.toPageStart?.opacity === 'number' ? state.toPageStart?.opacity : 0;
|
|
133
|
+
const startX = typeof state.toPageStart?.x === 'number' ? state.toPageStart?.x : Screen.mainScreen.widthDIPs;
|
|
134
|
+
const startY = typeof state.toPageStart?.y === 'number' ? state.toPageStart?.y : 0;
|
|
135
|
+
const startWidth = typeof state.toPageStart?.width === 'number' ? state.toPageStart?.width : Screen.mainScreen.widthDIPs;
|
|
136
|
+
const startHeight = typeof state.toPageStart?.height === 'number' ? state.toPageStart?.height : Screen.mainScreen.heightDIPs;
|
|
137
|
+
this.presented.view.frame = CGRectMake(startX, startY, startWidth, startHeight);
|
|
138
|
+
UIView.animateWithDurationDelayUsingSpringWithDampingInitialSpringVelocityOptionsAnimationsCompletion(typeof state.toPageStart?.duration === 'number' ? state.toPageStart?.duration / 1000 : DEFAULT_DURATION, 0, 0.5, 3, 0 /* UIViewAnimationOptions.CurveEaseInOut */, () => {
|
|
139
|
+
// animate page properties to the following:
|
|
140
|
+
this.presented.view.alpha = typeof state.toPageEnd?.opacity === 'number' ? state.toPageEnd?.opacity : 1;
|
|
141
|
+
const endX = typeof state.toPageEnd?.x === 'number' ? state.toPageEnd?.x : 0;
|
|
142
|
+
const endY = typeof state.toPageEnd?.y === 'number' ? state.toPageEnd?.y : 0;
|
|
143
|
+
const endWidth = typeof state.toPageEnd?.width === 'number' ? state.toPageEnd?.width : Screen.mainScreen.widthDIPs;
|
|
144
|
+
const endHeight = typeof state.toPageEnd?.height === 'number' ? state.toPageEnd?.height : Screen.mainScreen.heightDIPs;
|
|
145
|
+
this.presented.view.frame = CGRectMake(endX, endY, endWidth, endHeight);
|
|
146
|
+
updateFramePresent();
|
|
147
|
+
}, () => {
|
|
148
|
+
cleanupPresent();
|
|
149
|
+
});
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
case 2 /* UINavigationControllerOperation.Pop */: {
|
|
153
|
+
// this.presented = fromViewCtrl;
|
|
154
|
+
console.log('-- Transition dismiss --', this.presented);
|
|
155
|
+
transitionContext.containerView.insertSubviewBelowSubview(toViewCtrl.view, fromViewCtrl.view);
|
|
156
|
+
// console.log('transitionContext.containerView.subviews.count:', transitionContext.containerView.subviews.count);
|
|
157
|
+
console.log(' ');
|
|
158
|
+
console.log(`1. Dismiss sharedTransitionTags to animate:`, this.sharedElements.presented.map((p) => p.view.sharedTransitionTag));
|
|
159
|
+
console.log(`2. Add back previously stored sharedElements to dismiss:`);
|
|
160
|
+
for (const p of this.sharedElements.presented) {
|
|
161
|
+
p.view.opacity = 0;
|
|
162
|
+
}
|
|
163
|
+
for (const p of this.sharedElements.presenting) {
|
|
164
|
+
p.snapshot.alpha = p.endOpacity;
|
|
165
|
+
transitionContext.containerView.addSubview(p.snapshot);
|
|
166
|
+
// transitionContext.containerView.insertSubviewBelowSubview(p.snapshot, fromViewCtrl.view);
|
|
167
|
+
}
|
|
168
|
+
const cleanupDismiss = () => {
|
|
169
|
+
for (const presenting of this.sharedElements.presenting) {
|
|
170
|
+
presenting.view.opacity = presenting.startOpacity;
|
|
171
|
+
presenting.snapshot.removeFromSuperview();
|
|
172
|
+
}
|
|
173
|
+
SharedTransition.finishState(this.id);
|
|
174
|
+
transitionContext.completeTransition(true);
|
|
175
|
+
};
|
|
176
|
+
const updateFrameDismiss = () => {
|
|
177
|
+
console.log('3. Dismissing shared elements:');
|
|
178
|
+
for (const presenting of this.sharedElements.presenting) {
|
|
179
|
+
iosMatchLayerProperties(presenting.snapshot, presenting.view.ios);
|
|
180
|
+
presenting.snapshot.frame = presenting.startFrame;
|
|
181
|
+
presenting.snapshot.alpha = presenting.startOpacity;
|
|
182
|
+
console.log(`---> ${presenting.view.sharedTransitionTag} animate to: `, iosPrintRect(presenting.startFrame));
|
|
183
|
+
}
|
|
184
|
+
console.log(' ');
|
|
185
|
+
};
|
|
186
|
+
UIView.animateWithDurationDelayUsingSpringWithDampingInitialSpringVelocityOptionsAnimationsCompletion(typeof state.fromPageEnd?.duration === 'number' ? state.fromPageEnd?.duration / 1000 : DEFAULT_DURATION, 0, 0.5, 3, 0 /* UIViewAnimationOptions.CurveEaseInOut */, () => {
|
|
187
|
+
this.presented.view.alpha = typeof state.fromPageEnd?.opacity === 'number' ? state.fromPageEnd?.opacity : 0;
|
|
188
|
+
const endX = typeof state.fromPageEnd?.x === 'number' ? state.fromPageEnd?.x : Screen.mainScreen.widthDIPs;
|
|
189
|
+
const endY = typeof state.fromPageEnd?.y === 'number' ? state.fromPageEnd?.y : 0;
|
|
190
|
+
const endWidth = typeof state.fromPageEnd?.width === 'number' ? state.fromPageEnd?.width : Screen.mainScreen.widthDIPs;
|
|
191
|
+
const endHeight = typeof state.fromPageEnd?.height === 'number' ? state.fromPageEnd?.height : Screen.mainScreen.heightDIPs;
|
|
192
|
+
this.presented.view.frame = CGRectMake(endX, endY, endWidth, endHeight);
|
|
193
|
+
updateFrameDismiss();
|
|
194
|
+
}, () => {
|
|
195
|
+
cleanupDismiss();
|
|
196
|
+
});
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=page-transition.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-transition.ios.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/page-transition.ios.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE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KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC;oBACvH,MAAM,SAAS,GAAG,OAAO,KAAK,CAAC,WAAW,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC;oBAC3H,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;oBAExE,kBAAkB,EAAE,CAAC;gBACtB,CAAC,EACD,GAAG,EAAE;oBACJ,cAAc,EAAE,CAAC;gBAClB,CAAC,CACD,CAAC;gBACF,MAAM;aACN;SACD;IACF,CAAC;CACD"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Transition } from '.';
|
|
2
|
+
import type { View } from '../core/view';
|
|
3
|
+
import type { Page } from '../page';
|
|
4
|
+
export declare const DEFAULT_DURATION = 0.35;
|
|
5
|
+
export declare enum SharedTransitionAnimationType {
|
|
6
|
+
present = 0,
|
|
7
|
+
dismiss = 1
|
|
8
|
+
}
|
|
9
|
+
export interface SharedTransitionConfig {
|
|
10
|
+
/**
|
|
11
|
+
* Page which will start the transition
|
|
12
|
+
*/
|
|
13
|
+
page?: Page;
|
|
14
|
+
/**
|
|
15
|
+
* Preconfigured transition or your own custom configured one
|
|
16
|
+
*/
|
|
17
|
+
instance?: Transition;
|
|
18
|
+
/**
|
|
19
|
+
* View settings to start your transition.
|
|
20
|
+
*/
|
|
21
|
+
toPageStart?: SharedTransitionPageProperties;
|
|
22
|
+
/**
|
|
23
|
+
* View settings to end your transition.
|
|
24
|
+
*/
|
|
25
|
+
toPageEnd?: SharedTransitionPageProperties;
|
|
26
|
+
/**
|
|
27
|
+
* View settings to end your transition for the 'from' (aka outgoing or dismissed) page.
|
|
28
|
+
*/
|
|
29
|
+
fromPageEnd?: SharedTransitionPageProperties;
|
|
30
|
+
}
|
|
31
|
+
export interface SharedTransitionState extends SharedTransitionConfig {
|
|
32
|
+
id?: number;
|
|
33
|
+
activeType?: SharedTransitionAnimationType;
|
|
34
|
+
toPage?: Page;
|
|
35
|
+
}
|
|
36
|
+
type SharedTransitionPageProperties = {
|
|
37
|
+
x?: number;
|
|
38
|
+
y?: number;
|
|
39
|
+
width?: number;
|
|
40
|
+
height?: number;
|
|
41
|
+
opacity?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Duration in milliseconds
|
|
44
|
+
*/
|
|
45
|
+
duration?: number;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Shared Element Transition (experimental)
|
|
49
|
+
*
|
|
50
|
+
* no
|
|
51
|
+
* Note: some APIs may change in subsequent releases
|
|
52
|
+
*/
|
|
53
|
+
export declare class SharedTransition {
|
|
54
|
+
static configure(options: SharedTransitionConfig): Transition;
|
|
55
|
+
static currentStack: Array<SharedTransitionState>;
|
|
56
|
+
static updateState(state: SharedTransitionState): void;
|
|
57
|
+
static addPageToTop(page: Page): void;
|
|
58
|
+
static getState(id: number): SharedTransitionState;
|
|
59
|
+
static finishState(id: number): void;
|
|
60
|
+
static getSharedElements(fromPage: Page, toPage: Page): {
|
|
61
|
+
sharedElements: Array<View>;
|
|
62
|
+
presented: Array<View>;
|
|
63
|
+
presenting: Array<View>;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { querySelectorAll } from '../core/view-base';
|
|
2
|
+
export const DEFAULT_DURATION = 0.35;
|
|
3
|
+
// always increment when adding new transitions to be able to track their state
|
|
4
|
+
export var SharedTransitionAnimationType;
|
|
5
|
+
(function (SharedTransitionAnimationType) {
|
|
6
|
+
SharedTransitionAnimationType[SharedTransitionAnimationType["present"] = 0] = "present";
|
|
7
|
+
SharedTransitionAnimationType[SharedTransitionAnimationType["dismiss"] = 1] = "dismiss";
|
|
8
|
+
})(SharedTransitionAnimationType || (SharedTransitionAnimationType = {}));
|
|
9
|
+
/**
|
|
10
|
+
* Shared Element Transition (experimental)
|
|
11
|
+
*
|
|
12
|
+
* no
|
|
13
|
+
* Note: some APIs may change in subsequent releases
|
|
14
|
+
*/
|
|
15
|
+
export class SharedTransition {
|
|
16
|
+
static configure(options) {
|
|
17
|
+
SharedTransition.updateState({
|
|
18
|
+
...options,
|
|
19
|
+
id: options.instance.id,
|
|
20
|
+
activeType: SharedTransitionAnimationType.present,
|
|
21
|
+
});
|
|
22
|
+
return options.instance;
|
|
23
|
+
}
|
|
24
|
+
static updateState(state) {
|
|
25
|
+
if (!SharedTransition.currentStack) {
|
|
26
|
+
SharedTransition.currentStack = [];
|
|
27
|
+
}
|
|
28
|
+
const existingTransition = SharedTransition.getState(state.id);
|
|
29
|
+
if (existingTransition) {
|
|
30
|
+
// updating existing
|
|
31
|
+
for (const key in state) {
|
|
32
|
+
existingTransition[key] = state[key];
|
|
33
|
+
// console.log(' ... updating state: ', key, state[key])
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
SharedTransition.currentStack.push(state);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
static addPageToTop(page) {
|
|
41
|
+
if (SharedTransition.currentStack?.length) {
|
|
42
|
+
const top = SharedTransition.currentStack.slice(-1)[0];
|
|
43
|
+
if (top) {
|
|
44
|
+
SharedTransition.updateState({
|
|
45
|
+
id: top.id,
|
|
46
|
+
toPage: page,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
static getState(id) {
|
|
52
|
+
return SharedTransition.currentStack.find((t) => t.id === id);
|
|
53
|
+
}
|
|
54
|
+
static finishState(id) {
|
|
55
|
+
const index = SharedTransition.currentStack.findIndex((t) => t.id === id);
|
|
56
|
+
if (index > -1) {
|
|
57
|
+
SharedTransition.currentStack.splice(index, 1);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
static getSharedElements(fromPage, toPage) {
|
|
61
|
+
// 1. Presented view: gather all sharedTransitionTag views
|
|
62
|
+
const presentedSharedElements = querySelectorAll(toPage, 'sharedTransitionTag');
|
|
63
|
+
// console.log('presented sharedTransitionTag total:', presentedSharedElements.length);
|
|
64
|
+
// 2. Presenting view: gather all sharedTransitionTag views
|
|
65
|
+
const presentingSharedElements = querySelectorAll(fromPage, 'sharedTransitionTag');
|
|
66
|
+
// console.log('presenting sharedTransitionTag total:', presentingSharedElements.length);
|
|
67
|
+
// 3. only handle sharedTransitionTag on presenting which match presented
|
|
68
|
+
const presentedTags = presentedSharedElements.map((v) => v.sharedTransitionTag);
|
|
69
|
+
return {
|
|
70
|
+
sharedElements: presentingSharedElements.filter((v) => presentedTags.includes(v.sharedTransitionTag)),
|
|
71
|
+
presented: presentedSharedElements,
|
|
72
|
+
presenting: presentingSharedElements,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=shared-transition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-transition.js","sourceRoot":"","sources":["../../../../../packages/core/ui/transition/shared-transition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AACrC,+EAA+E;AAC/E,MAAM,CAAN,IAAY,6BAGX;AAHD,WAAY,6BAA6B;IACxC,uFAAO,CAAA;IACP,uFAAO,CAAA;AACR,CAAC,EAHW,6BAA6B,KAA7B,6BAA6B,QAGxC;AAuCD;;;;;GAKG;AACH,MAAM,OAAO,gBAAgB;IAC5B,MAAM,CAAC,SAAS,CAAC,OAA+B;QAC/C,gBAAgB,CAAC,WAAW,CAAC;YAC5B,GAAG,OAAO;YACV,EAAE,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE;YACvB,UAAU,EAAE,6BAA6B,CAAC,OAAO;SAC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C,CAAC;QAC1E,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;YACf,gBAAgB,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SAC/C;IACF,CAAC;IACD,MAAM,CAAC,iBAAiB,CACvB,QAAc,EACd,MAAY;QAMZ,0DAA0D;QAC1D,MAAM,uBAAuB,GAAgB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;QAC7F,uFAAuF;QAEvF,2DAA2D;QAC3D,MAAM,wBAAwB,GAAgB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;QAChG,yFAAyF;QAEzF,yEAAyE;QACzE,MAAM,aAAa,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAChF,OAAO;YACN,cAAc,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;YACrG,SAAS,EAAE,uBAAuB;YAClC,UAAU,EAAE,wBAAwB;SACpC,CAAC;IACH,CAAC;CACD"}
|
package/ui/web-view/index.d.ts
CHANGED
|
@@ -92,17 +92,17 @@ export class WebView extends View {
|
|
|
92
92
|
* @param callback - Callback function which will be executed when event is raised.
|
|
93
93
|
* @param thisArg - An optional parameter which will be used as `this` context for callback execution.
|
|
94
94
|
*/
|
|
95
|
-
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any);
|
|
95
|
+
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void;
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Raised when a loadFinished event occurs.
|
|
99
99
|
*/
|
|
100
|
-
on(event: 'loadFinished', callback: (args: LoadEventData) => void, thisArg?: any);
|
|
100
|
+
on(event: 'loadFinished', callback: (args: LoadEventData) => void, thisArg?: any): void;
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* Raised when a loadStarted event occurs.
|
|
104
104
|
*/
|
|
105
|
-
on(event: 'loadStarted', callback: (args: LoadEventData) => void, thisArg?: any);
|
|
105
|
+
on(event: 'loadStarted', callback: (args: LoadEventData) => void, thisArg?: any): void;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WebView } from '.';
|
|
2
2
|
import { EventData } from '../../data/observable';
|
|
3
|
-
export
|
|
3
|
+
export type WebViewNavigationType = 'linkClicked' | 'formSubmitted' | 'backForward' | 'reload' | 'formResubmitted' | 'other' | undefined;
|
|
4
4
|
export interface LoadEventData extends EventData {
|
|
5
5
|
url: string;
|
|
6
6
|
navigationType: WebViewNavigationType;
|
package/utils/index.d.ts
CHANGED
|
@@ -21,88 +21,6 @@ interface Owned {
|
|
|
21
21
|
}
|
|
22
22
|
//@endprivate
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* Module with android specific utilities.
|
|
26
|
-
*/
|
|
27
|
-
export namespace ad {
|
|
28
|
-
/**
|
|
29
|
-
* Gets the native Android application instance.
|
|
30
|
-
*/
|
|
31
|
-
export function getApplication(): any; /* android.app.Application */
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Gets the Android application context.
|
|
35
|
-
*/
|
|
36
|
-
export function getApplicationContext(): any; /* android.content.Context */
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Gets the native Android input method manager.
|
|
40
|
-
*/
|
|
41
|
-
export function getInputMethodManager(): any; /* android.view.inputmethod.InputMethodManager */
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Hides the soft input method, usually a soft keyboard.
|
|
45
|
-
*/
|
|
46
|
-
export function dismissSoftInput(nativeView?: any /* android.view.View */): void;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Shows the soft input method, usually a soft keyboard.
|
|
50
|
-
*/
|
|
51
|
-
export function showSoftInput(nativeView: any /* android.view.View */): void;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Utility module dealing with some android collections.
|
|
55
|
-
*/
|
|
56
|
-
namespace collections {
|
|
57
|
-
/**
|
|
58
|
-
* Converts string array into a String [hash set](http://developer.android.com/reference/java/util/HashSet.html).
|
|
59
|
-
* @param str - An array of strings to convert.
|
|
60
|
-
*/
|
|
61
|
-
export function stringArrayToStringSet(str: string[]): any;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Converts string hash set into array of strings.
|
|
65
|
-
* @param stringSet - A string hash set to convert.
|
|
66
|
-
*/
|
|
67
|
-
export function stringSetToStringArray(stringSet: any): string[];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Utility module related to android resources.
|
|
72
|
-
*/
|
|
73
|
-
export namespace resources {
|
|
74
|
-
/**
|
|
75
|
-
* Gets the drawable id from a given name.
|
|
76
|
-
* @param name - Name of the resource.
|
|
77
|
-
*/
|
|
78
|
-
export function getDrawableId(name);
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Gets the string id from a given name.
|
|
82
|
-
* @param name - Name of the resource.
|
|
83
|
-
*/
|
|
84
|
-
export function getStringId(name);
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Gets the id from a given name.
|
|
88
|
-
* @param name - Name of the resource.
|
|
89
|
-
*/
|
|
90
|
-
export function getId(name: string): number;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* [Obsolete - please use getPaletteColor] Gets a color from current theme.
|
|
94
|
-
* @param name - Name of the color
|
|
95
|
-
*/
|
|
96
|
-
export function getPalleteColor();
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Gets a color from the current theme.
|
|
100
|
-
* @param name - Name of the color resource.
|
|
101
|
-
*/
|
|
102
|
-
export function getPaletteColor(name: string, context: any /* android.content.Context */): number;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
24
|
/**
|
|
107
25
|
* An utility function that invokes garbage collection on the JavaScript side.
|
|
108
26
|
*/
|
package/xhr/index.js
CHANGED
|
@@ -11,16 +11,6 @@ var XMLHttpRequestResponseType;
|
|
|
11
11
|
XMLHttpRequestResponseType.arraybuffer = 'arraybuffer';
|
|
12
12
|
})(XMLHttpRequestResponseType || (XMLHttpRequestResponseType = {}));
|
|
13
13
|
export class XMLHttpRequest {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.UNSENT = 0;
|
|
16
|
-
this.OPENED = 1;
|
|
17
|
-
this.HEADERS_RECEIVED = 2;
|
|
18
|
-
this.LOADING = 3;
|
|
19
|
-
this.DONE = 4;
|
|
20
|
-
this._responseType = '';
|
|
21
|
-
this._listeners = new Map();
|
|
22
|
-
this._readyState = this.UNSENT;
|
|
23
|
-
}
|
|
24
14
|
get upload() {
|
|
25
15
|
return this;
|
|
26
16
|
}
|
|
@@ -74,6 +64,16 @@ export class XMLHttpRequest {
|
|
|
74
64
|
}
|
|
75
65
|
return statuses[this._status];
|
|
76
66
|
}
|
|
67
|
+
constructor() {
|
|
68
|
+
this.UNSENT = 0;
|
|
69
|
+
this.OPENED = 1;
|
|
70
|
+
this.HEADERS_RECEIVED = 2;
|
|
71
|
+
this.LOADING = 3;
|
|
72
|
+
this.DONE = 4;
|
|
73
|
+
this._responseType = '';
|
|
74
|
+
this._listeners = new Map();
|
|
75
|
+
this._readyState = this.UNSENT;
|
|
76
|
+
}
|
|
77
77
|
_loadResponse(r) {
|
|
78
78
|
this._status = r.statusCode;
|
|
79
79
|
this._headers = r.headers;
|
|
@@ -303,6 +303,12 @@ export class FormData {
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
export class Blob {
|
|
306
|
+
get size() {
|
|
307
|
+
return this._size;
|
|
308
|
+
}
|
|
309
|
+
get type() {
|
|
310
|
+
return this._type;
|
|
311
|
+
}
|
|
306
312
|
constructor(chunks = [], opts = {}) {
|
|
307
313
|
this[_a] = 'Blob';
|
|
308
314
|
const dataChunks = [];
|
|
@@ -343,12 +349,6 @@ export class Blob {
|
|
|
343
349
|
this._type = this._type.toLowerCase();
|
|
344
350
|
}
|
|
345
351
|
}
|
|
346
|
-
get size() {
|
|
347
|
-
return this._size;
|
|
348
|
-
}
|
|
349
|
-
get type() {
|
|
350
|
-
return this._type;
|
|
351
|
-
}
|
|
352
352
|
arrayBuffer() {
|
|
353
353
|
return Promise.resolve(this._buffer);
|
|
354
354
|
}
|
|
@@ -375,24 +375,30 @@ Blob.InternalAccessor = class {
|
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
377
|
export class File extends Blob {
|
|
378
|
-
constructor(chunks, name, opts = {}) {
|
|
379
|
-
super(chunks, opts);
|
|
380
|
-
this[_b] = 'File';
|
|
381
|
-
this._name = name.replace(/\//g, ':');
|
|
382
|
-
this._lastModified = opts.lastModified ? new Date(opts.lastModified).valueOf() : Date.now();
|
|
383
|
-
}
|
|
384
378
|
get name() {
|
|
385
379
|
return this._name;
|
|
386
380
|
}
|
|
387
381
|
get lastModified() {
|
|
388
382
|
return this._lastModified;
|
|
389
383
|
}
|
|
384
|
+
constructor(chunks, name, opts = {}) {
|
|
385
|
+
super(chunks, opts);
|
|
386
|
+
this[_b] = 'File';
|
|
387
|
+
this._name = name.replace(/\//g, ':');
|
|
388
|
+
this._lastModified = opts.lastModified ? new Date(opts.lastModified).valueOf() : Date.now();
|
|
389
|
+
}
|
|
390
390
|
toString() {
|
|
391
391
|
return '[object File]';
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
_b = Symbol.toStringTag;
|
|
395
395
|
export class FileReader {
|
|
396
|
+
get readyState() {
|
|
397
|
+
return this._readyState;
|
|
398
|
+
}
|
|
399
|
+
get result() {
|
|
400
|
+
return this._result;
|
|
401
|
+
}
|
|
396
402
|
constructor() {
|
|
397
403
|
this.EMPTY = 0;
|
|
398
404
|
this.LOADING = 1;
|
|
@@ -401,12 +407,6 @@ export class FileReader {
|
|
|
401
407
|
this[_c] = 'FileReader';
|
|
402
408
|
//
|
|
403
409
|
}
|
|
404
|
-
get readyState() {
|
|
405
|
-
return this._readyState;
|
|
406
|
-
}
|
|
407
|
-
get result() {
|
|
408
|
-
return this._result;
|
|
409
|
-
}
|
|
410
410
|
_array2base64(input) {
|
|
411
411
|
const byteToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
412
412
|
const output = [];
|