react-timezone-select 3.3.2 → 3.3.3
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/dist/index.js +10 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -46,6 +46,7 @@ var allTimezones = {
|
|
|
46
46
|
"America/Dawson": "Dawson, Yukon",
|
|
47
47
|
"America/Chihuahua": "Chihuahua, La Paz, Mazatlan",
|
|
48
48
|
"America/Phoenix": "Arizona",
|
|
49
|
+
"America/Los_Angeles": "Pacific Time",
|
|
49
50
|
"America/Chicago": "Central Time",
|
|
50
51
|
"America/Regina": "Saskatchewan",
|
|
51
52
|
"America/Mexico_City": "Guadalajara, Mexico City, Monterrey",
|
|
@@ -60,7 +61,6 @@ var allTimezones = {
|
|
|
60
61
|
"America/Montevideo": "Montevideo",
|
|
61
62
|
"America/Argentina/Buenos_Aires": "Buenos Aires, Georgetown",
|
|
62
63
|
"America/Godthab": "Greenland",
|
|
63
|
-
"America/Los_Angeles": "Pacific Time",
|
|
64
64
|
"Atlantic/Azores": "Azores",
|
|
65
65
|
"Atlantic/Cape_Verde": "Cape Verde Islands",
|
|
66
66
|
GMT: "UTC",
|
|
@@ -164,7 +164,8 @@ function useTimezoneSelect({
|
|
|
164
164
|
label,
|
|
165
165
|
offset: tz.current.offset,
|
|
166
166
|
abbrev: abbr,
|
|
167
|
-
altName
|
|
167
|
+
altName,
|
|
168
|
+
hasDst: tz.hasDst
|
|
168
169
|
};
|
|
169
170
|
} catch (e) {
|
|
170
171
|
return null;
|
|
@@ -178,10 +179,13 @@ function useTimezoneSelect({
|
|
|
178
179
|
const options = useMemo(() => {
|
|
179
180
|
return allOptions.filter((item, idx, arr) => {
|
|
180
181
|
if (customTimezoneKeys.has(item.value)) return true;
|
|
181
|
-
return arr.findIndex((t) => t.offset === item.offset) === idx;
|
|
182
|
-
}).map((
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
return arr.findIndex((t) => t.offset === item.offset && t.hasDst === item.hasDst) === idx;
|
|
183
|
+
}).map((_a) => {
|
|
184
|
+
var _b = _a, { hasDst: _ } = _b, item = __objRest(_b, ["hasDst"]);
|
|
185
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
186
|
+
searchTerms: allOptions.filter((t) => t.offset === item.offset && t.hasDst === _).map((t) => t.label).join(" ")
|
|
187
|
+
});
|
|
188
|
+
});
|
|
185
189
|
}, [allOptions, customTimezoneKeys]);
|
|
186
190
|
const filterOption = (option, inputValue) => {
|
|
187
191
|
var _a, _b, _c;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-timezone-select",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "Usable, dynamic React Timezone Select",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "concurrently \"tsup --watch\" \"cd example && pnpm dev\"",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": "^16 || ^17.0.1 || ^18 || ^19",
|
|
45
45
|
"react-dom": "^16 || ^17.0.1 || ^18 || ^19",
|
|
46
|
-
"react-select": "^5.
|
|
46
|
+
"react-select": "^5.9.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"spacetime": "^7.12.0",
|