@db-ux/ngx-core-components 3.1.19 → 3.1.20
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
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
# @db-ux/ngx-core-components
|
|
2
2
|
|
|
3
|
+
## 3.1.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(input): iOS Safari VoiceOver bug for types `date`, `datetime-local`, `week`, `month`, `time` and `color` - [see commit 2ca96c8](https://github.com/db-ux-design-system/core-web/commit/2ca96c8852b7413f9a3281d69e9c4fc6f79c4f13)
|
|
8
|
+
|
|
3
9
|
## 3.1.19
|
|
4
10
|
|
|
5
11
|
_version bump_
|
|
6
12
|
|
|
7
|
-
|
|
8
13
|
## 3.1.18
|
|
9
14
|
|
|
10
15
|
### Patch Changes
|
|
@@ -84,6 +84,7 @@ export declare class DBInput implements AfterViewInit, ControlValueAccessor {
|
|
|
84
84
|
handleBlur(event: InteractionEvent<HTMLInputElement> | any): void;
|
|
85
85
|
handleFocus(event: InteractionEvent<HTMLInputElement> | any): void;
|
|
86
86
|
getDataList(): ValueLabelType[];
|
|
87
|
+
isIOSSafari(): boolean;
|
|
87
88
|
trackByOption0(_: number, option: any): string;
|
|
88
89
|
constructor(renderer: Renderer2);
|
|
89
90
|
/**
|
|
@@ -43,8 +43,8 @@ export type DBInputDefaultProps = {
|
|
|
43
43
|
*/
|
|
44
44
|
inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
45
45
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
* The size of the message infotext. Defaults to "small".
|
|
47
|
+
*/
|
|
48
48
|
messageSize?: SizeType;
|
|
49
49
|
/**
|
|
50
50
|
* The size of the valid message infotext. Defaults to "small".
|
|
@@ -59,5 +59,6 @@ export type DBInputProps = DBInputDefaultProps & GlobalProps & FormTextProps & I
|
|
|
59
59
|
export type DBInputDefaultState = {
|
|
60
60
|
_dataListId?: string;
|
|
61
61
|
getDataList: () => ValueLabelType[];
|
|
62
|
+
isIOSSafari: () => boolean;
|
|
62
63
|
};
|
|
63
64
|
export type DBInputState = DBInputDefaultState & GlobalState & InputEventState<HTMLInputElement> & ChangeEventState<HTMLInputElement> & FocusEventState<HTMLInputElement> & FormState & FromValidState;
|
|
@@ -2159,6 +2159,16 @@ class DBInput {
|
|
|
2159
2159
|
}))
|
|
2160
2160
|
: _list) || []);
|
|
2161
2161
|
}
|
|
2162
|
+
isIOSSafari() {
|
|
2163
|
+
if (typeof window === "undefined" || typeof navigator === "undefined")
|
|
2164
|
+
return false;
|
|
2165
|
+
const ua = navigator.userAgent;
|
|
2166
|
+
// iOS detection
|
|
2167
|
+
const isIOS = /iP(ad|hone|od)/.test(ua);
|
|
2168
|
+
// Safari detection (not Chrome or Firefox on iOS)
|
|
2169
|
+
const isSafari = !!ua.match(/Safari/) && !ua.match(/CriOS|FxiOS|OPiOS|EdgiOS/);
|
|
2170
|
+
return isIOS && isSafari;
|
|
2171
|
+
}
|
|
2162
2172
|
trackByOption0(_, option) {
|
|
2163
2173
|
return this._dataListId() + "-option-" + option.value;
|
|
2164
2174
|
}
|
|
@@ -2390,6 +2400,7 @@ class DBInput {
|
|
|
2390
2400
|
(focus)="handleFocus($event)"
|
|
2391
2401
|
[attr.list]="dataList() && _dataListId()"
|
|
2392
2402
|
[attr.aria-describedby]="ariaDescribedBy() ?? _descByIds()"
|
|
2403
|
+
[attr.role]="['datetime-local', 'date', 'time', 'week', 'month', 'color'].includes(type() ?? '') && isIOSSafari() ? 'textbox' : undefined"
|
|
2393
2404
|
/>
|
|
2394
2405
|
@if(dataList()){
|
|
2395
2406
|
<datalist [attr.id]="_dataListId()">
|
|
@@ -2477,6 +2488,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
2477
2488
|
(focus)="handleFocus($event)"
|
|
2478
2489
|
[attr.list]="dataList() && _dataListId()"
|
|
2479
2490
|
[attr.aria-describedby]="ariaDescribedBy() ?? _descByIds()"
|
|
2491
|
+
[attr.role]="['datetime-local', 'date', 'time', 'week', 'month', 'color'].includes(type() ?? '') && isIOSSafari() ? 'textbox' : undefined"
|
|
2480
2492
|
/>
|
|
2481
2493
|
@if(dataList()){
|
|
2482
2494
|
<datalist [attr.id]="_dataListId()">
|