diff options
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/bootstrap.test.ts (renamed from web_src/js/bootstrap.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/bootstrap.ts (renamed from web_src/js/bootstrap.js) | 0 | ||||
-rw-r--r-- | web_src/js/components/ActionRunStatus.vue | 4 | ||||
-rw-r--r-- | web_src/js/components/ActivityHeatmap.vue | 2 | ||||
-rw-r--r-- | web_src/js/components/ContextPopup.vue | 6 | ||||
-rw-r--r-- | web_src/js/components/DashboardRepoList.vue | 6 | ||||
-rw-r--r-- | web_src/js/components/DiffCommitSelector.vue | 6 | ||||
-rw-r--r-- | web_src/js/components/DiffFileList.vue | 6 | ||||
-rw-r--r-- | web_src/js/components/DiffFileTree.vue | 10 | ||||
-rw-r--r-- | web_src/js/components/DiffFileTreeItem.vue | 6 | ||||
-rw-r--r-- | web_src/js/components/PullRequestMergeForm.vue | 6 | ||||
-rw-r--r-- | web_src/js/components/RepoActionView.vue | 12 | ||||
-rw-r--r-- | web_src/js/components/RepoActivityTopAuthors.vue | 2 | ||||
-rw-r--r-- | web_src/js/components/RepoBranchTagSelector.vue | 10 | ||||
-rw-r--r-- | web_src/js/components/RepoCodeFrequency.vue | 12 | ||||
-rw-r--r-- | web_src/js/components/RepoContributors.vue | 12 | ||||
-rw-r--r-- | web_src/js/components/RepoRecentCommits.vue | 12 | ||||
-rw-r--r-- | web_src/js/components/ScopedAccessTokenSelector.vue | 4 | ||||
-rw-r--r-- | web_src/js/features/admin/common.ts (renamed from web_src/js/features/admin/common.js) | 6 | ||||
-rw-r--r-- | web_src/js/features/admin/config.ts (renamed from web_src/js/features/admin/config.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/admin/emails.ts (renamed from web_src/js/features/admin/emails.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/admin/selfcheck.ts (renamed from web_src/js/features/admin/selfcheck.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/admin/users.ts (renamed from web_src/js/features/admin/users.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/autofocus-end.ts (renamed from web_src/js/features/autofocus-end.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/captcha.ts (renamed from web_src/js/features/captcha.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/citation.ts (renamed from web_src/js/features/citation.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/clipboard.ts (renamed from web_src/js/features/clipboard.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/code-frequency.ts (renamed from web_src/js/features/code-frequency.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/codeeditor.ts (renamed from web_src/js/features/codeeditor.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/colorpicker.ts (renamed from web_src/js/features/colorpicker.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/common-button.ts (renamed from web_src/js/features/common-button.js) | 6 | ||||
-rw-r--r-- | web_src/js/features/common-fetch-action.ts (renamed from web_src/js/features/common-fetch-action.js) | 8 | ||||
-rw-r--r-- | web_src/js/features/common-form.ts (renamed from web_src/js/features/common-form.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/common-issue-list.test.ts (renamed from web_src/js/features/common-issue-list.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/common-issue-list.ts (renamed from web_src/js/features/common-issue-list.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/common-organization.ts (renamed from web_src/js/features/common-organization.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/common-page.ts (renamed from web_src/js/features/common-page.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/comp/ComboMarkdownEditor.ts (renamed from web_src/js/features/comp/ComboMarkdownEditor.js) | 22 | ||||
-rw-r--r-- | web_src/js/features/comp/ConfirmModal.ts (renamed from web_src/js/features/comp/ConfirmModal.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/comp/EasyMDEToolbarActions.ts (renamed from web_src/js/features/comp/EasyMDEToolbarActions.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/comp/EditorMarkdown.ts (renamed from web_src/js/features/comp/EditorMarkdown.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/comp/EditorUpload.test.ts (renamed from web_src/js/features/comp/EditorUpload.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/comp/EditorUpload.ts (renamed from web_src/js/features/comp/EditorUpload.js) | 10 | ||||
-rw-r--r-- | web_src/js/features/comp/LabelEdit.ts (renamed from web_src/js/features/comp/LabelEdit.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/comp/QuickSubmit.ts (renamed from web_src/js/features/comp/QuickSubmit.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/comp/ReactionSelector.ts (renamed from web_src/js/features/comp/ReactionSelector.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/comp/SearchUserBox.ts (renamed from web_src/js/features/comp/SearchUserBox.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/comp/TextExpander.ts (renamed from web_src/js/features/comp/TextExpander.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/comp/WebHookEditor.ts (renamed from web_src/js/features/comp/WebHookEditor.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/contextpopup.ts (renamed from web_src/js/features/contextpopup.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/contributors.ts (renamed from web_src/js/features/contributors.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/copycontent.ts (renamed from web_src/js/features/copycontent.js) | 6 | ||||
-rw-r--r-- | web_src/js/features/dropzone.ts (renamed from web_src/js/features/dropzone.js) | 12 | ||||
-rw-r--r-- | web_src/js/features/emoji.ts (renamed from web_src/js/features/emoji.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/eventsource.sharedworker.ts (renamed from web_src/js/features/eventsource.sharedworker.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/file-fold.ts (renamed from web_src/js/features/file-fold.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/heatmap.ts (renamed from web_src/js/features/heatmap.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/imagediff.ts (renamed from web_src/js/features/imagediff.js) | 6 | ||||
-rw-r--r-- | web_src/js/features/install.ts (renamed from web_src/js/features/install.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/notification.ts (renamed from web_src/js/features/notification.js) | 6 | ||||
-rw-r--r-- | web_src/js/features/org-team.ts (renamed from web_src/js/features/org-team.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/pull-view-file.ts (renamed from web_src/js/features/pull-view-file.js) | 6 | ||||
-rw-r--r-- | web_src/js/features/recent-commits.ts (renamed from web_src/js/features/recent-commits.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/repo-branch.ts (renamed from web_src/js/features/repo-branch.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-code.test.ts (renamed from web_src/js/features/repo-code.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-code.ts (renamed from web_src/js/features/repo-code.js) | 8 | ||||
-rw-r--r-- | web_src/js/features/repo-commit.ts (renamed from web_src/js/features/repo-commit.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/repo-common.ts (renamed from web_src/js/features/repo-common.js) | 8 | ||||
-rw-r--r-- | web_src/js/features/repo-diff-commit.ts (renamed from web_src/js/features/repo-diff-commit.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/repo-diff-commitselect.ts (renamed from web_src/js/features/repo-diff-commitselect.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/repo-diff-filetree.ts (renamed from web_src/js/features/repo-diff-filetree.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/repo-diff.ts (renamed from web_src/js/features/repo-diff.js) | 20 | ||||
-rw-r--r-- | web_src/js/features/repo-editor.ts (renamed from web_src/js/features/repo-editor.js) | 12 | ||||
-rw-r--r-- | web_src/js/features/repo-findfile.test.ts (renamed from web_src/js/features/repo-findfile.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-findfile.ts (renamed from web_src/js/features/repo-findfile.js) | 8 | ||||
-rw-r--r-- | web_src/js/features/repo-graph.ts (renamed from web_src/js/features/repo-graph.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/repo-home.ts (renamed from web_src/js/features/repo-home.js) | 8 | ||||
-rw-r--r-- | web_src/js/features/repo-issue-content.ts (renamed from web_src/js/features/repo-issue-content.js) | 8 | ||||
-rw-r--r-- | web_src/js/features/repo-issue-edit.ts (renamed from web_src/js/features/repo-issue-edit.js) | 14 | ||||
-rw-r--r-- | web_src/js/features/repo-issue-list.ts (renamed from web_src/js/features/repo-issue-list.js) | 14 | ||||
-rw-r--r-- | web_src/js/features/repo-issue-pr-form.ts (renamed from web_src/js/features/repo-issue-pr-form.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/repo-issue-pr-status.ts (renamed from web_src/js/features/repo-issue-pr-status.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/repo-issue.ts (renamed from web_src/js/features/repo-issue.js) | 18 | ||||
-rw-r--r-- | web_src/js/features/repo-legacy.ts (renamed from web_src/js/features/repo-legacy.js) | 28 | ||||
-rw-r--r-- | web_src/js/features/repo-migrate.ts (renamed from web_src/js/features/repo-migrate.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/repo-migration.ts (renamed from web_src/js/features/repo-migration.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-projects.ts (renamed from web_src/js/features/repo-projects.js) | 6 | ||||
-rw-r--r-- | web_src/js/features/repo-release.ts (renamed from web_src/js/features/repo-release.js) | 4 | ||||
-rw-r--r-- | web_src/js/features/repo-search.ts (renamed from web_src/js/features/repo-search.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/repo-settings.ts (renamed from web_src/js/features/repo-settings.js) | 6 | ||||
-rw-r--r-- | web_src/js/features/repo-template.ts (renamed from web_src/js/features/repo-template.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-unicode-escape.ts (renamed from web_src/js/features/repo-unicode-escape.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-wiki.ts (renamed from web_src/js/features/repo-wiki.js) | 8 | ||||
-rw-r--r-- | web_src/js/features/sshkey-helper.ts (renamed from web_src/js/features/sshkey-helper.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/stopwatch.ts (renamed from web_src/js/features/stopwatch.js) | 8 | ||||
-rw-r--r-- | web_src/js/features/tablesort.ts (renamed from web_src/js/features/tablesort.js) | 0 | ||||
-rw-r--r-- | web_src/js/features/tribute.ts (renamed from web_src/js/features/tribute.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/user-auth-webauthn.ts (renamed from web_src/js/features/user-auth-webauthn.js) | 6 | ||||
-rw-r--r-- | web_src/js/features/user-auth.ts (renamed from web_src/js/features/user-auth.js) | 2 | ||||
-rw-r--r-- | web_src/js/features/user-settings.ts (renamed from web_src/js/features/user-settings.js) | 2 | ||||
-rw-r--r-- | web_src/js/globals.ts (renamed from web_src/js/globals.js) | 0 | ||||
-rw-r--r-- | web_src/js/htmx.ts (renamed from web_src/js/htmx.js) | 2 | ||||
-rw-r--r-- | web_src/js/index.ts (renamed from web_src/js/index.js) | 130 | ||||
-rw-r--r-- | web_src/js/markup/anchors.ts (renamed from web_src/js/markup/anchors.js) | 2 | ||||
-rw-r--r-- | web_src/js/markup/asciicast.ts (renamed from web_src/js/markup/asciicast.js) | 0 | ||||
-rw-r--r-- | web_src/js/markup/codecopy.ts (renamed from web_src/js/markup/codecopy.js) | 2 | ||||
-rw-r--r-- | web_src/js/markup/common.ts (renamed from web_src/js/markup/common.js) | 0 | ||||
-rw-r--r-- | web_src/js/markup/content.ts (renamed from web_src/js/markup/content.js) | 10 | ||||
-rw-r--r-- | web_src/js/markup/math.ts (renamed from web_src/js/markup/math.js) | 2 | ||||
-rw-r--r-- | web_src/js/markup/mermaid.ts (renamed from web_src/js/markup/mermaid.js) | 6 | ||||
-rw-r--r-- | web_src/js/markup/tasklist.ts (renamed from web_src/js/markup/tasklist.js) | 4 | ||||
-rw-r--r-- | web_src/js/modules/dirauto.ts (renamed from web_src/js/modules/dirauto.js) | 2 | ||||
-rw-r--r-- | web_src/js/modules/fetch.test.ts (renamed from web_src/js/modules/fetch.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/modules/fetch.ts (renamed from web_src/js/modules/fetch.js) | 2 | ||||
-rw-r--r-- | web_src/js/modules/fomantic.ts (renamed from web_src/js/modules/fomantic.js) | 16 | ||||
-rw-r--r-- | web_src/js/modules/fomantic/api.ts (renamed from web_src/js/modules/fomantic/api.js) | 0 | ||||
-rw-r--r-- | web_src/js/modules/fomantic/base.ts (renamed from web_src/js/modules/fomantic/base.js) | 0 | ||||
-rw-r--r-- | web_src/js/modules/fomantic/checkbox.ts (renamed from web_src/js/modules/fomantic/checkbox.js) | 2 | ||||
-rw-r--r-- | web_src/js/modules/fomantic/dimmer.ts (renamed from web_src/js/modules/fomantic/dimmer.js) | 2 | ||||
-rw-r--r-- | web_src/js/modules/fomantic/dropdown.ts (renamed from web_src/js/modules/fomantic/dropdown.js) | 2 | ||||
-rw-r--r-- | web_src/js/modules/fomantic/form.ts (renamed from web_src/js/modules/fomantic/form.js) | 2 | ||||
-rw-r--r-- | web_src/js/modules/fomantic/modal.ts (renamed from web_src/js/modules/fomantic/modal.js) | 0 | ||||
-rw-r--r-- | web_src/js/modules/fomantic/transition.ts (renamed from web_src/js/modules/fomantic/transition.js) | 0 | ||||
-rw-r--r-- | web_src/js/modules/sortable.ts (renamed from web_src/js/modules/sortable.js) | 0 | ||||
-rw-r--r-- | web_src/js/modules/stores.ts (renamed from web_src/js/modules/stores.js) | 0 | ||||
-rw-r--r-- | web_src/js/modules/tippy.ts (renamed from web_src/js/modules/tippy.js) | 4 | ||||
-rw-r--r-- | web_src/js/modules/toast.test.ts (renamed from web_src/js/modules/toast.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/modules/toast.ts (renamed from web_src/js/modules/toast.js) | 4 | ||||
-rw-r--r-- | web_src/js/modules/worker.ts (renamed from web_src/js/modules/worker.js) | 2 | ||||
-rw-r--r-- | web_src/js/render/ansi.test.ts (renamed from web_src/js/render/ansi.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/render/ansi.ts (renamed from web_src/js/render/ansi.js) | 0 | ||||
-rw-r--r-- | web_src/js/render/pdf.ts (renamed from web_src/js/render/pdf.js) | 0 | ||||
-rw-r--r-- | web_src/js/standalone/devtest.ts (renamed from web_src/js/standalone/devtest.js) | 2 | ||||
-rw-r--r-- | web_src/js/standalone/swagger.ts (renamed from web_src/js/standalone/swagger.js) | 0 | ||||
-rw-r--r-- | web_src/js/svg.test.ts (renamed from web_src/js/svg.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/svg.ts (renamed from web_src/js/svg.js) | 2 | ||||
-rw-r--r-- | web_src/js/utils.test.ts (renamed from web_src/js/utils.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/utils.ts (renamed from web_src/js/utils.js) | 0 | ||||
-rw-r--r-- | web_src/js/utils/color.test.ts (renamed from web_src/js/utils/color.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/utils/color.ts (renamed from web_src/js/utils/color.js) | 0 | ||||
-rw-r--r-- | web_src/js/utils/dom.test.ts (renamed from web_src/js/utils/dom.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/utils/dom.ts (renamed from web_src/js/utils/dom.js) | 0 | ||||
-rw-r--r-- | web_src/js/utils/image.test.ts (renamed from web_src/js/utils/image.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/utils/image.ts (renamed from web_src/js/utils/image.js) | 0 | ||||
-rw-r--r-- | web_src/js/utils/match.test.ts (renamed from web_src/js/utils/match.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/utils/match.ts (renamed from web_src/js/utils/match.js) | 0 | ||||
-rw-r--r-- | web_src/js/utils/time.test.ts (renamed from web_src/js/utils/time.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/utils/time.ts (renamed from web_src/js/utils/time.js) | 2 | ||||
-rw-r--r-- | web_src/js/utils/url.test.ts (renamed from web_src/js/utils/url.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/utils/url.ts (renamed from web_src/js/utils/url.js) | 0 | ||||
-rw-r--r-- | web_src/js/vendor/jquery.are-you-sure.ts (renamed from web_src/js/vendor/jquery.are-you-sure.js) | 0 | ||||
-rw-r--r-- | web_src/js/vitest.setup.ts (renamed from web_src/js/vitest.setup.js) | 0 | ||||
-rw-r--r-- | web_src/js/webcomponents/absolute-date.test.ts (renamed from web_src/js/webcomponents/absolute-date.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/webcomponents/absolute-date.ts (renamed from web_src/js/webcomponents/absolute-date.js) | 0 | ||||
-rw-r--r-- | web_src/js/webcomponents/index.js | 5 | ||||
-rw-r--r-- | web_src/js/webcomponents/index.ts | 5 | ||||
-rw-r--r-- | web_src/js/webcomponents/origin-url.test.ts (renamed from web_src/js/webcomponents/origin-url.test.js) | 2 | ||||
-rw-r--r-- | web_src/js/webcomponents/origin-url.ts (renamed from web_src/js/webcomponents/origin-url.js) | 0 | ||||
-rw-r--r-- | web_src/js/webcomponents/overflow-menu.ts (renamed from web_src/js/webcomponents/overflow-menu.js) | 4 | ||||
-rw-r--r-- | web_src/js/webcomponents/polyfills.ts (renamed from web_src/js/webcomponents/polyfills.js) | 0 |
160 files changed, 369 insertions, 369 deletions
diff --git a/web_src/js/bootstrap.test.js b/web_src/js/bootstrap.test.ts index a6b901b92c..2938678027 100644 --- a/web_src/js/bootstrap.test.js +++ b/web_src/js/bootstrap.test.ts @@ -1,4 +1,4 @@ -import {showGlobalErrorMessage} from './bootstrap.js'; +import {showGlobalErrorMessage} from './bootstrap.ts'; test('showGlobalErrorMessage', () => { document.body.innerHTML = '<div class="page-content"></div>'; diff --git a/web_src/js/bootstrap.js b/web_src/js/bootstrap.ts index 26627dfded..26627dfded 100644 --- a/web_src/js/bootstrap.js +++ b/web_src/js/bootstrap.ts diff --git a/web_src/js/components/ActionRunStatus.vue b/web_src/js/components/ActionRunStatus.vue index 7ada543fea..5181c2c475 100644 --- a/web_src/js/components/ActionRunStatus.vue +++ b/web_src/js/components/ActionRunStatus.vue @@ -2,8 +2,8 @@ Please also update the template file above if this vue is modified. action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown --> -<script> -import {SvgIcon} from '../svg.js'; +<script lang="ts"> +import {SvgIcon} from '../svg.ts'; export default { components: {SvgIcon}, diff --git a/web_src/js/components/ActivityHeatmap.vue b/web_src/js/components/ActivityHeatmap.vue index 71f41dda1a..2d84a718e4 100644 --- a/web_src/js/components/ActivityHeatmap.vue +++ b/web_src/js/components/ActivityHeatmap.vue @@ -1,4 +1,4 @@ -<script> +<script lang="ts"> // TODO: Switch to upstream after https://github.com/razorness/vue3-calendar-heatmap/pull/34 is merged import {CalendarHeatmap} from '@silverwind/vue3-calendar-heatmap'; diff --git a/web_src/js/components/ContextPopup.vue b/web_src/js/components/ContextPopup.vue index 8f389ea003..2963412893 100644 --- a/web_src/js/components/ContextPopup.vue +++ b/web_src/js/components/ContextPopup.vue @@ -1,6 +1,6 @@ -<script> -import {SvgIcon} from '../svg.js'; -import {GET} from '../modules/fetch.js'; +<script lang="ts"> +import {SvgIcon} from '../svg.ts'; +import {GET} from '../modules/fetch.ts'; const {appSubUrl, i18n} = window.config; diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue index 23984b3164..afc58d3689 100644 --- a/web_src/js/components/DashboardRepoList.vue +++ b/web_src/js/components/DashboardRepoList.vue @@ -1,8 +1,8 @@ -<script> +<script lang="ts"> import {createApp, nextTick} from 'vue'; import $ from 'jquery'; -import {SvgIcon} from '../svg.js'; -import {GET} from '../modules/fetch.js'; +import {SvgIcon} from '../svg.ts'; +import {GET} from '../modules/fetch.ts'; const {appSubUrl, assetUrlPrefix, pageData} = window.config; diff --git a/web_src/js/components/DiffCommitSelector.vue b/web_src/js/components/DiffCommitSelector.vue index 53e0bce76c..a523952773 100644 --- a/web_src/js/components/DiffCommitSelector.vue +++ b/web_src/js/components/DiffCommitSelector.vue @@ -1,6 +1,6 @@ -<script> -import {SvgIcon} from '../svg.js'; -import {GET} from '../modules/fetch.js'; +<script lang="ts"> +import {SvgIcon} from '../svg.ts'; +import {GET} from '../modules/fetch.ts'; export default { components: {SvgIcon}, diff --git a/web_src/js/components/DiffFileList.vue b/web_src/js/components/DiffFileList.vue index 806c8385bb..677afd72a3 100644 --- a/web_src/js/components/DiffFileList.vue +++ b/web_src/js/components/DiffFileList.vue @@ -1,6 +1,6 @@ -<script> -import {loadMoreFiles} from '../features/repo-diff.js'; -import {diffTreeStore} from '../modules/stores.js'; +<script lang="ts"> +import {loadMoreFiles} from '../features/repo-diff.ts'; +import {diffTreeStore} from '../modules/stores.ts'; export default { data: () => { diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue index fd5120f18b..2262e3e643 100644 --- a/web_src/js/components/DiffFileTree.vue +++ b/web_src/js/components/DiffFileTree.vue @@ -1,9 +1,9 @@ -<script> +<script lang="ts"> import DiffFileTreeItem from './DiffFileTreeItem.vue'; -import {loadMoreFiles} from '../features/repo-diff.js'; -import {toggleElem} from '../utils/dom.js'; -import {diffTreeStore} from '../modules/stores.js'; -import {setFileFolding} from '../features/file-fold.js'; +import {loadMoreFiles} from '../features/repo-diff.ts'; +import {toggleElem} from '../utils/dom.ts'; +import {diffTreeStore} from '../modules/stores.ts'; +import {setFileFolding} from '../features/file-fold.ts'; const LOCAL_STORAGE_KEY = 'diff_file_tree_visible'; diff --git a/web_src/js/components/DiffFileTreeItem.vue b/web_src/js/components/DiffFileTreeItem.vue index 0f6e54363f..d5293af519 100644 --- a/web_src/js/components/DiffFileTreeItem.vue +++ b/web_src/js/components/DiffFileTreeItem.vue @@ -1,6 +1,6 @@ -<script> -import {SvgIcon} from '../svg.js'; -import {diffTreeStore} from '../modules/stores.js'; +<script lang="ts"> +import {SvgIcon} from '../svg.ts'; +import {diffTreeStore} from '../modules/stores.ts'; export default { components: {SvgIcon}, diff --git a/web_src/js/components/PullRequestMergeForm.vue b/web_src/js/components/PullRequestMergeForm.vue index 9efa8840ac..fc9541b6a6 100644 --- a/web_src/js/components/PullRequestMergeForm.vue +++ b/web_src/js/components/PullRequestMergeForm.vue @@ -1,6 +1,6 @@ -<script> -import {SvgIcon} from '../svg.js'; -import {toggleElem} from '../utils/dom.js'; +<script lang="ts"> +import {SvgIcon} from '../svg.ts'; +import {toggleElem} from '../utils/dom.ts'; const {csrfToken, pageData} = window.config; diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index e751018f90..7b5d00aa0f 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -1,11 +1,11 @@ -<script> -import {SvgIcon} from '../svg.js'; +<script lang="ts"> +import {SvgIcon} from '../svg.ts'; import ActionRunStatus from './ActionRunStatus.vue'; import {createApp} from 'vue'; -import {toggleElem} from '../utils/dom.js'; -import {formatDatetime} from '../utils/time.js'; -import {renderAnsi} from '../render/ansi.js'; -import {GET, POST, DELETE} from '../modules/fetch.js'; +import {toggleElem} from '../utils/dom.ts'; +import {formatDatetime} from '../utils/time.ts'; +import {renderAnsi} from '../render/ansi.ts'; +import {GET, POST, DELETE} from '../modules/fetch.ts'; const sfc = { name: 'RepoActionView', diff --git a/web_src/js/components/RepoActivityTopAuthors.vue b/web_src/js/components/RepoActivityTopAuthors.vue index 295641f7e5..9d24310b16 100644 --- a/web_src/js/components/RepoActivityTopAuthors.vue +++ b/web_src/js/components/RepoActivityTopAuthors.vue @@ -1,4 +1,4 @@ -<script> +<script lang="ts"> import VueBarGraph from 'vue-bar-graph'; import {createApp} from 'vue'; diff --git a/web_src/js/components/RepoBranchTagSelector.vue b/web_src/js/components/RepoBranchTagSelector.vue index d18378bea1..00c2955f55 100644 --- a/web_src/js/components/RepoBranchTagSelector.vue +++ b/web_src/js/components/RepoBranchTagSelector.vue @@ -1,10 +1,10 @@ -<script> +<script lang="ts"> import {createApp, nextTick} from 'vue'; import $ from 'jquery'; -import {SvgIcon} from '../svg.js'; -import {pathEscapeSegments} from '../utils/url.js'; -import {showErrorToast} from '../modules/toast.js'; -import {GET} from '../modules/fetch.js'; +import {SvgIcon} from '../svg.ts'; +import {pathEscapeSegments} from '../utils/url.ts'; +import {showErrorToast} from '../modules/toast.ts'; +import {GET} from '../modules/fetch.ts'; const sfc = { components: {SvgIcon}, diff --git a/web_src/js/components/RepoCodeFrequency.vue b/web_src/js/components/RepoCodeFrequency.vue index 1d40d6d417..c30b32405d 100644 --- a/web_src/js/components/RepoCodeFrequency.vue +++ b/web_src/js/components/RepoCodeFrequency.vue @@ -1,5 +1,5 @@ -<script> -import {SvgIcon} from '../svg.js'; +<script lang="ts"> +import {SvgIcon} from '../svg.ts'; import { Chart, Legend, @@ -9,15 +9,15 @@ import { LineElement, Filler, } from 'chart.js'; -import {GET} from '../modules/fetch.js'; +import {GET} from '../modules/fetch.ts'; import {Line as ChartLine} from 'vue-chartjs'; import { startDaysBetween, firstStartDateAfterDate, fillEmptyStartDaysWithZeroes, -} from '../utils/time.js'; -import {chartJsColors} from '../utils/color.js'; -import {sleep} from '../utils.js'; +} from '../utils/time.ts'; +import {chartJsColors} from '../utils/color.ts'; +import {sleep} from '../utils.ts'; import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm'; const {pageData} = window.config; diff --git a/web_src/js/components/RepoContributors.vue b/web_src/js/components/RepoContributors.vue index dec2599c0d..d44d0cd22d 100644 --- a/web_src/js/components/RepoContributors.vue +++ b/web_src/js/components/RepoContributors.vue @@ -1,5 +1,5 @@ -<script> -import {SvgIcon} from '../svg.js'; +<script lang="ts"> +import {SvgIcon} from '../svg.ts'; import { Chart, Title, @@ -10,16 +10,16 @@ import { LineElement, Filler, } from 'chart.js'; -import {GET} from '../modules/fetch.js'; +import {GET} from '../modules/fetch.ts'; import zoomPlugin from 'chartjs-plugin-zoom'; import {Line as ChartLine} from 'vue-chartjs'; import { startDaysBetween, firstStartDateAfterDate, fillEmptyStartDaysWithZeroes, -} from '../utils/time.js'; -import {chartJsColors} from '../utils/color.js'; -import {sleep} from '../utils.js'; +} from '../utils/time.ts'; +import {chartJsColors} from '../utils/color.ts'; +import {sleep} from '../utils.ts'; import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm'; import $ from 'jquery'; diff --git a/web_src/js/components/RepoRecentCommits.vue b/web_src/js/components/RepoRecentCommits.vue index 8759978e78..c3515caba3 100644 --- a/web_src/js/components/RepoRecentCommits.vue +++ b/web_src/js/components/RepoRecentCommits.vue @@ -1,5 +1,5 @@ -<script> -import {SvgIcon} from '../svg.js'; +<script lang="ts"> +import {SvgIcon} from '../svg.ts'; import { Chart, Tooltip, @@ -7,15 +7,15 @@ import { LinearScale, TimeScale, } from 'chart.js'; -import {GET} from '../modules/fetch.js'; +import {GET} from '../modules/fetch.ts'; import {Bar} from 'vue-chartjs'; import { startDaysBetween, firstStartDateAfterDate, fillEmptyStartDaysWithZeroes, -} from '../utils/time.js'; -import {chartJsColors} from '../utils/color.js'; -import {sleep} from '../utils.js'; +} from '../utils/time.ts'; +import {chartJsColors} from '../utils/color.ts'; +import {sleep} from '../utils.ts'; import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm'; const {pageData} = window.config; diff --git a/web_src/js/components/ScopedAccessTokenSelector.vue b/web_src/js/components/ScopedAccessTokenSelector.vue index 9ff3627c11..b2fda05260 100644 --- a/web_src/js/components/ScopedAccessTokenSelector.vue +++ b/web_src/js/components/ScopedAccessTokenSelector.vue @@ -1,6 +1,6 @@ -<script> +<script lang="ts"> import {createApp} from 'vue'; -import {hideElem, showElem} from '../utils/dom.js'; +import {hideElem, showElem} from '../utils/dom.ts'; const sfc = { props: { diff --git a/web_src/js/features/admin/common.js b/web_src/js/features/admin/common.ts index 0f26ce6bc1..934a30a3ee 100644 --- a/web_src/js/features/admin/common.js +++ b/web_src/js/features/admin/common.ts @@ -1,7 +1,7 @@ import $ from 'jquery'; -import {checkAppUrl} from '../common-page.js'; -import {hideElem, showElem, toggleElem} from '../../utils/dom.js'; -import {POST} from '../../modules/fetch.js'; +import {checkAppUrl} from '../common-page.ts'; +import {hideElem, showElem, toggleElem} from '../../utils/dom.ts'; +import {POST} from '../../modules/fetch.ts'; const {appSubUrl} = window.config; diff --git a/web_src/js/features/admin/config.js b/web_src/js/features/admin/config.ts index c3823425ad..4ccbbacd5b 100644 --- a/web_src/js/features/admin/config.js +++ b/web_src/js/features/admin/config.ts @@ -1,5 +1,5 @@ -import {showTemporaryTooltip} from '../../modules/tippy.js'; -import {POST} from '../../modules/fetch.js'; +import {showTemporaryTooltip} from '../../modules/tippy.ts'; +import {POST} from '../../modules/fetch.ts'; const {appSubUrl} = window.config; diff --git a/web_src/js/features/admin/emails.js b/web_src/js/features/admin/emails.ts index 46fafa7eff..46fafa7eff 100644 --- a/web_src/js/features/admin/emails.js +++ b/web_src/js/features/admin/emails.ts diff --git a/web_src/js/features/admin/selfcheck.js b/web_src/js/features/admin/selfcheck.ts index 699395b363..498c52ffb5 100644 --- a/web_src/js/features/admin/selfcheck.js +++ b/web_src/js/features/admin/selfcheck.ts @@ -1,5 +1,5 @@ -import {toggleElem} from '../../utils/dom.js'; -import {POST} from '../../modules/fetch.js'; +import {toggleElem} from '../../utils/dom.ts'; +import {POST} from '../../modules/fetch.ts'; const {appSubUrl} = window.config; diff --git a/web_src/js/features/admin/users.js b/web_src/js/features/admin/users.ts index 7cac603b5c..7cac603b5c 100644 --- a/web_src/js/features/admin/users.js +++ b/web_src/js/features/admin/users.ts diff --git a/web_src/js/features/autofocus-end.js b/web_src/js/features/autofocus-end.ts index da71ce9536..da71ce9536 100644 --- a/web_src/js/features/autofocus-end.js +++ b/web_src/js/features/autofocus-end.ts diff --git a/web_src/js/features/captcha.js b/web_src/js/features/captcha.ts index c803a5006b..23dbae3740 100644 --- a/web_src/js/features/captcha.js +++ b/web_src/js/features/captcha.ts @@ -1,4 +1,4 @@ -import {isDarkTheme} from '../utils.js'; +import {isDarkTheme} from '../utils.ts'; export async function initCaptcha() { const captchaEl = document.querySelector('#captcha'); diff --git a/web_src/js/features/citation.js b/web_src/js/features/citation.ts index 245ba56f81..ffab75c389 100644 --- a/web_src/js/features/citation.js +++ b/web_src/js/features/citation.ts @@ -1,5 +1,5 @@ import $ from 'jquery'; -import {getCurrentLocale} from '../utils.js'; +import {getCurrentLocale} from '../utils.ts'; const {pageData} = window.config; diff --git a/web_src/js/features/clipboard.js b/web_src/js/features/clipboard.ts index daf7e2ae2d..8de150d0f9 100644 --- a/web_src/js/features/clipboard.js +++ b/web_src/js/features/clipboard.ts @@ -1,5 +1,5 @@ -import {showTemporaryTooltip} from '../modules/tippy.js'; -import {toAbsoluteUrl} from '../utils.js'; +import {showTemporaryTooltip} from '../modules/tippy.ts'; +import {toAbsoluteUrl} from '../utils.ts'; import {clippie} from 'clippie'; const {copy_success, copy_error} = window.config.i18n; diff --git a/web_src/js/features/code-frequency.js b/web_src/js/features/code-frequency.ts index da7cd6b2c0..da7cd6b2c0 100644 --- a/web_src/js/features/code-frequency.js +++ b/web_src/js/features/code-frequency.ts diff --git a/web_src/js/features/codeeditor.js b/web_src/js/features/codeeditor.ts index 2b1e64c10d..539db0e969 100644 --- a/web_src/js/features/codeeditor.js +++ b/web_src/js/features/codeeditor.ts @@ -1,6 +1,6 @@ import tinycolor from 'tinycolor2'; -import {basename, extname, isObject, isDarkTheme} from '../utils.js'; -import {onInputDebounce} from '../utils/dom.js'; +import {basename, extname, isObject, isDarkTheme} from '../utils.ts'; +import {onInputDebounce} from '../utils/dom.ts'; const languagesByFilename = {}; const languagesByExt = {}; diff --git a/web_src/js/features/colorpicker.js b/web_src/js/features/colorpicker.ts index a85c04de41..3b5f8c66eb 100644 --- a/web_src/js/features/colorpicker.js +++ b/web_src/js/features/colorpicker.ts @@ -1,4 +1,4 @@ -import {createTippy} from '../modules/tippy.js'; +import {createTippy} from '../modules/tippy.ts'; export async function initColorPickers() { const els = document.querySelectorAll('.js-color-picker-input'); diff --git a/web_src/js/features/common-button.js b/web_src/js/features/common-button.ts index 2db39871f0..7e335ce7b4 100644 --- a/web_src/js/features/common-button.js +++ b/web_src/js/features/common-button.ts @@ -1,7 +1,7 @@ import $ from 'jquery'; -import {POST} from '../modules/fetch.js'; -import {hideElem, showElem, toggleElem} from '../utils/dom.js'; -import {showErrorToast} from '../modules/toast.js'; +import {POST} from '../modules/fetch.ts'; +import {hideElem, showElem, toggleElem} from '../utils/dom.ts'; +import {showErrorToast} from '../modules/toast.ts'; export function initGlobalButtonClickOnEnter() { $(document).on('keypress', 'div.ui.button,span.ui.button', (e) => { diff --git a/web_src/js/features/common-fetch-action.js b/web_src/js/features/common-fetch-action.ts index ddf1ec2e79..76973d8ce7 100644 --- a/web_src/js/features/common-fetch-action.js +++ b/web_src/js/features/common-fetch-action.ts @@ -1,8 +1,8 @@ -import {request} from '../modules/fetch.js'; -import {showErrorToast} from '../modules/toast.js'; -import {submitEventSubmitter} from '../utils/dom.js'; +import {request} from '../modules/fetch.ts'; +import {showErrorToast} from '../modules/toast.ts'; +import {submitEventSubmitter} from '../utils/dom.ts'; import {htmlEscape} from 'escape-goat'; -import {confirmModal} from './comp/ConfirmModal.js'; +import {confirmModal} from './comp/ConfirmModal.ts'; const {appSubUrl, i18n} = window.config; diff --git a/web_src/js/features/common-form.js b/web_src/js/features/common-form.ts index 96ba06ff80..719a5170b4 100644 --- a/web_src/js/features/common-form.js +++ b/web_src/js/features/common-form.ts @@ -1,6 +1,6 @@ import $ from 'jquery'; -import {initAreYouSure} from '../vendor/jquery.are-you-sure.js'; -import {handleGlobalEnterQuickSubmit} from './comp/QuickSubmit.js'; +import {initAreYouSure} from '../vendor/jquery.are-you-sure.ts'; +import {handleGlobalEnterQuickSubmit} from './comp/QuickSubmit.ts'; export function initGlobalFormDirtyLeaveConfirm() { initAreYouSure(window.jQuery); diff --git a/web_src/js/features/common-issue-list.test.js b/web_src/js/features/common-issue-list.test.ts index da7ea64b7c..a4c49a297e 100644 --- a/web_src/js/features/common-issue-list.test.js +++ b/web_src/js/features/common-issue-list.test.ts @@ -1,4 +1,4 @@ -import {parseIssueListQuickGotoLink} from './common-issue-list.js'; +import {parseIssueListQuickGotoLink} from './common-issue-list.ts'; test('parseIssueListQuickGotoLink', () => { expect(parseIssueListQuickGotoLink('/link', '')).toEqual(''); diff --git a/web_src/js/features/common-issue-list.js b/web_src/js/features/common-issue-list.ts index 707776487b..e8a47eabad 100644 --- a/web_src/js/features/common-issue-list.js +++ b/web_src/js/features/common-issue-list.ts @@ -1,5 +1,5 @@ -import {isElemHidden, onInputDebounce, submitEventSubmitter, toggleElem} from '../utils/dom.js'; -import {GET} from '../modules/fetch.js'; +import {isElemHidden, onInputDebounce, submitEventSubmitter, toggleElem} from '../utils/dom.ts'; +import {GET} from '../modules/fetch.ts'; const {appSubUrl} = window.config; const reIssueIndex = /^(\d+)$/; // eg: "123" diff --git a/web_src/js/features/common-organization.js b/web_src/js/features/common-organization.ts index 442714a3d6..085be5fe71 100644 --- a/web_src/js/features/common-organization.js +++ b/web_src/js/features/common-organization.ts @@ -1,5 +1,5 @@ -import {initCompLabelEdit} from './comp/LabelEdit.js'; -import {toggleElem} from '../utils/dom.js'; +import {initCompLabelEdit} from './comp/LabelEdit.ts'; +import {toggleElem} from '../utils/dom.ts'; export function initCommonOrganization() { if (!document.querySelectorAll('.organization').length) { diff --git a/web_src/js/features/common-page.js b/web_src/js/features/common-page.ts index 7e89807df4..1a4decd752 100644 --- a/web_src/js/features/common-page.js +++ b/web_src/js/features/common-page.ts @@ -1,6 +1,6 @@ import $ from 'jquery'; -import {GET} from '../modules/fetch.js'; -import {showGlobalErrorMessage} from '../bootstrap.js'; +import {GET} from '../modules/fetch.ts'; +import {showGlobalErrorMessage} from '../bootstrap.ts'; const {appUrl} = window.config; diff --git a/web_src/js/features/comp/ComboMarkdownEditor.js b/web_src/js/features/comp/ComboMarkdownEditor.ts index f511adab1a..69fe34269b 100644 --- a/web_src/js/features/comp/ComboMarkdownEditor.js +++ b/web_src/js/features/comp/ComboMarkdownEditor.ts @@ -1,17 +1,17 @@ import '@github/markdown-toolbar-element'; import '@github/text-expander-element'; import $ from 'jquery'; -import {attachTribute} from '../tribute.js'; -import {hideElem, showElem, autosize, isElemVisible} from '../../utils/dom.js'; -import {initEasyMDEPaste, initTextareaUpload} from './EditorUpload.js'; -import {handleGlobalEnterQuickSubmit} from './QuickSubmit.js'; -import {renderPreviewPanelContent} from '../repo-editor.js'; -import {easyMDEToolbarActions} from './EasyMDEToolbarActions.js'; -import {initTextExpander} from './TextExpander.js'; -import {showErrorToast} from '../../modules/toast.js'; -import {POST} from '../../modules/fetch.js'; -import {initTextareaMarkdown} from './EditorMarkdown.js'; -import {DropzoneCustomEventReloadFiles, initDropzone} from '../dropzone.js'; +import {attachTribute} from '../tribute.ts'; +import {hideElem, showElem, autosize, isElemVisible} from '../../utils/dom.ts'; +import {initEasyMDEPaste, initTextareaUpload} from './EditorUpload.ts'; +import {handleGlobalEnterQuickSubmit} from './QuickSubmit.ts'; +import {renderPreviewPanelContent} from '../repo-editor.ts'; +import {easyMDEToolbarActions} from './EasyMDEToolbarActions.ts'; +import {initTextExpander} from './TextExpander.ts'; +import {showErrorToast} from '../../modules/toast.ts'; +import {POST} from '../../modules/fetch.ts'; +import {initTextareaMarkdown} from './EditorMarkdown.ts'; +import {DropzoneCustomEventReloadFiles, initDropzone} from '../dropzone.ts'; let elementIdCounter = 0; diff --git a/web_src/js/features/comp/ConfirmModal.js b/web_src/js/features/comp/ConfirmModal.ts index f9ad5c39cc..9541226a7d 100644 --- a/web_src/js/features/comp/ConfirmModal.js +++ b/web_src/js/features/comp/ConfirmModal.ts @@ -1,7 +1,7 @@ import $ from 'jquery'; -import {svg} from '../../svg.js'; +import {svg} from '../../svg.ts'; import {htmlEscape} from 'escape-goat'; -import {createElementFromHTML} from '../../utils/dom.js'; +import {createElementFromHTML} from '../../utils/dom.ts'; const {i18n} = window.config; diff --git a/web_src/js/features/comp/EasyMDEToolbarActions.js b/web_src/js/features/comp/EasyMDEToolbarActions.ts index c97d683704..d91dd23d11 100644 --- a/web_src/js/features/comp/EasyMDEToolbarActions.js +++ b/web_src/js/features/comp/EasyMDEToolbarActions.ts @@ -1,4 +1,4 @@ -import {svg} from '../../svg.js'; +import {svg} from '../../svg.ts'; export function easyMDEToolbarActions(EasyMDE, editor) { const actions = { diff --git a/web_src/js/features/comp/EditorMarkdown.js b/web_src/js/features/comp/EditorMarkdown.ts index 9ec71aba74..9ec71aba74 100644 --- a/web_src/js/features/comp/EditorMarkdown.js +++ b/web_src/js/features/comp/EditorMarkdown.ts diff --git a/web_src/js/features/comp/EditorUpload.test.js b/web_src/js/features/comp/EditorUpload.test.ts index caecfb91ea..55f3f74389 100644 --- a/web_src/js/features/comp/EditorUpload.test.js +++ b/web_src/js/features/comp/EditorUpload.test.ts @@ -1,4 +1,4 @@ -import {removeAttachmentLinksFromMarkdown} from './EditorUpload.js'; +import {removeAttachmentLinksFromMarkdown} from './EditorUpload.ts'; test('removeAttachmentLinksFromMarkdown', () => { expect(removeAttachmentLinksFromMarkdown('a foo b', 'foo')).toBe('a foo b'); diff --git a/web_src/js/features/comp/EditorUpload.js b/web_src/js/features/comp/EditorUpload.ts index 8861abfe03..e572692cbf 100644 --- a/web_src/js/features/comp/EditorUpload.js +++ b/web_src/js/features/comp/EditorUpload.ts @@ -1,12 +1,12 @@ -import {imageInfo} from '../../utils/image.js'; -import {replaceTextareaSelection} from '../../utils/dom.js'; -import {isUrl} from '../../utils/url.js'; -import {triggerEditorContentChanged} from './EditorMarkdown.js'; +import {imageInfo} from '../../utils/image.ts'; +import {replaceTextareaSelection} from '../../utils/dom.ts'; +import {isUrl} from '../../utils/url.ts'; +import {triggerEditorContentChanged} from './EditorMarkdown.ts'; import { DropzoneCustomEventRemovedFile, DropzoneCustomEventUploadDone, generateMarkdownLinkForAttachment, -} from '../dropzone.js'; +} from '../dropzone.ts'; let uploadIdCounter = 0; diff --git a/web_src/js/features/comp/LabelEdit.js b/web_src/js/features/comp/LabelEdit.ts index 2cc75cc6b0..2cc75cc6b0 100644 --- a/web_src/js/features/comp/LabelEdit.js +++ b/web_src/js/features/comp/LabelEdit.ts diff --git a/web_src/js/features/comp/QuickSubmit.js b/web_src/js/features/comp/QuickSubmit.ts index 3ff29f4fac..3ff29f4fac 100644 --- a/web_src/js/features/comp/QuickSubmit.js +++ b/web_src/js/features/comp/QuickSubmit.ts diff --git a/web_src/js/features/comp/ReactionSelector.js b/web_src/js/features/comp/ReactionSelector.ts index e507b89632..e1dd84bb14 100644 --- a/web_src/js/features/comp/ReactionSelector.js +++ b/web_src/js/features/comp/ReactionSelector.ts @@ -1,5 +1,5 @@ import $ from 'jquery'; -import {POST} from '../../modules/fetch.js'; +import {POST} from '../../modules/fetch.ts'; export function initCompReactionSelector() { for (const container of document.querySelectorAll('.issue-content, .diff-file-body')) { diff --git a/web_src/js/features/comp/SearchUserBox.js b/web_src/js/features/comp/SearchUserBox.ts index 7ef23fe4b0..7ef23fe4b0 100644 --- a/web_src/js/features/comp/SearchUserBox.js +++ b/web_src/js/features/comp/SearchUserBox.ts diff --git a/web_src/js/features/comp/TextExpander.js b/web_src/js/features/comp/TextExpander.ts index 128a2ddff0..5afe025d38 100644 --- a/web_src/js/features/comp/TextExpander.js +++ b/web_src/js/features/comp/TextExpander.ts @@ -1,5 +1,5 @@ -import {matchEmoji, matchMention} from '../../utils/match.js'; -import {emojiString} from '../emoji.js'; +import {matchEmoji, matchMention} from '../../utils/match.ts'; +import {emojiString} from '../emoji.ts'; export function initTextExpander(expander) { expander?.addEventListener('text-expander-change', ({detail: {key, provide, text}}) => { diff --git a/web_src/js/features/comp/WebHookEditor.js b/web_src/js/features/comp/WebHookEditor.ts index 38ff75e5a3..b13a2ffca3 100644 --- a/web_src/js/features/comp/WebHookEditor.js +++ b/web_src/js/features/comp/WebHookEditor.ts @@ -1,5 +1,5 @@ -import {POST} from '../../modules/fetch.js'; -import {hideElem, showElem, toggleElem} from '../../utils/dom.js'; +import {POST} from '../../modules/fetch.ts'; +import {hideElem, showElem, toggleElem} from '../../utils/dom.ts'; export function initCompWebHookEditor() { if (!document.querySelectorAll('.new.webhook').length) { diff --git a/web_src/js/features/contextpopup.js b/web_src/js/features/contextpopup.ts index 6a9325ed1c..5af7d176b6 100644 --- a/web_src/js/features/contextpopup.js +++ b/web_src/js/features/contextpopup.ts @@ -1,7 +1,7 @@ import {createApp} from 'vue'; import ContextPopup from '../components/ContextPopup.vue'; -import {parseIssueHref} from '../utils.js'; -import {createTippy} from '../modules/tippy.js'; +import {parseIssueHref} from '../utils.ts'; +import {createTippy} from '../modules/tippy.ts'; export function initContextPopups() { const refIssues = document.querySelectorAll('.ref-issue'); diff --git a/web_src/js/features/contributors.js b/web_src/js/features/contributors.ts index 475c66e900..475c66e900 100644 --- a/web_src/js/features/contributors.js +++ b/web_src/js/features/contributors.ts diff --git a/web_src/js/features/copycontent.js b/web_src/js/features/copycontent.ts index ea1e5cf7d0..af867463b2 100644 --- a/web_src/js/features/copycontent.js +++ b/web_src/js/features/copycontent.ts @@ -1,7 +1,7 @@ import {clippie} from 'clippie'; -import {showTemporaryTooltip} from '../modules/tippy.js'; -import {convertImage} from '../utils.js'; -import {GET} from '../modules/fetch.js'; +import {showTemporaryTooltip} from '../modules/tippy.ts'; +import {convertImage} from '../utils.ts'; +import {GET} from '../modules/fetch.ts'; const {i18n} = window.config; diff --git a/web_src/js/features/dropzone.js b/web_src/js/features/dropzone.ts index f25a613718..392bc1db66 100644 --- a/web_src/js/features/dropzone.js +++ b/web_src/js/features/dropzone.ts @@ -1,11 +1,11 @@ -import {svg} from '../svg.js'; +import {svg} from '../svg.ts'; import {htmlEscape} from 'escape-goat'; import {clippie} from 'clippie'; -import {showTemporaryTooltip} from '../modules/tippy.js'; -import {GET, POST} from '../modules/fetch.js'; -import {showErrorToast} from '../modules/toast.js'; -import {createElementFromHTML, createElementFromAttrs} from '../utils/dom.js'; -import {isImageFile, isVideoFile} from '../utils.js'; +import {showTemporaryTooltip} from '../modules/tippy.ts'; +import {GET, POST} from '../modules/fetch.ts'; +import {showErrorToast} from '../modules/toast.ts'; +import {createElementFromHTML, createElementFromAttrs} from '../utils/dom.ts'; +import {isImageFile, isVideoFile} from '../utils.ts'; const {csrfToken, i18n} = window.config; diff --git a/web_src/js/features/emoji.js b/web_src/js/features/emoji.ts index 032a3efe8a..032a3efe8a 100644 --- a/web_src/js/features/emoji.js +++ b/web_src/js/features/emoji.ts diff --git a/web_src/js/features/eventsource.sharedworker.js b/web_src/js/features/eventsource.sharedworker.ts index 62581cf687..62581cf687 100644 --- a/web_src/js/features/eventsource.sharedworker.js +++ b/web_src/js/features/eventsource.sharedworker.ts diff --git a/web_src/js/features/file-fold.js b/web_src/js/features/file-fold.ts index 3efefaf339..6fe068341a 100644 --- a/web_src/js/features/file-fold.js +++ b/web_src/js/features/file-fold.ts @@ -1,4 +1,4 @@ -import {svg} from '../svg.js'; +import {svg} from '../svg.ts'; // Hides the file if newFold is true, and shows it otherwise. The actual hiding is performed using CSS. // diff --git a/web_src/js/features/heatmap.js b/web_src/js/features/heatmap.ts index 9155e844a2..69cd069a94 100644 --- a/web_src/js/features/heatmap.js +++ b/web_src/js/features/heatmap.ts @@ -1,6 +1,6 @@ import {createApp} from 'vue'; import ActivityHeatmap from '../components/ActivityHeatmap.vue'; -import {translateMonth, translateDay} from '../utils.js'; +import {translateMonth, translateDay} from '../utils.ts'; export function initHeatmap() { const el = document.querySelector('#user-heatmap'); diff --git a/web_src/js/features/imagediff.js b/web_src/js/features/imagediff.ts index 5934a4b9f4..a6b1f48fb3 100644 --- a/web_src/js/features/imagediff.js +++ b/web_src/js/features/imagediff.ts @@ -1,7 +1,7 @@ import $ from 'jquery'; -import {GET} from '../modules/fetch.js'; -import {hideElem, loadElem, queryElemChildren, queryElems} from '../utils/dom.js'; -import {parseDom} from '../utils.js'; +import {GET} from '../modules/fetch.ts'; +import {hideElem, loadElem, queryElemChildren, queryElems} from '../utils/dom.ts'; +import {parseDom} from '../utils.ts'; function getDefaultSvgBoundsIfUndefined(text, src) { const defaultSize = 300; diff --git a/web_src/js/features/install.js b/web_src/js/features/install.ts index 6354db6cdc..3defb7904a 100644 --- a/web_src/js/features/install.js +++ b/web_src/js/features/install.ts @@ -1,5 +1,5 @@ -import {hideElem, showElem} from '../utils/dom.js'; -import {GET} from '../modules/fetch.js'; +import {hideElem, showElem} from '../utils/dom.ts'; +import {GET} from '../modules/fetch.ts'; export function initInstall() { const page = document.querySelector('.page-content.install'); diff --git a/web_src/js/features/notification.js b/web_src/js/features/notification.ts index c22fc17306..539f779056 100644 --- a/web_src/js/features/notification.js +++ b/web_src/js/features/notification.ts @@ -1,7 +1,7 @@ import $ from 'jquery'; -import {GET} from '../modules/fetch.js'; -import {toggleElem} from '../utils/dom.js'; -import {logoutFromWorker} from '../modules/worker.js'; +import {GET} from '../modules/fetch.ts'; +import {toggleElem} from '../utils/dom.ts'; +import {logoutFromWorker} from '../modules/worker.ts'; const {appSubUrl, notificationSettings, assetVersionEncoded} = window.config; let notificationSequenceNumber = 0; diff --git a/web_src/js/features/org-team.js b/web_src/js/features/org-team.ts index c216fdf6a2..e4e98fd990 100644 --- a/web_src/js/features/org-team.js +++ b/web_src/js/features/org-team.ts @@ -1,5 +1,5 @@ import $ from 'jquery'; -import {hideElem, showElem} from '../utils/dom.js'; +import {hideElem, showElem} from '../utils/dom.ts'; const {appSubUrl} = window.config; diff --git a/web_src/js/features/pull-view-file.js b/web_src/js/features/pull-view-file.ts index 84c5eddb45..9a052207d5 100644 --- a/web_src/js/features/pull-view-file.js +++ b/web_src/js/features/pull-view-file.ts @@ -1,6 +1,6 @@ -import {diffTreeStore} from '../modules/stores.js'; -import {setFileFolding} from './file-fold.js'; -import {POST} from '../modules/fetch.js'; +import {diffTreeStore} from '../modules/stores.ts'; +import {setFileFolding} from './file-fold.ts'; +import {POST} from '../modules/fetch.ts'; const {pageData} = window.config; const prReview = pageData.prReview || {}; diff --git a/web_src/js/features/recent-commits.js b/web_src/js/features/recent-commits.ts index b7f7c49987..b7f7c49987 100644 --- a/web_src/js/features/recent-commits.js +++ b/web_src/js/features/recent-commits.ts diff --git a/web_src/js/features/repo-branch.js b/web_src/js/features/repo-branch.ts index b9ffc6127f..3261bfe37e 100644 --- a/web_src/js/features/repo-branch.js +++ b/web_src/js/features/repo-branch.ts @@ -1,5 +1,5 @@ import $ from 'jquery'; -import {toggleElem} from '../utils/dom.js'; +import {toggleElem} from '../utils/dom.ts'; export function initRepoBranchButton() { initRepoCreateBranchButton(); diff --git a/web_src/js/features/repo-code.test.js b/web_src/js/features/repo-code.test.ts index 0e0062a787..27554aa847 100644 --- a/web_src/js/features/repo-code.test.js +++ b/web_src/js/features/repo-code.test.ts @@ -1,4 +1,4 @@ -import {singleAnchorRegex, rangeAnchorRegex} from './repo-code.js'; +import {singleAnchorRegex, rangeAnchorRegex} from './repo-code.ts'; test('singleAnchorRegex', () => { expect(singleAnchorRegex.test('#L0')).toEqual(false); diff --git a/web_src/js/features/repo-code.js b/web_src/js/features/repo-code.ts index 658fa7e11c..0068d6c0b5 100644 --- a/web_src/js/features/repo-code.js +++ b/web_src/js/features/repo-code.ts @@ -1,9 +1,9 @@ import $ from 'jquery'; -import {svg} from '../svg.js'; -import {invertFileFolding} from './file-fold.js'; -import {createTippy} from '../modules/tippy.js'; +import {svg} from '../svg.ts'; +import {invertFileFolding} from './file-fold.ts'; +import {createTippy} from '../modules/tippy.ts'; import {clippie} from 'clippie'; -import {toAbsoluteUrl} from '../utils.js'; +import {toAbsoluteUrl} from '../utils.ts'; export const singleAnchorRegex = /^#(L|n)([1-9][0-9]*)$/; export const rangeAnchorRegex = /^#(L[1-9][0-9]*)-(L[1-9][0-9]*)$/; diff --git a/web_src/js/features/repo-commit.js b/web_src/js/features/repo-commit.ts index f61ea08a42..56493443d9 100644 --- a/web_src/js/features/repo-commit.js +++ b/web_src/js/features/repo-commit.ts @@ -1,5 +1,5 @@ -import {createTippy} from '../modules/tippy.js'; -import {toggleElem} from '../utils/dom.js'; +import {createTippy} from '../modules/tippy.ts'; +import {toggleElem} from '../utils/dom.ts'; export function initRepoEllipsisButton() { for (const button of document.querySelectorAll('.js-toggle-commit-body')) { diff --git a/web_src/js/features/repo-common.js b/web_src/js/features/repo-common.ts index 88aa93d850..ac63ef2145 100644 --- a/web_src/js/features/repo-common.js +++ b/web_src/js/features/repo-common.ts @@ -1,8 +1,8 @@ import $ from 'jquery'; -import {hideElem, queryElems, showElem} from '../utils/dom.js'; -import {POST} from '../modules/fetch.js'; -import {showErrorToast} from '../modules/toast.js'; -import {sleep} from '../utils.js'; +import {hideElem, queryElems, showElem} from '../utils/dom.ts'; +import {POST} from '../modules/fetch.ts'; +import {showErrorToast} from '../modules/toast.ts'; +import {sleep} from '../utils.ts'; async function onDownloadArchive(e) { e.preventDefault(); diff --git a/web_src/js/features/repo-diff-commit.js b/web_src/js/features/repo-diff-commit.ts index aa7fc38360..c115e6300a 100644 --- a/web_src/js/features/repo-diff-commit.js +++ b/web_src/js/features/repo-diff-commit.ts @@ -1,5 +1,5 @@ -import {hideElem, showElem, toggleElem} from '../utils/dom.js'; -import {GET} from '../modules/fetch.js'; +import {hideElem, showElem, toggleElem} from '../utils/dom.ts'; +import {GET} from '../modules/fetch.ts'; async function loadBranchesAndTags(area, loadingButton) { loadingButton.classList.add('disabled'); diff --git a/web_src/js/features/repo-diff-commitselect.js b/web_src/js/features/repo-diff-commitselect.ts index 2d0d63946c..2d0d63946c 100644 --- a/web_src/js/features/repo-diff-commitselect.js +++ b/web_src/js/features/repo-diff-commitselect.ts diff --git a/web_src/js/features/repo-diff-filetree.js b/web_src/js/features/repo-diff-filetree.ts index 6d9533d066..6d9533d066 100644 --- a/web_src/js/features/repo-diff-filetree.js +++ b/web_src/js/features/repo-diff-filetree.ts diff --git a/web_src/js/features/repo-diff.js b/web_src/js/features/repo-diff.ts index 279f6da757..5d6388a43e 100644 --- a/web_src/js/features/repo-diff.js +++ b/web_src/js/features/repo-diff.ts @@ -1,14 +1,14 @@ import $ from 'jquery'; -import {initCompReactionSelector} from './comp/ReactionSelector.js'; -import {initRepoIssueContentHistory} from './repo-issue-content.js'; -import {initDiffFileTree} from './repo-diff-filetree.js'; -import {initDiffCommitSelect} from './repo-diff-commitselect.js'; -import {validateTextareaNonEmpty} from './comp/ComboMarkdownEditor.js'; -import {initViewedCheckboxListenerFor, countAndUpdateViewedFiles, initExpandAndCollapseFilesButton} from './pull-view-file.js'; -import {initImageDiff} from './imagediff.js'; -import {showErrorToast} from '../modules/toast.js'; -import {submitEventSubmitter, queryElemSiblings, hideElem, showElem, animateOnce} from '../utils/dom.js'; -import {POST, GET} from '../modules/fetch.js'; +import {initCompReactionSelector} from './comp/ReactionSelector.ts'; +import {initRepoIssueContentHistory} from './repo-issue-content.ts'; +import {initDiffFileTree} from './repo-diff-filetree.ts'; +import {initDiffCommitSelect} from './repo-diff-commitselect.ts'; +import {validateTextareaNonEmpty} from './comp/ComboMarkdownEditor.ts'; +import {initViewedCheckboxListenerFor, countAndUpdateViewedFiles, initExpandAndCollapseFilesButton} from './pull-view-file.ts'; +import {initImageDiff} from './imagediff.ts'; +import {showErrorToast} from '../modules/toast.ts'; +import {submitEventSubmitter, queryElemSiblings, hideElem, showElem, animateOnce} from '../utils/dom.ts'; +import {POST, GET} from '../modules/fetch.ts'; const {pageData, i18n} = window.config; diff --git a/web_src/js/features/repo-editor.js b/web_src/js/features/repo-editor.ts index f25da911df..8bf23fc60e 100644 --- a/web_src/js/features/repo-editor.js +++ b/web_src/js/features/repo-editor.ts @@ -1,11 +1,11 @@ import $ from 'jquery'; import {htmlEscape} from 'escape-goat'; -import {createCodeEditor} from './codeeditor.js'; -import {hideElem, queryElems, showElem} from '../utils/dom.js'; -import {initMarkupContent} from '../markup/content.js'; -import {attachRefIssueContextPopup} from './contextpopup.js'; -import {POST} from '../modules/fetch.js'; -import {initDropzone} from './dropzone.js'; +import {createCodeEditor} from './codeeditor.ts'; +import {hideElem, queryElems, showElem} from '../utils/dom.ts'; +import {initMarkupContent} from '../markup/content.ts'; +import {attachRefIssueContextPopup} from './contextpopup.ts'; +import {POST} from '../modules/fetch.ts'; +import {initDropzone} from './dropzone.ts'; function initEditPreviewTab($form) { const $tabMenu = $form.find('.repo-editor-menu'); diff --git a/web_src/js/features/repo-findfile.test.js b/web_src/js/features/repo-findfile.test.ts index 2d96ed4463..3ff1a796e2 100644 --- a/web_src/js/features/repo-findfile.test.js +++ b/web_src/js/features/repo-findfile.test.ts @@ -1,4 +1,4 @@ -import {strSubMatch, calcMatchedWeight, filterRepoFilesWeighted} from './repo-findfile.js'; +import {strSubMatch, calcMatchedWeight, filterRepoFilesWeighted} from './repo-findfile.ts'; describe('Repo Find Files', () => { test('strSubMatch', () => { diff --git a/web_src/js/features/repo-findfile.js b/web_src/js/features/repo-findfile.ts index 828acfa65c..1f151d7056 100644 --- a/web_src/js/features/repo-findfile.js +++ b/web_src/js/features/repo-findfile.ts @@ -1,7 +1,7 @@ -import {svg} from '../svg.js'; -import {toggleElem} from '../utils/dom.js'; -import {pathEscapeSegments} from '../utils/url.js'; -import {GET} from '../modules/fetch.js'; +import {svg} from '../svg.ts'; +import {toggleElem} from '../utils/dom.ts'; +import {pathEscapeSegments} from '../utils/url.ts'; +import {GET} from '../modules/fetch.ts'; const threshold = 50; let files = []; diff --git a/web_src/js/features/repo-graph.js b/web_src/js/features/repo-graph.ts index 7084e40977..ff64d0854b 100644 --- a/web_src/js/features/repo-graph.js +++ b/web_src/js/features/repo-graph.ts @@ -1,6 +1,6 @@ import $ from 'jquery'; -import {hideElem, showElem} from '../utils/dom.js'; -import {GET} from '../modules/fetch.js'; +import {hideElem, showElem} from '../utils/dom.ts'; +import {GET} from '../modules/fetch.ts'; export function initRepoGraphGit() { const graphContainer = document.querySelector('#git-graph-container'); diff --git a/web_src/js/features/repo-home.js b/web_src/js/features/repo-home.ts index 3a8e41bde1..f3e39ddb3c 100644 --- a/web_src/js/features/repo-home.js +++ b/web_src/js/features/repo-home.ts @@ -1,8 +1,8 @@ import $ from 'jquery'; -import {stripTags} from '../utils.js'; -import {hideElem, queryElemChildren, showElem} from '../utils/dom.js'; -import {POST} from '../modules/fetch.js'; -import {showErrorToast} from '../modules/toast.js'; +import {stripTags} from '../utils.ts'; +import {hideElem, queryElemChildren, showElem} from '../utils/dom.ts'; +import {POST} from '../modules/fetch.ts'; +import {showErrorToast} from '../modules/toast.ts'; const {appSubUrl} = window.config; diff --git a/web_src/js/features/repo-issue-content.js b/web_src/js/features/repo-issue-content.ts index cef2f49008..7aaf9765ee 100644 --- a/web_src/js/features/repo-issue-content.js +++ b/web_src/js/features/repo-issue-content.ts @@ -1,8 +1,8 @@ import $ from 'jquery'; -import {svg} from '../svg.js'; -import {showErrorToast} from '../modules/toast.js'; -import {GET, POST} from '../modules/fetch.js'; -import {showElem} from '../utils/dom.js'; +import {svg} from '../svg.ts'; +import {showErrorToast} from '../modules/toast.ts'; +import {GET, POST} from '../modules/fetch.ts'; +import {showElem} from '../utils/dom.ts'; const {appSubUrl} = window.config; let i18nTextEdited; diff --git a/web_src/js/features/repo-issue-edit.js b/web_src/js/features/repo-issue-edit.ts index 8bc0c02bcb..33a7a10923 100644 --- a/web_src/js/features/repo-issue-edit.js +++ b/web_src/js/features/repo-issue-edit.ts @@ -1,11 +1,11 @@ import $ from 'jquery'; -import {handleReply} from './repo-issue.js'; -import {getComboMarkdownEditor, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js'; -import {POST} from '../modules/fetch.js'; -import {showErrorToast} from '../modules/toast.js'; -import {hideElem, showElem} from '../utils/dom.js'; -import {attachRefIssueContextPopup} from './contextpopup.js'; -import {initCommentContent, initMarkupContent} from '../markup/content.js'; +import {handleReply} from './repo-issue.ts'; +import {getComboMarkdownEditor, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts'; +import {POST} from '../modules/fetch.ts'; +import {showErrorToast} from '../modules/toast.ts'; +import {hideElem, showElem} from '../utils/dom.ts'; +import {attachRefIssueContextPopup} from './contextpopup.ts'; +import {initCommentContent, initMarkupContent} from '../markup/content.ts'; async function onEditContent(event) { event.preventDefault(); diff --git a/web_src/js/features/repo-issue-list.js b/web_src/js/features/repo-issue-list.ts index c8ae91d453..1e4a880f2e 100644 --- a/web_src/js/features/repo-issue-list.js +++ b/web_src/js/features/repo-issue-list.ts @@ -1,12 +1,12 @@ import $ from 'jquery'; -import {updateIssuesMeta} from './repo-issue.js'; -import {toggleElem, hideElem, isElemHidden} from '../utils/dom.js'; +import {updateIssuesMeta} from './repo-issue.ts'; +import {toggleElem, hideElem, isElemHidden} from '../utils/dom.ts'; import {htmlEscape} from 'escape-goat'; -import {confirmModal} from './comp/ConfirmModal.js'; -import {showErrorToast} from '../modules/toast.js'; -import {createSortable} from '../modules/sortable.js'; -import {DELETE, POST} from '../modules/fetch.js'; -import {parseDom} from '../utils.js'; +import {confirmModal} from './comp/ConfirmModal.ts'; +import {showErrorToast} from '../modules/toast.ts'; +import {createSortable} from '../modules/sortable.ts'; +import {DELETE, POST} from '../modules/fetch.ts'; +import {parseDom} from '../utils.ts'; function initRepoIssueListCheckboxes() { const issueSelectAll = document.querySelector('.issue-checkbox-all'); diff --git a/web_src/js/features/repo-issue-pr-form.js b/web_src/js/features/repo-issue-pr-form.ts index 94a2857340..94a2857340 100644 --- a/web_src/js/features/repo-issue-pr-form.js +++ b/web_src/js/features/repo-issue-pr-form.ts diff --git a/web_src/js/features/repo-issue-pr-status.js b/web_src/js/features/repo-issue-pr-status.ts index 7890b9c48d..7890b9c48d 100644 --- a/web_src/js/features/repo-issue-pr-status.js +++ b/web_src/js/features/repo-issue-pr-status.ts diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.ts index 57c4f19163..4377292a64 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.ts @@ -1,12 +1,12 @@ import $ from 'jquery'; import {htmlEscape} from 'escape-goat'; -import {createTippy, showTemporaryTooltip} from '../modules/tippy.js'; -import {hideElem, showElem, toggleElem} from '../utils/dom.js'; -import {setFileFolding} from './file-fold.js'; -import {getComboMarkdownEditor, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js'; -import {toAbsoluteUrl} from '../utils.js'; -import {GET, POST} from '../modules/fetch.js'; -import {showErrorToast} from '../modules/toast.js'; +import {createTippy, showTemporaryTooltip} from '../modules/tippy.ts'; +import {hideElem, showElem, toggleElem} from '../utils/dom.ts'; +import {setFileFolding} from './file-fold.ts'; +import {getComboMarkdownEditor, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts'; +import {toAbsoluteUrl} from '../utils.ts'; +import {GET, POST} from '../modules/fetch.ts'; +import {showErrorToast} from '../modules/toast.ts'; const {appSubUrl} = window.config; @@ -19,7 +19,7 @@ export function initRepoIssueTimeTracking() { }, }).modal('show'); $('.issue-start-time-modal input').on('keydown', (e) => { - if ((e.keyCode || e.key) === 13) { + if (e.key === 'Enter') { $('#add_time_manual_form').trigger('submit'); } }); @@ -146,7 +146,7 @@ export function initRepoIssueSidebarList() { }); $('.menu .ui.dropdown.label-filter').on('keydown', (e) => { - if (e.altKey && e.keyCode === 13) { + if (e.altKey && e.key === 'Enter') { const selectedItem = document.querySelector('.menu .ui.dropdown.label-filter .menu .item.selected'); if (selectedItem) { excludeLabel(selectedItem); diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.ts index de4f611b5d..b26803c76d 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.ts @@ -4,24 +4,24 @@ import { initRepoIssueComments, initRepoIssueDependencyDelete, initRepoIssueReferenceIssue, initRepoIssueTitleEdit, initRepoIssueWipToggle, initRepoPullRequestUpdate, updateIssuesMeta, initIssueTemplateCommentEditors, initSingleCommentEditor, -} from './repo-issue.js'; -import {initUnicodeEscapeButton} from './repo-unicode-escape.js'; -import {svg} from '../svg.js'; +} from './repo-issue.ts'; +import {initUnicodeEscapeButton} from './repo-unicode-escape.ts'; +import {svg} from '../svg.ts'; import {htmlEscape} from 'escape-goat'; import {initRepoBranchTagSelector} from '../components/RepoBranchTagSelector.vue'; import { initRepoCloneLink, initRepoCommonBranchOrTagDropdown, initRepoCommonFilterSearchDropdown, -} from './repo-common.js'; -import {initCitationFileCopyContent} from './citation.js'; -import {initCompLabelEdit} from './comp/LabelEdit.js'; -import {initRepoDiffConversationNav} from './repo-diff.js'; -import {initCompReactionSelector} from './comp/ReactionSelector.js'; -import {initRepoSettingBranches} from './repo-settings.js'; -import {initRepoPullRequestMergeForm} from './repo-issue-pr-form.js'; -import {initRepoPullRequestCommitStatus} from './repo-issue-pr-status.js'; -import {hideElem, queryElemChildren, showElem} from '../utils/dom.js'; -import {POST} from '../modules/fetch.js'; -import {initRepoIssueCommentEdit} from './repo-issue-edit.js'; +} from './repo-common.ts'; +import {initCitationFileCopyContent} from './citation.ts'; +import {initCompLabelEdit} from './comp/LabelEdit.ts'; +import {initRepoDiffConversationNav} from './repo-diff.ts'; +import {initCompReactionSelector} from './comp/ReactionSelector.ts'; +import {initRepoSettingBranches} from './repo-settings.ts'; +import {initRepoPullRequestMergeForm} from './repo-issue-pr-form.ts'; +import {initRepoPullRequestCommitStatus} from './repo-issue-pr-status.ts'; +import {hideElem, queryElemChildren, showElem} from '../utils/dom.ts'; +import {POST} from '../modules/fetch.ts'; +import {initRepoIssueCommentEdit} from './repo-issue-edit.ts'; // if there are draft comments, confirm before reloading, to avoid losing comments function reloadConfirmDraftComment() { diff --git a/web_src/js/features/repo-migrate.js b/web_src/js/features/repo-migrate.ts index b8157e2dad..dc36177940 100644 --- a/web_src/js/features/repo-migrate.js +++ b/web_src/js/features/repo-migrate.ts @@ -1,5 +1,5 @@ -import {hideElem, showElem} from '../utils/dom.js'; -import {GET, POST} from '../modules/fetch.js'; +import {hideElem, showElem} from '../utils/dom.ts'; +import {GET, POST} from '../modules/fetch.ts'; const {appSubUrl} = window.config; diff --git a/web_src/js/features/repo-migration.js b/web_src/js/features/repo-migration.ts index 7f7aa237ee..8f79ee1423 100644 --- a/web_src/js/features/repo-migration.js +++ b/web_src/js/features/repo-migration.ts @@ -1,4 +1,4 @@ -import {hideElem, showElem, toggleElem} from '../utils/dom.js'; +import {hideElem, showElem, toggleElem} from '../utils/dom.ts'; const service = document.querySelector('#service_type'); const user = document.querySelector('#auth_username'); diff --git a/web_src/js/features/repo-projects.js b/web_src/js/features/repo-projects.ts index 706942363d..950d78fec7 100644 --- a/web_src/js/features/repo-projects.js +++ b/web_src/js/features/repo-projects.ts @@ -1,7 +1,7 @@ import $ from 'jquery'; -import {contrastColor} from '../utils/color.js'; -import {createSortable} from '../modules/sortable.js'; -import {POST, DELETE, PUT} from '../modules/fetch.js'; +import {contrastColor} from '../utils/color.ts'; +import {createSortable} from '../modules/sortable.ts'; +import {POST, DELETE, PUT} from '../modules/fetch.ts'; function updateIssueCount(cards) { const parent = cards.parentElement; diff --git a/web_src/js/features/repo-release.js b/web_src/js/features/repo-release.ts index 2be1ec58c6..2928376c7f 100644 --- a/web_src/js/features/repo-release.js +++ b/web_src/js/features/repo-release.ts @@ -1,5 +1,5 @@ -import {hideElem, showElem} from '../utils/dom.js'; -import {initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js'; +import {hideElem, showElem} from '../utils/dom.ts'; +import {initComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts'; export function initRepoRelease() { document.addEventListener('click', (e) => { diff --git a/web_src/js/features/repo-search.js b/web_src/js/features/repo-search.ts index 185f6119d9..185f6119d9 100644 --- a/web_src/js/features/repo-search.js +++ b/web_src/js/features/repo-search.ts diff --git a/web_src/js/features/repo-settings.js b/web_src/js/features/repo-settings.ts index 6590c2b56c..97211d035e 100644 --- a/web_src/js/features/repo-settings.js +++ b/web_src/js/features/repo-settings.ts @@ -1,8 +1,8 @@ import $ from 'jquery'; import {minimatch} from 'minimatch'; -import {createMonaco} from './codeeditor.js'; -import {onInputDebounce, queryElems, toggleElem} from '../utils/dom.js'; -import {POST} from '../modules/fetch.js'; +import {createMonaco} from './codeeditor.ts'; +import {onInputDebounce, queryElems, toggleElem} from '../utils/dom.ts'; +import {POST} from '../modules/fetch.ts'; const {appSubUrl, csrfToken} = window.config; diff --git a/web_src/js/features/repo-template.js b/web_src/js/features/repo-template.ts index 5f63e8b3ba..fbd7b656ed 100644 --- a/web_src/js/features/repo-template.js +++ b/web_src/js/features/repo-template.ts @@ -1,6 +1,6 @@ import $ from 'jquery'; import {htmlEscape} from 'escape-goat'; -import {hideElem, showElem} from '../utils/dom.js'; +import {hideElem, showElem} from '../utils/dom.ts'; const {appSubUrl} = window.config; diff --git a/web_src/js/features/repo-unicode-escape.js b/web_src/js/features/repo-unicode-escape.ts index d878532001..7a9bca7a37 100644 --- a/web_src/js/features/repo-unicode-escape.js +++ b/web_src/js/features/repo-unicode-escape.ts @@ -1,4 +1,4 @@ -import {hideElem, queryElemSiblings, showElem, toggleElem} from '../utils/dom.js'; +import {hideElem, queryElemSiblings, showElem, toggleElem} from '../utils/dom.ts'; export function initUnicodeEscapeButton() { document.addEventListener('click', (e) => { diff --git a/web_src/js/features/repo-wiki.js b/web_src/js/features/repo-wiki.ts index 03a2c68c5a..2c7fb1b1b8 100644 --- a/web_src/js/features/repo-wiki.js +++ b/web_src/js/features/repo-wiki.ts @@ -1,7 +1,7 @@ -import {initMarkupContent} from '../markup/content.js'; -import {validateTextareaNonEmpty, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js'; -import {fomanticMobileScreen} from '../modules/fomantic.js'; -import {POST} from '../modules/fetch.js'; +import {initMarkupContent} from '../markup/content.ts'; +import {validateTextareaNonEmpty, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts'; +import {fomanticMobileScreen} from '../modules/fomantic.ts'; +import {POST} from '../modules/fetch.ts'; async function initRepoWikiFormEditor() { const editArea = document.querySelector('.repository.wiki .combo-markdown-editor textarea'); diff --git a/web_src/js/features/sshkey-helper.js b/web_src/js/features/sshkey-helper.ts index 5531c18451..5531c18451 100644 --- a/web_src/js/features/sshkey-helper.js +++ b/web_src/js/features/sshkey-helper.ts diff --git a/web_src/js/features/stopwatch.js b/web_src/js/features/stopwatch.ts index 79d9892b74..d89aa4bfac 100644 --- a/web_src/js/features/stopwatch.js +++ b/web_src/js/features/stopwatch.ts @@ -1,7 +1,7 @@ -import {createTippy} from '../modules/tippy.js'; -import {GET} from '../modules/fetch.js'; -import {hideElem, showElem} from '../utils/dom.js'; -import {logoutFromWorker} from '../modules/worker.js'; +import {createTippy} from '../modules/tippy.ts'; +import {GET} from '../modules/fetch.ts'; +import {hideElem, showElem} from '../utils/dom.ts'; +import {logoutFromWorker} from '../modules/worker.ts'; const {appSubUrl, notificationSettings, enableTimeTracking, assetVersionEncoded} = window.config; diff --git a/web_src/js/features/tablesort.js b/web_src/js/features/tablesort.ts index 436fe0a594..436fe0a594 100644 --- a/web_src/js/features/tablesort.js +++ b/web_src/js/features/tablesort.ts diff --git a/web_src/js/features/tribute.js b/web_src/js/features/tribute.ts index 30e957f2e6..193c65076f 100644 --- a/web_src/js/features/tribute.js +++ b/web_src/js/features/tribute.ts @@ -1,4 +1,4 @@ -import {emojiKeys, emojiHTML, emojiString} from './emoji.js'; +import {emojiKeys, emojiHTML, emojiString} from './emoji.ts'; import {htmlEscape} from 'escape-goat'; function makeCollections({mentions, emoji}) { diff --git a/web_src/js/features/user-auth-webauthn.js b/web_src/js/features/user-auth-webauthn.ts index a317fee7e2..7b7508c4f1 100644 --- a/web_src/js/features/user-auth-webauthn.js +++ b/web_src/js/features/user-auth-webauthn.ts @@ -1,6 +1,6 @@ -import {encodeURLEncodedBase64, decodeURLEncodedBase64} from '../utils.js'; -import {showElem} from '../utils/dom.js'; -import {GET, POST} from '../modules/fetch.js'; +import {encodeURLEncodedBase64, decodeURLEncodedBase64} from '../utils.ts'; +import {showElem} from '../utils/dom.ts'; +import {GET, POST} from '../modules/fetch.ts'; const {appSubUrl} = window.config; diff --git a/web_src/js/features/user-auth.js b/web_src/js/features/user-auth.ts index 355843ccf2..f1f34bc806 100644 --- a/web_src/js/features/user-auth.js +++ b/web_src/js/features/user-auth.ts @@ -1,4 +1,4 @@ -import {checkAppUrl} from './common-page.js'; +import {checkAppUrl} from './common-page.ts'; export function initUserAuthOauth2() { const outer = document.querySelector('#oauth2-login-navigator'); diff --git a/web_src/js/features/user-settings.js b/web_src/js/features/user-settings.ts index 8cb1f0582f..41939c0f52 100644 --- a/web_src/js/features/user-settings.js +++ b/web_src/js/features/user-settings.ts @@ -1,4 +1,4 @@ -import {hideElem, showElem} from '../utils/dom.js'; +import {hideElem, showElem} from '../utils/dom.ts'; export function initUserSettings() { if (!document.querySelectorAll('.user.settings.profile').length) return; diff --git a/web_src/js/globals.js b/web_src/js/globals.ts index 24974da90e..24974da90e 100644 --- a/web_src/js/globals.js +++ b/web_src/js/globals.ts diff --git a/web_src/js/htmx.js b/web_src/js/htmx.ts index 6169d2f82f..ac7e540fe4 100644 --- a/web_src/js/htmx.js +++ b/web_src/js/htmx.ts @@ -1,4 +1,4 @@ -import {showErrorToast} from './modules/toast.js'; +import {showErrorToast} from './modules/toast.ts'; // https://github.com/bigskysoftware/idiomorph#htmx import 'idiomorph/dist/idiomorph-ext.js'; diff --git a/web_src/js/index.js b/web_src/js/index.ts index 8aff052664..12120d3892 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.ts @@ -1,31 +1,31 @@ // bootstrap module must be the first one to be imported, it handles webpack lazy-loading and global errors -import './bootstrap.js'; -import './htmx.js'; +import './bootstrap.ts'; +import './htmx.ts'; import {initRepoActivityTopAuthorsChart} from './components/RepoActivityTopAuthors.vue'; import {initScopedAccessTokenCategories} from './components/ScopedAccessTokenSelector.vue'; import {initDashboardRepoList} from './components/DashboardRepoList.vue'; -import {initGlobalCopyToClipboardListener} from './features/clipboard.js'; -import {initContextPopups} from './features/contextpopup.js'; -import {initRepoGraphGit} from './features/repo-graph.js'; -import {initHeatmap} from './features/heatmap.js'; -import {initImageDiff} from './features/imagediff.js'; -import {initRepoMigration} from './features/repo-migration.js'; -import {initRepoProject} from './features/repo-projects.js'; -import {initTableSort} from './features/tablesort.js'; -import {initAutoFocusEnd} from './features/autofocus-end.js'; -import {initAdminUserListSearchForm} from './features/admin/users.js'; -import {initAdminConfigs} from './features/admin/config.js'; -import {initMarkupAnchors} from './markup/anchors.js'; -import {initNotificationCount, initNotificationsTable} from './features/notification.js'; -import {initRepoIssueContentHistory} from './features/repo-issue-content.js'; -import {initStopwatch} from './features/stopwatch.js'; -import {initFindFileInRepo} from './features/repo-findfile.js'; -import {initCommentContent, initMarkupContent} from './markup/content.js'; -import {initPdfViewer} from './render/pdf.js'; - -import {initUserAuthOauth2} from './features/user-auth.js'; +import {initGlobalCopyToClipboardListener} from './features/clipboard.ts'; +import {initContextPopups} from './features/contextpopup.ts'; +import {initRepoGraphGit} from './features/repo-graph.ts'; +import {initHeatmap} from './features/heatmap.ts'; +import {initImageDiff} from './features/imagediff.ts'; +import {initRepoMigration} from './features/repo-migration.ts'; +import {initRepoProject} from './features/repo-projects.ts'; +import {initTableSort} from './features/tablesort.ts'; +import {initAutoFocusEnd} from './features/autofocus-end.ts'; +import {initAdminUserListSearchForm} from './features/admin/users.ts'; +import {initAdminConfigs} from './features/admin/config.ts'; +import {initMarkupAnchors} from './markup/anchors.ts'; +import {initNotificationCount, initNotificationsTable} from './features/notification.ts'; +import {initRepoIssueContentHistory} from './features/repo-issue-content.ts'; +import {initStopwatch} from './features/stopwatch.ts'; +import {initFindFileInRepo} from './features/repo-findfile.ts'; +import {initCommentContent, initMarkupContent} from './markup/content.ts'; +import {initPdfViewer} from './render/pdf.ts'; + +import {initUserAuthOauth2} from './features/user-auth.ts'; import { initRepoIssueDue, initRepoIssueReferenceRepositorySearch, @@ -34,64 +34,64 @@ import { initRepoPullRequestMergeInstruction, initRepoPullRequestAllowMaintainerEdit, initRepoPullRequestReview, initRepoIssueSidebarList, initArchivedLabelHandler, -} from './features/repo-issue.js'; -import {initRepoEllipsisButton, initCommitStatuses} from './features/repo-commit.js'; -import {initRepoTopicBar} from './features/repo-home.js'; -import {initAdminEmails} from './features/admin/emails.js'; -import {initAdminCommon} from './features/admin/common.js'; -import {initRepoTemplateSearch} from './features/repo-template.js'; -import {initRepoCodeView} from './features/repo-code.js'; -import {initSshKeyFormParser} from './features/sshkey-helper.js'; -import {initUserSettings} from './features/user-settings.js'; -import {initRepoArchiveLinks} from './features/repo-common.js'; -import {initRepoMigrationStatusChecker} from './features/repo-migrate.js'; +} from './features/repo-issue.ts'; +import {initRepoEllipsisButton, initCommitStatuses} from './features/repo-commit.ts'; +import {initRepoTopicBar} from './features/repo-home.ts'; +import {initAdminEmails} from './features/admin/emails.ts'; +import {initAdminCommon} from './features/admin/common.ts'; +import {initRepoTemplateSearch} from './features/repo-template.ts'; +import {initRepoCodeView} from './features/repo-code.ts'; +import {initSshKeyFormParser} from './features/sshkey-helper.ts'; +import {initUserSettings} from './features/user-settings.ts'; +import {initRepoArchiveLinks} from './features/repo-common.ts'; +import {initRepoMigrationStatusChecker} from './features/repo-migrate.ts'; import { initRepoSettingGitHook, initRepoSettingsCollaboration, initRepoSettingSearchTeamBox, -} from './features/repo-settings.js'; -import {initRepoDiffView} from './features/repo-diff.js'; -import {initOrgTeamSearchRepoBox, initOrgTeamSettings} from './features/org-team.js'; -import {initUserAuthWebAuthn, initUserAuthWebAuthnRegister} from './features/user-auth-webauthn.js'; -import {initRepoRelease, initRepoReleaseNew} from './features/repo-release.js'; -import {initRepoEditor} from './features/repo-editor.js'; -import {initCompSearchUserBox} from './features/comp/SearchUserBox.js'; -import {initInstall} from './features/install.js'; -import {initCompWebHookEditor} from './features/comp/WebHookEditor.js'; -import {initRepoBranchButton} from './features/repo-branch.js'; -import {initCommonOrganization} from './features/common-organization.js'; -import {initRepoWikiForm} from './features/repo-wiki.js'; -import {initRepoCommentForm, initRepository} from './features/repo-legacy.js'; -import {initCopyContent} from './features/copycontent.js'; -import {initCaptcha} from './features/captcha.js'; +} from './features/repo-settings.ts'; +import {initRepoDiffView} from './features/repo-diff.ts'; +import {initOrgTeamSearchRepoBox, initOrgTeamSettings} from './features/org-team.ts'; +import {initUserAuthWebAuthn, initUserAuthWebAuthnRegister} from './features/user-auth-webauthn.ts'; +import {initRepoRelease, initRepoReleaseNew} from './features/repo-release.ts'; +import {initRepoEditor} from './features/repo-editor.ts'; +import {initCompSearchUserBox} from './features/comp/SearchUserBox.ts'; +import {initInstall} from './features/install.ts'; +import {initCompWebHookEditor} from './features/comp/WebHookEditor.ts'; +import {initRepoBranchButton} from './features/repo-branch.ts'; +import {initCommonOrganization} from './features/common-organization.ts'; +import {initRepoWikiForm} from './features/repo-wiki.ts'; +import {initRepoCommentForm, initRepository} from './features/repo-legacy.ts'; +import {initCopyContent} from './features/copycontent.ts'; +import {initCaptcha} from './features/captcha.ts'; import {initRepositoryActionView} from './components/RepoActionView.vue'; -import {initGlobalTooltips} from './modules/tippy.js'; -import {initGiteaFomantic} from './modules/fomantic.js'; -import {initSubmitEventPolyfill, onDomReady} from './utils/dom.js'; -import {initRepoIssueList} from './features/repo-issue-list.js'; -import {initCommonIssueListQuickGoto} from './features/common-issue-list.js'; -import {initRepoContributors} from './features/contributors.js'; -import {initRepoCodeFrequency} from './features/code-frequency.js'; -import {initRepoRecentCommits} from './features/recent-commits.js'; -import {initRepoDiffCommitBranchesAndTags} from './features/repo-diff-commit.js'; -import {initDirAuto} from './modules/dirauto.js'; -import {initRepositorySearch} from './features/repo-search.js'; -import {initColorPickers} from './features/colorpicker.js'; -import {initAdminSelfCheck} from './features/admin/selfcheck.js'; -import {initGlobalFetchAction} from './features/common-fetch-action.js'; +import {initGlobalTooltips} from './modules/tippy.ts'; +import {initGiteaFomantic} from './modules/fomantic.ts'; +import {initSubmitEventPolyfill, onDomReady} from './utils/dom.ts'; +import {initRepoIssueList} from './features/repo-issue-list.ts'; +import {initCommonIssueListQuickGoto} from './features/common-issue-list.ts'; +import {initRepoContributors} from './features/contributors.ts'; +import {initRepoCodeFrequency} from './features/code-frequency.ts'; +import {initRepoRecentCommits} from './features/recent-commits.ts'; +import {initRepoDiffCommitBranchesAndTags} from './features/repo-diff-commit.ts'; +import {initDirAuto} from './modules/dirauto.ts'; +import {initRepositorySearch} from './features/repo-search.ts'; +import {initColorPickers} from './features/colorpicker.ts'; +import {initAdminSelfCheck} from './features/admin/selfcheck.ts'; +import {initGlobalFetchAction} from './features/common-fetch-action.ts'; import { initFootLanguageMenu, initGlobalDropdown, initGlobalTabularMenu, initHeadNavbarContentToggle, -} from './features/common-page.js'; +} from './features/common-page.ts'; import { initGlobalButtonClickOnEnter, initGlobalButtons, initGlobalDeleteButton, initGlobalShowModal, -} from './features/common-button.js'; -import {initGlobalEnterQuickSubmit, initGlobalFormDirtyLeaveConfirm} from './features/common-form.js'; +} from './features/common-button.ts'; +import {initGlobalEnterQuickSubmit, initGlobalFormDirtyLeaveConfirm} from './features/common-form.ts'; initGiteaFomantic(); initDirAuto(); diff --git a/web_src/js/markup/anchors.js b/web_src/js/markup/anchors.ts index 6f36d09683..8f0a88f130 100644 --- a/web_src/js/markup/anchors.js +++ b/web_src/js/markup/anchors.ts @@ -1,4 +1,4 @@ -import {svg} from '../svg.js'; +import {svg} from '../svg.ts'; const addPrefix = (str) => `user-content-${str}`; const removePrefix = (str) => str.replace(/^user-content-/, ''); diff --git a/web_src/js/markup/asciicast.js b/web_src/js/markup/asciicast.ts index 97b18743a1..97b18743a1 100644 --- a/web_src/js/markup/asciicast.js +++ b/web_src/js/markup/asciicast.ts diff --git a/web_src/js/markup/codecopy.js b/web_src/js/markup/codecopy.ts index 078d741253..0fac4a0a39 100644 --- a/web_src/js/markup/codecopy.js +++ b/web_src/js/markup/codecopy.ts @@ -1,4 +1,4 @@ -import {svg} from '../svg.js'; +import {svg} from '../svg.ts'; export function makeCodeCopyButton() { const button = document.createElement('button'); diff --git a/web_src/js/markup/common.js b/web_src/js/markup/common.ts index aff4a32423..aff4a32423 100644 --- a/web_src/js/markup/common.js +++ b/web_src/js/markup/common.ts diff --git a/web_src/js/markup/content.js b/web_src/js/markup/content.ts index 1d29dc07f2..e7f7b7f0c4 100644 --- a/web_src/js/markup/content.js +++ b/web_src/js/markup/content.ts @@ -1,8 +1,8 @@ -import {renderMermaid} from './mermaid.js'; -import {renderMath} from './math.js'; -import {renderCodeCopy} from './codecopy.js'; -import {renderAsciicast} from './asciicast.js'; -import {initMarkupTasklist} from './tasklist.js'; +import {renderMermaid} from './mermaid.ts'; +import {renderMath} from './math.ts'; +import {renderCodeCopy} from './codecopy.ts'; +import {renderAsciicast} from './asciicast.ts'; +import {initMarkupTasklist} from './tasklist.ts'; // code that runs for all markup content export function initMarkupContent() { diff --git a/web_src/js/markup/math.js b/web_src/js/markup/math.ts index 872e50a452..e10d90fa2a 100644 --- a/web_src/js/markup/math.js +++ b/web_src/js/markup/math.ts @@ -1,4 +1,4 @@ -import {displayError} from './common.js'; +import {displayError} from './common.ts'; function targetElement(el) { // The target element is either the current element if it has the diff --git a/web_src/js/markup/mermaid.js b/web_src/js/markup/mermaid.ts index 0549fb3e31..da07161ed1 100644 --- a/web_src/js/markup/mermaid.js +++ b/web_src/js/markup/mermaid.ts @@ -1,6 +1,6 @@ -import {isDarkTheme} from '../utils.js'; -import {makeCodeCopyButton} from './codecopy.js'; -import {displayError} from './common.js'; +import {isDarkTheme} from '../utils.ts'; +import {makeCodeCopyButton} from './codecopy.ts'; +import {displayError} from './common.ts'; const {mermaidMaxSourceCharacters} = window.config; diff --git a/web_src/js/markup/tasklist.js b/web_src/js/markup/tasklist.ts index a40b5e4abd..93896ccf07 100644 --- a/web_src/js/markup/tasklist.js +++ b/web_src/js/markup/tasklist.ts @@ -1,5 +1,5 @@ -import {POST} from '../modules/fetch.js'; -import {showErrorToast} from '../modules/toast.js'; +import {POST} from '../modules/fetch.ts'; +import {showErrorToast} from '../modules/toast.ts'; const preventListener = (e) => e.preventDefault(); diff --git a/web_src/js/modules/dirauto.js b/web_src/js/modules/dirauto.ts index cd90f8155b..855bae1ca8 100644 --- a/web_src/js/modules/dirauto.js +++ b/web_src/js/modules/dirauto.ts @@ -1,4 +1,4 @@ -import {isDocumentFragmentOrElementNode} from '../utils/dom.js'; +import {isDocumentFragmentOrElementNode} from '../utils/dom.ts'; // for performance considerations, it only uses performant syntax function attachDirAuto(el) { diff --git a/web_src/js/modules/fetch.test.js b/web_src/js/modules/fetch.test.ts index e4bec3ced9..c40016b748 100644 --- a/web_src/js/modules/fetch.test.js +++ b/web_src/js/modules/fetch.test.ts @@ -1,4 +1,4 @@ -import {GET, POST, PATCH, PUT, DELETE} from './fetch.js'; +import {GET, POST, PATCH, PUT, DELETE} from './fetch.ts'; // tests here are only to satisfy the linter for unused functions test('exports', () => { diff --git a/web_src/js/modules/fetch.js b/web_src/js/modules/fetch.ts index 2191a8d4db..b70a4cb304 100644 --- a/web_src/js/modules/fetch.js +++ b/web_src/js/modules/fetch.ts @@ -1,4 +1,4 @@ -import {isObject} from '../utils.js'; +import {isObject} from '../utils.ts'; const {csrfToken} = window.config; diff --git a/web_src/js/modules/fomantic.js b/web_src/js/modules/fomantic.ts index 06e4e97c48..d4c71ede57 100644 --- a/web_src/js/modules/fomantic.js +++ b/web_src/js/modules/fomantic.ts @@ -1,12 +1,12 @@ import $ from 'jquery'; -import {initFomanticApiPatch} from './fomantic/api.js'; -import {initAriaCheckboxPatch} from './fomantic/checkbox.js'; -import {initAriaFormFieldPatch} from './fomantic/form.js'; -import {initAriaDropdownPatch} from './fomantic/dropdown.js'; -import {initAriaModalPatch} from './fomantic/modal.js'; -import {initFomanticTransition} from './fomantic/transition.js'; -import {initFomanticDimmer} from './fomantic/dimmer.js'; -import {svg} from '../svg.js'; +import {initFomanticApiPatch} from './fomantic/api.ts'; +import {initAriaCheckboxPatch} from './fomantic/checkbox.ts'; +import {initAriaFormFieldPatch} from './fomantic/form.ts'; +import {initAriaDropdownPatch} from './fomantic/dropdown.ts'; +import {initAriaModalPatch} from './fomantic/modal.ts'; +import {initFomanticTransition} from './fomantic/transition.ts'; +import {initFomanticDimmer} from './fomantic/dimmer.ts'; +import {svg} from '../svg.ts'; export const fomanticMobileScreen = window.matchMedia('only screen and (max-width: 767.98px)'); diff --git a/web_src/js/modules/fomantic/api.js b/web_src/js/modules/fomantic/api.ts index ca212c9fef..ca212c9fef 100644 --- a/web_src/js/modules/fomantic/api.js +++ b/web_src/js/modules/fomantic/api.ts diff --git a/web_src/js/modules/fomantic/base.js b/web_src/js/modules/fomantic/base.ts index 7574fdd25c..7574fdd25c 100644 --- a/web_src/js/modules/fomantic/base.js +++ b/web_src/js/modules/fomantic/base.ts diff --git a/web_src/js/modules/fomantic/checkbox.js b/web_src/js/modules/fomantic/checkbox.ts index ed77406cc3..68c1d4199c 100644 --- a/web_src/js/modules/fomantic/checkbox.js +++ b/web_src/js/modules/fomantic/checkbox.ts @@ -1,4 +1,4 @@ -import {linkLabelAndInput} from './base.js'; +import {linkLabelAndInput} from './base.ts'; export function initAriaCheckboxPatch() { // link the label and the input element so it's clickable and accessible diff --git a/web_src/js/modules/fomantic/dimmer.js b/web_src/js/modules/fomantic/dimmer.ts index e027838d4a..e59b6e9eea 100644 --- a/web_src/js/modules/fomantic/dimmer.js +++ b/web_src/js/modules/fomantic/dimmer.ts @@ -1,5 +1,5 @@ import $ from 'jquery'; -import {queryElemChildren} from '../../utils/dom.js'; +import {queryElemChildren} from '../../utils/dom.ts'; export function initFomanticDimmer() { // stand-in for removed dimmer module diff --git a/web_src/js/modules/fomantic/dropdown.js b/web_src/js/modules/fomantic/dropdown.ts index bbffb59152..7ef6aed62b 100644 --- a/web_src/js/modules/fomantic/dropdown.js +++ b/web_src/js/modules/fomantic/dropdown.ts @@ -1,5 +1,5 @@ import $ from 'jquery'; -import {generateAriaId} from './base.js'; +import {generateAriaId} from './base.ts'; const ariaPatchKey = '_giteaAriaPatchDropdown'; const fomanticDropdownFn = $.fn.dropdown; diff --git a/web_src/js/modules/fomantic/form.js b/web_src/js/modules/fomantic/form.ts index 3bb0058902..841d945353 100644 --- a/web_src/js/modules/fomantic/form.js +++ b/web_src/js/modules/fomantic/form.ts @@ -1,4 +1,4 @@ -import {linkLabelAndInput} from './base.js'; +import {linkLabelAndInput} from './base.ts'; export function initAriaFormFieldPatch() { // link the label and the input element so it's clickable and accessible diff --git a/web_src/js/modules/fomantic/modal.js b/web_src/js/modules/fomantic/modal.ts index 8b455cf4de..8b455cf4de 100644 --- a/web_src/js/modules/fomantic/modal.js +++ b/web_src/js/modules/fomantic/modal.ts diff --git a/web_src/js/modules/fomantic/transition.js b/web_src/js/modules/fomantic/transition.ts index 78aa0538b0..78aa0538b0 100644 --- a/web_src/js/modules/fomantic/transition.js +++ b/web_src/js/modules/fomantic/transition.ts diff --git a/web_src/js/modules/sortable.js b/web_src/js/modules/sortable.ts index 1c9adb6d72..1c9adb6d72 100644 --- a/web_src/js/modules/sortable.js +++ b/web_src/js/modules/sortable.ts diff --git a/web_src/js/modules/stores.js b/web_src/js/modules/stores.ts index 1a0ed7eda1..1a0ed7eda1 100644 --- a/web_src/js/modules/stores.js +++ b/web_src/js/modules/stores.ts diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.ts index a18c94cafb..a18bad5db7 100644 --- a/web_src/js/modules/tippy.js +++ b/web_src/js/modules/tippy.ts @@ -1,6 +1,6 @@ import tippy, {followCursor} from 'tippy.js'; -import {isDocumentFragmentOrElementNode} from '../utils/dom.js'; -import {formatDatetime} from '../utils/time.js'; +import {isDocumentFragmentOrElementNode} from '../utils/dom.ts'; +import {formatDatetime} from '../utils/time.ts'; const visibleInstances = new Set(); const arrowSvg = `<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>`; diff --git a/web_src/js/modules/toast.test.js b/web_src/js/modules/toast.test.ts index 357f18dbcd..b29e9a32bd 100644 --- a/web_src/js/modules/toast.test.js +++ b/web_src/js/modules/toast.test.ts @@ -1,4 +1,4 @@ -import {showInfoToast, showErrorToast, showWarningToast} from './toast.js'; +import {showInfoToast, showErrorToast, showWarningToast} from './toast.ts'; test('showInfoToast', async () => { showInfoToast('success 😀', {duration: -1}); diff --git a/web_src/js/modules/toast.js b/web_src/js/modules/toast.ts index 627e24a1ff..cded48e6c2 100644 --- a/web_src/js/modules/toast.js +++ b/web_src/js/modules/toast.ts @@ -1,6 +1,6 @@ import {htmlEscape} from 'escape-goat'; -import {svg} from '../svg.js'; -import {animateOnce, showElem} from '../utils/dom.js'; +import {svg} from '../svg.ts'; +import {animateOnce, showElem} from '../utils/dom.ts'; import Toastify from 'toastify-js'; // don't use "async import", because when network error occurs, the "async import" also fails and nothing is shown const levels = { diff --git a/web_src/js/modules/worker.js b/web_src/js/modules/worker.ts index ef3f1dea48..ddc02d7a7d 100644 --- a/web_src/js/modules/worker.js +++ b/web_src/js/modules/worker.ts @@ -1,4 +1,4 @@ -import {sleep} from '../utils.js'; +import {sleep} from '../utils.ts'; const {appSubUrl} = window.config; diff --git a/web_src/js/render/ansi.test.js b/web_src/js/render/ansi.test.ts index 5afff71c29..21b7523994 100644 --- a/web_src/js/render/ansi.test.js +++ b/web_src/js/render/ansi.test.ts @@ -1,4 +1,4 @@ -import {renderAnsi} from './ansi.js'; +import {renderAnsi} from './ansi.ts'; test('renderAnsi', () => { expect(renderAnsi('abc')).toEqual('abc'); diff --git a/web_src/js/render/ansi.js b/web_src/js/render/ansi.ts index bb622dd1eb..bb622dd1eb 100644 --- a/web_src/js/render/ansi.js +++ b/web_src/js/render/ansi.ts diff --git a/web_src/js/render/pdf.js b/web_src/js/render/pdf.ts index f31f161e6e..f31f161e6e 100644 --- a/web_src/js/render/pdf.js +++ b/web_src/js/render/pdf.ts diff --git a/web_src/js/standalone/devtest.js b/web_src/js/standalone/devtest.ts index d3e3e13a87..3489697a2f 100644 --- a/web_src/js/standalone/devtest.js +++ b/web_src/js/standalone/devtest.ts @@ -1,4 +1,4 @@ -import {showInfoToast, showWarningToast, showErrorToast} from '../modules/toast.js'; +import {showInfoToast, showWarningToast, showErrorToast} from '../modules/toast.ts'; function initDevtestToast() { const levelMap = {info: showInfoToast, warning: showWarningToast, error: showErrorToast}; diff --git a/web_src/js/standalone/swagger.js b/web_src/js/standalone/swagger.ts index 2928813167..2928813167 100644 --- a/web_src/js/standalone/swagger.js +++ b/web_src/js/standalone/swagger.ts diff --git a/web_src/js/svg.test.js b/web_src/js/svg.test.ts index 06b320c860..015758a271 100644 --- a/web_src/js/svg.test.js +++ b/web_src/js/svg.test.ts @@ -1,4 +1,4 @@ -import {svg, SvgIcon, svgParseOuterInner} from './svg.js'; +import {svg, SvgIcon, svgParseOuterInner} from './svg.ts'; import {createApp, h} from 'vue'; test('svg', () => { diff --git a/web_src/js/svg.js b/web_src/js/svg.ts index 913d26779f..a0fe52a7be 100644 --- a/web_src/js/svg.js +++ b/web_src/js/svg.ts @@ -1,5 +1,5 @@ import {h} from 'vue'; -import {parseDom, serializeXml} from './utils.js'; +import {parseDom, serializeXml} from './utils.ts'; import giteaDoubleChevronLeft from '../../public/assets/img/svg/gitea-double-chevron-left.svg'; import giteaDoubleChevronRight from '../../public/assets/img/svg/gitea-double-chevron-right.svg'; import giteaEmptyCheckbox from '../../public/assets/img/svg/gitea-empty-checkbox.svg'; diff --git a/web_src/js/utils.test.js b/web_src/js/utils.test.ts index 1ec3d3630b..4c09f49ba8 100644 --- a/web_src/js/utils.test.js +++ b/web_src/js/utils.test.ts @@ -2,7 +2,7 @@ import { basename, extname, isObject, stripTags, parseIssueHref, parseUrl, translateMonth, translateDay, blobToDataURI, toAbsoluteUrl, encodeURLEncodedBase64, decodeURLEncodedBase64, isImageFile, isVideoFile, -} from './utils.js'; +} from './utils.ts'; test('basename', () => { expect(basename('/path/to/file.js')).toEqual('file.js'); diff --git a/web_src/js/utils.js b/web_src/js/utils.ts index 2d40fa20a8..2d40fa20a8 100644 --- a/web_src/js/utils.js +++ b/web_src/js/utils.ts diff --git a/web_src/js/utils/color.test.js b/web_src/js/utils/color.test.ts index fee9afc776..9e4fbcca64 100644 --- a/web_src/js/utils/color.test.js +++ b/web_src/js/utils/color.test.ts @@ -1,4 +1,4 @@ -import {contrastColor} from './color.js'; +import {contrastColor} from './color.ts'; test('contrastColor', () => { expect(contrastColor('#d73a4a')).toBe('#fff'); diff --git a/web_src/js/utils/color.js b/web_src/js/utils/color.ts index 198f97c454..198f97c454 100644 --- a/web_src/js/utils/color.js +++ b/web_src/js/utils/color.ts diff --git a/web_src/js/utils/dom.test.js b/web_src/js/utils/dom.test.ts index b9212ec284..d873484969 100644 --- a/web_src/js/utils/dom.test.js +++ b/web_src/js/utils/dom.test.ts @@ -1,4 +1,4 @@ -import {createElementFromAttrs, createElementFromHTML} from './dom.js'; +import {createElementFromAttrs, createElementFromHTML} from './dom.ts'; test('createElementFromHTML', () => { expect(createElementFromHTML('<a>foo<span>bar</span></a>').outerHTML).toEqual('<a>foo<span>bar</span></a>'); diff --git a/web_src/js/utils/dom.js b/web_src/js/utils/dom.ts index 8d75c724de..8d75c724de 100644 --- a/web_src/js/utils/dom.js +++ b/web_src/js/utils/dom.ts diff --git a/web_src/js/utils/image.test.js b/web_src/js/utils/image.test.ts index af56ed2331..da0605f1d0 100644 --- a/web_src/js/utils/image.test.js +++ b/web_src/js/utils/image.test.ts @@ -1,4 +1,4 @@ -import {pngChunks, imageInfo} from './image.js'; +import {pngChunks, imageInfo} from './image.ts'; const pngNoPhys = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAADUlEQVQIHQECAP3/AAAAAgABzePRKwAAAABJRU5ErkJggg=='; const pngPhys = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAEElEQVQI12OQNZcAIgYIBQAL8gGxdzzM0A=='; diff --git a/web_src/js/utils/image.js b/web_src/js/utils/image.ts index c71d715941..c71d715941 100644 --- a/web_src/js/utils/image.js +++ b/web_src/js/utils/image.ts diff --git a/web_src/js/utils/match.test.js b/web_src/js/utils/match.test.ts index 1e30b451d4..d3b2d9fe99 100644 --- a/web_src/js/utils/match.test.js +++ b/web_src/js/utils/match.test.ts @@ -1,4 +1,4 @@ -import {matchEmoji, matchMention} from './match.js'; +import {matchEmoji, matchMention} from './match.ts'; test('matchEmoji', () => { expect(matchEmoji('')).toEqual([ diff --git a/web_src/js/utils/match.js b/web_src/js/utils/match.ts index 17fdfed113..17fdfed113 100644 --- a/web_src/js/utils/match.js +++ b/web_src/js/utils/match.ts diff --git a/web_src/js/utils/time.test.js b/web_src/js/utils/time.test.ts index dd1114ce7f..3cd23df557 100644 --- a/web_src/js/utils/time.test.js +++ b/web_src/js/utils/time.test.ts @@ -1,4 +1,4 @@ -import {startDaysBetween} from './time.js'; +import {startDaysBetween} from './time.ts'; test('startDaysBetween', () => { expect(startDaysBetween(new Date('2024-02-15'), new Date('2024-04-18'))).toEqual([ diff --git a/web_src/js/utils/time.js b/web_src/js/utils/time.ts index 7c7eabd1a3..d3a986e736 100644 --- a/web_src/js/utils/time.js +++ b/web_src/js/utils/time.ts @@ -1,6 +1,6 @@ import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc.js'; -import {getCurrentLocale} from '../utils.js'; +import {getCurrentLocale} from '../utils.ts'; dayjs.extend(utc); diff --git a/web_src/js/utils/url.test.js b/web_src/js/utils/url.test.ts index 08c6373ffb..25fda79b19 100644 --- a/web_src/js/utils/url.test.js +++ b/web_src/js/utils/url.test.ts @@ -1,4 +1,4 @@ -import {pathEscapeSegments, isUrl} from './url.js'; +import {pathEscapeSegments, isUrl} from './url.ts'; test('pathEscapeSegments', () => { expect(pathEscapeSegments('a/b/c')).toEqual('a/b/c'); diff --git a/web_src/js/utils/url.js b/web_src/js/utils/url.ts index 470ece31b0..470ece31b0 100644 --- a/web_src/js/utils/url.js +++ b/web_src/js/utils/url.ts diff --git a/web_src/js/vendor/jquery.are-you-sure.js b/web_src/js/vendor/jquery.are-you-sure.ts index e7bb203c5a..e7bb203c5a 100644 --- a/web_src/js/vendor/jquery.are-you-sure.js +++ b/web_src/js/vendor/jquery.are-you-sure.ts diff --git a/web_src/js/vitest.setup.js b/web_src/js/vitest.setup.ts index 6fb0f5dc8f..6fb0f5dc8f 100644 --- a/web_src/js/vitest.setup.js +++ b/web_src/js/vitest.setup.ts diff --git a/web_src/js/webcomponents/absolute-date.test.js b/web_src/js/webcomponents/absolute-date.test.ts index ba04451b65..a591df7c10 100644 --- a/web_src/js/webcomponents/absolute-date.test.js +++ b/web_src/js/webcomponents/absolute-date.test.ts @@ -1,4 +1,4 @@ -import {toAbsoluteLocaleDate} from './absolute-date.js'; +import {toAbsoluteLocaleDate} from './absolute-date.ts'; test('toAbsoluteLocaleDate', () => { expect(toAbsoluteLocaleDate('2024-03-15', 'en-US', { diff --git a/web_src/js/webcomponents/absolute-date.js b/web_src/js/webcomponents/absolute-date.ts index d2be455302..d2be455302 100644 --- a/web_src/js/webcomponents/absolute-date.js +++ b/web_src/js/webcomponents/absolute-date.ts diff --git a/web_src/js/webcomponents/index.js b/web_src/js/webcomponents/index.js deleted file mode 100644 index 7cec9da734..0000000000 --- a/web_src/js/webcomponents/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import './polyfills.js'; -import '@github/relative-time-element'; -import './origin-url.js'; -import './overflow-menu.js'; -import './absolute-date.js'; diff --git a/web_src/js/webcomponents/index.ts b/web_src/js/webcomponents/index.ts new file mode 100644 index 0000000000..6c0f555864 --- /dev/null +++ b/web_src/js/webcomponents/index.ts @@ -0,0 +1,5 @@ +import './polyfills.ts'; +import '@github/relative-time-element'; +import './origin-url.ts'; +import './overflow-menu.ts'; +import './absolute-date.ts'; diff --git a/web_src/js/webcomponents/origin-url.test.js b/web_src/js/webcomponents/origin-url.test.ts index 3b2ab89f2a..4082e53aea 100644 --- a/web_src/js/webcomponents/origin-url.test.js +++ b/web_src/js/webcomponents/origin-url.test.ts @@ -1,4 +1,4 @@ -import {toOriginUrl} from './origin-url.js'; +import {toOriginUrl} from './origin-url.ts'; test('toOriginUrl', () => { const oldLocation = window.location; diff --git a/web_src/js/webcomponents/origin-url.js b/web_src/js/webcomponents/origin-url.ts index 09aa77f2c0..09aa77f2c0 100644 --- a/web_src/js/webcomponents/origin-url.js +++ b/web_src/js/webcomponents/origin-url.ts diff --git a/web_src/js/webcomponents/overflow-menu.js b/web_src/js/webcomponents/overflow-menu.ts index 0e91db6575..2efeb9222b 100644 --- a/web_src/js/webcomponents/overflow-menu.js +++ b/web_src/js/webcomponents/overflow-menu.ts @@ -1,6 +1,6 @@ import {throttle} from 'throttle-debounce'; -import {createTippy} from '../modules/tippy.js'; -import {isDocumentFragmentOrElementNode} from '../utils/dom.js'; +import {createTippy} from '../modules/tippy.ts'; +import {isDocumentFragmentOrElementNode} from '../utils/dom.ts'; import octiconKebabHorizontal from '../../../public/assets/img/svg/octicon-kebab-horizontal.svg'; window.customElements.define('overflow-menu', class extends HTMLElement { diff --git a/web_src/js/webcomponents/polyfills.js b/web_src/js/webcomponents/polyfills.ts index 38f50fa02f..38f50fa02f 100644 --- a/web_src/js/webcomponents/polyfills.js +++ b/web_src/js/webcomponents/polyfills.ts |