@gobolt/genesis 0.4.10 → 0.4.11

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/index.cjs CHANGED
@@ -84102,6 +84102,41 @@ function Table({
84102
84102
  return rest.scroll;
84103
84103
  }, [isMaterializedView, materializedViewConfig, dynamicHeight, rest.scroll]);
84104
84104
  const tableDataSource = isMaterializedView ? materializedData : dataSource;
84105
+ React__namespace.useEffect(() => {
84106
+ if (tableDataSource && tableDataSource.length > 0) {
84107
+ console.log(
84108
+ "Genesis Table - tableDataSource length:",
84109
+ tableDataSource.length
84110
+ );
84111
+ console.log("Genesis Table - rowKey type:", typeof rowKey);
84112
+ tableDataSource.slice(0, 3).map((record, index2) => {
84113
+ const key = typeof rowKey === "function" ? rowKey(record) : record[rowKey];
84114
+ console.log(
84115
+ `Genesis Table - Record ${index2} key:`,
84116
+ key,
84117
+ "Record:",
84118
+ record
84119
+ );
84120
+ return key;
84121
+ });
84122
+ const allKeys = tableDataSource.map(
84123
+ (record) => typeof rowKey === "function" ? rowKey(record) : record[rowKey]
84124
+ );
84125
+ const uniqueKeys = [...new Set(allKeys)];
84126
+ console.log(
84127
+ `Genesis Table - Total keys: ${allKeys.length}, Unique keys: ${uniqueKeys.length}`
84128
+ );
84129
+ if (allKeys.length !== uniqueKeys.length) {
84130
+ console.error("Genesis Table - DUPLICATE KEYS FOUND:", allKeys);
84131
+ const duplicates = allKeys.filter(
84132
+ (key, index2) => allKeys.indexOf(key) !== index2
84133
+ );
84134
+ console.error("Genesis Table - Duplicate keys:", [
84135
+ ...new Set(duplicates)
84136
+ ]);
84137
+ }
84138
+ }
84139
+ }, [tableDataSource, rowKey]);
84105
84140
  const handleRowMouseDown = React__namespace.useCallback(
84106
84141
  (record, index2, event) => {
84107
84142
  const target = event.target;
@@ -84124,18 +84159,25 @@ function Table({
84124
84159
  );
84125
84160
  const handleRowClick = React__namespace.useCallback(
84126
84161
  (record, index2, event) => {
84127
- console.log("Row clicked:", record, "index:", index2);
84162
+ console.log("Genesis Table - Row clicked:", record, "index:", index2);
84163
+ console.log("Genesis Table - onRowClick function:", onRowClick);
84128
84164
  const target = event.target;
84129
84165
  const isInteractiveElement = target.closest(
84130
84166
  'button, a, input, select, textarea, [role="button"], [onclick], .ant-checkbox-wrapper, .ant-checkbox'
84131
84167
  );
84132
- console.log("Is interactive element:", isInteractiveElement);
84168
+ console.log("Genesis Table - Target element:", target);
84169
+ console.log("Genesis Table - Target tagName:", target.tagName);
84170
+ console.log("Genesis Table - Target className:", target.className);
84171
+ console.log("Genesis Table - Is interactive element:", isInteractiveElement);
84133
84172
  if (isInteractiveElement) {
84134
- console.log("Skipping row click due to interactive element");
84173
+ console.log("Genesis Table - Skipping row click due to interactive element");
84135
84174
  return;
84136
84175
  }
84137
84176
  if (onRowClick) {
84177
+ console.log("Genesis Table - Calling onRowClick function");
84138
84178
  onRowClick(record, index2, event);
84179
+ } else {
84180
+ console.log("Genesis Table - onRowClick not provided");
84139
84181
  }
84140
84182
  },
84141
84183
  [onRowClick]
package/dist/index.js CHANGED
@@ -84084,6 +84084,41 @@ function Table({
84084
84084
  return rest.scroll;
84085
84085
  }, [isMaterializedView, materializedViewConfig, dynamicHeight, rest.scroll]);
84086
84086
  const tableDataSource = isMaterializedView ? materializedData : dataSource;
84087
+ React.useEffect(() => {
84088
+ if (tableDataSource && tableDataSource.length > 0) {
84089
+ console.log(
84090
+ "Genesis Table - tableDataSource length:",
84091
+ tableDataSource.length
84092
+ );
84093
+ console.log("Genesis Table - rowKey type:", typeof rowKey);
84094
+ tableDataSource.slice(0, 3).map((record, index2) => {
84095
+ const key = typeof rowKey === "function" ? rowKey(record) : record[rowKey];
84096
+ console.log(
84097
+ `Genesis Table - Record ${index2} key:`,
84098
+ key,
84099
+ "Record:",
84100
+ record
84101
+ );
84102
+ return key;
84103
+ });
84104
+ const allKeys = tableDataSource.map(
84105
+ (record) => typeof rowKey === "function" ? rowKey(record) : record[rowKey]
84106
+ );
84107
+ const uniqueKeys = [...new Set(allKeys)];
84108
+ console.log(
84109
+ `Genesis Table - Total keys: ${allKeys.length}, Unique keys: ${uniqueKeys.length}`
84110
+ );
84111
+ if (allKeys.length !== uniqueKeys.length) {
84112
+ console.error("Genesis Table - DUPLICATE KEYS FOUND:", allKeys);
84113
+ const duplicates = allKeys.filter(
84114
+ (key, index2) => allKeys.indexOf(key) !== index2
84115
+ );
84116
+ console.error("Genesis Table - Duplicate keys:", [
84117
+ ...new Set(duplicates)
84118
+ ]);
84119
+ }
84120
+ }
84121
+ }, [tableDataSource, rowKey]);
84087
84122
  const handleRowMouseDown = React.useCallback(
84088
84123
  (record, index2, event) => {
84089
84124
  const target = event.target;
@@ -84106,18 +84141,25 @@ function Table({
84106
84141
  );
84107
84142
  const handleRowClick = React.useCallback(
84108
84143
  (record, index2, event) => {
84109
- console.log("Row clicked:", record, "index:", index2);
84144
+ console.log("Genesis Table - Row clicked:", record, "index:", index2);
84145
+ console.log("Genesis Table - onRowClick function:", onRowClick);
84110
84146
  const target = event.target;
84111
84147
  const isInteractiveElement = target.closest(
84112
84148
  'button, a, input, select, textarea, [role="button"], [onclick], .ant-checkbox-wrapper, .ant-checkbox'
84113
84149
  );
84114
- console.log("Is interactive element:", isInteractiveElement);
84150
+ console.log("Genesis Table - Target element:", target);
84151
+ console.log("Genesis Table - Target tagName:", target.tagName);
84152
+ console.log("Genesis Table - Target className:", target.className);
84153
+ console.log("Genesis Table - Is interactive element:", isInteractiveElement);
84115
84154
  if (isInteractiveElement) {
84116
- console.log("Skipping row click due to interactive element");
84155
+ console.log("Genesis Table - Skipping row click due to interactive element");
84117
84156
  return;
84118
84157
  }
84119
84158
  if (onRowClick) {
84159
+ console.log("Genesis Table - Calling onRowClick function");
84120
84160
  onRowClick(record, index2, event);
84161
+ } else {
84162
+ console.log("Genesis Table - onRowClick not provided");
84121
84163
  }
84122
84164
  },
84123
84165
  [onRowClick]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",