autoql-fe-utils 1.10.2 → 1.10.3

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.
@@ -16656,8 +16656,10 @@
16656
16656
  var supportsNetworkGraph = (data, columns) => {
16657
16657
  if (!data || data.length < 2) return false;
16658
16658
  if (!columns || columns.length < 2) return false;
16659
- const { sourceColumnIndex, targetColumnIndex } = findNetworkColumns(columns);
16660
- if (sourceColumnIndex === -1 || targetColumnIndex === -1) return false;
16659
+ const networkColumns = findNetworkColumns(columns);
16660
+ if (!networkColumns || networkColumns.sourceColumnIndex === -1 || networkColumns.targetColumnIndex === -1)
16661
+ return false;
16662
+ const { sourceColumnIndex, targetColumnIndex } = networkColumns;
16661
16663
  const sourceValues = data.map((row) => row[sourceColumnIndex]).filter(Boolean);
16662
16664
  const targetValues = data.map((row) => row[targetColumnIndex]).filter(Boolean);
16663
16665
  const uniqueSources = new Set(sourceValues);
@@ -16707,13 +16709,6 @@
16707
16709
  }
16708
16710
  }
16709
16711
  });
16710
- if (sourceColumnIndex === -1 || targetColumnIndex === -1) {
16711
- const stringColumns = columns.map((col, index) => ({ col, index })).filter(({ col }) => col.type === "STRING" && col.is_visible);
16712
- if (stringColumns.length >= 2) {
16713
- sourceColumnIndex = stringColumns[0].index;
16714
- targetColumnIndex = stringColumns[1].index;
16715
- }
16716
- }
16717
16712
  if (weightColumnIndex === -1) {
16718
16713
  const numericColumns = columns.map((col, index) => ({ col, index })).filter(({ col }) => isColumnNumberType(col) && col.is_visible);
16719
16714
  if (numericColumns.length > 0) {