@testgorilla/tgo-ui 5.2.4 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ai-audio-circle/ai-audio-circle.component.d.ts +2 -1
- package/components/alert-banner/alert-banner.component.d.ts +4 -8
- package/components/autocomplete/autocomplete.component.d.ts +4 -6
- package/components/card/card.component.d.ts +12 -7
- package/components/card/card.model.d.ts +1 -0
- package/components/checklist/checklist.component.d.ts +1 -2
- package/components/datepicker/datepicker.component.d.ts +3 -5
- package/components/dialog/confirm-dialog/confirm-dialog.component.d.ts +3 -5
- package/components/empty-state/empty-state.component.d.ts +1 -4
- package/components/field/field.component.d.ts +4 -4
- package/components/media-dialog/media-dialog.component.d.ts +2 -4
- package/components/phone-input/phone-input.component.d.ts +4 -6
- package/components/snackbar/snackbar.component.d.ts +3 -5
- package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs +16 -5
- package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +16 -24
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +19 -21
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-card.mjs +20 -12
- package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +2 -6
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +13 -15
- package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +4 -8
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +9 -16
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs +3 -5
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +9 -11
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +13 -15
- package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +11 -13
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
- package/package.json +29 -29
|
@@ -3,25 +3,24 @@ import { Pipe, ElementRef, HostBinding, ViewChild, Input, Optional, Self, Inject
|
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';
|
|
6
|
-
import * as
|
|
6
|
+
import * as i6 from '@angular/material/input';
|
|
7
7
|
import { MatInput, MatInputModule } from '@angular/material/input';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i5 from '@angular/material/select';
|
|
9
9
|
import { MatSelect, MatSelectModule } from '@angular/material/select';
|
|
10
10
|
import { parsePhoneNumber } from 'libphonenumber-js';
|
|
11
11
|
import { BehaviorSubject, Subject, combineLatest, debounceTime, take, filter, first, map, startWith, tap, delay } from 'rxjs';
|
|
12
12
|
import { takeUntil } from 'rxjs/operators';
|
|
13
13
|
import * as i2 from '@angular/material/core';
|
|
14
14
|
import * as i3 from '@angular/cdk/a11y';
|
|
15
|
-
import * as i4 from '@angular/
|
|
16
|
-
import * as i5 from '@angular/common';
|
|
15
|
+
import * as i4 from '@angular/common';
|
|
17
16
|
import { CommonModule } from '@angular/common';
|
|
18
|
-
import * as
|
|
17
|
+
import * as i7 from 'ngx-mat-select-search';
|
|
19
18
|
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
20
|
-
import * as
|
|
19
|
+
import * as i8 from '@testgorilla/tgo-ui/components/icon';
|
|
21
20
|
import { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';
|
|
22
|
-
import * as
|
|
21
|
+
import * as i9 from '@testgorilla/tgo-ui/components/validation-error';
|
|
23
22
|
import { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';
|
|
24
|
-
import * as
|
|
23
|
+
import * as i10 from '@testgorilla/tgo-ui/components/core';
|
|
25
24
|
import { UiTranslatePipe, HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';
|
|
26
25
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
27
26
|
import { MatIconModule } from '@angular/material/icon';
|
|
@@ -93,7 +92,7 @@ class PhoneInputComponent {
|
|
|
93
92
|
*/
|
|
94
93
|
set errors(errors) {
|
|
95
94
|
if (errors) {
|
|
96
|
-
this._errors = errors?.filter(Boolean)
|
|
95
|
+
this._errors = errors?.filter(Boolean) ?? [];
|
|
97
96
|
this.errorsLength = this.setErrorsLength();
|
|
98
97
|
}
|
|
99
98
|
}
|
|
@@ -113,13 +112,12 @@ class PhoneInputComponent {
|
|
|
113
112
|
get placeholder() {
|
|
114
113
|
return this.internalPlaceholder;
|
|
115
114
|
}
|
|
116
|
-
constructor(ngControl, errorMatcher, fb, focusMonitor, ref,
|
|
115
|
+
constructor(ngControl, errorMatcher, fb, focusMonitor, ref, defaultAppTheme) {
|
|
117
116
|
this.ngControl = ngControl;
|
|
118
117
|
this.errorMatcher = errorMatcher;
|
|
119
118
|
this.fb = fb;
|
|
120
119
|
this.focusMonitor = focusMonitor;
|
|
121
120
|
this.ref = ref;
|
|
122
|
-
this.sanitizer = sanitizer;
|
|
123
121
|
this.defaultAppTheme = defaultAppTheme;
|
|
124
122
|
/**
|
|
125
123
|
*
|
|
@@ -165,7 +163,7 @@ class PhoneInputComponent {
|
|
|
165
163
|
this.describedBy = '';
|
|
166
164
|
this.DEFAULT_COUNTRY_CODE = 'US';
|
|
167
165
|
this.unsubscribeAll$ = new Subject();
|
|
168
|
-
this.trackByFn = (index, value) => value
|
|
166
|
+
this.trackByFn = (index, value) => value;
|
|
169
167
|
if (this.ngControl != null) {
|
|
170
168
|
this.ngControl.valueAccessor = this;
|
|
171
169
|
}
|
|
@@ -306,13 +304,13 @@ class PhoneInputComponent {
|
|
|
306
304
|
ev.preventDefault();
|
|
307
305
|
ev.stopPropagation();
|
|
308
306
|
}
|
|
309
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PhoneInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i2.ErrorStateMatcher }, { token: i1.UntypedFormBuilder }, { token: i3.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token:
|
|
307
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PhoneInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i2.ErrorStateMatcher }, { token: i1.UntypedFormBuilder }, { token: i3.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
310
308
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: PhoneInputComponent, isStandalone: false, selector: "ui-phone-input", inputs: { value: "value", countryList: "countryList", placeholder: "placeholder", disabled: "disabled", required: "required", applicationTheme: "applicationTheme", fullWidth: "fullWidth", errors: "errors", hideBuiltInErrors: "hideBuiltInErrors", hideLabelInErrors: "hideLabelInErrors" }, host: { properties: { "attr.disabled": "this.disabled", "attr.theme": "this.applicationTheme", "id": "this.id", "class.floated": "this.shouldLabelFloat", "attr.aria-describedby": "this.describedBy" } }, providers: [
|
|
311
309
|
{
|
|
312
310
|
provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,
|
|
313
311
|
useValue: { overlayPanelClass: 'phone-number-autocomplete' },
|
|
314
312
|
},
|
|
315
|
-
], viewQueries: [{ propertyName: "input", first: true, predicate: MatInput, descendants: true, read: ElementRef, static: true }, { propertyName: "select", first: true, predicate: MatSelect, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<mat-form-field\n [formGroup]=\"form\"\n appearance=\"outline\"\n [color]=\"(errorsLength || (ngControl?.errors && ngControl?.touched )) ? 'warn' : 'accent'\"\n [ngClass]=\"{ disabled: form.disabled || disabled, 'full-width': fullWidth }\"\n>\n <mat-label>{{ 'COMMON.PHONE_NUMBER' | uiTranslate | async }} <span *ngIf=\"required\">*</span></mat-label>\n\n <div matPrefix class=\"country\">\n <button class=\"selected-flag\" matPrefix *ngIf=\"selectedCountry\">\n <img [height]=\"20\" [width]=\"24\" [attr.src]=\"countryFlagSrc + selectedCountry?.alpha2Code?.toLowerCase() + '.svg'\"\n [alt]=\"'Country flag ' + selectedCountry?.alpha2Code?.toLowerCase()\">\n </button>\n <mat-select\n #select\n (selectionChange)=\"onOptionsSelected($event.value)\"\n [value]=\"selectedCountry\"\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'phone-number-select' + ' ' + applicationTheme\"\n [ngClass]=\"{ opened: select.panelOpen }\"\n >\n <mat-select-trigger>{{ selectedCountry?.callingCode }}</mat-select-trigger>\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"selectFilterCtrl\"\n ngDefaultControl\n placeholderLabel=\"\"\n noEntriesFoundLabel=\"\"\n >\n <ui-icon ngxMatSelectSearchClear size=\"24\" [name]=\"'Close-in-line'\"></ui-icon>\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let country of countries$ | async; trackBy: filteredCountryTrackByMethod\" [value]=\"country\">\n <div class=\"country-option\">\n <img [height]=\"20\" [width]=\"24\" [attr.src]=\"countryFlagSrc + country?.alpha2Code?.toLowerCase()! + '.svg'\"\n [alt]=\"'Country flag ' + country?.alpha2Code?.toLowerCase()!\">\n <small>{{ $any([country?.name, '(' + country?.callingCode + ')']) | joinStrings : ' ' }}</small>\n </div>\n </mat-option>\n </mat-select>\n </div>\n\n <input\n (input)=\"onInput(form.get('phone_number')!.value)\"\n formControlName=\"phone_number\"\n (click)=\"disableClick($event)\"\n [ngStyle]=\"{ opacity: disabled ? 0.5 : 1 }\"\n [required]=\"required\"\n matInput\n type=\"text\"\n />\n\n <mat-hint class=\"error\" *ngIf=\"errorsLength || (ngControl?.errors | hasValidationError)\">\n <ng-container *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors; trackBy: trackByFn\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n </ng-container>\n\n <ui-validation-error *ngIf=\"ngControl && !hideBuiltInErrors\" [ngControl]=\"ngControl\" [label]=\"hideLabelInErrors ? null : ('COMMON.PHONE_NUMBER' | uiTranslate | async)\"></ui-validation-error>\n\n </mat-hint>\n</mat-form-field>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:flex;align-items:center}:host .selected-flag{display:flex;position:relative;margin-right:1rem;align-items:center}:host mat-spinner{padding:0 20px}:host .country{cursor:pointer!important;display:flex;align-items:center;margin:-8px 12px 0 16px}:host .country button{margin:0 8px 0 0;background:transparent;border:unset;padding:0}:host ::ng-deep .mat-mdc-select-trigger{display:flex;gap:8px}:host mat-select{flex:0}:host .mat-mdc-form-field{min-width:320px}:host .mat-mdc-form-field.full-width{width:100%}:host .mat-mdc-form-field.disabled ::ng-deep *{border-color:#d3d3d3;color:#d3d3d3;pointer-events:none}:host .mat-mdc-form-field.disabled ::ng-deep * .mat-mdc-select-arrow{opacity:.1}:host[theme=dark] mat-select ::ng-deep .mat-mdc-select-arrow,:host[theme=light] mat-select ::ng-deep .mat-mdc-select-arrow{background:url(\"data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 17.025L6 11.025L7.4 9.625L12 14.225L16.6 9.625L18 11.025L12 17.025Z' fill='%23333333'/%3E%3C/svg%3E\");background-size:cover;width:16px;height:16px}:host[theme=dark] mat-select ::ng-deep .mat-mdc-select-arrow svg,:host[theme=light] mat-select ::ng-deep .mat-mdc-select-arrow svg{display:none}:host[theme=dark] mat-select.opened ::ng-deep .mat-mdc-select-arrow,:host[theme=light] mat-select.opened ::ng-deep .mat-mdc-select-arrow{background:url(\"data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 9.6249L18 15.6249L16.6 17.0249L12 12.4249L7.4 17.0249L6 15.6249L12 9.6249Z' fill='%23333333'/%3E%3C/svg%3E\");background-size:cover;width:16px;height:16px}::ng-deep .mat-form-field-appearance-outline mat-select .mat-select-arrow-wrapper{transform:none}::ng-deep .mat-select-panel.phone-number-select{margin-top:36px;margin-left:45px}::ng-deep .mat-select-search-inner{box-shadow:none!important;height:48px;background-color:#fff!important;border-bottom:none!important}::ng-deep .mat-select-search-inner .mat-select-search-inner-row{width:100%}::ng-deep .mat-select-search-inner button.mat-select-search-clear{right:35px}::ng-deep .mat-select-search-inner button.mat-select-search-clear mat-icon{font-size:20px}@media screen and (min-width: 599px){::ng-deep .mat-select-panel.phone-number-select{margin-left:-33px;min-width:510px}::ng-deep .mat-select-search-inner{min-width:calc(100% + 33px)!important}}ngx-mat-select-search ::ng-deep button .mat-mdc-button-persistent-ripple,ngx-mat-select-search ::ng-deep button .mat-ripple,ngx-mat-select-search ::ng-deep button .mat-mdc-button-ripple{display:none}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i6.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "component", type: i6.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", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i6.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i8.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "directive", type: i8.MatSelectSearchClearDirective, selector: "[ngxMatSelectSearchClear]" }, { kind: "component", type: i9.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: i10.ValidationErrorComponent, selector: "ui-validation-error", inputs: ["ngControl", "touchedOn", "errorMessage", "label", "applicationTheme"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i11.UiTranslatePipe, name: "uiTranslate" }, { kind: "pipe", type: i11.HasValidationErrorPipe, name: "hasValidationError" }, { kind: "pipe", type: JoinStringsPipe, name: "joinStrings" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
313
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: MatInput, descendants: true, read: ElementRef, static: true }, { propertyName: "select", first: true, predicate: MatSelect, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<mat-form-field\n [formGroup]=\"form\"\n appearance=\"outline\"\n [color]=\"(errorsLength || (ngControl?.errors && ngControl?.touched )) ? 'warn' : 'accent'\"\n [ngClass]=\"{ disabled: form.disabled || disabled, 'full-width': fullWidth }\"\n>\n <mat-label>{{ 'COMMON.PHONE_NUMBER' | uiTranslate | async }} <span *ngIf=\"required\">*</span></mat-label>\n\n <div matPrefix class=\"country\">\n <button class=\"selected-flag\" matPrefix *ngIf=\"selectedCountry\">\n <img [height]=\"20\" [width]=\"24\" [attr.src]=\"countryFlagSrc + selectedCountry?.alpha2Code?.toLowerCase() + '.svg'\"\n [alt]=\"'Country flag ' + selectedCountry?.alpha2Code?.toLowerCase()\">\n </button>\n <mat-select\n #select\n (selectionChange)=\"onOptionsSelected($event.value)\"\n [value]=\"selectedCountry\"\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'phone-number-select' + ' ' + applicationTheme\"\n [ngClass]=\"{ opened: select.panelOpen }\"\n >\n <mat-select-trigger>{{ selectedCountry?.callingCode }}</mat-select-trigger>\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"selectFilterCtrl\"\n ngDefaultControl\n placeholderLabel=\"\"\n noEntriesFoundLabel=\"\"\n >\n <ui-icon ngxMatSelectSearchClear size=\"24\" [name]=\"'Close-in-line'\"></ui-icon>\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let country of countries$ | async; trackBy: filteredCountryTrackByMethod\" [value]=\"country\">\n <div class=\"country-option\">\n <img [height]=\"20\" [width]=\"24\" [attr.src]=\"countryFlagSrc + country?.alpha2Code?.toLowerCase()! + '.svg'\"\n [alt]=\"'Country flag ' + country?.alpha2Code?.toLowerCase()!\">\n <small>{{ $any([country?.name, '(' + country?.callingCode + ')']) | joinStrings : ' ' }}</small>\n </div>\n </mat-option>\n </mat-select>\n </div>\n\n <input\n (input)=\"onInput(form.get('phone_number')!.value)\"\n formControlName=\"phone_number\"\n (click)=\"disableClick($event)\"\n [ngStyle]=\"{ opacity: disabled ? 0.5 : 1 }\"\n [required]=\"required\"\n matInput\n type=\"text\"\n />\n\n <mat-hint class=\"error\" *ngIf=\"errorsLength || (ngControl?.errors | hasValidationError)\">\n <ng-container *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors; trackBy: trackByFn\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n </ng-container>\n\n <ui-validation-error *ngIf=\"ngControl && !hideBuiltInErrors\" [ngControl]=\"ngControl\" [label]=\"hideLabelInErrors ? null : ('COMMON.PHONE_NUMBER' | uiTranslate | async)\"></ui-validation-error>\n\n </mat-hint>\n</mat-form-field>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:flex;align-items:center}:host .selected-flag{display:flex;position:relative;margin-right:1rem;align-items:center}:host mat-spinner{padding:0 20px}:host .country{cursor:pointer!important;display:flex;align-items:center;margin:-8px 12px 0 16px}:host .country button{margin:0 8px 0 0;background:transparent;border:unset;padding:0}:host ::ng-deep .mat-mdc-select-trigger{display:flex;gap:8px}:host mat-select{flex:0}:host .mat-mdc-form-field{min-width:320px}:host .mat-mdc-form-field.full-width{width:100%}:host .mat-mdc-form-field.disabled ::ng-deep *{border-color:#d3d3d3;color:#d3d3d3;pointer-events:none}:host .mat-mdc-form-field.disabled ::ng-deep * .mat-mdc-select-arrow{opacity:.1}:host[theme=dark] mat-select ::ng-deep .mat-mdc-select-arrow,:host[theme=light] mat-select ::ng-deep .mat-mdc-select-arrow{background:url(\"data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 17.025L6 11.025L7.4 9.625L12 14.225L16.6 9.625L18 11.025L12 17.025Z' fill='%23333333'/%3E%3C/svg%3E\");background-size:cover;width:16px;height:16px}:host[theme=dark] mat-select ::ng-deep .mat-mdc-select-arrow svg,:host[theme=light] mat-select ::ng-deep .mat-mdc-select-arrow svg{display:none}:host[theme=dark] mat-select.opened ::ng-deep .mat-mdc-select-arrow,:host[theme=light] mat-select.opened ::ng-deep .mat-mdc-select-arrow{background:url(\"data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 9.6249L18 15.6249L16.6 17.0249L12 12.4249L7.4 17.0249L6 15.6249L12 9.6249Z' fill='%23333333'/%3E%3C/svg%3E\");background-size:cover;width:16px;height:16px}::ng-deep .mat-form-field-appearance-outline mat-select .mat-select-arrow-wrapper{transform:none}::ng-deep .mat-select-panel.phone-number-select{margin-top:36px;margin-left:45px}::ng-deep .mat-select-search-inner{box-shadow:none!important;height:48px;background-color:#fff!important;border-bottom:none!important}::ng-deep .mat-select-search-inner .mat-select-search-inner-row{width:100%}::ng-deep .mat-select-search-inner button.mat-select-search-clear{right:35px}::ng-deep .mat-select-search-inner button.mat-select-search-clear mat-icon{font-size:20px}@media screen and (min-width: 599px){::ng-deep .mat-select-panel.phone-number-select{margin-left:-33px;min-width:510px}::ng-deep .mat-select-search-inner{min-width:calc(100% + 33px)!important}}ngx-mat-select-search ::ng-deep button .mat-mdc-button-persistent-ripple,ngx-mat-select-search ::ng-deep button .mat-ripple,ngx-mat-select-search ::ng-deep button .mat-mdc-button-ripple{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "component", type: i5.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", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i5.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "directive", type: i7.MatSelectSearchClearDirective, selector: "[ngxMatSelectSearchClear]" }, { kind: "component", type: i8.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: i9.ValidationErrorComponent, selector: "ui-validation-error", inputs: ["ngControl", "touchedOn", "errorMessage", "label", "applicationTheme"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.UiTranslatePipe, name: "uiTranslate" }, { kind: "pipe", type: i10.HasValidationErrorPipe, name: "hasValidationError" }, { kind: "pipe", type: JoinStringsPipe, name: "joinStrings" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
316
314
|
}
|
|
317
315
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PhoneInputComponent, decorators: [{
|
|
318
316
|
type: Component,
|
|
@@ -326,7 +324,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
326
324
|
type: Optional
|
|
327
325
|
}, {
|
|
328
326
|
type: Self
|
|
329
|
-
}] }, { type: i2.ErrorStateMatcher }, { type: i1.UntypedFormBuilder }, { type: i3.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type:
|
|
327
|
+
}] }, { type: i2.ErrorStateMatcher }, { type: i1.UntypedFormBuilder }, { type: i3.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
330
328
|
type: Optional
|
|
331
329
|
}, {
|
|
332
330
|
type: Inject,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-phone-input.mjs","sources":["../../../components/phone-input/join-strings.pipe.ts","../../../components/phone-input/phone-input.component.ts","../../../components/phone-input/phone-input.component.html","../../../components/phone-input/phone-input.component.module.ts","../../../components/phone-input/testgorilla-tgo-ui-components-phone-input.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'joinStrings',\n standalone: false\n})\nexport class JoinStringsPipe implements PipeTransform {\n transform(value: string[], separator?: string): string {\n return value.filter(Boolean).join(separator ? separator : ' - ');\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NgControl,\n UntypedFormBuilder,\n UntypedFormControl,\n UntypedFormGroup,\n} from '@angular/forms';\nimport { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatInput } from '@angular/material/input';\nimport { MatSelect } from '@angular/material/select';\nimport { parsePhoneNumber } from 'libphonenumber-js';\nimport {\n BehaviorSubject,\n combineLatest,\n debounceTime,\n delay,\n filter,\n first,\n map,\n Observable,\n startWith,\n Subject,\n take,\n tap,\n} from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { UICountry } from './phone-input.model';\n\n@Component({\n selector: 'ui-phone-input',\n templateUrl: './phone-input.component.html',\n styleUrls: ['./phone-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,\n useValue: { overlayPanelClass: 'phone-number-autocomplete' },\n },\n ],\n standalone: false\n})\nexport class PhoneInputComponent implements OnInit, OnDestroy, ControlValueAccessor, DoCheck {\n /**\n * Phone number\n *\n * @type {string}\n * @memberof PhoneInputComponent\n */\n @Input()\n set value(value: string) {\n this.initialValue = this.initialValue || value;\n try {\n const parsed = parsePhoneNumber(value);\n const formatted = parsed.formatInternational();\n this.selectedCountry = this.getCountryByAlpha2Code(parsed.country!) || this.selectedCountry;\n this.form.patchValue({ phone_number: formatted.replace(this.selectedCountry.callingCode, '') });\n } catch (err) {\n if (value?.length <= 4) {\n this.selectedCountry = this.getCountryByCallingCode(value) || this.selectedCountry;\n }\n this.form.patchValue({ phone_number: value?.replace(this.selectedCountry?.callingCode, '') });\n }\n this.stateChanges.next();\n }\n\n /**\n * Country list for select\n *\n * @type {UICountry[]}\n * @memberof PhoneInputComponent\n */\n @Input() set countryList(countryList: UICountry[]) {\n this.loadCountries$.next(countryList);\n this.selectedCountry = this.selectedCountry ?? countryList[0];\n }\n\n /**\n * Placeholder input\n *\n * @type {text}\n * @memberof PhoneInputComponent\n */\n @Input()\n set placeholder(value: string) {\n this.internalPlaceholder = value;\n this.stateChanges.next();\n }\n\n /**\n * Determines if input is disabled\n *\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @HostBinding('attr.disabled')\n @Input()\n disabled: boolean;\n\n /**\n * Input is required or not\n *\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @Input() required: boolean;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof PhoneInputComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Indicator of the phone input width\n * @property fullWidth\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @Input() fullWidth = false;\n\n _errors: SafeHtml[];\n /**\n * Input field errors\n *\n * @type {string}\n * @memberof PhoneInputComponent\n */\n @Input() set errors(errors: string[]) {\n if (errors) {\n this._errors = errors?.filter(Boolean).map(error => this.sanitizer.bypassSecurityTrustHtml(error));\n this.errorsLength = this.setErrorsLength();\n }\n }\n\n /**\n * Hide in build errors for Reactive Forms\n *\n * @type {number}\n * @memberof PhoneInputComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof PhoneInputComponent\n */\n @Input() hideLabelInErrors = false;\n\n static nextId = 0;\n\n private countries = new BehaviorSubject<UICountry[]>([]);\n protected countries$ = this.countries.asObservable();\n form: UntypedFormGroup = this.fb.group({\n phone_number: new UntypedFormControl(),\n });\n protected controlType = 'phone-number';\n protected userAriaDescribedBy?: string;\n protected loadCountries$ = new BehaviorSubject<UICountry[]>([]);\n protected countryCode = new BehaviorSubject<string>('US');\n protected stateChanges = new Subject<void>();\n protected focused: boolean;\n protected selectFilterCtrl = new UntypedFormControl('');\n protected errorsLength: boolean;\n protected readonly countryFlagSrc = 'assets/svg-country-flags/';\n\n @ViewChild(MatInput, { read: ElementRef, static: true })\n public input: ElementRef<HTMLElement>;\n @ViewChild(MatSelect, { read: ElementRef, static: true })\n public select: ElementRef<HTMLElement>;\n\n @HostBinding()\n id = `phone-number${PhoneInputComponent.nextId++}`;\n\n @HostBinding('class.floated')\n get shouldLabelFloat(): boolean {\n return true;\n }\n\n @HostBinding('attr.aria-describedby') describedBy = '';\n\n get empty(): boolean {\n return !!this.form.value;\n }\n\n get errorState(): boolean {\n return this.errorMatcher.isErrorState(this.ngControl.control as UntypedFormControl, null);\n }\n\n get value(): string {\n return this.getNumberWithCountryCode();\n }\n\n get placeholder() {\n return this.internalPlaceholder;\n }\n\n private initialValue: string;\n private readonly DEFAULT_COUNTRY_CODE = 'US';\n private internalPlaceholder: string;\n protected selectedCountry: UICountry;\n private unsubscribeAll$ = new Subject<void>();\n\n constructor(\n @Optional() @Self() public ngControl: NgControl,\n private errorMatcher: ErrorStateMatcher,\n private fb: UntypedFormBuilder,\n private focusMonitor: FocusMonitor,\n private ref: ChangeDetectorRef,\n private sanitizer: DomSanitizer,\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.ref.markForCheck();\n }\n }\n\n ngOnInit(): void {\n this.loadCountries();\n this.preSelectCountry();\n this.subscribeToFocusEvents();\n }\n\n setErrorsLength(): boolean {\n if (!!this._errors) {\n return this._errors.filter(err => !!err).length > 0;\n }\n return false;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.userAriaDescribedBy = ids.join(' ');\n }\n\n onChange: (value: string) => void;\n onTouch: () => void;\n\n writeValue(phoneNumber: string): void {\n if (phoneNumber) {\n this.value = phoneNumber;\n }\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.form.disable();\n } else {\n this.form.enable();\n }\n this.disabled = isDisabled;\n this.stateChanges.next();\n this.ref.markForCheck();\n }\n\n ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.input);\n this.focusMonitor.stopMonitoring(this.select);\n this.stateChanges.complete();\n this.unsubscribeAll$.next();\n this.unsubscribeAll$.complete();\n }\n\n onOptionsSelected(value: UICountry) {\n this.setCountry(value);\n }\n\n onInput(value: string) {\n this.value = (this.selectedCountry?.callingCode ?? '') + value;\n this.onChange(this.value);\n }\n\n filteredCountryTrackByMethod(index: number, el: UICountry): string {\n return el.alpha2Code;\n }\n\n private setCountry(country: UICountry | null): void {\n if (country) {\n this.selectedCountry = country;\n }\n this.value = this.getNumberWithCountryCode();\n this.onChange(this.value);\n }\n\n private getNumberWithCountryCode() {\n const nationalNumber = this.form.value?.phone_number as string;\n return nationalNumber ? (this.selectedCountry?.callingCode ?? '') + nationalNumber : '';\n }\n\n private subscribeToFocusEvents() {\n const selectAndInputFocus$ = combineLatest([\n this.focusMonitor.monitor(this.select),\n this.focusMonitor.monitor(this.input),\n ]).pipe(takeUntil(this.unsubscribeAll$), debounceTime(10));\n\n selectAndInputFocus$.subscribe(([selectFocus, inputFocus]) => {\n this.focused = !!(selectFocus || inputFocus);\n this.stateChanges.next();\n });\n\n selectAndInputFocus$.pipe(take(1)).subscribe(() => {\n this.onTouch();\n });\n }\n\n private preSelectCountry() {\n this.setDisabledState(true);\n combineLatest([\n this.countries$.pipe(\n filter(countries => countries.length > 0),\n first()\n ),\n this.countryCode,\n ])\n .pipe(\n map(([countries, selectedCountry]) => {\n if (!this.initialValue) {\n const country =\n this.getCountryByAlpha2Code(selectedCountry) || this.getCountryByAlpha2Code(this.DEFAULT_COUNTRY_CODE);\n this.setCountry(country as UICountry);\n } else {\n this.value = this.initialValue;\n }\n\n this.setDisabledState(false);\n this.ref.markForCheck();\n })\n )\n .subscribe();\n }\n\n private getCountryByAlpha2Code(alpha2Code: string) {\n return this.countries.value.find(country => country.alpha2Code === alpha2Code);\n }\n\n private getCountryByCallingCode(callingCode: string) {\n return this.countries.value.find(country => country.callingCode === callingCode);\n }\n\n private loadCountries(): void {\n const searchText$: Observable<string> = this.selectFilterCtrl.valueChanges.pipe(debounceTime(100), startWith(''));\n\n combineLatest([this.loadCountries$, searchText$])\n .pipe(\n takeUntil(this.unsubscribeAll$),\n tap(([countries, searchText]) => {\n const searchTextLowerCase = searchText.toLowerCase();\n const filteredCountries = countries\n .filter(\n option =>\n option.name.toLowerCase().includes(searchTextLowerCase) ||\n option.alpha2Code.toLowerCase().includes(searchTextLowerCase) ||\n option.callingCode.toLowerCase().includes(searchTextLowerCase)\n )\n .sort((optionA, optionB) => (optionB.name.startsWith(searchText) ? 1 : -1));\n this.countries.next(filteredCountries);\n }),\n delay(1),\n tap(() => {\n const countryFound = this.getCountryByAlpha2Code(this.selectedCountry?.alpha2Code);\n this.selectedCountry = countryFound || this.selectedCountry;\n this.ref.markForCheck();\n })\n )\n .subscribe();\n }\n\n disableClick(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n trackByFn = (index: number, value: any) => value.changingThisBreaksApplicationSecurity;\n}\n","<mat-form-field\n [formGroup]=\"form\"\n appearance=\"outline\"\n [color]=\"(errorsLength || (ngControl?.errors && ngControl?.touched )) ? 'warn' : 'accent'\"\n [ngClass]=\"{ disabled: form.disabled || disabled, 'full-width': fullWidth }\"\n>\n <mat-label>{{ 'COMMON.PHONE_NUMBER' | uiTranslate | async }} <span *ngIf=\"required\">*</span></mat-label>\n\n <div matPrefix class=\"country\">\n <button class=\"selected-flag\" matPrefix *ngIf=\"selectedCountry\">\n <img [height]=\"20\" [width]=\"24\" [attr.src]=\"countryFlagSrc + selectedCountry?.alpha2Code?.toLowerCase() + '.svg'\"\n [alt]=\"'Country flag ' + selectedCountry?.alpha2Code?.toLowerCase()\">\n </button>\n <mat-select\n #select\n (selectionChange)=\"onOptionsSelected($event.value)\"\n [value]=\"selectedCountry\"\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'phone-number-select' + ' ' + applicationTheme\"\n [ngClass]=\"{ opened: select.panelOpen }\"\n >\n <mat-select-trigger>{{ selectedCountry?.callingCode }}</mat-select-trigger>\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"selectFilterCtrl\"\n ngDefaultControl\n placeholderLabel=\"\"\n noEntriesFoundLabel=\"\"\n >\n <ui-icon ngxMatSelectSearchClear size=\"24\" [name]=\"'Close-in-line'\"></ui-icon>\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let country of countries$ | async; trackBy: filteredCountryTrackByMethod\" [value]=\"country\">\n <div class=\"country-option\">\n <img [height]=\"20\" [width]=\"24\" [attr.src]=\"countryFlagSrc + country?.alpha2Code?.toLowerCase()! + '.svg'\"\n [alt]=\"'Country flag ' + country?.alpha2Code?.toLowerCase()!\">\n <small>{{ $any([country?.name, '(' + country?.callingCode + ')']) | joinStrings : ' ' }}</small>\n </div>\n </mat-option>\n </mat-select>\n </div>\n\n <input\n (input)=\"onInput(form.get('phone_number')!.value)\"\n formControlName=\"phone_number\"\n (click)=\"disableClick($event)\"\n [ngStyle]=\"{ opacity: disabled ? 0.5 : 1 }\"\n [required]=\"required\"\n matInput\n type=\"text\"\n />\n\n <mat-hint class=\"error\" *ngIf=\"errorsLength || (ngControl?.errors | hasValidationError)\">\n <ng-container *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors; trackBy: trackByFn\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n </ng-container>\n\n <ui-validation-error *ngIf=\"ngControl && !hideBuiltInErrors\" [ngControl]=\"ngControl\" [label]=\"hideLabelInErrors ? null : ('COMMON.PHONE_NUMBER' | uiTranslate | async)\"></ui-validation-error>\n\n </mat-hint>\n</mat-form-field>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PhoneInputComponent } from './phone-input.component';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatIconModule } from '@angular/material/icon';\nimport { JoinStringsPipe } from './join-strings.pipe';\nimport { MatInputModule } from '@angular/material/input';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SpinnerComponentModule } from '@testgorilla/tgo-ui/components/spinner';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\nimport { HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\n\n@NgModule({\n declarations: [PhoneInputComponent, JoinStringsPipe],\n exports: [PhoneInputComponent],\n imports: [\n CommonModule,\n MatProgressSpinnerModule,\n ReactiveFormsModule,\n MatSelectModule,\n MatIconModule,\n MatInputModule,\n NgxMatSelectSearchModule,\n IconComponentModule,\n SpinnerComponentModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n ],\n})\nexport class PhoneInputComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i12.JoinStringsPipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMa,eAAe,CAAA;IAC1B,SAAS,CAAC,KAAe,EAAE,SAAkB,EAAA;AAC3C,QAAA,OAAO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ACb,cAAc;YACd,wBAAwB;YACxB,mBAAmB;YACnB,sBAAsB;YACtB,eAAe;YACf,qBAAqB;AACrB,YAAA,sBAAsB,aAbd,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAgBlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YAdlC,YAAY;YACZ,wBAAwB;YACxB,mBAAmB;YACnB,eAAe;YACf,aAAa;YACb,cAAc;YACd,wBAAwB;YACxB,mBAAmB;YACnB,sBAAsB;YAEtB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;4FAIZ,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAlBrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,eAAe,CAAC;oBACpD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,wBAAwB;wBACxB,mBAAmB;wBACnB,eAAe;wBACf,aAAa;wBACb,cAAc;wBACd,wBAAwB;wBACxB,mBAAmB;wBACnB,sBAAsB;wBACtB,eAAe;wBACf,qBAAqB;wBACrB,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;ACjCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-phone-input.mjs","sources":["../../../components/phone-input/join-strings.pipe.ts","../../../components/phone-input/phone-input.component.ts","../../../components/phone-input/phone-input.component.html","../../../components/phone-input/phone-input.component.module.ts","../../../components/phone-input/testgorilla-tgo-ui-components-phone-input.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'joinStrings',\n standalone: false\n})\nexport class JoinStringsPipe implements PipeTransform {\n transform(value: string[], separator?: string): string {\n return value.filter(Boolean).join(separator ? separator : ' - ');\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NgControl,\n UntypedFormBuilder,\n UntypedFormControl,\n UntypedFormGroup,\n} from '@angular/forms';\nimport { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatInput } from '@angular/material/input';\nimport { MatSelect } from '@angular/material/select';\nimport { parsePhoneNumber } from 'libphonenumber-js';\nimport {\n BehaviorSubject,\n combineLatest,\n debounceTime,\n delay,\n filter,\n first,\n map,\n Observable,\n startWith,\n Subject,\n take,\n tap,\n} from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { UICountry } from './phone-input.model';\n\n@Component({\n selector: 'ui-phone-input',\n templateUrl: './phone-input.component.html',\n styleUrls: ['./phone-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,\n useValue: { overlayPanelClass: 'phone-number-autocomplete' },\n },\n ],\n standalone: false,\n})\nexport class PhoneInputComponent implements OnInit, OnDestroy, ControlValueAccessor, DoCheck {\n /**\n * Phone number\n *\n * @type {string}\n * @memberof PhoneInputComponent\n */\n @Input()\n set value(value: string) {\n this.initialValue = this.initialValue || value;\n try {\n const parsed = parsePhoneNumber(value);\n const formatted = parsed.formatInternational();\n this.selectedCountry = this.getCountryByAlpha2Code(parsed.country!) || this.selectedCountry;\n this.form.patchValue({ phone_number: formatted.replace(this.selectedCountry.callingCode, '') });\n } catch (err) {\n if (value?.length <= 4) {\n this.selectedCountry = this.getCountryByCallingCode(value) || this.selectedCountry;\n }\n this.form.patchValue({ phone_number: value?.replace(this.selectedCountry?.callingCode, '') });\n }\n this.stateChanges.next();\n }\n\n /**\n * Country list for select\n *\n * @type {UICountry[]}\n * @memberof PhoneInputComponent\n */\n @Input() set countryList(countryList: UICountry[]) {\n this.loadCountries$.next(countryList);\n this.selectedCountry = this.selectedCountry ?? countryList[0];\n }\n\n /**\n * Placeholder input\n *\n * @type {text}\n * @memberof PhoneInputComponent\n */\n @Input()\n set placeholder(value: string) {\n this.internalPlaceholder = value;\n this.stateChanges.next();\n }\n\n /**\n * Determines if input is disabled\n *\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @HostBinding('attr.disabled')\n @Input()\n disabled: boolean;\n\n /**\n * Input is required or not\n *\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @Input() required: boolean;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof PhoneInputComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Indicator of the phone input width\n * @property fullWidth\n * @type {boolean}\n * @memberof PhoneInputComponent\n */\n @Input() fullWidth = false;\n\n _errors: string[];\n /**\n * Input field errors\n *\n * @type {string}\n * @memberof PhoneInputComponent\n */\n @Input() set errors(errors: string[]) {\n if (errors) {\n this._errors = errors?.filter(Boolean) ?? [];\n this.errorsLength = this.setErrorsLength();\n }\n }\n\n /**\n * Hide in build errors for Reactive Forms\n *\n * @type {number}\n * @memberof PhoneInputComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof PhoneInputComponent\n */\n @Input() hideLabelInErrors = false;\n\n static nextId = 0;\n\n private countries = new BehaviorSubject<UICountry[]>([]);\n protected countries$ = this.countries.asObservable();\n form: UntypedFormGroup = this.fb.group({\n phone_number: new UntypedFormControl(),\n });\n protected controlType = 'phone-number';\n protected userAriaDescribedBy?: string;\n protected loadCountries$ = new BehaviorSubject<UICountry[]>([]);\n protected countryCode = new BehaviorSubject<string>('US');\n protected stateChanges = new Subject<void>();\n protected focused: boolean;\n protected selectFilterCtrl = new UntypedFormControl('');\n protected errorsLength: boolean;\n protected readonly countryFlagSrc = 'assets/svg-country-flags/';\n\n @ViewChild(MatInput, { read: ElementRef, static: true })\n public input: ElementRef<HTMLElement>;\n @ViewChild(MatSelect, { read: ElementRef, static: true })\n public select: ElementRef<HTMLElement>;\n\n @HostBinding()\n id = `phone-number${PhoneInputComponent.nextId++}`;\n\n @HostBinding('class.floated')\n get shouldLabelFloat(): boolean {\n return true;\n }\n\n @HostBinding('attr.aria-describedby') describedBy = '';\n\n get empty(): boolean {\n return !!this.form.value;\n }\n\n get errorState(): boolean {\n return this.errorMatcher.isErrorState(this.ngControl.control as UntypedFormControl, null);\n }\n\n get value(): string {\n return this.getNumberWithCountryCode();\n }\n\n get placeholder() {\n return this.internalPlaceholder;\n }\n\n private initialValue: string;\n private readonly DEFAULT_COUNTRY_CODE = 'US';\n private internalPlaceholder: string;\n protected selectedCountry: UICountry;\n private unsubscribeAll$ = new Subject<void>();\n\n constructor(\n @Optional() @Self() public ngControl: NgControl,\n private errorMatcher: ErrorStateMatcher,\n private fb: UntypedFormBuilder,\n private focusMonitor: FocusMonitor,\n private ref: ChangeDetectorRef,\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.ref.markForCheck();\n }\n }\n\n ngOnInit(): void {\n this.loadCountries();\n this.preSelectCountry();\n this.subscribeToFocusEvents();\n }\n\n setErrorsLength(): boolean {\n if (!!this._errors) {\n return this._errors.filter(err => !!err).length > 0;\n }\n return false;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.userAriaDescribedBy = ids.join(' ');\n }\n\n onChange: (value: string) => void;\n onTouch: () => void;\n\n writeValue(phoneNumber: string): void {\n if (phoneNumber) {\n this.value = phoneNumber;\n }\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.form.disable();\n } else {\n this.form.enable();\n }\n this.disabled = isDisabled;\n this.stateChanges.next();\n this.ref.markForCheck();\n }\n\n ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.input);\n this.focusMonitor.stopMonitoring(this.select);\n this.stateChanges.complete();\n this.unsubscribeAll$.next();\n this.unsubscribeAll$.complete();\n }\n\n onOptionsSelected(value: UICountry) {\n this.setCountry(value);\n }\n\n onInput(value: string) {\n this.value = (this.selectedCountry?.callingCode ?? '') + value;\n this.onChange(this.value);\n }\n\n filteredCountryTrackByMethod(index: number, el: UICountry): string {\n return el.alpha2Code;\n }\n\n private setCountry(country: UICountry | null): void {\n if (country) {\n this.selectedCountry = country;\n }\n this.value = this.getNumberWithCountryCode();\n this.onChange(this.value);\n }\n\n private getNumberWithCountryCode() {\n const nationalNumber = this.form.value?.phone_number as string;\n return nationalNumber ? (this.selectedCountry?.callingCode ?? '') + nationalNumber : '';\n }\n\n private subscribeToFocusEvents() {\n const selectAndInputFocus$ = combineLatest([\n this.focusMonitor.monitor(this.select),\n this.focusMonitor.monitor(this.input),\n ]).pipe(takeUntil(this.unsubscribeAll$), debounceTime(10));\n\n selectAndInputFocus$.subscribe(([selectFocus, inputFocus]) => {\n this.focused = !!(selectFocus || inputFocus);\n this.stateChanges.next();\n });\n\n selectAndInputFocus$.pipe(take(1)).subscribe(() => {\n this.onTouch();\n });\n }\n\n private preSelectCountry() {\n this.setDisabledState(true);\n combineLatest([\n this.countries$.pipe(\n filter(countries => countries.length > 0),\n first()\n ),\n this.countryCode,\n ])\n .pipe(\n map(([countries, selectedCountry]) => {\n if (!this.initialValue) {\n const country =\n this.getCountryByAlpha2Code(selectedCountry) || this.getCountryByAlpha2Code(this.DEFAULT_COUNTRY_CODE);\n this.setCountry(country as UICountry);\n } else {\n this.value = this.initialValue;\n }\n\n this.setDisabledState(false);\n this.ref.markForCheck();\n })\n )\n .subscribe();\n }\n\n private getCountryByAlpha2Code(alpha2Code: string) {\n return this.countries.value.find(country => country.alpha2Code === alpha2Code);\n }\n\n private getCountryByCallingCode(callingCode: string) {\n return this.countries.value.find(country => country.callingCode === callingCode);\n }\n\n private loadCountries(): void {\n const searchText$: Observable<string> = this.selectFilterCtrl.valueChanges.pipe(debounceTime(100), startWith(''));\n\n combineLatest([this.loadCountries$, searchText$])\n .pipe(\n takeUntil(this.unsubscribeAll$),\n tap(([countries, searchText]) => {\n const searchTextLowerCase = searchText.toLowerCase();\n const filteredCountries = countries\n .filter(\n option =>\n option.name.toLowerCase().includes(searchTextLowerCase) ||\n option.alpha2Code.toLowerCase().includes(searchTextLowerCase) ||\n option.callingCode.toLowerCase().includes(searchTextLowerCase)\n )\n .sort((optionA, optionB) => (optionB.name.startsWith(searchText) ? 1 : -1));\n this.countries.next(filteredCountries);\n }),\n delay(1),\n tap(() => {\n const countryFound = this.getCountryByAlpha2Code(this.selectedCountry?.alpha2Code);\n this.selectedCountry = countryFound || this.selectedCountry;\n this.ref.markForCheck();\n })\n )\n .subscribe();\n }\n\n disableClick(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n trackByFn = (index: number, value: string) => value;\n}\n","<mat-form-field\n [formGroup]=\"form\"\n appearance=\"outline\"\n [color]=\"(errorsLength || (ngControl?.errors && ngControl?.touched )) ? 'warn' : 'accent'\"\n [ngClass]=\"{ disabled: form.disabled || disabled, 'full-width': fullWidth }\"\n>\n <mat-label>{{ 'COMMON.PHONE_NUMBER' | uiTranslate | async }} <span *ngIf=\"required\">*</span></mat-label>\n\n <div matPrefix class=\"country\">\n <button class=\"selected-flag\" matPrefix *ngIf=\"selectedCountry\">\n <img [height]=\"20\" [width]=\"24\" [attr.src]=\"countryFlagSrc + selectedCountry?.alpha2Code?.toLowerCase() + '.svg'\"\n [alt]=\"'Country flag ' + selectedCountry?.alpha2Code?.toLowerCase()\">\n </button>\n <mat-select\n #select\n (selectionChange)=\"onOptionsSelected($event.value)\"\n [value]=\"selectedCountry\"\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'phone-number-select' + ' ' + applicationTheme\"\n [ngClass]=\"{ opened: select.panelOpen }\"\n >\n <mat-select-trigger>{{ selectedCountry?.callingCode }}</mat-select-trigger>\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"selectFilterCtrl\"\n ngDefaultControl\n placeholderLabel=\"\"\n noEntriesFoundLabel=\"\"\n >\n <ui-icon ngxMatSelectSearchClear size=\"24\" [name]=\"'Close-in-line'\"></ui-icon>\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let country of countries$ | async; trackBy: filteredCountryTrackByMethod\" [value]=\"country\">\n <div class=\"country-option\">\n <img [height]=\"20\" [width]=\"24\" [attr.src]=\"countryFlagSrc + country?.alpha2Code?.toLowerCase()! + '.svg'\"\n [alt]=\"'Country flag ' + country?.alpha2Code?.toLowerCase()!\">\n <small>{{ $any([country?.name, '(' + country?.callingCode + ')']) | joinStrings : ' ' }}</small>\n </div>\n </mat-option>\n </mat-select>\n </div>\n\n <input\n (input)=\"onInput(form.get('phone_number')!.value)\"\n formControlName=\"phone_number\"\n (click)=\"disableClick($event)\"\n [ngStyle]=\"{ opacity: disabled ? 0.5 : 1 }\"\n [required]=\"required\"\n matInput\n type=\"text\"\n />\n\n <mat-hint class=\"error\" *ngIf=\"errorsLength || (ngControl?.errors | hasValidationError)\">\n <ng-container *ngIf=\"errorsLength\">\n <div class=\"errors\" *ngFor=\"let error of _errors; trackBy: trackByFn\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n </ng-container>\n\n <ui-validation-error *ngIf=\"ngControl && !hideBuiltInErrors\" [ngControl]=\"ngControl\" [label]=\"hideLabelInErrors ? null : ('COMMON.PHONE_NUMBER' | uiTranslate | async)\"></ui-validation-error>\n\n </mat-hint>\n</mat-form-field>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PhoneInputComponent } from './phone-input.component';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatIconModule } from '@angular/material/icon';\nimport { JoinStringsPipe } from './join-strings.pipe';\nimport { MatInputModule } from '@angular/material/input';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SpinnerComponentModule } from '@testgorilla/tgo-ui/components/spinner';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\nimport { HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\n\n@NgModule({\n declarations: [PhoneInputComponent, JoinStringsPipe],\n exports: [PhoneInputComponent],\n imports: [\n CommonModule,\n MatProgressSpinnerModule,\n ReactiveFormsModule,\n MatSelectModule,\n MatIconModule,\n MatInputModule,\n NgxMatSelectSearchModule,\n IconComponentModule,\n SpinnerComponentModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n ],\n})\nexport class PhoneInputComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i11.JoinStringsPipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMa,eAAe,CAAA;IAC1B,SAAS,CAAC,KAAe,EAAE,SAAkB,EAAA;AAC3C,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAA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AA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YAdlC,YAAY;YACZ,wBAAwB;YACxB,mBAAmB;YACnB,eAAe;YACf,aAAa;YACb,cAAc;YACd,wBAAwB;YACxB,mBAAmB;YACnB,sBAAsB;YAEtB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;4FAIZ,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAlBrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,eAAe,CAAC;oBACpD,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,wBAAwB;wBACxB,mBAAmB;wBACnB,eAAe;wBACf,aAAa;wBACb,cAAc;wBACd,wBAAwB;wBACxB,mBAAmB;wBACnB,sBAAsB;wBACtB,eAAe;wBACf,qBAAqB;wBACrB,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;ACjCD;;AAEG;;;;"}
|
|
@@ -52,7 +52,7 @@ class SelectableCardComponent {
|
|
|
52
52
|
this.cardSelected.emit(newValue);
|
|
53
53
|
}
|
|
54
54
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SelectableCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.18", type: SelectableCardComponent, isStandalone: false, selector: "ui-selectable-card", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, selectedVariant: { classPropertyName: "selectedVariant", publicName: "selectedVariant", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, isCheckboxDisabled: { classPropertyName: "isCheckboxDisabled", publicName: "isCheckboxDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardSelected: "cardSelected" }, ngImport: i0, template: "<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n>\n <ui-checkbox class=\"selectable-card-checkbox\" [checked]=\"isSelected()\" [disabled]=\"isCheckboxDisabled()\">\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n", styles: [".selectable-card .selectable-card-checkbox{display:block;margin-top:-11px;margin-left:-11px}\n"], dependencies: [{ kind: "component", type: i1.CardComponent, selector: "ui-card", inputs: ["size", "variant", "applicationTheme", "errors", "errorsSize", "selected", "allowSelect", "allowFocus"], outputs: ["cardSelected"] }, { kind: "component", type: i2.CheckboxComponent, selector: "ui-checkbox", inputs: ["disabled", "checked", "indeterminate", "companyColor", "name", "label", "multiple", "applicationTheme", "ariaLabel", "ariaRequired", "hasError", "hideBuiltInErrors", "hideLabelInErrors", "ariaLabelledby", "ariaDescribedby", "truncateText", "alignment", "tabIndex"], outputs: ["changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
55
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.18", type: SelectableCardComponent, isStandalone: false, selector: "ui-selectable-card", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, selectedVariant: { classPropertyName: "selectedVariant", publicName: "selectedVariant", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, isCheckboxDisabled: { classPropertyName: "isCheckboxDisabled", publicName: "isCheckboxDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardSelected: "cardSelected" }, ngImport: i0, template: "<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n>\n <ui-checkbox class=\"selectable-card-checkbox\" [checked]=\"isSelected()\" [disabled]=\"isCheckboxDisabled()\">\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n", styles: [".selectable-card .selectable-card-checkbox{display:block;margin-top:-11px;margin-left:-11px}\n"], dependencies: [{ kind: "component", type: i1.CardComponent, selector: "ui-card", inputs: ["size", "sizeVariant", "variant", "applicationTheme", "errors", "errorsSize", "selected", "allowSelect", "allowFocus"], outputs: ["cardSelected"] }, { kind: "component", type: i2.CheckboxComponent, selector: "ui-checkbox", inputs: ["disabled", "checked", "indeterminate", "companyColor", "name", "label", "multiple", "applicationTheme", "ariaLabel", "ariaRequired", "hasError", "hideBuiltInErrors", "hideLabelInErrors", "ariaLabelledby", "ariaDescribedby", "truncateText", "alignment", "tabIndex"], outputs: ["changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
56
56
|
}
|
|
57
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SelectableCardComponent, decorators: [{
|
|
58
58
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-selectable-card.mjs","sources":["../../../components/selectable-card/selectable-card.component.ts","../../../components/selectable-card/selectable-card.component.html","../../../components/selectable-card/selectable-card.component.module.ts","../../../components/selectable-card/testgorilla-tgo-ui-components-selectable-card.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output, signal } from '@angular/core';\nimport { CardSize, CardVariant } from '@testgorilla/tgo-ui/components/card';\n\n@Component({\n selector: 'ui-selectable-card',\n templateUrl: './selectable-card.component.html',\n styleUrls: ['./selectable-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class SelectableCardComponent {\n /**\n * Card size. Defaults to \"medium\".\n */\n size = input<CardSize>('medium');\n\n /**\n * Card variant/design for selected state. Defaults to \"default\".\n */\n selectedVariant = input<CardVariant>('state');\n\n /**\n * Whether the card is selected (input from parent).\n */\n selected = input<boolean>(false);\n\n /**\n * Whether the checkbox is disabled.\n */\n isCheckboxDisabled = input<boolean>(false);\n\n /**\n * Event emitted when the card is selected, with the current selected state.\n */\n cardSelected = output<boolean>();\n\n /**\n * Internal override for selected state (when user interacts).\n */\n private internalSelectedOverride = signal<boolean | null>(null);\n\n /**\n * Computed selected state that prioritizes user interaction over input.\n */\n isSelected = computed(() => {\n const override = this.internalSelectedOverride();\n return override !== null ? override : this.selected();\n });\n\n /**\n * Handles card selection, toggles internal state and emits the new value.\n */\n handleSelect(): void {\n if (this.isCheckboxDisabled()) {\n return;\n }\n\n const newValue = !this.isSelected();\n this.internalSelectedOverride.set(newValue);\n this.cardSelected.emit(newValue);\n }\n}\n","<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n>\n <ui-checkbox class=\"selectable-card-checkbox\" [checked]=\"isSelected()\" [disabled]=\"isCheckboxDisabled()\">\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SelectableCardComponent } from './selectable-card.component';\nimport { CardComponentModule } from '@testgorilla/tgo-ui/components/card';\nimport { CheckboxComponentModule } from '@testgorilla/tgo-ui/components/checkbox';\n\n@NgModule({\n declarations: [SelectableCardComponent],\n imports: [CommonModule, CardComponentModule, CheckboxComponentModule],\n exports: [SelectableCardComponent],\n})\nexport class SelectableCardComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAUa,uBAAuB,CAAA;AAPpC,IAAA,WAAA,GAAA;AAQE;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAW,QAAQ,CAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAc,OAAO,CAAC;AAE7C;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAU,KAAK,CAAC;AAE1C;;AAEG;QACH,IAAY,CAAA,YAAA,GAAG,MAAM,EAAW;AAEhC;;AAEG;AACK,QAAA,IAAA,CAAA,wBAAwB,GAAG,MAAM,CAAiB,IAAI,CAAC;AAE/D;;AAEG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAK;AACzB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,wBAAwB,EAAE;AAChD,YAAA,OAAO,QAAQ,KAAK,IAAI,GAAG,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;AACvD,SAAC,CAAC;AAcH;AAZC;;AAEG;IACH,YAAY,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE,EAAE;YAC7B;;AAGF,QAAA,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE;AAC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AA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAGb,eAAA,EAAA,uBAAuB,CAAC,MAAM,cACnC,KAAK,EAAA,QAAA,EAAA,ioBAAA,EAAA,MAAA,EAAA,CAAA,gGAAA,CAAA,EAAA;;;MEGR,6BAA6B,CAAA;+GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAA7B,6BAA6B,EAAA,YAAA,EAAA,CAJzB,uBAAuB,CAC5B,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAC1D,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,EAH9B,OAAA,EAAA,CAAA,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;;4FAGzD,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBALzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;AACvC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,CAAC;oBACrE,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-selectable-card.mjs","sources":["../../../components/selectable-card/selectable-card.component.ts","../../../components/selectable-card/selectable-card.component.html","../../../components/selectable-card/selectable-card.component.module.ts","../../../components/selectable-card/testgorilla-tgo-ui-components-selectable-card.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output, signal } from '@angular/core';\nimport { CardSize, CardVariant } from '@testgorilla/tgo-ui/components/card';\n\n@Component({\n selector: 'ui-selectable-card',\n templateUrl: './selectable-card.component.html',\n styleUrls: ['./selectable-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class SelectableCardComponent {\n /**\n * Card size. Defaults to \"medium\".\n */\n size = input<CardSize>('medium');\n\n /**\n * Card variant/design for selected state. Defaults to \"default\".\n */\n selectedVariant = input<CardVariant>('state');\n\n /**\n * Whether the card is selected (input from parent).\n */\n selected = input<boolean>(false);\n\n /**\n * Whether the checkbox is disabled.\n */\n isCheckboxDisabled = input<boolean>(false);\n\n /**\n * Event emitted when the card is selected, with the current selected state.\n */\n cardSelected = output<boolean>();\n\n /**\n * Internal override for selected state (when user interacts).\n */\n private internalSelectedOverride = signal<boolean | null>(null);\n\n /**\n * Computed selected state that prioritizes user interaction over input.\n */\n isSelected = computed(() => {\n const override = this.internalSelectedOverride();\n return override !== null ? override : this.selected();\n });\n\n /**\n * Handles card selection, toggles internal state and emits the new value.\n */\n handleSelect(): void {\n if (this.isCheckboxDisabled()) {\n return;\n }\n\n const newValue = !this.isSelected();\n this.internalSelectedOverride.set(newValue);\n this.cardSelected.emit(newValue);\n }\n}\n","<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n>\n <ui-checkbox class=\"selectable-card-checkbox\" [checked]=\"isSelected()\" [disabled]=\"isCheckboxDisabled()\">\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SelectableCardComponent } from './selectable-card.component';\nimport { CardComponentModule } from '@testgorilla/tgo-ui/components/card';\nimport { CheckboxComponentModule } from '@testgorilla/tgo-ui/components/checkbox';\n\n@NgModule({\n declarations: [SelectableCardComponent],\n imports: [CommonModule, CardComponentModule, CheckboxComponentModule],\n exports: [SelectableCardComponent],\n})\nexport class SelectableCardComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAUa,uBAAuB,CAAA;AAPpC,IAAA,WAAA,GAAA;AAQE;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAW,QAAQ,CAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAc,OAAO,CAAC;AAE7C;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAU,KAAK,CAAC;AAE1C;;AAEG;QACH,IAAY,CAAA,YAAA,GAAG,MAAM,EAAW;AAEhC;;AAEG;AACK,QAAA,IAAA,CAAA,wBAAwB,GAAG,MAAM,CAAiB,IAAI,CAAC;AAE/D;;AAEG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAK;AACzB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,wBAAwB,EAAE;AAChD,YAAA,OAAO,QAAQ,KAAK,IAAI,GAAG,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;AACvD,SAAC,CAAC;AAcH;AAZC;;AAEG;IACH,YAAY,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE,EAAE;YAC7B;;AAGF,QAAA,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE;AACnC,QAAA,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC3C,QAAA,IAAI,CAAC,YAAY,CAAC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,EAAA,QAAA,EAAA,ioBAAA,EAAA,MAAA,EAAA,CAAA,gGAAA,CAAA,EAAA;;;MEGR,6BAA6B,CAAA;+GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAA7B,6BAA6B,EAAA,YAAA,EAAA,CAJzB,uBAAuB,CAC5B,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAC1D,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAEtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,EAH9B,OAAA,EAAA,CAAA,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;;4FAGzD,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBALzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;AACvC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,CAAC;oBACrE,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -3,16 +3,15 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { Input, Optional, Inject, Component, Injectable, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/material/snack-bar';
|
|
5
5
|
import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
6
|
-
import * as
|
|
6
|
+
import * as i6 from '@testgorilla/tgo-ui/components/core';
|
|
7
7
|
import { alertBarsUtil, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';
|
|
8
|
-
import * as i2 from '@angular/
|
|
9
|
-
import * as i3 from '@angular/common';
|
|
8
|
+
import * as i2 from '@angular/common';
|
|
10
9
|
import { CommonModule } from '@angular/common';
|
|
11
|
-
import * as
|
|
10
|
+
import * as i3 from '@testgorilla/tgo-ui/components/button';
|
|
12
11
|
import { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';
|
|
13
|
-
import * as
|
|
12
|
+
import * as i4 from '@testgorilla/tgo-ui/components/icon';
|
|
14
13
|
import { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';
|
|
15
|
-
import * as
|
|
14
|
+
import * as i5 from '@angular/material/tooltip';
|
|
16
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
17
16
|
|
|
18
17
|
class SnackbarComponent {
|
|
@@ -23,14 +22,13 @@ class SnackbarComponent {
|
|
|
23
22
|
*/
|
|
24
23
|
set html(value) {
|
|
25
24
|
if (value) {
|
|
26
|
-
this.safeHtml =
|
|
25
|
+
this.safeHtml = value;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
|
-
constructor(defaultAppTheme, data, snackbarRef
|
|
28
|
+
constructor(defaultAppTheme, data, snackbarRef) {
|
|
30
29
|
this.defaultAppTheme = defaultAppTheme;
|
|
31
30
|
this.data = data;
|
|
32
31
|
this.snackbarRef = snackbarRef;
|
|
33
|
-
this.domSanitizer = domSanitizer;
|
|
34
32
|
/**
|
|
35
33
|
* Background color of the button while in active state
|
|
36
34
|
*
|
|
@@ -115,7 +113,7 @@ class SnackbarComponent {
|
|
|
115
113
|
}
|
|
116
114
|
this.snackbarType = data.snackbarType ?? 'success';
|
|
117
115
|
this.message = data.message ?? '';
|
|
118
|
-
this.safeHtml = data.html
|
|
116
|
+
this.safeHtml = data.html ?? '';
|
|
119
117
|
this.linkText = data.link?.text ?? '';
|
|
120
118
|
this.linkUrl = data.link?.url ?? '';
|
|
121
119
|
this.seconds = data.seconds ?? 5;
|
|
@@ -174,8 +172,8 @@ class SnackbarComponent {
|
|
|
174
172
|
this.snackbarRef.dismiss();
|
|
175
173
|
}
|
|
176
174
|
}
|
|
177
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SnackbarComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }, { token: MAT_SNACK_BAR_DATA }, { token: i1.MatSnackBarRef }
|
|
178
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: SnackbarComponent, isStandalone: false, selector: "ui-snackbar", inputs: { snackbarType: "snackbarType", message: "message", html: "html", seconds: "seconds", includeDismissButton: "includeDismissButton", fixed: "fixed", linkText: "linkText", linkUrl: "linkUrl", linkTarget: "linkTarget", variant: "variant", applicationTheme: "applicationTheme", closeButtonTooltip: "closeButtonTooltip", ariaDescribedby: "ariaDescribedby" }, ngImport: i0, template: "<ng-container>\n <div\n [ngClass]=\"snackbarType + ' ' + position\"\n [@openClose]\n *ngIf=\"visible\"\n class=\"snackbar-container\"\n [attr.theme]=\"applicationTheme\"\n [class.mobile]=\"variant === 'mobile'\"\n [class.desktop]=\"variant === 'desktop'\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n data-testid=\"snackbar-wrapper\"\n [attr.data-test-snackbar-type]=\"snackbarType\"\n [attr.aria-describedby]=\"'describedby'\"\n role=\"alert\"\n [attr.aria-labelledby]=\"'labelledby'\"\n >\n <span style=\"position: absolute; left: -9999px\" id=\"labelledby\">{{ ('ALERT_BANNER.' + (snackbarType | uppercase)) | uiTranslate | async }}</span>\n <span style=\"position: absolute; left: -9999px\">{{ message }}\n <a *ngIf=\"!!linkText\" [target]=\"linkTarget\" [href]=\"linkUrl\" (click)=\"onLinkClick($event)\">{{ linkText }}</a>\n </span>\n <span [style.display]=\"'none'\" id=\"describedby\">{{ ariaDescribedby }}</span>\n <div\n aria-hidden=\"true\"\n class=\"snackbar-text\"\n [matTooltip]=\"message.length > maxCharacters ? message : ''\"\n data-testid=\"snackbar-content\"\n >\n <ui-icon *ngIf=\"applicationTheme === 'classic'\" [name]=\"iconName\" size=\"24\"></ui-icon>\n {{ message.length > maxCharacters ? (message | slice: 0:maxCharacters) + '..' : message }}\n <div *ngIf=\"safeHtml\" [innerHTML]=\"safeHtml\"></div>\n <a *ngIf=\"!!linkText\" [target]=\"linkTarget\" [href]=\"linkUrl\" (click)=\"onLinkClick($event)\">{{ linkText }}</a>\n </div>\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme === 'classic'\"\n variant=\"text\"\n [label]=\"(translationContext + 'DISMISS' | uiTranslate | async)!\"\n [applicationTheme]=\"applicationTheme !== 'classic' ? 'light' : 'classic'\"\n (buttonClickEvent)=\"dismissClick()\"\n data-testid=\"snackbar-dismiss-button\"\n ></ui-button>\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme !== 'classic'\"\n [variant]=\"'icon-button'\"\n [applicationTheme]=\"'light'\"\n [iconName]=\"'Close-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"(closeButtonTooltip || ('COMMON.CLOSE' | uiTranslate | async))!\"\n (click)=\"dismissClick()\"\n data-testid=\"snackbar-dismiss-button\"\n ></ui-button>\n </div>\n</ng-container>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:flex;width:100%;justify-content:center}:host .snackbar-container{max-width:600px}:host .alert-container,:host .snackbar-container{margin:0 auto;display:flex;padding:0 14px;border-radius:4px;align-items:center;justify-content:space-between;opacity:1;min-height:48px}:host .alert-container.fixed,:host .snackbar-container.fixed{position:fixed}:host .alert-container.static,:host .snackbar-container.static{position:relative}:host .alert-container ui-icon,:host .snackbar-container ui-icon{margin-right:14px}:host .alert-container ui-button,:host .snackbar-container ui-button{margin-left:14px}:host .alert-container ::ng-deep button.mat-mdc-unelevated-button.big,:host .snackbar-container ::ng-deep button.mat-mdc-unelevated-button.big{padding:0;min-width:auto}:host .alert-container .alert-text,:host .alert-container .snackbar-text,:host .snackbar-container .alert-text,:host .snackbar-container .snackbar-text{display:flex;align-items:center;color:#000}:host .alert-container .alert-text a,:host .alert-container .snackbar-text a,:host .snackbar-container .alert-text a,:host .snackbar-container .snackbar-text a{color:#000;text-decoration:underline;font-weight:700}:host .alert-container .alert-text a:hover,:host .alert-container .alert-text a:visited,:host .alert-container .alert-text a:focus,:host .alert-container .snackbar-text a:hover,:host .alert-container .snackbar-text a:visited,:host .alert-container .snackbar-text a:focus,:host .snackbar-container .alert-text a:hover,:host .snackbar-container .alert-text a:visited,:host .snackbar-container .alert-text a:focus,:host .snackbar-container .snackbar-text a:hover,:host .snackbar-container .snackbar-text a:visited,:host .snackbar-container .snackbar-text a:focus{text-decoration:none}:host .alert-container.success,:host .snackbar-container.success{background-color:#cbd6cb}:host .alert-container.info,:host .snackbar-container.info{background-color:#c8d7de}:host .alert-container.warning,:host .snackbar-container.warning{background-color:#f0d6bb}:host .alert-container.error,:host .snackbar-container.error{background-color:#e3c3c6}:host .alert-container[theme=dark].success,:host .alert-container[theme=light].success,:host .snackbar-container[theme=dark].success,:host .snackbar-container[theme=light].success{background-color:#aae47a}:host .alert-container[theme=dark].info,:host .alert-container[theme=light].info,:host .snackbar-container[theme=dark].info,:host .snackbar-container[theme=light].info{background-color:#d9e8ff}:host .alert-container[theme=dark].warning,:host .alert-container[theme=light].warning,:host .snackbar-container[theme=dark].warning,:host .snackbar-container[theme=light].warning{background-color:#ffe1b3}:host .alert-container[theme=dark].error,:host .alert-container[theme=light].error,:host .snackbar-container[theme=dark].error,:host .snackbar-container[theme=light].error{background-color:#ffac9a}::ng-deep .display-none{display:none!important}@media (max-width: 600px){:host .alert-container,:host .snackbar-container{padding:8px 14px}}:host .snackbar-container{bottom:0;z-index:98}:host .snackbar-container[theme=dark] ui-icon,:host .snackbar-container[theme=light] ui-icon{margin-right:10px;cursor:pointer}:host .snackbar-container[theme=dark] .snackbar-text,:host .snackbar-container[theme=light] .snackbar-text{padding-left:10px;margin-right:8px}:host .snackbar-container[theme=dark] .snackbar-text a,:host .snackbar-container[theme=light] .snackbar-text a{margin-left:4px}:host .snackbar-container[theme=dark].desktop,:host .snackbar-container[theme=light].desktop{border-radius:24px;box-shadow:0 4px 16px #2424240a;width:fit-content;max-width:600px;min-height:48px;line-height:1.4;font-size:14px;padding:16px 24px}:host .snackbar-container[theme=dark].mobile,:host .snackbar-container[theme=light].mobile{width:100%;min-width:100%;word-break:break-word}:host .mat-mdc-snack-bar-container{margin:16px 8px}::ng-deep .mdc-snackbar__surface{height:0}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "component", type: i5.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i3.SlicePipe, name: "slice" }, { kind: "pipe", type: i7.UiTranslatePipe, name: "uiTranslate" }], animations: [
|
|
175
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SnackbarComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }, { token: MAT_SNACK_BAR_DATA }, { token: i1.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
176
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: SnackbarComponent, isStandalone: false, selector: "ui-snackbar", inputs: { snackbarType: "snackbarType", message: "message", html: "html", seconds: "seconds", includeDismissButton: "includeDismissButton", fixed: "fixed", linkText: "linkText", linkUrl: "linkUrl", linkTarget: "linkTarget", variant: "variant", applicationTheme: "applicationTheme", closeButtonTooltip: "closeButtonTooltip", ariaDescribedby: "ariaDescribedby" }, ngImport: i0, template: "<ng-container>\n <div\n [ngClass]=\"snackbarType + ' ' + position\"\n [@openClose]\n *ngIf=\"visible\"\n class=\"snackbar-container\"\n [attr.theme]=\"applicationTheme\"\n [class.mobile]=\"variant === 'mobile'\"\n [class.desktop]=\"variant === 'desktop'\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n data-testid=\"snackbar-wrapper\"\n [attr.data-test-snackbar-type]=\"snackbarType\"\n [attr.aria-describedby]=\"'describedby'\"\n role=\"alert\"\n [attr.aria-labelledby]=\"'labelledby'\"\n >\n <span style=\"position: absolute; left: -9999px\" id=\"labelledby\">{{ ('ALERT_BANNER.' + (snackbarType | uppercase)) | uiTranslate | async }}</span>\n <span style=\"position: absolute; left: -9999px\">{{ message }}\n <a *ngIf=\"!!linkText\" [target]=\"linkTarget\" [href]=\"linkUrl\" (click)=\"onLinkClick($event)\">{{ linkText }}</a>\n </span>\n <span [style.display]=\"'none'\" id=\"describedby\">{{ ariaDescribedby }}</span>\n <div\n aria-hidden=\"true\"\n class=\"snackbar-text\"\n [matTooltip]=\"message.length > maxCharacters ? message : ''\"\n data-testid=\"snackbar-content\"\n >\n <ui-icon *ngIf=\"applicationTheme === 'classic'\" [name]=\"iconName\" size=\"24\"></ui-icon>\n {{ message.length > maxCharacters ? (message | slice: 0:maxCharacters) + '..' : message }}\n <div *ngIf=\"safeHtml\" [innerHTML]=\"safeHtml\"></div>\n <a *ngIf=\"!!linkText\" [target]=\"linkTarget\" [href]=\"linkUrl\" (click)=\"onLinkClick($event)\">{{ linkText }}</a>\n </div>\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme === 'classic'\"\n variant=\"text\"\n [label]=\"(translationContext + 'DISMISS' | uiTranslate | async)!\"\n [applicationTheme]=\"applicationTheme !== 'classic' ? 'light' : 'classic'\"\n (buttonClickEvent)=\"dismissClick()\"\n data-testid=\"snackbar-dismiss-button\"\n ></ui-button>\n <ui-button\n *ngIf=\"includeDismissButton && applicationTheme !== 'classic'\"\n [variant]=\"'icon-button'\"\n [applicationTheme]=\"'light'\"\n [iconName]=\"'Close-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"(closeButtonTooltip || ('COMMON.CLOSE' | uiTranslate | async))!\"\n (click)=\"dismissClick()\"\n data-testid=\"snackbar-dismiss-button\"\n ></ui-button>\n </div>\n</ng-container>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:flex;width:100%;justify-content:center}:host .snackbar-container{max-width:600px}:host .alert-container,:host .snackbar-container{margin:0 auto;display:flex;padding:0 14px;border-radius:4px;align-items:center;justify-content:space-between;opacity:1;min-height:48px}:host .alert-container.fixed,:host .snackbar-container.fixed{position:fixed}:host .alert-container.static,:host .snackbar-container.static{position:relative}:host .alert-container ui-icon,:host .snackbar-container ui-icon{margin-right:14px}:host .alert-container ui-button,:host .snackbar-container ui-button{margin-left:14px}:host .alert-container ::ng-deep button.mat-mdc-unelevated-button.big,:host .snackbar-container ::ng-deep button.mat-mdc-unelevated-button.big{padding:0;min-width:auto}:host .alert-container .alert-text,:host .alert-container .snackbar-text,:host .snackbar-container .alert-text,:host .snackbar-container .snackbar-text{display:flex;align-items:center;color:#000}:host .alert-container .alert-text a,:host .alert-container .snackbar-text a,:host .snackbar-container .alert-text a,:host .snackbar-container .snackbar-text a{color:#000;text-decoration:underline;font-weight:700}:host .alert-container .alert-text a:hover,:host .alert-container .alert-text a:visited,:host .alert-container .alert-text a:focus,:host .alert-container .snackbar-text a:hover,:host .alert-container .snackbar-text a:visited,:host .alert-container .snackbar-text a:focus,:host .snackbar-container .alert-text a:hover,:host .snackbar-container .alert-text a:visited,:host .snackbar-container .alert-text a:focus,:host .snackbar-container .snackbar-text a:hover,:host .snackbar-container .snackbar-text a:visited,:host .snackbar-container .snackbar-text a:focus{text-decoration:none}:host .alert-container.success,:host .snackbar-container.success{background-color:#cbd6cb}:host .alert-container.info,:host .snackbar-container.info{background-color:#c8d7de}:host .alert-container.warning,:host .snackbar-container.warning{background-color:#f0d6bb}:host .alert-container.error,:host .snackbar-container.error{background-color:#e3c3c6}:host .alert-container[theme=dark].success,:host .alert-container[theme=light].success,:host .snackbar-container[theme=dark].success,:host .snackbar-container[theme=light].success{background-color:#aae47a}:host .alert-container[theme=dark].info,:host .alert-container[theme=light].info,:host .snackbar-container[theme=dark].info,:host .snackbar-container[theme=light].info{background-color:#d9e8ff}:host .alert-container[theme=dark].warning,:host .alert-container[theme=light].warning,:host .snackbar-container[theme=dark].warning,:host .snackbar-container[theme=light].warning{background-color:#ffe1b3}:host .alert-container[theme=dark].error,:host .alert-container[theme=light].error,:host .snackbar-container[theme=dark].error,:host .snackbar-container[theme=light].error{background-color:#ffac9a}::ng-deep .display-none{display:none!important}@media (max-width: 600px){:host .alert-container,:host .snackbar-container{padding:8px 14px}}:host .snackbar-container{bottom:0;z-index:98}:host .snackbar-container[theme=dark] ui-icon,:host .snackbar-container[theme=light] ui-icon{margin-right:10px;cursor:pointer}:host .snackbar-container[theme=dark] .snackbar-text,:host .snackbar-container[theme=light] .snackbar-text{padding-left:10px;margin-right:8px}:host .snackbar-container[theme=dark] .snackbar-text a,:host .snackbar-container[theme=light] .snackbar-text a{margin-left:4px}:host .snackbar-container[theme=dark].desktop,:host .snackbar-container[theme=light].desktop{border-radius:24px;box-shadow:0 4px 16px #2424240a;width:fit-content;max-width:600px;min-height:48px;line-height:1.4;font-size:14px;padding:16px 24px}:host .snackbar-container[theme=dark].mobile,:host .snackbar-container[theme=light].mobile{width:100%;min-width:100%;word-break:break-word}:host .mat-mdc-snack-bar-container{margin:16px 8px}::ng-deep .mdc-snackbar__surface{height:0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "disabled", "loading", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "component", type: i4.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i2.SlicePipe, name: "slice" }, { kind: "pipe", type: i6.UiTranslatePipe, name: "uiTranslate" }], animations: [
|
|
179
177
|
trigger('openClose', [
|
|
180
178
|
transition(':enter', [
|
|
181
179
|
style({ bottom: '-55px', opacity: 0 }),
|
|
@@ -210,7 +208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
210
208
|
}] }, { type: undefined, decorators: [{
|
|
211
209
|
type: Inject,
|
|
212
210
|
args: [MAT_SNACK_BAR_DATA]
|
|
213
|
-
}] }, { type: i1.MatSnackBarRef }
|
|
211
|
+
}] }, { type: i1.MatSnackBarRef }], propDecorators: { snackbarType: [{
|
|
214
212
|
type: Input
|
|
215
213
|
}], message: [{
|
|
216
214
|
type: Input
|