@sumaris-net/ngx-components 1.5.1 → 1.5.2
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/bundles/sumaris-net.ngx-components.umd.js +13 -5
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/services/local-settings.service.js +3 -3
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +12 -4
- package/fesm2015/sumaris-net.ngx-components.js +13 -5
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -1396,7 +1396,7 @@
|
|
|
1396
1396
|
this.displayWith = this.displayWith || this.config.displayWith;
|
|
1397
1397
|
this.mobile = toBoolean(this.mobile, this.config.mobile);
|
|
1398
1398
|
this.suggestLengthThreshold = toNumber(this.suggestLengthThreshold, this.config.suggestLengthThreshold || 0);
|
|
1399
|
-
this.showAllOnFocus = toBoolean(this.showAllOnFocus, toBoolean(this.config.showAllOnFocus, this.suggestLengthThreshold
|
|
1399
|
+
this.showAllOnFocus = toBoolean(this.showAllOnFocus, toBoolean(this.config.showAllOnFocus, this.suggestLengthThreshold <= 0));
|
|
1400
1400
|
this.showPanelOnFocus = toBoolean(this.showPanelOnFocus, toBoolean(this.config.showPanelOnFocus));
|
|
1401
1401
|
this.classList = this.classList || this.config.class;
|
|
1402
1402
|
this.debounceTime = toNumber(this.debounceTime, this.config.debounceTime);
|
|
@@ -1516,8 +1516,16 @@
|
|
|
1516
1516
|
.pipe(operators.filter(function (event) { return _this.enabled && _this.searchable && (!event || !event.defaultPrevented); }), operators.map(function (_) { return _this.showAllOnFocus ? '*' : _this.formControl.value; })), rxjs.merge(this.$inputItems, this._filter$)
|
|
1517
1517
|
.pipe(operators.filter(function (event) { return _this.enabled && _this.searchable; }), operators.map(function (_) { return _this.formControl.value; })))
|
|
1518
1518
|
.pipe(
|
|
1519
|
-
//
|
|
1520
|
-
|
|
1519
|
+
// Start to suggest when :
|
|
1520
|
+
// - '*'
|
|
1521
|
+
// - is nil, and there is no min length threshold
|
|
1522
|
+
// - is not nil and not a string type (e.g. object)
|
|
1523
|
+
// - is not nil and is a string, and has enough character
|
|
1524
|
+
operators.filter(function (value) { return value === '*'
|
|
1525
|
+
|| (isNil(value)
|
|
1526
|
+
? (_this.suggestLengthThreshold <= 0)
|
|
1527
|
+
: (!(typeof value === 'string')
|
|
1528
|
+
|| value.length >= _this.suggestLengthThreshold)); }),
|
|
1521
1529
|
// Distinguish changes
|
|
1522
1530
|
operators.distinctUntilChanged()))
|
|
1523
1531
|
.pipe(
|
|
@@ -10830,9 +10838,9 @@
|
|
|
10830
10838
|
LocalSettingsService.prototype.ngOnStart = function () {
|
|
10831
10839
|
console.info('[settings] Starting service...');
|
|
10832
10840
|
// Restoring local settings
|
|
10833
|
-
this._data.mobile =
|
|
10841
|
+
this._data.mobile = toBoolean(this._data.mobile, this.platform.is('mobile'));
|
|
10834
10842
|
this._data.touchUi = this._data.mobile || this.platform.is('phablet') || this.platform.is('tablet');
|
|
10835
|
-
this._data.usageMode = this.platform.is('android') ? 'FIELD' : 'DESK'; // FIELD by default if Android
|
|
10843
|
+
this._data.usageMode = this.platform.is('android') || this.platform.is('ios') ? 'FIELD' : 'DESK'; // FIELD by default if Android or iOs
|
|
10836
10844
|
// Restoring local settings
|
|
10837
10845
|
return this.restoreLocally();
|
|
10838
10846
|
};
|