@solidstarters/solid-core-ui 1.1.60 → 1.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Svg/ExcelSvg.d.ts +6 -0
- package/dist/components/Svg/ExcelSvg.d.ts.map +1 -0
- package/dist/components/Svg/ExcelSvg.js +6 -0
- package/dist/components/Svg/ExcelSvg.js.map +1 -0
- package/dist/components/Svg/PDFSvg.d.ts +5 -1
- package/dist/components/Svg/PDFSvg.d.ts.map +1 -1
- package/dist/components/Svg/PDFSvg.js +3 -2
- package/dist/components/Svg/PDFSvg.js.map +1 -1
- package/dist/components/auth/GoogleAuthChecking.js +1 -1
- package/dist/components/auth/GoogleAuthChecking.js.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.js +31 -18
- package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
- package/dist/components/auth/SolidOTPVerify.js +1 -1
- package/dist/components/auth/SolidOTPVerify.js.map +1 -1
- package/dist/components/common/CancelButton.d.ts.map +1 -1
- package/dist/components/common/CancelButton.js +8 -4
- package/dist/components/common/CancelButton.js.map +1 -1
- package/dist/components/common/SolidBreadcrumb.d.ts.map +1 -1
- package/dist/components/common/SolidBreadcrumb.js +32 -15
- package/dist/components/common/SolidBreadcrumb.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts +1 -0
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +292 -56
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidSaveCustomFilterForm.d.ts +9 -0
- package/dist/components/core/common/SolidSaveCustomFilterForm.d.ts.map +1 -0
- package/dist/components/core/common/SolidSaveCustomFilterForm.js +37 -0
- package/dist/components/core/common/SolidSaveCustomFilterForm.js.map +1 -0
- package/dist/components/core/filter/fields/SolidBooleanField.js +1 -1
- package/dist/components/core/filter/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js +1 -1
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js +4 -1
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +172 -110
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +6 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +3 -2
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +3 -0
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/model/CreateModel.js +3 -3
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/ModelMetaData.d.ts.map +1 -1
- package/dist/components/core/model/ModelMetaData.js +68 -15
- package/dist/components/core/model/ModelMetaData.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/globals.css +22 -7
- package/package.json +1 -1
- package/src/components/Svg/ExcelSvg.tsx +15 -0
- package/src/components/Svg/PDFSvg.tsx +6 -3
- package/src/components/auth/GoogleAuthChecking.tsx +1 -1
- package/src/components/auth/SolidInitialLoginOtp.tsx +13 -2
- package/src/components/auth/SolidOTPVerify.tsx +1 -1
- package/src/components/common/CancelButton.tsx +12 -6
- package/src/components/common/SolidBreadcrumb.tsx +79 -60
- package/src/components/core/common/SolidGlobalSearchElement.tsx +425 -123
- package/src/components/core/common/SolidSaveCustomFilterForm.tsx +74 -0
- package/src/components/core/filter/fields/SolidBooleanField.tsx +1 -1
- package/src/components/core/kanban/KanbanBoard.tsx +3 -2
- package/src/components/core/kanban/KanbanCard.tsx +6 -3
- package/src/components/core/kanban/SolidKanbanView.tsx +219 -174
- package/src/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +14 -4
- package/src/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +4 -8
- package/src/components/core/list/SolidListView.tsx +4 -1
- package/src/components/core/model/CreateModel.tsx +2 -2
- package/src/components/core/model/FieldMetaDataForm.tsx +0 -2
- package/src/components/core/model/ModelMetaData.tsx +204 -121
- package/src/index.ts +1 -0
- package/src/resources/globals.css +22 -7
|
@@ -7,6 +7,11 @@ import { FormEvent } from "primereact/ts-helpers";
|
|
|
7
7
|
import { FilterMatchMode } from 'primereact/api';
|
|
8
8
|
import { Document, Page, pdfjs } from "react-pdf";
|
|
9
9
|
import { Dialog } from "primereact/dialog";
|
|
10
|
+
import { PDFSvg } from '@/components/Svg/PDFSvg';
|
|
11
|
+
import Image from 'next/image';
|
|
12
|
+
import FileImage from '../../../../resources/images/fileTypes/File.png'
|
|
13
|
+
import { ExcelSvg } from '@/components/Svg/ExcelSvg';
|
|
14
|
+
|
|
10
15
|
|
|
11
16
|
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
|
|
12
17
|
|
|
@@ -22,7 +27,6 @@ const SolidMediaSingleKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, f
|
|
|
22
27
|
// const url = "http://localhost:8080/media-files-storage/PF Form.xls";
|
|
23
28
|
|
|
24
29
|
|
|
25
|
-
|
|
26
30
|
return (
|
|
27
31
|
<>
|
|
28
32
|
{mimeType && mimeType.includes("image/") &&
|
|
@@ -52,7 +56,7 @@ const SolidMediaSingleKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, f
|
|
|
52
56
|
<div onClick={(e) => e.stopPropagation()}>
|
|
53
57
|
<div className='flex align-items-end gap-2 my-2'>
|
|
54
58
|
<div onClick={() => setVisible(true)} style={{ cursor: 'pointer' }}>
|
|
55
|
-
<
|
|
59
|
+
<PDFSvg size={50} />
|
|
56
60
|
</div>
|
|
57
61
|
<p className="text-sm" style={{ cursor: 'pointer', maxWidth: '70%', wordWrap: 'break-word', overflowWrap: 'break-word' }} onClick={() => setVisible(true)}>
|
|
58
62
|
{fileName}
|
|
@@ -69,7 +73,7 @@ const SolidMediaSingleKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, f
|
|
|
69
73
|
{mimeType && (mimeType.includes("excel") || mimeType.includes("spreadsheet")) && (
|
|
70
74
|
<div className='flex align-items-end gap-2 my-2' onClick={(e) => e.stopPropagation()}>
|
|
71
75
|
<a href={url} download target="_blank" rel="noopener noreferrer">
|
|
72
|
-
<
|
|
76
|
+
<ExcelSvg size={50} />
|
|
73
77
|
</a>
|
|
74
78
|
<a href={url} download target="_blank" rel="noopener noreferrer" className='text-color flex align-items-start gap-2' style={{ textDecoration: 'none' }}>
|
|
75
79
|
<p className="text-sm mb-1" style={{ wordWrap: 'break-word', overflowWrap: 'break-word' }}>
|
|
@@ -86,7 +90,13 @@ const SolidMediaSingleKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, f
|
|
|
86
90
|
!mimeType.includes("spreadsheet") && (
|
|
87
91
|
<div className='flex align-items-end gap-2 my-2' onClick={(e) => e.stopPropagation()}>
|
|
88
92
|
<a href={url} download target="_blank" rel="noopener noreferrer">
|
|
89
|
-
<
|
|
93
|
+
<Image
|
|
94
|
+
src={FileImage}
|
|
95
|
+
alt={fileName}
|
|
96
|
+
className="relative"
|
|
97
|
+
height={50}
|
|
98
|
+
width={50}
|
|
99
|
+
/>
|
|
90
100
|
</a>
|
|
91
101
|
<a href={url} download target="_blank" rel="noopener noreferrer" className='text-color flex align-items-start gap-2' style={{ textDecoration: 'none' }}>
|
|
92
102
|
<p className="text-sm mb-1" style={{ wordWrap: 'break-word', overflowWrap: 'break-word' }}>
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { SolidKanbanViewFieldsParams } from '../SolidKanbanViewFields';
|
|
4
4
|
import { Dialog } from 'primereact/dialog';
|
|
5
|
-
import { Document, Page
|
|
5
|
+
import { Document, Page } from "react-pdf";
|
|
6
|
+
import { PDFSvg } from '@/components/Svg/PDFSvg';
|
|
6
7
|
import MP3Image from '../../../../resources/images/fileTypes/Mp3.png'
|
|
7
8
|
import MP4Image from '../../../../resources/images/fileTypes/Mp4.png'
|
|
8
9
|
import FileImage from '../../../../resources/images/fileTypes/File.png'
|
|
9
10
|
import Image from 'next/image';
|
|
10
|
-
import {
|
|
11
|
+
import { ExcelSvg } from '@/components/Svg/ExcelSvg';
|
|
11
12
|
const SolidShortTextKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, fieldLayout, data, setLightboxUrls, setOpenLightbox, groupedView }: SolidKanbanViewFieldsParams) => {
|
|
12
13
|
const [visible, setVisible] = useState(false);
|
|
13
14
|
const renderMode = fieldLayout?.attrs?.renderMode ? fieldLayout?.attrs?.renderMode : "text";
|
|
@@ -70,12 +71,7 @@ const SolidShortTextKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, fie
|
|
|
70
71
|
|
|
71
72
|
{renderMode === "image" && !groupedView && mimeType && (mimeType.includes("excel") || mimeType.includes("spreadsheet")) && (
|
|
72
73
|
<a href={data[fieldMetadata.name]} className='kanban-media-view-card mt-3' onClick={(e) => e.stopPropagation()} style={{ cursor: 'pointer' }} download target="_blank" rel="noopener noreferrer">
|
|
73
|
-
<
|
|
74
|
-
<path d="M15 10.4147V10.4146C14.9999 5.29959 19.6888 1 25.3892 1H53.5858L77 24.4142V69.5852C77 74.7288 72.5287 78.9999 66.8806 78.9999H25.1406C19.47 78.9999 15 74.7276 15 69.5852V10.4147Z" fill="white" stroke="#DBDBDB" stroke-width="2" />
|
|
75
|
-
<path d="M54.0513 16.32V0L78 24H62.0342C54.8496 24 53.7187 18.88 54.0513 16.32Z" fill="#D4D4D8" />
|
|
76
|
-
<rect x="2" y="38" width="51" height="30" rx="6" fill="#079455" />
|
|
77
|
-
<path d="M13.7955 46.9091L16.4354 51.3707H16.5376L19.1903 46.9091H22.3161L18.321 53.4545L22.4055 60H19.2223L16.5376 55.532H16.4354L13.7507 60H10.5803L14.6776 53.4545L10.657 46.9091H13.7955ZM24.0675 60V46.9091H26.8352V57.718H32.4474V60H24.0675ZM41.3819 50.674C41.3308 50.1584 41.1113 49.7578 40.7235 49.4723C40.3358 49.1868 39.8095 49.044 39.1447 49.044C38.693 49.044 38.3116 49.108 38.0005 49.2358C37.6895 49.3594 37.4508 49.532 37.2846 49.7536C37.1227 49.9751 37.0417 50.2266 37.0417 50.5078C37.0332 50.7422 37.0822 50.9467 37.1887 51.1214C37.2995 51.2962 37.4508 51.4474 37.6426 51.5753C37.8343 51.6989 38.0559 51.8075 38.3074 51.9013C38.5588 51.9908 38.8272 52.0675 39.1127 52.1314L40.2889 52.4126C40.8599 52.5405 41.3841 52.7109 41.8613 52.924C42.3386 53.1371 42.752 53.3991 43.1014 53.7102C43.4508 54.0213 43.7214 54.3878 43.9132 54.8097C44.1092 55.2315 44.2093 55.7152 44.2136 56.2607C44.2093 57.0618 44.0048 57.7564 43.6 58.3445C43.1994 58.9283 42.6199 59.3821 41.8613 59.706C41.1071 60.0256 40.1973 60.1854 39.1319 60.1854C38.0751 60.1854 37.1547 60.0234 36.3706 59.6996C35.5907 59.3757 34.9814 58.8963 34.5424 58.2614C34.1078 57.6222 33.8798 56.8317 33.8585 55.8899H36.5368C36.5666 56.3288 36.6923 56.6953 36.9139 56.9893C37.1397 57.2791 37.4402 57.4986 37.8152 57.6477C38.1944 57.7926 38.6227 57.8651 39.1 57.8651C39.5687 57.8651 39.9757 57.7969 40.3208 57.6605C40.6703 57.5241 40.9409 57.3345 41.1326 57.0916C41.3244 56.8487 41.4203 56.5696 41.4203 56.2543C41.4203 55.9602 41.3329 55.7131 41.1582 55.5128C40.9877 55.3125 40.7363 55.142 40.4039 55.0014C40.0758 54.8608 39.6731 54.733 39.1958 54.6179L37.7704 54.2599C36.6667 53.9915 35.7953 53.5717 35.1561 53.0007C34.5169 52.4297 34.1994 51.6605 34.2037 50.6932C34.1994 49.9006 34.4103 49.2081 34.8365 48.6158C35.2669 48.0234 35.8571 47.5611 36.6071 47.2287C37.3571 46.8963 38.2093 46.7301 39.1639 46.7301C40.1355 46.7301 40.9835 46.8963 41.7079 47.2287C42.4366 47.5611 43.0034 48.0234 43.4082 48.6158C43.813 49.2081 44.0218 49.8942 44.0346 50.674H41.3819Z" fill="white" />
|
|
78
|
-
</svg>
|
|
74
|
+
<ExcelSvg />
|
|
79
75
|
</a>
|
|
80
76
|
)}
|
|
81
77
|
{renderMode === "image" && !groupedView && mimeType && mimeType.includes("audio") && (
|
|
@@ -147,7 +147,7 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
147
147
|
} = entityApi;
|
|
148
148
|
|
|
149
149
|
// Get the list view layout & metadata first.
|
|
150
|
-
const listViewMetaDataQs = qs.stringify({ modelName: params.modelName, moduleName: params.moduleName, viewType: 'list'}, {
|
|
150
|
+
const listViewMetaDataQs = qs.stringify({ modelName: params.modelName, moduleName: params.moduleName, viewType: 'list' }, {
|
|
151
151
|
encodeValuesOnly: true,
|
|
152
152
|
});
|
|
153
153
|
const [listViewMetaData, setListViewMetaData] = useState({});
|
|
@@ -812,6 +812,9 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
812
812
|
if (params.embeded == true) {
|
|
813
813
|
params.handlePopUpOpen(rowData?.id);
|
|
814
814
|
} else {
|
|
815
|
+
if (typeof window !== "undefined") {
|
|
816
|
+
sessionStorage.setItem("fromView", "list");
|
|
817
|
+
}
|
|
815
818
|
router.push(`${editButtonUrl}/${rowData?.id}`);
|
|
816
819
|
}
|
|
817
820
|
}}
|
|
@@ -178,7 +178,7 @@ const CreateModel = ({ data, params }: any) => {
|
|
|
178
178
|
}
|
|
179
179
|
return rest
|
|
180
180
|
});
|
|
181
|
-
const { module, createdAt, updatedAt, id, deletedAt, ...modelData } = modelMetaData;
|
|
181
|
+
const { module, parentModel,createdAt, updatedAt, id, deletedAt, ...modelData } = modelMetaData;
|
|
182
182
|
const updateData = { ...modelData, displayName: modelData.displayName.trim(), fields: fieldData };
|
|
183
183
|
updateModel({ id: data.id, data: updateData });
|
|
184
184
|
}
|
|
@@ -190,7 +190,7 @@ const CreateModel = ({ data, params }: any) => {
|
|
|
190
190
|
}
|
|
191
191
|
return rest
|
|
192
192
|
});
|
|
193
|
-
const { module,
|
|
193
|
+
const { module, parentModel,...modelData } = modelMetaData;
|
|
194
194
|
const data = { ...modelData, displayName: modelData.displayName.trim(), fields: fieldData };
|
|
195
195
|
createModel(data);
|
|
196
196
|
if (isCreateModelSuccess) {
|
|
@@ -173,8 +173,6 @@ const fieldBasedPayloadFormating = (values: any, currentFields: string[], fieldM
|
|
|
173
173
|
if (transformedPayload.relationType == "many-to-many") {
|
|
174
174
|
transformedPayload.isRelationManyToManyOwner = true;
|
|
175
175
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
176
|
return transformedPayload
|
|
179
177
|
|
|
180
178
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { SingleSelectAutoCompleteField } from "@/components/common/SingleSelectAutoCompleteField";
|
|
3
3
|
import { getSingularAndPlural } from "@/helpers/helpers";
|
|
4
4
|
import { useGetFieldDefaultMetaDataQuery } from "@/redux/api/fieldApi";
|
|
5
|
+
import { useLazyGetModelsQuery } from "@/redux/api/modelApi";
|
|
5
6
|
import { useLazyGetmodulesQuery } from "@/redux/api/moduleApi";
|
|
6
7
|
import { useFormik } from "formik";
|
|
7
8
|
import { snakeCase } from "lodash";
|
|
@@ -27,6 +28,7 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
|
|
|
27
28
|
const pathname = usePathname();
|
|
28
29
|
|
|
29
30
|
const [triggerGetModules, { data: moduleData, isFetching: isModuleFetching, error: moduleError }] = useLazyGetmodulesQuery();
|
|
31
|
+
const [triggerGetModels, { data: modelData, isFetching: isModelFetching, error: modelError }] = useLazyGetModelsQuery();
|
|
30
32
|
const { data: fieldDefaultMetaData, isLoading, error, refetch } = useGetFieldDefaultMetaDataQuery(null);
|
|
31
33
|
|
|
32
34
|
|
|
@@ -54,14 +56,22 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
|
|
|
54
56
|
enableSoftDelete: modelMetaData ? modelMetaData?.enableSoftDelete : "",
|
|
55
57
|
enableAuditTracking: modelMetaData ? modelMetaData?.enableAuditTracking : "",
|
|
56
58
|
internationalisation: modelMetaData ? modelMetaData?.internationalisation : "",
|
|
59
|
+
isChild: modelMetaData ? modelMetaData?.isChild : false,
|
|
60
|
+
parentModelId: modelMetaData ? modelMetaData?.parentModel?.id : "",
|
|
61
|
+
parentModel: modelMetaData ? modelMetaData?.parentModel : "",
|
|
62
|
+
|
|
57
63
|
};
|
|
58
64
|
|
|
59
65
|
const [showTableName, setShowTableName] = useState<any>(false);
|
|
66
|
+
const [showParentModel, setShowParentModel] = useState<any>(false);
|
|
60
67
|
|
|
61
68
|
useEffect(() => {
|
|
62
69
|
if (modelMetaData && modelMetaData.tableName) {
|
|
63
70
|
setShowTableName(true)
|
|
64
71
|
}
|
|
72
|
+
if (modelMetaData && modelMetaData.isChild) {
|
|
73
|
+
setShowParentModel(true)
|
|
74
|
+
}
|
|
65
75
|
}, [modelMetaData])
|
|
66
76
|
|
|
67
77
|
const validationSchema = Yup.object({
|
|
@@ -93,6 +103,10 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
|
|
|
93
103
|
enableSoftDelete: Yup.boolean(),
|
|
94
104
|
enableAuditTracking: Yup.boolean(),
|
|
95
105
|
internationalisation: Yup.boolean(),
|
|
106
|
+
isChild: Yup.boolean(),
|
|
107
|
+
parentModelId: Yup.number(),
|
|
108
|
+
parentModel: Yup.object()
|
|
109
|
+
|
|
96
110
|
});
|
|
97
111
|
|
|
98
112
|
|
|
@@ -124,6 +138,11 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
|
|
|
124
138
|
enableSoftDelete: values.enableSoftDelete === true ? true : '',
|
|
125
139
|
enableAuditTracking: values.enableAuditTracking === true ? true : '',
|
|
126
140
|
internationalisation: values.internationalisation === true ? true : '',
|
|
141
|
+
isChild: values.isChild ? values.isChild === true : '',
|
|
142
|
+
...(values.isChild == true && {
|
|
143
|
+
parentModelId: values.parentModelId,
|
|
144
|
+
parentModel: values.parentModel,
|
|
145
|
+
}),
|
|
127
146
|
};
|
|
128
147
|
setModelMetaData(modelData);
|
|
129
148
|
nextTab()
|
|
@@ -198,6 +217,37 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
|
|
|
198
217
|
};
|
|
199
218
|
|
|
200
219
|
|
|
220
|
+
const searchModel = async (event: any) => {
|
|
221
|
+
try {
|
|
222
|
+
const query = event.query;
|
|
223
|
+
const queryData = {
|
|
224
|
+
limit: 10,
|
|
225
|
+
offset: 0,
|
|
226
|
+
filters: {
|
|
227
|
+
singularName: {
|
|
228
|
+
$containsi: query,
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const queryString = qs.stringify(queryData, {
|
|
234
|
+
encodeValuesOnly: true,
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
const result = await triggerGetModels(queryString).unwrap();
|
|
238
|
+
|
|
239
|
+
if (result && result.records) {
|
|
240
|
+
const updatedSuggestion = [...result.records];
|
|
241
|
+
return updatedSuggestion
|
|
242
|
+
} else {
|
|
243
|
+
return []
|
|
244
|
+
}
|
|
245
|
+
} catch (error) {
|
|
246
|
+
return []
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
|
|
201
251
|
const serachDataSource = async (event: any) => {
|
|
202
252
|
const query = event.query;
|
|
203
253
|
try {
|
|
@@ -404,6 +454,39 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
|
|
|
404
454
|
className="mt-2"
|
|
405
455
|
/>
|
|
406
456
|
)}
|
|
457
|
+
|
|
458
|
+
<div className="mt-4">
|
|
459
|
+
<div className="flex align-items-center gap-2">
|
|
460
|
+
<Checkbox onChange={e => { setShowParentModel(e.checked) }} checked={showParentModel} disabled={params.id !== 'new'}></Checkbox>
|
|
461
|
+
<label htmlFor="ingredient1" className="form-field-label">
|
|
462
|
+
isChild
|
|
463
|
+
</label>
|
|
464
|
+
</div>
|
|
465
|
+
</div>
|
|
466
|
+
{showParentModel &&
|
|
467
|
+
<div className="flex flex-column gap-2 mt-3">
|
|
468
|
+
<label htmlFor="type" className="form-field-label">
|
|
469
|
+
Parent Model
|
|
470
|
+
</label>
|
|
471
|
+
<SingleSelectAutoCompleteField
|
|
472
|
+
disabled={params.id !== 'new'}
|
|
473
|
+
key="parentModel"
|
|
474
|
+
formik={formik}
|
|
475
|
+
isFormFieldValid={isFormFieldValid}
|
|
476
|
+
relationField={true}
|
|
477
|
+
fieldName="parentModel"
|
|
478
|
+
fieldNameId="parentModelId"
|
|
479
|
+
labelKey="displayName"
|
|
480
|
+
valueKey="id"
|
|
481
|
+
searchData={searchModel}
|
|
482
|
+
existingData={formik.values.parentModel}
|
|
483
|
+
formErrors={formErrors}
|
|
484
|
+
/>
|
|
485
|
+
{(isFormFieldValid(formik, "parentModel") || (formErrors["parentModel"])) && (
|
|
486
|
+
<Message severity="error" text={formik?.errors?.parentModelId?.toString()} />
|
|
487
|
+
)}
|
|
488
|
+
</div>
|
|
489
|
+
}
|
|
407
490
|
{/* <div className="field col-6">
|
|
408
491
|
<div className="flex align-items-center gap-2 mt-3">
|
|
409
492
|
<Checkbox
|
|
@@ -510,132 +593,132 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
|
|
|
510
593
|
|
|
511
594
|
{/* <p className="form-wrapper-heading text-base">Basic Settings</p> */}
|
|
512
595
|
<Panel header={"Basic Settings"} className="solid-column-panel">
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
596
|
+
<div className="flex flex-column gap-2 mt-3">
|
|
597
|
+
<label htmlFor="displayName" className="form-field-label">
|
|
598
|
+
Display Name
|
|
599
|
+
</label>
|
|
600
|
+
<InputText
|
|
601
|
+
type="text"
|
|
602
|
+
id="displayName"
|
|
603
|
+
name="displayName"
|
|
604
|
+
onChange={(e) => {
|
|
522
605
|
|
|
523
|
-
|
|
524
|
-
|
|
606
|
+
formik.handleChange(e);
|
|
607
|
+
const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(e.target.value);
|
|
608
|
+
if (params.id === 'new') {
|
|
609
|
+
formik.setFieldValue("singularName", toCamelCase);
|
|
610
|
+
formik.setFieldValue("pluralName", toPluralCamelCase);
|
|
611
|
+
}
|
|
612
|
+
if (showTableName == true) {
|
|
525
613
|
if (params.id === 'new') {
|
|
526
|
-
formik.setFieldValue("
|
|
527
|
-
formik.setFieldValue("pluralName", toPluralCamelCase);
|
|
528
|
-
}
|
|
529
|
-
if (showTableName == true) {
|
|
530
|
-
if (params.id === 'new') {
|
|
531
|
-
formik.setFieldValue("tableName", toSnakeCase);
|
|
532
|
-
}
|
|
614
|
+
formik.setFieldValue("tableName", toSnakeCase);
|
|
533
615
|
}
|
|
616
|
+
}
|
|
534
617
|
|
|
535
618
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
619
|
+
}}
|
|
620
|
+
value={formik.values.displayName}
|
|
621
|
+
className={classNames("", {
|
|
622
|
+
"p-invalid": isFormFieldValid(formik, "displayName") || formErrors["displayName"],
|
|
623
|
+
})}
|
|
624
|
+
|
|
625
|
+
/>
|
|
541
626
|
|
|
627
|
+
{(isFormFieldValid(formik, "displayName") || (formErrors["displayName"])) && (
|
|
628
|
+
<Message
|
|
629
|
+
severity="error"
|
|
630
|
+
text={formik?.errors?.displayName?.toString()}
|
|
542
631
|
/>
|
|
632
|
+
)}
|
|
633
|
+
</div>
|
|
634
|
+
<div className="flex flex-column gap-1 mt-4">
|
|
635
|
+
<label htmlFor="singularName" className="form-field-label">
|
|
636
|
+
Singular Name
|
|
637
|
+
</label>
|
|
638
|
+
<InputText
|
|
639
|
+
disabled={true}
|
|
640
|
+
type="text"
|
|
641
|
+
id="singularName"
|
|
642
|
+
name="singularName"
|
|
643
|
+
onChange={formik.handleChange}
|
|
644
|
+
value={formik.values.singularName}
|
|
645
|
+
className={classNames("", {
|
|
646
|
+
"p-invalid": isFormFieldValid(formik, "singularName") || formErrors["singularName"],
|
|
647
|
+
})}
|
|
648
|
+
/>
|
|
649
|
+
{(isFormFieldValid(formik, "singularName") || (formErrors["singularName"])) && (
|
|
650
|
+
<Message
|
|
651
|
+
severity="error"
|
|
652
|
+
text={formik?.errors?.singularName?.toString()}
|
|
653
|
+
/>
|
|
654
|
+
)}
|
|
655
|
+
</div>
|
|
656
|
+
<div className="flex flex-column gap-1 mt-4">
|
|
657
|
+
<label htmlFor="pluralName" className="form-field-label">
|
|
658
|
+
Plural Name
|
|
659
|
+
</label>
|
|
660
|
+
<InputText
|
|
661
|
+
disabled={true}
|
|
662
|
+
type="text"
|
|
663
|
+
id="pluralName"
|
|
664
|
+
name="pluralName"
|
|
665
|
+
onChange={formik.handleChange}
|
|
666
|
+
value={formik.values.pluralName}
|
|
667
|
+
className={classNames("", {
|
|
668
|
+
"p-invalid": isFormFieldValid(formik, "pluralName") || formErrors["pluralName"],
|
|
669
|
+
})}
|
|
670
|
+
/>
|
|
671
|
+
{(isFormFieldValid(formik, "pluralName") || (formErrors["pluralName"])) && (
|
|
672
|
+
<Message severity="error" text={formik?.errors?.pluralName?.toString()} />
|
|
673
|
+
)}
|
|
674
|
+
</div>
|
|
543
675
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
676
|
+
<div className="mt-4">
|
|
677
|
+
<div className="flex align-items-center gap-2">
|
|
678
|
+
<Checkbox onChange={e => {
|
|
679
|
+
setShowTableName(e.checked);
|
|
680
|
+
if (e.checked === true) {
|
|
681
|
+
const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(formik.values.displayName);
|
|
682
|
+
if (params.id === 'new') {
|
|
683
|
+
formik.setFieldValue("tableName", toSnakeCase);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
}} checked={showTableName} disabled={params.id !== 'new'}></Checkbox>
|
|
688
|
+
<label htmlFor="ingredient1" className="form-field-label">
|
|
689
|
+
Set table name
|
|
690
|
+
</label>
|
|
550
691
|
</div>
|
|
692
|
+
</div>
|
|
693
|
+
{showTableName &&
|
|
551
694
|
<div className="flex flex-column gap-1 mt-4">
|
|
552
|
-
<label htmlFor="
|
|
553
|
-
|
|
695
|
+
<label htmlFor="tableName" className="form-field-label">
|
|
696
|
+
Table Name
|
|
554
697
|
</label>
|
|
555
698
|
<InputText
|
|
556
|
-
disabled={
|
|
699
|
+
disabled={params.id !== 'new'}
|
|
557
700
|
type="text"
|
|
558
|
-
id="
|
|
559
|
-
name="
|
|
701
|
+
id="tableName"
|
|
702
|
+
name="tableName"
|
|
560
703
|
onChange={formik.handleChange}
|
|
561
|
-
value={formik.values.
|
|
704
|
+
value={formik.values.tableName}
|
|
562
705
|
className={classNames("", {
|
|
563
|
-
"p-invalid": isFormFieldValid(formik, "
|
|
706
|
+
"p-invalid": isFormFieldValid(formik, "tableName") || formErrors["tableName"],
|
|
564
707
|
})}
|
|
565
708
|
/>
|
|
566
|
-
{(isFormFieldValid(formik, "
|
|
709
|
+
{(isFormFieldValid(formik, "tableName") || (formErrors["tableName"])) && (
|
|
567
710
|
<Message
|
|
568
711
|
severity="error"
|
|
569
|
-
text={formik?.errors?.
|
|
712
|
+
text={formik?.errors?.tableName?.toString()}
|
|
570
713
|
/>
|
|
571
714
|
)}
|
|
572
715
|
</div>
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
type="text"
|
|
580
|
-
id="pluralName"
|
|
581
|
-
name="pluralName"
|
|
582
|
-
onChange={formik.handleChange}
|
|
583
|
-
value={formik.values.pluralName}
|
|
584
|
-
className={classNames("", {
|
|
585
|
-
"p-invalid": isFormFieldValid(formik, "pluralName") || formErrors["pluralName"],
|
|
586
|
-
})}
|
|
587
|
-
/>
|
|
588
|
-
{(isFormFieldValid(formik, "pluralName") || (formErrors["pluralName"])) && (
|
|
589
|
-
<Message severity="error" text={formik?.errors?.pluralName?.toString()} />
|
|
590
|
-
)}
|
|
591
|
-
</div>
|
|
592
|
-
|
|
593
|
-
<div className="mt-4">
|
|
594
|
-
<div className="flex align-items-center gap-2">
|
|
595
|
-
<Checkbox onChange={e => {
|
|
596
|
-
setShowTableName(e.checked);
|
|
597
|
-
if (e.checked === true) {
|
|
598
|
-
const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(formik.values.displayName);
|
|
599
|
-
if (params.id === 'new') {
|
|
600
|
-
formik.setFieldValue("tableName", toSnakeCase);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
}} checked={showTableName} disabled={params.id !== 'new'}></Checkbox>
|
|
605
|
-
<label htmlFor="ingredient1" className="form-field-label">
|
|
606
|
-
Set table name
|
|
607
|
-
</label>
|
|
608
|
-
</div>
|
|
609
|
-
</div>
|
|
610
|
-
{showTableName &&
|
|
611
|
-
<div className="flex flex-column gap-1 mt-4">
|
|
612
|
-
<label htmlFor="tableName" className="form-field-label">
|
|
613
|
-
Table Name
|
|
614
|
-
</label>
|
|
615
|
-
<InputText
|
|
616
|
-
disabled={params.id !== 'new'}
|
|
617
|
-
type="text"
|
|
618
|
-
id="tableName"
|
|
619
|
-
name="tableName"
|
|
620
|
-
onChange={formik.handleChange}
|
|
621
|
-
value={formik.values.tableName}
|
|
622
|
-
className={classNames("", {
|
|
623
|
-
"p-invalid": isFormFieldValid(formik, "tableName") || formErrors["tableName"],
|
|
624
|
-
})}
|
|
625
|
-
/>
|
|
626
|
-
{(isFormFieldValid(formik, "tableName") || (formErrors["tableName"])) && (
|
|
627
|
-
<Message
|
|
628
|
-
severity="error"
|
|
629
|
-
text={formik?.errors?.tableName?.toString()}
|
|
630
|
-
/>
|
|
631
|
-
)}
|
|
632
|
-
</div>
|
|
633
|
-
}
|
|
634
|
-
<div className="flex flex-column gap-1 mt-4">
|
|
635
|
-
<label htmlFor="description" className="form-field-label">
|
|
636
|
-
Description
|
|
637
|
-
</label>
|
|
638
|
-
{/* <InputText
|
|
716
|
+
}
|
|
717
|
+
<div className="flex flex-column gap-1 mt-4">
|
|
718
|
+
<label htmlFor="description" className="form-field-label">
|
|
719
|
+
Description
|
|
720
|
+
</label>
|
|
721
|
+
{/* <InputText
|
|
639
722
|
type="text"
|
|
640
723
|
id="description"
|
|
641
724
|
name="description"
|
|
@@ -645,24 +728,24 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
|
|
|
645
728
|
"p-invalid": isFormFieldValid(formik, "description"),
|
|
646
729
|
})}
|
|
647
730
|
/> */}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
731
|
+
<InputTextarea
|
|
732
|
+
id="description"
|
|
733
|
+
name="description"
|
|
734
|
+
onChange={formik.handleChange}
|
|
735
|
+
value={formik.values.description}
|
|
736
|
+
className={classNames("", {
|
|
737
|
+
"p-invalid": isFormFieldValid(formik, "description") || formErrors["description"],
|
|
738
|
+
})}
|
|
739
|
+
rows={5}
|
|
740
|
+
cols={30}
|
|
741
|
+
/>
|
|
742
|
+
{(isFormFieldValid(formik, "description") || (formErrors["description"])) && (
|
|
743
|
+
<Message
|
|
744
|
+
severity="error"
|
|
745
|
+
text={formik?.errors?.description?.toString()}
|
|
658
746
|
/>
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
severity="error"
|
|
662
|
-
text={formik?.errors?.description?.toString()}
|
|
663
|
-
/>
|
|
664
|
-
)}
|
|
665
|
-
</div>
|
|
747
|
+
)}
|
|
748
|
+
</div>
|
|
666
749
|
</Panel>
|
|
667
750
|
</div>
|
|
668
751
|
|
package/src/index.ts
CHANGED
|
@@ -225,6 +225,7 @@ export { SolidViewLayoutManager } from '@/components/core/common/SolidViewLayout
|
|
|
225
225
|
export { SolidListViewConfigure } from '@/components/core/list/SolidListViewConfigure';
|
|
226
226
|
export { SolidCreateButton } from '@/components/core/common/SolidCreateButton';
|
|
227
227
|
export { SolidGlobalSearchElement } from '@/components/core/common/SolidGlobalSearchElement';
|
|
228
|
+
export { SolidSaveCustomFilterForm } from '@/components/core/common/SolidSaveCustomFilterForm';
|
|
228
229
|
export { SolidSearchBox } from '@/components/core/common/SolidSearchBox';
|
|
229
230
|
|
|
230
231
|
// export type {ModelMetaData} from '@/components/core/field/FieldListViewData'; //Commenting this line for now, since it does not seem to be used anywhere
|
|
@@ -2951,22 +2951,28 @@ li.header-li-px {
|
|
|
2951
2951
|
.kanban-ungrouped-column-content {
|
|
2952
2952
|
display: flex;
|
|
2953
2953
|
flex-wrap: wrap;
|
|
2954
|
-
gap:
|
|
2954
|
+
column-gap: 25px;
|
|
2955
|
+
row-gap: 10px;
|
|
2955
2956
|
}
|
|
2956
2957
|
|
|
2957
2958
|
.kanban-ungrouped-column .kanban-card-container {
|
|
2958
|
-
flex: 1 1 calc(20% -
|
|
2959
|
-
max-width: calc(20% -
|
|
2959
|
+
flex: 1 1 calc(20% - 20px);
|
|
2960
|
+
max-width: calc(20% - 20px);
|
|
2960
2961
|
}
|
|
2961
2962
|
|
|
2962
2963
|
.solid-kanban-card {
|
|
2963
2964
|
box-shadow: none;
|
|
2964
2965
|
border-radius: 0.5rem;
|
|
2965
|
-
border: 1px solid
|
|
2966
|
-
background: #
|
|
2966
|
+
border: 1px solid #E0E0E0;
|
|
2967
|
+
background: #FAFAFA;
|
|
2967
2968
|
padding: 9px;
|
|
2969
|
+
transition: 0.2s linear;
|
|
2968
2970
|
}
|
|
2969
2971
|
|
|
2972
|
+
.solid-kanban-card:hover {
|
|
2973
|
+
border: 1px solid #722ED1;
|
|
2974
|
+
background: #F9F0FF;
|
|
2975
|
+
}
|
|
2970
2976
|
|
|
2971
2977
|
.solid-media-card {
|
|
2972
2978
|
box-shadow: none;
|
|
@@ -3024,7 +3030,8 @@ flex-shrink: 0; */
|
|
|
3024
3030
|
border-radius: 8px;
|
|
3025
3031
|
max-height: 120px;
|
|
3026
3032
|
object-fit: contain;
|
|
3027
|
-
box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
|
|
3033
|
+
/* box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px; */
|
|
3034
|
+
background-color: #fff;
|
|
3028
3035
|
}
|
|
3029
3036
|
|
|
3030
3037
|
|
|
@@ -3059,7 +3066,7 @@ flex-shrink: 0; */
|
|
|
3059
3066
|
.solid-kanban-board-wrapper {
|
|
3060
3067
|
border-top: 1px solid #CED0D6;
|
|
3061
3068
|
overflow: hidden;
|
|
3062
|
-
height: calc(100vh -
|
|
3069
|
+
height: calc(100vh - 65px) !important;
|
|
3063
3070
|
}
|
|
3064
3071
|
|
|
3065
3072
|
.solid-kanban-board-scroll-context {
|
|
@@ -3088,4 +3095,12 @@ flex-shrink: 0; */
|
|
|
3088
3095
|
.view-widget-chip.p-chip .p-chip-text {
|
|
3089
3096
|
margin-top: 0 !important;
|
|
3090
3097
|
margin-bottom: 0 !important;
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
|
|
3101
|
+
|
|
3102
|
+
.solid-global-search-element input {
|
|
3103
|
+
|
|
3104
|
+
min-width: 300px;
|
|
3105
|
+
|
|
3091
3106
|
}
|