@awes-io/ui 2.145.6 → 2.145.8
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.145.8](https://github.com/awes-io/client/compare/@awes-io/ui@2.145.7...@awes-io/ui@2.145.8) (2026-11-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui:** address timezone from the place, Time Zone API as fallback ([f1d4ded](https://github.com/awes-io/client/commit/f1d4ded75e54dbb439d68217636bed010ae8bee6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.145.7](https://github.com/awes-io/client/compare/@awes-io/ui@2.145.6...@awes-io/ui@2.145.7) (2026-11-17)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **ui:** dock ignores a touch that ends outside the page and cleans up on destroy ([dd2861e](https://github.com/awes-io/client/commit/dd2861e9dec06ac4305b69441dde23691dbcec4a))
|
|
23
|
+
* **ui:** key search in dropdowns and the viewport check survive special keys and wrapped timers ([8a22170](https://github.com/awes-io/client/commit/8a22170d6f11104cb8bda2005137d9f40f82009f))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
6
29
|
## [2.145.6](https://github.com/awes-io/client/compare/@awes-io/ui@2.145.5...@awes-io/ui@2.145.6) (2026-10-12)
|
|
7
30
|
|
|
8
31
|
|
|
@@ -80,9 +80,13 @@ export default {
|
|
|
80
80
|
},
|
|
81
81
|
|
|
82
82
|
beforeDestroy() {
|
|
83
|
+
if (this._stopDrag) {
|
|
84
|
+
this._stopDrag()
|
|
85
|
+
}
|
|
86
|
+
|
|
83
87
|
anime.remove(this)
|
|
84
88
|
|
|
85
|
-
enableBodyScroll(this.$
|
|
89
|
+
enableBodyScroll(this.$refs.content)
|
|
86
90
|
},
|
|
87
91
|
|
|
88
92
|
methods: {
|
|
@@ -100,6 +104,7 @@ export default {
|
|
|
100
104
|
|
|
101
105
|
const isTouch = $event.type === 'touchstart'
|
|
102
106
|
const ratio = window.innerHeight * 0.67
|
|
107
|
+
const startProgress = this.progress
|
|
103
108
|
|
|
104
109
|
let currentY = isTouch ? $event.touches[0].clientY : $event.clientY
|
|
105
110
|
|
|
@@ -121,12 +126,30 @@ export default {
|
|
|
121
126
|
|
|
122
127
|
let events
|
|
123
128
|
|
|
124
|
-
const
|
|
125
|
-
this.toggle()
|
|
129
|
+
const stopDrag = () => {
|
|
126
130
|
this.active = false
|
|
131
|
+
this._stopDrag = null
|
|
127
132
|
toggleEvents(window, events, false)
|
|
128
133
|
}
|
|
129
134
|
|
|
135
|
+
const onEnd = () => {
|
|
136
|
+
stopDrag()
|
|
137
|
+
this.toggle()
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const onLostTouch = ($event) => {
|
|
141
|
+
if ($event.touches.length > 1) {
|
|
142
|
+
return
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
stopDrag()
|
|
146
|
+
this.direction = null
|
|
147
|
+
this._animate(
|
|
148
|
+
[this.progress, startProgress],
|
|
149
|
+
Math.abs(this.progress - startProgress) * this.duration
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
|
|
130
153
|
events = [
|
|
131
154
|
[
|
|
132
155
|
isTouch ? 'touchmove' : 'mousemove',
|
|
@@ -137,6 +160,12 @@ export default {
|
|
|
137
160
|
[isTouch ? 'touchend' : 'mouseup', onEnd]
|
|
138
161
|
]
|
|
139
162
|
|
|
163
|
+
if (isTouch) {
|
|
164
|
+
events.push(['touchstart', onLostTouch, true])
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
this._stopDrag = stopDrag
|
|
168
|
+
|
|
140
169
|
toggleEvents(window, events, true)
|
|
141
170
|
},
|
|
142
171
|
|
|
@@ -233,14 +233,15 @@ export default {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
if (this.timezone) {
|
|
236
|
-
return this._getTimeZone(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
return this._getTimeZone(
|
|
237
|
+
details.place_id,
|
|
238
|
+
response.location
|
|
239
|
+
).then((timezone) => {
|
|
240
|
+
return {
|
|
241
|
+
...response,
|
|
242
|
+
...timezone
|
|
242
243
|
}
|
|
243
|
-
)
|
|
244
|
+
})
|
|
244
245
|
} else {
|
|
245
246
|
return Promise.resolve(response)
|
|
246
247
|
}
|
|
@@ -256,7 +257,32 @@ export default {
|
|
|
256
257
|
}
|
|
257
258
|
},
|
|
258
259
|
|
|
259
|
-
_getTimeZone(
|
|
260
|
+
async _getTimeZone(placeId, location) {
|
|
261
|
+
const timezone = await this._getPlaceTimeZone(placeId)
|
|
262
|
+
|
|
263
|
+
if (timezone) {
|
|
264
|
+
return { timezone }
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return this._getTimeZoneByLocation(location)
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
async _getPlaceTimeZone(placeId) {
|
|
271
|
+
try {
|
|
272
|
+
const { Place } = await window.google.maps.importLibrary(
|
|
273
|
+
'places'
|
|
274
|
+
)
|
|
275
|
+
const place = new Place({ id: placeId })
|
|
276
|
+
|
|
277
|
+
await place.fetchFields({ fields: ['timeZone'] })
|
|
278
|
+
|
|
279
|
+
return place.timeZone ? place.timeZone.id : undefined
|
|
280
|
+
} catch (e) {
|
|
281
|
+
return undefined
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
|
|
285
|
+
_getTimeZoneByLocation({ lat, lng }) {
|
|
260
286
|
return axios
|
|
261
287
|
.request({
|
|
262
288
|
url: 'https://maps.googleapis.com/maps/api/timezone/json',
|
|
@@ -129,7 +129,7 @@ This component uses `AwSelectObject` slots internally. All `AwSelectObject` slot
|
|
|
129
129
|
- Session tokens are used for billing optimization
|
|
130
130
|
- Address types are filtered (removes political, intersection, sublocality types)
|
|
131
131
|
- Google branding is automatically displayed
|
|
132
|
-
- Timezone
|
|
132
|
+
- Timezone comes from the place's `timeZone` field via `Place.fetchFields` (Places API (New)), which works with a key restricted to websites. Only when the place has no time zone does the component fall back to the Time Zone API (it rejects website-restricted keys); any failure leaves `timezone` undefined
|
|
133
133
|
- Component handles Google Maps script loading and initialization
|
|
134
134
|
- Search is debounced and handled by `AwSelectObject`
|
|
135
135
|
- Selected address triggers Places API details request
|
package/mixins/arrow-focus.js
CHANGED
|
@@ -51,7 +51,10 @@ export default {
|
|
|
51
51
|
} else if (IS_SEARCH_KEY_RE.test(key)) {
|
|
52
52
|
const buttons = this._getFocusItems()
|
|
53
53
|
const active = document.activeElement
|
|
54
|
-
const re = new RegExp(
|
|
54
|
+
const re = new RegExp(
|
|
55
|
+
'^(\\s+)?' + key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'),
|
|
56
|
+
'i'
|
|
57
|
+
)
|
|
55
58
|
let button
|
|
56
59
|
|
|
57
60
|
if (buttons.includes(active) && re.test(active.textContent)) {
|
|
@@ -65,7 +65,14 @@ if (typeof window !== 'undefined' && 'visualViewport' in window) {
|
|
|
65
65
|
if (event.isCheck) return
|
|
66
66
|
|
|
67
67
|
// double check!
|
|
68
|
-
setTimeout(
|
|
68
|
+
setTimeout(
|
|
69
|
+
() =>
|
|
70
|
+
viewportHandler({
|
|
71
|
+
target: window.visualViewport,
|
|
72
|
+
isCheck: true
|
|
73
|
+
}),
|
|
74
|
+
60
|
|
75
|
+
)
|
|
69
76
|
})
|
|
70
77
|
}
|
|
71
78
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.145.
|
|
3
|
+
"version": "2.145.8",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"peerDependencies": {
|
|
117
117
|
"nuxt": "^2.18.1"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "89ba4dea9d0837bac551be8e9339f8079d5cb830"
|
|
120
120
|
}
|