@ascentgl/ads-ui 21.114.0 → 21.114.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ascentgl/ads-ui",
3
- "version": "21.114.0",
3
+ "version": "21.114.2",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": ">=21.0.0",
6
6
  "date-fns": ">=4.1.0",
@@ -216,7 +216,7 @@ declare class AdsButtonComponent {
216
216
  /** Whether the button is a smaller version */
217
217
  size: i0.InputSignal<Size>;
218
218
  /** Sets the "type" attribute on the button */
219
- type: i0.InputSignal<"button" | "submit" | "reset">;
219
+ type: i0.InputSignal<"submit" | "button" | "reset">;
220
220
  /** Makes the button take 100% width of its container */
221
221
  fullWidth: i0.InputSignal<boolean>;
222
222
  static ɵfac: i0.ɵɵFactoryDeclaration<AdsButtonComponent, never>;
@@ -1196,13 +1196,32 @@ declare abstract class AbstractBaseComponent implements OnChanges, AfterViewInit
1196
1196
  canShowSuccess(): boolean;
1197
1197
  /**
1198
1198
  * @ignore
1199
- * Robustly checks whether a control has a required validator.
1200
- * Angular's `hasValidator(Validators.required)` uses reference equality, which fails
1201
- * when validators are provided as an array (e.g., `[Validators.required]`) because
1202
- * Angular composes them into a wrapper function with a different reference.
1203
- * This method also checks by running the validator against an empty value.
1199
+ * Detects stale 'required' errors produced by Angular's RequiredValidator directive
1200
+ * that is still enabled in the current change detection cycle but will be disabled
1201
+ * once the `[required]` binding is re-evaluated on the child `<input>` element.
1202
+ *
1203
+ * This happens because `[ngClass]` on `mat-form-field` (parent) is evaluated BEFORE
1204
+ * `[required]` on `<input>` (child), so `canShowError()` sees errors from the
1205
+ * still-enabled directive even though `Validators.required` was already removed
1206
+ * programmatically via `removeValidators`.
1204
1207
  */
1205
- private hasRequiredValidatorCheck;
1208
+ protected hasOnlyStaleRequiredError(control: AbstractControl): boolean;
1209
+ /**
1210
+ * @ignore
1211
+ * Checks whether a control has a required validator.
1212
+ *
1213
+ * Uses Angular's `hasValidator(Validators.required)` which checks `_rawValidators`
1214
+ * by reference. In Angular 21 this handles all standard usage patterns:
1215
+ * - `new FormControl(null, Validators.required)`
1216
+ * - `new FormControl(null, [Validators.required, ...])`
1217
+ * - `control.addValidators(Validators.required)`
1218
+ *
1219
+ * NOTE: We intentionally do NOT fall back to running the composed validator against
1220
+ * an empty value. That approach creates a circular dependency with Angular's
1221
+ * `RequiredValidator` directive (which is auto-instantiated by `[required][formControl]`
1222
+ * in the template and merged into the control's validators by `setUpValidators`).
1223
+ */
1224
+ protected hasRequiredValidatorCheck(control: AbstractControl): boolean;
1206
1225
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractBaseComponent, never>;
1207
1226
  static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractBaseComponent, never, never, { "skipValidationWhenEmpty": { "alias": "skipValidationWhenEmpty"; "required": false; }; "showValidationError": { "alias": "showValidationError"; "required": false; }; "control": { "alias": "control"; "required": false; }; "immediateValidation": { "alias": "immediateValidation"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "successMessage": { "alias": "successMessage"; "required": false; }; "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "width": { "alias": "width"; "required": false; }; "shrink": { "alias": "shrink"; "required": false; }; }, {}, never, never, true, never>;
1208
1227
  }
@@ -4279,7 +4298,7 @@ interface Option {
4279
4298
  code: string;
4280
4299
  iso: CountryCode;
4281
4300
  }
4282
- declare class AdsInternationalPhoneFieldComponent extends AbstractInputComponent implements OnInit, AfterViewInit {
4301
+ declare class AdsInternationalPhoneFieldComponent extends AbstractInputComponent implements OnInit, DoCheck, AfterViewInit {
4283
4302
  /** Optional "id" attribute for dropdown field */
4284
4303
  dropdownId: string;
4285
4304
  /** Country code to display in the dropdown */
@@ -4319,6 +4338,8 @@ declare class AdsInternationalPhoneFieldComponent extends AbstractInputComponent
4319
4338
  /** @ignore */
4320
4339
  private parsePhoneNumber;
4321
4340
  /** @ignore */
4341
+ ngDoCheck(): void;
4342
+ /** @ignore */
4322
4343
  ngAfterViewInit(): void;
4323
4344
  /** @ignore */
4324
4345
  getFlag(option: Option): string;
@@ -4332,6 +4353,8 @@ declare class AdsInternationalPhoneFieldComponent extends AbstractInputComponent
4332
4353
  canShowSuccess(): boolean;
4333
4354
  /** @ignore */
4334
4355
  displayFirstError(control?: FormControl): string;
4356
+ /** @ignore */
4357
+ private syncRequiredValidator;
4335
4358
  private validateMask;
4336
4359
  static ɵfac: i0.ɵɵFactoryDeclaration<AdsInternationalPhoneFieldComponent, never>;
4337
4360
  static ɵcmp: i0.ɵɵComponentDeclaration<AdsInternationalPhoneFieldComponent, "ads-international-phone-field", never, { "dropdownId": { "alias": "dropdownId"; "required": false; }; "selectedCountry": { "alias": "selectedCountry"; "required": false; "isSignal": true; }; "closeOnOutOfView": { "alias": "closeOnOutOfView"; "required": false; }; "outOfViewRootMargin": { "alias": "outOfViewRootMargin"; "required": false; }; }, {}, never, never, false, never>;