@ionic/core 7.3.2-dev.11693262117.17edbf6d → 7.3.2-dev.11693321763.15a54694

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.
Files changed (125) hide show
  1. package/components/action-sheet.js +17 -8
  2. package/components/alert.js +17 -8
  3. package/components/framework-delegate.js +21 -2
  4. package/components/ion-loading.js +17 -8
  5. package/components/ion-menu.js +1 -1
  6. package/components/ion-modal.js +34 -13
  7. package/components/ion-picker.js +17 -8
  8. package/components/ion-toast.js +17 -8
  9. package/components/overlays.js +1 -22
  10. package/components/popover.js +30 -9
  11. package/dist/cjs/{framework-delegate-e8174951.js → framework-delegate-c0873a6f.js} +21 -2
  12. package/dist/cjs/index.cjs.js +2 -2
  13. package/dist/cjs/ion-action-sheet.cjs.entry.js +18 -9
  14. package/dist/cjs/ion-alert.cjs.entry.js +18 -9
  15. package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
  16. package/dist/cjs/ion-datetime_3.cjs.entry.js +18 -9
  17. package/dist/cjs/ion-loading.cjs.entry.js +18 -9
  18. package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
  19. package/dist/cjs/ion-modal.cjs.entry.js +35 -14
  20. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  21. package/dist/cjs/ion-popover.cjs.entry.js +31 -10
  22. package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
  23. package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
  24. package/dist/cjs/ion-toast.cjs.entry.js +18 -9
  25. package/dist/cjs/{overlays-2b9fa92e.js → overlays-5c1706ed.js} +1 -23
  26. package/dist/collection/components/action-sheet/action-sheet.js +17 -8
  27. package/dist/collection/components/alert/alert.js +17 -8
  28. package/dist/collection/components/loading/loading.js +17 -8
  29. package/dist/collection/components/modal/modal.js +34 -13
  30. package/dist/collection/components/picker/picker.js +17 -8
  31. package/dist/collection/components/popover/popover.js +30 -9
  32. package/dist/collection/components/popover/test/async/popover.e2e.js +20 -0
  33. package/dist/collection/components/toast/toast.js +17 -8
  34. package/dist/collection/utils/framework-delegate.js +21 -2
  35. package/dist/collection/utils/overlays.js +0 -21
  36. package/dist/docs.json +1 -1
  37. package/dist/esm/{framework-delegate-2b76c681.js → framework-delegate-aa433dea.js} +21 -2
  38. package/dist/esm/index.js +2 -2
  39. package/dist/esm/ion-action-sheet.entry.js +18 -9
  40. package/dist/esm/ion-alert.entry.js +18 -9
  41. package/dist/esm/ion-app_8.entry.js +1 -1
  42. package/dist/esm/ion-datetime_3.entry.js +18 -9
  43. package/dist/esm/ion-loading.entry.js +18 -9
  44. package/dist/esm/ion-menu_3.entry.js +2 -2
  45. package/dist/esm/ion-modal.entry.js +35 -14
  46. package/dist/esm/ion-nav_2.entry.js +1 -1
  47. package/dist/esm/ion-popover.entry.js +31 -10
  48. package/dist/esm/ion-select_3.entry.js +2 -2
  49. package/dist/esm/ion-tab_2.entry.js +1 -1
  50. package/dist/esm/ion-toast.entry.js +18 -9
  51. package/dist/esm/{overlays-66222f79.js → overlays-e1dadfe6.js} +2 -23
  52. package/dist/esm-es5/framework-delegate-aa433dea.js +4 -0
  53. package/dist/esm-es5/index.js +1 -1
  54. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  55. package/dist/esm-es5/ion-alert.entry.js +1 -1
  56. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  57. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  58. package/dist/esm-es5/ion-loading.entry.js +1 -1
  59. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  60. package/dist/esm-es5/ion-modal.entry.js +1 -1
  61. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  62. package/dist/esm-es5/ion-popover.entry.js +1 -1
  63. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  64. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  65. package/dist/esm-es5/ion-toast.entry.js +1 -1
  66. package/dist/esm-es5/{overlays-66222f79.js → overlays-e1dadfe6.js} +1 -1
  67. package/dist/ionic/index.esm.js +1 -1
  68. package/dist/ionic/ionic.esm.js +1 -1
  69. package/dist/ionic/{p-9888a5a7.entry.js → p-091cd81e.entry.js} +1 -1
  70. package/dist/ionic/{p-d1356034.system.entry.js → p-0b68c41d.system.entry.js} +1 -1
  71. package/dist/ionic/{p-b2098e96.system.entry.js → p-28f5715a.system.entry.js} +1 -1
  72. package/dist/ionic/p-2bff71d5.system.entry.js +4 -0
  73. package/dist/ionic/p-3565c8a0.entry.js +4 -0
  74. package/dist/ionic/{p-8074bdd7.system.entry.js → p-45ee211b.system.entry.js} +1 -1
  75. package/dist/ionic/p-51669f1e.system.entry.js +4 -0
  76. package/dist/ionic/p-582dc7c1.js +4 -0
  77. package/dist/ionic/{p-7776d062.entry.js → p-5c17f888.entry.js} +1 -1
  78. package/dist/ionic/{p-8d9475b5.system.js → p-613d4042.system.js} +1 -1
  79. package/dist/ionic/p-721933ff.system.js +1 -1
  80. package/dist/ionic/p-79e3f0b6.entry.js +4 -0
  81. package/dist/ionic/p-7c9dd24d.entry.js +4 -0
  82. package/dist/ionic/p-84a95033.system.entry.js +4 -0
  83. package/dist/ionic/{p-a0ffdd91.system.js → p-8843b046.system.js} +1 -1
  84. package/dist/ionic/{p-229df0d8.entry.js → p-98ebc376.entry.js} +1 -1
  85. package/dist/ionic/p-b287ab05.js +4 -0
  86. package/dist/ionic/{p-f8e4da48.system.js → p-b32742f3.system.js} +1 -1
  87. package/dist/ionic/p-b3a58769.entry.js +4 -0
  88. package/dist/ionic/p-b54a1fcb.system.entry.js +4 -0
  89. package/dist/ionic/{p-20087c90.entry.js → p-c759a704.entry.js} +1 -1
  90. package/dist/ionic/{p-6b9bf14c.system.entry.js → p-d1d3b740.system.entry.js} +1 -1
  91. package/dist/ionic/{p-0494a5b7.system.entry.js → p-d693e765.system.entry.js} +1 -1
  92. package/dist/ionic/p-d9eb4632.system.entry.js +4 -0
  93. package/dist/ionic/p-dab7745f.system.entry.js +4 -0
  94. package/dist/ionic/p-e44233f5.entry.js +4 -0
  95. package/dist/ionic/p-f2c667c9.system.entry.js +4 -0
  96. package/dist/ionic/p-f789b7fa.entry.js +4 -0
  97. package/dist/ionic/{p-5c96dc4e.entry.js → p-f7faa32d.entry.js} +1 -1
  98. package/dist/ionic/p-f9708a54.entry.js +4 -0
  99. package/dist/types/components/action-sheet/action-sheet.d.ts +1 -1
  100. package/dist/types/components/alert/alert.d.ts +1 -1
  101. package/dist/types/components/loading/loading.d.ts +1 -1
  102. package/dist/types/components/modal/modal.d.ts +1 -1
  103. package/dist/types/components/picker/picker.d.ts +1 -1
  104. package/dist/types/components/popover/popover.d.ts +1 -1
  105. package/dist/types/components/toast/toast.d.ts +1 -1
  106. package/dist/types/utils/overlays.d.ts +0 -9
  107. package/hydrate/index.js +163 -78
  108. package/package.json +1 -1
  109. package/dist/esm-es5/framework-delegate-2b76c681.js +0 -4
  110. package/dist/ionic/p-16fd72f2.entry.js +0 -4
  111. package/dist/ionic/p-1c9e3bc7.entry.js +0 -4
  112. package/dist/ionic/p-2a51c81c.entry.js +0 -4
  113. package/dist/ionic/p-2a649b3e.system.entry.js +0 -4
  114. package/dist/ionic/p-3ef9e271.system.entry.js +0 -4
  115. package/dist/ionic/p-6d484719.system.entry.js +0 -4
  116. package/dist/ionic/p-70d137a0.js +0 -4
  117. package/dist/ionic/p-7ac9bdfa.system.entry.js +0 -4
  118. package/dist/ionic/p-8d53d5a5.entry.js +0 -4
  119. package/dist/ionic/p-a133c215.system.entry.js +0 -4
  120. package/dist/ionic/p-b34c1ae1.js +0 -4
  121. package/dist/ionic/p-c0b4ca5c.system.entry.js +0 -4
  122. package/dist/ionic/p-cf768a4f.entry.js +0 -4
  123. package/dist/ionic/p-ddffbfa9.entry.js +0 -4
  124. package/dist/ionic/p-e2e2c2b0.entry.js +0 -4
  125. package/dist/ionic/p-ebb442c4.system.entry.js +0 -4
