From c02d2489c627bc4f2058220ceece1381e85ab971 Mon Sep 17 00:00:00 2001 From: Aigamo <51428094+ycanardeau@users.noreply.github.com> Date: Mon, 31 Oct 2022 09:15:04 +0000 Subject: [PATCH 1/3] Remove unused libs --- VocaDbWeb/Scripts/libs.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/VocaDbWeb/Scripts/libs.js b/VocaDbWeb/Scripts/libs.js index 0eaf70add9..ea9b6193e1 100644 --- a/VocaDbWeb/Scripts/libs.js +++ b/VocaDbWeb/Scripts/libs.js @@ -2,21 +2,8 @@ window.$ = window.jQuery = require('jquery'); require('bootstrap-sass'); -require('jquery-ui/accordion'); require('jquery-ui/autocomplete'); require('jquery-ui/button'); require('jquery-ui/datepicker'); -require('jquery-ui/dialog'); -require('jquery-ui/draggable'); -require('jquery-ui/droppable'); -require('jquery-ui/menu'); -require('jquery-ui/mouse'); -require('jquery-ui/progressbar'); -require('jquery-ui/resizable'); -require('jquery-ui/selectable'); -require('jquery-ui/slider'); -require('jquery-ui/sortable'); -require('jquery-ui/spinner'); -require('jquery-ui/tabs'); window.moment = require('moment'); From c29d238f7bb3fa6b9524cea359f524e2a83df3f1 Mon Sep 17 00:00:00 2001 From: Aigamo <51428094+ycanardeau@users.noreply.github.com> Date: Mon, 31 Oct 2022 09:19:48 +0000 Subject: [PATCH 2/3] Replace $.extend with spread operator --- .../Components/KnockoutExtensions/AlbumAutoComplete.tsx | 4 +--- .../Components/KnockoutExtensions/ArtistAutoComplete.tsx | 4 +--- .../Components/KnockoutExtensions/SongAutoComplete.tsx | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/VocaDbWeb/Scripts/Components/KnockoutExtensions/AlbumAutoComplete.tsx b/VocaDbWeb/Scripts/Components/KnockoutExtensions/AlbumAutoComplete.tsx index 9db8bf5f66..d724ae43c9 100644 --- a/VocaDbWeb/Scripts/Components/KnockoutExtensions/AlbumAutoComplete.tsx +++ b/VocaDbWeb/Scripts/Components/KnockoutExtensions/AlbumAutoComplete.tsx @@ -5,7 +5,6 @@ import { } from '@/Components/KnockoutExtensions/EntryAutoComplete'; import { AlbumContract } from '@/DataContracts/Album/AlbumContract'; import { functions } from '@/Shared/GlobalFunctions'; -import $ from 'jquery'; import React from 'react'; import { useTranslation } from 'react-i18next'; @@ -37,9 +36,8 @@ export const AlbumAutoComplete = ({ lang: vdb.values.languagePreference, preferAccurateMatches: true, maxResults: 15, + ...properties.extraQueryParams, }; - if (properties.extraQueryParams) - $.extend(queryParams, properties.extraQueryParams); const params: EntryAutoCompleteParams = { acceptSelection: properties.acceptSelection!, diff --git a/VocaDbWeb/Scripts/Components/KnockoutExtensions/ArtistAutoComplete.tsx b/VocaDbWeb/Scripts/Components/KnockoutExtensions/ArtistAutoComplete.tsx index 9cf7d92e0f..ff7a4a964c 100644 --- a/VocaDbWeb/Scripts/Components/KnockoutExtensions/ArtistAutoComplete.tsx +++ b/VocaDbWeb/Scripts/Components/KnockoutExtensions/ArtistAutoComplete.tsx @@ -6,7 +6,6 @@ import { import { ArtistContract } from '@/DataContracts/Artist/ArtistContract'; import { functions } from '@/Shared/GlobalFunctions'; import { ArtistSortRule } from '@/Stores/Search/ArtistSearchStore'; -import $ from 'jquery'; import React from 'react'; import { useTranslation } from 'react-i18next'; @@ -40,9 +39,8 @@ export const ArtistAutoComplete = ({ preferAccurateMatches: true, maxResults: 20, sort: ArtistSortRule.ArtistType, + ...properties.extraQueryParams, }; - if (properties.extraQueryParams) - $.extend(queryParams, properties.extraQueryParams); const params: EntryAutoCompleteParams = { acceptSelection: properties.acceptSelection!, diff --git a/VocaDbWeb/Scripts/Components/KnockoutExtensions/SongAutoComplete.tsx b/VocaDbWeb/Scripts/Components/KnockoutExtensions/SongAutoComplete.tsx index d08826591c..d616062264 100644 --- a/VocaDbWeb/Scripts/Components/KnockoutExtensions/SongAutoComplete.tsx +++ b/VocaDbWeb/Scripts/Components/KnockoutExtensions/SongAutoComplete.tsx @@ -9,7 +9,6 @@ import { NameMatchMode } from '@/Models/NameMatchMode'; import { SongQueryParams } from '@/Repositories/SongRepository'; import { functions } from '@/Shared/GlobalFunctions'; import { SongSortRule } from '@/Stores/Search/SongSearchStore'; -import $ from 'jquery'; import React from 'react'; import { useTranslation } from 'react-i18next'; @@ -41,9 +40,8 @@ export const SongAutoComplete = ({ lang: vdb.values.languagePreference, preferAccurateMatches: true, sort: SongSortRule.SongType, + ...properties.extraQueryParams, }; - if (properties.extraQueryParams) - $.extend(queryParams, properties.extraQueryParams); return ( Date: Mon, 31 Oct 2022 09:20:49 +0000 Subject: [PATCH 3/3] Uninstall bootstrap-sass --- VocaDbWeb/Scripts/libs.js | 2 -- VocaDbWeb/package-lock.json | 11 ----------- VocaDbWeb/package.json | 1 - 3 files changed, 14 deletions(-) diff --git a/VocaDbWeb/Scripts/libs.js b/VocaDbWeb/Scripts/libs.js index ea9b6193e1..c804722164 100644 --- a/VocaDbWeb/Scripts/libs.js +++ b/VocaDbWeb/Scripts/libs.js @@ -1,7 +1,5 @@ window.$ = window.jQuery = require('jquery'); -require('bootstrap-sass'); - require('jquery-ui/autocomplete'); require('jquery-ui/button'); require('jquery-ui/datepicker'); diff --git a/VocaDbWeb/package-lock.json b/VocaDbWeb/package-lock.json index 7ab8630bd9..d75bd9fb4b 100644 --- a/VocaDbWeb/package-lock.json +++ b/VocaDbWeb/package-lock.json @@ -14,7 +14,6 @@ "ajv": "^8.6.2", "ajv-formats": "^2.1.1", "axios": "^0.21.2", - "bootstrap-sass": "^2.3.2", "classnames": "^2.3.1", "decimal.js-light": "^2.5.1", "highcharts": "^10.0.0", @@ -5206,11 +5205,6 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, - "node_modules/bootstrap-sass": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/bootstrap-sass/-/bootstrap-sass-2.3.2.tgz", - "integrity": "sha1-qHu8hgYK1mLVZvyOgMlMBdiMuvk=" - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -22698,11 +22692,6 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, - "bootstrap-sass": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/bootstrap-sass/-/bootstrap-sass-2.3.2.tgz", - "integrity": "sha1-qHu8hgYK1mLVZvyOgMlMBdiMuvk=" - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", diff --git a/VocaDbWeb/package.json b/VocaDbWeb/package.json index 78a4865924..d03bf96512 100644 --- a/VocaDbWeb/package.json +++ b/VocaDbWeb/package.json @@ -63,7 +63,6 @@ "ajv": "^8.6.2", "ajv-formats": "^2.1.1", "axios": "^0.21.2", - "bootstrap-sass": "^2.3.2", "classnames": "^2.3.1", "decimal.js-light": "^2.5.1", "highcharts": "^10.0.0",