@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.
- package/dist/custom-elements.json +1791 -1730
- package/dist/dts/cell-renderers/actions-menu.renderer.d.ts +39 -3
- package/dist/dts/cell-renderers/actions-menu.renderer.d.ts.map +1 -1
- package/dist/dts/context-menu/context-menu.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/react.d.ts +9 -9
- package/dist/esm/cell-renderers/actions-menu.renderer.js +61 -2
- package/dist/esm/context-menu/context-menu.js +7 -39
- package/dist/esm/grid-pro.js +43 -12
- package/dist/grid-pro.api.json +131 -19
- package/dist/grid-pro.d.ts +40 -3
- package/dist/react.cjs +6 -6
- package/dist/react.mjs +5 -5
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ColDef, ICellRendererComp, ICellRendererParams } from '@ag-grid-community/core';
|
|
2
|
-
import {
|
|
2
|
+
import type { ActionMenuItems } from '@genesislcap/foundation-ui';
|
|
3
3
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
4
4
|
/**
|
|
5
5
|
* The Actions Menu Renderer element.
|
|
@@ -11,6 +11,7 @@ export declare class ActionsMenuRenderer extends FoundationElement implements IC
|
|
|
11
11
|
params: ICellRendererParams;
|
|
12
12
|
init(params: ICellRendererParams): void;
|
|
13
13
|
getGui(): HTMLElement;
|
|
14
|
+
/** Hands the latest row data to the menu, so per-row actions and disabled states stay current. */
|
|
14
15
|
refresh(params: ICellRendererParams): boolean;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
@@ -30,7 +31,8 @@ export declare const foundationGridProActionsMenuRenderer: (overrideDefinition?:
|
|
|
30
31
|
/**
|
|
31
32
|
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for Actions Menu Renderer.
|
|
32
33
|
* Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
|
|
33
|
-
* @param actions - Array of `ActionMenuItem` to be displayed in the menu
|
|
34
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
35
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
34
36
|
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
35
37
|
* @param customActionsOpenerName - Optional custom name for the button that opens the menu. Default is '⋮'.
|
|
36
38
|
* @param isVertical - Optional flag to display the menu vertically. Default is false (displays the menu horizontally, follow the rowHeight).
|
|
@@ -60,5 +62,39 @@ export declare const foundationGridProActionsMenuRenderer: (overrideDefinition?:
|
|
|
60
62
|
* ```
|
|
61
63
|
* @public
|
|
62
64
|
*/
|
|
63
|
-
export declare const getActionsMenuDef: (actions:
|
|
65
|
+
export declare const getActionsMenuDef: (actions: ActionMenuItems, overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => ColDef;
|
|
66
|
+
/**
|
|
67
|
+
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for a
|
|
68
|
+
* vertical Actions Menu behind an icon-only "kebab" opener, for a pinned column of per-row actions.
|
|
69
|
+
* Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
|
|
70
|
+
* @remarks The opener hides itself on rows with no actions, so it never opens an empty menu. The
|
|
71
|
+
* column has a `colId` but no `field`: AG Grid only refreshes a cell with a field when its value
|
|
72
|
+
* changes, and this column has no value, so a row update would leave stale actions. Having no value,
|
|
73
|
+
* the column is also not sortable, filterable, resizable or flashed, and shows no header menu
|
|
74
|
+
* button — pass any of these in `overrideDef` to turn them back on.
|
|
75
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
76
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
77
|
+
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
78
|
+
* @param iconName - Optional icon name for the opener. Default is `'ellipsis'` (horizontal dots); pass `'ellipsis-vertical'` for vertical ones.
|
|
79
|
+
* @param buttonAppearance - Optional appearance for the button that opens the menu.
|
|
80
|
+
* @param hideDisabled - Optional flag to hide disabled actions instead of greying them out. Default is false.
|
|
81
|
+
* When every action for a row is hidden, the opener hides too.
|
|
82
|
+
* @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* public exampleMoreColumnDef: ColDef = getVerticalDropdownMenuDef(
|
|
86
|
+
* (rowData) => [
|
|
87
|
+
* { name: 'Ping Trader', icon: { name: 'paper-plane' }, callback: (rowData) => pingTrader(rowData) },
|
|
88
|
+
* { name: 'Assign', icon: { name: 'user' }, callback: (rowData) => assign(rowData) },
|
|
89
|
+
* ],
|
|
90
|
+
* { headerName: '', pinned: 'right' },
|
|
91
|
+
* );
|
|
92
|
+
* ```
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
export declare const getVerticalDropdownMenuDef: (actions: ActionMenuItems, overrideDef?: ColDef & {
|
|
96
|
+
suppressHeaderMenuButton?: boolean;
|
|
97
|
+
}, iconName?: string, buttonAppearance?: string, hideDisabled?: boolean) => ColDef & {
|
|
98
|
+
suppressHeaderMenuButton?: boolean;
|
|
99
|
+
};
|
|
64
100
|
//# sourceMappingURL=actions-menu.renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions-menu.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/actions-menu.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"actions-menu.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/actions-menu.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAI/D;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,iBAAkB,YAAW,iBAAiB;IAClE,MAAM,EAAE,mBAAmB,CAAC;IAExC,IAAI,CAAC,MAAM,EAAE,mBAAmB;IAKhC,MAAM,IAAI,WAAW;IAI5B,kGAAkG;IAC3F,OAAO,CAAC,MAAM,EAAE,mBAAmB;CAI3C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC;;;;;;8BAQ/C,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,eAAe,EACxB,cAAa,MAAW,EACxB,0BAAyB,MAAY,EACrC,aAAY,OAAe,EAC3B,mBAAmB,MAAM,KACxB,MAqBF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,eAAe,EACxB,cAAa,MAAM,GAAG;IAAE,wBAAwB,CAAC,EAAE,OAAO,CAAA;CAAO,EACjE,WAAU,MAAmB,EAC7B,mBAAmB,MAAM,EACzB,eAAc,OAAe,KAC5B,MAAM,GAAG;IAAE,wBAAwB,CAAC,EAAE,OAAO,CAAA;CA2B/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../src/context-menu/context-menu.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../src/context-menu/context-menu.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AA6J9D;;;;GAIG;AACH,MAAM,WAAW,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsHzF;;;OAGG;IACH,SAAS,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW;IAQjD,IAAI,kBAAkB,aAWrB;IAED,0BAA0B,CAAC,OAAO,KAAA,EAAE,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAqBtD;;;;;;OAMG;IACH,OAAO,CAAC,0BAA0B;IAMlC;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAgCvB,mBAAmB,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA;CAgBrC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAwC5B,CAAC"}
|
package/dist/dts/react.d.ts
CHANGED
|
@@ -137,6 +137,15 @@ export declare const StringEditor: React.ForwardRefExoticComponent<
|
|
|
137
137
|
>;
|
|
138
138
|
export type StringEditorRef = StringEditorWC;
|
|
139
139
|
|
|
140
|
+
export declare const GridProColumn: React.ForwardRefExoticComponent<
|
|
141
|
+
React.PropsWithChildren<
|
|
142
|
+
Omit<PublicOf<GridProColumnWC>, 'children' | 'style'> &
|
|
143
|
+
HTMLWCProps & {
|
|
144
|
+
}
|
|
145
|
+
> & React.RefAttributes<GridProColumnWC>
|
|
146
|
+
>;
|
|
147
|
+
export type GridProColumnRef = GridProColumnWC;
|
|
148
|
+
|
|
140
149
|
export declare const ActionRenderer: React.ForwardRefExoticComponent<
|
|
141
150
|
React.PropsWithChildren<
|
|
142
151
|
Omit<PublicOf<ActionRendererWC>, 'children' | 'style'> &
|
|
@@ -209,15 +218,6 @@ export declare const AgTextRenderer: React.ForwardRefExoticComponent<
|
|
|
209
218
|
>;
|
|
210
219
|
export type AgTextRendererRef = AgTextRendererWC;
|
|
211
220
|
|
|
212
|
-
export declare const GridProColumn: React.ForwardRefExoticComponent<
|
|
213
|
-
React.PropsWithChildren<
|
|
214
|
-
Omit<PublicOf<GridProColumnWC>, 'children' | 'style'> &
|
|
215
|
-
HTMLWCProps & {
|
|
216
|
-
}
|
|
217
|
-
> & React.RefAttributes<GridProColumnWC>
|
|
218
|
-
>;
|
|
219
|
-
export type GridProColumnRef = GridProColumnWC;
|
|
220
|
-
|
|
221
221
|
export declare const ColumnSelection: React.ForwardRefExoticComponent<
|
|
222
222
|
React.PropsWithChildren<
|
|
223
223
|
Omit<PublicOf<ColumnSelectionWC>, 'children' | 'style'> &
|
|
@@ -18,8 +18,10 @@ export class ActionsMenuRenderer extends FoundationElement {
|
|
|
18
18
|
getGui() {
|
|
19
19
|
return this;
|
|
20
20
|
}
|
|
21
|
+
/** Hands the latest row data to the menu, so per-row actions and disabled states stay current. */
|
|
21
22
|
refresh(params) {
|
|
22
|
-
|
|
23
|
+
this.params = params;
|
|
24
|
+
return true;
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
__decorate([
|
|
@@ -44,7 +46,8 @@ export const foundationGridProActionsMenuRenderer = ActionsMenuRenderer.compose(
|
|
|
44
46
|
/**
|
|
45
47
|
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for Actions Menu Renderer.
|
|
46
48
|
* Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
|
|
47
|
-
* @param actions - Array of `ActionMenuItem` to be displayed in the menu
|
|
49
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
50
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
48
51
|
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
49
52
|
* @param customActionsOpenerName - Optional custom name for the button that opens the menu. Default is '⋮'.
|
|
50
53
|
* @param isVertical - Optional flag to display the menu vertically. Default is false (displays the menu horizontally, follow the rowHeight).
|
|
@@ -95,3 +98,59 @@ export const getActionsMenuDef = (actions, overrideDef = {}, customActionsOpener
|
|
|
95
98
|
};
|
|
96
99
|
return Object.assign(Object.assign({}, actionsMenuDef), overrideDef);
|
|
97
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for a
|
|
103
|
+
* vertical Actions Menu behind an icon-only "kebab" opener, for a pinned column of per-row actions.
|
|
104
|
+
* Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
|
|
105
|
+
* @remarks The opener hides itself on rows with no actions, so it never opens an empty menu. The
|
|
106
|
+
* column has a `colId` but no `field`: AG Grid only refreshes a cell with a field when its value
|
|
107
|
+
* changes, and this column has no value, so a row update would leave stale actions. Having no value,
|
|
108
|
+
* the column is also not sortable, filterable, resizable or flashed, and shows no header menu
|
|
109
|
+
* button — pass any of these in `overrideDef` to turn them back on.
|
|
110
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
111
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
112
|
+
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
113
|
+
* @param iconName - Optional icon name for the opener. Default is `'ellipsis'` (horizontal dots); pass `'ellipsis-vertical'` for vertical ones.
|
|
114
|
+
* @param buttonAppearance - Optional appearance for the button that opens the menu.
|
|
115
|
+
* @param hideDisabled - Optional flag to hide disabled actions instead of greying them out. Default is false.
|
|
116
|
+
* When every action for a row is hidden, the opener hides too.
|
|
117
|
+
* @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.
|
|
118
|
+
* @example
|
|
119
|
+
* ```ts
|
|
120
|
+
* public exampleMoreColumnDef: ColDef = getVerticalDropdownMenuDef(
|
|
121
|
+
* (rowData) => [
|
|
122
|
+
* { name: 'Ping Trader', icon: { name: 'paper-plane' }, callback: (rowData) => pingTrader(rowData) },
|
|
123
|
+
* { name: 'Assign', icon: { name: 'user' }, callback: (rowData) => assign(rowData) },
|
|
124
|
+
* ],
|
|
125
|
+
* { headerName: '', pinned: 'right' },
|
|
126
|
+
* );
|
|
127
|
+
* ```
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
export const getVerticalDropdownMenuDef = (actions, overrideDef = {}, iconName = 'ellipsis', buttonAppearance, hideDisabled = false) => {
|
|
131
|
+
// `suppressHeaderMenuButton` is AG Grid v31+; the v29 `ColDef` used across grid-pro's public helpers lacks it.
|
|
132
|
+
const verticalDropdownMenuDef = {
|
|
133
|
+
cellRenderer: GridProRendererTypes.actionsMenu,
|
|
134
|
+
cellRendererParams: {
|
|
135
|
+
actions,
|
|
136
|
+
addDefaultActions: false,
|
|
137
|
+
buttonAppearance,
|
|
138
|
+
hideDisabled,
|
|
139
|
+
iconName,
|
|
140
|
+
isVertical: true,
|
|
141
|
+
},
|
|
142
|
+
cellStyle: { border: 'none', overflow: 'visible' },
|
|
143
|
+
colId: overrideDef.headerName
|
|
144
|
+
? convertToKebabCase(overrideDef.headerName)
|
|
145
|
+
: 'vertical-dropdown-menu',
|
|
146
|
+
// A column with no value can't be usefully sorted, filtered or flashed; and with no field it is
|
|
147
|
+
// force-refreshed on every row update, so cell flashing would flash it on every tick.
|
|
148
|
+
enableCellChangeFlash: false,
|
|
149
|
+
filter: false,
|
|
150
|
+
resizable: false,
|
|
151
|
+
sortable: false,
|
|
152
|
+
suppressHeaderMenuButton: true,
|
|
153
|
+
width: 40,
|
|
154
|
+
};
|
|
155
|
+
return Object.assign(Object.assign({}, verticalDropdownMenuDef), overrideDef);
|
|
156
|
+
};
|
|
@@ -1,48 +1,31 @@
|
|
|
1
|
+
import { agMenuStyles } from '@genesislcap/foundation-ui';
|
|
1
2
|
import { css, DOM } from '@microsoft/fast-element';
|
|
2
3
|
import { logger } from '../utils/logger';
|
|
3
4
|
/**
|
|
4
|
-
* Same surface as the vertical actions menu: AG Grid's
|
|
5
|
-
* tokens when those variables are not set. The menu is drawn in the
|
|
6
|
-
* grid element, so the values are copied from the cell that was
|
|
5
|
+
* Same surface as the vertical actions menu (foundation-ui's `agMenuStyles`): AG Grid's menu
|
|
6
|
+
* variables, with design-system tokens when those variables are not set. The menu is drawn in the
|
|
7
|
+
* top layer, outside the themed grid element, so the values are copied from the cell that was
|
|
8
|
+
* clicked.
|
|
7
9
|
*/
|
|
8
10
|
const contextMenuStyles = css `
|
|
9
11
|
:host {
|
|
10
12
|
display: block;
|
|
11
13
|
}
|
|
12
14
|
|
|
15
|
+
${agMenuStyles(':host > .grid-context-menu, .grid-context-menu-item > .grid-context-menu', '.grid-context-menu > .grid-context-menu-item')}
|
|
16
|
+
|
|
13
17
|
:host > .grid-context-menu,
|
|
14
18
|
.grid-context-menu-item > .grid-context-menu {
|
|
15
19
|
display: flex;
|
|
16
20
|
flex-direction: column;
|
|
17
|
-
box-sizing: border-box;
|
|
18
21
|
margin: 0;
|
|
19
|
-
padding: var(--ag-spacing, 4px) 0;
|
|
20
22
|
max-width: 368px;
|
|
21
23
|
min-width: 64px;
|
|
22
|
-
background-color: var(--ag-menu-background-color, var(--fill-color));
|
|
23
|
-
border: var(
|
|
24
|
-
--ag-menu-border,
|
|
25
|
-
calc(var(--stroke-width, 1) * 1px) solid var(--neutral-stroke-rest, transparent)
|
|
26
|
-
);
|
|
27
|
-
border-radius: var(--ag-border-radius, calc(var(--control-corner-radius, 2) * 1px));
|
|
28
|
-
box-shadow: var(--ag-menu-shadow, var(--ag-popup-shadow, 0 2px 8px rgb(0 0 0 / 30%)));
|
|
29
|
-
color: var(--ag-menu-text-color, var(--neutral-foreground-rest));
|
|
30
|
-
font-family: var(--ag-font-family, var(--body-font));
|
|
31
24
|
}
|
|
32
25
|
|
|
33
26
|
.grid-context-menu > .grid-context-menu-item {
|
|
34
27
|
display: flex;
|
|
35
|
-
box-sizing: border-box;
|
|
36
28
|
align-items: center;
|
|
37
|
-
height: calc(var(--ag-icon-size, 16px) + (var(--ag-spacing, 4px) + 2px) * 2);
|
|
38
|
-
margin: 0;
|
|
39
|
-
background: transparent;
|
|
40
|
-
border: none;
|
|
41
|
-
border-radius: 0;
|
|
42
|
-
color: inherit;
|
|
43
|
-
font-family: inherit;
|
|
44
|
-
font-size: var(--ag-font-size, var(--type-ramp-base-font-size));
|
|
45
|
-
font-weight: 500;
|
|
46
29
|
user-select: none;
|
|
47
30
|
}
|
|
48
31
|
|
|
@@ -55,23 +38,8 @@ const contextMenuStyles = css `
|
|
|
55
38
|
opacity: 50%;
|
|
56
39
|
}
|
|
57
40
|
|
|
58
|
-
.grid-context-menu > .grid-context-menu-item:hover,
|
|
59
|
-
.grid-context-menu > .grid-context-menu-item:focus {
|
|
60
|
-
background: var(--ag-row-hover-color, var(--neutral-fill-stealth-hover));
|
|
61
|
-
border: none;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.grid-context-menu > .grid-context-menu-item[disabled] {
|
|
65
|
-
background: transparent;
|
|
66
|
-
cursor: default;
|
|
67
|
-
opacity: 50%;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
41
|
.grid-context-menu > .grid-context-menu-item::part(content) {
|
|
71
42
|
flex: 1;
|
|
72
|
-
margin-inline: 0;
|
|
73
|
-
padding-inline: calc(var(--ag-spacing, 4px) * 2) calc(var(--ag-spacing, 4px) * 4);
|
|
74
|
-
line-height: var(--ag-icon-size, 16px);
|
|
75
43
|
}
|
|
76
44
|
|
|
77
45
|
/* A plain item in a menu with checkboxes lines its text up with theirs. */
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -87,6 +87,33 @@ function findDeclaredAccessor(target, key) {
|
|
|
87
87
|
}
|
|
88
88
|
return undefined;
|
|
89
89
|
}
|
|
90
|
+
/** `ColDef` keys that give a column its own tooltip. */
|
|
91
|
+
const COLUMN_TOOLTIP_KEYS = [
|
|
92
|
+
'tooltip',
|
|
93
|
+
'tooltipField',
|
|
94
|
+
'tooltipValueGetter',
|
|
95
|
+
'tooltipComponent',
|
|
96
|
+
'tooltipComponentSelector',
|
|
97
|
+
];
|
|
98
|
+
/**
|
|
99
|
+
* Whether the column configures its own tooltip, so grid-pro must not inject the error tooltip.
|
|
100
|
+
* @remarks `!= null` also counts `tooltip: false`, which turns the tooltip off on purpose.
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
function hasOwnTooltip(colDef) {
|
|
104
|
+
return COLUMN_TOOLTIP_KEYS.some((key) => colDef[key] != null);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Whether row selection is on, in either the deprecated string form or the `RowSelectionOptions`
|
|
108
|
+
* object form.
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
function isRowSelectionEnabled(rowSelection) {
|
|
112
|
+
if (rowSelection === 'single' || rowSelection === 'multiple')
|
|
113
|
+
return true;
|
|
114
|
+
return (typeof rowSelection === 'object' &&
|
|
115
|
+
((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.mode) === 'singleRow' || (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.mode) === 'multiRow'));
|
|
116
|
+
}
|
|
90
117
|
/**
|
|
91
118
|
* The Grid Pro element (AG Grid v36 compatible).
|
|
92
119
|
* @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
@@ -970,14 +997,13 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
970
997
|
* @returns Array of selected row data
|
|
971
998
|
*/
|
|
972
999
|
getSelectedRows() {
|
|
973
|
-
var _a, _b, _c, _d;
|
|
1000
|
+
var _a, _b, _c, _d, _e;
|
|
974
1001
|
try {
|
|
975
1002
|
if (!this.initialised || !this.gridApi) {
|
|
976
1003
|
return [];
|
|
977
1004
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
if (rowSelectionMode === 'single' || rowSelectionMode === 'multiple') {
|
|
1005
|
+
// If row selection is enabled (string or object form), use row selection only
|
|
1006
|
+
if (isRowSelectionEnabled((_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.rowSelection)) {
|
|
981
1007
|
if (this.gridApi.getSelectedRows && this.gridApi.getSelectedRows().length > 0) {
|
|
982
1008
|
return this.gridApi.getSelectedRows();
|
|
983
1009
|
}
|
|
@@ -989,8 +1015,8 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
989
1015
|
}
|
|
990
1016
|
// Fallback: if no cell ranges but range selection is disabled,
|
|
991
1017
|
// check for focused cell (single cell selection)
|
|
992
|
-
if (!((_c = this.gridOptions) === null || _c === void 0 ? void 0 : _c.enableRangeSelection)) {
|
|
993
|
-
const focusedCell = (
|
|
1018
|
+
if (!((_c = this.gridOptions) === null || _c === void 0 ? void 0 : _c.cellSelection) && !((_d = this.gridOptions) === null || _d === void 0 ? void 0 : _d.enableRangeSelection)) {
|
|
1019
|
+
const focusedCell = (_e = this.gridApi) === null || _e === void 0 ? void 0 : _e.getFocusedCell();
|
|
994
1020
|
if (focusedCell) {
|
|
995
1021
|
const rowNode = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);
|
|
996
1022
|
if (rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) {
|
|
@@ -1454,17 +1480,22 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1454
1480
|
if (columnDef.editable) {
|
|
1455
1481
|
if (!columnDef.cellRenderer && !columnDef.cellRendererSelector) {
|
|
1456
1482
|
columnDef.cellRendererSelector = (params) => {
|
|
1457
|
-
|
|
1483
|
+
var _a;
|
|
1484
|
+
if (((_a = params.data) === null || _a === void 0 ? void 0 : _a[EDITED_COLUMN_FIELD]) === columnDef.field) {
|
|
1458
1485
|
return {
|
|
1459
1486
|
component: GridProRendererTypes.editable,
|
|
1460
1487
|
};
|
|
1461
1488
|
}
|
|
1462
1489
|
};
|
|
1463
1490
|
}
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1491
|
+
// The template column is typed with the shared v29 `ColDef`, which predates `tooltip`.
|
|
1492
|
+
const tooltipColumnDef = columnDef;
|
|
1493
|
+
if (!hasOwnTooltip(tooltipColumnDef)) {
|
|
1494
|
+
// `tooltip` replaces `tooltipValueGetter`, deprecated in AG Grid 36.2.
|
|
1495
|
+
tooltipColumnDef.tooltipComponent = ErrorTooltip;
|
|
1496
|
+
tooltipColumnDef.tooltip = (params) => {
|
|
1497
|
+
var _a;
|
|
1498
|
+
const error = (_a = params.data) === null || _a === void 0 ? void 0 : _a[ERROR_COLUMN_FIELD];
|
|
1468
1499
|
if (error && error.column === columnDef.field) {
|
|
1469
1500
|
return error.message;
|
|
1470
1501
|
}
|
|
@@ -1472,7 +1503,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1472
1503
|
}
|
|
1473
1504
|
if (!columnDef.cellClassRules) {
|
|
1474
1505
|
columnDef.cellClassRules = {
|
|
1475
|
-
error: (params) => { var _a; return ((_a = params.data[ERROR_COLUMN_FIELD]) === null ||
|
|
1506
|
+
error: (params) => { var _a, _b; return ((_b = (_a = params.data) === null || _a === void 0 ? void 0 : _a[ERROR_COLUMN_FIELD]) === null || _b === void 0 ? void 0 : _b.column) === params.colDef.field; },
|
|
1476
1507
|
};
|
|
1477
1508
|
}
|
|
1478
1509
|
}
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -760,7 +760,7 @@
|
|
|
760
760
|
{
|
|
761
761
|
"kind": "Method",
|
|
762
762
|
"canonicalReference": "@genesislcap/grid-pro!ActionsMenuRenderer#refresh:member(1)",
|
|
763
|
-
"docComment": "",
|
|
763
|
+
"docComment": "/**\n * Hands the latest row data to the menu, so per-row actions and disabled states stay current.\n */\n",
|
|
764
764
|
"excerptTokens": [
|
|
765
765
|
{
|
|
766
766
|
"kind": "Content",
|
|
@@ -14373,7 +14373,7 @@
|
|
|
14373
14373
|
{
|
|
14374
14374
|
"kind": "Function",
|
|
14375
14375
|
"canonicalReference": "@genesislcap/grid-pro!getActionsMenuDef:function(1)",
|
|
14376
|
-
"docComment": "/**\n * Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for Actions Menu Renderer. Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).\n *\n * @param actions - Array of `ActionMenuItem` to be displayed in the menu.\n *\n * @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.\n *\n * @param customActionsOpenerName - Optional custom name for the button that opens the menu. Default is '⋮'.\n *\n * @param isVertical - Optional flag to display the menu vertically. Default is false (displays the menu horizontally, follow the rowHeight).\n *\n * @param buttonAppearance - Optional appearance for the button that opens the menu. Default is 'outline'.\n *\n * @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.\n *\n * @example\n * ```ts\n * public exampleActionsMenuDef: ColDef = getActionsMenuDef(\n * [\n * {\n * name: 'View',\n * callback: (rowData) => logger.debug('VIEWW!!!', rowData),\n * },\n * {\n * name: 'Delete',\n * callback: (rowData) => logger.debug('DELETE!!!', rowData),\n * },\n * ],\n * {\n * headerName: 'Instrument Actions',\n * width: 180,\n * },\n * '+',\n * true,\n * 'primary-gradient'\n * );\n * ```\n *\n * @public\n */\n",
|
|
14376
|
+
"docComment": "/**\n * Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for Actions Menu Renderer. Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).\n *\n * @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data returning that array (for row-scoped eligibility/permission filtering).\n *\n * @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.\n *\n * @param customActionsOpenerName - Optional custom name for the button that opens the menu. Default is '⋮'.\n *\n * @param isVertical - Optional flag to display the menu vertically. Default is false (displays the menu horizontally, follow the rowHeight).\n *\n * @param buttonAppearance - Optional appearance for the button that opens the menu. Default is 'outline'.\n *\n * @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.\n *\n * @example\n * ```ts\n * public exampleActionsMenuDef: ColDef = getActionsMenuDef(\n * [\n * {\n * name: 'View',\n * callback: (rowData) => logger.debug('VIEWW!!!', rowData),\n * },\n * {\n * name: 'Delete',\n * callback: (rowData) => logger.debug('DELETE!!!', rowData),\n * },\n * ],\n * {\n * headerName: 'Instrument Actions',\n * width: 180,\n * },\n * '+',\n * true,\n * 'primary-gradient'\n * );\n * ```\n *\n * @public\n */\n",
|
|
14377
14377
|
"excerptTokens": [
|
|
14378
14378
|
{
|
|
14379
14379
|
"kind": "Content",
|
|
@@ -14381,12 +14381,8 @@
|
|
|
14381
14381
|
},
|
|
14382
14382
|
{
|
|
14383
14383
|
"kind": "Reference",
|
|
14384
|
-
"text": "
|
|
14385
|
-
"canonicalReference": "@genesislcap/foundation-ui!
|
|
14386
|
-
},
|
|
14387
|
-
{
|
|
14388
|
-
"kind": "Content",
|
|
14389
|
-
"text": "[]"
|
|
14384
|
+
"text": "ActionMenuItems",
|
|
14385
|
+
"canonicalReference": "@genesislcap/foundation-ui!ActionMenuItems:type"
|
|
14390
14386
|
},
|
|
14391
14387
|
{
|
|
14392
14388
|
"kind": "Content",
|
|
@@ -14433,8 +14429,8 @@
|
|
|
14433
14429
|
],
|
|
14434
14430
|
"fileUrlPath": "src/cell-renderers/actions-menu.renderer.ts",
|
|
14435
14431
|
"returnTypeTokenRange": {
|
|
14436
|
-
"startIndex":
|
|
14437
|
-
"endIndex":
|
|
14432
|
+
"startIndex": 11,
|
|
14433
|
+
"endIndex": 12
|
|
14438
14434
|
},
|
|
14439
14435
|
"releaseTag": "Public",
|
|
14440
14436
|
"overloadIndex": 1,
|
|
@@ -14443,39 +14439,39 @@
|
|
|
14443
14439
|
"parameterName": "actions",
|
|
14444
14440
|
"parameterTypeTokenRange": {
|
|
14445
14441
|
"startIndex": 1,
|
|
14446
|
-
"endIndex":
|
|
14442
|
+
"endIndex": 2
|
|
14447
14443
|
},
|
|
14448
14444
|
"isOptional": false
|
|
14449
14445
|
},
|
|
14450
14446
|
{
|
|
14451
14447
|
"parameterName": "overrideDef",
|
|
14452
14448
|
"parameterTypeTokenRange": {
|
|
14453
|
-
"startIndex":
|
|
14454
|
-
"endIndex":
|
|
14449
|
+
"startIndex": 3,
|
|
14450
|
+
"endIndex": 4
|
|
14455
14451
|
},
|
|
14456
14452
|
"isOptional": true
|
|
14457
14453
|
},
|
|
14458
14454
|
{
|
|
14459
14455
|
"parameterName": "customActionsOpenerName",
|
|
14460
14456
|
"parameterTypeTokenRange": {
|
|
14461
|
-
"startIndex":
|
|
14462
|
-
"endIndex":
|
|
14457
|
+
"startIndex": 5,
|
|
14458
|
+
"endIndex": 6
|
|
14463
14459
|
},
|
|
14464
14460
|
"isOptional": true
|
|
14465
14461
|
},
|
|
14466
14462
|
{
|
|
14467
14463
|
"parameterName": "isVertical",
|
|
14468
14464
|
"parameterTypeTokenRange": {
|
|
14469
|
-
"startIndex":
|
|
14470
|
-
"endIndex":
|
|
14465
|
+
"startIndex": 7,
|
|
14466
|
+
"endIndex": 8
|
|
14471
14467
|
},
|
|
14472
14468
|
"isOptional": true
|
|
14473
14469
|
},
|
|
14474
14470
|
{
|
|
14475
14471
|
"parameterName": "buttonAppearance",
|
|
14476
14472
|
"parameterTypeTokenRange": {
|
|
14477
|
-
"startIndex":
|
|
14478
|
-
"endIndex":
|
|
14473
|
+
"startIndex": 9,
|
|
14474
|
+
"endIndex": 10
|
|
14479
14475
|
},
|
|
14480
14476
|
"isOptional": true
|
|
14481
14477
|
}
|
|
@@ -15729,6 +15725,122 @@
|
|
|
15729
15725
|
],
|
|
15730
15726
|
"name": "getTextRendererTemplate"
|
|
15731
15727
|
},
|
|
15728
|
+
{
|
|
15729
|
+
"kind": "Function",
|
|
15730
|
+
"canonicalReference": "@genesislcap/grid-pro!getVerticalDropdownMenuDef:function(1)",
|
|
15731
|
+
"docComment": "/**\n * Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for a vertical Actions Menu behind an icon-only \"kebab\" opener, for a pinned column of per-row actions. Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).\n *\n * @remarks\n *\n * The opener hides itself on rows with no actions, so it never opens an empty menu. The column has a `colId` but no `field`: AG Grid only refreshes a cell with a field when its value changes, and this column has no value, so a row update would leave stale actions. Having no value, the column is also not sortable, filterable, resizable or flashed, and shows no header menu button — pass any of these in `overrideDef` to turn them back on.\n *\n * @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data returning that array (for row-scoped eligibility/permission filtering).\n *\n * @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.\n *\n * @param iconName - Optional icon name for the opener. Default is `'ellipsis'` (horizontal dots); pass `'ellipsis-vertical'` for vertical ones.\n *\n * @param buttonAppearance - Optional appearance for the button that opens the menu.\n *\n * @param hideDisabled - Optional flag to hide disabled actions instead of greying them out. Default is false. When every action for a row is hidden, the opener hides too.\n *\n * @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.\n *\n * @example\n * ```ts\n * public exampleMoreColumnDef: ColDef = getVerticalDropdownMenuDef(\n * (rowData) => [\n * { name: 'Ping Trader', icon: { name: 'paper-plane' }, callback: (rowData) => pingTrader(rowData) },\n * { name: 'Assign', icon: { name: 'user' }, callback: (rowData) => assign(rowData) },\n * ],\n * { headerName: '', pinned: 'right' },\n * );\n * ```\n *\n * @public\n */\n",
|
|
15732
|
+
"excerptTokens": [
|
|
15733
|
+
{
|
|
15734
|
+
"kind": "Content",
|
|
15735
|
+
"text": "getVerticalDropdownMenuDef: (actions: "
|
|
15736
|
+
},
|
|
15737
|
+
{
|
|
15738
|
+
"kind": "Reference",
|
|
15739
|
+
"text": "ActionMenuItems",
|
|
15740
|
+
"canonicalReference": "@genesislcap/foundation-ui!ActionMenuItems:type"
|
|
15741
|
+
},
|
|
15742
|
+
{
|
|
15743
|
+
"kind": "Content",
|
|
15744
|
+
"text": ", overrideDef?: "
|
|
15745
|
+
},
|
|
15746
|
+
{
|
|
15747
|
+
"kind": "Reference",
|
|
15748
|
+
"text": "ColDef",
|
|
15749
|
+
"canonicalReference": "@ag-grid-community/core!ColDef:interface"
|
|
15750
|
+
},
|
|
15751
|
+
{
|
|
15752
|
+
"kind": "Content",
|
|
15753
|
+
"text": " & {\n suppressHeaderMenuButton?: boolean;\n}"
|
|
15754
|
+
},
|
|
15755
|
+
{
|
|
15756
|
+
"kind": "Content",
|
|
15757
|
+
"text": ", iconName?: "
|
|
15758
|
+
},
|
|
15759
|
+
{
|
|
15760
|
+
"kind": "Content",
|
|
15761
|
+
"text": "string"
|
|
15762
|
+
},
|
|
15763
|
+
{
|
|
15764
|
+
"kind": "Content",
|
|
15765
|
+
"text": ", buttonAppearance?: "
|
|
15766
|
+
},
|
|
15767
|
+
{
|
|
15768
|
+
"kind": "Content",
|
|
15769
|
+
"text": "string"
|
|
15770
|
+
},
|
|
15771
|
+
{
|
|
15772
|
+
"kind": "Content",
|
|
15773
|
+
"text": ", hideDisabled?: "
|
|
15774
|
+
},
|
|
15775
|
+
{
|
|
15776
|
+
"kind": "Content",
|
|
15777
|
+
"text": "boolean"
|
|
15778
|
+
},
|
|
15779
|
+
{
|
|
15780
|
+
"kind": "Content",
|
|
15781
|
+
"text": ") => "
|
|
15782
|
+
},
|
|
15783
|
+
{
|
|
15784
|
+
"kind": "Reference",
|
|
15785
|
+
"text": "ColDef",
|
|
15786
|
+
"canonicalReference": "@ag-grid-community/core!ColDef:interface"
|
|
15787
|
+
},
|
|
15788
|
+
{
|
|
15789
|
+
"kind": "Content",
|
|
15790
|
+
"text": " & {\n suppressHeaderMenuButton?: boolean;\n}"
|
|
15791
|
+
}
|
|
15792
|
+
],
|
|
15793
|
+
"fileUrlPath": "src/cell-renderers/actions-menu.renderer.ts",
|
|
15794
|
+
"returnTypeTokenRange": {
|
|
15795
|
+
"startIndex": 12,
|
|
15796
|
+
"endIndex": 14
|
|
15797
|
+
},
|
|
15798
|
+
"releaseTag": "Public",
|
|
15799
|
+
"overloadIndex": 1,
|
|
15800
|
+
"parameters": [
|
|
15801
|
+
{
|
|
15802
|
+
"parameterName": "actions",
|
|
15803
|
+
"parameterTypeTokenRange": {
|
|
15804
|
+
"startIndex": 1,
|
|
15805
|
+
"endIndex": 2
|
|
15806
|
+
},
|
|
15807
|
+
"isOptional": false
|
|
15808
|
+
},
|
|
15809
|
+
{
|
|
15810
|
+
"parameterName": "overrideDef",
|
|
15811
|
+
"parameterTypeTokenRange": {
|
|
15812
|
+
"startIndex": 3,
|
|
15813
|
+
"endIndex": 5
|
|
15814
|
+
},
|
|
15815
|
+
"isOptional": true
|
|
15816
|
+
},
|
|
15817
|
+
{
|
|
15818
|
+
"parameterName": "iconName",
|
|
15819
|
+
"parameterTypeTokenRange": {
|
|
15820
|
+
"startIndex": 6,
|
|
15821
|
+
"endIndex": 7
|
|
15822
|
+
},
|
|
15823
|
+
"isOptional": true
|
|
15824
|
+
},
|
|
15825
|
+
{
|
|
15826
|
+
"parameterName": "buttonAppearance",
|
|
15827
|
+
"parameterTypeTokenRange": {
|
|
15828
|
+
"startIndex": 8,
|
|
15829
|
+
"endIndex": 9
|
|
15830
|
+
},
|
|
15831
|
+
"isOptional": true
|
|
15832
|
+
},
|
|
15833
|
+
{
|
|
15834
|
+
"parameterName": "hideDisabled",
|
|
15835
|
+
"parameterTypeTokenRange": {
|
|
15836
|
+
"startIndex": 10,
|
|
15837
|
+
"endIndex": 11
|
|
15838
|
+
},
|
|
15839
|
+
"isOptional": true
|
|
15840
|
+
}
|
|
15841
|
+
],
|
|
15842
|
+
"name": "getVerticalDropdownMenuDef"
|
|
15843
|
+
},
|
|
15732
15844
|
{
|
|
15733
15845
|
"kind": "Variable",
|
|
15734
15846
|
"canonicalReference": "@genesislcap/grid-pro!GRID_PRO_COLUMN_DRAG_BRIDGE_CONTEXT_KEY:var",
|