mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-21 11:09:05 +01:00
Convert frontend code to typescript (#31559)
None of the frontend js/ts files was touched besides these two commands
(edit: no longer true, I touched one file in
61105d0618
because of a deprecation that was not showing before the rename).
`tsc` currently reports 778 errors, so I have disabled it in CI as
planned.
Everything appears to work fine.
This commit is contained in:
parent
5115c278ff
commit
5791a73e75
@ -58,10 +58,10 @@ overrides:
|
|||||||
worker: true
|
worker: true
|
||||||
rules:
|
rules:
|
||||||
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
|
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
|
||||||
- files: ["*.config.*"]
|
- files: ["*.config.*", "**/*.d.ts"]
|
||||||
rules:
|
rules:
|
||||||
i/no-unused-modules: [0]
|
i/no-unused-modules: [0]
|
||||||
- files: ["**/*.test.*", "web_src/js/test/setup.js"]
|
- files: ["**/*.test.*", "web_src/js/test/setup.ts"]
|
||||||
env:
|
env:
|
||||||
vitest-globals/env: true
|
vitest-globals/env: true
|
||||||
rules:
|
rules:
|
||||||
@ -114,7 +114,7 @@ overrides:
|
|||||||
vitest/valid-describe-callback: [2]
|
vitest/valid-describe-callback: [2]
|
||||||
vitest/valid-expect: [2]
|
vitest/valid-expect: [2]
|
||||||
vitest/valid-title: [2]
|
vitest/valid-title: [2]
|
||||||
- files: ["web_src/js/modules/fetch.js", "web_src/js/standalone/**/*"]
|
- files: ["web_src/js/modules/fetch.ts", "web_src/js/standalone/**/*"]
|
||||||
rules:
|
rules:
|
||||||
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
|
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
|
||||||
- files: ["**/*.vue"]
|
- files: ["**/*.vue"]
|
||||||
@ -467,7 +467,7 @@ rules:
|
|||||||
no-dupe-else-if: [2]
|
no-dupe-else-if: [2]
|
||||||
no-dupe-keys: [2]
|
no-dupe-keys: [2]
|
||||||
no-duplicate-case: [2]
|
no-duplicate-case: [2]
|
||||||
no-duplicate-imports: [2]
|
no-duplicate-imports: [0]
|
||||||
no-else-return: [2]
|
no-else-return: [2]
|
||||||
no-empty-character-class: [2]
|
no-empty-character-class: [2]
|
||||||
no-empty-function: [0]
|
no-empty-function: [0]
|
||||||
@ -619,7 +619,7 @@ rules:
|
|||||||
no-restricted-exports: [0]
|
no-restricted-exports: [0]
|
||||||
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top, __dirname, __filename]
|
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top, __dirname, __filename]
|
||||||
no-restricted-imports: [0]
|
no-restricted-imports: [0]
|
||||||
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.js instead"}]
|
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.ts instead"}]
|
||||||
no-return-assign: [0]
|
no-return-assign: [0]
|
||||||
no-script-url: [2]
|
no-script-url: [2]
|
||||||
no-self-assign: [2, {props: true}]
|
no-self-assign: [2, {props: true}]
|
||||||
|
6
Makefile
6
Makefile
@ -144,7 +144,7 @@ TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMAN
|
|||||||
GO_DIRS := build cmd models modules routers services tests
|
GO_DIRS := build cmd models modules routers services tests
|
||||||
WEB_DIRS := web_src/js web_src/css
|
WEB_DIRS := web_src/js web_src/css
|
||||||
|
|
||||||
ESLINT_FILES := web_src/js tools *.js tests/e2e
|
ESLINT_FILES := web_src/js tools *.js *.ts tests/e2e
|
||||||
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
|
STYLELINT_FILES := web_src/css web_src/js/components/*.vue
|
||||||
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github $(filter-out CHANGELOG.md, $(wildcard *.go *.js *.md *.yml *.yaml *.toml))
|
SPELLCHECK_FILES := $(GO_DIRS) $(WEB_DIRS) docs/content templates options/locale/locale_en-US.ini .github $(filter-out CHANGELOG.md, $(wildcard *.go *.js *.md *.yml *.yaml *.toml))
|
||||||
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.ini
|
EDITORCONFIG_FILES := templates .github/workflows options/locale/locale_en-US.ini
|
||||||
@ -376,12 +376,12 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
|
|||||||
.PHONY: lint-js
|
.PHONY: lint-js
|
||||||
lint-js: node_modules
|
lint-js: node_modules
|
||||||
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES)
|
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES)
|
||||||
npx tsc
|
# npx tsc
|
||||||
|
|
||||||
.PHONY: lint-js-fix
|
.PHONY: lint-js-fix
|
||||||
lint-js-fix: node_modules
|
lint-js-fix: node_modules
|
||||||
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES) --fix
|
npx eslint --color --max-warnings=0 --ext js,ts,vue $(ESLINT_FILES) --fix
|
||||||
npx tsc
|
# npx tsc
|
||||||
|
|
||||||
.PHONY: lint-css
|
.PHONY: lint-css
|
||||||
lint-css: node_modules
|
lint-css: node_modules
|
||||||
|
157
package-lock.json
generated
157
package-lock.json
generated
@ -69,6 +69,16 @@
|
|||||||
"@stoplight/spectral-cli": "6.11.1",
|
"@stoplight/spectral-cli": "6.11.1",
|
||||||
"@stylistic/eslint-plugin-js": "2.2.1",
|
"@stylistic/eslint-plugin-js": "2.2.1",
|
||||||
"@stylistic/stylelint-plugin": "2.1.2",
|
"@stylistic/stylelint-plugin": "2.1.2",
|
||||||
|
"@types/dropzone": "5.7.8",
|
||||||
|
"@types/jquery": "3.5.30",
|
||||||
|
"@types/katex": "0.16.7",
|
||||||
|
"@types/license-checker-webpack-plugin": "0.2.4",
|
||||||
|
"@types/pdfobject": "2.2.5",
|
||||||
|
"@types/sortablejs": "1.15.8",
|
||||||
|
"@types/swagger-ui-dist": "3.30.5",
|
||||||
|
"@types/throttle-debounce": "5.0.2",
|
||||||
|
"@types/tinycolor2": "1.4.6",
|
||||||
|
"@types/toastify-js": "1.12.3",
|
||||||
"@typescript-eslint/eslint-plugin": "7.14.1",
|
"@typescript-eslint/eslint-plugin": "7.14.1",
|
||||||
"@typescript-eslint/parser": "7.14.1",
|
"@typescript-eslint/parser": "7.14.1",
|
||||||
"@vitejs/plugin-vue": "5.0.5",
|
"@vitejs/plugin-vue": "5.0.5",
|
||||||
@ -2271,6 +2281,16 @@
|
|||||||
"@types/ms": "*"
|
"@types/ms": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/dropzone": {
|
||||||
|
"version": "5.7.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/dropzone/-/dropzone-5.7.8.tgz",
|
||||||
|
"integrity": "sha512-+L0/KRMuB8cIiCe5AfF448nGMpY+gHiSakqsqT3plEIfgqSV+gcVs1AkngM9zZG8hi6lgMxy4iYEuGXXmqjYvg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/jquery": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/es-aggregate-error": {
|
"node_modules/@types/es-aggregate-error": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/es-aggregate-error/-/es-aggregate-error-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/es-aggregate-error/-/es-aggregate-error-1.0.6.tgz",
|
||||||
@ -2303,6 +2323,16 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
|
||||||
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw=="
|
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw=="
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/jquery": {
|
||||||
|
"version": "3.5.30",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.30.tgz",
|
||||||
|
"integrity": "sha512-nbWKkkyb919DOUxjmRVk8vwtDb0/k8FKncmUKFi+NY+QXqWltooxTrswvz4LspQwxvLdvzBN1TImr6cw3aQx2A==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/sizzle": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/json-schema": {
|
"node_modules/@types/json-schema": {
|
||||||
"version": "7.0.15",
|
"version": "7.0.15",
|
||||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
||||||
@ -2314,6 +2344,23 @@
|
|||||||
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
|
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/katex": {
|
||||||
|
"version": "0.16.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz",
|
||||||
|
"integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/license-checker-webpack-plugin": {
|
||||||
|
"version": "0.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/license-checker-webpack-plugin/-/license-checker-webpack-plugin-0.2.4.tgz",
|
||||||
|
"integrity": "sha512-QTWqHJ5T9lgm3vPwWSZnBwAB+15zl4QBfGoNDcjnthHQEP8VTV87fYfp1HVeCtrDip73xWMtasQeA4QHQ0nFLw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/webpack": "^4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/marked": {
|
"node_modules/@types/marked": {
|
||||||
"version": "4.3.2",
|
"version": "4.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.3.2.tgz",
|
||||||
@ -2346,12 +2393,54 @@
|
|||||||
"integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==",
|
"integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/pdfobject": {
|
||||||
|
"version": "2.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/pdfobject/-/pdfobject-2.2.5.tgz",
|
||||||
|
"integrity": "sha512-7gD5tqc/RUDq0PyoLemL0vEHxBYi+zY0WVaFAx/Y0jBsXFgot1vB9No1GhDZGwRGJMCIZbgAb74QG9MTyTNU/g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/sarif": {
|
"node_modules/@types/sarif": {
|
||||||
"version": "2.1.7",
|
"version": "2.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/@types/sarif/-/sarif-2.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/sarif/-/sarif-2.1.7.tgz",
|
||||||
"integrity": "sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ==",
|
"integrity": "sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/sizzle": {
|
||||||
|
"version": "2.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz",
|
||||||
|
"integrity": "sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/sortablejs": {
|
||||||
|
"version": "1.15.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/sortablejs/-/sortablejs-1.15.8.tgz",
|
||||||
|
"integrity": "sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/source-list-map": {
|
||||||
|
"version": "0.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.6.tgz",
|
||||||
|
"integrity": "sha512-5JcVt1u5HDmlXkwOD2nslZVllBBc7HDuOICfiZah2Z0is8M8g+ddAEawbmd3VjedfDHBzxCaXLs07QEmb7y54g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/swagger-ui-dist": {
|
||||||
|
"version": "3.30.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/swagger-ui-dist/-/swagger-ui-dist-3.30.5.tgz",
|
||||||
|
"integrity": "sha512-SrXhD9L8qeIxJzN+o1kmf3wXeVf/+Km3jIdRM1+Yq3I5b/dlF5TcGr5WCVM7I/cBYpgf43/gCPIucQ13AhICiw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/tapable": {
|
||||||
|
"version": "1.0.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.12.tgz",
|
||||||
|
"integrity": "sha512-bTHG8fcxEqv1M9+TD14P8ok8hjxoOCkfKc8XXLaaD05kI7ohpeI956jtDOD3XHKBQrlyPughUtzm1jtVhHpA5Q==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/tern": {
|
"node_modules/@types/tern": {
|
||||||
"version": "0.23.9",
|
"version": "0.23.9",
|
||||||
"resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz",
|
"resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz",
|
||||||
@ -2360,6 +2449,37 @@
|
|||||||
"@types/estree": "*"
|
"@types/estree": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/throttle-debounce": {
|
||||||
|
"version": "5.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-5.0.2.tgz",
|
||||||
|
"integrity": "sha512-pDzSNulqooSKvSNcksnV72nk8p7gRqN8As71Sp28nov1IgmPKWbOEIwAWvBME5pPTtaXJAvG3O4oc76HlQ4kqQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/tinycolor2": {
|
||||||
|
"version": "1.4.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/tinycolor2/-/tinycolor2-1.4.6.tgz",
|
||||||
|
"integrity": "sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/toastify-js": {
|
||||||
|
"version": "1.12.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/toastify-js/-/toastify-js-1.12.3.tgz",
|
||||||
|
"integrity": "sha512-9RjLlbAHMSaae/KZNHGv19VG4gcLIm3YjvacCXBtfMfYn26h76YP5oxXI8k26q4iKXCB9LNfv18lsoS0JnFPTg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/uglify-js": {
|
||||||
|
"version": "3.17.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.5.tgz",
|
||||||
|
"integrity": "sha512-TU+fZFBTBcXj/GpDpDaBmgWk/gn96kMZ+uocaFUlV2f8a6WdMzzI44QBCmGcCiYR0Y6ZlNRiyUyKKt5nl/lbzQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"source-map": "^0.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/unist": {
|
"node_modules/@types/unist": {
|
||||||
"version": "2.0.10",
|
"version": "2.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz",
|
||||||
@ -2371,6 +2491,43 @@
|
|||||||
"integrity": "sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg==",
|
"integrity": "sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/webpack": {
|
||||||
|
"version": "4.41.38",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.38.tgz",
|
||||||
|
"integrity": "sha512-oOW7E931XJU1mVfCnxCVgv8GLFL768pDO5u2Gzk82i8yTIgX6i7cntyZOkZYb/JtYM8252SN9bQp9tgkVDSsRw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"@types/tapable": "^1",
|
||||||
|
"@types/uglify-js": "*",
|
||||||
|
"@types/webpack-sources": "*",
|
||||||
|
"anymatch": "^3.0.0",
|
||||||
|
"source-map": "^0.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/webpack-sources": {
|
||||||
|
"version": "3.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-3.2.3.tgz",
|
||||||
|
"integrity": "sha512-4nZOdMwSPHZ4pTEZzSp0AsTM4K7Qmu40UKW4tJDiOVs20UzYF9l+qUe4s0ftfN0pin06n+5cWWDJXH+sbhAiDw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"@types/source-list-map": "*",
|
||||||
|
"source-map": "^0.7.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/webpack-sources/node_modules/source-map": {
|
||||||
|
"version": "0.7.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
|
||||||
|
"integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "7.14.1",
|
"version": "7.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.14.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.14.1.tgz",
|
||||||
|
10
package.json
10
package.json
@ -68,6 +68,16 @@
|
|||||||
"@stoplight/spectral-cli": "6.11.1",
|
"@stoplight/spectral-cli": "6.11.1",
|
||||||
"@stylistic/eslint-plugin-js": "2.2.1",
|
"@stylistic/eslint-plugin-js": "2.2.1",
|
||||||
"@stylistic/stylelint-plugin": "2.1.2",
|
"@stylistic/stylelint-plugin": "2.1.2",
|
||||||
|
"@types/dropzone": "5.7.8",
|
||||||
|
"@types/jquery": "3.5.30",
|
||||||
|
"@types/katex": "0.16.7",
|
||||||
|
"@types/license-checker-webpack-plugin": "0.2.4",
|
||||||
|
"@types/pdfobject": "2.2.5",
|
||||||
|
"@types/sortablejs": "1.15.8",
|
||||||
|
"@types/swagger-ui-dist": "3.30.5",
|
||||||
|
"@types/throttle-debounce": "5.0.2",
|
||||||
|
"@types/tinycolor2": "1.4.6",
|
||||||
|
"@types/toastify-js": "1.12.3",
|
||||||
"@typescript-eslint/eslint-plugin": "7.14.1",
|
"@typescript-eslint/eslint-plugin": "7.14.1",
|
||||||
"@typescript-eslint/parser": "7.14.1",
|
"@typescript-eslint/parser": "7.14.1",
|
||||||
"@vitejs/plugin-vue": "5.0.5",
|
"@vitejs/plugin-vue": "5.0.5",
|
||||||
|
@ -26,5 +26,10 @@
|
|||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noPropertyAccessFromIndexSignature": false,
|
"noPropertyAccessFromIndexSignature": false,
|
||||||
"exactOptionalPropertyTypes": false,
|
"exactOptionalPropertyTypes": false,
|
||||||
|
"sourceMap": true,
|
||||||
|
"types": [
|
||||||
|
"vitest/globals",
|
||||||
|
"./types.d.ts",
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
types.d.ts
vendored
Normal file
4
types.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
declare module '*.svg' {
|
||||||
|
const value: string;
|
||||||
|
export default value;
|
||||||
|
}
|
@ -4,8 +4,8 @@ import {stringPlugin} from 'vite-string-plugin';
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
test: {
|
test: {
|
||||||
include: ['web_src/**/*.test.js'],
|
include: ['web_src/**/*.test.ts'],
|
||||||
setupFiles: ['web_src/js/vitest.setup.js'],
|
setupFiles: ['web_src/js/vitest.setup.ts'],
|
||||||
environment: 'happy-dom',
|
environment: 'happy-dom',
|
||||||
testTimeout: 20000,
|
testTimeout: 20000,
|
||||||
open: false,
|
open: false,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {showGlobalErrorMessage} from './bootstrap.js';
|
import {showGlobalErrorMessage} from './bootstrap.ts';
|
||||||
|
|
||||||
test('showGlobalErrorMessage', () => {
|
test('showGlobalErrorMessage', () => {
|
||||||
document.body.innerHTML = '<div class="page-content"></div>';
|
document.body.innerHTML = '<div class="page-content"></div>';
|
@ -2,8 +2,8 @@
|
|||||||
Please also update the template file above if this vue is modified.
|
Please also update the template file above if this vue is modified.
|
||||||
action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
|
action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
|
||||||
-->
|
-->
|
||||||
<script>
|
<script lang="ts">
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {SvgIcon},
|
components: {SvgIcon},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
// TODO: Switch to upstream after https://github.com/razorness/vue3-calendar-heatmap/pull/34 is merged
|
// TODO: Switch to upstream after https://github.com/razorness/vue3-calendar-heatmap/pull/34 is merged
|
||||||
import {CalendarHeatmap} from '@silverwind/vue3-calendar-heatmap';
|
import {CalendarHeatmap} from '@silverwind/vue3-calendar-heatmap';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const {appSubUrl, i18n} = window.config;
|
const {appSubUrl, i18n} = window.config;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {createApp, nextTick} from 'vue';
|
import {createApp, nextTick} from 'vue';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const {appSubUrl, assetUrlPrefix, pageData} = window.config;
|
const {appSubUrl, assetUrlPrefix, pageData} = window.config;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {SvgIcon},
|
components: {SvgIcon},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {loadMoreFiles} from '../features/repo-diff.js';
|
import {loadMoreFiles} from '../features/repo-diff.ts';
|
||||||
import {diffTreeStore} from '../modules/stores.js';
|
import {diffTreeStore} from '../modules/stores.ts';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data: () => {
|
data: () => {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import DiffFileTreeItem from './DiffFileTreeItem.vue';
|
import DiffFileTreeItem from './DiffFileTreeItem.vue';
|
||||||
import {loadMoreFiles} from '../features/repo-diff.js';
|
import {loadMoreFiles} from '../features/repo-diff.ts';
|
||||||
import {toggleElem} from '../utils/dom.js';
|
import {toggleElem} from '../utils/dom.ts';
|
||||||
import {diffTreeStore} from '../modules/stores.js';
|
import {diffTreeStore} from '../modules/stores.ts';
|
||||||
import {setFileFolding} from '../features/file-fold.js';
|
import {setFileFolding} from '../features/file-fold.ts';
|
||||||
|
|
||||||
const LOCAL_STORAGE_KEY = 'diff_file_tree_visible';
|
const LOCAL_STORAGE_KEY = 'diff_file_tree_visible';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import {diffTreeStore} from '../modules/stores.js';
|
import {diffTreeStore} from '../modules/stores.ts';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {SvgIcon},
|
components: {SvgIcon},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import {toggleElem} from '../utils/dom.js';
|
import {toggleElem} from '../utils/dom.ts';
|
||||||
|
|
||||||
const {csrfToken, pageData} = window.config;
|
const {csrfToken, pageData} = window.config;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import ActionRunStatus from './ActionRunStatus.vue';
|
import ActionRunStatus from './ActionRunStatus.vue';
|
||||||
import {createApp} from 'vue';
|
import {createApp} from 'vue';
|
||||||
import {toggleElem} from '../utils/dom.js';
|
import {toggleElem} from '../utils/dom.ts';
|
||||||
import {formatDatetime} from '../utils/time.js';
|
import {formatDatetime} from '../utils/time.ts';
|
||||||
import {renderAnsi} from '../render/ansi.js';
|
import {renderAnsi} from '../render/ansi.ts';
|
||||||
import {GET, POST, DELETE} from '../modules/fetch.js';
|
import {GET, POST, DELETE} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const sfc = {
|
const sfc = {
|
||||||
name: 'RepoActionView',
|
name: 'RepoActionView',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import VueBarGraph from 'vue-bar-graph';
|
import VueBarGraph from 'vue-bar-graph';
|
||||||
import {createApp} from 'vue';
|
import {createApp} from 'vue';
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {createApp, nextTick} from 'vue';
|
import {createApp, nextTick} from 'vue';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import {pathEscapeSegments} from '../utils/url.js';
|
import {pathEscapeSegments} from '../utils/url.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const sfc = {
|
const sfc = {
|
||||||
components: {SvgIcon},
|
components: {SvgIcon},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import {
|
import {
|
||||||
Chart,
|
Chart,
|
||||||
Legend,
|
Legend,
|
||||||
@ -9,15 +9,15 @@ import {
|
|||||||
LineElement,
|
LineElement,
|
||||||
Filler,
|
Filler,
|
||||||
} from 'chart.js';
|
} from 'chart.js';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
import {Line as ChartLine} from 'vue-chartjs';
|
import {Line as ChartLine} from 'vue-chartjs';
|
||||||
import {
|
import {
|
||||||
startDaysBetween,
|
startDaysBetween,
|
||||||
firstStartDateAfterDate,
|
firstStartDateAfterDate,
|
||||||
fillEmptyStartDaysWithZeroes,
|
fillEmptyStartDaysWithZeroes,
|
||||||
} from '../utils/time.js';
|
} from '../utils/time.ts';
|
||||||
import {chartJsColors} from '../utils/color.js';
|
import {chartJsColors} from '../utils/color.ts';
|
||||||
import {sleep} from '../utils.js';
|
import {sleep} from '../utils.ts';
|
||||||
import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm';
|
import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm';
|
||||||
|
|
||||||
const {pageData} = window.config;
|
const {pageData} = window.config;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import {
|
import {
|
||||||
Chart,
|
Chart,
|
||||||
Title,
|
Title,
|
||||||
@ -10,16 +10,16 @@ import {
|
|||||||
LineElement,
|
LineElement,
|
||||||
Filler,
|
Filler,
|
||||||
} from 'chart.js';
|
} from 'chart.js';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
import zoomPlugin from 'chartjs-plugin-zoom';
|
import zoomPlugin from 'chartjs-plugin-zoom';
|
||||||
import {Line as ChartLine} from 'vue-chartjs';
|
import {Line as ChartLine} from 'vue-chartjs';
|
||||||
import {
|
import {
|
||||||
startDaysBetween,
|
startDaysBetween,
|
||||||
firstStartDateAfterDate,
|
firstStartDateAfterDate,
|
||||||
fillEmptyStartDaysWithZeroes,
|
fillEmptyStartDaysWithZeroes,
|
||||||
} from '../utils/time.js';
|
} from '../utils/time.ts';
|
||||||
import {chartJsColors} from '../utils/color.js';
|
import {chartJsColors} from '../utils/color.ts';
|
||||||
import {sleep} from '../utils.js';
|
import {sleep} from '../utils.ts';
|
||||||
import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm';
|
import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {SvgIcon} from '../svg.js';
|
import {SvgIcon} from '../svg.ts';
|
||||||
import {
|
import {
|
||||||
Chart,
|
Chart,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
@ -7,15 +7,15 @@ import {
|
|||||||
LinearScale,
|
LinearScale,
|
||||||
TimeScale,
|
TimeScale,
|
||||||
} from 'chart.js';
|
} from 'chart.js';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
import {Bar} from 'vue-chartjs';
|
import {Bar} from 'vue-chartjs';
|
||||||
import {
|
import {
|
||||||
startDaysBetween,
|
startDaysBetween,
|
||||||
firstStartDateAfterDate,
|
firstStartDateAfterDate,
|
||||||
fillEmptyStartDaysWithZeroes,
|
fillEmptyStartDaysWithZeroes,
|
||||||
} from '../utils/time.js';
|
} from '../utils/time.ts';
|
||||||
import {chartJsColors} from '../utils/color.js';
|
import {chartJsColors} from '../utils/color.ts';
|
||||||
import {sleep} from '../utils.js';
|
import {sleep} from '../utils.ts';
|
||||||
import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm';
|
import 'chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm';
|
||||||
|
|
||||||
const {pageData} = window.config;
|
const {pageData} = window.config;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {createApp} from 'vue';
|
import {createApp} from 'vue';
|
||||||
import {hideElem, showElem} from '../utils/dom.js';
|
import {hideElem, showElem} from '../utils/dom.ts';
|
||||||
|
|
||||||
const sfc = {
|
const sfc = {
|
||||||
props: {
|
props: {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {checkAppUrl} from '../common-page.js';
|
import {checkAppUrl} from '../common-page.ts';
|
||||||
import {hideElem, showElem, toggleElem} from '../../utils/dom.js';
|
import {hideElem, showElem, toggleElem} from '../../utils/dom.ts';
|
||||||
import {POST} from '../../modules/fetch.js';
|
import {POST} from '../../modules/fetch.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
import {showTemporaryTooltip} from '../../modules/tippy.js';
|
import {showTemporaryTooltip} from '../../modules/tippy.ts';
|
||||||
import {POST} from '../../modules/fetch.js';
|
import {POST} from '../../modules/fetch.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
import {toggleElem} from '../../utils/dom.js';
|
import {toggleElem} from '../../utils/dom.ts';
|
||||||
import {POST} from '../../modules/fetch.js';
|
import {POST} from '../../modules/fetch.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
import {isDarkTheme} from '../utils.js';
|
import {isDarkTheme} from '../utils.ts';
|
||||||
|
|
||||||
export async function initCaptcha() {
|
export async function initCaptcha() {
|
||||||
const captchaEl = document.querySelector('#captcha');
|
const captchaEl = document.querySelector('#captcha');
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {getCurrentLocale} from '../utils.js';
|
import {getCurrentLocale} from '../utils.ts';
|
||||||
|
|
||||||
const {pageData} = window.config;
|
const {pageData} = window.config;
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
import {showTemporaryTooltip} from '../modules/tippy.js';
|
import {showTemporaryTooltip} from '../modules/tippy.ts';
|
||||||
import {toAbsoluteUrl} from '../utils.js';
|
import {toAbsoluteUrl} from '../utils.ts';
|
||||||
import {clippie} from 'clippie';
|
import {clippie} from 'clippie';
|
||||||
|
|
||||||
const {copy_success, copy_error} = window.config.i18n;
|
const {copy_success, copy_error} = window.config.i18n;
|
@ -1,6 +1,6 @@
|
|||||||
import tinycolor from 'tinycolor2';
|
import tinycolor from 'tinycolor2';
|
||||||
import {basename, extname, isObject, isDarkTheme} from '../utils.js';
|
import {basename, extname, isObject, isDarkTheme} from '../utils.ts';
|
||||||
import {onInputDebounce} from '../utils/dom.js';
|
import {onInputDebounce} from '../utils/dom.ts';
|
||||||
|
|
||||||
const languagesByFilename = {};
|
const languagesByFilename = {};
|
||||||
const languagesByExt = {};
|
const languagesByExt = {};
|
@ -1,4 +1,4 @@
|
|||||||
import {createTippy} from '../modules/tippy.js';
|
import {createTippy} from '../modules/tippy.ts';
|
||||||
|
|
||||||
export async function initColorPickers() {
|
export async function initColorPickers() {
|
||||||
const els = document.querySelectorAll('.js-color-picker-input');
|
const els = document.querySelectorAll('.js-color-picker-input');
|
@ -1,7 +1,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {POST} from '../modules/fetch.js';
|
import {POST} from '../modules/fetch.ts';
|
||||||
import {hideElem, showElem, toggleElem} from '../utils/dom.js';
|
import {hideElem, showElem, toggleElem} from '../utils/dom.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
|
|
||||||
export function initGlobalButtonClickOnEnter() {
|
export function initGlobalButtonClickOnEnter() {
|
||||||
$(document).on('keypress', 'div.ui.button,span.ui.button', (e) => {
|
$(document).on('keypress', 'div.ui.button,span.ui.button', (e) => {
|
@ -1,8 +1,8 @@
|
|||||||
import {request} from '../modules/fetch.js';
|
import {request} from '../modules/fetch.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
import {submitEventSubmitter} from '../utils/dom.js';
|
import {submitEventSubmitter} from '../utils/dom.ts';
|
||||||
import {htmlEscape} from 'escape-goat';
|
import {htmlEscape} from 'escape-goat';
|
||||||
import {confirmModal} from './comp/ConfirmModal.js';
|
import {confirmModal} from './comp/ConfirmModal.ts';
|
||||||
|
|
||||||
const {appSubUrl, i18n} = window.config;
|
const {appSubUrl, i18n} = window.config;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {initAreYouSure} from '../vendor/jquery.are-you-sure.js';
|
import {initAreYouSure} from '../vendor/jquery.are-you-sure.ts';
|
||||||
import {handleGlobalEnterQuickSubmit} from './comp/QuickSubmit.js';
|
import {handleGlobalEnterQuickSubmit} from './comp/QuickSubmit.ts';
|
||||||
|
|
||||||
export function initGlobalFormDirtyLeaveConfirm() {
|
export function initGlobalFormDirtyLeaveConfirm() {
|
||||||
initAreYouSure(window.jQuery);
|
initAreYouSure(window.jQuery);
|
@ -1,4 +1,4 @@
|
|||||||
import {parseIssueListQuickGotoLink} from './common-issue-list.js';
|
import {parseIssueListQuickGotoLink} from './common-issue-list.ts';
|
||||||
|
|
||||||
test('parseIssueListQuickGotoLink', () => {
|
test('parseIssueListQuickGotoLink', () => {
|
||||||
expect(parseIssueListQuickGotoLink('/link', '')).toEqual('');
|
expect(parseIssueListQuickGotoLink('/link', '')).toEqual('');
|
@ -1,5 +1,5 @@
|
|||||||
import {isElemHidden, onInputDebounce, submitEventSubmitter, toggleElem} from '../utils/dom.js';
|
import {isElemHidden, onInputDebounce, submitEventSubmitter, toggleElem} from '../utils/dom.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
const reIssueIndex = /^(\d+)$/; // eg: "123"
|
const reIssueIndex = /^(\d+)$/; // eg: "123"
|
@ -1,5 +1,5 @@
|
|||||||
import {initCompLabelEdit} from './comp/LabelEdit.js';
|
import {initCompLabelEdit} from './comp/LabelEdit.ts';
|
||||||
import {toggleElem} from '../utils/dom.js';
|
import {toggleElem} from '../utils/dom.ts';
|
||||||
|
|
||||||
export function initCommonOrganization() {
|
export function initCommonOrganization() {
|
||||||
if (!document.querySelectorAll('.organization').length) {
|
if (!document.querySelectorAll('.organization').length) {
|
@ -1,6 +1,6 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
import {showGlobalErrorMessage} from '../bootstrap.js';
|
import {showGlobalErrorMessage} from '../bootstrap.ts';
|
||||||
|
|
||||||
const {appUrl} = window.config;
|
const {appUrl} = window.config;
|
||||||
|
|
@ -1,17 +1,17 @@
|
|||||||
import '@github/markdown-toolbar-element';
|
import '@github/markdown-toolbar-element';
|
||||||
import '@github/text-expander-element';
|
import '@github/text-expander-element';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {attachTribute} from '../tribute.js';
|
import {attachTribute} from '../tribute.ts';
|
||||||
import {hideElem, showElem, autosize, isElemVisible} from '../../utils/dom.js';
|
import {hideElem, showElem, autosize, isElemVisible} from '../../utils/dom.ts';
|
||||||
import {initEasyMDEPaste, initTextareaUpload} from './EditorUpload.js';
|
import {initEasyMDEPaste, initTextareaUpload} from './EditorUpload.ts';
|
||||||
import {handleGlobalEnterQuickSubmit} from './QuickSubmit.js';
|
import {handleGlobalEnterQuickSubmit} from './QuickSubmit.ts';
|
||||||
import {renderPreviewPanelContent} from '../repo-editor.js';
|
import {renderPreviewPanelContent} from '../repo-editor.ts';
|
||||||
import {easyMDEToolbarActions} from './EasyMDEToolbarActions.js';
|
import {easyMDEToolbarActions} from './EasyMDEToolbarActions.ts';
|
||||||
import {initTextExpander} from './TextExpander.js';
|
import {initTextExpander} from './TextExpander.ts';
|
||||||
import {showErrorToast} from '../../modules/toast.js';
|
import {showErrorToast} from '../../modules/toast.ts';
|
||||||
import {POST} from '../../modules/fetch.js';
|
import {POST} from '../../modules/fetch.ts';
|
||||||
import {initTextareaMarkdown} from './EditorMarkdown.js';
|
import {initTextareaMarkdown} from './EditorMarkdown.ts';
|
||||||
import {DropzoneCustomEventReloadFiles, initDropzone} from '../dropzone.js';
|
import {DropzoneCustomEventReloadFiles, initDropzone} from '../dropzone.ts';
|
||||||
|
|
||||||
let elementIdCounter = 0;
|
let elementIdCounter = 0;
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {svg} from '../../svg.js';
|
import {svg} from '../../svg.ts';
|
||||||
import {htmlEscape} from 'escape-goat';
|
import {htmlEscape} from 'escape-goat';
|
||||||
import {createElementFromHTML} from '../../utils/dom.js';
|
import {createElementFromHTML} from '../../utils/dom.ts';
|
||||||
|
|
||||||
const {i18n} = window.config;
|
const {i18n} = window.config;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
import {svg} from '../../svg.js';
|
import {svg} from '../../svg.ts';
|
||||||
|
|
||||||
export function easyMDEToolbarActions(EasyMDE, editor) {
|
export function easyMDEToolbarActions(EasyMDE, editor) {
|
||||||
const actions = {
|
const actions = {
|
@ -1,4 +1,4 @@
|
|||||||
import {removeAttachmentLinksFromMarkdown} from './EditorUpload.js';
|
import {removeAttachmentLinksFromMarkdown} from './EditorUpload.ts';
|
||||||
|
|
||||||
test('removeAttachmentLinksFromMarkdown', () => {
|
test('removeAttachmentLinksFromMarkdown', () => {
|
||||||
expect(removeAttachmentLinksFromMarkdown('a foo b', 'foo')).toBe('a foo b');
|
expect(removeAttachmentLinksFromMarkdown('a foo b', 'foo')).toBe('a foo b');
|
@ -1,12 +1,12 @@
|
|||||||
import {imageInfo} from '../../utils/image.js';
|
import {imageInfo} from '../../utils/image.ts';
|
||||||
import {replaceTextareaSelection} from '../../utils/dom.js';
|
import {replaceTextareaSelection} from '../../utils/dom.ts';
|
||||||
import {isUrl} from '../../utils/url.js';
|
import {isUrl} from '../../utils/url.ts';
|
||||||
import {triggerEditorContentChanged} from './EditorMarkdown.js';
|
import {triggerEditorContentChanged} from './EditorMarkdown.ts';
|
||||||
import {
|
import {
|
||||||
DropzoneCustomEventRemovedFile,
|
DropzoneCustomEventRemovedFile,
|
||||||
DropzoneCustomEventUploadDone,
|
DropzoneCustomEventUploadDone,
|
||||||
generateMarkdownLinkForAttachment,
|
generateMarkdownLinkForAttachment,
|
||||||
} from '../dropzone.js';
|
} from '../dropzone.ts';
|
||||||
|
|
||||||
let uploadIdCounter = 0;
|
let uploadIdCounter = 0;
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {POST} from '../../modules/fetch.js';
|
import {POST} from '../../modules/fetch.ts';
|
||||||
|
|
||||||
export function initCompReactionSelector() {
|
export function initCompReactionSelector() {
|
||||||
for (const container of document.querySelectorAll('.issue-content, .diff-file-body')) {
|
for (const container of document.querySelectorAll('.issue-content, .diff-file-body')) {
|
@ -1,5 +1,5 @@
|
|||||||
import {matchEmoji, matchMention} from '../../utils/match.js';
|
import {matchEmoji, matchMention} from '../../utils/match.ts';
|
||||||
import {emojiString} from '../emoji.js';
|
import {emojiString} from '../emoji.ts';
|
||||||
|
|
||||||
export function initTextExpander(expander) {
|
export function initTextExpander(expander) {
|
||||||
expander?.addEventListener('text-expander-change', ({detail: {key, provide, text}}) => {
|
expander?.addEventListener('text-expander-change', ({detail: {key, provide, text}}) => {
|
@ -1,5 +1,5 @@
|
|||||||
import {POST} from '../../modules/fetch.js';
|
import {POST} from '../../modules/fetch.ts';
|
||||||
import {hideElem, showElem, toggleElem} from '../../utils/dom.js';
|
import {hideElem, showElem, toggleElem} from '../../utils/dom.ts';
|
||||||
|
|
||||||
export function initCompWebHookEditor() {
|
export function initCompWebHookEditor() {
|
||||||
if (!document.querySelectorAll('.new.webhook').length) {
|
if (!document.querySelectorAll('.new.webhook').length) {
|
@ -1,7 +1,7 @@
|
|||||||
import {createApp} from 'vue';
|
import {createApp} from 'vue';
|
||||||
import ContextPopup from '../components/ContextPopup.vue';
|
import ContextPopup from '../components/ContextPopup.vue';
|
||||||
import {parseIssueHref} from '../utils.js';
|
import {parseIssueHref} from '../utils.ts';
|
||||||
import {createTippy} from '../modules/tippy.js';
|
import {createTippy} from '../modules/tippy.ts';
|
||||||
|
|
||||||
export function initContextPopups() {
|
export function initContextPopups() {
|
||||||
const refIssues = document.querySelectorAll('.ref-issue');
|
const refIssues = document.querySelectorAll('.ref-issue');
|
@ -1,7 +1,7 @@
|
|||||||
import {clippie} from 'clippie';
|
import {clippie} from 'clippie';
|
||||||
import {showTemporaryTooltip} from '../modules/tippy.js';
|
import {showTemporaryTooltip} from '../modules/tippy.ts';
|
||||||
import {convertImage} from '../utils.js';
|
import {convertImage} from '../utils.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const {i18n} = window.config;
|
const {i18n} = window.config;
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
import {svg} from '../svg.js';
|
import {svg} from '../svg.ts';
|
||||||
import {htmlEscape} from 'escape-goat';
|
import {htmlEscape} from 'escape-goat';
|
||||||
import {clippie} from 'clippie';
|
import {clippie} from 'clippie';
|
||||||
import {showTemporaryTooltip} from '../modules/tippy.js';
|
import {showTemporaryTooltip} from '../modules/tippy.ts';
|
||||||
import {GET, POST} from '../modules/fetch.js';
|
import {GET, POST} from '../modules/fetch.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
import {createElementFromHTML, createElementFromAttrs} from '../utils/dom.js';
|
import {createElementFromHTML, createElementFromAttrs} from '../utils/dom.ts';
|
||||||
import {isImageFile, isVideoFile} from '../utils.js';
|
import {isImageFile, isVideoFile} from '../utils.ts';
|
||||||
|
|
||||||
const {csrfToken, i18n} = window.config;
|
const {csrfToken, i18n} = window.config;
|
||||||
|
|
@ -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.
|
// Hides the file if newFold is true, and shows it otherwise. The actual hiding is performed using CSS.
|
||||||
//
|
//
|
@ -1,6 +1,6 @@
|
|||||||
import {createApp} from 'vue';
|
import {createApp} from 'vue';
|
||||||
import ActivityHeatmap from '../components/ActivityHeatmap.vue';
|
import ActivityHeatmap from '../components/ActivityHeatmap.vue';
|
||||||
import {translateMonth, translateDay} from '../utils.js';
|
import {translateMonth, translateDay} from '../utils.ts';
|
||||||
|
|
||||||
export function initHeatmap() {
|
export function initHeatmap() {
|
||||||
const el = document.querySelector('#user-heatmap');
|
const el = document.querySelector('#user-heatmap');
|
@ -1,7 +1,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
import {hideElem, loadElem, queryElemChildren, queryElems} from '../utils/dom.js';
|
import {hideElem, loadElem, queryElemChildren, queryElems} from '../utils/dom.ts';
|
||||||
import {parseDom} from '../utils.js';
|
import {parseDom} from '../utils.ts';
|
||||||
|
|
||||||
function getDefaultSvgBoundsIfUndefined(text, src) {
|
function getDefaultSvgBoundsIfUndefined(text, src) {
|
||||||
const defaultSize = 300;
|
const defaultSize = 300;
|
@ -1,5 +1,5 @@
|
|||||||
import {hideElem, showElem} from '../utils/dom.js';
|
import {hideElem, showElem} from '../utils/dom.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
export function initInstall() {
|
export function initInstall() {
|
||||||
const page = document.querySelector('.page-content.install');
|
const page = document.querySelector('.page-content.install');
|
@ -1,7 +1,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
import {toggleElem} from '../utils/dom.js';
|
import {toggleElem} from '../utils/dom.ts';
|
||||||
import {logoutFromWorker} from '../modules/worker.js';
|
import {logoutFromWorker} from '../modules/worker.ts';
|
||||||
|
|
||||||
const {appSubUrl, notificationSettings, assetVersionEncoded} = window.config;
|
const {appSubUrl, notificationSettings, assetVersionEncoded} = window.config;
|
||||||
let notificationSequenceNumber = 0;
|
let notificationSequenceNumber = 0;
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {hideElem, showElem} from '../utils/dom.js';
|
import {hideElem, showElem} from '../utils/dom.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
import {diffTreeStore} from '../modules/stores.js';
|
import {diffTreeStore} from '../modules/stores.ts';
|
||||||
import {setFileFolding} from './file-fold.js';
|
import {setFileFolding} from './file-fold.ts';
|
||||||
import {POST} from '../modules/fetch.js';
|
import {POST} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const {pageData} = window.config;
|
const {pageData} = window.config;
|
||||||
const prReview = pageData.prReview || {};
|
const prReview = pageData.prReview || {};
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {toggleElem} from '../utils/dom.js';
|
import {toggleElem} from '../utils/dom.ts';
|
||||||
|
|
||||||
export function initRepoBranchButton() {
|
export function initRepoBranchButton() {
|
||||||
initRepoCreateBranchButton();
|
initRepoCreateBranchButton();
|
@ -1,4 +1,4 @@
|
|||||||
import {singleAnchorRegex, rangeAnchorRegex} from './repo-code.js';
|
import {singleAnchorRegex, rangeAnchorRegex} from './repo-code.ts';
|
||||||
|
|
||||||
test('singleAnchorRegex', () => {
|
test('singleAnchorRegex', () => {
|
||||||
expect(singleAnchorRegex.test('#L0')).toEqual(false);
|
expect(singleAnchorRegex.test('#L0')).toEqual(false);
|
@ -1,9 +1,9 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {svg} from '../svg.js';
|
import {svg} from '../svg.ts';
|
||||||
import {invertFileFolding} from './file-fold.js';
|
import {invertFileFolding} from './file-fold.ts';
|
||||||
import {createTippy} from '../modules/tippy.js';
|
import {createTippy} from '../modules/tippy.ts';
|
||||||
import {clippie} from 'clippie';
|
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 singleAnchorRegex = /^#(L|n)([1-9][0-9]*)$/;
|
||||||
export const rangeAnchorRegex = /^#(L[1-9][0-9]*)-(L[1-9][0-9]*)$/;
|
export const rangeAnchorRegex = /^#(L[1-9][0-9]*)-(L[1-9][0-9]*)$/;
|
@ -1,5 +1,5 @@
|
|||||||
import {createTippy} from '../modules/tippy.js';
|
import {createTippy} from '../modules/tippy.ts';
|
||||||
import {toggleElem} from '../utils/dom.js';
|
import {toggleElem} from '../utils/dom.ts';
|
||||||
|
|
||||||
export function initRepoEllipsisButton() {
|
export function initRepoEllipsisButton() {
|
||||||
for (const button of document.querySelectorAll('.js-toggle-commit-body')) {
|
for (const button of document.querySelectorAll('.js-toggle-commit-body')) {
|
@ -1,8 +1,8 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {hideElem, queryElems, showElem} from '../utils/dom.js';
|
import {hideElem, queryElems, showElem} from '../utils/dom.ts';
|
||||||
import {POST} from '../modules/fetch.js';
|
import {POST} from '../modules/fetch.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
import {sleep} from '../utils.js';
|
import {sleep} from '../utils.ts';
|
||||||
|
|
||||||
async function onDownloadArchive(e) {
|
async function onDownloadArchive(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
@ -1,5 +1,5 @@
|
|||||||
import {hideElem, showElem, toggleElem} from '../utils/dom.js';
|
import {hideElem, showElem, toggleElem} from '../utils/dom.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
async function loadBranchesAndTags(area, loadingButton) {
|
async function loadBranchesAndTags(area, loadingButton) {
|
||||||
loadingButton.classList.add('disabled');
|
loadingButton.classList.add('disabled');
|
@ -1,14 +1,14 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {initCompReactionSelector} from './comp/ReactionSelector.js';
|
import {initCompReactionSelector} from './comp/ReactionSelector.ts';
|
||||||
import {initRepoIssueContentHistory} from './repo-issue-content.js';
|
import {initRepoIssueContentHistory} from './repo-issue-content.ts';
|
||||||
import {initDiffFileTree} from './repo-diff-filetree.js';
|
import {initDiffFileTree} from './repo-diff-filetree.ts';
|
||||||
import {initDiffCommitSelect} from './repo-diff-commitselect.js';
|
import {initDiffCommitSelect} from './repo-diff-commitselect.ts';
|
||||||
import {validateTextareaNonEmpty} from './comp/ComboMarkdownEditor.js';
|
import {validateTextareaNonEmpty} from './comp/ComboMarkdownEditor.ts';
|
||||||
import {initViewedCheckboxListenerFor, countAndUpdateViewedFiles, initExpandAndCollapseFilesButton} from './pull-view-file.js';
|
import {initViewedCheckboxListenerFor, countAndUpdateViewedFiles, initExpandAndCollapseFilesButton} from './pull-view-file.ts';
|
||||||
import {initImageDiff} from './imagediff.js';
|
import {initImageDiff} from './imagediff.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
import {submitEventSubmitter, queryElemSiblings, hideElem, showElem, animateOnce} from '../utils/dom.js';
|
import {submitEventSubmitter, queryElemSiblings, hideElem, showElem, animateOnce} from '../utils/dom.ts';
|
||||||
import {POST, GET} from '../modules/fetch.js';
|
import {POST, GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const {pageData, i18n} = window.config;
|
const {pageData, i18n} = window.config;
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {htmlEscape} from 'escape-goat';
|
import {htmlEscape} from 'escape-goat';
|
||||||
import {createCodeEditor} from './codeeditor.js';
|
import {createCodeEditor} from './codeeditor.ts';
|
||||||
import {hideElem, queryElems, showElem} from '../utils/dom.js';
|
import {hideElem, queryElems, showElem} from '../utils/dom.ts';
|
||||||
import {initMarkupContent} from '../markup/content.js';
|
import {initMarkupContent} from '../markup/content.ts';
|
||||||
import {attachRefIssueContextPopup} from './contextpopup.js';
|
import {attachRefIssueContextPopup} from './contextpopup.ts';
|
||||||
import {POST} from '../modules/fetch.js';
|
import {POST} from '../modules/fetch.ts';
|
||||||
import {initDropzone} from './dropzone.js';
|
import {initDropzone} from './dropzone.ts';
|
||||||
|
|
||||||
function initEditPreviewTab($form) {
|
function initEditPreviewTab($form) {
|
||||||
const $tabMenu = $form.find('.repo-editor-menu');
|
const $tabMenu = $form.find('.repo-editor-menu');
|
@ -1,4 +1,4 @@
|
|||||||
import {strSubMatch, calcMatchedWeight, filterRepoFilesWeighted} from './repo-findfile.js';
|
import {strSubMatch, calcMatchedWeight, filterRepoFilesWeighted} from './repo-findfile.ts';
|
||||||
|
|
||||||
describe('Repo Find Files', () => {
|
describe('Repo Find Files', () => {
|
||||||
test('strSubMatch', () => {
|
test('strSubMatch', () => {
|
@ -1,7 +1,7 @@
|
|||||||
import {svg} from '../svg.js';
|
import {svg} from '../svg.ts';
|
||||||
import {toggleElem} from '../utils/dom.js';
|
import {toggleElem} from '../utils/dom.ts';
|
||||||
import {pathEscapeSegments} from '../utils/url.js';
|
import {pathEscapeSegments} from '../utils/url.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const threshold = 50;
|
const threshold = 50;
|
||||||
let files = [];
|
let files = [];
|
@ -1,6 +1,6 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {hideElem, showElem} from '../utils/dom.js';
|
import {hideElem, showElem} from '../utils/dom.ts';
|
||||||
import {GET} from '../modules/fetch.js';
|
import {GET} from '../modules/fetch.ts';
|
||||||
|
|
||||||
export function initRepoGraphGit() {
|
export function initRepoGraphGit() {
|
||||||
const graphContainer = document.querySelector('#git-graph-container');
|
const graphContainer = document.querySelector('#git-graph-container');
|
@ -1,8 +1,8 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {stripTags} from '../utils.js';
|
import {stripTags} from '../utils.ts';
|
||||||
import {hideElem, queryElemChildren, showElem} from '../utils/dom.js';
|
import {hideElem, queryElemChildren, showElem} from '../utils/dom.ts';
|
||||||
import {POST} from '../modules/fetch.js';
|
import {POST} from '../modules/fetch.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {svg} from '../svg.js';
|
import {svg} from '../svg.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
import {GET, POST} from '../modules/fetch.js';
|
import {GET, POST} from '../modules/fetch.ts';
|
||||||
import {showElem} from '../utils/dom.js';
|
import {showElem} from '../utils/dom.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
let i18nTextEdited;
|
let i18nTextEdited;
|
@ -1,11 +1,11 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {handleReply} from './repo-issue.js';
|
import {handleReply} from './repo-issue.ts';
|
||||||
import {getComboMarkdownEditor, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js';
|
import {getComboMarkdownEditor, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts';
|
||||||
import {POST} from '../modules/fetch.js';
|
import {POST} from '../modules/fetch.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
import {hideElem, showElem} from '../utils/dom.js';
|
import {hideElem, showElem} from '../utils/dom.ts';
|
||||||
import {attachRefIssueContextPopup} from './contextpopup.js';
|
import {attachRefIssueContextPopup} from './contextpopup.ts';
|
||||||
import {initCommentContent, initMarkupContent} from '../markup/content.js';
|
import {initCommentContent, initMarkupContent} from '../markup/content.ts';
|
||||||
|
|
||||||
async function onEditContent(event) {
|
async function onEditContent(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
@ -1,12 +1,12 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {updateIssuesMeta} from './repo-issue.js';
|
import {updateIssuesMeta} from './repo-issue.ts';
|
||||||
import {toggleElem, hideElem, isElemHidden} from '../utils/dom.js';
|
import {toggleElem, hideElem, isElemHidden} from '../utils/dom.ts';
|
||||||
import {htmlEscape} from 'escape-goat';
|
import {htmlEscape} from 'escape-goat';
|
||||||
import {confirmModal} from './comp/ConfirmModal.js';
|
import {confirmModal} from './comp/ConfirmModal.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
import {createSortable} from '../modules/sortable.js';
|
import {createSortable} from '../modules/sortable.ts';
|
||||||
import {DELETE, POST} from '../modules/fetch.js';
|
import {DELETE, POST} from '../modules/fetch.ts';
|
||||||
import {parseDom} from '../utils.js';
|
import {parseDom} from '../utils.ts';
|
||||||
|
|
||||||
function initRepoIssueListCheckboxes() {
|
function initRepoIssueListCheckboxes() {
|
||||||
const issueSelectAll = document.querySelector('.issue-checkbox-all');
|
const issueSelectAll = document.querySelector('.issue-checkbox-all');
|
@ -1,12 +1,12 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {htmlEscape} from 'escape-goat';
|
import {htmlEscape} from 'escape-goat';
|
||||||
import {createTippy, showTemporaryTooltip} from '../modules/tippy.js';
|
import {createTippy, showTemporaryTooltip} from '../modules/tippy.ts';
|
||||||
import {hideElem, showElem, toggleElem} from '../utils/dom.js';
|
import {hideElem, showElem, toggleElem} from '../utils/dom.ts';
|
||||||
import {setFileFolding} from './file-fold.js';
|
import {setFileFolding} from './file-fold.ts';
|
||||||
import {getComboMarkdownEditor, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js';
|
import {getComboMarkdownEditor, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts';
|
||||||
import {toAbsoluteUrl} from '../utils.js';
|
import {toAbsoluteUrl} from '../utils.ts';
|
||||||
import {GET, POST} from '../modules/fetch.js';
|
import {GET, POST} from '../modules/fetch.ts';
|
||||||
import {showErrorToast} from '../modules/toast.js';
|
import {showErrorToast} from '../modules/toast.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ export function initRepoIssueTimeTracking() {
|
|||||||
},
|
},
|
||||||
}).modal('show');
|
}).modal('show');
|
||||||
$('.issue-start-time-modal input').on('keydown', (e) => {
|
$('.issue-start-time-modal input').on('keydown', (e) => {
|
||||||
if ((e.keyCode || e.key) === 13) {
|
if (e.key === 'Enter') {
|
||||||
$('#add_time_manual_form').trigger('submit');
|
$('#add_time_manual_form').trigger('submit');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -146,7 +146,7 @@ export function initRepoIssueSidebarList() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('.menu .ui.dropdown.label-filter').on('keydown', (e) => {
|
$('.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');
|
const selectedItem = document.querySelector('.menu .ui.dropdown.label-filter .menu .item.selected');
|
||||||
if (selectedItem) {
|
if (selectedItem) {
|
||||||
excludeLabel(selectedItem);
|
excludeLabel(selectedItem);
|
@ -4,24 +4,24 @@ import {
|
|||||||
initRepoIssueComments, initRepoIssueDependencyDelete, initRepoIssueReferenceIssue,
|
initRepoIssueComments, initRepoIssueDependencyDelete, initRepoIssueReferenceIssue,
|
||||||
initRepoIssueTitleEdit, initRepoIssueWipToggle,
|
initRepoIssueTitleEdit, initRepoIssueWipToggle,
|
||||||
initRepoPullRequestUpdate, updateIssuesMeta, initIssueTemplateCommentEditors, initSingleCommentEditor,
|
initRepoPullRequestUpdate, updateIssuesMeta, initIssueTemplateCommentEditors, initSingleCommentEditor,
|
||||||
} from './repo-issue.js';
|
} from './repo-issue.ts';
|
||||||
import {initUnicodeEscapeButton} from './repo-unicode-escape.js';
|
import {initUnicodeEscapeButton} from './repo-unicode-escape.ts';
|
||||||
import {svg} from '../svg.js';
|
import {svg} from '../svg.ts';
|
||||||
import {htmlEscape} from 'escape-goat';
|
import {htmlEscape} from 'escape-goat';
|
||||||
import {initRepoBranchTagSelector} from '../components/RepoBranchTagSelector.vue';
|
import {initRepoBranchTagSelector} from '../components/RepoBranchTagSelector.vue';
|
||||||
import {
|
import {
|
||||||
initRepoCloneLink, initRepoCommonBranchOrTagDropdown, initRepoCommonFilterSearchDropdown,
|
initRepoCloneLink, initRepoCommonBranchOrTagDropdown, initRepoCommonFilterSearchDropdown,
|
||||||
} from './repo-common.js';
|
} from './repo-common.ts';
|
||||||
import {initCitationFileCopyContent} from './citation.js';
|
import {initCitationFileCopyContent} from './citation.ts';
|
||||||
import {initCompLabelEdit} from './comp/LabelEdit.js';
|
import {initCompLabelEdit} from './comp/LabelEdit.ts';
|
||||||
import {initRepoDiffConversationNav} from './repo-diff.js';
|
import {initRepoDiffConversationNav} from './repo-diff.ts';
|
||||||
import {initCompReactionSelector} from './comp/ReactionSelector.js';
|
import {initCompReactionSelector} from './comp/ReactionSelector.ts';
|
||||||
import {initRepoSettingBranches} from './repo-settings.js';
|
import {initRepoSettingBranches} from './repo-settings.ts';
|
||||||
import {initRepoPullRequestMergeForm} from './repo-issue-pr-form.js';
|
import {initRepoPullRequestMergeForm} from './repo-issue-pr-form.ts';
|
||||||
import {initRepoPullRequestCommitStatus} from './repo-issue-pr-status.js';
|
import {initRepoPullRequestCommitStatus} from './repo-issue-pr-status.ts';
|
||||||
import {hideElem, queryElemChildren, showElem} from '../utils/dom.js';
|
import {hideElem, queryElemChildren, showElem} from '../utils/dom.ts';
|
||||||
import {POST} from '../modules/fetch.js';
|
import {POST} from '../modules/fetch.ts';
|
||||||
import {initRepoIssueCommentEdit} from './repo-issue-edit.js';
|
import {initRepoIssueCommentEdit} from './repo-issue-edit.ts';
|
||||||
|
|
||||||
// if there are draft comments, confirm before reloading, to avoid losing comments
|
// if there are draft comments, confirm before reloading, to avoid losing comments
|
||||||
function reloadConfirmDraftComment() {
|
function reloadConfirmDraftComment() {
|
@ -1,5 +1,5 @@
|
|||||||
import {hideElem, showElem} from '../utils/dom.js';
|
import {hideElem, showElem} from '../utils/dom.ts';
|
||||||
import {GET, POST} from '../modules/fetch.js';
|
import {GET, POST} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
|
|
@ -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 service = document.querySelector('#service_type');
|
||||||
const user = document.querySelector('#auth_username');
|
const user = document.querySelector('#auth_username');
|
@ -1,7 +1,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {contrastColor} from '../utils/color.js';
|
import {contrastColor} from '../utils/color.ts';
|
||||||
import {createSortable} from '../modules/sortable.js';
|
import {createSortable} from '../modules/sortable.ts';
|
||||||
import {POST, DELETE, PUT} from '../modules/fetch.js';
|
import {POST, DELETE, PUT} from '../modules/fetch.ts';
|
||||||
|
|
||||||
function updateIssueCount(cards) {
|
function updateIssueCount(cards) {
|
||||||
const parent = cards.parentElement;
|
const parent = cards.parentElement;
|
@ -1,5 +1,5 @@
|
|||||||
import {hideElem, showElem} from '../utils/dom.js';
|
import {hideElem, showElem} from '../utils/dom.ts';
|
||||||
import {initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js';
|
import {initComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts';
|
||||||
|
|
||||||
export function initRepoRelease() {
|
export function initRepoRelease() {
|
||||||
document.addEventListener('click', (e) => {
|
document.addEventListener('click', (e) => {
|
@ -1,8 +1,8 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {minimatch} from 'minimatch';
|
import {minimatch} from 'minimatch';
|
||||||
import {createMonaco} from './codeeditor.js';
|
import {createMonaco} from './codeeditor.ts';
|
||||||
import {onInputDebounce, queryElems, toggleElem} from '../utils/dom.js';
|
import {onInputDebounce, queryElems, toggleElem} from '../utils/dom.ts';
|
||||||
import {POST} from '../modules/fetch.js';
|
import {POST} from '../modules/fetch.ts';
|
||||||
|
|
||||||
const {appSubUrl, csrfToken} = window.config;
|
const {appSubUrl, csrfToken} = window.config;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import {htmlEscape} from 'escape-goat';
|
import {htmlEscape} from 'escape-goat';
|
||||||
import {hideElem, showElem} from '../utils/dom.js';
|
import {hideElem, showElem} from '../utils/dom.ts';
|
||||||
|
|
||||||
const {appSubUrl} = window.config;
|
const {appSubUrl} = window.config;
|
||||||
|
|
@ -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() {
|
export function initUnicodeEscapeButton() {
|
||||||
document.addEventListener('click', (e) => {
|
document.addEventListener('click', (e) => {
|
@ -1,7 +1,7 @@
|
|||||||
import {initMarkupContent} from '../markup/content.js';
|
import {initMarkupContent} from '../markup/content.ts';
|
||||||
import {validateTextareaNonEmpty, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.js';
|
import {validateTextareaNonEmpty, initComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts';
|
||||||
import {fomanticMobileScreen} from '../modules/fomantic.js';
|
import {fomanticMobileScreen} from '../modules/fomantic.ts';
|
||||||
import {POST} from '../modules/fetch.js';
|
import {POST} from '../modules/fetch.ts';
|
||||||
|
|
||||||
async function initRepoWikiFormEditor() {
|
async function initRepoWikiFormEditor() {
|
||||||
const editArea = document.querySelector('.repository.wiki .combo-markdown-editor textarea');
|
const editArea = document.querySelector('.repository.wiki .combo-markdown-editor textarea');
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user