@skyux/ag-grid 14.3.0 → 14.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.
@@ -1,6 +1,6 @@
1
1
  import { NgClass, CommonModule, NgTemplateOutlet, AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { NgModule, Injectable, signal, input, booleanAttribute, numberAttribute, viewChild, inject, DestroyRef, ElementRef, DOCUMENT, computed, effect, ContentChild, ChangeDetectionStrategy, Component, contentChildren, linkedSignal, ChangeDetectorRef, untracked, Directive, InjectionToken, model, output, contentChild, EnvironmentInjector, HostListener, ViewChild, ViewEncapsulation, HostBinding, isSignal, Input, RendererFactory2, CSP_NONCE } from '@angular/core';
3
+ import { NgModule, Injectable, signal, input, booleanAttribute, numberAttribute, viewChild, inject, DestroyRef, ElementRef, DOCUMENT, computed, effect, ContentChild, ChangeDetectionStrategy, Component, contentChildren, linkedSignal, ChangeDetectorRef, untracked, Directive, InjectionToken, model, output, contentChild, EnvironmentInjector, afterNextRender, HostListener, ViewChild, ViewEncapsulation, HostBinding, isSignal, Input, RendererFactory2, CSP_NONCE } from '@angular/core';
4
4
  import { AgGridAngular } from 'ag-grid-angular';
5
5
  import * as i3 from '@skyux/i18n';
6
6
  import { SkyLibResourcesService, SkyI18nModule } from '@skyux/i18n';
@@ -1227,41 +1227,39 @@ class SkyAgGridRowDeleteDirective {
1227
1227
  .subscribe((evt) => {
1228
1228
  this.rowDeleteIds.update((rowIds) => (rowIds ?? []).filter((id) => !!evt.api.getRowNode(id)));
1229
1229
  });
1230
- }
1231
- ngAfterContentInit() {
1232
- this.#overlay = this.#overlayService.create({
1233
- enableScroll: true,
1234
- environmentInjector: this.#environmentInjector,
1235
- showBackdrop: false,
1236
- closeOnNavigation: true,
1237
- enableClose: false,
1238
- enablePointerEvents: true,
1239
- });
1240
- this.#overlay.attachComponent(SkyAgGridRowDeleteComponent, [
1241
- {
1242
- provide: SKY_AG_GRID_ROW_DELETE_CONTEXT,
1243
- useValue: this.#rowDeleteSvc,
1244
- },
1245
- ]);
1246
- this.#zIndex
1247
- .pipe(takeUntil(this.#ngUnsubscribe), takeUntil(this.#overlay.closed), distinctUntilChanged())
1248
- .subscribe((zIndex) => {
1249
- if (this.#overlay) {
1250
- this.#overlay.componentRef.instance.zIndex = zIndex.toString(10);
1251
- }
1252
- });
1253
- this.#clipPath
1254
- .pipe(takeUntil(this.#ngUnsubscribe), takeUntil(this.#overlay.closed), distinctUntilChanged())
1255
- .subscribe((clipPath) => {
1256
- this.#overlay?.componentRef.instance.updateClipPath(clipPath);
1257
- });
1258
- }
1259
- ngAfterViewInit() {
1260
- this.#scrollableHostService
1261
- .watchScrollableHostClipPathChanges(this.#elementRef, this.#agGridBodyClipElements.asObservable())
1262
- .pipe(takeUntil(this.#ngUnsubscribe))
1263
- .subscribe((clipPath) => {
1264
- this.#clipPath.next(clipPath);
1230
+ afterNextRender(() => {
1231
+ this.#overlay = this.#overlayService.create({
1232
+ enableScroll: true,
1233
+ environmentInjector: this.#environmentInjector,
1234
+ showBackdrop: false,
1235
+ closeOnNavigation: false,
1236
+ enableClose: false,
1237
+ enablePointerEvents: true,
1238
+ });
1239
+ this.#overlay.attachComponent(SkyAgGridRowDeleteComponent, [
1240
+ {
1241
+ provide: SKY_AG_GRID_ROW_DELETE_CONTEXT,
1242
+ useValue: this.#rowDeleteSvc,
1243
+ },
1244
+ ]);
1245
+ this.#zIndex
1246
+ .pipe(takeUntil(this.#ngUnsubscribe), takeUntil(this.#overlay.closed), distinctUntilChanged())
1247
+ .subscribe((zIndex) => {
1248
+ if (this.#overlay) {
1249
+ this.#overlay.componentRef.instance.zIndex = zIndex.toString(10);
1250
+ }
1251
+ });
1252
+ this.#clipPath
1253
+ .pipe(takeUntil(this.#ngUnsubscribe), takeUntil(this.#overlay.closed), distinctUntilChanged())
1254
+ .subscribe((clipPath) => {
1255
+ this.#overlay?.componentRef.instance.updateClipPath(clipPath);
1256
+ });
1257
+ this.#scrollableHostService
1258
+ .watchScrollableHostClipPathChanges(this.#elementRef, this.#agGridBodyClipElements.asObservable())
1259
+ .pipe(takeUntil(this.#ngUnsubscribe))
1260
+ .subscribe((clipPath) => {
1261
+ this.#clipPath.next(clipPath);
1262
+ });
1265
1263
  });
1266
1264
  }
1267
1265
  ngOnDestroy() {
@@ -2275,8 +2273,8 @@ class SkyAgGridCellRendererCurrencyComponent {
2275
2273
  this.value = params.value;
2276
2274
  this.skyComponentProperties = params.skyComponentProperties || {};
2277
2275
  this.skyComponentProperties.format = 'currency';
2278
- this.skyComponentProperties.minDigits = 2;
2279
- this.skyComponentProperties.truncate = false;
2276
+ this.skyComponentProperties.minDigits ??= 2;
2277
+ this.skyComponentProperties.truncate ??= false;
2280
2278
  }
2281
2279
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2282
2280
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: SkyAgGridCellRendererCurrencyComponent, isStandalone: true, selector: "sky-ag-grid-cell-renderer-currency", inputs: { params: "params" }, ngImport: i0, template: "{{\n value === undefined ? undefined : (value | skyNumeric: skyComponentProperties)\n}}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: SkyNumericModule }, { kind: "pipe", type: i1.SkyNumericPipe, name: "skyNumeric" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }