@skyux/ag-grid 11.43.1 → 11.45.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.
@@ -1,3 +1,4 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
1
2
  import { NgModule } from '@angular/core';
2
3
  import { SkyStatusIndicatorModule } from '@skyux/indicators';
3
4
  import { SkyPopoverModule } from '@skyux/popovers';
@@ -5,7 +6,7 @@ import { SkyAgGridCellValidatorTooltipComponent } from './ag-grid-cell-validator
5
6
  import * as i0 from "@angular/core";
6
7
  export class SkyAgGridCellValidatorModule {
7
8
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
8
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, declarations: [SkyAgGridCellValidatorTooltipComponent], imports: [SkyPopoverModule, SkyStatusIndicatorModule], exports: [SkyAgGridCellValidatorTooltipComponent] }); }
9
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, declarations: [SkyAgGridCellValidatorTooltipComponent], imports: [SkyPopoverModule, SkyStatusIndicatorModule, NgTemplateOutlet], exports: [SkyAgGridCellValidatorTooltipComponent] }); }
9
10
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, imports: [SkyPopoverModule, SkyStatusIndicatorModule] }); }
10
11
  }
11
12
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, decorators: [{
@@ -13,7 +14,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
13
14
  args: [{
14
15
  declarations: [SkyAgGridCellValidatorTooltipComponent],
15
16
  exports: [SkyAgGridCellValidatorTooltipComponent],
16
- imports: [SkyPopoverModule, SkyStatusIndicatorModule],
17
+ imports: [SkyPopoverModule, SkyStatusIndicatorModule, NgTemplateOutlet],
17
18
  }]
18
19
  }] });
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWctZ3JpZC1jZWxsLXZhbGlkYXRvci5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvYWctZ3JpZC9zcmMvbGliL21vZHVsZXMvYWctZ3JpZC9jZWxsLXZhbGlkYXRvci9hZy1ncmlkLWNlbGwtdmFsaWRhdG9yLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQzdELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRW5ELE9BQU8sRUFBRSxzQ0FBc0MsRUFBRSxNQUFNLDRDQUE0QyxDQUFDOztBQU9wRyxNQUFNLE9BQU8sNEJBQTRCOytHQUE1Qiw0QkFBNEI7Z0hBQTVCLDRCQUE0QixpQkFKeEIsc0NBQXNDLGFBRTNDLGdCQUFnQixFQUFFLHdCQUF3QixhQUQxQyxzQ0FBc0M7Z0hBR3JDLDRCQUE0QixZQUY3QixnQkFBZ0IsRUFBRSx3QkFBd0I7OzRGQUV6Qyw0QkFBNEI7a0JBTHhDLFFBQVE7bUJBQUM7b0JBQ1IsWUFBWSxFQUFFLENBQUMsc0NBQXNDLENBQUM7b0JBQ3RELE9BQU8sRUFBRSxDQUFD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BTa3lQb3BvdmVyTW9kdWxlIH0gZnJvbSAnQHNreXV4L3BvcG92ZXJzJztcblxuaW1wb3J0IHsgU2t5QWdHcmlkQ2VsbFZhbGlkYXRvclRvb2x0aXBDb21wb25lbnQgfSBmcm9tICcuL2FnLWdyaWQtY2VsbC12YWxpZGF0b3ItdG9vbHRpcC5jb21wb25lbnQnO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtTa3lBZ0dyaWRDZWxsVmFsaWRhdG9yVG9vbHRpcENvbXBvbmVudF0sXG4gIGV4cG9ydHM6IFtTa3lBZ0dyaWRDZWxsVmFsaWRhdG9yVG9vbHRpcENvbXBvbmVudF0sXG4gIGltcG9ydHM6IFtTa3lQb3BvdmVyTW9kdWxlLCBTa3lTdGF0dXNJbmRpY2F0b3JNb2R1bGUsIE5nVGVtcGxhdGVPdXRsZXRdLFxufSlcbmV4cG9ydCBjbGFzcyBTa3lBZ0dyaWRDZWxsVmFsaWRhdG9yTW9kdWxlIHt9XG4iXX0=
@@ -15,5 +15,6 @@ export var SkyCellClass;
15
15
  SkyCellClass["Template"] = "sky-ag-grid-cell-template";
16
16
  SkyCellClass["Text"] = "sky-ag-grid-cell-text";