@@ -5,7 +5,7 @@ import { h, Host } from "@stencil/core";
5
5
  import { ENABLE_HTML_CONTENT_DEFAULT } from "../../utils/config";
6
6
  import { raf } from "../../utils/helpers";
7
7
  import { printIonWarning } from "../../utils/logging/index";
8
- import { createDelegateController, createLockController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
8
+ import { createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
9
9
  import { sanitizeDOMString } from "../../utils/sanitization/index";
10
10
  import { createColorClasses, getClassMap } from "../../utils/theme";
11
11
  import { config } from "../../global/config";
@@ -28,7 +28,6 @@ import { mdLeaveAnimation } from "./animations/md.leave";
28
28
  export class Toast {
29
29
  constructor() {
30
30
  this.delegateController = createDelegateController(this);
31
- this.lockController = createLockController();
32
31
  this.triggerController = createTriggerController();
33
32
  this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
34
33
  this.presented = false;
@@ -98,19 +97,30 @@ export class Toast {
98
97
  * Present the toast overlay after it has been created.
99
98
  */
100
99
  async present() {
101
- const unlock = await this.lockController.lock();
100
+ /**
101
+ * When using an inline toast
102
+ * and dismissing a toast it is possible to
103
+ * quickly present the toast while it is
104
+ * dismissing. We need to await any current
105
+ * transition to allow the dismiss to finish
106
+ * before presenting again.
107
+ */
108
+ if (this.currentTransition !== undefined) {
109
+ await this.currentTransition;
110
+ }
102
111
  await this.delegateController.attachViewToDom();
103
- await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, this.position);
112
+ this.currentTransition = present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, this.position);
113
+ await this.currentTransition;
104
114
  /**
105
115
  * Content is revealed to screen readers after
106
116
  * the transition to avoid jank since this
107
117
  * state updates will cause a re-render.
108
118
  */
109
119
  this.revealContentToScreenReader = true;
120
+ this.currentTransition = undefined;
110
121
  if (this.duration > 0) {
111
122
  this.durationTimeout = setTimeout(() => this.dismiss(undefined, 'timeout'), this.duration);
112
123
  }
113
- unlock();
114
124
  }
115
125
  /**
116
126
  * Dismiss the toast overlay after it has been presented.
@@ -122,16 +132,15 @@ export class Toast {
122
132
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
123
133
  */
124
134
  async dismiss(data, role) {
125
- const unlock = await this.lockController.lock();
126
135
  if (this.durationTimeout) {
127
136
  clearTimeout(this.durationTimeout);
128
137
  }
129
- const dismissed = await dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, this.position);
138
+ this.currentTransition = dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, this.position);
139
+ const dismissed = await this.currentTransition;
130
140
  if (dismissed) {
131
141
  this.delegateController.removeViewFromDom();
132
142
  this.revealContentToScreenReader = false;
133
143
  }
134
- unlock();
135
144
  return dismissed;
136
145
  }
137
146
  /**
@@ -38,6 +38,7 @@ export const CoreDelegate = () => {
38
38
  const attachViewToDom = async (parentElement, userComponent, userComponentProps = {}, cssClasses = []) => {
39
39
  var _a, _b;
40
40
  BaseComponent = parentElement;
41
+ let ChildComponent;
41
42
  /**
42
43
  * If passing in a component via the `component` props
43
44
  * we need to append it inside of our overlay component.
@@ -64,6 +65,7 @@ export const CoreDelegate = () => {
64
65
  * inside of the overlay component.
65
66
  */
66
67
  BaseComponent.appendChild(el);
68
+ ChildComponent = el;
67
69
  await new Promise((resolve) => componentOnReady(el, resolve));
68
70
  }
