@quadrel-enterprise-ui/framework 20.21.1 → 20.23.0
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.
|
@@ -1627,16 +1627,18 @@ const SERVICE_NAV_LOCALE_DEFAULTS = {
|
|
|
1627
1627
|
FR: 'fr-CH',
|
|
1628
1628
|
EN: 'en-GB'
|
|
1629
1629
|
};
|
|
1630
|
-
const determineLocale = (serviceNavLanguage, browserLocales) => {
|
|
1630
|
+
const determineLocale = (serviceNavLanguage, browserLocales, isIOS = false) => {
|
|
1631
1631
|
const browserLocale = browserLocales?.[0] ?? navigator.language;
|
|
1632
1632
|
if (!serviceNavLanguage) {
|
|
1633
1633
|
const browserLocaleUpper = browserLocale.toUpperCase();
|
|
1634
1634
|
return SERVICE_NAV_LOCALE_DEFAULTS[browserLocaleUpper] ?? browserLocale;
|
|
1635
1635
|
}
|
|
1636
1636
|
const serviceNavLangUpper = serviceNavLanguage.toUpperCase();
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1637
|
+
if (!isIOS) {
|
|
1638
|
+
const browserLanguage = browserLocale.split('-')[0].toUpperCase();
|
|
1639
|
+
if (browserLanguage === serviceNavLangUpper && browserLocale.includes('-'))
|
|
1640
|
+
return browserLocale;
|
|
1641
|
+
}
|
|
1640
1642
|
return SERVICE_NAV_LOCALE_DEFAULTS[serviceNavLangUpper] ?? browserLocale;
|
|
1641
1643
|
};
|
|
1642
1644
|
|
|
@@ -7114,9 +7116,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
7114
7116
|
}]
|
|
7115
7117
|
}] });
|
|
7116
7118
|
|
|
7119
|
+
const isConfirmedNonIOS = () => /Windows|Android/.test(navigator.userAgent) ||
|
|
7120
|
+
(!/iPad|iPhone|iPod/.test(navigator.userAgent) && !navigator.maxTouchPoints);
|
|
7121
|
+
|
|
7117
7122
|
class QdLocaleService {
|
|
7118
7123
|
_serviceNavLanguage$ = new BehaviorSubject(null);
|
|
7119
|
-
locale$ = this._serviceNavLanguage$.pipe(map(serviceNavLanguage => determineLocale(serviceNavLanguage, navigator.languages)));
|
|
7124
|
+
locale$ = this._serviceNavLanguage$.pipe(map(serviceNavLanguage => determineLocale(serviceNavLanguage, navigator.languages, !isConfirmedNonIOS())));
|
|
7120
7125
|
setServiceNavigationLanguage(language) {
|
|
7121
7126
|
this._serviceNavLanguage$.next(language);
|
|
7122
7127
|
}
|
|
@@ -8076,6 +8081,8 @@ class QdPopoverOnClickDirective {
|
|
|
8076
8081
|
handleOpenKey(event) {
|
|
8077
8082
|
if (!this.qdPopoverEnableKeyControl)
|
|
8078
8083
|
return;
|
|
8084
|
+
if (this.overlayRef?.hasAttached())
|
|
8085
|
+
return;
|
|
8079
8086
|
if (this.qdPopoverStopPropagation)
|
|
8080
8087
|
event.stopPropagation();
|
|
8081
8088
|
event.preventDefault();
|
|
@@ -8220,7 +8227,7 @@ class QdPopoverOnClickDirective {
|
|
|
8220
8227
|
this.unsubscribeAll();
|
|
8221
8228
|
}
|
|
8222
8229
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: QdPopoverOnClickDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8223
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: QdPopoverOnClickDirective, isStandalone: false, selector: "[qdPopoverOnClick]", inputs: { qdPopoverOnClick: "qdPopoverOnClick", positionStrategy: "positionStrategy", qdPopoverCloseStrategy: "qdPopoverCloseStrategy", qdPopoverDisabled: "qdPopoverDisabled", qdPopoverStopPropagation: "qdPopoverStopPropagation", qdPopoverBackgroundColor: "qdPopoverBackgroundColor", qdPopoverMaxHeight: "qdPopoverMaxHeight", qdPopoverMinWidth: "qdPopoverMinWidth", qdPopoverMaxWidth: "qdPopoverMaxWidth", qdPopoverAutoSize: "qdPopoverAutoSize", qdPopoverEnableKeyControl: "qdPopoverEnableKeyControl" }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "click": "handleClick($event)", "document:click": "handleDocumentClick($event)", "keydown.escape": "handleCloseKeys()", "keydown.tab": "handleCloseKeys()", "keydown.space": "handleOpenKey($event)" } }, providers: [QdPopoverSizingService], exportAs: ["qdPopoverOnClick"], ngImport: i0 });
|
|
8230
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: QdPopoverOnClickDirective, isStandalone: false, selector: "[qdPopoverOnClick]", inputs: { qdPopoverOnClick: "qdPopoverOnClick", positionStrategy: "positionStrategy", qdPopoverCloseStrategy: "qdPopoverCloseStrategy", qdPopoverDisabled: "qdPopoverDisabled", qdPopoverStopPropagation: "qdPopoverStopPropagation", qdPopoverBackgroundColor: "qdPopoverBackgroundColor", qdPopoverMaxHeight: "qdPopoverMaxHeight", qdPopoverMinWidth: "qdPopoverMinWidth", qdPopoverMaxWidth: "qdPopoverMaxWidth", qdPopoverAutoSize: "qdPopoverAutoSize", qdPopoverEnableKeyControl: "qdPopoverEnableKeyControl" }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "click": "handleClick($event)", "document:click": "handleDocumentClick($event)", "keydown.escape": "handleCloseKeys()", "keydown.tab": "handleCloseKeys()", "keydown.enter": "handleOpenKey($event)", "keydown.space": "handleOpenKey($event)" } }, providers: [QdPopoverSizingService], exportAs: ["qdPopoverOnClick"], ngImport: i0 });
|
|
8224
8231
|
}
|
|
8225
8232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: QdPopoverOnClickDirective, decorators: [{
|
|
8226
8233
|
type: Directive,
|
|
@@ -8269,6 +8276,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
8269
8276
|
type: HostListener,
|
|
8270
8277
|
args: ['keydown.tab']
|
|
8271
8278
|
}], handleOpenKey: [{
|
|
8279
|
+
type: HostListener,
|
|
8280
|
+
args: ['keydown.enter', ['$event']]
|
|
8281
|
+
}, {
|
|
8272
8282
|
type: HostListener,
|
|
8273
8283
|
args: ['keydown.space', ['$event']]
|
|
8274
8284
|
}] } });
|
|
@@ -8562,6 +8572,7 @@ const getClearable = (config) => get(config, 'clearable', false);
|
|
|
8562
8572
|
const getValue = (config) => get(config, 'value', '');
|
|
8563
8573
|
const getPlaceholder = (config) => get(config, 'placeholder.i18n', '');
|
|
8564
8574
|
const getHasAutofocus = (config) => get(config, 'hasAutofocus', false);
|
|
8575
|
+
const getHasFocusableSuffix = (config) => get(config, 'hasFocusableSuffix', false);
|
|
8565
8576
|
/**
|
|
8566
8577
|
* Textarea form properties
|
|
8567
8578
|
*
|
|
@@ -11905,7 +11916,7 @@ class QdInputComponent {
|
|
|
11905
11916
|
if (this.inputType === 'number') {
|
|
11906
11917
|
this.htmlInputType = 'text';
|
|
11907
11918
|
if (!this.inputMode) {
|
|
11908
|
-
this.inputMode =
|
|
11919
|
+
this.inputMode = isConfirmedNonIOS() ? 'decimal' : undefined;
|
|
11909
11920
|
}
|
|
11910
11921
|
}
|
|
11911
11922
|
else {
|