@genesislcap/grid-pro 15.78.2 → 15.79.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 +533 -533
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/react.d.ts +9 -9
- package/dist/esm/grid-pro.js +80 -17
- package/dist/react.cjs +6 -6
- package/dist/react.mjs +5 -5
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AAMA,OAAO,EAA8B,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,oBAAoB,EACpB,MAAM,EACN,WAAW,EAGX,OAAO,EACP,WAAW,EACX,UAAU,EAEV,gBAAgB,
|
|
1
|
+
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AAMA,OAAO,EAA8B,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,oBAAoB,EACpB,MAAM,EACN,WAAW,EAGX,OAAO,EACP,WAAW,EACX,UAAU,EAEV,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAwD3B,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAuB,KAAK,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAMhG,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAkCrE,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAEhB,yBAAyB,EAG1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAKL,iBAAiB,EAEjB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S,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,15 +137,6 @@ 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
|
-
|
|
149
140
|
export declare const ActionRenderer: React.ForwardRefExoticComponent<
|
|
150
141
|
React.PropsWithChildren<
|
|
151
142
|
Omit<PublicOf<ActionRendererWC>, 'children' | 'style'> &
|
|
@@ -218,6 +209,15 @@ export declare const AgTextRenderer: React.ForwardRefExoticComponent<
|
|
|
218
209
|
>;
|
|
219
210
|
export type AgTextRendererRef = AgTextRendererWC;
|
|
220
211
|
|
|
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'> &
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -87,6 +87,76 @@ function findDeclaredAccessor(target, key) {
|
|
|
87
87
|
}
|
|
88
88
|
return undefined;
|
|
89
89
|
}
|
|
90
|
+
/** `tooltip` callbacks grid-pro injected, so re-merging the same column does not wrap them again. */
|
|
91
|
+
const errorTooltipCallbacks = new WeakSet();
|
|
92
|
+
/** What AG Grid shows for `tooltip: true`: the formatted cell value, else the raw one. */
|
|
93
|
+
const showDisplayedValue = (params) => { var _a; return (_a = params.valueFormatted) !== null && _a !== void 0 ? _a : params.value; };
|
|
94
|
+
/** Reads a dot-separated path (e.g. `trade.counterparty`) from an object, `undefined` if missing. */
|
|
95
|
+
const getValueAtPath = (data, path) => path.split('.').reduce((value, key) => value === null || value === void 0 ? void 0 : value[key], data);
|
|
96
|
+
/**
|
|
97
|
+
* The column's own cell tooltip content as one callback, following AG Grid's precedence:
|
|
98
|
+
* `tooltip`, then `tooltipField`, then `tooltipValueGetter`.
|
|
99
|
+
* @remarks `tooltipField` is read straight from row data (dot paths included), falling back to
|
|
100
|
+
* `tooltipValueGetter` when the row has no data, like AG Grid; AG Grid's group aggregate and pending
|
|
101
|
+
* batch-edit lookups for it are not reproduced.
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
function getOwnCellTooltip(colDef) {
|
|
105
|
+
const { tooltip, tooltipField, tooltipValueGetter } = colDef;
|
|
106
|
+
if (typeof tooltip === 'function')
|
|
107
|
+
return tooltip;
|
|
108
|
+
if (tooltip === true)
|
|
109
|
+
return showDisplayedValue;
|
|
110
|
+
if (typeof tooltip === 'string')
|
|
111
|
+
return () => tooltip;
|
|
112
|
+
if (tooltipField) {
|
|
113
|
+
const readTooltipField = (params) => params.data == null
|
|
114
|
+
? tooltipValueGetter === null || tooltipValueGetter === void 0 ? void 0 : tooltipValueGetter(params)
|
|
115
|
+
: getValueAtPath(params.data, tooltipField);
|
|
116
|
+
return readTooltipField;
|
|
117
|
+
}
|
|
118
|
+
return tooltipValueGetter;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Shows the inline-edit error of an editable column in `ErrorTooltip`, while every other cell keeps
|
|
122
|
+
* the column's own tooltip content and component.
|
|
123
|
+
* @remarks `tooltip: false` turns the column's tooltip off on purpose, so it is left untouched.
|
|
124
|
+
* The content goes into `tooltip`, which replaces `tooltipValueGetter` (deprecated in AG Grid 36.2)
|
|
125
|
+
* and takes precedence over `tooltipField`, so the column's own content is resolved inside it.
|
|
126
|
+
* `ErrorTooltip` is picked via `tooltipComponentSelector`, whose result wins over
|
|
127
|
+
* `tooltipComponent`; returning nothing falls back to it.
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
function composeErrorTooltip(colDef, field) {
|
|
131
|
+
if (colDef.tooltip === false ||
|
|
132
|
+
errorTooltipCallbacks.has(colDef.tooltip)) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const ownTooltip = getOwnCellTooltip(colDef);
|
|
136
|
+
const ownComponentSelector = colDef.tooltipComponentSelector;
|
|
137
|
+
const getError = (data) => {
|
|
138
|
+
const error = data === null || data === void 0 ? void 0 : data[ERROR_COLUMN_FIELD];
|
|
139
|
+
return (error === null || error === void 0 ? void 0 : error.column) === field ? error : undefined;
|
|
140
|
+
};
|
|
141
|
+
const tooltip = (params) => {
|
|
142
|
+
const error = getError(params.data);
|
|
143
|
+
return error ? error.message : ownTooltip === null || ownTooltip === void 0 ? void 0 : ownTooltip(params);
|
|
144
|
+
};
|
|
145
|
+
errorTooltipCallbacks.add(tooltip);
|
|
146
|
+
colDef.tooltip = tooltip;
|
|
147
|
+
colDef.tooltipComponentSelector = (params) => getError(params.data) ? { component: ErrorTooltip } : ownComponentSelector === null || ownComponentSelector === void 0 ? void 0 : ownComponentSelector(params);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Whether row selection is on, in either the deprecated string form or the `RowSelectionOptions`
|
|
151
|
+
* object form.
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
function isRowSelectionEnabled(rowSelection) {
|
|
155
|
+
if (rowSelection === 'single' || rowSelection === 'multiple')
|
|
156
|
+
return true;
|
|
157
|
+
return (typeof rowSelection === 'object' &&
|
|
158
|
+
((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.mode) === 'singleRow' || (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.mode) === 'multiRow'));
|
|
159
|
+
}
|
|
90
160
|
/**
|
|
91
161
|
* The Grid Pro element (AG Grid v36 compatible).
|
|
92
162
|
* @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
@@ -970,14 +1040,13 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
970
1040
|
* @returns Array of selected row data
|
|
971
1041
|
*/
|
|
972
1042
|
getSelectedRows() {
|
|
973
|
-
var _a, _b, _c, _d;
|
|
1043
|
+
var _a, _b, _c, _d, _e;
|
|
974
1044
|
try {
|
|
975
1045
|
if (!this.initialised || !this.gridApi) {
|
|
976
1046
|
return [];
|
|
977
1047
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
if (rowSelectionMode === 'single' || rowSelectionMode === 'multiple') {
|
|
1048
|
+
// If row selection is enabled (string or object form), use row selection only
|
|
1049
|
+
if (isRowSelectionEnabled((_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.rowSelection)) {
|
|
981
1050
|
if (this.gridApi.getSelectedRows && this.gridApi.getSelectedRows().length > 0) {
|
|
982
1051
|
return this.gridApi.getSelectedRows();
|
|
983
1052
|
}
|
|
@@ -989,8 +1058,8 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
989
1058
|
}
|
|
990
1059
|
// Fallback: if no cell ranges but range selection is disabled,
|
|
991
1060
|
// check for focused cell (single cell selection)
|
|
992
|
-
if (!((_c = this.gridOptions) === null || _c === void 0 ? void 0 : _c.enableRangeSelection)) {
|
|
993
|
-
const focusedCell = (
|
|
1061
|
+
if (!((_c = this.gridOptions) === null || _c === void 0 ? void 0 : _c.cellSelection) && !((_d = this.gridOptions) === null || _d === void 0 ? void 0 : _d.enableRangeSelection)) {
|
|
1062
|
+
const focusedCell = (_e = this.gridApi) === null || _e === void 0 ? void 0 : _e.getFocusedCell();
|
|
994
1063
|
if (focusedCell) {
|
|
995
1064
|
const rowNode = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);
|
|
996
1065
|
if (rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) {
|
|
@@ -1454,25 +1523,19 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1454
1523
|
if (columnDef.editable) {
|
|
1455
1524
|
if (!columnDef.cellRenderer && !columnDef.cellRendererSelector) {
|
|
1456
1525
|
columnDef.cellRendererSelector = (params) => {
|
|
1457
|
-
|
|
1526
|
+
var _a;
|
|
1527
|
+
if (((_a = params.data) === null || _a === void 0 ? void 0 : _a[EDITED_COLUMN_FIELD]) === columnDef.field) {
|
|
1458
1528
|
return {
|
|
1459
1529
|
component: GridProRendererTypes.editable,
|
|
1460
1530
|
};
|
|
1461
1531
|
}
|
|
1462
1532
|
};
|
|
1463
1533
|
}
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
columnDef.tooltipValueGetter = (params) => {
|
|
1467
|
-
const error = params.data[ERROR_COLUMN_FIELD];
|
|
1468
|
-
if (error && error.column === columnDef.field) {
|
|
1469
|
-
return error.message;
|
|
1470
|
-
}
|
|
1471
|
-
};
|
|
1472
|
-
}
|
|
1534
|
+
// The template column is typed with the shared v29 `ColDef`, which predates `tooltip`.
|
|
1535
|
+
composeErrorTooltip(columnDef, columnDef.field);
|
|
1473
1536
|
if (!columnDef.cellClassRules) {
|
|
1474
1537
|
columnDef.cellClassRules = {
|
|
1475
|
-
error: (params) => { var _a; return ((_a = params.data[ERROR_COLUMN_FIELD]) === null ||
|
|
1538
|
+
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
1539
|
};
|
|
1477
1540
|
}
|
|
1478
1541
|
}
|
package/dist/react.cjs
CHANGED
|
@@ -124,11 +124,6 @@ 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
|
-
|
|
132
127
|
const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
133
128
|
const { children, ...rest } = props;
|
|
134
129
|
return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
|
|
@@ -169,6 +164,11 @@ const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, ref) {
|
|
|
169
164
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
170
165
|
});
|
|
171
166
|
|
|
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,7 +596,6 @@ module.exports = {
|
|
|
596
596
|
NumberEditor,
|
|
597
597
|
SelectEditor,
|
|
598
598
|
StringEditor,
|
|
599
|
-
GridProColumn,
|
|
600
599
|
ActionRenderer,
|
|
601
600
|
ActionsMenuRenderer,
|
|
602
601
|
BooleanRenderer,
|
|
@@ -605,6 +604,7 @@ module.exports = {
|
|
|
605
604
|
StatusPillRenderer,
|
|
606
605
|
AgTextFieldRenderer,
|
|
607
606
|
AgTextRenderer,
|
|
607
|
+
GridProColumn,
|
|
608
608
|
ColumnSelection,
|
|
609
609
|
GridProClientSideDatasource,
|
|
610
610
|
GridProInfiniteDatasource,
|
package/dist/react.mjs
CHANGED
|
@@ -122,11 +122,6 @@ 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
|
-
|
|
130
125
|
export const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
131
126
|
const { children, ...rest } = props;
|
|
132
127
|
return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
|
|
@@ -167,6 +162,11 @@ export const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, re
|
|
|
167
162
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
168
163
|
});
|
|
169
164
|
|
|
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.
|
|
4
|
+
"version": "15.79.1",
|
|
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.
|
|
42
|
-
"@genesislcap/genx": "15.
|
|
43
|
-
"@genesislcap/ts-builder": "15.
|
|
44
|
-
"@genesislcap/uvu-playwright-builder": "15.
|
|
45
|
-
"@genesislcap/vite-builder": "15.
|
|
46
|
-
"@genesislcap/webpack-builder": "15.
|
|
41
|
+
"@genesislcap/foundation-testing": "15.79.1",
|
|
42
|
+
"@genesislcap/genx": "15.79.1",
|
|
43
|
+
"@genesislcap/ts-builder": "15.79.1",
|
|
44
|
+
"@genesislcap/uvu-playwright-builder": "15.79.1",
|
|
45
|
+
"@genesislcap/vite-builder": "15.79.1",
|
|
46
|
+
"@genesislcap/webpack-builder": "15.79.1"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@genesislcap/foundation-comms": "15.
|
|
50
|
-
"@genesislcap/foundation-criteria": "15.
|
|
51
|
-
"@genesislcap/foundation-logger": "15.
|
|
52
|
-
"@genesislcap/foundation-ui": "15.
|
|
53
|
-
"@genesislcap/foundation-utils": "15.
|
|
49
|
+
"@genesislcap/foundation-comms": "15.79.1",
|
|
50
|
+
"@genesislcap/foundation-criteria": "15.79.1",
|
|
51
|
+
"@genesislcap/foundation-logger": "15.79.1",
|
|
52
|
+
"@genesislcap/foundation-ui": "15.79.1",
|
|
53
|
+
"@genesislcap/foundation-utils": "15.79.1",
|
|
54
54
|
"@microsoft/fast-colors": "5.3.1",
|
|
55
55
|
"@microsoft/fast-components": "2.30.6",
|
|
56
56
|
"@microsoft/fast-element": "1.14.0",
|