17
17
  SkyCellClass["Uneditable"] = "sky-ag-grid-cell-uneditable";
18
+ SkyCellClass["Validator"] = "sky-ag-grid-cell-validator";
18
19
  })(SkyCellClass || (SkyCellClass = {}));
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VsbC1jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9hZy1ncmlkL3NyYy9saWIvbW9kdWxlcy9hZy1ncmlkL3R5cGVzL2NlbGwtY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFDSCxNQUFNLENBQU4s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iB1bmtub3duLCBkYXRhPzogdW5rbm93biwgcm93SW5kZXg/OiBudW1iZXIpID0+IGJvb2xlYW47XG4gIHZhbGlkYXRvck1lc3NhZ2U/OlxuICAgIHwgc3RyaW5nXG4gICAgfCAoKHZhbHVlOiB1bmtub3duLCBkYXRhPzogdW5rbm93biwgcm93SW5kZXg/OiBudW1iZXIpID0+IHN0cmluZyk7XG59XG4iXX0=
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9yLXByb3BlcnRpZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvYWctZ3JpZC9zcmMvbGliL21vZHVsZXMvYWctZ3JpZC90eXBlcy92YWxpZGF0b3ItcHJvcGVydGllcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBTa3lBZ0dyaWRWYWxpZGF0b3JQcm9wZXJ0aWVzIHtcbiAgdmFsaWRhdG9yPzogKFxuICAgIHZhbHVlOiB1bmtub3duLFxuICAgIGRhdGE/OiB1bmtub3duLFxuICAgIHJvd0luZGV4PzogbnVtYmVyIHwgbnVsbCxcbiAgKSA9PiBib29sZWFuO1xuICB2YWxpZGF0b3JNZXNzYWdlPzpcbiAgICB8IHN0cmluZ1xuICAgIHwgKCh2YWx1ZTogdW5rbm93biwgZGF0YT86IHVua25vd24sIHJvd0luZGV4PzogbnVtYmVyIHwgbnVsbCkgPT4gc3RyaW5nKTtcbn1cbiJdfQ==
@@ -1,5 +1,5 @@
1
1
  import * as i1$1 from '@angular/common';
2
- import { DOCUMENT, CommonModule, AsyncPipe, NgTemplateOutlet } from '@angular/common';
2
+ import { DOCUMENT, CommonModule, NgTemplateOutlet, AsyncPipe } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
4
  import { NgModule, Injectable, input, numberAttribute, computed, inject, ChangeDetectorRef, ElementRef, booleanAttribute, Component, ChangeDetectionStrategy, ContentChild, HostBinding, Input, contentChildren, effect, Directive, TemplateRef, ViewChildren, ViewChild, EventEmitter, contentChild, EnvironmentInjector, ViewContainerRef, Output, HostListener, ViewEncapsulation, signal, Optional } from '@angular/core';
5
5
  import * as i1 from '@skyux/core';
@@ -2105,85 +2105,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2105
2105
  * @internal
2106
2106
  */
