@clr/angular 16.3.6 → 16.3.7

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.
@@ -2939,15 +2939,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
2939
2939
  * The full license information can be found in LICENSE in the root directory of this project.
2940
2940
  */
2941
2941
  class ClrExpandableAnimation {
2942
- constructor(element, domAdapter) {
2942
+ constructor(element, domAdapter, renderer) {
2943
2943
  this.element = element;
2944
2944
  this.domAdapter = domAdapter;
2945
+ this.renderer = renderer;
2945
2946
  this.startHeight = 0;
2946
2947
  }
2947
2948
  get expandAnimation() {
2948
2949
  return { value: this.clrExpandTrigger, params: { startHeight: this.startHeight } };
2949
2950
  }
2951
+ animationStart() {
2952
+ this.renderer.setStyle(this.element.nativeElement, 'overflow', 'hidden');
2953
+ }
2950
2954
  animationDone() {
2955
+ this.renderer.removeStyle(this.element.nativeElement, 'overflow');
2951
2956
  // A "safe" auto-update of the height ensuring basic OOTB user experience .
2952
2957
  // Prone to small jumps in initial animation height if data was changed in the meantime, window was resized, etc.
2953
2958
  // For optimal behavior call manually updateStartHeight() from the parent component before initiating the update.
@@ -2957,8 +2962,8 @@ class ClrExpandableAnimation {
2957
2962
  this.startHeight = this.domAdapter.computedHeight(this.element.nativeElement) || 0;
2958
2963
  }
2959
2964
  }
2960
- ClrExpandableAnimation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrExpandableAnimation, deps: [{ token: i0.ElementRef }, { token: DomAdapter }], target: i0.ɵɵFactoryTarget.Component });
2961
- ClrExpandableAnimation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrExpandableAnimation, selector: "clr-expandable-animation", inputs: { clrExpandTrigger: "clrExpandTrigger" }, host: { listeners: { "@expandAnimation.done": "animationDone()" }, properties: { "@expandAnimation": "this.expandAnimation" } }, providers: [DomAdapter], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host{display:block;overflow:hidden}\n"], animations: [
2965
+ ClrExpandableAnimation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrExpandableAnimation, deps: [{ token: i0.ElementRef }, { token: DomAdapter }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2966
+ ClrExpandableAnimation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrExpandableAnimation, selector: "clr-expandable-animation", inputs: { clrExpandTrigger: "clrExpandTrigger" }, host: { listeners: { "@expandAnimation.start": "animationStart()", "@expandAnimation.done": "animationDone()" }, properties: { "@expandAnimation": "this.expandAnimation" } }, providers: [DomAdapter], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host{display:block}\n"], animations: [
2962
2967
  trigger('expandAnimation', [
2963
2968
  transition('true <=> false', [
2964
2969
  style({ height: '{{startHeight}}px' }),
@@ -2975,12 +2980,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
2975
2980
  animate('0.2s ease-in-out', style({ height: '*' })),
2976
2981
  ]),
2977
2982
  ]),
2978
- ], providers: [DomAdapter], styles: [":host{display:block;overflow:hidden}\n"] }]
2979
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DomAdapter }]; }, propDecorators: { clrExpandTrigger: [{
2983
+ ], providers: [DomAdapter], styles: [":host{display:block}\n"] }]
2984
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DomAdapter }, { type: i0.Renderer2 }]; }, propDecorators: { clrExpandTrigger: [{
2980
2985
  type: Input
2981
2986
  }], expandAnimation: [{
2982
2987
  type: HostBinding,
2983
2988
  args: ['@expandAnimation']
2989
+ }], animationStart: [{
2990
+ type: HostListener,
2991
+ args: ['@expandAnimation.start']
2984
2992
  }], animationDone: [{
2985
2993
  type: HostListener,
2986
2994
  args: ['@expandAnimation.done']