@ionic/core 7.3.2-dev.11692887667.1614d10a → 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/ion-loading.js +8 -17
- package/components/ion-menu.js +15 -2
- 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 +8 -29
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -17
- package/dist/cjs/ion-alert.cjs.entry.js +8 -17
- package/dist/cjs/ion-datetime_3.cjs.entry.js +8 -17
- package/dist/cjs/ion-loading.cjs.entry.js +8 -17
- package/dist/cjs/ion-menu_3.cjs.entry.js +15 -2
- package/dist/cjs/ion-modal.cjs.entry.js +12 -33
- package/dist/cjs/ion-popover.cjs.entry.js +8 -29
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +8 -17
- package/dist/cjs/{overlays-0ea06fcb.js → overlays-2b9fa92e.js} +22 -0
- 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/menu/menu.js +14 -1
- package/dist/collection/components/menu-button/test/async/menu-button.e2e.js +23 -0
- 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 +8 -29
- package/dist/collection/components/toast/toast.js +8 -17
- package/dist/collection/utils/overlays.js +21 -0
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +8 -17
- package/dist/esm/ion-alert.entry.js +8 -17
- package/dist/esm/ion-datetime_3.entry.js +8 -17
- package/dist/esm/ion-loading.entry.js +8 -17
- package/dist/esm/ion-menu_3.entry.js +15 -2
- package/dist/esm/ion-modal.entry.js +12 -33
- package/dist/esm/ion-popover.entry.js +8 -29
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +8 -17
- package/dist/esm/{overlays-c3387ec0.js → overlays-66222f79.js} +22 -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-c3387ec0.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-8fa43732.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-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-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-c0d1e5a1.entry.js → p-7776d062.entry.js} +1 -1
- package/dist/ionic/p-7ac9bdfa.system.entry.js +4 -0
- package/dist/ionic/p-8d53d5a5.entry.js +4 -0
- package/dist/ionic/p-9888a5a7.entry.js +4 -0
- package/dist/ionic/{p-db46fc66.system.js → p-a0ffdd91.system.js} +1 -1
- package/dist/ionic/p-a133c215.system.entry.js +4 -0
- package/dist/ionic/p-b2098e96.system.entry.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-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-81b46714.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/menu/menu.d.ts +2 -0
- 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 +87 -141
- package/package.json +2 -2
- package/dist/ionic/p-06f1f560.system.entry.js +0 -4
- package/dist/ionic/p-2936ec7f.system.entry.js +0 -4
- package/dist/ionic/p-29b3e70a.entry.js +0 -4
- package/dist/ionic/p-2bc49e5d.system.entry.js +0 -4
- package/dist/ionic/p-2da3e015.system.entry.js +0 -4
- package/dist/ionic/p-423d5a4d.entry.js +0 -4
- package/dist/ionic/p-564aaba3.entry.js +0 -4
- package/dist/ionic/p-5ef91692.js +0 -4
- package/dist/ionic/p-61769039.entry.js +0 -4
- package/dist/ionic/p-74723f41.entry.js +0 -4
- package/dist/ionic/p-8b55f026.entry.js +0 -4
- package/dist/ionic/p-9b3c3564.entry.js +0 -4
- package/dist/ionic/p-ac80da6c.system.entry.js +0 -4
- package/dist/ionic/p-ccea9adc.system.entry.js +0 -4
- package/dist/ionic/p-d5db0834.system.entry.js +0 -4
- package/dist/ionic/p-d8538837.entry.js +0 -4
- package/dist/ionic/p-dd0b6889.system.entry.js +0 -4
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
const index = require('./index-484b1104.js');
|
|
9
9
|
const buttonActive = require('./button-active-dfd2756e.js');
|
|
10
10
|
const helpers = require('./helpers-ea4ccbcb.js');
|
|
11
|
-
const overlays = require('./overlays-
|
|
11
|
+
const overlays = require('./overlays-2b9fa92e.js');
|
|
12
12
|
const theme = require('./theme-fbc56b3b.js');
|
|
13
13
|
const ionicGlobal = require('./ionic-global-f81d8b73.js');
|
|
14
14
|
const animation = require('./animation-2bb33618.js');
|
|
@@ -121,6 +121,7 @@ const ActionSheet = class {
|
|
|
121
121
|
this.willDismissShorthand = index.createEvent(this, "willDismiss", 7);
|
|
122
122
|
this.didDismissShorthand = index.createEvent(this, "didDismiss", 7);
|
|
123
123
|
this.delegateController = overlays.createDelegateController(this);
|
|
124
|
+
this.lockController = overlays.createLockController();
|
|
124
125
|
this.triggerController = overlays.createTriggerController();
|
|
125
126
|
this.presented = false;
|
|
126
127
|
this.onBackdropTap = () => {
|
|
@@ -168,21 +169,10 @@ const ActionSheet = class {
|
|
|
168
169
|
* Present the action sheet overlay after it has been created.
|
|
169
170
|
*/
|
|
170
171
|
async present() {
|
|
171
|
-
|
|
172
|
-
* When using an inline action sheet
|
|
173
|
-
* and dismissing a action sheet it is possible to
|
|
174
|
-
* quickly present the action sheet while it is
|
|
175
|
-
* dismissing. We need to await any current
|
|
176
|
-
* transition to allow the dismiss to finish
|
|
177
|
-
* before presenting again.
|
|
178
|
-
*/
|
|
179
|
-
if (this.currentTransition !== undefined) {
|
|
180
|
-
await this.currentTransition;
|
|
181
|
-
}
|
|
172
|
+
const unlock = await this.lockController.lock();
|
|
182
173
|
await this.delegateController.attachViewToDom();
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
this.currentTransition = undefined;
|
|
174
|
+
await overlays.present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
|
|
175
|
+
unlock();
|
|
186
176
|
}
|
|
187
177
|
/**
|
|
188
178
|
* Dismiss the action sheet overlay after it has been presented.
|
|
@@ -194,11 +184,12 @@ const ActionSheet = class {
|
|
|
194
184
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
195
185
|
*/
|
|
196
186
|
async dismiss(data, role) {
|
|
197
|
-
|
|
198
|
-
const dismissed = await this
|
|
187
|
+
const unlock = await this.lockController.lock();
|
|
188
|
+
const dismissed = await overlays.dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
199
189
|
if (dismissed) {
|
|
200
190
|
this.delegateController.removeViewFromDom();
|
|
201
191
|
}
|
|
192
|
+
unlock();
|
|
202
193
|
return dismissed;
|
|
203
194
|
}
|
|
204
195
|
/**
|
|
@@ -9,7 +9,7 @@ const index = require('./index-484b1104.js');
|
|
|
9
9
|
const config = require('./config-d5882735.js');
|
|
10
10
|
const buttonActive = require('./button-active-dfd2756e.js');
|
|
11
11
|
const helpers = require('./helpers-ea4ccbcb.js');
|
|
12
|
-
const overlays = require('./overlays-
|
|
12
|
+
const overlays = require('./overlays-2b9fa92e.js');
|
|
13
13
|
const theme = require('./theme-fbc56b3b.js');
|
|
14
14
|
const ionicGlobal = require('./ionic-global-f81d8b73.js');
|
|
15
15
|
const animation = require('./animation-2bb33618.js');
|
|
@@ -123,6 +123,7 @@ const Alert = class {
|
|
|
123
123
|
this.willDismissShorthand = index.createEvent(this, "willDismiss", 7);
|
|
124
124
|
this.didDismissShorthand = index.createEvent(this, "didDismiss", 7);
|
|
125
125
|
this.delegateController = overlays.createDelegateController(this);
|
|
126
|
+
this.lockController = overlays.createLockController();
|
|
126
127
|
this.triggerController = overlays.createTriggerController();
|
|
127
128
|
this.customHTMLEnabled = ionicGlobal.config.get('innerHTMLTemplatesEnabled', config.ENABLE_HTML_CONTENT_DEFAULT);
|
|
128
129
|
this.processedInputs = [];
|
|
@@ -289,21 +290,10 @@ const Alert = class {
|
|
|
289
290
|
* Present the alert overlay after it has been created.
|
|
290
291
|
*/
|
|
291
292
|
async present() {
|
|
292
|
-
|
|
293
|
-
* When using an inline alert
|
|
294
|
-
* and dismissing an alert it is possible to
|
|
295
|
-
* quickly present the alert while it is
|
|
296
|
-
* dismissing. We need to await any current
|
|
297
|
-
* transition to allow the dismiss to finish
|
|
298
|
-
* before presenting again.
|
|
299
|
-
*/
|
|
300
|
-
if (this.currentTransition !== undefined) {
|
|
301
|
-
await this.currentTransition;
|
|
302
|
-
}
|
|
293
|
+
const unlock = await this.lockController.lock();
|
|
303
294
|
await this.delegateController.attachViewToDom();
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
this.currentTransition = undefined;
|
|
295
|
+
await overlays.present(this, 'alertEnter', iosEnterAnimation, mdEnterAnimation);
|
|
296
|
+
unlock();
|
|
307
297
|
}
|
|
308
298
|
/**
|
|
309
299
|
* Dismiss the alert overlay after it has been presented.
|
|
@@ -315,11 +305,12 @@ const Alert = class {
|
|
|
315
305
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
316
306
|
*/
|
|
317
307
|
async dismiss(data, role) {
|
|
318
|
-
|
|
319
|
-
const dismissed = await this
|
|
308
|
+
const unlock = await this.lockController.lock();
|
|
309
|
+
const dismissed = await overlays.dismiss(this, data, role, 'alertLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
320
310
|
if (dismissed) {
|
|
321
311
|
this.delegateController.removeViewFromDom();
|
|
322
312
|
}
|
|
313
|
+
unlock();
|
|
323
314
|
return dismissed;
|
|
324
315
|
}
|
|
325
316
|
/**
|
|
@@ -14,7 +14,7 @@ const theme = require('./theme-fbc56b3b.js');
|
|
|
14
14
|
const index$2 = require('./index-d8d1fc0b.js');
|
|
15
15
|
const ionicGlobal = require('./ionic-global-f81d8b73.js');
|
|
16
16
|
const data = require('./data-967b9c15.js');
|
|
17
|
-
const overlays = require('./overlays-
|
|
17
|
+
const overlays = require('./overlays-2b9fa92e.js');
|
|
18
18
|
const animation = require('./animation-2bb33618.js');
|
|
19
19
|
const haptic = require('./haptic-c5f6b4d5.js');
|
|
20
20
|
require('./framework-delegate-e8174951.js');
|
|
@@ -1730,6 +1730,7 @@ const Picker = class {
|
|
|
1730
1730
|
this.willDismissShorthand = index$1.createEvent(this, "willDismiss", 7);
|
|
1731
1731
|
this.didDismissShorthand = index$1.createEvent(this, "didDismiss", 7);
|
|
1732
1732
|
this.delegateController = overlays.createDelegateController(this);
|
|
1733
|
+
this.lockController = overlays.createLockController();
|
|
1733
1734
|
this.triggerController = overlays.createTriggerController();
|
|
1734
1735
|
this.onBackdropTap = () => {
|
|
1735
1736
|
this.dismiss(undefined, overlays.BACKDROP);
|
|
@@ -1796,24 +1797,13 @@ const Picker = class {
|
|
|
1796
1797
|
* Present the picker overlay after it has been created.
|
|
1797
1798
|
*/
|
|
1798
1799
|
async present() {
|
|
1799
|
-
|
|
1800
|
-
* When using an inline picker
|
|
1801
|
-
* and dismissing an picker it is possible to
|
|
1802
|
-
* quickly present the picker while it is
|
|
1803
|
-
* dismissing. We need to await any current
|
|
1804
|
-
* transition to allow the dismiss to finish
|
|
1805
|
-
* before presenting again.
|
|
1806
|
-
*/
|
|
1807
|
-
if (this.currentTransition !== undefined) {
|
|
1808
|
-
await this.currentTransition;
|
|
1809
|
-
}
|
|
1800
|
+
const unlock = await this.lockController.lock();
|
|
1810
1801
|
await this.delegateController.attachViewToDom();
|
|
1811
|
-
|
|
1812
|
-
await this.currentTransition;
|
|
1813
|
-
this.currentTransition = undefined;
|
|
1802
|
+
await overlays.present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);
|
|
1814
1803
|
if (this.duration > 0) {
|
|
1815
1804
|
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
|
|
1816
1805
|
}
|
|
1806
|
+
unlock();
|
|
1817
1807
|
}
|
|
1818
1808
|
/**
|
|
1819
1809
|
* Dismiss the picker overlay after it has been presented.
|
|
@@ -1825,14 +1815,15 @@ const Picker = class {
|
|
|
1825
1815
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
1826
1816
|
*/
|
|
1827
1817
|
async dismiss(data, role) {
|
|
1818
|
+
const unlock = await this.lockController.lock();
|
|
1828
1819
|
if (this.durationTimeout) {
|
|
1829
1820
|
clearTimeout(this.durationTimeout);
|
|
1830
1821
|
}
|
|
1831
|
-
|
|
1832
|
-
const dismissed = await this.currentTransition;
|
|
1822
|
+
const dismissed = await overlays.dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);
|
|
1833
1823
|
if (dismissed) {
|
|
1834
1824
|
this.delegateController.removeViewFromDom();
|
|
1835
1825
|
}
|
|
1826
|
+
unlock();
|
|
1836
1827
|
return dismissed;
|
|
1837
1828
|
}
|
|
1838
1829
|
/**
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
const index = require('./index-484b1104.js');
|
|
9
9
|
const config = require('./config-d5882735.js');
|
|
10
10
|
const helpers = require('./helpers-ea4ccbcb.js');
|
|
11
|
-
const overlays = require('./overlays-
|
|
11
|
+
const overlays = require('./overlays-2b9fa92e.js');
|
|
12
12
|
const theme = require('./theme-fbc56b3b.js');
|
|
13
13
|
const ionicGlobal = require('./ionic-global-f81d8b73.js');
|
|
14
14
|
const animation = require('./animation-2bb33618.js');
|
|
@@ -121,6 +121,7 @@ const Loading = class {
|
|
|
121
121
|
this.willDismissShorthand = index.createEvent(this, "willDismiss", 7);
|
|
122
122
|
this.didDismissShorthand = index.createEvent(this, "didDismiss", 7);
|
|
123
123
|
this.delegateController = overlays.createDelegateController(this);
|
|
124
|
+
this.lockController = overlays.createLockController();
|
|
124
125
|
this.triggerController = overlays.createTriggerController();
|
|
125
126
|
this.customHTMLEnabled = ionicGlobal.config.get('innerHTMLTemplatesEnabled', config.ENABLE_HTML_CONTENT_DEFAULT);
|
|
126
127
|
this.presented = false;
|
|
@@ -186,24 +187,13 @@ const Loading = class {
|
|
|
186
187
|
* Present the loading overlay after it has been created.
|
|
187
188
|
*/
|
|
188
189
|
async present() {
|
|
189
|
-
|
|
190
|
-
* When using an inline loading indicator
|
|
191
|
-
* and dismissing a loading indicator it is possible to
|
|
192
|
-
* quickly present the loading indicator while it is
|
|
193
|
-
* dismissing. We need to await any current
|
|
194
|
-
* transition to allow the dismiss to finish
|
|
195
|
-
* before presenting again.
|
|
196
|
-
*/
|
|
197
|
-
if (this.currentTransition !== undefined) {
|
|
198
|
-
await this.currentTransition;
|
|
199
|
-
}
|
|
190
|
+
const unlock = await this.lockController.lock();
|
|
200
191
|
await this.delegateController.attachViewToDom();
|
|
201
|
-
|
|
202
|
-
await this.currentTransition;
|
|
192
|
+
await overlays.present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation);
|
|
203
193
|
if (this.duration > 0) {
|
|
204
194
|
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
|
|
205
195
|
}
|
|
206
|
-
|
|
196
|
+
unlock();
|
|
207
197
|
}
|
|
208
198
|
/**
|
|
209
199
|
* Dismiss the loading overlay after it has been presented.
|
|
@@ -215,14 +205,15 @@ const Loading = class {
|
|
|
215
205
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
216
206
|
*/
|
|
217
207
|
async dismiss(data, role) {
|
|
208
|
+
const unlock = await this.lockController.lock();
|
|
218
209
|
if (this.durationTimeout) {
|
|
219
210
|
clearTimeout(this.durationTimeout);
|
|
220
211
|
}
|
|
221
|
-
|
|
222
|
-
const dismissed = await this.currentTransition;
|
|
212
|
+
const dismissed = await overlays.dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
223
213
|
if (dismissed) {
|
|
224
214
|
this.delegateController.removeViewFromDom();
|
|
225
215
|
}
|
|
216
|
+
unlock();
|
|
226
217
|
return dismissed;
|
|
227
218
|
}
|
|
228
219
|
/**
|
|
@@ -11,7 +11,7 @@ const index$2 = require('./index-306a7476.js');
|
|
|
11
11
|
const gestureController = require('./gesture-controller-b46721be.js');
|
|
12
12
|
const helpers = require('./helpers-ea4ccbcb.js');
|
|
13
13
|
const index$1 = require('./index-653be4df.js');
|
|
14
|
-
const overlays = require('./overlays-
|
|
14
|
+
const overlays = require('./overlays-2b9fa92e.js');
|
|
15
15
|
const ionicGlobal = require('./ionic-global-f81d8b73.js');
|
|
16
16
|
const theme = require('./theme-fbc56b3b.js');
|
|
17
17
|
const index$3 = require('./index-d8d1fc0b.js');
|
|
@@ -39,6 +39,7 @@ const Menu = class {
|
|
|
39
39
|
this.ionMenuChange = index.createEvent(this, "ionMenuChange", 7);
|
|
40
40
|
this.lastOnEnd = 0;
|
|
41
41
|
this.blocker = gestureController.GESTURE_CONTROLLER.createBlocker({ disableScroll: true });
|
|
42
|
+
this.didLoad = false;
|
|
42
43
|
this.isAnimating = false;
|
|
43
44
|
this._isOpen = false;
|
|
44
45
|
this.inheritedAttributes = {};
|
|
@@ -123,6 +124,7 @@ const Menu = class {
|
|
|
123
124
|
this.sideChanged();
|
|
124
125
|
// register this menu with the app's menu controller
|
|
125
126
|
index$1.menuController._register(this);
|
|
127
|
+
this.menuChanged();
|
|
126
128
|
this.gesture = (await Promise.resolve().then(function () { return require('./index-0ee995e4.js'); })).createGesture({
|
|
127
129
|
el: document,
|
|
128
130
|
gestureName: 'menu-swipe',
|
|
@@ -141,9 +143,20 @@ const Menu = class {
|
|
|
141
143
|
this.inheritedAttributes = helpers.inheritAriaAttributes(this.el);
|
|
142
144
|
}
|
|
143
145
|
async componentDidLoad() {
|
|
144
|
-
this.
|
|
146
|
+
this.didLoad = true;
|
|
147
|
+
this.menuChanged();
|
|
145
148
|
this.updateState();
|
|
146
149
|
}
|
|
150
|
+
menuChanged() {
|
|
151
|
+
/**
|
|
152
|
+
* Inform dependent components such as ion-menu-button
|
|
153
|
+
* that the menu is ready. Note that we only want to do this
|
|
154
|
+
* once the menu has been rendered which is why we check for didLoad.
|
|
155
|
+
*/
|
|
156
|
+
if (this.didLoad) {
|
|
157
|
+
this.ionMenuChange.emit({ disabled: this.disabled, open: this._isOpen });
|
|
158
|
+
}
|
|
159
|
+
}
|
|
147
160
|
async disconnectedCallback() {
|
|
148
161
|
/**
|
|
149
162
|
* The menu should be closed when it is
|
|
@@ -11,7 +11,7 @@ const frameworkDelegate = require('./framework-delegate-e8174951.js');
|
|
|
11
11
|
const helpers = require('./helpers-ea4ccbcb.js');
|
|
12
12
|
const index$4 = require('./index-cc7dfb7c.js');
|
|
13
13
|
const capacitor = require('./capacitor-2ffba62a.js');
|
|
14
|
-
const overlays = require('./overlays-
|
|
14
|
+
const overlays = require('./overlays-2b9fa92e.js');
|
|
15
15
|
const theme = require('./theme-fbc56b3b.js');
|
|
16
16
|
const index$5 = require('./index-8568bedb.js');
|
|
17
17
|
const ionicGlobal = require('./ionic-global-f81d8b73.js');
|
|
@@ -1117,6 +1117,7 @@ const Modal = class {
|
|
|
1117
1117
|
this.willDismissShorthand = index$3.createEvent(this, "willDismiss", 7);
|
|
1118
1118
|
this.didDismissShorthand = index$3.createEvent(this, "didDismiss", 7);
|
|
1119
1119
|
this.ionMount = index$3.createEvent(this, "ionMount", 7);
|
|
1120
|
+
this.lockController = overlays.createLockController();
|
|
1120
1121
|
this.triggerController = overlays.createTriggerController();
|
|
1121
1122
|
this.coreDelegate = frameworkDelegate.CoreDelegate();
|
|
1122
1123
|
this.isSheetModal = false;
|
|
@@ -1284,18 +1285,8 @@ const Modal = class {
|
|
|
1284
1285
|
if (this.presented) {
|
|
1285
1286
|
return;
|
|
1286
1287
|
}
|
|
1288
|
+
const unlock = await this.lockController.lock();
|
|
1287
1289
|
const { presentingElement, el } = this;
|
|
1288
|
-
/**
|
|
1289
|
-
* When using an inline modal
|
|
1290
|
-
* and dismissing a modal it is possible to
|
|
1291
|
-
* quickly present the modal while it is
|
|
1292
|
-
* dismissing. We need to await any current
|
|
1293
|
-
* transition to allow the dismiss to finish
|
|
1294
|
-
* before presenting again.
|
|
1295
|
-
*/
|
|
1296
|
-
if (this.currentTransition !== undefined) {
|
|
1297
|
-
await this.currentTransition;
|
|
1298
|
-
}
|
|
1299
1290
|
/**
|
|
1300
1291
|
* If the modal is presented multiple times (inline modals), we
|
|
1301
1292
|
* need to reset the current breakpoint to the initial breakpoint.
|
|
@@ -1327,11 +1318,6 @@ const Modal = class {
|
|
|
1327
1318
|
await index$5.waitForMount();
|
|
1328
1319
|
}
|
|
1329
1320
|
index$3.writeTask(() => this.el.classList.add('show-modal'));
|
|
1330
|
-
this.currentTransition = overlays.present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
1331
|
-
presentingEl: presentingElement,
|
|
1332
|
-
currentBreakpoint: this.initialBreakpoint,
|
|
1333
|
-
backdropBreakpoint: this.backdropBreakpoint,
|
|
1334
|
-
});
|
|
1335
1321
|
/* tslint:disable-next-line */
|
|
1336
1322
|
if (typeof window !== 'undefined') {
|
|
1337
1323
|
/**
|
|
@@ -1374,14 +1360,18 @@ const Modal = class {
|
|
|
1374
1360
|
this.statusBarStyle = await StatusBar.getStyle();
|
|
1375
1361
|
setCardStatusBarDark();
|
|
1376
1362
|
}
|
|
1377
|
-
await this
|
|
1363
|
+
await overlays.present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
1364
|
+
presentingEl: presentingElement,
|
|
1365
|
+
currentBreakpoint: this.initialBreakpoint,
|
|
1366
|
+
backdropBreakpoint: this.backdropBreakpoint,
|
|
1367
|
+
});
|
|
1378
1368
|
if (this.isSheetModal) {
|
|
1379
1369
|
this.initSheetGesture();
|
|
1380
1370
|
}
|
|
1381
1371
|
else if (hasCardModal) {
|
|
1382
1372
|
this.initSwipeToClose();
|
|
1383
1373
|
}
|
|
1384
|
-
|
|
1374
|
+
unlock();
|
|
1385
1375
|
}
|
|
1386
1376
|
initSwipeToClose() {
|
|
1387
1377
|
var _a;
|
|
@@ -1471,6 +1461,7 @@ const Modal = class {
|
|
|
1471
1461
|
if (this.gestureAnimationDismissing && role !== overlays.GESTURE) {
|
|
1472
1462
|
return false;
|
|
1473
1463
|
}
|
|
1464
|
+
const unlock = await this.lockController.lock();
|
|
1474
1465
|
/**
|
|
1475
1466
|
* If a canDismiss handler is responsible
|
|
1476
1467
|
* for calling the dismiss method, we should
|
|
@@ -1494,24 +1485,12 @@ const Modal = class {
|
|
|
1494
1485
|
window.removeEventListener(keyboard.KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
1495
1486
|
this.keyboardOpenCallback = undefined;
|
|
1496
1487
|
}
|
|
1497
|
-
/**
|
|
1498
|
-
* When using an inline modal
|
|
1499
|
-
* and presenting a modal it is possible to
|
|
1500
|
-
* quickly dismiss the modal while it is
|
|
1501
|
-
* presenting. We need to await any current
|
|
1502
|
-
* transition to allow the present to finish
|
|
1503
|
-
* before dismissing again.
|
|
1504
|
-
*/
|
|
1505
|
-
if (this.currentTransition !== undefined) {
|
|
1506
|
-
await this.currentTransition;
|
|
1507
|
-
}
|
|
1508
1488
|
const enteringAnimation = overlays.activeAnimations.get(this) || [];
|
|
1509
|
-
|
|
1489
|
+
const dismissed = await overlays.dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, {
|
|
1510
1490
|
presentingEl: presentingElement,
|
|
1511
1491
|
currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
|
|
1512
1492
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
1513
1493
|
});
|
|
1514
|
-
const dismissed = await this.currentTransition;
|
|
1515
1494
|
if (dismissed) {
|
|
1516
1495
|
const { delegate } = this.getDelegate();
|
|
1517
1496
|
await frameworkDelegate.detachComponent(delegate, this.usersElement);
|
|
@@ -1525,8 +1504,8 @@ const Modal = class {
|
|
|
1525
1504
|
enteringAnimation.forEach((ani) => ani.destroy());
|
|
1526
1505
|
}
|
|
1527
1506
|
this.currentBreakpoint = undefined;
|
|
1528
|
-
this.currentTransition = undefined;
|
|
1529
1507
|
this.animation = undefined;
|
|
1508
|
+
unlock();
|
|
1530
1509
|
return dismissed;
|
|
1531
1510
|
}
|
|
1532
1511
|
/**
|
|
@@ -9,7 +9,7 @@ const index = require('./index-484b1104.js');
|
|
|
9
9
|
const frameworkDelegate = require('./framework-delegate-e8174951.js');
|
|
10
10
|
const helpers = require('./helpers-ea4ccbcb.js');
|
|
11
11
|
const index$1 = require('./index-cc7dfb7c.js');
|
|
12
|
-
const overlays = require('./overlays-
|
|
12
|
+
const overlays = require('./overlays-2b9fa92e.js');
|
|
13
13
|
const ionicGlobal = require('./ionic-global-f81d8b73.js');
|
|
14
14
|
const theme = require('./theme-fbc56b3b.js');
|
|
15
15
|
const index$2 = require('./index-8568bedb.js');
|
|
@@ -987,6 +987,7 @@ const Popover = class {
|
|
|
987
987
|
this.ionMount = index.createEvent(this, "ionMount", 7);
|
|
988
988
|
this.parentPopover = null;
|
|
989
989
|
this.coreDelegate = frameworkDelegate.CoreDelegate();
|
|
990
|
+
this.lockController = overlays.createLockController();
|
|
990
991
|
this.inline = false;
|
|
991
992
|
this.focusDescendantOnPresent = false;
|
|
992
993
|
this.onBackdropTap = () => {
|
|
@@ -1163,17 +1164,7 @@ const Popover = class {
|
|
|
1163
1164
|
if (this.presented) {
|
|
1164
1165
|
return;
|
|
1165
1166
|
}
|
|
1166
|
-
|
|
1167
|
-
* When using an inline popover
|
|
1168
|
-
* and dismissing a popover it is possible to
|
|
1169
|
-
* quickly present the popover while it is
|
|
1170
|
-
* dismissing. We need to await any current
|
|
1171
|
-
* transition to allow the dismiss to finish
|
|
1172
|
-
* before presenting again.
|
|
1173
|
-
*/
|
|
1174
|
-
if (this.currentTransition !== undefined) {
|
|
1175
|
-
await this.currentTransition;
|
|
1176
|
-
}
|
|
1167
|
+
const unlock = await this.lockController.lock();
|
|
1177
1168
|
const { el } = this;
|
|
1178
1169
|
const { inline, delegate } = this.getDelegate(true);
|
|
1179
1170
|
this.usersElement = await frameworkDelegate.attachComponent(delegate, el, this.component, ['popover-viewport'], this.componentProps, inline);
|
|
@@ -1204,7 +1195,7 @@ const Popover = class {
|
|
|
1204
1195
|
else if (!this.keepContentsMounted) {
|
|
1205
1196
|
await index$2.waitForMount();
|
|
1206
1197
|
}
|
|
1207
|
-
|
|
1198
|
+
await overlays.present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
1208
1199
|
event: event || this.event,
|
|
1209
1200
|
size: this.size,
|
|
1210
1201
|
trigger: this.triggerEl,
|
|
@@ -1212,8 +1203,6 @@ const Popover = class {
|
|
|
1212
1203
|
side: this.side,
|
|
1213
1204
|
align: this.alignment,
|
|
1214
1205
|
});
|
|
1215
|
-
await this.currentTransition;
|
|
1216
|
-
this.currentTransition = undefined;
|
|
1217
1206
|
/**
|
|
1218
1207
|
* If popover is nested and was
|
|
1219
1208
|
* presented using the "Right" arrow key,
|
|
@@ -1223,6 +1212,7 @@ const Popover = class {
|
|
|
1223
1212
|
if (this.focusDescendantOnPresent) {
|
|
1224
1213
|
overlays.focusFirstDescendant(this.el, this.el);
|
|
1225
1214
|
}
|
|
1215
|
+
unlock();
|
|
1226
1216
|
}
|
|
1227
1217
|
/**
|
|
1228
1218
|
* Dismiss the popover overlay after it has been presented.
|
|
@@ -1233,23 +1223,12 @@ const Popover = class {
|
|
|
1233
1223
|
* a parent popover if this popover is nested. Defaults to `true`.
|
|
1234
1224
|
*/
|
|
1235
1225
|
async dismiss(data, role, dismissParentPopover = true) {
|
|
1236
|
-
|
|
1237
|
-
* When using an inline popover
|
|
1238
|
-
* and presenting a popover it is possible to
|
|
1239
|
-
* quickly dismiss the popover while it is
|
|
1240
|
-
* presenting. We need to await any current
|
|
1241
|
-
* transition to allow the present to finish
|
|
1242
|
-
* before dismissing again.
|
|
1243
|
-
*/
|
|
1244
|
-
if (this.currentTransition !== undefined) {
|
|
1245
|
-
await this.currentTransition;
|
|
1246
|
-
}
|
|
1226
|
+
const unlock = await this.lockController.lock();
|
|
1247
1227
|
const { destroyKeyboardInteraction, destroyDismissInteraction } = this;
|
|
1248
1228
|
if (dismissParentPopover && this.parentPopover) {
|
|
1249
1229
|
this.parentPopover.dismiss(data, role, dismissParentPopover);
|
|
1250
1230
|
}
|
|
1251
|
-
|
|
1252
|
-
const shouldDismiss = await this.currentTransition;
|
|
1231
|
+
const shouldDismiss = await overlays.dismiss(this, data, role, 'popoverLeave', iosLeaveAnimation, mdLeaveAnimation, this.event);
|
|
1253
1232
|
if (shouldDismiss) {
|
|
1254
1233
|
if (destroyKeyboardInteraction) {
|
|
1255
1234
|
destroyKeyboardInteraction();
|
|
@@ -1267,7 +1246,7 @@ const Popover = class {
|
|
|
1267
1246
|
const { delegate } = this.getDelegate();
|
|
1268
1247
|
await frameworkDelegate.detachComponent(delegate, this.usersElement);
|
|
1269
1248
|
}
|
|
1270
|
-
|
|
1249
|
+
unlock();
|
|
1271
1250
|
return shouldDismiss;
|
|
1272
1251
|
}
|
|
1273
1252
|
/**
|
|
@@ -10,7 +10,7 @@ const formController = require('./form-controller-5e223b54.js');
|
|
|
10
10
|
const notchController = require('./notch-controller-c27fe0b7.js');
|
|
11
11
|
const helpers = require('./helpers-ea4ccbcb.js');
|
|
12
12
|
const index$1 = require('./index-cc7dfb7c.js');
|
|
13
|
-
const overlays = require('./overlays-
|
|
13
|
+
const overlays = require('./overlays-2b9fa92e.js');
|
|
14
14
|
const dir = require('./dir-f1e0ca26.js');
|
|
15
15
|
const theme = require('./theme-fbc56b3b.js');
|
|
16
16
|
const watchOptions = require('./watch-options-f3f77e54.js');
|
|
@@ -9,7 +9,7 @@ const index = require('./index-484b1104.js');
|
|
|
9
9
|
const config = require('./config-d5882735.js');
|
|
10
10
|
const helpers = require('./helpers-ea4ccbcb.js');
|
|
11
11
|
const index$1 = require('./index-cc7dfb7c.js');
|
|
12
|
-
const overlays = require('./overlays-
|
|
12
|
+
const overlays = require('./overlays-2b9fa92e.js');
|
|
13
13
|
const theme = require('./theme-fbc56b3b.js');
|
|
14
14
|
const ionicGlobal = require('./ionic-global-f81d8b73.js');
|
|
15
15
|
const animation = require('./animation-2bb33618.js');
|
|
@@ -126,6 +126,7 @@ const Toast = class {
|
|
|
126
126
|
this.willDismissShorthand = index.createEvent(this, "willDismiss", 7);
|
|
127
127
|
this.didDismissShorthand = index.createEvent(this, "didDismiss", 7);
|
|
128
128
|
this.delegateController = overlays.createDelegateController(this);
|
|
129
|
+
this.lockController = overlays.createLockController();
|
|
129
130
|
this.triggerController = overlays.createTriggerController();
|
|
130
131
|
this.customHTMLEnabled = ionicGlobal.config.get('innerHTMLTemplatesEnabled', config.ENABLE_HTML_CONTENT_DEFAULT);
|
|
131
132
|
this.presented = false;
|
|
@@ -195,30 +196,19 @@ const Toast = class {
|
|
|
195
196
|
* Present the toast overlay after it has been created.
|
|
196
197
|
*/
|
|
197
198
|
async present() {
|
|
198
|
-
|
|
199
|
-
* When using an inline toast
|
|
200
|
-
* and dismissing a toast it is possible to
|
|
201
|
-
* quickly present the toast while it is
|
|
202
|
-
* dismissing. We need to await any current
|
|
203
|
-
* transition to allow the dismiss to finish
|
|
204
|
-
* before presenting again.
|
|
205
|
-
*/
|
|
206
|
-
if (this.currentTransition !== undefined) {
|
|
207
|
-
await this.currentTransition;
|
|
208
|
-
}
|
|
199
|
+
const unlock = await this.lockController.lock();
|
|
209
200
|
await this.delegateController.attachViewToDom();
|
|
210
|
-
|
|
211
|
-
await this.currentTransition;
|
|
201
|
+
await overlays.present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, this.position);
|
|
212
202
|
/**
|
|
213
203
|
* Content is revealed to screen readers after
|
|
214
204
|
* the transition to avoid jank since this
|
|
215
205
|
* state updates will cause a re-render.
|
|
216
206
|
*/
|
|
217
207
|
this.revealContentToScreenReader = true;
|
|
218
|
-
this.currentTransition = undefined;
|
|
219
208
|
if (this.duration > 0) {
|
|
220
209
|
this.durationTimeout = setTimeout(() => this.dismiss(undefined, 'timeout'), this.duration);
|
|
221
210
|
}
|
|
211
|
+
unlock();
|
|
222
212
|
}
|
|
223
213
|
/**
|
|
224
214
|
* Dismiss the toast overlay after it has been presented.
|
|
@@ -230,15 +220,16 @@ const Toast = class {
|
|
|
230
220
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
231
221
|
*/
|
|
232
222
|
async dismiss(data, role) {
|
|
223
|
+
const unlock = await this.lockController.lock();
|
|
233
224
|
if (this.durationTimeout) {
|
|
234
225
|
clearTimeout(this.durationTimeout);
|
|
235
226
|
}
|
|
236
|
-
|
|
237
|
-
const dismissed = await this.currentTransition;
|
|
227
|
+
const dismissed = await overlays.dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, this.position);
|
|
238
228
|
if (dismissed) {
|
|
239
229
|
this.delegateController.removeViewFromDom();
|
|
240
230
|
this.revealContentToScreenReader = false;
|
|
241
231
|
}
|
|
232
|
+
unlock();
|
|
242
233
|
return dismissed;
|
|
243
234
|
}
|
|
244
235
|
/**
|
|
@@ -619,6 +619,27 @@ const createDelegateController = (ref) => {
|
|
|
619
619
|
removeViewFromDom,
|
|
620
620
|
};
|
|
621
621
|
};
|
|
622
|
+
/**
|
|
623
|
+
* Creates a lock controller.
|
|
624
|
+
*
|
|
625
|
+
* This function locks transitions.
|
|
626
|
+
* The unlock() function within it calls resolve on this function, unlocking the transitions.
|
|
627
|
+
*/
|
|
628
|
+
const createLockController = () => {
|
|
629
|
+
let waitPromise;
|
|
630
|
+
const lock = async () => {
|
|
631
|
+
const p = waitPromise;
|
|
632
|
+
let resolve;
|
|
633
|
+
waitPromise = new Promise((r) => (resolve = r));
|
|
634
|
+
if (p !== undefined) {
|
|
635
|
+
await p;
|
|
636
|
+
}
|
|
637
|
+
return resolve;
|
|
638
|
+
};
|
|
639
|
+
return {
|
|
640
|
+
lock,
|
|
641
|
+
};
|
|
642
|
+
};
|
|
622
643
|
/**
|
|
623
644
|
* Constructs a trigger interaction for an overlay.
|
|
624
645
|
* Presents an overlay when the trigger is clicked.
|
|
@@ -676,6 +697,7 @@ exports.actionSheetController = actionSheetController;
|
|
|
676
697
|
exports.activeAnimations = activeAnimations;
|
|
677
698
|
exports.alertController = alertController;
|
|
678
699
|
exports.createDelegateController = createDelegateController;
|
|
700
|
+
exports.createLockController = createLockController;
|
|
679
701
|
exports.createTriggerController = createTriggerController;
|
|
680
702
|
exports.dismiss = dismiss;
|
|
681
703
|
exports.eventMethod = eventMethod;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { Host, h, readTask } from "@stencil/core";
|
|
5
5
|
import { createButtonActiveGesture } from "../../utils/gesture/button-active";
|
|
6
6
|
import { raf } from "../../utils/helpers";
|
|
7
|
-
import { BACKDROP, createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
|
|
7
|
+
import { BACKDROP, createDelegateController, createLockController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
|
|
8
8
|
import { getClassMap } from "../../utils/theme";
|
|
9
9
|
import { getIonMode } from "../../global/ionic-global";
|
|
10
10
|
import { iosEnterAnimation } from "./animations/ios.enter";
|
|
@@ -17,6 +17,7 @@ import { mdLeaveAnimation } from "./animations/md.leave";
|
|
|
17
17
|
export class ActionSheet {
|
|
18
18
|
constructor() {
|
|
19
19
|
this.delegateController = createDelegateController(this);
|
|
20
|
+
this.lockController = createLockController();
|
|
20
21
|
this.triggerController = createTriggerController();
|
|
21
22
|
this.presented = false;
|
|
22
23
|
this.onBackdropTap = () => {
|
|
@@ -64,21 +65,10 @@ export class ActionSheet {
|
|
|
64
65
|
* Present the action sheet overlay after it has been created.
|
|
65
66
|
*/
|
|
66
67
|
async present() {
|
|
67
|
-
|
|
68
|
-
* When using an inline action sheet
|
|
69
|
-
* and dismissing a action sheet it is possible to
|
|
70
|
-
* quickly present the action sheet while it is
|
|
71
|
-
* dismissing. We need to await any current
|
|
72
|
-
* transition to allow the dismiss to finish
|
|
73
|
-
* before presenting again.
|
|
74
|
-
*/
|
|
75
|
-
if (this.currentTransition !== undefined) {
|
|
76
|
-
await this.currentTransition;
|
|
77
|
-
}
|
|
68
|
+
const unlock = await this.lockController.lock();
|
|
78
69
|
await this.delegateController.attachViewToDom();
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this.currentTransition = undefined;
|
|
70
|
+
await present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
|
|
71
|
+
unlock();
|
|
82
72
|
}
|
|
83
73
|
/**
|
|
84
74
|
* Dismiss the action sheet overlay after it has been presented.
|
|
@@ -90,11 +80,12 @@ export class ActionSheet {
|
|
|
90
80
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
91
81
|
*/
|
|
92
82
|
async dismiss(data, role) {
|
|
93
|
-
|
|
94
|
-
const dismissed = await this
|
|
83
|
+
const unlock = await this.lockController.lock();
|
|
84
|
+
const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
95
85
|
if (dismissed) {
|
|
96
86
|
this.delegateController.removeViewFromDom();
|
|
97
87
|
}
|
|
88
|
+
unlock();
|
|
98
89
|
return dismissed;
|
|
99
90
|
}
|
|
100
91
|
/**
|