69
71
  else if (BaseComponent.children.length > 0 &&
@@ -72,7 +74,7 @@ export const CoreDelegate = () => {
72
74
  * The delegate host wrapper el is only needed for modals and popovers
73
75
  * because they allow the dev to provide custom content to the overlay.
74
76
  */
75
- const root = BaseComponent.children[0];
77
+ const root = (ChildComponent = BaseComponent.children[0]);
76
78
  if (!root.classList.contains('ion-delegate-host')) {
77
79
  /**
78
80
  * If the root element is not a delegate host, it means
@@ -87,6 +89,12 @@ export const CoreDelegate = () => {
87
89
  el.append(...BaseComponent.children);
88
90
  // Append the new parent element to the original parent element.
89
91
  BaseComponent.appendChild(el);
92
+ /**
93
+ * Update the ChildComponent to be the
94
+ * newly created div in the event that one
95
+ * does not already exist.
96
+ */
97
+ ChildComponent = el;
90
98
  }
91
99
  }
92
100
  /**
@@ -102,7 +110,18 @@ export const CoreDelegate = () => {
102
110
  Reference = document.createComment('ionic teleport');
103
111
  BaseComponent.parentNode.insertBefore(Reference, BaseComponent);
104
112
  app.appendChild(BaseComponent);
105
- return BaseComponent;
113
+ /**
114
+ * We return the child component rather than the overlay
115
+ * reference itself since modal and popover will
116
+ * use this to wait for any Ionic components in the child view
117
+ * to be ready (i.e. componentOnReady) when using the
118
+ * lazy loaded component bundle.
119
+ *
120
+ * However, we fall back to returning BaseComponent
121
+ * in the event that a modal or popover is presented
122
+ * with no child content.
123
+ */
124
+ return ChildComponent !== null && ChildComponent !== void 0 ? ChildComponent : BaseComponent;
106
125
  };
