@clr/angular 17.0.0-beta.2 → 17.0.0-beta.3

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.
@@ -1942,12 +1942,12 @@ class ClrPopoverPositionService {
1942
1942
  *
1943
1943
  * Note, more than 3 viewport violations and there isn't anything we can do to help. Also when there are two
1944
1944
  * violations, we can't help if the violations are TOP+BOTTOM || LEFT+RIGHT => There is no transformation we
1945
- * can make to the postion that will help.
1945
+ * can make to the position that will help.
1946
1946
  *
1947
1947
  * Some examples:
1948
1948
  * There is only one error and Primary axis is VERTICAL
1949
1949
  * - this.handleVerticalAxisOneViolation has a switch that will use the error sum to apply the correct
1950
- * transform to the postion based on the reduction of visibilityViolations.
1950
+ * transform to the position based on the reduction of visibilityViolations.
1951
1951
  *
1952
1952
  * There are two errors and Primary axis is HORIZONTAL
1953
1953
  * - handleHorizontalAxisTwoViolations has a switch that uses the error sum to apply both transforms needed to
@@ -1979,6 +1979,14 @@ class ClrPopoverPositionService {
1979
1979
  if (this.currentContentCoords.top < 0) {
1980
1980
  this.contentOffsets.yOffset += Math.abs(this.currentContentCoords.top);
1981
1981
  }
1982
+ /**
1983
+ * This detects the condition where the popover is flipped because it would violate the bottom of the viewport, but flipping it results in the
1984
+ * popover rendering above the top of the body (y coordinate outside the body). In that event, it should be rendered within the body
1985
+ * as much as possible, so this logic sets the top of popover to render touching the top of the body.
1986
+ */
1987
+ if (this.contentOffsets.yOffset + this.currentAnchorCoords.y < 0) {
1988
+ this.contentOffsets.yOffset = 0 - this.currentContentCoords.top;
1989
+ }
1982
1990
  return this.contentOffsets;
1983
1991
  }
1984
1992
  handleVerticalAxisOneViolation(errorSum) {
@@ -3910,7 +3918,7 @@ class ClrLoadingButton {
3910
3918
  }
3911
3919
  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 });
3912
3920
  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: `
3913
- <div @parent [ngSwitch]="state">
3921
+ <span @parent [ngSwitch]="state">
3914
3922
  <span *ngSwitchCase="buttonState.LOADING">
3915
3923
  <span @spinner class="spinner spinner-inline"></span>
3916
3924
  </span>
@@ -3924,7 +3932,7 @@ ClrLoadingButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
3924
3932
  <span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
3925
3933
  <ng-content></ng-content>
3926
3934
  </span>
3927
- </div>
3935
+ </span>
3928
3936
  `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], animations: [
3929
3937
  trigger('parent', [
3930
3938
  // Skip :enter animation on first render.
@@ -3958,7 +3966,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
3958
3966
  args: [{
3959
3967
  selector: 'button[clrLoading]',
3960
3968
  template: `
3961
- <div @parent [ngSwitch]="state">
3969
+ <span @parent [ngSwitch]="state">
3962
3970
  <span *ngSwitchCase="buttonState.LOADING">
3963
3971
  <span @spinner class="spinner spinner-inline"></span>
3964
3972
  </span>
@@ -3972,7 +3980,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
3972
3980
  <span *ngSwitchCase="buttonState.DEFAULT" @defaultButton>
3973
3981
  <ng-content></ng-content>
3974
3982
  </span>
3975
- </div>
3983
+ </span>
3976
3984
  `,
3977
3985
  providers: [{ provide: LoadingListener, useExisting: ClrLoadingButton }],
3978
3986
  animations: [
@@ -5773,7 +5781,7 @@ class ClrKeyFocus {
5773
5781
  }
5774
5782
  if (this.focusOnLoad) {
5775
5783
  this.currentItem.focus();
5776
- this.focusChange.next();
5784
+ this.focusChange.emit();
5777
5785
  }
5778
5786
  }
5779
5787
  }
@@ -8401,7 +8409,7 @@ class DateIOService {
8401
8409
  return '';
8402
8410
  }
8403
8411
  getDateValueFromDateString(date) {
8404
- if (!date) {
8412
+ if (!date || typeof date !== 'string') {
8405
8413
  return null;
8406
8414
  }
8407
8415
  const dateParts = date.match(USER_INPUT_REGEX);
@@ -25637,7 +25645,7 @@ class ClrWizard {
25637
25645
  */
25638
25646
  reset() {
25639
25647
  this.pageCollection.reset();
25640
- this.onReset.next();
25648
+ this.onReset.emit();
25641
25649
  }
25642
25650
  listenForNextPageChanges() {
25643
25651
  return this.navService.movedToNextPage.pipe(filter(() => isPlatformBrowser(this.platformId))).subscribe(() => {