@solidstarters/solid-core-ui 1.1.66 → 1.1.68
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/FileSvg.d.ts.map +1 -1
- package/dist/components/Svg/FileSvg.js +1 -1
- package/dist/components/Svg/FileSvg.js.map +1 -1
- package/dist/components/core/common/FilterComponent.d.ts.map +1 -1
- package/dist/components/core/common/FilterComponent.js +1 -1
- package/dist/components/core/common/FilterComponent.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +26 -13
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/list/ListViewRowActionPopup.d.ts.map +1 -1
- package/dist/components/core/list/ListViewRowActionPopup.js +21 -5
- package/dist/components/core/list/ListViewRowActionPopup.js.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js +12 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.d.ts +2 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.js +7 -0
- package/dist/components/core/list/widgets/SolidShortTextFieldTextRenderModeWidget.js.map +1 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.d.ts +2 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.js +36 -0
- package/dist/components/core/list/widgets/SolidUserNameAvatarWidget.js.map +1 -0
- package/dist/components/core/model/CreateModel.js +1 -1
- 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 +73 -50
- 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 +17 -15
- package/dist/components/core/model/ModelMetaData.js.map +1 -1
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +9 -3
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +8 -1
- package/dist/helpers/registry.js.map +1 -1
- package/dist/redux/api/modelApi.js +1 -1
- package/dist/redux/api/modelApi.js.map +1 -1
- package/dist/resources/globals.css +17 -69
- package/dist/resources/stylesheets/_menu.scss +0 -5
- package/dist/resources/themes/solid-dark-purple/theme.css +844 -741
- package/dist/resources/themes/solid-light-purple/theme.css +109 -3
- package/package.json +1 -1
- package/src/components/Svg/FileSvg.tsx +13 -12
- package/src/components/core/common/FilterComponent.tsx +3 -7
- package/src/components/core/common/SolidGlobalSearchElement.tsx +23 -15
- package/src/components/core/list/ListViewRowActionPopup.tsx +9 -2
- package/src/components/core/list/columns/SolidShortTextColumn.tsx +11 -2
- package/src/components/core/list/widgets/SolidUserNameAvatarWidget.tsx +52 -0
- package/src/components/core/model/CreateModel.tsx +1 -1
- package/src/components/core/model/FieldMetaDataForm.tsx +86 -12
- package/src/components/core/model/ModelMetaData.tsx +22 -9
- package/src/components/core/users/CreateUser.tsx +10 -6
- package/src/helpers/registry.ts +11 -1
- package/src/redux/api/modelApi.ts +1 -1
- package/src/resources/globals.css +17 -69
- package/src/resources/stylesheets/_menu.scss +0 -5
- package/src/resources/themes/solid-dark-purple/theme.css +844 -741
- package/src/resources/themes/solid-light-purple/theme.css +109 -3
- /package/src/components/core/list/widgets/{SolidShortTextFieldTextRenderModeWidget copy.tsx → SolidShortTextFieldTextRenderModeWidget.tsx} +0 -0
|
@@ -202,7 +202,7 @@ var createValidationSchema = function (currentFields, selectedType, allFields, f
|
|
|
202
202
|
else {
|
|
203
203
|
reservedNames = allFields.length > 0 ? allFields.map(function (f) { return f.name; }) : [];
|
|
204
204
|
}
|
|
205
|
-
var schema = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ name: Yup.string()
|
|
205
|
+
var schema = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ name: Yup.string()
|
|
206
206
|
// .matches(/^[a-z]+(-[a-z]+)*$/,"Invalid format. Use lowercase letters and hyphens only.")
|
|
207
207
|
.notOneOf(reservedNames, "Name Already in use. Please choose a different name.")
|
|
208
208
|
.required("Name is required."), displayName: Yup.string().required("Display Name is required"), description: Yup.string().nullable(), type: Yup.string().required("Type is required"), isSystem: Yup.boolean() }, (currentFields.includes("ormType") && {
|
|
@@ -319,8 +319,23 @@ var createValidationSchema = function (currentFields, selectedType, allFields, f
|
|
|
319
319
|
relationType: Yup.string().required("Relation Type is required"),
|
|
320
320
|
})), (currentFields.includes("relationCoModelSingularName") && {
|
|
321
321
|
relationCoModelSingularName: Yup.string().required("Relation Model Singular Name is required"),
|
|
322
|
+
})), (currentFields.includes("relationCoModelFieldName") && {
|
|
323
|
+
relationCoModelFieldName: Yup.string()
|
|
324
|
+
// .required(
|
|
325
|
+
// "Relation Model Field Name is required"
|
|
326
|
+
// ),
|
|
322
327
|
})), (currentFields.includes("relationCreateInverse") && {
|
|
323
328
|
relationCreateInverse: Yup.boolean(),
|
|
329
|
+
})), (currentFields.includes("relationCoModelFieldName") && {
|
|
330
|
+
relationCoModelFieldName: Yup.string().when("relationCreateInverse", function (relationCreateInverse, schema) {
|
|
331
|
+
console.log("relationCreateInverse", relationCreateInverse);
|
|
332
|
+
if (relationCreateInverse.length > 0 && relationCreateInverse[0] == true) {
|
|
333
|
+
return schema.required("Relation Co Model Field Name is required");
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
return schema.notRequired();
|
|
337
|
+
}
|
|
338
|
+
}),
|
|
324
339
|
})), (currentFields.includes("relation") && {
|
|
325
340
|
relationCascade: Yup.string().when("relationType", function (relationType, schema) {
|
|
326
341
|
return relationType === "one-to-one"
|
|
@@ -329,6 +344,8 @@ var createValidationSchema = function (currentFields, selectedType, allFields, f
|
|
|
329
344
|
}),
|
|
330
345
|
})), (currentFields.includes("relationModelModuleName") && {
|
|
331
346
|
relationModelModuleName: Yup.string().required("Relation Model Module Name Value is required"),
|
|
347
|
+
})), (currentFields.includes("relationFieldFixedFilter") && {
|
|
348
|
+
relationFieldFixedFilter: Yup.string().nullable(),
|
|
332
349
|
})), (currentFields.includes("selectionDynamicProvider") && {
|
|
333
350
|
selectionDynamicProvider: Yup.string().required("Selection Dynamic Provider Value is required"),
|
|
334
351
|
})), (currentFields.includes("selectionDynamicProviderCtxt") && {
|
|
@@ -367,42 +384,42 @@ var createValidationSchema = function (currentFields, selectedType, allFields, f
|
|
|
367
384
|
return Yup.object(schema);
|
|
368
385
|
};
|
|
369
386
|
var FieldMetaDataForm = function (_a) {
|
|
370
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57;
|
|
387
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59;
|
|
371
388
|
var setIsDirty = _a.setIsDirty, modelMetaData = _a.modelMetaData, fieldMetaData = _a.fieldMetaData, setFieldMetaData = _a.setFieldMetaData, allFields = _a.allFields, deleteModelFunction = _a.deleteModelFunction, setVisiblePopup = _a.setVisiblePopup, params = _a.params, setIsRequiredPopUp = _a.setIsRequiredPopUp, showToaster = _a.showToaster;
|
|
372
389
|
var booleanOptions = ["false", "true"];
|
|
373
|
-
var
|
|
374
|
-
var
|
|
390
|
+
var _60 = useState(false), isBackPopupVisible = _60[0], setIsBackPopupVisible = _60[1];
|
|
391
|
+
var _61 = useState(false), showColumnName = _61[0], setShowColumnName = _61[1];
|
|
375
392
|
var pathname = usePathname();
|
|
376
393
|
var toast = useRef(null);
|
|
377
|
-
var
|
|
378
|
-
var
|
|
379
|
-
var
|
|
380
|
-
var
|
|
381
|
-
var
|
|
382
|
-
var
|
|
383
|
-
var
|
|
384
|
-
var
|
|
385
|
-
var
|
|
386
|
-
var
|
|
387
|
-
var
|
|
388
|
-
var
|
|
394
|
+
var _62 = useGetFieldDefaultMetaDataQuery(null), fieldDefaultMetaData = _62.data, isLoading = _62.isLoading, error = _62.error, refetch = _62.refetch;
|
|
395
|
+
var _63 = useState(fetchCurrentFields(fieldMetaData && fieldMetaData.type, fieldDefaultMetaData)), currentFields = _63[0], setCurrentFields = _63[1];
|
|
396
|
+
var _64 = useLazyGetMediaStorageProvidersQuery(), triggerGetMediaStorageProvider = _64[0], _65 = _64[1], MediaStorageProviderData = _65.data, isMediaStorageProviderFetching = _65.isFetching, MediaStorageProviderError = _65.error;
|
|
397
|
+
var _66 = useLazyGetmodulesQuery(), triggerGetModules = _66[0], _67 = _66[1], moduleData = _67.data, isModuleFetching = _67.isFetching, moduleError = _67.error;
|
|
398
|
+
var _68 = useLazyGetModelsQuery(), triggerGetModels = _68[0], _69 = _68[1], modelData = _69.data, ismodelFetching = _69.isFetching, modelError = _69.error;
|
|
399
|
+
var _70 = useUpdateUserKeyMutation(), updateUserKey = _70[0], _71 = _70[1], isUpdateUserKeyLoading = _71.isLoading, isUpdateUserKeySuccess = _71.isSuccess, isUpdateUserKeyError = _71.isError, UpdateUserKeyError = _71.error, newModel = _71.data;
|
|
400
|
+
var _72 = useState(), markdownText = _72[0], setMarkdownText = _72[1];
|
|
401
|
+
var _73 = useState(false), encryptState = _73[0], setEncryptState = _73[1];
|
|
402
|
+
var _74 = useState(fieldMetaData ? false : true), showTypeFilter = _74[0], setShowTypeFilter = _74[1];
|
|
403
|
+
var _75 = useState((fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.type) && { label: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.type, value: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.type }), selectedType = _75[0], setSelectedType = _75[1];
|
|
404
|
+
var _76 = useState((fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.computedFieldValueType) && { label: fieldMetaData.computedFieldValueType, value: fieldMetaData.computedFieldValueType }), selectedComputedFieldValueType = _76[0], setSelectedComputedFieldValueType = _76[1];
|
|
405
|
+
var _77 = useState((fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.selectionDynamicProvider) && { label: fieldMetaData.selectionDynamicProvider, value: fieldMetaData.selectionDynamicProvider }), selectionDynamicProvider = _77[0], setSelectionDynamicProvider = _77[1];
|
|
389
406
|
// const [externalIdProvider, setExternalIdProvider] = useState(fieldMetaData?.externalIdProvider && { label: fieldMetaData.externalIdProvider, value: fieldMetaData.externalIdProvider });
|
|
390
|
-
var
|
|
391
|
-
var
|
|
392
|
-
var
|
|
393
|
-
var
|
|
394
|
-
var
|
|
395
|
-
var
|
|
396
|
-
var
|
|
397
|
-
var
|
|
398
|
-
var
|
|
399
|
-
var
|
|
407
|
+
var _78 = useState(fieldMetaData && fieldMetaData.selectionStaticValues && fieldMetaData.selectionStaticValues.length > 0 && (fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.selectionStaticValues.filter(function (line) { return line.trim() !== ""; }).join("\n"))), selectionStaticValues = _78[0], setSelectionStaticValues = _78[1];
|
|
408
|
+
var _79 = useState([]), filteredComputedFieldValueTypes = _79[0], setFilteredComputedFieldValueTypes = _79[1];
|
|
409
|
+
var _80 = useState([]), filteredSelectionDynamicProvider = _80[0], setFilteredSelectionDynamicProvider = _80[1];
|
|
410
|
+
var _81 = useState([]), ormTypeOptions = _81[0], setOrmTypeOptions = _81[1];
|
|
411
|
+
var _82 = useState(fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.ormType), selectedOrmType = _82[0], setSelectedOrmType = _82[1];
|
|
412
|
+
var _83 = useState(false), isUserKeyFields = _83[0], setUserKeyFields = _83[1];
|
|
413
|
+
var _84 = useState([]), userKeyData = _84[0], setUserKeyData = _84[1];
|
|
414
|
+
var _85 = useState([]), filteredExternalIdProvider = _85[0], setFilteredExternalIdProvider = _85[1];
|
|
415
|
+
var _86 = useState([]), filteredSelectionEncryptionType = _86[0], setFilteredSelectionEncryptionType = _86[1];
|
|
416
|
+
var _87 = useState([]), filteredSelectionDecryptWhen = _87[0], setFilteredSelectionDecryptWhen = _87[1];
|
|
400
417
|
var items = Array.from({ length: 100000 }).map(function (_, i) { return ({
|
|
401
418
|
label: "Item #".concat(i),
|
|
402
419
|
value: i,
|
|
403
420
|
}); });
|
|
404
421
|
var validationSchema = React.useMemo(function () { return createValidationSchema(currentFields, selectedType, allFields, fieldMetaData, encryptState); }, [currentFields, encryptState]);
|
|
405
|
-
var
|
|
422
|
+
var _88 = useState(false), typeSelected = _88[0], setTypeSelected = _88[1];
|
|
406
423
|
var searchMediaTypes = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
407
424
|
var query, suggestionData;
|
|
408
425
|
return __generator(this, function (_a) {
|
|
@@ -708,7 +725,7 @@ var FieldMetaDataForm = function (_a) {
|
|
|
708
725
|
{ label: "True", value: "true" },
|
|
709
726
|
{ label: "False", value: "false" },
|
|
710
727
|
];
|
|
711
|
-
var
|
|
728
|
+
var _89 = useState(fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.regexPattern), selectedPasswordPolicy = _89[0], setSelectedPasswordPolicy = _89[1];
|
|
712
729
|
var passwordPolicyOptions = [
|
|
713
730
|
{ label: 'Lowercase and Uppercase Alphabets Required', value: '^(?=.*[a-z])(?=.*[A-Z]).*$' },
|
|
714
731
|
{ label: 'Lowercase and Uppercase Alphabets and Numbers Required', value: '^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).*$' },
|
|
@@ -751,6 +768,7 @@ var FieldMetaDataForm = function (_a) {
|
|
|
751
768
|
relationCreateInverse: fieldMetaData ? fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.relationCreateInverse : false,
|
|
752
769
|
relationCascade: fieldMetaData ? fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.relationCascade : 'cascade',
|
|
753
770
|
relationModelModuleName: fieldMetaData ? fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.relationModelModuleName : modelMetaData === null || modelMetaData === void 0 ? void 0 : modelMetaData.module.name,
|
|
771
|
+
relationFieldFixedFilter: fieldMetaData ? fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.relationFieldFixedFilter : "",
|
|
754
772
|
selectionDynamicProvider: fieldMetaData ? fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.selectionDynamicProvider : null,
|
|
755
773
|
selectionDynamicProviderCtxt: fieldMetaData ? fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.selectionDynamicProviderCtxt : "",
|
|
756
774
|
selectionStaticValues: fieldMetaData ? fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.selectionStaticValues : [""],
|
|
@@ -1021,7 +1039,10 @@ var FieldMetaDataForm = function (_a) {
|
|
|
1021
1039
|
}, options: booleanOptions, className: classNames("", {
|
|
1022
1040
|
"p-invalid": isFormFieldValid(formik, "mediaEmbedded"),
|
|
1023
1041
|
}) }), isFormFieldValid(formik, "mediaEmbedded") && (_jsx(Message, { severity: "error", text: (_z = (_y = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _y === void 0 ? void 0 : _y.mediaEmbedded) === null || _z === void 0 ? void 0 : _z.toString() }))] })), currentFields.includes("relationType") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "relationType", className: "form-field-label ", children: "Relation Type" }), _jsx(SelectButton, { value: formik.values.relationType, options: fieldDefaultMetaData.data.relationTypes, onChange: function (e) {
|
|
1024
|
-
|
|
1042
|
+
formik.setFieldValue("relationType", e.value);
|
|
1043
|
+
if (e.value === "one-to-many") {
|
|
1044
|
+
formik.setFieldValue("relationCreateInverse", true);
|
|
1045
|
+
}
|
|
1025
1046
|
}, className: classNames("", {
|
|
1026
1047
|
"p-invalid": isFormFieldValid(formik, "relationType"),
|
|
1027
1048
|
}), optionLabel: "label" }), isFormFieldValid(formik, "relationType") && (_jsx(Message, { severity: "error", text: (_1 = (_0 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _0 === void 0 ? void 0 : _0.relationType) === null || _1 === void 0 ? void 0 : _1.toString() }))] })), currentFields.includes("relationType") && formik.values.relationType === "many-to-one" && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "relationCascade", className: "form-field-label", children: "Relation Cascade" }), _jsx(Dropdown, { id: "relationCascade", name: "relationCascade", value: formik.values.relationCascade, options: fieldDefaultMetaData.data.cascadeTypes, onChange: function (e) {
|
|
@@ -1032,24 +1053,26 @@ var FieldMetaDataForm = function (_a) {
|
|
|
1032
1053
|
formik.setFieldValue("relationCoModelSingularName", "");
|
|
1033
1054
|
formik.setFieldValue("relationCoModelColumnName", "");
|
|
1034
1055
|
formik.setFieldValue("relationJoinTableName", "");
|
|
1035
|
-
} }, "relationModelModuleName"), isFormFieldValid(formik, "relationModelModuleName") && (_jsx(Message, { severity: "error", text: (_5 = (_4 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _4 === void 0 ? void 0 : _4.relationModelModuleName) === null || _5 === void 0 ? void 0 : _5.toString() }))] })), currentFields.includes("relationCoModelSingularName") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "relationCoModelSingularName", className: "form-field-label", children: "Co-Model Name" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid, fieldName: "relationCoModelSingularName", fieldNameId: "relationCoModelSingularName", labelKey: "displayName", valueKey: "singularName", searchData: searchrelationCoModelSingularNames, existingData: formik.values.relationCoModelSingularName }, "relationCoModelSingularName"), isFormFieldValid(formik, "relationCoModelSingularName") && (_jsx(Message, { severity: "error", text: (_7 = (_6 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _6 === void 0 ? void 0 : _6.relationCoModelSingularName) === null || _7 === void 0 ? void 0 : _7.toString() }))] })),
|
|
1056
|
+
} }, "relationModelModuleName"), isFormFieldValid(formik, "relationModelModuleName") && (_jsx(Message, { severity: "error", text: (_5 = (_4 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _4 === void 0 ? void 0 : _4.relationModelModuleName) === null || _5 === void 0 ? void 0 : _5.toString() }))] })), currentFields.includes("relationCoModelSingularName") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "relationCoModelSingularName", className: "form-field-label", children: "Co-Model Name" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid, fieldName: "relationCoModelSingularName", fieldNameId: "relationCoModelSingularName", labelKey: "displayName", valueKey: "singularName", searchData: searchrelationCoModelSingularNames, existingData: formik.values.relationCoModelSingularName }, "relationCoModelSingularName"), isFormFieldValid(formik, "relationCoModelSingularName") && (_jsx(Message, { severity: "error", text: (_7 = (_6 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _6 === void 0 ? void 0 : _6.relationCoModelSingularName) === null || _7 === void 0 ? void 0 : _7.toString() }))] })), currentFields.includes("relationFieldFixedFilter") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "relationFieldFixedFilter", className: "form-field-label", children: "Relation Field Fixed Filter" }), _jsx(InputTextarea, { "aria-describedby": "Fixed Filter", id: "relationFieldFixedFilter", name: "relationFieldFixedFilter", onChange: formik.handleChange, value: formik.values.relationFieldFixedFilter, rows: 5, cols: 30, className: classNames("", {
|
|
1057
|
+
"p-invalid": isFormFieldValid(formik, "relationFieldFixedFilter"),
|
|
1058
|
+
}) }), isFormFieldValid(formik, "relationFieldFixedFilter") && (_jsx(Message, { severity: "error", text: (_9 = (_8 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _8 === void 0 ? void 0 : _8.relationFieldFixedFilter) === null || _9 === void 0 ? void 0 : _9.toString() }))] })), isUserKeyFields && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "userKey", className: "form-field-label", children: "Set User Key" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid, fieldName: "userKey", fieldNameId: "userKey", labelKey: "displayName", valueKey: "name", searchData: searchUserKeyField, existingData: formik.values.userKey }, "userKey"), isFormFieldValid(formik, "userKey") && (_jsx(Message, { severity: "error", text: (_11 = (_10 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _10 === void 0 ? void 0 : _10.userKey) === null || _11 === void 0 ? void 0 : _11.toString() }))] })), currentFields.includes("relationCreateInverse") && (_jsxs("div", { className: "field col-6 flex flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "relationCreateInverse", className: "form-field-label", children: "Relation Create Inverse" }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(Checkbox, { inputId: "relationCreateInverse", name: "relationCreateInverse", checked: formik.values.relationCreateInverse, disabled: formik.values.relationType === "one-to-many" ? true : false, onChange: function (e) { return formik.setFieldValue("relationCreateInverse", e.checked); } }), _jsx("label", { htmlFor: "relationCreateInverse", className: "ml-2", children: "Create Inverse" })] }), isFormFieldValid(formik, "relationCreateInverse") && (_jsx(Message, { severity: "error", text: (_13 = (_12 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _12 === void 0 ? void 0 : _12.relationCreateInverse) === null || _13 === void 0 ? void 0 : _13.toString() }))] })), currentFields.includes("relationCoModelFieldName") && formik.values.relationCreateInverse && (formik.values.relationType === "many-to-many" || formik.values.relationType === "many-to-one") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "relationCoModelFieldName", className: "form-field-label", children: "Relation Co-Model Field Name" }), _jsx(InputText, { type: "text", id: "relationCoModelFieldName", name: "relationCoModelFieldName", onChange: formik.handleChange, disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id, value: formik.values.relationCoModelFieldName, className: classNames("", {
|
|
1036
1059
|
"p-invalid": isFormFieldValid(formik, "relationCoModelFieldName"),
|
|
1037
|
-
}) }), isFormFieldValid(formik, "relationCoModelFieldName") && (_jsx(Message, { severity: "error", text: (
|
|
1060
|
+
}) }), isFormFieldValid(formik, "relationCoModelFieldName") && (_jsx(Message, { severity: "error", text: (_15 = (_14 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _14 === void 0 ? void 0 : _14.relationCoModelFieldName) === null || _15 === void 0 ? void 0 : _15.toString() }))] })), currentFields.includes("relationCoModelColumnName") && formik.values.relationCreateInverse && (formik.values.relationType === "many-to-many" || formik.values.relationType === "many-to-one") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "relationCoModelColumnName", className: "form-field-label", children: "Relation Co-Model Column Name" }), _jsx(InputText, { type: "text", id: "relationCoModelColumnName", name: "relationCoModelColumnName", onChange: formik.handleChange, disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id, value: formik.values.relationCoModelColumnName, className: classNames("", {
|
|
1038
1061
|
"p-invalid": isFormFieldValid(formik, "relationCoModelColumnName"),
|
|
1039
|
-
}) }), isFormFieldValid(formik, "relationCoModelColumnName") && (_jsx(Message, { severity: "error", text: (
|
|
1062
|
+
}) }), isFormFieldValid(formik, "relationCoModelColumnName") && (_jsx(Message, { severity: "error", text: (_17 = (_16 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _16 === void 0 ? void 0 : _16.relationCoModelColumnName) === null || _17 === void 0 ? void 0 : _17.toString() }))] })), currentFields.includes("relationJoinTableName") && formik.values.relationType === "many-to-many" && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "relationJoinTableName", className: "form-field-label", children: "Relation Join Table Name" }), _jsx(InputText, { type: "text", id: "relationJoinTableName", name: "relationJoinTableName", onChange: formik.handleChange, disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id, value: formik.values.relationJoinTableName, className: classNames("", {
|
|
1040
1063
|
"p-invalid": isFormFieldValid(formik, "relationJoinTableName"),
|
|
1041
|
-
}) }), isFormFieldValid(formik, "relationJoinTableName") && (_jsx(Message, { severity: "error", text: (
|
|
1064
|
+
}) }), isFormFieldValid(formik, "relationJoinTableName") && (_jsx(Message, { severity: "error", text: (_19 = (_18 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _18 === void 0 ? void 0 : _18.relationJoinTableName) === null || _19 === void 0 ? void 0 : _19.toString() }))] })), currentFields.includes("selectionDynamicProvider") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "selectionDynamicProvider", className: "form-field-label", children: "Selection Dynamic Provider" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid,
|
|
1042
1065
|
// relationField={false}
|
|
1043
|
-
fieldName: "selectionDynamicProvider", fieldNameId: null, labelKey: "label", valueKey: "value", searchData: searchSelectionDynamicProvider, existingData: formik.values.selectionDynamicProvider, additionalAction: function (e) { return setMarkdownText(e.target.value.help); } }, "selectionDynamicProvider"), isFormFieldValid(formik, "selectionDynamicProvider") && (_jsx(Message, { severity: "error", text: (
|
|
1066
|
+
fieldName: "selectionDynamicProvider", fieldNameId: null, labelKey: "label", valueKey: "value", searchData: searchSelectionDynamicProvider, existingData: formik.values.selectionDynamicProvider, additionalAction: function (e) { return setMarkdownText(e.target.value.help); } }, "selectionDynamicProvider"), isFormFieldValid(formik, "selectionDynamicProvider") && (_jsx(Message, { severity: "error", text: (_21 = (_20 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _20 === void 0 ? void 0 : _20.selectionDynamicProvider) === null || _21 === void 0 ? void 0 : _21.toString() }))] })), currentFields.includes("selectionValueType") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "selectionValueType", className: "form-field-label", children: "Select Value Type" }), _jsx(Dropdown, { id: "selectionValueType", name: "selectionValueType", value: formik.values.selectionValueType, options: selctionValueTypes, onChange: function (e) {
|
|
1044
1067
|
return formik.setFieldValue("selectionValueType", e.value);
|
|
1045
1068
|
}, placeholder: "Select Value Type", className: classNames("", {
|
|
1046
1069
|
"p-invalid": isFormFieldValid(formik, "selectionValueType"),
|
|
1047
|
-
}) }), isFormFieldValid(formik, "selectionValueType") && (_jsx(Message, { severity: "error", text: (
|
|
1070
|
+
}) }), isFormFieldValid(formik, "selectionValueType") && (_jsx(Message, { severity: "error", text: (_23 = (_22 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _22 === void 0 ? void 0 : _22.selectionValueType) === null || _23 === void 0 ? void 0 : _23.toString() }))] })), currentFields.includes("selectionStaticValues") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "selectionStaticValues", className: "form-field-label", children: "Selection Static Values" }), formik.values.selectionStaticValues.map(function (enumValue, index) { return (_jsx(SelectionStaticValues, { enumValue: enumValue, onUpdate: function (updatedString) { return updateEnumValues(index, updatedString); }, onDelete: function () { return deleteEnumValue(index); }, onAdd: addEnumValue }, index)); }), isFormFieldValid(formik, "selectionStaticValues") && (_jsx(Message, { severity: "error", text: (_25 = (_24 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _24 === void 0 ? void 0 : _24.selectionStaticValues) === null || _25 === void 0 ? void 0 : _25.toString() }))] })), currentFields.includes("computedFieldValueType") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "computedFieldValueType", className: "form-field-label", children: "Computed Field Value Type" }), _jsx(AutoComplete, { value: selectedComputedFieldValueType, invalid: isFormFieldValid(formik, "computedFieldValueType"), suggestions: filteredComputedFieldValueTypes, completeMethod: searchComputedFieldValueType, virtualScrollerOptions: { itemSize: 38 }, field: "label", dropdown: true, className: "solid-standard-autocomplete", onChange: function (e) {
|
|
1048
1071
|
setSelectedComputedFieldValueType(e.value);
|
|
1049
1072
|
formik.setFieldValue("computedFieldValueType", e.value.value);
|
|
1050
|
-
} }), isFormFieldValid(formik, "computedFieldValueType") && (_jsx(Message, { severity: "error", text: (
|
|
1073
|
+
} }), isFormFieldValid(formik, "computedFieldValueType") && (_jsx(Message, { severity: "error", text: (_27 = (_26 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _26 === void 0 ? void 0 : _26.computedFieldValueType) === null || _27 === void 0 ? void 0 : _27.toString() }))] })), currentFields.includes("computedFieldValueProvider") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "computedFieldValueProvider", className: "form-field-label", children: "Computed Field Provider" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid,
|
|
1051
1074
|
// relationField={false}
|
|
1052
|
-
fieldName: "computedFieldValueProvider", fieldNameId: null, labelKey: "label", valueKey: "value", searchData: searchComputedProvider, existingData: formik.values.computedFieldValueProvider, additionalAction: function (e) { return setMarkdownText(e.target.value.help); } }, "computedFieldValueProvider"), isFormFieldValid(formik, "computedFieldValueProvider") && (_jsx(Message, { severity: "error", text: (
|
|
1075
|
+
fieldName: "computedFieldValueProvider", fieldNameId: null, labelKey: "label", valueKey: "value", searchData: searchComputedProvider, existingData: formik.values.computedFieldValueProvider, additionalAction: function (e) { return setMarkdownText(e.target.value.help); } }, "computedFieldValueProvider"), isFormFieldValid(formik, "computedFieldValueProvider") && (_jsx(Message, { severity: "error", text: (_29 = (_28 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _28 === void 0 ? void 0 : _28.computedFieldValueProvider) === null || _29 === void 0 ? void 0 : _29.toString() }))] })), currentFields.includes("selectionDynamicProviderCtxt") && (
|
|
1053
1076
|
// {/* {markdownText &&
|
|
1054
1077
|
// <div className="md:col-12 sm:col-12">
|
|
1055
1078
|
// <div className="field col-6 flex-flex-column gap-2">
|
|
@@ -1060,9 +1083,9 @@ var FieldMetaDataForm = function (_a) {
|
|
|
1060
1083
|
// </div>
|
|
1061
1084
|
// </div>
|
|
1062
1085
|
// } */}
|
|
1063
|
-
_jsxs("div", { className: "field col-12 flex-flex-column gap-2 mt-4", children: [_jsx("label", { htmlFor: "selectionDynamicProviderCtxt", className: "form-field-label", children: "Selection Dynamic Provider Context" }), _jsx(CodeEditor, { formik: formik, field: "selectionDynamicProviderCtxt" }), _jsx("div", { className: " form-field-label mt-4", children: markdownText }), isFormFieldValid(formik, "selectionDynamicProviderCtxt") && (_jsx(Message, { severity: "error", text: (
|
|
1086
|
+
_jsxs("div", { className: "field col-12 flex-flex-column gap-2 mt-4", children: [_jsx("label", { htmlFor: "selectionDynamicProviderCtxt", className: "form-field-label", children: "Selection Dynamic Provider Context" }), _jsx(CodeEditor, { formik: formik, field: "selectionDynamicProviderCtxt" }), _jsx("div", { className: " form-field-label mt-4", children: markdownText }), isFormFieldValid(formik, "selectionDynamicProviderCtxt") && (_jsx(Message, { severity: "error", text: (_31 = (_30 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _30 === void 0 ? void 0 : _30.selectionDynamicProviderCtxt) === null || _31 === void 0 ? void 0 : _31.toString() }))] })
|
|
1064
1087
|
// {/* {currentFields.includes("markdown") && ( */}
|
|
1065
|
-
), currentFields.includes("computedFieldValueProviderCtxt") && (_jsxs("div", { className: "field col-12 flex-flex-column gap-2 mt-4", children: [_jsx("label", { htmlFor: "computedFieldValueProviderCtxt", className: "form-field-label", children: "Computed Field Value Provider Context" }), _jsx(CodeEditor, { formik: formik, field: "computedFieldValueProviderCtxt" }), _jsx("div", { className: "form-field-label mt-4", children: markdownText }), isFormFieldValid(formik, "computedFieldValueProviderCtxt") && (_jsx(Message, { severity: "error", text: (
|
|
1088
|
+
), currentFields.includes("computedFieldValueProviderCtxt") && (_jsxs("div", { className: "field col-12 flex-flex-column gap-2 mt-4", children: [_jsx("label", { htmlFor: "computedFieldValueProviderCtxt", className: "form-field-label", children: "Computed Field Value Provider Context" }), _jsx(CodeEditor, { formik: formik, field: "computedFieldValueProviderCtxt" }), _jsx("div", { className: "form-field-label mt-4", children: markdownText }), isFormFieldValid(formik, "computedFieldValueProviderCtxt") && (_jsx(Message, { severity: "error", text: (_33 = (_32 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _32 === void 0 ? void 0 : _32.computedFieldValueProviderCtxt) === null || _33 === void 0 ? void 0 : _33.toString() }))] }))] })), (currentFields.includes("regexPattern") || currentFields.includes("min") || currentFields.includes("max") || currentFields.includes("ormType")) && ormTypeOptions && selectedType.value !== 'relation' &&
|
|
1066
1089
|
_jsxs(_Fragment, { children: [_jsx("p", { className: "form-wrapper-heading text-base mt-3", children: "Validations" }), _jsxs("div", { className: "formgrid grid", children: [(currentFields.includes("regexPattern") && selectedType.value === "password") &&
|
|
1067
1090
|
_jsx(_Fragment, { children: _jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "regexPattern", className: "form-field-label", children: "Password Policy" }), _jsx(Dropdown, { value: selectedPasswordPolicy, onChange: function (e) {
|
|
1068
1091
|
setSelectedPasswordPolicy(e.value);
|
|
@@ -1073,9 +1096,9 @@ var FieldMetaDataForm = function (_a) {
|
|
|
1073
1096
|
// className="w-full md:w-14rem"
|
|
1074
1097
|
className: "", checkmark: true, highlightOnSelect: false })] }) }), currentFields.includes("regexPattern") && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "regexPattern", className: "form-field-label", children: "Regex Pattern" }), _jsx(InputText, { type: "text", id: "regexPattern", name: "regexPattern", onChange: formik.handleChange, value: formik.values.regexPattern, className: classNames("", {
|
|
1075
1098
|
"p-invalid": isFormFieldValid(formik, "regexPattern"),
|
|
1076
|
-
}) }), isFormFieldValid(formik, "regexPattern") && (_jsx(Message, { severity: "error", text: (
|
|
1099
|
+
}) }), isFormFieldValid(formik, "regexPattern") && (_jsx(Message, { severity: "error", text: (_35 = (_34 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _34 === void 0 ? void 0 : _34.regexPattern) === null || _35 === void 0 ? void 0 : _35.toString() }))] }), currentFields.includes("regexPattern") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "regexPatternNotMatchingErrorMsg", className: "form-field-label", children: "Regex Pattern Not Matching Error Msg" }), _jsx(InputText, { type: "text", id: "regexPatternNotMatchingErrorMsg", name: "regexPatternNotMatchingErrorMsg", onChange: formik.handleChange, value: formik.values.regexPatternNotMatchingErrorMsg, className: classNames("", {
|
|
1077
1100
|
"p-invalid": isFormFieldValid(formik, "regexPatternNotMatchingErrorMsg"),
|
|
1078
|
-
}) }), isFormFieldValid(formik, "regexPatternNotMatchingErrorMsg") && (_jsx(Message, { severity: "error", text: (
|
|
1101
|
+
}) }), isFormFieldValid(formik, "regexPatternNotMatchingErrorMsg") && (_jsx(Message, { severity: "error", text: (_37 = (_36 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _36 === void 0 ? void 0 : _36.regexPatternNotMatchingErrorMsg) === null || _37 === void 0 ? void 0 : _37.toString() }))] }))] })), (currentFields.includes("min") || currentFields.includes("max")) &&
|
|
1079
1102
|
_jsxs(_Fragment, { children: [currentFields.includes("min") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsxs("label", { htmlFor: "min", className: "form-field-label", children: ["Min ", (selectedType.value !== "int" && selectedType.value !== "decimal") && "(Characters Allowed)"] }), (selectedType.value === "int" ||
|
|
1080
1103
|
selectedType.value === "decimal" ||
|
|
1081
1104
|
selectedType.value === "shortText" ||
|
|
@@ -1086,7 +1109,7 @@ var FieldMetaDataForm = function (_a) {
|
|
|
1086
1109
|
selectedType.value === "json") &&
|
|
1087
1110
|
_jsx(InputNumber, { id: "min", name: "min", onValueChange: formik.handleChange, value: formik.values.min, className: classNames("", {
|
|
1088
1111
|
"p-invalid": isFormFieldValid(formik, "min"),
|
|
1089
|
-
}), disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id }), isFormFieldValid(formik, "min") && (_jsx(Message, { severity: "error", text: (
|
|
1112
|
+
}), disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id }), isFormFieldValid(formik, "min") && (_jsx(Message, { severity: "error", text: (_39 = (_38 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _38 === void 0 ? void 0 : _38.min) === null || _39 === void 0 ? void 0 : _39.toString() }))] })), currentFields.includes("max") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsxs("label", { htmlFor: "max", className: "form-field-label", children: ["Max ", (selectedType.value !== "int" &&
|
|
1090
1113
|
selectedType.value !== "decimal") && "(Characters allowed)"] }), (selectedType.value === "int" ||
|
|
1091
1114
|
selectedType.value === "decimal" ||
|
|
1092
1115
|
selectedType.value === "shortText" ||
|
|
@@ -1097,27 +1120,27 @@ var FieldMetaDataForm = function (_a) {
|
|
|
1097
1120
|
selectedType.value === "json") &&
|
|
1098
1121
|
_jsx(InputNumber, { id: "max", name: "max", onValueChange: formik.handleChange, value: formik.values.max, className: classNames("", {
|
|
1099
1122
|
"p-invalid": isFormFieldValid(formik, "max"),
|
|
1100
|
-
}), disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id }), isFormFieldValid(formik, "max") && (_jsx(Message, { severity: "error", text: (
|
|
1123
|
+
}), disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id }), isFormFieldValid(formik, "max") && (_jsx(Message, { severity: "error", text: (_41 = (_40 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _40 === void 0 ? void 0 : _40.max) === null || _41 === void 0 ? void 0 : _41.toString() }))] }))] }), currentFields.includes("ormType") && (_jsx("div", { className: "md:col-12 sm:col-12", children: ormTypeOptions && ormTypeOptions.length > 1 &&
|
|
1101
1124
|
_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "ormType", className: "form-field-label", children: "Type" }), _jsx("div", { className: "ormTypeflex", children: ormTypeOptions && ormTypeOptions.map(function (ormType) {
|
|
1102
1125
|
return (_jsx(_Fragment, { children: _jsxs("div", { className: "mr-3 align-items-center", children: [_jsx(RadioButton, { inputId: ormType.label, name: "ormType", value: ormType.label, onChange: function (e) {
|
|
1103
1126
|
formik.setFieldValue("ormType", e.value);
|
|
1104
1127
|
setSelectedOrmType(e.value);
|
|
1105
1128
|
}, checked: selectedOrmType === ormType.label }), _jsxs("label", { htmlFor: ormType.label, className: "ml-2", children: [ormType.label, _jsx("br", {}), _jsx("span", { className: "ml-4 fieldSubTitle", children: ormType.description })] })] }, ormType.key) }));
|
|
1106
|
-
}) }), isFormFieldValid(formik, "ormType") && (_jsx(Message, { severity: "error", text: (
|
|
1129
|
+
}) }), isFormFieldValid(formik, "ormType") && (_jsx(Message, { severity: "error", text: (_43 = (_42 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _42 === void 0 ? void 0 : _42.ormType) === null || _43 === void 0 ? void 0 : _43.toString() }))] }) }))] })] }), (formik.values.relationType !== "many-to-many" && formik.values.relationType !== "one-to-many") && _jsx("p", { className: "form-wrapper-heading text-base", children: "Settings" }), _jsxs("div", { className: "formgrid grid", children: [currentFields.includes("required") && (formik.values.relationType !== "many-to-many" && formik.values.relationType !== "one-to-many") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(Checkbox, { name: "required", onChange: function (e) {
|
|
1107
1130
|
formik.setFieldValue("required", e.checked);
|
|
1108
|
-
}, checked: formik.values.required }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label ml-2", children: "Required" })] }), _jsx("p", { className: "text-xs mt-2", children: "You won't be able to create an entry if this field is empty" }), isFormFieldValid(formik, "required") && (_jsx(Message, { severity: "error", text: (
|
|
1131
|
+
}, checked: formik.values.required }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label ml-2", children: "Required" })] }), _jsx("p", { className: "text-xs mt-2", children: "You won't be able to create an entry if this field is empty" }), isFormFieldValid(formik, "required") && (_jsx(Message, { severity: "error", text: (_45 = (_44 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _44 === void 0 ? void 0 : _44.required) === null || _45 === void 0 ? void 0 : _45.toString() }))] })), currentFields.includes("unique") && selectedType.value !== 'relation' && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(Checkbox, { name: "unique", onChange: function (e) {
|
|
1109
1132
|
formik.setFieldValue("unique", e.checked);
|
|
1110
1133
|
formik.setFieldValue("isUserKey", false);
|
|
1111
|
-
}, checked: formik.values.unique }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label ml-2", children: "Unique" })] }), _jsx("p", { className: "text-xs mt-2", children: "You won't be able to create an entry if there is an existing entry with identical content" }), isFormFieldValid(formik, "unique") && (_jsx(Message, { severity: "error", text: (
|
|
1134
|
+
}, checked: formik.values.unique }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label ml-2", children: "Unique" })] }), _jsx("p", { className: "text-xs mt-2", children: "You won't be able to create an entry if there is an existing entry with identical content" }), isFormFieldValid(formik, "unique") && (_jsx(Message, { severity: "error", text: (_47 = (_46 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _46 === void 0 ? void 0 : _46.unique) === null || _47 === void 0 ? void 0 : _47.toString() }))] })), currentFields.includes("index") && selectedType.value !== 'relation' && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(Checkbox, { name: "index", onChange: function (e) {
|
|
1112
1135
|
formik.setFieldValue("index", e.checked);
|
|
1113
|
-
}, checked: formik.values.index }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label ml-2", children: "Index" })] }), isFormFieldValid(formik, "index") && (_jsx(Message, { severity: "error", text: (
|
|
1136
|
+
}, checked: formik.values.index }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label ml-2", children: "Index" })] }), isFormFieldValid(formik, "index") && (_jsx(Message, { severity: "error", text: (_49 = (_48 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _48 === void 0 ? void 0 : _48.index) === null || _49 === void 0 ? void 0 : _49.toString() }))] })), currentFields.includes("private") && selectedType.value !== 'relation' && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(Checkbox, { name: "private", onChange: function (e) {
|
|
1114
1137
|
formik.setFieldValue("private", e.checked);
|
|
1115
|
-
}, checked: formik.values.private }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label ml-2", children: "Private" })] }), _jsx("p", { className: "text-xs mt-2", children: "This field will not show up in the API response" }), isFormFieldValid(formik, "private") && (_jsx(Message, { severity: "error", text: (
|
|
1138
|
+
}, checked: formik.values.private }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label ml-2", children: "Private" })] }), _jsx("p", { className: "text-xs mt-2", children: "This field will not show up in the API response" }), isFormFieldValid(formik, "private") && (_jsx(Message, { severity: "error", text: (_51 = (_50 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _50 === void 0 ? void 0 : _50.private) === null || _51 === void 0 ? void 0 : _51.toString() }))] })), currentFields.includes("encrypt") && selectedType.value !== 'relation' && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsxs("div", { className: "flex align-items-center gap-2", children: [_jsx(Checkbox, { name: "encrypt", onChange: function (e) {
|
|
1116
1139
|
formik.setFieldValue("encrypt", e.checked);
|
|
1117
1140
|
setEncryptState(e.checked);
|
|
1118
|
-
}, checked: formik.values.encrypt }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label", children: "Encrypt" })] }), isFormFieldValid(formik, "encrypt") && (_jsx(Message, { severity: "error", text: (
|
|
1141
|
+
}, checked: formik.values.encrypt }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label", children: "Encrypt" })] }), isFormFieldValid(formik, "encrypt") && (_jsx(Message, { severity: "error", text: (_53 = (_52 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _52 === void 0 ? void 0 : _52.encrypt) === null || _53 === void 0 ? void 0 : _53.toString() }))] })), currentFields.includes("isUserKey") && formik.values.unique && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsxs("div", { className: "flex align-items-center gap-2", children: [_jsx(Checkbox, { name: "isUserKey", onChange: function (e) {
|
|
1119
1142
|
formik.setFieldValue("isUserKey", e.checked);
|
|
1120
|
-
}, checked: formik.values.isUserKey }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label", children: "Is Userkey" })] }), _jsx("p", { className: "fieldSubTitle", children: "By selecting this option, you are setting this field as the model's user key. Any existing user key configuration will be overwritten" }), isFormFieldValid(formik, "isUserKey") && (_jsx(Message, { severity: "error", text: (
|
|
1143
|
+
}, checked: formik.values.isUserKey }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label", children: "Is Userkey" })] }), _jsx("p", { className: "fieldSubTitle", children: "By selecting this option, you are setting this field as the model's user key. Any existing user key configuration will be overwritten" }), isFormFieldValid(formik, "isUserKey") && (_jsx(Message, { severity: "error", text: (_55 = (_54 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _54 === void 0 ? void 0 : _54.isUserKey) === null || _55 === void 0 ? void 0 : _55.toString() }))] }))] }), formik.values.encrypt === true && (_jsxs("div", { className: "formgrid grid mt-2", children: [_jsx("div", { className: "md:col-6 sm:col-12", children: _jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "encryptionType", className: "form-field-label", children: "Encryption Type" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid, fieldName: "encryptionType", fieldNameId: "encryptionType", labelKey: "label", valueKey: "value", searchData: searchSelectionEncryptionType, existingData: formik.values.encryptionType }, "encryptionType"), isFormFieldValid(formik, "encryptionType") && (_jsx(Message, { severity: "error", text: (_57 = (_56 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _56 === void 0 ? void 0 : _56.encryptionType) === null || _57 === void 0 ? void 0 : _57.toString() }))] }) }), _jsx("div", { className: "md:col-6 sm:col-12", children: _jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "decryptWhen", className: "form-field-label", children: "Decrypt When" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid, fieldName: "decryptWhen", fieldNameId: "decryptWhen", labelKey: "label", valueKey: "value", searchData: searchSelectionDecryptWhen, existingData: formik.values.decryptWhen }, "decryptWhen"), isFormFieldValid(formik, "decryptWhen") && (_jsx(Message, { severity: "error", text: (_59 = (_58 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _58 === void 0 ? void 0 : _58.decryptWhen) === null || _59 === void 0 ? void 0 : _59.toString() }))] }) })] }))] })] }), _jsxs("div", { className: "flex gap-3", children: [_jsx("div", { children: _jsx(Button, { label: "Finish", size: "small", onClick: function () { return showError(); }, type: "submit" }) }), _jsx("div", { children: _jsx(Button, { label: "Cancel", size: "small", severity: "secondary", type: "reset", onClick: function () { return setVisiblePopup(false); }, outlined: true }) })] })] }) }) })] }) }), _jsx(Dialog, { visible: isBackPopupVisible, header: "Select Type", headerClassName: "text-center", modal: true, footer: function () { return (_jsxs("div", { className: "flex gap-3", children: [_jsx(Button, { label: "Yes", icon: "pi pi-check", size: "small", type: "reset", severity: "danger", autoFocus: true, onClick: function () {
|
|
1121
1144
|
formik.resetForm();
|
|
1122
1145
|
setIsBackPopupVisible(false);
|
|
1123
1146
|
setShowTypeFilter(true);
|