107
126
  const removeViewFromDom = () => {
108
127
  /**
@@ -617,27 +617,6 @@ export 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
- export 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
- };
641
620
  /**
642
621
  * Constructs a trigger interaction for an overlay.
643
622
  * Presents an overlay when the trigger is clicked.
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-08-28T22:37:59",
2
+ "timestamp": "2023-08-29T15:12:07",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.1.0",
@@ -39,6 +39,7 @@ const CoreDelegate = () => {
39
39
  const attachViewToDom = async (parentElement, userComponent, userComponentProps = {}, cssClasses = []) => {
40
40
  var _a, _b;
41
41
  BaseComponent = parentElement;
42
+ let ChildComponent;
42
43
  /**
43
44
  * If passing in a component via the `component` props
44
45
  * we need to append it inside of our overlay component.
@@ -65,6 +66,7 @@ const CoreDelegate = () => {
65
66
  * inside of the overlay component.
66
67
  */
67
68
  BaseComponent.appendChild(el);
69
+ ChildComponent = el;
68
70
  await new Promise((resolve) => componentOnReady(el, resolve));
69
71
  }
70
72
  else if (BaseComponent.children.length > 0 &&
@@ -73,7 +75,7 @@ const CoreDelegate = () => {
73
75
  * The delegate host wrapper el is only needed for modals and popovers
74
76
  * because they allow the dev to provide custom content to the overlay.
75
77
  */
76
- const root = BaseComponent.children[0];
78
+ const root = (ChildComponent = BaseComponent.children[0]);
77
79
  if (!root.classList.contains('ion-delegate-host')) {
78
80
  /**
79
81
  * If the root element is not a delegate host, it means
@@ -88,6 +90,12 @@ const CoreDelegate = () => {
88
90
  el.append(...BaseComponent.children);
89
91
  // Append the new parent element to the original parent element.
90
92
  BaseComponent.appendChild(el);
93
+ /**
94
+ * Update the ChildComponent to be the
95
+ * newly created div in the event that one
96
+ * does not already exist.
97
+ */
98
+ ChildComponent = el;
91
99
  }
92
100
  }
93
101
  /**
@@ -103,7 +111,18 @@ const CoreDelegate = () => {
103
111
  Reference = document.createComment('ionic teleport');
104
112
  BaseComponent.parentNode.insertBefore(Reference, BaseComponent);
105
113
  app.appendChild(BaseComponent);
106
- return BaseComponent;
114
+ /**
115
+ * We return the child component rather than the overlay
116
+ * reference itself since modal and popover will
117
+ * use this to wait for any Ionic components in the child view
118
+ * to be ready (i.e. componentOnReady) when using the
119
+ * lazy loaded component bundle.
120
+ *
121
+ * However, we fall back to returning BaseComponent
122
+ * in the event that a modal or popover is presented
123
+ * with no child content.
124
+ */
125
+ return ChildComponent !== null && ChildComponent !== void 0 ? ChildComponent : BaseComponent;
107
126
  };
