@skyux/ag-grid 12.0.0-beta.2 → 12.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.
@@ -1,18 +1,20 @@
1
- import { ChangeDetectorRef } from '@angular/core';
1
+ import { OnDestroy } from '@angular/core';
2
2
  import { ICellRendererAngularComp } from 'ag-grid-angular';
3
+ import { BehaviorSubject } from 'rxjs';
3
4
  import { SkyCellRendererValidatorParams } from '../../types/cell-renderer-validator-params';
4
5
  import * as i0 from "@angular/core";
5
6
  /**
6
7
  * @internal
7
8
  */
8
- export declare class SkyAgGridCellRendererValidatorTooltipComponent implements ICellRendererAngularComp {
9
+ export declare class SkyAgGridCellRendererValidatorTooltipComponent implements ICellRendererAngularComp, OnDestroy {
9
10
  #private;
10
11
  set params(value: SkyCellRendererValidatorParams);
11
12
  cellRendererParams: SkyCellRendererValidatorParams | undefined;
12
13
  value: unknown;
13
- constructor(changeDetector: ChangeDetectorRef);
14
+ protected valueObservable: BehaviorSubject<string>;
15
+ ngOnDestroy(): void;
14
16
  agInit(params: SkyCellRendererValidatorParams): void;
15
- refresh(params: unknown): boolean;
17
+ refresh(params: SkyCellRendererValidatorParams): boolean;
16
18
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyAgGridCellRendererValidatorTooltipComponent, never>;
17
19
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyAgGridCellRendererValidatorTooltipComponent, "sky-ag-grid-cell-renderer-validator-tooltip", never, { "params": { "alias": "params"; "required": false; }; }, {}, never, never, true, never>;
18
20
  }
@@ -96,7 +96,7 @@ export declare enum SkyCellType {
96
96
  /**
97
97
  * **Edit and read-only modes**
98
98
  *
99
- * Cells in the column will be passed to a validator function that flags erroneous entries. You can set the validator function and message by passing them to [column definition's `cellRendererParams` property](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing) as `skyComponentProperties.validator` and `skyComponentProperties.validatorMessage`. SkyCellType.Validator can be combined with other cell types, such as SkyCellType.Autocomplete or SkyCellType.Date, by using the array syntax for the [column definition's `type` property](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing).
99
+ * Cells in the column will be passed to a validator function that flags erroneous entries. You can set the validator function and message by passing a `SkyAgGridValidatorProperties` object as `skyComponentProperties` to [column definition's `cellRendererParams` property](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing), like `skyComponentProperties.validator` and `skyComponentProperties.validatorMessage`. SkyCellType.Validator can be combined with other cell types, such as SkyCellType.Autocomplete or SkyCellType.Date, by using the array syntax for the [column definition's `type` property](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing).
100
100
  */
101
101
  Validator = "skyCellValidator"
102
102
  }
@@ -1,4 +1,18 @@
1
+ import type { Observable } from 'rxjs';
1
2
  export interface SkyAgGridValidatorProperties {
3
+ /**
4
+ * An optional function that returns an observable that emits a string. Can be used with resources to localize the
5
+ * value displayed in the cell.
6
+ */
7
+ valueResourceObservable?: (value: unknown, data?: unknown, rowIndex?: number | null) => Observable<string>;
8
+ /**
9
+ * A function that returns true if the value is valid, or false if it is not. Invalid values
10
+ * will be highlighted and display a validation message.
11
+ */
2
12
  validator?: (value: unknown, data?: unknown, rowIndex?: number | null) => boolean;
13
+ /**
14
+ * Either a string or a function that returns a string. The message to display when the value is
15
+ * invalid.
16
+ */
3
17
  validatorMessage?: string | ((value: unknown, data?: unknown, rowIndex?: number | null) => string);
4
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/ag-grid",
3
- "version": "12.0.0-beta.2",
3
+ "version": "12.0.0-beta.3",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -31,20 +31,20 @@
31
31
  "@angular/common": "^19.2.1",
32
32
  "@angular/core": "^19.2.1",
33
33
  "@angular/forms": "^19.2.1",
34
- "@skyux/autonumeric": "12.0.0-beta.2",
35
- "@skyux/core": "12.0.0-beta.2",
36
- "@skyux/data-manager": "12.0.0-beta.2",
37
- "@skyux/datetime": "12.0.0-beta.2",
38
- "@skyux/forms": "12.0.0-beta.2",
39
- "@skyux/i18n": "12.0.0-beta.2",
40
- "@skyux/icon": "12.0.0-beta.2",
41
- "@skyux/indicators": "12.0.0-beta.2",
42
- "@skyux/layout": "12.0.0-beta.2",
43
- "@skyux/lookup": "12.0.0-beta.2",
44
- "@skyux/popovers": "12.0.0-beta.2",
45
- "@skyux/theme": "12.0.0-beta.2",
46
- "ag-grid-angular": "^33.1.1",
47
- "ag-grid-community": "^33.1.1"
34
+ "@skyux/autonumeric": "12.0.0-beta.3",
35
+ "@skyux/core": "12.0.0-beta.3",
36
+ "@skyux/data-manager": "12.0.0-beta.3",
37
+ "@skyux/datetime": "12.0.0-beta.3",
38
+ "@skyux/forms": "12.0.0-beta.3",
39
+ "@skyux/i18n": "12.0.0-beta.3",
40
+ "@skyux/icon": "12.0.0-beta.3",
41
+ "@skyux/indicators": "12.0.0-beta.3",
42
+ "@skyux/layout": "12.0.0-beta.3",
43
+ "@skyux/lookup": "12.0.0-beta.3",
44
+ "@skyux/popovers": "12.0.0-beta.3",
45
+ "@skyux/theme": "12.0.0-beta.3",
46
+ "ag-grid-angular": "^33.2.1",
47
+ "ag-grid-community": "^33.2.1"
48
48
  },
49
49
  "dependencies": {
50
50
  "tslib": "^2.8.1"