@ionic/core 7.3.2-dev.11693254222.1822966d → 7.3.2-dev.11693262117.17edbf6d
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 +8 -17
- package/components/alert.js +8 -17
- package/components/framework-delegate.js +2 -5
- package/components/ion-loading.js +8 -17
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +12 -33
- package/components/ion-picker.js +8 -17
- package/components/ion-toast.js +8 -17
- package/components/overlays.js +22 -1
- package/components/popover.js +9 -30
- package/dist/cjs/{framework-delegate-91be3b84.js → framework-delegate-e8174951.js} +2 -5
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +9 -18
- package/dist/cjs/ion-alert.cjs.entry.js +9 -18
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +9 -18
- package/dist/cjs/ion-loading.cjs.entry.js +9 -18
- package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +13 -34
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +10 -31
- 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 +9 -18
- package/dist/cjs/{overlays-cf7fa4cf.js → overlays-2b9fa92e.js} +23 -1
- package/dist/collection/components/action-sheet/action-sheet.js +8 -17
- package/dist/collection/components/alert/alert.js +8 -17
- package/dist/collection/components/loading/loading.js +8 -17
- package/dist/collection/components/modal/modal.js +12 -33
- package/dist/collection/components/picker/picker.js +8 -17
- package/dist/collection/components/popover/popover.js +9 -30
- package/dist/collection/components/toast/toast.js +8 -17
- package/dist/collection/utils/framework-delegate.js +2 -5
- package/dist/collection/utils/overlays.js +21 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{framework-delegate-43758c88.js → framework-delegate-2b76c681.js} +2 -5
- package/dist/esm/index.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +9 -18
- package/dist/esm/ion-alert.entry.js +9 -18
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +9 -18
- package/dist/esm/ion-loading.entry.js +9 -18
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +13 -34
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +10 -31
- 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 +9 -18
- package/dist/esm/{overlays-236d01c6.js → overlays-66222f79.js} +23 -2
- package/dist/esm-es5/framework-delegate-2b76c681.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-236d01c6.js → overlays-66222f79.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-04515b10.system.entry.js → p-0494a5b7.system.entry.js} +1 -1
- package/dist/ionic/p-16fd72f2.entry.js +4 -0
- package/dist/ionic/p-1c9e3bc7.entry.js +4 -0
- package/dist/ionic/{p-4852bb39.entry.js → p-20087c90.entry.js} +1 -1
- package/dist/ionic/{p-5c0754cd.entry.js → p-229df0d8.entry.js} +1 -1
- package/dist/ionic/p-2a51c81c.entry.js +4 -0
- package/dist/ionic/p-2a649b3e.system.entry.js +4 -0
- package/dist/ionic/p-3ef9e271.system.entry.js +4 -0
- package/dist/ionic/{p-ed290b4a.entry.js → p-5c96dc4e.entry.js} +1 -1
- package/dist/ionic/{p-f2c1459b.system.entry.js → p-6b9bf14c.system.entry.js} +1 -1
- package/dist/ionic/p-6d484719.system.entry.js +4 -0
- package/dist/ionic/p-70d137a0.js +4 -0
- package/dist/ionic/p-721933ff.system.js +1 -1
- package/dist/ionic/{p-e484ae56.entry.js → p-7776d062.entry.js} +1 -1
- package/dist/ionic/p-7ac9bdfa.system.entry.js +4 -0
- package/dist/ionic/{p-f1bf45b2.system.entry.js → p-8074bdd7.system.entry.js} +1 -1
- package/dist/ionic/p-8d53d5a5.entry.js +4 -0
- package/dist/ionic/{p-33dc95e4.system.js → p-8d9475b5.system.js} +1 -1
- package/dist/ionic/{p-fb16e75c.entry.js → p-9888a5a7.entry.js} +1 -1
- package/dist/ionic/{p-5f5d78da.system.js → p-a0ffdd91.system.js} +1 -1
- package/dist/ionic/p-a133c215.system.entry.js +4 -0
- package/dist/ionic/{p-50e474b3.system.entry.js → p-b2098e96.system.entry.js} +1 -1
- package/dist/ionic/p-b34c1ae1.js +4 -0
- package/dist/ionic/p-c0b4ca5c.system.entry.js +4 -0
- package/dist/ionic/p-cf768a4f.entry.js +4 -0
- package/dist/ionic/{p-ff0f2ef4.system.entry.js → p-d1356034.system.entry.js} +1 -1
- package/dist/ionic/p-ddffbfa9.entry.js +4 -0
- package/dist/ionic/p-e2e2c2b0.entry.js +4 -0
- package/dist/ionic/p-ebb442c4.system.entry.js +4 -0
- package/dist/ionic/{p-c275a599.system.js → p-f8e4da48.system.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 +9 -0
- package/hydrate/index.js +77 -146
- package/package.json +1 -1
- package/dist/esm-es5/framework-delegate-43758c88.js +0 -4
- package/dist/ionic/p-13df6e84.system.entry.js +0 -4
- package/dist/ionic/p-2bdc6097.entry.js +0 -4
- package/dist/ionic/p-2d37d114.system.entry.js +0 -4
- package/dist/ionic/p-3c14c5b9.system.entry.js +0 -4
- package/dist/ionic/p-4adb3257.entry.js +0 -4
- package/dist/ionic/p-647c433f.entry.js +0 -4
- package/dist/ionic/p-77465c7a.entry.js +0 -4
- package/dist/ionic/p-870fee8d.system.entry.js +0 -4
- package/dist/ionic/p-8d1ef5d0.entry.js +0 -4
- package/dist/ionic/p-ad5a562b.system.entry.js +0 -4
- package/dist/ionic/p-d3602489.entry.js +0 -4
- package/dist/ionic/p-e015fbd9.system.entry.js +0 -4
- package/dist/ionic/p-e30f020d.entry.js +0 -4
- package/dist/ionic/p-f2743457.js +0 -4
- package/dist/ionic/p-f4bbbc33.js +0 -4
- package/dist/ionic/p-f94cad00.system.entry.js +0 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { proxyCustomElement, HTMLElement, createEvent, readTask, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { c as createButtonActiveGesture } from './button-active.js';
|
|
6
6
|
import { r as raf } from './helpers.js';
|
|
7
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel,
|
|
7
|
+
import { d as createDelegateController, e as createLockController, f as createTriggerController, B as BACKDROP, i as isCancel, g as present, h as dismiss, j as eventMethod, s as safeCall, k as prepareOverlay, n as setOverlayId } from './overlays.js';
|
|
8
8
|
import { g as getClassMap } from './theme.js';
|
|
9
9
|
import { b as getIonMode } from './ionic-global.js';
|
|
10
10
|
import { c as createAnimation } from './animation.js';
|
|
@@ -113,6 +113,7 @@ const ActionSheet = /*@__PURE__*/ proxyCustomElement(class ActionSheet extends H
|
|
|
113
113
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
114
114
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
115
115
|
this.delegateController = createDelegateController(this);
|
|
116
|
+
this.lockController = createLockController();
|
|
116
117
|
this.triggerController = createTriggerController();
|
|
117
118
|
this.presented = false;
|
|
118
119
|
this.onBackdropTap = () => {
|
|
@@ -160,21 +161,10 @@ const ActionSheet = /*@__PURE__*/ proxyCustomElement(class ActionSheet extends H
|
|
|
160
161
|
* Present the action sheet overlay after it has been created.
|
|
161
162
|
*/
|
|
162
163
|
async present() {
|
|
163
|
-
|
|
164
|
-
* When using an inline action sheet
|
|
165
|
-
* and dismissing a action sheet it is possible to
|
|
166
|
-
* quickly present the action sheet while it is
|
|
167
|
-
* dismissing. We need to await any current
|
|
168
|
-
* transition to allow the dismiss to finish
|
|
169
|
-
* before presenting again.
|
|
170
|
-
*/
|
|
171
|
-
if (this.currentTransition !== undefined) {
|
|
172
|
-
await this.currentTransition;
|
|
173
|
-
}
|
|
164
|
+
const unlock = await this.lockController.lock();
|
|
174
165
|
await this.delegateController.attachViewToDom();
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
this.currentTransition = undefined;
|
|
166
|
+
await present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
|
|
167
|
+
unlock();
|
|
178
168
|
}
|
|
179
169
|
/**
|
|
180
170
|
* Dismiss the action sheet overlay after it has been presented.
|
|
@@ -186,11 +176,12 @@ const ActionSheet = /*@__PURE__*/ proxyCustomElement(class ActionSheet extends H
|
|
|
186
176
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
187
177
|
*/
|
|
188
178
|
async dismiss(data, role) {
|
|
189
|
-
|
|
190
|
-
const dismissed = await this
|
|
179
|
+
const unlock = await this.lockController.lock();
|
|
180
|
+
const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
191
181
|
if (dismissed) {
|
|
192
182
|
this.delegateController.removeViewFromDom();
|
|
193
183
|
}
|
|
184
|
+
unlock();
|
|
194
185
|
return dismissed;
|
|
195
186
|
}
|
|
196
187
|
/**
|
package/components/alert.js
CHANGED
|
@@ -5,7 +5,7 @@ import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } fr
|
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config.js';
|
|
6
6
|
import { c as createButtonActiveGesture } from './button-active.js';
|
|
7
7
|
import { r as raf } from './helpers.js';
|
|
8
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel,
|
|
8
|
+
import { d as createDelegateController, e as createLockController, f as createTriggerController, B as BACKDROP, i as isCancel, k as prepareOverlay, n as setOverlayId, g as present, h as dismiss, j as eventMethod, s as safeCall } from './overlays.js';
|
|
9
9
|
import { g as getClassMap } from './theme.js';
|
|
10
10
|
import { c as config, b as getIonMode } from './ionic-global.js';
|
|
11
11
|
import { c as createAnimation } from './animation.js';
|
|
@@ -114,6 +114,7 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
114
114
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
115
115
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
116
116
|
this.delegateController = createDelegateController(this);
|
|
117
|
+
this.lockController = createLockController();
|
|
117
118
|
this.triggerController = createTriggerController();
|
|
118
119
|
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
119
120
|
this.processedInputs = [];
|
|
@@ -280,21 +281,10 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
280
281
|
* Present the alert overlay after it has been created.
|
|
281
282
|
*/
|
|
282
283
|
async present() {
|
|
283
|
-
|
|
284
|
-
* When using an inline alert
|
|
285
|
-
* and dismissing an alert it is possible to
|
|
286
|
-
* quickly present the alert while it is
|
|
287
|
-
* dismissing. We need to await any current
|
|
288
|
-
* transition to allow the dismiss to finish
|
|
289
|
-
* before presenting again.
|
|
290
|
-
*/
|
|
291
|
-
if (this.currentTransition !== undefined) {
|
|
292
|
-
await this.currentTransition;
|
|
293
|
-
}
|
|
284
|
+
const unlock = await this.lockController.lock();
|
|
294
285
|
await this.delegateController.attachViewToDom();
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
this.currentTransition = undefined;
|
|
286
|
+
await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
|
|
287
|
+
unlock();
|
|
298
288
|
}
|
|
299
289
|
/**
|
|
300
290
|
* Dismiss the alert overlay after it has been presented.
|
|
@@ -306,11 +296,12 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
306
296
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
307
297
|
*/
|
|
308
298
|
async dismiss(data, role) {
|
|
309
|
-
|
|
310
|
-
const dismissed = await this
|
|
299
|
+
const unlock = await this.lockController.lock();
|
|
300
|
+
const dismissed = await dismiss(this, data, role, 'alertLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
311
301
|
if (dismissed) {
|
|
312
302
|
this.delegateController.removeViewFromDom();
|
|
313
303
|
}
|
|
304
|
+
unlock();
|
|
314
305
|
return dismissed;
|
|
315
306
|
}
|
|
316
307
|
/**
|
|
@@ -39,7 +39,6 @@ const CoreDelegate = () => {
|
|
|
39
39
|
const attachViewToDom = async (parentElement, userComponent, userComponentProps = {}, cssClasses = []) => {
|
|
40
40
|
var _a, _b;
|
|
41
41
|
BaseComponent = parentElement;
|
|
42
|
-
let ChildComponent;
|
|
43
42
|
/**
|
|
44
43
|
* If passing in a component via the `component` props
|
|
45
44
|
* we need to append it inside of our overlay component.
|
|
@@ -66,7 +65,6 @@ const CoreDelegate = () => {
|
|
|
66
65
|
* inside of the overlay component.
|
|
67
66
|
*/
|
|
68
67
|
BaseComponent.appendChild(el);
|
|
69
|
-
ChildComponent = el;
|
|
70
68
|
await new Promise((resolve) => componentOnReady(el, resolve));
|
|
71
69
|
}
|
|
72
70
|
else if (BaseComponent.children.length > 0 &&
|
|
@@ -75,7 +73,7 @@ const CoreDelegate = () => {
|
|
|
75
73
|
* The delegate host wrapper el is only needed for modals and popovers
|
|
76
74
|
* because they allow the dev to provide custom content to the overlay.
|
|
77
75
|
*/
|
|
78
|
-
const root =
|
|
76
|
+
const root = BaseComponent.children[0];
|
|
79
77
|
if (!root.classList.contains('ion-delegate-host')) {
|
|
80
78
|
/**
|
|
81
79
|
* If the root element is not a delegate host, it means
|
|
@@ -90,7 +88,6 @@ const CoreDelegate = () => {
|
|
|
90
88
|
el.append(...BaseComponent.children);
|
|
91
89
|
// Append the new parent element to the original parent element.
|
|
92
90
|
BaseComponent.appendChild(el);
|
|
93
|
-
ChildComponent = el;
|
|
94
91
|
}
|
|
95
92
|
}
|
|
96
93
|
/**
|
|
@@ -106,7 +103,7 @@ const CoreDelegate = () => {
|
|
|
106
103
|
Reference = document.createComment('ionic teleport');
|
|
107
104
|
BaseComponent.parentNode.insertBefore(Reference, BaseComponent);
|
|
108
105
|
app.appendChild(BaseComponent);
|
|
109
|
-
return
|
|
106
|
+
return BaseComponent;
|
|
110
107
|
};
|
|
111
108
|
const removeViewFromDom = () => {
|
|
112
109
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config.js';
|
|
6
6
|
import { r as raf } from './helpers.js';
|
|
7
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP,
|
|
7
|
+
import { d as createDelegateController, e as createLockController, f as createTriggerController, B as BACKDROP, k as prepareOverlay, n as setOverlayId, g as present, h as dismiss, j as eventMethod } from './overlays.js';
|
|
8
8
|
import { g as getClassMap } from './theme.js';
|
|
9
9
|
import { c as config, b as getIonMode } from './ionic-global.js';
|
|
10
10
|
import { c as createAnimation } from './animation.js';
|
|
@@ -116,6 +116,7 @@ const Loading = /*@__PURE__*/ proxyCustomElement(class Loading extends HTMLEleme
|
|
|
116
116
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
117
117
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
118
118
|
this.delegateController = createDelegateController(this);
|
|
119
|
+
this.lockController = createLockController();
|
|
119
120
|
this.triggerController = createTriggerController();
|
|
120
121
|
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
121
122
|
this.presented = false;
|
|
@@ -181,24 +182,13 @@ const Loading = /*@__PURE__*/ proxyCustomElement(class Loading extends HTMLEleme
|
|
|
181
182
|
* Present the loading overlay after it has been created.
|
|
182
183
|
*/
|
|
183
184
|
async present() {
|
|
184
|
-
|
|
185
|
-
* When using an inline loading indicator
|
|
186
|
-
* and dismissing a loading indicator it is possible to
|
|
187
|
-
* quickly present the loading indicator while it is
|
|
188
|
-
* dismissing. We need to await any current
|
|
189
|
-
* transition to allow the dismiss to finish
|
|
190
|
-
* before presenting again.
|
|
191
|
-
*/
|
|
192
|
-
if (this.currentTransition !== undefined) {
|
|
193
|
-
await this.currentTransition;
|
|
194
|
-
}
|
|
185
|
+
const unlock = await this.lockController.lock();
|
|
195
186
|
await this.delegateController.attachViewToDom();
|
|
196
|
-
|
|
197
|
-
await this.currentTransition;
|
|
187
|
+
await present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation);
|
|
198
188
|
if (this.duration > 0) {
|
|
199
189
|
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
|
|
200
190
|
}
|
|
201
|
-
|
|
191
|
+
unlock();
|
|
202
192
|
}
|
|
203
193
|
/**
|
|
204
194
|
* Dismiss the loading overlay after it has been presented.
|
|
@@ -210,14 +200,15 @@ const Loading = /*@__PURE__*/ proxyCustomElement(class Loading extends HTMLEleme
|
|
|
210
200
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
211
201
|
*/
|
|
212
202
|
async dismiss(data, role) {
|
|
203
|
+
const unlock = await this.lockController.lock();
|
|
213
204
|
if (this.durationTimeout) {
|
|
214
205
|
clearTimeout(this.durationTimeout);
|
|
215
206
|
}
|
|
216
|
-
|
|
217
|
-
const dismissed = await this.currentTransition;
|
|
207
|
+
const dismissed = await dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
218
208
|
if (dismissed) {
|
|
219
209
|
this.delegateController.removeViewFromDom();
|
|
220
210
|
}
|
|
211
|
+
unlock();
|
|
221
212
|
return dismissed;
|
|
222
213
|
}
|
|
223
214
|
/**
|
package/components/ion-menu.js
CHANGED
|
@@ -7,7 +7,7 @@ import { d as doc } from './index5.js';
|
|
|
7
7
|
import { G as GESTURE_CONTROLLER } from './gesture-controller.js';
|
|
8
8
|
import { o as isEndSide, i as inheritAriaAttributes, p as assert, m as clamp } from './helpers.js';
|
|
9
9
|
import { m as menuController } from './index4.js';
|
|
10
|
-
import {
|
|
10
|
+
import { q as getOverlay } from './overlays.js';
|
|
11
11
|
import { c as config, b as getIonMode } from './ionic-global.js';
|
|
12
12
|
import { d as defineCustomElement$2 } from './backdrop.js';
|
|
13
13
|
|
package/components/ion-modal.js
CHANGED
|
@@ -7,7 +7,7 @@ import { C as CoreDelegate, a as attachComponent, d as detachComponent } from '.
|
|
|
7
7
|
import { g as getElementRoot, m as clamp, r as raf, d as inheritAttributes, l as hasLazyBuild } from './helpers.js';
|
|
8
8
|
import { p as printIonWarning } from './index6.js';
|
|
9
9
|
import { g as getCapacitor } from './capacitor.js';
|
|
10
|
-
import { G as GESTURE, e as createTriggerController, B as BACKDROP,
|
|
10
|
+
import { G as GESTURE, e as createLockController, f as createTriggerController, B as BACKDROP, k as prepareOverlay, n as setOverlayId, g as present, r as activeAnimations, h as dismiss, j as eventMethod } from './overlays.js';
|
|
11
11
|
import { g as getClassMap } from './theme.js';
|
|
12
12
|
import { e as deepReady, w as waitForMount } from './index3.js';
|
|
13
13
|
import { b as getIonMode, c as config } from './ionic-global.js';
|
|
@@ -1113,6 +1113,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1113
1113
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
1114
1114
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
1115
1115
|
this.ionMount = createEvent(this, "ionMount", 7);
|
|
1116
|
+
this.lockController = createLockController();
|
|
1116
1117
|
this.triggerController = createTriggerController();
|
|
1117
1118
|
this.coreDelegate = CoreDelegate();
|
|
1118
1119
|
this.isSheetModal = false;
|
|
@@ -1280,18 +1281,8 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1280
1281
|
if (this.presented) {
|
|
1281
1282
|
return;
|
|
1282
1283
|
}
|
|
1284
|
+
const unlock = await this.lockController.lock();
|
|
1283
1285
|
const { presentingElement, el } = this;
|
|
1284
|
-
/**
|
|
1285
|
-
* When using an inline modal
|
|
1286
|
-
* and dismissing a modal it is possible to
|
|
1287
|
-
* quickly present the modal while it is
|
|
1288
|
-
* dismissing. We need to await any current
|
|
1289
|
-
* transition to allow the dismiss to finish
|
|
1290
|
-
* before presenting again.
|
|
1291
|
-
*/
|
|
1292
|
-
if (this.currentTransition !== undefined) {
|
|
1293
|
-
await this.currentTransition;
|
|
1294
|
-
}
|
|
1295
1286
|
/**
|
|
1296
1287
|
* If the modal is presented multiple times (inline modals), we
|
|
1297
1288
|
* need to reset the current breakpoint to the initial breakpoint.
|
|
@@ -1323,11 +1314,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1323
1314
|
await waitForMount();
|
|
1324
1315
|
}
|
|
1325
1316
|
writeTask(() => this.el.classList.add('show-modal'));
|
|
1326
|
-
this.currentTransition = present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
1327
|
-
presentingEl: presentingElement,
|
|
1328
|
-
currentBreakpoint: this.initialBreakpoint,
|
|
1329
|
-
backdropBreakpoint: this.backdropBreakpoint,
|
|
1330
|
-
});
|
|
1331
1317
|
/* tslint:disable-next-line */
|
|
1332
1318
|
if (typeof window !== 'undefined') {
|
|
1333
1319
|
/**
|
|
@@ -1370,14 +1356,18 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1370
1356
|
this.statusBarStyle = await StatusBar.getStyle();
|
|
1371
1357
|
setCardStatusBarDark();
|
|
1372
1358
|
}
|
|
1373
|
-
await this
|
|
1359
|
+
await present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
1360
|
+
presentingEl: presentingElement,
|
|
1361
|
+
currentBreakpoint: this.initialBreakpoint,
|
|
1362
|
+
backdropBreakpoint: this.backdropBreakpoint,
|
|
1363
|
+
});
|
|
1374
1364
|
if (this.isSheetModal) {
|
|
1375
1365
|
this.initSheetGesture();
|
|
1376
1366
|
}
|
|
1377
1367
|
else if (hasCardModal) {
|
|
1378
1368
|
this.initSwipeToClose();
|
|
1379
1369
|
}
|
|
1380
|
-
|
|
1370
|
+
unlock();
|
|
1381
1371
|
}
|
|
1382
1372
|
initSwipeToClose() {
|
|
1383
1373
|
var _a;
|
|
@@ -1467,6 +1457,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1467
1457
|
if (this.gestureAnimationDismissing && role !== GESTURE) {
|
|
1468
1458
|
return false;
|
|
1469
1459
|
}
|
|
1460
|
+
const unlock = await this.lockController.lock();
|
|
1470
1461
|
/**
|
|
1471
1462
|
* If a canDismiss handler is responsible
|
|
1472
1463
|
* for calling the dismiss method, we should
|
|
@@ -1490,24 +1481,12 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1490
1481
|
window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
1491
1482
|
this.keyboardOpenCallback = undefined;
|
|
1492
1483
|
}
|
|
1493
|
-
/**
|
|
1494
|
-
* When using an inline modal
|
|
1495
|
-
* and presenting a modal it is possible to
|
|
1496
|
-
* quickly dismiss the modal while it is
|
|
1497
|
-
* presenting. We need to await any current
|
|
1498
|
-
* transition to allow the present to finish
|
|
1499
|
-
* before dismissing again.
|
|
1500
|
-
*/
|
|
1501
|
-
if (this.currentTransition !== undefined) {
|
|
1502
|
-
await this.currentTransition;
|
|
1503
|
-
}
|
|
1504
1484
|
const enteringAnimation = activeAnimations.get(this) || [];
|
|
1505
|
-
|
|
1485
|
+
const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, {
|
|
1506
1486
|
presentingEl: presentingElement,
|
|
1507
1487
|
currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
|
|
1508
1488
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
1509
1489
|
});
|
|
1510
|
-
const dismissed = await this.currentTransition;
|
|
1511
1490
|
if (dismissed) {
|
|
1512
1491
|
const { delegate } = this.getDelegate();
|
|
1513
1492
|
await detachComponent(delegate, this.usersElement);
|
|
@@ -1521,8 +1500,8 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
|
|
|
1521
1500
|
enteringAnimation.forEach((ani) => ani.destroy());
|
|
1522
1501
|
}
|
|
1523
1502
|
this.currentBreakpoint = undefined;
|
|
1524
|
-
this.currentTransition = undefined;
|
|
1525
1503
|
this.animation = undefined;
|
|
1504
|
+
unlock();
|
|
1526
1505
|
return dismissed;
|
|
1527
1506
|
}
|
|
1528
1507
|
/**
|
package/components/ion-picker.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { r as raf } from './helpers.js';
|
|
6
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel,
|
|
6
|
+
import { d as createDelegateController, e as createLockController, f as createTriggerController, B as BACKDROP, i as isCancel, k as prepareOverlay, n as setOverlayId, g as present, h as dismiss, j as eventMethod, s as safeCall } from './overlays.js';
|
|
7
7
|
import { g as getClassMap } from './theme.js';
|
|
8
8
|
import { b as getIonMode } from './ionic-global.js';
|
|
9
9
|
import { c as createAnimation } from './animation.js';
|
|
@@ -71,6 +71,7 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class Picker extends HTMLElement
|
|
|
71
71
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
72
72
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
73
73
|
this.delegateController = createDelegateController(this);
|
|
74
|
+
this.lockController = createLockController();
|
|
74
75
|
this.triggerController = createTriggerController();
|
|
75
76
|
this.onBackdropTap = () => {
|
|
76
77
|
this.dismiss(undefined, BACKDROP);
|
|
@@ -137,24 +138,13 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class Picker extends HTMLElement
|
|
|
137
138
|
* Present the picker overlay after it has been created.
|
|
138
139
|
*/
|
|
139
140
|
async present() {
|
|
140
|
-
|
|
141
|
-
* When using an inline picker
|
|
142
|
-
* and dismissing an picker it is possible to
|
|
143
|
-
* quickly present the picker while it is
|
|
144
|
-
* dismissing. We need to await any current
|
|
145
|
-
* transition to allow the dismiss to finish
|
|
146
|
-
* before presenting again.
|
|
147
|
-
*/
|
|
148
|
-
if (this.currentTransition !== undefined) {
|
|
149
|
-
await this.currentTransition;
|
|
150
|
-
}
|
|
141
|
+
const unlock = await this.lockController.lock();
|
|
151
142
|
await this.delegateController.attachViewToDom();
|
|
152
|
-
|
|
153
|
-
await this.currentTransition;
|
|
154
|
-
this.currentTransition = undefined;
|
|
143
|
+
await present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);
|
|
155
144
|
if (this.duration > 0) {
|
|
156
145
|
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
|
|
157
146
|
}
|
|
147
|
+
unlock();
|
|
158
148
|
}
|
|
159
149
|
/**
|
|
160
150
|
* Dismiss the picker overlay after it has been presented.
|
|
@@ -166,14 +156,15 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class Picker extends HTMLElement
|
|
|
166
156
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
167
157
|
*/
|
|
168
158
|
async dismiss(data, role) {
|
|
159
|
+
const unlock = await this.lockController.lock();
|
|
169
160
|
if (this.durationTimeout) {
|
|
170
161
|
clearTimeout(this.durationTimeout);
|
|
171
162
|
}
|
|
172
|
-
|
|
173
|
-
const dismissed = await this.currentTransition;
|
|
163
|
+
const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);
|
|
174
164
|
if (dismissed) {
|
|
175
165
|
this.delegateController.removeViewFromDom();
|
|
176
166
|
}
|
|
167
|
+
unlock();
|
|
177
168
|
return dismissed;
|
|
178
169
|
}
|
|
179
170
|
/**
|
package/components/ion-toast.js
CHANGED
|
@@ -5,7 +5,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config.js';
|
|
6
6
|
import { g as getElementRoot, r as raf } from './helpers.js';
|
|
7
7
|
import { p as printIonWarning } from './index6.js';
|
|
8
|
-
import { d as createDelegateController, e as createTriggerController, i as isCancel,
|
|
8
|
+
import { d as createDelegateController, e as createLockController, f as createTriggerController, i as isCancel, k as prepareOverlay, n as setOverlayId, g as present, h as dismiss, j as eventMethod, s as safeCall } from './overlays.js';
|
|
9
9
|
import { g as getClassMap, c as createColorClasses } from './theme.js';
|
|
10
10
|
import { c as config, b as getIonMode } from './ionic-global.js';
|
|
11
11
|
import { c as createAnimation } from './animation.js';
|
|
@@ -123,6 +123,7 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class Toast extends HTMLElement {
|
|
|
123
123
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
124
124
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
125
125
|
this.delegateController = createDelegateController(this);
|
|
126
|
+
this.lockController = createLockController();
|
|
126
127
|
this.triggerController = createTriggerController();
|
|
127
128
|
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
128
129
|
this.presented = false;
|
|
@@ -192,30 +193,19 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class Toast extends HTMLElement {
|
|
|
192
193
|
* Present the toast overlay after it has been created.
|
|
193
194
|
*/
|
|
194
195
|
async present() {
|
|
195
|
-
|
|
196
|
-
* When using an inline toast
|
|
197
|
-
* and dismissing a toast it is possible to
|
|
198
|
-
* quickly present the toast while it is
|
|
199
|
-
* dismissing. We need to await any current
|
|
200
|
-
* transition to allow the dismiss to finish
|
|
201
|
-
* before presenting again.
|
|
202
|
-
*/
|
|
203
|
-
if (this.currentTransition !== undefined) {
|
|
204
|
-
await this.currentTransition;
|
|
205
|
-
}
|
|
196
|
+
const unlock = await this.lockController.lock();
|
|
206
197
|
await this.delegateController.attachViewToDom();
|
|
207
|
-
|
|
208
|
-
await this.currentTransition;
|
|
198
|
+
await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, this.position);
|
|
209
199
|
/**
|
|
210
200
|
* Content is revealed to screen readers after
|
|
211
201
|
* the transition to avoid jank since this
|
|
212
202
|
* state updates will cause a re-render.
|
|
213
203
|
*/
|
|
214
204
|
this.revealContentToScreenReader = true;
|
|
215
|
-
this.currentTransition = undefined;
|
|
216
205
|
if (this.duration > 0) {
|
|
217
206
|
this.durationTimeout = setTimeout(() => this.dismiss(undefined, 'timeout'), this.duration);
|
|
218
207
|
}
|
|
208
|
+
unlock();
|
|
219
209
|
}
|
|
220
210
|
/**
|
|
221
211
|
* Dismiss the toast overlay after it has been presented.
|
|
@@ -227,15 +217,16 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class Toast extends HTMLElement {
|
|
|
227
217
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
228
218
|
*/
|
|
229
219
|
async dismiss(data, role) {
|
|
220
|
+
const unlock = await this.lockController.lock();
|
|
230
221
|
if (this.durationTimeout) {
|
|
231
222
|
clearTimeout(this.durationTimeout);
|
|
232
223
|
}
|
|
233
|
-
|
|
234
|
-
const dismissed = await this.currentTransition;
|
|
224
|
+
const dismissed = await dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, this.position);
|
|
235
225
|
if (dismissed) {
|
|
236
226
|
this.delegateController.removeViewFromDom();
|
|
237
227
|
this.revealContentToScreenReader = false;
|
|
238
228
|
}
|
|
229
|
+
unlock();
|
|
239
230
|
return dismissed;
|
|
240
231
|
}
|
|
241
232
|
/**
|
package/components/overlays.js
CHANGED
|
@@ -617,6 +617,27 @@ const createDelegateController = (ref) => {
|
|
|
617
617
|
removeViewFromDom,
|
|
618
618
|
};
|
|
619
619
|
};
|
|
620
|
+
/**
|
|
621
|
+
* Creates a lock controller.
|
|
622
|
+
*
|
|
623
|
+
* This function locks transitions.
|
|
624
|
+
* The unlock() function within it calls resolve on this function, unlocking the transitions.
|
|
625
|
+
*/
|
|
626
|
+
const createLockController = () => {
|
|
627
|
+
let waitPromise;
|
|
628
|
+
const lock = async () => {
|
|
629
|
+
const p = waitPromise;
|
|
630
|
+
let resolve;
|
|
631
|
+
waitPromise = new Promise((r) => (resolve = r));
|
|
632
|
+
if (p !== undefined) {
|
|
633
|
+
await p;
|
|
634
|
+
}
|
|
635
|
+
return resolve;
|
|
636
|
+
};
|
|
637
|
+
return {
|
|
638
|
+
lock,
|
|
639
|
+
};
|
|
640
|
+
};
|
|
620
641
|
/**
|
|
621
642
|
* Constructs a trigger interaction for an overlay.
|
|
622
643
|
* Presents an overlay when the trigger is clicked.
|
|
@@ -668,4 +689,4 @@ const createTriggerController = () => {
|
|
|
668
689
|
};
|
|
669
690
|
};
|
|
670
691
|
|
|
671
|
-
export { BACKDROP as B, GESTURE as G, alertController as a, actionSheetController as b, popoverController as c, createDelegateController as d,
|
|
692
|
+
export { BACKDROP as B, GESTURE as G, alertController as a, actionSheetController as b, popoverController as c, createDelegateController as d, createLockController as e, createTriggerController as f, present as g, dismiss as h, isCancel as i, eventMethod as j, prepareOverlay as k, loadingController as l, modalController as m, setOverlayId as n, focusFirstDescendant as o, pickerController as p, getOverlay as q, activeAnimations as r, safeCall as s, toastController as t };
|
package/components/popover.js
CHANGED
|
@@ -5,7 +5,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
5
5
|
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate.js';
|
|
6
6
|
import { r as raf, g as getElementRoot, a as addEventListener, l as hasLazyBuild } from './helpers.js';
|
|
7
7
|
import { p as printIonWarning } from './index6.js';
|
|
8
|
-
import { B as BACKDROP,
|
|
8
|
+
import { e as createLockController, B as BACKDROP, k as prepareOverlay, n as setOverlayId, g as present, o as focusFirstDescendant, h as dismiss, j as eventMethod } from './overlays.js';
|
|
9
9
|
import { b as getIonMode, a as isPlatform } from './ionic-global.js';
|
|
10
10
|
import { g as getClassMap } from './theme.js';
|
|
11
11
|
import { e as deepReady, w as waitForMount } from './index3.js';
|
|
@@ -984,6 +984,7 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
984
984
|
this.ionMount = createEvent(this, "ionMount", 7);
|
|
985
985
|
this.parentPopover = null;
|
|
986
986
|
this.coreDelegate = CoreDelegate();
|
|
987
|
+
this.lockController = createLockController();
|
|
987
988
|
this.inline = false;
|
|
988
989
|
this.focusDescendantOnPresent = false;
|
|
989
990
|
this.onBackdropTap = () => {
|
|
@@ -1160,25 +1161,15 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1160
1161
|
if (this.presented) {
|
|
1161
1162
|
return;
|
|
1162
1163
|
}
|
|
1163
|
-
|
|
1164
|
-
* When using an inline popover
|
|
1165
|
-
* and dismissing a popover it is possible to
|
|
1166
|
-
* quickly present the popover while it is
|
|
1167
|
-
* dismissing. We need to await any current
|
|
1168
|
-
* transition to allow the dismiss to finish
|
|
1169
|
-
* before presenting again.
|
|
1170
|
-
*/
|
|
1171
|
-
if (this.currentTransition !== undefined) {
|
|
1172
|
-
await this.currentTransition;
|
|
1173
|
-
}
|
|
1164
|
+
const unlock = await this.lockController.lock();
|
|
1174
1165
|
const { el } = this;
|
|
1175
1166
|
const { inline, delegate } = this.getDelegate(true);
|
|
1176
|
-
this.ionMount.emit();
|
|
1177
1167
|
this.usersElement = await attachComponent(delegate, el, this.component, ['popover-viewport'], this.componentProps, inline);
|
|
1178
1168
|
if (!this.keyboardEvents) {
|
|
1179
1169
|
this.configureKeyboardInteraction();
|
|
1180
1170
|
}
|
|
1181
1171
|
this.configureDismissInteraction();
|
|
1172
|
+
this.ionMount.emit();
|
|
1182
1173
|
/**
|
|
1183
1174
|
* When using the lazy loaded build of Stencil, we need to wait
|
|
1184
1175
|
* for every Stencil component instance to be ready before presenting
|
|
@@ -1201,7 +1192,7 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1201
1192
|
else if (!this.keepContentsMounted) {
|
|
1202
1193
|
await waitForMount();
|
|
1203
1194
|
}
|
|
1204
|
-
|
|
1195
|
+
await present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
1205
1196
|
event: event || this.event,
|
|
1206
1197
|
size: this.size,
|
|
1207
1198
|
trigger: this.triggerEl,
|
|
@@ -1209,8 +1200,6 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1209
1200
|
side: this.side,
|
|
1210
1201
|
align: this.alignment,
|
|
1211
1202
|
});
|
|
1212
|
-
await this.currentTransition;
|
|
1213
|
-
this.currentTransition = undefined;
|
|
1214
1203
|
/**
|
|
1215
1204
|
* If popover is nested and was
|
|
1216
1205
|
* presented using the "Right" arrow key,
|
|
@@ -1220,6 +1209,7 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1220
1209
|
if (this.focusDescendantOnPresent) {
|
|
1221
1210
|
focusFirstDescendant(this.el, this.el);
|
|
1222
1211
|
}
|
|
1212
|
+
unlock();
|
|
1223
1213
|
}
|
|
1224
1214
|
/**
|
|
1225
1215
|
* Dismiss the popover overlay after it has been presented.
|
|
@@ -1230,23 +1220,12 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1230
1220
|
* a parent popover if this popover is nested. Defaults to `true`.
|
|
1231
1221
|
*/
|
|
1232
1222
|
async dismiss(data, role, dismissParentPopover = true) {
|
|
1233
|
-
|
|
1234
|
-
* When using an inline popover
|
|
1235
|
-
* and presenting a popover it is possible to
|
|
1236
|
-
* quickly dismiss the popover while it is
|
|
1237
|
-
* presenting. We need to await any current
|
|
1238
|
-
* transition to allow the present to finish
|
|
1239
|
-
* before dismissing again.
|
|
1240
|
-
*/
|
|
1241
|
-
if (this.currentTransition !== undefined) {
|
|
1242
|
-
await this.currentTransition;
|
|
1243
|
-
}
|
|
1223
|
+
const unlock = await this.lockController.lock();
|
|
1244
1224
|
const { destroyKeyboardInteraction, destroyDismissInteraction } = this;
|
|
1245
1225
|
if (dismissParentPopover && this.parentPopover) {
|
|
1246
1226
|
this.parentPopover.dismiss(data, role, dismissParentPopover);
|
|
1247
1227
|
}
|
|
1248
|
-
|
|
1249
|
-
const shouldDismiss = await this.currentTransition;
|
|
1228
|
+
const shouldDismiss = await dismiss(this, data, role, 'popoverLeave', iosLeaveAnimation, mdLeaveAnimation, this.event);
|
|
1250
1229
|
if (shouldDismiss) {
|
|
1251
1230
|
if (destroyKeyboardInteraction) {
|
|
1252
1231
|
destroyKeyboardInteraction();
|
|
@@ -1264,7 +1243,7 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
|
|
|
1264
1243
|
const { delegate } = this.getDelegate();
|
|
1265
1244
|
await detachComponent(delegate, this.usersElement);
|
|
1266
1245
|
}
|
|
1267
|
-
|
|
1246
|
+
unlock();
|
|
1268
1247
|
return shouldDismiss;
|
|
1269
1248
|
}
|
|
1270
1249
|
/**
|
|
@@ -41,7 +41,6 @@ const CoreDelegate = () => {
|
|
|
41
41
|
const attachViewToDom = async (parentElement, userComponent, userComponentProps = {}, cssClasses = []) => {
|
|
42
42
|
var _a, _b;
|
|
43
43
|
BaseComponent = parentElement;
|
|
44
|
-
let ChildComponent;
|
|
45
44
|
/**
|
|
46
45
|
* If passing in a component via the `component` props
|
|
47
46
|
* we need to append it inside of our overlay component.
|
|
@@ -68,7 +67,6 @@ const CoreDelegate = () => {
|
|
|
68
67
|
* inside of the overlay component.
|
|
69
68
|
*/
|
|
70
69
|
BaseComponent.appendChild(el);
|
|
71
|
-
ChildComponent = el;
|
|
72
70
|
await new Promise((resolve) => helpers.componentOnReady(el, resolve));
|
|
73
71
|
}
|
|
74
72
|
else if (BaseComponent.children.length > 0 &&
|
|
@@ -77,7 +75,7 @@ const CoreDelegate = () => {
|
|
|
77
75
|
* The delegate host wrapper el is only needed for modals and popovers
|
|
78
76
|
* because they allow the dev to provide custom content to the overlay.
|
|
79
77
|
*/
|
|
80
|
-
const root =
|
|
78
|
+
const root = BaseComponent.children[0];
|
|
81
79
|
if (!root.classList.contains('ion-delegate-host')) {
|
|
82
80
|
/**
|
|
83
81
|
* If the root element is not a delegate host, it means
|
|
@@ -92,7 +90,6 @@ const CoreDelegate = () => {
|
|
|
92
90
|
el.append(...BaseComponent.children);
|
|
93
91
|
// Append the new parent element to the original parent element.
|
|
94
92
|
BaseComponent.appendChild(el);
|
|
95
|
-
ChildComponent = el;
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
95
|
/**
|
|
@@ -108,7 +105,7 @@ const CoreDelegate = () => {
|
|
|
108
105
|
Reference = document.createComment('ionic teleport');
|
|
109
106
|
BaseComponent.parentNode.insertBefore(Reference, BaseComponent);
|
|
110
107
|
app.appendChild(BaseComponent);
|
|
111
|
-
return
|
|
108
|
+
return BaseComponent;
|
|
112
109
|
};
|
|
113
110
|
const removeViewFromDom = () => {
|
|
114
111
|
/**
|