@ionic/core 7.4.2-dev.11695831341.191bdf12 → 7.4.2-dev.11695927273.1323de22
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/data.js +96 -22
- package/components/haptic.js +1 -0
- package/components/ion-content.js +5 -51
- package/components/ion-datetime-button.js +4 -4
- package/components/ion-datetime.js +3 -3
- package/components/ion-nav.js +1 -0
- package/components/ion-router.js +3 -0
- package/components/ion-tab-bar.js +0 -4
- package/components/ion-toast.js +117 -11
- package/components/ios.transition.js +1 -0
- package/components/overlays.js +1 -0
- package/dist/cjs/{button-active-32f15660.js → button-active-19cc8cae.js} +1 -1
- package/dist/cjs/{data-db832785.js → data-c8d21093.js} +96 -22
- package/dist/cjs/{haptic-c5f6b4d5.js → haptic-678abc9f.js} +1 -0
- package/dist/cjs/{index-b183138a.js → index-77d4b2e7.js} +2 -2
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/ion-action-sheet.cjs.entry.js +3 -3
- package/dist/cjs/ion-alert.cjs.entry.js +3 -3
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -50
- package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -4
- package/dist/cjs/ion-datetime_3.cjs.entry.js +5 -5
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +2 -2
- package/dist/cjs/ion-nav_2.cjs.entry.js +2 -1
- package/dist/cjs/ion-picker-column-internal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-reorder_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-route_4.cjs.entry.js +3 -0
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +0 -4
- package/dist/cjs/ion-toast.cjs.entry.js +136 -32
- package/dist/cjs/ion-toggle.cjs.entry.js +1 -1
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/{ios.transition-4b93903d.js → ios.transition-458ee399.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{md.transition-79f3a215.js → md.transition-3423dd44.js} +1 -1
- package/dist/cjs/{overlays-d3a13e61.js → overlays-817dca17.js} +1 -0
- package/dist/collection/components/content/content.js +10 -50
- package/dist/collection/components/datetime/datetime.js +12 -6
- package/dist/collection/components/datetime/test/hour-cycle/datetime.e2e.js +14 -0
- package/dist/collection/components/datetime/utils/data.js +33 -7
- package/dist/collection/components/datetime/utils/format.js +27 -10
- package/dist/collection/components/datetime/utils/helpers.js +37 -5
- package/dist/collection/components/datetime-button/datetime-button.js +4 -4
- package/dist/collection/components/nav/nav.js +1 -0
- package/dist/collection/components/router/router.js +2 -0
- package/dist/collection/components/router/utils/path.js +1 -0
- package/dist/collection/components/tab-bar/tab-bar.js +0 -21
- package/dist/collection/components/toast/animations/ios.enter.js +40 -3
- package/dist/collection/components/toast/animations/ios.leave.js +8 -4
- package/dist/collection/components/toast/animations/md.enter.js +41 -3
- package/dist/collection/components/toast/test/position-anchor/toast.e2e.js +45 -0
- package/dist/collection/components/toast/toast.js +61 -6
- package/dist/collection/utils/native/haptic.js +1 -0
- package/dist/collection/utils/overlays.js +1 -0
- package/dist/collection/utils/transition/ios.transition.js +1 -0
- package/dist/docs.json +83 -10
- package/dist/esm/{button-active-513e9fff.js → button-active-d2346892.js} +1 -1
- package/dist/esm/{data-009dbf15.js → data-44d9e816.js} +96 -22
- package/dist/esm/{haptic-6447af60.js → haptic-1243b917.js} +1 -0
- package/dist/esm/{index-87684bba.js → index-dac72b4c.js} +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/ion-action-sheet.entry.js +3 -3
- package/dist/esm/ion-alert.entry.js +3 -3
- package/dist/esm/ion-app_8.entry.js +5 -51
- package/dist/esm/ion-datetime-button.entry.js +4 -4
- package/dist/esm/ion-datetime_3.entry.js +5 -5
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +2 -2
- package/dist/esm/ion-nav_2.entry.js +2 -1
- package/dist/esm/ion-picker-column-internal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +1 -1
- package/dist/esm/ion-reorder_2.entry.js +1 -1
- package/dist/esm/ion-route_4.entry.js +3 -0
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-tab-bar_2.entry.js +0 -4
- package/dist/esm/ion-toast.entry.js +117 -13
- package/dist/esm/ion-toggle.entry.js +1 -1
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/{ios.transition-81e1aed6.js → ios.transition-991c1a56.js} +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{md.transition-5becd8b5.js → md.transition-fb443521.js} +1 -1
- package/dist/esm/{overlays-8fc6656c.js → overlays-e064e499.js} +1 -0
- package/dist/esm-es5/{button-active-513e9fff.js → button-active-d2346892.js} +1 -1
- package/dist/esm-es5/data-44d9e816.js +4 -0
- package/dist/esm-es5/{index-87684bba.js → index-dac72b4c.js} +1 -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-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.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-picker-column-internal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/{ios.transition-81e1aed6.js → ios.transition-991c1a56.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{md.transition-5becd8b5.js → md.transition-fb443521.js} +1 -1
- package/dist/html.html-data.json +11 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-37456282.system.entry.js → p-06116432.system.entry.js} +1 -1
- package/dist/ionic/{p-270aa06b.entry.js → p-14dec15f.entry.js} +1 -1
- package/dist/ionic/{p-60838ce3.system.entry.js → p-161a6465.system.entry.js} +1 -1
- package/dist/ionic/p-17240d90.js +4 -0
- package/dist/ionic/{p-a6d8476b.system.entry.js → p-17e6836b.system.entry.js} +1 -1
- package/dist/ionic/p-1f448082.system.entry.js +4 -0
- package/dist/ionic/{p-972763df.js → p-2b70878e.js} +1 -1
- package/dist/ionic/{p-13a91505.entry.js → p-2d74ee51.entry.js} +1 -1
- package/dist/ionic/{p-bf9b1560.entry.js → p-2dac36bf.entry.js} +1 -1
- package/dist/ionic/{p-c5729044.system.entry.js → p-2df840d9.system.entry.js} +1 -1
- package/dist/ionic/{p-de676d36.system.entry.js → p-2ffbf4bc.system.entry.js} +1 -1
- package/dist/ionic/{p-4616f20a.system.entry.js → p-30bd5385.system.entry.js} +1 -1
- package/dist/ionic/{p-00aed720.system.js → p-315dd3f8.system.js} +1 -1
- package/dist/ionic/{p-b098f738.system.js → p-35d1c3bb.system.js} +1 -1
- package/dist/ionic/p-3ae2faf0.entry.js +4 -0
- package/dist/ionic/{p-08c5b9f4.system.entry.js → p-3b1a8994.system.entry.js} +1 -1
- package/dist/ionic/p-419b8565.entry.js +4 -0
- package/dist/ionic/{p-82da795c.system.entry.js → p-420da334.system.entry.js} +1 -1
- package/dist/ionic/{p-73f50e29.system.js → p-48393630.system.js} +1 -1
- package/dist/ionic/{p-918d5f19.system.js → p-4cf29e23.system.js} +1 -1
- package/dist/ionic/p-50b11c2b.system.entry.js +4 -0
- package/dist/ionic/{p-53bbd357.system.entry.js → p-5d522814.system.entry.js} +1 -1
- package/dist/ionic/p-5e84b718.system.entry.js +4 -0
- package/dist/ionic/{p-3730f493.entry.js → p-62f05fd2.entry.js} +1 -1
- package/dist/ionic/p-674e6f0c.js +4 -0
- package/dist/ionic/p-6edbc09b.system.js +1 -1
- package/dist/ionic/{p-5e2dc8e0.js → p-716fbba9.js} +1 -1
- package/dist/ionic/{p-f920f5ca.entry.js → p-7779d376.entry.js} +1 -1
- package/dist/ionic/{p-a720dc73.entry.js → p-78f204ee.entry.js} +1 -1
- package/dist/ionic/{p-6bc9c436.system.entry.js → p-86e73df8.system.entry.js} +1 -1
- package/dist/ionic/{p-7129d04e.entry.js → p-8a26eaba.entry.js} +1 -1
- package/dist/ionic/{p-d8b2c214.entry.js → p-974cbc3a.entry.js} +1 -1
- package/dist/ionic/{p-90d892fd.entry.js → p-990aaa2f.entry.js} +1 -1
- package/dist/ionic/{p-8fdd4a2f.system.js → p-9eb5455c.system.js} +1 -1
- package/dist/ionic/{p-4912b933.entry.js → p-a27a6256.entry.js} +1 -1
- package/dist/ionic/{p-b95fd3c6.entry.js → p-b61cf76c.entry.js} +1 -1
- package/dist/ionic/{p-ee6d9730.entry.js → p-b7dad585.entry.js} +1 -1
- package/dist/ionic/p-b8c3f071.system.js +4 -0
- package/dist/ionic/{p-40e16caa.system.entry.js → p-be337735.system.entry.js} +1 -1
- package/dist/ionic/p-c44645f2.entry.js +4 -0
- package/dist/ionic/{p-c7fca267.entry.js → p-c8251e8c.entry.js} +1 -1
- package/dist/ionic/p-d6dcbd7c.js +4 -0
- package/dist/ionic/{p-65a4c12f.system.entry.js → p-ec3fa33b.system.entry.js} +1 -1
- package/dist/ionic/{p-7e46b6ab.entry.js → p-f180d2b6.entry.js} +1 -1
- package/dist/ionic/{p-4a1ac160.system.entry.js → p-f767d6b4.system.entry.js} +1 -1
- package/dist/ionic/{p-63a73b69.system.entry.js → p-f7f6af24.system.entry.js} +1 -1
- package/dist/types/components/content/content.d.ts +1 -2
- package/dist/types/components/datetime/datetime-interface.d.ts +1 -0
- package/dist/types/components/datetime/datetime.d.ts +2 -2
- package/dist/types/components/datetime/utils/data.d.ts +3 -3
- package/dist/types/components/datetime/utils/format.d.ts +3 -3
- package/dist/types/components/datetime/utils/helpers.d.ts +15 -1
- package/dist/types/components/tab-bar/tab-bar.d.ts +0 -8
- package/dist/types/components/toast/animations/ios.enter.d.ts +2 -1
- package/dist/types/components/toast/animations/md.enter.d.ts +2 -1
- package/dist/types/components/toast/toast-interface.d.ts +6 -0
- package/dist/types/components/toast/toast.d.ts +9 -1
- package/dist/types/components.d.ts +16 -8
- package/hydrate/index.js +227 -91
- package/package.json +4 -5
- package/dist/esm-es5/data-009dbf15.js +0 -4
- package/dist/ionic/p-1a36bf45.system.entry.js +0 -4
- package/dist/ionic/p-1f6ac05b.system.entry.js +0 -4
- package/dist/ionic/p-27614d55.entry.js +0 -4
- package/dist/ionic/p-36bfb18c.system.entry.js +0 -4
- package/dist/ionic/p-44ef7224.system.js +0 -4
- package/dist/ionic/p-67c441fa.entry.js +0 -4
- package/dist/ionic/p-72a1cbc7.js +0 -4
- package/dist/ionic/p-78a293a5.js +0 -4
- package/dist/ionic/p-7cfd253c.js +0 -4
- package/dist/ionic/p-ec78a7bf.entry.js +0 -4
- /package/dist/esm-es5/{haptic-6447af60.js → haptic-1243b917.js} +0 -0
- /package/dist/esm-es5/{overlays-8fc6656c.js → overlays-e064e499.js} +0 -0
- /package/dist/ionic/{p-f9015336.js → p-3faf56ab.js} +0 -0
- /package/dist/ionic/{p-7a3caa4e.system.js → p-40bd36f3.system.js} +0 -0
- /package/dist/ionic/{p-14d7b7e2.system.js → p-b4b4bb29.system.js} +0 -0
- /package/dist/ionic/{p-bb6f38ed.js → p-b923f3d7.js} +0 -0
|
@@ -53,13 +53,19 @@ const warnIfValueOutOfBounds = (value, min, max) => {
|
|
|
53
53
|
const isLeapYear = (year) => {
|
|
54
54
|
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
|
|
55
55
|
};
|
|
56
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Determines the hour cycle for a user.
|
|
58
|
+
* If the hour cycle is explicitly defined, just use that.
|
|
59
|
+
* Otherwise, we try to derive it from either the specified
|
|
60
|
+
* locale extension tags or from Intl.DateTimeFormat directly.
|
|
61
|
+
*/
|
|
62
|
+
const getHourCycle = (locale, hourCycle) => {
|
|
57
63
|
/**
|
|
58
|
-
* If developer has explicitly enabled
|
|
64
|
+
* If developer has explicitly enabled 24-hour time
|
|
59
65
|
* then return early and do not look at the system default.
|
|
60
66
|
*/
|
|
61
67
|
if (hourCycle !== undefined) {
|
|
62
|
-
return hourCycle
|
|
68
|
+
return hourCycle;
|
|
63
69
|
}
|
|
64
70
|
/**
|
|
65
71
|
* If hourCycle was not specified, check the locale
|
|
@@ -70,7 +76,7 @@ const is24Hour = (locale, hourCycle) => {
|
|
|
70
76
|
const formatted = new Intl.DateTimeFormat(locale, { hour: 'numeric' });
|
|
71
77
|
const options = formatted.resolvedOptions();
|
|
72
78
|
if (options.hourCycle !== undefined) {
|
|
73
|
-
return options.hourCycle
|
|
79
|
+
return options.hourCycle;
|
|
74
80
|
}
|
|
75
81
|
/**
|
|
76
82
|
* If hourCycle is not specified (either through lack
|
|
@@ -83,7 +89,33 @@ const is24Hour = (locale, hourCycle) => {
|
|
|
83
89
|
if (!hour) {
|
|
84
90
|
throw new Error('Hour value not found from DateTimeFormat');
|
|
85
91
|
}
|
|
86
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Midnight for h11 starts at 0:00am
|
|
94
|
+
* Midnight for h12 starts at 12:00am
|
|
95
|
+
* Midnight for h23 starts at 00:00
|
|
96
|
+
* Midnight for h24 starts at 24:00
|
|
97
|
+
*/
|
|
98
|
+
switch (hour.value) {
|
|
99
|
+
case '0':
|
|
100
|
+
return 'h11';
|
|
101
|
+
case '12':
|
|
102
|
+
return 'h12';
|
|
103
|
+
case '00':
|
|
104
|
+
return 'h23';
|
|
105
|
+
case '24':
|
|
106
|
+
return 'h24';
|
|
107
|
+
default:
|
|
108
|
+
throw new Error(`Invalid hour cycle "${hourCycle}"`);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Determine if the hour cycle uses a 24-hour format.
|
|
113
|
+
* Returns true for h23 and h24. Returns false otherwise.
|
|
114
|
+
* If you don't know the hourCycle, use getHourCycle above
|
|
115
|
+
* and pass the result into this function.
|
|
116
|
+
*/
|
|
117
|
+
const is24Hour = (hourCycle) => {
|
|
118
|
+
return hourCycle === 'h23' || hourCycle === 'h24';
|
|
87
119
|
};
|
|
88
120
|
/**
|
|
89
121
|
* Given a date object, returns the number
|
|
@@ -750,7 +782,7 @@ const getFormattedDayPeriod = (dayPeriod) => {
|
|
|
750
782
|
}
|
|
751
783
|
return dayPeriod.toUpperCase();
|
|
752
784
|
};
|
|
753
|
-
const getLocalizedTime = (locale, refParts,
|
|
785
|
+
const getLocalizedTime = (locale, refParts, hourCycle) => {
|
|
754
786
|
const timeParts = {
|
|
755
787
|
hour: refParts.hour,
|
|
756
788
|
minute: refParts.minute,
|
|
@@ -772,7 +804,7 @@ const getLocalizedTime = (locale, refParts, use24Hour) => {
|
|
|
772
804
|
* We use hourCycle here instead of hour12 due to:
|
|
773
805
|
* https://bugs.chromium.org/p/chromium/issues/detail?id=1347316&q=hour12&can=2
|
|
774
806
|
*/
|
|
775
|
-
hourCycle
|
|
807
|
+
hourCycle,
|
|
776
808
|
/**
|
|
777
809
|
* Setting Z at the end indicates that this
|
|
778
810
|
* date string is in the UTC time zone. This
|
|
@@ -810,17 +842,33 @@ const addTimePadding = (value) => {
|
|
|
810
842
|
* 12 hour times it ensures that
|
|
811
843
|
* hour 0 is formatted as '12'.
|
|
812
844
|
*/
|
|
813
|
-
const getFormattedHour = (hour,
|
|
814
|
-
if (use24Hour) {
|
|
815
|
-
return addTimePadding(hour);
|
|
816
|
-
}
|
|
845
|
+
const getFormattedHour = (hour, hourCycle) => {
|
|
817
846
|
/**
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
847
|
+
* Midnight for h11 starts at 0:00am
|
|
848
|
+
* Midnight for h12 starts at 12:00am
|
|
849
|
+
* Midnight for h23 starts at 00:00
|
|
850
|
+
* Midnight for h24 starts at 24:00
|
|
821
851
|
*/
|
|
822
852
|
if (hour === 0) {
|
|
823
|
-
|
|
853
|
+
switch (hourCycle) {
|
|
854
|
+
case 'h11':
|
|
855
|
+
return '0';
|
|
856
|
+
case 'h12':
|
|
857
|
+
return '12';
|
|
858
|
+
case 'h23':
|
|
859
|
+
return '00';
|
|
860
|
+
case 'h24':
|
|
861
|
+
return '24';
|
|
862
|
+
default:
|
|
863
|
+
throw new Error(`Invalid hour cycle "${hourCycle}"`);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
const use24Hour = is24Hour(hourCycle);
|
|
867
|
+
/**
|
|
868
|
+
* h23 and h24 use 24 hour times.
|
|
869
|
+
*/
|
|
870
|
+
if (use24Hour) {
|
|
871
|
+
return addTimePadding(hour);
|
|
824
872
|
}
|
|
825
873
|
return hour.toString();
|
|
826
874
|
};
|
|
@@ -1055,8 +1103,14 @@ const minutes = [
|
|
|
1055
1103
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
1056
1104
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
1057
1105
|
];
|
|
1106
|
+
// h11 hour system uses 0-11. Midnight starts at 0:00am.
|
|
1107
|
+
const hour11 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
1108
|
+
// h12 hour system uses 0-12. Midnight starts at 12:00am.
|
|
1058
1109
|
const hour12 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
1110
|
+
// h23 hour system uses 0-23. Midnight starts at 0:00.
|
|
1059
1111
|
const hour23 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
|
|
1112
|
+
// h24 hour system uses 1-24. Midnight starts at 24:00.
|
|
1113
|
+
const hour24 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0];
|
|
1060
1114
|
/**
|
|
1061
1115
|
* Given a locale and a mode,
|
|
1062
1116
|
* return an array with formatted days
|
|
@@ -1125,14 +1179,33 @@ const getDaysOfMonth = (month, year, firstDayOfWeek) => {
|
|
|
1125
1179
|
}
|
|
1126
1180
|
return days;
|
|
1127
1181
|
};
|
|
1182
|
+
/**
|
|
1183
|
+
* Returns an array of pre-defined hour
|
|
1184
|
+
* values based on the provided hourCycle.
|
|
1185
|
+
*/
|
|
1186
|
+
const getHourData = (hourCycle) => {
|
|
1187
|
+
switch (hourCycle) {
|
|
1188
|
+
case 'h11':
|
|
1189
|
+
return hour11;
|
|
1190
|
+
case 'h12':
|
|
1191
|
+
return hour12;
|
|
1192
|
+
case 'h23':
|
|
1193
|
+
return hour23;
|
|
1194
|
+
case 'h24':
|
|
1195
|
+
return hour24;
|
|
1196
|
+
default:
|
|
1197
|
+
throw new Error(`Invalid hour cycle "${hourCycle}"`);
|
|
1198
|
+
}
|
|
1199
|
+
};
|
|
1128
1200
|
/**
|
|
1129
1201
|
* Given a local, reference datetime parts and option
|
|
1130
1202
|
* max/min bound datetime parts, calculate the acceptable
|
|
1131
1203
|
* hour and minute values according to the bounds and locale.
|
|
1132
1204
|
*/
|
|
1133
|
-
const generateTime = (refParts, hourCycle = 'h12', minParts, maxParts, hourValues, minuteValues) => {
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1205
|
+
const generateTime = (locale, refParts, hourCycle = 'h12', minParts, maxParts, hourValues, minuteValues) => {
|
|
1206
|
+
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
1207
|
+
const use24Hour = is24Hour(computedHourCycle);
|
|
1208
|
+
let processedHours = getHourData(computedHourCycle);
|
|
1136
1209
|
let processedMinutes = minutes;
|
|
1137
1210
|
let isAMAllowed = true;
|
|
1138
1211
|
let isPMAllowed = true;
|
|
@@ -1464,11 +1537,12 @@ const getCombinedDateColumnData = (locale, todayParts, minParts, maxParts, dayVa
|
|
|
1464
1537
|
};
|
|
1465
1538
|
};
|
|
1466
1539
|
const getTimeColumnsData = (locale, refParts, hourCycle, minParts, maxParts, allowedHourValues, allowedMinuteValues) => {
|
|
1467
|
-
const
|
|
1468
|
-
const
|
|
1540
|
+
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
1541
|
+
const use24Hour = is24Hour(computedHourCycle);
|
|
1542
|
+
const { hours, minutes, am, pm } = generateTime(locale, refParts, computedHourCycle, minParts, maxParts, allowedHourValues, allowedMinuteValues);
|
|
1469
1543
|
const hoursItems = hours.map((hour) => {
|
|
1470
1544
|
return {
|
|
1471
|
-
text: getFormattedHour(hour,
|
|
1545
|
+
text: getFormattedHour(hour, computedHourCycle),
|
|
1472
1546
|
value: getInternalHourValue(hour, use24Hour, refParts.ampm),
|
|
1473
1547
|
};
|
|
1474
1548
|
});
|
|
@@ -1498,4 +1572,4 @@ const getTimeColumnsData = (locale, refParts, hourCycle, minParts, maxParts, all
|
|
|
1498
1572
|
};
|
|
1499
1573
|
};
|
|
1500
1574
|
|
|
1501
|
-
export { getDayColumnData as A, getYearColumnData as B, isMonthFirstLocale as C, getTimeColumnsData as D, isLocaleDayPeriodRTL as E, getDaysOfWeek as F, getMonthAndYear as G, getDaysOfMonth as H, generateMonths as I,
|
|
1575
|
+
export { getDayColumnData as A, getYearColumnData as B, isMonthFirstLocale as C, getTimeColumnsData as D, isLocaleDayPeriodRTL as E, getDaysOfWeek as F, getMonthAndYear as G, getDaysOfMonth as H, generateMonths as I, getHourCycle as J, getLocalizedTime as K, getMonthAndDay as L, formatValue as M, getNextYear as N, getPreviousYear as O, clampDate as P, parseAmPm as Q, calculateHourFromAMPM as R, getLocalizedDateTime as S, getMonthDayAndYear as T, getDay as a, isAfter as b, isSameDay as c, getPreviousMonth as d, getNextMonth as e, getPartsFromCalendarDay as f, generateDayAriaLabel as g, getEndOfWeek as h, isBefore as i, getStartOfWeek as j, getPreviousDay as k, getNextDay as l, getPreviousWeek as m, getNextWeek as n, parseMaxParts as o, parseMinParts as p, parseDate as q, convertToArrayOfNumbers as r, convertDataToISO as s, getToday as t, getClosestValidDate as u, validateParts as v, warnIfValueOutOfBounds as w, getNumDaysInMonth as x, getCombinedDateColumnData as y, getMonthColumnData as z };
|
|
@@ -76,6 +76,7 @@ const HapticEngine = {
|
|
|
76
76
|
* if the browser does not support the Vibrate API.
|
|
77
77
|
*/
|
|
78
78
|
if ((capacitor === null || capacitor === void 0 ? void 0 : capacitor.getPlatform()) === 'web') {
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
79
80
|
return typeof navigator !== 'undefined' && navigator.vibrate !== undefined;
|
|
80
81
|
}
|
|
81
82
|
return true;
|
|
@@ -10,8 +10,8 @@ const LIFECYCLE_WILL_LEAVE = 'ionViewWillLeave';
|
|
|
10
10
|
const LIFECYCLE_DID_LEAVE = 'ionViewDidLeave';
|
|
11
11
|
const LIFECYCLE_WILL_UNLOAD = 'ionViewWillUnload';
|
|
12
12
|
|
|
13
|
-
const iosTransitionAnimation = () => import('./ios.transition-
|
|
14
|
-
const mdTransitionAnimation = () => import('./md.transition-
|
|
13
|
+
const iosTransitionAnimation = () => import('./ios.transition-991c1a56.js');
|
|
14
|
+
const mdTransitionAnimation = () => import('./md.transition-fb443521.js');
|
|
15
15
|
// TODO(FW-2832): types
|
|
16
16
|
const transition = (opts) => {
|
|
17
17
|
return new Promise((resolve, reject) => {
|
package/dist/esm/index.js
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
export { c as createAnimation } from './animation-a1d9e088.js';
|
|
5
|
-
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, g as getIonPageElement } from './index-
|
|
6
|
-
export { iosTransitionAnimation } from './ios.transition-
|
|
7
|
-
export { mdTransitionAnimation } from './md.transition-
|
|
5
|
+
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, g as getIonPageElement } from './index-dac72b4c.js';
|
|
6
|
+
export { iosTransitionAnimation } from './ios.transition-991c1a56.js';
|
|
7
|
+
export { mdTransitionAnimation } from './md.transition-fb443521.js';
|
|
8
8
|
export { g as getTimeGivenProgression } from './cubic-bezier-66542bc5.js';
|
|
9
9
|
export { createGesture } from './index-ff313b19.js';
|
|
10
10
|
export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global-b3fc28dd.js';
|
|
11
11
|
export { c as componentOnReady } from './helpers-3379ba19.js';
|
|
12
12
|
export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-96c9ace3.js';
|
|
13
13
|
export { m as menuController } from './index-61bddc90.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-e064e499.js';
|
|
15
15
|
import './index-7a14ecec.js';
|
|
16
16
|
import './index-2d388930.js';
|
|
17
17
|
import './gesture-controller-0fa396c4.js';
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, d as createEvent, e as readTask, h, H as Host, f as getElement } from './index-2d388930.js';
|
|
5
|
-
import { c as createButtonActiveGesture } from './button-active-
|
|
5
|
+
import { c as createButtonActiveGesture } from './button-active-d2346892.js';
|
|
6
6
|
import { r as raf } from './helpers-3379ba19.js';
|
|
7
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-
|
|
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-e064e499.js';
|
|
9
9
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
10
10
|
import { b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
11
11
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
12
|
-
import './haptic-
|
|
12
|
+
import './haptic-1243b917.js';
|
|
13
13
|
import './capacitor-b4979570.js';
|
|
14
14
|
import './index-7a14ecec.js';
|
|
15
15
|
import './index-ff313b19.js';
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, d as createEvent, i as forceUpdate, h, H as Host, f as getElement } from './index-2d388930.js';
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-96c9ace3.js';
|
|
6
|
-
import { c as createButtonActiveGesture } from './button-active-
|
|
6
|
+
import { c as createButtonActiveGesture } from './button-active-d2346892.js';
|
|
7
7
|
import { r as raf } from './helpers-3379ba19.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
9
|
-
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-
|
|
9
|
+
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-e064e499.js';
|
|
10
10
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
11
11
|
import { c as config, b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
12
12
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
13
|
-
import './haptic-
|
|
13
|
+
import './haptic-1243b917.js';
|
|
14
14
|
import './capacitor-b4979570.js';
|
|
15
15
|
import './index-7a14ecec.js';
|
|
16
16
|
import './index-ff313b19.js';
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, H as Host, f as getElement, d as createEvent, e as readTask, i as forceUpdate, w as writeTask } from './index-2d388930.js';
|
|
5
5
|
import { b as getIonMode, c as config, a as isPlatform } from './ionic-global-b3fc28dd.js';
|
|
6
|
-
import {
|
|
6
|
+
import { c as componentOnReady, l as clamp, i as inheritAriaAttributes, s as shallowEqualStringMap, m as hasLazyBuild } from './helpers-3379ba19.js';
|
|
7
7
|
import { i as isRTL } from './dir-912e3e13.js';
|
|
8
8
|
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
12
|
import { a as attachComponent, d as detachComponent } from './framework-delegate-aa433dea.js';
|
|
13
|
-
import { t as transition } from './index-
|
|
13
|
+
import { t as transition } from './index-dac72b4c.js';
|
|
14
14
|
import './index-595d62c9.js';
|
|
15
15
|
import './index-7a14ecec.js';
|
|
16
16
|
import './keyboard-b063f012.js';
|
|
@@ -146,7 +146,6 @@ const Content = class {
|
|
|
146
146
|
this.cBottom = -1;
|
|
147
147
|
this.isMainContent = true;
|
|
148
148
|
this.resizeTimeout = null;
|
|
149
|
-
this.tabsElement = null;
|
|
150
149
|
// Detail is used in a hot loop in the scroll event, by allocating it here
|
|
151
150
|
// V8 will be able to inline any read/write to it since it's a monomorphic class.
|
|
152
151
|
// https://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.html
|
|
@@ -177,57 +176,12 @@ const Content = class {
|
|
|
177
176
|
}
|
|
178
177
|
connectedCallback() {
|
|
179
178
|
this.isMainContent = this.el.closest('ion-menu, ion-popover, ion-modal') === null;
|
|
180
|
-
/**
|
|
181
|
-
* The fullscreen content offsets need to be
|
|
182
|
-
* computed after the tab bar has loaded. Since
|
|
183
|
-
* lazy evaluation means components are not hydrated
|
|
184
|
-
* at the same time, we need to wait for the ionTabBarLoaded
|
|
185
|
-
* event to fire. This does not impact dist-custom-elements
|
|
186
|
-
* because there is no hydration there.
|
|
187
|
-
*/
|
|
188
|
-
if (hasLazyBuild(this.el)) {
|
|
189
|
-
/**
|
|
190
|
-
* We need to cache the reference to the tabs.
|
|
191
|
-
* If just the content is unmounted then we won't
|
|
192
|
-
* be able to query for the closest tabs on disconnectedCallback
|
|
193
|
-
* since the content has been removed from the DOM tree.
|
|
194
|
-
*/
|
|
195
|
-
const closestTabs = (this.tabsElement = this.el.closest('ion-tabs'));
|
|
196
|
-
if (closestTabs !== null) {
|
|
197
|
-
/**
|
|
198
|
-
* When adding and removing the event listener
|
|
199
|
-
* we need to make sure we pass the same function reference
|
|
200
|
-
* otherwise the event listener will not be removed properly.
|
|
201
|
-
* We can't only pass `this.resize` because "this" in the function
|
|
202
|
-
* context becomes a reference to IonTabs instead of IonContent.
|
|
203
|
-
*
|
|
204
|
-
* Additionally, we listen for ionTabBarLoaded on the IonTabs
|
|
205
|
-
* instance rather than the IonTabBar instance. It's possible for
|
|
206
|
-
* a tab bar to be conditionally rendered/mounted. Since ionTabBarLoaded
|
|
207
|
-
* bubbles, we can catch any instances of child tab bars loading by listening
|
|
208
|
-
* on IonTabs.
|
|
209
|
-
*/
|
|
210
|
-
this.tabsLoadCallback = () => this.resize();
|
|
211
|
-
closestTabs.addEventListener('ionTabBarLoaded', this.tabsLoadCallback);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
179
|
}
|
|
215
180
|
disconnectedCallback() {
|
|
216
181
|
this.onScrollEnd();
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
* be cleared otherwise this will create a memory
|
|
221
|
-
* leak where the IonTabs instance can never be
|
|
222
|
-
* garbage collected.
|
|
223
|
-
*/
|
|
224
|
-
const { tabsElement, tabsLoadCallback } = this;
|
|
225
|
-
if (tabsElement !== null && tabsLoadCallback !== undefined) {
|
|
226
|
-
tabsElement.removeEventListener('ionTabBarLoaded', tabsLoadCallback);
|
|
227
|
-
}
|
|
228
|
-
this.tabsElement = null;
|
|
229
|
-
this.tabsLoadCallback = undefined;
|
|
230
|
-
}
|
|
182
|
+
}
|
|
183
|
+
onAppLoad() {
|
|
184
|
+
this.resize();
|
|
231
185
|
}
|
|
232
186
|
/**
|
|
233
187
|
* Rotating certain devices can update
|
|
@@ -6,7 +6,7 @@ import { a as addEventListener, c as componentOnReady } from './helpers-3379ba19
|
|
|
6
6
|
import { a as printIonError } from './index-595d62c9.js';
|
|
7
7
|
import { c as createColorClasses } from './theme-17531cdf.js';
|
|
8
8
|
import { b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
9
|
-
import { q as parseDate, t as getToday, J as
|
|
9
|
+
import { q as parseDate, t as getToday, J as getHourCycle, S as getLocalizedDateTime, G as getMonthAndYear, K as getLocalizedTime, T as getMonthDayAndYear } from './data-44d9e816.js';
|
|
10
10
|
|
|
11
11
|
const iosDatetimeButtonCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host button{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:0px;margin-bottom:0px;position:relative;-webkit-transition:150ms color ease-in-out;transition:150ms color ease-in-out;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden}:host(.time-active) #time-button,:host(.date-active) #date-button{color:var(--ion-color-base)}:host(.datetime-button-disabled){pointer-events:none}:host(.datetime-button-disabled) button{opacity:0.4}";
|
|
12
12
|
|
|
@@ -60,13 +60,13 @@ const DatetimeButton = class {
|
|
|
60
60
|
* warning in the console.
|
|
61
61
|
*/
|
|
62
62
|
const firstParsedDatetime = parsedDatetimes[0];
|
|
63
|
-
const
|
|
63
|
+
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
64
64
|
this.dateText = this.timeText = undefined;
|
|
65
65
|
switch (datetimePresentation) {
|
|
66
66
|
case 'date-time':
|
|
67
67
|
case 'time-date':
|
|
68
68
|
const dateText = getMonthDayAndYear(locale, firstParsedDatetime);
|
|
69
|
-
const timeText = getLocalizedTime(locale, firstParsedDatetime,
|
|
69
|
+
const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle);
|
|
70
70
|
if (preferWheel) {
|
|
71
71
|
this.dateText = `${dateText} ${timeText}`;
|
|
72
72
|
}
|
|
@@ -93,7 +93,7 @@ const DatetimeButton = class {
|
|
|
93
93
|
}
|
|
94
94
|
break;
|
|
95
95
|
case 'time':
|
|
96
|
-
this.timeText = getLocalizedTime(locale, firstParsedDatetime,
|
|
96
|
+
this.timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle);
|
|
97
97
|
break;
|
|
98
98
|
case 'month-year':
|
|
99
99
|
this.dateText = getMonthAndYear(locale, firstParsedDatetime);
|
|
@@ -9,11 +9,11 @@ import { i as isRTL } from './dir-912e3e13.js';
|
|
|
9
9
|
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-b3fc28dd.js';
|
|
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
|
|
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 getHourCycle, 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-44d9e816.js';
|
|
13
13
|
import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
14
|
-
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-
|
|
14
|
+
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-e064e499.js';
|
|
15
15
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
16
|
-
import { b as hapticSelectionChanged, h as hapticSelectionEnd, a as hapticSelectionStart } from './haptic-
|
|
16
|
+
import { b as hapticSelectionChanged, h as hapticSelectionEnd, a as hapticSelectionStart } from './haptic-1243b917.js';
|
|
17
17
|
import './index-7a14ecec.js';
|
|
18
18
|
import './framework-delegate-aa433dea.js';
|
|
19
19
|
import './hardware-back-button-39299f84.js';
|
|
@@ -1528,7 +1528,7 @@ const Datetime = class {
|
|
|
1528
1528
|
}
|
|
1529
1529
|
renderTimeOverlay() {
|
|
1530
1530
|
const { hourCycle, isTimePopoverOpen, locale } = this;
|
|
1531
|
-
const
|
|
1531
|
+
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
1532
1532
|
const activePart = this.getActivePartsWithFallback();
|
|
1533
1533
|
return [
|
|
1534
1534
|
h("div", { class: "time-header" }, this.renderTimeLabel()),
|
|
@@ -1547,7 +1547,7 @@ const Datetime = class {
|
|
|
1547
1547
|
await popoverRef.onWillDismiss();
|
|
1548
1548
|
this.isTimePopoverOpen = false;
|
|
1549
1549
|
}
|
|
1550
|
-
} }, getLocalizedTime(locale, activePart,
|
|
1550
|
+
} }, getLocalizedTime(locale, activePart, computedHourCycle)),
|
|
1551
1551
|
h("ion-popover", { alignment: "center", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {
|
|
1552
1552
|
/**
|
|
1553
1553
|
* Intersection Observers do not consistently fire between Blink and Webkit
|
|
@@ -5,7 +5,7 @@ import { r as registerInstance, d as createEvent, h, H as Host, f as getElement
|
|
|
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
7
|
import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
8
|
-
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-
|
|
8
|
+
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-e064e499.js';
|
|
9
9
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
10
10
|
import { c as config, b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
11
11
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
@@ -7,7 +7,7 @@ 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-61bddc90.js';
|
|
10
|
-
import { q as getPresentedOverlay } from './overlays-
|
|
10
|
+
import { q as getPresentedOverlay } from './overlays-e064e499.js';
|
|
11
11
|
import { c as config, b as getIonMode } from './ionic-global-b3fc28dd.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';
|
|
@@ -8,9 +8,9 @@ import { g as getElementRoot, l as clamp, r as raf, k as inheritAttributes, m as
|
|
|
8
8
|
import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
9
9
|
import { p as printIonWarning } from './index-595d62c9.js';
|
|
10
10
|
import { g as getCapacitor } from './capacitor-b4979570.js';
|
|
11
|
-
import { G as GESTURE, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as activeAnimations, g as dismiss, h as eventMethod } from './overlays-
|
|
11
|
+
import { G as GESTURE, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as activeAnimations, g as dismiss, h as eventMethod } from './overlays-e064e499.js';
|
|
12
12
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
13
|
-
import { e as deepReady, w as waitForMount } from './index-
|
|
13
|
+
import { e as deepReady, w as waitForMount } from './index-dac72b4c.js';
|
|
14
14
|
import { b as getIonMode, c as config } from './ionic-global-b3fc28dd.js';
|
|
15
15
|
import { KEYBOARD_DID_OPEN } from './keyboard-b551279d.js';
|
|
16
16
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { r as registerInstance, d as createEvent, h, f as getElement, H as Host } from './index-2d388930.js';
|
|
5
5
|
import { g as getTimeGivenProgression } from './cubic-bezier-66542bc5.js';
|
|
6
6
|
import { o as assert, s as shallowEqualStringMap } from './helpers-3379ba19.js';
|
|
7
|
-
import { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-
|
|
7
|
+
import { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-dac72b4c.js';
|
|
8
8
|
import { b as getIonMode, c as config } from './ionic-global-b3fc28dd.js';
|
|
9
9
|
import { a as attachComponent } from './framework-delegate-aa433dea.js';
|
|
10
10
|
|
|
@@ -739,6 +739,7 @@ const Nav = class {
|
|
|
739
739
|
: undefined;
|
|
740
740
|
const mode = getIonMode(this);
|
|
741
741
|
const enteringEl = enteringView.element;
|
|
742
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
742
743
|
const leavingEl = leavingView && leavingView.element;
|
|
743
744
|
const animationOpts = Object.assign(Object.assign({ mode, showGoBack: this.canGoBackSync(enteringView), baseEl: this.el, progressCallback, animated: this.animated && config.getBoolean('animated', true), enteringEl,
|
|
744
745
|
leavingEl }, opts), { animationBuilder: opts.animationBuilder || this.animation || config.get('navAnimation') });
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-2d388930.js';
|
|
5
5
|
import { r as raf, g as getElementRoot } from './helpers-3379ba19.js';
|
|
6
|
-
import { a as hapticSelectionStart, b as hapticSelectionChanged, h as hapticSelectionEnd } from './haptic-
|
|
6
|
+
import { a as hapticSelectionStart, b as hapticSelectionChanged, h as hapticSelectionEnd } from './haptic-1243b917.js';
|
|
7
7
|
import { a as isPlatform, b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
8
8
|
import { c as createColorClasses } from './theme-17531cdf.js';
|
|
9
9
|
import './capacitor-b4979570.js';
|
|
@@ -6,10 +6,10 @@ import { C as CoreDelegate, a as attachComponent, d as detachComponent } from '.
|
|
|
6
6
|
import { r as raf, g as getElementRoot, a as addEventListener, m as hasLazyBuild } from './helpers-3379ba19.js';
|
|
7
7
|
import { c as createLockController } from './lock-controller-e8c6c051.js';
|
|
8
8
|
import { p as printIonWarning } from './index-595d62c9.js';
|
|
9
|
-
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, o as focusFirstDescendant, g as dismiss, h as eventMethod } from './overlays-
|
|
9
|
+
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, o as focusFirstDescendant, g as dismiss, h as eventMethod } from './overlays-e064e499.js';
|
|
10
10
|
import { b as getIonMode, a as isPlatform } from './ionic-global-b3fc28dd.js';
|
|
11
11
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
12
|
-
import { e as deepReady, w as waitForMount } from './index-
|
|
12
|
+
import { e as deepReady, w as waitForMount } from './index-dac72b4c.js';
|
|
13
13
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
14
14
|
import './index-7a14ecec.js';
|
|
15
15
|
import './hardware-back-button-39299f84.js';
|
|
@@ -5,7 +5,7 @@ import { w as writeTask, r as registerInstance, d as createEvent, e as readTask,
|
|
|
5
5
|
import { g as getTimeGivenProgression } from './cubic-bezier-66542bc5.js';
|
|
6
6
|
import { I as ION_CONTENT_CLASS_SELECTOR, b as ION_CONTENT_ELEMENT_SELECTOR, p as printIonContentErrorMsg, g as getScrollElement } from './index-746a238e.js';
|
|
7
7
|
import { t as transitionEndAsync, c as componentOnReady, l as clamp, g as getElementRoot, r as raf } from './helpers-3379ba19.js';
|
|
8
|
-
import { d as hapticImpact, I as ImpactStyle } from './haptic-
|
|
8
|
+
import { d as hapticImpact, I as ImpactStyle } from './haptic-1243b917.js';
|
|
9
9
|
import { a as isPlatform, b as getIonMode, c as config } from './ionic-global-b3fc28dd.js';
|
|
10
10
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
11
11
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-96c9ace3.js';
|
|
@@ -6,7 +6,7 @@ import { j as reorderThreeOutline, k as reorderTwoSharp } from './index-ecfc2c9f
|
|
|
6
6
|
import { b as getIonMode } from './ionic-global-b3fc28dd.js';
|
|
7
7
|
import { f as findClosestIonContent, g as getScrollElement } from './index-746a238e.js';
|
|
8
8
|
import { r as raf } from './helpers-3379ba19.js';
|
|
9
|
-
import { a as hapticSelectionStart, b as hapticSelectionChanged, h as hapticSelectionEnd } from './haptic-
|
|
9
|
+
import { a as hapticSelectionStart, b as hapticSelectionChanged, h as hapticSelectionEnd } from './haptic-1243b917.js';
|
|
10
10
|
import './index-595d62c9.js';
|
|
11
11
|
import './capacitor-b4979570.js';
|
|
12
12
|
import './index-7a14ecec.js';
|
|
@@ -105,6 +105,7 @@ const chainToSegments = (chain) => {
|
|
|
105
105
|
for (const route of chain) {
|
|
106
106
|
for (const segment of route.segments) {
|
|
107
107
|
if (segment[0] === ':') {
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
108
109
|
const param = route.params && route.params[segment.slice(1)];
|
|
109
110
|
if (!param) {
|
|
110
111
|
return null;
|
|
@@ -800,12 +801,14 @@ const Router = class {
|
|
|
800
801
|
}
|
|
801
802
|
const routes = readRoutes(this.el);
|
|
802
803
|
const fromChain = findChainForSegments(from, routes);
|
|
804
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
803
805
|
const beforeLeaveHook = fromChain && fromChain[fromChain.length - 1].beforeLeave;
|
|
804
806
|
const canLeave = beforeLeaveHook ? await beforeLeaveHook() : true;
|
|
805
807
|
if (canLeave === false || typeof canLeave === 'object') {
|
|
806
808
|
return canLeave;
|
|
807
809
|
}
|
|
808
810
|
const toChain = findChainForSegments(to, routes);
|
|
811
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
809
812
|
const beforeEnterHook = toChain && toChain[toChain.length - 1].beforeEnter;
|
|
810
813
|
return beforeEnterHook ? beforeEnterHook() : true;
|
|
811
814
|
}
|
|
@@ -6,7 +6,7 @@ import { c as createLegacyFormController } from './form-controller-ed77647a.js';
|
|
|
6
6
|
import { c as createNotchController } from './notch-controller-8c9c0e54.js';
|
|
7
7
|
import { k as inheritAttributes, f as focusElement, h as findItemLabel, d as renderHiddenInput, e as getAriaLabel } from './helpers-3379ba19.js';
|
|
8
8
|
import { p as printIonWarning } from './index-595d62c9.js';
|
|
9
|
-
import { c as popoverController, b as actionSheetController, a as alertController, s as safeCall } from './overlays-
|
|
9
|
+
import { c as popoverController, b as actionSheetController, a as alertController, s as safeCall } from './overlays-e064e499.js';
|
|
10
10
|
import { i as isRTL } from './dir-912e3e13.js';
|
|
11
11
|
import { h as hostContext, c as createColorClasses, g as getClassMap } from './theme-17531cdf.js';
|
|
12
12
|
import { w as watchForOptions } from './watch-options-355a920a.js';
|
|
@@ -18,7 +18,6 @@ const TabBar = class {
|
|
|
18
18
|
constructor(hostRef) {
|
|
19
19
|
registerInstance(this, hostRef);
|
|
20
20
|
this.ionTabBarChanged = createEvent(this, "ionTabBarChanged", 7);
|
|
21
|
-
this.ionTabBarLoaded = createEvent(this, "ionTabBarLoaded", 7);
|
|
22
21
|
this.keyboardCtrl = null;
|
|
23
22
|
this.keyboardVisible = false;
|
|
24
23
|
this.color = undefined;
|
|
@@ -53,9 +52,6 @@ const TabBar = class {
|
|
|
53
52
|
this.keyboardCtrl.destroy();
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
|
-
componentDidLoad() {
|
|
57
|
-
this.ionTabBarLoaded.emit();
|
|
58
|
-
}
|
|
59
55
|
render() {
|
|
60
56
|
const { color, translucent, keyboardVisible } = this;
|
|
61
57
|
const mode = getIonMode(this);
|