@agilant/toga-blox 1.0.45 → 1.0.46

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.
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  // src/components/MagnifyingIcon.tsx
3
3
  import { forwardRef, useEffect, useState } from "react";
4
4
  import { getFontAwesomeIcon } from "../../utils/getFontAwesomeIcon";
5
- const MagnifyingIcon = forwardRef(({ columnIndex, editingHeader, setEditingHeader, setHeaderValue, column, setSearchColumn, setActiveColumnFromSearch, setActiveColumn, iconColor = "text-blue-500", iconActiveColor = "text-green-500", iconActiveBackgroundColor = "bg-red-500", isActive, additionalIconClasses, setSearchText, searchText, isSearchOpen, }, ref) => {
5
+ const MagnifyingIcon = forwardRef(({ columnIndex, editingHeader, setEditingHeader, setHeaderValue, column, setActiveColumn, iconColor = "text-blue-500", iconActiveColor = "text-green-500", iconActiveBackgroundColor = "bg-red-500", isActive, additionalIconClasses, setSearchText, searchText, isSearchOpen, }, ref) => {
6
6
  const [showActiveStyles, setShowActiveStyles] = useState(false);
7
7
  useEffect(() => {
8
8
  if (isActive !== undefined) {
@@ -49,8 +49,6 @@ const MagnifyingIcon = forwardRef(({ columnIndex, editingHeader, setEditingHeade
49
49
  }
50
50
  setEditingHeader(columnIndex);
51
51
  setHeaderValue(column.Header);
52
- setSearchColumn(column);
53
- setActiveColumnFromSearch(column.id);
54
52
  setActiveColumn(columnIndex);
55
53
  };
56
54
  return (_jsx("div", { ref: ref, "data-testid": "magnifying-icon-test-id", className: `flex items-center cursor-pointer size-[18px] rounded relative ml-1 ${iconColor} ${showActiveStyles
@@ -35,8 +35,6 @@ export const Default = {
35
35
  setHeaderValue: () => { },
36
36
  additionalIconClasses: "p-4",
37
37
  column: mockColumnInstance,
38
- setSearchColumn: () => { },
39
- setActiveColumnFromSearch: () => { },
40
38
  setActiveColumn: () => { },
41
39
  isActive: false,
42
40
  },
@@ -1,12 +1,10 @@
1
- import { Column, ColumnInstance } from "react-table";
1
+ import { ColumnInstance } from "react-table";
2
2
  export interface MagnifyingIconProps<T extends object> {
3
3
  columnIndex: number;
4
4
  editingHeader: number | null;
5
5
  setEditingHeader: (index: number | null) => void;
6
6
  setHeaderValue: (value: string) => void;
7
7
  column: ColumnInstance<T>;
8
- setSearchColumn?: (col: Column<T>) => void;
9
- setActiveColumnFromSearch?: (id: string) => void;
10
8
  setActiveColumn: (index: number) => void;
11
9
  iconColor?: string;
12
10
  iconBackgroundColor?: string;
@@ -1,2 +1 @@
1
- // src/components/MagnifyingIcon/types.ts
2
1
  export {};
@@ -66,7 +66,7 @@ const PrimaryTableHeader = ({ headerGroups, editingHeader, searchText, setSearch
66
66
  })()] }) }), PortalComponent] })) : (_jsx(TableHeaderContent, { column: updatedColumn })), _jsx("div", { className: "ml-1", children: _jsx(SortArrows, { slug: mappingField || "", parentIndex: parentIndex, isNested: isNested, column: {
67
67
  ...updatedColumn,
68
68
  accessor: updatedColumn.id,
69
- }, setSortColumn: setSortColumn, onSortChange: handleSortChange }) }), shouldRenderMagnifyingIcon && (_jsx(MagnifyingIcon, { ref: magnifyingIconRef, column: updatedColumn, setSearchColumn: handleMagnifyingSetSearchColumn, editingHeader: editingHeader, columnIndex: columnIndex, setEditingHeader: setEditingHeader, setHeaderValue: setHeaderValue, isActive: activeColumn === columnIndex, setActiveColumn: setActiveColumn, setActiveColumnFromSearch: setActiveColumnFromSearch, setSearchText: setSearchText, searchText: searchText, isSearchOpen: editingHeader !== null }))] })));
69
+ }, setSortColumn: setSortColumn, onSortChange: handleSortChange }) }), shouldRenderMagnifyingIcon && (_jsx(MagnifyingIcon, { ref: magnifyingIconRef, column: updatedColumn, editingHeader: editingHeader, columnIndex: columnIndex, setEditingHeader: setEditingHeader, setHeaderValue: setHeaderValue, isActive: activeColumn === columnIndex, setActiveColumn: setActiveColumn, setSearchText: setSearchText, searchText: searchText, isSearchOpen: editingHeader !== null }))] })));
70
70
  })))) }));
71
71
  };
72
72
  export default PrimaryTableHeader;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agilant/toga-blox",
3
3
  "private": false,
4
- "version": "1.0.45",
4
+ "version": "1.0.46",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",