@genesislcap/grid-pro 15.75.0 → 15.76.1-alpha-aff9783af4.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,4 +1,4 @@
1
- import { ActionMenuItem } from '@genesislcap/foundation-ui';
1
+ import type { ActionMenuItems } from '@genesislcap/foundation-ui';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import { Binding } from '@microsoft/fast-element';
4
4
  import { CaptureType } from '@microsoft/fast-element';
@@ -251,6 +251,7 @@ export declare class ActionsMenuRenderer extends FoundationElement implements IC
251
251
  params: ICellRendererParams;
252
252
  init(params: ICellRendererParams): void;
253
253
  getGui(): HTMLElement;
254
+ /** Hands the latest row data to the menu, so per-row actions and disabled states stay current. */
254
255
  refresh(params: ICellRendererParams): boolean;
255
256
  }
256
257
 
@@ -3387,7 +3388,8 @@ declare class GenesisInfiniteDatasource implements IDatasource {
3387
3388
  /**
3388
3389
  * Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for Actions Menu Renderer.
3389
3390
  * Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
3390
- * @param actions - Array of `ActionMenuItem` to be displayed in the menu.
3391
+ * @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
3392
+ * returning that array (for row-scoped eligibility/permission filtering).
3391
3393
  * @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
3392
3394
  * @param customActionsOpenerName - Optional custom name for the button that opens the menu. Default is '⋮'.
3393
3395
  * @param isVertical - Optional flag to display the menu vertically. Default is false (displays the menu horizontally, follow the rowHeight).
@@ -3417,7 +3419,7 @@ declare class GenesisInfiniteDatasource implements IDatasource {
3417
3419
  * ```
3418
3420
  * @public
3419
3421
  */
3420
- export declare const getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => ColDef;
3422
+ export declare const getActionsMenuDef: (actions: ActionMenuItems, overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => ColDef;
3421
3423
 
3422
3424
  /**
3423
3425
  * Get a Design System prefixed Checkbox template.
@@ -3581,6 +3583,41 @@ export declare const getTextFieldRendererTemplate: (designSystem?: string) => Vi
3581
3583
  */
3582
3584
  export declare const getTextRendererTemplate: (designSystem?: string) => ViewTemplate<AgTextFieldRenderer, any>;
3583
3585
 
3586
+ /**
3587
+ * Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for a
3588
+ * vertical Actions Menu behind an icon-only "kebab" opener, for a pinned column of per-row actions.
3589
+ * Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
3590
+ * @remarks The opener hides itself on rows with no actions, so it never opens an empty menu. The
3591
+ * column has a `colId` but no `field`: AG Grid only refreshes a cell with a field when its value
3592
+ * changes, and this column has no value, so a row update would leave stale actions. Having no value,
3593
+ * the column is also not sortable, filterable, resizable or flashed, and shows no header menu
3594
+ * button — pass any of these in `overrideDef` to turn them back on.
3595
+ * @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
3596
+ * returning that array (for row-scoped eligibility/permission filtering).
3597
+ * @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
3598
+ * @param iconName - Optional icon name for the opener. Default is `'ellipsis'` (horizontal dots); pass `'ellipsis-vertical'` for vertical ones.
3599
+ * @param buttonAppearance - Optional appearance for the button that opens the menu.
3600
+ * @param hideDisabled - Optional flag to hide disabled actions instead of greying them out. Default is false.
3601
+ * When every action for a row is hidden, the opener hides too.
3602
+ * @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.
3603
+ * @example
3604
+ * ```ts
3605
+ * public exampleMoreColumnDef: ColDef = getVerticalDropdownMenuDef(
3606
+ * (rowData) => [
3607
+ * { name: 'Ping Trader', icon: { name: 'paper-plane' }, callback: (rowData) => pingTrader(rowData) },
3608
+ * { name: 'Assign', icon: { name: 'user' }, callback: (rowData) => assign(rowData) },
3609
+ * ],
3610
+ * { headerName: '', pinned: 'right' },
3611
+ * );
3612
+ * ```
3613
+ * @public
3614
+ */
3615
+ export declare const getVerticalDropdownMenuDef: (actions: ActionMenuItems, overrideDef?: ColDef & {
3616
+ suppressHeaderMenuButton?: boolean;
3617
+ }, iconName?: string, buttonAppearance?: string, hideDisabled?: boolean) => ColDef & {
3618
+ suppressHeaderMenuButton?: boolean;
3619
+ };
3620
+
3584
3621
  /** Context key on `gridOptions.context` for AG column drag integration.
3585
3622
  * @public
3586
3623
  */
package/dist/react.cjs CHANGED
@@ -124,6 +124,11 @@ const StringEditor = React.forwardRef(function StringEditor(props, ref) {
124
124
  return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
125
125
  });
126
126
 
127
+ const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
128
+ const { children, ...rest } = props;
129
+ return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
130
+ });
131
+
127
132
  const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
