@solidxai/core-ui 0.1.14-beta.9 → 0.1.15-beta.0
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/common/DropzonePlaceholder.d.ts +2 -1
- package/dist/components/common/DropzonePlaceholder.d.ts.map +1 -1
- package/dist/components/common/DropzonePlaceholder.js +10 -7
- package/dist/components/common/DropzonePlaceholder.js.map +1 -1
- package/dist/components/common/DropzonePlaceholder.tsx +14 -9
- package/dist/components/core/card/CardItem.js +1 -1
- package/dist/components/core/card/CardItem.js.map +1 -1
- package/dist/components/core/card/CardItem.tsx +1 -1
- package/dist/components/core/card/SolidCardView.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardView.js +2 -2
- package/dist/components/core/card/SolidCardView.js.map +1 -1
- package/dist/components/core/card/SolidCardView.tsx +7 -12
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +101 -86
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +161 -98
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +96 -72
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +39 -17
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +3 -2
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +3 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +3 -2
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +3 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +20 -2
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +29 -2
- package/dist/components/core/form/fields/solidFields.module.css +7 -0
- package/dist/components/core/kanban/KanbanCard.js +1 -1
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.tsx +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +7 -1
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +10 -5
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +44 -88
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +19 -93
- package/dist/components/core/list/SolidListViewColumn.d.ts +2 -1
- package/dist/components/core/list/SolidListViewColumn.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewColumn.js +2 -2
- package/dist/components/core/list/SolidListViewColumn.js.map +1 -1
- package/dist/components/core/list/SolidListViewColumn.tsx +4 -3
- package/dist/components/core/list/columns/SolidRelationColumn.d.ts +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.js +2 -2
- package/dist/components/core/list/columns/SolidRelationColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidRelationColumn.tsx +2 -2
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts +2 -2
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js +5 -4
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +5 -4
- package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js +147 -97
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.tsx +123 -31
- package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeView.js +1 -1
- package/dist/components/core/tree/SolidTreeView.js.map +1 -1
- package/dist/components/core/tree/SolidTreeView.tsx +4 -12
- package/dist/components/layout/AdminHeaderActions.js +1 -1
- package/dist/components/layout/AdminHeaderActions.js.map +1 -1
- package/dist/components/layout/AdminHeaderActions.tsx +1 -1
- package/dist/helpers/getAcceptedFileTypes.d.ts +12 -2
- package/dist/helpers/getAcceptedFileTypes.d.ts.map +1 -1
- package/dist/helpers/getAcceptedFileTypes.js +72 -16
- package/dist/helpers/getAcceptedFileTypes.js.map +1 -1
- package/dist/helpers/getAcceptedFileTypes.tsx +101 -18
- package/dist/helpers/registry.js +2 -1
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.ts +1 -2
- package/dist/resources/globals.css +259 -109
- package/dist/resources/solid-responsive.css +1 -5
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/dist/resources/themes/solid-light-modern/theme.css +3 -4
- package/dist/types/index.d.ts +2 -4
- package/dist/types/solid-core.d.ts +4 -13
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ import * as Yup from "yup";
|
|
|
13
13
|
import FieldSelector from "./FieldSelector";
|
|
14
14
|
import { ERROR_MESSAGES } from "../../../constants/error-messages";
|
|
15
15
|
import { useSolidAutocompleteField } from "../../../hooks/useSolidAutocompleteField";
|
|
16
|
+
import { getAvailableMediaExtensionOptions } from "../../../helpers/getAcceptedFileTypes";
|
|
16
17
|
import {
|
|
17
18
|
SolidAutocomplete,
|
|
18
19
|
SolidButton,
|
|
@@ -111,6 +112,27 @@ function createRelationAutocompleteValue(value: any | undefined | null, labelKey
|
|
|
111
112
|
return { [labelKey]: value, [valueKey]: value };
|
|
112
113
|
}
|
|
113
114
|
|
|
115
|
+
function normalizeMediaAllowedExtensionsInput(value: unknown): string[] {
|
|
116
|
+
if (Array.isArray(value)) {
|
|
117
|
+
return Array.from(new Set(
|
|
118
|
+
value
|
|
119
|
+
.map((entry) => String(entry || "").trim().toLowerCase().replace(/^\./, ""))
|
|
120
|
+
.filter(Boolean)
|
|
121
|
+
));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (typeof value !== "string") {
|
|
125
|
+
return [];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return Array.from(new Set(
|
|
129
|
+
value
|
|
130
|
+
.split(",")
|
|
131
|
+
.map((entry) => entry.trim().toLowerCase().replace(/^\./, ""))
|
|
132
|
+
.filter(Boolean)
|
|
133
|
+
));
|
|
134
|
+
}
|
|
135
|
+
|
|
114
136
|
type LocalTabPanelProps = {
|
|
115
137
|
header: string;
|
|
116
138
|
className?: string;
|
|
@@ -460,6 +482,9 @@ const fieldBasedPayloadFormating = (values: any, currentFields: string[], fieldM
|
|
|
460
482
|
if (currentFields.includes("mediaStorageProviderId")) {
|
|
461
483
|
transformedPayload.mediaStorageProvider = values.mediaStorageProvider
|
|
462
484
|
}
|
|
485
|
+
if (currentFields.includes("mediaAllowedExtensions")) {
|
|
486
|
+
transformedPayload.mediaAllowedExtensions = normalizeMediaAllowedExtensionsInput(values.mediaAllowedExtensions);
|
|
487
|
+
}
|
|
463
488
|
if (currentFields.includes("selectionDynamicProviderCtxt")) {
|
|
464
489
|
const prettified = JSON.stringify(JSON.parse(values.selectionDynamicProviderCtxt), null, 2);
|
|
465
490
|
|
|
@@ -693,6 +718,11 @@ const createValidationSchema = (currentFields: any, selectedType: any, allFields
|
|
|
693
718
|
...(currentFields.includes("mediaMaxSizeKb") && {
|
|
694
719
|
mediaMaxSizeKb: Yup.number().required(ERROR_MESSAGES.FIELD_REUQIRED('Media Max Size')),
|
|
695
720
|
}),
|
|
721
|
+
...(currentFields.includes("mediaAllowedExtensions") && {
|
|
722
|
+
mediaAllowedExtensions: Yup.array()
|
|
723
|
+
.of(Yup.string().matches(/^[a-z0-9]+$/i, "Use comma-separated file extensions only"))
|
|
724
|
+
.nullable(),
|
|
725
|
+
}),
|
|
696
726
|
...(currentFields.includes("mediaStorageProviderId") && {
|
|
697
727
|
mediaStorageProviderId: Yup.number().required(
|
|
698
728
|
ERROR_MESSAGES.FIELD_REUQIRED('Media Storage Provider')
|
|
@@ -1326,7 +1356,8 @@ const FieldMetaDataForm = ({
|
|
|
1326
1356
|
{ label: 'Image (Supports JPEG, PNG, WEBP, etc.)', value: 'image' },
|
|
1327
1357
|
{ label: 'Audio (Supports MP3, WAV, AAC, etc.)', value: 'audio' },
|
|
1328
1358
|
{ label: 'Video (Supports MP4, AVI, MKV, etc.)', value: 'video' },
|
|
1329
|
-
{ label: 'File (Supports
|
|
1359
|
+
{ label: 'File (Supports DOCX, TXT, XLSX, ZIP, etc.)', value: 'file' },
|
|
1360
|
+
{ label: 'PDF (Supports .pdf files)', value: 'pdf' }
|
|
1330
1361
|
];
|
|
1331
1362
|
|
|
1332
1363
|
const resolvedMediaTypeOptions = useMemo(
|
|
@@ -1397,6 +1428,7 @@ const FieldMetaDataForm = ({
|
|
|
1397
1428
|
max: fieldMetaData ? fieldMetaData?.max : null,
|
|
1398
1429
|
private: fieldMetaData ? fieldMetaData?.private : false,
|
|
1399
1430
|
mediaTypes: fieldMetaData?.mediaTypes ?? [],
|
|
1431
|
+
mediaAllowedExtensions: Array.isArray(fieldMetaData?.mediaAllowedExtensions) ? fieldMetaData.mediaAllowedExtensions : [],
|
|
1400
1432
|
mediaMaxSizeKb: fieldMetaData ? fieldMetaData?.mediaMaxSizeKb : null,
|
|
1401
1433
|
mediaStorageProviderId: fieldMetaData ? fieldMetaData?.mediaStorageProvider?.id : null,
|
|
1402
1434
|
mediaStorageProvider: fieldMetaData ? fieldMetaData?.mediaStorageProvider : null,
|
|
@@ -1499,6 +1531,29 @@ const FieldMetaDataForm = ({
|
|
|
1499
1531
|
});
|
|
1500
1532
|
}, [formik.values.mediaTypes, resolvedMediaTypeOptions]);
|
|
1501
1533
|
|
|
1534
|
+
const mediaExtensionOptions = useMemo(
|
|
1535
|
+
() => getAvailableMediaExtensionOptions(formik.values.mediaTypes, fieldDefaultMetaData?.data?.mediaFileTypeDefinitions),
|
|
1536
|
+
[formik.values.mediaTypes, fieldDefaultMetaData?.data]
|
|
1537
|
+
);
|
|
1538
|
+
|
|
1539
|
+
const mediaExtensionSelectedItems = useMemo(() => {
|
|
1540
|
+
if (!Array.isArray(formik.values.mediaAllowedExtensions)) return [];
|
|
1541
|
+
return formik.values.mediaAllowedExtensions.map((entry: any) => {
|
|
1542
|
+
if (entry && typeof entry === "object") {
|
|
1543
|
+
if (entry.label && entry.value) {
|
|
1544
|
+
return entry;
|
|
1545
|
+
}
|
|
1546
|
+
if (entry.value) {
|
|
1547
|
+
const fromOptions = mediaExtensionOptions.find((option) => option.value === entry.value);
|
|
1548
|
+
return fromOptions || { label: `.${entry.value}`, value: entry.value };
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
const normalized = String(entry || "").trim().toLowerCase().replace(/^\./, "");
|
|
1552
|
+
const fromOptions = mediaExtensionOptions.find((option) => option.value === normalized);
|
|
1553
|
+
return fromOptions || { label: `.${normalized}`, value: normalized };
|
|
1554
|
+
}).filter((item: any) => item?.value);
|
|
1555
|
+
}, [formik.values.mediaAllowedExtensions, mediaExtensionOptions]);
|
|
1556
|
+
|
|
1502
1557
|
const resetFormStateForTypeSelection = useCallback((options?: { keepSelectedType?: boolean }) => {
|
|
1503
1558
|
formik.resetForm();
|
|
1504
1559
|
const baseValues = formik.initialValues;
|
|
@@ -1849,7 +1904,7 @@ const FieldMetaDataForm = ({
|
|
|
1849
1904
|
>
|
|
1850
1905
|
<div className="flex flex-wrap -mx-2 -mt-2">
|
|
1851
1906
|
{currentFields.includes("displayName") && (
|
|
1852
|
-
<div className="field mt-2
|
|
1907
|
+
<div className="field mt-2 px-2 pt-2 md:w-1/2">
|
|
1853
1908
|
<label htmlFor="displayName" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
1854
1909
|
Display Name
|
|
1855
1910
|
</label>
|
|
@@ -1878,7 +1933,7 @@ const FieldMetaDataForm = ({
|
|
|
1878
1933
|
)}
|
|
1879
1934
|
|
|
1880
1935
|
{currentFields.includes("name") && (
|
|
1881
|
-
<div className="field mt-
|
|
1936
|
+
<div className="field mt-2 px-2 pt-2 md:mt-0 md:w-1/2">
|
|
1882
1937
|
<label htmlFor="name" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
1883
1938
|
Name
|
|
1884
1939
|
</label>
|
|
@@ -1899,7 +1954,7 @@ const FieldMetaDataForm = ({
|
|
|
1899
1954
|
</div>
|
|
1900
1955
|
)}
|
|
1901
1956
|
{currentFields.includes("description") && (
|
|
1902
|
-
<div className="field mt-
|
|
1957
|
+
<div className="field mt-2 w-full px-2 pt-2 md:mt-2 md:w-1/2">
|
|
1903
1958
|
<label htmlFor="description" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
1904
1959
|
Description
|
|
1905
1960
|
</label>
|
|
@@ -2182,6 +2237,43 @@ const FieldMetaDataForm = ({
|
|
|
2182
2237
|
)}
|
|
2183
2238
|
</div>
|
|
2184
2239
|
)}
|
|
2240
|
+
{currentFields.includes("mediaAllowedExtensions") && (
|
|
2241
|
+
<div className="field mt-2 flex w-full flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2242
|
+
<label
|
|
2243
|
+
htmlFor="mediaAllowedExtensions"
|
|
2244
|
+
className={classNames("form-field-label", styles.fieldLabel)}
|
|
2245
|
+
>
|
|
2246
|
+
Allowed Extensions
|
|
2247
|
+
</label>
|
|
2248
|
+
<div
|
|
2249
|
+
className={classNames("solid-standard-autocomplete", {
|
|
2250
|
+
[styles.fieldInvalidControl]: isFormFieldValid(formik, "mediaAllowedExtensions"),
|
|
2251
|
+
})}
|
|
2252
|
+
>
|
|
2253
|
+
<SolidAutocomplete
|
|
2254
|
+
multiple
|
|
2255
|
+
dropdown
|
|
2256
|
+
field="label"
|
|
2257
|
+
value={mediaExtensionSelectedItems}
|
|
2258
|
+
suggestions={mediaExtensionOptions}
|
|
2259
|
+
maxVisibleChips={4}
|
|
2260
|
+
onChange={({ value }) => {
|
|
2261
|
+
const selection = Array.isArray(value) ? value : [];
|
|
2262
|
+
const normalizedValues = normalizeMediaAllowedExtensionsInput(
|
|
2263
|
+
selection.map((item) => (item && typeof item === "object" ? item.value ?? item.label : item))
|
|
2264
|
+
);
|
|
2265
|
+
formik.setFieldValue("mediaAllowedExtensions", normalizedValues);
|
|
2266
|
+
}}
|
|
2267
|
+
placeholder="Select allowed extensions"
|
|
2268
|
+
className="w-full"
|
|
2269
|
+
/>
|
|
2270
|
+
</div>
|
|
2271
|
+
<p className={styles.fieldHelper}>Optional. Pick specific extensions from the selected media types.</p>
|
|
2272
|
+
{isFormFieldValid(formik, "mediaAllowedExtensions") && (
|
|
2273
|
+
<p className={styles.fieldError}>{formik?.errors?.mediaAllowedExtensions?.toString()}</p>
|
|
2274
|
+
)}
|
|
2275
|
+
</div>
|
|
2276
|
+
)}
|
|
2185
2277
|
{currentFields.includes("mediaStorageProviderId") && (
|
|
2186
2278
|
<div className="field mt-2 flex w-full flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2187
2279
|
<label
|
|
@@ -2305,7 +2397,7 @@ const FieldMetaDataForm = ({
|
|
|
2305
2397
|
</div>
|
|
2306
2398
|
)}
|
|
2307
2399
|
{currentFields.includes("relationType") && (formik.values.relationType === "many-to-one" || formik.values.relationType === "one-to-many") && (
|
|
2308
|
-
<div className="field mt-2 flex
|
|
2400
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2309
2401
|
<label
|
|
2310
2402
|
htmlFor="relationCascade"
|
|
2311
2403
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2338,7 +2430,7 @@ const FieldMetaDataForm = ({
|
|
|
2338
2430
|
)}
|
|
2339
2431
|
|
|
2340
2432
|
{currentFields.includes("relationModelModuleName") && (
|
|
2341
|
-
<div className="field mt-
|
|
2433
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2342
2434
|
<label
|
|
2343
2435
|
htmlFor="relationModelModuleName"
|
|
2344
2436
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2396,7 +2488,7 @@ const FieldMetaDataForm = ({
|
|
|
2396
2488
|
{currentFields.includes(
|
|
2397
2489
|
"relationCoModelSingularName"
|
|
2398
2490
|
) && (
|
|
2399
|
-
<div className="field mt-2 flex
|
|
2491
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2400
2492
|
<label
|
|
2401
2493
|
htmlFor="relationCoModelSingularName"
|
|
2402
2494
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2436,7 +2528,7 @@ const FieldMetaDataForm = ({
|
|
|
2436
2528
|
</div>
|
|
2437
2529
|
)}
|
|
2438
2530
|
{currentFields.includes("relationCoModelColumnName") && (formik.values.relationType === "many-to-many" || formik.values.relationType === "many-to-one") && (
|
|
2439
|
-
<div className="field mt-2 flex
|
|
2531
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2440
2532
|
<label
|
|
2441
2533
|
htmlFor="relationCoModelColumnName"
|
|
2442
2534
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2465,7 +2557,7 @@ const FieldMetaDataForm = ({
|
|
|
2465
2557
|
</div>
|
|
2466
2558
|
)}
|
|
2467
2559
|
{askForUserKeyField && (
|
|
2468
|
-
<div className="field mt-2 flex
|
|
2560
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2469
2561
|
<label
|
|
2470
2562
|
htmlFor="userKey"
|
|
2471
2563
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2502,7 +2594,7 @@ const FieldMetaDataForm = ({
|
|
|
2502
2594
|
{currentFields.includes(
|
|
2503
2595
|
"relationFieldFixedFilter"
|
|
2504
2596
|
) && (
|
|
2505
|
-
<div className="field mt-2 flex
|
|
2597
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2506
2598
|
<label
|
|
2507
2599
|
htmlFor="relationFieldFixedFilter"
|
|
2508
2600
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2548,7 +2640,7 @@ const FieldMetaDataForm = ({
|
|
|
2548
2640
|
)}
|
|
2549
2641
|
|
|
2550
2642
|
{currentFields.includes("relationCreateInverse") && (
|
|
2551
|
-
<div className="field mt-2 flex
|
|
2643
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2552
2644
|
<label htmlFor="relationCreateInverse" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
2553
2645
|
Relation Create Inverse
|
|
2554
2646
|
</label>
|
|
@@ -2569,12 +2661,12 @@ const FieldMetaDataForm = ({
|
|
|
2569
2661
|
)}
|
|
2570
2662
|
|
|
2571
2663
|
{currentFields.includes("relationCoModelFieldName") && formik.values.relationCreateInverse && !formik.values.relationCoModelSingularName && (
|
|
2572
|
-
<div className="field mt-2 flex
|
|
2664
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2573
2665
|
<SolidMessage text="Please select Co-model" />
|
|
2574
2666
|
</div>
|
|
2575
2667
|
)}
|
|
2576
2668
|
{currentFields.includes("relationCoModelFieldName") && formik.values.relationCreateInverse && formik.values.relationCoModelSingularName && (
|
|
2577
|
-
<div className="field mt-2 flex
|
|
2669
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2578
2670
|
<label
|
|
2579
2671
|
htmlFor="relationCoModelFieldName"
|
|
2580
2672
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2644,7 +2736,7 @@ const FieldMetaDataForm = ({
|
|
|
2644
2736
|
|
|
2645
2737
|
|
|
2646
2738
|
{currentFields.includes("relationJoinTableName") && formik.values.relationType === "many-to-many" && (
|
|
2647
|
-
<div className="field mt-2 flex
|
|
2739
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2648
2740
|
<label
|
|
2649
2741
|
htmlFor="relationJoinTableName"
|
|
2650
2742
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2673,7 +2765,7 @@ const FieldMetaDataForm = ({
|
|
|
2673
2765
|
)}
|
|
2674
2766
|
|
|
2675
2767
|
{currentFields.includes("selectionDynamicProvider") && (
|
|
2676
|
-
<div className="field mt-2 flex
|
|
2768
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2677
2769
|
<label
|
|
2678
2770
|
htmlFor="selectionDynamicProvider"
|
|
2679
2771
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2729,7 +2821,7 @@ const FieldMetaDataForm = ({
|
|
|
2729
2821
|
</div>
|
|
2730
2822
|
)}
|
|
2731
2823
|
{currentFields.includes("selectionValueType") && (
|
|
2732
|
-
<div className="field mt-2 flex
|
|
2824
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2733
2825
|
<label
|
|
2734
2826
|
htmlFor="selectionValueType"
|
|
2735
2827
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2765,7 +2857,7 @@ const FieldMetaDataForm = ({
|
|
|
2765
2857
|
)}
|
|
2766
2858
|
|
|
2767
2859
|
{currentFields.includes("selectionStaticValues") && (
|
|
2768
|
-
<div className="field mt-2 flex
|
|
2860
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2769
2861
|
<label
|
|
2770
2862
|
htmlFor="selectionStaticValues"
|
|
2771
2863
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2809,7 +2901,7 @@ const FieldMetaDataForm = ({
|
|
|
2809
2901
|
)}
|
|
2810
2902
|
|
|
2811
2903
|
{currentFields.includes("computedFieldValueType") && (
|
|
2812
|
-
<div className="field mt-2 flex
|
|
2904
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2813
2905
|
<label
|
|
2814
2906
|
htmlFor="computedFieldValueType"
|
|
2815
2907
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2856,7 +2948,7 @@ const FieldMetaDataForm = ({
|
|
|
2856
2948
|
{currentFields.includes(
|
|
2857
2949
|
"computedFieldValueProvider"
|
|
2858
2950
|
) && (
|
|
2859
|
-
<div className="field mt-2 flex
|
|
2951
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2860
2952
|
<label
|
|
2861
2953
|
htmlFor="computedFieldValueProvider"
|
|
2862
2954
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -2890,7 +2982,7 @@ const FieldMetaDataForm = ({
|
|
|
2890
2982
|
{currentFields.includes(
|
|
2891
2983
|
"computedFieldTriggerConfig"
|
|
2892
2984
|
) && (
|
|
2893
|
-
<div className="field mt-2 flex
|
|
2985
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2">
|
|
2894
2986
|
{fieldMetaData?.computedFieldTriggerConfig === null
|
|
2895
2987
|
&&
|
|
2896
2988
|
<div className="mb-3">
|
|
@@ -2939,7 +3031,7 @@ const FieldMetaDataForm = ({
|
|
|
2939
3031
|
)}
|
|
2940
3032
|
|
|
2941
3033
|
{currentFields.includes("selectionDynamicProviderCtxt") && (
|
|
2942
|
-
<div className="field mt-4 flex
|
|
3034
|
+
<div className="field mt-4 flex flex-col gap-2 px-2 pt-2">
|
|
2943
3035
|
<label htmlFor="selectionDynamicProviderCtxt" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
2944
3036
|
Selection Dynamic Provider Context
|
|
2945
3037
|
</label>
|
|
@@ -2963,7 +3055,7 @@ const FieldMetaDataForm = ({
|
|
|
2963
3055
|
)}
|
|
2964
3056
|
|
|
2965
3057
|
{currentFields.includes("computedFieldValueProviderCtxt") && (
|
|
2966
|
-
<div className="field mt-4 flex
|
|
3058
|
+
<div className="field mt-4 flex flex-col gap-2 px-2 pt-2">
|
|
2967
3059
|
<label htmlFor="computedFieldValueProviderCtxt" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
2968
3060
|
Computed Field Value Provider Context
|
|
2969
3061
|
</label>
|
|
@@ -2995,7 +3087,7 @@ const FieldMetaDataForm = ({
|
|
|
2995
3087
|
<div className="flex flex-wrap -mx-2 -mt-2">
|
|
2996
3088
|
{(showRegexFields && selectedTypeValue === "password") &&
|
|
2997
3089
|
<>
|
|
2998
|
-
<div className="field mt-2 flex
|
|
3090
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
2999
3091
|
<label
|
|
3000
3092
|
htmlFor="regexPattern"
|
|
3001
3093
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -3022,7 +3114,7 @@ const FieldMetaDataForm = ({
|
|
|
3022
3114
|
}
|
|
3023
3115
|
{showRegexFields && (
|
|
3024
3116
|
<>
|
|
3025
|
-
<div className="field mt-2 flex
|
|
3117
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
3026
3118
|
<label
|
|
3027
3119
|
htmlFor="regexPattern"
|
|
3028
3120
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -3047,7 +3139,7 @@ const FieldMetaDataForm = ({
|
|
|
3047
3139
|
)}
|
|
3048
3140
|
</div>
|
|
3049
3141
|
{showRegexFields && (
|
|
3050
|
-
<div className="field mt-2 mb-3 flex
|
|
3142
|
+
<div className="field mt-2 mb-3 flex flex-col gap-2 px-2 pt-2 md:mb-3 md:w-1/2">
|
|
3051
3143
|
<label
|
|
3052
3144
|
htmlFor="regexPatternNotMatchingErrorMsg"
|
|
3053
3145
|
className={classNames("form-field-label", styles.fieldLabel)}
|
|
@@ -3078,7 +3170,7 @@ const FieldMetaDataForm = ({
|
|
|
3078
3170
|
{(showMinFields || showMaxFields) &&
|
|
3079
3171
|
<>
|
|
3080
3172
|
{showMinFields && (
|
|
3081
|
-
<div className="field mt-2 flex
|
|
3173
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
3082
3174
|
<label htmlFor="min" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
3083
3175
|
Min {(selectedTypeValue !== "int" && selectedTypeValue !== "decimal") && `(Characters Allowed)`}
|
|
3084
3176
|
|
|
@@ -3117,7 +3209,7 @@ const FieldMetaDataForm = ({
|
|
|
3117
3209
|
</div>
|
|
3118
3210
|
)}
|
|
3119
3211
|
{showMaxFields && (
|
|
3120
|
-
<div className="field mt-2 flex
|
|
3212
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
3121
3213
|
<label htmlFor="max" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
3122
3214
|
Max {(selectedTypeValue !== "int" &&
|
|
3123
3215
|
selectedTypeValue !== "decimal") && `(Characters allowed)`}
|
|
@@ -3159,7 +3251,7 @@ const FieldMetaDataForm = ({
|
|
|
3159
3251
|
</>
|
|
3160
3252
|
}
|
|
3161
3253
|
{showOrmOptions && (
|
|
3162
|
-
<div className="field mt-2 flex
|
|
3254
|
+
<div className="field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2">
|
|
3163
3255
|
<label htmlFor="ormType" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
3164
3256
|
Type
|
|
3165
3257
|
</label>
|
|
@@ -3195,7 +3287,7 @@ const FieldMetaDataForm = ({
|
|
|
3195
3287
|
)}
|
|
3196
3288
|
|
|
3197
3289
|
{(formik.values.relationType !== "many-to-many" && formik.values.relationType !== "one-to-many") && <p className="form-wrapper-heading">Settings</p>}
|
|
3198
|
-
<div className="
|
|
3290
|
+
<div className="flex flex-wrap -mx-2 mt-2 md:mt-0">
|
|
3199
3291
|
{currentFields.includes("required") && (formik.values.relationType !== "many-to-many" && formik.values.relationType !== "one-to-many") && (
|
|
3200
3292
|
<div className="field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2">
|
|
3201
3293
|
<div className="solid-field-checkbox-row">
|
|
@@ -3416,7 +3508,7 @@ const FieldMetaDataForm = ({
|
|
|
3416
3508
|
|
|
3417
3509
|
|
|
3418
3510
|
{formik.values.encrypt === true && (
|
|
3419
|
-
<div className="mt-2 flex flex-wrap -mx-2
|
|
3511
|
+
<div className="mt-2 flex flex-wrap -mx-2">
|
|
3420
3512
|
<div className="w-full px-2 pt-2 md:w-1/2">
|
|
3421
3513
|
<div className="field flex w-full flex-col gap-2">
|
|
3422
3514
|
<label
|
|
@@ -3461,7 +3553,7 @@ const FieldMetaDataForm = ({
|
|
|
3461
3553
|
)}
|
|
3462
3554
|
</div>
|
|
3463
3555
|
</div>
|
|
3464
|
-
<div className="
|
|
3556
|
+
<div className="px-2 pt-2 md:w-1/2">
|
|
3465
3557
|
<div className="field flex w-full flex-col gap-2">
|
|
3466
3558
|
<label htmlFor="decryptWhen" className={classNames("form-field-label", styles.fieldLabel)}>
|
|
3467
3559
|
Decrypt When
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidTreeView.d.ts","sourceRoot":"","sources":["../../../../src/components/core/tree/SolidTreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AA8Cf,KAAK,mBAAmB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,OAAO,CAAC,E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;CACH,CAAC;AA0CF,eAAO,MAAM,aAAa,iGAqmExB,CAAC"}
|
|
@@ -1595,7 +1595,7 @@ export var SolidTreeView = forwardRef(function (params, ref) {
|
|
|
1595
1595
|
})] })] }))] }));
|
|
1596
1596
|
};
|
|
1597
1597
|
// ─── Render ───────────────────────────────────────────────────────────────
|
|
1598
|
-
return (_jsxs("div", { className: "page-parent-wrapper solid-list-page-wrapper solid-tree-page-wrapper flex h-full min-h-0 overflow-hidden", children: [_jsx("div", { className: "solid-list-content h-full flex flex-col flex-grow-1", children: _jsxs("div", { className: "solid-list-surface solid-tree-surface flex flex-col flex-1 min-h-0", children: [_jsx("div", { className: "page-header solid-list-toolbar solid-tree-toolbar flex-col lg:flex-row", children: _jsxs("div", { className: "flex w-full flex-col-reverse lg:flex-row lg:items-center items-end", children: [_jsxs("div", { className: "flex lg:gap-4 items-center w-full solid-list-toolbar-left lg:min-w-0 lg:flex-1", children: [_jsx("div", { className: "flex items-center gap-2" }), ((_r = (_q = (_p = solidTreeViewMetaData === null || solidTreeViewMetaData === void 0 ? void 0 : solidTreeViewMetaData.data) === null || _p === void 0 ? void 0 : _p.solidView) === null || _q === void 0 ? void 0 : _q.layout) === null || _r === void 0 ? void 0 : _r.attrs.enableGlobalSearch) === true && (
|
|
1598
|
+
return (_jsxs("div", { className: "page-parent-wrapper solid-list-page-wrapper solid-tree-page-wrapper flex h-full min-h-0 overflow-hidden", children: [_jsx("div", { className: "solid-list-content h-full flex flex-col flex-grow-1", children: _jsxs("div", { className: "solid-list-surface solid-tree-surface flex flex-col flex-1 min-h-0", children: [_jsx("div", { className: "page-header solid-list-toolbar solid-tree-toolbar flex-col lg:flex-row", children: _jsxs("div", { className: "flex w-full flex-col-reverse lg:flex-row lg:items-center items-end", children: [_jsxs("div", { className: "flex lg:gap-4 items-center w-full solid-list-toolbar-left lg:min-w-0 lg:flex-1", children: [_jsx("div", { className: "flex items-center gap-2" }), ((_r = (_q = (_p = solidTreeViewMetaData === null || solidTreeViewMetaData === void 0 ? void 0 : solidTreeViewMetaData.data) === null || _p === void 0 ? void 0 : _p.solidView) === null || _q === void 0 ? void 0 : _q.layout) === null || _r === void 0 ? void 0 : _r.attrs.enableGlobalSearch) === true && (_jsx(_Fragment, { children: _jsx("div", { className: "".concat(showGlobalSearchElement ? "flex" : "max-lg:hidden lg:flex", " w-full mt-3 lg:mt-0 lg:min-w-0"), children: _jsx(SolidGlobalSearchElement, { viewType: "tree", showSaveFilterPopup: showSaveFilterPopup, setShowSaveFilterPopup: setShowSaveFilterPopup, ref: solidGlobalSearchElementRef, viewData: solidTreeViewMetaData, handleApplyCustomFilter: handleApplyCustomFilter, filterPredicates: filterPredicates }) }) }))] }), _jsxs("div", { className: "flex items-center solid-header-buttons-wrapper solid-list-toolbar-actions lg:ml-auto", children: [headerRequestStatusLabel ? _jsx(SolidHeaderRequestStatus, { label: headerRequestStatusLabel }) : null, ((_u = (_t = (_s = solidTreeViewMetaData === null || solidTreeViewMetaData === void 0 ? void 0 : solidTreeViewMetaData.data) === null || _s === void 0 ? void 0 : _s.solidView) === null || _t === void 0 ? void 0 : _t.layout) === null || _u === void 0 ? void 0 : _u.attrs.enableGlobalSearch) === true && (_jsx("div", { className: "solid-list-search-toggle", children: _jsx(SolidButton, { type: "button", size: "sm", variant: "outline", leftIcon: _jsx(Search, { size: 14 }), className: "solid-icon-button", onClick: function () { return setShowGlobalSearchElement(!showGlobalSearchElement); } }) })), _jsx("div", { className: "solid-header-buttons-wrapper hidden items-center lg:flex", children: (_v = visibleHeaderButtons === null || visibleHeaderButtons === void 0 ? void 0 : visibleHeaderButtons.filter(function (button) { var _a; return ((_a = button === null || button === void 0 ? void 0 : button.attrs) === null || _a === void 0 ? void 0 : _a.actionInContextMenu) !== true; })) === null || _v === void 0 ? void 0 : _v.map(function (button, index) { return (_jsx(SolidListViewHeaderButton, { button: button, params: params, solidListViewMetaData: solidTreeViewMetaData, handleCustomButtonClick: handleCustomButtonClick, selectedRecords: selectedRecords, filters: filters }, index)); }) }), actionsAllowed.includes("".concat(permissionExpression(params.modelName, "create"))) &&
|
|
1599
1599
|
((_y = (_x = (_w = solidTreeViewMetaData === null || solidTreeViewMetaData === void 0 ? void 0 : solidTreeViewMetaData.data) === null || _w === void 0 ? void 0 : _w.solidView) === null || _x === void 0 ? void 0 : _x.layout) === null || _y === void 0 ? void 0 : _y.attrs.create) !== false && (_jsx(SolidCreateButton, { createButtonUrl: createButtonUrl, createActionQueryParams: createActionQueryParams, responsiveIconOnly: true })), actionsAllowed.includes("".concat(permissionExpression(params.modelName, "delete"))) &&
|
|
1600
1600
|
((_1 = (_0 = (_z = solidTreeViewMetaData === null || solidTreeViewMetaData === void 0 ? void 0 : solidTreeViewMetaData.data) === null || _z === void 0 ? void 0 : _z.solidView) === null || _0 === void 0 ? void 0 : _0.layout) === null || _1 === void 0 ? void 0 : _1.attrs.delete) !== false &&
|
|
1601
1601
|
selectedRecords.length > 0 && (_jsx(SolidButton, { type: "button", label: "Delete", size: "sm", onClick: function () { return setDeleteRecordsDialogVisible(true); }, className: "small-button", severity: "danger" })), _jsx(SolidButton, { type: "button", size: "sm", variant: "outline", leftIcon: _jsx(RefreshCw, { size: 14 }), className: "solid-icon-button", onClick: function () { void loadRootGroups(getPagination("root").offset); } }), showArchived && selectedRecoverRecords.length > 0 && (_jsx(SolidButton, { type: "button", size: "sm", variant: "secondary", className: "hidden lg:flex", onClick: function () { return setRecoverDialogVisible(true); }, leftIcon: _jsx(RotateCcw, { size: 14 }), children: "Recover" })), params.embeded === false &&
|