From 7c48e69c1103c81edd7a91a38f13b607e8cfc904 Mon Sep 17 00:00:00 2001
From: Buster Neece
Date: Fri, 23 Dec 2022 21:21:06 -0600
Subject: [PATCH] Initial Typescript impl.
---
frontend/npm-shrinkwrap.json | 41 ++++++
frontend/package.json | 5 +
frontend/tsconfig.json | 4 +-
.../vue/components/Account/ApiKeyNewKey.vue | 4 +-
frontend/vue/components/Admin/ApiKeys.vue | 32 ++---
frontend/vue/components/Admin/AuditLog.vue | 2 +-
frontend/vue/components/Admin/Backups.vue | 22 ++--
.../Admin/Backups/ConfigureModal.vue | 71 +++++------
.../Admin/Backups/LastOutputModal.vue | 2 +-
.../Admin/Backups/RunBackupModal.vue | 15 +--
frontend/vue/components/Admin/Branding.vue | 6 +-
.../vue/components/Admin/CustomFields.vue | 14 +--
.../Admin/CustomFields/EditModal.vue | 11 +-
frontend/vue/components/Admin/GeoLite.vue | 117 ++++++++----------
.../vue/components/Common/AudioPlayer.vue | 7 +-
frontend/vue/components/Common/DataTable.vue | 13 +-
frontend/vue/components/Common/ModalForm.vue | 10 +-
.../Common/{NowPlaying.js => NowPlaying.ts} | 0
.../Entity/{NowPlaying.js => NowPlaying.ts} | 0
.../{RadioAdapters.js => RadioAdapters.ts} | 0
...ResettableForm.js => UseResettableForm.ts} | 0
...elidateOnForm.js => UseVuelidateOnForm.ts} | 0
frontend/vue/components/InlinePlayer.vue | 4 +-
frontend/vue/components/Public/Player.vue | 4 +-
.../Stations/Media/MediaToolbar.vue | 2 +-
frontend/vue/components/Stations/Profile.vue | 2 +-
.../Stations/Profile/BackendPanel.vue | 2 +-
.../Stations/Profile/FrontendPanel.vue | 2 +-
.../Stations/Profile/NowPlayingPanel.vue | 2 +-
frontend/vue/components/Stations/Remotes.vue | 2 +-
.../Stations/Streamers/BroadcastsModal.vue | 2 +-
frontend/vue/pages/Admin/AuditLog.js | 2 +-
frontend/vue/pages/Admin/Branding.js | 2 +-
frontend/vue/pages/Dashboard.js | 4 +-
frontend/vue/pages/Public/FullPlayer.js | 4 +-
frontend/vue/pages/Public/History.js | 2 +-
frontend/vue/pages/Public/Schedule.js | 2 +-
frontend/vue/pages/Stations/Media.js | 4 +-
frontend/vue/pages/Stations/Playlists.js | 2 +-
frontend/vue/pages/Stations/Podcasts.js | 4 +-
frontend/vue/pages/Stations/Profile.js | 4 +-
frontend/vue/pages/Stations/Queue.js | 2 +-
.../vue/pages/Stations/Reports/Listeners.js | 2 +-
.../vue/pages/Stations/Reports/Overview.js | 2 +-
.../vue/pages/Stations/Reports/Requests.js | 2 +-
.../pages/Stations/Reports/SoundExchange.js | 2 +-
.../vue/pages/Stations/Reports/Timeline.js | 2 +-
frontend/vue/pages/Stations/Streamers.js | 4 +-
frontend/vue/vendor/{axios.js => axios.ts} | 7 +-
.../vue/vendor/{azuracast.js => azuracast.ts} | 2 +
.../{bootstrapVue.js => bootstrapVue.ts} | 0
frontend/vue/vendor/chartjs.js | 20 ---
frontend/vue/vendor/chartjs.ts | 15 +++
frontend/vue/vendor/{events.js => events.ts} | 0
.../vue/vendor/{fancybox.js => fancybox.ts} | 0
.../vue/vendor/{gettext.js => gettext.ts} | 0
frontend/vue/vendor/{luxon.js => luxon.ts} | 2 +-
frontend/vue/vendor/{pinia.js => pinia.ts} | 0
.../vendor/{sweetalert.js => sweetalert.ts} | 0
templates/partials/bodyjs.phtml | 2 +-
60 files changed, 267 insertions(+), 225 deletions(-)
rename frontend/vue/components/Common/{NowPlaying.js => NowPlaying.ts} (100%)
rename frontend/vue/components/Entity/{NowPlaying.js => NowPlaying.ts} (100%)
rename frontend/vue/components/Entity/{RadioAdapters.js => RadioAdapters.ts} (100%)
rename frontend/vue/components/Form/{UseResettableForm.js => UseResettableForm.ts} (100%)
rename frontend/vue/components/Form/{UseVuelidateOnForm.js => UseVuelidateOnForm.ts} (100%)
rename frontend/vue/vendor/{axios.js => axios.ts} (91%)
rename frontend/vue/vendor/{azuracast.js => azuracast.ts} (93%)
rename frontend/vue/vendor/{bootstrapVue.js => bootstrapVue.ts} (100%)
delete mode 100644 frontend/vue/vendor/chartjs.js
create mode 100644 frontend/vue/vendor/chartjs.ts
rename frontend/vue/vendor/{events.js => events.ts} (100%)
rename frontend/vue/vendor/{fancybox.js => fancybox.ts} (100%)
rename frontend/vue/vendor/{gettext.js => gettext.ts} (100%)
rename frontend/vue/vendor/{luxon.js => luxon.ts} (86%)
rename frontend/vue/vendor/{pinia.js => pinia.ts} (100%)
rename frontend/vue/vendor/{sweetalert.js => sweetalert.ts} (100%)
diff --git a/frontend/npm-shrinkwrap.json b/frontend/npm-shrinkwrap.json
index 462e72b96..7f15bdeb8 100644
--- a/frontend/npm-shrinkwrap.json
+++ b/frontend/npm-shrinkwrap.json
@@ -78,6 +78,11 @@
"webpack-assets-manifest": "^5",
"webpack-cli": "^5",
"zxcvbn": "^4.4.2"
+ },
+ "devDependencies": {
+ "@types/lodash": "^4.14.191",
+ "@types/luxon": "^3.1.0",
+ "@types/store": "^2.0.2"
}
},
"node_modules/@ampproject/remapping": {
@@ -2098,6 +2103,18 @@
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
},
+ "node_modules/@types/lodash": {
+ "version": "4.14.191",
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz",
+ "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==",
+ "dev": true
+ },
+ "node_modules/@types/luxon": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.1.0.tgz",
+ "integrity": "sha512-gCd/HcCgjqSxfMrgtqxCgYk/22NBQfypwFUG7ZAyG/4pqs51WLTcUzVp1hqTbieDYeHS3WoVEh2Yv/2l+7B0Vg==",
+ "dev": true
+ },
"node_modules/@types/minimatch": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
@@ -2118,6 +2135,12 @@
"resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz",
"integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw=="
},
+ "node_modules/@types/store": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@types/store/-/store-2.0.2.tgz",
+ "integrity": "sha512-ZPHnXkzmGMfk+pHqAGzTSpA9CbsHmJLgkvOl5w52LZ0XTxB1ZIHWZzQ7lEtjTNWScBbsQekg8TjApMXkMe4nkw==",
+ "dev": true
+ },
"node_modules/@types/vinyl": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.7.tgz",
@@ -12607,6 +12630,18 @@
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
},
+ "@types/lodash": {
+ "version": "4.14.191",
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz",
+ "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==",
+ "dev": true
+ },
+ "@types/luxon": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.1.0.tgz",
+ "integrity": "sha512-gCd/HcCgjqSxfMrgtqxCgYk/22NBQfypwFUG7ZAyG/4pqs51WLTcUzVp1hqTbieDYeHS3WoVEh2Yv/2l+7B0Vg==",
+ "dev": true
+ },
"@types/minimatch": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
@@ -12627,6 +12662,12 @@
"resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz",
"integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw=="
},
+ "@types/store": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@types/store/-/store-2.0.2.tgz",
+ "integrity": "sha512-ZPHnXkzmGMfk+pHqAGzTSpA9CbsHmJLgkvOl5w52LZ0XTxB1ZIHWZzQ7lEtjTNWScBbsQekg8TjApMXkMe4nkw==",
+ "dev": true
+ },
"@types/vinyl": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.7.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index ede537e9e..f6376892e 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -79,5 +79,10 @@
"webpack-assets-manifest": "^5",
"webpack-cli": "^5",
"zxcvbn": "^4.4.2"
+ },
+ "devDependencies": {
+ "@types/lodash": "^4.14.191",
+ "@types/luxon": "^3.1.0",
+ "@types/store": "^2.0.2"
}
}
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index fa24535c1..0285a11ed 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -26,7 +26,9 @@
"types": []
},
"include": [
- "vue/**/*.ts"
+ "vue/**/*.ts",
+ "vue/**/*.vue",
+ "vue/**/*.js"
],
"exclude": [
"node_modules"
diff --git a/frontend/vue/components/Account/ApiKeyNewKey.vue b/frontend/vue/components/Account/ApiKeyNewKey.vue
index 0d8392b51..3821ce34e 100644
--- a/frontend/vue/components/Account/ApiKeyNewKey.vue
+++ b/frontend/vue/components/Account/ApiKeyNewKey.vue
@@ -27,8 +27,8 @@
-
diff --git a/frontend/vue/components/Admin/AuditLog.vue b/frontend/vue/components/Admin/AuditLog.vue
index 4f5cf8374..1b2832628 100644
--- a/frontend/vue/components/Admin/AuditLog.vue
+++ b/frontend/vue/components/Admin/AuditLog.vue
@@ -84,7 +84,7 @@ pre.changes {
}
-
diff --git a/frontend/vue/components/Admin/GeoLite.vue b/frontend/vue/components/Admin/GeoLite.vue
index f155cd6be..bd40a47f1 100644
--- a/frontend/vue/components/Admin/GeoLite.vue
+++ b/frontend/vue/components/Admin/GeoLite.vue
@@ -86,18 +86,21 @@
-
-
-
diff --git a/frontend/vue/components/Common/AudioPlayer.vue b/frontend/vue/components/Common/AudioPlayer.vue
index dc4d756ad..0b1e730b5 100644
--- a/frontend/vue/components/Common/AudioPlayer.vue
+++ b/frontend/vue/components/Common/AudioPlayer.vue
@@ -2,12 +2,13 @@
-
diff --git a/frontend/vue/components/Common/DataTable.vue b/frontend/vue/components/Common/DataTable.vue
index 9e4b26ab9..86367f2f6 100644
--- a/frontend/vue/components/Common/DataTable.vue
+++ b/frontend/vue/components/Common/DataTable.vue
@@ -153,12 +153,13 @@ table.b-table-selectable {
}
-
diff --git a/frontend/vue/components/Common/ModalForm.vue b/frontend/vue/components/Common/ModalForm.vue
index 0d2582b1e..eec2c5c8b 100644
--- a/frontend/vue/components/Common/ModalForm.vue
+++ b/frontend/vue/components/Common/ModalForm.vue
@@ -33,10 +33,12 @@
-
diff --git a/frontend/vue/components/Common/NowPlaying.js b/frontend/vue/components/Common/NowPlaying.ts
similarity index 100%
rename from frontend/vue/components/Common/NowPlaying.js
rename to frontend/vue/components/Common/NowPlaying.ts
diff --git a/frontend/vue/components/Entity/NowPlaying.js b/frontend/vue/components/Entity/NowPlaying.ts
similarity index 100%
rename from frontend/vue/components/Entity/NowPlaying.js
rename to frontend/vue/components/Entity/NowPlaying.ts
diff --git a/frontend/vue/components/Entity/RadioAdapters.js b/frontend/vue/components/Entity/RadioAdapters.ts
similarity index 100%
rename from frontend/vue/components/Entity/RadioAdapters.js
rename to frontend/vue/components/Entity/RadioAdapters.ts
diff --git a/frontend/vue/components/Form/UseResettableForm.js b/frontend/vue/components/Form/UseResettableForm.ts
similarity index 100%
rename from frontend/vue/components/Form/UseResettableForm.js
rename to frontend/vue/components/Form/UseResettableForm.ts
diff --git a/frontend/vue/components/Form/UseVuelidateOnForm.js b/frontend/vue/components/Form/UseVuelidateOnForm.ts
similarity index 100%
rename from frontend/vue/components/Form/UseVuelidateOnForm.js
rename to frontend/vue/components/Form/UseVuelidateOnForm.ts
diff --git a/frontend/vue/components/InlinePlayer.vue b/frontend/vue/components/InlinePlayer.vue
index 35ea85cc9..c5a3ef252 100644
--- a/frontend/vue/components/InlinePlayer.vue
+++ b/frontend/vue/components/InlinePlayer.vue
@@ -64,7 +64,7 @@
}
-