@ionic/core 7.7.2-nightly.20240208 → 7.7.2-nightly.20240212
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 +7 -3
- package/components/alert.js +6 -2
- package/components/ion-loading.js +6 -2
- package/components/ion-modal.js +7 -3
- package/components/ion-picker.js +6 -2
- package/components/ion-toast.js +6 -2
- package/components/overlays.js +25 -1
- package/components/popover.js +6 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -4
- package/dist/cjs/ion-alert.cjs.entry.js +7 -3
- package/dist/cjs/ion-datetime_3.cjs.entry.js +7 -3
- package/dist/cjs/ion-loading.cjs.entry.js +7 -3
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +8 -4
- package/dist/cjs/ion-popover.cjs.entry.js +7 -3
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +7 -3
- package/dist/cjs/{overlays-c0b199e9.js → overlays-853fbc2a.js} +25 -1
- package/dist/collection/components/action-sheet/action-sheet.js +9 -5
- package/dist/collection/components/alert/alert.js +8 -4
- package/dist/collection/components/loading/loading.js +8 -4
- package/dist/collection/components/modal/modal.js +9 -5
- package/dist/collection/components/picker/picker.js +8 -4
- package/dist/collection/components/popover/popover.js +8 -4
- package/dist/collection/components/toast/test/toast.spec.js +12 -0
- package/dist/collection/components/toast/toast.js +8 -4
- package/dist/collection/utils/overlays.js +25 -1
- package/dist/collection/utils/test/overlays/overlays.spec.js +51 -0
- package/dist/docs.json +22 -22
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +8 -4
- package/dist/esm/ion-alert.entry.js +7 -3
- package/dist/esm/ion-datetime_3.entry.js +7 -3
- package/dist/esm/ion-loading.entry.js +7 -3
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +8 -4
- package/dist/esm/ion-popover.entry.js +7 -3
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +7 -3
- package/dist/esm/{overlays-141e4a0f.js → overlays-f628ea0d.js} +25 -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-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-popover.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/overlays-f628ea0d.js +4 -0
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-09104e40.system.entry.js → p-02228941.system.entry.js} +1 -1
- package/dist/ionic/{p-77b5178b.system.entry.js → p-03ef11fd.system.entry.js} +1 -1
- package/dist/ionic/p-33c1d796.system.js +1 -1
- package/dist/ionic/{p-84074821.entry.js → p-36129d85.entry.js} +1 -1
- package/dist/ionic/{p-1e516e45.entry.js → p-379dc0d8.entry.js} +1 -1
- package/dist/ionic/{p-f3d6ac85.system.entry.js → p-3996f9d5.system.entry.js} +1 -1
- package/dist/ionic/p-554cdfa6.js +4 -0
- package/dist/ionic/{p-1c425012.system.entry.js → p-6b5ddd6f.system.entry.js} +2 -2
- package/dist/ionic/{p-34c60592.system.entry.js → p-6c03fe3f.system.entry.js} +1 -1
- package/dist/ionic/{p-bbfd2cd0.system.entry.js → p-779fb2ab.system.entry.js} +1 -1
- package/dist/ionic/{p-6869d193.system.entry.js → p-7b71daed.system.entry.js} +1 -1
- package/dist/ionic/{p-c5ae804f.entry.js → p-80c7dd10.entry.js} +1 -1
- package/dist/ionic/{p-59b06910.entry.js → p-9e986623.entry.js} +1 -1
- package/dist/ionic/{p-7d9f8991.entry.js → p-a06dd73e.entry.js} +1 -1
- package/dist/ionic/{p-8942c4f0.entry.js → p-a726c887.entry.js} +1 -1
- package/dist/ionic/{p-389a681c.entry.js → p-a9de90a5.entry.js} +1 -1
- package/dist/ionic/{p-0c2363a9.system.js → p-b964aaa3.system.js} +1 -1
- package/dist/ionic/{p-79ff281e.entry.js → p-c05246a7.entry.js} +1 -1
- package/dist/ionic/{p-62ea79fb.system.js → p-c2895673.system.js} +1 -1
- package/dist/ionic/{p-10f54620.entry.js → p-c98011a7.entry.js} +1 -1
- package/dist/ionic/{p-a29e7420.system.entry.js → p-d51bf7d0.system.entry.js} +1 -1
- package/dist/ionic/{p-223b1692.system.entry.js → p-e49bc381.system.entry.js} +1 -1
- package/dist/types/components/action-sheet/action-sheet.d.ts +4 -0
- package/dist/types/components/alert/alert.d.ts +4 -0
- package/dist/types/components/loading/loading.d.ts +4 -0
- package/dist/types/components/modal/modal.d.ts +4 -0
- package/dist/types/components/picker/picker.d.ts +4 -0
- package/dist/types/components/popover/popover.d.ts +4 -0
- package/dist/types/components/toast/toast.d.ts +4 -0
- package/dist/types/components.d.ts +7 -7
- package/hydrate/index.js +69 -17
- package/package.json +2 -2
- package/dist/esm-es5/overlays-141e4a0f.js +0 -4
- package/dist/ionic/p-7888a87b.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -10383,6 +10383,15 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
10383
10383
|
return;
|
|
10384
10384
|
}
|
|
10385
10385
|
setRootAriaHidden(true);
|
|
10386
|
+
/**
|
|
10387
|
+
* Hide all other overlays from screen readers so only this one
|
|
10388
|
+
* can be read. Note that presenting an overlay always makes
|
|
10389
|
+
* it the topmost one.
|
|
10390
|
+
*/
|
|
10391
|
+
if (doc !== undefined) {
|
|
10392
|
+
const presentedOverlays = getPresentedOverlays(doc);
|
|
10393
|
+
presentedOverlays.forEach((o) => o.setAttribute('aria-hidden', 'true'));
|
|
10394
|
+
}
|
|
10386
10395
|
overlay.presented = true;
|
|
10387
10396
|
overlay.willPresent.emit();
|
|
10388
10397
|
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
@@ -10416,6 +10425,14 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
10416
10425
|
if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
|
|
10417
10426
|
overlay.el.focus();
|
|
10418
10427
|
}
|
|
10428
|
+
/**
|
|
10429
|
+
* If this overlay was previously dismissed without being
|
|
10430
|
+
* the topmost one (such as by manually calling dismiss()),
|
|
10431
|
+
* it would still have aria-hidden on being presented again.
|
|
10432
|
+
* Removing it here ensures the overlay is visible to screen
|
|
10433
|
+
* readers.
|
|
10434
|
+
*/
|
|
10435
|
+
overlay.el.removeAttribute('aria-hidden');
|
|
10419
10436
|
};
|
|
10420
10437
|
/**
|
|
10421
10438
|
* When an overlay component is dismissed,
|
|
@@ -10441,7 +10458,7 @@ const focusPreviousElementOnDismiss = async (overlayEl) => {
|
|
|
10441
10458
|
previousElement.focus();
|
|
10442
10459
|
};
|
|
10443
10460
|
const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
10444
|
-
var _a, _b;
|
|
10461
|
+
var _a, _b, _c;
|
|
10445
10462
|
if (!overlay.presented) {
|
|
10446
10463
|
return false;
|
|
10447
10464
|
}
|
|
@@ -10492,6 +10509,13 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
10492
10509
|
console.error(err);
|
|
10493
10510
|
}
|
|
10494
10511
|
overlay.el.remove();
|
|
10512
|
+
/**
|
|
10513
|
+
* If there are other overlays presented, unhide the new
|
|
10514
|
+
* topmost one from screen readers.
|
|
10515
|
+
*/
|
|
10516
|
+
if (doc !== undefined) {
|
|
10517
|
+
(_c = getPresentedOverlay(doc)) === null || _c === void 0 ? void 0 : _c.removeAttribute('aria-hidden');
|
|
10518
|
+
}
|
|
10495
10519
|
return true;
|
|
10496
10520
|
};
|
|
10497
10521
|
const getAppRoot = (doc) => {
|
|
@@ -11946,6 +11970,10 @@ class ActionSheet {
|
|
|
11946
11970
|
* This can be useful in a button handler for determining which button was
|
|
11947
11971
|
* clicked to dismiss the action sheet.
|
|
11948
11972
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
11973
|
+
*
|
|
11974
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
11975
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
11976
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
11949
11977
|
*/
|
|
11950
11978
|
async dismiss(data, role) {
|
|
11951
11979
|
const unlock = await this.lockController.lock();
|
|
@@ -12054,12 +12082,12 @@ class ActionSheet {
|
|
|
12054
12082
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
12055
12083
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
12056
12084
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
12057
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
12085
|
+
return (hAsync(Host, Object.assign({ key: 'cd141d12d7d86d3402fd220c4afb61cdbf064c04', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
12058
12086
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
12059
|
-
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '
|
|
12087
|
+
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: 'b6a051e2cf5e101edbf59c8a40a04d8f7107fb3c', tappable: this.backdropDismiss }), hAsync("div", { key: '5bfa2b37a417aaff3776f06d92a8544dfcbf714f', tabindex: "0" }), hAsync("div", { key: '77d5a217803fd7be8f8dbedcd0ef5e59f0fd9800', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, hAsync("div", { key: '3901d56215f05cdab074e2ec321391281a165097', class: "action-sheet-container" }, hAsync("div", { key: '275f5c7981b2ee44fb632b3d137c7209cbfcf45c', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (hAsync("div", { id: headerID, class: {
|
|
12060
12088
|
'action-sheet-title': true,
|
|
12061
12089
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
12062
|
-
} }, header, this.subHeader && hAsync("div", { class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (hAsync("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass$3(b), onClick: () => this.buttonClick(b) }), hAsync("span", { class: "action-sheet-button-inner" }, b.icon && hAsync("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && hAsync("ion-ripple-effect", null))))), cancelButton && (hAsync("div", { class: "action-sheet-group action-sheet-group-cancel" }, hAsync("button", Object.assign({}, cancelButton.htmlAttributes, { type: "button", class: buttonClass$3(cancelButton), onClick: () => this.buttonClick(cancelButton) }), hAsync("span", { class: "action-sheet-button-inner" }, cancelButton.icon && (hAsync("ion-icon", { icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && hAsync("ion-ripple-effect", null)))))), hAsync("div", { key: '
|
|
12090
|
+
} }, header, this.subHeader && hAsync("div", { class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (hAsync("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass$3(b), onClick: () => this.buttonClick(b) }), hAsync("span", { class: "action-sheet-button-inner" }, b.icon && hAsync("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && hAsync("ion-ripple-effect", null))))), cancelButton && (hAsync("div", { class: "action-sheet-group action-sheet-group-cancel" }, hAsync("button", Object.assign({}, cancelButton.htmlAttributes, { type: "button", class: buttonClass$3(cancelButton), onClick: () => this.buttonClick(cancelButton) }), hAsync("span", { class: "action-sheet-button-inner" }, cancelButton.icon && (hAsync("ion-icon", { icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && hAsync("ion-ripple-effect", null)))))), hAsync("div", { key: '4285893438675be9b40838a93c2ff382a1074cd3', tabindex: "0" })));
|
|
12063
12091
|
}
|
|
12064
12092
|
get el() { return getElement(this); }
|
|
12065
12093
|
static get watchers() { return {
|
|
@@ -12573,6 +12601,10 @@ class Alert {
|
|
|
12573
12601
|
* This can be useful in a button handler for determining which button was
|
|
12574
12602
|
* clicked to dismiss the alert.
|
|
12575
12603
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
12604
|
+
*
|
|
12605
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
12606
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
12607
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
12576
12608
|
*/
|
|
12577
12609
|
async dismiss(data, role) {
|
|
12578
12610
|
const unlock = await this.lockController.lock();
|
|
@@ -12738,9 +12770,9 @@ class Alert {
|
|
|
12738
12770
|
* If neither is defined, don't set aria-labelledby.
|
|
12739
12771
|
*/
|
|
12740
12772
|
const ariaLabelledBy = header ? hdrId : subHeader ? subHdrId : null;
|
|
12741
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
12773
|
+
return (hAsync(Host, Object.assign({ key: '4b7f7880dc5f39aa9b61981af0a821ac0350af7f', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
12742
12774
|
zIndex: `${20000 + overlayIndex}`,
|
|
12743
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '
|
|
12775
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '961a2684013ac61d59882914fd8d759ddb542fe7', tappable: this.backdropDismiss }), hAsync("div", { key: '2ec08c3719b3cd8a4cae09d2c6ac778ffad5f940', tabindex: "0" }), hAsync("div", { key: 'ee543683d20693c9a9497aca4d41f032aa580c9c', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, hAsync("div", { key: '55015102b67d080249a8859fc8788f3a82d5ead9', class: "alert-head" }, header && (hAsync("h2", { id: hdrId, class: "alert-title" }, header)), subHeader && (hAsync("h2", { id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), hAsync("div", { key: 'df7bcfb0cb41965f169de05edd631a050d5ce648', tabindex: "0" })));
|
|
12744
12776
|
}
|
|
12745
12777
|
get el() { return getElement(this); }
|
|
12746
12778
|
static get watchers() { return {
|
|
@@ -22467,6 +22499,10 @@ class Loading {
|
|
|
22467
22499
|
* This can be useful in a button handler for determining which button was
|
|
22468
22500
|
* clicked to dismiss the loading.
|
|
22469
22501
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
22502
|
+
*
|
|
22503
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
22504
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
22505
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
22470
22506
|
*/
|
|
22471
22507
|
async dismiss(data, role) {
|
|
22472
22508
|
const unlock = await this.lockController.lock();
|
|
@@ -22508,9 +22544,9 @@ class Loading {
|
|
|
22508
22544
|
* Otherwise, don't set aria-labelledby.
|
|
22509
22545
|
*/
|
|
22510
22546
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
22511
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
22547
|
+
return (hAsync(Host, Object.assign({ key: '95123f54ba1db5e59563d79db075315b43ed20f7', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
22512
22548
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
22513
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '
|
|
22549
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: 'e113bf123eaad38f2dafce8ea5d2ebef409d0c0f', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: '1268c9480854383c7883a79d597350540ade93c2', tabindex: "0" }), hAsync("div", { key: 'e86fc71504ebd578117dea2232d9740a087d1249', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (hAsync("div", { class: "loading-spinner" }, hAsync("ion-spinner", { name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), hAsync("div", { key: '3b91e2492e06aa65ebe77ed2b6ffb9d2f84bdd9c', tabindex: "0" })));
|
|
22514
22550
|
}
|
|
22515
22551
|
get el() { return getElement(this); }
|
|
22516
22552
|
static get watchers() { return {
|
|
@@ -25389,6 +25425,10 @@ class Modal {
|
|
|
25389
25425
|
*
|
|
25390
25426
|
* @param data Any data to emit in the dismiss events.
|
|
25391
25427
|
* @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.
|
|
25428
|
+
*
|
|
25429
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
25430
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
25431
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
25392
25432
|
*/
|
|
25393
25433
|
async dismiss(data, role) {
|
|
25394
25434
|
var _a;
|
|
@@ -25519,9 +25559,9 @@ class Modal {
|
|
|
25519
25559
|
const mode = getIonMode$1(this);
|
|
25520
25560
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
25521
25561
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
25522
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
25562
|
+
return (hAsync(Host, Object.assign({ key: '0c2c4369ab2df4ef4660addea5e927c6a0232864', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
25523
25563
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
25524
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), hAsync("ion-backdrop", { key: '
|
|
25564
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), hAsync("ion-backdrop", { key: 'd044383a776c2ee1703f996caedaedca47f2948f', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { class: "modal-shadow" }), hAsync("div", Object.assign({ key: '8d23b6a3cc9069e4d46fa0645cde9db3e6f89507',
|
|
25525
25565
|
/*
|
|
25526
25566
|
role and aria-modal must be used on the
|
|
25527
25567
|
same element. They must also be set inside the
|
|
@@ -25530,7 +25570,7 @@ class Modal {
|
|
|
25530
25570
|
*/
|
|
25531
25571
|
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { class: "modal-handle",
|
|
25532
25572
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
25533
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), hAsync("slot", { key: '
|
|
25573
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), hAsync("slot", { key: '3fbb689e4bf5575fbb26ad1000f6ac5993f3bf8f' }))));
|
|
25534
25574
|
}
|
|
25535
25575
|
get el() { return getElement(this); }
|
|
25536
25576
|
static get watchers() { return {
|
|
@@ -26760,6 +26800,10 @@ class Picker {
|
|
|
26760
26800
|
* This can be useful in a button handler for determining which button was
|
|
26761
26801
|
* clicked to dismiss the picker.
|
|
26762
26802
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
26803
|
+
*
|
|
26804
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
26805
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
26806
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
26763
26807
|
*/
|
|
26764
26808
|
async dismiss(data, role) {
|
|
26765
26809
|
const unlock = await this.lockController.lock();
|
|
@@ -26831,11 +26875,11 @@ class Picker {
|
|
|
26831
26875
|
render() {
|
|
26832
26876
|
const { htmlAttributes } = this;
|
|
26833
26877
|
const mode = getIonMode$1(this);
|
|
26834
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
26878
|
+
return (hAsync(Host, Object.assign({ key: 'c266cc072afaba2da22f70d8b62dc4bc6756d188', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
26835
26879
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
26836
26880
|
}, class: Object.assign({ [mode]: true,
|
|
26837
26881
|
// Used internally for styling
|
|
26838
|
-
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), hAsync("ion-backdrop", { key: '
|
|
26882
|
+
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), hAsync("ion-backdrop", { key: '35ee3e5028028835580e28ac2c8db65a924d5d6a', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: '8b454e6edbcfc45c57d3d8baf7c14b7905921a6e', tabindex: "0" }), hAsync("div", { key: 'e0fee78ec6d097bf0963190f748e5daad602e0f7', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, hAsync("div", { key: 'ce66bca18fc3e982ad7d6660f27cb1a03fb8247b', class: "picker-toolbar" }, this.buttons.map((b) => (hAsync("div", { class: buttonWrapperClass(b) }, hAsync("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass$1(b) }, b.text))))), hAsync("div", { key: 'a58b9523fe16f109dd6de0610717c5077fed964b', class: "picker-columns" }, hAsync("div", { key: 'acd54c0314cff51e8513a08dd9755c4b847c0617', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => hAsync("ion-picker-column", { col: c })), hAsync("div", { key: '604730bd87582d048d850c6e0a0f29ba33258918', class: "picker-below-highlight" }))), hAsync("div", { key: '93baf5e6e57aec5f084d7d5b24af14e7d8126b5a', tabindex: "0" })));
|
|
26839
26883
|
}
|
|
26840
26884
|
get el() { return getElement(this); }
|
|
26841
26885
|
static get watchers() { return {
|
|
@@ -29370,6 +29414,10 @@ class Popover {
|
|
|
29370
29414
|
* @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
|
|
29371
29415
|
* @param dismissParentPopover If `true`, dismissing this popover will also dismiss
|
|
29372
29416
|
* a parent popover if this popover is nested. Defaults to `true`.
|
|
29417
|
+
*
|
|
29418
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
29419
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
29420
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
29373
29421
|
*/
|
|
29374
29422
|
async dismiss(data, role, dismissParentPopover = true) {
|
|
29375
29423
|
const unlock = await this.lockController.lock();
|
|
@@ -29421,9 +29469,9 @@ class Popover {
|
|
|
29421
29469
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes } = this;
|
|
29422
29470
|
const desktop = isPlatform('desktop');
|
|
29423
29471
|
const enableArrow = arrow && !parentPopover;
|
|
29424
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
29472
|
+
return (hAsync(Host, Object.assign({ key: '104a5bf92a9bbd2efc71d499a8500e5d55f81711', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
29425
29473
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
29426
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && hAsync("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), hAsync("div", { key: '
|
|
29474
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && hAsync("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), hAsync("div", { key: 'ef0baa04c22444d4bc705220235a892308d67586', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && hAsync("div", { class: "popover-arrow", part: "arrow" }), hAsync("div", { key: '5cc5f5c353de614e484e9cfeacecfca9fbfde0e0', class: "popover-content", part: "content" }, hAsync("slot", { key: '2d85c591cdc85efa98afbf40f676525f1402efcf' })))));
|
|
29427
29475
|
}
|
|
29428
29476
|
get el() { return getElement(this); }
|
|
29429
29477
|
static get watchers() { return {
|
|
@@ -36970,6 +37018,10 @@ class Toast {
|
|
|
36970
37018
|
* This can be useful in a button handler for determining which button was
|
|
36971
37019
|
* clicked to dismiss the toast.
|
|
36972
37020
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
37021
|
+
*
|
|
37022
|
+
* This is a no-op if the overlay has not been presented yet. If you want
|
|
37023
|
+
* to remove an overlay from the DOM that was never presented, use the
|
|
37024
|
+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
36973
37025
|
*/
|
|
36974
37026
|
async dismiss(data, role) {
|
|
36975
37027
|
var _a, _b;
|
|
@@ -37137,9 +37189,9 @@ class Toast {
|
|
|
37137
37189
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
37138
37190
|
printIonWarning('This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
|
|
37139
37191
|
}
|
|
37140
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
37192
|
+
return (hAsync(Host, Object.assign({ key: 'c8d7e7d2baa01d3ed5d65a845bc61acf087c0b18', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
37141
37193
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
37142
|
-
}, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '
|
|
37194
|
+
}, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '27c0feeb89c4efb47c42623a4b036ed84338ed10', class: wrapperClass }, hAsync("div", { key: '41d5a3069f92e4a6acef2793fa4e236cdbdaae88', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (hAsync("ion-icon", { class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), hAsync("div", { key: '176f497bc990ef2ecc14c7fa90dd3a54a912030a', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
|
|
37143
37195
|
}
|
|
37144
37196
|
get el() { return getElement(this); }
|
|
37145
37197
|
static get watchers() { return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ionic/core",
|
|
3
|
-
"version": "7.7.2-nightly.
|
|
3
|
+
"version": "7.7.2-nightly.20240212",
|
|
4
4
|
"description": "Base components for Ionic",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ionic",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@axe-core/playwright": "^4.8.4",
|
|
40
|
-
"@capacitor/core": "^5.
|
|
40
|
+
"@capacitor/core": "^5.7.0",
|
|
41
41
|
"@capacitor/haptics": "^5.0.7",
|
|
42
42
|
"@capacitor/keyboard": "^5.0.8",
|
|
43
43
|
"@capacitor/status-bar": "^5.0.7",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{__awaiter,__generator,__spreadArray}from"tslib";
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{d as doc}from"./index-a5d50daf.js";import{OVERLAY_BACK_BUTTON_PRIORITY,shoudUseCloseWatcher}from"./hardware-back-button-b410a047.js";import{b as getIonMode,c as config}from"./ionic-global-ad9a1810.js";import{C as CoreDelegate}from"./framework-delegate-fed7fe7c.js";import{c as componentOnReady,f as focusElement,a as addEventListener,b as removeEventListener,g as getElementRoot}from"./helpers-c0b9ca37.js";import{p as printIonWarning}from"./index-9b0d46f4.js";var lastOverlayIndex=0;var lastId=0;var activeAnimations=new WeakMap;var createController=function(e){return{create:function(n){return createOverlay(e,n)},dismiss:function(n,r,t){return dismissOverlay(document,n,r,e,t)},getTop:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,getPresentedOverlay(document,e)]}))}))}}};var alertController=createController("ion-alert");var actionSheetController=createController("ion-action-sheet");var loadingController=createController("ion-loading");var modalController=createController("ion-modal");var pickerController=createController("ion-picker");var popoverController=createController("ion-popover");var toastController=createController("ion-toast");var prepareOverlay=function(e){if(typeof document!=="undefined"){connectListeners(document)}var n=lastOverlayIndex++;e.overlayIndex=n};var setOverlayId=function(e){if(!e.hasAttribute("id")){e.id="ion-overlay-".concat(++lastId)}return e.id};var createOverlay=function(e,n){if(typeof window!=="undefined"&&typeof window.customElements!=="undefined"){return window.customElements.whenDefined(e).then((function(){var r=document.createElement(e);r.classList.add("overlay-hidden");Object.assign(r,Object.assign(Object.assign({},n),{hasController:true}));getAppRoot(document).appendChild(r);return new Promise((function(e){return componentOnReady(r,e)}))}))}return Promise.resolve()};var focusableQueryString='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])';var focusFirstDescendant=function(e,n){var r=e.querySelector(focusableQueryString);var t=r===null||r===void 0?void 0:r.shadowRoot;if(t){r=t.querySelector(focusableQueryString)||r}if(r){focusElement(r)}else{n.focus()}};var isOverlayHidden=function(e){return e.classList.contains("overlay-hidden")};var focusLastDescendant=function(e,n){var r=Array.from(e.querySelectorAll(focusableQueryString));var t=r.length>0?r[r.length-1]:null;var o=t===null||t===void 0?void 0:t.shadowRoot;if(o){t=o.querySelector(focusableQueryString)||t}if(t){t.focus()}else{n.focus()}};var trapKeyboardFocus=function(e,n){var r=getPresentedOverlay(n,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover");var t=e.target;if(!r||!t){return}if(r.classList.contains("ion-disable-focus-trap")){return}var o=function(){if(r===t){r.lastFocus=undefined}else{var e=getElementRoot(r);if(!e.contains(t)){return}var o=e.querySelector(".ion-overlay-wrapper");if(!o){return}if(o.contains(t)||t===e.querySelector("ion-backdrop")){r.lastFocus=t}else{var i=r.lastFocus;focusFirstDescendant(o,r);if(i===n.activeElement){focusLastDescendant(o,r)}r.lastFocus=n.activeElement}}};var i=function(){if(r.contains(t)){r.lastFocus=t}else{var e=r.lastFocus;focusFirstDescendant(r,r);if(e===n.activeElement){focusLastDescendant(r,r)}r.lastFocus=n.activeElement}};if(r.shadowRoot){i()}else{o()}};var connectListeners=function(e){if(lastOverlayIndex===0){lastOverlayIndex=1;e.addEventListener("focus",(function(n){trapKeyboardFocus(n,e)}),true);e.addEventListener("ionBackButton",(function(n){var r=getPresentedOverlay(e);if(r===null||r===void 0?void 0:r.backdropDismiss){n.detail.register(OVERLAY_BACK_BUTTON_PRIORITY,(function(){r.dismiss(undefined,BACKDROP)}))}}));if(!shoudUseCloseWatcher()){e.addEventListener("keydown",(function(n){if(n.key==="Escape"){var r=getPresentedOverlay(e);if(r===null||r===void 0?void 0:r.backdropDismiss){r.dismiss(undefined,BACKDROP)}}}))}}};var dismissOverlay=function(e,n,r,t,o){var i=getPresentedOverlay(e,t,o);if(!i){return Promise.reject("overlay does not exist")}return i.dismiss(n,r)};var getOverlays=function(e,n){if(n===undefined){n="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast"}return Array.from(e.querySelectorAll(n)).filter((function(e){return e.overlayIndex>0}))};var getPresentedOverlays=function(e,n){return getOverlays(e,n).filter((function(e){return!isOverlayHidden(e)}))};var getPresentedOverlay=function(e,n,r){var t=getPresentedOverlays(e,n);return r===undefined?t[t.length-1]:t.find((function(e){return e.id===r}))};var setRootAriaHidden=function(e){if(e===void 0){e=false}var n=getAppRoot(document);var r=n.querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");if(!r){return}if(e){r.setAttribute("aria-hidden","true")}else{r.removeAttribute("aria-hidden")}};var present=function(e,n,r,t,o){return __awaiter(void 0,void 0,void 0,(function(){var i,a,s,d,u;return __generator(this,(function(l){switch(l.label){case 0:if(e.presented){return[2]}setRootAriaHidden(true);e.presented=true;e.willPresent.emit();(i=e.willPresentShorthand)===null||i===void 0?void 0:i.emit();s=getIonMode(e);d=e.enterAnimation?e.enterAnimation:config.get(n,s==="ios"?r:t);return[4,overlayAnimation(e,d,e.el,o)];case 1:u=l.sent();if(u){e.didPresent.emit();(a=e.didPresentShorthand)===null||a===void 0?void 0:a.emit()}if(e.el.tagName!=="ION-TOAST"){focusPreviousElementOnDismiss(e.el)}if(e.keyboardClose&&(document.activeElement===null||!e.el.contains(document.activeElement))){e.el.focus()}return[2]}}))}))};var focusPreviousElementOnDismiss=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,r;return __generator(this,(function(t){switch(t.label){case 0:n=document.activeElement;if(!n){return[2]}r=n===null||n===void 0?void 0:n.shadowRoot;if(r){n=r.querySelector(focusableQueryString)||n}return[4,e.onDidDismiss()];case 1:t.sent();n.focus();return[2]}}))}))};var dismiss=function(e,n,r,t,o,i,a){return __awaiter(void 0,void 0,void 0,(function(){var s,d,u,l,c,v;return __generator(this,(function(f){switch(f.label){case 0:if(!e.presented){return[2,false]}if(doc!==undefined&&getPresentedOverlays(doc).length===1){setRootAriaHidden(false)}e.presented=false;f.label=1;case 1:f.trys.push([1,4,,5]);e.el.style.setProperty("pointer-events","none");e.willDismiss.emit({data:n,role:r});(s=e.willDismissShorthand)===null||s===void 0?void 0:s.emit({data:n,role:r});u=getIonMode(e);l=e.leaveAnimation?e.leaveAnimation:config.get(t,u==="ios"?o:i);if(!(r!==GESTURE))return[3,3];return[4,overlayAnimation(e,l,e.el,a)];case 2:f.sent();f.label=3;case 3:e.didDismiss.emit({data:n,role:r});(d=e.didDismissShorthand)===null||d===void 0?void 0:d.emit({data:n,role:r});c=activeAnimations.get(e)||[];c.forEach((function(e){return e.destroy()}));activeAnimations.delete(e);e.el.classList.add("overlay-hidden");e.el.style.removeProperty("pointer-events");if(e.el.lastFocus!==undefined){e.el.lastFocus=undefined}return[3,5];case 4:v=f.sent();console.error(v);return[3,5];case 5:e.el.remove();return[2,true]}}))}))};var getAppRoot=function(e){return e.querySelector("ion-app")||e.body};var overlayAnimation=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var o,i,a;return __generator(this,(function(s){switch(s.label){case 0:r.classList.remove("overlay-hidden");o=e.el;i=n(o,t);if(!e.animated||!config.getBoolean("animated",true)){i.duration(0)}if(e.keyboardClose){i.beforeAddWrite((function(){var e=r.ownerDocument.activeElement;if(e===null||e===void 0?void 0:e.matches("input,ion-input, ion-textarea")){e.blur()}}))}a=activeAnimations.get(e)||[];activeAnimations.set(e,__spreadArray(__spreadArray([],a,true),[i],false));return[4,i.play()];case 1:s.sent();return[2,true]}}))}))};var eventMethod=function(e,n){var r;var t=new Promise((function(e){return r=e}));onceEvent(e,n,(function(e){r(e.detail)}));return t};var onceEvent=function(e,n,r){var t=function(o){removeEventListener(e,n,t);r(o)};addEventListener(e,n,t)};var isCancel=function(e){return e==="cancel"||e===BACKDROP};var defaultGate=function(e){return e()};var safeCall=function(e,n){if(typeof e==="function"){var r=config.get("_zoneGate",defaultGate);return r((function(){try{return e(n)}catch(e){throw e}}))}return undefined};var BACKDROP="backdrop";var GESTURE="gesture";var OVERLAY_GESTURE_PRIORITY=39;var createDelegateController=function(e){var n=false;var r;var t=CoreDelegate();var o=function(o){if(o===void 0){o=false}if(r&&!o){return{delegate:r,inline:n}}var i=e.el,a=e.hasController,s=e.delegate;var d=i.parentNode;n=d!==null&&!a;r=n?s||t:s;return{inline:n,delegate:r}};var i=function(n){return __awaiter(void 0,void 0,void 0,(function(){var r,t;return __generator(this,(function(i){switch(i.label){case 0:r=o(true).delegate;if(!r)return[3,2];return[4,r.attachViewToDom(e.el,n)];case 1:return[2,i.sent()];case 2:t=e.hasController;if(t&&n!==undefined){throw new Error("framework delegate is missing")}return[2,null]}}))}))};var a=function(){var n=o().delegate;if(n&&e.el!==undefined){n.removeViewFromDom(e.el.parentElement,e.el)}};return{attachViewToDom:i,removeViewFromDom:a}};var createTriggerController=function(){var e;var n=function(){if(e){e();e=undefined}};var r=function(r,t){n();var o=t!==undefined?document.getElementById(t):null;if(!o){printIonWarning('A trigger element with the ID "'.concat(t,'" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.'),r);return}var i=function(e,n){var r=function(){n.present()};e.addEventListener("click",r);return function(){e.removeEventListener("click",r)}};e=i(o,r)};return{addClickListener:r,removeClickListener:n}};export{BACKDROP as B,GESTURE as G,OVERLAY_GESTURE_PRIORITY as O,alertController as a,actionSheetController as b,popoverController as c,createDelegateController as d,createTriggerController as e,present as f,dismiss as g,eventMethod as h,isCancel as i,prepareOverlay as j,setOverlayId as k,loadingController as l,modalController as m,focusFirstDescendant as n,getPresentedOverlay as o,pickerController as p,safeCall as s,toastController as t};
|
package/dist/ionic/p-7888a87b.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{d as n}from"./p-7b30edcc.js";import{OVERLAY_BACK_BUTTON_PRIORITY as o,shoudUseCloseWatcher as e}from"./p-ceceac26.js";import{b as t,c as i}from"./p-5d7e32ce.js";import{C as a}from"./p-a3f572a7.js";import{c as r,f as s,a as d,b as l,g as c}from"./p-b5839dc2.js";import{p as u}from"./p-06fee233.js";let p=0,m=0;const v=new WeakMap,f=n=>({create:o=>C(n,o),dismiss:(o,e,t)=>B(document,o,e,n,t),getTop:async()=>E(document,n)}),h=f("ion-alert"),b=f("ion-action-sheet"),w=f("ion-loading"),y=f("ion-modal"),g=f("ion-picker"),k=f("ion-popover"),x=f("ion-toast"),j=n=>{"undefined"!=typeof document&&P(document);const o=p++;n.overlayIndex=o},O=n=>(n.hasAttribute("id")||(n.id="ion-overlay-"+ ++m),n.id),C=(n,o)=>"undefined"!=typeof window&&void 0!==window.customElements?window.customElements.whenDefined(n).then((()=>{const e=document.createElement(n);return e.classList.add("overlay-hidden"),Object.assign(e,Object.assign(Object.assign({},o),{hasController:!0})),z(document).appendChild(e),new Promise((n=>r(e,n)))})):Promise.resolve(),D='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',T=(n,o)=>{let e=n.querySelector(D);const t=null==e?void 0:e.shadowRoot;t&&(e=t.querySelector(D)||e),e?s(e):o.focus()},A=(n,o)=>{const e=Array.from(n.querySelectorAll(D));let t=e.length>0?e[e.length-1]:null;const i=null==t?void 0:t.shadowRoot;i&&(t=i.querySelector(D)||t),t?t.focus():o.focus()},P=n=>{0===p&&(p=1,n.addEventListener("focus",(o=>{((n,o)=>{const e=E(o,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover"),t=n.target;e&&t&&(e.classList.contains("ion-disable-focus-trap")||(e.shadowRoot?(()=>{if(e.contains(t))e.lastFocus=t;else{const n=e.lastFocus;T(e,e),n===o.activeElement&&A(e,e),e.lastFocus=o.activeElement}})():(()=>{if(e===t)e.lastFocus=void 0;else{const n=c(e);if(!n.contains(t))return;const i=n.querySelector(".ion-overlay-wrapper");if(!i)return;if(i.contains(t)||t===n.querySelector("ion-backdrop"))e.lastFocus=t;else{const n=e.lastFocus;T(i,e),n===o.activeElement&&A(i,e),e.lastFocus=o.activeElement}}})()))})(o,n)}),!0),n.addEventListener("ionBackButton",(e=>{const t=E(n);(null==t?void 0:t.backdropDismiss)&&e.detail.register(o,(()=>{t.dismiss(void 0,q)}))})),e()||n.addEventListener("keydown",(o=>{if("Escape"===o.key){const o=E(n);(null==o?void 0:o.backdropDismiss)&&o.dismiss(void 0,q)}})))},B=(n,o,e,t,i)=>{const a=E(n,t,i);return a?a.dismiss(o,e):Promise.reject("overlay does not exist")},M=(n,o)=>((n,o)=>(void 0===o&&(o="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast"),Array.from(n.querySelectorAll(o)).filter((n=>n.overlayIndex>0))))(n,o).filter((n=>!n.classList.contains("overlay-hidden"))),E=(n,o,e)=>{const t=M(n,o);return void 0===e?t[t.length-1]:t.find((n=>n.id===e))},G=(n=!1)=>{const o=z(document).querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");o&&(n?o.setAttribute("aria-hidden","true"):o.removeAttribute("aria-hidden"))},I=async(n,o,e,a,r)=>{var s,d;if(n.presented)return;G(!0),n.presented=!0,n.willPresent.emit(),null===(s=n.willPresentShorthand)||void 0===s||s.emit();const l=t(n),c=n.enterAnimation?n.enterAnimation:i.get(o,"ios"===l?e:a);await F(n,c,n.el,r)&&(n.didPresent.emit(),null===(d=n.didPresentShorthand)||void 0===d||d.emit()),"ION-TOAST"!==n.el.tagName&&L(n.el),!n.keyboardClose||null!==document.activeElement&&n.el.contains(document.activeElement)||n.el.focus()},L=async n=>{let o=document.activeElement;if(!o)return;const e=null==o?void 0:o.shadowRoot;e&&(o=e.querySelector(D)||o),await n.onDidDismiss(),o.focus()},V=async(o,e,a,r,s,d,l)=>{var c,u;if(!o.presented)return!1;void 0!==n&&1===M(n).length&&G(!1),o.presented=!1;try{o.el.style.setProperty("pointer-events","none"),o.willDismiss.emit({data:e,role:a}),null===(c=o.willDismissShorthand)||void 0===c||c.emit({data:e,role:a});const n=t(o),p=o.leaveAnimation?o.leaveAnimation:i.get(r,"ios"===n?s:d);a!==H&&await F(o,p,o.el,l),o.didDismiss.emit({data:e,role:a}),null===(u=o.didDismissShorthand)||void 0===u||u.emit({data:e,role:a}),(v.get(o)||[]).forEach((n=>n.destroy())),v.delete(o),o.el.classList.add("overlay-hidden"),o.el.style.removeProperty("pointer-events"),void 0!==o.el.lastFocus&&(o.el.lastFocus=void 0)}catch(n){console.error(n)}return o.el.remove(),!0},z=n=>n.querySelector("ion-app")||n.body,F=async(n,o,e,t)=>{e.classList.remove("overlay-hidden");const a=o(n.el,t);n.animated&&i.getBoolean("animated",!0)||a.duration(0),n.keyboardClose&&a.beforeAddWrite((()=>{const n=e.ownerDocument.activeElement;(null==n?void 0:n.matches("input,ion-input, ion-textarea"))&&n.blur()}));const r=v.get(n)||[];return v.set(n,[...r,a]),await a.play(),!0},N=(n,o)=>{let e;const t=new Promise((n=>e=n));return S(n,o,(n=>{e(n.detail)})),t},S=(n,o,e)=>{const t=i=>{l(n,o,t),e(i)};d(n,o,t)},W=n=>"cancel"===n||n===q,$=n=>n(),_=(n,o)=>{if("function"==typeof n)return i.get("_zoneGate",$)((()=>{try{return n(o)}catch(n){throw n}}))},q="backdrop",H="gesture",J=39,K=n=>{let o,e=!1;const t=a(),i=(i=!1)=>{if(o&&!i)return{delegate:o,inline:e};const{el:a,hasController:r,delegate:s}=n;return e=null!==a.parentNode&&!r,o=e?s||t:s,{inline:e,delegate:o}};return{attachViewToDom:async o=>{const{delegate:e}=i(!0);if(e)return await e.attachViewToDom(n.el,o);const{hasController:t}=n;if(t&&void 0!==o)throw new Error("framework delegate is missing");return null},removeViewFromDom:()=>{const{delegate:o}=i();o&&void 0!==n.el&&o.removeViewFromDom(n.el.parentElement,n.el)}}},Q=()=>{let n;const o=()=>{n&&(n(),n=void 0)};return{addClickListener:(e,t)=>{o();const i=void 0!==t?document.getElementById(t):null;i?n=((n,o)=>{const e=()=>{o.present()};return n.addEventListener("click",e),()=>{n.removeEventListener("click",e)}})(i,e):u(`A trigger element with the ID "${t}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,e)},removeClickListener:o}};export{q as B,H as G,J as O,h as a,b,k as c,K as d,Q as e,I as f,V as g,N as h,W as i,j,O as k,w as l,y as m,T as n,E as o,g as p,_ as s,x as t}
|