108
127
  const removeViewFromDom = () => {
109
128
  /**
package/dist/esm/index.js CHANGED
@@ -11,12 +11,12 @@ export { c as componentOnReady } from './helpers-3379ba19.js';
11
11
  export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-96c9ace3.js';
12
12
  export { a as LIFECYCLE_DID_ENTER, c as LIFECYCLE_DID_LEAVE, L as LIFECYCLE_WILL_ENTER, b as LIFECYCLE_WILL_LEAVE, d as LIFECYCLE_WILL_UNLOAD } from './index-6391de89.js';
13
13
  export { m as menuController } from './index-b3e05099.js';
14
- export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-66222f79.js';
14
+ export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-e1dadfe6.js';
15
15
  import './index-7a14ecec.js';
16
16
  import './gesture-controller-0fa396c4.js';
17
17
  import './index-847f2fde.js';
18
18
  import './hardware-back-button-39299f84.js';
19
- import './framework-delegate-2b76c681.js';
19
+ import './framework-delegate-aa433dea.js';
20
20
  import './index-595d62c9.js';
21
21
 
22
22
  const IonicSlides = (opts) => {
@@ -4,7 +4,7 @@
4
4
  import { r as registerInstance, d as createEvent, e as readTask, h, H as Host, f as getElement } from './index-847f2fde.js';
5
5
  import { c as createButtonActiveGesture } from './button-active-2da0f611.js';
6
6
  import { r as raf } from './helpers-3379ba19.js';
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-66222f79.js';
7
+ import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-e1dadfe6.js';
8
8
  import { g as getClassMap } from './theme-17531cdf.js';
9
9
  import { b as getIonMode } from './ionic-global-1ef19007.js';
10
10
  import { c as createAnimation } from './animation-a1d9e088.js';
@@ -13,7 +13,7 @@ import './capacitor-b4979570.js';
13
13
  import './index-7a14ecec.js';
14
14
  import './index-ff313b19.js';
15
15
  import './gesture-controller-0fa396c4.js';
16
- import './framework-delegate-2b76c681.js';
16
+ import './framework-delegate-aa433dea.js';
17
17
  import './hardware-back-button-39299f84.js';
18
18
  import './index-595d62c9.js';
19
19
 
@@ -117,7 +117,6 @@ const ActionSheet = class {
117
117
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
118
118
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
119
119
  this.delegateController = createDelegateController(this);
120
- this.lockController = createLockController();
121
120
  this.triggerController = createTriggerController();
122
121
  this.presented = false;
123
122
  this.onBackdropTap = () => {
@@ -165,10 +164,21 @@ const ActionSheet = class {
165
164
  * Present the action sheet overlay after it has been created.
166
165
  */
167
166
  async present() {
168
- const unlock = await this.lockController.lock();
167
+ /**
168
+ * When using an inline action sheet
169
+ * and dismissing a action sheet it is possible to
170
+ * quickly present the action sheet while it is
171
+ * dismissing. We need to await any current
172
+ * transition to allow the dismiss to finish
173
+ * before presenting again.
174
+ */
175
+ if (this.currentTransition !== undefined) {
176
+ await this.currentTransition;
177
+ }
169
178
  await this.delegateController.attachViewToDom();
170
- await present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
171
- unlock();
179
+ this.currentTransition = present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
180
+ await this.currentTransition;
181
+ this.currentTransition = undefined;
172
182
  }
173
183
  /**
174
184
  * Dismiss the action sheet overlay after it has been presented.
@@ -180,12 +190,11 @@ const ActionSheet = class {
180
190
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
181
191
  */
182
192
  async dismiss(data, role) {
183
- const unlock = await this.lockController.lock();
184
- const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
193
+ this.currentTransition = dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
194
+ const dismissed = await this.currentTransition;
185
195
  if (dismissed) {
186
196
  this.delegateController.removeViewFromDom();
187
197
  }
188
- unlock();
189
198
  return dismissed;
190
199
  }
191
200
  /**
@@ -5,7 +5,7 @@ import { r as registerInstance, d as createEvent, i as forceUpdate, h, H as Host
5
5
  import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-96c9ace3.js';
6
6
  import { c as createButtonActiveGesture } from './button-active-2da0f611.js';
7
7
  import { r as raf } from './helpers-3379ba19.js';
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-66222f79.js';
8
+ import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-e1dadfe6.js';
9
9
  import { g as getClassMap } from './theme-17531cdf.js';
10
10
  import { c as config, b as getIonMode } from './ionic-global-1ef19007.js';
11
11
  import { c as createAnimation } from './animation-a1d9e088.js';
@@ -14,7 +14,7 @@ import './capacitor-b4979570.js';
14
14
  import './index-7a14ecec.js';
15
15
  import './index-ff313b19.js';
16
16
  import './gesture-controller-0fa396c4.js';
17
- import './framework-delegate-2b76c681.js';
17
+ import './framework-delegate-aa433dea.js';
18
18
  import './hardware-back-button-39299f84.js';
19
19
  import './index-595d62c9.js';
20
20
 
@@ -119,7 +119,6 @@ const Alert = class {
119
119
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
120
120
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
121
121
  this.delegateController = createDelegateController(this);
122
- this.lockController = createLockController();
123
122
  this.triggerController = createTriggerController();
124
123
  this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
125
124
  this.processedInputs = [];
@@ -286,10 +285,21 @@ const Alert = class {
286
285
  * Present the alert overlay after it has been created.
287
286
  */
288
287
  async present() {
289
- const unlock = await this.lockController.lock();
288
+ /**
289
+ * When using an inline alert
290
+ * and dismissing an alert it is possible to
291
+ * quickly present the alert while it is
292
+ * dismissing. We need to await any current
293
+ * transition to allow the dismiss to finish
294
+ * before presenting again.
295
+ */
296
+ if (this.currentTransition !== undefined) {
297
+ await this.currentTransition;
298
+ }
290
299
  await this.delegateController.attachViewToDom();
291
- await present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
292
- unlock();
300
+ this.currentTransition = present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
301
+ await this.currentTransition;
302
+ this.currentTransition = undefined;
293
303
  }
294
304
  /**
295
305
  * Dismiss the alert overlay after it has been presented.
@@ -301,12 +311,11 @@ const Alert = class {
301
311
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
302
312
  */
303
313
  async dismiss(data, role) {
304
- const unlock = await this.lockController.lock();
305
- const dismissed = await dismiss(this, data, role, 'alertLeave', iosLeaveAnimation, mdLeaveAnimation);
314
+ this.currentTransition = dismiss(this, data, role, 'alertLeave', iosLeaveAnimation, mdLeaveAnimation);
315
+ const dismissed = await this.currentTransition;
306
316
  if (dismissed) {
307
317
  this.delegateController.removeViewFromDom();
308
318
  }
309
- unlock();
310
319
  return dismissed;
311
320
  }
312
321
  /**
@@ -9,7 +9,7 @@ import { c as createColorClasses, h as hostContext } from './theme-17531cdf.js';
9
9
  import { a as findIonContent, p as printIonContentErrorMsg, g as getScrollElement } from './index-746a238e.js';
10
10
  import { c as createKeyboardController } from './keyboard-controller-0c2dce71.js';
11
11
  import { g as getTimeGivenProgression } from './cubic-bezier-66542bc5.js';
12
- import { a as attachComponent, d as detachComponent } from './framework-delegate-2b76c681.js';
12
+ import { a as attachComponent, d as detachComponent } from './framework-delegate-aa433dea.js';
13
13
  import { t as transition } from './index-6391de89.js';
14
14
  import './index-595d62c9.js';
15
15
  import './index-7a14ecec.js';
@@ -10,10 +10,10 @@ import { c as createColorClasses, g as getClassMap } from './theme-17531cdf.js';
10
10
  import { c as chevronBack, o as chevronForward, l as chevronDown, p as caretUpSharp, q as caretDownSharp } from './index-ecfc2c9f.js';
11
11
  import { b as getIonMode } from './ionic-global-1ef19007.js';
12
12
  import { g as generateDayAriaLabel, a as getDay, i as isBefore, b as isAfter, c as isSameDay, d as getPreviousMonth, e as getNextMonth, v as validateParts, f as getPartsFromCalendarDay, h as getEndOfWeek, j as getStartOfWeek, k as getPreviousDay, l as getNextDay, m as getPreviousWeek, n as getNextWeek, p as parseMinParts, o as parseMaxParts, q as parseDate, w as warnIfValueOutOfBounds, r as convertToArrayOfNumbers, s as convertDataToISO, t as getToday, u as getClosestValidDate, x as getNumDaysInMonth, y as getCombinedDateColumnData, z as getMonthColumnData, A as getDayColumnData, B as getYearColumnData, C as isMonthFirstLocale, D as getTimeColumnsData, E as isLocaleDayPeriodRTL, F as getDaysOfWeek, G as getMonthAndYear, H as getDaysOfMonth, I as generateMonths, J as is24Hour, K as getLocalizedTime, L as getMonthAndDay, M as formatValue, N as getNextYear, O as getPreviousYear, P as clampDate, Q as parseAmPm, R as calculateHourFromAMPM } from './data-4b448e3a.js';
13
- 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-66222f79.js';
13
+ import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-e1dadfe6.js';
14
14
  import { c as createAnimation } from './animation-a1d9e088.js';
15
15
  import { b as hapticSelectionChanged, h as hapticSelectionEnd, a as hapticSelectionStart } from './haptic-6447af60.js';
16
- import './framework-delegate-2b76c681.js';
16
+ import './framework-delegate-aa433dea.js';
17
17
  import './hardware-back-button-39299f84.js';
18
18
  import './index-7a14ecec.js';
19
19
  import './capacitor-b4979570.js';
@@ -1726,7 +1726,6 @@ const Picker = class {
1726
1726
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
1727
1727
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
1728
1728
  this.delegateController = createDelegateController(this);
1729
- this.lockController = createLockController();
1730
1729
  this.triggerController = createTriggerController();
1731
1730
  this.onBackdropTap = () => {
1732
1731
  this.dismiss(undefined, BACKDROP);
@@ -1793,13 +1792,24 @@ const Picker = class {
1793
1792
  * Present the picker overlay after it has been created.
1794
1793
  */
1795
1794
  async present() {
1796
- const unlock = await this.lockController.lock();
1795
+ /**
1796
+ * When using an inline picker
1797
+ * and dismissing an picker it is possible to
1798
+ * quickly present the picker while it is
1799
+ * dismissing. We need to await any current
1800
+ * transition to allow the dismiss to finish
1801
+ * before presenting again.
1802
+ */
1803
+ if (this.currentTransition !== undefined) {
1804
+ await this.currentTransition;
1805
+ }
1797
1806
  await this.delegateController.attachViewToDom();
1798
- await present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);
1807
+ this.currentTransition = present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);
1808
+ await this.currentTransition;
1809
+ this.currentTransition = undefined;
1799
1810
  if (this.duration > 0) {
1800
1811
  this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
1801
1812
  }
