@ionic/core 7.3.3-dev.11693454416.1cb6a7ec → 7.3.3-dev.11693533652.1969cc78
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 -16
- package/components/alert.js +8 -16
- package/components/framework-delegate.js +21 -2
- package/components/ion-loading.js +8 -16
- package/components/ion-modal.js +21 -29
- package/components/ion-nav-link.js +1 -7
- package/components/ion-picker.js +8 -16
- package/components/ion-router-outlet.js +1 -0
- package/components/ion-toast.js +8 -16
- package/components/lock-controller.js +38 -0
- package/components/popover.js +15 -29
- package/dist/cjs/{framework-delegate-e8174951.js → framework-delegate-c0873a6f.js} +21 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +10 -18
- package/dist/cjs/ion-alert.cjs.entry.js +10 -18
- package/dist/cjs/ion-app_8.cjs.entry.js +2 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +10 -18
- package/dist/cjs/ion-loading.cjs.entry.js +10 -18
- package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +23 -31
- package/dist/cjs/ion-nav_2.cjs.entry.js +2 -8
- package/dist/cjs/ion-popover.cjs.entry.js +17 -31
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +10 -18
- package/dist/cjs/lock-controller-4ae2eb59.js +40 -0
- package/dist/cjs/{overlays-0ea06fcb.js → overlays-5c1706ed.js} +1 -1
- package/dist/collection/components/action-sheet/action-sheet.js +8 -16
- package/dist/collection/components/alert/alert.js +8 -16
- package/dist/collection/components/datetime/test/presentation/datetime.e2e.js +48 -17
- package/dist/collection/components/loading/loading.js +8 -16
- package/dist/collection/components/modal/modal.js +21 -29
- package/dist/collection/components/nav-link/nav-link.js +1 -7
- package/dist/collection/components/picker/picker.js +8 -16
- package/dist/collection/components/popover/popover.js +15 -29
- package/dist/collection/components/popover/test/async/popover.e2e.js +42 -0
- package/dist/collection/components/router-outlet/router-outlet.js +1 -0
- package/dist/collection/components/textarea/test/bottom-content/textarea.e2e.js +6 -6
- package/dist/collection/components/textarea/test/card/textarea.e2e.js +1 -1
- package/dist/collection/components/textarea/test/color/textarea.e2e.js +15 -15
- package/dist/collection/components/textarea/test/fill/textarea.e2e.js +10 -10
- package/dist/collection/components/textarea/test/highlight/textarea.e2e.js +9 -9
- package/dist/collection/components/textarea/test/item/textarea.e2e.js +2 -2
- package/dist/collection/components/textarea/test/label-placement/textarea.e2e.js +21 -21
- package/dist/collection/components/textarea/test/legacy/autogrow/textarea.e2e.js +5 -5
- package/dist/collection/components/textarea/test/states/textarea.e2e.js +2 -2
- package/dist/collection/components/toast/toast.js +8 -16
- package/dist/collection/utils/framework-delegate.js +21 -2
- package/dist/collection/utils/lock-controller.js +36 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{framework-delegate-2b76c681.js → framework-delegate-aa433dea.js} +21 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +10 -18
- package/dist/esm/ion-alert.entry.js +10 -18
- package/dist/esm/ion-app_8.entry.js +2 -1
- package/dist/esm/ion-datetime_3.entry.js +10 -18
- package/dist/esm/ion-loading.entry.js +10 -18
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +23 -31
- package/dist/esm/ion-nav_2.entry.js +2 -8
- package/dist/esm/ion-popover.entry.js +17 -31
- package/dist/esm/ion-select_3.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +10 -18
- package/dist/esm/lock-controller-e8c6c051.js +38 -0
- package/dist/esm/{overlays-c3387ec0.js → overlays-e1dadfe6.js} +1 -1
- package/dist/esm-es5/framework-delegate-aa433dea.js +4 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/lock-controller-e8c6c051.js +4 -0
- package/dist/esm-es5/{overlays-c3387ec0.js → overlays-e1dadfe6.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-958bde76.entry.js → p-091cd81e.entry.js} +1 -1
- package/dist/ionic/{p-c32e09fe.system.entry.js → p-0b68c41d.system.entry.js} +1 -1
- package/dist/ionic/p-0cc2bf5a.system.entry.js +4 -0
- package/dist/ionic/p-208f640c.entry.js +4 -0
- package/dist/ionic/p-2539e967.system.entry.js +4 -0
- package/dist/ionic/{p-74bd26b8.system.entry.js → p-28f5715a.system.entry.js} +1 -1
- package/dist/ionic/p-38dd9aec.entry.js +4 -0
- package/dist/ionic/p-3ff018da.entry.js +4 -0
- package/dist/ionic/{p-8074bdd7.system.entry.js → p-45ee211b.system.entry.js} +1 -1
- package/dist/ionic/p-5009cb46.entry.js +4 -0
- package/dist/ionic/p-53b2a46f.js +4 -0
- package/dist/ionic/{p-5ef91692.js → p-582dc7c1.js} +1 -1
- package/dist/ionic/{p-c0d1e5a1.entry.js → p-5c17f888.entry.js} +1 -1
- package/dist/ionic/{p-8d9475b5.system.js → p-613d4042.system.js} +1 -1
- package/dist/ionic/p-647d15d4.system.entry.js +4 -0
- package/dist/ionic/p-653f2fc6.entry.js +4 -0
- package/dist/ionic/p-721933ff.system.js +1 -1
- package/dist/ionic/p-772f6c84.system.js +4 -0
- package/dist/ionic/p-87383d00.system.entry.js +4 -0
- package/dist/ionic/{p-db46fc66.system.js → p-8843b046.system.js} +1 -1
- package/dist/ionic/p-93e47822.entry.js +4 -0
- package/dist/ionic/{p-0e6ca480.entry.js → p-98ebc376.entry.js} +1 -1
- package/dist/ionic/p-af0bc751.system.entry.js +4 -0
- package/dist/ionic/p-b0e9e0b8.system.entry.js +4 -0
- package/dist/ionic/p-b287ab05.js +4 -0
- package/dist/ionic/{p-81b46714.system.js → p-b32742f3.system.js} +1 -1
- package/dist/ionic/p-b3394798.system.entry.js +4 -0
- package/dist/ionic/{p-20087c90.entry.js → p-c759a704.entry.js} +1 -1
- package/dist/ionic/{p-6b9bf14c.system.entry.js → p-d1d3b740.system.entry.js} +1 -1
- package/dist/ionic/{p-8fa43732.system.entry.js → p-d693e765.system.entry.js} +1 -1
- package/dist/ionic/{p-5c96dc4e.entry.js → p-f7faa32d.entry.js} +1 -1
- package/dist/ionic/p-fabb7294.entry.js +4 -0
- package/dist/types/components/action-sheet/action-sheet.d.ts +1 -1
- package/dist/types/components/alert/alert.d.ts +1 -1
- package/dist/types/components/loading/loading.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +1 -1
- package/dist/types/components/picker/picker.d.ts +1 -1
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/toast/toast.d.ts +1 -1
- package/dist/types/utils/lock-controller.d.ts +10 -0
- package/hydrate/index.js +126 -147
- package/package.json +1 -1
- package/dist/esm-es5/framework-delegate-2b76c681.js +0 -4
- 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-61769039.entry.js +0 -4
- package/dist/ionic/p-74723f41.entry.js +0 -4
- package/dist/ionic/p-9b3c3564.entry.js +0 -4
- package/dist/ionic/p-b34c1ae1.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
|
@@ -22,7 +22,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
22
22
|
></ion-textarea>
|
|
23
23
|
`, config);
|
|
24
24
|
const textarea = page.locator('ion-textarea');
|
|
25
|
-
expect(
|
|
25
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-no-fill-valid`));
|
|
26
26
|
});
|
|
27
27
|
test('should render invalid state correctly', async ({ page }) => {
|
|
28
28
|
await page.setContent(`
|
|
@@ -37,7 +37,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
37
37
|
></ion-textarea>
|
|
38
38
|
`, config);
|
|
39
39
|
const textarea = page.locator('ion-textarea');
|
|
40
|
-
expect(
|
|
40
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-no-fill-invalid`));
|
|
41
41
|
});
|
|
42
42
|
test('should render focused state correctly', async ({ page }) => {
|
|
43
43
|
await page.setContent(`
|
|
@@ -52,7 +52,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
52
52
|
></ion-textarea>
|
|
53
53
|
`, config);
|
|
54
54
|
const textarea = page.locator('ion-textarea');
|
|
55
|
-
expect(
|
|
55
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-no-fill-focus`));
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
test.describe('textarea: solid', () => {
|
|
@@ -70,7 +70,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
70
70
|
></ion-textarea>
|
|
71
71
|
`, config);
|
|
72
72
|
const textarea = page.locator('ion-textarea');
|
|
73
|
-
expect(
|
|
73
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-solid-valid`));
|
|
74
74
|
});
|
|
75
75
|
test('should render invalid state correctly', async ({ page }) => {
|
|
76
76
|
await page.setContent(`
|
|
@@ -86,7 +86,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
86
86
|
></ion-textarea>
|
|
87
87
|
`, config);
|
|
88
88
|
const textarea = page.locator('ion-textarea');
|
|
89
|
-
expect(
|
|
89
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-solid-invalid`));
|
|
90
90
|
});
|
|
91
91
|
test('should render focused state correctly', async ({ page }) => {
|
|
92
92
|
await page.setContent(`
|
|
@@ -102,7 +102,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
102
102
|
></ion-textarea>
|
|
103
103
|
`, config);
|
|
104
104
|
const textarea = page.locator('ion-textarea');
|
|
105
|
-
expect(
|
|
105
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-solid-focus`));
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
test.describe('textarea: outline', () => {
|
|
@@ -120,7 +120,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
120
120
|
></ion-textarea>
|
|
121
121
|
`, config);
|
|
122
122
|
const textarea = page.locator('ion-textarea');
|
|
123
|
-
expect(
|
|
123
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-outline-valid`));
|
|
124
124
|
});
|
|
125
125
|
test('should render invalid state correctly', async ({ page }) => {
|
|
126
126
|
await page.setContent(`
|
|
@@ -136,7 +136,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
136
136
|
></ion-textarea>
|
|
137
137
|
`, config);
|
|
138
138
|
const textarea = page.locator('ion-textarea');
|
|
139
|
-
expect(
|
|
139
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-outline-invalid`));
|
|
140
140
|
});
|
|
141
141
|
test('should render focused state correctly', async ({ page }) => {
|
|
142
142
|
await page.setContent(`
|
|
@@ -152,7 +152,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
152
152
|
></ion-textarea>
|
|
153
153
|
`, config);
|
|
154
154
|
const textarea = page.locator('ion-textarea');
|
|
155
|
-
expect(
|
|
155
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-outline-focus`));
|
|
156
156
|
});
|
|
157
157
|
});
|
|
158
158
|
});
|
|
@@ -20,7 +20,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
20
20
|
</ion-list>
|
|
21
21
|
`, config);
|
|
22
22
|
const list = page.locator('ion-list');
|
|
23
|
-
expect(
|
|
23
|
+
await expect(list).toHaveScreenshot(screenshot(`textarea-list-no-fill`));
|
|
24
24
|
});
|
|
25
25
|
test('should render correctly in inset list with no fill', async ({ page }) => {
|
|
26
26
|
await page.setContent(`
|
|
@@ -37,7 +37,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
37
37
|
</ion-list>
|
|
38
38
|
`, config);
|
|
39
39
|
const list = page.locator('ion-list');
|
|
40
|
-
expect(
|
|
40
|
+
await expect(list).toHaveScreenshot(screenshot(`textarea-inset-list-no-fill`));
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
});
|
|
@@ -10,14 +10,14 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
10
10
|
<ion-textarea label="Standard" value="Lorem ipsum" label-placement="start"></ion-textarea>
|
|
11
11
|
`, config);
|
|
12
12
|
const textarea = page.locator('ion-textarea');
|
|
13
|
-
expect(
|
|
13
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-start`));
|
|
14
14
|
});
|
|
15
15
|
test('textarea should render multiple lines of text', async ({ page }) => {
|
|
16
16
|
await page.setContent(`
|
|
17
17
|
<ion-textarea label="Standard" label-placement="start" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."></ion-textarea>
|
|
18
18
|
`, config);
|
|
19
19
|
const textarea = page.locator('ion-textarea');
|
|
20
|
-
expect(
|
|
20
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-start-multi-line-value`));
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
test.describe(title('textarea: label placement end'), () => {
|
|
@@ -26,14 +26,14 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
26
26
|
<ion-textarea label="Standard" value="Lorem ipsum" label-placement="end"></ion-textarea>
|
|
27
27
|
`, config);
|
|
28
28
|
const textarea = page.locator('ion-textarea');
|
|
29
|
-
expect(
|
|
29
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-end`));
|
|
30
30
|
});
|
|
31
31
|
test('textarea should render multiple lines of text', async ({ page }) => {
|
|
32
32
|
await page.setContent(`
|
|
33
33
|
<ion-textarea label="Standard" label-placement="end" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."></ion-textarea>
|
|
34
34
|
`, config);
|
|
35
35
|
const textarea = page.locator('ion-textarea');
|
|
36
|
-
expect(
|
|
36
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-end-multi-line-value`));
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
test.describe(title('textarea: label placement fixed'), () => {
|
|
@@ -42,21 +42,21 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
42
42
|
<ion-textarea label="Standard" value="Lorem ipsum" label-placement="fixed"></ion-textarea>
|
|
43
43
|
`, config);
|
|
44
44
|
const textarea = page.locator('ion-textarea');
|
|
45
|
-
expect(
|
|
45
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-fixed`));
|
|
46
46
|
});
|
|
47
47
|
test('textarea should render multiple lines of text', async ({ page }) => {
|
|
48
48
|
await page.setContent(`
|
|
49
49
|
<ion-textarea label="Standard" label-placement="fixed" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."></ion-textarea>
|
|
50
50
|
`, config);
|
|
51
51
|
const textarea = page.locator('ion-textarea');
|
|
52
|
-
expect(
|
|
52
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-fixed-multi-line-value`));
|
|
53
53
|
});
|
|
54
54
|
test('label should be truncated', async ({ page }) => {
|
|
55
55
|
await page.setContent(`
|
|
56
56
|
<ion-textarea label="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." label-placement="fixed"></ion-textarea>
|
|
57
57
|
`, config);
|
|
58
58
|
const textarea = page.locator('ion-textarea');
|
|
59
|
-
expect(
|
|
59
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-fixed-label-truncated`));
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
62
|
test.describe(title('textarea: label placement stacked'), () => {
|
|
@@ -65,28 +65,28 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
65
65
|
<ion-textarea label="Standard" value="Lorem ipsum" label-placement="stacked"></ion-textarea>
|
|
66
66
|
`, config);
|
|
67
67
|
const textarea = page.locator('ion-textarea');
|
|
68
|
-
expect(
|
|
68
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-stacked-value`));
|
|
69
69
|
});
|
|
70
70
|
test('label should appear above the textarea when there is a no value', async ({ page }) => {
|
|
71
71
|
await page.setContent(`
|
|
72
72
|
<ion-textarea label="Standard" label-placement="stacked"></ion-textarea>
|
|
73
73
|
`, config);
|
|
74
74
|
const textarea = page.locator('ion-textarea');
|
|
75
|
-
expect(
|
|
75
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-stacked-no-value`));
|
|
76
76
|
});
|
|
77
77
|
test('textarea should render multiple lines of text', async ({ page }) => {
|
|
78
78
|
await page.setContent(`
|
|
79
79
|
<ion-textarea label="Standard" label-placement="stacked" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."></ion-textarea>
|
|
80
80
|
`, config);
|
|
81
81
|
const textarea = page.locator('ion-textarea');
|
|
82
|
-
expect(
|
|
82
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-stacked-multi-line-value`));
|
|
83
83
|
});
|
|
84
84
|
test('label should be truncated', async ({ page }) => {
|
|
85
85
|
await page.setContent(`
|
|
86
86
|
<ion-textarea label="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." label-placement="stacked"></ion-textarea>
|
|
87
87
|
`, config);
|
|
88
88
|
const textarea = page.locator('ion-textarea');
|
|
89
|
-
expect(
|
|
89
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-stacked-label-truncated`));
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
test.describe(title('textarea: label placement floating'), () => {
|
|
@@ -95,21 +95,21 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
95
95
|
<ion-textarea label="Standard" value="Lorem ipsum" label-placement="floating"></ion-textarea>
|
|
96
96
|
`, config);
|
|
97
97
|
const textarea = page.locator('ion-textarea');
|
|
98
|
-
expect(
|
|
98
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-floating-value`));
|
|
99
99
|
});
|
|
100
100
|
test('label should appear on top of the textarea and hide the textarea when there is a no value', async ({ page, }) => {
|
|
101
101
|
await page.setContent(`
|
|
102
102
|
<ion-textarea label="Standard" label-placement="floating" placeholder="Placeholder"></ion-textarea>
|
|
103
103
|
`, config);
|
|
104
104
|
const textarea = page.locator('ion-textarea');
|
|
105
|
-
expect(
|
|
105
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-floating-no-value`));
|
|
106
106
|
});
|
|
107
107
|
test('label should appear on top of the textarea when there is a placeholder and no value', async ({ page }) => {
|
|
108
108
|
await page.setContent(`
|
|
109
109
|
<ion-textarea label="Standard" label-placement="floating" placeholder="Placeholder"></ion-textarea>
|
|
110
110
|
`, config);
|
|
111
111
|
const textarea = page.locator('ion-textarea');
|
|
112
|
-
expect(
|
|
112
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-floating-no-value-placeholder`));
|
|
113
113
|
});
|
|
114
114
|
test('label should appear on top of the textarea when the textarea is focused', async ({ page }) => {
|
|
115
115
|
await page.setContent(`
|
|
@@ -119,21 +119,21 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
119
119
|
const nativeTextarea = textarea.locator('textarea');
|
|
120
120
|
await nativeTextarea.click();
|
|
121
121
|
await page.waitForChanges();
|
|
122
|
-
expect(
|
|
122
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-focused-placement-floating-no-value`));
|
|
123
123
|
});
|
|
124
124
|
test('textarea should render multiple lines of text', async ({ page }) => {
|
|
125
125
|
await page.setContent(`
|
|
126
126
|
<ion-textarea label="Standard" label-placement="floating" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."></ion-textarea>
|
|
127
127
|
`, config);
|
|
128
128
|
const textarea = page.locator('ion-textarea');
|
|
129
|
-
expect(
|
|
129
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-floating-multi-line-value`));
|
|
130
130
|
});
|
|
131
131
|
test('label should be truncated', async ({ page }) => {
|
|
132
132
|
await page.setContent(`
|
|
133
133
|
<ion-textarea label="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." label-placement="floating"></ion-textarea>
|
|
134
134
|
`, config);
|
|
135
135
|
const textarea = page.locator('ion-textarea');
|
|
136
|
-
expect(
|
|
136
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-placement-floating-label-truncated`));
|
|
137
137
|
});
|
|
138
138
|
});
|
|
139
139
|
});
|
|
@@ -144,7 +144,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
144
144
|
<ion-textarea label="Label Label Label Label Label" placeholder="Text Input"></ion-textarea>
|
|
145
145
|
`, config);
|
|
146
146
|
const textarea = page.locator('ion-textarea');
|
|
147
|
-
expect(
|
|
147
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-label-truncate`));
|
|
148
148
|
});
|
|
149
149
|
test('label slot should be truncated with an ellipsis', async ({ page }) => {
|
|
150
150
|
await page.setContent(`
|
|
@@ -153,7 +153,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
153
153
|
</ion-textarea>
|
|
154
154
|
`, config);
|
|
155
155
|
const textarea = page.locator('ion-textarea');
|
|
156
|
-
expect(
|
|
156
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-label-slot-truncate`));
|
|
157
157
|
});
|
|
158
158
|
});
|
|
159
159
|
});
|
|
@@ -171,7 +171,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
171
171
|
el.appendChild(labelEl);
|
|
172
172
|
});
|
|
173
173
|
await page.waitForChanges();
|
|
174
|
-
expect(
|
|
174
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-async-label`));
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
177
|
test.describe(title('textarea: flex in grid rendering'), () => {
|
|
@@ -218,7 +218,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
218
218
|
<ion-textarea class="custom-textarea" label="My Label" label-placement="stacked"></ion-textarea>
|
|
219
219
|
`, config);
|
|
220
220
|
const textarea = page.locator('ion-textarea');
|
|
221
|
-
expect(
|
|
221
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-label-layering`));
|
|
222
222
|
});
|
|
223
223
|
});
|
|
224
224
|
});
|
|
@@ -11,7 +11,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
11
11
|
test('should not have visual regressions', async ({ page }) => {
|
|
12
12
|
await page.goto(`/src/components/textarea/test/legacy/autogrow`, config);
|
|
13
13
|
await page.setIonViewport();
|
|
14
|
-
expect(
|
|
14
|
+
await expect(page).toHaveScreenshot(screenshot(`textarea-autogrow-diff`));
|
|
15
15
|
});
|
|
16
16
|
test('should grow when typing', async ({ page }) => {
|
|
17
17
|
await page.setContent(`
|
|
@@ -24,19 +24,19 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
24
24
|
</ion-list>
|
|
25
25
|
</ion-content>
|
|
26
26
|
</ion-app>`, config);
|
|
27
|
-
const textarea =
|
|
27
|
+
const textarea = page.locator('ion-textarea');
|
|
28
28
|
await textarea.click();
|
|
29
29
|
await page.waitForChanges();
|
|
30
30
|
await textarea.type('Now, this is a story all about how');
|
|
31
31
|
await page.setIonViewport();
|
|
32
|
-
expect(
|
|
32
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-autogrow-initial`));
|
|
33
33
|
await textarea.type([
|
|
34
34
|
`\nMy life got flipped-turned upside down`,
|
|
35
35
|
`And I'd like to take a minute`,
|
|
36
36
|
`Just sit right there`,
|
|
37
37
|
`I'll tell you how I became the prince of a town called Bel-Air`,
|
|
38
38
|
].join('\n'));
|
|
39
|
-
expect(
|
|
39
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-autogrow-after`));
|
|
40
40
|
});
|
|
41
41
|
test('should break long lines without white space', async ({ page }) => {
|
|
42
42
|
test.info().annotations.push({
|
|
@@ -52,7 +52,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
52
52
|
</ion-content>
|
|
53
53
|
</ion-app>`, config);
|
|
54
54
|
const textarea = page.locator('ion-textarea');
|
|
55
|
-
expect(
|
|
55
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-autogrow-word-break`));
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
});
|
|
@@ -10,14 +10,14 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
10
10
|
<ion-textarea label="Email" value="hi@ionic.io" readonly="true"></ion-textarea>
|
|
11
11
|
`, config);
|
|
12
12
|
const textarea = page.locator('ion-textarea');
|
|
13
|
-
expect(
|
|
13
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-readonly`));
|
|
14
14
|
});
|
|
15
15
|
test('should render disabled textarea correctly', async ({ page }) => {
|
|
16
16
|
await page.setContent(`
|
|
17
17
|
<ion-textarea label="Email" value="hi@ionic.io" disabled="true"></ion-textarea>
|
|
18
18
|
`, config);
|
|
19
19
|
const textarea = page.locator('ion-textarea');
|
|
20
|
-
expect(
|
|
20
|
+
await expect(textarea).toHaveScreenshot(screenshot(`textarea-disabled`));
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { h, Host } from "@stencil/core";
|
|
5
5
|
import { ENABLE_HTML_CONTENT_DEFAULT } from "../../utils/config";
|
|
6
6
|
import { raf } from "../../utils/helpers";
|
|
7
|
+
import { createLockController } from "../../utils/lock-controller";
|
|
7
8
|
import { printIonWarning } from "../../utils/logging/index";
|
|
8
9
|
import { createDelegateController, createTriggerController, dismiss, eventMethod, isCancel, prepareOverlay, present, safeCall, setOverlayId, } from "../../utils/overlays";
|
|
9
10
|
import { sanitizeDOMString } from "../../utils/sanitization/index";
|
|
@@ -28,6 +29,7 @@ import { mdLeaveAnimation } from "./animations/md.leave";
|
|
|
28
29
|
export class Toast {
|
|
29
30
|
constructor() {
|
|
30
31
|
this.delegateController = createDelegateController(this);
|
|
32
|
+
this.lockController = createLockController();
|
|
31
33
|
this.triggerController = createTriggerController();
|
|
32
34
|
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
33
35
|
this.presented = false;
|
|
@@ -97,30 +99,19 @@ export class Toast {
|
|
|
97
99
|
* Present the toast overlay after it has been created.
|
|
98
100
|
*/
|
|
99
101
|
async present() {
|
|
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
|
+
const unlock = await this.lockController.lock();
|
|
111
103
|
await this.delegateController.attachViewToDom();
|
|
112
|
-
|
|
113
|
-
await this.currentTransition;
|
|
104
|
+
await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, this.position);
|
|
114
105
|
/**
|
|
115
106
|
* Content is revealed to screen readers after
|
|
116
107
|
* the transition to avoid jank since this
|
|
117
108
|
* state updates will cause a re-render.
|
|
118
109
|
*/
|
|
119
110
|
this.revealContentToScreenReader = true;
|
|
120
|
-
this.currentTransition = undefined;
|
|
121
111
|
if (this.duration > 0) {
|
|
122
112
|
this.durationTimeout = setTimeout(() => this.dismiss(undefined, 'timeout'), this.duration);
|
|
123
113
|
}
|
|
114
|
+
unlock();
|
|
124
115
|
}
|
|
125
116
|
/**
|
|
126
117
|
* Dismiss the toast overlay after it has been presented.
|
|
@@ -132,15 +123,16 @@ export class Toast {
|
|
|
132
123
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
133
124
|
*/
|
|
134
125
|
async dismiss(data, role) {
|
|
126
|
+
const unlock = await this.lockController.lock();
|
|
135
127
|
if (this.durationTimeout) {
|
|
136
128
|
clearTimeout(this.durationTimeout);
|
|
137
129
|
}
|
|
138
|
-
|
|
139
|
-
const dismissed = await this.currentTransition;
|
|
130
|
+
const dismissed = await dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, this.position);
|
|
140
131
|
if (dismissed) {
|
|
141
132
|
this.delegateController.removeViewFromDom();
|
|
142
133
|
this.revealContentToScreenReader = false;
|
|
143
134
|
}
|
|
135
|
+
unlock();
|
|
144
136
|
return dismissed;
|
|
145
137
|
}
|
|
146
138
|
/**
|
|
@@ -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
|
-
|
|
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
|
/**
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Creates a lock controller.
|
|
6
|
+
*
|
|
7
|
+
* Claiming a lock means that nothing else can acquire the lock until it is released.
|
|
8
|
+
* This can momentarily prevent execution of code that needs to wait for the earlier code to finish.
|
|
9
|
+
* For example, this can be used to prevent multiple transitions from occurring at the same time.
|
|
10
|
+
*/
|
|
11
|
+
export const createLockController = () => {
|
|
12
|
+
let waitPromise;
|
|
13
|
+
/**
|
|
14
|
+
* When lock() is called, the lock is claimed.
|
|
15
|
+
* Once a lock has been claimed, it cannot be claimed again until it is released.
|
|
16
|
+
* When this function gets resolved, the lock is released, allowing it to be claimed again.
|
|
17
|
+
*
|
|
18
|
+
* @example ```tsx
|
|
19
|
+
* const unlock = await this.lockController.lock();
|
|
20
|
+
* // do other stuff
|
|
21
|
+
* unlock();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
const lock = async () => {
|
|
25
|
+
const p = waitPromise;
|
|
26
|
+
let resolve;
|
|
27
|
+
waitPromise = new Promise((r) => (resolve = r));
|
|
28
|
+
if (p !== undefined) {
|
|
29
|
+
await p;
|
|
30
|
+
}
|
|
31
|
+
return resolve;
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
lock,
|
|
35
|
+
};
|
|
36
|
+
};
|
package/dist/docs.json
CHANGED
|
@@ -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
|
-
|
|
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-
|
|
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-
|
|
19
|
+
import './framework-delegate-aa433dea.js';
|
|
20
20
|
import './index-595d62c9.js';
|
|
21
21
|
|
|
22
22
|
const IonicSlides = (opts) => {
|
|
@@ -4,7 +4,8 @@
|
|
|
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 {
|
|
7
|
+
import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
8
|
+
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
9
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
9
10
|
import { b as getIonMode } from './ionic-global-1ef19007.js';
|
|
10
11
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
@@ -13,7 +14,7 @@ import './capacitor-b4979570.js';
|
|
|
13
14
|
import './index-7a14ecec.js';
|
|
14
15
|
import './index-ff313b19.js';
|
|
15
16
|
import './gesture-controller-0fa396c4.js';
|
|
16
|
-
import './framework-delegate-
|
|
17
|
+
import './framework-delegate-aa433dea.js';
|
|
17
18
|
import './hardware-back-button-39299f84.js';
|
|
18
19
|
import './index-595d62c9.js';
|
|
19
20
|
|
|
@@ -117,6 +118,7 @@ const ActionSheet = class {
|
|
|
117
118
|
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
118
119
|
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
119
120
|
this.delegateController = createDelegateController(this);
|
|
121
|
+
this.lockController = createLockController();
|
|
120
122
|
this.triggerController = createTriggerController();
|
|
121
123
|
this.presented = false;
|
|
122
124
|
this.onBackdropTap = () => {
|
|
@@ -164,21 +166,10 @@ const ActionSheet = class {
|
|
|
164
166
|
* Present the action sheet overlay after it has been created.
|
|
165
167
|
*/
|
|
166
168
|
async present() {
|
|
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
|
+
const unlock = await this.lockController.lock();
|
|
178
170
|
await this.delegateController.attachViewToDom();
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
this.currentTransition = undefined;
|
|
171
|
+
await present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
|
|
172
|
+
unlock();
|
|
182
173
|
}
|
|
183
174
|
/**
|
|
184
175
|
* Dismiss the action sheet overlay after it has been presented.
|
|
@@ -190,11 +181,12 @@ const ActionSheet = class {
|
|
|
190
181
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
191
182
|
*/
|
|
192
183
|
async dismiss(data, role) {
|
|
193
|
-
|
|
194
|
-
const dismissed = await this
|
|
184
|
+
const unlock = await this.lockController.lock();
|
|
185
|
+
const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
195
186
|
if (dismissed) {
|
|
196
187
|
this.delegateController.removeViewFromDom();
|
|
197
188
|
}
|
|
189
|
+
unlock();
|
|
198
190
|
return dismissed;
|
|
199
191
|
}
|
|
200
192
|
/**
|