128
133
  const { children, ...rest } = props;
129
134
  return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
@@ -164,11 +169,6 @@ const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, ref) {
164
169
  return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
165
170
  });
166
171
 
167
- const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
168
- const { children, ...rest } = props;
169
- return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
170
- });
171
-
172
172
  const ColumnSelection = React.forwardRef(function ColumnSelection(props, ref) {
173
173
  const { children, ...rest } = props;
174
174
  return React.createElement(customElements.getName(ColumnSelectionWC) ?? '%%prefix%%-column-selection', { ...rest, ref }, children);
@@ -596,6 +596,7 @@ module.exports = {
596
596
  NumberEditor,
597
597
  SelectEditor,
598
598
  StringEditor,
599
+ GridProColumn,
599
600
  ActionRenderer,
600
601
  ActionsMenuRenderer,
601
602
  BooleanRenderer,
@@ -604,7 +605,6 @@ module.exports = {
604
605
  StatusPillRenderer,
605
606
  AgTextFieldRenderer,
606
607
  AgTextRenderer,
607
- GridProColumn,
608
608
  ColumnSelection,
609
609
  GridProClientSideDatasource,
610
610
  GridProInfiniteDatasource,
package/dist/react.mjs CHANGED
@@ -122,6 +122,11 @@ export const StringEditor = React.forwardRef(function StringEditor(props, ref) {
122
122
  return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
123
123
  });
124
124
 
125
+ export const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
126
+ const { children, ...rest } = props;
127
+ return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
128
+ });
129
+
125
130
  export const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
126
131
  const { children, ...rest } = props;
127
132
  return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
@@ -162,11 +167,6 @@ export const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, re
162
167
  return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
163
168
  });
164
169
 
165
- export const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
166
- const { children, ...rest } = props;
167
- return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
168
- });
169
-
170
170
  export const ColumnSelection = React.forwardRef(function ColumnSelection(props, ref) {
171
171
  const { children, ...rest } = props;
172
172
  return React.createElement(customElements.getName(ColumnSelectionWC) ?? '%%prefix%%-column-selection', { ...rest, ref }, children);
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": "15.75.0",
4
+ "version": "15.76.1-alpha-aff9783af4.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -38,19 +38,19 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@genesislcap/foundation-testing": "15.75.0",
42
- "@genesislcap/genx": "15.75.0",
43
- "@genesislcap/ts-builder": "15.75.0",
44
- "@genesislcap/uvu-playwright-builder": "15.75.0",
45
- "@genesislcap/vite-builder": "15.75.0",
46
- "@genesislcap/webpack-builder": "15.75.0"
41
+ "@genesislcap/foundation-testing": "15.76.1-alpha-aff9783af4.0",
42
+ "@genesislcap/genx": "15.76.1-alpha-aff9783af4.0",
43
+ "@genesislcap/ts-builder": "15.76.1-alpha-aff9783af4.0",
44
+ "@genesislcap/uvu-playwright-builder": "15.76.1-alpha-aff9783af4.0",
45
+ "@genesislcap/vite-builder": "15.76.1-alpha-aff9783af4.0",
46
+ "@genesislcap/webpack-builder": "15.76.1-alpha-aff9783af4.0"
47
47
  },
48
48
  "dependencies": {
49
- "@genesislcap/foundation-comms": "15.75.0",
50
- "@genesislcap/foundation-criteria": "15.75.0",
51
- "@genesislcap/foundation-logger": "15.75.0",
52
- "@genesislcap/foundation-ui": "15.75.0",
53
- "@genesislcap/foundation-utils": "15.75.0",
49
+ "@genesislcap/foundation-comms": "15.76.1-alpha-aff9783af4.0",
50
+ "@genesislcap/foundation-criteria": "15.76.1-alpha-aff9783af4.0",
51
+ "@genesislcap/foundation-logger": "15.76.1-alpha-aff9783af4.0",
52
+ "@genesislcap/foundation-ui": "15.76.1-alpha-aff9783af4.0",
53
+ "@genesislcap/foundation-utils": "15.76.1-alpha-aff9783af4.0",
54
54
  "@microsoft/fast-colors": "5.3.1",
55
55
  "@microsoft/fast-components": "2.30.6",
56
56
  "@microsoft/fast-element": "1.14.0",