@genesislcap/grid-pro 15.58.0 → 15.58.1-FUI-2629.4
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 +3207 -3147
- package/dist/dts/cell-renderers/actions-menu.renderer.d.ts +30 -3
- package/dist/dts/cell-renderers/actions-menu.renderer.d.ts.map +1 -1
- package/dist/dts/react.d.ts +54 -54
- package/dist/esm/cell-renderers/actions-menu.renderer.js +46 -1
- package/dist/grid-pro.api.json +122 -18
- package/dist/grid-pro.d.ts +31 -3
- package/dist/react.cjs +36 -36
- package/dist/react.mjs +30 -30
- 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.
|
|
@@ -30,7 +30,8 @@ export declare const foundationGridProActionsMenuRenderer: (overrideDefinition?:
|
|
|
30
30
|
/**
|
|
31
31
|
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for Actions Menu Renderer.
|
|
32
32
|
* 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
|
|
33
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
34
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
34
35
|
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
35
36
|
* @param customActionsOpenerName - Optional custom name for the button that opens the menu. Default is '⋮'.
|
|
36
37
|
* @param isVertical - Optional flag to display the menu vertically. Default is false (displays the menu horizontally, follow the rowHeight).
|
|
@@ -60,5 +61,31 @@ export declare const foundationGridProActionsMenuRenderer: (overrideDefinition?:
|
|
|
60
61
|
* ```
|
|
61
62
|
* @public
|
|
62
63
|
*/
|
|
63
|
-
export declare const getActionsMenuDef: (actions:
|
|
64
|
+
export declare const getActionsMenuDef: (actions: ActionMenuItems, overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => ColDef;
|
|
65
|
+
/**
|
|
66
|
+
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for a
|
|
67
|
+
* vertical Actions Menu behind an icon-only "kebab" opener, for a pinned column of per-row actions.
|
|
68
|
+
* Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
|
|
69
|
+
* @remarks The opener hides itself on rows with no actions, so it never opens an empty menu.
|
|
70
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
71
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
72
|
+
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
73
|
+
* @param iconName - Optional icon name for the opener. Default is `'ellipsis'` (horizontal dots); pass `'ellipsis-vertical'` for vertical ones.
|
|
74
|
+
* @param buttonAppearance - Optional appearance for the button that opens the menu.
|
|
75
|
+
* @param hideDisabled - Optional flag to hide disabled actions instead of greying them out. Default is false.
|
|
76
|
+
* When every action for a row is hidden, the opener hides too.
|
|
77
|
+
* @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* public exampleMoreColumnDef: ColDef = getVerticalDropdownMenuDef(
|
|
81
|
+
* (rowData) => [
|
|
82
|
+
* { name: 'Ping Trader', icon: { name: 'paper-plane' }, callback: (rowData) => pingTrader(rowData) },
|
|
83
|
+
* { name: 'Assign', icon: { name: 'user' }, callback: (rowData) => assign(rowData) },
|
|
84
|
+
* ],
|
|
85
|
+
* { headerName: '', pinned: 'right' },
|
|
86
|
+
* );
|
|
87
|
+
* ```
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export declare const getVerticalDropdownMenuDef: (actions: ActionMenuItems, overrideDef?: ColDef, iconName?: string, buttonAppearance?: string, hideDisabled?: boolean) => ColDef;
|
|
64
91
|
//# 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;IAIrB,OAAO,CAAC,MAAM,EAAE,mBAAmB;CAG3C;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;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,eAAe,EACxB,cAAa,MAAW,EACxB,WAAU,MAAmB,EAC7B,mBAAmB,MAAM,EACzB,eAAc,OAAe,KAC5B,MAmBF,CAAC"}
|
package/dist/dts/react.d.ts
CHANGED
|
@@ -91,51 +91,6 @@ export declare const GridProCell: React.ForwardRefExoticComponent<
|
|
|
91
91
|
>;
|
|
92
92
|
export type GridProCellRef = GridProCellWC;
|
|
93
93
|
|
|
94
|
-
export declare const DateEditor: React.ForwardRefExoticComponent<
|
|
95
|
-
React.PropsWithChildren<
|
|
96
|
-
Omit<PublicOf<DateEditorWC>, 'children' | 'style'> &
|
|
97
|
-
HTMLWCProps & {
|
|
98
|
-
}
|
|
99
|
-
> & React.RefAttributes<DateEditorWC>
|
|
100
|
-
>;
|
|
101
|
-
export type DateEditorRef = DateEditorWC;
|
|
102
|
-
|
|
103
|
-
export declare const MultiselectEditor: React.ForwardRefExoticComponent<
|
|
104
|
-
React.PropsWithChildren<
|
|
105
|
-
Omit<PublicOf<MultiselectEditorWC>, 'children' | 'style'> &
|
|
106
|
-
HTMLWCProps & {
|
|
107
|
-
}
|
|
108
|
-
> & React.RefAttributes<MultiselectEditorWC>
|
|
109
|
-
>;
|
|
110
|
-
export type MultiselectEditorRef = MultiselectEditorWC;
|
|
111
|
-
|
|
112
|
-
export declare const NumberEditor: React.ForwardRefExoticComponent<
|
|
113
|
-
React.PropsWithChildren<
|
|
114
|
-
Omit<PublicOf<NumberEditorWC>, 'children' | 'style'> &
|
|
115
|
-
HTMLWCProps & {
|
|
116
|
-
}
|
|
117
|
-
> & React.RefAttributes<NumberEditorWC>
|
|
118
|
-
>;
|
|
119
|
-
export type NumberEditorRef = NumberEditorWC;
|
|
120
|
-
|
|
121
|
-
export declare const SelectEditor: React.ForwardRefExoticComponent<
|
|
122
|
-
React.PropsWithChildren<
|
|
123
|
-
Omit<PublicOf<SelectEditorWC>, 'children' | 'style'> &
|
|
124
|
-
HTMLWCProps & {
|
|
125
|
-
}
|
|
126
|
-
> & React.RefAttributes<SelectEditorWC>
|
|
127
|
-
>;
|
|
128
|
-
export type SelectEditorRef = SelectEditorWC;
|
|
129
|
-
|
|
130
|
-
export declare const StringEditor: React.ForwardRefExoticComponent<
|
|
131
|
-
React.PropsWithChildren<
|
|
132
|
-
Omit<PublicOf<StringEditorWC>, 'children' | 'style'> &
|
|
133
|
-
HTMLWCProps & {
|
|
134
|
-
}
|
|
135
|
-
> & React.RefAttributes<StringEditorWC>
|
|
136
|
-
>;
|
|
137
|
-
export type StringEditorRef = StringEditorWC;
|
|
138
|
-
|
|
139
94
|
export declare const ActionRenderer: React.ForwardRefExoticComponent<
|
|
140
95
|
React.PropsWithChildren<
|
|
141
96
|
Omit<PublicOf<ActionRendererWC>, 'children' | 'style'> &
|
|
@@ -217,6 +172,51 @@ export declare const GridProColumn: React.ForwardRefExoticComponent<
|
|
|
217
172
|
>;
|
|
218
173
|
export type GridProColumnRef = GridProColumnWC;
|
|
219
174
|
|
|
175
|
+
export declare const DateEditor: React.ForwardRefExoticComponent<
|
|
176
|
+
React.PropsWithChildren<
|
|
177
|
+
Omit<PublicOf<DateEditorWC>, 'children' | 'style'> &
|
|
178
|
+
HTMLWCProps & {
|
|
179
|
+
}
|
|
180
|
+
> & React.RefAttributes<DateEditorWC>
|
|
181
|
+
>;
|
|
182
|
+
export type DateEditorRef = DateEditorWC;
|
|
183
|
+
|
|
184
|
+
export declare const MultiselectEditor: React.ForwardRefExoticComponent<
|
|
185
|
+
React.PropsWithChildren<
|
|
186
|
+
Omit<PublicOf<MultiselectEditorWC>, 'children' | 'style'> &
|
|
187
|
+
HTMLWCProps & {
|
|
188
|
+
}
|
|
189
|
+
> & React.RefAttributes<MultiselectEditorWC>
|
|
190
|
+
>;
|
|
191
|
+
export type MultiselectEditorRef = MultiselectEditorWC;
|
|
192
|
+
|
|
193
|
+
export declare const NumberEditor: React.ForwardRefExoticComponent<
|
|
194
|
+
React.PropsWithChildren<
|
|
195
|
+
Omit<PublicOf<NumberEditorWC>, 'children' | 'style'> &
|
|
196
|
+
HTMLWCProps & {
|
|
197
|
+
}
|
|
198
|
+
> & React.RefAttributes<NumberEditorWC>
|
|
199
|
+
>;
|
|
200
|
+
export type NumberEditorRef = NumberEditorWC;
|
|
201
|
+
|
|
202
|
+
export declare const SelectEditor: React.ForwardRefExoticComponent<
|
|
203
|
+
React.PropsWithChildren<
|
|
204
|
+
Omit<PublicOf<SelectEditorWC>, 'children' | 'style'> &
|
|
205
|
+
HTMLWCProps & {
|
|
206
|
+
}
|
|
207
|
+
> & React.RefAttributes<SelectEditorWC>
|
|
208
|
+
>;
|
|
209
|
+
export type SelectEditorRef = SelectEditorWC;
|
|
210
|
+
|
|
211
|
+
export declare const StringEditor: React.ForwardRefExoticComponent<
|
|
212
|
+
React.PropsWithChildren<
|
|
213
|
+
Omit<PublicOf<StringEditorWC>, 'children' | 'style'> &
|
|
214
|
+
HTMLWCProps & {
|
|
215
|
+
}
|
|
216
|
+
> & React.RefAttributes<StringEditorWC>
|
|
217
|
+
>;
|
|
218
|
+
export type StringEditorRef = StringEditorWC;
|
|
219
|
+
|
|
220
220
|
export declare const ColumnSelection: React.ForwardRefExoticComponent<
|
|
221
221
|
React.PropsWithChildren<
|
|
222
222
|
Omit<PublicOf<ColumnSelectionWC>, 'children' | 'style'> &
|
|
@@ -306,15 +306,6 @@ export declare const GridProServerSideDatasource: React.ForwardRefExoticComponen
|
|
|
306
306
|
>;
|
|
307
307
|
export type GridProServerSideDatasourceRef = GridProServerSideDatasourceWC;
|
|
308
308
|
|
|
309
|
-
export declare const MulticolumnDropdown: React.ForwardRefExoticComponent<
|
|
310
|
-
React.PropsWithChildren<
|
|
311
|
-
Omit<PublicOf<MulticolumnDropdownWC>, 'children' | 'style'> &
|
|
312
|
-
HTMLWCProps & {
|
|
313
|
-
}
|
|
314
|
-
> & React.RefAttributes<MulticolumnDropdownWC>
|
|
315
|
-
>;
|
|
316
|
-
export type MulticolumnDropdownRef = MulticolumnDropdownWC;
|
|
317
|
-
|
|
318
309
|
export declare const GridProGenesisDatasource: React.ForwardRefExoticComponent<
|
|
319
310
|
React.PropsWithChildren<
|
|
320
311
|
Omit<PublicOf<GridProGenesisDatasourceWC>, 'children' | 'style'> &
|
|
@@ -342,4 +333,13 @@ export declare const GridProGenesisDatasource: React.ForwardRefExoticComponent<
|
|
|
342
333
|
>;
|
|
343
334
|
export type GridProGenesisDatasourceRef = GridProGenesisDatasourceWC;
|
|
344
335
|
|
|
336
|
+
export declare const MulticolumnDropdown: React.ForwardRefExoticComponent<
|
|
337
|
+
React.PropsWithChildren<
|
|
338
|
+
Omit<PublicOf<MulticolumnDropdownWC>, 'children' | 'style'> &
|
|
339
|
+
HTMLWCProps & {
|
|
340
|
+
}
|
|
341
|
+
> & React.RefAttributes<MulticolumnDropdownWC>
|
|
342
|
+
>;
|
|
343
|
+
export type MulticolumnDropdownRef = MulticolumnDropdownWC;
|
|
344
|
+
|
|
345
345
|
export {};
|
|
@@ -44,7 +44,8 @@ export const foundationGridProActionsMenuRenderer = ActionsMenuRenderer.compose(
|
|
|
44
44
|
/**
|
|
45
45
|
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for Actions Menu Renderer.
|
|
46
46
|
* 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
|
|
47
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
48
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
48
49
|
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
49
50
|
* @param customActionsOpenerName - Optional custom name for the button that opens the menu. Default is '⋮'.
|
|
50
51
|
* @param isVertical - Optional flag to display the menu vertically. Default is false (displays the menu horizontally, follow the rowHeight).
|
|
@@ -95,3 +96,47 @@ export const getActionsMenuDef = (actions, overrideDef = {}, customActionsOpener
|
|
|
95
96
|
};
|
|
96
97
|
return Object.assign(Object.assign({}, actionsMenuDef), overrideDef);
|
|
97
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for a
|
|
101
|
+
* vertical Actions Menu behind an icon-only "kebab" opener, for a pinned column of per-row actions.
|
|
102
|
+
* Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
|
|
103
|
+
* @remarks The opener hides itself on rows with no actions, so it never opens an empty menu.
|
|
104
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
105
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
106
|
+
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
107
|
+
* @param iconName - Optional icon name for the opener. Default is `'ellipsis'` (horizontal dots); pass `'ellipsis-vertical'` for vertical ones.
|
|
108
|
+
* @param buttonAppearance - Optional appearance for the button that opens the menu.
|
|
109
|
+
* @param hideDisabled - Optional flag to hide disabled actions instead of greying them out. Default is false.
|
|
110
|
+
* When every action for a row is hidden, the opener hides too.
|
|
111
|
+
* @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* public exampleMoreColumnDef: ColDef = getVerticalDropdownMenuDef(
|
|
115
|
+
* (rowData) => [
|
|
116
|
+
* { name: 'Ping Trader', icon: { name: 'paper-plane' }, callback: (rowData) => pingTrader(rowData) },
|
|
117
|
+
* { name: 'Assign', icon: { name: 'user' }, callback: (rowData) => assign(rowData) },
|
|
118
|
+
* ],
|
|
119
|
+
* { headerName: '', pinned: 'right' },
|
|
120
|
+
* );
|
|
121
|
+
* ```
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
export const getVerticalDropdownMenuDef = (actions, overrideDef = {}, iconName = 'ellipsis', buttonAppearance, hideDisabled = false) => {
|
|
125
|
+
const verticalDropdownMenuDef = {
|
|
126
|
+
cellRenderer: GridProRendererTypes.actionsMenu,
|
|
127
|
+
cellRendererParams: {
|
|
128
|
+
actions,
|
|
129
|
+
addDefaultActions: false,
|
|
130
|
+
buttonAppearance,
|
|
131
|
+
hideDisabled,
|
|
132
|
+
iconName,
|
|
133
|
+
isVertical: true,
|
|
134
|
+
},
|
|
135
|
+
cellStyle: { border: 'none', overflow: 'visible' },
|
|
136
|
+
field: overrideDef.headerName
|
|
137
|
+
? convertToKebabCase(overrideDef.headerName)
|
|
138
|
+
: 'vertical-dropdown-menu',
|
|
139
|
+
width: 40,
|
|
140
|
+
};
|
|
141
|
+
return Object.assign(Object.assign({}, verticalDropdownMenuDef), overrideDef);
|
|
142
|
+
};
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -14058,7 +14058,7 @@
|
|
|
14058
14058
|
{
|
|
14059
14059
|
"kind": "Function",
|
|
14060
14060
|
"canonicalReference": "@genesislcap/grid-pro!getActionsMenuDef:function(1)",
|
|
14061
|
-
"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",
|
|
14061
|
+
"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",
|
|
14062
14062
|
"excerptTokens": [
|
|
14063
14063
|
{
|
|
14064
14064
|
"kind": "Content",
|
|
@@ -14066,12 +14066,8 @@
|
|
|
14066
14066
|
},
|
|
14067
14067
|
{
|
|
14068
14068
|
"kind": "Reference",
|
|
14069
|
-
"text": "
|
|
14070
|
-
"canonicalReference": "@genesislcap/foundation-ui!
|
|
14071
|
-
},
|
|
14072
|
-
{
|
|
14073
|
-
"kind": "Content",
|
|
14074
|
-
"text": "[]"
|
|
14069
|
+
"text": "ActionMenuItems",
|
|
14070
|
+
"canonicalReference": "@genesislcap/foundation-ui!ActionMenuItems:type"
|
|
14075
14071
|
},
|
|
14076
14072
|
{
|
|
14077
14073
|
"kind": "Content",
|
|
@@ -14118,8 +14114,8 @@
|
|
|
14118
14114
|
],
|
|
14119
14115
|
"fileUrlPath": "src/cell-renderers/actions-menu.renderer.ts",
|
|
14120
14116
|
"returnTypeTokenRange": {
|
|
14121
|
-
"startIndex":
|
|
14122
|
-
"endIndex":
|
|
14117
|
+
"startIndex": 11,
|
|
14118
|
+
"endIndex": 12
|
|
14123
14119
|
},
|
|
14124
14120
|
"releaseTag": "Public",
|
|
14125
14121
|
"overloadIndex": 1,
|
|
@@ -14128,39 +14124,39 @@
|
|
|
14128
14124
|
"parameterName": "actions",
|
|
14129
14125
|
"parameterTypeTokenRange": {
|
|
14130
14126
|
"startIndex": 1,
|
|
14131
|
-
"endIndex":
|
|
14127
|
+
"endIndex": 2
|
|
14132
14128
|
},
|
|
14133
14129
|
"isOptional": false
|
|
14134
14130
|
},
|
|
14135
14131
|
{
|
|
14136
14132
|
"parameterName": "overrideDef",
|
|
14137
14133
|
"parameterTypeTokenRange": {
|
|
14138
|
-
"startIndex":
|
|
14139
|
-
"endIndex":
|
|
14134
|
+
"startIndex": 3,
|
|
14135
|
+
"endIndex": 4
|
|
14140
14136
|
},
|
|
14141
14137
|
"isOptional": true
|
|
14142
14138
|
},
|
|
14143
14139
|
{
|
|
14144
14140
|
"parameterName": "customActionsOpenerName",
|
|
14145
14141
|
"parameterTypeTokenRange": {
|
|
14146
|
-
"startIndex":
|
|
14147
|
-
"endIndex":
|
|
14142
|
+
"startIndex": 5,
|
|
14143
|
+
"endIndex": 6
|
|
14148
14144
|
},
|
|
14149
14145
|
"isOptional": true
|
|
14150
14146
|
},
|
|
14151
14147
|
{
|
|
14152
14148
|
"parameterName": "isVertical",
|
|
14153
14149
|
"parameterTypeTokenRange": {
|
|
14154
|
-
"startIndex":
|
|
14155
|
-
"endIndex":
|
|
14150
|
+
"startIndex": 7,
|
|
14151
|
+
"endIndex": 8
|
|
14156
14152
|
},
|
|
14157
14153
|
"isOptional": true
|
|
14158
14154
|
},
|
|
14159
14155
|
{
|
|
14160
14156
|
"parameterName": "buttonAppearance",
|
|
14161
14157
|
"parameterTypeTokenRange": {
|
|
14162
|
-
"startIndex":
|
|
14163
|
-
"endIndex":
|
|
14158
|
+
"startIndex": 9,
|
|
14159
|
+
"endIndex": 10
|
|
14164
14160
|
},
|
|
14165
14161
|
"isOptional": true
|
|
14166
14162
|
}
|
|
@@ -15372,6 +15368,114 @@
|
|
|
15372
15368
|
],
|
|
15373
15369
|
"name": "getTextRendererTemplate"
|
|
15374
15370
|
},
|
|
15371
|
+
{
|
|
15372
|
+
"kind": "Function",
|
|
15373
|
+
"canonicalReference": "@genesislcap/grid-pro!getVerticalDropdownMenuDef:function(1)",
|
|
15374
|
+
"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.\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",
|
|
15375
|
+
"excerptTokens": [
|
|
15376
|
+
{
|
|
15377
|
+
"kind": "Content",
|
|
15378
|
+
"text": "getVerticalDropdownMenuDef: (actions: "
|
|
15379
|
+
},
|
|
15380
|
+
{
|
|
15381
|
+
"kind": "Reference",
|
|
15382
|
+
"text": "ActionMenuItems",
|
|
15383
|
+
"canonicalReference": "@genesislcap/foundation-ui!ActionMenuItems:type"
|
|
15384
|
+
},
|
|
15385
|
+
{
|
|
15386
|
+
"kind": "Content",
|
|
15387
|
+
"text": ", overrideDef?: "
|
|
15388
|
+
},
|
|
15389
|
+
{
|
|
15390
|
+
"kind": "Reference",
|
|
15391
|
+
"text": "ColDef",
|
|
15392
|
+
"canonicalReference": "@ag-grid-community/core!ColDef:interface"
|
|
15393
|
+
},
|
|
15394
|
+
{
|
|
15395
|
+
"kind": "Content",
|
|
15396
|
+
"text": ", iconName?: "
|
|
15397
|
+
},
|
|
15398
|
+
{
|
|
15399
|
+
"kind": "Content",
|
|
15400
|
+
"text": "string"
|
|
15401
|
+
},
|
|
15402
|
+
{
|
|
15403
|
+
"kind": "Content",
|
|
15404
|
+
"text": ", buttonAppearance?: "
|
|
15405
|
+
},
|
|
15406
|
+
{
|
|
15407
|
+
"kind": "Content",
|
|
15408
|
+
"text": "string"
|
|
15409
|
+
},
|
|
15410
|
+
{
|
|
15411
|
+
"kind": "Content",
|
|
15412
|
+
"text": ", hideDisabled?: "
|
|
15413
|
+
},
|
|
15414
|
+
{
|
|
15415
|
+
"kind": "Content",
|
|
15416
|
+
"text": "boolean"
|
|
15417
|
+
},
|
|
15418
|
+
{
|
|
15419
|
+
"kind": "Content",
|
|
15420
|
+
"text": ") => "
|
|
15421
|
+
},
|
|
15422
|
+
{
|
|
15423
|
+
"kind": "Reference",
|
|
15424
|
+
"text": "ColDef",
|
|
15425
|
+
"canonicalReference": "@ag-grid-community/core!ColDef:interface"
|
|
15426
|
+
}
|
|
15427
|
+
],
|
|
15428
|
+
"fileUrlPath": "src/cell-renderers/actions-menu.renderer.ts",
|
|
15429
|
+
"returnTypeTokenRange": {
|
|
15430
|
+
"startIndex": 11,
|
|
15431
|
+
"endIndex": 12
|
|
15432
|
+
},
|
|
15433
|
+
"releaseTag": "Public",
|
|
15434
|
+
"overloadIndex": 1,
|
|
15435
|
+
"parameters": [
|
|
15436
|
+
{
|
|
15437
|
+
"parameterName": "actions",
|
|
15438
|
+
"parameterTypeTokenRange": {
|
|
15439
|
+
"startIndex": 1,
|
|
15440
|
+
"endIndex": 2
|
|
15441
|
+
},
|
|
15442
|
+
"isOptional": false
|
|
15443
|
+
},
|
|
15444
|
+
{
|
|
15445
|
+
"parameterName": "overrideDef",
|
|
15446
|
+
"parameterTypeTokenRange": {
|
|
15447
|
+
"startIndex": 3,
|
|
15448
|
+
"endIndex": 4
|
|
15449
|
+
},
|
|
15450
|
+
"isOptional": true
|
|
15451
|
+
},
|
|
15452
|
+
{
|
|
15453
|
+
"parameterName": "iconName",
|
|
15454
|
+
"parameterTypeTokenRange": {
|
|
15455
|
+
"startIndex": 5,
|
|
15456
|
+
"endIndex": 6
|
|
15457
|
+
},
|
|
15458
|
+
"isOptional": true
|
|
15459
|
+
},
|
|
15460
|
+
{
|
|
15461
|
+
"parameterName": "buttonAppearance",
|
|
15462
|
+
"parameterTypeTokenRange": {
|
|
15463
|
+
"startIndex": 7,
|
|
15464
|
+
"endIndex": 8
|
|
15465
|
+
},
|
|
15466
|
+
"isOptional": true
|
|
15467
|
+
},
|
|
15468
|
+
{
|
|
15469
|
+
"parameterName": "hideDisabled",
|
|
15470
|
+
"parameterTypeTokenRange": {
|
|
15471
|
+
"startIndex": 9,
|
|
15472
|
+
"endIndex": 10
|
|
15473
|
+
},
|
|
15474
|
+
"isOptional": true
|
|
15475
|
+
}
|
|
15476
|
+
],
|
|
15477
|
+
"name": "getVerticalDropdownMenuDef"
|
|
15478
|
+
},
|
|
15375
15479
|
{
|
|
15376
15480
|
"kind": "Variable",
|
|
15377
15481
|
"canonicalReference": "@genesislcap/grid-pro!GRID_PRO_COLUMN_DRAG_BRIDGE_CONTEXT_KEY:var",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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';
|
|
@@ -3343,7 +3343,8 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
3343
3343
|
/**
|
|
3344
3344
|
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for Actions Menu Renderer.
|
|
3345
3345
|
* Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
|
|
3346
|
-
* @param actions - Array of `ActionMenuItem` to be displayed in the menu
|
|
3346
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
3347
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
3347
3348
|
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
3348
3349
|
* @param customActionsOpenerName - Optional custom name for the button that opens the menu. Default is '⋮'.
|
|
3349
3350
|
* @param isVertical - Optional flag to display the menu vertically. Default is false (displays the menu horizontally, follow the rowHeight).
|
|
@@ -3373,7 +3374,7 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
3373
3374
|
* ```
|
|
3374
3375
|
* @public
|
|
3375
3376
|
*/
|
|
3376
|
-
export declare const getActionsMenuDef: (actions:
|
|
3377
|
+
export declare const getActionsMenuDef: (actions: ActionMenuItems, overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => ColDef;
|
|
3377
3378
|
|
|
3378
3379
|
/**
|
|
3379
3380
|
* Get a Design System prefixed Checkbox template.
|
|
@@ -3531,6 +3532,33 @@ export declare const getTextFieldRendererTemplate: (designSystem?: string) => Vi
|
|
|
3531
3532
|
*/
|
|
3532
3533
|
export declare const getTextRendererTemplate: (designSystem?: string) => ViewTemplate<AgTextFieldRenderer, any>;
|
|
3533
3534
|
|
|
3535
|
+
/**
|
|
3536
|
+
* Helper function to get ColDef {@link https://www.ag-grid.com/javascript-data-grid/column-properties/} for a
|
|
3537
|
+
* vertical Actions Menu behind an icon-only "kebab" opener, for a pinned column of per-row actions.
|
|
3538
|
+
* Will take the parameter values for a base ColDef and merge them with the overrideDef (if specified).
|
|
3539
|
+
* @remarks The opener hides itself on rows with no actions, so it never opens an empty menu.
|
|
3540
|
+
* @param actions - Array of `ActionMenuItem` to be displayed in the menu, or a function of the row data
|
|
3541
|
+
* returning that array (for row-scoped eligibility/permission filtering).
|
|
3542
|
+
* @param overrideDef - Optional override for the ColDef. Will override any of the default values. Default is an empty object.
|
|
3543
|
+
* @param iconName - Optional icon name for the opener. Default is `'ellipsis'` (horizontal dots); pass `'ellipsis-vertical'` for vertical ones.
|
|
3544
|
+
* @param buttonAppearance - Optional appearance for the button that opens the menu.
|
|
3545
|
+
* @param hideDisabled - Optional flag to hide disabled actions instead of greying them out. Default is false.
|
|
3546
|
+
* When every action for a row is hidden, the opener hides too.
|
|
3547
|
+
* @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.
|
|
3548
|
+
* @example
|
|
3549
|
+
* ```ts
|
|
3550
|
+
* public exampleMoreColumnDef: ColDef = getVerticalDropdownMenuDef(
|
|
3551
|
+
* (rowData) => [
|
|
3552
|
+
* { name: 'Ping Trader', icon: { name: 'paper-plane' }, callback: (rowData) => pingTrader(rowData) },
|
|
3553
|
+
* { name: 'Assign', icon: { name: 'user' }, callback: (rowData) => assign(rowData) },
|
|
3554
|
+
* ],
|
|
3555
|
+
* { headerName: '', pinned: 'right' },
|
|
3556
|
+
* );
|
|
3557
|
+
* ```
|
|
3558
|
+
* @public
|
|
3559
|
+
*/
|
|
3560
|
+
export declare const getVerticalDropdownMenuDef: (actions: ActionMenuItems, overrideDef?: ColDef, iconName?: string, buttonAppearance?: string, hideDisabled?: boolean) => ColDef;
|
|
3561
|
+
|
|
3534
3562
|
/** Context key on `gridOptions.context` for AG column drag integration.
|
|
3535
3563
|
* @public
|
|
3536
3564
|
*/
|
package/dist/react.cjs
CHANGED
|
@@ -98,31 +98,6 @@ const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
|
98
98
|
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
102
|
-
const { children, ...rest } = props;
|
|
103
|
-
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
const MultiselectEditor = React.forwardRef(function MultiselectEditor(props, ref) {
|
|
107
|
-
const { children, ...rest } = props;
|
|
108
|
-
return React.createElement(customElements.getName(MultiselectEditorWC) ?? '%%prefix%%-multiselect-editor', { ...rest, ref }, children);
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
const NumberEditor = React.forwardRef(function NumberEditor(props, ref) {
|
|
112
|
-
const { children, ...rest } = props;
|
|
113
|
-
return React.createElement(customElements.getName(NumberEditorWC) ?? '%%prefix%%-number-editor', { ...rest, ref }, children);
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
const SelectEditor = React.forwardRef(function SelectEditor(props, ref) {
|
|
117
|
-
const { children, ...rest } = props;
|
|
118
|
-
return React.createElement(customElements.getName(SelectEditorWC) ?? '%%prefix%%-select-editor', { ...rest, ref }, children);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
122
|
-
const { children, ...rest } = props;
|
|
123
|
-
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
124
|
-
});
|
|
125
|
-
|
|
126
101
|
const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
127
102
|
const { children, ...rest } = props;
|
|
128
103
|
return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
|
|
@@ -168,6 +143,31 @@ const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
|
168
143
|
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
169
144
|
});
|
|
170
145
|
|
|
146
|
+
const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
147
|
+
const { children, ...rest } = props;
|
|
148
|
+
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
const MultiselectEditor = React.forwardRef(function MultiselectEditor(props, ref) {
|
|
152
|
+
const { children, ...rest } = props;
|
|
153
|
+
return React.createElement(customElements.getName(MultiselectEditorWC) ?? '%%prefix%%-multiselect-editor', { ...rest, ref }, children);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
const NumberEditor = React.forwardRef(function NumberEditor(props, ref) {
|
|
157
|
+
const { children, ...rest } = props;
|
|
158
|
+
return React.createElement(customElements.getName(NumberEditorWC) ?? '%%prefix%%-number-editor', { ...rest, ref }, children);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const SelectEditor = React.forwardRef(function SelectEditor(props, ref) {
|
|
162
|
+
const { children, ...rest } = props;
|
|
163
|
+
return React.createElement(customElements.getName(SelectEditorWC) ?? '%%prefix%%-select-editor', { ...rest, ref }, children);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
167
|
+
const { children, ...rest } = props;
|
|
168
|
+
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
171
|
const ColumnSelection = React.forwardRef(function ColumnSelection(props, ref) {
|
|
172
172
|
const { children, ...rest } = props;
|
|
173
173
|
return React.createElement(customElements.getName(ColumnSelectionWC) ?? '%%prefix%%-column-selection', { ...rest, ref }, children);
|
|
@@ -474,11 +474,6 @@ const GridProServerSideDatasource = React.forwardRef(function GridProServerSideD
|
|
|
474
474
|
return React.createElement(customElements.getName(GridProServerSideDatasourceWC) ?? 'grid-pro-server-side-datasource', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
475
475
|
});
|
|
476
476
|
|
|
477
|
-
const MulticolumnDropdown = React.forwardRef(function MulticolumnDropdown(props, ref) {
|
|
478
|
-
const { children, ...rest } = props;
|
|
479
|
-
return React.createElement(customElements.getName(MulticolumnDropdownWC) ?? '%%prefix%%-multicolumn-dropdown', { ...rest, ref }, children);
|
|
480
|
-
});
|
|
481
|
-
|
|
482
477
|
const GridProGenesisDatasource = React.forwardRef(function GridProGenesisDatasource(props, ref) {
|
|
483
478
|
const { onBaseDatasourceError, onDatasourceError, onBaseDatasourceConnected, onDatasourceLoadingFinished, onDatasourceNoDataAvailable, onDatasourceDataChanged, onDatasourceInitialize, onDatasourceDestroy, onDatasourceDataCleared, onDatasourceSchemaUpdated, onDatasourceFiltersRestored, onDatasourceDataLoaded, onDatasourceLoadingStarted, onDatasourceMoreDataAvailable, onDatasourceReady, onDatasourceInit, onMoreRowsChanged, onDatasourceSizeChanged, children, ...rest } = props;
|
|
484
479
|
const _innerRef = React.useRef(null);
|
|
@@ -581,15 +576,15 @@ const GridProGenesisDatasource = React.forwardRef(function GridProGenesisDatasou
|
|
|
581
576
|
return React.createElement(customElements.getName(GridProGenesisDatasourceWC) ?? 'grid-pro-genesis-datasource', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
582
577
|
});
|
|
583
578
|
|
|
579
|
+
const MulticolumnDropdown = React.forwardRef(function MulticolumnDropdown(props, ref) {
|
|
580
|
+
const { children, ...rest } = props;
|
|
581
|
+
return React.createElement(customElements.getName(MulticolumnDropdownWC) ?? '%%prefix%%-multicolumn-dropdown', { ...rest, ref }, children);
|
|
582
|
+
});
|
|
583
|
+
|
|
584
584
|
module.exports = {
|
|
585
585
|
GridProLegacy,
|
|
586
586
|
GridPro,
|
|
587
587
|
GridProCell,
|
|
588
|
-
DateEditor,
|
|
589
|
-
MultiselectEditor,
|
|
590
|
-
NumberEditor,
|
|
591
|
-
SelectEditor,
|
|
592
|
-
StringEditor,
|
|
593
588
|
ActionRenderer,
|
|
594
589
|
ActionsMenuRenderer,
|
|
595
590
|
BooleanRenderer,
|
|
@@ -599,10 +594,15 @@ module.exports = {
|
|
|
599
594
|
AgTextFieldRenderer,
|
|
600
595
|
AgTextRenderer,
|
|
601
596
|
GridProColumn,
|
|
597
|
+
DateEditor,
|
|
598
|
+
MultiselectEditor,
|
|
599
|
+
NumberEditor,
|
|
600
|
+
SelectEditor,
|
|
601
|
+
StringEditor,
|
|
602
602
|
ColumnSelection,
|
|
603
603
|
GridProClientSideDatasource,
|
|
604
604
|
GridProInfiniteDatasource,
|
|
605
605
|
GridProServerSideDatasource,
|
|
606
|
-
MulticolumnDropdown,
|
|
607
606
|
GridProGenesisDatasource,
|
|
607
|
+
MulticolumnDropdown,
|
|
608
608
|
};
|