2107
2107
  class SkyAgGridCellValidatorTooltipComponent {
2108
+ constructor() {
2109
+ this.popoverMessageStream = new Subject();
2110
+ this.showValidatorMessage = signal(false);
2111
+ this.#listenersAdded = false;
2112
+ }
2108
2113
  set params(value) {
2109
2114
  this.cellRendererParams = value;
2110
- /*istanbul ignore next*/
2111
- this.cellRendererParams?.api?.addEventListener('cellFocused', (eventParams) => {
2112
- // We want to close any popovers that are opened when other cells are focused, but open a popover if the current cell is focused.
2113
- if (eventParams.column.getColId() !==
2114
- this.cellRendererParams?.column?.getColId() ||
2115
- eventParams.rowIndex !== this.cellRendererParams?.node?.rowIndex) {
2115
+ if (value?.api && !this.#listenersAdded) {
2116
+ this.#listenersAdded = true;
2117
+ value.api.addEventListener('cellFocused', (eventParams) => {
2118
+ // We want to close any popovers that are opened when other cells are focused, but open a popover if the current cell is focused.
2119
+ if (eventParams.column.getColId() ===
2120
+ value.column?.getColId() &&
2121
+ eventParams.rowIndex === value.node?.rowIndex) {
2122
+ this.showPopover();
2123
+ }
2124
+ else {
2125
+ this.hidePopover();
2126
+ }
2127
+ });
2128
+ value.api.addEventListener('cellEditingStarted', () => {
2116
2129
  this.hidePopover();
2117
- }
2118
- });
2119
- /*istanbul ignore next*/
2120
- this.cellRendererParams?.eGridCell?.addEventListener('keyup', (event) => {
2121
- if (['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp'].includes(event.key)) {
2122
- this.showPopover();
2123
- }
2124
- });
2125
- this.cellRendererParams?.eGridCell?.addEventListener('mouseenter', () => {
2126
- this.#scheduleDelayedPopover();
2127
- });
2128
- this.cellRendererParams?.eGridCell?.addEventListener('mouseleave', () => {
2129
- this.hidePopover();
2130
- });
2131
- /*istanbul ignore next*/
2132
- this.cellRendererParams?.api?.addEventListener('cellEditingStarted', () => {
2133
- this.hidePopover();
2134
- });
2135
- if (typeof this.cellRendererParams?.skyComponentProperties
2136
- ?.validatorMessage === 'function') {
2137
- this.validatorMessage =
2138
- this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value, this.cellRendererParams.data, this.cellRendererParams?.node?.rowIndex ?? undefined);
2130
+ });
2131
+ }
2132
+ if (typeof value?.skyComponentProperties?.validatorMessage === 'function') {
2133
+ this.validatorMessage = value.skyComponentProperties.validatorMessage(value.value, value.data, value?.node?.rowIndex);
2139
2134
  }
2140
2135
  else {
2141
- this.validatorMessage =
2142
- this.cellRendererParams?.skyComponentProperties?.validatorMessage;
2136
+ this.validatorMessage = value?.skyComponentProperties?.validatorMessage;
2143
2137
  }
2144
- this.#changeDetector.markForCheck();
2145
- }
2146
- #hoverTimeout;
2147
- #changeDetector;
2148
- constructor(changeDetector) {
2149
- this.popoverMessageStream = new Subject();
2150
- this.#changeDetector = changeDetector;
2138
+ this.showValidatorMessage.set(this.#showValidatorMessage());
2151
2139
  }
2140
+ #listenersAdded;
2152
2141
  hidePopover() {
2153
- this.#cancelDelayedPopover();
2154
2142
  this.popoverMessageStream.next({ type: SkyPopoverMessageType.Close });
2155
2143
  }
2156
2144
  showPopover() {
2157
- this.#cancelDelayedPopover();
2158
- this.popoverMessageStream.next({ type: SkyPopoverMessageType.Open });
2145
+ if (this.#shouldShowPopover()) {
2146
+ this.popoverMessageStream.next({ type: SkyPopoverMessageType.Open });
2147
+ }
2159
2148
  }
2160
- #scheduleDelayedPopover() {
2161
- /* istanbul ignore else */
2162
- if (!this.#hoverTimeout) {
2163
- this.#hoverTimeout = window.setTimeout(() => {
2164
- this.showPopover();
2165
- }, 300);
2149
+ #showValidatorMessage() {
2150
+ if (!this.validatorMessage) {
2151
+ return false;
2152
+ }
2153
+ if (typeof this.cellRendererParams?.skyComponentProperties?.validator ===
2154
+ 'function') {
2155
+ return !this.cellRendererParams.skyComponentProperties.validator(this.cellRendererParams.value, this.cellRendererParams.data, this.cellRendererParams.node?.rowIndex);
2156
+ }
2157
+ else {
2158
+ return true;
2166
2159
  }
2167
2160
  }