1802
- unlock();
1803
1813
  }
1804
1814
  /**
1805
1815
  * Dismiss the picker overlay after it has been presented.
@@ -1811,15 +1821,14 @@ const Picker = class {
1811
1821
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
1812
1822
  */
1813
1823
  async dismiss(data, role) {
1814
- const unlock = await this.lockController.lock();
1815
1824
  if (this.durationTimeout) {
1816
1825
  clearTimeout(this.durationTimeout);
1817
1826
  }
1818
- const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);
1827
+ this.currentTransition = dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);
1828
+ const dismissed = await this.currentTransition;
1819
1829
  if (dismissed) {
1820
1830
  this.delegateController.removeViewFromDom();
1821
1831
  }
1822
- unlock();
1823
1832
  return dismissed;
1824
1833
  }
1825
1834
  /**
@@ -4,11 +4,11 @@
4
4
  import { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-847f2fde.js';
5
5
  import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-96c9ace3.js';
6
6
  import { r as raf } from './helpers-3379ba19.js';
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-66222f79.js';
7
+ import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-e1dadfe6.js';
8
8
  import { g as getClassMap } from './theme-17531cdf.js';
9
9
  import { c as config, b as getIonMode } from './ionic-global-1ef19007.js';
10
10
  import { c as createAnimation } from './animation-a1d9e088.js';
11
- import './framework-delegate-2b76c681.js';
11
+ import './framework-delegate-aa433dea.js';
12
12
  import './hardware-back-button-39299f84.js';
13
13
  import './index-595d62c9.js';
14
14
  import './index-7a14ecec.js';
@@ -117,7 +117,6 @@ const Loading = class {
117
117
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
118
118
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
119
119
  this.delegateController = createDelegateController(this);
120
- this.lockController = createLockController();
121
120
  this.triggerController = createTriggerController();
122
121
  this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
123
122
  this.presented = false;
@@ -183,13 +182,24 @@ const Loading = class {
183
182
  * Present the loading overlay after it has been created.
184
183
  */
