impact-ui 4.0.0-alpha.20 → 4.0.0-alpha.21

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 +1 @@
1
- {"version":3,"file":"TableImpl.d.ts","sourceRoot":"","sources":["../../../src/components/Table/TableImpl.tsx"],"names":[],"mappings":"AAaA,OAAO,sCAAsC,CAAC;AAC9C,OAAO,8CAA8C,CAAC;AACtD,OAAO,qBAAqB,CAAC;AAe7B,eAAO,MAAM,KAAK,mFA++DjB,CAAC"}
1
+ {"version":3,"file":"TableImpl.d.ts","sourceRoot":"","sources":["../../../src/components/Table/TableImpl.tsx"],"names":[],"mappings":"AAaA,OAAO,sCAAsC,CAAC;AAC9C,OAAO,8CAA8C,CAAC;AACtD,OAAO,qBAAqB,CAAC;AAe7B,eAAO,MAAM,KAAK,mFAwgEjB,CAAC"}
@@ -1120,6 +1120,30 @@ const Table = forwardRef(
1120
1120
  },
1121
1121
  [getLiveGridApi]
1122
1122
  );
1123
+ const rowIdentifierMatches = (dataValue, targetRowId) => {
1124
+ if (dataValue == null || targetRowId == null || targetRowId === "") {
1125
+ return false;
1126
+ }
1127
+ return String(dataValue) === String(targetRowId);
1128
+ };
1129
+ const findRowNodeForComment = (api, rowId, colIdentifierKey) => {
1130
+ if (!api || rowId == null) {
1131
+ return null;
1132
+ }
1133
+ if (colIdentifierKey) {
1134
+ let matchedNode = null;
1135
+ api.forEachNode((node) => {
1136
+ var _a2;
1137
+ if (rowIdentifierMatches((_a2 = node.data) == null ? void 0 : _a2[colIdentifierKey], rowId)) {
1138
+ matchedNode = node;
1139
+ }
1140
+ });
1141
+ if (matchedNode) {
1142
+ return matchedNode;
1143
+ }
1144
+ }
1145
+ return api.getRowNode(rowId) || api.getRowNode(String(rowId)) || null;
1146
+ };
1123
1147
  function getCellElementById(gridId2, rowNode, colId) {
1124
1148
  const containerEl = document.querySelector(".impact-table-main-container");
1125
1149
  if (!containerEl || !rowNode) return null;
@@ -1138,24 +1162,15 @@ const Table = forwardRef(
1138
1162
  }
1139
1163
  const handleCommentItemClick = useCallback(
1140
1164
  (cellId, comments2, messageId = null) => {
1141
- var _a2;
1165
+ var _a2, _b2;
1142
1166
  const [rowId, colId, threadId] = cellId.split("__");
1143
1167
  const api = (_a2 = actualRef.current) == null ? void 0 : _a2.api;
1144
1168
  if (!api) {
1145
1169
  console.error("AG Grid API not available.");
1146
1170
  return;
1147
1171
  }
1148
- let rowNode;
1149
- if (commentProps == null ? void 0 : commentProps.colIdentifierKey) {
1150
- api.forEachNode((node) => {
1151
- var _a3;
1152
- if (((_a3 = node.data) == null ? void 0 : _a3[commentProps.colIdentifierKey]) === rowId) {
1153
- rowNode = node;
1154
- }
1155
- });
1156
- } else {
1157
- rowNode = api.getRowNode(rowId);
1158
- }
1172
+ (_b2 = commentProps == null ? void 0 : commentProps.onNavigateToCommentRow) == null ? void 0 : _b2.call(commentProps, rowId);
1173
+ const rowNode = findRowNodeForComment(api, rowId, commentProps == null ? void 0 : commentProps.colIdentifierKey);
1159
1174
  if (!rowNode) {
1160
1175
  console.error("Could not find row node for rowId:", rowId);
1161
1176
  return;
@@ -1184,7 +1199,14 @@ const Table = forwardRef(
1184
1199
  });
1185
1200
  });
1186
1201
  },
1187
- [actualRef, gridId, calculatePopupPosition, commentProps == null ? void 0 : commentProps.author]
1202
+ [
1203
+ actualRef,
1204
+ gridId,
1205
+ calculatePopupPosition,
1206
+ commentProps == null ? void 0 : commentProps.author,
1207
+ commentProps == null ? void 0 : commentProps.colIdentifierKey,
1208
+ commentProps == null ? void 0 : commentProps.onNavigateToCommentRow
1209
+ ]
1188
1210
  );
1189
1211
  const handleUpdateComment = useCallback(
1190
1212
  async (commentId, newText) => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 1,
3
- "generatedAt": "2026-06-22T11:44:39.023Z",
3
+ "generatedAt": "2026-06-24T14:29:53.334Z",
4
4
  "components": {
5
5
  "Accordion": {
6
6
  "title": "Components/Accordion",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-ui",
3
- "version": "4.0.0-alpha.20",
3
+ "version": "4.0.0-alpha.21",
4
4
  "description": "Impact Analytics UI library",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",