@genesislcap/foundation-react-utils 15.35.0 → 15.35.1-GENC-1632.1
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.
- package/dist/custom-elements.json +1 -1
- package/dist/dts/create-grid-pro-cell-renderer.d.ts +2 -1
- package/dist/dts/create-grid-pro-cell-renderer.d.ts.map +1 -1
- package/dist/esm/create-grid-pro-cell-renderer.js +2 -1
- package/dist/foundation-react-utils.api.json +1 -1
- package/dist/foundation-react-utils.d.ts +2 -1
- package/package.json +13 -13
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"declarations": [
|
|
9
9
|
{
|
|
10
10
|
"kind": "mixin",
|
|
11
|
-
"description": "Wraps a React component as an AG Grid cell renderer component class for use with\n`grid-pro`
|
|
11
|
+
"description": "Wraps a React component as an AG Grid cell renderer component class for use with\n`grid-pro` (`<foundation-grid-pro>` / `<rapid-grid-pro>`) or its deprecated legacy\npredecessor, `grid-pro-legacy`.\n\nGrid Pro is a framework-agnostic Web Component, so AG Grid inside it only understands\nplain-JS component classes. This helper bridges the gap: it returns a class implementing\n`ICellRendererComp` that mounts the React component into the cell with its own React root,\nre-renders it on `refresh` (so value changes and cell flashing keep working without\nremounting), and unmounts it when the cell is destroyed.\n\nThe component receives the full AG Grid `ICellRendererParams` object as props — including\n`value`, `data`, `node`, `api` and anything supplied via the column's `cellRendererParams`.\nHooks and local state inside the component work as normal.\n\nNote on React Context/Redux: by default each cell is rendered into its own independent\nReact root, so renderers do NOT inherit contexts (Redux providers, theme context, React\nRouter, etc.) from the application tree hosting the grid. Either pass data/callbacks\nexplicitly via `cellRendererParams`, or opt into portal mode with the `portals` option\n(see GridProCellRendererOptions.portals and `createGridProCellPortals`) — portal\ncells share the application tree and inherit its contexts.\n\nNote on `key`: props are passed by spreading the AG Grid params object, and React reserves\n`key` — a `cellRendererParams` entry named `key` is consumed as the element key and never\nreaches the component, so avoid that name. (`ref` is fine: React 19 forwards it to function\ncomponents as a regular prop.)\n\nNote on styling: cells render inside grid-pro's shadow root, so document-level stylesheets\n(CSS files imported by your app/page) do NOT reach the rendered component. Style renderers\nwith inline styles or CSS-in-JS. Design-system tokens remain usable either way — CSS custom\nproperties inherit across shadow boundaries (e.g. `color: 'var(--accent-fill-rest)'`).",
|
|
12
12
|
"name": "createGridProCellRenderer",
|
|
13
13
|
"members": [
|
|
14
14
|
{
|
|
@@ -79,7 +79,8 @@ export interface GridProReactCellRenderer {
|
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
81
|
* Wraps a React component as an AG Grid cell renderer component class for use with
|
|
82
|
-
* `grid-pro`
|
|
82
|
+
* `grid-pro` (`<foundation-grid-pro>` / `<rapid-grid-pro>`) or its deprecated legacy
|
|
83
|
+
* predecessor, `grid-pro-legacy`.
|
|
83
84
|
*
|
|
84
85
|
* Grid Pro is a framework-agnostic Web Component, so AG Grid inside it only understands
|
|
85
86
|
* plain-JS component classes. This helper bridges the gap: it returns a class implementing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-grid-pro-cell-renderer.d.ts","sourceRoot":"","sources":["../../src/create-grid-pro-cell-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,wBAAwB,CAAC,KAAK,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG;IACjE,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,yBAAyB;IACzB,IAAI,EAAE,KAAK,CAAC;IACZ,4BAA4B;IAC5B,IAAI,EAAE,GAAG,CAAC;IACV,uBAAuB;IACvB,GAAG,EAAE,GAAG,CAAC;IACT,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,uCAAuC;IACvC,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,6BAA6B;IAC7B,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,4EAA4E;IAC5E,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC7C,MAAM,IAAI,WAAW,CAAC;IACtB,OAAO,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC;IACnD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED
|
|
1
|
+
{"version":3,"file":"create-grid-pro-cell-renderer.d.ts","sourceRoot":"","sources":["../../src/create-grid-pro-cell-renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,wBAAwB,CAAC,KAAK,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG;IACjE,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,yBAAyB;IACzB,IAAI,EAAE,KAAK,CAAC;IACZ,4BAA4B;IAC5B,IAAI,EAAE,GAAG,CAAC;IACV,uBAAuB;IACvB,GAAG,EAAE,GAAG,CAAC;IACT,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,uCAAuC;IACvC,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,6BAA6B;IAC7B,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,4EAA4E;IAC5E,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC7C,MAAM,IAAI,WAAW,CAAC;IACtB,OAAO,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC;IACnD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,wBAAgB,yBAAyB,CACvC,CAAC,SAAS,wBAAwB,GAAG,wBAAwB,EAE7D,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,OAAO,GAAE,0BAA+B,GACvC,UAAU,wBAAwB,CAiFpC"}
|
|
@@ -5,7 +5,8 @@ import { createRoot } from 'react-dom/client';
|
|
|
5
5
|
const logger = createLogger('foundation-react-utils');
|
|
6
6
|
/**
|
|
7
7
|
* Wraps a React component as an AG Grid cell renderer component class for use with
|
|
8
|
-
* `grid-pro`
|
|
8
|
+
* `grid-pro` (`<foundation-grid-pro>` / `<rapid-grid-pro>`) or its deprecated legacy
|
|
9
|
+
* predecessor, `grid-pro-legacy`.
|
|
9
10
|
*
|
|
10
11
|
* Grid Pro is a framework-agnostic Web Component, so AG Grid inside it only understands
|
|
11
12
|
* plain-JS component classes. This helper bridges the gap: it returns a class implementing
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
{
|
|
205
205
|
"kind": "Function",
|
|
206
206
|
"canonicalReference": "@genesislcap/foundation-react-utils!createGridProCellRenderer:function(1)",
|
|
207
|
-
"docComment": "/**\n * Wraps a React component as an AG Grid cell renderer component class for use with `grid-pro`
|
|
207
|
+
"docComment": "/**\n * Wraps a React component as an AG Grid cell renderer component class for use with `grid-pro` (`<foundation-grid-pro>` / `<rapid-grid-pro>`) or its deprecated legacy predecessor, `grid-pro-legacy`.\n *\n * Grid Pro is a framework-agnostic Web Component, so AG Grid inside it only understands plain-JS component classes. This helper bridges the gap: it returns a class implementing `ICellRendererComp` that mounts the React component into the cell with its own React root, re-renders it on `refresh` (so value changes and cell flashing keep working without remounting), and unmounts it when the cell is destroyed.\n *\n * The component receives the full AG Grid `ICellRendererParams` object as props — including `value`, `data`, `node`, `api` and anything supplied via the column's `cellRendererParams`. Hooks and local state inside the component work as normal.\n *\n * Note on React Context/Redux: by default each cell is rendered into its own independent React root, so renderers do NOT inherit contexts (Redux providers, theme context, React Router, etc.) from the application tree hosting the grid. Either pass data/callbacks explicitly via `cellRendererParams`, or opt into portal mode with the `portals` option (see {@link GridProCellRendererOptions.portals} and `createGridProCellPortals`) — portal cells share the application tree and inherit its contexts.\n *\n * Note on `key`: props are passed by spreading the AG Grid params object, and React reserves `key` — a `cellRendererParams` entry named `key` is consumed as the element key and never reaches the component, so avoid that name. (`ref` is fine: React 19 forwards it to function components as a regular prop.)\n *\n * Note on styling: cells render inside grid-pro's shadow root, so document-level stylesheets (CSS files imported by your app/page) do NOT reach the rendered component. Style renderers with inline styles or CSS-in-JS. Design-system tokens remain usable either way — CSS custom properties inherit across shadow boundaries (e.g. `color: 'var(--accent-fill-rest)'`).\n *\n * @param Component - The React component to render inside the cell.\n *\n * @param options - Optional {@link GridProCellRendererOptions} to tune the wrapper behaviour.\n *\n * @returns A cell renderer component class registrable via `gridOptions.components`, the grid's `gridComponents` property, or directly as a column's `cellRenderer`.\n *\n * @example\n * ```tsx\n * import { createGridProCellRenderer, type GridProCellRendererProps } from '@genesislcap/foundation-react-utils';\n *\n * function PriceCell({ value }: GridProCellRendererProps) {\n * return <span style={{ color: value >= 0 ? 'green' : 'red' }}>{value}</span>;\n * }\n *\n * const gridOptions = {\n * components: {\n * priceCell: createGridProCellRenderer(PriceCell),\n * },\n * columnDefs: [\n * { field: 'price', cellRenderer: 'priceCell' },\n * ],\n * };\n *\n * // <rapid-grid-pro gridOptions={gridOptions} /> — or register via the grid's\n * // `gridComponents` property to make the renderer available across all columns.\n * ```\n *\n * @public\n */\n",
|
|
208
208
|
"excerptTokens": [
|
|
209
209
|
{
|
|
210
210
|
"kind": "Content",
|
|
@@ -53,7 +53,8 @@ export declare function createGridProCellPortals(): GridProCellPortals;
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Wraps a React component as an AG Grid cell renderer component class for use with
|
|
56
|
-
* `grid-pro`
|
|
56
|
+
* `grid-pro` (`<foundation-grid-pro>` / `<rapid-grid-pro>`) or its deprecated legacy
|
|
57
|
+
* predecessor, `grid-pro-legacy`.
|
|
57
58
|
*
|
|
58
59
|
* Grid Pro is a framework-agnostic Web Component, so AG Grid inside it only understands
|
|
59
60
|
* plain-JS component classes. This helper bridges the gap: it returns a class implementing
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-react-utils",
|
|
3
3
|
"description": "Genesis Foundation React Utils",
|
|
4
|
-
"version": "15.35.
|
|
4
|
+
"version": "15.35.1-GENC-1632.1",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"./dist/esm/flexlayout/index.js"
|
|
7
7
|
],
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@genesislcap/foundation-testing": "15.35.
|
|
60
|
-
"@genesislcap/genx": "15.35.
|
|
61
|
-
"@genesislcap/rollup-builder": "15.35.
|
|
62
|
-
"@genesislcap/ts-builder": "15.35.
|
|
63
|
-
"@genesislcap/uvu-playwright-builder": "15.35.
|
|
64
|
-
"@genesislcap/vite-builder": "15.35.
|
|
65
|
-
"@genesislcap/webpack-builder": "15.35.
|
|
59
|
+
"@genesislcap/foundation-testing": "15.35.1-GENC-1632.1",
|
|
60
|
+
"@genesislcap/genx": "15.35.1-GENC-1632.1",
|
|
61
|
+
"@genesislcap/rollup-builder": "15.35.1-GENC-1632.1",
|
|
62
|
+
"@genesislcap/ts-builder": "15.35.1-GENC-1632.1",
|
|
63
|
+
"@genesislcap/uvu-playwright-builder": "15.35.1-GENC-1632.1",
|
|
64
|
+
"@genesislcap/vite-builder": "15.35.1-GENC-1632.1",
|
|
65
|
+
"@genesislcap/webpack-builder": "15.35.1-GENC-1632.1",
|
|
66
66
|
"react-router-dom": "^7.1.3"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
@@ -76,11 +76,11 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@genesislcap/foundation-forms": "15.35.
|
|
80
|
-
"@genesislcap/foundation-layout": "15.35.
|
|
81
|
-
"@genesislcap/foundation-logger": "15.35.
|
|
82
|
-
"@genesislcap/rapid-design-system": "15.35.
|
|
83
|
-
"@genesislcap/web-core": "15.35.
|
|
79
|
+
"@genesislcap/foundation-forms": "15.35.1-GENC-1632.1",
|
|
80
|
+
"@genesislcap/foundation-layout": "15.35.1-GENC-1632.1",
|
|
81
|
+
"@genesislcap/foundation-logger": "15.35.1-GENC-1632.1",
|
|
82
|
+
"@genesislcap/rapid-design-system": "15.35.1-GENC-1632.1",
|
|
83
|
+
"@genesislcap/web-core": "15.35.1-GENC-1632.1",
|
|
84
84
|
"@jsonforms/core": "^3.2.1",
|
|
85
85
|
"@r2wc/core": "1.3.1",
|
|
86
86
|
"@r2wc/react-to-web-component": "^2.0.2",
|