@sumaris-net/ngx-components 1.18.0-rc1 → 1.18.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 +85 -80
- 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/doc/changelog.md +4 -0
- package/esm2015/src/app/core/graphql/graphql.service.js +3 -2
- package/esm2015/src/app/core/services/config.service.js +3 -2
- package/esm2015/src/app/core/services/local-settings.service.js +2 -2
- package/esm2015/src/app/core/services/platform.service.js +12 -11
- package/esm2015/src/app/shared/directives/autofocus.directive.js +4 -2
- package/esm2015/src/app/shared/hotkeys/hotkeys.service.js +11 -7
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +5 -4
- package/esm2015/src/app/shared/material/datetime/material.date.js +8 -9
- package/esm2015/src/app/shared/material/datetime/material.dateshort.js +8 -8
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +7 -8
- package/esm2015/src/app/shared/material/datetime/testing/mat-date-time.test.js +3 -3
- package/esm2015/src/app/shared/material/datetime/testing/mat-date.test.js +4 -7
- package/esm2015/src/app/shared/material/latlong/material.latlong.js +4 -6
- package/esm2015/src/app/shared/platforms.js +2 -2
- package/esm2015/src/app/shared/services/entity-service.class.js +1 -1
- package/fesm2015/sumaris-net.ngx-components.js +76 -78
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/platform.service.d.ts +1 -1
- package/src/app/shared/directives/autofocus.directive.d.ts +2 -1
- package/src/app/shared/hotkeys/hotkeys.service.d.ts +3 -2
- package/src/app/shared/material/datetime/material.date.d.ts +2 -4
- package/src/app/shared/material/datetime/material.dateshort.d.ts +2 -3
- package/src/app/shared/material/datetime/material.datetime.d.ts +1 -3
- package/src/app/shared/material/datetime/testing/mat-date.test.d.ts +1 -3
- package/src/app/shared/material/latlong/material.latlong.d.ts +1 -3
- package/src/app/shared/services/entity-service.class.d.ts +4 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -1345,6 +1345,33 @@
|
|
|
1345
1345
|
])
|
|
1346
1346
|
]);
|
|
1347
1347
|
|
|
1348
|
+
/* ---
|
|
1349
|
+
* Source: https://github.com/ionic-team/ionic-framework/blob/b0d53ca73619585671d8cf4dc24e47f826495a0a/core/src/utils/platform.ts
|
|
1350
|
+
* --- */
|
|
1351
|
+
var matchMedia = function (win, query) { return win.matchMedia(query).matches; };
|
|
1352
|
+
var testUserAgent = function (win, expr) {
|
|
1353
|
+
var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
1354
|
+
return expr.test(userAgent);
|
|
1355
|
+
};
|
|
1356
|
+
var isWindows = function (win) { return testUserAgent(win, /windows/i); };
|
|
1357
|
+
var isTouchUi = function (win) { return matchMedia(win, '(any-pointer:coarse)'); };
|
|
1358
|
+
var isMobile = function (win) { return isCordova(window) || isAndroid(win) || isIOS(window) || (isTouchUi(win) && !isWindows(win)); };
|
|
1359
|
+
var isIpad = function (win) {
|
|
1360
|
+
// iOS 12 and below
|
|
1361
|
+
if (testUserAgent(win, /iPad/i)) {
|
|
1362
|
+
return true;
|
|
1363
|
+
}
|
|
1364
|
+
// iOS 13+
|
|
1365
|
+
if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
|
|
1366
|
+
return true;
|
|
1367
|
+
}
|
|
1368
|
+
return false;
|
|
1369
|
+
};
|
|
1370
|
+
var ɵ0$c = isIpad;
|
|
1371
|
+
var isIOS = function (win) { return testUserAgent(win, /iPhone|iPod/i) || isIpad(win); };
|
|
1372
|
+
var isAndroid = function (win) { return testUserAgent(win, /android|sink/i); };
|
|
1373
|
+
var isCordova = function (win) { return !!(win['cordova'] || win['phonegap'] || win['PhoneGap']); };
|
|
1374
|
+
|
|
1348
1375
|
var MatAutocompleteConfigHolder = /** @class */ (function () {
|
|
1349
1376
|
function MatAutocompleteConfigHolder(options) {
|
|
1350
1377
|
this.options = options;
|
|
@@ -1404,7 +1431,7 @@
|
|
|
1404
1431
|
return MatAutocompleteFieldUtils;
|
|
1405
1432
|
}());
|
|
1406
1433
|
var noop$8 = function (_) { };
|
|
1407
|
-
var ɵ0$
|
|
1434
|
+
var ɵ0$b = noop$8;
|
|
1408
1435
|
var MatAutocompleteField = /** @class */ (function () {
|
|
1409
1436
|
function MatAutocompleteField(cd, formGroupDir) {
|
|
1410
1437
|
this.cd = cd;
|
|
@@ -1424,7 +1451,7 @@
|
|
|
1424
1451
|
this.showLoadingSpinner = true;
|
|
1425
1452
|
this.debug = false;
|
|
1426
1453
|
this.showSearchBar = true;
|
|
1427
|
-
this.stickySearchBar =
|
|
1454
|
+
this.stickySearchBar = false;
|
|
1428
1455
|
this.clicked = new i0.EventEmitter();
|
|
1429
1456
|
this.blurred = new i0.EventEmitter();
|
|
1430
1457
|
this.focused = new i0.EventEmitter();
|
|
@@ -1581,7 +1608,7 @@
|
|
|
1581
1608
|
}
|
|
1582
1609
|
// Default values
|
|
1583
1610
|
this.multiple = toBoolean(this.multiple, false);
|
|
1584
|
-
this.mobile = toBoolean(this.mobile, this.multiple);
|
|
1611
|
+
this.mobile = toBoolean(this.mobile, this.multiple || isMobile(window));
|
|
1585
1612
|
this.displayAttributes = this.displayAttributes || ((_a = this.filter) === null || _a === void 0 ? void 0 : _a.attributes) || ['label', 'name'];
|
|
1586
1613
|
this.displayWith = this.displayWith || MatAutocompleteFieldUtils.createDisplayFn(this.displayAttributes, this.multiple);
|
|
1587
1614
|
this.equals = this.equals || MatAutocompleteFieldUtils.defaultEquals;
|
|
@@ -2143,7 +2170,7 @@
|
|
|
2143
2170
|
{ type: i0.Component, args: [{
|
|
2144
2171
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
2145
2172
|
selector: 'mat-autocomplete-field',
|
|
2146
|
-
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <!-- readonly -->\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- Mobile or Mutliple (use <mat-select>) -->\n <mat-select #matSelect\n *ngIf=\"mobile || multiple; else desktopTemplate\"\n [disableRipple]=\"true\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"classList\"\n [style.width]=\"panelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n [compareWith]=\"equals\"\n [multiple]=\"multiple\"\n [typeaheadDebounceInterval]=\"debounceTime * 10\"\n [required]=\"required\">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n <!-- Search bar -->\n <ion-searchbar *ngIf=\"showSearchBar\" #ionSearchbar\n class=\"mat-select-header\"\n [class.ion-searchbar-sticky]=\"stickySearchBar\"\n inputmode=\"search\"\n autocomplete=\"off\"\n animated=\"true\"\n showClearButton\n [debounce]=\"debounceTime\"\n (ionClear)=\"ionSearchBarClear($event)\"\n (ionInput)=\"ionSearchBarChanged($event)\"\n [placeholder]=\"'COMMON.BTN_SEARCH'|translate\"\n ></ion-searchbar>\n\n <!-- Headers -->\n <ion-row class=\"mat-select-header column ion-no-padding\"\n [class.multiple]=\"multiple\"\n [class.ion-searchbar-sticky]=\"showSearchBar && stickySearchBar\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- None option -->\n <mat-option *ngIf=\"!required && !multiple\" class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding\">\n <ion-col class=\"ion-no-padding\">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- Options -->\n <ng-container *ngIf=\"$filteredItems | async as items; else loadingTemplate\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initMatSelectInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- footer -->\n <ion-row *ngIf=\"itemCount as count\"\n class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-select>\n\n\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <ng-template #desktopTemplate>\n <input matInput #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [required]=\"required\"\n (click)=\"clicked.emit($event)\"\n (focus)=\"filterInputTextFocusEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [panelWidth]=\"panelWidth\">\n <!-- Headers -->\n <ion-row class=\"mat-autocomplete-header column ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- Options -->\n <ng-container *ngIf=\"$filteredItems | async as items; else loadingTemplate\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n\n <!-- footer -->\n <ion-row *ngIf=\"itemCount; let count\" class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('entity')\" translate>ERROR.FIELD_INVALID</mat-error>\n <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"desktop\"\n (click)=\"dropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #headers>\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n</ng-template>\n\n<ng-template #options>\n\n\n</ng-template>\n\n",
|
|
2173
|
+
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <!-- readonly -->\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- Mobile or Mutliple (use <mat-select>) -->\n <mat-select #matSelect\n *ngIf=\"mobile || multiple; else desktopTemplate\"\n [disableRipple]=\"true\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"classList\"\n [style.width]=\"panelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n [compareWith]=\"equals\"\n [multiple]=\"multiple\"\n [typeaheadDebounceInterval]=\"debounceTime * 10\"\n [required]=\"required\">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n <!-- Search bar -->\n <ion-searchbar *ngIf=\"showSearchBar\" #ionSearchbar\n class=\"mat-select-header\"\n [class.ion-searchbar-sticky]=\"stickySearchBar\"\n inputmode=\"search\"\n autocomplete=\"off\"\n animated=\"true\"\n showClearButton\n [debounce]=\"debounceTime\"\n (ionClear)=\"ionSearchBarClear($event)\"\n (ionInput)=\"ionSearchBarChanged($event)\"\n [placeholder]=\"'COMMON.BTN_SEARCH'|translate\"\n ></ion-searchbar>\n\n <!-- Headers -->\n <ion-row class=\"mat-select-header column ion-no-padding\"\n [class.multiple]=\"multiple\"\n [class.ion-searchbar-sticky]=\"showSearchBar && stickySearchBar\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- None option -->\n <mat-option *ngIf=\"!required && !multiple && !clearable\" class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding\">\n <ion-col class=\"ion-no-padding\">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf=\"$filteredItems | async as items; else loadingTemplate\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <!-- Options -->\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initMatSelectInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- footer -->\n <ion-row *ngIf=\"itemCount as count\"\n class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-select>\n\n\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <ng-template #desktopTemplate>\n <input matInput #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [required]=\"required\"\n (click)=\"clicked.emit($event)\"\n (focus)=\"filterInputTextFocusEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [panelWidth]=\"panelWidth\">\n <!-- Headers -->\n <ion-row class=\"mat-autocomplete-header column ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- Options -->\n <ng-container *ngIf=\"$filteredItems | async as items; else loadingTemplate\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n\n <!-- footer -->\n <ion-row *ngIf=\"itemCount; let count\" class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('entity')\" translate>ERROR.FIELD_INVALID</mat-error>\n <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"desktop\"\n (click)=\"dropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #headers>\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n</ng-template>\n\n<ng-template #options>\n\n\n</ng-template>\n\n",
|
|
2147
2174
|
providers: [{
|
|
2148
2175
|
provide: i1.NG_VALUE_ACCESSOR,
|
|
2149
2176
|
multi: true,
|
|
@@ -4846,40 +4873,13 @@
|
|
|
4846
4873
|
},] }
|
|
4847
4874
|
];
|
|
4848
4875
|
|
|
4849
|
-
/* ---
|
|
4850
|
-
* Source: https://github.com/ionic-team/ionic-framework/blob/b0d53ca73619585671d8cf4dc24e47f826495a0a/core/src/utils/platform.ts
|
|
4851
|
-
* --- */
|
|
4852
|
-
var matchMedia = function (win, query) { return win.matchMedia(query).matches; };
|
|
4853
|
-
var testUserAgent = function (win, expr) {
|
|
4854
|
-
var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
4855
|
-
return expr.test(userAgent);
|
|
4856
|
-
};
|
|
4857
|
-
var isWindows = function (win) { return testUserAgent(win, /windows/i); };
|
|
4858
|
-
var isTouchUi = function (win) { return matchMedia(win, '(any-pointer:coarse)'); };
|
|
4859
|
-
var isMobile = function (win) { return isTouchUi(win) && !isWindows(win); };
|
|
4860
|
-
var isIpad = function (win) {
|
|
4861
|
-
// iOS 12 and below
|
|
4862
|
-
if (testUserAgent(win, /iPad/i)) {
|
|
4863
|
-
return true;
|
|
4864
|
-
}
|
|
4865
|
-
// iOS 13+
|
|
4866
|
-
if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
|
|
4867
|
-
return true;
|
|
4868
|
-
}
|
|
4869
|
-
return false;
|
|
4870
|
-
};
|
|
4871
|
-
var ɵ0$b = isIpad;
|
|
4872
|
-
var isIOS = function (win) { return testUserAgent(win, /iPhone|iPod/i) || isIpad(win); };
|
|
4873
|
-
var isAndroid = function (win) { return testUserAgent(win, /android|sink/i); };
|
|
4874
|
-
var isCordova = function (win) { return !!(win['cordova'] || win['phonegap'] || win['PhoneGap']); };
|
|
4875
|
-
|
|
4876
4876
|
// Import the core angular services.
|
|
4877
4877
|
// ----------------------------------------------------------------------------------- //
|
|
4878
4878
|
// ----------------------------------------------------------------------------------- //
|
|
4879
4879
|
var BASE_TIMER_DELAY = 100;
|
|
4880
4880
|
var AutofocusDirective = /** @class */ (function () {
|
|
4881
4881
|
// I initialize the autofocus directive.
|
|
4882
|
-
function AutofocusDirective(elementRef, keyboard) {
|
|
4882
|
+
function AutofocusDirective(platform, elementRef, keyboard) {
|
|
4883
4883
|
this.keyboard = keyboard;
|
|
4884
4884
|
this._timer = null;
|
|
4885
4885
|
this._elementRef = elementRef;
|
|
@@ -4956,6 +4956,7 @@
|
|
|
4956
4956
|
},] }
|
|
4957
4957
|
];
|
|
4958
4958
|
AutofocusDirective.ctorParameters = function () { return [
|
|
4959
|
+
{ type: i1$5.Platform },
|
|
4959
4960
|
{ type: i0.ElementRef },
|
|
4960
4961
|
{ type: ngx.Keyboard, decorators: [{ type: i0.Optional }] }
|
|
4961
4962
|
]; };
|
|
@@ -5147,8 +5148,7 @@
|
|
|
5147
5148
|
};
|
|
5148
5149
|
var ɵ0$a = noop$7;
|
|
5149
5150
|
var MatLatLongField = /** @class */ (function () {
|
|
5150
|
-
function MatLatLongField(
|
|
5151
|
-
this.platform = platform;
|
|
5151
|
+
function MatLatLongField(translate, formBuilder, cd, formGroupDir) {
|
|
5152
5152
|
this.translate = translate;
|
|
5153
5153
|
this.formBuilder = formBuilder;
|
|
5154
5154
|
this.cd = cd;
|
|
@@ -5165,7 +5165,6 @@
|
|
|
5165
5165
|
this.required = false;
|
|
5166
5166
|
this.onBlur = new i0.EventEmitter();
|
|
5167
5167
|
this.onFocus = new i0.EventEmitter();
|
|
5168
|
-
this.mobile = this.platform.is('mobile');
|
|
5169
5168
|
}
|
|
5170
5169
|
Object.defineProperty(MatLatLongField.prototype, "disabled", {
|
|
5171
5170
|
get: function () {
|
|
@@ -5187,6 +5186,7 @@
|
|
|
5187
5186
|
});
|
|
5188
5187
|
MatLatLongField.prototype.ngOnInit = function () {
|
|
5189
5188
|
var _this = this;
|
|
5189
|
+
this.mobile = isNotNil(this.mobile) ? this.mobile : isMobile(window);
|
|
5190
5190
|
this.type = this.type || 'latitude';
|
|
5191
5191
|
this.pattern = this.pattern || 'DDMM';
|
|
5192
5192
|
this.mask = MASKS[this.type] && MASKS[this.type][this.pattern];
|
|
@@ -5451,7 +5451,6 @@
|
|
|
5451
5451
|
},] }
|
|
5452
5452
|
];
|
|
5453
5453
|
MatLatLongField.ctorParameters = function () { return [
|
|
5454
|
-
{ type: i1$5.Platform },
|
|
5455
5454
|
{ type: i1$2.TranslateService },
|
|
5456
5455
|
{ type: i1.FormBuilder },
|
|
5457
5456
|
{ type: i0.ChangeDetectorRef },
|
|
@@ -5515,8 +5514,7 @@
|
|
|
5515
5514
|
var noop$6 = function () { };
|
|
5516
5515
|
var ɵ0$9 = noop$6;
|
|
5517
5516
|
var MatDate = /** @class */ (function () {
|
|
5518
|
-
function MatDate(
|
|
5519
|
-
this.platform = platform;
|
|
5517
|
+
function MatDate(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5520
5518
|
this.dateAdapter = dateAdapter;
|
|
5521
5519
|
this.translate = translate;
|
|
5522
5520
|
this.formBuilder = formBuilder;
|
|
@@ -5573,11 +5571,12 @@
|
|
|
5573
5571
|
});
|
|
5574
5572
|
MatDate.prototype.ngOnInit = function () {
|
|
5575
5573
|
var _this = this;
|
|
5576
|
-
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
5577
|
-
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5578
5574
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5579
5575
|
if (!this.formControl)
|
|
5580
5576
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-field>.');
|
|
5577
|
+
this.mobile = isNotNil(this.mobile) ? this.mobile : isMobile(window);
|
|
5578
|
+
// Workaround because ion-datetime has issue (do not returned a ISO date)
|
|
5579
|
+
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5581
5580
|
this.required = toBoolean(this.required, this.formControl.validator === i1.Validators.required);
|
|
5582
5581
|
// Add 'validDate' validator (when existing validator are null or required, to be sure to keep it)
|
|
5583
5582
|
if (!this.formControl.validator || this.formControl.validator === i1.Validators.required) {
|
|
@@ -5859,7 +5858,6 @@
|
|
|
5859
5858
|
},] }
|
|
5860
5859
|
];
|
|
5861
5860
|
MatDate.ctorParameters = function () { return [
|
|
5862
|
-
{ type: i1$5.Platform },
|
|
5863
5861
|
{ type: i1$3.DateAdapter },
|
|
5864
5862
|
{ type: i1$2.TranslateService },
|
|
5865
5863
|
{ type: i1.FormBuilder },
|
|
@@ -5868,12 +5866,12 @@
|
|
|
5868
5866
|
{ type: i1.FormGroupDirective, decorators: [{ type: i0.Optional }] }
|
|
5869
5867
|
]; };
|
|
5870
5868
|
MatDate.propDecorators = {
|
|
5869
|
+
mobile: [{ type: i0.Input }],
|
|
5871
5870
|
formControl: [{ type: i0.Input }],
|
|
5872
5871
|
formControlName: [{ type: i0.Input }],
|
|
5873
5872
|
placeholder: [{ type: i0.Input }],
|
|
5874
5873
|
floatLabel: [{ type: i0.Input }],
|
|
5875
5874
|
required: [{ type: i0.Input }],
|
|
5876
|
-
mobile: [{ type: i0.Input }],
|
|
5877
5875
|
compact: [{ type: i0.Input }],
|
|
5878
5876
|
placeholderChar: [{ type: i0.Input }],
|
|
5879
5877
|
autofocus: [{ type: i0.Input }],
|
|
@@ -5898,8 +5896,7 @@
|
|
|
5898
5896
|
var noop$5 = function () { };
|
|
5899
5897
|
var ɵ0$8 = noop$5;
|
|
5900
5898
|
var MatDateTime = /** @class */ (function () {
|
|
5901
|
-
function MatDateTime(
|
|
5902
|
-
this.platform = platform;
|
|
5899
|
+
function MatDateTime(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5903
5900
|
this.dateAdapter = dateAdapter;
|
|
5904
5901
|
this.translate = translate;
|
|
5905
5902
|
this.formBuilder = formBuilder;
|
|
@@ -5956,11 +5953,12 @@
|
|
|
5956
5953
|
});
|
|
5957
5954
|
MatDateTime.prototype.ngOnInit = function () {
|
|
5958
5955
|
var _this = this;
|
|
5959
|
-
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
5960
|
-
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5961
5956
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5962
5957
|
if (!this.formControl)
|
|
5963
5958
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-time-field>.');
|
|
5959
|
+
this.mobile = isNotNil(this.mobile) ? this.mobile : isMobile(window);
|
|
5960
|
+
// Workaround because ion-datetime has issue (do not returned a ISO date)
|
|
5961
|
+
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5964
5962
|
this.required = toBoolean(this.required, this.formControl.validator === i1.Validators.required);
|
|
5965
5963
|
// Add 'validDate' validator (when existing validator are null or required, to be sure to keep it)
|
|
5966
5964
|
if (!this.formControl.validator || this.formControl.validator === i1.Validators.required) {
|
|
@@ -6278,7 +6276,6 @@
|
|
|
6278
6276
|
},] }
|
|
6279
6277
|
];
|
|
6280
6278
|
MatDateTime.ctorParameters = function () { return [
|
|
6281
|
-
{ type: i1$5.Platform },
|
|
6282
6279
|
{ type: i1$3.DateAdapter },
|
|
6283
6280
|
{ type: i1$2.TranslateService },
|
|
6284
6281
|
{ type: i1.FormBuilder },
|
|
@@ -6316,7 +6313,7 @@
|
|
|
6316
6313
|
};
|
|
6317
6314
|
var ɵ0$7 = noop$4;
|
|
6318
6315
|
var MatDateShort = /** @class */ (function () {
|
|
6319
|
-
function MatDateShort(
|
|
6316
|
+
function MatDateShort(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
6320
6317
|
this.dateAdapter = dateAdapter;
|
|
6321
6318
|
this.translate = translate;
|
|
6322
6319
|
this.formBuilder = formBuilder;
|
|
@@ -6334,9 +6331,6 @@
|
|
|
6334
6331
|
this.compact = false;
|
|
6335
6332
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
6336
6333
|
this.clearable = false;
|
|
6337
|
-
// Workaround because ion-datetime has issue (do not returned a ISO date)
|
|
6338
|
-
this.mobile = platform.is('mobile');
|
|
6339
|
-
this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
6340
6334
|
this.locale = (translate.currentLang || translate.defaultLang).substr(0, 2);
|
|
6341
6335
|
}
|
|
6342
6336
|
Object.defineProperty(MatDateShort.prototype, "tabindex", {
|
|
@@ -6365,6 +6359,9 @@
|
|
|
6365
6359
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
6366
6360
|
if (!this.formControl)
|
|
6367
6361
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-short-field>.');
|
|
6362
|
+
this.mobile = isNotNil(this.mobile) ? this.mobile : isMobile(window);
|
|
6363
|
+
// Workaround because ion-datetime has issue (do not returned a ISO date)
|
|
6364
|
+
this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
6368
6365
|
// Redirect errors from main control, into day sub control
|
|
6369
6366
|
var $error = new rxjs.BehaviorSubject(null);
|
|
6370
6367
|
this.required = toBoolean(this.required, this.formControl.validator === i1.Validators.required);
|
|
@@ -6611,7 +6608,6 @@
|
|
|
6611
6608
|
},] }
|
|
6612
6609
|
];
|
|
6613
6610
|
MatDateShort.ctorParameters = function () { return [
|
|
6614
|
-
{ type: i1$5.Platform },
|
|
6615
6611
|
{ type: i1$3.DateAdapter },
|
|
6616
6612
|
{ type: i1$2.TranslateService },
|
|
6617
6613
|
{ type: i1.FormBuilder },
|
|
@@ -6620,6 +6616,7 @@
|
|
|
6620
6616
|
{ type: i1.FormGroupDirective, decorators: [{ type: i0.Optional }] }
|
|
6621
6617
|
]; };
|
|
6622
6618
|
MatDateShort.propDecorators = {
|
|
6619
|
+
mobile: [{ type: i0.Input }],
|
|
6623
6620
|
disabled: [{ type: i0.Input }],
|
|
6624
6621
|
formControl: [{ type: i0.Input }],
|
|
6625
6622
|
formControlName: [{ type: i0.Input }],
|
|
@@ -10165,12 +10162,13 @@
|
|
|
10165
10162
|
]; };
|
|
10166
10163
|
|
|
10167
10164
|
var Hotkeys = /** @class */ (function () {
|
|
10168
|
-
function Hotkeys(eventManager, dialog, document, modalController) {
|
|
10165
|
+
function Hotkeys(eventManager, dialog, document, modalController, popoverController) {
|
|
10169
10166
|
var _this = this;
|
|
10170
10167
|
this.eventManager = eventManager;
|
|
10171
10168
|
this.dialog = dialog;
|
|
10172
10169
|
this.document = document;
|
|
10173
10170
|
this.modalController = modalController;
|
|
10171
|
+
this.popoverController = popoverController;
|
|
10174
10172
|
this._debug = false;
|
|
10175
10173
|
this._hotkeys = new Map();
|
|
10176
10174
|
this._defaults = {
|
|
@@ -10199,15 +10197,24 @@
|
|
|
10199
10197
|
}
|
|
10200
10198
|
return new rxjs.Observable(function (observer) {
|
|
10201
10199
|
var handler = function (e) { return __awaiter(_this, void 0, void 0, function () {
|
|
10202
|
-
var top;
|
|
10203
|
-
return __generator(this, function (
|
|
10204
|
-
switch (
|
|
10200
|
+
var top, _a;
|
|
10201
|
+
return __generator(this, function (_b) {
|
|
10202
|
+
switch (_b.label) {
|
|
10205
10203
|
case 0: return [4 /*yield*/, this.modalController.getTop()];
|
|
10206
10204
|
case 1:
|
|
10207
|
-
|
|
10205
|
+
_a = (_b.sent());
|
|
10206
|
+
if (_a) return [3 /*break*/, 3];
|
|
10207
|
+
return [4 /*yield*/, this.popoverController.getTop()];
|
|
10208
|
+
case 2:
|
|
10209
|
+
_a = (_b.sent());
|
|
10210
|
+
_b.label = 3;
|
|
10211
|
+
case 3:
|
|
10212
|
+
top = _a;
|
|
10208
10213
|
// If modal present, check its component name against hotkey element name (fix #181)
|
|
10209
|
-
if (top && top.component['name'] !== merged.elementName)
|
|
10214
|
+
if (top && top.component['name'] !== merged.elementName) {
|
|
10215
|
+
e.preventDefault();
|
|
10210
10216
|
return [2 /*return*/];
|
|
10217
|
+
}
|
|
10211
10218
|
if (e instanceof KeyboardEvent && e.repeat)
|
|
10212
10219
|
return [2 /*return*/]; // skip when repeated
|
|
10213
10220
|
if (merged.preventDefault)
|
|
@@ -10234,7 +10241,7 @@
|
|
|
10234
10241
|
};
|
|
10235
10242
|
return Hotkeys;
|
|
10236
10243
|
}());
|
|
10237
|
-
Hotkeys.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(i0__namespace.ɵɵinject(i1__namespace$5.EventManager), i0__namespace.ɵɵinject(i2__namespace$1.MatDialog), i0__namespace.ɵɵinject(i1__namespace$3.DOCUMENT), i0__namespace.ɵɵinject(i1__namespace$4.ModalController)); }, token: Hotkeys, providedIn: "root" });
|
|
10244
|
+
Hotkeys.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(i0__namespace.ɵɵinject(i1__namespace$5.EventManager), i0__namespace.ɵɵinject(i2__namespace$1.MatDialog), i0__namespace.ɵɵinject(i1__namespace$3.DOCUMENT), i0__namespace.ɵɵinject(i1__namespace$4.ModalController), i0__namespace.ɵɵinject(i1__namespace$4.PopoverController)); }, token: Hotkeys, providedIn: "root" });
|
|
10238
10245
|
Hotkeys.decorators = [
|
|
10239
10246
|
{ type: i0.Injectable, args: [{
|
|
10240
10247
|
providedIn: 'root'
|
|
@@ -10244,7 +10251,8 @@
|
|
|
10244
10251
|
{ type: i1$6.EventManager },
|
|
10245
10252
|
{ type: i2.MatDialog },
|
|
10246
10253
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [i1$4.DOCUMENT,] }] },
|
|
10247
|
-
{ type: i1$5.ModalController }
|
|
10254
|
+
{ type: i1$5.ModalController },
|
|
10255
|
+
{ type: i1$5.PopoverController }
|
|
10248
10256
|
]; };
|
|
10249
10257
|
|
|
10250
10258
|
var SharedHotkeysModule = /** @class */ (function () {
|
|
@@ -11792,7 +11800,7 @@
|
|
|
11792
11800
|
LocalSettingsService.prototype.ngOnStart = function () {
|
|
11793
11801
|
console.info('[settings] Starting service...');
|
|
11794
11802
|
// Restoring local settings
|
|
11795
|
-
this._data.mobile = isNotNil(this._data.mobile) ? this._data.mobile : isMobile(window);
|
|
11803
|
+
this._data.mobile = isNotNil(this._data.mobile) ? this._data.mobile : (isCordova(window) || isMobile(window));
|
|
11796
11804
|
this._data.usageMode = (isAndroid(window) || isIOS(window)) ? 'FIELD' : 'DESK'; // FIELD by default if Android or iOS
|
|
11797
11805
|
// Restoring local settings
|
|
11798
11806
|
return this.restoreLocally();
|
|
@@ -15396,7 +15404,7 @@
|
|
|
15396
15404
|
case 1:
|
|
15397
15405
|
_a.sent();
|
|
15398
15406
|
console.info('[graphql] Starting graphql...');
|
|
15399
|
-
mobile =
|
|
15407
|
+
mobile = isMobile(window);
|
|
15400
15408
|
enableTrackMutationQueries = !mobile;
|
|
15401
15409
|
peer = this.network.peer;
|
|
15402
15410
|
if (!peer)
|
|
@@ -17759,7 +17767,7 @@
|
|
|
17759
17767
|
return [3 /*break*/, 8];
|
|
17760
17768
|
case 2:
|
|
17761
17769
|
now = this._debug && Date.now();
|
|
17762
|
-
if (!(this.network.online &&
|
|
17770
|
+
if (!(this.network.online && isMobile(window))) return [3 /*break*/, 6];
|
|
17763
17771
|
jobs_1 = [];
|
|
17764
17772
|
// Download logos
|
|
17765
17773
|
if (data.largeLogo && data.largeLogo.startsWith('http')) {
|
|
@@ -17901,15 +17909,16 @@
|
|
|
17901
17909
|
PlatformService.prototype.is = function (platformName) {
|
|
17902
17910
|
switch (platformName) {
|
|
17903
17911
|
case 'mobile':
|
|
17904
|
-
|
|
17905
|
-
|
|
17912
|
+
case 'mobileweb':
|
|
17913
|
+
// Exclude Windows touch screens - see SUMARIS issue #323
|
|
17914
|
+
return this.platform.is(platformName) && !isWindows(window);
|
|
17906
17915
|
default:
|
|
17907
17916
|
return this.platform.is(platformName);
|
|
17908
17917
|
}
|
|
17909
17918
|
};
|
|
17910
17919
|
Object.defineProperty(PlatformService.prototype, "mobile", {
|
|
17911
17920
|
get: function () {
|
|
17912
|
-
return isNotNil(this._mobile) ? this._mobile :
|
|
17921
|
+
return isNotNil(this._mobile) ? this._mobile : this.is('mobile');
|
|
17913
17922
|
},
|
|
17914
17923
|
enumerable: false,
|
|
17915
17924
|
configurable: true
|
|
@@ -17927,18 +17936,18 @@
|
|
|
17927
17936
|
PlatformService.prototype.isIOSCordova = function () {
|
|
17928
17937
|
return this._ios && this._cordova || false;
|
|
17929
17938
|
};
|
|
17930
|
-
PlatformService.prototype.isWeb = function () {
|
|
17931
|
-
return !this._cordova || (!this._android && !this._ios);
|
|
17932
|
-
};
|
|
17933
17939
|
PlatformService.prototype.isApp = function () {
|
|
17934
|
-
return this.
|
|
17940
|
+
return this.isAndroidCordova() || this.isIOSCordova();
|
|
17941
|
+
};
|
|
17942
|
+
PlatformService.prototype.isWeb = function () {
|
|
17943
|
+
return !this.isApp();
|
|
17935
17944
|
};
|
|
17936
17945
|
PlatformService.prototype.isMobileWeb = function () {
|
|
17937
|
-
return
|
|
17946
|
+
return this.mobile && this.isWeb();
|
|
17938
17947
|
};
|
|
17939
17948
|
Object.defineProperty(PlatformService.prototype, "canDownload", {
|
|
17940
17949
|
get: function () {
|
|
17941
|
-
return
|
|
17950
|
+
return this.downloader && this.isAndroidCordova();
|
|
17942
17951
|
},
|
|
17943
17952
|
enumerable: false,
|
|
17944
17953
|
configurable: true
|
|
@@ -30209,8 +30218,7 @@
|
|
|
30209
30218
|
disableControl.disable();
|
|
30210
30219
|
// Copy the 'enable' value, into the disable control
|
|
30211
30220
|
this.form.get('enable').valueChanges.subscribe(function (value) { return disableControl.setValue(value); });
|
|
30212
|
-
|
|
30213
|
-
this.showLogPanel = this.showLogPanel || mobile;
|
|
30221
|
+
this.showLogPanel = this.showLogPanel || isMobile(window);
|
|
30214
30222
|
}
|
|
30215
30223
|
DateTimeTestPage.prototype.ngOnInit = function () {
|
|
30216
30224
|
var _this = this;
|
|
@@ -30500,8 +30508,7 @@
|
|
|
30500
30508
|
|
|
30501
30509
|
var moment = momentImported__namespace;
|
|
30502
30510
|
var DateTestPage = /** @class */ (function () {
|
|
30503
|
-
function DateTestPage(
|
|
30504
|
-
this.platform = platform;
|
|
30511
|
+
function DateTestPage(formBuilder, cd) {
|
|
30505
30512
|
this.formBuilder = formBuilder;
|
|
30506
30513
|
this.cd = cd;
|
|
30507
30514
|
this.showLogPanel = true;
|
|
@@ -30523,8 +30530,7 @@
|
|
|
30523
30530
|
disableControl.disable();
|
|
30524
30531
|
// Copy the 'enable' value, into the disable control
|
|
30525
30532
|
this.form.get('enable').valueChanges.subscribe(function (value) { return disableControl.setValue(value); });
|
|
30526
|
-
|
|
30527
|
-
this.showLogPanel = this.showLogPanel || mobile;
|
|
30533
|
+
this.showLogPanel = this.showLogPanel || isMobile(window);
|
|
30528
30534
|
}
|
|
30529
30535
|
DateTestPage.prototype.ngOnInit = function () {
|
|
30530
30536
|
var _this = this;
|
|
@@ -30601,7 +30607,6 @@
|
|
|
30601
30607
|
},] }
|
|
30602
30608
|
];
|
|
30603
30609
|
DateTestPage.ctorParameters = function () { return [
|
|
30604
|
-
{ type: i1$5.Platform },
|
|
30605
30610
|
{ type: i1.FormBuilder },
|
|
30606
30611
|
{ type: i0.ChangeDetectorRef }
|
|
30607
30612
|
]; };
|
|
@@ -31762,7 +31767,7 @@
|
|
|
31762
31767
|
exports.waitForTrue = waitForTrue;
|
|
31763
31768
|
exports.waitIdle = waitIdle;
|
|
31764
31769
|
exports.waitWhilePending = waitWhilePending;
|
|
31765
|
-
exports["ɵ0"] = ɵ0$
|
|
31770
|
+
exports["ɵ0"] = ɵ0$c;
|
|
31766
31771
|
exports["ɵa"] = CustomReuseStrategy;
|
|
31767
31772
|
exports["ɵb"] = MatNumpadDomService;
|
|
31768
31773
|
exports["ɵc"] = isFocusableElement;
|