@genesislcap/grid-pro 14.183.7 → 14.183.8-alpha-b447c11.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.
@@ -3976,7 +3976,7 @@
3976
3976
  "kind": "field",
3977
3977
  "name": "params",
3978
3978
  "type": {
3979
- "text": "ICellRendererParams"
3979
+ "text": "ICellRendererParams & BooleanRendererParams"
3980
3980
  },
3981
3981
  "privacy": "public"
3982
3982
  },
@@ -3987,6 +3987,21 @@
3987
3987
  "text": "boolean"
3988
3988
  }
3989
3989
  },
3990
+ {
3991
+ "kind": "method",
3992
+ "name": "isDisabled",
3993
+ "privacy": "public",
3994
+ "return": {
3995
+ "type": {
3996
+ "text": "boolean"
3997
+ }
3998
+ },
3999
+ "parameters": [
4000
+ {
4001
+ "name": "data"
4002
+ }
4003
+ ]
4004
+ },
3990
4005
  {
3991
4006
  "kind": "method",
3992
4007
  "name": "init",
@@ -1,13 +1,26 @@
1
1
  import { ICellRendererComp, ICellRendererParams } from '@ag-grid-community/core';
2
2
  import { FoundationElement } from '@microsoft/fast-foundation';
3
+ /**
4
+ * Parameters for the {@link @genesislcap/grid-pro#GridPro} boolean renderer.
5
+ * @public
6
+ */
7
+ export type BooleanRendererParams = {
8
+ /**
9
+ * Function to determine whether the boolean renderer should be disabled for a specific row.
10
+ * @param rowData - The data associated with the row.
11
+ * @returns A boolean indicating whether the button should be disabled.
12
+ */
13
+ isDisabled?: (rowData: any) => boolean;
14
+ };
3
15
  /**
4
16
  * The AG Boolean Renderer element.
5
17
  * @public
6
18
  * @tagname %%prefix%%-boolean-renderer
7
19
  */
8
20
  export declare class BooleanRenderer extends FoundationElement implements ICellRendererComp {
9
- params: ICellRendererParams;
21
+ params: ICellRendererParams & BooleanRendererParams;
10
22
  selected: boolean;
23
+ isDisabled(data: any): boolean;
11
24
  init(params: ICellRendererParams): void;
12
25
  changeHandler(e: any): void;
13
26
  getGui(): HTMLElement;
@@ -1 +1 @@
1
- {"version":3,"file":"boolean.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/boolean.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EACjB,mBAAmB,EAEpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,iBAAkB,YAAW,iBAAiB;IAE1E,MAAM,EAAE,mBAAmB,CAAC;IAGnC,QAAQ,EAAE,OAAO,CAAC;IAEX,IAAI,CAAC,MAAM,EAAE,mBAAmB;IAMhC,aAAa,CAAC,CAAC,KAAA;IAgDf,MAAM,IAAI,WAAW;IAIrB,OAAO;IAEP,OAAO,CAAC,MAAM,EAAE,mBAAmB;IAK1C,QAAQ;IAIR,mBAAmB;CAGpB;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iDAMnC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,iGASxC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;0BAItC,CAAC"}
1
+ {"version":3,"file":"boolean.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/boolean.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EACjB,mBAAmB,EAEpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAI/D;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC;CACxC,CAAC;AAEF;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,iBAAkB,YAAW,iBAAiB;IAE1E,MAAM,EAAE,mBAAmB,GAAG,qBAAqB,CAAC;IAG3D,QAAQ,EAAE,OAAO,CAAC;IAEX,UAAU,CAAC,IAAI,KAAA,GAAG,OAAO;IAYzB,IAAI,CAAC,MAAM,EAAE,mBAAmB;IAMhC,aAAa,CAAC,CAAC,KAAA;IAgDf,MAAM,IAAI,WAAW;IAIrB,OAAO;IAEP,OAAO,CAAC,MAAM,EAAE,mBAAmB;IAK1C,QAAQ;IAIR,mBAAmB;CAGpB;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iDAMnC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,iGASxC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;0BAItC,CAAC"}
@@ -3,12 +3,26 @@ import { Events, } from '@ag-grid-community/core';
3
3
  import { css, html, observable } from '@microsoft/fast-element';
4
4
  import { FoundationElement } from '@microsoft/fast-foundation';
5
5
  import { EDITED_COLUMN_FIELD } from '../grid-pro.types';
6
+ import { logger } from '../utils';
6
7
  /**
7
8
  * The AG Boolean Renderer element.
8
9
  * @public
9
10
  * @tagname %%prefix%%-boolean-renderer
10
11
  */
11
12
  export class BooleanRenderer extends FoundationElement {
13
+ isDisabled(data) {
14
+ var _a;
15
+ if (typeof ((_a = this.params) === null || _a === void 0 ? void 0 : _a.isDisabled) === 'function') {
16
+ try {
17
+ console.log('haha', this.params.isDisabled(data));
18
+ return this.params.isDisabled(data);
19
+ }
20
+ catch (error) {
21
+ logger.error('Error executing grid action cell renderer isDisabled callback:', error);
22
+ }
23
+ }
24
+ return !this.params.colDef.editable;
25
+ }
12
26
  init(params) {
13
27
  if (!params)
14
28
  return;
@@ -96,7 +110,7 @@ export const getAgBooleanRendererTemplate = (designSystem = 'foundation') => {
96
110
  <${checkboxComponent}
97
111
  @change=${(x, c) => x.changeHandler(c.event)}
98
112
  :checked=${(x) => x.selected}
99
- ?disabled=${(x) => !x.params.colDef.editable}
113
+ ?disabled=${(x) => { var _a; return x.isDisabled((_a = x.params) === null || _a === void 0 ? void 0 : _a.data); }}
100
114
  ></${checkboxComponent}>
101
115
  `;
102
116
  };
@@ -3145,6 +3145,54 @@
3145
3145
  "isAbstract": false,
3146
3146
  "name": "isCancelBeforeStart"
3147
3147
  },
3148
+ {
3149
+ "kind": "Method",
3150
+ "canonicalReference": "@genesislcap/grid-pro!BooleanRenderer#isDisabled:member(1)",
3151
+ "docComment": "",
3152
+ "excerptTokens": [
3153
+ {
3154
+ "kind": "Content",
3155
+ "text": "isDisabled(data: "
3156
+ },
3157
+ {
3158
+ "kind": "Content",
3159
+ "text": "any"
3160
+ },
3161
+ {
3162
+ "kind": "Content",
3163
+ "text": "): "
3164
+ },
3165
+ {
3166
+ "kind": "Content",
3167
+ "text": "boolean"
3168
+ },
3169
+ {
3170
+ "kind": "Content",
3171
+ "text": ";"
3172
+ }
3173
+ ],
3174
+ "isStatic": false,
3175
+ "returnTypeTokenRange": {
3176
+ "startIndex": 3,
3177
+ "endIndex": 4
3178
+ },
3179
+ "releaseTag": "Public",
3180
+ "isProtected": false,
3181
+ "overloadIndex": 1,
3182
+ "parameters": [
3183
+ {
3184
+ "parameterName": "data",
3185
+ "parameterTypeTokenRange": {
3186
+ "startIndex": 1,
3187
+ "endIndex": 2
3188
+ },
3189
+ "isOptional": false
3190
+ }
3191
+ ],
3192
+ "isOptional": false,
3193
+ "isAbstract": false,
3194
+ "name": "isDisabled"
3195
+ },
3148
3196
  {
3149
3197
  "kind": "Property",
3150
3198
  "canonicalReference": "@genesislcap/grid-pro!BooleanRenderer#params:member",
@@ -3159,6 +3207,15 @@
3159
3207
  "text": "ICellRendererParams",
3160
3208
  "canonicalReference": "@ag-grid-community/core!ICellRendererParams:interface"
3161
3209
  },
3210
+ {
3211
+ "kind": "Content",
3212
+ "text": " & "
3213
+ },
3214
+ {
3215
+ "kind": "Reference",
3216
+ "text": "BooleanRendererParams",
3217
+ "canonicalReference": "@genesislcap/grid-pro!BooleanRendererParams:type"
3218
+ },
3162
3219
  {
3163
3220
  "kind": "Content",
3164
3221
  "text": ";"
@@ -3170,7 +3227,7 @@
3170
3227
  "name": "params",
3171
3228
  "propertyTypeTokenRange": {
3172
3229
  "startIndex": 1,
3173
- "endIndex": 2
3230
+ "endIndex": 4
3174
3231
  },
3175
3232
  "isStatic": false,
3176
3233
  "isProtected": false,
@@ -3267,6 +3324,32 @@
3267
3324
  }
3268
3325
  ]
3269
3326
  },
3327
+ {
3328
+ "kind": "TypeAlias",
3329
+ "canonicalReference": "@genesislcap/grid-pro!BooleanRendererParams:type",
3330
+ "docComment": "/**\n * Parameters for the {@link @genesislcap/grid-pro#GridPro} boolean renderer.\n *\n * @public\n */\n",
3331
+ "excerptTokens": [
3332
+ {
3333
+ "kind": "Content",
3334
+ "text": "export type BooleanRendererParams = "
3335
+ },
3336
+ {
3337
+ "kind": "Content",
3338
+ "text": "{\n isDisabled?: (rowData: any) => boolean;\n}"
3339
+ },
3340
+ {
3341
+ "kind": "Content",
3342
+ "text": ";"
3343
+ }
3344
+ ],
3345
+ "fileUrlPath": "src/cell-renderers/boolean.renderer.ts",
3346
+ "releaseTag": "Public",
3347
+ "name": "BooleanRendererParams",
3348
+ "typeTokenRange": {
3349
+ "startIndex": 1,
3350
+ "endIndex": 2
3351
+ }
3352
+ },
3270
3353
  {
3271
3354
  "kind": "Variable",
3272
3355
  "canonicalReference": "@genesislcap/grid-pro!CellTemplate:var",
@@ -418,8 +418,9 @@ export declare const backgroundSwatch: SwatchRGB;
418
418
  * @tagname %%prefix%%-boolean-renderer
419
419
  */
420
420
  export declare class BooleanRenderer extends FoundationElement implements ICellRendererComp {
421
- params: ICellRendererParams;
421
+ params: ICellRendererParams & BooleanRendererParams;
422
422
  selected: boolean;
423
+ isDisabled(data: any): boolean;
423
424
  init(params: ICellRendererParams): void;
424
425
  changeHandler(e: any): void;
425
426
  getGui(): HTMLElement;
@@ -429,6 +430,19 @@ export declare class BooleanRenderer extends FoundationElement implements ICellR
429
430
  isCancelBeforeStart(): boolean;
430
431
  }
431
432
 
433
+ /**
434
+ * Parameters for the {@link @genesislcap/grid-pro#GridPro} boolean renderer.
435
+ * @public
436
+ */
437
+ export declare type BooleanRendererParams = {
438
+ /**
439
+ * Function to determine whether the boolean renderer should be disabled for a specific row.
440
+ * @param rowData - The data associated with the row.
441
+ * @returns A boolean indicating whether the button should be disabled.
442
+ */
443
+ isDisabled?: (rowData: any) => boolean;
444
+ };
445
+
432
446
  /**
433
447
  * The Grid Pro Cell Template.
434
448
  * @public
@@ -0,0 +1,22 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [BooleanRenderer](./grid-pro.booleanrenderer.md) &gt; [isDisabled](./grid-pro.booleanrenderer.isdisabled.md)
4
+
5
+ ## BooleanRenderer.isDisabled() method
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ isDisabled(data: any): boolean;
11
+ ```
12
+
13
+ ## Parameters
14
+
15
+ | Parameter | Type | Description |
16
+ | --- | --- | --- |
17
+ | data | any | |
18
+
19
+ **Returns:**
20
+
21
+ boolean
22
+
@@ -19,7 +19,7 @@ export declare class BooleanRenderer extends FoundationElement implements ICellR
19
19
 
20
20
  | Property | Modifiers | Type | Description |
21
21
  | --- | --- | --- | --- |
22
- | [params](./grid-pro.booleanrenderer.params.md) | | ICellRendererParams | |
22
+ | [params](./grid-pro.booleanrenderer.params.md) | | ICellRendererParams &amp; [BooleanRendererParams](./grid-pro.booleanrendererparams.md) | |
23
23
  | [selected](./grid-pro.booleanrenderer.selected.md) | | boolean | |
24
24
 
25
25
  ## Methods
@@ -32,5 +32,6 @@ export declare class BooleanRenderer extends FoundationElement implements ICellR
32
32
  | [getValue()](./grid-pro.booleanrenderer.getvalue.md) | | |
33
33
  | [init(params)](./grid-pro.booleanrenderer.init.md) | | |
34
34
  | [isCancelBeforeStart()](./grid-pro.booleanrenderer.iscancelbeforestart.md) | | |
35
+ | [isDisabled(data)](./grid-pro.booleanrenderer.isdisabled.md) | | |
35
36
  | [refresh(params)](./grid-pro.booleanrenderer.refresh.md) | | |
36
37
 
@@ -7,5 +7,5 @@
7
7
  **Signature:**
8
8
 
9
9
  ```typescript
10
- params: ICellRendererParams;
10
+ params: ICellRendererParams & BooleanRendererParams;
11
11
  ```
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [BooleanRendererParams](./grid-pro.booleanrendererparams.md)
4
+
5
+ ## BooleanRendererParams type
6
+
7
+ Parameters for the [GridPro](./grid-pro.gridpro.md) boolean renderer.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type BooleanRendererParams = {
13
+ isDisabled?: (rowData: any) => boolean;
14
+ };
15
+ ```
@@ -140,6 +140,7 @@
140
140
  | --- | --- |
141
141
  | [ActionRendererParams](./grid-pro.actionrendererparams.md) | Parameters for the [GridPro](./grid-pro.gridpro.md) action renderer. |
142
142
  | [AgThemeFontFaceMap](./grid-pro.agthemefontfacemap.md) | Type for mapping of a [AgGridTheme](./grid-pro.aggridtheme.md) to a font face. |
143
+ | [BooleanRendererParams](./grid-pro.booleanrendererparams.md) | Parameters for the [GridPro](./grid-pro.gridpro.md) boolean renderer. |
143
144
  | [GridComponents](./grid-pro.gridcomponents.md) | Grid Pro Components type, used to define the custom components that will be registered in the grid |
144
145
  | [GridProErrorEvent](./grid-pro.gridproerrorevent.md) | Grid Pro possible error events |
145
146
  | [GridProErrorTypes](./grid-pro.gridproerrortypes.md) | Grid Pro Error Types |
@@ -332,13 +332,20 @@ export class BooleanRenderer extends FoundationElement implements ICellRendererC
332
332
  // (undocumented)
333
333
  isCancelBeforeStart(): boolean;
334
334
  // (undocumented)
335
- params: ICellRendererParams;
335
+ isDisabled(data: any): boolean;
336
+ // (undocumented)
337
+ params: ICellRendererParams & BooleanRendererParams;
336
338
  // (undocumented)
337
339
  refresh(params: ICellRendererParams): boolean;
338
340
  // (undocumented)
339
341
  selected: boolean;
340
342
  }
341
343
 
344
+ // @public
345
+ export type BooleanRendererParams = {
346
+ isDisabled?: (rowData: any) => boolean;
347
+ };
348
+
342
349
  // @public
343
350
  export const CellTemplate: ViewTemplate<GridProCell, any>;
344
351
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/grid-pro",
3
3
  "description": "Genesis Foundation AG Grid",
4
- "version": "14.183.7",
4
+ "version": "14.183.8-alpha-b447c11.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -30,20 +30,20 @@
30
30
  "test:debug": "genx test --debug"
31
31
  },
32
32
  "devDependencies": {
33
- "@genesislcap/foundation-testing": "14.183.7",
34
- "@genesislcap/genx": "14.183.7",
35
- "@genesislcap/rollup-builder": "14.183.7",
36
- "@genesislcap/ts-builder": "14.183.7",
37
- "@genesislcap/uvu-playwright-builder": "14.183.7",
38
- "@genesislcap/vite-builder": "14.183.7",
39
- "@genesislcap/webpack-builder": "14.183.7",
33
+ "@genesislcap/foundation-testing": "14.183.8-alpha-b447c11.0",
34
+ "@genesislcap/genx": "14.183.8-alpha-b447c11.0",
35
+ "@genesislcap/rollup-builder": "14.183.8-alpha-b447c11.0",
36
+ "@genesislcap/ts-builder": "14.183.8-alpha-b447c11.0",
37
+ "@genesislcap/uvu-playwright-builder": "14.183.8-alpha-b447c11.0",
38
+ "@genesislcap/vite-builder": "14.183.8-alpha-b447c11.0",
39
+ "@genesislcap/webpack-builder": "14.183.8-alpha-b447c11.0",
40
40
  "rimraf": "^3.0.2"
41
41
  },
42
42
  "dependencies": {
43
- "@genesislcap/foundation-comms": "14.183.7",
44
- "@genesislcap/foundation-logger": "14.183.7",
45
- "@genesislcap/foundation-ui": "14.183.7",
46
- "@genesislcap/foundation-utils": "14.183.7",
43
+ "@genesislcap/foundation-comms": "14.183.8-alpha-b447c11.0",
44
+ "@genesislcap/foundation-logger": "14.183.8-alpha-b447c11.0",
45
+ "@genesislcap/foundation-ui": "14.183.8-alpha-b447c11.0",
46
+ "@genesislcap/foundation-utils": "14.183.8-alpha-b447c11.0",
47
47
  "@microsoft/fast-colors": "^5.3.1",
48
48
  "@microsoft/fast-components": "^2.30.6",
49
49
  "@microsoft/fast-element": "^1.12.0",
@@ -69,5 +69,5 @@
69
69
  "access": "public"
70
70
  },
71
71
  "customElements": "dist/custom-elements.json",
72
- "gitHead": "6821e0bf24c55b54d8c251b70ef22859470ed006"
72
+ "gitHead": "e36d5db798f9f88453fe8dfb6b14fde945a0a5ce"
73
73
  }