@clr/angular 17.0.0-next.2 → 17.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/esm2020/button/button-loading/loading-button.mjs +11 -11
- package/esm2020/forms/common/wrapped-control.mjs +16 -15
- package/fesm2015/clr-angular.mjs +26 -24
- package/fesm2015/clr-angular.mjs.map +1 -1
- package/fesm2020/clr-angular.mjs +25 -24
- package/fesm2020/clr-angular.mjs.map +1 -1
- package/package.json +2 -2
package/fesm2020/clr-angular.mjs
CHANGED
|
@@ -3938,17 +3938,17 @@ class ClrLoadingButton {
|
|
|
3938
3938
|
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 });
|
|
3939
3939
|
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: `
|
|
3940
3940
|
<span @parent [ngSwitch]="state">
|
|
3941
|
-
<
|
|
3941
|
+
<ng-container *ngSwitchCase="buttonState.LOADING">
|
|
3942
3942
|
<span @spinner class="spinner spinner-inline"></span>
|
|
3943
|
-
</
|
|
3944
|
-
<
|
|
3943
|
+
</ng-container>
|
|
3944
|
+
<ng-container *ngSwitchCase="buttonState.SUCCESS">
|
|
3945
3945
|
<span
|
|
3946
3946
|
@validated
|
|
3947
3947
|
(@validated.done)="this.loadingStateChange(this.buttonState.DEFAULT)"
|
|
3948
3948
|
class="spinner spinner-inline spinner-check"
|
|
3949
3949
|
></span>
|
|
3950
|
-
</
|
|
3951
|
-
<span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
|
|
3950
|
+
</ng-container>
|
|
3951
|
+
<span *ngSwitchCase="buttonState.DEFAULT" @defaultButton class="clr-loading-btn-content">
|
|
3952
3952
|
<ng-content></ng-content>
|
|
3953
3953
|
</span>
|
|
3954
3954
|
</span>
|
|
@@ -3986,17 +3986,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
3986
3986
|
selector: 'button[clrLoading]',
|
|
3987
3987
|
template: `
|
|
3988
3988
|
<span @parent [ngSwitch]="state">
|
|
3989
|
-
<
|
|
3989
|
+
<ng-container *ngSwitchCase="buttonState.LOADING">
|
|
3990
3990
|
<span @spinner class="spinner spinner-inline"></span>
|
|
3991
|
-
</
|
|
3992
|
-
<
|
|
3991
|
+
</ng-container>
|
|
3992
|
+
<ng-container *ngSwitchCase="buttonState.SUCCESS">
|
|
3993
3993
|
<span
|
|
3994
3994
|
@validated
|
|
3995
3995
|
(@validated.done)="this.loadingStateChange(this.buttonState.DEFAULT)"
|
|
3996
3996
|
class="spinner spinner-inline spinner-check"
|
|
3997
3997
|
></span>
|
|
3998
|
-
</
|
|
3999
|
-
<span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
|
|
3998
|
+
</ng-container>
|
|
3999
|
+
<span *ngSwitchCase="buttonState.DEFAULT" @defaultButton class="clr-loading-btn-content">
|
|
4000
4000
|
<ng-content></ng-content>
|
|
4001
4001
|
</span>
|
|
4002
4002
|
</span>
|
|
@@ -4939,24 +4939,25 @@ class WrappedFormControl {
|
|
|
4939
4939
|
this.renderer.removeAttribute(this.el.nativeElement, 'aria-describedby');
|
|
4940
4940
|
}
|
|
4941
4941
|
getAriaDescribedById(helpers) {
|
|
4942
|
-
|
|
4943
|
-
if (helpers.showInvalid) {
|
|
4944
|
-
suffix = CONTROL_SUFFIX.ERROR;
|
|
4945
|
-
}
|
|
4946
|
-
else if (helpers.showValid) {
|
|
4947
|
-
suffix = CONTROL_SUFFIX.SUCCESS;
|
|
4948
|
-
}
|
|
4949
|
-
if (this.containerIdService) {
|
|
4950
|
-
return this.containerIdService.id.concat('-', suffix);
|
|
4951
|
-
}
|
|
4952
|
-
if (this.controlIdService) {
|
|
4953
|
-
return this.controlIdService.id.concat('-', suffix);
|
|
4954
|
-
}
|
|
4942
|
+
const elementId = this.containerIdService?.id || this.controlIdService?.id;
|
|
4955
4943
|
/**
|
|
4956
4944
|
* If ContainerIdService or ControlIdService are missing don't try to guess
|
|
4957
4945
|
* Don't set anything.
|
|
4958
4946
|
*/
|
|
4959
|
-
|
|
4947
|
+
if (!elementId) {
|
|
4948
|
+
return null;
|
|
4949
|
+
}
|
|
4950
|
+
/**
|
|
4951
|
+
* As the helper text is now always visible. If we have error/success then we should use both ids.
|
|
4952
|
+
*/
|
|
4953
|
+
const describedByIds = [`${elementId}-${CONTROL_SUFFIX.HELPER}`];
|
|
4954
|
+
if (helpers.showInvalid) {
|
|
4955
|
+
describedByIds.push(`${elementId}-${CONTROL_SUFFIX.ERROR}`);
|
|
4956
|
+
}
|
|
4957
|
+
else if (helpers.showValid) {
|
|
4958
|
+
describedByIds.push(`${elementId}-${CONTROL_SUFFIX.SUCCESS}`);
|
|
4959
|
+
}
|
|
4960
|
+
return describedByIds.join(' ');
|
|
4960
4961
|
}
|
|
4961
4962
|
}
|
|
4962
4963
|
WrappedFormControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: WrappedFormControl, deps: [{ token: i0.ViewContainerRef }, { token: i0.Type }, { token: i0.Injector }, { token: i1.NgControl }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|