185
184
  async present() {
186
- const unlock = await this.lockController.lock();
185
+ /**
186
+ * When using an inline loading indicator
187
+ * and dismissing a loading indicator it is possible to
188
+ * quickly present the loading indicator while it is
189
+ * dismissing. We need to await any current
190
+ * transition to allow the dismiss to finish
191
+ * before presenting again.
192
+ */
193
+ if (this.currentTransition !== undefined) {
194
+ await this.currentTransition;
195
+ }
187
196
  await this.delegateController.attachViewToDom();
188
- await present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation);
197
+ this.currentTransition = present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation);
198
+ await this.currentTransition;
189
199
  if (this.duration > 0) {
190
200
  this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
191
201
  }
192
- unlock();
202
+ this.currentTransition = undefined;
193
203
  }
194
204
  /**
195
205
  * Dismiss the loading overlay after it has been presented.
@@ -201,15 +211,14 @@ const Loading = class {
201
211
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
202
212
  */
203
213
  async dismiss(data, role) {
204
- const unlock = await this.lockController.lock();
205
214
  if (this.durationTimeout) {
206
215
  clearTimeout(this.durationTimeout);
207
216
  }
208
- const dismissed = await dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation, mdLeaveAnimation);
217
+ this.currentTransition = dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation, mdLeaveAnimation);
218
+ const dismissed = await this.currentTransition;
209
219
  if (dismissed) {
210
220
  this.delegateController.removeViewFromDom();
211
221
  }
