Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add filter by value to document details fields (#7081)
* Refactor filter button actions in DocViewer * Add Doc Viewer styles and import to Doc Viewer component * Refactor cell filter actions to use 'field' instead of 'columnId' * Refactor filtering logic in DocViewer component * Add onFilterHandler to DocViewer component * Add onFilter handler to various components * Refactor RequirementFlyout component for readability * Add filter functionality to inventory vulnerabilities dashboard * Remove unused code related to doc viewer in WazuhDataGrid * Add setFilters function to FileDetails and RequirementFlyout * Refactor doc-viewer styles for button display * Add filter state management to data grid and drilldown panels * Fix Prettier issue * Add filter by value to document details fields * Update defaultColumns to defaultTableColumns in WazuhDataGrid * Add filter functionality for document viewer * Swap the order of arguments in filter action test * Rename button icons to EuiButtonIcon component * Update component import paths and class names * Update doc-viewer styles for wzDocViewer classes * Refactor adding filters to handle array values efficiently * Add onClose callback to onFilter function in DocViewer * Refactor DocumentViewTableAndJson component props * Refactor technique row details component props type * Add setFilters function to TechniqueRowDetails component * Refactor closeFlyoutHandler in DashboardTH component * Add closeFlyoutHandler function for flyout onClose event * Fix Prettier issue * fix: add guard clause for undefined value in filter cell actions * feat: add FilterStateStore enum and update state management in PatternDataSourceFilterManager to use it * fix: update onFilter function to accept more specific FILTER_OPERATOR types and value types in DocViewer component * feat: add isNullish utility function and update exports in util index for better nullish checks * fix: refactor onFilterCellActions to use isNullish for improved handling of FILTER_OPERATOR and value inputs in data grid service * fix: refactor onFilterCellActions import path for improved structure and maintainability in data-grid and doc-viewer components * fix: update onFilterCellActions to accept number type in values for enhanced filtering capabilities in data grid component * test: add unit tests for onFilterCellActions to verify filtering with number values in data grid component * test: simplify onFilterCellActions tests by removing unused filters array for clearer unit tests in data grid component * test: enhance onFilterCellActions tests by clarifying filter addition with improved descriptions for number and string values in data grid * test: refactor buildFilter usage in onFilterCellActions tests for improved clarity on filter creation in data grid component * test: improve onFilterCellActions tests with clearer descriptions for filters and added date filter cases in data grid component * test: add tests for single filter actions with string values and 'is'/'is not' operators in onFilterCellActions for data grid * test: add tests for multiple filters with 'is' and 'is not' operators for rule.groups in onFilterCellActions for data grid * test: add test for onFilterCellActions with undefined value to ensure appropriate filter behavior in data grid component * test: update filter negate logic and add test for 'is not' operator with undefined value in onFilterCellActions for data grid * Fix Prettier issue * test: refactor filter creation logic in onFilterCellActions tests for improved clarity and consistency in data grid component * test: unify key usage in filter tests in onFilterCellActions for clearer and more maintainable assertions in data grid component * test: add filter logic tests for boolean values in onFilterCellActions for better coverage in data grid component * test: update filter tests in onFilterCellActions to clarify handling of boolean values in data grid component * test: improve clarity in filter cell action tests by specifying value types in data grid component assertions * test: refine value type definition in onFilterCellActions to enhance clarity for boolean and numeric filters in data grid component * Refactor drilldown components to simplify destructuring of props, removing unused variables for cleaner code * Remove unused `filters` and `setFilters` props from OfficePanel for cleaner code and improved readability * Fix typos in export button label across data grid components --------- Co-authored-by: Federico Rodriguez <[email protected]>
- Loading branch information