Part-DB-server/assets/controllers/elements
d-buchmann 1686df968f
Implement extensive search (#1406)
* Implement advanced search

Up to 5 individual tokens (separated by spaces) can be given as search string.
Each token is individually searched for in all selected fields.

Examples (assuming the relevant fields are selected for search):
- a part named `foo` with a tag `bar` will be found with the search string "foo bar".
- a part named `bar baz` will be found with the search string "baz bar".
- a part with the ID 123 and in storage location `a_qux_b` will be found with the search string "qux 123".

* Add tests

These were created with the help of GPT-5.2.
Disclaimer: I don't have the experience to judge the quality or validity of the results.

* Restructure query buildup

* Update tests

* Move options from Settings to localStorage

* Consider mutual exclusivity of search options

If regex search is enabled, the other two options are disabled (only visually). This should give the user a fair idea of what's happening while keeping things as simple as possible.

* Added translations for the checkboxes

* Fix stimulus controller to allow handling multiple instances of the dropdown menu

* Added tooltips for the different search mode options

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2026-07-27 18:42:32 +02:00
..
datatables Use upstream version of dataTables.select as the fix was merged 2026-06-21 14:41:56 +02:00
ai_model_autocomplete_controller.js Added a "unsaved changed" warning dialog for part, entity edits and system settings 2026-05-25 21:29:10 +02:00
attachment_autocomplete_controller.js Added a "unsaved changed" warning dialog for part, entity edits and system settings 2026-05-25 21:29:10 +02:00
attachmenttype_change_controller.js Added copyright/license info to files 2022-11-29 21:21:26 +01:00
ckeditor_controller.js Added a "unsaved changed" warning dialog for part, entity edits and system settings 2026-05-25 21:29:10 +02:00
collection_type_controller.js Moved alerts and dialogs from unsupported bootbox to Sweetalert2 library 2026-06-21 14:21:01 +02:00
delete_btn_controller.js Moved alerts and dialogs from unsupported bootbox to Sweetalert2 library 2026-06-21 14:21:01 +02:00
hoverpic_controller.js Added copyright/license info to files 2022-11-29 21:21:26 +01:00
ipn_suggestion_controller.js Added feature for part IPN suggest with category prefixes (#1054) 2025-11-03 00:31:47 +01:00
json_formatter_controller.js Visualize generic object/JSON data of element history data as pretty tree structure on log detail page 2023-05-15 23:55:36 +02:00
link_confirm_controller.js Moved alerts and dialogs from unsupported bootbox to Sweetalert2 library 2026-06-21 14:21:01 +02:00
localStorage_checkbox_controller.js Save search setting checkboxes state to localStorage to persist it 2023-11-19 21:49:16 +01:00
nonprintable_char_input_controller.js Allow to scan labels anywhere on the page 2026-03-01 16:48:29 +01:00
part_search_controller.js Fixed JS translation fox new UX/translator version 2026-01-10 21:44:57 +01:00
part_select_controller.js Added a "unsaved changed" warning dialog for part, entity edits and system settings 2026-05-25 21:29:10 +02:00
password_strength_estimate_controller.js Added it and pl translations for password estimator, use lvenshtein distance and block partdb word 2026-06-21 12:49:00 +02:00
preset_input_controller.js Added copyright/license info to files 2022-11-29 21:21:26 +01:00
search_config_controller.js Implement extensive search (#1406) 2026-07-27 18:42:32 +02:00
select_controller.js Added a "unsaved changed" warning dialog for part, entity edits and system settings 2026-05-25 21:29:10 +02:00
select_multiple_controller.js Clear input after option selection in tomselect fields 2026-03-07 21:22:29 +01:00
sidebar_tree_controller.js Select the respective node in the sidebar treeviews, when navigating Part-DB 2026-03-06 23:23:38 +01:00
static_file_autocomplete_controller.js Added a "unsaved changed" warning dialog for part, entity edits and system settings 2026-05-25 21:29:10 +02:00
structural_entity_select_controller.js Added a "unsaved changed" warning dialog for part, entity edits and system settings 2026-05-25 21:29:10 +02:00
tagsinput_controller.js Added a "unsaved changed" warning dialog for part, entity edits and system settings 2026-05-25 21:29:10 +02:00
tree_controller.js Added a "unsaved changed" warning dialog for part, entity edits and system settings 2026-05-25 21:29:10 +02:00