@sumaris-net/ngx-components 18.22.24 → 18.22.26
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/doc/changelog.md +7 -0
- package/esm2022/src/app/shared/constants.mjs +2 -2
- package/esm2022/src/app/shared/dates.mjs +52 -20
- package/esm2022/src/app/shared/file/csv.utils.mjs +2 -2
- package/esm2022/src/app/shared/material/autocomplete/material.autocomplete.mjs +3 -3
- package/esm2022/src/app/shared/material/chips/material.chips.mjs +3 -3
- package/esm2022/src/app/shared/regexps.mjs +11 -4
- package/esm2022/src/app/shared/validator/validators.mjs +2 -2
- package/fesm2022/sumaris-net.ngx-components.mjs +69 -30
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/dates.d.ts +28 -4
- package/src/assets/manifest.json +1 -1
|
@@ -229,7 +229,7 @@ class Environment {
|
|
|
229
229
|
|
|
230
230
|
const DATE_ISO_PATTERN = 'YYYY-MM-DDTHH:mm:ss.SSSZ';
|
|
231
231
|
const DATE_PATTERN = 'YYYY-MM-DD';
|
|
232
|
-
const DATE_MATCH_REGEXP =
|
|
232
|
+
const DATE_MATCH_REGEXP = /^\d+[-]\d+-\d+$/;
|
|
233
233
|
const DEFAULT_PLACEHOLDER_CHAR = '\u005F'; // underscore
|
|
234
234
|
const PUBKEY_REGEXP = /^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{43,44}$/;
|
|
235
235
|
const SPACE_PLACEHOLDER_CHAR = '\u2000';
|
|
@@ -247,7 +247,7 @@ class RegExpUtils {
|
|
|
247
247
|
static _cachedSearchRegexps = {};
|
|
248
248
|
static _cachedSearchTexts = [];
|
|
249
249
|
static MAX_CACHE_SIZE = 100;
|
|
250
|
-
static SPECIAL_CHARACTERS_REGEXP = /[.\[\](){}\\$^|+*?]
|
|
250
|
+
static SPECIAL_CHARACTERS_REGEXP = /[.\[\](){}\\$^|+*?]/;
|
|
251
251
|
static SPECIAL_CHARACTERS_REPLACEMENT_MAP = {
|
|
252
252
|
// Escape some characters
|
|
253
253
|
'.': '[.]', // Escape point
|
|
@@ -329,10 +329,17 @@ class RegExpUtils {
|
|
|
329
329
|
return regexp;
|
|
330
330
|
}
|
|
331
331
|
static match(input, regexp) {
|
|
332
|
-
|
|
332
|
+
if (!input)
|
|
333
|
+
return false;
|
|
334
|
+
if (regexp instanceof RegExp) {
|
|
335
|
+
return regexp.test(input);
|
|
336
|
+
}
|
|
337
|
+
// Si c'est une string, on garde match qui fera la conversion implicite
|
|
338
|
+
// ou on pourrait faire new RegExp(regexp).test(input)
|
|
339
|
+
return !!input.match(regexp);
|
|
333
340
|
}
|
|
334
341
|
static matchUpperCase(input, regexp) {
|
|
335
|
-
return
|
|
342
|
+
return RegExpUtils.match(input?.toUpperCase(), regexp);
|
|
336
343
|
}
|
|
337
344
|
static hasWildcardCharacter(input) {
|
|
338
345
|
return (input && (input.includes('*') || input.includes('?'))) || false;
|
|
@@ -1270,6 +1277,8 @@ class DateUtils {
|
|
|
1270
1277
|
static moment = _moment;
|
|
1271
1278
|
static toDateISOString = toDateISOString;
|
|
1272
1279
|
static fromDateISOString = fromDateISOString;
|
|
1280
|
+
static fromUnixTimestamp = fromUnixTimestamp;
|
|
1281
|
+
static fromUnixMsTimestamp = fromUnixMsTimestamp;
|
|
1273
1282
|
static toDuration = toDuration;
|
|
1274
1283
|
static min(date1, date2) {
|
|
1275
1284
|
const d1 = fromDateISOString(date1);
|
|
@@ -1378,6 +1387,12 @@ class DateUtils {
|
|
|
1378
1387
|
return (days > 0 ? days.toString() + (dayUnit + ' ') : '') + hours + ':' + minutes + (seconds ? ':' + seconds : '');
|
|
1379
1388
|
}
|
|
1380
1389
|
}
|
|
1390
|
+
/**
|
|
1391
|
+
* Converts the given value to an ISO date string representation.
|
|
1392
|
+
*
|
|
1393
|
+
* @param {any} value - The value to be transformed into an ISO date string. This can be a date, a string, or other compatible formats.
|
|
1394
|
+
* @return {string | undefined} Returns the ISO date string if the conversion is successful; otherwise, returns undefined.
|
|
1395
|
+
*/
|
|
1381
1396
|
function toDateISOString(value) {
|
|
1382
1397
|
if (!value)
|
|
1383
1398
|
return undefined;
|
|
@@ -1391,31 +1406,55 @@ function toDateISOString(value) {
|
|
|
1391
1406
|
return undefined;
|
|
1392
1407
|
return DateUtils.isNoTime(date) ? date.toISOString(true /* important ! */).substring(0, 10) : date.toISOString();
|
|
1393
1408
|
}
|
|
1394
|
-
|
|
1409
|
+
/**
|
|
1410
|
+
* Converts a given value to a Moment object if possible.
|
|
1411
|
+
* If the given value is already a Moment object, it will simply return it.
|
|
1412
|
+
* The method handles strings in ISO date formats, UNIX timestamps, and performs validation based on provided options.
|
|
1413
|
+
*
|
|
1414
|
+
* @param {any} value - The value to be converted to a Moment object. This can be a string representing a date, a UNIX timestamp, or a Moment object.
|
|
1415
|
+
* @param {Object} [opts] - Optional parameters for controlling the method's behavior.
|
|
1416
|
+
* @param {boolean} [opts.undefinedIfInvalid=true] - Determines if the method should return undefined for invalid dates. If set to false, an invalid Moment object will be returned instead.
|
|
1417
|
+
* @param {boolean} [opts.strict=false] - Controls whether strict validation is performed. Strict mode enforces stricter date parsing rules.
|
|
1418
|
+
* @param {boolean} [opts.requiredTime=false] - Allow to parse a date without any time
|
|
1419
|
+
* @return {Moment | undefined} A Moment object if the value is successfully converted, or undefined if the conversion is not possible and undefinedIfInvalid is true.
|
|
1420
|
+
*/
|
|
1421
|
+
function fromDateISOString(value, opts = { undefinedIfInvalid: true, strict: false, requiredTime: false }) {
|
|
1395
1422
|
// Already a moment object: use it
|
|
1396
1423
|
if (!value || isMoment$1(value))
|
|
1397
1424
|
return value;
|
|
1398
|
-
|
|
1425
|
+
let date;
|
|
1426
|
+
// Try without time
|
|
1427
|
+
if (typeof value === 'string' && DATE_MATCH_REGEXP.test(value) && !opts?.requiredTime) {
|
|
1399
1428
|
// Parse the input value, as a date only
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
const date = DateUtils.moment(value, DATE_ISO_PATTERN);
|
|
1405
|
-
if (date.isValid())
|
|
1406
|
-
return date;
|
|
1407
|
-
// Not valid: trying to convert from unix timestamp
|
|
1408
|
-
if (typeof value === 'string') {
|
|
1409
|
-
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
1410
|
-
if (value.length === 10) {
|
|
1411
|
-
return DateUtils.moment(value, DATE_UNIX_TIMESTAMP);
|
|
1412
|
-
}
|
|
1413
|
-
else if (value.length === 13) {
|
|
1414
|
-
return DateUtils.moment(value, DATE_UNIX_MS_TIMESTAMP);
|
|
1415
|
-
}
|
|
1429
|
+
date = DateUtils.moment(value, DATE_PATTERN, true);
|
|
1430
|
+
// Mark as no time, if valid
|
|
1431
|
+
if (date.isValid())
|
|
1432
|
+
return DateUtils.markNoTime(date); // OK
|
|
1416
1433
|
}
|
|
1417
|
-
|
|
1418
|
-
|
|
1434
|
+
else {
|
|
1435
|
+
// Parse the input value, as a ISO date time
|
|
1436
|
+
date = DateUtils.moment(value, DATE_ISO_PATTERN);
|
|
1437
|
+
if (date.isValid())
|
|
1438
|
+
return date; // OK
|
|
1439
|
+
// Not valid: trying to convert from unix timestamp (if not strict mode)
|
|
1440
|
+
if (typeof value === 'string' && !opts?.strict) {
|
|
1441
|
+
// Log debug
|
|
1442
|
+
console.debug('Wrong date format - Trying to convert from local time: ' + value);
|
|
1443
|
+
if (value.length === 10) {
|
|
1444
|
+
date = fromUnixTimestamp(value);
|
|
1445
|
+
}
|
|
1446
|
+
else if (value.length === 13) {
|
|
1447
|
+
date = fromUnixMsTimestamp(value);
|
|
1448
|
+
}
|
|
1449
|
+
if (date.isValid())
|
|
1450
|
+
return date; // OK
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
// Return invalid date, if allowed
|
|
1454
|
+
if (opts?.undefinedIfInvalid === false)
|
|
1455
|
+
return date; // Return invalid
|
|
1456
|
+
console.warn('Unable to parse date: ' + value, opts);
|
|
1457
|
+
return undefined; // Return undefined, if invalid not allowed
|
|
1419
1458
|
}
|
|
1420
1459
|
function fromUnixTimestamp(timeInSec) {
|
|
1421
1460
|
return DateUtils.moment(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
@@ -3090,7 +3129,7 @@ class SharedValidators {
|
|
|
3090
3129
|
static validDateTime(requiredTime = true) {
|
|
3091
3130
|
return (control) => {
|
|
3092
3131
|
const value = control.value;
|
|
3093
|
-
const date = !value || isMoment(value) ? value : fromDateISOString(value);
|
|
3132
|
+
const date = !value || isMoment(value) ? value : fromDateISOString(value, { strict: false, undefinedIfInvalid: false, requiredTime });
|
|
3094
3133
|
if (date && (!date.isValid() || date.year() < 1900 || (requiredTime && DateUtils.isNoTime(date)))) {
|
|
3095
3134
|
return { validDate: true };
|
|
3096
3135
|
}
|
|
@@ -9964,11 +10003,11 @@ class MatAutocompleteField {
|
|
|
9964
10003
|
this.toggleFavorite.emit({ source: this.matSelect || this.autocomplete, value: value });
|
|
9965
10004
|
}
|
|
9966
10005
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatAutocompleteField, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i2$1.ModalController }, { token: i0.Renderer2 }, { token: i1$3.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
9967
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MatAutocompleteField, selector: "mat-autocomplete-field", inputs: { equals: "equals", logPrefix: "logPrefix", formControl: "formControl", formControlName: "formControlName", floatLabel: "floatLabel", label: "label", appearance: "appearance", subscriptSizing: "subscriptSizing", placeholder: "placeholder", suggestFn: "suggestFn", required: ["required", "required", booleanAttribute], hideRequiredMarker: ["hideRequiredMarker", "hideRequiredMarker", booleanAttribute], mobile: ["mobile", "mobile", booleanAttribute], clearable: ["clearable", "clearable", booleanAttribute], debounceTime: ["debounceTime", "debounceTime", numberAttribute], displaySeparator: "displaySeparator", displayWith: "displayWith", displayAttributes: "displayAttributes", displayColumnSizes: "displayColumnSizes", displayColumnNames: "displayColumnNames", highlightAccent: ["highlightAccent", "highlightAccent", booleanAttribute], showAllOnFocus: ["showAllOnFocus", "showAllOnFocus", booleanAttribute], showPanelOnFocus: ["showPanelOnFocus", "showPanelOnFocus", booleanAttribute], reloadItemsOnFocus: ["reloadItemsOnFocus", "reloadItemsOnFocus", booleanAttribute], clearInvalidValueOnBlur: ["clearInvalidValueOnBlur", "clearInvalidValueOnBlur", booleanAttribute], autofocus: ["autofocus", "autofocus", booleanAttribute], config: "config", i18nPrefix: "i18nPrefix", noResultMessage: "noResultMessage", panelClass: "panelClass", panelWidth: "panelWidth", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], matAutocompletePosition: "matAutocompletePosition", multiple: ["multiple", "multiple", booleanAttribute], fetchMoreThreshold: "fetchMoreThreshold", suggestLengthThreshold: ["suggestLengthThreshold", "suggestLengthThreshold", numberAttribute], showLoadingSpinner: ["showLoadingSpinner", "showLoadingSpinner", booleanAttribute], debug: ["debug", "debug", booleanAttribute], showSearchBar: ["showSearchBar", "showSearchBar", booleanAttribute], stickySearchBar: ["stickySearchBar", "stickySearchBar", booleanAttribute], applyImplicitValue: "applyImplicitValue", dropButtonTitle: "dropButtonTitle", clearButtonTitle: "clearButtonTitle", trimSearchText: ["trimSearchText", "trimSearchText", booleanAttribute], splitSearchText: ["splitSearchText", "splitSearchText", booleanAttribute], selectInputContentOnFocus: ["selectInputContentOnFocus", "selectInputContentOnFocus", booleanAttribute], selectInputContentOnFocusDelay: ["selectInputContentOnFocusDelay", "selectInputContentOnFocusDelay", numberAttribute], previewImplicitValue: ["previewImplicitValue", "previewImplicitValue", booleanAttribute], showFavorites: "showFavorites", toggleFavoriteTitle: "toggleFavoriteTitle", favoriteItems: "favoriteItems", colSizes: "colSizes", classList: ["class", "classList"], filter: "filter", readonly: ["readonly", "readonly", booleanAttribute], tabindex: "tabindex", items: "items" }, outputs: { clicked: "click", blurred: "blur", focused: "focus", dropButtonClick: "dropButtonClick", keydownEscape: "keydown.escape", keydownBackspace: "keydown.backspace", keyupEnter: "keyup.enter", selectionChange: "selectionChange", openedChange: "openedChange", toggleFavorite: "toggleFavorite" }, providers: [DEFAULT_VALUE_ACCESSOR$4], viewQueries: [{ propertyName: "matSelect", first: true, predicate: ["matSelect"], descendants: true }, { propertyName: "ionSearchbar", first: true, predicate: ["ionSearchbar"], descendants: true }, { propertyName: "matInputText", first: true, predicate: ["matInputText"], descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], ngImport: i0, template: "<ion-grid class=\"ion-no-padding field-container\">\n <ion-row>\n <ion-col [size]=\"colSizes?.[0]\" class=\"ion-no-padding\">\n <!-- readonly -->\n @if (_readonly) {\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"subscriptSizing\"\n [title]=\"_displayValue || ''\"\n class=\"mat-form-field-disabled\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if (floatLabel !== 'never' && !!placeholder) {\n <mat-label>{{ placeholder }}</mat-label>\n }\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\" />\n <ion-text>{{ value | toString: displayWith }}</ion-text>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n <!-- hints -->\n @if (!formControl.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n } @else {\n @let hasFavorites = toggleFavorite.observed || (favoriteItems | isNotEmptyArray);\n\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"subscriptSizing\"\n [title]=\"_displayValue || ''\"\n [hideRequiredMarker]=\"hideRequiredMarker\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if ((label || placeholder) && floatLabel !== 'never') {\n <mat-label>{{ label || placeholder }}</mat-label>\n }\n <!-- Mobile or Multiple (use <mat-select>) -->\n @if (mobile || multiple) {\n <mat-select\n #matSelect\n hideSingleSelectionIndicator\n disableOptionCentering\n [disableRipple]=\"disableRipple\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"panelClass\"\n [panelWidth]=\"panelWidth || _defaultPanelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (openedChange)=\"openedChange.emit($event)\"\n [compareWith]=\"equals\"\n [multiple]=\"multiple\"\n [typeaheadDebounceInterval]=\"debounceTime * 10\"\n [required]=\"required\"\n [class.mat-mdc-select-arrow-hidden]=\"!mobile\"\n >\n <mat-select-trigger>{{ value | toString: displayWith }}</mat-select-trigger>\n <!-- Search bar -->\n @if (showSearchBar) {\n <mat-optgroup class=\"mat-select-searchbar\" [class.mat-select-searchbar-sticky]=\"stickySearchBar\">\n <!-- FIXME on iOS devices, when animated=\"true\", then the search icon overlap the placeholder -->\n <ion-searchbar\n #ionSearchbar\n inputmode=\"search\"\n autocomplete=\"off\"\n animated=\"false\"\n showClearButton=\"true\"\n [debounce]=\"debounceTime\"\n (ionClear)=\"markAsLoading()\"\n (ionInput)=\"ionSearchBarChanged($event)\"\n [placeholder]=\"'COMMON.BTN_SEARCH' | translate\"\n ></ion-searchbar>\n </mat-optgroup>\n }\n <!-- Headers -->\n <ion-row\n class=\"mat-select-header column ion-no-padding\"\n [class.multiple]=\"multiple\"\n [class.mat-select-searchbar-sticky]=\"showSearchBar && stickySearchBar\"\n [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\"\n >\n <!-- favorite spacer -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\"></ion-col>\n }\n <!-- attribute headers -->\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n\n <!-- None option -->\n @if (!required && !multiple && !clearable) {\n <mat-option 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 @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n } @else {\n <!-- Options -->\n @for (item of items; track i; let i = $index) {\n @let isFavorite = hasFavorites && (favoriteItems | arrayIncludes: item);\n\n <mat-option [value]=\"item\" class=\"ion-no-padding\" [class.mdc-list-item--favorite]=\"isFavorite\">\n <ion-row [classList]=\"item.classList || ''\" [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\">\n <!-- favorite icon -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\">\n @if (isFavorite) {\n <ion-icon name=\"star\" color=\"tertiary\"></ion-icon>\n }\n </ion-col>\n }\n\n <!-- attribute columns -->\n @for (path of displayAttributes; track j; let j = $index) {\n <ion-col [size]=\"displayColumnSizes[j]\" class=\"ion-align-self-center ion-text-wrap\">\n <ion-label\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight: { search: ionSearchbar?.value, withAccent: highlightAccent }\n \"\n ></ion-label>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option class=\"ion-padding\" (ngInit)=\"_initMatSelectInfiniteScroll()\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((_displayValue | strLength) < suggestLengthThreshold) {\n <!-- need more character -->\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 } @else {\n <!-- loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n <!-- footer -->\n @if (itemCount; as count) {\n <mat-option class=\"mat-option-footer mat-autocomplete-footer ion-no-padding\" disabled>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </mat-option>\n }\n </mat-select>\n } @else {\n <!-- desktop (use mat-autocomplete) -->\n <input\n matInput\n #matInputText\n type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"(label || floatLabel === 'never') && 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 (keydown.backspace)=\"onBackspace($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowDown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\"\n />\n <!-- autocomplete -->\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [autoActiveFirstOption]=\"true\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayWith\"\n [class]=\"panelClass\"\n [panelWidth]=\"panelWidth\"\n [disableRipple]=\"disableRipple\"\n (optionSelected)=\"onOptionSelected($event)\"\n (opened)=\"openedChange.emit(true)\"\n (closed)=\"openedChange.emit(false)\"\n >\n <!-- Headers -->\n <ion-row\n class=\"mat-autocomplete-header column ion-no-padding\"\n [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\"\n >\n <!-- favorite spacer -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\"></ion-col>\n }\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n } @else {\n <!-- Options -->\n @for (item of items; track i; let i = $index) {\n @let isFavorite = hasFavorites && (favoriteItems | arrayIncludes: item);\n <mat-option\n [value]=\"item\"\n class=\"ion-no-padding\"\n [class.mdc-list-item--selected]=\"item === _selectedItem\"\n [class.mdc-list-item--favorite]=\"isFavorite\"\n >\n <ion-row [classList]=\"item.classList || ''\" [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\">\n <!-- favorite icon -->\n @if (hasFavorites) {\n <ion-col\n matPrefix\n size=\"auto\"\n class=\"favorite-col\"\n (click)=\"toggleFavoriteClick($event, item)\"\n >\n @if (isFavorite) {\n <ion-icon name=\"star\" color=\"tertiary\"></ion-icon>\n } @else if (toggleFavorite.observed) {\n <ion-icon name=\"star-outline\" color=\"medium\" class=\"visible-hover\"></ion-icon>\n }\n </ion-col>\n }\n @for (path of displayAttributes; track j; let j = $index) {\n <ion-col\n [size]=\"displayColumnSizes[j]\"\n [title]=\"text.innerText\"\n class=\"ion-align-self-center\"\n >\n <ion-text>\n <span\n #text\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight\n : {\n search: matInputText.value,\n withAccent: highlightAccent,\n }\n \"\n ></span>\n </ion-text>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option class=\"ion-padding\" (ngInit)=\"_initAutocompleteInfiniteScroll()\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((_displayValue | strLength) < suggestLengthThreshold) {\n <!-- Need more characters -->\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 } @else {\n <!-- Loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n\n <!-- footer -->\n @if (itemCount; as count) {\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </ion-col>\n </ion-row>\n }\n </mat-autocomplete>\n }\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n @if (formControl?.hasError('required')) {\n <mat-error translate>ERROR.FIELD_REQUIRED</mat-error>\n }\n @if (formControl?.hasError('entity')) {\n <mat-error translate>ERROR.FIELD_INVALID</mat-error>\n }\n <ng-container *ngTemplateOutlet=\"matErrorTemplate\"></ng-container>\n <!-- Hints -->\n @if (!formControl?.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n }\n </ion-col>\n <ion-col [size]=\"colSizes?.[1]\" class=\"ion-no-padding\">\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<ng-template #matSuffixTemplate>\n @if (!mobile) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"toggleShowPanel($event)\"\n [hidden]=\"disabled\"\n [title]=\"dropButtonTitle || '' | translate\"\n >\n <mat-icon>{{ mobile ? 'arrow_drop_down' : 'keyboard_arrow_down' }}</mat-icon>\n </button>\n }\n @if (clearable) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\"\n [title]=\"clearButtonTitle || '' | translate\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #matErrorTemplate>\n <ng-content select=\"mat-error,[matError]\"></ng-content>\n</ng-template>\n\n<ng-template #matHintTemplate>\n <div class=\"mat-mdc-form-field-hint-wrapper\">\n <ng-content select=\"mat-hint:not([align='end']),[matHint]\"></ng-content>\n <div class=\"mat-mdc-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n</ng-template>\n", styles: [":host{display:inline-block;position:relative}:host.ion-text-wrap ion-label,:host.ion-text-wrap ion-text{white-space:normal!important}:host ::ng-deep .mat-mdc-select-arrow-hidden .mat-mdc-select-arrow-wrapper{display:none;visibility:hidden}ion-grid.field-container>ion-row>ion-col.ion-no-padding{--ion-padding-start: 0}ion-row{flex-wrap:nowrap}button[hidden]{display:none}mat-autocomplete mat-option{--mat-option-text-width: 100%}ion-col.favorite-col{flex:0 0 auto;width:24px!important}mat-option .visible-hover{opacity:0;display:none;animation:fadeinout 1s linear 1 backwards}mat-option:hover .visible-hover{display:inline-block;opacity:1}\n"], dependencies: [{ kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i2$1.IonGrid, selector: "ion-grid", inputs: ["fixed"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRow, selector: "ion-row" }, { kind: "component", type: i2$1.IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocapitalize", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "maxlength", "minlength", "mode", "name", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "component", type: i2$1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: i2$1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i2$1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar,ion-range" }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgInitDirective, selector: "[ngInit]", outputs: ["ngInit"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus], input[appAutofocus]", inputs: ["appAutofocus", "autofocusDelay"] }, { kind: "component", type: i6$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i6$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6$3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i6$3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: PropertyGetPipe, name: "propertyGet" }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: NotEmptyArrayPipe, name: "isNotEmptyArray" }, { kind: "pipe", type: EmptyArrayPipe, name: "isEmptyArray" }, { kind: "pipe", type: ArrayIncludesPipe, name: "arrayIncludes" }, { kind: "pipe", type: ToStringPipe, name: "toString" }, { kind: "pipe", type: StrLengthPipe, name: "strLength" }, { kind: "pipe", type: AsFloatLabelTypePipe, name: "asFloatLabelType" }, { kind: "pipe", type: i19.RxPush, name: "push" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10006
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MatAutocompleteField, selector: "mat-autocomplete-field", inputs: { equals: "equals", logPrefix: "logPrefix", formControl: "formControl", formControlName: "formControlName", floatLabel: "floatLabel", label: "label", appearance: "appearance", subscriptSizing: "subscriptSizing", placeholder: "placeholder", suggestFn: "suggestFn", required: ["required", "required", booleanAttribute], hideRequiredMarker: ["hideRequiredMarker", "hideRequiredMarker", booleanAttribute], mobile: ["mobile", "mobile", booleanAttribute], clearable: ["clearable", "clearable", booleanAttribute], debounceTime: ["debounceTime", "debounceTime", numberAttribute], displaySeparator: "displaySeparator", displayWith: "displayWith", displayAttributes: "displayAttributes", displayColumnSizes: "displayColumnSizes", displayColumnNames: "displayColumnNames", highlightAccent: ["highlightAccent", "highlightAccent", booleanAttribute], showAllOnFocus: ["showAllOnFocus", "showAllOnFocus", booleanAttribute], showPanelOnFocus: ["showPanelOnFocus", "showPanelOnFocus", booleanAttribute], reloadItemsOnFocus: ["reloadItemsOnFocus", "reloadItemsOnFocus", booleanAttribute], clearInvalidValueOnBlur: ["clearInvalidValueOnBlur", "clearInvalidValueOnBlur", booleanAttribute], autofocus: ["autofocus", "autofocus", booleanAttribute], config: "config", i18nPrefix: "i18nPrefix", noResultMessage: "noResultMessage", panelClass: "panelClass", panelWidth: "panelWidth", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], matAutocompletePosition: "matAutocompletePosition", multiple: ["multiple", "multiple", booleanAttribute], fetchMoreThreshold: "fetchMoreThreshold", suggestLengthThreshold: ["suggestLengthThreshold", "suggestLengthThreshold", numberAttribute], showLoadingSpinner: ["showLoadingSpinner", "showLoadingSpinner", booleanAttribute], debug: ["debug", "debug", booleanAttribute], showSearchBar: ["showSearchBar", "showSearchBar", booleanAttribute], stickySearchBar: ["stickySearchBar", "stickySearchBar", booleanAttribute], applyImplicitValue: "applyImplicitValue", dropButtonTitle: "dropButtonTitle", clearButtonTitle: "clearButtonTitle", trimSearchText: ["trimSearchText", "trimSearchText", booleanAttribute], splitSearchText: ["splitSearchText", "splitSearchText", booleanAttribute], selectInputContentOnFocus: ["selectInputContentOnFocus", "selectInputContentOnFocus", booleanAttribute], selectInputContentOnFocusDelay: ["selectInputContentOnFocusDelay", "selectInputContentOnFocusDelay", numberAttribute], previewImplicitValue: ["previewImplicitValue", "previewImplicitValue", booleanAttribute], showFavorites: "showFavorites", toggleFavoriteTitle: "toggleFavoriteTitle", favoriteItems: "favoriteItems", colSizes: "colSizes", classList: ["class", "classList"], filter: "filter", readonly: ["readonly", "readonly", booleanAttribute], tabindex: "tabindex", items: "items" }, outputs: { clicked: "click", blurred: "blur", focused: "focus", dropButtonClick: "dropButtonClick", keydownEscape: "keydown.escape", keydownBackspace: "keydown.backspace", keyupEnter: "keyup.enter", selectionChange: "selectionChange", openedChange: "openedChange", toggleFavorite: "toggleFavorite" }, providers: [DEFAULT_VALUE_ACCESSOR$4], viewQueries: [{ propertyName: "matSelect", first: true, predicate: ["matSelect"], descendants: true }, { propertyName: "ionSearchbar", first: true, predicate: ["ionSearchbar"], descendants: true }, { propertyName: "matInputText", first: true, predicate: ["matInputText"], descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], ngImport: i0, template: "<ion-grid class=\"ion-no-padding field-container\">\n <ion-row>\n <ion-col [size]=\"colSizes?.[0]\" class=\"ion-no-padding\">\n <!-- readonly -->\n @if (_readonly) {\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"subscriptSizing\"\n [title]=\"_displayValue || ''\"\n class=\"mat-form-field-disabled\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if (floatLabel !== 'never' && !!placeholder) {\n <mat-label>{{ placeholder }}</mat-label>\n }\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\" />\n <ion-text>{{ value | toString: displayWith }}</ion-text>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n <!-- hints -->\n @if (!formControl.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n } @else {\n @let hasFavorites = toggleFavorite.observed || (favoriteItems | isNotEmptyArray);\n\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"subscriptSizing\"\n [title]=\"_displayValue || ''\"\n [hideRequiredMarker]=\"hideRequiredMarker\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if ((label || placeholder) && floatLabel !== 'never') {\n <mat-label>{{ label || placeholder }}</mat-label>\n }\n <!-- Mobile or Multiple (use <mat-select>) -->\n @if (mobile || multiple) {\n <mat-select\n #matSelect\n hideSingleSelectionIndicator\n disableOptionCentering\n [disableRipple]=\"disableRipple\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"panelClass\"\n [panelWidth]=\"panelWidth || _defaultPanelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (openedChange)=\"openedChange.emit($event)\"\n [compareWith]=\"equals\"\n [multiple]=\"multiple\"\n [typeaheadDebounceInterval]=\"debounceTime * 10\"\n [required]=\"required\"\n [class.mat-mdc-select-arrow-hidden]=\"!mobile\"\n >\n <mat-select-trigger>{{ value | toString: displayWith }}</mat-select-trigger>\n <!-- Search bar -->\n @if (showSearchBar) {\n <mat-optgroup class=\"mat-select-searchbar\" [class.mat-select-searchbar-sticky]=\"stickySearchBar\">\n <!-- FIXME on iOS devices, when animated=\"true\", then the search icon overlap the placeholder -->\n <ion-searchbar\n #ionSearchbar\n inputmode=\"search\"\n autocomplete=\"off\"\n animated=\"false\"\n showClearButton=\"true\"\n [debounce]=\"debounceTime\"\n (ionClear)=\"markAsLoading()\"\n (ionInput)=\"ionSearchBarChanged($event)\"\n [placeholder]=\"'COMMON.BTN_SEARCH' | translate\"\n ></ion-searchbar>\n </mat-optgroup>\n }\n <!-- Headers -->\n <ion-row\n class=\"mat-select-header column ion-no-padding\"\n [class.multiple]=\"multiple\"\n [class.mat-select-searchbar-sticky]=\"showSearchBar && stickySearchBar\"\n [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\"\n >\n <!-- favorite spacer -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\"></ion-col>\n }\n <!-- attribute headers -->\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n\n <!-- None option -->\n @if (!required && !multiple && !clearable) {\n <mat-option 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 @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n } @else {\n <!-- Options -->\n @for (item of items; track i; let i = $index) {\n @let isFavorite = hasFavorites && (favoriteItems | arrayIncludes: item);\n\n <mat-option [value]=\"item\" class=\"ion-no-padding\" [class.mdc-list-item--favorite]=\"isFavorite\">\n <ion-row [classList]=\"item?.classList || ''\" [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\">\n <!-- favorite icon -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\">\n @if (isFavorite) {\n <ion-icon name=\"star\" color=\"tertiary\"></ion-icon>\n }\n </ion-col>\n }\n\n <!-- attribute columns -->\n @for (path of displayAttributes; track j; let j = $index) {\n <ion-col [size]=\"displayColumnSizes[j]\" class=\"ion-align-self-center ion-text-wrap\">\n <ion-label\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight: { search: ionSearchbar?.value, withAccent: highlightAccent }\n \"\n ></ion-label>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option class=\"ion-padding\" (ngInit)=\"_initMatSelectInfiniteScroll()\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((_displayValue | strLength) < suggestLengthThreshold) {\n <!-- need more character -->\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 } @else {\n <!-- loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n <!-- footer -->\n @if (itemCount; as count) {\n <mat-option class=\"mat-option-footer mat-autocomplete-footer ion-no-padding\" disabled>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </mat-option>\n }\n </mat-select>\n } @else {\n <!-- desktop (use mat-autocomplete) -->\n <input\n matInput\n #matInputText\n type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"(label || floatLabel === 'never') && 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 (keydown.backspace)=\"onBackspace($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowDown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\"\n />\n <!-- autocomplete -->\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [autoActiveFirstOption]=\"true\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayWith\"\n [class]=\"panelClass\"\n [panelWidth]=\"panelWidth\"\n [disableRipple]=\"disableRipple\"\n (optionSelected)=\"onOptionSelected($event)\"\n (opened)=\"openedChange.emit(true)\"\n (closed)=\"openedChange.emit(false)\"\n >\n <!-- Headers -->\n <ion-row\n class=\"mat-autocomplete-header column ion-no-padding\"\n [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\"\n >\n <!-- favorite spacer -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\"></ion-col>\n }\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n } @else {\n <!-- Options -->\n @for (item of items; track i; let i = $index) {\n @let isFavorite = hasFavorites && (favoriteItems | arrayIncludes: item);\n <mat-option\n [value]=\"item\"\n class=\"ion-no-padding\"\n [class.mdc-list-item--selected]=\"item === _selectedItem\"\n [class.mdc-list-item--favorite]=\"isFavorite\"\n >\n <ion-row [classList]=\"item?.classList || ''\" [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\">\n <!-- favorite icon -->\n @if (hasFavorites) {\n <ion-col\n matPrefix\n size=\"auto\"\n class=\"favorite-col\"\n (click)=\"toggleFavoriteClick($event, item)\"\n >\n @if (isFavorite) {\n <ion-icon name=\"star\" color=\"tertiary\"></ion-icon>\n } @else if (toggleFavorite.observed) {\n <ion-icon name=\"star-outline\" color=\"medium\" class=\"visible-hover\"></ion-icon>\n }\n </ion-col>\n }\n @for (path of displayAttributes; track j; let j = $index) {\n <ion-col\n [size]=\"displayColumnSizes[j]\"\n [title]=\"text.innerText\"\n class=\"ion-align-self-center\"\n >\n <ion-text>\n <span\n #text\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight\n : {\n search: matInputText.value,\n withAccent: highlightAccent,\n }\n \"\n ></span>\n </ion-text>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option class=\"ion-padding\" (ngInit)=\"_initAutocompleteInfiniteScroll()\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((_displayValue | strLength) < suggestLengthThreshold) {\n <!-- Need more characters -->\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 } @else {\n <!-- Loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n\n <!-- footer -->\n @if (itemCount; as count) {\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </ion-col>\n </ion-row>\n }\n </mat-autocomplete>\n }\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n @if (formControl?.hasError('required')) {\n <mat-error translate>ERROR.FIELD_REQUIRED</mat-error>\n }\n @if (formControl?.hasError('entity')) {\n <mat-error translate>ERROR.FIELD_INVALID</mat-error>\n }\n <ng-container *ngTemplateOutlet=\"matErrorTemplate\"></ng-container>\n <!-- Hints -->\n @if (!formControl?.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n }\n </ion-col>\n <ion-col [size]=\"colSizes?.[1]\" class=\"ion-no-padding\">\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<ng-template #matSuffixTemplate>\n @if (!mobile) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"toggleShowPanel($event)\"\n [hidden]=\"disabled\"\n [title]=\"dropButtonTitle || '' | translate\"\n >\n <mat-icon>{{ mobile ? 'arrow_drop_down' : 'keyboard_arrow_down' }}</mat-icon>\n </button>\n }\n @if (clearable) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\"\n [title]=\"clearButtonTitle || '' | translate\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #matErrorTemplate>\n <ng-content select=\"mat-error,[matError]\"></ng-content>\n</ng-template>\n\n<ng-template #matHintTemplate>\n <div class=\"mat-mdc-form-field-hint-wrapper\">\n <ng-content select=\"mat-hint:not([align='end']),[matHint]\"></ng-content>\n <div class=\"mat-mdc-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n</ng-template>\n", styles: [":host{display:inline-block;position:relative}:host.ion-text-wrap ion-label,:host.ion-text-wrap ion-text{white-space:normal!important}:host ::ng-deep .mat-mdc-select-arrow-hidden .mat-mdc-select-arrow-wrapper{display:none;visibility:hidden}ion-grid.field-container>ion-row>ion-col.ion-no-padding{--ion-padding-start: 0}ion-row{flex-wrap:nowrap}button[hidden]{display:none}mat-autocomplete mat-option{--mat-option-text-width: 100%}ion-col.favorite-col{flex:0 0 auto;width:24px!important}mat-option .visible-hover{opacity:0;display:none;animation:fadeinout 1s linear 1 backwards}mat-option:hover .visible-hover{display:inline-block;opacity:1}\n"], dependencies: [{ kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i2$1.IonGrid, selector: "ion-grid", inputs: ["fixed"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRow, selector: "ion-row" }, { kind: "component", type: i2$1.IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocapitalize", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "maxlength", "minlength", "mode", "name", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "component", type: i2$1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: i2$1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i2$1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar,ion-range" }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgInitDirective, selector: "[ngInit]", outputs: ["ngInit"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus], input[appAutofocus]", inputs: ["appAutofocus", "autofocusDelay"] }, { kind: "component", type: i6$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i6$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6$3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i6$3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: PropertyGetPipe, name: "propertyGet" }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: NotEmptyArrayPipe, name: "isNotEmptyArray" }, { kind: "pipe", type: EmptyArrayPipe, name: "isEmptyArray" }, { kind: "pipe", type: ArrayIncludesPipe, name: "arrayIncludes" }, { kind: "pipe", type: ToStringPipe, name: "toString" }, { kind: "pipe", type: StrLengthPipe, name: "strLength" }, { kind: "pipe", type: AsFloatLabelTypePipe, name: "asFloatLabelType" }, { kind: "pipe", type: i19.RxPush, name: "push" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9968
10007
|
}
|
|
9969
10008
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatAutocompleteField, decorators: [{
|
|
9970
10009
|
type: Component,
|
|
9971
|
-
args: [{ selector: 'mat-autocomplete-field', providers: [DEFAULT_VALUE_ACCESSOR$4], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-grid class=\"ion-no-padding field-container\">\n <ion-row>\n <ion-col [size]=\"colSizes?.[0]\" class=\"ion-no-padding\">\n <!-- readonly -->\n @if (_readonly) {\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"subscriptSizing\"\n [title]=\"_displayValue || ''\"\n class=\"mat-form-field-disabled\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if (floatLabel !== 'never' && !!placeholder) {\n <mat-label>{{ placeholder }}</mat-label>\n }\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\" />\n <ion-text>{{ value | toString: displayWith }}</ion-text>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n <!-- hints -->\n @if (!formControl.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n } @else {\n @let hasFavorites = toggleFavorite.observed || (favoriteItems | isNotEmptyArray);\n\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"subscriptSizing\"\n [title]=\"_displayValue || ''\"\n [hideRequiredMarker]=\"hideRequiredMarker\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if ((label || placeholder) && floatLabel !== 'never') {\n <mat-label>{{ label || placeholder }}</mat-label>\n }\n <!-- Mobile or Multiple (use <mat-select>) -->\n @if (mobile || multiple) {\n <mat-select\n #matSelect\n hideSingleSelectionIndicator\n disableOptionCentering\n [disableRipple]=\"disableRipple\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"panelClass\"\n [panelWidth]=\"panelWidth || _defaultPanelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (openedChange)=\"openedChange.emit($event)\"\n [compareWith]=\"equals\"\n [multiple]=\"multiple\"\n [typeaheadDebounceInterval]=\"debounceTime * 10\"\n [required]=\"required\"\n [class.mat-mdc-select-arrow-hidden]=\"!mobile\"\n >\n <mat-select-trigger>{{ value | toString: displayWith }}</mat-select-trigger>\n <!-- Search bar -->\n @if (showSearchBar) {\n <mat-optgroup class=\"mat-select-searchbar\" [class.mat-select-searchbar-sticky]=\"stickySearchBar\">\n <!-- FIXME on iOS devices, when animated=\"true\", then the search icon overlap the placeholder -->\n <ion-searchbar\n #ionSearchbar\n inputmode=\"search\"\n autocomplete=\"off\"\n animated=\"false\"\n showClearButton=\"true\"\n [debounce]=\"debounceTime\"\n (ionClear)=\"markAsLoading()\"\n (ionInput)=\"ionSearchBarChanged($event)\"\n [placeholder]=\"'COMMON.BTN_SEARCH' | translate\"\n ></ion-searchbar>\n </mat-optgroup>\n }\n <!-- Headers -->\n <ion-row\n class=\"mat-select-header column ion-no-padding\"\n [class.multiple]=\"multiple\"\n [class.mat-select-searchbar-sticky]=\"showSearchBar && stickySearchBar\"\n [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\"\n >\n <!-- favorite spacer -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\"></ion-col>\n }\n <!-- attribute headers -->\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n\n <!-- None option -->\n @if (!required && !multiple && !clearable) {\n <mat-option 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 @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n } @else {\n <!-- Options -->\n @for (item of items; track i; let i = $index) {\n @let isFavorite = hasFavorites && (favoriteItems | arrayIncludes: item);\n\n <mat-option [value]=\"item\" class=\"ion-no-padding\" [class.mdc-list-item--favorite]=\"isFavorite\">\n <ion-row [classList]=\"item.classList || ''\" [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\">\n <!-- favorite icon -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\">\n @if (isFavorite) {\n <ion-icon name=\"star\" color=\"tertiary\"></ion-icon>\n }\n </ion-col>\n }\n\n <!-- attribute columns -->\n @for (path of displayAttributes; track j; let j = $index) {\n <ion-col [size]=\"displayColumnSizes[j]\" class=\"ion-align-self-center ion-text-wrap\">\n <ion-label\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight: { search: ionSearchbar?.value, withAccent: highlightAccent }\n \"\n ></ion-label>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option class=\"ion-padding\" (ngInit)=\"_initMatSelectInfiniteScroll()\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((_displayValue | strLength) < suggestLengthThreshold) {\n <!-- need more character -->\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 } @else {\n <!-- loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n <!-- footer -->\n @if (itemCount; as count) {\n <mat-option class=\"mat-option-footer mat-autocomplete-footer ion-no-padding\" disabled>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </mat-option>\n }\n </mat-select>\n } @else {\n <!-- desktop (use mat-autocomplete) -->\n <input\n matInput\n #matInputText\n type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"(label || floatLabel === 'never') && 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 (keydown.backspace)=\"onBackspace($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowDown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\"\n />\n <!-- autocomplete -->\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [autoActiveFirstOption]=\"true\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayWith\"\n [class]=\"panelClass\"\n [panelWidth]=\"panelWidth\"\n [disableRipple]=\"disableRipple\"\n (optionSelected)=\"onOptionSelected($event)\"\n (opened)=\"openedChange.emit(true)\"\n (closed)=\"openedChange.emit(false)\"\n >\n <!-- Headers -->\n <ion-row\n class=\"mat-autocomplete-header column ion-no-padding\"\n [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\"\n >\n <!-- favorite spacer -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\"></ion-col>\n }\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n } @else {\n <!-- Options -->\n @for (item of items; track i; let i = $index) {\n @let isFavorite = hasFavorites && (favoriteItems | arrayIncludes: item);\n <mat-option\n [value]=\"item\"\n class=\"ion-no-padding\"\n [class.mdc-list-item--selected]=\"item === _selectedItem\"\n [class.mdc-list-item--favorite]=\"isFavorite\"\n >\n <ion-row [classList]=\"item.classList || ''\" [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\">\n <!-- favorite icon -->\n @if (hasFavorites) {\n <ion-col\n matPrefix\n size=\"auto\"\n class=\"favorite-col\"\n (click)=\"toggleFavoriteClick($event, item)\"\n >\n @if (isFavorite) {\n <ion-icon name=\"star\" color=\"tertiary\"></ion-icon>\n } @else if (toggleFavorite.observed) {\n <ion-icon name=\"star-outline\" color=\"medium\" class=\"visible-hover\"></ion-icon>\n }\n </ion-col>\n }\n @for (path of displayAttributes; track j; let j = $index) {\n <ion-col\n [size]=\"displayColumnSizes[j]\"\n [title]=\"text.innerText\"\n class=\"ion-align-self-center\"\n >\n <ion-text>\n <span\n #text\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight\n : {\n search: matInputText.value,\n withAccent: highlightAccent,\n }\n \"\n ></span>\n </ion-text>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option class=\"ion-padding\" (ngInit)=\"_initAutocompleteInfiniteScroll()\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((_displayValue | strLength) < suggestLengthThreshold) {\n <!-- Need more characters -->\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 } @else {\n <!-- Loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n\n <!-- footer -->\n @if (itemCount; as count) {\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </ion-col>\n </ion-row>\n }\n </mat-autocomplete>\n }\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n @if (formControl?.hasError('required')) {\n <mat-error translate>ERROR.FIELD_REQUIRED</mat-error>\n }\n @if (formControl?.hasError('entity')) {\n <mat-error translate>ERROR.FIELD_INVALID</mat-error>\n }\n <ng-container *ngTemplateOutlet=\"matErrorTemplate\"></ng-container>\n <!-- Hints -->\n @if (!formControl?.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n }\n </ion-col>\n <ion-col [size]=\"colSizes?.[1]\" class=\"ion-no-padding\">\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<ng-template #matSuffixTemplate>\n @if (!mobile) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"toggleShowPanel($event)\"\n [hidden]=\"disabled\"\n [title]=\"dropButtonTitle || '' | translate\"\n >\n <mat-icon>{{ mobile ? 'arrow_drop_down' : 'keyboard_arrow_down' }}</mat-icon>\n </button>\n }\n @if (clearable) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\"\n [title]=\"clearButtonTitle || '' | translate\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #matErrorTemplate>\n <ng-content select=\"mat-error,[matError]\"></ng-content>\n</ng-template>\n\n<ng-template #matHintTemplate>\n <div class=\"mat-mdc-form-field-hint-wrapper\">\n <ng-content select=\"mat-hint:not([align='end']),[matHint]\"></ng-content>\n <div class=\"mat-mdc-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n</ng-template>\n", styles: [":host{display:inline-block;position:relative}:host.ion-text-wrap ion-label,:host.ion-text-wrap ion-text{white-space:normal!important}:host ::ng-deep .mat-mdc-select-arrow-hidden .mat-mdc-select-arrow-wrapper{display:none;visibility:hidden}ion-grid.field-container>ion-row>ion-col.ion-no-padding{--ion-padding-start: 0}ion-row{flex-wrap:nowrap}button[hidden]{display:none}mat-autocomplete mat-option{--mat-option-text-width: 100%}ion-col.favorite-col{flex:0 0 auto;width:24px!important}mat-option .visible-hover{opacity:0;display:none;animation:fadeinout 1s linear 1 backwards}mat-option:hover .visible-hover{display:inline-block;opacity:1}\n"] }]
|
|
10010
|
+
args: [{ selector: 'mat-autocomplete-field', providers: [DEFAULT_VALUE_ACCESSOR$4], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-grid class=\"ion-no-padding field-container\">\n <ion-row>\n <ion-col [size]=\"colSizes?.[0]\" class=\"ion-no-padding\">\n <!-- readonly -->\n @if (_readonly) {\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"subscriptSizing\"\n [title]=\"_displayValue || ''\"\n class=\"mat-form-field-disabled\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if (floatLabel !== 'never' && !!placeholder) {\n <mat-label>{{ placeholder }}</mat-label>\n }\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\" />\n <ion-text>{{ value | toString: displayWith }}</ion-text>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n <!-- hints -->\n @if (!formControl.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n } @else {\n @let hasFavorites = toggleFavorite.observed || (favoriteItems | isNotEmptyArray);\n\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"subscriptSizing\"\n [title]=\"_displayValue || ''\"\n [hideRequiredMarker]=\"hideRequiredMarker\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if ((label || placeholder) && floatLabel !== 'never') {\n <mat-label>{{ label || placeholder }}</mat-label>\n }\n <!-- Mobile or Multiple (use <mat-select>) -->\n @if (mobile || multiple) {\n <mat-select\n #matSelect\n hideSingleSelectionIndicator\n disableOptionCentering\n [disableRipple]=\"disableRipple\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"panelClass\"\n [panelWidth]=\"panelWidth || _defaultPanelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (openedChange)=\"openedChange.emit($event)\"\n [compareWith]=\"equals\"\n [multiple]=\"multiple\"\n [typeaheadDebounceInterval]=\"debounceTime * 10\"\n [required]=\"required\"\n [class.mat-mdc-select-arrow-hidden]=\"!mobile\"\n >\n <mat-select-trigger>{{ value | toString: displayWith }}</mat-select-trigger>\n <!-- Search bar -->\n @if (showSearchBar) {\n <mat-optgroup class=\"mat-select-searchbar\" [class.mat-select-searchbar-sticky]=\"stickySearchBar\">\n <!-- FIXME on iOS devices, when animated=\"true\", then the search icon overlap the placeholder -->\n <ion-searchbar\n #ionSearchbar\n inputmode=\"search\"\n autocomplete=\"off\"\n animated=\"false\"\n showClearButton=\"true\"\n [debounce]=\"debounceTime\"\n (ionClear)=\"markAsLoading()\"\n (ionInput)=\"ionSearchBarChanged($event)\"\n [placeholder]=\"'COMMON.BTN_SEARCH' | translate\"\n ></ion-searchbar>\n </mat-optgroup>\n }\n <!-- Headers -->\n <ion-row\n class=\"mat-select-header column ion-no-padding\"\n [class.multiple]=\"multiple\"\n [class.mat-select-searchbar-sticky]=\"showSearchBar && stickySearchBar\"\n [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\"\n >\n <!-- favorite spacer -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\"></ion-col>\n }\n <!-- attribute headers -->\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n\n <!-- None option -->\n @if (!required && !multiple && !clearable) {\n <mat-option 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 @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n } @else {\n <!-- Options -->\n @for (item of items; track i; let i = $index) {\n @let isFavorite = hasFavorites && (favoriteItems | arrayIncludes: item);\n\n <mat-option [value]=\"item\" class=\"ion-no-padding\" [class.mdc-list-item--favorite]=\"isFavorite\">\n <ion-row [classList]=\"item?.classList || ''\" [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\">\n <!-- favorite icon -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\">\n @if (isFavorite) {\n <ion-icon name=\"star\" color=\"tertiary\"></ion-icon>\n }\n </ion-col>\n }\n\n <!-- attribute columns -->\n @for (path of displayAttributes; track j; let j = $index) {\n <ion-col [size]=\"displayColumnSizes[j]\" class=\"ion-align-self-center ion-text-wrap\">\n <ion-label\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight: { search: ionSearchbar?.value, withAccent: highlightAccent }\n \"\n ></ion-label>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option class=\"ion-padding\" (ngInit)=\"_initMatSelectInfiniteScroll()\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((_displayValue | strLength) < suggestLengthThreshold) {\n <!-- need more character -->\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 } @else {\n <!-- loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n <!-- footer -->\n @if (itemCount; as count) {\n <mat-option class=\"mat-option-footer mat-autocomplete-footer ion-no-padding\" disabled>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </mat-option>\n }\n </mat-select>\n } @else {\n <!-- desktop (use mat-autocomplete) -->\n <input\n matInput\n #matInputText\n type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"(label || floatLabel === 'never') && 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 (keydown.backspace)=\"onBackspace($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowDown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\"\n />\n <!-- autocomplete -->\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [autoActiveFirstOption]=\"true\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayWith\"\n [class]=\"panelClass\"\n [panelWidth]=\"panelWidth\"\n [disableRipple]=\"disableRipple\"\n (optionSelected)=\"onOptionSelected($event)\"\n (opened)=\"openedChange.emit(true)\"\n (closed)=\"openedChange.emit(false)\"\n >\n <!-- Headers -->\n <ion-row\n class=\"mat-autocomplete-header column ion-no-padding\"\n [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\"\n >\n <!-- favorite spacer -->\n @if (hasFavorites) {\n <ion-col size=\"auto\" class=\"favorite-col\"></ion-col>\n }\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n } @else {\n <!-- Options -->\n @for (item of items; track i; let i = $index) {\n @let isFavorite = hasFavorites && (favoriteItems | arrayIncludes: item);\n <mat-option\n [value]=\"item\"\n class=\"ion-no-padding\"\n [class.mdc-list-item--selected]=\"item === _selectedItem\"\n [class.mdc-list-item--favorite]=\"isFavorite\"\n >\n <ion-row [classList]=\"item?.classList || ''\" [style.--ion-grid-columns]=\"hasFavorites ? 13 : 12\">\n <!-- favorite icon -->\n @if (hasFavorites) {\n <ion-col\n matPrefix\n size=\"auto\"\n class=\"favorite-col\"\n (click)=\"toggleFavoriteClick($event, item)\"\n >\n @if (isFavorite) {\n <ion-icon name=\"star\" color=\"tertiary\"></ion-icon>\n } @else if (toggleFavorite.observed) {\n <ion-icon name=\"star-outline\" color=\"medium\" class=\"visible-hover\"></ion-icon>\n }\n </ion-col>\n }\n @for (path of displayAttributes; track j; let j = $index) {\n <ion-col\n [size]=\"displayColumnSizes[j]\"\n [title]=\"text.innerText\"\n class=\"ion-align-self-center\"\n >\n <ion-text>\n <span\n #text\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight\n : {\n search: matInputText.value,\n withAccent: highlightAccent,\n }\n \"\n ></span>\n </ion-text>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option class=\"ion-padding\" (ngInit)=\"_initAutocompleteInfiniteScroll()\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((_displayValue | strLength) < suggestLengthThreshold) {\n <!-- Need more characters -->\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 } @else {\n <!-- Loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n\n <!-- footer -->\n @if (itemCount; as count) {\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </ion-col>\n </ion-row>\n }\n </mat-autocomplete>\n }\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n @if (formControl?.hasError('required')) {\n <mat-error translate>ERROR.FIELD_REQUIRED</mat-error>\n }\n @if (formControl?.hasError('entity')) {\n <mat-error translate>ERROR.FIELD_INVALID</mat-error>\n }\n <ng-container *ngTemplateOutlet=\"matErrorTemplate\"></ng-container>\n <!-- Hints -->\n @if (!formControl?.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n }\n </ion-col>\n <ion-col [size]=\"colSizes?.[1]\" class=\"ion-no-padding\">\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<ng-template #matSuffixTemplate>\n @if (!mobile) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"toggleShowPanel($event)\"\n [hidden]=\"disabled\"\n [title]=\"dropButtonTitle || '' | translate\"\n >\n <mat-icon>{{ mobile ? 'arrow_drop_down' : 'keyboard_arrow_down' }}</mat-icon>\n </button>\n }\n @if (clearable) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\"\n [title]=\"clearButtonTitle || '' | translate\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #matErrorTemplate>\n <ng-content select=\"mat-error,[matError]\"></ng-content>\n</ng-template>\n\n<ng-template #matHintTemplate>\n <div class=\"mat-mdc-form-field-hint-wrapper\">\n <ng-content select=\"mat-hint:not([align='end']),[matHint]\"></ng-content>\n <div class=\"mat-mdc-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n</ng-template>\n", styles: [":host{display:inline-block;position:relative}:host.ion-text-wrap ion-label,:host.ion-text-wrap ion-text{white-space:normal!important}:host ::ng-deep .mat-mdc-select-arrow-hidden .mat-mdc-select-arrow-wrapper{display:none;visibility:hidden}ion-grid.field-container>ion-row>ion-col.ion-no-padding{--ion-padding-start: 0}ion-row{flex-wrap:nowrap}button[hidden]{display:none}mat-autocomplete mat-option{--mat-option-text-width: 100%}ion-col.favorite-col{flex:0 0 auto;width:24px!important}mat-option .visible-hover{opacity:0;display:none;animation:fadeinout 1s linear 1 backwards}mat-option:hover .visible-hover{display:inline-block;opacity:1}\n"] }]
|
|
9972
10011
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i2$1.ModalController }, { type: i0.Renderer2 }, { type: i1$3.FormGroupDirective, decorators: [{
|
|
9973
10012
|
type: Optional
|
|
9974
10013
|
}] }], propDecorators: { equals: [{
|
|
@@ -13007,7 +13046,7 @@ class MatChipsField {
|
|
|
13007
13046
|
multi: true,
|
|
13008
13047
|
useExisting: forwardRef(() => MatChipsField),
|
|
13009
13048
|
},
|
|
13010
|
-
], viewQueries: [{ propertyName: "matInputText", first: true, predicate: ["matInputText"], descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], ngImport: i0, template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col [size]=\"colSizes?.[0]\" class=\"ion-no-padding\">\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"'dynamic'\"\n [hideRequiredMarker]=\"hideRequiredMarker\"\n [class.mat-form-field-disabled]=\"formControl.disabled\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\"\n class=\"material-chips\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if (floatLabel !== 'never' && !!placeholder) {\n <mat-label>{{ placeholder }}</mat-label>\n }\n\n <mat-chip-grid\n #chipList\n (focus)=\"filterChipsFocusEvent($event)\"\n [disabled]=\"!readonly && disabled\"\n [required]=\"required\"\n [errorStateMatcher]=\"_errorStateMatcher\"\n >\n @for (item of value; track item) {\n <mat-chip-row\n class=\"ion-no-margin\"\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\"\n [color]=\"chipColor\"\n [highlighted]=\"true\"\n >\n {{ item | toString: displayWith }}\n @if (enabled) {\n <mat-icon matChipRemove>cancel</mat-icon>\n }\n </mat-chip-row>\n }\n <input\n #matInputText\n type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"_inputControl\"\n [placeholder]=\"floatLabel === 'never' ? placeholder : null\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [readonly]=\"readonly\"\n [hidden]=\"disabled\"\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 [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n />\n </mat-chip-grid>\n\n <!-- autocomplete -->\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [autoActiveFirstOption]=\"true\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayWith\"\n [class]=\"panelClass\"\n [panelWidth]=\"panelWidth\"\n [disableRipple]=\"disableRipple\"\n (optionSelected)=\"add($event.option.value)\"\n >\n <!-- Headers -->\n <ion-row class=\"mat-autocomplete-header column ion-no-padding\">\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n\n @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n }\n\n <!-- Options -->\n @for (item of items; track $index) {\n <mat-option [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList || ''\">\n @for (path of displayAttributes; track path; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\" [title]=\"text.innerText\" class=\"ion-align-self-center\">\n <ion-text>\n <span\n #text\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight: { search: matInputText.value, withAccent: highlightAccent }\n \"\n ></span>\n </ion-text>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option (ngInit)=\"_initAutocompleteInfiniteScroll()\" class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((matInputText.value | strLength) < suggestLengthThreshold) {\n <!-- Need more characters -->\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 } @else {\n <!-- Loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n\n <!-- footer -->\n @if (itemCount; as count) {\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </ion-col>\n </ion-row>\n }\n </mat-autocomplete>\n\n <div matSuffix class=\"mat-form-field-suffix-bottom\">\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <!-- Hints -->\n @if (!formControl?.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n\n <!-- Do the same as MatFormField since angular 15 (see component source)-->\n <div\n class=\"mat-mdc-form-field-subscript-wrapper\"\n [class.mat-mdc-form-field-bottom-align]=\"subscriptSizing === 'fixed'\"\n [class.mat-mdc-form-field-subscript-dynamic-size]=\"subscriptSizing === 'dynamic'\"\n >\n @if (formControl.touched && formControl.errors; as errors) {\n <!-- errors -->\n <div class=\"mat-mdc-form-field-error-wrapper\">\n @if (errors | mapKeys | arrayFirst; as errorKey) {\n @switch (errorKey) {\n @case ('required') {\n <mat-error translate>ERROR.FIELD_REQUIRED</mat-error>\n }\n @case ('entity') {\n <mat-error translate>ERROR.FIELD_INVALID</mat-error>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"matErrorTemplate\"></ng-container>\n }\n }\n }\n </div>\n }\n </div>\n </ion-col>\n <ion-col [size]=\"colSizes?.[1]\" class=\"ion-no-padding\">\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<ng-template #matSuffixTemplate>\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"toggleShowPanel($event)\"\n [class.hidden]=\"disabled\"\n [title]=\"dropButtonTitle || '' | translate\"\n >\n <mat-icon>{{ mobile ? 'arrow_drop_down' : 'keyboard_arrow_down' }}</mat-icon>\n </button>\n @if (clearable) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearValue($event)\"\n [class.hidden]=\"disabled || !formControl.value\"\n [title]=\"clearButtonTitle || '' | translate\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #matErrorTemplate>\n <ng-content select=\"mat-error,[matError]\"></ng-content>\n</ng-template>\n\n<ng-template #matHintTemplate>\n <div class=\"mat-mdc-form-field-hint-wrapper\">\n <ng-content select=\"mat-hint:not([align='end']),[matHint]\"></ng-content>\n <div class=\"mat-mdc-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n</ng-template>\n", styles: [":host{width:100%;display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button.hidden{display:none;visibility:hidden}.mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 23px;margin:1px 0 0 8px!important;min-height:calc(31px - .5em)}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action{padding:0 2px}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action{padding-right:4px;padding-left:4px}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action mat-icon{color:inherit}.mat-mdc-chip.mat-mdc-standard-chip.mat-primary{background-color:var(--ion-color-primary);color:var(--ion-color-primary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-secondary{background-color:var(--ion-color-secondary);color:var(--ion-color-secondary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-tertiary{background-color:var(--ion-color-tertiary);color:var(--ion-color-tertiary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-accent{background-color:var(--ion-color-accent);color:var(--ion-color-accent-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-warning{background-color:var(--ion-color-warning);color:var(--ion-color-warning-contrast)}mat-form-field.mat-form-field-invalid ::ng-deep .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}mat-form-field.mat-form-field-invalid ::ng-deep .mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}\n"], dependencies: [{ kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i2$1.IonGrid, selector: "ion-grid", inputs: ["fixed"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRow, selector: "ion-row" }, { kind: "component", type: i2$1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: i2$1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgInitDirective, selector: "[ngInit]", outputs: ["ngInit"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus], input[appAutofocus]", inputs: ["appAutofocus", "autofocusDelay"] }, { kind: "component", type: i6$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i11$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i11$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i11$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i11$2.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: PropertyGetPipe, name: "propertyGet" }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: EmptyArrayPipe, name: "isEmptyArray" }, { kind: "pipe", type: ArrayFirstPipe, name: "arrayFirst" }, { kind: "pipe", type: MapKeysPipe, name: "mapKeys" }, { kind: "pipe", type: ToStringPipe, name: "toString" }, { kind: "pipe", type: StrLengthPipe, name: "strLength" }, { kind: "pipe", type: AsFloatLabelTypePipe, name: "asFloatLabelType" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: i19.RxPush, name: "push" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13049
|
+
], viewQueries: [{ propertyName: "matInputText", first: true, predicate: ["matInputText"], descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], ngImport: i0, template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col [size]=\"colSizes?.[0]\" class=\"ion-no-padding\">\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"'dynamic'\"\n [hideRequiredMarker]=\"hideRequiredMarker\"\n [class.mat-form-field-disabled]=\"formControl.disabled\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\"\n class=\"material-chips\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if (floatLabel !== 'never' && !!placeholder) {\n <mat-label>{{ placeholder }}</mat-label>\n }\n\n <mat-chip-grid\n #chipList\n (focus)=\"filterChipsFocusEvent($event)\"\n [disabled]=\"!readonly && disabled\"\n [required]=\"required\"\n [errorStateMatcher]=\"_errorStateMatcher\"\n >\n @for (item of value; track item) {\n <mat-chip-row\n class=\"ion-no-margin\"\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\"\n [color]=\"chipColor\"\n [highlighted]=\"true\"\n >\n {{ item | toString: displayWith }}\n @if (enabled) {\n <mat-icon matChipRemove>cancel</mat-icon>\n }\n </mat-chip-row>\n }\n <input\n #matInputText\n type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"_inputControl\"\n [placeholder]=\"floatLabel === 'never' ? placeholder : null\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [readonly]=\"readonly\"\n [hidden]=\"disabled\"\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 [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n />\n </mat-chip-grid>\n\n <!-- autocomplete -->\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [autoActiveFirstOption]=\"true\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayWith\"\n [class]=\"panelClass\"\n [panelWidth]=\"panelWidth\"\n [disableRipple]=\"disableRipple\"\n (optionSelected)=\"add($event.option.value)\"\n >\n <!-- Headers -->\n <ion-row class=\"mat-autocomplete-header column ion-no-padding\">\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n\n @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n }\n\n <!-- Options -->\n @for (item of items; track $index) {\n <mat-option [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item?.classList || ''\">\n @for (path of displayAttributes; track path; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\" [title]=\"text.innerText\" class=\"ion-align-self-center\">\n <ion-text>\n <span\n #text\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight: { search: matInputText.value, withAccent: highlightAccent }\n \"\n ></span>\n </ion-text>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option (ngInit)=\"_initAutocompleteInfiniteScroll()\" class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((matInputText.value | strLength) < suggestLengthThreshold) {\n <!-- Need more characters -->\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 } @else {\n <!-- Loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n\n <!-- footer -->\n @if (itemCount; as count) {\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </ion-col>\n </ion-row>\n }\n </mat-autocomplete>\n\n <div matSuffix class=\"mat-form-field-suffix-bottom\">\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <!-- Hints -->\n @if (!formControl?.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n\n <!-- Do the same as MatFormField since angular 15 (see component source)-->\n <div\n class=\"mat-mdc-form-field-subscript-wrapper\"\n [class.mat-mdc-form-field-bottom-align]=\"subscriptSizing === 'fixed'\"\n [class.mat-mdc-form-field-subscript-dynamic-size]=\"subscriptSizing === 'dynamic'\"\n >\n @if (formControl.touched && formControl.errors; as errors) {\n <!-- errors -->\n <div class=\"mat-mdc-form-field-error-wrapper\">\n @if (errors | mapKeys | arrayFirst; as errorKey) {\n @switch (errorKey) {\n @case ('required') {\n <mat-error translate>ERROR.FIELD_REQUIRED</mat-error>\n }\n @case ('entity') {\n <mat-error translate>ERROR.FIELD_INVALID</mat-error>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"matErrorTemplate\"></ng-container>\n }\n }\n }\n </div>\n }\n </div>\n </ion-col>\n <ion-col [size]=\"colSizes?.[1]\" class=\"ion-no-padding\">\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<ng-template #matSuffixTemplate>\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"toggleShowPanel($event)\"\n [class.hidden]=\"disabled\"\n [title]=\"dropButtonTitle || '' | translate\"\n >\n <mat-icon>{{ mobile ? 'arrow_drop_down' : 'keyboard_arrow_down' }}</mat-icon>\n </button>\n @if (clearable) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearValue($event)\"\n [class.hidden]=\"disabled || !formControl.value\"\n [title]=\"clearButtonTitle || '' | translate\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #matErrorTemplate>\n <ng-content select=\"mat-error,[matError]\"></ng-content>\n</ng-template>\n\n<ng-template #matHintTemplate>\n <div class=\"mat-mdc-form-field-hint-wrapper\">\n <ng-content select=\"mat-hint:not([align='end']),[matHint]\"></ng-content>\n <div class=\"mat-mdc-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n</ng-template>\n", styles: [":host{width:100%;display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button.hidden{display:none;visibility:hidden}.mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 23px;margin:1px 0 0 8px!important;min-height:calc(31px - .5em)}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action{padding:0 2px}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action{padding-right:4px;padding-left:4px}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action mat-icon{color:inherit}.mat-mdc-chip.mat-mdc-standard-chip.mat-primary{background-color:var(--ion-color-primary);color:var(--ion-color-primary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-secondary{background-color:var(--ion-color-secondary);color:var(--ion-color-secondary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-tertiary{background-color:var(--ion-color-tertiary);color:var(--ion-color-tertiary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-accent{background-color:var(--ion-color-accent);color:var(--ion-color-accent-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-warning{background-color:var(--ion-color-warning);color:var(--ion-color-warning-contrast)}mat-form-field.mat-form-field-invalid ::ng-deep .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}mat-form-field.mat-form-field-invalid ::ng-deep .mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}\n"], dependencies: [{ kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i2$1.IonGrid, selector: "ion-grid", inputs: ["fixed"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRow, selector: "ion-row" }, { kind: "component", type: i2$1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: i2$1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgInitDirective, selector: "[ngInit]", outputs: ["ngInit"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus], input[appAutofocus]", inputs: ["appAutofocus", "autofocusDelay"] }, { kind: "component", type: i6$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i11$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i11$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i11$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i11$2.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: PropertyGetPipe, name: "propertyGet" }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: EmptyArrayPipe, name: "isEmptyArray" }, { kind: "pipe", type: ArrayFirstPipe, name: "arrayFirst" }, { kind: "pipe", type: MapKeysPipe, name: "mapKeys" }, { kind: "pipe", type: ToStringPipe, name: "toString" }, { kind: "pipe", type: StrLengthPipe, name: "strLength" }, { kind: "pipe", type: AsFloatLabelTypePipe, name: "asFloatLabelType" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: i19.RxPush, name: "push" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13011
13050
|
}
|
|
13012
13051
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MatChipsField, decorators: [{
|
|
13013
13052
|
type: Component,
|
|
@@ -13017,7 +13056,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
13017
13056
|
multi: true,
|
|
13018
13057
|
useExisting: forwardRef(() => MatChipsField),
|
|
13019
13058
|
},
|
|
13020
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col [size]=\"colSizes?.[0]\" class=\"ion-no-padding\">\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"'dynamic'\"\n [hideRequiredMarker]=\"hideRequiredMarker\"\n [class.mat-form-field-disabled]=\"formControl.disabled\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\"\n class=\"material-chips\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if (floatLabel !== 'never' && !!placeholder) {\n <mat-label>{{ placeholder }}</mat-label>\n }\n\n <mat-chip-grid\n #chipList\n (focus)=\"filterChipsFocusEvent($event)\"\n [disabled]=\"!readonly && disabled\"\n [required]=\"required\"\n [errorStateMatcher]=\"_errorStateMatcher\"\n >\n @for (item of value; track item) {\n <mat-chip-row\n class=\"ion-no-margin\"\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\"\n [color]=\"chipColor\"\n [highlighted]=\"true\"\n >\n {{ item | toString: displayWith }}\n @if (enabled) {\n <mat-icon matChipRemove>cancel</mat-icon>\n }\n </mat-chip-row>\n }\n <input\n #matInputText\n type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"_inputControl\"\n [placeholder]=\"floatLabel === 'never' ? placeholder : null\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [readonly]=\"readonly\"\n [hidden]=\"disabled\"\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 [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n />\n </mat-chip-grid>\n\n <!-- autocomplete -->\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [autoActiveFirstOption]=\"true\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayWith\"\n [class]=\"panelClass\"\n [panelWidth]=\"panelWidth\"\n [disableRipple]=\"disableRipple\"\n (optionSelected)=\"add($event.option.value)\"\n >\n <!-- Headers -->\n <ion-row class=\"mat-autocomplete-header column ion-no-padding\">\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n\n @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n }\n\n <!-- Options -->\n @for (item of items; track $index) {\n <mat-option [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList || ''\">\n @for (path of displayAttributes; track path; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\" [title]=\"text.innerText\" class=\"ion-align-self-center\">\n <ion-text>\n <span\n #text\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight: { search: matInputText.value, withAccent: highlightAccent }\n \"\n ></span>\n </ion-text>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option (ngInit)=\"_initAutocompleteInfiniteScroll()\" class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((matInputText.value | strLength) < suggestLengthThreshold) {\n <!-- Need more characters -->\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 } @else {\n <!-- Loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n\n <!-- footer -->\n @if (itemCount; as count) {\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </ion-col>\n </ion-row>\n }\n </mat-autocomplete>\n\n <div matSuffix class=\"mat-form-field-suffix-bottom\">\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <!-- Hints -->\n @if (!formControl?.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n\n <!-- Do the same as MatFormField since angular 15 (see component source)-->\n <div\n class=\"mat-mdc-form-field-subscript-wrapper\"\n [class.mat-mdc-form-field-bottom-align]=\"subscriptSizing === 'fixed'\"\n [class.mat-mdc-form-field-subscript-dynamic-size]=\"subscriptSizing === 'dynamic'\"\n >\n @if (formControl.touched && formControl.errors; as errors) {\n <!-- errors -->\n <div class=\"mat-mdc-form-field-error-wrapper\">\n @if (errors | mapKeys | arrayFirst; as errorKey) {\n @switch (errorKey) {\n @case ('required') {\n <mat-error translate>ERROR.FIELD_REQUIRED</mat-error>\n }\n @case ('entity') {\n <mat-error translate>ERROR.FIELD_INVALID</mat-error>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"matErrorTemplate\"></ng-container>\n }\n }\n }\n </div>\n }\n </div>\n </ion-col>\n <ion-col [size]=\"colSizes?.[1]\" class=\"ion-no-padding\">\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<ng-template #matSuffixTemplate>\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"toggleShowPanel($event)\"\n [class.hidden]=\"disabled\"\n [title]=\"dropButtonTitle || '' | translate\"\n >\n <mat-icon>{{ mobile ? 'arrow_drop_down' : 'keyboard_arrow_down' }}</mat-icon>\n </button>\n @if (clearable) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearValue($event)\"\n [class.hidden]=\"disabled || !formControl.value\"\n [title]=\"clearButtonTitle || '' | translate\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #matErrorTemplate>\n <ng-content select=\"mat-error,[matError]\"></ng-content>\n</ng-template>\n\n<ng-template #matHintTemplate>\n <div class=\"mat-mdc-form-field-hint-wrapper\">\n <ng-content select=\"mat-hint:not([align='end']),[matHint]\"></ng-content>\n <div class=\"mat-mdc-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n</ng-template>\n", styles: [":host{width:100%;display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button.hidden{display:none;visibility:hidden}.mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 23px;margin:1px 0 0 8px!important;min-height:calc(31px - .5em)}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action{padding:0 2px}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action{padding-right:4px;padding-left:4px}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action mat-icon{color:inherit}.mat-mdc-chip.mat-mdc-standard-chip.mat-primary{background-color:var(--ion-color-primary);color:var(--ion-color-primary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-secondary{background-color:var(--ion-color-secondary);color:var(--ion-color-secondary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-tertiary{background-color:var(--ion-color-tertiary);color:var(--ion-color-tertiary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-accent{background-color:var(--ion-color-accent);color:var(--ion-color-accent-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-warning{background-color:var(--ion-color-warning);color:var(--ion-color-warning-contrast)}mat-form-field.mat-form-field-invalid ::ng-deep .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}mat-form-field.mat-form-field-invalid ::ng-deep .mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}\n"] }]
|
|
13059
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col [size]=\"colSizes?.[0]\" class=\"ion-no-padding\">\n <mat-form-field\n [floatLabel]=\"floatLabel | asFloatLabelType\"\n [appearance]=\"appearance\"\n [subscriptSizing]=\"'dynamic'\"\n [hideRequiredMarker]=\"hideRequiredMarker\"\n [class.mat-form-field-disabled]=\"formControl.disabled\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\"\n class=\"material-chips\"\n >\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n @if (floatLabel !== 'never' && !!placeholder) {\n <mat-label>{{ placeholder }}</mat-label>\n }\n\n <mat-chip-grid\n #chipList\n (focus)=\"filterChipsFocusEvent($event)\"\n [disabled]=\"!readonly && disabled\"\n [required]=\"required\"\n [errorStateMatcher]=\"_errorStateMatcher\"\n >\n @for (item of value; track item) {\n <mat-chip-row\n class=\"ion-no-margin\"\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\"\n [color]=\"chipColor\"\n [highlighted]=\"true\"\n >\n {{ item | toString: displayWith }}\n @if (enabled) {\n <mat-icon matChipRemove>cancel</mat-icon>\n }\n </mat-chip-row>\n }\n <input\n #matInputText\n type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"_inputControl\"\n [placeholder]=\"floatLabel === 'never' ? placeholder : null\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [readonly]=\"readonly\"\n [hidden]=\"disabled\"\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 [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n />\n </mat-chip-grid>\n\n <!-- autocomplete -->\n <mat-autocomplete\n #autocomplete=\"matAutocomplete\"\n [autoActiveFirstOption]=\"true\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayWith\"\n [class]=\"panelClass\"\n [panelWidth]=\"panelWidth\"\n [disableRipple]=\"disableRipple\"\n (optionSelected)=\"add($event.option.value)\"\n >\n <!-- Headers -->\n <ion-row class=\"mat-autocomplete-header column ion-no-padding\">\n @for (attr of displayAttributes; track attr; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n }\n </ion-row>\n\n @if (_$filteredItems | push: 'userBlocking'; as items) {\n <!-- No item option -->\n @if (items | isEmptyArray) {\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n <i>{{ noResultMessage | translate }}</i>\n </ion-label>\n </mat-option>\n }\n\n <!-- Options -->\n @for (item of items; track $index) {\n <mat-option [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item?.classList || ''\">\n @for (path of displayAttributes; track path; let i = $index) {\n <ion-col [size]=\"displayColumnSizes[i]\" [title]=\"text.innerText\" class=\"ion-align-self-center\">\n <ion-text>\n <span\n #text\n [innerHTML]=\"\n item\n | propertyGet: path\n | highlight: { search: matInputText.value, withAccent: highlightAccent }\n \"\n ></span>\n </ion-text>\n </ion-col>\n }\n </ion-row>\n </mat-option>\n }\n <!-- More item -->\n @if (_moreItemsCount) {\n <mat-option (ngInit)=\"_initAutocompleteInfiniteScroll()\" class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n } @else if ((matInputText.value | strLength) < suggestLengthThreshold) {\n <!-- Need more characters -->\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 } @else {\n <!-- Loading spinner -->\n <mat-option class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n }\n\n <!-- footer -->\n @if (itemCount; as count) {\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\">\n <i>{{ 'COMMON.RESULT_COUNT' | translate: { count: count } }}</i>\n </ion-text>\n </ion-col>\n </ion-row>\n }\n </mat-autocomplete>\n\n <div matSuffix class=\"mat-form-field-suffix-bottom\">\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <!-- Hints -->\n @if (!formControl?.invalid) {\n <mat-hint>\n <ng-container *ngTemplateOutlet=\"matHintTemplate\"></ng-container>\n </mat-hint>\n }\n </mat-form-field>\n\n <!-- Do the same as MatFormField since angular 15 (see component source)-->\n <div\n class=\"mat-mdc-form-field-subscript-wrapper\"\n [class.mat-mdc-form-field-bottom-align]=\"subscriptSizing === 'fixed'\"\n [class.mat-mdc-form-field-subscript-dynamic-size]=\"subscriptSizing === 'dynamic'\"\n >\n @if (formControl.touched && formControl.errors; as errors) {\n <!-- errors -->\n <div class=\"mat-mdc-form-field-error-wrapper\">\n @if (errors | mapKeys | arrayFirst; as errorKey) {\n @switch (errorKey) {\n @case ('required') {\n <mat-error translate>ERROR.FIELD_REQUIRED</mat-error>\n }\n @case ('entity') {\n <mat-error translate>ERROR.FIELD_INVALID</mat-error>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"matErrorTemplate\"></ng-container>\n }\n }\n }\n </div>\n }\n </div>\n </ion-col>\n <ion-col [size]=\"colSizes?.[1]\" class=\"ion-no-padding\">\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<ng-template #matSuffixTemplate>\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"toggleShowPanel($event)\"\n [class.hidden]=\"disabled\"\n [title]=\"dropButtonTitle || '' | translate\"\n >\n <mat-icon>{{ mobile ? 'arrow_drop_down' : 'keyboard_arrow_down' }}</mat-icon>\n </button>\n @if (clearable) {\n <button\n matSuffix\n mat-icon-button\n tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearValue($event)\"\n [class.hidden]=\"disabled || !formControl.value\"\n [title]=\"clearButtonTitle || '' | translate\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #matErrorTemplate>\n <ng-content select=\"mat-error,[matError]\"></ng-content>\n</ng-template>\n\n<ng-template #matHintTemplate>\n <div class=\"mat-mdc-form-field-hint-wrapper\">\n <ng-content select=\"mat-hint:not([align='end']),[matHint]\"></ng-content>\n <div class=\"mat-mdc-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n</ng-template>\n", styles: [":host{width:100%;display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button.hidden{display:none;visibility:hidden}.mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 23px;margin:1px 0 0 8px!important;min-height:calc(31px - .5em)}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action{padding:0 2px}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action{padding-right:4px;padding-left:4px}.mat-mdc-chip.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action mat-icon{color:inherit}.mat-mdc-chip.mat-mdc-standard-chip.mat-primary{background-color:var(--ion-color-primary);color:var(--ion-color-primary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-secondary{background-color:var(--ion-color-secondary);color:var(--ion-color-secondary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-tertiary{background-color:var(--ion-color-tertiary);color:var(--ion-color-tertiary-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-accent{background-color:var(--ion-color-accent);color:var(--ion-color-accent-contrast)}.mat-mdc-chip.mat-mdc-standard-chip.mat-warning{background-color:var(--ion-color-warning);color:var(--ion-color-warning-contrast)}mat-form-field.mat-form-field-invalid ::ng-deep .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}mat-form-field.mat-form-field-invalid ::ng-deep .mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple:after{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}\n"] }]
|
|
13021
13060
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$3.FormGroupDirective, decorators: [{
|
|
13022
13061
|
type: Optional
|
|
13023
13062
|
}] }, { type: undefined, decorators: [{
|
|
@@ -29011,7 +29050,7 @@ class CsvUtils {
|
|
|
29011
29050
|
return; // Skip if empty
|
|
29012
29051
|
// Create text content
|
|
29013
29052
|
const separator = opts?.separator || ',';
|
|
29014
|
-
const protectCellRegexp = new RegExp('/("|' + separator + '|\n)/
|
|
29053
|
+
const protectCellRegexp = new RegExp('/("|' + separator + '|\n)/');
|
|
29015
29054
|
const includedProperties = opts?.includedProperties || Object.keys(rows[0]);
|
|
29016
29055
|
const filteredProperties = isNotEmptyArray(opts?.excludedProperties)
|
|
29017
29056
|
? includedProperties.filter((k) => !opts?.excludedProperties.includes(k))
|