2168
- #cancelDelayedPopover() {
2169
- if (this.#hoverTimeout) {
2170
- window.clearTimeout(this.#hoverTimeout);
2171
- this.#hoverTimeout = undefined;
2161
+ #shouldShowPopover() {
2162
+ if (!this.showValidatorMessage()) {
2163
+ return false;
2172
2164
  }
2165
+ const editingCells = this.cellRendererParams?.api.getEditingCells() ?? [];
2166
+ return editingCells.length === 0;
2173
2167
  }
2174
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2175
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: { params: "params" }, ngImport: i0, template: "<div\n skyPopoverTrigger=\"mouseenter\"\n class=\"sky-validator-cell\"\n [skyPopover]=\"validatorPopover\"\n [skyPopoverMessageStream]=\"popoverMessageStream\"\n>\n <ng-content />\n <sky-status-indicator\n descriptionType=\"none\"\n indicatorType=\"danger\"\n class=\"sky-pull-right\"\n />\n</div>\n<sky-popover #validatorPopover popoverType=\"danger\">\n {{ validatorMessage }}\n</sky-popover>\n", styles: [":host div.sky-validator-cell{height:100%;width:100%}:host div.sky-validator-cell:focus{outline:none}\n"], dependencies: [{ kind: "component", type: i1$5.λ6, selector: "sky-popover", inputs: ["alignment", "placement", "popoverTitle", "popoverType"], outputs: ["popoverClosed", "popoverOpened"] }, { kind: "directive", type: i1$5.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }, { kind: "component", type: i2$3.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription", "helpPopoverContent", "helpPopoverTitle", "helpKey"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2168
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2169
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: { params: "params" }, ngImport: i0, template: "<ng-template #displayValue>\n <ng-content />\n</ng-template>\n\n@if (showValidatorMessage()) {\n <div\n skyPopoverTrigger=\"mouseenter\"\n class=\"sky-validator-cell\"\n [skyPopover]=\"validatorPopover\"\n [skyPopoverMessageStream]=\"popoverMessageStream\"\n >\n <ng-container *ngTemplateOutlet=\"displayValue\" />\n <sky-status-indicator\n descriptionType=\"none\"\n indicatorType=\"danger\"\n class=\"sky-pull-right\"\n />\n </div>\n <sky-popover\n #validatorPopover\n data-sky-id=\"validatorPopover\"\n popoverType=\"danger\"\n >\n {{ validatorMessage }}\n </sky-popover>\n} @else {\n <ng-container *ngTemplateOutlet=\"displayValue\" />\n}\n", styles: [":host{display:contents}:host div.sky-validator-cell{height:100%;min-height:var(--ag-row-height);width:100%}:host div.sky-validator-cell:focus{outline:none}\n"], dependencies: [{ kind: "component", type: i1$5.λ6, selector: "sky-popover", inputs: ["alignment", "placement", "popoverTitle", "popoverType"], outputs: ["popoverClosed", "popoverOpened"] }, { kind: "directive", type: i1$5.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }, { kind: "component", type: i2$3.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription", "helpPopoverContent", "helpPopoverTitle", "helpKey"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2176
2170
  }
2177
2171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, decorators: [{
2178
2172
  type: Component,
2179
- args: [{ selector: 'sky-ag-grid-cell-validator-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n skyPopoverTrigger=\"mouseenter\"\n class=\"sky-validator-cell\"\n [skyPopover]=\"validatorPopover\"\n [skyPopoverMessageStream]=\"popoverMessageStream\"\n>\n <ng-content />\n <sky-status-indicator\n descriptionType=\"none\"\n indicatorType=\"danger\"\n class=\"sky-pull-right\"\n />\n</div>\n<sky-popover #validatorPopover popoverType=\"danger\">\n {{ validatorMessage }}\n</sky-popover>\n", styles: [":host div.sky-validator-cell{height:100%;width:100%}:host div.sky-validator-cell:focus{outline:none}\n"] }]
2180
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { params: [{
2173
+ args: [{ selector: 'sky-ag-grid-cell-validator-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #displayValue>\n <ng-content />\n</ng-template>\n\n@if (showValidatorMessage()) {\n <div\n skyPopoverTrigger=\"mouseenter\"\n class=\"sky-validator-cell\"\n [skyPopover]=\"validatorPopover\"\n [skyPopoverMessageStream]=\"popoverMessageStream\"\n >\n <ng-container *ngTemplateOutlet=\"displayValue\" />\n <sky-status-indicator\n descriptionType=\"none\"\n indicatorType=\"danger\"\n class=\"sky-pull-right\"\n />\n </div>\n <sky-popover\n #validatorPopover\n data-sky-id=\"validatorPopover\"\n popoverType=\"danger\"\n >\n {{ validatorMessage }}\n </sky-popover>\n} @else {\n <ng-container *ngTemplateOutlet=\"displayValue\" />\n}\n", styles: [":host{display:contents}:host div.sky-validator-cell{height:100%;min-height:var(--ag-row-height);width:100%}:host div.sky-validator-cell:focus{outline:none}\n"] }]
2174
+ }], propDecorators: { params: [{
2181
2175
  type: Input
2182
2176
  }] } });
2183
2177
 
2184
2178
  class SkyAgGridCellValidatorModule {
2185
2179
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2186
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, declarations: [SkyAgGridCellValidatorTooltipComponent], imports: [SkyPopoverModule, SkyStatusIndicatorModule], exports: [SkyAgGridCellValidatorTooltipComponent] }); }
2180
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, declarations: [SkyAgGridCellValidatorTooltipComponent], imports: [SkyPopoverModule, SkyStatusIndicatorModule, NgTemplateOutlet], exports: [SkyAgGridCellValidatorTooltipComponent] }); }
2187
2181
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, imports: [SkyPopoverModule, SkyStatusIndicatorModule] }); }
2188
2182
  }
