-
- );
-}
-
-ShipmentsByWarehouseTable.defaultProps = {
- title: "",
- rows: [{}],
- shadow: true,
-};
-
-export default ShipmentsByWarehouseTable;
diff --git a/src/qqq/pages/dashboards/Tables/ShipmentsByWarehouseTableCell.tsx b/src/qqq/pages/dashboards/Tables/ShipmentsByWarehouseTableCell.tsx
deleted file mode 100644
index ed8d386..0000000
--- a/src/qqq/pages/dashboards/Tables/ShipmentsByWarehouseTableCell.tsx
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * QQQ - Low-code Application Framework for Engineers.
- * Copyright (C) 2021-2022. Kingsrook, LLC
- * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
- * contact@kingsrook.com
- * https://github.com/Kingsrook/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-import TableCell from "@mui/material/TableCell";
-import MDBox from "qqq/components/Temporary/MDBox";
-import MDTypography from "qqq/components/Temporary/MDTypography";
-
-interface Props
-{
- title: string;
- content?: string | number;
- image?: string;
- noBorder?: boolean;
- [key: string]: any;
-}
-
-function ShipmentsByWarehouseTableCell ({title, content, image, noBorder, ...rest}: Props): JSX.Element
-{
- let template;
-
- if (image)
- {
- template = (
-
-
- {" "}
-
-
- {title}:
-
-
- {content}
-
-
-
-
- );
- }
- else
- {
- template = (
-
-
-
- {title}:
-
-
- {content}
-
-
-
- );
- }
-
- return template;
-}
-
-// Declaring default props for SalesTableCell
-ShipmentsByWarehouseTableCell.defaultProps = {
- image: "",
- noBorder: false,
-};
-
-export default ShipmentsByWarehouseTableCell;
diff --git a/src/qqq/pages/dashboards/Widgets/Configs/BarChartConfig.ts b/src/qqq/pages/dashboards/Widgets/Configs/BarChartConfig.ts
deleted file mode 100644
index f75063c..0000000
--- a/src/qqq/pages/dashboards/Widgets/Configs/BarChartConfig.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * QQQ - Low-code Application Framework for Engineers.
- * Copyright (C) 2021-2022. Kingsrook, LLC
- * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
- * contact@kingsrook.com
- * https://github.com/Kingsrook/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-function configs(labels: any, datasets: any)
-{
- return {
- dataderp: {
- labels,
- datasets: [
- {
- label: datasets.label,
- tension: 0.4,
- borderWidth: 0,
- borderRadius: 4,
- borderSkipped: false,
- backgroundColor: "rgba(255, 255, 255, 0.8)",
- data: datasets.data,
- maxBarThickness: 6,
- },
- ],
- },
- options: {
- responsive: true,
- maintainAspectRatio: false,
- plugins: {
- legend: {
- display: false,
- },
- },
- interaction: {
- intersect: false,
- mode: "index",
- },
- scales: {
- y: {
- grid: {
- drawBorder: false,
- display: true,
- drawOnChartArea: true,
- drawTicks: false,
- borderDash: [5, 5],
- color: "rgba(255, 255, 255, .2)",
- },
- ticks: {
- suggestedMin: 0,
- suggestedMax: 500,
- beginAtZero: true,
- padding: 10,
- font: {
- size: 14,
- weight: 300,
- family: "Roboto",
- style: "normal",
- lineHeight: 2,
- },
- color: "#fff",
- },
- },
- x: {
- grid: {
- drawBorder: false,
- display: true,
- drawOnChartArea: true,
- drawTicks: false,
- borderDash: [5, 5],
- color: "rgba(255, 255, 255, .2)",
- },
- ticks: {
- display: true,
- color: "#f8f9fa",
- padding: 10,
- font: {
- size: 14,
- weight: 300,
- family: "Roboto",
- style: "normal",
- lineHeight: 2,
- },
- },
- },
- },
- },
- };
-}
-
-export default configs;
diff --git a/src/qqq/pages/dashboards/Widgets/Data/ShipmentsByWarehouseData.ts b/src/qqq/pages/dashboards/Widgets/Data/ShipmentsByWarehouseData.ts
deleted file mode 100644
index d04f10d..0000000
--- a/src/qqq/pages/dashboards/Widgets/Data/ShipmentsByWarehouseData.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * QQQ - Low-code Application Framework for Engineers.
- * Copyright (C) 2021-2022. Kingsrook, LLC
- * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
- * contact@kingsrook.com
- * https://github.com/Kingsrook/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-// Countries flags
-import BR from "assets/images/icons/flags/BR.png";
-import DE from "assets/images/icons/flags/DE.png";
-import GB from "assets/images/icons/flags/GB.png";
-import US from "assets/images/icons/flags/US.png";
-
-const shipmentsByWarehouseData = [
- {
- warehouse: [US, "Patterson, CA"],
- "shipments YTD": "25,234",
- "shipments last 30 days": "1,233",
- "delivery SLA": "95.9%",
- },
- {
- warehouse: [US, "Stockton, CA"],
- "shipments YTD": "2,234",
- "shipments last 30 days": "947",
- "delivery SLA": "90.9%",
- },
- {
- warehouse: [US, "Edison, NJ"],
- "shipments YTD": "425,992",
- "shipments last 30 days": "21,499",
- "delivery SLA": "94.4%",
- },
-];
-
-export default shipmentsByWarehouseData;
diff --git a/src/qqq/pages/dashboards/Widgets/Data/SmallShipmentsByWarehouseData.ts b/src/qqq/pages/dashboards/Widgets/Data/SmallShipmentsByWarehouseData.ts
deleted file mode 100644
index 2151c8e..0000000
--- a/src/qqq/pages/dashboards/Widgets/Data/SmallShipmentsByWarehouseData.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * QQQ - Low-code Application Framework for Engineers.
- * Copyright (C) 2021-2022. Kingsrook, LLC
- * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
- * contact@kingsrook.com
- * https://github.com/Kingsrook/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-// Countries flags
-import BR from "assets/images/icons/flags/BR.png";
-import DE from "assets/images/icons/flags/DE.png";
-import GB from "assets/images/icons/flags/GB.png";
-import US from "assets/images/icons/flags/US.png";
-
-const smallShipmentsByWarehouseData = [
- {
- warehouse: [US, "Patterson, CA"],
- "shipments YTD": "25,234",
- "SLA": "95.9%",
- },
- {
- warehouse: [US, "Stockton, CA"],
- "shipments YTD": "2,234",
- "SLA": "90.9%",
- },
- {
- warehouse: [US, "Edison, NJ"],
- "shipments YTD": "425,992",
- "SLA": "94.4%",
- },
-];
-
-export default smallShipmentsByWarehouseData;
diff --git a/src/qqq/pages/dashboards/Widgets/Data/TimeInTransitBarChartData.ts b/src/qqq/pages/dashboards/Widgets/Data/TimeInTransitBarChartData.ts
deleted file mode 100644
index e0b8234..0000000
--- a/src/qqq/pages/dashboards/Widgets/Data/TimeInTransitBarChartData.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
-=========================================================
-* Material Dashboard 2 PRO React TS - v1.0.0
-=========================================================
-
-* Product Page: https://www.creative-tim.com/product/material-dashboard-2-pro-react-ts
-* Copyright 2022 Creative Tim (https://www.creative-tim.com)
-
-Coded by www.creative-tim.com
-
- =========================================================
-
-* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-*/
-
-// types
-interface Types {
- labels: string[];
- datasets: {
- label: string;
- color: "primary" | "secondary" | "info" | "success" | "warning" | "error" | "light" | "dark";
- data: number[];
- }[];
-}
-
-const timeInTransitBarChartData: Types = {
- labels: ["1", "2", "3", "3+"],
- datasets: [
- {
- label: " time in transit",
- color: "dark",
- data: [2088, 8888, 5883, 203],
- },
- ],
-};
-
-export default timeInTransitBarChartData;
diff --git a/src/qqq/pages/dashboards/Widgets/LocationCard.tsx b/src/qqq/pages/dashboards/Widgets/LocationCard.tsx
deleted file mode 100644
index 813ae6b..0000000
--- a/src/qqq/pages/dashboards/Widgets/LocationCard.tsx
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * QQQ - Low-code Application Framework for Engineers.
- * Copyright (C) 2021-2022. Kingsrook, LLC
- * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
- * contact@kingsrook.com
- * https://github.com/Kingsrook/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-import Card from "@mui/material/Card";
-import Divider from "@mui/material/Divider";
-import Icon from "@mui/material/Icon";
-import parse from "html-react-parser";
-import {ReactNode} from "react";
-import MDBox from "qqq/components/Temporary/MDBox";
-import MDTypography from "qqq/components/Temporary/MDTypography";
-
-/////////////////////////////////////
-// structure of location card data //
-/////////////////////////////////////
-export interface LocationCardData
-{
- imageUrl: string;
- title: string;
- description: string;
- footerText: string;
- location: string;
-}
-
-interface Props
-{
- locationData: LocationCardData;
- action?: ReactNode | boolean;
-
- [key: string]: any;
-}
-
-LocationCard.defaultProps = {
- action: false,
-};
-
-function LocationCard({locationData, action}: Props): JSX.Element
-{
- const {imageUrl, title, description, footerText, location} = locationData;
-
- return (
-
-
-
-
-
-
-
- {action}
-
-
- {title}
-
-
- {parse(description)}
-
-
-
-
-
- {footerText}
-
-
-
- place
-
-
- {location}
-
-
-
-
- );
-}
-
-export default LocationCard;
diff --git a/src/qqq/pages/dashboards/Widgets/ShipmentsByWarehouse.tsx b/src/qqq/pages/dashboards/Widgets/ShipmentsByWarehouse.tsx
deleted file mode 100644
index a2e5ce4..0000000
--- a/src/qqq/pages/dashboards/Widgets/ShipmentsByWarehouse.tsx
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * QQQ - Low-code Application Framework for Engineers.
- * Copyright (C) 2021-2022. Kingsrook, LLC
- * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
- * contact@kingsrook.com
- * https://github.com/Kingsrook/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-import Card from "@mui/material/Card";
-import Grid from "@mui/material/Grid";
-import Icon from "@mui/material/Icon";
-import {VectorMap} from "@react-jvectormap/core";
-import {usAea} from "@react-jvectormap/unitedstates";
-import MDBox from "qqq/components/Temporary/MDBox";
-import MDTypography from "qqq/components/Temporary/MDTypography";
-import ShipmentsByWarehouseTable from "qqq/pages/dashboards/Tables/ShipmentsByWarehouseTable";
-import shipmentsByWarehouseData from "qqq/pages/dashboards/Widgets/Data/ShipmentsByWarehouseData";
-
-function ShipmentsByWarehouseData(): JSX.Element
-{
- return (
-
-
-
-
- warehouse
-
-
-
- Shipments by Warehouse
-
-
-
-
-
-
-
-
- false}
- onMarkerTipShow={() => false}
- />
-
-
-
-
- );
-}
-
-export default ShipmentsByWarehouseData;
diff --git a/src/qqq/pages/process-run/index.tsx b/src/qqq/pages/processes/ProcessRun.tsx
similarity index 91%
rename from src/qqq/pages/process-run/index.tsx
rename to src/qqq/pages/processes/ProcessRun.tsx
index c1c138b..f3b7a7d 100644
--- a/src/qqq/pages/process-run/index.tsx
+++ b/src/qqq/pages/processes/ProcessRun.tsx
@@ -46,25 +46,24 @@ import Typography from "@mui/material/Typography";
import {DataGridPro, GridColDef} from "@mui/x-data-grid-pro";
import FormData from "form-data";
import {Form, Formik} from "formik";
+import MDTypography from "qqq/components/legacy/MDTypography";
import React, {useContext, useEffect, useState} from "react";
import {useLocation, useNavigate, useParams} from "react-router-dom";
import * as Yup from "yup";
-import BaseLayout from "layouts/BaseLayout";
import QContext from "QContext";
-import {QCancelButton, QSubmitButton} from "qqq/components/QButtons";
-import QDynamicForm from "qqq/components/QDynamicForm";
-import DynamicFormUtils from "qqq/components/QDynamicForm/utils/DynamicFormUtils";
-import QRecordSidebar from "qqq/components/QRecordSidebar";
-import MDBox from "qqq/components/Temporary/MDBox";
-import MDButton from "qqq/components/Temporary/MDButton";
-import MDProgress from "qqq/components/Temporary/MDProgress";
-import MDTypography from "qqq/components/Temporary/MDTypography";
-import {QGoogleDriveFolderPickerWrapper} from "qqq/pages/process-run/components/QGoogleDriveFolderPickerWrapper";
-import QValidationReview from "qqq/pages/process-run/components/QValidationReview";
-import QClient from "qqq/utils/QClient";
-import QTableUtils from "qqq/utils/QTableUtils";
-import QValueUtils from "qqq/utils/QValueUtils";
-import QProcessSummaryResults from "./components/QProcessSummaryResults";
+import {QCancelButton, QSubmitButton} from "qqq/components/buttons/DefaultButtons";
+import QDynamicForm from "qqq/components/forms/DynamicForm";
+import DynamicFormUtils from "qqq/components/forms/DynamicFormUtils";
+import MDButton from "qqq/components/legacy/MDButton";
+import MDProgress from "qqq/components/legacy/MDProgress";
+import QRecordSidebar from "qqq/components/misc/RecordSidebar";
+import {GoogleDriveFolderPickerWrapper} from "qqq/components/processes/GoogleDriveFolderPickerWrapper";
+import ProcessSummaryResults from "qqq/components/processes/ProcessSummaryResults";
+import ValidationReview from "qqq/components/processes/ValidationReview";
+import BaseLayout from "qqq/layouts/BaseLayout";
+import Client from "qqq/utils/qqq/Client";
+import TableUtils from "qqq/utils/qqq/TableUtils";
+import ValueUtils from "qqq/utils/qqq/ValueUtils";
interface Props
{
@@ -242,31 +241,31 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
{process.label}
{
isUserFacingError ? (
-
+ {processError}
-
+
) : (
-
-
+
+
-
+
{processError}
-
-
-
+
+
+
)
}
-
+
{isModal ?
:
}
-
+
>
);
}
@@ -278,7 +277,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
-
+
Working
@@ -293,10 +292,10 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
{qJobRunning?.current && qJobRunning?.total && (
<>
{`${qJobRunning.current.toLocaleString()} of ${qJobRunning.total.toLocaleString()}`}
-
+
-
+
>
)}
{
@@ -305,7 +304,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
-
+
@@ -319,7 +318,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
//////////////////////////////////////////////////////////////////////////////////////////////////////
// if the table sections (ones that actually have fields to edit) haven't been built yet, do so now //
//////////////////////////////////////////////////////////////////////////////////////////////////////
- localTableSections = tableMetaData ? QTableUtils.getSectionsForRecordSidebar(tableMetaData, Object.keys(formFields)) : null;
+ localTableSections = tableMetaData ? TableUtils.getSectionsForRecordSidebar(tableMetaData, Object.keys(formFields)) : null;
setTableSections(localTableSections);
}
@@ -353,15 +352,15 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
{component.values.previewText}
-
+
- {QValueUtils.breakTextIntoLines(component.values.text)}
+ {ValueUtils.breakTextIntoLines(component.values.text)}
-
+
>
:
- {QValueUtils.breakTextIntoLines(component.values.text)}
+ {ValueUtils.breakTextIntoLines(component.values.text)}
)
}
@@ -438,22 +437,22 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
{step.viewFields.map((field: QFieldMetaData) => (
field.hasAdornment(AdornmentType.ERROR) ? (
processValues[field.name] && (
-
+
- {QValueUtils.getValueForDisplay(field, processValues[field.name], undefined, "view")}
+ {ValueUtils.getValueForDisplay(field, processValues[field.name], undefined, "view")}
-
+
)
) : (
-
+
{field.label}
:
- {QValueUtils.getValueForDisplay(field, processValues[field.name], undefined, "view")}
+ {ValueUtils.getValueForDisplay(field, processValues[field.name], undefined, "view")}
-
+
)))
}
@@ -463,12 +462,12 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
component.type === QComponentType.DOWNLOAD_FORM && (
-
-
+
+
Download
-
-
-
+
+
+ download_for_offline
@@ -477,14 +476,14 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
-
+
)
}
{
component.type === QComponentType.VALIDATION_REVIEW_SCREEN && (
-
+
)
}
{
component.type === QComponentType.GOOGLE_DRIVE_SELECT_FOLDER && (
// todo - make these booleans configurable (values on the component)
-
+
)
}
{
@@ -523,7 +522,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
Records
{" "}
-
+
-
+
)
}
@@ -796,7 +795,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
setNeedRecords(false);
(async () =>
{
- const response = await QClient.getInstance().processRecords(
+ const response = await Client.getInstance().processRecords(
processName,
processUUID,
recordConfig.rowsPerPage * recordConfig.pageNo,
@@ -901,7 +900,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
{
try
{
- const processResponse = await QClient.getInstance().processJobStatus(
+ const processResponse = await Client.getInstance().processJobStatus(
processName,
processUUID,
jobUUID,
@@ -981,8 +980,8 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
try
{
- const qInstance = await QClient.getInstance().loadMetaData();
- QValueUtils.qInstance = qInstance;
+ const qInstance = await Client.getInstance().loadMetaData();
+ ValueUtils.qInstance = qInstance;
setQInstance(qInstance);
}
catch (e)
@@ -993,14 +992,14 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
try
{
- const processMetaData = await QClient.getInstance().loadProcessMetaData(processName);
+ const processMetaData = await Client.getInstance().loadProcessMetaData(processName);
setProcessMetaData(processMetaData);
setSteps(processMetaData.frontendSteps);
if (processMetaData.tableName)
{
try
{
- const tableMetaData = await QClient.getInstance().loadTableMetaData(processMetaData.tableName);
+ const tableMetaData = await Client.getInstance().loadTableMetaData(processMetaData.tableName);
setTableMetaData(tableMetaData);
}
catch (e)
@@ -1026,7 +1025,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
try
{
- const processResponse = await QClient.getInstance().processInit(processName, queryStringPairsForInit.join("&"));
+ const processResponse = await Client.getInstance().processInit(processName, queryStringPairsForInit.join("&"));
setProcessUUID(processResponse.processUUID);
setLastProcessResponse(processResponse);
}
@@ -1090,7 +1089,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
setTimeout(async () =>
{
- const processResponse = await QClient.getInstance().processStep(
+ const processResponse = await Client.getInstance().processStep(
processName,
processUUID,
activeStep.name,
@@ -1166,7 +1165,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
{
!isWidget && (
-
+
{steps.map((step) => (
@@ -1174,12 +1173,12 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
))}
-
+
)
}
-
-
+
+
{/***************************************************************************
** step content - e.g., the appropriate form or other screen for the step **
***************************************************************************/}
@@ -1200,14 +1199,14 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
{/********************************
** back &| next/submit buttons **
********************************/}
-
+
{true || activeStepIndex === 0 ? (
-
+
) : (
back
)}
{processError || qJobRunning || !activeStep ? (
-
+
) : (
<>
{formError && (
@@ -1224,7 +1223,7 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
}
{
!noMoreSteps && (
-
+
{
! isWidget && (
@@ -1233,14 +1232,14 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
}
-
+
)
}
>
)}
-
-
-
+
+
+
)}
@@ -1248,13 +1247,13 @@ function ProcessRun({process, defaultProcessValues, isModal, isWidget, recordIds
);
const body = (
-
+
{form}
-
+
);
if (isModal)
diff --git a/src/qqq/pages/process-run/ReportRun.tsx b/src/qqq/pages/processes/ReportRun.tsx
similarity index 92%
rename from src/qqq/pages/process-run/ReportRun.tsx
rename to src/qqq/pages/processes/ReportRun.tsx
index aef8194..872d2cf 100644
--- a/src/qqq/pages/process-run/ReportRun.tsx
+++ b/src/qqq/pages/processes/ReportRun.tsx
@@ -23,8 +23,8 @@ import {QInstance} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QInstan
import {QReportMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QReportMetaData";
import React, {useContext, useEffect, useState} from "react";
import QContext from "QContext";
-import ProcessRun from "qqq/pages/process-run/index";
-import QClient from "qqq/utils/QClient";
+import ProcessRun from "qqq/pages/processes/ProcessRun";
+import Client from "qqq/utils/qqq/Client";
interface Props
{
@@ -42,7 +42,7 @@ function ReportRun({report}: Props): JSX.Element
{
(async () =>
{
- const metaData = await QClient.getInstance().loadMetaData();
+ const metaData = await Client.getInstance().loadMetaData();
setMetaData(metaData);
})();
}
diff --git a/src/qqq/pages/entity-create/index.tsx b/src/qqq/pages/records/create/RecordCreate.tsx
similarity index 88%
rename from src/qqq/pages/entity-create/index.tsx
rename to src/qqq/pages/records/create/RecordCreate.tsx
index ee6b367..f85aa9d 100644
--- a/src/qqq/pages/entity-create/index.tsx
+++ b/src/qqq/pages/records/create/RecordCreate.tsx
@@ -20,10 +20,10 @@
*/
import {QTableMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QTableMetaData";
+import Box from "@mui/material/Box";
import Grid from "@mui/material/Grid";
-import BaseLayout from "layouts/BaseLayout";
-import EntityForm from "qqq/components/EntityForm";
-import MDBox from "qqq/components/Temporary/MDBox";
+import EntityForm from "qqq/components/forms/EntityForm";
+import BaseLayout from "qqq/layouts/BaseLayout";
interface Props
{
@@ -34,13 +34,13 @@ function EntityCreate({table}: Props): JSX.Element
{
return (
-
+
-
+
);
}
diff --git a/src/qqq/pages/entity-edit/index.tsx b/src/qqq/pages/records/edit/RecordEdit.tsx
similarity index 87%
rename from src/qqq/pages/entity-edit/index.tsx
rename to src/qqq/pages/records/edit/RecordEdit.tsx
index a42ee31..55de7db 100644
--- a/src/qqq/pages/entity-edit/index.tsx
+++ b/src/qqq/pages/records/edit/RecordEdit.tsx
@@ -20,11 +20,11 @@
*/
import {QTableMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QTableMetaData";
+import Box from "@mui/material/Box";
import Grid from "@mui/material/Grid";
import {useParams} from "react-router-dom";
-import BaseLayout from "layouts/BaseLayout";
-import EntityForm from "qqq/components/EntityForm";
-import MDBox from "qqq/components/Temporary/MDBox";
+import EntityForm from "qqq/components/forms/EntityForm";
+import BaseLayout from "qqq/layouts/BaseLayout";
interface Props
{
@@ -37,19 +37,19 @@ function EntityEdit({table}: Props): JSX.Element
return (
-
+
-
+
-
+
-
+
);
}
diff --git a/src/qqq/pages/entity-list/QGridFilterOperators.tsx b/src/qqq/pages/records/query/GridFilterOperators.tsx
similarity index 99%
rename from src/qqq/pages/entity-list/QGridFilterOperators.tsx
rename to src/qqq/pages/records/query/GridFilterOperators.tsx
index 405e441..ff36692 100644
--- a/src/qqq/pages/entity-list/QGridFilterOperators.tsx
+++ b/src/qqq/pages/records/query/GridFilterOperators.tsx
@@ -35,9 +35,9 @@ import {GridFilterInputValue} from "@mui/x-data-grid/components/panel/filterPane
import {GridApiCommunity} from "@mui/x-data-grid/internals";
import {GridFilterOperator} from "@mui/x-data-grid/models/gridFilterOperator";
import React, {useEffect, useRef, useState} from "react";
-import {QCancelButton, QSaveButton} from "qqq/components/QButtons";
-import QDynamicSelect from "qqq/components/QDynamicSelect/QDynamicSelect";
-import ChipTextField from "qqq/pages/entity-list/ChipTextField";
+import {QCancelButton, QSaveButton} from "qqq/components/buttons/DefaultButtons";
+import ChipTextField from "qqq/components/forms/ChipTextField";
+import DynamicSelect from "qqq/components/forms/DynamicSelect";
////////////////////////////////
@@ -716,7 +716,7 @@ function InputPossibleValueSourceSingle(tableName: string, field: QFieldMetaData
height: 48,
}}
>
-
-
-
+
+
{alertContent ? (
-
+
@@ -1129,32 +1128,33 @@ function EntityList({table, launchProcess}: Props): JSX.Element
>
{alertContent}
-
+
) : (
""
)}
{
(tableLabel && searchParams.get("deleteSuccess")) ? (
-
+
+ {}}>
{`${tableLabel} successfully deleted`}
-
+
) : null
}
-
+
-
+
{renderActionsMenu}
-
+
{
table.capabilities.has(Capability.TABLE_INSERT) &&
}
-
+
-
+ (params.indexRelativeToCurrentPage % 2 === 0 ? "even" : "odd")}
/>
-
+
-
+
{
activeModalProcess &&
@@ -1206,4 +1206,4 @@ function EntityList({table, launchProcess}: Props): JSX.Element
);
}
-export default EntityList;
+export default RecordQuery;
diff --git a/src/qqq/pages/entity-view/EntityDeveloperView.tsx b/src/qqq/pages/records/view/RecordDeveloperView.tsx
similarity index 95%
rename from src/qqq/pages/entity-view/EntityDeveloperView.tsx
rename to src/qqq/pages/records/view/RecordDeveloperView.tsx
index 45fdc9b..e05f8dc 100644
--- a/src/qqq/pages/entity-view/EntityDeveloperView.tsx
+++ b/src/qqq/pages/records/view/RecordDeveloperView.tsx
@@ -39,18 +39,17 @@ import Tabs from "@mui/material/Tabs";
import React, {useContext, useReducer, useState} from "react";
import AceEditor from "react-ace";
import {useParams} from "react-router-dom";
-import BaseLayout from "layouts/BaseLayout";
import QContext from "QContext";
-import CustomWidthTooltip from "qqq/components/CustomWidthTooltip/CustomWidthTooltip";
-import AssociatedScriptEditor from "qqq/components/ScriptComponents/AssociatedScriptEditor";
-import ScriptDocsForm from "qqq/components/ScriptComponents/ScriptDocsForm";
-import ScriptLogsView from "qqq/components/ScriptComponents/ScriptLogsView";
-import ScriptTestForm from "qqq/components/ScriptComponents/ScriptTestForm";
-import TabPanel from "qqq/components/TabPanel/TabPanel";
-import MDBox from "qqq/components/Temporary/MDBox";
+import TabPanel from "qqq/components/misc/TabPanel";
+import AssociatedScriptEditor from "qqq/components/scripts/AssociatedScriptEditor";
+import ScriptDocsForm from "qqq/components/scripts/ScriptDocsForm";
+import ScriptLogsView from "qqq/components/scripts/ScriptLogsView";
+import ScriptTestForm from "qqq/components/scripts/ScriptTestForm";
+import CustomWidthTooltip from "qqq/components/tooltips/CustomWidthTooltip";
+import BaseLayout from "qqq/layouts/BaseLayout";
import DeveloperModeUtils from "qqq/utils/DeveloperModeUtils";
-import QClient from "qqq/utils/QClient";
-import QValueUtils from "qqq/utils/QValueUtils";
+import Client from "qqq/utils/qqq/Client";
+import ValueUtils from "qqq/utils/qqq/ValueUtils";
import "ace-builds/src-noconflict/mode-java";
import "ace-builds/src-noconflict/mode-javascript";
@@ -58,7 +57,7 @@ import "ace-builds/src-noconflict/mode-json";
import "ace-builds/src-noconflict/theme-github";
import "ace-builds/src-noconflict/ext-language_tools";
-const qController = QClient.getInstance();
+const qController = Client.getInstance();
// Declaring props types for ViewForm
interface Props
@@ -66,12 +65,12 @@ interface Props
table?: QTableMetaData;
}
-EntityDeveloperView.defaultProps =
+RecordDeveloperView.defaultProps =
{
table: null,
};
-function EntityDeveloperView({table}: Props): JSX.Element
+function RecordDeveloperView({table}: Props): JSX.Element
{
const {id} = useParams();
@@ -110,7 +109,7 @@ function EntityDeveloperView({table}: Props): JSX.Element
// load top-level meta-data //
//////////////////////////////
const metaData = await qController.loadMetaData();
- QValueUtils.qInstance = metaData;
+ ValueUtils.qInstance = metaData;
/////////////////////
// load the record //
@@ -248,7 +247,7 @@ function EntityDeveloperView({table}: Props): JSX.Element
}
secondary={
<>
- {QValueUtils.formatDateTime(revision.values.createDate)}
+ {ValueUtils.formatDateTime(revision.values.createDate)}
{revision.values.author}
>
@@ -281,16 +280,16 @@ function EntityDeveloperView({table}: Props): JSX.Element
return (
-
+
-
+
{
notFoundMessage
?
- {notFoundMessage}
+ {notFoundMessage}
:
-
+
{
alertText ? (
setAlertText(null)} anchorOrigin={{vertical: "top", horizontal: "center"}}>
@@ -483,14 +482,14 @@ function EntityDeveloperView({table}: Props): JSX.Element
}
-
+
}
-
+
-
+
);
}
-export default EntityDeveloperView;
+export default RecordDeveloperView;
diff --git a/src/qqq/pages/entity-view/EntityView.tsx b/src/qqq/pages/records/view/RecordView.tsx
similarity index 88%
rename from src/qqq/pages/entity-view/EntityView.tsx
rename to src/qqq/pages/records/view/RecordView.tsx
index ce4877e..7881158 100644
--- a/src/qqq/pages/entity-view/EntityView.tsx
+++ b/src/qqq/pages/records/view/RecordView.tsx
@@ -25,6 +25,7 @@ import {QProcessMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/
import {QTableMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QTableMetaData";
import {QTableSection} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QTableSection";
import {QRecord} from "@kingsrook/qqq-frontend-core/lib/model/QRecord";
+import {Alert, Typography} from "@mui/material";
import Avatar from "@mui/material/Avatar";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
@@ -43,24 +44,21 @@ import MenuItem from "@mui/material/MenuItem";
import Modal from "@mui/material/Modal";
import React, {useContext, useEffect, useReducer, useState} from "react";
import {useLocation, useNavigate, useParams, useSearchParams} from "react-router-dom";
-import BaseLayout from "layouts/BaseLayout";
import QContext from "QContext";
-import DashboardWidgets from "qqq/components/DashboardWidgets";
-import EntityForm from "qqq/components/EntityForm";
-import {QActionsMenuButton, QDeleteButton, QEditButton} from "qqq/components/QButtons";
-import QRecordSidebar from "qqq/components/QRecordSidebar";
-import colors from "qqq/components/Temporary/colors";
-import MDAlert from "qqq/components/Temporary/MDAlert";
-import MDBox from "qqq/components/Temporary/MDBox";
-import MDTypography from "qqq/components/Temporary/MDTypography";
-import ProcessRun from "qqq/pages/process-run";
+import {QActionsMenuButton, QDeleteButton, QEditButton} from "qqq/components/buttons/DefaultButtons";
+import EntityForm from "qqq/components/forms/EntityForm";
+import colors from "qqq/components/legacy/colors";
+import QRecordSidebar from "qqq/components/misc/RecordSidebar";
+import DashboardWidgets from "qqq/components/widgets/DashboardWidgets";
+import BaseLayout from "qqq/layouts/BaseLayout";
+import ProcessRun from "qqq/pages/processes/ProcessRun";
import HistoryUtils from "qqq/utils/HistoryUtils";
-import QClient from "qqq/utils/QClient";
-import QProcessUtils from "qqq/utils/QProcessUtils";
-import QTableUtils from "qqq/utils/QTableUtils";
-import QValueUtils from "qqq/utils/QValueUtils";
+import Client from "qqq/utils/qqq/Client";
+import ProcessUtils from "qqq/utils/qqq/ProcessUtils";
+import TableUtils from "qqq/utils/qqq/TableUtils";
+import ValueUtils from "qqq/utils/qqq/ValueUtils";
-const qController = QClient.getInstance();
+const qController = Client.getInstance();
interface Props
{
@@ -68,13 +66,13 @@ interface Props
launchProcess?: QProcessMetaData;
}
-EntityView.defaultProps =
+RecordView.defaultProps =
{
table: null,
launchProcess: null,
};
-function EntityView({table, launchProcess}: Props): JSX.Element
+function RecordView({table, launchProcess}: Props): JSX.Element
{
const {id} = useParams();
@@ -247,10 +245,10 @@ function EntityView({table, launchProcess}: Props): JSX.Element
// load top-level meta-data (e.g., to find processes for table) //
//////////////////////////////////////////////////////////////////
const metaData = await qController.loadMetaData();
- QValueUtils.qInstance = metaData;
- const processesForTable = QProcessUtils.getProcessesForTable(metaData, tableName);
+ ValueUtils.qInstance = metaData;
+ const processesForTable = ProcessUtils.getProcessesForTable(metaData, tableName);
setTableProcesses(processesForTable);
- setAllTableProcesses(QProcessUtils.getProcessesForTable(metaData, tableName, true)); // these include hidden ones (e.g., to find the bulks)
+ setAllTableProcesses(ProcessUtils.getProcessesForTable(metaData, tableName, true)); // these include hidden ones (e.g., to find the bulks)
if (launchingProcess)
{
@@ -304,7 +302,7 @@ function EntityView({table, launchProcess}: Props): JSX.Element
/////////////////////////////////////////////////
// define the sections, e.g., for the left-bar //
/////////////////////////////////////////////////
- const tableSections = QTableUtils.getSectionsForRecordSidebar(tableMetaData);
+ const tableSections = TableUtils.getSectionsForRecordSidebar(tableMetaData);
setTableSections(tableSections);
////////////////////////////////////////////////////
@@ -342,20 +340,20 @@ function EntityView({table, launchProcess}: Props): JSX.Element
// for the T1 section, the "wrapper" will come out below - but for other sections, produce a wrapper too. //
////////////////////////////////////////////////////////////////////////////////////////////////////////////
const fields = (
-
+
{
section.fieldNames.map((fieldName: string) => (
-
-
+
+
{tableMetaData.fields.get(fieldName).label}:
-
-
- {QValueUtils.getDisplayValue(tableMetaData.fields.get(fieldName), record, "view")}
-
-
+
+
+ {ValueUtils.getDisplayValue(tableMetaData.fields.get(fieldName), record, "view")}
+
+
))
}
-
+
);
if (section.tier === "T1")
@@ -366,16 +364,16 @@ function EntityView({table, launchProcess}: Props): JSX.Element
{
sectionFieldElements.set(section.name,
-
+
-
+
{section.label}
-
-
+
+
{fields}
-
+
-
+
);
}
@@ -547,26 +545,27 @@ function EntityView({table, launchProcess}: Props): JSX.Element
return (
-
+
-
+
{
notFoundMessage
?
- {notFoundMessage}
+ {notFoundMessage}
:
-
+
{
(searchParams.get("createSuccess") || searchParams.get("updateSuccess")) ? (
-
+
+ {}}>
{tableMetaData?.label}
{" "}
successfully
{" "}
{searchParams.get("createSuccess") ? "created" : "updated"}
-
+
) : ("")
}
@@ -579,23 +578,23 @@ function EntityView({table, launchProcess}: Props): JSX.Element
-
-
+
+
{tableMetaData?.iconName}
-
-
-
+
+
+
{tableMetaData && record ? `Viewing ${tableMetaData?.label}: ${record?.recordLabel}` : ""}
-
+
{renderActionsMenu}
-
-
- {t1SectionElement ? ({t1SectionElement}) : null}
+
+
+ {t1SectionElement ? ({t1SectionElement}) : null}
@@ -608,7 +607,7 @@ function EntityView({table, launchProcess}: Props): JSX.Element
)) : null}
-
+
{
table.capabilities.has(Capability.TABLE_DELETE) &&
@@ -617,7 +616,7 @@ function EntityView({table, launchProcess}: Props): JSX.Element
table.capabilities.has(Capability.TABLE_UPDATE) &&
}
-
+
@@ -667,14 +666,14 @@ function EntityView({table, launchProcess}: Props): JSX.Element
}
-
+
}
-
+
-
+
);
}
-export default EntityView;
+export default RecordView;
diff --git a/src/qqq/utils/DataGridUtils.tsx b/src/qqq/utils/DataGridUtils.tsx
index 7b83ee8..3241ac9 100644
--- a/src/qqq/utils/DataGridUtils.tsx
+++ b/src/qqq/utils/DataGridUtils.tsx
@@ -20,15 +20,14 @@
*/
import {AdornmentType} from "@kingsrook/qqq-frontend-core/lib/model/metaData/AdornmentType";
-import {QFieldMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QFieldMetaData";
import {QFieldType} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QFieldType";
import {QTableMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QTableMetaData";
import {QRecord} from "@kingsrook/qqq-frontend-core/lib/model/QRecord";
import {getGridDateOperators, GridColDef, GridRowsProp} from "@mui/x-data-grid-pro";
import {GridFilterOperator} from "@mui/x-data-grid/models/gridFilterOperator";
import {Link} from "react-router-dom";
-import {buildQGridPvsOperators, QGridBooleanOperators, QGridNumericOperators, QGridStringOperators} from "qqq/pages/entity-list/QGridFilterOperators";
-import QValueUtils from "qqq/utils/QValueUtils";
+import {buildQGridPvsOperators, QGridBooleanOperators, QGridNumericOperators, QGridStringOperators} from "qqq/pages/records/query/GridFilterOperators";
+import ValueUtils from "qqq/utils/qqq/ValueUtils";
export default class DataGridUtils
{
@@ -46,7 +45,7 @@ export default class DataGridUtils
const row: any = {};
fields.forEach((field) =>
{
- const value = QValueUtils.getDisplayValue(field, record, "query");
+ const value = ValueUtils.getDisplayValue(field, record, "query");
if (typeof value !== "string")
{
columnsToRender[field.name] = true;
diff --git a/src/qqq/utils/QClient.ts b/src/qqq/utils/qqq/Client.ts
similarity index 97%
rename from src/qqq/utils/QClient.ts
rename to src/qqq/utils/qqq/Client.ts
index 96272f5..4875daa 100644
--- a/src/qqq/utils/QClient.ts
+++ b/src/qqq/utils/qqq/Client.ts
@@ -26,7 +26,7 @@ import {QException} from "@kingsrook/qqq-frontend-core/lib/exceptions/QException
** client wrapper of qqq backend
**
*******************************************************************************/
-class QClient
+class Client
{
private static qController: QController;
@@ -48,4 +48,4 @@ class QClient
}
}
-export default QClient;
+export default Client;
diff --git a/src/qqq/utils/QFilterUtils.ts b/src/qqq/utils/qqq/FilterUtils.ts
similarity index 93%
rename from src/qqq/utils/QFilterUtils.ts
rename to src/qqq/utils/qqq/FilterUtils.ts
index 30363dd..65db5eb 100644
--- a/src/qqq/utils/QFilterUtils.ts
+++ b/src/qqq/utils/qqq/FilterUtils.ts
@@ -21,15 +21,14 @@
import {QFieldMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QFieldMetaData";
import {QFieldType} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QFieldType";
-import {QPossibleValue} from "@kingsrook/qqq-frontend-core/lib/model/QPossibleValue";
import {QCriteriaOperator} from "@kingsrook/qqq-frontend-core/lib/model/query/QCriteriaOperator";
-import QValueUtils from "qqq/utils/QValueUtils";
+import ValueUtils from "qqq/utils/qqq/ValueUtils";
/*******************************************************************************
** Utility class for working with QQQ Filters
**
*******************************************************************************/
-class QFilterUtils
+class FilterUtils
{
/*******************************************************************************
** Convert a grid operator to a QQQ Criteria Operator.
@@ -98,7 +97,7 @@ class QFilterUtils
{
case QCriteriaOperator.EQUALS:
- if(field.possibleValueSourceName)
+ if (field.possibleValueSourceName)
{
return ("is");
}
@@ -132,7 +131,7 @@ class QFilterUtils
}
case QCriteriaOperator.NOT_EQUALS:
- if(field.possibleValueSourceName)
+ if (field.possibleValueSourceName)
{
return ("isNot");
}
@@ -233,11 +232,11 @@ class QFilterUtils
*******************************************************************************/
public static gridCriteriaValueToQQQ = (operator: QCriteriaOperator, value: any, gridOperatorValue: string): any[] =>
{
- if(gridOperatorValue === "isTrue")
+ if (gridOperatorValue === "isTrue")
{
return [true];
}
- else if(gridOperatorValue === "isFalse")
+ else if (gridOperatorValue === "isFalse")
{
return [false];
}
@@ -248,7 +247,7 @@ class QFilterUtils
}
else if (operator === QCriteriaOperator.IN || operator === QCriteriaOperator.NOT_IN || operator === QCriteriaOperator.BETWEEN || operator === QCriteriaOperator.NOT_BETWEEN)
{
- if(value == null && (operator === QCriteriaOperator.BETWEEN || operator === QCriteriaOperator.NOT_BETWEEN))
+ if (value == null && (operator === QCriteriaOperator.BETWEEN || operator === QCriteriaOperator.NOT_BETWEEN))
{
/////////////////////////////////////////////////////////////////////////////////////////////////
// if we send back null, we get a 500 - bad look every time you try to set up a BETWEEN filter //
@@ -256,10 +255,10 @@ class QFilterUtils
/////////////////////////////////////////////////////////////////////////////////////////////////
return ([null, null]);
}
- return (QFilterUtils.extractIdsFromPossibleValueList(value));
+ return (FilterUtils.extractIdsFromPossibleValueList(value));
}
- return (QFilterUtils.extractIdsFromPossibleValueList([value]));
+ return (FilterUtils.extractIdsFromPossibleValueList([value]));
};
/*******************************************************************************
@@ -269,16 +268,16 @@ class QFilterUtils
*******************************************************************************/
private static extractIdsFromPossibleValueList = (param: any[]): number[] | string[] =>
{
- if(param === null || param === undefined)
+ if (param === null || param === undefined)
{
return (param);
}
let rs = [];
- for(let i = 0; i < param.length; i++)
+ for (let i = 0; i < param.length; i++)
{
console.log(param[i]);
- if(param[i] && param[i].id && param[i].label)
+ if (param[i] && param[i].id && param[i].label)
{
/////////////////////////////////////////////////////////////
// if the param looks like a possible value, return its id //
@@ -291,7 +290,7 @@ class QFilterUtils
}
}
return (rs);
- }
+ };
/*******************************************************************************
** Convert a filter field's value from the style that qqq uses, to the style that
@@ -309,14 +308,14 @@ class QFilterUtils
return (values);
}
- if(values.length > 0)
+ if (values.length > 0)
{
////////////////////////////////////////////////////////////////////////////////////////////////
// make sure dates are formatted for the grid the way it expects - not the way we pass it in. //
////////////////////////////////////////////////////////////////////////////////////////////////
if (fieldType === QFieldType.DATE_TIME)
{
- values[0] = QValueUtils.formatDateTimeValueForForm(values[0]);
+ values[0] = ValueUtils.formatDateTimeValueForForm(values[0]);
}
}
@@ -324,4 +323,4 @@ class QFilterUtils
};
}
-export default QFilterUtils;
+export default FilterUtils;
diff --git a/src/qqq/utils/QProcessUtils.ts b/src/qqq/utils/qqq/ProcessUtils.ts
similarity index 98%
rename from src/qqq/utils/QProcessUtils.ts
rename to src/qqq/utils/qqq/ProcessUtils.ts
index 06e82a0..6916e18 100644
--- a/src/qqq/utils/QProcessUtils.ts
+++ b/src/qqq/utils/qqq/ProcessUtils.ts
@@ -27,7 +27,7 @@ import {QReportMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/Q
** Utility class for working with QQQ Processes
**
*******************************************************************************/
-class QProcessUtils
+class ProcessUtils
{
public static getProcessesForTable(metaData: QInstance, tableName: string, includeHidden = false): QProcessMetaData[]
{
@@ -67,4 +67,4 @@ class QProcessUtils
}
-export default QProcessUtils;
+export default ProcessUtils;
diff --git a/src/qqq/utils/QTableUtils.ts b/src/qqq/utils/qqq/TableUtils.ts
similarity index 98%
rename from src/qqq/utils/QTableUtils.ts
rename to src/qqq/utils/qqq/TableUtils.ts
index c852610..444afa8 100644
--- a/src/qqq/utils/QTableUtils.ts
+++ b/src/qqq/utils/qqq/TableUtils.ts
@@ -26,7 +26,7 @@ import {QTableSection} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QTa
** Utility class for working with QQQ Tables
**
*******************************************************************************/
-class QTableUtils
+class TableUtils
{
/*******************************************************************************
@@ -87,4 +87,4 @@ class QTableUtils
}
}
-export default QTableUtils;
+export default TableUtils;
diff --git a/src/qqq/utils/QValueUtils.tsx b/src/qqq/utils/qqq/ValueUtils.tsx
similarity index 92%
rename from src/qqq/utils/QValueUtils.tsx
rename to src/qqq/utils/qqq/ValueUtils.tsx
index 50f94f4..3f45a21 100644
--- a/src/qqq/utils/QValueUtils.tsx
+++ b/src/qqq/utils/qqq/ValueUtils.tsx
@@ -30,37 +30,37 @@ import parse from "html-react-parser";
import React, {Fragment} from "react";
import AceEditor from "react-ace";
import {Link} from "react-router-dom";
-import QClient from "qqq/utils/QClient";
+import Client from "qqq/utils/qqq/Client";
/*******************************************************************************
** Utility class for working with QQQ Values
**
*******************************************************************************/
-class QValueUtils
+class ValueUtils
{
public static qInstance: QInstance = null;
public static loadingQInstance = false;
private static getQInstance(): QInstance
{
- if (QValueUtils.qInstance == null)
+ if (ValueUtils.qInstance == null)
{
- if (QValueUtils.loadingQInstance)
+ if (ValueUtils.loadingQInstance)
{
return (null);
}
- QValueUtils.loadingQInstance = true;
- const qController = QClient.getInstance();
+ ValueUtils.loadingQInstance = true;
+ const qController = Client.getInstance();
(async () =>
{
- QValueUtils.qInstance = await qController.loadMetaData();
+ ValueUtils.qInstance = await qController.loadMetaData();
})();
return (null);
}
- return QValueUtils.qInstance;
+ return ValueUtils.qInstance;
}
@@ -73,7 +73,7 @@ class QValueUtils
const displayValue = record.displayValues ? record.displayValues.get(field.name) : undefined;
const rawValue = record.values ? record.values.get(field.name) : undefined;
- return QValueUtils.getValueForDisplay(field, rawValue, displayValue, usage);
+ return ValueUtils.getValueForDisplay(field, rawValue, displayValue, usage);
}
/*******************************************************************************
@@ -90,9 +90,9 @@ class QValueUtils
const toRecordFromTable = adornment.getValue("toRecordFromTable");
if (toRecordFromTable)
{
- if (QValueUtils.getQInstance())
+ if (ValueUtils.getQInstance())
{
- let tablePath = QValueUtils.getQInstance().getTablePathByName(toRecordFromTable);
+ let tablePath = ValueUtils.getQInstance().getTablePathByName(toRecordFromTable);
if (!tablePath)
{
console.log("Couldn't find path for table: " + tablePath);
@@ -110,7 +110,7 @@ class QValueUtils
//////////////////////////////////////////////////////////////////////////////////
// if no instance, we can't get the table path, so we can't do a to-record link //
//////////////////////////////////////////////////////////////////////////////////
- return (QValueUtils.getUnadornedValueForDisplay(field, rawValue, displayValue));
+ return (ValueUtils.getUnadornedValueForDisplay(field, rawValue, displayValue));
}
}
@@ -192,7 +192,7 @@ class QValueUtils
);
}
- return (QValueUtils.getUnadornedValueForDisplay(field, rawValue, displayValue));
+ return (ValueUtils.getUnadornedValueForDisplay(field, rawValue, displayValue));
}
/*******************************************************************************
@@ -237,7 +237,7 @@ class QValueUtils
if (typeof returnValue === "string" && returnValue.indexOf("\n") > -1)
{
- return QValueUtils.breakTextIntoLines(returnValue);
+ return ValueUtils.breakTextIntoLines(returnValue);
}
return (returnValue);
@@ -340,4 +340,4 @@ class QValueUtils
}
}
-export default QValueUtils;
+export default ValueUtils;
diff --git a/src/types/images.d.ts b/src/types/images.d.ts
deleted file mode 100644
index 4c2cc34..0000000
--- a/src/types/images.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-declare module "*.svg";
-declare module "*.png";
-declare module "*.jpg";
-declare module "*.jpeg";
diff --git a/src/types/react-images-viewer.d.ts b/src/types/react-images-viewer.d.ts
deleted file mode 100644
index d0b3e72..0000000
--- a/src/types/react-images-viewer.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-declare module "react-images-viewer" {
- const noTypesYet: any;
- export default noTypesYet;
-}
diff --git a/src/types/react-kanban.d.ts b/src/types/react-kanban.d.ts
deleted file mode 100644
index f4d2a7f..0000000
--- a/src/types/react-kanban.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-declare module "@asseinfo/react-kanban" {
- const noTypesYet: any;
- export default noTypesYet;
-}
diff --git a/tsconfig.json b/tsconfig.json
index 7affc6f..24b9bd4 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -7,7 +7,7 @@
"lib": [
"DOM",
"ES6",
- "DOM.Iterable",
+ "esnext",
"ScriptHost",
"ES2016.Array.Include"
],
@@ -31,7 +31,7 @@
"sourceMap": true,
"strict": true,
"strictNullChecks": false,
- "target": "ES6"
+ "target": "es2019"
},
"include": [
"src"
@@ -39,6 +39,7 @@
"exclude": [
"node_modules",
"lib",
- "**/*.test.ts"
+ "**/*.test.ts",
+ "src/qqq/assets"
]
}