@clr/angular 15.14.0 → 15.14.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.
@@ -666,7 +666,7 @@ class ClrAccordion {
666
666
  }
667
667
  }
668
668
  ClrAccordion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAccordion, deps: [{ token: AccordionService }], target: i0.ɵɵFactoryTarget.Component });
669
- ClrAccordion.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrAccordion, selector: "clr-accordion", inputs: { multiPanel: ["clrAccordionMultiPanel", "multiPanel"] }, host: { properties: { "class.clr-accordion": "true" } }, providers: [AccordionService], queries: [{ propertyName: "panels", predicate: ClrAccordionPanel, descendants: true }], usesOnChanges: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
669
+ ClrAccordion.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrAccordion, selector: "clr-accordion", inputs: { multiPanel: ["clrAccordionMultiPanel", "multiPanel"] }, host: { properties: { "class.clr-accordion": "true" } }, providers: [AccordionService], queries: [{ propertyName: "panels", predicate: ClrAccordionPanel }], usesOnChanges: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
670
670
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAccordion, decorators: [{
671
671
  type: Component,
672
672
  args: [{
@@ -681,7 +681,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
681
681
  args: ['clrAccordionMultiPanel']
682
682
  }], panels: [{
683
683
  type: ContentChildren,
684
- args: [ClrAccordionPanel, { descendants: true }]
684
+ args: [ClrAccordionPanel]
685
685
  }] } });
686
686
 
687
687
  /*
@@ -3795,16 +3795,14 @@ class ClrButtonGroup {
3795
3795
  this.menuButtons = tempInMenuButtons;
3796
3796
  }
3797
3797
  handleFocusOnMenuOpen() {
3798
- if (this.menuButtons.length) {
3799
- this.toggleService.popoverVisible.pipe(takeUntil(this.destroy$)).subscribe(visible => {
3800
- if (visible) {
3801
- this.focusHandler.initialize({
3802
- menu: this.menu.nativeElement,
3803
- menuToggle: this.menuToggle.nativeElement,
3804
- });
3805
- }
3806
- });
3807
- }
3798
+ this.toggleService.popoverVisible.pipe(takeUntil(this.destroy$)).subscribe(visible => {
3799
+ if (visible) {
3800
+ this.focusHandler.initialize({
3801
+ menu: this.menu.nativeElement,
3802
+ menuToggle: this.menuToggle.nativeElement,
3803
+ });
3804
+ }
3805
+ });
3808
3806
  }
3809
3807
  }
3810
3808
  ClrButtonGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrButtonGroup, deps: [{ token: ButtonInGroupService }, { token: ClrPopoverToggleService }, { token: ClrCommonStringsService }, { token: ClrDestroyService }, { token: ButtonGroupFocusHandler }], target: i0.ɵɵFactoryTarget.Component });
@@ -3903,7 +3901,7 @@ class ClrLoadingButton {
3903
3901
  }
3904
3902
  ClrLoadingButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrLoadingButton, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
3905
3903
  ClrLoadingButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrLoadingButton, selector: "button[clrLoading]", inputs: { disabled: "disabled" }, outputs: { clrLoadingChange: "clrLoadingChange" }, host: { properties: { "attr.disabled": "disabled? '' : null" } }, providers: [{ provide: LoadingListener, useExisting: ClrLoadingButton }], ngImport: i0, template: `
3906
- <ng-container [ngSwitch]="state">
3904
+ <div @parent [ngSwitch]="state">
3907
3905
  <span *ngSwitchCase="buttonState.LOADING">
3908
3906
  <span @spinner class="spinner spinner-inline"></span>
3909
3907
  </span>
@@ -3917,8 +3915,13 @@ ClrLoadingButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
3917
3915
  <span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
3918
3916
  <ng-content></ng-content>
3919
3917
  </span>
3920
- </ng-container>
3918
+ </div>
3921
3919
  `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], animations: [
3920
+ trigger('parent', [
3921
+ // Skip :enter animation on first render.
3922
+ // The button text/content should only be faded when transitioning to or from a non-default state.
3923
+ transition(':enter', []),
3924
+ ]),
3922
3925
  trigger('defaultButton', [
3923
3926
  transition(':enter', [style({ opacity: 0 }), animate('200ms 100ms ease-in', style({ opacity: 1 }))]),
3924
3927
  // TODO: see if we can get leave animation to work before spinner's enter animation
@@ -3946,7 +3949,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
3946
3949
  args: [{
3947
3950
  selector: 'button[clrLoading]',
3948
3951
  template: `
3949
- <ng-container [ngSwitch]="state">
3952
+ <div @parent [ngSwitch]="state">
3950
3953
  <span *ngSwitchCase="buttonState.LOADING">
3951
3954
  <span @spinner class="spinner spinner-inline"></span>
3952
3955
  </span>
@@ -3960,10 +3963,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
3960
3963
  <span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
3961
3964
  <ng-content></ng-content>
3962
3965
  </span>
3963
- </ng-container>
3966
+ </div>
3964
3967
  `,
3965
3968
  providers: [{ provide: LoadingListener, useExisting: ClrLoadingButton }],
3966
3969
  animations: [
3970
+ trigger('parent', [
3971
+ // Skip :enter animation on first render.
3972
+ // The button text/content should only be faded when transitioning to or from a non-default state.
3973
+ transition(':enter', []),
3974
+ ]),
3967
3975
  trigger('defaultButton', [
3968
3976
  transition(':enter', [style({ opacity: 0 }), animate('200ms 100ms ease-in', style({ opacity: 1 }))]),
3969
3977
  // TODO: see if we can get leave animation to work before spinner's enter animation
@@ -9579,9 +9587,11 @@ class ClrDateInput extends WrappedFormControl {
9579
9587
  }
9580
9588
  set min(dateString) {
9581
9589
  this.dateIOService.setMinDate(dateString);
9590
+ this.triggerControlValidation();
9582
9591
  }
9583
9592
  set max(dateString) {
9584
9593
  this.dateIOService.setMaxDate(dateString);
9594
+ this.triggerControlValidation();
9585
9595
  }
9586
9596
  get disabled() {
9587
9597
  if (this.dateFormControlService) {
@@ -9646,6 +9656,13 @@ class ClrDateInput extends WrappedFormControl {
9646
9656
  this.focusService.focused = focus;
9647
9657
  }
9648
9658
  }
9659
+ triggerControlValidation() {
9660
+ if (this.datepickerHasFormControl()) {
9661
+ // Set `emitEvent` to false to prevent unnecessary value change event. Status change event will be emitted by `setErrors` below.
9662
+ this.control.control?.updateValueAndValidity({ emitEvent: false });
9663
+ this.control.control?.setErrors(this.control.control.errors);
9664
+ }
9665
+ }
9649
9666
  populateServicesFromContainerComponent() {
9650
9667
  if (!this.container) {
9651
9668
  this.dateIOService = this.getProviderFromContainer(DateIOService);
@@ -19909,7 +19926,7 @@ class ClrAlert {
19909
19926
  }
19910
19927
  const isCurrentAlert = this.multiAlertService?.currentAlert === this;
19911
19928
  this._closed = true;
19912
- if (this.multiAlertService) {
19929
+ if (this.multiAlertService?.activeAlerts) {
19913
19930
  this.multiAlertService.close(isCurrentAlert);
19914
19931
  }
19915
19932
  this._closedChanged.emit(true);