2189
2183
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellValidatorModule, decorators: [{
@@ -2191,7 +2185,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2191
2185
  args: [{
2192
2186
  declarations: [SkyAgGridCellValidatorTooltipComponent],
2193
2187
  exports: [SkyAgGridCellValidatorTooltipComponent],
2194
- imports: [SkyPopoverModule, SkyStatusIndicatorModule],
2188
+ imports: [SkyPopoverModule, SkyStatusIndicatorModule, NgTemplateOutlet],
2195
2189
  }]
2196
2190
  }] });
2197
2191
 
@@ -2207,34 +2201,31 @@ class SkyAgGridCellRendererCurrencyComponent {
2207
2201
  this.agInit(value);
2208
2202
  }
2209
2203
  /**
2210
- * agInit is called by agGrid once after the renderer is created and provides the renderer with the information it needs.
2211
- * @param params The cell renderer params that include data about the cell, column, row, and grid.
2204
+ * agInit is called by AG Grid once after the renderer is created and provides the renderer with the information it needs.
2212
2205
  */
2213
2206
  agInit(params) {
2214
2207
  this.#updateProperties(params);
2215
2208
  }
2216
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2209
+ /**
2210
+ * refresh is called by AG Grid to update the cell without destroying and recreating the component.
2211
+ */
2217
2212
  refresh(params) {
2213
+ this.agInit(params);
2218
2214
  return false;
2219
2215
  }
2220
2216
  #updateProperties(params) {
2221
2217
  this.value = params.value;
2222
- this.columnWidth = params.column?.getActualWidth();
2223
- this.rowHeightWithoutBorders =
2224
- typeof params.node?.rowHeight === 'number'
2225
- ? params.node?.rowHeight - 4
2226
- : undefined;
2227
2218
  this.skyComponentProperties = params.skyComponentProperties || {};
2228
2219
  this.skyComponentProperties.format = 'currency';
2229
2220
  this.skyComponentProperties.minDigits = 2;
2230
2221
  this.skyComponentProperties.truncate = false;
2231
2222
  }
2232
2223
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2233
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: { params: "params" }, ngImport: i0, template: "<span\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{\n value === undefined\n ? undefined\n : (value | skyNumeric: skyComponentProperties)\n }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "pipe", type: i1.SkyNumericPipe, name: "skyNumeric" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2224
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: { params: "params" }, ngImport: i0, template: "{{\n value === undefined ? undefined : (value | skyNumeric: skyComponentProperties)\n}}\n", styles: [":host{display:contents}input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "pipe", type: i1.SkyNumericPipe, name: "skyNumeric" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2234
2225
  }
2235
2226
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, decorators: [{
2236
2227
  type: Component,
2237
- args: [{ selector: 'sky-ag-grid-cell-renderer-currency', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{\n value === undefined\n ? undefined\n : (value | skyNumeric: skyComponentProperties)\n }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"] }]
2228
+ args: [{ selector: 'sky-ag-grid-cell-renderer-currency', changeDetection: ChangeDetectionStrategy.OnPush, template: "{{\n value === undefined ? undefined : (value | skyNumeric: skyComponentProperties)\n}}\n", styles: [":host{display:contents}input{border:none;padding-left:11px}\n"] }]
2238
2229
  }], propDecorators: { params: [{
2239
2230
  type: Input
2240
2231
  }] } });
@@ -2267,11 +2258,11 @@ class SkyAgGridCellRendererCurrencyValidatorComponent {
2267
2258
  return false;
2268
2259
  }
