@ascentgl/ads-ui 21.64.0 → 21.65.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.
|
@@ -2444,18 +2444,25 @@ class AbstractBaseComponent {
|
|
|
2444
2444
|
if (this.valueControl.errors) {
|
|
2445
2445
|
this.valueControl.setErrors(null);
|
|
2446
2446
|
}
|
|
2447
|
+
// hadRequiredValidator stays as is - we remember if it was required originally
|
|
2447
2448
|
}
|
|
2448
2449
|
else {
|
|
2449
2450
|
// When non-empty -> restore validators.
|
|
2450
2451
|
this.valueControl.setValidators(this.originalValidator);
|
|
2451
2452
|
this.valueControl.setAsyncValidators(this.originalAsyncValidator);
|
|
2453
|
+
// Don't update hadRequiredValidator here - it was set from originalValidator initially
|
|
2452
2454
|
}
|
|
2453
2455
|
}, 0);
|
|
2454
2456
|
});
|
|
2455
2457
|
// Subscribe to status changes to update hadRequiredValidator when validators are externally added/removed
|
|
2456
2458
|
// This ensures the asterisk is correctly shown/hidden after addValidators/removeValidators calls
|
|
2459
|
+
// But skip updates during skipValidationWhenEmpty mode where validators are managed internally
|
|
2457
2460
|
const statusSub = this.valueControl.statusChanges.subscribe(() => {
|
|
2458
|
-
|
|
2461
|
+
// Only update hadRequiredValidator if we're not in skipValidationWhenEmpty mode
|
|
2462
|
+
// When skipValidationWhenEmpty is active, we preserve the original validator state
|
|
2463
|
+
if (!this.skipValidationWhenEmpty) {
|
|
2464
|
+
this.hadRequiredValidator = this.valueControl.hasValidator(Validators.required);
|
|
2465
|
+
}
|
|
2459
2466
|
});
|
|
2460
2467
|
this.destroyRef.onDestroy(() => {
|
|
2461
2468
|
subscription.unsubscribe();
|
|
@@ -2469,10 +2476,9 @@ class AbstractBaseComponent {
|
|
|
2469
2476
|
}
|
|
2470
2477
|
/** @ignore */
|
|
2471
2478
|
get required() {
|
|
2472
|
-
// When skipValidationWhenEmpty is active
|
|
2473
|
-
//
|
|
2474
|
-
|
|
2475
|
-
if (this.skipValidationWhenEmpty && this.isEmptyValue(this.valueControl.value)) {
|
|
2479
|
+
// When skipValidationWhenEmpty is active, always use hadRequiredValidator to preserve the asterisk
|
|
2480
|
+
// regardless of whether the value is empty or not, because validators may be temporarily removed.
|
|
2481
|
+
if (this.skipValidationWhenEmpty) {
|
|
2476
2482
|
return this.hadRequiredValidator;
|
|
2477
2483
|
}
|
|
2478
2484
|
return this.valueControl.hasValidator(Validators.required);
|
|
@@ -10367,11 +10373,19 @@ const canadianAreaCodes = [
|
|
|
10367
10373
|
'905',
|
|
10368
10374
|
];
|
|
10369
10375
|
|
|
10376
|
+
var CountryCode;
|
|
10377
|
+
(function (CountryCode) {
|
|
10378
|
+
CountryCode["US"] = "US";
|
|
10379
|
+
CountryCode["CA"] = "CA";
|
|
10380
|
+
CountryCode["MX"] = "MX";
|
|
10381
|
+
})(CountryCode || (CountryCode = {}));
|
|
10370
10382
|
class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
10371
10383
|
constructor() {
|
|
10372
|
-
super(
|
|
10384
|
+
super();
|
|
10373
10385
|
/** Optional "id" attribute for dropdown field */
|
|
10374
10386
|
this.dropdownId = '';
|
|
10387
|
+
/** Country code to display in the dropdown */
|
|
10388
|
+
this.selectedCountry = input(...(ngDevMode ? [undefined, { debugName: "selectedCountry" }] : []));
|
|
10375
10389
|
/** Enable auto-close when component scrolls out of viewport */
|
|
10376
10390
|
this.closeOnOutOfView = false;
|
|
10377
10391
|
/** Root margin for intersection observer (CSS margin format: top right bottom left) */
|
|
@@ -10380,9 +10394,9 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
10380
10394
|
this.phoneMask = '(000) 000-0000';
|
|
10381
10395
|
/** @ignore */
|
|
10382
10396
|
this.countryOptions = [
|
|
10383
|
-
{ name: 'United States', code: '+1', iso:
|
|
10384
|
-
{ name: 'Mexico', code: '+52', iso:
|
|
10385
|
-
{ name: 'Canada', code: '+1', iso:
|
|
10397
|
+
{ name: 'United States', code: '+1', iso: CountryCode.US },
|
|
10398
|
+
{ name: 'Mexico', code: '+52', iso: CountryCode.MX },
|
|
10399
|
+
{ name: 'Canada', code: '+1', iso: CountryCode.CA },
|
|
10386
10400
|
];
|
|
10387
10401
|
/** @ignore */
|
|
10388
10402
|
this.flagBase64 = {
|
|
@@ -10396,6 +10410,11 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
10396
10410
|
this.inputControl = new FormControl();
|
|
10397
10411
|
/** @ignore */
|
|
10398
10412
|
this.isInternalChange = false;
|
|
10413
|
+
/** @ignore */
|
|
10414
|
+
this.onInputBlur = () => {
|
|
10415
|
+
this.inputControl.markAsTouched({ emitEvent: false });
|
|
10416
|
+
this.valueControl.updateValueAndValidity({ emitEvent: false });
|
|
10417
|
+
};
|
|
10399
10418
|
this.validateMask = (control) => {
|
|
10400
10419
|
const value = (control.value || '').trim();
|
|
10401
10420
|
/**
|
|
@@ -10410,6 +10429,23 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
10410
10429
|
const digitCount = value.length - this.dropdownControl.value.code.length;
|
|
10411
10430
|
return digitCount === 10 ? null : { mask: true };
|
|
10412
10431
|
};
|
|
10432
|
+
// Effect to handle selectedCountry changes
|
|
10433
|
+
effect(() => {
|
|
10434
|
+
const countryCode = this.selectedCountry();
|
|
10435
|
+
if (countryCode && this.dropdownControl) {
|
|
10436
|
+
const country = this.countryOptions.find((opt) => opt.iso === countryCode);
|
|
10437
|
+
if (country && this.dropdownControl.value?.iso !== countryCode) {
|
|
10438
|
+
this.isInternalChange = true;
|
|
10439
|
+
this.dropdownControl.setValue(country, { emitEvent: false });
|
|
10440
|
+
// If there's a value in inputControl, update the valueControl with new country code
|
|
10441
|
+
if (this.inputControl.value) {
|
|
10442
|
+
const phone = this.inputControl.value;
|
|
10443
|
+
this.valueControl.setValue(country.code + phone, { emitEvent: true });
|
|
10444
|
+
}
|
|
10445
|
+
this.isInternalChange = false;
|
|
10446
|
+
}
|
|
10447
|
+
}
|
|
10448
|
+
});
|
|
10413
10449
|
}
|
|
10414
10450
|
/** @ignore */
|
|
10415
10451
|
getNorthAmericanCountry(phone) {
|
|
@@ -10458,6 +10494,12 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
10458
10494
|
}
|
|
10459
10495
|
this.inputControl.valueChanges.subscribe(() => this.provideValueToTheValueControl());
|
|
10460
10496
|
this.dropdownControl.valueChanges.subscribe(() => this.provideValueToTheValueControl());
|
|
10497
|
+
// Set initial country based on selectedCountry signal (default to US if not provided)
|
|
10498
|
+
const initialCountry = this.selectedCountry() || CountryCode.US;
|
|
10499
|
+
const country = this.countryOptions.find((opt) => opt.iso === initialCountry);
|
|
10500
|
+
if (country) {
|
|
10501
|
+
this.dropdownControl.setValue(country, { emitEvent: false });
|
|
10502
|
+
}
|
|
10461
10503
|
}
|
|
10462
10504
|
/** @ignore */
|
|
10463
10505
|
disableControls() {
|
|
@@ -10518,8 +10560,6 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
10518
10560
|
}
|
|
10519
10561
|
/** @ignore */
|
|
10520
10562
|
getFlag(option) {
|
|
10521
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
10522
|
-
// @ts-expect-error
|
|
10523
10563
|
return this.flagBase64[option.iso];
|
|
10524
10564
|
}
|
|
10525
10565
|
/** @ignore */
|
|
@@ -10530,7 +10570,6 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
10530
10570
|
const phone = this.inputControl.value;
|
|
10531
10571
|
this.isInternalChange = true;
|
|
10532
10572
|
this.valueControl.setValue(phone ? code + phone : null);
|
|
10533
|
-
this.inputControl.markAsTouched({ emitEvent: false });
|
|
10534
10573
|
this.isInternalChange = false;
|
|
10535
10574
|
}
|
|
10536
10575
|
/** @ignore */
|
|
@@ -10567,15 +10606,15 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
10567
10606
|
return `${this.genericError} (${firstErrorKey})`;
|
|
10568
10607
|
}
|
|
10569
10608
|
}
|
|
10570
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AdsInternationalPhoneFieldComponent, deps:
|
|
10571
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AdsInternationalPhoneFieldComponent, isStandalone: false, selector: "ads-international-phone-field", inputs: { dropdownId: "dropdownId", closeOnOutOfView: "closeOnOutOfView", outOfViewRootMargin: "outOfViewRootMargin" }, viewQueries: [{ propertyName: "wrapperRef", first: true, predicate: ["wrapperRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"form-field-wrapper\" [ngStyle]=\"{ width: width }\" #wrapperRef>\n <div class=\"form-controls-wrapper\">\n <div\n class=\"select-box\"\n [ngClass]=\"{ invalid: valueControl.invalid && valueControl.touched }\"\n [ngStyle]=\"{ width: '87px' }\"\n >\n <ads-dropdown\n [control]=\"dropdownControl\"\n [id]=\"dropdownId\"\n [options]=\"countryOptions\"\n [immediateValidation]=\"immediateValidation\"\n [optionTemplate]=\"optionTemplate\"\n [fitContent]=\"true\"\n [showFooter]=\"false\"\n [checkSelected]=\"false\"\n [size]=\"size\"\n [successMessage]=\"successMessage\"\n [triggerTemplate]=\"triggerTemplate\"\n [panelClass]=\"'full-width-panel'\"\n [closeOnOutOfView]=\"closeOnOutOfView\"\n [outOfViewRootMargin]=\"outOfViewRootMargin\"\n />\n </div>\n <div\n class=\"text-box\"\n [ngClass]=\"{\n invalid: dropdownControl.invalid && dropdownControl.touched,\n 'success-label': canShowSuccess(),\n 'x-small': smallSize,\n }\"\n [ngStyle]=\"{ width: '100%' }\"\n >\n <ads-input\n [control]=\"inputControl\"\n [mask]=\"phoneMask\"\n [id]=\"id\"\n [width]=\"'100%'\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [showClearButton]=\"showClearButton\"\n [showExclamationOnError]=\"showExclamationOnError\"\n [immediateValidation]=\"immediateValidation\"\n [dropSpecialCharacters]=\"true\"\n [showFooter]=\"false\"\n [size]=\"size\"\n />\n </div>\n\n </div>\n <div class=\"footer-container\"\n [class.dynamic]=\"!isStaticFooter\"\n [class.has-content]=\"hasFooterContent()\">\n @if (canShowError()) {\n <ads-error [error]=\"displayFirstError()\" [ngStyle]=\"{ width: width }\" />\n } @else if (canShowSuccess()) {\n <ads-success [success]=\"successMessage!\" [ngStyle]=\"{ width: width }\" />\n } @else if (hint) {\n <ads-hint [hint]=\"hint\" [control]=\"valueControl\" [ngStyle]=\"{ width: width }\" />\n }\n </div>\n</div>\n@if (tooltip) {\n <ads-input-tooltip [tooltip]=\"tooltip\" [smallSize]=\"smallSize\" [href]=\"tooltipHref\" />\n}\n\n<ng-template #optionTemplate let-option=\"option\">\n <div class=\"flag-option\">\n <div>\n <img [src]=\"getFlag(option)\" alt=\"flag\"/>\n <span>{{option.name}}</span>\n </div>\n <span class=\"code\">{{option.code}}</span>\n </div>\n</ng-template>\n\n<ng-template #triggerTemplate let-option=\"option\">\n <span>{{ option.code }}</span>\n</ng-template>\n", styles: [".footer-container{min-height:20px;overflow:hidden}.footer-container.dynamic{min-height:0;max-height:0;opacity:0;transition:max-height .3s ease-in-out,opacity .2s ease-in-out,min-height .3s ease-in-out}.footer-container.dynamic.has-content{min-height:20px;max-height:100px;opacity:1;transition:max-height .3s ease-in-out,opacity .3s ease-in-out .1s,min-height .3s ease-in-out}::ng-deep .mat-mdc-form-field{--mat-form-field-filled-input-text-placeholder-color: var(--color-medium) !important}::ng-deep .spinner{animation:spin 1s linear infinite;transform-origin:50% 50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n", ":host{display:flex;gap:12px;align-items:flex-start}.form-field-wrapper{display:flex;flex-direction:column}.form-field-wrapper .form-controls-wrapper{display:flex;width:100%}.form-field-wrapper .invalid ::ng-deep .mdc-text-field{border-color:var(--mdc-filled-text-field-error-label-text-color)}.form-field-wrapper .invalid.text-box ::ng-deep .mdc-text-field{border-right-width:1px}.form-field-wrapper .invalid.select-box ::ng-deep .mdc-text-field{border-left-width:1px;border-left-color:transparent}.form-field-wrapper .select-box ::ng-deep .mdc-text-field{border-left-width:1px;border-left-color:transparent;border-top-right-radius:0;border-bottom-right-radius:0}.form-field-wrapper .text-box{z-index:1}.form-field-wrapper .text-box ::ng-deep .mdc-text-field{border-top-left-radius:0;border-bottom-left-radius:0}.flag-option{display:flex;justify-content:space-between;align-items:center;width:100%}.flag-option div{display:flex;gap:8px;align-items:center}.flag-option div img{width:29px;height:19px}.flag-option span{font-size:16px;color:var(--color-medium);line-height:21px}.flag-option .code{color:var(--color-dark)}::ng-deep .full-width-panel{width:var(--full-width-panel)!important;min-width:var(--full-width-panel)!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AdsInputComponent, selector: "ads-input", inputs: ["maxlength", "type", "pattern", "defaultValue", "isPasswordField", "showClockIcon", "mask", "suffix", "prefix", "dropSpecialCharacters", "thousandSeparator", "decimalMarker", "matAutocomplete", "showSearchIcon", "onFocus", "onBlur", "rightHint"] }, { kind: "component", type: AdsDropdownComponent, selector: "ads-dropdown", inputs: ["displayValueFormatter", "mode", "hasEmptyValue", "checkSelected", "options", "optionTemplate", "triggerTemplate", "panelClass", "closeOnOutOfView", "outOfViewRootMargin"] }, { kind: "component", type: AdsErrorComponent, selector: "ads-error", inputs: ["error"] }, { kind: "component", type: AdsHintComponent, selector: "ads-hint", inputs: ["control", "hint"] }, { kind: "component", type: AdsInputTooltipComponent, selector: "ads-input-tooltip", inputs: ["tooltip", "smallSize", "href"] }, { kind: "component", type: AdsSuccessComponent, selector: "ads-success", inputs: ["success"] }] }); }
|
|
10609
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AdsInternationalPhoneFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10610
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AdsInternationalPhoneFieldComponent, isStandalone: false, selector: "ads-international-phone-field", inputs: { dropdownId: { classPropertyName: "dropdownId", publicName: "dropdownId", isSignal: false, isRequired: false, transformFunction: null }, selectedCountry: { classPropertyName: "selectedCountry", publicName: "selectedCountry", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutOfView: { classPropertyName: "closeOnOutOfView", publicName: "closeOnOutOfView", isSignal: false, isRequired: false, transformFunction: null }, outOfViewRootMargin: { classPropertyName: "outOfViewRootMargin", publicName: "outOfViewRootMargin", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "wrapperRef", first: true, predicate: ["wrapperRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"form-field-wrapper\" [ngStyle]=\"{ width: width }\" #wrapperRef>\n <div class=\"form-controls-wrapper\">\n <div\n class=\"select-box\"\n [ngClass]=\"{ invalid: valueControl.invalid && valueControl.touched }\"\n [ngStyle]=\"{ width: '87px' }\"\n >\n <ads-dropdown\n [control]=\"dropdownControl\"\n [id]=\"dropdownId\"\n [options]=\"countryOptions\"\n [immediateValidation]=\"immediateValidation\"\n [optionTemplate]=\"optionTemplate\"\n [fitContent]=\"true\"\n [showFooter]=\"false\"\n [checkSelected]=\"false\"\n [size]=\"size\"\n [successMessage]=\"successMessage\"\n [triggerTemplate]=\"triggerTemplate\"\n [panelClass]=\"'full-width-panel'\"\n [closeOnOutOfView]=\"closeOnOutOfView\"\n [outOfViewRootMargin]=\"outOfViewRootMargin\"\n />\n </div>\n <div\n class=\"text-box\"\n [ngClass]=\"{\n invalid: dropdownControl.invalid && dropdownControl.touched,\n 'success-label': canShowSuccess(),\n 'x-small': smallSize,\n }\"\n [ngStyle]=\"{ width: '100%' }\"\n >\n <ads-input\n [control]=\"inputControl\"\n [mask]=\"phoneMask\"\n [id]=\"id\"\n [width]=\"'100%'\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [showClearButton]=\"showClearButton\"\n [showExclamationOnError]=\"showExclamationOnError\"\n [immediateValidation]=\"immediateValidation\"\n [dropSpecialCharacters]=\"true\"\n [showFooter]=\"false\"\n [size]=\"size\"\n [onBlur]=\"onInputBlur\"\n />\n </div>\n\n </div>\n <div class=\"footer-container\"\n [class.dynamic]=\"!isStaticFooter\"\n [class.has-content]=\"hasFooterContent()\">\n @if (canShowError()) {\n <ads-error [error]=\"displayFirstError()\" [ngStyle]=\"{ width: width }\" />\n } @else if (canShowSuccess()) {\n <ads-success [success]=\"successMessage!\" [ngStyle]=\"{ width: width }\" />\n } @else if (hint) {\n <ads-hint [hint]=\"hint\" [control]=\"valueControl\" [ngStyle]=\"{ width: width }\" />\n }\n </div>\n</div>\n@if (tooltip) {\n <ads-input-tooltip [tooltip]=\"tooltip\" [smallSize]=\"smallSize\" [href]=\"tooltipHref\" />\n}\n\n<ng-template #optionTemplate let-option=\"option\">\n <div class=\"flag-option\">\n <div>\n <img [src]=\"getFlag(option)\" alt=\"flag\"/>\n <span>{{option.name}}</span>\n </div>\n <span class=\"code\">{{option.code}}</span>\n </div>\n</ng-template>\n\n<ng-template #triggerTemplate let-option=\"option\">\n <span>{{ option.code }}</span>\n</ng-template>\n", styles: [".footer-container{min-height:20px;overflow:hidden}.footer-container.dynamic{min-height:0;max-height:0;opacity:0;transition:max-height .3s ease-in-out,opacity .2s ease-in-out,min-height .3s ease-in-out}.footer-container.dynamic.has-content{min-height:20px;max-height:100px;opacity:1;transition:max-height .3s ease-in-out,opacity .3s ease-in-out .1s,min-height .3s ease-in-out}::ng-deep .mat-mdc-form-field{--mat-form-field-filled-input-text-placeholder-color: var(--color-medium) !important}::ng-deep .spinner{animation:spin 1s linear infinite;transform-origin:50% 50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n", ":host{display:flex;gap:12px;align-items:flex-start}.form-field-wrapper{display:flex;flex-direction:column}.form-field-wrapper .form-controls-wrapper{display:flex;width:100%}.form-field-wrapper .invalid ::ng-deep .mdc-text-field{border-color:var(--mdc-filled-text-field-error-label-text-color)}.form-field-wrapper .invalid.text-box ::ng-deep .mdc-text-field{border-right-width:1px}.form-field-wrapper .invalid.select-box ::ng-deep .mdc-text-field{border-left-width:1px;border-left-color:transparent}.form-field-wrapper .select-box ::ng-deep .mdc-text-field{border-left-width:1px;border-left-color:transparent;border-top-right-radius:0;border-bottom-right-radius:0}.form-field-wrapper .text-box{z-index:1}.form-field-wrapper .text-box ::ng-deep .mdc-text-field{border-top-left-radius:0;border-bottom-left-radius:0}.flag-option{display:flex;justify-content:space-between;align-items:center;width:100%}.flag-option div{display:flex;gap:8px;align-items:center}.flag-option div img{width:29px;height:19px}.flag-option span{font-size:16px;color:var(--color-medium);line-height:21px}.flag-option .code{color:var(--color-dark)}::ng-deep .full-width-panel{width:var(--full-width-panel)!important;min-width:var(--full-width-panel)!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AdsInputComponent, selector: "ads-input", inputs: ["maxlength", "type", "pattern", "defaultValue", "isPasswordField", "showClockIcon", "mask", "suffix", "prefix", "dropSpecialCharacters", "thousandSeparator", "decimalMarker", "matAutocomplete", "showSearchIcon", "onFocus", "onBlur", "rightHint"] }, { kind: "component", type: AdsDropdownComponent, selector: "ads-dropdown", inputs: ["displayValueFormatter", "mode", "hasEmptyValue", "checkSelected", "options", "optionTemplate", "triggerTemplate", "panelClass", "closeOnOutOfView", "outOfViewRootMargin"] }, { kind: "component", type: AdsErrorComponent, selector: "ads-error", inputs: ["error"] }, { kind: "component", type: AdsHintComponent, selector: "ads-hint", inputs: ["control", "hint"] }, { kind: "component", type: AdsInputTooltipComponent, selector: "ads-input-tooltip", inputs: ["tooltip", "smallSize", "href"] }, { kind: "component", type: AdsSuccessComponent, selector: "ads-success", inputs: ["success"] }] }); }
|
|
10572
10611
|
}
|
|
10573
10612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AdsInternationalPhoneFieldComponent, decorators: [{
|
|
10574
10613
|
type: Component,
|
|
10575
|
-
args: [{ selector: 'ads-international-phone-field', standalone: false, template: "<div class=\"form-field-wrapper\" [ngStyle]=\"{ width: width }\" #wrapperRef>\n <div class=\"form-controls-wrapper\">\n <div\n class=\"select-box\"\n [ngClass]=\"{ invalid: valueControl.invalid && valueControl.touched }\"\n [ngStyle]=\"{ width: '87px' }\"\n >\n <ads-dropdown\n [control]=\"dropdownControl\"\n [id]=\"dropdownId\"\n [options]=\"countryOptions\"\n [immediateValidation]=\"immediateValidation\"\n [optionTemplate]=\"optionTemplate\"\n [fitContent]=\"true\"\n [showFooter]=\"false\"\n [checkSelected]=\"false\"\n [size]=\"size\"\n [successMessage]=\"successMessage\"\n [triggerTemplate]=\"triggerTemplate\"\n [panelClass]=\"'full-width-panel'\"\n [closeOnOutOfView]=\"closeOnOutOfView\"\n [outOfViewRootMargin]=\"outOfViewRootMargin\"\n />\n </div>\n <div\n class=\"text-box\"\n [ngClass]=\"{\n invalid: dropdownControl.invalid && dropdownControl.touched,\n 'success-label': canShowSuccess(),\n 'x-small': smallSize,\n }\"\n [ngStyle]=\"{ width: '100%' }\"\n >\n <ads-input\n [control]=\"inputControl\"\n [mask]=\"phoneMask\"\n [id]=\"id\"\n [width]=\"'100%'\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [showClearButton]=\"showClearButton\"\n [showExclamationOnError]=\"showExclamationOnError\"\n [immediateValidation]=\"immediateValidation\"\n [dropSpecialCharacters]=\"true\"\n [showFooter]=\"false\"\n [size]=\"size\"\n />\n </div>\n\n </div>\n <div class=\"footer-container\"\n [class.dynamic]=\"!isStaticFooter\"\n [class.has-content]=\"hasFooterContent()\">\n @if (canShowError()) {\n <ads-error [error]=\"displayFirstError()\" [ngStyle]=\"{ width: width }\" />\n } @else if (canShowSuccess()) {\n <ads-success [success]=\"successMessage!\" [ngStyle]=\"{ width: width }\" />\n } @else if (hint) {\n <ads-hint [hint]=\"hint\" [control]=\"valueControl\" [ngStyle]=\"{ width: width }\" />\n }\n </div>\n</div>\n@if (tooltip) {\n <ads-input-tooltip [tooltip]=\"tooltip\" [smallSize]=\"smallSize\" [href]=\"tooltipHref\" />\n}\n\n<ng-template #optionTemplate let-option=\"option\">\n <div class=\"flag-option\">\n <div>\n <img [src]=\"getFlag(option)\" alt=\"flag\"/>\n <span>{{option.name}}</span>\n </div>\n <span class=\"code\">{{option.code}}</span>\n </div>\n</ng-template>\n\n<ng-template #triggerTemplate let-option=\"option\">\n <span>{{ option.code }}</span>\n</ng-template>\n", styles: [".footer-container{min-height:20px;overflow:hidden}.footer-container.dynamic{min-height:0;max-height:0;opacity:0;transition:max-height .3s ease-in-out,opacity .2s ease-in-out,min-height .3s ease-in-out}.footer-container.dynamic.has-content{min-height:20px;max-height:100px;opacity:1;transition:max-height .3s ease-in-out,opacity .3s ease-in-out .1s,min-height .3s ease-in-out}::ng-deep .mat-mdc-form-field{--mat-form-field-filled-input-text-placeholder-color: var(--color-medium) !important}::ng-deep .spinner{animation:spin 1s linear infinite;transform-origin:50% 50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n", ":host{display:flex;gap:12px;align-items:flex-start}.form-field-wrapper{display:flex;flex-direction:column}.form-field-wrapper .form-controls-wrapper{display:flex;width:100%}.form-field-wrapper .invalid ::ng-deep .mdc-text-field{border-color:var(--mdc-filled-text-field-error-label-text-color)}.form-field-wrapper .invalid.text-box ::ng-deep .mdc-text-field{border-right-width:1px}.form-field-wrapper .invalid.select-box ::ng-deep .mdc-text-field{border-left-width:1px;border-left-color:transparent}.form-field-wrapper .select-box ::ng-deep .mdc-text-field{border-left-width:1px;border-left-color:transparent;border-top-right-radius:0;border-bottom-right-radius:0}.form-field-wrapper .text-box{z-index:1}.form-field-wrapper .text-box ::ng-deep .mdc-text-field{border-top-left-radius:0;border-bottom-left-radius:0}.flag-option{display:flex;justify-content:space-between;align-items:center;width:100%}.flag-option div{display:flex;gap:8px;align-items:center}.flag-option div img{width:29px;height:19px}.flag-option span{font-size:16px;color:var(--color-medium);line-height:21px}.flag-option .code{color:var(--color-dark)}::ng-deep .full-width-panel{width:var(--full-width-panel)!important;min-width:var(--full-width-panel)!important}\n"] }]
|
|
10576
|
-
}], propDecorators: { dropdownId: [{
|
|
10614
|
+
args: [{ selector: 'ads-international-phone-field', standalone: false, template: "<div class=\"form-field-wrapper\" [ngStyle]=\"{ width: width }\" #wrapperRef>\n <div class=\"form-controls-wrapper\">\n <div\n class=\"select-box\"\n [ngClass]=\"{ invalid: valueControl.invalid && valueControl.touched }\"\n [ngStyle]=\"{ width: '87px' }\"\n >\n <ads-dropdown\n [control]=\"dropdownControl\"\n [id]=\"dropdownId\"\n [options]=\"countryOptions\"\n [immediateValidation]=\"immediateValidation\"\n [optionTemplate]=\"optionTemplate\"\n [fitContent]=\"true\"\n [showFooter]=\"false\"\n [checkSelected]=\"false\"\n [size]=\"size\"\n [successMessage]=\"successMessage\"\n [triggerTemplate]=\"triggerTemplate\"\n [panelClass]=\"'full-width-panel'\"\n [closeOnOutOfView]=\"closeOnOutOfView\"\n [outOfViewRootMargin]=\"outOfViewRootMargin\"\n />\n </div>\n <div\n class=\"text-box\"\n [ngClass]=\"{\n invalid: dropdownControl.invalid && dropdownControl.touched,\n 'success-label': canShowSuccess(),\n 'x-small': smallSize,\n }\"\n [ngStyle]=\"{ width: '100%' }\"\n >\n <ads-input\n [control]=\"inputControl\"\n [mask]=\"phoneMask\"\n [id]=\"id\"\n [width]=\"'100%'\"\n [placeholder]=\"placeholder\"\n [label]=\"label\"\n [showClearButton]=\"showClearButton\"\n [showExclamationOnError]=\"showExclamationOnError\"\n [immediateValidation]=\"immediateValidation\"\n [dropSpecialCharacters]=\"true\"\n [showFooter]=\"false\"\n [size]=\"size\"\n [onBlur]=\"onInputBlur\"\n />\n </div>\n\n </div>\n <div class=\"footer-container\"\n [class.dynamic]=\"!isStaticFooter\"\n [class.has-content]=\"hasFooterContent()\">\n @if (canShowError()) {\n <ads-error [error]=\"displayFirstError()\" [ngStyle]=\"{ width: width }\" />\n } @else if (canShowSuccess()) {\n <ads-success [success]=\"successMessage!\" [ngStyle]=\"{ width: width }\" />\n } @else if (hint) {\n <ads-hint [hint]=\"hint\" [control]=\"valueControl\" [ngStyle]=\"{ width: width }\" />\n }\n </div>\n</div>\n@if (tooltip) {\n <ads-input-tooltip [tooltip]=\"tooltip\" [smallSize]=\"smallSize\" [href]=\"tooltipHref\" />\n}\n\n<ng-template #optionTemplate let-option=\"option\">\n <div class=\"flag-option\">\n <div>\n <img [src]=\"getFlag(option)\" alt=\"flag\"/>\n <span>{{option.name}}</span>\n </div>\n <span class=\"code\">{{option.code}}</span>\n </div>\n</ng-template>\n\n<ng-template #triggerTemplate let-option=\"option\">\n <span>{{ option.code }}</span>\n</ng-template>\n", styles: [".footer-container{min-height:20px;overflow:hidden}.footer-container.dynamic{min-height:0;max-height:0;opacity:0;transition:max-height .3s ease-in-out,opacity .2s ease-in-out,min-height .3s ease-in-out}.footer-container.dynamic.has-content{min-height:20px;max-height:100px;opacity:1;transition:max-height .3s ease-in-out,opacity .3s ease-in-out .1s,min-height .3s ease-in-out}::ng-deep .mat-mdc-form-field{--mat-form-field-filled-input-text-placeholder-color: var(--color-medium) !important}::ng-deep .spinner{animation:spin 1s linear infinite;transform-origin:50% 50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n", ":host{display:flex;gap:12px;align-items:flex-start}.form-field-wrapper{display:flex;flex-direction:column}.form-field-wrapper .form-controls-wrapper{display:flex;width:100%}.form-field-wrapper .invalid ::ng-deep .mdc-text-field{border-color:var(--mdc-filled-text-field-error-label-text-color)}.form-field-wrapper .invalid.text-box ::ng-deep .mdc-text-field{border-right-width:1px}.form-field-wrapper .invalid.select-box ::ng-deep .mdc-text-field{border-left-width:1px;border-left-color:transparent}.form-field-wrapper .select-box ::ng-deep .mdc-text-field{border-left-width:1px;border-left-color:transparent;border-top-right-radius:0;border-bottom-right-radius:0}.form-field-wrapper .text-box{z-index:1}.form-field-wrapper .text-box ::ng-deep .mdc-text-field{border-top-left-radius:0;border-bottom-left-radius:0}.flag-option{display:flex;justify-content:space-between;align-items:center;width:100%}.flag-option div{display:flex;gap:8px;align-items:center}.flag-option div img{width:29px;height:19px}.flag-option span{font-size:16px;color:var(--color-medium);line-height:21px}.flag-option .code{color:var(--color-dark)}::ng-deep .full-width-panel{width:var(--full-width-panel)!important;min-width:var(--full-width-panel)!important}\n"] }]
|
|
10615
|
+
}], ctorParameters: () => [], propDecorators: { dropdownId: [{
|
|
10577
10616
|
type: Input
|
|
10578
|
-
}], closeOnOutOfView: [{
|
|
10617
|
+
}], selectedCountry: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCountry", required: false }] }], closeOnOutOfView: [{
|
|
10579
10618
|
type: Input
|
|
10580
10619
|
}], outOfViewRootMargin: [{
|
|
10581
10620
|
type: Input
|
|
@@ -10801,5 +10840,5 @@ function provideAdsUi(config) {
|
|
|
10801
10840
|
* Generated bundle index. Do not edit.
|
|
10802
10841
|
*/
|
|
10803
10842
|
|
|
10804
|
-
export { AdsAscentLogoComponent, AdsAscentLogoModule, AdsAvatarComponent, AdsAvatarModule, AdsBreadcrumbComponent, AdsBreadcrumbModule, AdsBubbleComponent, AdsBubbleModule, AdsButtonComponent, AdsButtonContainerComponent, AdsButtonContainerModule, AdsButtonModule, AdsCardComponent, AdsCardModule, AdsCheckboxComponent, AdsCheckboxModule, AdsChipComponent, AdsChipModule, AdsColumnSortFilterMenuComponent, AdsColumnSortFilterMenuModule, AdsCreateTagComponent, AdsCreateTagModule, AdsCustomHeaderComponent, AdsCustomHeaderModule, AdsDatepickerComponent, AdsDatepickerModule, AdsDatetimepickerComponent, AdsDatetimepickerModule, AdsDividerModule, AdsDragAndDropListComponent, AdsDragAndDropListModule, AdsDropdownComponent, AdsDropdownModule, AdsErrorPageCodeComponent, AdsErrorPageCodeModule, AdsErrorPageComponent, AdsErrorPageModule, AdsExpansionPanelComponent, AdsExpansionPanelModule, AdsFooterComponent, AdsFooterContainerComponent, AdsFooterContainerModule, AdsFooterModule, AdsGenericLogoComponent, AdsGenericLogoModule, AdsHeaderComponent, AdsHeaderContainerComponent, AdsHeaderContainerModule, AdsHeaderModule, AdsHorizontalNavBarComponent, AdsHorizontalNavBarModule, AdsHorizontalStepperComponent, AdsHorizontalStepperModule, AdsIconButtonComponent, AdsIconButtonModule, AdsIconHoverComponent, AdsIconHoverModule, AdsInputComponent, AdsInputDropdownComponent, AdsInputDropdownModule, AdsInputModule, AdsInternationalPhoneFieldComponent, AdsInternationalPhoneFieldModule, AdsLinkButtonComponent, AdsLinkButtonModule, AdsMainMenuComponent, AdsMainMenuModule, AdsModalComponent, AdsModalModule, AdsMultiSelectDropdownComponent, AdsMultiSelectDropdownModule, AdsNavMenuComponent, AdsNavMenuModule, AdsNavigationCollapseHandleComponent, AdsNavigationCollapseHandleModule, AdsNavigationComponent, AdsNavigationHeaderComponent, AdsNavigationHeaderModule, AdsNavigationItemComponent, AdsNavigationItemModule, AdsNavigationItemsContainerComponent, AdsNavigationItemsContainerModule, AdsNavigationModule, AdsNumericBadgeComponent, AdsNumericBadgeModule, AdsNumericStepperComponent, AdsNumericStepperModule, AdsOrgDisplayTextComponent, AdsOrgDisplayTextModule, AdsPeakEssentialsLogoComponent, AdsPeakEssentialsLogoModule, AdsPeakMarketplaceLogoComponent, AdsPeakMarketplaceLogoModule, AdsPeakOrderManagementLogoComponent, AdsPeakOrderManagementLogoModule, AdsPhoneFieldComponent, AdsPhoneFieldModule, AdsPilotPayLogoComponent, AdsPilotPayLogoModule, AdsPrimaryLogoComponent, AdsPrimaryLogoModule, AdsProgressBarComponent, AdsProgressBarModule, AdsProgressIndicatorSpinnerComponent, AdsProgressIndicatorSpinnerModule, AdsProgressSpinnerComponent, AdsProgressSpinnerModule, AdsProgressStepperComponent, AdsProgressStepperModule, AdsRadioButtonComponent, AdsRadioButtonModule, AdsScmsLogoComponent, AdsScmsLogoModule, AdsScmsSideNavBarComponent, AdsScmsSideNavBarModule, AdsSearchDropdownComponent, AdsSearchDropdownModule, AdsSearchInputComponent, AdsSearchInputModule, AdsShellLayoutModule, AdsShipmentHorizontalStepperComponent, AdsShipmentHorizontalStepperModule, AdsSideNavBarComponent, AdsSideNavBarModule, AdsSideNavBarV2Component, AdsSideNavBarV2Module, AdsSlideToggle, AdsSlideToggleComponent, AdsSliderComponent, AdsSliderModule, AdsSnackbarComponent, AdsSnackbarModule, AdsSplashPageComponent, AdsSplashPageModule, AdsStepperComponent, AdsStepperModule, AdsTableComponent, AdsTableModule, AdsTabsComponent, AdsTabsModule, AdsTagComponent, AdsTagContainerComponent, AdsTagContainerModule, AdsTagModule, AdsTextareaComponent, AdsTextareaModule, AdsTimeFieldComponent, AdsTimeFieldModule, AdsTimepickerComponent, AdsTimepickerModule, AdsVerticalSideNavigationStepperComponent, AdsVerticalSideNavigationStepperModule, AdsWizardStepperComponent, AdsWizardStepperModule, AscentCardComponent, AscentCardModule, BadgeColor, Colors, CustomDatetimeAdapter, DividerComponent, ErrorPageDefault, HorizontalStepStatus, MainMenuService, ModalActionType, ModalPanelClass, PanelClass, ShellLayoutComponent, SpinnerSize, StepStatus, TableBreakpoint, ViewportService, WindowService, WizardStepStatus, provideAdsUi };
|
|
10843
|
+
export { AdsAscentLogoComponent, AdsAscentLogoModule, AdsAvatarComponent, AdsAvatarModule, AdsBreadcrumbComponent, AdsBreadcrumbModule, AdsBubbleComponent, AdsBubbleModule, AdsButtonComponent, AdsButtonContainerComponent, AdsButtonContainerModule, AdsButtonModule, AdsCardComponent, AdsCardModule, AdsCheckboxComponent, AdsCheckboxModule, AdsChipComponent, AdsChipModule, AdsColumnSortFilterMenuComponent, AdsColumnSortFilterMenuModule, AdsCreateTagComponent, AdsCreateTagModule, AdsCustomHeaderComponent, AdsCustomHeaderModule, AdsDatepickerComponent, AdsDatepickerModule, AdsDatetimepickerComponent, AdsDatetimepickerModule, AdsDividerModule, AdsDragAndDropListComponent, AdsDragAndDropListModule, AdsDropdownComponent, AdsDropdownModule, AdsErrorPageCodeComponent, AdsErrorPageCodeModule, AdsErrorPageComponent, AdsErrorPageModule, AdsExpansionPanelComponent, AdsExpansionPanelModule, AdsFooterComponent, AdsFooterContainerComponent, AdsFooterContainerModule, AdsFooterModule, AdsGenericLogoComponent, AdsGenericLogoModule, AdsHeaderComponent, AdsHeaderContainerComponent, AdsHeaderContainerModule, AdsHeaderModule, AdsHorizontalNavBarComponent, AdsHorizontalNavBarModule, AdsHorizontalStepperComponent, AdsHorizontalStepperModule, AdsIconButtonComponent, AdsIconButtonModule, AdsIconHoverComponent, AdsIconHoverModule, AdsInputComponent, AdsInputDropdownComponent, AdsInputDropdownModule, AdsInputModule, AdsInternationalPhoneFieldComponent, AdsInternationalPhoneFieldModule, AdsLinkButtonComponent, AdsLinkButtonModule, AdsMainMenuComponent, AdsMainMenuModule, AdsModalComponent, AdsModalModule, AdsMultiSelectDropdownComponent, AdsMultiSelectDropdownModule, AdsNavMenuComponent, AdsNavMenuModule, AdsNavigationCollapseHandleComponent, AdsNavigationCollapseHandleModule, AdsNavigationComponent, AdsNavigationHeaderComponent, AdsNavigationHeaderModule, AdsNavigationItemComponent, AdsNavigationItemModule, AdsNavigationItemsContainerComponent, AdsNavigationItemsContainerModule, AdsNavigationModule, AdsNumericBadgeComponent, AdsNumericBadgeModule, AdsNumericStepperComponent, AdsNumericStepperModule, AdsOrgDisplayTextComponent, AdsOrgDisplayTextModule, AdsPeakEssentialsLogoComponent, AdsPeakEssentialsLogoModule, AdsPeakMarketplaceLogoComponent, AdsPeakMarketplaceLogoModule, AdsPeakOrderManagementLogoComponent, AdsPeakOrderManagementLogoModule, AdsPhoneFieldComponent, AdsPhoneFieldModule, AdsPilotPayLogoComponent, AdsPilotPayLogoModule, AdsPrimaryLogoComponent, AdsPrimaryLogoModule, AdsProgressBarComponent, AdsProgressBarModule, AdsProgressIndicatorSpinnerComponent, AdsProgressIndicatorSpinnerModule, AdsProgressSpinnerComponent, AdsProgressSpinnerModule, AdsProgressStepperComponent, AdsProgressStepperModule, AdsRadioButtonComponent, AdsRadioButtonModule, AdsScmsLogoComponent, AdsScmsLogoModule, AdsScmsSideNavBarComponent, AdsScmsSideNavBarModule, AdsSearchDropdownComponent, AdsSearchDropdownModule, AdsSearchInputComponent, AdsSearchInputModule, AdsShellLayoutModule, AdsShipmentHorizontalStepperComponent, AdsShipmentHorizontalStepperModule, AdsSideNavBarComponent, AdsSideNavBarModule, AdsSideNavBarV2Component, AdsSideNavBarV2Module, AdsSlideToggle, AdsSlideToggleComponent, AdsSliderComponent, AdsSliderModule, AdsSnackbarComponent, AdsSnackbarModule, AdsSplashPageComponent, AdsSplashPageModule, AdsStepperComponent, AdsStepperModule, AdsTableComponent, AdsTableModule, AdsTabsComponent, AdsTabsModule, AdsTagComponent, AdsTagContainerComponent, AdsTagContainerModule, AdsTagModule, AdsTextareaComponent, AdsTextareaModule, AdsTimeFieldComponent, AdsTimeFieldModule, AdsTimepickerComponent, AdsTimepickerModule, AdsVerticalSideNavigationStepperComponent, AdsVerticalSideNavigationStepperModule, AdsWizardStepperComponent, AdsWizardStepperModule, AscentCardComponent, AscentCardModule, BadgeColor, Colors, CountryCode, CustomDatetimeAdapter, DividerComponent, ErrorPageDefault, HorizontalStepStatus, MainMenuService, ModalActionType, ModalPanelClass, PanelClass, ShellLayoutComponent, SpinnerSize, StepStatus, TableBreakpoint, ViewportService, WindowService, WizardStepStatus, provideAdsUi };
|
|
10805
10844
|
//# sourceMappingURL=ascentgl-ads-ui.mjs.map
|