@ionic/core 8.0.2-nightly.20240430 → 8.0.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/components/ios.transition.js +94 -67
- package/dist/cjs/{index-1a575e52.js → index-6047957b.js} +2 -2
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/{ios.transition-2b4db49c.js → ios.transition-59b0e1d9.js} +95 -68
- package/dist/cjs/{md.transition-8f3e1081.js → md.transition-0cc7c831.js} +1 -1
- package/dist/collection/utils/transition/ios.transition.js +94 -67
- package/dist/docs.json +1 -1
- package/dist/esm/{index-4db06e9f.js → index-f4460246.js} +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/{ios.transition-f4d34857.js → ios.transition-72f59adb.js} +95 -68
- package/dist/esm/{md.transition-995aadd3.js → md.transition-ef0437fe.js} +1 -1
- package/dist/esm-es5/{index-4db06e9f.js → index-f4460246.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ios.transition-72f59adb.js +4 -0
- package/dist/esm-es5/{md.transition-995aadd3.js → md.transition-ef0437fe.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-c4c33a40.system.entry.js → p-16b35bc9.system.entry.js} +1 -1
- package/dist/ionic/{p-112831e6.system.entry.js → p-19d50867.system.entry.js} +1 -1
- package/dist/ionic/p-30baae57.system.js +1 -1
- package/dist/ionic/{p-f59976c0.entry.js → p-3bece4aa.entry.js} +1 -1
- package/dist/ionic/{p-7b6b80ac.system.entry.js → p-439b8b3c.system.entry.js} +1 -1
- package/dist/ionic/{p-4a01da1d.entry.js → p-657157d7.entry.js} +1 -1
- package/dist/ionic/p-6636ef29.js +4 -0
- package/dist/ionic/p-6a5fe8b0.js +4 -0
- package/dist/ionic/{p-aec59006.entry.js → p-99c42ae3.entry.js} +1 -1
- package/dist/ionic/p-aa71aee7.js +4 -0
- package/dist/ionic/p-b4a034c8.system.js +4 -0
- package/dist/ionic/{p-adb59652.system.entry.js → p-b6d4e78d.system.entry.js} +1 -1
- package/dist/ionic/{p-505b2f62.system.js → p-cab332d1.system.js} +1 -1
- package/dist/ionic/{p-c1842a35.entry.js → p-e95ac94c.entry.js} +1 -1
- package/dist/ionic/{p-8cfb179c.system.js → p-f14daa66.system.js} +1 -1
- package/dist/ionic/{p-e0b881ae.system.js → p-f2026596.system.js} +1 -1
- package/hydrate/index.js +100 -73
- package/package.json +1 -1
- package/dist/esm-es5/ios.transition-f4d34857.js +0 -4
- package/dist/ionic/p-1dc1efbd.system.js +0 -4
- package/dist/ionic/p-82a0493a.js +0 -4
- package/dist/ionic/p-ad445168.js +0 -4
- package/dist/ionic/p-b73d33a9.js +0 -4
|
@@ -55,20 +55,22 @@ const createLargeTitleTransition = (rootAnimation, rtl, backDirection, enteringE
|
|
|
55
55
|
const leavingLargeTitleBox = leavingLargeTitle.getBoundingClientRect();
|
|
56
56
|
const enteringBackButtonBox = enteringBackButton.getBoundingClientRect();
|
|
57
57
|
const enteringBackButtonTextEl = shadow(enteringBackButton).querySelector('.button-text');
|
|
58
|
-
|
|
58
|
+
// Text element not rendered if developers pass text="" to the back button
|
|
59
|
+
const enteringBackButtonTextBox = enteringBackButtonTextEl === null || enteringBackButtonTextEl === void 0 ? void 0 : enteringBackButtonTextEl.getBoundingClientRect();
|
|
59
60
|
const leavingLargeTitleTextEl = shadow(leavingLargeTitle).querySelector('.toolbar-title');
|
|
60
61
|
const leavingLargeTitleTextBox = leavingLargeTitleTextEl.getBoundingClientRect();
|
|
61
|
-
animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, leavingLargeTitleTextBox, enteringBackButtonTextEl, enteringBackButtonTextBox);
|
|
62
|
+
animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, leavingLargeTitleTextBox, enteringBackButtonBox, enteringBackButtonTextEl, enteringBackButtonTextBox);
|
|
62
63
|
animateBackButton(rootAnimation, rtl, backDirection, enteringBackButton, enteringBackButtonBox, enteringBackButtonTextEl, enteringBackButtonTextBox, leavingLargeTitle, leavingLargeTitleTextBox);
|
|
63
64
|
}
|
|
64
65
|
else if (shouldAnimationBackward) {
|
|
65
66
|
const enteringLargeTitleBox = enteringLargeTitle.getBoundingClientRect();
|
|
66
67
|
const leavingBackButtonBox = leavingBackButton.getBoundingClientRect();
|
|
67
68
|
const leavingBackButtonTextEl = shadow(leavingBackButton).querySelector('.button-text');
|
|
68
|
-
|
|
69
|
+
// Text element not rendered if developers pass text="" to the back button
|
|
70
|
+
const leavingBackButtonTextBox = leavingBackButtonTextEl === null || leavingBackButtonTextEl === void 0 ? void 0 : leavingBackButtonTextEl.getBoundingClientRect();
|
|
69
71
|
const enteringLargeTitleTextEl = shadow(enteringLargeTitle).querySelector('.toolbar-title');
|
|
70
72
|
const enteringLargeTitleTextBox = enteringLargeTitleTextEl.getBoundingClientRect();
|
|
71
|
-
animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, enteringLargeTitleTextBox, leavingBackButtonTextEl, leavingBackButtonTextBox);
|
|
73
|
+
animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, enteringLargeTitleTextBox, leavingBackButtonBox, leavingBackButtonTextEl, leavingBackButtonTextBox);
|
|
72
74
|
animateBackButton(rootAnimation, rtl, backDirection, leavingBackButton, leavingBackButtonBox, leavingBackButtonTextEl, leavingBackButtonTextBox, enteringLargeTitle, enteringLargeTitleTextBox);
|
|
73
75
|
}
|
|
74
76
|
return {
|
|
@@ -82,26 +84,31 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
|
|
|
82
84
|
const TEXT_ORIGIN_X = rtl ? 'right' : 'left';
|
|
83
85
|
const ICON_ORIGIN_X = rtl ? 'left' : 'right';
|
|
84
86
|
const CONTAINER_ORIGIN_X = rtl ? 'right' : 'left';
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
* If the texts do not match up then the back button text scale adjusts
|
|
89
|
-
* to not perfectly match the large title text otherwise the
|
|
90
|
-
* proportions will be incorrect.
|
|
91
|
-
* When the texts match we scale both the width and height to account for
|
|
92
|
-
* font weight differences between the title and back button.
|
|
93
|
-
*/
|
|
94
|
-
const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
|
|
95
|
-
const WIDTH_SCALE = largeTitleTextBox.width / backButtonTextBox.width;
|
|
96
|
-
/**
|
|
97
|
-
* We subtract an offset to account for slight sizing/padding
|
|
98
|
-
* differences between the title and the back button.
|
|
99
|
-
*/
|
|
100
|
-
const HEIGHT_SCALE = (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET) / backButtonTextBox.height;
|
|
101
|
-
const TEXT_START_SCALE = doTitleAndButtonTextsMatch
|
|
102
|
-
? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})`
|
|
103
|
-
: `scale(${HEIGHT_SCALE})`;
|
|
87
|
+
let WIDTH_SCALE = 1;
|
|
88
|
+
let HEIGHT_SCALE = 1;
|
|
89
|
+
let TEXT_START_SCALE = `scale(${HEIGHT_SCALE})`;
|
|
104
90
|
const TEXT_END_SCALE = 'scale(1)';
|
|
91
|
+
if (backButtonTextEl && backButtonTextBox) {
|
|
92
|
+
/**
|
|
93
|
+
* When the title and back button texts match then they should overlap during the
|
|
94
|
+
* page transition. If the texts do not match up then the back button text scale
|
|
95
|
+
* adjusts to not perfectly match the large title text otherwise the proportions
|
|
96
|
+
* will be incorrect. When the texts match we scale both the width and height to
|
|
97
|
+
* account for font weight differences between the title and back button.
|
|
98
|
+
*/
|
|
99
|
+
const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
|
|
100
|
+
WIDTH_SCALE = largeTitleTextBox.width / backButtonTextBox.width;
|
|
101
|
+
/**
|
|
102
|
+
* Subtract an offset to account for slight sizing/padding differences between the
|
|
103
|
+
* title and the back button.
|
|
104
|
+
*/
|
|
105
|
+
HEIGHT_SCALE = (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET) / backButtonTextBox.height;
|
|
106
|
+
/**
|
|
107
|
+
* Even though we set TEXT_START_SCALE to HEIGHT_SCALE above, we potentially need
|
|
108
|
+
* to re-compute this here since the HEIGHT_SCALE may have changed.
|
|
109
|
+
*/
|
|
110
|
+
TEXT_START_SCALE = doTitleAndButtonTextsMatch ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})` : `scale(${HEIGHT_SCALE})`;
|
|
111
|
+
}
|
|
105
112
|
const backButtonIconEl = shadow(backButtonEl).querySelector('ion-icon');
|
|
106
113
|
const backButtonIconBox = backButtonIconEl.getBoundingClientRect();
|
|
107
114
|
/**
|
|
@@ -198,11 +205,11 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
|
|
|
198
205
|
top: '0px',
|
|
199
206
|
[CONTAINER_ORIGIN_X]: '0px',
|
|
200
207
|
})
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
208
|
+
/**
|
|
209
|
+
* The write hooks must be set on this animation as it is guaranteed to run. Other
|
|
210
|
+
* animations such as the back button text animation will not run if the back button
|
|
211
|
+
* has no visible text.
|
|
212
|
+
*/
|
|
206
213
|
.beforeAddWrite(() => {
|
|
207
214
|
backButtonEl.style.setProperty('display', 'none');
|
|
208
215
|
clonedBackButtonEl.style.setProperty(TEXT_ORIGIN_X, BACK_BUTTON_START_OFFSET);
|
|
@@ -211,6 +218,11 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
|
|
|
211
218
|
backButtonEl.style.setProperty('display', '');
|
|
212
219
|
clonedBackButtonEl.style.setProperty('display', 'none');
|
|
213
220
|
clonedBackButtonEl.style.removeProperty(TEXT_ORIGIN_X);
|
|
221
|
+
})
|
|
222
|
+
.keyframes(CONTAINER_KEYFRAMES);
|
|
223
|
+
enteringBackButtonTextAnimation
|
|
224
|
+
.beforeStyles({
|
|
225
|
+
'transform-origin': `${TEXT_ORIGIN_X} top`,
|
|
214
226
|
})
|
|
215
227
|
.keyframes(TEXT_KEYFRAMES);
|
|
216
228
|
enteringBackButtonIconAnimation
|
|
@@ -224,7 +236,7 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
|
|
|
224
236
|
enteringBackButtonAnimation,
|
|
225
237
|
]);
|
|
226
238
|
};
|
|
227
|
-
const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, largeTitleTextBox, backButtonTextEl, backButtonTextBox) => {
|
|
239
|
+
const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, largeTitleTextBox, backButtonBox, backButtonTextEl, backButtonTextBox) => {
|
|
228
240
|
var _a, _b;
|
|
229
241
|
/**
|
|
230
242
|
* The horizontal transform origin for the large title
|
|
@@ -244,52 +256,67 @@ const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, larg
|
|
|
244
256
|
* title and the back button due to padding and font weight.
|
|
245
257
|
*/
|
|
246
258
|
const LARGE_TITLE_TRANSLATION_OFFSET = 8;
|
|
259
|
+
let END_TRANSLATE_X = rtl
|
|
260
|
+
? `-${window.innerWidth - backButtonBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
|
|
261
|
+
: `${backButtonBox.x + LARGE_TITLE_TRANSLATION_OFFSET}px`;
|
|
247
262
|
/**
|
|
248
|
-
*
|
|
249
|
-
* This ensures that the back button and title overlap during
|
|
250
|
-
* the animation. Note that since both elements either fade in
|
|
251
|
-
* or fade out over the course of the animation, neither element
|
|
252
|
-
* will be fully visible on top of the other. As a result, the overlap
|
|
253
|
-
* does not need to be perfect, so approximate values are acceptable here.
|
|
263
|
+
* How much to scale the large title up/down by.
|
|
254
264
|
*/
|
|
255
|
-
|
|
256
|
-
? `-${window.innerWidth - backButtonTextBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
|
|
257
|
-
: `${backButtonTextBox.x - LARGE_TITLE_TRANSLATION_OFFSET}px`;
|
|
265
|
+
let HEIGHT_SCALE = 0.5;
|
|
258
266
|
/**
|
|
259
|
-
* The
|
|
260
|
-
* should match with the top of the
|
|
261
|
-
* back button text element.
|
|
262
|
-
* We subtract 2px to account for the top padding
|
|
263
|
-
* on the large title element.
|
|
267
|
+
* The large title always starts full size.
|
|
264
268
|
*/
|
|
265
|
-
const
|
|
266
|
-
const END_TRANSLATE_Y = `${backButtonTextBox.y - LARGE_TITLE_TOP_PADDING}px`;
|
|
269
|
+
const START_SCALE = 'scale(1)';
|
|
267
270
|
/**
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* large title should start at (roughly) the size of the back button
|
|
272
|
-
* and then scale up to its original size.
|
|
273
|
-
*
|
|
274
|
-
* Note that since both elements either fade in
|
|
275
|
-
* or fade out over the course of the animation, neither element
|
|
276
|
-
* will be fully visible on top of the other. As a result, the overlap
|
|
277
|
-
* does not need to be perfect, so approximate values are acceptable here.
|
|
271
|
+
* By default, we don't worry about having the large title scaled to perfectly
|
|
272
|
+
* match the back button because we don't know if the back button's text matches
|
|
273
|
+
* the large title's text.
|
|
278
274
|
*/
|
|
275
|
+
let END_SCALE = `scale(${HEIGHT_SCALE})`;
|
|
276
|
+
// Text element not rendered if developers pass text="" to the back button
|
|
277
|
+
if (backButtonTextEl && backButtonTextBox) {
|
|
278
|
+
/**
|
|
279
|
+
* The scaled title should (roughly) overlap the back button. This ensures that
|
|
280
|
+
* the back button and title overlap during the animation. Note that since both
|
|
281
|
+
* elements either fade in or fade out over the course of the animation, neither
|
|
282
|
+
* element will be fully visible on top of the other. As a result, the overlap
|
|
283
|
+
* does not need to be perfect, so approximate values are acceptable here.
|
|
284
|
+
*/
|
|
285
|
+
END_TRANSLATE_X = rtl
|
|
286
|
+
? `-${window.innerWidth - backButtonTextBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
|
|
287
|
+
: `${backButtonTextBox.x - LARGE_TITLE_TRANSLATION_OFFSET}px`;
|
|
288
|
+
/**
|
|
289
|
+
* In the forward direction, the large title should start at its normal size and
|
|
290
|
+
* then scale down to be (roughly) the size of the back button on the other view.
|
|
291
|
+
* In the backward direction, the large title should start at (roughly) the size
|
|
292
|
+
* of the back button and then scale up to its original size.
|
|
293
|
+
* Note that since both elements either fade in or fade out over the course of the
|
|
294
|
+
* animation, neither element will be fully visible on top of the other. As a result,
|
|
295
|
+
* the overlap does not need to be perfect, so approximate values are acceptable here.
|
|
296
|
+
*/
|
|
297
|
+
/**
|
|
298
|
+
* When the title and back button texts match then they should overlap during the
|
|
299
|
+
* page transition. If the texts do not match up then the large title text scale
|
|
300
|
+
* adjusts to not perfectly match the back button text otherwise the proportions
|
|
301
|
+
* will be incorrect. When the texts match we scale both the width and height to
|
|
302
|
+
* account for font weight differences between the title and back button.
|
|
303
|
+
*/
|
|
304
|
+
const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
|
|
305
|
+
const WIDTH_SCALE = backButtonTextBox.width / largeTitleTextBox.width;
|
|
306
|
+
HEIGHT_SCALE = backButtonTextBox.height / (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET);
|
|
307
|
+
/**
|
|
308
|
+
* Even though we set TEXT_START_SCALE to HEIGHT_SCALE above, we potentially need
|
|
309
|
+
* to re-compute this here since the HEIGHT_SCALE may have changed.
|
|
310
|
+
*/
|
|
311
|
+
END_SCALE = doTitleAndButtonTextsMatch ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})` : `scale(${HEIGHT_SCALE})`;
|
|
312
|
+
}
|
|
279
313
|
/**
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
* If the texts do not match up then the large title text scale adjusts
|
|
283
|
-
* to not perfectly match the back button text otherwise the
|
|
284
|
-
* proportions will be incorrect.
|
|
285
|
-
* When the texts match we scale both the width and height to account for
|
|
286
|
-
* font weight differences between the title and back button.
|
|
314
|
+
* The midpoints of the back button and the title should align such that the back
|
|
315
|
+
* button and title appear to be centered with each other.
|
|
287
316
|
*/
|
|
288
|
-
const
|
|
289
|
-
const
|
|
290
|
-
const
|
|
291
|
-
const START_SCALE = 'scale(1)';
|
|
292
|
-
const END_SCALE = doTitleAndButtonTextsMatch ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})` : `scale(${HEIGHT_SCALE})`;
|
|
317
|
+
const backButtonMidPoint = backButtonBox.top + backButtonBox.height / 2;
|
|
318
|
+
const titleMidPoint = (largeTitleBox.height * HEIGHT_SCALE) / 2;
|
|
319
|
+
const END_TRANSLATE_Y = `${backButtonMidPoint - titleMidPoint}px`;
|
|
293
320
|
const BACKWARDS_KEYFRAMES = [
|
|
294
321
|
{ offset: 0, opacity: 0, transform: `translate3d(${END_TRANSLATE_X}, ${END_TRANSLATE_Y}, 0) ${END_SCALE}` },
|
|
295
322
|
{ offset: 0.1, opacity: 0 },
|
package/dist/docs.json
CHANGED
|
@@ -10,8 +10,8 @@ const LIFECYCLE_WILL_LEAVE = 'ionViewWillLeave';
|
|
|
10
10
|
const LIFECYCLE_DID_LEAVE = 'ionViewDidLeave';
|
|
11
11
|
const LIFECYCLE_WILL_UNLOAD = 'ionViewWillUnload';
|
|
12
12
|
|
|
13
|
-
const iosTransitionAnimation = () => import('./ios.transition-
|
|
14
|
-
const mdTransitionAnimation = () => import('./md.transition-
|
|
13
|
+
const iosTransitionAnimation = () => import('./ios.transition-72f59adb.js');
|
|
14
|
+
const mdTransitionAnimation = () => import('./md.transition-ef0437fe.js');
|
|
15
15
|
// TODO(FW-2832): types
|
|
16
16
|
const transition = (opts) => {
|
|
17
17
|
return new Promise((resolve, reject) => {
|
package/dist/esm/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
export { c as createAnimation } from './animation-eab5a4ca.js';
|
|
5
|
-
export { a as LIFECYCLE_DID_ENTER, c as LIFECYCLE_DID_LEAVE, L as LIFECYCLE_WILL_ENTER, b as LIFECYCLE_WILL_LEAVE, d as LIFECYCLE_WILL_UNLOAD, g as getIonPageElement } from './index-
|
|
6
|
-
export { iosTransitionAnimation } from './ios.transition-
|
|
7
|
-
export { mdTransitionAnimation } from './md.transition-
|
|
5
|
+
export { a as LIFECYCLE_DID_ENTER, c as LIFECYCLE_DID_LEAVE, L as LIFECYCLE_WILL_ENTER, b as LIFECYCLE_WILL_LEAVE, d as LIFECYCLE_WILL_UNLOAD, g as getIonPageElement } from './index-f4460246.js';
|
|
6
|
+
export { iosTransitionAnimation } from './ios.transition-72f59adb.js';
|
|
7
|
+
export { mdTransitionAnimation } from './md.transition-ef0437fe.js';
|
|
8
8
|
export { g as getTimeGivenProgression } from './cubic-bezier-fe2083dc.js';
|
|
9
9
|
export { createGesture } from './index-39782642.js';
|
|
10
10
|
export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global-4528d288.js';
|
|
@@ -13,7 +13,7 @@ import { c as createKeyboardController } from './keyboard-controller-ec5c2bfa.js
|
|
|
13
13
|
import { g as getTimeGivenProgression } from './cubic-bezier-fe2083dc.js';
|
|
14
14
|
import { a as attachComponent, d as detachComponent } from './framework-delegate-63d1a679.js';
|
|
15
15
|
import { c as createLockController } from './lock-controller-316928be.js';
|
|
16
|
-
import { t as transition } from './index-
|
|
16
|
+
import { t as transition } from './index-f4460246.js';
|
|
17
17
|
import './index-a5d50daf.js';
|
|
18
18
|
import './keyboard-73175e24.js';
|
|
19
19
|
import './capacitor-59395cbd.js';
|
|
@@ -10,7 +10,7 @@ import { p as printIonWarning } from './index-9b0d46f4.js';
|
|
|
10
10
|
import { g as getCapacitor } from './capacitor-59395cbd.js';
|
|
11
11
|
import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-56045efc.js';
|
|
12
12
|
import { g as getClassMap } from './theme-01f3f29c.js';
|
|
13
|
-
import { e as deepReady, w as waitForMount } from './index-
|
|
13
|
+
import { e as deepReady, w as waitForMount } from './index-f4460246.js';
|
|
14
14
|
import { b as getIonMode, c as config } from './ionic-global-4528d288.js';
|
|
15
15
|
import { KEYBOARD_DID_OPEN } from './keyboard-52278bd7.js';
|
|
16
16
|
import { c as createAnimation } from './animation-eab5a4ca.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { r as registerInstance, d as createEvent, h, i as getElement, f as Host } from './index-9aab3bcf.js';
|
|
5
5
|
import { g as getTimeGivenProgression } from './cubic-bezier-fe2083dc.js';
|
|
6
6
|
import { m as assert, s as shallowEqualStringMap } from './helpers-da915de8.js';
|
|
7
|
-
import { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-
|
|
7
|
+
import { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-f4460246.js';
|
|
8
8
|
import { b as getIonMode, c as config } from './ionic-global-4528d288.js';
|
|
9
9
|
import { a as attachComponent } from './framework-delegate-63d1a679.js';
|
|
10
10
|
|
|
@@ -9,7 +9,7 @@ import { c as createLockController } from './lock-controller-316928be.js';
|
|
|
9
9
|
import { p as printIonWarning } from './index-9b0d46f4.js';
|
|
10
10
|
import { b as getIonMode, a as isPlatform } from './ionic-global-4528d288.js';
|
|
11
11
|
import { g as getClassMap } from './theme-01f3f29c.js';
|
|
12
|
-
import { e as deepReady, w as waitForMount } from './index-
|
|
12
|
+
import { e as deepReady, w as waitForMount } from './index-f4460246.js';
|
|
13
13
|
import { c as createAnimation } from './animation-eab5a4ca.js';
|
|
14
14
|
import './index-a5d50daf.js';
|
|
15
15
|
import './hardware-back-button-2d9760b6.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { c as createAnimation } from './animation-eab5a4ca.js';
|
|
5
|
-
import { g as getIonPageElement } from './index-
|
|
5
|
+
import { g as getIonPageElement } from './index-f4460246.js';
|
|
6
6
|
import './index-a5d50daf.js';
|
|
7
7
|
import './index-9aab3bcf.js';
|
|
8
8
|
import './helpers-da915de8.js';
|
|
@@ -59,20 +59,22 @@ const createLargeTitleTransition = (rootAnimation, rtl, backDirection, enteringE
|
|
|
59
59
|
const leavingLargeTitleBox = leavingLargeTitle.getBoundingClientRect();
|
|
60
60
|
const enteringBackButtonBox = enteringBackButton.getBoundingClientRect();
|
|
61
61
|
const enteringBackButtonTextEl = shadow(enteringBackButton).querySelector('.button-text');
|
|
62
|
-
|
|
62
|
+
// Text element not rendered if developers pass text="" to the back button
|
|
63
|
+
const enteringBackButtonTextBox = enteringBackButtonTextEl === null || enteringBackButtonTextEl === void 0 ? void 0 : enteringBackButtonTextEl.getBoundingClientRect();
|
|
63
64
|
const leavingLargeTitleTextEl = shadow(leavingLargeTitle).querySelector('.toolbar-title');
|
|
64
65
|
const leavingLargeTitleTextBox = leavingLargeTitleTextEl.getBoundingClientRect();
|
|
65
|
-
animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, leavingLargeTitleTextBox, enteringBackButtonTextEl, enteringBackButtonTextBox);
|
|
66
|
+
animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, leavingLargeTitleTextBox, enteringBackButtonBox, enteringBackButtonTextEl, enteringBackButtonTextBox);
|
|
66
67
|
animateBackButton(rootAnimation, rtl, backDirection, enteringBackButton, enteringBackButtonBox, enteringBackButtonTextEl, enteringBackButtonTextBox, leavingLargeTitle, leavingLargeTitleTextBox);
|
|
67
68
|
}
|
|
68
69
|
else if (shouldAnimationBackward) {
|
|
69
70
|
const enteringLargeTitleBox = enteringLargeTitle.getBoundingClientRect();
|
|
70
71
|
const leavingBackButtonBox = leavingBackButton.getBoundingClientRect();
|
|
71
72
|
const leavingBackButtonTextEl = shadow(leavingBackButton).querySelector('.button-text');
|
|
72
|
-
|
|
73
|
+
// Text element not rendered if developers pass text="" to the back button
|
|
74
|
+
const leavingBackButtonTextBox = leavingBackButtonTextEl === null || leavingBackButtonTextEl === void 0 ? void 0 : leavingBackButtonTextEl.getBoundingClientRect();
|
|
73
75
|
const enteringLargeTitleTextEl = shadow(enteringLargeTitle).querySelector('.toolbar-title');
|
|
74
76
|
const enteringLargeTitleTextBox = enteringLargeTitleTextEl.getBoundingClientRect();
|
|
75
|
-
animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, enteringLargeTitleTextBox, leavingBackButtonTextEl, leavingBackButtonTextBox);
|
|
77
|
+
animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, enteringLargeTitleTextBox, leavingBackButtonBox, leavingBackButtonTextEl, leavingBackButtonTextBox);
|
|
76
78
|
animateBackButton(rootAnimation, rtl, backDirection, leavingBackButton, leavingBackButtonBox, leavingBackButtonTextEl, leavingBackButtonTextBox, enteringLargeTitle, enteringLargeTitleTextBox);
|
|
77
79
|
}
|
|
78
80
|
return {
|
|
@@ -86,26 +88,31 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
|
|
|
86
88
|
const TEXT_ORIGIN_X = rtl ? 'right' : 'left';
|
|
87
89
|
const ICON_ORIGIN_X = rtl ? 'left' : 'right';
|
|
88
90
|
const CONTAINER_ORIGIN_X = rtl ? 'right' : 'left';
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
* If the texts do not match up then the back button text scale adjusts
|
|
93
|
-
* to not perfectly match the large title text otherwise the
|
|
94
|
-
* proportions will be incorrect.
|
|
95
|
-
* When the texts match we scale both the width and height to account for
|
|
96
|
-
* font weight differences between the title and back button.
|
|
97
|
-
*/
|
|
98
|
-
const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
|
|
99
|
-
const WIDTH_SCALE = largeTitleTextBox.width / backButtonTextBox.width;
|
|
100
|
-
/**
|
|
101
|
-
* We subtract an offset to account for slight sizing/padding
|
|
102
|
-
* differences between the title and the back button.
|
|
103
|
-
*/
|
|
104
|
-
const HEIGHT_SCALE = (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET) / backButtonTextBox.height;
|
|
105
|
-
const TEXT_START_SCALE = doTitleAndButtonTextsMatch
|
|
106
|
-
? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})`
|
|
107
|
-
: `scale(${HEIGHT_SCALE})`;
|
|
91
|
+
let WIDTH_SCALE = 1;
|
|
92
|
+
let HEIGHT_SCALE = 1;
|
|
93
|
+
let TEXT_START_SCALE = `scale(${HEIGHT_SCALE})`;
|
|
108
94
|
const TEXT_END_SCALE = 'scale(1)';
|
|
95
|
+
if (backButtonTextEl && backButtonTextBox) {
|
|
96
|
+
/**
|
|
97
|
+
* When the title and back button texts match then they should overlap during the
|
|
98
|
+
* page transition. If the texts do not match up then the back button text scale
|
|
99
|
+
* adjusts to not perfectly match the large title text otherwise the proportions
|
|
100
|
+
* will be incorrect. When the texts match we scale both the width and height to
|
|
101
|
+
* account for font weight differences between the title and back button.
|
|
102
|
+
*/
|
|
103
|
+
const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
|
|
104
|
+
WIDTH_SCALE = largeTitleTextBox.width / backButtonTextBox.width;
|
|
105
|
+
/**
|
|
106
|
+
* Subtract an offset to account for slight sizing/padding differences between the
|
|
107
|
+
* title and the back button.
|
|
108
|
+
*/
|
|
109
|
+
HEIGHT_SCALE = (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET) / backButtonTextBox.height;
|
|
110
|
+
/**
|
|
111
|
+
* Even though we set TEXT_START_SCALE to HEIGHT_SCALE above, we potentially need
|
|
112
|
+
* to re-compute this here since the HEIGHT_SCALE may have changed.
|
|
113
|
+
*/
|
|
114
|
+
TEXT_START_SCALE = doTitleAndButtonTextsMatch ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})` : `scale(${HEIGHT_SCALE})`;
|
|
115
|
+
}
|
|
109
116
|
const backButtonIconEl = shadow(backButtonEl).querySelector('ion-icon');
|
|
110
117
|
const backButtonIconBox = backButtonIconEl.getBoundingClientRect();
|
|
111
118
|
/**
|
|
@@ -202,11 +209,11 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
|
|
|
202
209
|
top: '0px',
|
|
203
210
|
[CONTAINER_ORIGIN_X]: '0px',
|
|
204
211
|
})
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
212
|
+
/**
|
|
213
|
+
* The write hooks must be set on this animation as it is guaranteed to run. Other
|
|
214
|
+
* animations such as the back button text animation will not run if the back button
|
|
215
|
+
* has no visible text.
|
|
216
|
+
*/
|
|
210
217
|
.beforeAddWrite(() => {
|
|
211
218
|
backButtonEl.style.setProperty('display', 'none');
|
|
212
219
|
clonedBackButtonEl.style.setProperty(TEXT_ORIGIN_X, BACK_BUTTON_START_OFFSET);
|
|
@@ -215,6 +222,11 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
|
|
|
215
222
|
backButtonEl.style.setProperty('display', '');
|
|
216
223
|
clonedBackButtonEl.style.setProperty('display', 'none');
|
|
217
224
|
clonedBackButtonEl.style.removeProperty(TEXT_ORIGIN_X);
|
|
225
|
+
})
|
|
226
|
+
.keyframes(CONTAINER_KEYFRAMES);
|
|
227
|
+
enteringBackButtonTextAnimation
|
|
228
|
+
.beforeStyles({
|
|
229
|
+
'transform-origin': `${TEXT_ORIGIN_X} top`,
|
|
218
230
|
})
|
|
219
231
|
.keyframes(TEXT_KEYFRAMES);
|
|
220
232
|
enteringBackButtonIconAnimation
|
|
@@ -228,7 +240,7 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
|
|
|
228
240
|
enteringBackButtonAnimation,
|
|
229
241
|
]);
|
|
230
242
|
};
|
|
231
|
-
const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, largeTitleTextBox, backButtonTextEl, backButtonTextBox) => {
|
|
243
|
+
const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, largeTitleTextBox, backButtonBox, backButtonTextEl, backButtonTextBox) => {
|
|
232
244
|
var _a, _b;
|
|
233
245
|
/**
|
|
234
246
|
* The horizontal transform origin for the large title
|
|
@@ -248,52 +260,67 @@ const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, larg
|
|
|
248
260
|
* title and the back button due to padding and font weight.
|
|
249
261
|
*/
|
|
250
262
|
const LARGE_TITLE_TRANSLATION_OFFSET = 8;
|
|
263
|
+
let END_TRANSLATE_X = rtl
|
|
264
|
+
? `-${window.innerWidth - backButtonBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
|
|
265
|
+
: `${backButtonBox.x + LARGE_TITLE_TRANSLATION_OFFSET}px`;
|
|
251
266
|
/**
|
|
252
|
-
*
|
|
253
|
-
* This ensures that the back button and title overlap during
|
|
254
|
-
* the animation. Note that since both elements either fade in
|
|
255
|
-
* or fade out over the course of the animation, neither element
|
|
256
|
-
* will be fully visible on top of the other. As a result, the overlap
|
|
257
|
-
* does not need to be perfect, so approximate values are acceptable here.
|
|
267
|
+
* How much to scale the large title up/down by.
|
|
258
268
|
*/
|
|
259
|
-
|
|
260
|
-
? `-${window.innerWidth - backButtonTextBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
|
|
261
|
-
: `${backButtonTextBox.x - LARGE_TITLE_TRANSLATION_OFFSET}px`;
|
|
269
|
+
let HEIGHT_SCALE = 0.5;
|
|
262
270
|
/**
|
|
263
|
-
* The
|
|
264
|
-
* should match with the top of the
|
|
265
|
-
* back button text element.
|
|
266
|
-
* We subtract 2px to account for the top padding
|
|
267
|
-
* on the large title element.
|
|
271
|
+
* The large title always starts full size.
|
|
268
272
|
*/
|
|
269
|
-
const
|
|
270
|
-
const END_TRANSLATE_Y = `${backButtonTextBox.y - LARGE_TITLE_TOP_PADDING}px`;
|
|
273
|
+
const START_SCALE = 'scale(1)';
|
|
271
274
|
/**
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* large title should start at (roughly) the size of the back button
|
|
276
|
-
* and then scale up to its original size.
|
|
277
|
-
*
|
|
278
|
-
* Note that since both elements either fade in
|
|
279
|
-
* or fade out over the course of the animation, neither element
|
|
280
|
-
* will be fully visible on top of the other. As a result, the overlap
|
|
281
|
-
* does not need to be perfect, so approximate values are acceptable here.
|
|
275
|
+
* By default, we don't worry about having the large title scaled to perfectly
|
|
276
|
+
* match the back button because we don't know if the back button's text matches
|
|
277
|
+
* the large title's text.
|
|
282
278
|
*/
|
|
279
|
+
let END_SCALE = `scale(${HEIGHT_SCALE})`;
|
|
280
|
+
// Text element not rendered if developers pass text="" to the back button
|
|
281
|
+
if (backButtonTextEl && backButtonTextBox) {
|
|
282
|
+
/**
|
|
283
|
+
* The scaled title should (roughly) overlap the back button. This ensures that
|
|
284
|
+
* the back button and title overlap during the animation. Note that since both
|
|
285
|
+
* elements either fade in or fade out over the course of the animation, neither
|
|
286
|
+
* element will be fully visible on top of the other. As a result, the overlap
|
|
287
|
+
* does not need to be perfect, so approximate values are acceptable here.
|
|
288
|
+
*/
|
|
289
|
+
END_TRANSLATE_X = rtl
|
|
290
|
+
? `-${window.innerWidth - backButtonTextBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
|
|
291
|
+
: `${backButtonTextBox.x - LARGE_TITLE_TRANSLATION_OFFSET}px`;
|
|
292
|
+
/**
|
|
293
|
+
* In the forward direction, the large title should start at its normal size and
|
|
294
|
+
* then scale down to be (roughly) the size of the back button on the other view.
|
|
295
|
+
* In the backward direction, the large title should start at (roughly) the size
|
|
296
|
+
* of the back button and then scale up to its original size.
|
|
297
|
+
* Note that since both elements either fade in or fade out over the course of the
|
|
298
|
+
* animation, neither element will be fully visible on top of the other. As a result,
|
|
299
|
+
* the overlap does not need to be perfect, so approximate values are acceptable here.
|
|
300
|
+
*/
|
|
301
|
+
/**
|
|
302
|
+
* When the title and back button texts match then they should overlap during the
|
|
303
|
+
* page transition. If the texts do not match up then the large title text scale
|
|
304
|
+
* adjusts to not perfectly match the back button text otherwise the proportions
|
|
305
|
+
* will be incorrect. When the texts match we scale both the width and height to
|
|
306
|
+
* account for font weight differences between the title and back button.
|
|
307
|
+
*/
|
|
308
|
+
const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
|
|
309
|
+
const WIDTH_SCALE = backButtonTextBox.width / largeTitleTextBox.width;
|
|
310
|
+
HEIGHT_SCALE = backButtonTextBox.height / (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET);
|
|
311
|
+
/**
|
|
312
|
+
* Even though we set TEXT_START_SCALE to HEIGHT_SCALE above, we potentially need
|
|
313
|
+
* to re-compute this here since the HEIGHT_SCALE may have changed.
|
|
314
|
+
*/
|
|
315
|
+
END_SCALE = doTitleAndButtonTextsMatch ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})` : `scale(${HEIGHT_SCALE})`;
|
|
316
|
+
}
|
|
283
317
|
/**
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* If the texts do not match up then the large title text scale adjusts
|
|
287
|
-
* to not perfectly match the back button text otherwise the
|
|
288
|
-
* proportions will be incorrect.
|
|
289
|
-
* When the texts match we scale both the width and height to account for
|
|
290
|
-
* font weight differences between the title and back button.
|
|
318
|
+
* The midpoints of the back button and the title should align such that the back
|
|
319
|
+
* button and title appear to be centered with each other.
|
|
291
320
|
*/
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
const
|
|
295
|
-
const START_SCALE = 'scale(1)';
|
|
296
|
-
const END_SCALE = doTitleAndButtonTextsMatch ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})` : `scale(${HEIGHT_SCALE})`;
|
|
321
|
+
const backButtonMidPoint = backButtonBox.top + backButtonBox.height / 2;
|
|
322
|
+
const titleMidPoint = (largeTitleBox.height * HEIGHT_SCALE) / 2;
|
|
323
|
+
const END_TRANSLATE_Y = `${backButtonMidPoint - titleMidPoint}px`;
|
|
297
324
|
const BACKWARDS_KEYFRAMES = [
|
|
298
325
|
{ offset: 0, opacity: 0, transform: `translate3d(${END_TRANSLATE_X}, ${END_TRANSLATE_Y}, 0) ${END_SCALE}` },
|
|
299
326
|
{ offset: 0.1, opacity: 0 },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { c as createAnimation } from './animation-eab5a4ca.js';
|
|
5
|
-
import { g as getIonPageElement } from './index-
|
|
5
|
+
import { g as getIonPageElement } from './index-f4460246.js';
|
|
6
6
|
import './index-a5d50daf.js';
|
|
7
7
|
import './index-9aab3bcf.js';
|
|
8
8
|
import './helpers-da915de8.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{w as writeTask,B as Build}from"./index-9aab3bcf.js";import{r as raf}from"./helpers-da915de8.js";var LIFECYCLE_WILL_ENTER="ionViewWillEnter";var LIFECYCLE_DID_ENTER="ionViewDidEnter";var LIFECYCLE_WILL_LEAVE="ionViewWillLeave";var LIFECYCLE_DID_LEAVE="ionViewDidLeave";var LIFECYCLE_WILL_UNLOAD="ionViewWillUnload";var iosTransitionAnimation=function(){return import("./ios.transition-
|
|
4
|
+
*/import{w as writeTask,B as Build}from"./index-9aab3bcf.js";import{r as raf}from"./helpers-da915de8.js";var LIFECYCLE_WILL_ENTER="ionViewWillEnter";var LIFECYCLE_DID_ENTER="ionViewDidEnter";var LIFECYCLE_WILL_LEAVE="ionViewWillLeave";var LIFECYCLE_DID_LEAVE="ionViewDidLeave";var LIFECYCLE_WILL_UNLOAD="ionViewWillUnload";var iosTransitionAnimation=function(){return import("./ios.transition-72f59adb.js")};var mdTransitionAnimation=function(){return import("./md.transition-ef0437fe.js")};var transition=function(n){return new Promise((function(e,i){writeTask((function(){beforeTransition(n);runTransition(n).then((function(i){if(i.animation){i.animation.destroy()}afterTransition(n);e(i)}),(function(e){afterTransition(n);i(e)}))}))}))};var beforeTransition=function(n){var e=n.enteringEl;var i=n.leavingEl;setZIndex(e,i,n.direction);if(n.showGoBack){e.classList.add("can-go-back")}else{e.classList.remove("can-go-back")}setPageHidden(e,false);e.style.setProperty("pointer-events","none");if(i){setPageHidden(i,false);i.style.setProperty("pointer-events","none")}};var runTransition=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:return[4,getAnimationBuilder(n)];case 1:e=r.sent();i=e&&Build.isBrowser?animation(e,n):noAnimation(n);return[2,i]}}))}))};var afterTransition=function(n){var e=n.enteringEl;var i=n.leavingEl;e.classList.remove("ion-page-invisible");e.style.removeProperty("pointer-events");if(i!==undefined){i.classList.remove("ion-page-invisible");i.style.removeProperty("pointer-events")}};var getAnimationBuilder=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:if(!n.leavingEl||!n.animated||n.duration===0){return[2,undefined]}if(n.animationBuilder){return[2,n.animationBuilder]}if(!(n.mode==="ios"))return[3,2];return[4,iosTransitionAnimation()];case 1:i=r.sent().iosTransitionAnimation;return[3,4];case 2:return[4,mdTransitionAnimation()];case 3:i=r.sent().mdTransitionAnimation;r.label=4;case 4:e=i;return[2,e]}}))}))};var animation=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){var i,r;return __generator(this,(function(t){switch(t.label){case 0:return[4,waitForReady(e,true)];case 1:t.sent();i=n(e.baseEl,e);fireWillEvents(e.enteringEl,e.leavingEl);return[4,playTransition(i,e)];case 2:r=t.sent();if(e.progressCallback){e.progressCallback(undefined)}if(r){fireDidEvents(e.enteringEl,e.leavingEl)}return[2,{hasCompleted:r,animation:i}]}}))}))};var noAnimation=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:e=n.enteringEl;i=n.leavingEl;return[4,waitForReady(n,false)];case 1:r.sent();fireWillEvents(e,i);fireDidEvents(e,i);return[2,{hasCompleted:true}]}}))}))};var waitForReady=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){var i;return __generator(this,(function(r){switch(r.label){case 0:i=n.deepWait!==undefined?n.deepWait:e;if(!i)return[3,2];return[4,Promise.all([deepReady(n.enteringEl),deepReady(n.leavingEl)])];case 1:r.sent();r.label=2;case 2:return[4,notifyViewReady(n.viewIsReady,n.enteringEl)];case 3:r.sent();return[2]}}))}))};var notifyViewReady=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!n)return[3,2];return[4,n(e)];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};var playTransition=function(n,e){var i=e.progressCallback;var r=new Promise((function(e){n.onFinish((function(n){return e(n===1)}))}));if(i){n.progressStart(true);i(n)}else{n.play()}return r};var fireWillEvents=function(n,e){lifecycle(e,LIFECYCLE_WILL_LEAVE);lifecycle(n,LIFECYCLE_WILL_ENTER)};var fireDidEvents=function(n,e){lifecycle(n,LIFECYCLE_DID_ENTER);lifecycle(e,LIFECYCLE_DID_LEAVE)};var lifecycle=function(n,e){if(n){var i=new CustomEvent(e,{bubbles:false,cancelable:false});n.dispatchEvent(i)}};var waitForMount=function(){return new Promise((function(n){return raf((function(){return raf((function(){return n()}))}))}))};var deepReady=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(t){switch(t.label){case 0:e=n;if(!e)return[3,6];if(!(e.componentOnReady!=null))return[3,2];return[4,e.componentOnReady()];case 1:i=t.sent();if(i!=null){return[2]}return[3,4];case 2:if(!(e.__registerHost!=null))return[3,4];r=new Promise((function(n){return raf(n)}));return[4,r];case 3:t.sent();return[2];case 4:return[4,Promise.all(Array.from(e.children).map(deepReady))];case 5:t.sent();t.label=6;case 6:return[2]}}))}))};var setPageHidden=function(n,e){if(e){n.setAttribute("aria-hidden","true");n.classList.add("ion-page-hidden")}else{n.hidden=false;n.removeAttribute("aria-hidden");n.classList.remove("ion-page-hidden")}};var setZIndex=function(n,e,i){if(n!==undefined){n.style.zIndex=i==="back"?"99":"101"}if(e!==undefined){e.style.zIndex="100"}};var getIonPageElement=function(n){if(n.classList.contains("ion-page")){return n}var e=n.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs");if(e){return e}return n};export{LIFECYCLE_WILL_ENTER as L,LIFECYCLE_DID_ENTER as a,LIFECYCLE_WILL_LEAVE as b,LIFECYCLE_DID_LEAVE as c,LIFECYCLE_WILL_UNLOAD as d,deepReady as e,getIonPageElement as g,lifecycle as l,setPageHidden as s,transition as t,waitForMount as w};
|
package/dist/esm-es5/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
export{c as createAnimation}from"./animation-eab5a4ca.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./index-
|
|
4
|
+
export{c as createAnimation}from"./animation-eab5a4ca.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./index-f4460246.js";export{iosTransitionAnimation}from"./ios.transition-72f59adb.js";export{mdTransitionAnimation}from"./md.transition-ef0437fe.js";export{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";export{createGesture}from"./index-39782642.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./ionic-global-4528d288.js";export{c as componentOnReady}from"./helpers-da915de8.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./config-49c88215.js";export{o as openURL}from"./theme-01f3f29c.js";export{m as menuController}from"./index-7ae7186a.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./overlays-56045efc.js";import"./index-a5d50daf.js";import"./index-9aab3bcf.js";import"./gesture-controller-314a54f6.js";import"./hardware-back-button-2d9760b6.js";import"./index-9b0d46f4.js";import"./framework-delegate-63d1a679.js";var IonicSlides=function(e){var o=e.swiper,t=e.extendParams;var s={effect:undefined,direction:"horizontal",initialSlide:0,loop:false,parallax:false,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:false,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:false,freeModeMomentum:true,freeModeMomentumRatio:1,freeModeMomentumBounce:true,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:false,freeModeMinimumVelocity:.02,autoHeight:false,setWrapperSize:false,zoom:{maxRatio:3,minRatio:1,toggle:false},touchRatio:1,touchAngle:45,simulateTouch:true,touchStartPreventDefault:false,shortSwipes:true,longSwipes:true,longSwipesRatio:.5,longSwipesMs:300,followFinger:true,threshold:0,touchMoveStopPropagation:true,touchReleaseOnEdges:false,iOSEdgeSwipeDetection:false,iOSEdgeSwipeThreshold:20,resistance:true,resistanceRatio:.85,watchSlidesProgress:false,watchSlidesVisibility:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,loopAdditionalSlides:0,noSwiping:true,runCallbacksOnInit:true,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:true},flipEffect:{slideShadows:true,limitRotation:true},cubeEffect:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:false},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};if(o.pagination){s.pagination={type:"bullets",clickable:false,hideOnClick:false}}if(o.scrollbar){s.scrollbar={hide:true}}t(s)};export{IonicSlides};
|