@solidstarters/solid-core-ui 1.1.6 → 1.1.8
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/auth/SolidChangeForcePassword.d.ts.map +1 -1
- package/dist/components/auth/SolidChangeForcePassword.js +7 -7
- package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
- package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidForgotPassword.js +9 -4
- package/dist/components/auth/SolidForgotPassword.js.map +1 -1
- package/dist/components/auth/SolidLogin.d.ts.map +1 -1
- package/dist/components/auth/SolidLogin.js +13 -6
- package/dist/components/auth/SolidLogin.js.map +1 -1
- package/dist/components/common/BackButton.d.ts +2 -0
- package/dist/components/common/BackButton.d.ts.map +1 -0
- package/dist/components/common/BackButton.js +17 -0
- package/dist/components/common/BackButton.js.map +1 -0
- package/dist/components/common/CancelButton.js +2 -2
- package/dist/components/common/CancelButton.js.map +1 -1
- package/dist/components/common/DropzonePlaceholder.d.ts.map +1 -1
- package/dist/components/common/DropzonePlaceholder.js +2 -1
- package/dist/components/common/DropzonePlaceholder.js.map +1 -1
- package/dist/components/common/FileReaderExt.d.ts +4 -0
- package/dist/components/common/FileReaderExt.d.ts.map +1 -0
- package/dist/components/common/FileReaderExt.js +15 -0
- package/dist/components/common/FileReaderExt.js.map +1 -0
- package/dist/components/common/GeneralSettings.d.ts +4 -0
- package/dist/components/common/GeneralSettings.d.ts.map +1 -0
- package/dist/components/common/GeneralSettings.js +139 -0
- package/dist/components/common/GeneralSettings.js.map +1 -0
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts.map +1 -1
- package/dist/components/common/SingleSelectAutoCompleteField.js +1 -1
- package/dist/components/common/SingleSelectAutoCompleteField.js.map +1 -1
- package/dist/components/common/SolidFormStepper.d.ts +2 -0
- package/dist/components/common/SolidFormStepper.d.ts.map +1 -0
- package/dist/components/common/SolidFormStepper.js +6 -0
- package/dist/components/common/SolidFormStepper.js.map +1 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts.map +1 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.js +2 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +6 -5
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.d.ts +2 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.js +4 -3
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.js.map +1 -1
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +83 -54
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.js +4 -4
- package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js +7 -7
- package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.js +7 -7
- package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.js +4 -4
- package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.js +4 -4
- package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js +2 -2
- package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.js +2 -2
- package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +11 -11
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +13 -13
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.js +2 -2
- package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js +4 -4
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.js +4 -4
- package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.js +2 -2
- package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js +7 -7
- package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +15 -14
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +2 -2
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +2 -2
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +99 -21
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +15 -11
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaData.js +6 -6
- package/dist/components/core/model/FieldMetaData.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js +189 -176
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/FieldSelector.d.ts.map +1 -1
- package/dist/components/core/model/FieldSelector.js +1 -1
- package/dist/components/core/model/FieldSelector.js.map +1 -1
- package/dist/components/core/model/ModelMetaData.d.ts.map +1 -1
- package/dist/components/core/model/ModelMetaData.js +55 -44
- package/dist/components/core/model/ModelMetaData.js.map +1 -1
- package/dist/components/core/module/CreateModule.d.ts.map +1 -1
- package/dist/components/core/module/CreateModule.js +98 -60
- package/dist/components/core/module/CreateModule.js.map +1 -1
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +18 -15
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
- package/dist/components/layout/user-profile-menu.js +3 -1
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/redux/api/solidEntityApi.d.ts +2 -0
- package/dist/redux/api/solidEntityApi.d.ts.map +1 -1
- package/dist/redux/api/solidEntityApi.js +10 -0
- package/dist/redux/api/solidEntityApi.js.map +1 -1
- package/dist/redux/api/solidSettingsApi.d.ts +9 -0
- package/dist/redux/api/solidSettingsApi.d.ts.map +1 -0
- package/dist/redux/api/solidSettingsApi.js +40 -0
- package/dist/redux/api/solidSettingsApi.js.map +1 -0
- package/package.json +1 -1
- package/src/components/auth/SolidChangeForcePassword.tsx +2 -3
- package/src/components/auth/SolidForgotPassword.tsx +9 -4
- package/src/components/auth/SolidLogin.tsx +21 -12
- package/src/components/common/BackButton.tsx +27 -0
- package/src/components/common/CancelButton.tsx +2 -2
- package/src/components/common/DropzonePlaceholder.tsx +11 -3
- package/src/components/common/FileReaderExt.tsx +18 -0
- package/src/components/common/GeneralSettings.tsx +286 -0
- package/src/components/common/SingleSelectAutoCompleteField.tsx +0 -1
- package/src/components/common/SolidFormStepper.tsx +12 -0
- package/src/components/core/common/LoadDynamicJsxComponent.tsx +2 -1
- package/src/components/core/common/SolidGlobalSearchElement.tsx +6 -2
- package/src/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.tsx +4 -4
- package/src/components/core/form/SolidFormView.tsx +201 -186
- package/src/components/core/form/fields/SolidBooleanField.tsx +3 -7
- package/src/components/core/form/fields/SolidDateField.tsx +2 -8
- package/src/components/core/form/fields/SolidDateTimeField.tsx +19 -24
- package/src/components/core/form/fields/SolidDecimalField.tsx +2 -7
- package/src/components/core/form/fields/SolidIntegerField.tsx +17 -22
- package/src/components/core/form/fields/SolidJsonField.tsx +15 -19
- package/src/components/core/form/fields/SolidLongTextField.tsx +19 -24
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +47 -51
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +47 -51
- package/src/components/core/form/fields/SolidRichTextField.tsx +3 -7
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +2 -7
- package/src/components/core/form/fields/SolidSelectionStaticField.tsx +20 -25
- package/src/components/core/form/fields/SolidShortTextField.tsx +18 -23
- package/src/components/core/form/fields/SolidTimeField.tsx +19 -24
- package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +51 -52
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +20 -25
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +6 -5
- package/src/components/core/list/SolidListView.tsx +118 -8
- package/src/components/core/model/CreateModel.tsx +68 -53
- package/src/components/core/model/FieldMetaData.tsx +16 -21
- package/src/components/core/model/FieldMetaDataForm.tsx +803 -895
- package/src/components/core/model/FieldSelector.tsx +10 -15
- package/src/components/core/model/ModelMetaData.tsx +373 -358
- package/src/components/core/module/CreateModule.tsx +327 -295
- package/src/components/core/users/CreateUser.tsx +175 -167
- package/src/components/layout/user-profile-menu.tsx +6 -1
- package/src/index.ts +6 -2
- package/src/redux/api/solidEntityApi.tsx +11 -0
- package/src/redux/api/solidSettingsApi.tsx +47 -0
|
@@ -366,39 +366,39 @@ var createValidationSchema = function (currentFields, selectedType, allFields, f
|
|
|
366
366
|
return Yup.object(schema);
|
|
367
367
|
};
|
|
368
368
|
var FieldMetaDataForm = function (_a) {
|
|
369
|
-
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
|
|
369
|
+
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;
|
|
370
370
|
var modelMetaData = _a.modelMetaData, fieldMetaData = _a.fieldMetaData, setFieldMetaData = _a.setFieldMetaData, allFields = _a.allFields, deleteModelFunction = _a.deleteModelFunction, setVisiblePopup = _a.setVisiblePopup;
|
|
371
371
|
var booleanOptions = ["false", "true"];
|
|
372
|
-
var
|
|
373
|
-
var
|
|
372
|
+
var _52 = useState(false), isBackPopupVisible = _52[0], setIsBackPopupVisible = _52[1];
|
|
373
|
+
var _53 = useState(false), showColumnName = _53[0], setShowColumnName = _53[1];
|
|
374
374
|
var pathname = usePathname();
|
|
375
375
|
var toast = useRef(null);
|
|
376
|
-
var
|
|
377
|
-
var
|
|
378
|
-
var
|
|
379
|
-
var
|
|
380
|
-
var
|
|
381
|
-
var
|
|
382
|
-
var
|
|
383
|
-
var
|
|
384
|
-
var
|
|
385
|
-
var
|
|
386
|
-
var
|
|
376
|
+
var _54 = useGetFieldDefaultMetaDataQuery(null), fieldDefaultMetaData = _54.data, isLoading = _54.isLoading, error = _54.error, refetch = _54.refetch;
|
|
377
|
+
var _55 = useState(fetchCurrentFields(fieldMetaData && fieldMetaData.type, fieldDefaultMetaData)), currentFields = _55[0], setCurrentFields = _55[1];
|
|
378
|
+
var _56 = useLazyGetMediaStorageProvidersQuery(), triggerGetMediaStorageProvider = _56[0], _57 = _56[1], MediaStorageProviderData = _57.data, isMediaStorageProviderFetching = _57.isFetching, MediaStorageProviderError = _57.error;
|
|
379
|
+
var _58 = useLazyGetmodulesQuery(), triggerGetModules = _58[0], _59 = _58[1], moduleData = _59.data, isModuleFetching = _59.isFetching, moduleError = _59.error;
|
|
380
|
+
var _60 = useLazyGetModelsQuery(), triggerGetModels = _60[0], _61 = _60[1], modelData = _61.data, ismodelFetching = _61.isFetching, modelError = _61.error;
|
|
381
|
+
var _62 = useState(), markdownText = _62[0], setMarkdownText = _62[1];
|
|
382
|
+
var _63 = useState(false), encryptState = _63[0], setEncryptState = _63[1];
|
|
383
|
+
var _64 = useState(fieldMetaData ? false : true), showTypeFilter = _64[0], setShowTypeFilter = _64[1];
|
|
384
|
+
var _65 = 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 = _65[0], setSelectedType = _65[1];
|
|
385
|
+
var _66 = useState((fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.computedFieldValueType) && { label: fieldMetaData.computedFieldValueType, value: fieldMetaData.computedFieldValueType }), selectedComputedFieldValueType = _66[0], setSelectedComputedFieldValueType = _66[1];
|
|
386
|
+
var _67 = useState((fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.selectionDynamicProvider) && { label: fieldMetaData.selectionDynamicProvider, value: fieldMetaData.selectionDynamicProvider }), selectionDynamicProvider = _67[0], setSelectionDynamicProvider = _67[1];
|
|
387
387
|
// const [externalIdProvider, setExternalIdProvider] = useState(fieldMetaData?.externalIdProvider && { label: fieldMetaData.externalIdProvider, value: fieldMetaData.externalIdProvider });
|
|
388
|
-
var
|
|
389
|
-
var
|
|
390
|
-
var
|
|
391
|
-
var
|
|
392
|
-
var
|
|
393
|
-
var
|
|
394
|
-
var
|
|
395
|
-
var
|
|
388
|
+
var _68 = 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 = _68[0], setSelectionStaticValues = _68[1];
|
|
389
|
+
var _69 = useState([]), filteredComputedFieldValueTypes = _69[0], setFilteredComputedFieldValueTypes = _69[1];
|
|
390
|
+
var _70 = useState([]), filteredSelectionDynamicProvider = _70[0], setFilteredSelectionDynamicProvider = _70[1];
|
|
391
|
+
var _71 = useState([]), ormTypeOptions = _71[0], setOrmTypeOptions = _71[1];
|
|
392
|
+
var _72 = useState(fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.ormType), selectedOrmType = _72[0], setSelectedOrmType = _72[1];
|
|
393
|
+
var _73 = useState([]), filteredExternalIdProvider = _73[0], setFilteredExternalIdProvider = _73[1];
|
|
394
|
+
var _74 = useState([]), filteredSelectionEncryptionType = _74[0], setFilteredSelectionEncryptionType = _74[1];
|
|
395
|
+
var _75 = useState([]), filteredSelectionDecryptWhen = _75[0], setFilteredSelectionDecryptWhen = _75[1];
|
|
396
396
|
var items = Array.from({ length: 100000 }).map(function (_, i) { return ({
|
|
397
397
|
label: "Item #".concat(i),
|
|
398
398
|
value: i,
|
|
399
399
|
}); });
|
|
400
400
|
var validationSchema = React.useMemo(function () { return createValidationSchema(currentFields, selectedType, allFields, fieldMetaData, encryptState); }, [currentFields, encryptState]);
|
|
401
|
-
var
|
|
401
|
+
var _76 = useState(false), typeSelected = _76[0], setTypeSelected = _76[1];
|
|
402
402
|
var searchMediaTypes = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
403
403
|
var query, suggestionData;
|
|
404
404
|
return __generator(this, function (_a) {
|
|
@@ -701,7 +701,7 @@ var FieldMetaDataForm = function (_a) {
|
|
|
701
701
|
{ label: "True", value: "true" },
|
|
702
702
|
{ label: "False", value: "false" },
|
|
703
703
|
];
|
|
704
|
-
var
|
|
704
|
+
var _77 = useState(fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.regexPattern), selectedPasswordPolicy = _77[0], setSelectedPasswordPolicy = _77[1];
|
|
705
705
|
var passwordPolicyOptions = [
|
|
706
706
|
{ label: 'Lowercase and Uppercase Alphabets Required', value: '^(?=.*[a-z])(?=.*[A-Z]).*$' },
|
|
707
707
|
{ label: 'Lowercase and Uppercase Alphabets and Numbers Required', value: '^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).*$' },
|
|
@@ -859,166 +859,179 @@ var FieldMetaDataForm = function (_a) {
|
|
|
859
859
|
else {
|
|
860
860
|
}
|
|
861
861
|
};
|
|
862
|
-
return (_jsxs("div", {
|
|
863
|
-
_jsxs("div", { className: "flex gap-3
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
_jsxs("
|
|
862
|
+
return (_jsxs("div", { children: [_jsx(Toast, { ref: toast }), _jsx("div", { children: _jsxs("form", { onSubmit: formik.handleSubmit, children: [_jsx("div", { className: "solid-field-metadata-form-header", children: pathname.includes('create') ?
|
|
863
|
+
_jsxs(_Fragment, { children: [_jsx("div", { className: "flex align-items-center gap-3", children: showTypeFilter === false ?
|
|
864
|
+
_jsxs(_Fragment, { children: [_jsx(Button, { text: true, icon: 'pi pi-arrow-left', size: "small", type: "button", "aria-label": "Back", className: 'max-w-2rem bg-primary-reverse text-color', onClick: function () {
|
|
865
|
+
if (!formik.values.displayName) {
|
|
866
|
+
setShowTypeFilter(true);
|
|
867
|
+
}
|
|
868
|
+
else {
|
|
869
|
+
setIsBackPopupVisible(true);
|
|
870
|
+
}
|
|
871
|
+
} }), _jsx("div", { className: "form-wrapper-title text-base", children: capitalize(modelMetaData === null || modelMetaData === void 0 ? void 0 : modelMetaData.displayName) })] })
|
|
872
|
+
:
|
|
873
|
+
_jsx("div", { className: "flex text-2xl font-bold align-items-center ml-4", style: { color: '#000' }, children: _jsxs("div", { className: "form-wrapper-title text-base", children: ["Model - ", capitalize(modelMetaData === null || modelMetaData === void 0 ? void 0 : modelMetaData.displayName)] }) }) }), _jsx("div", { className: "flex align-items-center gap-3 close-popup", children: _jsx(Button, { icon: "pi pi-times", rounded: true, text: true, "aria-label": "Cancel", type: "reset", size: "small", onClick: function () { return setVisiblePopup(false); }, className: 'max-w-2rem bg-primary-reverse text-color' }) })] })
|
|
874
|
+
:
|
|
875
|
+
_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex align-items-center gap-3", children: [!(fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id) &&
|
|
876
|
+
_jsx(Button, { text: true, icon: 'pi pi-arrow-left', size: "small", type: "button", "aria-label": "Back", className: 'max-w-2rem bg-primary-reverse text-color', onClick: function () {
|
|
877
|
+
if (!formik.values.displayName) {
|
|
878
|
+
setShowTypeFilter(true);
|
|
879
|
+
}
|
|
880
|
+
else {
|
|
881
|
+
setIsBackPopupVisible(true);
|
|
882
|
+
}
|
|
883
|
+
} }), fieldMetaData ?
|
|
884
|
+
_jsxs("div", { className: "form-wrapper-title text-base", children: [capitalize(modelMetaData === null || modelMetaData === void 0 ? void 0 : modelMetaData.displayName), " > ", capitalize(fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.displayName)] })
|
|
885
|
+
:
|
|
886
|
+
_jsxs("div", { className: "form-wrapper-title text-base", children: ["Add New Field to ", capitalize(modelMetaData === null || modelMetaData === void 0 ? void 0 : modelMetaData.displayName)] })] }), _jsx("div", { className: "flex align-items-center gap-3 close-popup", children: _jsx(Button, { icon: "pi pi-times", text: true, "aria-label": "Cancel", type: "reset", size: "small", onClick: function () { return setVisiblePopup(false); }, className: 'max-w-2rem bg-primary-reverse text-color' }) })] }) }), showTypeFilter === true ?
|
|
885
887
|
_jsx(FieldSelector, { handleTypeSelect: handleTypeSelect, modelMetaData: modelMetaData })
|
|
886
888
|
:
|
|
887
|
-
_jsx("div", { className: "field-popup-form", children: _jsx("div", { className: "p-d-flex p-jc-center creat-field-for form-dem", children: _jsxs("div", { className: "p-fluid", style: { position: 'relative' }, children: [_jsx("div", { className: "
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
_jsxs("div", { className: "field mt-
|
|
889
|
+
_jsx("div", { className: "field-popup-form", children: _jsx("div", { className: "p-d-flex p-jc-center creat-field-for form-dem", children: _jsxs("div", { className: "p-fluid", style: { position: 'relative' }, children: [_jsx("div", { className: "mb-3", children: _jsxs("div", { className: "form-wrapper-title", children: ["Add a new ", capitalize(selectedType.value), " Field"] }) }), _jsxs(TabView, { children: [_jsx(TabPanel, { header: "Basic Info", className: (formik.touched.hasOwnProperty("name") && formik.errors.hasOwnProperty("name")) || (formik.touched.hasOwnProperty("displayName") && formik.errors.hasOwnProperty("displayName")) || (formik.touched.hasOwnProperty("displayName") && formik.errors.hasOwnProperty("ormType")) ? "tab-error-heading" : "", children: _jsxs("div", { className: "formgrid grid", children: [currentFields.includes("displayName") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "displayName", className: "form-field-label", children: "Display Name" }), _jsx(InputText, { type: "text", disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id, id: "displayName", name: "displayName", onChange: function (e) {
|
|
890
|
+
formik.setFieldValue("displayName", e.target.value);
|
|
891
|
+
var _a = getSingularAndPlural(e.target.value), toCamelCase = _a.toCamelCase, toSnakeCase = _a.toSnakeCase, toPluralCamelCase = _a.toPluralCamelCase;
|
|
892
|
+
formik.setFieldValue("name", toCamelCase);
|
|
893
|
+
if (showColumnName) {
|
|
894
|
+
formik.setFieldValue("columnName", toSnakeCase);
|
|
895
|
+
}
|
|
896
|
+
}, value: formik.values.displayName, className: classNames("", {
|
|
897
|
+
"p-invalid": isFormFieldValid(formik, "displayName"),
|
|
898
|
+
}) }), isFormFieldValid(formik, "displayName") && (_jsx(Message, { severity: "error", text: (_d = (_c = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _c === void 0 ? void 0 : _c.displayName) === null || _d === void 0 ? void 0 : _d.toString() }))] })), currentFields.includes("name") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "name", className: "form-field-label", children: "Name" }), _jsx(InputText, { disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id, type: "text", id: "name", name: "name", onChange: formik.handleChange, value: formik.values.name, className: classNames("", {
|
|
899
|
+
"p-invalid": isFormFieldValid(formik, "name"),
|
|
900
|
+
}) }), isFormFieldValid(formik, "name") && (_jsx(Message, { severity: "error", text: (_f = (_e = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _e === void 0 ? void 0 : _e.name) === null || _f === void 0 ? void 0 : _f.toString() }))] })), currentFields.includes("description") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-4", children: [_jsx("label", { htmlFor: "description", className: "form-field-label", children: "Description" }), _jsx(InputTextarea, { "aria-describedby": "Description of your field", id: "description", name: "description", onChange: formik.handleChange, value: formik.values.description, rows: 5, cols: 30, className: classNames("", {
|
|
901
|
+
"p-invalid": isFormFieldValid(formik, "description"),
|
|
902
|
+
}) }), isFormFieldValid(formik, "description") && (_jsx(Message, { severity: "error", text: (_h = (_g = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _g === void 0 ? void 0 : _g.description) === null || _h === void 0 ? void 0 : _h.toString() }))] })), currentFields.includes("columnName") && (_jsxs("div", { className: "field col-6 mt-4", children: [_jsxs("div", { className: "flex align-items-center gap-2", children: [_jsx(Checkbox, { onChange: function (e) {
|
|
903
|
+
setShowColumnName(e.checked);
|
|
904
|
+
if (e.checked === true) {
|
|
905
|
+
var _a = getSingularAndPlural(formik.values.displayName), toCamelCase = _a.toCamelCase, toSnakeCase = _a.toSnakeCase, toPluralCamelCase = _a.toPluralCamelCase;
|
|
906
|
+
if (pathname.includes('create')) {
|
|
907
|
+
formik.setFieldValue("columnName", toSnakeCase);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}, checked: showColumnName }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label", children: "Set Column Name" })] }), showColumnName &&
|
|
911
|
+
_jsxs("div", { className: "field col-12 flex-flex-column gap-2 mt-4", children: [_jsx("label", { htmlFor: "columnName", className: "form-field-label", children: "Column Name" }), _jsx(InputText, { disabled: fieldMetaData === null || fieldMetaData === void 0 ? void 0 : fieldMetaData.id, type: "text", id: "columnName", name: "columnName", onChange: formik.handleChange, value: formik.values.columnName, className: classNames("", {
|
|
910
912
|
"p-invalid": isFormFieldValid(formik, "columnName"),
|
|
911
|
-
}) }), isFormFieldValid(formik, "columnName") && (_jsx(Message, { severity: "error", text: (_k = (_j = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _j === void 0 ? void 0 : _j.columnName) === null || _k === void 0 ? void 0 : _k.toString() }))] })] }))] }) }), _jsxs(TabPanel, { header: "Advance Config", children: [((_m = (_l = formik === null || formik === void 0 ? void 0 : formik.values) === null || _l === void 0 ? void 0 : _l.type) === null || _m === void 0 ? void 0 : _m.length) > 0 && (_jsxs("div", { className: "grid
|
|
913
|
+
}) }), isFormFieldValid(formik, "columnName") && (_jsx(Message, { severity: "error", text: (_k = (_j = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _j === void 0 ? void 0 : _j.columnName) === null || _k === void 0 ? void 0 : _k.toString() }))] })] }))] }) }), _jsxs(TabPanel, { header: "Advance Config", children: [((_m = (_l = formik === null || formik === void 0 ? void 0 : formik.values) === null || _l === void 0 ? void 0 : _l.type) === null || _m === void 0 ? void 0 : _m.length) > 0 && (_jsxs("div", { className: "formgrid grid", children: [currentFields.includes("length") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "length", className: "form-field-label", children: "Length" }), _jsx(InputNumber
|
|
914
|
+
// type="text"
|
|
915
|
+
, {
|
|
912
916
|
// type="text"
|
|
913
|
-
, {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
917
|
+
id: "length", name: "length", onValueChange: formik.handleChange, value: formik.values.length, className: classNames("", {
|
|
918
|
+
"p-invalid": isFormFieldValid(formik, "length"),
|
|
919
|
+
}) }), isFormFieldValid(formik, "length") && (_jsx(Message, { severity: "error", text: (_p = (_o = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _o === void 0 ? void 0 : _o.length) === null || _p === void 0 ? void 0 : _p.toString() }))] })), currentFields.includes("defaultValue") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "defaultValue", className: "form-field-label", children: "Default Value" }), (selectedType.value === "shortText" || selectedType.value === "longText" || selectedType.value === "richText" || selectedType.value === "json" || selectedType.value === "password" || selectedType.value === "selectionStatic") &&
|
|
920
|
+
_jsx(InputText, { type: "text", id: "defaultValue", name: "defaultValue", onChange: formik.handleChange, value: formik.values.defaultValue, className: classNames("", {
|
|
921
|
+
"p-invalid": isFormFieldValid(formik, "defaultValue"),
|
|
922
|
+
}) }), (selectedType.value === "float" || selectedType.value === "decimal") &&
|
|
923
|
+
_jsx(InputNumber, { id: "defaultValue", name: "defaultValue", minFractionDigits: 2, maxFractionDigits: 5, value: formik.values.defaultValue, onValueChange: function (e) { return formik.setFieldValue("defaultValue", e.value); }, className: classNames("", {
|
|
924
|
+
"p-invalid": isFormFieldValid(formik, "defaultValue"),
|
|
925
|
+
}) }), (selectedType.value === "int" || selectedType.value === "bigint") &&
|
|
926
|
+
_jsx(InputNumber, { id: "defaultValue", name: "defaultValue", value: formik.values.defaultValue, onValueChange: function (e) { return formik.setFieldValue("defaultValue", e.value); }, className: classNames("", {
|
|
927
|
+
"p-invalid": isFormFieldValid(formik, "defaultValue"),
|
|
928
|
+
}) }), selectedType.value === "boolean" &&
|
|
929
|
+
_jsx(SelectButton, { value: formik.values.defaultValue ? formik.values.defaultValue : "false", onChange: function (e) { return formik.setFieldValue("defaultValue", e.value); }, options: booleanOptions, className: classNames(" flex boolean-switch", {
|
|
930
|
+
"p-invalid": isFormFieldValid(formik, "defaultValue"),
|
|
931
|
+
}) }), (selectedType.value === "date" || selectedType.value === "datetime" || selectedType.value === "time") &&
|
|
932
|
+
_jsx(Calendar, { id: "defaultValue", name: "defaultValue", value: formik.values.defaultValue ? new Date(formik.values.defaultValue) : new Date(), onChange: function (e) { return formik.setFieldValue("defaultValue", e.value); }, showTime: formik.values.type === "datetime", timeOnly: formik.values.type === "time", dateFormat: "yy-mm-dd", hourFormat: "24" // 24-hour format for time
|
|
933
|
+
, className: classNames("", {
|
|
934
|
+
"p-invalid": isFormFieldValid(formik, "defaultValue"),
|
|
935
|
+
}) }), isFormFieldValid(formik, "defaultValue") && (_jsx(Message, { severity: "error", text: (_r = (_q = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _q === void 0 ? void 0 : _q.defaultValue) === null || _r === void 0 ? void 0 : _r.toString() }))] })), currentFields.includes("mediaTypes") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "mediaTypes", className: "form-field-label", children: "Media Type" }), isFormFieldValid(formik, "mediaTypes") && (_jsx(Message, { severity: "error", text: (_t = (_s = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _s === void 0 ? void 0 : _s.mediaTypes) === null || _t === void 0 ? void 0 : _t.toString() })), _jsx(MultiSelect, { value: formik.values.mediaTypes, onChange: function (e) { return formik.setFieldValue("mediaTypes", e.value); }, options: mediaTypesOptions, optionLabel: "label", placeholder: "Select Media Types", maxSelectedLabels: 3, display: "chip", className: "" })] })), currentFields.includes("mediaMaxSizeKb") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "mediaMaxSizeKb", className: "form-field-label", children: "Media Max Size (Mb)" }), _jsx(InputNumber, { id: "mediaMaxSizeKb", name: "mediaMaxSizeKb", onValueChange: formik.handleChange, value: formik.values.mediaMaxSizeKb, className: classNames("", {
|
|
936
|
+
"p-invalid": isFormFieldValid(formik, "mediaMaxSizeKb"),
|
|
937
|
+
}) }), isFormFieldValid(formik, "mediaMaxSizeKb") && (_jsx(Message, { severity: "error", text: (_v = (_u = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _u === void 0 ? void 0 : _u.mediaMaxSizeKb) === null || _v === void 0 ? void 0 : _v.toString() }))] })), currentFields.includes("mediaStorageProviderId") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2 mt-3", children: [_jsx("label", { htmlFor: "mediaStorageProviderId", className: "form-field-label", children: "Media Storage Provider" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid, relationField: true, fieldName: "mediaStorageProvider", fieldNameId: "mediaStorageProviderId", labelKey: "name", valueKey: "value", searchData: searchMediaStorageProvIderId, existingData: formik.values.mediaStorageProvider }, "mediaStorageProviderId"), isFormFieldValid(formik, "mediaStorageProvider") && (_jsx(Message, { severity: "error", text: (_x = (_w = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _w === void 0 ? void 0 : _w.mediaStorageProviderId) === null || _x === void 0 ? void 0 : _x.toString() }))] })), currentFields.includes("mediaEmbedded") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "mediaEmbedded", className: "form-field-label", children: "Media Embedded" }), _jsx(SelectButton, { value: formik.values.mediaEmbedded,
|
|
938
|
+
// onChange={formik.handleChange}
|
|
939
|
+
onChange: function (e) {
|
|
940
|
+
formik.setFieldValue("mediaEmbedded", e.value);
|
|
941
|
+
}, options: booleanOptions, className: classNames(" flex boolean-switch", {
|
|
942
|
+
"p-invalid": isFormFieldValid(formik, "mediaEmbedded"),
|
|
943
|
+
}) }), 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", 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) {
|
|
944
|
+
return formik.setFieldValue("relationType", e.value);
|
|
945
|
+
}, className: classNames(" flex boolean-switch", {
|
|
946
|
+
"p-invalid": isFormFieldValid(formik, "relationType"),
|
|
947
|
+
}), 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", 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) {
|
|
948
|
+
return formik.setFieldValue("relationCascade", e.value);
|
|
949
|
+
}, placeholder: "Cascade", className: classNames("small-input p-inputtext-sm w-full", {
|
|
950
|
+
"p-invalid": isFormFieldValid(formik, "relationCascade"),
|
|
951
|
+
}) }), isFormFieldValid(formik, "relationCascade") && (_jsx(Message, { severity: "error", text: (_3 = (_2 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _2 === void 0 ? void 0 : _2.relationCascade) === null || _3 === void 0 ? void 0 : _3.toString() }))] })), currentFields.includes("relationModelFieldName") && formik.values.relationType === "many-to-many" && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "relationModelFieldName", className: "form-field-label", children: "Relation Model Field Name" }), _jsx(InputText, { type: "text", id: "relationModelFieldName", name: "relationModelFieldName", onChange: formik.handleChange, value: formik.values.relationModelFieldName, className: classNames("", {
|
|
952
|
+
"p-invalid": isFormFieldValid(formik, "relationModelFieldName"),
|
|
953
|
+
}) }), isFormFieldValid(formik, "relationModelFieldName") && (_jsx(Message, { severity: "error", text: (_5 = (_4 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _4 === void 0 ? void 0 : _4.relationModelFieldName) === null || _5 === void 0 ? void 0 : _5.toString() }))] })), currentFields.includes("relationCreateInverse") && formik.values.relationType === "many-to-many" && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "relationCreateInverse", className: "form-field-label", children: "Relation Create Inverse" }), _jsx(Dropdown, { id: "relationCreateInverse", name: "relationCreateInverse", value: formik.values.relationCreateInverse, options: relationCreateInverses, onChange: function (e) {
|
|
954
|
+
return formik.setFieldValue("relationCreateInverse", e.value);
|
|
955
|
+
}, placeholder: "Select a Data Source", className: classNames("", {
|
|
956
|
+
"p-invalid": isFormFieldValid(formik, "relationCreateInverse"),
|
|
957
|
+
}) }), isFormFieldValid(formik, "relationCreateInverse") && (_jsx(Message, { severity: "error", text: (_7 = (_6 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _6 === void 0 ? void 0 : _6.relationCreateInverse) === null || _7 === void 0 ? void 0 : _7.toString() }))] })), currentFields.includes("relationModelModuleName") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "relationModelModuleName", className: "form-field-label", children: "Relation Model Module Name" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid, fieldName: "relationModelModuleName", fieldNameId: "relationModelModuleName", labelKey: "name", valueKey: "name", searchData: searchRelationModelModuleNames, existingData: formik.values.relationModelModuleName, additionalAction: function (e) { return formik.setFieldValue("relationModelSingularName", ""); } }, "relationModelModuleName"), isFormFieldValid(formik, "relationModelModuleName") && (_jsx(Message, { severity: "error", text: (_9 = (_8 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _8 === void 0 ? void 0 : _8.relationModelModuleName) === null || _9 === void 0 ? void 0 : _9.toString() }))] })), currentFields.includes("relationModelSingularName") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "relationModelSingularName", className: "form-field-label", children: "Relation Model Singular Name" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid, fieldName: "relationModelSingularName", fieldNameId: "relationModelSingularName", labelKey: "displayName", valueKey: "singularName", searchData: searchRelationModelSingularNames, existingData: formik.values.relationModelSingularName }, "relationModelSingularName"), isFormFieldValid(formik, "relationModelSingularName") && (_jsx(Message, { severity: "error", text: (_11 = (_10 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _10 === void 0 ? void 0 : _10.relationModelSingularName) === null || _11 === void 0 ? void 0 : _11.toString() }))] })), currentFields.includes("selectionDynamicProvider") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "selectionDynamicProvider", className: "form-field-label", children: "Selection Dynamic Provider" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid,
|
|
958
|
+
// relationField={false}
|
|
959
|
+
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: (_13 = (_12 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _12 === void 0 ? void 0 : _12.selectionDynamicProvider) === null || _13 === void 0 ? void 0 : _13.toString() }))] })), currentFields.includes("selectionValueType") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "selectionValueType", className: "form-field-label", children: "Selection Value Type" }), _jsx(Dropdown, { id: "selectionValueType", name: "selectionValueType", value: formik.values.selectionValueType, options: selctionValueTypes, onChange: function (e) {
|
|
960
|
+
return formik.setFieldValue("selectionValueType", e.value);
|
|
961
|
+
}, placeholder: "Select a Data Source", className: classNames("", {
|
|
962
|
+
"p-invalid": isFormFieldValid(formik, "selectionValueType"),
|
|
963
|
+
}) }), isFormFieldValid(formik, "selectionValueType") && (_jsx(Message, { severity: "error", text: (_15 = (_14 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _14 === void 0 ? void 0 : _14.selectionValueType) === null || _15 === void 0 ? void 0 : _15.toString() }))] })), currentFields.includes("selectionStaticValues") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", 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: (_17 = (_16 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _16 === void 0 ? void 0 : _16.selectionStaticValues) === null || _17 === void 0 ? void 0 : _17.toString() }))] })), currentFields.includes("computedFieldValueType") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", 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: "small-input", onChange: function (e) {
|
|
964
|
+
setSelectedComputedFieldValueType(e.value);
|
|
965
|
+
formik.setFieldValue("computedFieldValueType", e.value.value);
|
|
966
|
+
} }), isFormFieldValid(formik, "computedFieldValueType") && (_jsx(Message, { severity: "error", text: (_19 = (_18 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _18 === void 0 ? void 0 : _18.computedFieldValueType) === null || _19 === void 0 ? void 0 : _19.toString() }))] })), currentFields.includes("computedFieldValueProvider") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "computedFieldValueProvider", className: "form-field-label", children: "Computed Field Provider" }), _jsx(SingleSelectAutoCompleteField, { formik: formik, isFormFieldValid: isFormFieldValid,
|
|
967
|
+
// relationField={false}
|
|
968
|
+
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: (_21 = (_20 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _20 === void 0 ? void 0 : _20.computedFieldValueProvider) === null || _21 === void 0 ? void 0 : _21.toString() }))] })), currentFields.includes("selectionDynamicProviderCtxt") && (
|
|
969
|
+
// {/* {markdownText &&
|
|
970
|
+
// <div className="md:col-12 sm:col-12">
|
|
971
|
+
// <div className="field col-6 flex-flex-column gap-2">
|
|
972
|
+
// <label htmlFor="name" className="form-field-label">
|
|
973
|
+
// Markdown
|
|
974
|
+
// </label>
|
|
975
|
+
// <MarkdownViewer data={markdownText}></MarkdownViewer>
|
|
976
|
+
// </div>
|
|
977
|
+
// </div>
|
|
978
|
+
// } */}
|
|
979
|
+
_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: (_23 = (_22 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _22 === void 0 ? void 0 : _22.selectionDynamicProviderCtxt) === null || _23 === void 0 ? void 0 : _23.toString() }))] })
|
|
980
|
+
// {/* {currentFields.includes("markdown") && ( */}
|
|
981
|
+
), 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: (_25 = (_24 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _24 === void 0 ? void 0 : _24.computedFieldValueProviderCtxt) === null || _25 === void 0 ? void 0 : _25.toString() }))] }))] })), (currentFields.includes("regexPattern") || currentFields.includes("min") || currentFields.includes("max") || currentFields.includes("ormType")) && ormTypeOptions &&
|
|
982
|
+
_jsxs(_Fragment, { children: [_jsx("p", { className: "form-wrapper-heading text-base", children: "Validations" }), _jsxs("div", { className: "formgrid grid", children: [(currentFields.includes("regexPattern") && selectedType.value === "password") &&
|
|
983
|
+
_jsx(_Fragment, { children: _jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "regexPattern", className: "form-field-label", children: "Password Policy" }), _jsx(Dropdown, { value: selectedPasswordPolicy, onChange: function (e) {
|
|
984
|
+
setSelectedPasswordPolicy(e.value);
|
|
985
|
+
if (e.value !== "custom") {
|
|
986
|
+
formik.setFieldValue('regexPattern', e.value);
|
|
987
|
+
}
|
|
988
|
+
}, options: passwordPolicyOptions, optionLabel: "label", placeholder: "Select a Password Policy",
|
|
989
|
+
// className="w-full md:w-14rem"
|
|
990
|
+
className: "", checkmark: true, highlightOnSelect: false })] }) }), currentFields.includes("regexPattern") && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "field col-6 flex-flex-column gap-2", 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("", {
|
|
991
|
+
"p-invalid": isFormFieldValid(formik, "regexPattern"),
|
|
992
|
+
}) }), isFormFieldValid(formik, "regexPattern") && (_jsx(Message, { severity: "error", text: (_27 = (_26 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _26 === void 0 ? void 0 : _26.regexPattern) === null || _27 === void 0 ? void 0 : _27.toString() }))] }), currentFields.includes("regexPattern") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", 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("", {
|
|
993
|
+
"p-invalid": isFormFieldValid(formik, "regexPatternNotMatchingErrorMsg"),
|
|
994
|
+
}) }), isFormFieldValid(formik, "regexPatternNotMatchingErrorMsg") && (_jsx(Message, { severity: "error", text: (_29 = (_28 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _28 === void 0 ? void 0 : _28.regexPatternNotMatchingErrorMsg) === null || _29 === void 0 ? void 0 : _29.toString() }))] }))] })), (currentFields.includes("min") || currentFields.includes("max")) &&
|
|
995
|
+
_jsxs(_Fragment, { children: [currentFields.includes("min") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "min", className: "form-field-label", children: "Min (Characters Allowed)" }), (selectedType.value === "int" ||
|
|
996
|
+
selectedType.value === "decimal" ||
|
|
997
|
+
selectedType.value === "shortText" ||
|
|
998
|
+
selectedType.value === "decimal" ||
|
|
999
|
+
selectedType.value === "longText" ||
|
|
1000
|
+
selectedType.value === "richText" ||
|
|
1001
|
+
selectedType.value === "password" ||
|
|
1002
|
+
selectedType.value === "json") &&
|
|
1003
|
+
_jsx(InputNumber, { id: "min", name: "min", onValueChange: formik.handleChange, value: formik.values.min, className: classNames("", {
|
|
1004
|
+
"p-invalid": isFormFieldValid(formik, "min"),
|
|
1005
|
+
}) }), isFormFieldValid(formik, "min") && (_jsx(Message, { severity: "error", text: (_31 = (_30 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _30 === void 0 ? void 0 : _30.min) === null || _31 === void 0 ? void 0 : _31.toString() }))] })), currentFields.includes("max") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "max", className: "form-field-label", children: "Max (Character allowed)" }), (selectedType.value === "int" ||
|
|
1006
|
+
selectedType.value === "decimal" ||
|
|
1007
|
+
selectedType.value === "shortText" ||
|
|
1008
|
+
selectedType.value === "decimal" ||
|
|
1009
|
+
selectedType.value === "longText" ||
|
|
1010
|
+
selectedType.value === "richText" ||
|
|
1011
|
+
selectedType.value === "password" ||
|
|
1012
|
+
selectedType.value === "json") &&
|
|
1013
|
+
_jsx(InputNumber, { id: "max", name: "max", onValueChange: formik.handleChange, value: formik.values.max, className: classNames("", {
|
|
1014
|
+
"p-invalid": isFormFieldValid(formik, "max"),
|
|
1015
|
+
}) }), isFormFieldValid(formik, "max") && (_jsx(Message, { severity: "error", text: (_33 = (_32 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _32 === void 0 ? void 0 : _32.max) === null || _33 === void 0 ? void 0 : _33.toString() }))] }))] }), currentFields.includes("ormType") && (_jsx("div", { className: "md:col-12 sm:col-12", children: ormTypeOptions && ormTypeOptions.length > 1 &&
|
|
1016
|
+
_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsx("label", { htmlFor: "ormType", className: "form-field-label", children: "Type" }), _jsx("div", { className: "ormTypeflex", children: ormTypeOptions && ormTypeOptions.map(function (ormType) {
|
|
1002
1017
|
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) {
|
|
1003
1018
|
formik.setFieldValue("ormType", e.value);
|
|
1004
1019
|
setSelectedOrmType(e.value);
|
|
1005
1020
|
}, 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) }));
|
|
1006
|
-
}) }), isFormFieldValid(formik, "ormType") && (_jsx(Message, { severity: "error", text: (_35 = (_34 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _34 === void 0 ? void 0 : _34.ormType) === null || _35 === void 0 ? void 0 : _35.toString() }))] }) }))] })] }), _jsx("
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
formik.setFieldValue("isUserKey", e.checked);
|
|
1021
|
-
}, checked: formik.values.isUserKey }), _jsx("label", { htmlFor: "ingredient1", className: "form-label form-field-label ml-2", children: "Is Userkey" })] }), _jsx("p", { className: "fieldSubTitle", children: "If userkey already then it will be replaced with this key" }), isFormFieldValid(formik, "isUserKey") && (_jsx(Message, { severity: "error", text: (_49 = (_48 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _48 === void 0 ? void 0 : _48.isUserKey) === null || _49 === void 0 ? void 0 : _49.toString() }))] }) }))] }), formik.values.encrypt === true && (_jsxs("div", { className: "grid p-nogutter mt-2", children: [_jsx("div", { className: "md:col-6 sm:col-12", children: _jsxs("div", { className: "field", children: [_jsx("label", { htmlFor: "encryptionType", className: "form-label 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: (_51 = (_50 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _50 === void 0 ? void 0 : _50.encryptionType) === null || _51 === void 0 ? void 0 : _51.toString() }))] }) }), _jsx("div", { className: "md:col-6 sm:col-12", children: _jsxs("div", { className: "field", children: [_jsx("label", { htmlFor: "decryptWhen", className: "form-label 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: (_53 = (_52 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _52 === void 0 ? void 0 : _52.decryptWhen) === null || _53 === void 0 ? void 0 : _53.toString() }))] }) })] }))] })] }), _jsxs("div", { className: "flex gap-3 justify-content-between", children: [_jsx("div", { className: "flex align-items-center gap-3 mt-3", children: _jsx(Button, { label: "Cancel", size: "small", severity: "secondary", type: "reset", onClick: function () { return setVisiblePopup(false); }, outlined: true, className: "small-button" }) }), _jsx("div", { className: "flex align-items-center gap-3 mt-3", children: _jsx(Button, { label: "Finish", size: "small", onClick: function () { return showError(); }, type: "submit", className: "small-button" }) })] })] }) }) })] }) }), _jsx(Dialog, { visible: isBackPopupVisible, header: "Select Type", headerClassName: "text-center", modal: true, footer: function () { return (_jsxs("div", { className: "flex justify-content-center", children: [_jsx(Button, { label: "Yes", icon: "pi pi-check", className: 'small-button', type: "reset", severity: "danger", autoFocus: true, onClick: function () {
|
|
1021
|
+
}) }), isFormFieldValid(formik, "ormType") && (_jsx(Message, { severity: "error", text: (_35 = (_34 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _34 === void 0 ? void 0 : _34.ormType) === null || _35 === void 0 ? void 0 : _35.toString() }))] }) }))] })] }), _jsx("p", { className: "form-wrapper-heading text-base", children: "Settings" }), _jsxs("div", { className: "formgrid grid", children: [currentFields.includes("required") && (_jsxs("div", { className: "field col-6 flex-flex-column gap-2", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(Checkbox, { name: "required", onChange: function (e) {
|
|
1022
|
+
formik.setFieldValue("required", e.checked);
|
|
1023
|
+
}, 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: (_37 = (_36 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _36 === void 0 ? void 0 : _36.required) === null || _37 === void 0 ? void 0 : _37.toString() }))] })), currentFields.includes("unique") && (_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) {
|
|
1024
|
+
formik.setFieldValue("unique", e.checked);
|
|
1025
|
+
}, 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: (_39 = (_38 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _38 === void 0 ? void 0 : _38.unique) === null || _39 === void 0 ? void 0 : _39.toString() }))] })), currentFields.includes("index") && (_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) {
|
|
1026
|
+
formik.setFieldValue("index", e.checked);
|
|
1027
|
+
}, checked: formik.values.index }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label ml-2", children: "Index" })] }), isFormFieldValid(formik, "index") && (_jsx(Message, { severity: "error", text: (_41 = (_40 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _40 === void 0 ? void 0 : _40.index) === null || _41 === void 0 ? void 0 : _41.toString() }))] })), currentFields.includes("private") && (_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) {
|
|
1028
|
+
formik.setFieldValue("private", e.checked);
|
|
1029
|
+
}, 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: (_43 = (_42 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _42 === void 0 ? void 0 : _42.private) === null || _43 === void 0 ? void 0 : _43.toString() }))] })), currentFields.includes("encrypt") && (_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) {
|
|
1030
|
+
formik.setFieldValue("encrypt", e.checked);
|
|
1031
|
+
setEncryptState(e.checked);
|
|
1032
|
+
}, checked: formik.values.encrypt }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label", children: "Encrypt" })] }), isFormFieldValid(formik, "encrypt") && (_jsx(Message, { severity: "error", text: (_45 = (_44 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _44 === void 0 ? void 0 : _44.encrypt) === null || _45 === void 0 ? void 0 : _45.toString() }))] })), currentFields.includes("isUserKey") && (_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) {
|
|
1033
|
+
formik.setFieldValue("isUserKey", e.checked);
|
|
1034
|
+
}, checked: formik.values.isUserKey }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label", children: "Is Userkey" })] }), _jsx("p", { className: "fieldSubTitle", children: "If userkey already then it will be replaced with this key" }), isFormFieldValid(formik, "isUserKey") && (_jsx(Message, { severity: "error", text: (_47 = (_46 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _46 === void 0 ? void 0 : _46.isUserKey) === null || _47 === void 0 ? void 0 : _47.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: (_49 = (_48 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _48 === void 0 ? void 0 : _48.encryptionType) === null || _49 === void 0 ? void 0 : _49.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: (_51 = (_50 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _50 === void 0 ? void 0 : _50.decryptWhen) === null || _51 === void 0 ? void 0 : _51.toString() }))] }) })] }))] })] }), _jsxs("div", { className: "flex gap-3 justify-content-between", children: [_jsx("div", { className: "flex align-items-center gap-3 mt-3", children: _jsx(Button, { label: "Cancel", size: "small", severity: "secondary", type: "reset", onClick: function () { return setVisiblePopup(false); }, outlined: true, className: "small-button" }) }), _jsx("div", { className: "flex align-items-center gap-3 mt-3", children: _jsx(Button, { label: "Finish", size: "small", onClick: function () { return showError(); }, type: "submit", className: "small-button" }) })] })] }) }) })] }) }), _jsx(Dialog, { visible: isBackPopupVisible, header: "Select Type", headerClassName: "text-center", modal: true, footer: function () { return (_jsxs("div", { className: "flex justify-content-center", children: [_jsx(Button, { label: "Yes", icon: "pi pi-check", className: 'small-button', type: "reset", severity: "danger", autoFocus: true, onClick: function () {
|
|
1022
1035
|
formik.resetForm();
|
|
1023
1036
|
setIsBackPopupVisible(false);
|
|
1024
1037
|
setShowTypeFilter(true);
|