cleaned ununsed dependancies and packages

This commit is contained in:
2023-02-15 11:43:38 +00:00
parent fc5217daf8
commit 9fe6c24f71
20 changed files with 47 additions and 155 deletions
-1
View File
@@ -1,5 +1,4 @@
import axios from "axios"; import axios from "axios";
import https from "https";
import CryptoJS from "crypto-js"; import CryptoJS from "crypto-js";
import HmacSHA256 from "crypto-js/hmac-sha256"; import HmacSHA256 from "crypto-js/hmac-sha256";
import { getFormCollection } from "../components/utils"; import { getFormCollection } from "../components/utils";
+1 -6
View File
@@ -4,7 +4,7 @@ import _ from "lodash";
import { useState } from "react"; import { useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import LoadingOverlay from "react-loading-overlay";
import { getSession, useSession } from "next-auth/react"; import { getSession, useSession } from "next-auth/react";
const Breadcrumbs = (props) => { const Breadcrumbs = (props) => {
@@ -848,11 +848,6 @@ const Breadcrumbs = (props) => {
</ol> </ol>
</div> </div>
</nav> </nav>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</> </>
); );
}; };
+1 -6
View File
@@ -6,7 +6,7 @@ import { useState, useEffect, useRef, useCallback } from "react";
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux"; import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
import transLookup from "../../data/lookuptranslations.json"; import transLookup from "../../data/lookuptranslations.json";
import PaginationControl from "./pagination"; import PaginationControl from "./pagination";
import LoadingOverlay from "react-loading-overlay";
import CryptoJS from "crypto-js"; import CryptoJS from "crypto-js";
import { setCurrentPage } from "../../store/currentView/action"; import { setCurrentPage } from "../../store/currentView/action";
@@ -528,11 +528,6 @@ const DocumentDetails = (props) => {
</div> </div>
</div> </div>
</div> </div>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</> </>
); );
}; };
+1 -6
View File
@@ -6,7 +6,7 @@ import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath"; import jsonpath from "jsonpath";
import _ from "lodash"; import _ from "lodash";
import transLookup from "../../data/lookuptranslations.json"; import transLookup from "../../data/lookuptranslations.json";
import LoadingOverlay from "react-loading-overlay";
import { getRepresentations } from "../../actions"; import { getRepresentations } from "../../actions";
import { setRepresentations } from "../../store/searchOutput/action"; import { setRepresentations } from "../../store/searchOutput/action";
import PaginationControl from "./pagination"; import PaginationControl from "./pagination";
@@ -224,11 +224,6 @@ const RepresentationList = (props) => {
</div> </div>
</div> </div>
</div> </div>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</> </>
); );
}; };
+1 -11
View File
@@ -6,7 +6,6 @@ import useTranslation from "next-translate/useTranslation";
import jsonpath from "jsonpath"; import jsonpath from "jsonpath";
import _ from "lodash"; import _ from "lodash";
import transLookup from "../../data/lookuptranslations.json"; import transLookup from "../../data/lookuptranslations.json";
import LoadingOverlay from "react-loading-overlay";
import { getLinkedCases } from "../../actions"; import { getLinkedCases } from "../../actions";
import { import {
@@ -833,16 +832,7 @@ const CaseSummary = (props) => {
return date > start && date > end ? true : false; return date > start && date > end ? true : false;
} }
return ( return <>{showDetailsBlock}</>;
<>
{showDetailsBlock}
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</>
);
}; };
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
-1
View File
@@ -1,4 +1,3 @@
import useSWR from "swr";
import { Field, reduxForm } from "redux-form"; import { Field, reduxForm } from "redux-form";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import DatePicker, { registerLocale, setDefaultLocale } from "react-datepicker"; import DatePicker, { registerLocale, setDefaultLocale } from "react-datepicker";
-6
View File
@@ -4,7 +4,6 @@ import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { Field, reduxForm } from "redux-form"; import { Field, reduxForm } from "redux-form";
import LoadingOverlay from "react-loading-overlay";
const required = (errorMsg) => (value) => const required = (errorMsg) => (value) =>
value || typeof value === "number" ? undefined : errorMsg; value || typeof value === "number" ? undefined : errorMsg;
@@ -150,11 +149,6 @@ let CaseSearch = (props) => {
</Link> </Link>
</div> </div>
</form> </form>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</div> </div>
</> </>
); );
-6
View File
@@ -2,7 +2,6 @@ import Link from "next/link";
import { useState } from "react"; import { useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import LoadingOverlay from "react-loading-overlay";
export default function Dns() { export default function Dns() {
let { t } = useTranslation(); let { t } = useTranslation();
@@ -46,11 +45,6 @@ export default function Dns() {
</Link> </Link>
</div> </div>
</div> </div>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-loading")}
/> */}
</div> </div>
); );
} }
+1 -7
View File
@@ -4,7 +4,7 @@ import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { Field, reduxForm } from "redux-form"; import { Field, reduxForm } from "redux-form";
import LoadingOverlay from "react-loading-overlay";
import { getLogin } from "../../actions"; import { getLogin } from "../../actions";
import { setLoggedInUserId } from "../../store/accountDetails/action"; import { setLoggedInUserId } from "../../store/accountDetails/action";
import { parseCookies, setCookie, destroyCookie } from "nookies"; import { parseCookies, setCookie, destroyCookie } from "nookies";
@@ -371,12 +371,6 @@ let Login = (props) => {
</p> </p>
</div> </div>
</div> </div>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text="Logging in"
/> */}
</div> </div>
</> </>
); );
+1 -6
View File
@@ -6,7 +6,7 @@ import { reduxForm, formValueSelector, Field } from "redux-form";
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux"; import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
import jsonpath from "jsonpath"; import jsonpath from "jsonpath";
import data from "../../data/collections.json"; import data from "../../data/collections.json";
import LoadingOverlay from "react-loading-overlay";
import transLookup from "../../data/lookuptranslations.json"; import transLookup from "../../data/lookuptranslations.json";
const required = (errorMsg) => (value) => const required = (errorMsg) => (value) =>
@@ -471,11 +471,6 @@ let AdvancedSearch = (props) => {
</div> </div>
</form> </form>
</div> </div>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</> </>
); );
}; };
-6
View File
@@ -2,7 +2,6 @@ import Link from "next/link";
import { useState } from "react"; import { useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import LoadingOverlay from "react-loading-overlay";
export default function Dns() { export default function Dns() {
let { t } = useTranslation(); let { t } = useTranslation();
@@ -46,11 +45,6 @@ export default function Dns() {
</Link> </Link>
</div> </div>
</div> </div>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-loading")}
/> */}
</div> </div>
); );
} }
-6
View File
@@ -4,7 +4,6 @@ import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { Field, reduxForm } from "redux-form"; import { Field, reduxForm } from "redux-form";
import LoadingOverlay from "react-loading-overlay";
const required = (errorMsg) => (value) => const required = (errorMsg) => (value) =>
value || typeof value === "number" ? undefined : errorMsg; value || typeof value === "number" ? undefined : errorMsg;
@@ -151,11 +150,6 @@ let CaseSearch = (props) => {
</Link> </Link>
</div> </div>
</form> </form>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</div> </div>
</> </>
); );
+1 -1
View File
@@ -2,7 +2,7 @@ import Link from "next/link";
import { useState, useMemo } from "react"; import { useState, useMemo } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation"; import useTranslation from "next-translate/useTranslation";
import LoadingOverlay from "react-loading-overlay";
import DropzoneComponent from "../newappeal/fileupload"; import DropzoneComponent from "../newappeal/fileupload";
import { Field, reduxForm } from "redux-form"; import { Field, reduxForm } from "redux-form";
import { connect } from "react-redux"; import { connect } from "react-redux";
+1 -6
View File
@@ -6,7 +6,7 @@ import { reduxForm, formValueSelector, Field } from "redux-form";
import { useDispatch, useSelector, shallowEqual, connect } from "react-redux"; import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
import jsonpath from "jsonpath"; import jsonpath from "jsonpath";
import data from "../../data/collections.json"; import data from "../../data/collections.json";
import LoadingOverlay from "react-loading-overlay";
import transLookup from "../../data/lookuptranslations.json"; import transLookup from "../../data/lookuptranslations.json";
const required = (errorMsg) => (value) => const required = (errorMsg) => (value) =>
@@ -613,11 +613,6 @@ let AdvancedSearch = (props) => {
</div> </div>
</form> </form>
</div> </div>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</> </>
); );
}; };
+1 -6
View File
@@ -7,7 +7,7 @@ import _ from "lodash";
import transLookup from "../../data/lookuptranslations.json"; import transLookup from "../../data/lookuptranslations.json";
import PaginationControl from "./pagination"; import PaginationControl from "./pagination";
import { useState, useEffect, useCallback } from "react"; import { useState, useEffect, useCallback } from "react";
import LoadingOverlay from "react-loading-overlay";
import { import {
getBasicDNSSearchPaged, getBasicDNSSearchPaged,
getBasicSearchDetailsPaged, getBasicSearchDetailsPaged,
@@ -768,11 +768,6 @@ const DNSSearchResults = (props) => {
</div> </div>
</div> </div>
)} )}
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</> </>
); );
}; };
-6
View File
@@ -18,7 +18,6 @@ import {
} from "../../actions"; } from "../../actions";
import data from "../../data/collections.json"; import data from "../../data/collections.json";
import { useCallback, useState } from "react"; import { useCallback, useState } from "react";
import LoadingOverlay from "react-loading-overlay";
import { import {
setSearchResults, setSearchResults,
@@ -769,11 +768,6 @@ const SearchResults = (props) => {
)} )}
</div> </div>
</div> </div>
{/* <LoadingOverlay
active={showSpinnerState}
spinner
text={t("common:spinner-searching")}
/> */}
</> </>
); );
}; };
-21
View File
@@ -1,5 +1,4 @@
import Head from "next/head"; import Head from "next/head";
import { string } from "prop-types";
// ALl options are conditional apart from title // ALl options are conditional apart from title
const PageMeta = ({ const PageMeta = ({
@@ -96,24 +95,4 @@ const PageMeta = ({
); );
}; };
PageMeta.propTypes = {
title: string,
createdAt: string,
updatedAt: string,
ogImage: string,
ogUrl: string,
ogTitle: string,
ogType: string,
ogDescription: string,
canonicalURL: string,
description: string,
keywords: string,
createdAt: string,
updatedAt: string,
robots: string,
twitterDescription: string,
twitterTitle: string,
twitterImage: string,
};
export default PageMeta; export default PageMeta;
+23 -15
View File
@@ -1,22 +1,22 @@
// next.config.js // next.config.js
const withStyles = require("@webdeb/next-styles"); //const withStyles = require("@webdeb/next-styles");
//const { nextI18NextRewrites } = require("next-i18next/rewrites"); //const { nextI18NextRewrites } = require("next-i18next/rewrites");
const nextTranslate = require("next-translate"); const nextTranslate = require("next-translate");
module.exports = withStyles({ // module.exports = withStyles({
sass: true, // use .scss files // sass: true, // use .scss files
modules: true, // style.(m|module).css & style.(m|module).scss for module files // modules: true, // style.(m|module).css & style.(m|module).scss for module files
sassLoaderOptions: { // sassLoaderOptions: {
sassOptions: { // sassOptions: {
includePaths: [ // includePaths: [
"/styles/sass", // "/styles/sass",
"node_modules/govuk-frontend/govuk/all", // "node_modules/govuk-frontend/govuk/all",
"/styles/sass/patterns", // "/styles/sass/patterns",
"/styles/sass/prevent-training", // "/styles/sass/welshgov",
], // @import 'variables'; # loads (src/styles/varialbes.scss), you got it.. // ], // @import 'variables'; # loads (src/styles/varialbes.scss), you got it..
}, // },
}, // },
}); // });
const securityHeaders = [ const securityHeaders = [
{ {
@@ -54,6 +54,14 @@ const securityHeaders = [
]; ];
module.exports = { module.exports = {
sassOptions: {
includePaths: [
"/styles/sass",
"node_modules/govuk-frontend/govuk/all",
"/styles/sass/patterns",
"/styles/sass/welshgov",
], // @import 'variables'; # loads (src/styles/varialbes.scss), you got it..
},
async headers() { async headers() {
return [ return [
{ {
+15 -31
View File
@@ -10,83 +10,67 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"@azure/identity": "^2.0.5", "@azure/identity": "^3.1.3",
"@azure/storage-blob": "^12.12.0", "@azure/storage-blob": "^12.12.0",
"@azure/storage-queue": "^12.11.0", "@azure/storage-queue": "^12.11.0",
"@googlemaps/react-wrapper": "^1.1.24",
"@magic-sdk/admin": "^1.4.0",
"@next-auth/prisma-adapter": "^1.0.4", "@next-auth/prisma-adapter": "^1.0.4",
"@prisma/client": "^3.12.0", "@prisma/client": "^3.12.0",
"@redux-devtools/extension": "^3.2.3", "@redux-devtools/extension": "^3.2.5",
"@webdeb/next-styles": "^1.1.1",
"applicationinsights": "^2.2.0", "applicationinsights": "^2.2.0",
"axios": "^0.24.0", "axios": "^0.24.0",
"compression": "^1.7.4", "compression": "^1.7.4",
"cookie-cutter": "^0.2.0", "cookie-cutter": "^0.2.0",
"cookies": "^0.8.0",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"date-fns": "^2.28.0", "date-fns": "^2.28.0",
"dom": "^0.0.3", "dom": "^0.0.3",
"dynamics-web-api": "^1.7.4",
"express": "^4.17.2", "express": "^4.17.2",
"formidable": "^2.0.1", "fs": "0.0.2",
"fs": "^0.0.1-security",
"google-map-react": "^2.1.10", "google-map-react": "^2.1.10",
"govuk-frontend": "3.13.0", "govuk-frontend": "3.13.0",
"https": "^1.0.0",
"hyco-https": "^1.4.5",
"jsonpath": "^1.1.1", "jsonpath": "^1.1.1",
"jsonpath-plus": "^6.0.1",
"leaflet": "^1.7.1", "leaflet": "^1.7.1",
"leaflet-defaulticon-compatibility": "^0.1.1", "leaflet-defaulticon-compatibility": "^0.1.1",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"magic-sdk": "^8.1.0",
"moment": "^2.29.1", "moment": "^2.29.1",
"multer": "^1.4.4",
"multiparty": "^4.2.3", "multiparty": "^4.2.3",
"mysql": "^2.18.1", "mysql": "^2.18.1",
"nanoid": "^3.2.0", "nanoid": "^3.2.0",
"next": "^12.0.8", "next": "^12.0.8",
"next-auth": "^4.3.4", "next-auth": "4.19.2",
"next-connect": "^0.12.2", "next-connect": "^0.12.2",
"next-redux-wrapper": "^7.0.5", "next-redux-wrapper": "^7.0.5",
"next-translate": "^1.2.0", "next-translate": "^1.2.0",
"nodemailer": "^6.7.8", "nodemailer": "^6.9.1",
"nookies": "^2.5.2", "nookies": "^2.5.2",
"notifications-node-client": "^5.1.1", "notifications-node-client": "^5.1.1",
"ospoint": "^0.2.1", "ospoint": "^0.2.1",
"path": "^0.12.7", "path": "^0.12.7",
"prop-types": "^15.8.1",
"react": "17.0.2", "react": "17.0.2",
"react-accessible-accordion": "^4.0.0", "react-accessible-accordion": "^4.0.0",
"react-autosuggest": "^10.1.0", "react-autosuggest": "^10.1.0",
"react-cookie-consent": "^7.2.1", "react-cookie-consent": "^7.2.1",
"react-datepicker": "^4.6.0", "react-datepicker": "4.10.0",
"react-dom": "17.0.2", "react-dom": "17.0.2",
"react-dropzone": "^11.5.1", "react-dropzone": "^11.5.1",
"react-idle-timer": "^4.6.4", "react-idle-timer": "4.6.4",
"react-leaflet": "^3.2.5", "react-leaflet": "^3.2.5",
"react-loading-overlay": "^1.0.1",
"react-quill": "^2.0.0", "react-quill": "^2.0.0",
"react-redux": "^7.2.6", "react-redux": "^7.2.6",
"react-xml-parser": "^1.1.8", "redux": "^4.2.1",
"redux-form": "^8.3.8", "redux-form": "^8.3.9",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"redux-thunk": "^2.4.1", "redux-thunk": "^2.4.2",
"sass": "1.32", "sass": "1.32",
"sass-loader": "^12.4.0", "sass-loader": "13.2.0",
"swr": "^1.1.2", "typescript": "^4.9.5",
"typeorm": "^0.3.5", "uuid": "9.0.0",
"uuid": "^8.3.2",
"webpack": "^5.66.0", "webpack": "^5.66.0",
"xml2js": "^0.4.23",
"xmldom": "^0.6.0",
"xmlhttprequest": "^1.8.0",
"xpath": "^0.0.32" "xpath": "^0.0.32"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.6.0", "eslint": "^8.6.0",
"eslint-config-next": "^12.0.8", "eslint-config-next": "^13.1.6",
"prettier": "2.5.1",
"prisma": "^3.12.0" "prisma": "^3.12.0"
} }
} }
-1
View File
@@ -1,5 +1,4 @@
import axios from "axios"; import axios from "axios";
import https from "https";
import CryptoJS from "crypto-js"; import CryptoJS from "crypto-js";
import { getToken, consoleLogger } from "../../../../actions"; import { getToken, consoleLogger } from "../../../../actions";