@clr/angular 16.3.1 → 16.3.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/esm2020/button/button-loading/loading-button.mjs +5 -5
- package/esm2020/forms/datepicker/providers/date-io.service.mjs +2 -2
- package/esm2020/utils/popover/providers/popover-position.service.mjs +11 -3
- package/fesm2015/clr-angular.mjs +15 -7
- package/fesm2015/clr-angular.mjs.map +1 -1
- package/fesm2020/clr-angular.mjs +15 -7
- package/fesm2020/clr-angular.mjs.map +1 -1
- package/package.json +2 -2
package/fesm2020/clr-angular.mjs
CHANGED
|
@@ -1955,12 +1955,12 @@ class ClrPopoverPositionService {
|
|
|
1955
1955
|
*
|
|
1956
1956
|
* Note, more than 3 viewport violations and there isn't anything we can do to help. Also when there are two
|
|
1957
1957
|
* violations, we can't help if the violations are TOP+BOTTOM || LEFT+RIGHT => There is no transformation we
|
|
1958
|
-
* can make to the
|
|
1958
|
+
* can make to the position that will help.
|
|
1959
1959
|
*
|
|
1960
1960
|
* Some examples:
|
|
1961
1961
|
* There is only one error and Primary axis is VERTICAL
|
|
1962
1962
|
* - this.handleVerticalAxisOneViolation has a switch that will use the error sum to apply the correct
|
|
1963
|
-
* transform to the
|
|
1963
|
+
* transform to the position based on the reduction of visibilityViolations.
|
|
1964
1964
|
*
|
|
1965
1965
|
* There are two errors and Primary axis is HORIZONTAL
|
|
1966
1966
|
* - handleHorizontalAxisTwoViolations has a switch that uses the error sum to apply both transforms needed to
|
|
@@ -1992,6 +1992,14 @@ class ClrPopoverPositionService {
|
|
|
1992
1992
|
if (this.currentContentCoords.top < 0) {
|
|
1993
1993
|
this.contentOffsets.yOffset += Math.abs(this.currentContentCoords.top);
|
|
1994
1994
|
}
|
|
1995
|
+
/**
|
|
1996
|
+
* This detects the condition where the popover is flipped because it would violate the bottom of the viewport, but flipping it results in the
|
|
1997
|
+
* popover rendering above the top of the body (y coordinate outside the body). In that event, it should be rendered within the body
|
|
1998
|
+
* as much as possible, so this logic sets the top of popover to render touching the top of the body.
|
|
1999
|
+
*/
|
|
2000
|
+
if (this.contentOffsets.yOffset + this.currentAnchorCoords.y < 0) {
|
|
2001
|
+
this.contentOffsets.yOffset = 0 - this.currentContentCoords.top;
|
|
2002
|
+
}
|
|
1995
2003
|
return this.contentOffsets;
|
|
1996
2004
|
}
|
|
1997
2005
|
handleVerticalAxisOneViolation(errorSum) {
|
|
@@ -3923,7 +3931,7 @@ class ClrLoadingButton {
|
|
|
3923
3931
|
}
|
|
3924
3932
|
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 });
|
|
3925
3933
|
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: `
|
|
3926
|
-
<
|
|
3934
|
+
<span @parent [ngSwitch]="state">
|
|
3927
3935
|
<span *ngSwitchCase="buttonState.LOADING">
|
|
3928
3936
|
<span @spinner class="spinner spinner-inline"></span>
|
|
3929
3937
|
</span>
|
|
@@ -3937,7 +3945,7 @@ ClrLoadingButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
|
3937
3945
|
<span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
|
|
3938
3946
|
<ng-content></ng-content>
|
|
3939
3947
|
</span>
|
|
3940
|
-
</
|
|
3948
|
+
</span>
|
|
3941
3949
|
`, isInline: true, dependencies: [{ kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], animations: [
|
|
3942
3950
|
trigger('parent', [
|
|
3943
3951
|
// Skip :enter animation on first render.
|
|
@@ -3971,7 +3979,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
3971
3979
|
args: [{
|
|
3972
3980
|
selector: 'button[clrLoading]',
|
|
3973
3981
|
template: `
|
|
3974
|
-
<
|
|
3982
|
+
<span @parent [ngSwitch]="state">
|
|
3975
3983
|
<span *ngSwitchCase="buttonState.LOADING">
|
|
3976
3984
|
<span @spinner class="spinner spinner-inline"></span>
|
|
3977
3985
|
</span>
|
|
@@ -3985,7 +3993,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
3985
3993
|
<span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
|
|
3986
3994
|
<ng-content></ng-content>
|
|
3987
3995
|
</span>
|
|
3988
|
-
</
|
|
3996
|
+
</span>
|
|
3989
3997
|
`,
|
|
3990
3998
|
providers: [{ provide: LoadingListener, useExisting: ClrLoadingButton }],
|
|
3991
3999
|
animations: [
|
|
@@ -8410,7 +8418,7 @@ class DateIOService {
|
|
|
8410
8418
|
return '';
|
|
8411
8419
|
}
|
|
8412
8420
|
getDateValueFromDateString(date) {
|
|
8413
|
-
if (!date) {
|
|
8421
|
+
if (!date || typeof date !== 'string') {
|
|
8414
8422
|
return null;
|
|
8415
8423
|
}
|
|
8416
8424
|
const dateParts = date.match(USER_INPUT_REGEX);
|