@clr/angular 16.3.0 → 16.3.1
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/esm2020/button/button-group/button-group.mjs +9 -11
- package/esm2020/button/button-loading/loading-button.mjs +15 -5
- package/esm2020/emphasis/alert/alert.mjs +2 -2
- package/esm2020/forms/datepicker/date-input.mjs +10 -1
- package/fesm2015/clr-angular.mjs +34 -16
- package/fesm2015/clr-angular.mjs.map +1 -1
- package/fesm2020/clr-angular.mjs +32 -15
- package/fesm2020/clr-angular.mjs.map +1 -1
- package/forms/datepicker/date-input.d.ts +1 -0
- package/package.json +2 -2
package/fesm2020/clr-angular.mjs
CHANGED
|
@@ -3817,16 +3817,14 @@ class ClrButtonGroup {
|
|
|
3817
3817
|
this.menuButtons = tempInMenuButtons;
|
|
3818
3818
|
}
|
|
3819
3819
|
handleFocusOnMenuOpen() {
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
this.
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
});
|
|
3829
|
-
}
|
|
3820
|
+
this.toggleService.popoverVisible.pipe(takeUntil(this.destroy$)).subscribe(visible => {
|
|
3821
|
+
if (visible) {
|
|
3822
|
+
this.focusHandler.initialize({
|
|
3823
|
+
menu: this.menu.nativeElement,
|
|
3824
|
+
menuToggle: this.menuToggle.nativeElement,
|
|
3825
|
+
});
|
|
3826
|
+
}
|
|
3827
|
+
});
|
|
3830
3828
|
}
|
|
3831
3829
|
}
|
|
3832
3830
|
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 });
|
|
@@ -3925,7 +3923,7 @@ class ClrLoadingButton {
|
|
|
3925
3923
|
}
|
|
3926
3924
|
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 });
|
|
3927
3925
|
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: `
|
|
3928
|
-
<
|
|
3926
|
+
<div @parent [ngSwitch]="state">
|
|
3929
3927
|
<span *ngSwitchCase="buttonState.LOADING">
|
|
3930
3928
|
<span @spinner class="spinner spinner-inline"></span>
|
|
3931
3929
|
</span>
|
|
@@ -3939,8 +3937,13 @@ ClrLoadingButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
|
3939
3937
|
<span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
|
|
3940
3938
|
<ng-content></ng-content>
|
|
3941
3939
|
</span>
|
|
3942
|
-
</
|
|
3940
|
+
</div>
|
|
3943
3941
|
`, isInline: true, dependencies: [{ kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], animations: [
|
|
3942
|
+
trigger('parent', [
|
|
3943
|
+
// Skip :enter animation on first render.
|
|
3944
|
+
// The button text/content should only be faded when transitioning to or from a non-default state.
|
|
3945
|
+
transition(':enter', []),
|
|
3946
|
+
]),
|
|
3944
3947
|
trigger('defaultButton', [
|
|
3945
3948
|
transition(':enter', [style({ opacity: 0 }), animate('200ms 100ms ease-in', style({ opacity: 1 }))]),
|
|
3946
3949
|
// TODO: see if we can get leave animation to work before spinner's enter animation
|
|
@@ -3968,7 +3971,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
3968
3971
|
args: [{
|
|
3969
3972
|
selector: 'button[clrLoading]',
|
|
3970
3973
|
template: `
|
|
3971
|
-
<
|
|
3974
|
+
<div @parent [ngSwitch]="state">
|
|
3972
3975
|
<span *ngSwitchCase="buttonState.LOADING">
|
|
3973
3976
|
<span @spinner class="spinner spinner-inline"></span>
|
|
3974
3977
|
</span>
|
|
@@ -3982,10 +3985,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
3982
3985
|
<span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
|
|
3983
3986
|
<ng-content></ng-content>
|
|
3984
3987
|
</span>
|
|
3985
|
-
</
|
|
3988
|
+
</div>
|
|
3986
3989
|
`,
|
|
3987
3990
|
providers: [{ provide: LoadingListener, useExisting: ClrLoadingButton }],
|
|
3988
3991
|
animations: [
|
|
3992
|
+
trigger('parent', [
|
|
3993
|
+
// Skip :enter animation on first render.
|
|
3994
|
+
// The button text/content should only be faded when transitioning to or from a non-default state.
|
|
3995
|
+
transition(':enter', []),
|
|
3996
|
+
]),
|
|
3989
3997
|
trigger('defaultButton', [
|
|
3990
3998
|
transition(':enter', [style({ opacity: 0 }), animate('200ms 100ms ease-in', style({ opacity: 1 }))]),
|
|
3991
3999
|
// TODO: see if we can get leave animation to work before spinner's enter animation
|
|
@@ -9608,9 +9616,11 @@ class ClrDateInput extends WrappedFormControl {
|
|
|
9608
9616
|
}
|
|
9609
9617
|
set min(dateString) {
|
|
9610
9618
|
this.dateIOService.setMinDate(dateString);
|
|
9619
|
+
this.triggerControlValidation();
|
|
9611
9620
|
}
|
|
9612
9621
|
set max(dateString) {
|
|
9613
9622
|
this.dateIOService.setMaxDate(dateString);
|
|
9623
|
+
this.triggerControlValidation();
|
|
9614
9624
|
}
|
|
9615
9625
|
get disabled() {
|
|
9616
9626
|
if (this.dateFormControlService) {
|
|
@@ -9675,6 +9685,13 @@ class ClrDateInput extends WrappedFormControl {
|
|
|
9675
9685
|
this.focusService.focused = focus;
|
|
9676
9686
|
}
|
|
9677
9687
|
}
|
|
9688
|
+
triggerControlValidation() {
|
|
9689
|
+
if (this.datepickerHasFormControl()) {
|
|
9690
|
+
// Set `emitEvent` to false to prevent unnecessary value change event. Status change event will be emitted by `setErrors` below.
|
|
9691
|
+
this.control.control?.updateValueAndValidity({ emitEvent: false });
|
|
9692
|
+
this.control.control?.setErrors(this.control.control.errors);
|
|
9693
|
+
}
|
|
9694
|
+
}
|
|
9678
9695
|
populateServicesFromContainerComponent() {
|
|
9679
9696
|
if (!this.container) {
|
|
9680
9697
|
this.dateIOService = this.getProviderFromContainer(DateIOService);
|
|
@@ -19954,7 +19971,7 @@ class ClrAlert {
|
|
|
19954
19971
|
}
|
|
19955
19972
|
const isCurrentAlert = this.multiAlertService?.currentAlert === this;
|
|
19956
19973
|
this._closed = true;
|
|
19957
|
-
if (this.multiAlertService) {
|
|
19974
|
+
if (this.multiAlertService?.activeAlerts) {
|
|
19958
19975
|
this.multiAlertService.close(isCurrentAlert);
|
|
19959
19976
|
}
|
|
19960
19977
|
this._closedChanged.emit(true);
|