@ionic/core 7.4.3-dev.11696260184.1e4ad047 → 7.4.3-dev.11696273737.1ba31223
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/animation.js +1 -60
- package/components/index4.js +0 -11
- package/components/ion-menu.js +19 -63
- package/dist/cjs/{animation-c8bdd3c7.js → animation-2bb33618.js} +1 -60
- package/dist/cjs/{index-c388851f.js → index-b183138a.js} +2 -2
- package/dist/cjs/{index-e50a18ba.js → index-d90b29dd.js} +1 -12
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +24 -67
- package/dist/cjs/ion-modal.cjs.entry.js +2 -2
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/{ios.transition-fd592869.js → ios.transition-4b93903d.js} +2 -2
- package/dist/cjs/{md.transition-a6040d41.js → md.transition-79f3a215.js} +2 -2
- package/dist/collection/components/menu/menu.js +19 -63
- package/dist/collection/components/menu/test/multiple/menu.e2e.js +36 -0
- package/dist/collection/utils/animation/animation.js +1 -60
- package/dist/collection/utils/menu-controller/index.js +0 -11
- package/dist/docs.json +1 -1
- package/dist/esm/{animation-92066c62.js → animation-a1d9e088.js} +1 -60
- package/dist/esm/{index-9b1940b1.js → index-39b3eab6.js} +1 -12
- package/dist/esm/{index-ca26aea8.js → index-87684bba.js} +2 -2
- package/dist/esm/index.js +5 -5
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +22 -65
- package/dist/esm/ion-modal.entry.js +2 -2
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/{ios.transition-d4be3bd5.js → ios.transition-81e1aed6.js} +2 -2
- package/dist/esm/{md.transition-ae47f354.js → md.transition-5becd8b5.js} +2 -2
- package/dist/esm-es5/animation-a1d9e088.js +4 -0
- package/dist/esm-es5/{index-9b1940b1.js → index-39b3eab6.js} +1 -1
- package/dist/esm-es5/{index-ca26aea8.js → index-87684bba.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.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/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/{ios.transition-d4be3bd5.js → ios.transition-81e1aed6.js} +1 -1
- package/dist/esm-es5/{md.transition-ae47f354.js → md.transition-5becd8b5.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-17f69cbc.system.entry.js → p-048d7153.system.entry.js} +1 -1
- package/dist/ionic/{p-eac9308b.system.entry.js → p-08c5b9f4.system.entry.js} +1 -1
- package/dist/ionic/p-13a7b105.entry.js +4 -0
- package/dist/ionic/{p-9f758520.entry.js → p-13a91505.entry.js} +1 -1
- package/dist/ionic/{p-4d2c9270.system.entry.js → p-1a36bf45.system.entry.js} +1 -1
- package/dist/ionic/{p-2a13187a.system.js → p-233cafdf.system.js} +1 -1
- package/dist/ionic/{p-b0c3f506.entry.js → p-27614d55.entry.js} +1 -1
- package/dist/ionic/{p-2624b777.system.entry.js → p-37456282.system.entry.js} +1 -1
- package/dist/ionic/{p-c6221536.system.js → p-43252033.system.js} +1 -1
- package/dist/ionic/{p-0505bc05.system.entry.js → p-4616f20a.system.entry.js} +1 -1
- package/dist/ionic/{p-f70372cf.js → p-5e2dc8e0.js} +1 -1
- package/dist/ionic/{p-9eea70fb.system.entry.js → p-65a4c12f.system.entry.js} +1 -1
- package/dist/ionic/p-6b2641f6.system.js +4 -0
- package/dist/ionic/{p-dcdc16e8.system.entry.js → p-6bc9c436.system.entry.js} +1 -1
- package/dist/ionic/p-6edbc09b.system.js +1 -1
- package/dist/ionic/p-72a1cbc7.js +4 -0
- package/dist/ionic/{p-f2bc4fc0.system.js → p-73f50e29.system.js} +1 -1
- package/dist/ionic/p-78a293a5.js +4 -0
- package/dist/ionic/{p-5c9f38bf.entry.js → p-7e46b6ab.entry.js} +1 -1
- package/dist/ionic/p-7e994a60.js +4 -0
- package/dist/ionic/{p-0fb0904b.system.js → p-8fdd4a2f.system.js} +1 -1
- package/dist/ionic/{p-24ebc805.entry.js → p-90d892fd.entry.js} +1 -1
- package/dist/ionic/{p-51163f34.system.js → p-918d5f19.system.js} +1 -1
- package/dist/ionic/p-94a4ce40.js +4 -0
- package/dist/ionic/{p-06a68207.system.entry.js → p-a6d8476b.system.entry.js} +1 -1
- package/dist/ionic/{p-003dbb0e.entry.js → p-a720dc73.entry.js} +1 -1
- package/dist/ionic/{p-d4f02009.entry.js → p-bf9b1560.entry.js} +1 -1
- package/dist/ionic/{p-26a785e9.system.entry.js → p-c5729044.system.entry.js} +1 -1
- package/dist/ionic/{p-d6e93d49.entry.js → p-c7fca267.entry.js} +1 -1
- package/dist/ionic/{p-40ffdeb5.system.entry.js → p-de676d36.system.entry.js} +1 -1
- package/dist/ionic/{p-a42bbc51.entry.js → p-ee6d9730.entry.js} +1 -1
- package/dist/ionic/{p-b1a04d35.entry.js → p-f547e62f.entry.js} +1 -1
- package/dist/ionic/p-f7d61a1c.system.entry.js +4 -0
- package/dist/ionic/{p-4df178d7.entry.js → p-f920f5ca.entry.js} +1 -1
- package/dist/types/components/menu/menu-interface.d.ts +0 -1
- package/dist/types/components/menu/menu.d.ts +1 -8
- package/dist/types/utils/menu-controller/index.d.ts +0 -1
- package/hydrate/index.js +20 -133
- package/package.json +1 -1
- package/dist/esm-es5/animation-92066c62.js +0 -4
- package/dist/ionic/p-015187e5.system.js +0 -4
- package/dist/ionic/p-0a39673e.js +0 -4
- package/dist/ionic/p-12b13ed4.entry.js +0 -4
- package/dist/ionic/p-1a6c0442.js +0 -4
- package/dist/ionic/p-37a0b769.js +0 -4
- package/dist/ionic/p-446230d7.js +0 -4
- package/dist/ionic/p-bff7659e.system.entry.js +0 -4
|
@@ -11,7 +11,7 @@ const index$1 = require('./index-10873539.js');
|
|
|
11
11
|
const helpers = require('./helpers-ea4ccbcb.js');
|
|
12
12
|
const haptic = require('./haptic-c5f6b4d5.js');
|
|
13
13
|
const ionicGlobal = require('./ionic-global-14a0604b.js');
|
|
14
|
-
const animation = require('./animation-
|
|
14
|
+
const animation = require('./animation-2bb33618.js');
|
|
15
15
|
const config = require('./config-d5882735.js');
|
|
16
16
|
const index$2 = require('./index-d8d1fc0b.js');
|
|
17
17
|
const spinnerConfigs = require('./spinner-configs-f7b5105b.js');
|
|
@@ -13,7 +13,7 @@ const index$1 = require('./index-cc7dfb7c.js');
|
|
|
13
13
|
const overlays = require('./overlays-d3a13e61.js');
|
|
14
14
|
const theme = require('./theme-fbc56b3b.js');
|
|
15
15
|
const ionicGlobal = require('./ionic-global-14a0604b.js');
|
|
16
|
-
const animation = require('./animation-
|
|
16
|
+
const animation = require('./animation-2bb33618.js');
|
|
17
17
|
require('./index-306a7476.js');
|
|
18
18
|
require('./framework-delegate-c0873a6f.js');
|
|
19
19
|
require('./hardware-back-button-b67c8e75.js');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
const animation = require('./animation-
|
|
7
|
-
const index = require('./index-
|
|
6
|
+
const animation = require('./animation-2bb33618.js');
|
|
7
|
+
const index = require('./index-b183138a.js');
|
|
8
8
|
require('./index-306a7476.js');
|
|
9
9
|
require('./helpers-ea4ccbcb.js');
|
|
10
10
|
require('./index-6f887430.js');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
const animation = require('./animation-
|
|
7
|
-
const index = require('./index-
|
|
6
|
+
const animation = require('./animation-2bb33618.js');
|
|
7
|
+
const index = require('./index-b183138a.js');
|
|
8
8
|
require('./index-306a7476.js');
|
|
9
9
|
require('./helpers-ea4ccbcb.js');
|
|
10
10
|
require('./index-6f887430.js');
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Build, Host, h } from "@stencil/core";
|
|
5
5
|
import { getTimeGivenProgression } from "../../utils/animation/cubic-bezier";
|
|
6
|
-
import { doc } from "../../utils/browser/index";
|
|
7
6
|
import { GESTURE_CONTROLLER } from "../../utils/gesture/index";
|
|
8
7
|
import { inheritAriaAttributes, assert, clamp, isEndSide as isEnd } from "../../utils/helpers";
|
|
9
8
|
import { menuController } from "../../utils/menu-controller/index";
|
|
@@ -24,14 +23,6 @@ export class Menu {
|
|
|
24
23
|
this.lastOnEnd = 0;
|
|
25
24
|
this.blocker = GESTURE_CONTROLLER.createBlocker({ disableScroll: true });
|
|
26
25
|
this.didLoad = false;
|
|
27
|
-
/**
|
|
28
|
-
* Flag used to determine if an open/close
|
|
29
|
-
* operation was cancelled. For example, if
|
|
30
|
-
* an app calls "menu.open" then disables the menu
|
|
31
|
-
* part way through the animation, then this would
|
|
32
|
-
* be considered a cancelled operation.
|
|
33
|
-
*/
|
|
34
|
-
this.operationCancelled = false;
|
|
35
26
|
this.isAnimating = false;
|
|
36
27
|
this._isOpen = false;
|
|
37
28
|
this.inheritedAttributes = {};
|
|
@@ -300,15 +291,6 @@ export class Menu {
|
|
|
300
291
|
this.beforeAnimation(shouldOpen);
|
|
301
292
|
await this.loadAnimation();
|
|
302
293
|
await this.startAnimation(shouldOpen, animated);
|
|
303
|
-
/**
|
|
304
|
-
* If the animation was cancelled then
|
|
305
|
-
* return false because the operation
|
|
306
|
-
* did not succeed.
|
|
307
|
-
*/
|
|
308
|
-
if (this.operationCancelled) {
|
|
309
|
-
this.operationCancelled = false;
|
|
310
|
-
return false;
|
|
311
|
-
}
|
|
312
294
|
this.afterAnimation(shouldOpen);
|
|
313
295
|
return true;
|
|
314
296
|
}
|
|
@@ -345,23 +327,18 @@ export class Menu {
|
|
|
345
327
|
const easingReverse = mode === 'ios' ? iosEasingReverse : mdEasingReverse;
|
|
346
328
|
const ani = this.animation
|
|
347
329
|
.direction(isReversed ? 'reverse' : 'normal')
|
|
348
|
-
.easing(isReversed ? easingReverse : easing)
|
|
330
|
+
.easing(isReversed ? easingReverse : easing)
|
|
331
|
+
.onFinish(() => {
|
|
332
|
+
if (ani.getDirection() === 'reverse') {
|
|
333
|
+
ani.direction('normal');
|
|
334
|
+
}
|
|
335
|
+
});
|
|
349
336
|
if (animated) {
|
|
350
337
|
await ani.play();
|
|
351
338
|
}
|
|
352
339
|
else {
|
|
353
340
|
ani.play({ sync: true });
|
|
354
341
|
}
|
|
355
|
-
/**
|
|
356
|
-
* We run this after the play invocation
|
|
357
|
-
* instead of using ani.onFinish so that
|
|
358
|
-
* multiple onFinish callbacks do not get
|
|
359
|
-
* run if an animation is played, stopped,
|
|
360
|
-
* and then played again.
|
|
361
|
-
*/
|
|
362
|
-
if (ani.getDirection() === 'reverse') {
|
|
363
|
-
ani.direction('normal');
|
|
364
|
-
}
|
|
365
342
|
}
|
|
366
343
|
_isActive() {
|
|
367
344
|
return !this.disabled && !this.isPaneVisible;
|
|
@@ -498,6 +475,7 @@ export class Menu {
|
|
|
498
475
|
}
|
|
499
476
|
afterAnimation(isOpen) {
|
|
500
477
|
var _a;
|
|
478
|
+
assert(this.isAnimating, '_before() should be called while animating');
|
|
501
479
|
// keep opening/closing the menu disabled for a touch more yet
|
|
502
480
|
// only add listeners/css if it's enabled and isOpen
|
|
503
481
|
// and only remove listeners/css if it's not open
|
|
@@ -556,41 +534,19 @@ export class Menu {
|
|
|
556
534
|
if (this.gesture) {
|
|
557
535
|
this.gesture.enable(isActive && this.swipeGesture);
|
|
558
536
|
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
* of animating {open, close} and the menu is disabled
|
|
564
|
-
* then it should still be closed immediately.
|
|
565
|
-
*/
|
|
566
|
-
if (!isActive) {
|
|
567
|
-
/**
|
|
568
|
-
* It is possible to disable the menu while
|
|
569
|
-
* it is mid-animation. When this happens, we
|
|
570
|
-
* need to set the operationCancelled flag
|
|
571
|
-
* so that this._setOpen knows to return false
|
|
572
|
-
* and not run the "afterAnimation" callback.
|
|
573
|
-
*/
|
|
574
|
-
if (this.isAnimating) {
|
|
575
|
-
this.operationCancelled = true;
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* If the menu is disabled then we should
|
|
579
|
-
* forcibly close the menu even if it is open.
|
|
580
|
-
*/
|
|
581
|
-
this.afterAnimation(false);
|
|
582
|
-
}
|
|
583
|
-
if (doc === null || doc === void 0 ? void 0 : doc.contains(this.el)) {
|
|
584
|
-
/**
|
|
585
|
-
* Only set the active menu if the menu element is
|
|
586
|
-
* present in the DOM. Otherwise if it was destructively
|
|
587
|
-
* re-hydrated (through Angular Universal), then ignore
|
|
588
|
-
* setting the removed node as the active menu.
|
|
589
|
-
*/
|
|
590
|
-
if (!this.disabled) {
|
|
591
|
-
menuController._setActiveMenu(this);
|
|
592
|
-
}
|
|
537
|
+
// Close menu immediately
|
|
538
|
+
if (!isActive && this._isOpen) {
|
|
539
|
+
// close if this menu is open, and should not be enabled
|
|
540
|
+
this.forceClosing();
|
|
593
541
|
}
|
|
542
|
+
assert(!this.isAnimating, 'can not be animating');
|
|
543
|
+
}
|
|
544
|
+
forceClosing() {
|
|
545
|
+
assert(this._isOpen, 'menu cannot be closed');
|
|
546
|
+
this.isAnimating = true;
|
|
547
|
+
const ani = this.animation.direction('reverse');
|
|
548
|
+
ani.play({ sync: true });
|
|
549
|
+
this.afterAnimation(false);
|
|
594
550
|
}
|
|
595
551
|
render() {
|
|
596
552
|
const { type, disabled, isPaneVisible, inheritedAttributes, side } = this;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { expect } from "@playwright/test";
|
|
5
|
+
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
|
+
/**
|
|
7
|
+
* This behavior does not vary across modes/directions
|
|
8
|
+
*/
|
|
9
|
+
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
10
|
+
test.describe(title('menu: disable'), () => {
|
|
11
|
+
test.beforeEach(async ({ page }) => {
|
|
12
|
+
await page.goto(`/src/components/menu/test/multiple`, config);
|
|
13
|
+
});
|
|
14
|
+
test('should present each menu on the same side individually', async ({ page }) => {
|
|
15
|
+
const primaryMenu = page.locator('ion-menu#primary-menu');
|
|
16
|
+
const secondaryMenu = page.locator('ion-menu#secondary-menu');
|
|
17
|
+
await primaryMenu.evaluate((el) => el.open());
|
|
18
|
+
await expect(primaryMenu).toBeVisible();
|
|
19
|
+
await primaryMenu.evaluate((el) => el.close());
|
|
20
|
+
await expect(primaryMenu).toBeHidden();
|
|
21
|
+
await secondaryMenu.evaluate((el) => el.open());
|
|
22
|
+
await expect(secondaryMenu).toBeVisible();
|
|
23
|
+
await secondaryMenu.evaluate((el) => el.close());
|
|
24
|
+
await expect(secondaryMenu).toBeHidden();
|
|
25
|
+
});
|
|
26
|
+
test('should close first menu when showing another menu on same side', async ({ page }) => {
|
|
27
|
+
const primaryMenu = page.locator('ion-menu#primary-menu');
|
|
28
|
+
const secondaryMenu = page.locator('ion-menu#secondary-menu');
|
|
29
|
+
await primaryMenu.evaluate((el) => el.open());
|
|
30
|
+
await expect(primaryMenu).toBeVisible();
|
|
31
|
+
await secondaryMenu.evaluate((el) => el.open());
|
|
32
|
+
await expect(primaryMenu).toBeHidden();
|
|
33
|
+
await expect(secondaryMenu).toBeVisible();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -36,7 +36,6 @@ export const createAnimation = (animationId) => {
|
|
|
36
36
|
const id = animationId;
|
|
37
37
|
const onFinishCallbacks = [];
|
|
38
38
|
const onFinishOneTimeCallbacks = [];
|
|
39
|
-
const onStopOneTimeCallbacks = [];
|
|
40
39
|
const elements = [];
|
|
41
40
|
const childAnimations = [];
|
|
42
41
|
const stylesheets = [];
|
|
@@ -94,28 +93,6 @@ export const createAnimation = (animationId) => {
|
|
|
94
93
|
const isRunning = () => {
|
|
95
94
|
return numAnimationsRunning !== 0 && !paused;
|
|
96
95
|
};
|
|
97
|
-
/**
|
|
98
|
-
* @internal
|
|
99
|
-
* Remove a callback from a chosen callback array
|
|
100
|
-
* @param callbackToRemove: A reference to the callback that should be removed
|
|
101
|
-
* @param callbackObjects: An array of callbacks that callbackToRemove should be removed from.
|
|
102
|
-
*/
|
|
103
|
-
const clearCallback = (callbackToRemove, callbackObjects) => {
|
|
104
|
-
const index = callbackObjects.findIndex((callbackObject) => callbackObject.c === callbackToRemove);
|
|
105
|
-
if (index > -1) {
|
|
106
|
-
callbackObjects.splice(index, 1);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* @internal
|
|
111
|
-
* Add a callback to be fired when an animation is stopped/cancelled.
|
|
112
|
-
* @param callback: A reference to the callback that should be fired
|
|
113
|
-
* @param opts: Any options associated with this particular callback
|
|
114
|
-
*/
|
|
115
|
-
const onStop = (callback, opts) => {
|
|
116
|
-
onStopOneTimeCallbacks.push({ c: callback, o: opts });
|
|
117
|
-
return ani;
|
|
118
|
-
};
|
|
119
96
|
const onFinish = (callback, opts) => {
|
|
120
97
|
const callbacks = (opts === null || opts === void 0 ? void 0 : opts.oneTimeCallback) ? onFinishOneTimeCallbacks : onFinishCallbacks;
|
|
121
98
|
callbacks.push({ c: callback, o: opts });
|
|
@@ -784,33 +761,7 @@ export const createAnimation = (animationId) => {
|
|
|
784
761
|
numAnimationsRunning = childAnimations.length + 1;
|
|
785
762
|
shouldCalculateNumAnimations = false;
|
|
786
763
|
}
|
|
787
|
-
|
|
788
|
-
* When one of these callbacks fires we
|
|
789
|
-
* need to clear the other's callback otherwise
|
|
790
|
-
* you can potentially get these callbacks
|
|
791
|
-
* firing multiple times if the play method
|
|
792
|
-
* is subsequently called.
|
|
793
|
-
* Example:
|
|
794
|
-
* animation.play() (onStop and onFinish callbacks are registered)
|
|
795
|
-
* animation.stop() (onStop callback is fired, onFinish is not)
|
|
796
|
-
* animation.play() (onStop and onFinish callbacks are registered)
|
|
797
|
-
* Total onStop callbacks: 1
|
|
798
|
-
* Total onFinish callbacks: 2
|
|
799
|
-
*/
|
|
800
|
-
const onStopCallback = () => {
|
|
801
|
-
clearCallback(onFinishCallback, onFinishOneTimeCallbacks);
|
|
802
|
-
resolve();
|
|
803
|
-
};
|
|
804
|
-
const onFinishCallback = () => {
|
|
805
|
-
clearCallback(onStopCallback, onStopOneTimeCallbacks);
|
|
806
|
-
resolve();
|
|
807
|
-
};
|
|
808
|
-
/**
|
|
809
|
-
* The play method resolves when an animation
|
|
810
|
-
* run either finishes or is cancelled.
|
|
811
|
-
*/
|
|
812
|
-
onFinish(onFinishCallback, { oneTimeCallback: true });
|
|
813
|
-
onStop(onStopCallback, { oneTimeCallback: true });
|
|
764
|
+
onFinish(() => resolve(), { oneTimeCallback: true });
|
|
814
765
|
childAnimations.forEach((animation) => {
|
|
815
766
|
animation.play();
|
|
816
767
|
});
|
|
@@ -823,14 +774,6 @@ export const createAnimation = (animationId) => {
|
|
|
823
774
|
paused = false;
|
|
824
775
|
});
|
|
825
776
|
};
|
|
826
|
-
/**
|
|
827
|
-
* Stops an animation and resets it state to the
|
|
828
|
-
* beginning. This does not fire any onFinish
|
|
829
|
-
* callbacks because the animation did not finish.
|
|
830
|
-
* However, since the animation was not destroyed
|
|
831
|
-
* (i.e. the animation could run again) we do not
|
|
832
|
-
* clear the onFinish callbacks.
|
|
833
|
-
*/
|
|
834
777
|
const stop = () => {
|
|
835
778
|
childAnimations.forEach((animation) => {
|
|
836
779
|
animation.stop();
|
|
@@ -840,8 +783,6 @@ export const createAnimation = (animationId) => {
|
|
|
840
783
|
initialized = false;
|
|
841
784
|
}
|
|
842
785
|
resetFlags();
|
|
843
|
-
onStopOneTimeCallbacks.forEach((onStopCallback) => onStopCallback.c(0, ani));
|
|
844
|
-
onStopOneTimeCallbacks.length = 0;
|
|
845
786
|
};
|
|
846
787
|
const from = (property, value) => {
|
|
847
788
|
const firstFrame = _keyframes[0];
|
|
@@ -115,9 +115,6 @@ const createMenuController = () => {
|
|
|
115
115
|
};
|
|
116
116
|
const _register = (menu) => {
|
|
117
117
|
if (menus.indexOf(menu) < 0) {
|
|
118
|
-
if (!menu.disabled) {
|
|
119
|
-
_setActiveMenu(menu);
|
|
120
|
-
}
|
|
121
118
|
menus.push(menu);
|
|
122
119
|
}
|
|
123
120
|
};
|
|
@@ -127,13 +124,6 @@ const createMenuController = () => {
|
|
|
127
124
|
menus.splice(index, 1);
|
|
128
125
|
}
|
|
129
126
|
};
|
|
130
|
-
const _setActiveMenu = (menu) => {
|
|
131
|
-
// if this menu should be enabled
|
|
132
|
-
// then find all the other menus on this same side
|
|
133
|
-
// and automatically disable other same side menus
|
|
134
|
-
const side = menu.side;
|
|
135
|
-
menus.filter((m) => m.side === side && m !== menu).forEach((m) => (m.disabled = true));
|
|
136
|
-
};
|
|
137
127
|
const _setOpen = async (menu, shouldOpen, animated) => {
|
|
138
128
|
if (isAnimatingSync()) {
|
|
139
129
|
return false;
|
|
@@ -205,7 +195,6 @@ const createMenuController = () => {
|
|
|
205
195
|
_register,
|
|
206
196
|
_unregister,
|
|
207
197
|
_setOpen,
|
|
208
|
-
_setActiveMenu,
|
|
209
198
|
};
|
|
210
199
|
};
|
|
211
200
|
export const menuController = /*@__PURE__*/ createMenuController();
|
package/dist/docs.json
CHANGED
|
@@ -159,7 +159,6 @@ const createAnimation = (animationId) => {
|
|
|
159
159
|
const id = animationId;
|
|
160
160
|
const onFinishCallbacks = [];
|
|
161
161
|
const onFinishOneTimeCallbacks = [];
|
|
162
|
-
const onStopOneTimeCallbacks = [];
|
|
163
162
|
const elements = [];
|
|
164
163
|
const childAnimations = [];
|
|
165
164
|
const stylesheets = [];
|
|
@@ -217,28 +216,6 @@ const createAnimation = (animationId) => {
|
|
|
217
216
|
const isRunning = () => {
|
|
218
217
|
return numAnimationsRunning !== 0 && !paused;
|
|
219
218
|
};
|
|
220
|
-
/**
|
|
221
|
-
* @internal
|
|
222
|
-
* Remove a callback from a chosen callback array
|
|
223
|
-
* @param callbackToRemove: A reference to the callback that should be removed
|
|
224
|
-
* @param callbackObjects: An array of callbacks that callbackToRemove should be removed from.
|
|
225
|
-
*/
|
|
226
|
-
const clearCallback = (callbackToRemove, callbackObjects) => {
|
|
227
|
-
const index = callbackObjects.findIndex((callbackObject) => callbackObject.c === callbackToRemove);
|
|
228
|
-
if (index > -1) {
|
|
229
|
-
callbackObjects.splice(index, 1);
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
/**
|
|
233
|
-
* @internal
|
|
234
|
-
* Add a callback to be fired when an animation is stopped/cancelled.
|
|
235
|
-
* @param callback: A reference to the callback that should be fired
|
|
236
|
-
* @param opts: Any options associated with this particular callback
|
|
237
|
-
*/
|
|
238
|
-
const onStop = (callback, opts) => {
|
|
239
|
-
onStopOneTimeCallbacks.push({ c: callback, o: opts });
|
|
240
|
-
return ani;
|
|
241
|
-
};
|
|
242
219
|
const onFinish = (callback, opts) => {
|
|
243
220
|
const callbacks = (opts === null || opts === void 0 ? void 0 : opts.oneTimeCallback) ? onFinishOneTimeCallbacks : onFinishCallbacks;
|
|
244
221
|
callbacks.push({ c: callback, o: opts });
|
|
@@ -907,33 +884,7 @@ const createAnimation = (animationId) => {
|
|
|
907
884
|
numAnimationsRunning = childAnimations.length + 1;
|
|
908
885
|
shouldCalculateNumAnimations = false;
|
|
909
886
|
}
|
|
910
|
-
|
|
911
|
-
* When one of these callbacks fires we
|
|
912
|
-
* need to clear the other's callback otherwise
|
|
913
|
-
* you can potentially get these callbacks
|
|
914
|
-
* firing multiple times if the play method
|
|
915
|
-
* is subsequently called.
|
|
916
|
-
* Example:
|
|
917
|
-
* animation.play() (onStop and onFinish callbacks are registered)
|
|
918
|
-
* animation.stop() (onStop callback is fired, onFinish is not)
|
|
919
|
-
* animation.play() (onStop and onFinish callbacks are registered)
|
|
920
|
-
* Total onStop callbacks: 1
|
|
921
|
-
* Total onFinish callbacks: 2
|
|
922
|
-
*/
|
|
923
|
-
const onStopCallback = () => {
|
|
924
|
-
clearCallback(onFinishCallback, onFinishOneTimeCallbacks);
|
|
925
|
-
resolve();
|
|
926
|
-
};
|
|
927
|
-
const onFinishCallback = () => {
|
|
928
|
-
clearCallback(onStopCallback, onStopOneTimeCallbacks);
|
|
929
|
-
resolve();
|
|
930
|
-
};
|
|
931
|
-
/**
|
|
932
|
-
* The play method resolves when an animation
|
|
933
|
-
* run either finishes or is cancelled.
|
|
934
|
-
*/
|
|
935
|
-
onFinish(onFinishCallback, { oneTimeCallback: true });
|
|
936
|
-
onStop(onStopCallback, { oneTimeCallback: true });
|
|
887
|
+
onFinish(() => resolve(), { oneTimeCallback: true });
|
|
937
888
|
childAnimations.forEach((animation) => {
|
|
938
889
|
animation.play();
|
|
939
890
|
});
|
|
@@ -946,14 +897,6 @@ const createAnimation = (animationId) => {
|
|
|
946
897
|
paused = false;
|
|
947
898
|
});
|
|
948
899
|
};
|
|
949
|
-
/**
|
|
950
|
-
* Stops an animation and resets it state to the
|
|
951
|
-
* beginning. This does not fire any onFinish
|
|
952
|
-
* callbacks because the animation did not finish.
|
|
953
|
-
* However, since the animation was not destroyed
|
|
954
|
-
* (i.e. the animation could run again) we do not
|
|
955
|
-
* clear the onFinish callbacks.
|
|
956
|
-
*/
|
|
957
900
|
const stop = () => {
|
|
958
901
|
childAnimations.forEach((animation) => {
|
|
959
902
|
animation.stop();
|
|
@@ -963,8 +906,6 @@ const createAnimation = (animationId) => {
|
|
|
963
906
|
initialized = false;
|
|
964
907
|
}
|
|
965
908
|
resetFlags();
|
|
966
|
-
onStopOneTimeCallbacks.forEach((onStopCallback) => onStopCallback.c(0, ani));
|
|
967
|
-
onStopOneTimeCallbacks.length = 0;
|
|
968
909
|
};
|
|
969
910
|
const from = (property, value) => {
|
|
970
911
|
const firstFrame = _keyframes[0];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { MENU_BACK_BUTTON_PRIORITY } from './hardware-back-button-39299f84.js';
|
|
5
5
|
import { c as componentOnReady } from './helpers-3379ba19.js';
|
|
6
6
|
import { b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
7
|
-
import { c as createAnimation } from './animation-
|
|
7
|
+
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* baseAnimation
|
|
@@ -203,9 +203,6 @@ const createMenuController = () => {
|
|
|
203
203
|
};
|
|
204
204
|
const _register = (menu) => {
|
|
205
205
|
if (menus.indexOf(menu) < 0) {
|
|
206
|
-
if (!menu.disabled) {
|
|
207
|
-
_setActiveMenu(menu);
|
|
208
|
-
}
|
|
209
206
|
menus.push(menu);
|
|
210
207
|
}
|
|
211
208
|
};
|
|
@@ -215,13 +212,6 @@ const createMenuController = () => {
|
|
|
215
212
|
menus.splice(index, 1);
|
|
216
213
|
}
|
|
217
214
|
};
|
|
218
|
-
const _setActiveMenu = (menu) => {
|
|
219
|
-
// if this menu should be enabled
|
|
220
|
-
// then find all the other menus on this same side
|
|
221
|
-
// and automatically disable other same side menus
|
|
222
|
-
const side = menu.side;
|
|
223
|
-
menus.filter((m) => m.side === side && m !== menu).forEach((m) => (m.disabled = true));
|
|
224
|
-
};
|
|
225
215
|
const _setOpen = async (menu, shouldOpen, animated) => {
|
|
226
216
|
if (isAnimatingSync()) {
|
|
227
217
|
return false;
|
|
@@ -293,7 +283,6 @@ const createMenuController = () => {
|
|
|
293
283
|
_register,
|
|
294
284
|
_unregister,
|
|
295
285
|
_setOpen,
|
|
296
|
-
_setActiveMenu,
|
|
297
286
|
};
|
|
298
287
|
};
|
|
299
288
|
const menuController = /*@__PURE__*/ createMenuController();
|
|
@@ -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-81e1aed6.js');
|
|
14
|
+
const mdTransitionAnimation = () => import('./md.transition-5becd8b5.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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
export { c as createAnimation } from './animation-
|
|
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-
|
|
4
|
+
export { c as createAnimation } from './animation-a1d9e088.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-87684bba.js';
|
|
6
|
+
export { iosTransitionAnimation } from './ios.transition-81e1aed6.js';
|
|
7
|
+
export { mdTransitionAnimation } from './md.transition-5becd8b5.js';
|
|
8
8
|
export { g as getTimeGivenProgression } from './cubic-bezier-66542bc5.js';
|
|
9
9
|
export { createGesture } from './index-ff313b19.js';
|
|
10
10
|
export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global-b3fc28dd.js';
|
|
11
11
|
export { c as componentOnReady } from './helpers-3379ba19.js';
|
|
12
12
|
export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-96c9ace3.js';
|
|
13
|
-
export { m as menuController } from './index-
|
|
13
|
+
export { m as menuController } from './index-39b3eab6.js';
|
|
14
14
|
export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-8fc6656c.js';
|
|
15
15
|
import './index-7a14ecec.js';
|
|
16
16
|
import './index-2d388930.js';
|
|
@@ -8,7 +8,7 @@ import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
|
8
8
|
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-8fc6656c.js';
|
|
9
9
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
10
10
|
import { b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
11
|
-
import { c as createAnimation } from './animation-
|
|
11
|
+
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
12
12
|
import './haptic-6447af60.js';
|
|
13
13
|
import './capacitor-b4979570.js';
|
|
14
14
|
import './index-7a14ecec.js';
|
|
@@ -9,7 +9,7 @@ import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
|
9
9
|
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-8fc6656c.js';
|
|
10
10
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
11
11
|
import { c as config, b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
12
|
-
import { c as createAnimation } from './animation-
|
|
12
|
+
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
13
13
|
import './haptic-6447af60.js';
|
|
14
14
|
import './capacitor-b4979570.js';
|
|
15
15
|
import './index-7a14ecec.js';
|
|
@@ -10,7 +10,7 @@ import { a as findIonContent, p as printIonContentErrorMsg, g as getScrollElemen
|
|
|
10
10
|
import { c as createKeyboardController } from './keyboard-controller-0c2dce71.js';
|
|
11
11
|
import { g as getTimeGivenProgression } from './cubic-bezier-66542bc5.js';
|
|
12
12
|
import { a as attachComponent, d as detachComponent } from './framework-delegate-aa433dea.js';
|
|
13
|
-
import { t as transition } from './index-
|
|
13
|
+
import { t as transition } from './index-87684bba.js';
|
|
14
14
|
import './index-595d62c9.js';
|
|
15
15
|
import './index-7a14ecec.js';
|
|
16
16
|
import './keyboard-b063f012.js';
|
|
@@ -12,7 +12,7 @@ import { b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
|
12
12
|
import { g as generateDayAriaLabel, a as getDay, i as isBefore, b as isAfter, c as isSameDay, d as getPreviousMonth, e as getNextMonth, v as validateParts, f as getPartsFromCalendarDay, h as getEndOfWeek, j as getStartOfWeek, k as getPreviousDay, l as getNextDay, m as getPreviousWeek, n as getNextWeek, p as parseMinParts, o as parseMaxParts, q as parseDate, w as warnIfValueOutOfBounds, r as convertToArrayOfNumbers, s as convertDataToISO, t as getToday, u as getClosestValidDate, x as getNumDaysInMonth, y as getCombinedDateColumnData, z as getMonthColumnData, A as getDayColumnData, B as getYearColumnData, C as isMonthFirstLocale, D as getTimeColumnsData, E as isLocaleDayPeriodRTL, F as getDaysOfWeek, G as getMonthAndYear, H as getDaysOfMonth, I as generateMonths, J as is24Hour, K as getLocalizedTime, L as getMonthAndDay, M as formatValue, N as getNextYear, O as getPreviousYear, P as clampDate, Q as parseAmPm, R as calculateHourFromAMPM } from './data-009dbf15.js';
|
|
13
13
|
import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
14
14
|
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-8fc6656c.js';
|
|
15
|
-
import { c as createAnimation } from './animation-
|
|
15
|
+
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
16
16
|
import { b as hapticSelectionChanged, h as hapticSelectionEnd, a as hapticSelectionStart } from './haptic-6447af60.js';
|
|
17
17
|
import './index-7a14ecec.js';
|
|
18
18
|
import './framework-delegate-aa433dea.js';
|
|
@@ -8,7 +8,7 @@ import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
|
8
8
|
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-8fc6656c.js';
|
|
9
9
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
10
10
|
import { c as config, b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
11
|
-
import { c as createAnimation } from './animation-
|
|
11
|
+
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
12
12
|
import './index-7a14ecec.js';
|
|
13
13
|
import './framework-delegate-aa433dea.js';
|
|
14
14
|
import './hardware-back-button-39299f84.js';
|