@ionic/core 7.3.2-dev.11693262117.17edbf6d → 7.3.2-dev.11693321491.12123d27
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/action-sheet.js +17 -8
- package/components/alert.js +17 -8
- package/components/framework-delegate.js +5 -2
- package/components/ion-loading.js +17 -8
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +34 -13
- package/components/ion-picker.js +17 -8
- package/components/ion-toast.js +17 -8
- package/components/overlays.js +1 -22
- package/components/popover.js +30 -9
- package/dist/cjs/{framework-delegate-e8174951.js → framework-delegate-91be3b84.js} +5 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +18 -9
- package/dist/cjs/ion-alert.cjs.entry.js +18 -9
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +18 -9
- package/dist/cjs/ion-loading.cjs.entry.js +18 -9
- package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +35 -14
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +31 -10
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +18 -9
- package/dist/cjs/{overlays-2b9fa92e.js → overlays-cf7fa4cf.js} +1 -23
- package/dist/collection/components/action-sheet/action-sheet.js +17 -8
- package/dist/collection/components/alert/alert.js +17 -8
- package/dist/collection/components/loading/loading.js +17 -8
- package/dist/collection/components/modal/modal.js +34 -13
- package/dist/collection/components/picker/picker.js +17 -8
- package/dist/collection/components/popover/popover.js +30 -9
- package/dist/collection/components/popover/test/async/popover.e2e.js +20 -0
- package/dist/collection/components/toast/toast.js +17 -8
- package/dist/collection/utils/framework-delegate.js +5 -2
- package/dist/collection/utils/overlays.js +0 -21
- package/dist/docs.json +1 -1
- package/dist/esm/{framework-delegate-2b76c681.js → framework-delegate-43758c88.js} +5 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +18 -9
- package/dist/esm/ion-alert.entry.js +18 -9
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +18 -9
- package/dist/esm/ion-loading.entry.js +18 -9
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +35 -14
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +31 -10
- package/dist/esm/ion-select_3.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +18 -9
- package/dist/esm/{overlays-66222f79.js → overlays-236d01c6.js} +2 -23
- package/dist/esm-es5/framework-delegate-43758c88.js +4 -0
- 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-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/{overlays-66222f79.js → overlays-236d01c6.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-0494a5b7.system.entry.js → p-04515b10.system.entry.js} +1 -1
- package/dist/ionic/p-13df6e84.system.entry.js +4 -0
- package/dist/ionic/p-2bdc6097.entry.js +4 -0
- package/dist/ionic/p-2c88183e.system.entry.js +4 -0
- package/dist/ionic/p-2d37d114.system.entry.js +4 -0
- package/dist/ionic/p-2f6666a9.entry.js +4 -0
- package/dist/ionic/{p-8d9475b5.system.js → p-33dc95e4.system.js} +1 -1
- package/dist/ionic/{p-20087c90.entry.js → p-4852bb39.entry.js} +1 -1
- package/dist/ionic/p-4adb3257.entry.js +4 -0
- package/dist/ionic/{p-b2098e96.system.entry.js → p-50e474b3.system.entry.js} +1 -1
- package/dist/ionic/{p-229df0d8.entry.js → p-5c0754cd.entry.js} +1 -1
- package/dist/ionic/{p-a0ffdd91.system.js → p-5f5d78da.system.js} +1 -1
- package/dist/ionic/p-647c433f.entry.js +4 -0
- package/dist/ionic/p-721933ff.system.js +1 -1
- package/dist/ionic/p-870fee8d.system.entry.js +4 -0
- package/dist/ionic/p-8d1ef5d0.entry.js +4 -0
- package/dist/ionic/p-ad5a562b.system.entry.js +4 -0
- package/dist/ionic/{p-f8e4da48.system.js → p-c275a599.system.js} +1 -1
- package/dist/ionic/p-d3602489.entry.js +4 -0
- package/dist/ionic/p-e015fbd9.system.entry.js +4 -0
- package/dist/ionic/p-e30f020d.entry.js +4 -0
- package/dist/ionic/{p-7776d062.entry.js → p-e484ae56.entry.js} +1 -1
- package/dist/ionic/{p-5c96dc4e.entry.js → p-ed290b4a.entry.js} +1 -1
- package/dist/ionic/{p-8074bdd7.system.entry.js → p-f1bf45b2.system.entry.js} +1 -1
- package/dist/ionic/p-f2743457.js +4 -0
- package/dist/ionic/{p-6b9bf14c.system.entry.js → p-f2c1459b.system.entry.js} +1 -1
- package/dist/ionic/p-f4bbbc33.js +4 -0
- package/dist/ionic/p-f94cad00.system.entry.js +4 -0
- package/dist/ionic/{p-9888a5a7.entry.js → p-fb16e75c.entry.js} +1 -1
- package/dist/ionic/{p-d1356034.system.entry.js → p-ff0f2ef4.system.entry.js} +1 -1
- package/dist/types/components/action-sheet/action-sheet.d.ts +1 -1
- package/dist/types/components/alert/alert.d.ts +1 -1
- package/dist/types/components/loading/loading.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +1 -1
- package/dist/types/components/picker/picker.d.ts +1 -1
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/toast/toast.d.ts +1 -1
- package/dist/types/utils/overlays.d.ts +0 -9
- package/hydrate/index.js +147 -78
- package/package.json +1 -1
- package/dist/esm-es5/framework-delegate-2b76c681.js +0 -4
- package/dist/ionic/p-16fd72f2.entry.js +0 -4
- package/dist/ionic/p-1c9e3bc7.entry.js +0 -4
- package/dist/ionic/p-2a51c81c.entry.js +0 -4
- package/dist/ionic/p-2a649b3e.system.entry.js +0 -4
- package/dist/ionic/p-3ef9e271.system.entry.js +0 -4
- package/dist/ionic/p-6d484719.system.entry.js +0 -4
- package/dist/ionic/p-70d137a0.js +0 -4
- package/dist/ionic/p-7ac9bdfa.system.entry.js +0 -4
- package/dist/ionic/p-8d53d5a5.entry.js +0 -4
- package/dist/ionic/p-a133c215.system.entry.js +0 -4
- package/dist/ionic/p-b34c1ae1.js +0 -4
- package/dist/ionic/p-c0b4ca5c.system.entry.js +0 -4
- package/dist/ionic/p-cf768a4f.entry.js +0 -4
- package/dist/ionic/p-ddffbfa9.entry.js +0 -4
- package/dist/ionic/p-e2e2c2b0.entry.js +0 -4
- package/dist/ionic/p-ebb442c4.system.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -8004,6 +8004,7 @@ const CoreDelegate = () => {
|
|
|
8004
8004
|
const attachViewToDom = async (parentElement, userComponent, userComponentProps = {}, cssClasses = []) => {
|
|
8005
8005
|
var _a, _b;
|
|
8006
8006
|
BaseComponent = parentElement;
|
|
8007
|
+
let ChildComponent;
|
|
8007
8008
|
/**
|
|
8008
8009
|
* If passing in a component via the `component` props
|
|
8009
8010
|
* we need to append it inside of our overlay component.
|
|
@@ -8030,6 +8031,7 @@ const CoreDelegate = () => {
|
|
|
8030
8031
|
* inside of the overlay component.
|
|
8031
8032
|
*/
|
|
8032
8033
|
BaseComponent.appendChild(el);
|
|
8034
|
+
ChildComponent = el;
|
|
8033
8035
|
await new Promise((resolve) => componentOnReady(el, resolve));
|
|
8034
8036
|
}
|
|
8035
8037
|
else if (BaseComponent.children.length > 0 &&
|
|
@@ -8038,7 +8040,7 @@ const CoreDelegate = () => {
|
|
|
8038
8040
|
* The delegate host wrapper el is only needed for modals and popovers
|
|
8039
8041
|
* because they allow the dev to provide custom content to the overlay.
|
|
8040
8042
|
*/
|
|
8041
|
-
const root = BaseComponent.children[0];
|
|
8043
|
+
const root = (ChildComponent = BaseComponent.children[0]);
|
|
8042
8044
|
if (!root.classList.contains('ion-delegate-host')) {
|
|
8043
8045
|
/**
|
|
8044
8046
|
* If the root element is not a delegate host, it means
|
|
@@ -8053,6 +8055,7 @@ const CoreDelegate = () => {
|
|
|
8053
8055
|
el.append(...BaseComponent.children);
|
|
8054
8056
|
// Append the new parent element to the original parent element.
|
|
8055
8057
|
BaseComponent.appendChild(el);
|
|
8058
|
+
ChildComponent = el;
|
|
8056
8059
|
}
|
|
8057
8060
|
}
|
|
8058
8061
|
/**
|
|
@@ -8068,7 +8071,7 @@ const CoreDelegate = () => {
|
|
|
8068
8071
|
Reference = document.createComment('ionic teleport');
|
|
8069
8072
|
BaseComponent.parentNode.insertBefore(Reference, BaseComponent);
|
|
8070
8073
|
app.appendChild(BaseComponent);
|
|
8071
|
-
return
|
|
8074
|
+
return ChildComponent;
|
|
8072
8075
|
};
|
|
8073
8076
|
const removeViewFromDom = () => {
|
|
8074
8077
|
/**
|
|
@@ -8702,27 +8705,6 @@ const createDelegateController = (ref) => {
|
|
|
8702
8705
|
removeViewFromDom,
|
|
8703
8706
|
};
|
|
8704
8707
|
};
|
|
8705
|
-
/**
|
|
8706
|
-
* Creates a lock controller.
|
|
8707
|
-
*
|
|
8708
|
-
* This function locks transitions.
|
|
8709
|
-
* The unlock() function within it calls resolve on this function, unlocking the transitions.
|
|
8710
|
-
*/
|
|
8711
|
-
const createLockController = () => {
|
|
8712
|
-
let waitPromise;
|
|
8713
|
-
const lock = async () => {
|
|
8714
|
-
const p = waitPromise;
|
|
8715
|
-
let resolve;
|
|
8716
|
-
waitPromise = new Promise((r) => (resolve = r));
|
|
8717
|
-
if (p !== undefined) {
|
|
8718
|
-
await p;
|
|
8719
|
-
}
|
|
8720
|
-
return resolve;
|
|
8721
|
-
};
|
|
8722
|
-
return {
|
|
8723
|
-
lock,
|
|
8724
|
-
};
|
|
8725
|
-
};
|
|
8726
8708
|
/**
|
|
8727
8709
|
* Constructs a trigger interaction for an overlay.
|
|
8728
8710
|
* Presents an overlay when the trigger is clicked.
|
|
@@ -9894,7 +9876,6 @@ class ActionSheet {
|
|
|
9894
9876
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
9895
9877
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
9896
9878
|
this.delegateController = createDelegateController(this);
|
|
9897
|
-
this.lockController = createLockController();
|
|
9898
9879
|
this.triggerController = createTriggerController();
|
|
9899
9880
|
this.presented = false;
|
|
9900
9881
|
this.onBackdropTap = () => {
|
|
@@ -9942,10 +9923,21 @@ class ActionSheet {
|
|
|
9942
9923
|
* Present the action sheet overlay after it has been created.
|
|
9943
9924
|
*/
|
|
9944
9925
|
async present() {
|
|
9945
|
-
|
|
9926
|
+
/**
|
|
9927
|
+
* When using an inline action sheet
|
|
9928
|
+
* and dismissing a action sheet it is possible to
|
|
9929
|
+
* quickly present the action sheet while it is
|
|
9930
|
+
* dismissing. We need to await any current
|
|
9931
|
+
* transition to allow the dismiss to finish
|
|
9932
|
+
* before presenting again.
|
|
9933
|
+
*/
|
|
9934
|
+
if (this.currentTransition !== undefined) {
|
|
9935
|
+
await this.currentTransition;
|
|
9936
|
+
}
|
|
9946
9937
|
await this.delegateController.attachViewToDom();
|
|
9947
|
-
|
|
9948
|
-
|
|
9938
|
+
this.currentTransition = present(this, 'actionSheetEnter', iosEnterAnimation$6, mdEnterAnimation$5);
|
|
9939
|
+
await this.currentTransition;
|
|
9940
|
+
this.currentTransition = undefined;
|
|
9949
9941
|
}
|
|
9950
9942
|
/**
|
|
9951
9943
|
* Dismiss the action sheet overlay after it has been presented.
|
|
@@ -9957,12 +9949,11 @@ class ActionSheet {
|
|
|
9957
9949
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
9958
9950
|
*/
|
|
9959
9951
|
async dismiss(data, role) {
|
|
9960
|
-
|
|
9961
|
-
const dismissed = await
|
|
9952
|
+
this.currentTransition = dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$6, mdLeaveAnimation$5);
|
|
9953
|
+
const dismissed = await this.currentTransition;
|
|
9962
9954
|
if (dismissed) {
|
|
9963
9955
|
this.delegateController.removeViewFromDom();
|
|
9964
9956
|
}
|
|
9965
|
-
unlock();
|
|
9966
9957
|
return dismissed;
|
|
9967
9958
|
}
|
|
9968
9959
|
/**
|
|
@@ -10372,7 +10363,6 @@ class Alert {
|
|
|
10372
10363
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
10373
10364
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
10374
10365
|
this.delegateController = createDelegateController(this);
|
|
10375
|
-
this.lockController = createLockController();
|
|
10376
10366
|
this.triggerController = createTriggerController();
|
|
10377
10367
|
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
10378
10368
|
this.processedInputs = [];
|
|
@@ -10539,10 +10529,21 @@ class Alert {
|
|
|
10539
10529
|
* Present the alert overlay after it has been created.
|
|
10540
10530
|
*/
|
|
10541
10531
|
async present() {
|
|
10542
|
-
|
|
10532
|
+
/**
|
|
10533
|
+
* When using an inline alert
|
|
10534
|
+
* and dismissing an alert it is possible to
|
|
10535
|
+
* quickly present the alert while it is
|
|
10536
|
+
* dismissing. We need to await any current
|
|
10537
|
+
* transition to allow the dismiss to finish
|
|
10538
|
+
* before presenting again.
|
|
10539
|
+
*/
|
|
10540
|
+
if (this.currentTransition !== undefined) {
|
|
10541
|
+
await this.currentTransition;
|
|
10542
|
+
}
|
|
10543
10543
|
await this.delegateController.attachViewToDom();
|
|
10544
|
-
|
|
10545
|
-
|
|
10544
|
+
this.currentTransition = present(this, 'alertEnter', iosEnterAnimation$5, mdEnterAnimation$4);
|
|
10545
|
+
await this.currentTransition;
|
|
10546
|
+
this.currentTransition = undefined;
|
|
10546
10547
|
}
|
|
10547
10548
|
/**
|
|
10548
10549
|
* Dismiss the alert overlay after it has been presented.
|
|
@@ -10554,12 +10555,11 @@ class Alert {
|
|
|
10554
10555
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
10555
10556
|
*/
|
|
10556
10557
|
async dismiss(data, role) {
|
|
10557
|
-
|
|
10558
|
-
const dismissed = await
|
|
10558
|
+
this.currentTransition = dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$5, mdLeaveAnimation$4);
|
|
10559
|
+
const dismissed = await this.currentTransition;
|
|
10559
10560
|
if (dismissed) {
|
|
10560
10561
|
this.delegateController.removeViewFromDom();
|
|
10561
10562
|
}
|
|
10562
|
-
unlock();
|
|
10563
10563
|
return dismissed;
|
|
10564
10564
|
}
|
|
10565
10565
|
/**
|
|
@@ -19797,7 +19797,6 @@ class Loading {
|
|
|
19797
19797
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
19798
19798
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
19799
19799
|
this.delegateController = createDelegateController(this);
|
|
19800
|
-
this.lockController = createLockController();
|
|
19801
19800
|
this.triggerController = createTriggerController();
|
|
19802
19801
|
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
19803
19802
|
this.presented = false;
|
|
@@ -19863,13 +19862,24 @@ class Loading {
|
|
|
19863
19862
|
* Present the loading overlay after it has been created.
|
|
19864
19863
|
*/
|
|
19865
19864
|
async present() {
|
|
19866
|
-
|
|
19865
|
+
/**
|
|
19866
|
+
* When using an inline loading indicator
|
|
19867
|
+
* and dismissing a loading indicator it is possible to
|
|
19868
|
+
* quickly present the loading indicator while it is
|
|
19869
|
+
* dismissing. We need to await any current
|
|
19870
|
+
* transition to allow the dismiss to finish
|
|
19871
|
+
* before presenting again.
|
|
19872
|
+
*/
|
|
19873
|
+
if (this.currentTransition !== undefined) {
|
|
19874
|
+
await this.currentTransition;
|
|
19875
|
+
}
|
|
19867
19876
|
await this.delegateController.attachViewToDom();
|
|
19868
|
-
|
|
19877
|
+
this.currentTransition = present(this, 'loadingEnter', iosEnterAnimation$4, mdEnterAnimation$3);
|
|
19878
|
+
await this.currentTransition;
|
|
19869
19879
|
if (this.duration > 0) {
|
|
19870
19880
|
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
|
|
19871
19881
|
}
|
|
19872
|
-
|
|
19882
|
+
this.currentTransition = undefined;
|
|
19873
19883
|
}
|
|
19874
19884
|
/**
|
|
19875
19885
|
* Dismiss the loading overlay after it has been presented.
|
|
@@ -19881,15 +19891,14 @@ class Loading {
|
|
|
19881
19891
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
19882
19892
|
*/
|
|
19883
19893
|
async dismiss(data, role) {
|
|
19884
|
-
const unlock = await this.lockController.lock();
|
|
19885
19894
|
if (this.durationTimeout) {
|
|
19886
19895
|
clearTimeout(this.durationTimeout);
|
|
19887
19896
|
}
|
|
19888
|
-
|
|
19897
|
+
this.currentTransition = dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation$4, mdLeaveAnimation$3);
|
|
19898
|
+
const dismissed = await this.currentTransition;
|
|
19889
19899
|
if (dismissed) {
|
|
19890
19900
|
this.delegateController.removeViewFromDom();
|
|
19891
19901
|
}
|
|
19892
|
-
unlock();
|
|
19893
19902
|
return dismissed;
|
|
19894
19903
|
}
|
|
19895
19904
|
/**
|
|
@@ -22390,7 +22399,6 @@ class Modal {
|
|
|
22390
22399
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
22391
22400
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
22392
22401
|
this.ionMount = createEvent(this, "ionMount", 7);
|
|
22393
|
-
this.lockController = createLockController();
|
|
22394
22402
|
this.triggerController = createTriggerController();
|
|
22395
22403
|
this.coreDelegate = CoreDelegate();
|
|
22396
22404
|
this.isSheetModal = false;
|
|
@@ -22558,16 +22566,26 @@ class Modal {
|
|
|
22558
22566
|
if (this.presented) {
|
|
22559
22567
|
return;
|
|
22560
22568
|
}
|
|
22561
|
-
const unlock = await this.lockController.lock();
|
|
22562
22569
|
const { presentingElement, el } = this;
|
|
22570
|
+
/**
|
|
22571
|
+
* When using an inline modal
|
|
22572
|
+
* and dismissing a modal it is possible to
|
|
22573
|
+
* quickly present the modal while it is
|
|
22574
|
+
* dismissing. We need to await any current
|
|
22575
|
+
* transition to allow the dismiss to finish
|
|
22576
|
+
* before presenting again.
|
|
22577
|
+
*/
|
|
22578
|
+
if (this.currentTransition !== undefined) {
|
|
22579
|
+
await this.currentTransition;
|
|
22580
|
+
}
|
|
22563
22581
|
/**
|
|
22564
22582
|
* If the modal is presented multiple times (inline modals), we
|
|
22565
22583
|
* need to reset the current breakpoint to the initial breakpoint.
|
|
22566
22584
|
*/
|
|
22567
22585
|
this.currentBreakpoint = this.initialBreakpoint;
|
|
22568
22586
|
const { inline, delegate } = this.getDelegate(true);
|
|
22569
|
-
this.usersElement = await attachComponent(delegate, el, this.component, ['ion-page'], this.componentProps, inline);
|
|
22570
22587
|
this.ionMount.emit();
|
|
22588
|
+
this.usersElement = await attachComponent(delegate, el, this.component, ['ion-page'], this.componentProps, inline);
|
|
22571
22589
|
/**
|
|
22572
22590
|
* When using the lazy loaded build of Stencil, we need to wait
|
|
22573
22591
|
* for every Stencil component instance to be ready before presenting
|
|
@@ -22591,6 +22609,11 @@ class Modal {
|
|
|
22591
22609
|
await waitForMount();
|
|
22592
22610
|
}
|
|
22593
22611
|
writeTask(() => this.el.classList.add('show-modal'));
|
|
22612
|
+
this.currentTransition = present(this, 'modalEnter', iosEnterAnimation$3, mdEnterAnimation$2, {
|
|
22613
|
+
presentingEl: presentingElement,
|
|
22614
|
+
currentBreakpoint: this.initialBreakpoint,
|
|
22615
|
+
backdropBreakpoint: this.backdropBreakpoint,
|
|
22616
|
+
});
|
|
22594
22617
|
/* tslint:disable-next-line */
|
|
22595
22618
|
if (typeof window !== 'undefined') {
|
|
22596
22619
|
/**
|
|
@@ -22633,18 +22656,14 @@ class Modal {
|
|
|
22633
22656
|
this.statusBarStyle = await StatusBar.getStyle();
|
|
22634
22657
|
setCardStatusBarDark();
|
|
22635
22658
|
}
|
|
22636
|
-
await
|
|
22637
|
-
presentingEl: presentingElement,
|
|
22638
|
-
currentBreakpoint: this.initialBreakpoint,
|
|
22639
|
-
backdropBreakpoint: this.backdropBreakpoint,
|
|
22640
|
-
});
|
|
22659
|
+
await this.currentTransition;
|
|
22641
22660
|
if (this.isSheetModal) {
|
|
22642
22661
|
this.initSheetGesture();
|
|
22643
22662
|
}
|
|
22644
22663
|
else if (hasCardModal) {
|
|
22645
22664
|
this.initSwipeToClose();
|
|
22646
22665
|
}
|
|
22647
|
-
|
|
22666
|
+
this.currentTransition = undefined;
|
|
22648
22667
|
}
|
|
22649
22668
|
initSwipeToClose() {
|
|
22650
22669
|
var _a;
|
|
@@ -22734,7 +22753,6 @@ class Modal {
|
|
|
22734
22753
|
if (this.gestureAnimationDismissing && role !== GESTURE) {
|
|
22735
22754
|
return false;
|
|
22736
22755
|
}
|
|
22737
|
-
const unlock = await this.lockController.lock();
|
|
22738
22756
|
/**
|
|
22739
22757
|
* If a canDismiss handler is responsible
|
|
22740
22758
|
* for calling the dismiss method, we should
|
|
@@ -22758,12 +22776,24 @@ class Modal {
|
|
|
22758
22776
|
window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
22759
22777
|
this.keyboardOpenCallback = undefined;
|
|
22760
22778
|
}
|
|
22779
|
+
/**
|
|
22780
|
+
* When using an inline modal
|
|
22781
|
+
* and presenting a modal it is possible to
|
|
22782
|
+
* quickly dismiss the modal while it is
|
|
22783
|
+
* presenting. We need to await any current
|
|
22784
|
+
* transition to allow the present to finish
|
|
22785
|
+
* before dismissing again.
|
|
22786
|
+
*/
|
|
22787
|
+
if (this.currentTransition !== undefined) {
|
|
22788
|
+
await this.currentTransition;
|
|
22789
|
+
}
|
|
22761
22790
|
const enteringAnimation = activeAnimations.get(this) || [];
|
|
22762
|
-
|
|
22791
|
+
this.currentTransition = dismiss(this, data, role, 'modalLeave', iosLeaveAnimation$3, mdLeaveAnimation$2, {
|
|
22763
22792
|
presentingEl: presentingElement,
|
|
22764
22793
|
currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
|
|
22765
22794
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
22766
22795
|
});
|
|
22796
|
+
const dismissed = await this.currentTransition;
|
|
22767
22797
|
if (dismissed) {
|
|
22768
22798
|
const { delegate } = this.getDelegate();
|
|
22769
22799
|
await detachComponent(delegate, this.usersElement);
|
|
@@ -22777,8 +22807,8 @@ class Modal {
|
|
|
22777
22807
|
enteringAnimation.forEach((ani) => ani.destroy());
|
|
22778
22808
|
}
|
|
22779
22809
|
this.currentBreakpoint = undefined;
|
|
22810
|
+
this.currentTransition = undefined;
|
|
22780
22811
|
this.animation = undefined;
|
|
22781
|
-
unlock();
|
|
22782
22812
|
return dismissed;
|
|
22783
22813
|
}
|
|
22784
22814
|
/**
|
|
@@ -23997,7 +24027,6 @@ class Picker {
|
|
|
23997
24027
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
23998
24028
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
23999
24029
|
this.delegateController = createDelegateController(this);
|
|
24000
|
-
this.lockController = createLockController();
|
|
24001
24030
|
this.triggerController = createTriggerController();
|
|
24002
24031
|
this.onBackdropTap = () => {
|
|
24003
24032
|
this.dismiss(undefined, BACKDROP);
|
|
@@ -24064,13 +24093,24 @@ class Picker {
|
|
|
24064
24093
|
* Present the picker overlay after it has been created.
|
|
24065
24094
|
*/
|
|
24066
24095
|
async present() {
|
|
24067
|
-
|
|
24096
|
+
/**
|
|
24097
|
+
* When using an inline picker
|
|
24098
|
+
* and dismissing an picker it is possible to
|
|
24099
|
+
* quickly present the picker while it is
|
|
24100
|
+
* dismissing. We need to await any current
|
|
24101
|
+
* transition to allow the dismiss to finish
|
|
24102
|
+
* before presenting again.
|
|
24103
|
+
*/
|
|
24104
|
+
if (this.currentTransition !== undefined) {
|
|
24105
|
+
await this.currentTransition;
|
|
24106
|
+
}
|
|
24068
24107
|
await this.delegateController.attachViewToDom();
|
|
24069
|
-
|
|
24108
|
+
this.currentTransition = present(this, 'pickerEnter', iosEnterAnimation$2, iosEnterAnimation$2, undefined);
|
|
24109
|
+
await this.currentTransition;
|
|
24110
|
+
this.currentTransition = undefined;
|
|
24070
24111
|
if (this.duration > 0) {
|
|
24071
24112
|
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
|
|
24072
24113
|
}
|
|
24073
|
-
unlock();
|
|
24074
24114
|
}
|
|
24075
24115
|
/**
|
|
24076
24116
|
* Dismiss the picker overlay after it has been presented.
|
|
@@ -24082,15 +24122,14 @@ class Picker {
|
|
|
24082
24122
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
24083
24123
|
*/
|
|
24084
24124
|
async dismiss(data, role) {
|
|
24085
|
-
const unlock = await this.lockController.lock();
|
|
24086
24125
|
if (this.durationTimeout) {
|
|
24087
24126
|
clearTimeout(this.durationTimeout);
|
|
24088
24127
|
}
|
|
24089
|
-
|
|
24128
|
+
this.currentTransition = dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation$2, iosLeaveAnimation$2);
|
|
24129
|
+
const dismissed = await this.currentTransition;
|
|
24090
24130
|
if (dismissed) {
|
|
24091
24131
|
this.delegateController.removeViewFromDom();
|
|
24092
24132
|
}
|
|
24093
|
-
unlock();
|
|
24094
24133
|
return dismissed;
|
|
24095
24134
|
}
|
|
24096
24135
|
/**
|
|
@@ -26411,7 +26450,6 @@ class Popover {
|
|
|
26411
26450
|
this.ionMount = createEvent(this, "ionMount", 7);
|
|
26412
26451
|
this.parentPopover = null;
|
|
26413
26452
|
this.coreDelegate = CoreDelegate();
|
|
26414
|
-
this.lockController = createLockController();
|
|
26415
26453
|
this.inline = false;
|
|
26416
26454
|
this.focusDescendantOnPresent = false;
|
|
26417
26455
|
this.onBackdropTap = () => {
|
|
@@ -26588,15 +26626,25 @@ class Popover {
|
|
|
26588
26626
|
if (this.presented) {
|
|
26589
26627
|
return;
|
|
26590
26628
|
}
|
|
26591
|
-
|
|
26629
|
+
/**
|
|
26630
|
+
* When using an inline popover
|
|
26631
|
+
* and dismissing a popover it is possible to
|
|
26632
|
+
* quickly present the popover while it is
|
|
26633
|
+
* dismissing. We need to await any current
|
|
26634
|
+
* transition to allow the dismiss to finish
|
|
26635
|
+
* before presenting again.
|
|
26636
|
+
*/
|
|
26637
|
+
if (this.currentTransition !== undefined) {
|
|
26638
|
+
await this.currentTransition;
|
|
26639
|
+
}
|
|
26592
26640
|
const { el } = this;
|
|
26593
26641
|
const { inline, delegate } = this.getDelegate(true);
|
|
26642
|
+
this.ionMount.emit();
|
|
26594
26643
|
this.usersElement = await attachComponent(delegate, el, this.component, ['popover-viewport'], this.componentProps, inline);
|
|
26595
26644
|
if (!this.keyboardEvents) {
|
|
26596
26645
|
this.configureKeyboardInteraction();
|
|
26597
26646
|
}
|
|
26598
26647
|
this.configureDismissInteraction();
|
|
26599
|
-
this.ionMount.emit();
|
|
26600
26648
|
/**
|
|
26601
26649
|
* When using the lazy loaded build of Stencil, we need to wait
|
|
26602
26650
|
* for every Stencil component instance to be ready before presenting
|
|
@@ -26619,7 +26667,7 @@ class Popover {
|
|
|
26619
26667
|
else if (!this.keepContentsMounted) {
|
|
26620
26668
|
await waitForMount();
|
|
26621
26669
|
}
|
|
26622
|
-
|
|
26670
|
+
this.currentTransition = present(this, 'popoverEnter', iosEnterAnimation$1, mdEnterAnimation$1, {
|
|
26623
26671
|
event: event || this.event,
|
|
26624
26672
|
size: this.size,
|
|
26625
26673
|
trigger: this.triggerEl,
|
|
@@ -26627,6 +26675,8 @@ class Popover {
|
|
|
26627
26675
|
side: this.side,
|
|
26628
26676
|
align: this.alignment,
|
|
26629
26677
|
});
|
|
26678
|
+
await this.currentTransition;
|
|
26679
|
+
this.currentTransition = undefined;
|
|
26630
26680
|
/**
|
|
26631
26681
|
* If popover is nested and was
|
|
26632
26682
|
* presented using the "Right" arrow key,
|
|
@@ -26636,7 +26686,6 @@ class Popover {
|
|
|
26636
26686
|
if (this.focusDescendantOnPresent) {
|
|
26637
26687
|
focusFirstDescendant(this.el, this.el);
|
|
26638
26688
|
}
|
|
26639
|
-
unlock();
|
|
26640
26689
|
}
|
|
26641
26690
|
/**
|
|
26642
26691
|
* Dismiss the popover overlay after it has been presented.
|
|
@@ -26647,12 +26696,23 @@ class Popover {
|
|
|
26647
26696
|
* a parent popover if this popover is nested. Defaults to `true`.
|
|
26648
26697
|
*/
|
|
26649
26698
|
async dismiss(data, role, dismissParentPopover = true) {
|
|
26650
|
-
|
|
26699
|
+
/**
|
|
26700
|
+
* When using an inline popover
|
|
26701
|
+
* and presenting a popover it is possible to
|
|
26702
|
+
* quickly dismiss the popover while it is
|
|
26703
|
+
* presenting. We need to await any current
|
|
26704
|
+
* transition to allow the present to finish
|
|
26705
|
+
* before dismissing again.
|
|
26706
|
+
*/
|
|
26707
|
+
if (this.currentTransition !== undefined) {
|
|
26708
|
+
await this.currentTransition;
|
|
26709
|
+
}
|
|
26651
26710
|
const { destroyKeyboardInteraction, destroyDismissInteraction } = this;
|
|
26652
26711
|
if (dismissParentPopover && this.parentPopover) {
|
|
26653
26712
|
this.parentPopover.dismiss(data, role, dismissParentPopover);
|
|
26654
26713
|
}
|
|
26655
|
-
|
|
26714
|
+
this.currentTransition = dismiss(this, data, role, 'popoverLeave', iosLeaveAnimation$1, mdLeaveAnimation$1, this.event);
|
|
26715
|
+
const shouldDismiss = await this.currentTransition;
|
|
26656
26716
|
if (shouldDismiss) {
|
|
26657
26717
|
if (destroyKeyboardInteraction) {
|
|
26658
26718
|
destroyKeyboardInteraction();
|
|
@@ -26670,7 +26730,7 @@ class Popover {
|
|
|
26670
26730
|
const { delegate } = this.getDelegate();
|
|
26671
26731
|
await detachComponent(delegate, this.usersElement);
|
|
26672
26732
|
}
|
|
26673
|
-
|
|
26733
|
+
this.currentTransition = undefined;
|
|
26674
26734
|
return shouldDismiss;
|
|
26675
26735
|
}
|
|
26676
26736
|
/**
|
|
@@ -33414,7 +33474,6 @@ class Toast {
|
|
|
33414
33474
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
33415
33475
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
33416
33476
|
this.delegateController = createDelegateController(this);
|
|
33417
|
-
this.lockController = createLockController();
|
|
33418
33477
|
this.triggerController = createTriggerController();
|
|
33419
33478
|
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
33420
33479
|
this.presented = false;
|
|
@@ -33484,19 +33543,30 @@ class Toast {
|
|
|
33484
33543
|
* Present the toast overlay after it has been created.
|
|
33485
33544
|
*/
|
|
33486
33545
|
async present() {
|
|
33487
|
-
|
|
33546
|
+
/**
|
|
33547
|
+
* When using an inline toast
|
|
33548
|
+
* and dismissing a toast it is possible to
|
|
33549
|
+
* quickly present the toast while it is
|
|
33550
|
+
* dismissing. We need to await any current
|
|
33551
|
+
* transition to allow the dismiss to finish
|
|
33552
|
+
* before presenting again.
|
|
33553
|
+
*/
|
|
33554
|
+
if (this.currentTransition !== undefined) {
|
|
33555
|
+
await this.currentTransition;
|
|
33556
|
+
}
|
|
33488
33557
|
await this.delegateController.attachViewToDom();
|
|
33489
|
-
|
|
33558
|
+
this.currentTransition = present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, this.position);
|
|
33559
|
+
await this.currentTransition;
|
|
33490
33560
|
/**
|
|
33491
33561
|
* Content is revealed to screen readers after
|
|
33492
33562
|
* the transition to avoid jank since this
|
|
33493
33563
|
* state updates will cause a re-render.
|
|
33494
33564
|
*/
|
|
33495
33565
|
this.revealContentToScreenReader = true;
|
|
33566
|
+
this.currentTransition = undefined;
|
|
33496
33567
|
if (this.duration > 0) {
|
|
33497
33568
|
this.durationTimeout = setTimeout(() => this.dismiss(undefined, 'timeout'), this.duration);
|
|
33498
33569
|
}
|
|
33499
|
-
unlock();
|
|
33500
33570
|
}
|
|
33501
33571
|
/**
|
|
33502
33572
|
* Dismiss the toast overlay after it has been presented.
|
|
@@ -33508,16 +33578,15 @@ class Toast {
|
|
|
33508
33578
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
33509
33579
|
*/
|
|
33510
33580
|
async dismiss(data, role) {
|
|
33511
|
-
const unlock = await this.lockController.lock();
|
|
33512
33581
|
if (this.durationTimeout) {
|
|
33513
33582
|
clearTimeout(this.durationTimeout);
|
|
33514
33583
|
}
|
|
33515
|
-
|
|
33584
|
+
this.currentTransition = dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, this.position);
|
|
33585
|
+
const dismissed = await this.currentTransition;
|
|
33516
33586
|
if (dismissed) {
|
|
33517
33587
|
this.delegateController.removeViewFromDom();
|
|
33518
33588
|
this.revealContentToScreenReader = false;
|
|
33519
33589
|
}
|
|
33520
|
-
unlock();
|
|
33521
33590
|
return dismissed;
|
|
33522
33591
|
}
|
|
33523
33592
|
/**
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{__awaiter,__generator}from"tslib";
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{c as componentOnReady}from"./helpers-3379ba19.js";var attachComponent=function(e,n,t,r,o,i){return __awaiter(void 0,void 0,void 0,(function(){var a,c;return __generator(this,(function(s){switch(s.label){case 0:if(e){return[2,e.attachViewToDom(n,t,o,r)]}if(!i&&typeof t!=="string"&&!(t instanceof HTMLElement)){throw new Error("framework delegate is missing")}c=typeof t==="string"?(a=n.ownerDocument)===null||a===void 0?void 0:a.createElement(t):t;if(r){r.forEach((function(e){return c.classList.add(e)}))}if(o){Object.assign(c,o)}n.appendChild(c);return[4,new Promise((function(e){return componentOnReady(c,e)}))];case 1:s.sent();return[2,c]}}))}))};var detachComponent=function(e,n){if(n){if(e){var t=n.parentElement;return e.removeViewFromDom(t,n)}n.remove()}return Promise.resolve()};var CoreDelegate=function(){var e;var n;var t=function(t,r,o,i){if(o===void 0){o={}}if(i===void 0){i=[]}return __awaiter(void 0,void 0,void 0,(function(){var a,c,s,d,u,l;return __generator(this,(function(m){switch(m.label){case 0:e=t;if(!r)return[3,2];s=typeof r==="string"?(a=e.ownerDocument)===null||a===void 0?void 0:a.createElement(r):r;i.forEach((function(e){return s.classList.add(e)}));Object.assign(s,o);e.appendChild(s);return[4,new Promise((function(e){return componentOnReady(s,e)}))];case 1:m.sent();return[3,3];case 2:if(e.children.length>0&&(e.tagName==="ION-MODAL"||e.tagName==="ION-POPOVER")){d=e.children[0];if(!d.classList.contains("ion-delegate-host")){u=(c=e.ownerDocument)===null||c===void 0?void 0:c.createElement("div");u.classList.add("ion-delegate-host");i.forEach((function(e){return u.classList.add(e)}));u.append.apply(u,e.children);e.appendChild(u)}}m.label=3;case 3:l=document.querySelector("ion-app")||document.body;n=document.createComment("ionic teleport");e.parentNode.insertBefore(n,e);l.appendChild(e);return[2,e]}}))}))};var r=function(){if(e&&n){n.parentNode.insertBefore(e,n);n.remove()}return Promise.resolve()};return{attachViewToDom:t,removeViewFromDom:r}};export{CoreDelegate as C,attachComponent as a,detachComponent as d};
|