@ionic/core 8.7.13-dev.11765550444.1d97de23 → 8.7.13-dev.11765552290.11441928
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/ion-datetime.js +55 -43
- package/dist/cjs/ion-datetime_3.cjs.entry.js +55 -43
- package/dist/collection/components/datetime/datetime.js +55 -43
- package/dist/docs.json +1 -1
- package/dist/esm/ion-datetime_3.entry.js +55 -43
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-2ccaee5c.entry.js +4 -0
- package/hydrate/index.js +55 -43
- package/hydrate/index.mjs +55 -43
- package/package.json +1 -1
- package/dist/ionic/p-4c09dde7.entry.js +0 -4
|
@@ -1085,52 +1085,64 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
1085
1085
|
* visible if used inside of a modal or a popover otherwise the scrollable
|
|
1086
1086
|
* areas will not have the correct values snapped into place.
|
|
1087
1087
|
*
|
|
1088
|
-
* We use ResizeObserver to detect when the element transitions
|
|
1088
|
+
* FW-6931: We use ResizeObserver to detect when the element transitions
|
|
1089
1089
|
* between having dimensions (visible) and zero dimensions (hidden). This
|
|
1090
1090
|
* is more reliable than IntersectionObserver for detecting visibility
|
|
1091
1091
|
* changes, especially when the element is inside a modal or popover.
|
|
1092
1092
|
*/
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1093
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
1094
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
1095
|
+
const entry = entries[0];
|
|
1096
|
+
const { width, height } = entry.contentRect;
|
|
1097
|
+
const isVisible = width > 0 && height > 0;
|
|
1098
|
+
const isReady = el.classList.contains('datetime-ready');
|
|
1099
|
+
if (isVisible && !isReady) {
|
|
1100
|
+
this.initializeListeners();
|
|
1101
|
+
/**
|
|
1102
|
+
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
1103
|
+
* can properly scroll contents into view. As a result
|
|
1104
|
+
* we hide the scrollable content until after that frame
|
|
1105
|
+
* so users do not see the content quickly shifting. The downside
|
|
1106
|
+
* is that the content will pop into view a frame after. Maybe there
|
|
1107
|
+
* is a better way to handle this?
|
|
1108
|
+
*/
|
|
1109
|
+
writeTask(() => {
|
|
1110
|
+
el.classList.add('datetime-ready');
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
else if (!isVisible && isReady) {
|
|
1114
|
+
/**
|
|
1115
|
+
* Clean up listeners when hidden so we can properly
|
|
1116
|
+
* reinitialize scroll positions on re-presentation.
|
|
1117
|
+
*/
|
|
1118
|
+
this.destroyInteractionListeners();
|
|
1119
|
+
/**
|
|
1120
|
+
* Close month/year picker when hidden, otherwise
|
|
1121
|
+
* it will be open when re-presented with a 0-height
|
|
1122
|
+
* scroll area, showing the wrong month.
|
|
1123
|
+
*/
|
|
1124
|
+
this.showMonthAndYear = false;
|
|
1125
|
+
writeTask(() => {
|
|
1126
|
+
el.classList.remove('datetime-ready');
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
/**
|
|
1131
|
+
* Use raf to avoid a race condition between the component loading and
|
|
1132
|
+
* its display animation starting (such as when shown in a modal).
|
|
1133
|
+
*/
|
|
1134
|
+
raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
|
|
1135
|
+
}
|
|
1136
|
+
else {
|
|
1137
|
+
/**
|
|
1138
|
+
* Fallback for test environments where ResizeObserver is not available.
|
|
1139
|
+
* Just mark as ready without initializing scroll/keyboard listeners
|
|
1140
|
+
* since those also require browser APIs not available in Jest.
|
|
1141
|
+
*/
|
|
1142
|
+
writeTask(() => {
|
|
1143
|
+
el.classList.add('datetime-ready');
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1134
1146
|
/**
|
|
1135
1147
|
* Datetime uses Ionic components that emit
|
|
1136
1148
|
* ionFocus and ionBlur. These events are
|
|
@@ -1859,7 +1871,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class Datetime extends HTMLEle
|
|
|
1859
1871
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1860
1872
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1861
1873
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1862
|
-
return (h(Host, { key: '
|
|
1874
|
+
return (h(Host, { key: '187a5b5cf1413449a9db33f8c5b0fd3b7fded302', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1863
1875
|
[mode]: true,
|
|
1864
1876
|
['datetime-readonly']: readonly,
|
|
1865
1877
|
['datetime-disabled']: disabled,
|
|
@@ -1081,52 +1081,64 @@ const Datetime = class {
|
|
|
1081
1081
|
* visible if used inside of a modal or a popover otherwise the scrollable
|
|
1082
1082
|
* areas will not have the correct values snapped into place.
|
|
1083
1083
|
*
|
|
1084
|
-
* We use ResizeObserver to detect when the element transitions
|
|
1084
|
+
* FW-6931: We use ResizeObserver to detect when the element transitions
|
|
1085
1085
|
* between having dimensions (visible) and zero dimensions (hidden). This
|
|
1086
1086
|
* is more reliable than IntersectionObserver for detecting visibility
|
|
1087
1087
|
* changes, especially when the element is inside a modal or popover.
|
|
1088
1088
|
*/
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1089
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
1090
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
1091
|
+
const entry = entries[0];
|
|
1092
|
+
const { width, height } = entry.contentRect;
|
|
1093
|
+
const isVisible = width > 0 && height > 0;
|
|
1094
|
+
const isReady = el.classList.contains('datetime-ready');
|
|
1095
|
+
if (isVisible && !isReady) {
|
|
1096
|
+
this.initializeListeners();
|
|
1097
|
+
/**
|
|
1098
|
+
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
1099
|
+
* can properly scroll contents into view. As a result
|
|
1100
|
+
* we hide the scrollable content until after that frame
|
|
1101
|
+
* so users do not see the content quickly shifting. The downside
|
|
1102
|
+
* is that the content will pop into view a frame after. Maybe there
|
|
1103
|
+
* is a better way to handle this?
|
|
1104
|
+
*/
|
|
1105
|
+
index.writeTask(() => {
|
|
1106
|
+
el.classList.add('datetime-ready');
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
else if (!isVisible && isReady) {
|
|
1110
|
+
/**
|
|
1111
|
+
* Clean up listeners when hidden so we can properly
|
|
1112
|
+
* reinitialize scroll positions on re-presentation.
|
|
1113
|
+
*/
|
|
1114
|
+
this.destroyInteractionListeners();
|
|
1115
|
+
/**
|
|
1116
|
+
* Close month/year picker when hidden, otherwise
|
|
1117
|
+
* it will be open when re-presented with a 0-height
|
|
1118
|
+
* scroll area, showing the wrong month.
|
|
1119
|
+
*/
|
|
1120
|
+
this.showMonthAndYear = false;
|
|
1121
|
+
index.writeTask(() => {
|
|
1122
|
+
el.classList.remove('datetime-ready');
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1126
|
+
/**
|
|
1127
|
+
* Use raf to avoid a race condition between the component loading and
|
|
1128
|
+
* its display animation starting (such as when shown in a modal).
|
|
1129
|
+
*/
|
|
1130
|
+
helpers.raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
|
|
1131
|
+
}
|
|
1132
|
+
else {
|
|
1133
|
+
/**
|
|
1134
|
+
* Fallback for test environments where ResizeObserver is not available.
|
|
1135
|
+
* Just mark as ready without initializing scroll/keyboard listeners
|
|
1136
|
+
* since those also require browser APIs not available in Jest.
|
|
1137
|
+
*/
|
|
1138
|
+
index.writeTask(() => {
|
|
1139
|
+
el.classList.add('datetime-ready');
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1130
1142
|
/**
|
|
1131
1143
|
* Datetime uses Ionic components that emit
|
|
1132
1144
|
* ionFocus and ionBlur. These events are
|
|
@@ -1855,7 +1867,7 @@ const Datetime = class {
|
|
|
1855
1867
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1856
1868
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1857
1869
|
helpers.renderHiddenInput(true, el, name, data.formatValue(value), disabled);
|
|
1858
|
-
return (index.h(index.Host, { key: '
|
|
1870
|
+
return (index.h(index.Host, { key: '187a5b5cf1413449a9db33f8c5b0fd3b7fded302', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, theme.createColorClasses(color, {
|
|
1859
1871
|
[mode]: true,
|
|
1860
1872
|
['datetime-readonly']: readonly,
|
|
1861
1873
|
['datetime-disabled']: disabled,
|
|
@@ -880,52 +880,64 @@ export class Datetime {
|
|
|
880
880
|
* visible if used inside of a modal or a popover otherwise the scrollable
|
|
881
881
|
* areas will not have the correct values snapped into place.
|
|
882
882
|
*
|
|
883
|
-
* We use ResizeObserver to detect when the element transitions
|
|
883
|
+
* FW-6931: We use ResizeObserver to detect when the element transitions
|
|
884
884
|
* between having dimensions (visible) and zero dimensions (hidden). This
|
|
885
885
|
* is more reliable than IntersectionObserver for detecting visibility
|
|
886
886
|
* changes, especially when the element is inside a modal or popover.
|
|
887
887
|
*/
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
888
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
889
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
890
|
+
const entry = entries[0];
|
|
891
|
+
const { width, height } = entry.contentRect;
|
|
892
|
+
const isVisible = width > 0 && height > 0;
|
|
893
|
+
const isReady = el.classList.contains('datetime-ready');
|
|
894
|
+
if (isVisible && !isReady) {
|
|
895
|
+
this.initializeListeners();
|
|
896
|
+
/**
|
|
897
|
+
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
898
|
+
* can properly scroll contents into view. As a result
|
|
899
|
+
* we hide the scrollable content until after that frame
|
|
900
|
+
* so users do not see the content quickly shifting. The downside
|
|
901
|
+
* is that the content will pop into view a frame after. Maybe there
|
|
902
|
+
* is a better way to handle this?
|
|
903
|
+
*/
|
|
904
|
+
writeTask(() => {
|
|
905
|
+
el.classList.add('datetime-ready');
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
else if (!isVisible && isReady) {
|
|
909
|
+
/**
|
|
910
|
+
* Clean up listeners when hidden so we can properly
|
|
911
|
+
* reinitialize scroll positions on re-presentation.
|
|
912
|
+
*/
|
|
913
|
+
this.destroyInteractionListeners();
|
|
914
|
+
/**
|
|
915
|
+
* Close month/year picker when hidden, otherwise
|
|
916
|
+
* it will be open when re-presented with a 0-height
|
|
917
|
+
* scroll area, showing the wrong month.
|
|
918
|
+
*/
|
|
919
|
+
this.showMonthAndYear = false;
|
|
920
|
+
writeTask(() => {
|
|
921
|
+
el.classList.remove('datetime-ready');
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
/**
|
|
926
|
+
* Use raf to avoid a race condition between the component loading and
|
|
927
|
+
* its display animation starting (such as when shown in a modal).
|
|
928
|
+
*/
|
|
929
|
+
raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
|
|
930
|
+
}
|
|
931
|
+
else {
|
|
932
|
+
/**
|
|
933
|
+
* Fallback for test environments where ResizeObserver is not available.
|
|
934
|
+
* Just mark as ready without initializing scroll/keyboard listeners
|
|
935
|
+
* since those also require browser APIs not available in Jest.
|
|
936
|
+
*/
|
|
937
|
+
writeTask(() => {
|
|
938
|
+
el.classList.add('datetime-ready');
|
|
939
|
+
});
|
|
940
|
+
}
|
|
929
941
|
/**
|
|
930
942
|
* Datetime uses Ionic components that emit
|
|
931
943
|
* ionFocus and ionBlur. These events are
|
|
@@ -1654,7 +1666,7 @@ export class Datetime {
|
|
|
1654
1666
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1655
1667
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1656
1668
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1657
|
-
return (h(Host, { key: '
|
|
1669
|
+
return (h(Host, { key: '187a5b5cf1413449a9db33f8c5b0fd3b7fded302', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1658
1670
|
[mode]: true,
|
|
1659
1671
|
['datetime-readonly']: readonly,
|
|
1660
1672
|
['datetime-disabled']: disabled,
|
package/dist/docs.json
CHANGED
|
@@ -1079,52 +1079,64 @@ const Datetime = class {
|
|
|
1079
1079
|
* visible if used inside of a modal or a popover otherwise the scrollable
|
|
1080
1080
|
* areas will not have the correct values snapped into place.
|
|
1081
1081
|
*
|
|
1082
|
-
* We use ResizeObserver to detect when the element transitions
|
|
1082
|
+
* FW-6931: We use ResizeObserver to detect when the element transitions
|
|
1083
1083
|
* between having dimensions (visible) and zero dimensions (hidden). This
|
|
1084
1084
|
* is more reliable than IntersectionObserver for detecting visibility
|
|
1085
1085
|
* changes, especially when the element is inside a modal or popover.
|
|
1086
1086
|
*/
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1087
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
1088
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
1089
|
+
const entry = entries[0];
|
|
1090
|
+
const { width, height } = entry.contentRect;
|
|
1091
|
+
const isVisible = width > 0 && height > 0;
|
|
1092
|
+
const isReady = el.classList.contains('datetime-ready');
|
|
1093
|
+
if (isVisible && !isReady) {
|
|
1094
|
+
this.initializeListeners();
|
|
1095
|
+
/**
|
|
1096
|
+
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
1097
|
+
* can properly scroll contents into view. As a result
|
|
1098
|
+
* we hide the scrollable content until after that frame
|
|
1099
|
+
* so users do not see the content quickly shifting. The downside
|
|
1100
|
+
* is that the content will pop into view a frame after. Maybe there
|
|
1101
|
+
* is a better way to handle this?
|
|
1102
|
+
*/
|
|
1103
|
+
writeTask(() => {
|
|
1104
|
+
el.classList.add('datetime-ready');
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
else if (!isVisible && isReady) {
|
|
1108
|
+
/**
|
|
1109
|
+
* Clean up listeners when hidden so we can properly
|
|
1110
|
+
* reinitialize scroll positions on re-presentation.
|
|
1111
|
+
*/
|
|
1112
|
+
this.destroyInteractionListeners();
|
|
1113
|
+
/**
|
|
1114
|
+
* Close month/year picker when hidden, otherwise
|
|
1115
|
+
* it will be open when re-presented with a 0-height
|
|
1116
|
+
* scroll area, showing the wrong month.
|
|
1117
|
+
*/
|
|
1118
|
+
this.showMonthAndYear = false;
|
|
1119
|
+
writeTask(() => {
|
|
1120
|
+
el.classList.remove('datetime-ready');
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
/**
|
|
1125
|
+
* Use raf to avoid a race condition between the component loading and
|
|
1126
|
+
* its display animation starting (such as when shown in a modal).
|
|
1127
|
+
*/
|
|
1128
|
+
raf(() => { var _a; return (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el); });
|
|
1129
|
+
}
|
|
1130
|
+
else {
|
|
1131
|
+
/**
|
|
1132
|
+
* Fallback for test environments where ResizeObserver is not available.
|
|
1133
|
+
* Just mark as ready without initializing scroll/keyboard listeners
|
|
1134
|
+
* since those also require browser APIs not available in Jest.
|
|
1135
|
+
*/
|
|
1136
|
+
writeTask(() => {
|
|
1137
|
+
el.classList.add('datetime-ready');
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1128
1140
|
/**
|
|
1129
1141
|
* Datetime uses Ionic components that emit
|
|
1130
1142
|
* ionFocus and ionBlur. These events are
|
|
@@ -1853,7 +1865,7 @@ const Datetime = class {
|
|
|
1853
1865
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1854
1866
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1855
1867
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1856
|
-
return (h(Host, { key: '
|
|
1868
|
+
return (h(Host, { key: '187a5b5cf1413449a9db33f8c5b0fd3b7fded302', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1857
1869
|
[mode]: true,
|
|
1858
1870
|
['datetime-readonly']: readonly,
|
|
1859
1871
|
['datetime-disabled']: disabled,
|