212
- unlock();
213
222
  return dismissed;
214
223
  }
215
224
  /**
@@ -7,13 +7,13 @@ import { d as doc } from './index-7a14ecec.js';
7
7
  import { G as GESTURE_CONTROLLER } from './gesture-controller-0fa396c4.js';
8
8
  import { p as isEndSide, i as inheritAriaAttributes, o as assert, l as clamp } from './helpers-3379ba19.js';
9
9
  import { m as menuController } from './index-b3e05099.js';
10
- import { r as getOverlay } from './overlays-66222f79.js';
10
+ import { q as getOverlay } from './overlays-e1dadfe6.js';
11
11
  import { c as config, b as getIonMode } from './ionic-global-1ef19007.js';
12
12
  import { c as createColorClasses, h as hostContext } from './theme-17531cdf.js';
13
13
  import { u as menuOutline, v as menuSharp } from './index-ecfc2c9f.js';
14
14
  import './hardware-back-button-39299f84.js';
15
15
  import './animation-a1d9e088.js';
16
- import './framework-delegate-2b76c681.js';
16
+ import './framework-delegate-aa433dea.js';
17
17
  import './index-595d62c9.js';
18
18
 
19
19
  const menuIosCss = ":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){left:unset;right:unset;left:auto;right:0}}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){left:unset;right:unset;left:0;right:auto}}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none !important;transform:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}";