2269
2260
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellRendererCurrencyValidatorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2270
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SkyAgGridCellRendererCurrencyValidatorComponent, selector: "sky-ag-grid-cell-renderer-currency-validator", inputs: { parameters: "parameters" }, ngImport: i0, template: "@if (cellRendererParams) {\n <sky-ag-grid-cell-validator-tooltip [params]=\"cellRendererParams\">\n @if (isNumeric(cellRendererParams.value)) {\n <sky-ag-grid-cell-renderer-currency [params]=\"cellRendererParams\" />\n } @else {\n {{ cellRendererParams.value }}\n }\n </sky-ag-grid-cell-validator-tooltip>\n}\n", dependencies: [{ kind: "component", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: ["params"] }, { kind: "component", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: ["params"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2261
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SkyAgGridCellRendererCurrencyValidatorComponent, selector: "sky-ag-grid-cell-renderer-currency-validator", inputs: { parameters: "parameters" }, ngImport: i0, template: "@if (cellRendererParams) {\n <sky-ag-grid-cell-validator-tooltip [params]=\"cellRendererParams\">\n @if (isNumeric(cellRendererParams.value)) {\n <sky-ag-grid-cell-renderer-currency [params]=\"cellRendererParams\" />\n } @else {\n {{ cellRendererParams.value }}\n }\n </sky-ag-grid-cell-validator-tooltip>\n}\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: ["params"] }, { kind: "component", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: ["params"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2271
2262
  }
2272
2263
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellRendererCurrencyValidatorComponent, decorators: [{
2273
2264
  type: Component,
2274
- args: [{ selector: 'sky-ag-grid-cell-renderer-currency-validator', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (cellRendererParams) {\n <sky-ag-grid-cell-validator-tooltip [params]=\"cellRendererParams\">\n @if (isNumeric(cellRendererParams.value)) {\n <sky-ag-grid-cell-renderer-currency [params]=\"cellRendererParams\" />\n } @else {\n {{ cellRendererParams.value }}\n }\n </sky-ag-grid-cell-validator-tooltip>\n}\n" }]
2265
+ args: [{ selector: 'sky-ag-grid-cell-renderer-currency-validator', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (cellRendererParams) {\n <sky-ag-grid-cell-validator-tooltip [params]=\"cellRendererParams\">\n @if (isNumeric(cellRendererParams.value)) {\n <sky-ag-grid-cell-renderer-currency [params]=\"cellRendererParams\" />\n } @else {\n {{ cellRendererParams.value }}\n }\n </sky-ag-grid-cell-validator-tooltip>\n}\n", styles: [":host{display:contents}\n"] }]
2275
2266
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { parameters: [{
2276
2267
  type: Input
2277
2268
  }] } });
@@ -3060,6 +3051,7 @@ var SkyCellClass;
3060
3051
  SkyCellClass["Template"] = "sky-ag-grid-cell-template";
3061
3052
  SkyCellClass["Text"] = "sky-ag-grid-cell-text";
3062
3053
  SkyCellClass["Uneditable"] = "sky-ag-grid-cell-uneditable";
3054
+ SkyCellClass["Validator"] = "sky-ag-grid-cell-validator";
3063
3055
  })(SkyCellClass || (SkyCellClass = {}));
3064
3056
 
3065
3057
  /**
@@ -3113,7 +3105,8 @@ function getValidatorCellRendererSelector(component, fallback) {
3113
3105
  if (params.colDef &&
3114
3106
  typeof params.colDef.cellRendererParams?.skyComponentProperties
3115
3107
  ?.validator === 'function') {
3116
- if (!params.colDef.cellRendererParams.skyComponentProperties.validator(params.value, params.data, params?.node?.rowIndex)) {
3108
+ if (params.column?.isCellEditable(params.node) ||
3109
+ !params.colDef.cellRendererParams.skyComponentProperties.validator(params.value, params.data, params?.node?.rowIndex)) {
3117
3110
  return {
3118
3111
  component,
3119
3112
  params: {
@@ -3293,6 +3286,7 @@ class SkyAgGridService {
3293
3286
  }
3294
3287
  const validatorCellClassRules = {
3295
3288
  [SkyCellClass.Invalid]: getValidatorFn(),
3289
+ [SkyCellClass.Validator]: cellClassRuleTrueExpression,
3296
3290
  };
3297
3291
  function getHeaderClass(...classNames) {
3298
3292
  return (params) => {