@@ -1,13 +1,13 @@
|
|||||||
REACT_APP_GRAPHQL_ENDPOINT=https://db.dev.bodyshop.app/v1/graphql
|
VITE_APP_GRAPHQL_ENDPOINT=https://db.dev.bodyshop.app/v1/graphql
|
||||||
REACT_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.bodyshop.app/v1/graphql
|
VITE_APP_GRAPHQL_ENDPOINT_WS=wss://db.dev.bodyshop.app/v1/graphql
|
||||||
REACT_APP_GA_CODE=231099835
|
VITE_APP_GA_CODE=231099835
|
||||||
REACT_APP_FIREBASE_CONFIG={"apiKey":"AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc","authDomain":"imex-dev.firebaseapp.com","databaseURL":"https://imex-dev.firebaseio.com","projectId":"imex-dev","storageBucket":"imex-dev.appspot.com","messagingSenderId":"759548147434","appId":"1:759548147434:web:e8239868a48ceb36700993","measurementId":"G-K5XRBVVB4S"}
|
VITE_APP_FIREBASE_CONFIG={"apiKey":"AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc","authDomain":"imex-dev.firebaseapp.com","databaseURL":"https://imex-dev.firebaseio.com","projectId":"imex-dev","storageBucket":"imex-dev.appspot.com","messagingSenderId":"759548147434","appId":"1:759548147434:web:e8239868a48ceb36700993","measurementId":"G-K5XRBVVB4S"}
|
||||||
REACT_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/io-test
|
VITE_APP_CLOUDINARY_ENDPOINT_API=https://api.cloudinary.com/v1_1/io-test
|
||||||
REACT_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/io-test
|
VITE_APP_CLOUDINARY_ENDPOINT=https://res.cloudinary.com/io-test
|
||||||
REACT_APP_CLOUDINARY_API_KEY=957865933348715
|
VITE_APP_CLOUDINARY_API_KEY=957865933348715
|
||||||
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
VITE_APP_CLOUDINARY_THUMB_TRANSFORMATIONS=c_fill,h_250,w_250
|
||||||
REACT_APP_FIREBASE_PUBLIC_VAPID_KEY='BG3tzU7L2BXlGZ_3VLK4PNaRceoEXEnmHfxcVbRMF5o5g05ejslhVPki9kBM9cBBT-08Ad9kN3HSpS6JmrWD6h4'
|
VITE_APP_FIREBASE_PUBLIC_VAPID_KEY='BG3tzU7L2BXlGZ_3VLK4PNaRceoEXEnmHfxcVbRMF5o5g05ejslhVPki9kBM9cBBT-08Ad9kN3HSpS6JmrWD6h4'
|
||||||
REACT_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
VITE_APP_STRIPE_PUBLIC_KEY=pk_test_51GqB4TJl3nQjrZ0wCQWAxAhlNF8jKe0tipIa6ExBaxwJGitwvFsIZUEua4dUzaMIAuXp4qwYHXx7lgjyQSwP0Pe900vzm38C7g
|
||||||
REACT_APP_AXIOS_BASE_API_URL=http://localhost:4000
|
VITE_APP_AXIOS_BASE_API_URL=http://localhost:4000
|
||||||
REACT_APP_REPORTS_SERVER_URL=https://reports3.test.imex.online
|
VITE_APP_REPORTS_SERVER_URL=https://reports3.test.imex.online
|
||||||
REACT_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||||
Binary file not shown.
@@ -2,12 +2,12 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
|
<link rel="icon" href="/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#002366" />
|
<meta name="theme-color" content="#002366" />
|
||||||
<meta name="description" content="ImEX Online" />
|
<meta name="description" content="ImEX Online" />
|
||||||
<!-- <link rel="apple-touch-icon" href="logo192.png" /> -->
|
<!-- <link rel="apple-touch-icon" href="logo192.png" /> -->
|
||||||
<link rel="apple-touch-icon" href="logo192.png" />
|
<link rel="apple-touch-icon" href="public/logo192.png" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.$crisp = [];
|
window.$crisp = [];
|
||||||
window.CRISP_WEBSITE_ID = "36724f62-2eb0-4b29-9cdd-9905fb99913e";
|
window.CRISP_WEBSITE_ID = "36724f62-2eb0-4b29-9cdd-9905fb99913e";
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
manifest.json provides metadata used when your web app is installed on a
|
manifest.json provides metadata used when your web app is installed on a
|
||||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
-->
|
-->
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
<link rel="manifest" href="/manifest.json" />
|
||||||
<!--
|
<!--
|
||||||
Notice the use of %PUBLIC_URL% in the tags above.
|
Notice the use of %PUBLIC_URL% in the tags above.
|
||||||
It will be replaced with the URL of the `public` folder during the build.
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
@@ -82,5 +82,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|
||||||
|
<script type="module" src="src/index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
13817
client/package-lock.json
generated
13817
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "bodyshop",
|
"name": "bodyshop",
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
|
"engines": {
|
||||||
|
"node": "18.18.2"
|
||||||
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"proxy": "http://localhost:4000",
|
"proxy": "http://localhost:4000",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/compatible": "^5.1.2",
|
"@ant-design/compatible": "^5.1.2",
|
||||||
"@ant-design/pro-layout": "^7.17.16",
|
"@ant-design/pro-layout": "^7.17.16",
|
||||||
"@apollo/client": "^3.8.9",
|
"@apollo/client": "^3.7.9",
|
||||||
"@asseinfo/react-kanban": "^2.2.0",
|
"@asseinfo/react-kanban": "^2.2.0",
|
||||||
"@craco/craco": "^7.1.0",
|
|
||||||
"@fingerprintjs/fingerprintjs": "^4.2.1",
|
"@fingerprintjs/fingerprintjs": "^4.2.1",
|
||||||
"@jsreport/browser-client": "^3.1.0",
|
"@jsreport/browser-client": "^3.1.0",
|
||||||
"@reduxjs/toolkit": "^2.0.1",
|
"@reduxjs/toolkit": "^2.0.1",
|
||||||
@@ -16,16 +18,21 @@
|
|||||||
"@sentry/tracing": "^7.93.0",
|
"@sentry/tracing": "^7.93.0",
|
||||||
"@splitsoftware/splitio-react": "^1.10.2",
|
"@splitsoftware/splitio-react": "^1.10.2",
|
||||||
"@tanem/react-nprogress": "^5.0.51",
|
"@tanem/react-nprogress": "^5.0.51",
|
||||||
|
"@vitejs/plugin-legacy": "^5.2.0",
|
||||||
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
|
"@vitejs/plugin-react-refresh": "^1.3.6",
|
||||||
|
"@vitejs/plugin-react-swc": "^3.5.0",
|
||||||
"antd": "^5.12.8",
|
"antd": "^5.12.8",
|
||||||
"apollo-link-logger": "^2.0.1",
|
"apollo-link-logger": "^2.0.1",
|
||||||
"axios": "^1.6.5",
|
"axios": "^1.6.5",
|
||||||
"craco-less": "^3.0.1",
|
"consola": "^3.2.3",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"dayjs-business-days2": "^1.2.2",
|
"dayjs-business-days2": "^1.2.2",
|
||||||
"dinero.js": "^1.9.1",
|
"dinero.js": "^1.9.1",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"enquire-js": "^0.2.1",
|
"enquire-js": "^0.2.1",
|
||||||
"env-cmd": "^10.1.0",
|
"env-cmd": "^10.1.0",
|
||||||
|
"esbuild": "^0.19.11",
|
||||||
"exifr": "^7.1.3",
|
"exifr": "^7.1.3",
|
||||||
"firebase": "^10.7.1",
|
"firebase": "^10.7.1",
|
||||||
"graphql": "^16.6.0",
|
"graphql": "^16.6.0",
|
||||||
@@ -59,7 +66,6 @@
|
|||||||
"react-redux": "^9.1.0",
|
"react-redux": "^9.1.0",
|
||||||
"react-resizable": "^3.0.5",
|
"react-resizable": "^3.0.5",
|
||||||
"react-router-dom": "^6.21.2",
|
"react-router-dom": "^6.21.2",
|
||||||
"react-scripts": "^5.0.1",
|
|
||||||
"react-sticky": "^6.0.3",
|
"react-sticky": "^6.0.3",
|
||||||
"react-sublime-video": "^0.2.5",
|
"react-sublime-video": "^0.2.5",
|
||||||
"react-virtualized": "^9.22.5",
|
"react-virtualized": "^9.22.5",
|
||||||
@@ -74,6 +80,7 @@
|
|||||||
"styled-components": "^6.1.8",
|
"styled-components": "^6.1.8",
|
||||||
"subscriptions-transport-ws": "^0.11.0",
|
"subscriptions-transport-ws": "^0.11.0",
|
||||||
"terser-webpack-plugin": "^5.3.10",
|
"terser-webpack-plugin": "^5.3.10",
|
||||||
|
"vite-plugin-svgr": "^4.2.0",
|
||||||
"web-vitals": "^3.5.1",
|
"web-vitals": "^3.5.1",
|
||||||
"workbox-core": "^7.0.0",
|
"workbox-core": "^7.0.0",
|
||||||
"workbox-expiration": "^7.0.0",
|
"workbox-expiration": "^7.0.0",
|
||||||
@@ -85,7 +92,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"analyze": "source-map-explorer 'build/static/js/*.js'",
|
"analyze": "source-map-explorer 'build/static/js/*.js'",
|
||||||
"start": "craco start",
|
"start": "vite",
|
||||||
"build": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` craco build",
|
"build": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` craco build",
|
||||||
"build:test": "env-cmd -f .env.test npm run build",
|
"build:test": "env-cmd -f .env.test npm run build",
|
||||||
"build-deploy:test": "npm run build:test && s3cmd sync build/* s3://imex-online-test && echo '🚀 TESTING Deployed!'",
|
"build-deploy:test": "npm run build:test && s3cmd sync build/* s3://imex-online-test && echo '🚀 TESTING Deployed!'",
|
||||||
@@ -118,12 +125,27 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
||||||
|
"@babel/preset-react": "^7.23.3",
|
||||||
|
"@emotion/babel-plugin": "^11.11.0",
|
||||||
|
"@emotion/react": "^11.11.3",
|
||||||
"@sentry/webpack-plugin": "^2.10.2",
|
"@sentry/webpack-plugin": "^2.10.2",
|
||||||
|
"@swc/core": "^1.3.104",
|
||||||
|
"@swc/plugin-styled-components": "^1.5.108",
|
||||||
"@testing-library/cypress": "^10.0.1",
|
"@testing-library/cypress": "^10.0.1",
|
||||||
|
"browserslist": "^4.22.2",
|
||||||
|
"browserslist-to-esbuild": "^2.1.1",
|
||||||
|
"craco-less": "^3.0.1",
|
||||||
"cypress": "^13.6.2",
|
"cypress": "^13.6.2",
|
||||||
"eslint-plugin-cypress": "^2.15.1",
|
"eslint-plugin-cypress": "^2.15.1",
|
||||||
|
"memfs": "^4.6.0",
|
||||||
|
"os-browserify": "^0.3.0",
|
||||||
"react-error-overlay": "6.0.11",
|
"react-error-overlay": "6.0.11",
|
||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
"source-map-explorer": "^2.5.3"
|
"source-map-explorer": "^2.5.3",
|
||||||
|
"vite": "^5.0.11",
|
||||||
|
"vite-plugin-babel": "^1.2.0",
|
||||||
|
"vite-plugin-legacy": "^2.1.0",
|
||||||
|
"vite-plugin-node-polyfills": "^0.19.0",
|
||||||
|
"vite-plugin-style-import": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ dayjs.locale("en");
|
|||||||
|
|
||||||
export const factory = SplitSdk({
|
export const factory = SplitSdk({
|
||||||
core: {
|
core: {
|
||||||
authorizationKey: process.env.REACT_APP_SPLIT_API,
|
authorizationKey: import.meta.env.VITE_APP_SPLIT_API,
|
||||||
key: "anon",
|
key: "anon",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function ChatAffixContainer({ bodyshop, chatVisible }) {
|
|||||||
try {
|
try {
|
||||||
const r = await axios.post("/notifications/subscribe", {
|
const r = await axios.post("/notifications/subscribe", {
|
||||||
fcm_tokens: await getToken(messaging, {
|
fcm_tokens: await getToken(messaging, {
|
||||||
vapidKey: process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY,
|
vapidKey: import.meta.env.VITE_APP_FIREBASE_PUBLIC_VAPID_KEY,
|
||||||
}),
|
}),
|
||||||
type: "messaging",
|
type: "messaging",
|
||||||
imexshopid: bodyshop.imexshopid,
|
imexshopid: bodyshop.imexshopid,
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export const uploadToCloudinary = async (
|
|||||||
let tags = `${bodyshop.imexshopid},${
|
let tags = `${bodyshop.imexshopid},${
|
||||||
tagsArray ? tagsArray.map((tag) => `${tag},`) : ""
|
tagsArray ? tagsArray.map((tag) => `${tag},`) : ""
|
||||||
}`;
|
}`;
|
||||||
// let eager = process.env.REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS;
|
// let eager = import.meta.env.VITE_APP_CLOUDINARY_THUMB_TRANSFORMATIONS;
|
||||||
|
|
||||||
//Get the signed url.
|
//Get the signed url.
|
||||||
|
|
||||||
@@ -96,14 +96,14 @@ export const uploadToCloudinary = async (
|
|||||||
|
|
||||||
formData.append("upload_preset", upload_preset);
|
formData.append("upload_preset", upload_preset);
|
||||||
|
|
||||||
formData.append("api_key", process.env.REACT_APP_CLOUDINARY_API_KEY);
|
formData.append("api_key", import.meta.env.VITE_APP_CLOUDINARY_API_KEY);
|
||||||
formData.append("public_id", public_id);
|
formData.append("public_id", public_id);
|
||||||
formData.append("tags", tags);
|
formData.append("tags", tags);
|
||||||
formData.append("timestamp", timestamp);
|
formData.append("timestamp", timestamp);
|
||||||
formData.append("signature", signature);
|
formData.append("signature", signature);
|
||||||
|
|
||||||
const cloudinaryUploadResponse = await cleanAxios.post(
|
const cloudinaryUploadResponse = await cleanAxios.post(
|
||||||
`${process.env.REACT_APP_CLOUDINARY_ENDPOINT_API}/${DetermineFileType(
|
`${import.meta.env.VITE_APP_CLOUDINARY_ENDPOINT_API}/${DetermineFileType(
|
||||||
fileType
|
fileType
|
||||||
)}/upload`,
|
)}/upload`,
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export const GenerateSrcUrl = (value) => {
|
|||||||
let extension = value.extension;
|
let extension = value.extension;
|
||||||
if (extension && extension.toLowerCase().includes("heic")) extension = "jpg";
|
if (extension && extension.toLowerCase().includes("heic")) extension = "jpg";
|
||||||
|
|
||||||
return `${process.env.REACT_APP_CLOUDINARY_ENDPOINT}/${DetermineFileType(
|
return `${import.meta.env.VITE_APP_CLOUDINARY_ENDPOINT}/${DetermineFileType(
|
||||||
value.type
|
value.type
|
||||||
)}/upload/${value.key}${extension ? `.${extension}` : ""}`;
|
)}/upload/${value.key}${extension ? `.${extension}` : ""}`;
|
||||||
};
|
};
|
||||||
@@ -18,9 +18,9 @@ export const GenerateThumbUrl = (value) => {
|
|||||||
)
|
)
|
||||||
extension = "jpg";
|
extension = "jpg";
|
||||||
|
|
||||||
return `${process.env.REACT_APP_CLOUDINARY_ENDPOINT}/${DetermineFileType(
|
return `${import.meta.env.VITE_APP_CLOUDINARY_ENDPOINT}/${DetermineFileType(
|
||||||
value.type
|
value.type
|
||||||
)}/upload/${process.env.REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS}/${
|
)}/upload/${import.meta.env.VITE_APP_CLOUDINARY_THUMB_TRANSFORMATIONS}/${
|
||||||
value.key
|
value.key
|
||||||
}${extension ? `.${extension}` : ""}`;
|
}${extension ? `.${extension}` : ""}`;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { getFirestore } from "firebase/firestore";
|
|||||||
import { getMessaging, getToken, onMessage } from "firebase/messaging";
|
import { getMessaging, getToken, onMessage } from "firebase/messaging";
|
||||||
import { store } from "../redux/store";
|
import { store } from "../redux/store";
|
||||||
|
|
||||||
const config = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG);
|
const config = JSON.parse(import.meta.env.VITE_APP_FIREBASE_CONFIG);
|
||||||
initializeApp(config);
|
initializeApp(config);
|
||||||
|
|
||||||
export const auth = getAuth();
|
export const auth = getAuth();
|
||||||
@@ -49,7 +49,7 @@ export { messaging };
|
|||||||
|
|
||||||
export const requestForToken = () => {
|
export const requestForToken = () => {
|
||||||
return getToken(messaging, {
|
return getToken(messaging, {
|
||||||
vapidKey: process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY,
|
vapidKey: import.meta.env.VITE_APP_FIREBASE_PUBLIC_VAPID_KEY,
|
||||||
})
|
})
|
||||||
.then((currentToken) => {
|
.then((currentToken) => {
|
||||||
if (currentToken) {
|
if (currentToken) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export default function AboutPage() {
|
|||||||
<div style={{ textAlign: "center", margin: "1rem 0rem" }}>
|
<div style={{ textAlign: "center", margin: "1rem 0rem" }}>
|
||||||
<Typography.Title
|
<Typography.Title
|
||||||
level={2}
|
level={2}
|
||||||
>{`ImEX Online V.${process.env.NODE_ENV}-${process.env.REACT_APP_GIT_SHA}`}</Typography.Title>
|
>{`ImEX Online V.${process.env.NODE_ENV}-${import.meta.env.VITE_APP_GIT_SHA}`}</Typography.Title>
|
||||||
<Typography.Title level={4}>
|
<Typography.Title level={4}>
|
||||||
© 2019 - {new Date().getFullYear()} Snapt Software Inc. used under
|
© 2019 - {new Date().getFullYear()} Snapt Software Inc. used under
|
||||||
license to ImEX Systems Inc.
|
license to ImEX Systems Inc.
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(DmsContainer);
|
|||||||
|
|
||||||
export const socket = SocketIO(
|
export const socket = SocketIO(
|
||||||
process.env.NODE_ENV === "production"
|
process.env.NODE_ENV === "production"
|
||||||
? process.env.REACT_APP_AXIOS_BASE_API_URL
|
? import.meta.env.VITE_APP_AXIOS_BASE_API_URL
|
||||||
: window.location.origin,
|
: window.location.origin,
|
||||||
{
|
{
|
||||||
path: "/ws",
|
path: "/ws",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(DmsContainer);
|
|||||||
|
|
||||||
export const socket = SocketIO(
|
export const socket = SocketIO(
|
||||||
process.env.NODE_ENV === "production"
|
process.env.NODE_ENV === "production"
|
||||||
? process.env.REACT_APP_AXIOS_BASE_API_URL
|
? import.meta.env.VITE_APP_AXIOS_BASE_API_URL
|
||||||
: window.location.origin,
|
: window.location.origin,
|
||||||
// "http://localhost:4000", // for dev testing,
|
// "http://localhost:4000", // for dev testing,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {FloatButton, Layout} from "antd";
|
import {FloatButton, Layout} from "antd";
|
||||||
import preval from "preval.macro";
|
// import preval from "preval.macro";
|
||||||
import React, {lazy, Suspense, useEffect, useState} from "react";
|
import React, {lazy, Suspense, useEffect, useState} from "react";
|
||||||
import {useTranslation} from "react-i18next";
|
import {useTranslation} from "react-i18next";
|
||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
@@ -180,6 +180,7 @@ export function Manage({conflict, bodyshop}) {
|
|||||||
const [chatVisible] = useState(false);
|
const [chatVisible] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const widgetId = "IABVNO4scRKY11XBQkNr";
|
const widgetId = "IABVNO4scRKY11XBQkNr";
|
||||||
window.noticeable.render("widget", widgetId);
|
window.noticeable.render("widget", widgetId);
|
||||||
@@ -386,11 +387,7 @@ export function Manage({conflict, bodyshop}) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div style={{display: "flex"}}>
|
<div style={{display: "flex"}}>
|
||||||
<div>
|
|
||||||
{`ImEX Online ${
|
|
||||||
process.env.REACT_APP_GIT_SHA
|
|
||||||
} - ${preval`module.exports = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});`}`}
|
|
||||||
</div>
|
|
||||||
<div id="noticeable-widget" style={{marginLeft: "1rem"}}/>
|
<div id="noticeable-widget" style={{marginLeft: "1rem"}}/>
|
||||||
</div>
|
</div>
|
||||||
<Link to="/disclaimer" target="_blank" style={{color: "#ccc"}}>
|
<Link to="/disclaimer" target="_blank" style={{color: "#ccc"}}>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// const stripePromise = new Promise((resolve, reject) => {
|
// const stripePromise = new Promise((resolve, reject) => {
|
||||||
// resolve(
|
// resolve(
|
||||||
// loadStripe(process.env.REACT_APP_STRIPE_PUBLIC_KEY, {
|
// loadStripe(import.meta.env.VITE_APP_STRIPE_PUBLIC_KEY, {
|
||||||
// stripeAccount: "acct_1Fa7lFIEahEZW8b4",
|
// stripeAccount: "acct_1Fa7lFIEahEZW8b4",
|
||||||
// })
|
// })
|
||||||
// );
|
// );
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { auth } from "../firebase/firebase.utils";
|
|||||||
|
|
||||||
if (process.env.NODE_ENV === "production") {
|
if (process.env.NODE_ENV === "production") {
|
||||||
axios.defaults.baseURL =
|
axios.defaults.baseURL =
|
||||||
process.env.REACT_APP_AXIOS_BASE_API_URL || "https://api.imex.online/";
|
import.meta.env.VITE_APP_AXIOS_BASE_API_URL || "https://api.imex.online/";
|
||||||
}
|
}
|
||||||
|
|
||||||
export const axiosAuthInterceptorId = axios.interceptors.request.use(
|
export const axiosAuthInterceptorId = axios.interceptors.request.use(
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ import { auth } from "../firebase/firebase.utils";
|
|||||||
import errorLink from "../graphql/apollo-error-handling";
|
import errorLink from "../graphql/apollo-error-handling";
|
||||||
//import { store } from "../redux/store";
|
//import { store } from "../redux/store";
|
||||||
const httpLink = new HttpLink({
|
const httpLink = new HttpLink({
|
||||||
uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
|
uri: import.meta.env.VITE_APP_GRAPHQL_ENDPOINT,
|
||||||
});
|
});
|
||||||
|
|
||||||
const wsLink = new WebSocketLink({
|
const wsLink = new WebSocketLink({
|
||||||
uri: process.env.REACT_APP_GRAPHQL_ENDPOINT_WS,
|
uri: import.meta.env.VITE_APP_GRAPHQL_ENDPOINT_WS,
|
||||||
options: {
|
options: {
|
||||||
lazy: true,
|
lazy: true,
|
||||||
reconnect: true,
|
reconnect: true,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { store } from "../redux/store";
|
|||||||
import client from "../utils/GraphQLClient";
|
import client from "../utils/GraphQLClient";
|
||||||
import cleanAxios from "./CleanAxios";
|
import cleanAxios from "./CleanAxios";
|
||||||
import { TemplateList } from "./TemplateConstants";
|
import { TemplateList } from "./TemplateConstants";
|
||||||
const server = process.env.REACT_APP_REPORTS_SERVER_URL;
|
const server = import.meta.env.VITE_APP_REPORTS_SERVER_URL;
|
||||||
|
|
||||||
jsreport.serverUrl = server;
|
jsreport.serverUrl = server;
|
||||||
|
|
||||||
|
|||||||
132
client/vite.config.js
Normal file
132
client/vite.config.js
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
import legacy from '@vitejs/plugin-legacy'
|
||||||
|
// import {createStyleImportPlugin} from 'vite-plugin-style-import'
|
||||||
|
import react from '@vitejs/plugin-react'
|
||||||
|
import {createRequire} from 'module';
|
||||||
|
import {defineConfig, transformWithEsbuild} from 'vite'
|
||||||
|
import {promises as fsPromises} from "fs";
|
||||||
|
import * as url from "url";
|
||||||
|
import * as path from "path";
|
||||||
|
import {nodePolyfills} from "vite-plugin-node-polyfills";
|
||||||
|
import {
|
||||||
|
AndDesignVueResolve,
|
||||||
|
AntdResolve,
|
||||||
|
createStyleImportPlugin,
|
||||||
|
ElementPlusResolve,
|
||||||
|
NutuiResolve,
|
||||||
|
VantResolve
|
||||||
|
} from "vite-plugin-style-import";
|
||||||
|
|
||||||
|
const WRONG_CODE = `import { bpfrpt_proptype_WindowScroller } from "../WindowScroller.js";`
|
||||||
|
|
||||||
|
function reactVirtualized() {
|
||||||
|
return {
|
||||||
|
name: 'flat:react-virtualized',
|
||||||
|
configResolved: async () => {
|
||||||
|
const require = createRequire(import.meta.url)
|
||||||
|
const reactVirtualizedPath = require.resolve('react-virtualized')
|
||||||
|
const {pathname: reactVirtualizedFilePath} = new url.URL(reactVirtualizedPath, import.meta.url)
|
||||||
|
const file = reactVirtualizedFilePath
|
||||||
|
.replace(
|
||||||
|
path.join('dist', 'commonjs', 'index.js'),
|
||||||
|
path.join('dist', 'es', 'WindowScroller', 'utils', 'onScroll.js'),
|
||||||
|
)
|
||||||
|
const code = await fsPromises.readFile(file, 'utf-8');
|
||||||
|
const modified = code.replace(WRONG_CODE, '')
|
||||||
|
await fsPromises.writeFile(file, modified)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
base: '/',
|
||||||
|
|
||||||
|
plugins: [
|
||||||
|
{
|
||||||
|
name: 'treat-js-files-as-jsx',
|
||||||
|
async transform(code, id) {
|
||||||
|
if (!id.match(/src\/.*\.js$/)) return null
|
||||||
|
|
||||||
|
return transformWithEsbuild(code, id, {
|
||||||
|
loader: 'jsx',
|
||||||
|
jsx: 'automatic',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// reactVirtualized(),
|
||||||
|
react({
|
||||||
|
// jsxImportSource: '@emotion/react',
|
||||||
|
// babel: {
|
||||||
|
// plugins: ['@emotion/babel-plugin'],
|
||||||
|
// },
|
||||||
|
}),
|
||||||
|
nodePolyfills({
|
||||||
|
protocolImports: true,
|
||||||
|
overrides: {
|
||||||
|
// Since `fs` is not supported in browsers, we can use the `memfs` package to polyfill it.
|
||||||
|
fs: 'memfs',
|
||||||
|
// Since `path` is not supported in browsers, we can use the `path-browserify` package to polyfill it.
|
||||||
|
path: 'path-browserify',
|
||||||
|
// Since `os` is not supported in browsers, we can use the `os-browserify` package to polyfill it.
|
||||||
|
os: 'os-browserify/browser',
|
||||||
|
// Since `crypto` is not supported in browsers, we can use the `crypto-browserify` package to polyfill it.
|
||||||
|
crypto: 'crypto-browserify',
|
||||||
|
// Since `stream` is not supported in browsers, we can use the `stream-browserify` package to polyfill it.
|
||||||
|
stream: 'stream-browserify',
|
||||||
|
// Since `buffer` is not supported in browsers, we can use the `buffer` package to polyfill it.
|
||||||
|
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
createStyleImportPlugin({
|
||||||
|
resolves: [
|
||||||
|
AndDesignVueResolve(),
|
||||||
|
VantResolve(),
|
||||||
|
ElementPlusResolve(),
|
||||||
|
NutuiResolve(),
|
||||||
|
AntdResolve(),
|
||||||
|
],
|
||||||
|
libs: [
|
||||||
|
{
|
||||||
|
libraryName: 'ant-design-vue',
|
||||||
|
esModule: true,
|
||||||
|
resolveStyle: (name) => {
|
||||||
|
return `ant-design-vue/es/${name}/style/index`
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
legacy({
|
||||||
|
targets: ['defaults', 'not IE 11']
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
css: {
|
||||||
|
preprocessorOptions: {
|
||||||
|
less: {
|
||||||
|
javascriptEnabled: true,
|
||||||
|
modifyVars: {
|
||||||
|
'@text-color': '#000000',
|
||||||
|
'@ease-in-out': 'cubic-bezier(0.7, 0.3, 0.1, 1)',
|
||||||
|
'@ease-out': 'cubic-bezier(0.7, 0.3, 0.1, 1)',
|
||||||
|
'@primary-color': '#1DA57A',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
host: true,
|
||||||
|
port: 3000,
|
||||||
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
// force: true,
|
||||||
|
esbuildOptions: {
|
||||||
|
loader: {
|
||||||
|
'.js': 'jsx',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
outDir: 'dist',
|
||||||
|
rollupOptions: {
|
||||||
|
external: ['antd'],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user