Base string filter#899
Merged
gaspergrom merged 7 commits intofeature/filtersfrom May 25, 2023
Merged
Conversation
gaspergrom
approved these changes
May 25, 2023
202e2e6 to
103bd2e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed ✍️
What
🤖 Generated by Copilot at bce1d82
This pull request improves the filter components by adding custom input, select, and switch components, refactoring the code to use a
FilterOperatorenum, and adding configuration options and validation rules for the string filter. It also removes unused imports and code, and fixes type annotations and interfaces for better readability and type safety. The files affected are mainly in thefrontend/src/shared/modules/filtersdirectory.
🤖 Generated by Copilot at bce1d82
Why
How
🤖 Generated by Copilot at bce1d82
definePropsanddefineEmitsfrom several filter type components (link, link, link, link, link, link, link)defineEmitstype annotation fromanytovoidin several filter type components to specify the return type of the emitted events (link, link, link, link, link, link, link, link)popper-classattribute to theel-popovercomponent inFilterItem.vueto remove the default padding of the popover (link)px-1class withp-3class in thedivelement that wraps the filter component inFilterItem.vueto increase the padding of the filter component (link)BooleanFilter.vuefile tofilter-type-boolean.vueto follow the naming convention of the filter type components (link)StringFilter.vuefile with a new implementation of the string filter component infilter-type-boolean.vuethat uses a custom input component, a custom inline select component, and a filter include switch component to allow the user to choose the operator, value, and inclusion of the string filter (link, link, link)FilterInput.vuefile to implement a custom input component for the filter components that uses theel-inputcomponent from Element UI and emits theupdate:modelValueevent to support thev-modeldirective (link)FilterInlineSelect.vuefile to implement a custom inline select component for the filter components that uses theel-dropdownandel-dropdown-itemcomponents from Element UI and emits theupdate:modelValueevent to support thev-modeldirective (link)label.operator.filter.renderer.tsfile to export a constant object that maps theFilterOperatorenum values to their corresponding labels for the filter components and the filter item labels (link)string.operator.filter.renderer.tsfile to export a function that generates an array of options for the inline select component of the string filter component using thelabelOperatorRenderermodule (link)string.filter.renderer.tsfile to handle the different operators and the inclusion of the string filter value for the API query using theFilterOperatorenum and thenotproperty (link)string.label.renderer.tsfile to use thelabelOperatorRenderermodule to generate the label for the operator of the string filter value and to handle the inclusion of the filter value by adding the(exclude)text if the value is excluded (link)string.parser.tsfile to use theFilterOperatorenum instead of a string for the operator property of theQueryUrlStringValueinterface (link)FilterConfig.tsfile to export aFilterOperatorenum that defines the possible operators for the filter values (link)StringFilterConfig.tsfile to use theFilterOperatorenum instead of a string for the operator property of theStringFilterValueinterface and to include ahideIncludeSwitchproperty in theStringFilterOptionsinterface to allow the configuration of the filter to hide the include switch component (link)Checklist ✅
Feature,Improvement, orBug.