gitea/web_src/js/features
wxiaoguang 768e16dad1
Use weighted algorithm for string matching when finding files in repo ()
This PR is for:
* https://github.com/go-gitea/gitea/issues/20231

Now, when a user searches `word`, they always see `/{word}.txt` before
`/{w}e-g{o}t-{r}esult.{d}at`

Demo:

When searching "a", "a.ext" comes first. 

Then when searching "at", the longer matched "template" comes first.

<details>


![image](https://user-images.githubusercontent.com/2114189/194588738-3644d891-956f-40e4-b79b-b97d34265456.png)


![image](https://user-images.githubusercontent.com/2114189/194588797-9b124670-4e1e-4510-a170-780295ed89b8.png)

</details>

This PR also makes the frontend tests could import feature JS files by
introducing `jestSetup.js`

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: silverwind <me@silverwind.io>
..
comp Add down key check has tribute container ()
admin-common.js Add LDAP group sync to Teams, fixes ()
admin-emails.js Use explicit jQuery import, remove unused eslint globals ()
admin-users.js Use explicit jQuery import, remove unused eslint globals ()
aria.js Remove customized (unmaintained) dropdown, improve aria a11y for dropdown ()
aria.md Remove customized (unmaintained) dropdown, improve aria a11y for dropdown ()
clipboard.js Replace fomantic popup module with tippy.js ()
codeeditor.js Add new JS linter rules ()
colorpicker.js Move jquery-minicolors to npm/webpack ()
common-global.js Remove useless JS operation for relative time tooltips ()
common-issue.js Add a checkbox to select all issues/PRs ()
common-organization.js Use explicit jQuery import, remove unused eslint globals ()
contextpopup.js Refactor from Vue2 to Vue3 ()
dropzone.js Update JS dependencies ()
emoji.js Frontend refactor, PascalCase to camelCase, remove unused code ()
eventsource.sharedworker.js Fix the JS error "EventSource is not defined" caused by some non-standard browsers ()
file-fold.js Allow to mark files in a PR as viewed ()
formatting.js Prettify number of issues ()
heatmap.js Refactor from Vue2 to Vue3 ()
imagediff.js Fix viewed images not loading in a PR ()
install.js Use explicit jQuery import, remove unused eslint globals ()
mcaptcha.js Add support mCaptcha as captcha provider ()
notification.js Enable contenthash in filename for dynamic assets ()
org-team.js Never use /api/v1 from Gitea UI Pages ()
pull-view-file.js Replace unstyled meter with progress ()
repo-branch.js Add apply-patch, basic revert and cherry-pick functionality ()
repo-code.js Replace fomantic popup module with tippy.js ()
repo-commit.js Improve commit status icons ()
repo-common.js Rework repo buttons ()
repo-diff-filetree.js Refactor from Vue2 to Vue3 ()
repo-diff.js Add filetree on left of diff view ()
repo-editor.js Use explicit jQuery import, remove unused eslint globals ()
repo-findfile.js Use weighted algorithm for string matching when finding files in repo ()
repo-findfile.test.js Use weighted algorithm for string matching when finding files in repo ()
repo-graph.js Use explicit jQuery import, remove unused eslint globals ()
repo-home.js A minimal change to replace data calls with attr as per guidelines ()
repo-issue-content.js Use explicit jQuery import, remove unused eslint globals ()
repo-issue-pr-form.js Refactor from Vue2 to Vue3 ()
repo-issue.js Replace fomantic popup module with tippy.js ()
repo-legacy.js Support Issue forms and PR forms ()
repo-migrate.js Use explicit jQuery import, remove unused eslint globals ()
repo-migration.js Use explicit jQuery import, remove unused eslint globals ()
repo-projects.js Fix various typos ()
repo-release.js Enable spellcheck for EasyMDE, use contenteditable mode ()
repo-settings.js Remove customized (unmaintained) dropdown, improve aria a11y for dropdown ()
repo-template.js Never use /api/v1 from Gitea UI Pages ()
repo-unicode-escape.js Use explicit jQuery import, remove unused eslint globals ()
repo-wiki.js Enable spellcheck for EasyMDE, use contenteditable mode ()
serviceworker.js Enable contenthash in filename for dynamic assets ()
sshkey-helper.js Use explicit jQuery import, remove unused eslint globals ()
stopwatch.js Enable contenthash in filename for dynamic assets ()
tablesort.js Added missing `data-` prefix. ()
tribute.js Correctly escape within tribute.js ()
user-auth-webauthn.js Prevent security failure due to bad APP_ID ()
user-auth.js Use explicit jQuery import, remove unused eslint globals ()
user-settings.js Use explicit jQuery import, remove unused eslint globals ()