@solidxai/core-ui 0.1.16-beta.1 → 0.1.17-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/components/auth/AuthLayout.d.ts.map +1 -1
  2. package/dist/components/auth/AuthLayout.js +15 -14
  3. package/dist/components/auth/AuthLayout.js.map +1 -1
  4. package/dist/components/auth/AuthLayout.tsx +35 -34
  5. package/dist/components/common/SettingsComponent.module.css +89 -0
  6. package/dist/components/common/SolidAdmin.js +2 -2
  7. package/dist/components/common/SolidAdmin.js.map +1 -1
  8. package/dist/components/common/SolidAdmin.tsx +2 -2
  9. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js +1 -1
  10. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js.map +1 -1
  11. package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.tsx +2 -2
  12. package/dist/components/core/card/CardItem.d.ts.map +1 -1
  13. package/dist/components/core/card/CardItem.js +1 -1
  14. package/dist/components/core/card/CardItem.js.map +1 -1
  15. package/dist/components/core/card/CardItem.tsx +4 -1
  16. package/dist/components/core/card/SolidCardView.js +1 -1
  17. package/dist/components/core/card/SolidCardView.js.map +1 -1
  18. package/dist/components/core/card/SolidCardView.tsx +1 -1
  19. package/dist/components/core/card/SolidCardViewConfigure.js +1 -1
  20. package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
  21. package/dist/components/core/card/SolidCardViewConfigure.tsx +1 -1
  22. package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
  23. package/dist/components/core/kanban/KanbanCard.js +2 -2
  24. package/dist/components/core/kanban/KanbanCard.js.map +1 -1
  25. package/dist/components/core/kanban/KanbanCard.tsx +5 -2
  26. package/dist/components/core/kanban/SolidKanbanView.js +1 -1
  27. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  28. package/dist/components/core/kanban/SolidKanbanView.tsx +1 -1
  29. package/dist/components/core/kanban/SolidKanbanViewConfigure.js +1 -1
  30. package/dist/components/core/kanban/SolidKanbanViewConfigure.js.map +1 -1
  31. package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +1 -1
  32. package/dist/components/core/list/SolidListView.js +6 -6
  33. package/dist/components/core/list/SolidListView.js.map +1 -1
  34. package/dist/components/core/list/SolidListView.tsx +4 -4
  35. package/dist/components/core/list/SolidListViewConfigure.js +1 -1
  36. package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
  37. package/dist/components/core/list/SolidListViewConfigure.tsx +1 -1
  38. package/dist/components/core/locales/SolidLocale.d.ts.map +1 -1
  39. package/dist/components/core/locales/SolidLocale.js +1 -1
  40. package/dist/components/core/locales/SolidLocale.js.map +1 -1
  41. package/dist/components/core/locales/SolidLocale.tsx +1 -0
  42. package/dist/components/core/locales/solid-locale.css +9 -0
  43. package/dist/components/core/model/FieldMetaData.js +1 -1
  44. package/dist/components/core/model/FieldMetaData.js.map +1 -1
  45. package/dist/components/core/model/FieldMetaData.tsx +1 -1
  46. package/dist/components/core/model/FieldMetaDataForm.css +60 -0
  47. package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
  48. package/dist/components/core/model/FieldMetaDataForm.js +47 -36
  49. package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
  50. package/dist/components/core/model/FieldMetaDataForm.tsx +59 -40
  51. package/dist/components/core/model/ModelMetaData.js +1 -1
  52. package/dist/components/core/model/ModelMetaData.js.map +1 -1
  53. package/dist/components/core/model/ModelMetaData.tsx +1 -1
  54. package/dist/components/core/module/CreateModule.d.ts.map +1 -1
  55. package/dist/components/core/module/CreateModule.js +34 -21
  56. package/dist/components/core/module/CreateModule.js.map +1 -1
  57. package/dist/components/core/module/CreateModule.tsx +59 -21
  58. package/dist/components/core/module/ModuleMetadataExplorer.css +72 -2
  59. package/dist/components/core/tree/SolidTreeView.js +2 -2
  60. package/dist/components/core/tree/SolidTreeView.js.map +1 -1
  61. package/dist/components/core/tree/SolidTreeView.tsx +2 -2
  62. package/dist/components/core/users/CreateUserRole.js +1 -1
  63. package/dist/components/core/users/CreateUserRole.js.map +1 -1
  64. package/dist/components/core/users/CreateUserRole.tsx +1 -1
  65. package/dist/components/layout/AdminTopHeader.d.ts.map +1 -1
  66. package/dist/components/layout/AdminTopHeader.js +2 -1
  67. package/dist/components/layout/AdminTopHeader.js.map +1 -1
  68. package/dist/components/layout/AdminTopHeader.tsx +2 -1
  69. package/dist/components/layout/AppSidebar.d.ts.map +1 -1
  70. package/dist/components/layout/AppSidebar.js +16 -1
  71. package/dist/components/layout/AppSidebar.js.map +1 -1
  72. package/dist/components/layout/AppSidebar.tsx +37 -9
  73. package/dist/resources/images/solidx-logo/solidx-logo-dark.png +0 -0
  74. package/dist/resources/images/solidx-logo/solidx-logo-light.png +0 -0
  75. package/dist/resources/solid-custom.css +67 -40
  76. package/dist/resources/solid-tailwind-generated.css +1 -1
  77. package/dist/resources/themes/solid-dark-enterprise/theme.css +2 -2
  78. package/dist/resources/themes/solid-dark-modern/theme.css +2 -2
  79. package/dist/resources/themes/solid-light-enterprise/theme.css +2 -2
  80. package/dist/resources/themes/solid-light-modern/theme.css +2 -2
  81. package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.css +289 -0
  82. package/package.json +1 -1
@@ -102,6 +102,55 @@
102
102
  margin: 0;
103
103
  }
104
104
 
105
+ .solid-field-settings-grid {
106
+ display: grid;
107
+ grid-template-columns: repeat(2, minmax(0, 1fr));
108
+ gap: 1rem 1.25rem;
109
+ align-items: stretch;
110
+ }
111
+
112
+ .solid-field-settings-item {
113
+ display: flex;
114
+ min-width: 0;
115
+ flex-direction: column;
116
+ gap: 0.5rem;
117
+ }
118
+
119
+ .solid-field-settings-item .fieldSubTitle,
120
+ .solid-field-settings-item .text-xs {
121
+ margin-top: 0;
122
+ }
123
+
124
+ .solid-field-relation-type-control {
125
+ align-self: stretch;
126
+ }
127
+
128
+ .solid-field-relation-type-control .solid-segmented-item {
129
+ flex: 1 1 0;
130
+ min-width: 0;
131
+ padding-inline: 0.75rem;
132
+ white-space: normal;
133
+ line-height: 1.15;
134
+ }
135
+
136
+ .solid-field-selection-static-row {
137
+ display: grid;
138
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
139
+ align-items: center;
140
+ gap: 0.5rem;
141
+ }
142
+
143
+ .solid-field-selection-static-row .solid-standard-input {
144
+ min-width: 0;
145
+ }
146
+
147
+ .solid-field-selection-static-row .solid-btn {
148
+ width: 2.125rem;
149
+ min-width: 2.125rem;
150
+ height: 2.125rem;
151
+ padding: 0;
152
+ }
153
+
105
154
  .solid-field-form-actions {
106
155
  display: flex;
107
156
  align-items: center;
@@ -215,3 +264,14 @@ html.dark .solid-field-form-shell .solid-file-icon-btn.is-danger:hover:not(:disa
215
264
  width: 100%;
216
265
  }
217
266
  }
267
+
268
+ @media (max-width: 380px) {
269
+ .solid-field-settings-grid {
270
+ grid-template-columns: 1fr;
271
+ }
272
+
273
+ .solid-field-relation-type-control .solid-segmented-item {
274
+ padding-inline: 0.5rem;
275
+ font-size: 0.75rem;
276
+ }
277
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"FieldMetaDataForm.d.ts","sourceRoot":"","sources":["../../../../src/components/core/model/FieldMetaDataForm.tsx"],"names":[],"mappings":"AAkCA,OAAO,yBAAyB,CAAC;AAs2BjC,QAAA,MAAM,iBAAiB,4VAoBpB,GAAG,4CA2qFL,CAAC;AAGF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"FieldMetaDataForm.d.ts","sourceRoot":"","sources":["../../../../src/components/core/model/FieldMetaDataForm.tsx"],"names":[],"mappings":"AAkCA,OAAO,yBAAyB,CAAC;AAs2BjC,QAAA,MAAM,iBAAiB,4VAoBpB,GAAG,4CA8rFL,CAAC;AAGF,eAAe,iBAAiB,CAAC"}
@@ -186,7 +186,7 @@ function TabView(_a) {
186
186
  value: panel.props.header,
187
187
  label: panel.props.header,
188
188
  hasError: (_a = panel.props.className) === null || _a === void 0 ? void 0 : _a.includes("tab-error-heading"),
189
- content: (_jsx("div", { className: panel.props.className, children: panel.props.children })),
189
+ content: (_jsx("div", { children: panel.props.children })),
190
190
  });
191
191
  });
192
192
  return (_jsx(SolidTabGroup, { tabs: tabs, value: activeValue, onValueChange: setActiveValue, panelClassName: panelContainerClassName }));
@@ -200,7 +200,7 @@ var SelectionStaticValues = function (_a) {
200
200
  var handleDisplayChange = function (newDisplay) {
201
201
  onUpdate("".concat(value || "", ":").concat(newDisplay));
202
202
  };
203
- return (_jsxs("div", { className: "mt-2 flex items-center gap-2", children: [_jsx(SolidInput, { value: value || "", onChange: function (e) { return handleValueChange(e.target.value); }, placeholder: "Value", className: "w-full" }), _jsx(SolidInput, { value: display || "", onChange: function (e) { return handleDisplayChange(e.target.value); }, placeholder: "Display", className: "w-full" }), _jsx(SolidButton, { icon: "si si-plus", size: "small", onClick: onAdd, type: "button" }), _jsx(SolidButton, { icon: "si si-trash", size: "small", onClick: onDelete, outlined: true, severity: "danger", type: "button" })] }));
203
+ return (_jsxs("div", { className: "solid-field-selection-static-row", children: [_jsx(SolidInput, { value: value || "", onChange: function (e) { return handleValueChange(e.target.value); }, placeholder: "Value", className: "w-full" }), _jsx(SolidInput, { value: display || "", onChange: function (e) { return handleDisplayChange(e.target.value); }, placeholder: "Display", className: "w-full" }), _jsx(SolidButton, { icon: "si si-plus", size: "small", onClick: onAdd, type: "button" }), _jsx(SolidButton, { icon: "si si-trash", size: "small", onClick: onDelete, outlined: true, severity: "danger", type: "button" })] }));
204
204
  };
205
205
  var triggerOperationOptions = [
206
206
  { label: "beforeInsert", value: "before-insert" },
@@ -1159,6 +1159,12 @@ var FieldMetaDataForm = function (_a) {
1159
1159
  var fieldEditorTitle = fieldMetaData
1160
1160
  ? "Edit ".concat(((_t = formik === null || formik === void 0 ? void 0 : formik.values) === null || _t === void 0 ? void 0 : _t.displayName) || fieldTypeLabel, " Field")
1161
1161
  : "Add ".concat(fieldTypeLabel, " Field");
1162
+ var basicInfoFieldNames = ["displayName", "name", "description", "columnName"];
1163
+ var formikTouchedFields = formik.touched;
1164
+ var formikErrorFields = formik.errors;
1165
+ var fieldHasTouchedError = function (fieldName) { return Boolean(formikTouchedFields[fieldName] && formikErrorFields[fieldName]); };
1166
+ var basicInfoHasError = basicInfoFieldNames.some(fieldHasTouchedError);
1167
+ var advancedConfigHasError = Object.keys(formikErrorFields).some(function (fieldName) { return !basicInfoFieldNames.includes(fieldName) && fieldHasTouchedError(fieldName); });
1162
1168
  var mediaTypeSelectedItems = useMemo(function () {
1163
1169
  if (!Array.isArray(formik.values.mediaTypes))
1164
1170
  return [];
@@ -1226,7 +1232,12 @@ var FieldMetaDataForm = function (_a) {
1226
1232
  var errors, collectMessages, errorMessages;
1227
1233
  return __generator(this, function (_a) {
1228
1234
  switch (_a.label) {
1229
- case 0: return [4 /*yield*/, formik.validateForm()];
1235
+ case 0:
1236
+ formik.setTouched(currentFields.reduce(function (touchedFields, fieldName) {
1237
+ touchedFields[fieldName] = true;
1238
+ return touchedFields;
1239
+ }, {}), false);
1240
+ return [4 /*yield*/, formik.validateForm()];
1230
1241
  case 1:
1231
1242
  errors = _a.sent();
1232
1243
  collectMessages = function (value) {
@@ -1481,7 +1492,7 @@ var FieldMetaDataForm = function (_a) {
1481
1492
  }, children: showTypeFilter === true ?
1482
1493
  _jsx("div", { className: "solid-field-form-scroll", children: _jsx(FieldSelector, { handleTypeSelect: handleTypeSelect, modelMetaData: modelMetaData, availableFieldTypes: availableFieldTypes, initialSelectedValue: (_u = selectedType === null || selectedType === void 0 ? void 0 : selectedType.value) !== null && _u !== void 0 ? _u : selectorInitialFieldType, requireExplicitContinue: selectorRequireContinue, continueLabel: selectorContinueLabel }) })
1483
1494
  :
1484
- _jsx("div", { className: "solid-field-form-scroll", children: _jsx("div", { className: "flex justify-center creat-field-form form-demo", children: _jsxs("div", { className: "solid-fluid solid-field-form-frame", children: [_jsxs("div", { className: "solid-field-form-header", children: [_jsx("p", { className: "form-wrapper-title m-0", children: fieldEditorTitle }), _jsx("p", { className: "solid-field-form-subtitle", children: "Review the basic info and advanced configuration for this field." })] }), _jsx("div", { className: "solid-field-form-tabs", children: _jsxs(TabView, { panelContainerClassName: "px-0", 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: "flex flex-wrap -mx-2 -mt-2", children: [currentFields.includes("displayName") && (_jsxs("div", { className: "field mt-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "displayName", className: classNames("form-field-label", styles.fieldLabel), children: "Display Name" }), _jsx(SolidInput, { type: "text", disabled: isExistingFieldReadOnly, id: "displayName", name: "displayName", onChange: function (e) {
1495
+ _jsx("div", { className: "solid-field-form-scroll", children: _jsx("div", { className: "flex justify-center creat-field-form form-demo", children: _jsxs("div", { className: "solid-fluid solid-field-form-frame", children: [_jsxs("div", { className: "solid-field-form-header", children: [_jsx("p", { className: "form-wrapper-title m-0", children: fieldEditorTitle }), _jsx("p", { className: "solid-field-form-subtitle", children: "Review the basic info and advanced configuration for this field." })] }), _jsx("div", { className: "solid-field-form-tabs", children: _jsxs(TabView, { panelContainerClassName: "px-0", children: [_jsx(TabPanel, { header: "Basic Info", className: basicInfoHasError ? "tab-error-heading" : "", children: _jsxs("div", { className: "flex flex-wrap -mx-2 -mt-2", children: [currentFields.includes("displayName") && (_jsxs("div", { className: "field mt-2 min-w-0 basis-full px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "displayName", className: classNames("form-field-label", styles.fieldLabel), children: "Display Name" }), _jsx(SolidInput, { type: "text", disabled: isExistingFieldReadOnly, id: "displayName", name: "displayName", onChange: function (e) {
1485
1496
  formik.setFieldValue("displayName", e.target.value);
1486
1497
  var _a = getSingularAndPlural(e.target.value), toCamelCase = _a.toCamelCase, toSnakeCase = _a.toSnakeCase;
1487
1498
  formik.setFieldValue("name", toCamelCase);
@@ -1490,11 +1501,11 @@ var FieldMetaDataForm = function (_a) {
1490
1501
  }
1491
1502
  }, value: formik.values.displayName, className: classNames(styles.fieldInput, {
1492
1503
  "is-invalid": isFormFieldValid(formik, "displayName"),
1493
- }) }), isFormFieldValid(formik, "displayName") && (_jsx("p", { className: styles.fieldError, children: (_w = (_v = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _v === void 0 ? void 0 : _v.displayName) === null || _w === void 0 ? void 0 : _w.toString() }))] })), currentFields.includes("name") && (_jsxs("div", { className: "field mt-2 px-2 pt-2 md:mt-0 md:w-1/2", children: [_jsx("label", { htmlFor: "name", className: classNames("form-field-label", styles.fieldLabel), children: "Name" }), _jsx(SolidInput, { disabled: isExistingFieldReadOnly, type: "text", id: "name", name: "name", onChange: formik.handleChange, value: formik.values.name, className: classNames(styles.fieldInput, {
1504
+ }) }), isFormFieldValid(formik, "displayName") && (_jsx("p", { className: styles.fieldError, children: (_w = (_v = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _v === void 0 ? void 0 : _v.displayName) === null || _w === void 0 ? void 0 : _w.toString() }))] })), currentFields.includes("name") && (_jsxs("div", { className: "field mt-2 min-w-0 basis-full px-2 pt-2 md:mt-0 md:basis-1/2", children: [_jsx("label", { htmlFor: "name", className: classNames("form-field-label", styles.fieldLabel), children: "Name" }), _jsx(SolidInput, { disabled: isExistingFieldReadOnly, type: "text", id: "name", name: "name", onChange: formik.handleChange, value: formik.values.name, className: classNames(styles.fieldInput, {
1494
1505
  "is-invalid": isFormFieldValid(formik, "name"),
1495
- }) }), isFormFieldValid(formik, "name") && (_jsx("p", { className: styles.fieldError, children: (_y = (_x = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _x === void 0 ? void 0 : _x.name) === null || _y === void 0 ? void 0 : _y.toString() }))] })), currentFields.includes("description") && (_jsxs("div", { className: "field mt-2 w-full px-2 pt-2 md:mt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "description", className: classNames("form-field-label", styles.fieldLabel), children: "Description" }), _jsx(SolidTextarea, { "aria-describedby": "Description of your field", id: "description", name: "description", onChange: formik.handleChange, value: formik.values.description, rows: 5, className: classNames(styles.fieldTextarea, {
1506
+ }) }), isFormFieldValid(formik, "name") && (_jsx("p", { className: styles.fieldError, children: (_y = (_x = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _x === void 0 ? void 0 : _x.name) === null || _y === void 0 ? void 0 : _y.toString() }))] })), currentFields.includes("description") && (_jsxs("div", { className: "field mt-2 min-w-0 basis-full px-2 pt-2 md:mt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "description", className: classNames("form-field-label", styles.fieldLabel), children: "Description" }), _jsx(SolidTextarea, { "aria-describedby": "Description of your field", id: "description", name: "description", onChange: formik.handleChange, value: formik.values.description, rows: 5, className: classNames(styles.fieldTextarea, {
1496
1507
  "is-invalid": isFormFieldValid(formik, "description"),
1497
- }) }), isFormFieldValid(formik, "description") && (_jsx("p", { className: styles.fieldError, children: (_0 = (_z = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _z === void 0 ? void 0 : _z.description) === null || _0 === void 0 ? void 0 : _0.toString() }))] })), currentFields.includes("columnName") && (_jsxs("div", { className: "field mt-2 w-full px-2 pt-2 md:w-1/2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(SolidCheckbox, { onChange: function (event) {
1508
+ }) }), isFormFieldValid(formik, "description") && (_jsx("p", { className: styles.fieldError, children: (_0 = (_z = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _z === void 0 ? void 0 : _z.description) === null || _0 === void 0 ? void 0 : _0.toString() }))] })), currentFields.includes("columnName") && (_jsxs("div", { className: "field mt-2 min-w-0 basis-full px-2 pt-2 md:basis-1/2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(SolidCheckbox, { onChange: function (event) {
1498
1509
  var checked = event.currentTarget.checked;
1499
1510
  setShowColumnName(checked);
1500
1511
  if (checked === true) {
@@ -1508,7 +1519,7 @@ var FieldMetaDataForm = function (_a) {
1508
1519
  }
1509
1520
  }, checked: showColumnName, disabled: isExistingFieldReadOnly }), _jsx("label", { htmlFor: "ingredient1", className: "form-field-label", children: "Set Column Name" })] }), showColumnName && (_jsxs("div", { className: "field mt-4 w-full gap-2", children: [_jsx("label", { htmlFor: "columnName", className: classNames("form-field-label", styles.fieldLabel), children: "Column Name" }), _jsx(SolidInput, { disabled: isExistingFieldReadOnly, type: "text", id: "columnName", name: "columnName", onChange: formik.handleChange, value: formik.values.columnName, className: classNames(styles.fieldInput, {
1510
1521
  "is-invalid": isFormFieldValid(formik, "columnName"),
1511
- }) }), isFormFieldValid(formik, "columnName") && (_jsx("p", { className: styles.fieldError, children: (_2 = (_1 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _1 === void 0 ? void 0 : _1.columnName) === null || _2 === void 0 ? void 0 : _2.toString() }))] }))] }))] }) }), _jsxs(TabPanel, { header: "Advanced Config", children: [((_4 = (_3 = formik === null || formik === void 0 ? void 0 : formik.values) === null || _3 === void 0 ? void 0 : _3.type) === null || _4 === void 0 ? void 0 : _4.length) > 0 && (_jsxs("div", { className: "flex flex-wrap -mx-2 -mt-2", children: [currentFields.includes("length") && (_jsxs("div", { className: "field flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsx("label", { htmlFor: "length", className: classNames("form-field-label", styles.fieldLabel), children: "Length" }), _jsx("div", { className: styles.fieldNumberWrapper, children: _jsx(SolidNumberInput, { id: "length", name: "length", value: formik.values.length, onChange: function (event) { return formik.setFieldValue("length", event.value); }, className: classNames({
1522
+ }) }), isFormFieldValid(formik, "columnName") && (_jsx("p", { className: styles.fieldError, children: (_2 = (_1 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _1 === void 0 ? void 0 : _1.columnName) === null || _2 === void 0 ? void 0 : _2.toString() }))] }))] }))] }) }), _jsxs(TabPanel, { header: "Advanced Config", className: advancedConfigHasError ? "tab-error-heading" : "", children: [((_4 = (_3 = formik === null || formik === void 0 ? void 0 : formik.values) === null || _3 === void 0 ? void 0 : _3.type) === null || _4 === void 0 ? void 0 : _4.length) > 0 && (_jsxs("div", { className: "flex flex-wrap -mx-2 -mt-2", children: [currentFields.includes("length") && (_jsxs("div", { className: "field flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsx("label", { htmlFor: "length", className: classNames("form-field-label", styles.fieldLabel), children: "Length" }), _jsx("div", { className: styles.fieldNumberWrapper, children: _jsx(SolidNumberInput, { id: "length", name: "length", value: formik.values.length, onChange: function (event) { return formik.setFieldValue("length", event.value); }, className: classNames({
1512
1523
  "is-invalid": isFormFieldValid(formik, "length"),
1513
1524
  }) }) }), isFormFieldValid(formik, "length") && (_jsx("p", { className: styles.fieldError, children: (_6 = (_5 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _5 === void 0 ? void 0 : _5.length) === null || _6 === void 0 ? void 0 : _6.toString() }))] })), currentFields.includes("defaultValue") && selectedTypeValue === "boolean" &&
1514
1525
  _jsxs("div", { className: "field mt-2 flex w-full flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { style: { marginBottom: "0px" }, htmlFor: "defaultValue", className: classNames("form-field-label", styles.fieldLabel), children: "Default Value" }), _jsx(SolidSegmentedControl, { value: resolveBooleanOptionValue(formik.values.defaultValue), onChange: function (value) { return formik.setFieldValue("defaultValue", value); }, options: booleanSegmentedOptions, className: classNames("", {
@@ -1566,45 +1577,45 @@ var FieldMetaDataForm = function (_a) {
1566
1577
  formik.setFieldValue("mediaEmbedded", value);
1567
1578
  }, options: booleanSegmentedOptions, className: classNames("", {
1568
1579
  "is-invalid": isFormFieldValid(formik, "mediaEmbedded"),
1569
- }) }), isFormFieldValid(formik, "mediaEmbedded") && (_jsx("p", { className: styles.fieldError, children: (_18 = (_17 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _17 === void 0 ? void 0 : _17.mediaEmbedded) === null || _18 === void 0 ? void 0 : _18.toString() }))] })), currentFields.includes("relationType") && (_jsxs("div", { className: "field mt-1 flex w-full items-center gap-2 px-2 pt-2", children: [_jsx("label", { style: { marginBottom: "0px" }, htmlFor: "relationType", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Type" }), _jsx(SolidSegmentedControl, { value: formik.values.relationType, options: fieldDefaultMetaData.data.relationTypes, onChange: function (value) {
1580
+ }) }), isFormFieldValid(formik, "mediaEmbedded") && (_jsx("p", { className: styles.fieldError, children: (_18 = (_17 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _17 === void 0 ? void 0 : _17.mediaEmbedded) === null || _18 === void 0 ? void 0 : _18.toString() }))] })), currentFields.includes("relationType") && (_jsxs("div", { className: "field mt-1 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:flex-row md:items-center", children: [_jsx("label", { style: { marginBottom: "0px" }, htmlFor: "relationType", className: classNames("form-field-label md:shrink-0", styles.fieldLabel), children: "Relation Type" }), _jsx(SolidSegmentedControl, { value: formik.values.relationType, options: fieldDefaultMetaData.data.relationTypes, onChange: function (value) {
1570
1581
  formik.setFieldValue("relationType", value);
1571
1582
  if (value === "one-to-many") {
1572
1583
  formik.setFieldValue("relationCreateInverse", true);
1573
1584
  }
1574
- }, className: classNames("", {
1585
+ }, className: classNames("solid-field-relation-type-control w-full min-w-0", {
1575
1586
  "is-invalid": isFormFieldValid(formik, "relationType"),
1576
- }) }), isFormFieldValid(formik, "relationType") && (_jsx("p", { className: styles.fieldError, children: (_20 = (_19 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _19 === void 0 ? void 0 : _19.relationType) === null || _20 === void 0 ? void 0 : _20.toString() }))] })), currentFields.includes("relationType") && (formik.values.relationType === "many-to-one" || formik.values.relationType === "one-to-many") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "relationCascade", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Cascade" }), _jsx(SolidSelect, { value: formik.values.relationCascade, options: fieldDefaultMetaData.data.cascadeTypes, optionLabel: "label", optionValue: "value", onChange: function (_a) {
1587
+ }) }), isFormFieldValid(formik, "relationType") && (_jsx("p", { className: styles.fieldError, children: (_20 = (_19 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _19 === void 0 ? void 0 : _19.relationType) === null || _20 === void 0 ? void 0 : _20.toString() }))] })), currentFields.includes("relationType") && (formik.values.relationType === "many-to-one" || formik.values.relationType === "one-to-many") && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "relationCascade", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Cascade" }), _jsx(SolidSelect, { value: formik.values.relationCascade, options: fieldDefaultMetaData.data.cascadeTypes, optionLabel: "label", optionValue: "value", onChange: function (_a) {
1577
1588
  var value = _a.value;
1578
1589
  return formik.setFieldValue("relationCascade", value);
1579
1590
  }, placeholder: "Cascade", className: classNames("w-full", {
1580
1591
  "is-invalid": isFormFieldValid(formik, "relationCascade"),
1581
- }) }), isFormFieldValid(formik, "relationCascade") && (_jsx("p", { className: styles.fieldError, children: (_22 = (_21 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _21 === void 0 ? void 0 : _21.relationCascade) === null || _22 === void 0 ? void 0 : _22.toString() }))] })), currentFields.includes("relationModelModuleName") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "relationModelModuleName", className: classNames("form-field-label", styles.fieldLabel), children: "Co-Module Name" }), _jsx("div", { className: classNames("solid-standard-autocomplete", (_e = {},
1592
+ }) }), isFormFieldValid(formik, "relationCascade") && (_jsx("p", { className: styles.fieldError, children: (_22 = (_21 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _21 === void 0 ? void 0 : _21.relationCascade) === null || _22 === void 0 ? void 0 : _22.toString() }))] })), currentFields.includes("relationModelModuleName") && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "relationModelModuleName", className: classNames("form-field-label", styles.fieldLabel), children: "Co-Module Name" }), _jsx("div", { className: classNames("solid-standard-autocomplete", (_e = {},
1582
1593
  _e[styles.fieldInvalidControl] = isFormFieldValid(formik, "relationModelModuleName"),
1583
- _e)), children: _jsx(SolidAutocomplete, { value: relationModelModuleField.selectedItem, suggestions: relationModelModuleField.filteredItems, completeMethod: relationModelModuleField.searchItems, onChange: relationModelModuleField.handleChange, dropdown: true, field: "name", className: "w-full" }) }), isFormFieldValid(formik, "relationModelModuleName") && (_jsx("p", { className: styles.fieldError, children: (_24 = (_23 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _23 === void 0 ? void 0 : _23.relationModelModuleName) === null || _24 === void 0 ? void 0 : _24.toString() }))] })), currentFields.includes("relationCoModelSingularName") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "relationCoModelSingularName", className: classNames("form-field-label", styles.fieldLabel), children: "Co-Model Name" }), _jsx("div", { className: classNames("solid-standard-autocomplete", (_f = {},
1594
+ _e)), children: _jsx(SolidAutocomplete, { value: relationModelModuleField.selectedItem, suggestions: relationModelModuleField.filteredItems, completeMethod: relationModelModuleField.searchItems, onChange: relationModelModuleField.handleChange, dropdown: true, field: "name", className: "w-full" }) }), isFormFieldValid(formik, "relationModelModuleName") && (_jsx("p", { className: styles.fieldError, children: (_24 = (_23 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _23 === void 0 ? void 0 : _23.relationModelModuleName) === null || _24 === void 0 ? void 0 : _24.toString() }))] })), currentFields.includes("relationCoModelSingularName") && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "relationCoModelSingularName", className: classNames("form-field-label", styles.fieldLabel), children: "Co-Model Name" }), _jsx("div", { className: classNames("solid-standard-autocomplete", (_f = {},
1584
1595
  _f[styles.fieldInvalidControl] = isFormFieldValid(formik, "relationCoModelSingularName"),
1585
1596
  _f)), children: _jsx(SolidAutocomplete, { value: relationCoModelField.selectedItem, suggestions: relationCoModelField.filteredItems, completeMethod: relationCoModelField.searchItems, onChange: relationCoModelField.handleChange, dropdown: true, field: "displayName", className: "w-full" }) }), isFormFieldValid(formik, "relationCoModelSingularName") && (_jsx("p", { className: styles.fieldError, children: (_26 = (_25 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _25 === void 0 ? void 0 : _25.relationCoModelSingularName) === null || _26 === void 0 ? void 0 : _26.toString() })), formik.values.relationType === "one-to-many" &&
1586
1597
  _jsx("p", { className: "fieldSubTitle", children: "This is the child model." }), formik.values.relationType === "many-to-one" &&
1587
- _jsx("p", { className: "fieldSubTitle", children: "This is the parent model." })] })), currentFields.includes("relationCoModelColumnName") && (formik.values.relationType === "many-to-many" || formik.values.relationType === "many-to-one") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "relationCoModelColumnName", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Co-Model Column Name" }), _jsx(SolidInput, { type: "text", id: "relationCoModelColumnName", name: "relationCoModelColumnName", onChange: formik.handleChange, disabled: isExistingFieldReadOnly, value: formik.values.relationCoModelColumnName, className: classNames(styles.fieldInput, {
1598
+ _jsx("p", { className: "fieldSubTitle", children: "This is the parent model." })] })), currentFields.includes("relationCoModelColumnName") && (formik.values.relationType === "many-to-many" || formik.values.relationType === "many-to-one") && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "relationCoModelColumnName", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Co-Model Column Name" }), _jsx(SolidInput, { type: "text", id: "relationCoModelColumnName", name: "relationCoModelColumnName", onChange: formik.handleChange, disabled: isExistingFieldReadOnly, value: formik.values.relationCoModelColumnName, className: classNames(styles.fieldInput, {
1588
1599
  "is-invalid": isFormFieldValid(formik, "relationCoModelColumnName"),
1589
- }) }), isFormFieldValid(formik, "relationCoModelColumnName") && (_jsx("p", { className: styles.fieldError, children: (_28 = (_27 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _27 === void 0 ? void 0 : _27.relationCoModelColumnName) === null || _28 === void 0 ? void 0 : _28.toString() })), _jsx("p", { className: "fieldSubTitle", children: "Allows you to control the column name of the foreign key. Eg. when adding a country field to state model, by default foreign key column in the state table will be called country_id, use this field to create a foreign key with a different name. " })] })), askForUserKeyField && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "userKey", className: classNames("form-field-label", styles.fieldLabel), children: "Set User Key" }), _jsx("div", { className: classNames("solid-standard-autocomplete", (_g = {},
1600
+ }) }), isFormFieldValid(formik, "relationCoModelColumnName") && (_jsx("p", { className: styles.fieldError, children: (_28 = (_27 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _27 === void 0 ? void 0 : _27.relationCoModelColumnName) === null || _28 === void 0 ? void 0 : _28.toString() })), _jsx("p", { className: "fieldSubTitle", children: "Allows you to control the column name of the foreign key. Eg. when adding a country field to state model, by default foreign key column in the state table will be called country_id, use this field to create a foreign key with a different name. " })] })), askForUserKeyField && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "userKey", className: classNames("form-field-label", styles.fieldLabel), children: "Set User Key" }), _jsx("div", { className: classNames("solid-standard-autocomplete", (_g = {},
1590
1601
  _g[styles.fieldInvalidControl] = isFormFieldValid(formik, "userKey"),
1591
- _g)), children: _jsx(SolidAutocomplete, { value: userKeyField.selectedItem, suggestions: userKeyField.filteredItems, completeMethod: userKeyField.searchItems, onChange: userKeyField.handleChange, dropdown: true, field: "displayName", className: "w-full" }) }), _jsx("p", { className: "fieldSubTitle", children: "The co-model you have selected does not have a user key specified. Use the above dropdown to choose from one of the \"unique\" fields in this co-model to be set as its userkey. User keys are required in co-models being used in many-to-one or one-to-many relations as in SolidX when a many-to-one field is rendered it uses an autocomplete dropdown, and the user key value is what is displayed as the label in the dropdown." }), isFormFieldValid(formik, "userKey") && (_jsx("p", { className: styles.fieldError, children: (_30 = (_29 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _29 === void 0 ? void 0 : _29.userKey) === null || _30 === void 0 ? void 0 : _30.toString() }))] })), currentFields.includes("relationFieldFixedFilter") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "relationFieldFixedFilter", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Field Fixed Filter" }), _jsx(SolidTextarea, { "aria-describedby": "Fixed Filter", id: "relationFieldFixedFilter", name: "relationFieldFixedFilter", onChange: formik.handleChange, value: formik.values.relationFieldFixedFilter, rows: 5, className: classNames(styles.fieldTextarea, {
1602
+ _g)), children: _jsx(SolidAutocomplete, { value: userKeyField.selectedItem, suggestions: userKeyField.filteredItems, completeMethod: userKeyField.searchItems, onChange: userKeyField.handleChange, dropdown: true, field: "displayName", className: "w-full" }) }), _jsx("p", { className: "fieldSubTitle", children: "The co-model you have selected does not have a user key specified. Use the above dropdown to choose from one of the \"unique\" fields in this co-model to be set as its userkey. User keys are required in co-models being used in many-to-one or one-to-many relations as in SolidX when a many-to-one field is rendered it uses an autocomplete dropdown, and the user key value is what is displayed as the label in the dropdown." }), isFormFieldValid(formik, "userKey") && (_jsx("p", { className: styles.fieldError, children: (_30 = (_29 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _29 === void 0 ? void 0 : _29.userKey) === null || _30 === void 0 ? void 0 : _30.toString() }))] })), currentFields.includes("relationFieldFixedFilter") && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "relationFieldFixedFilter", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Field Fixed Filter" }), _jsx(SolidTextarea, { "aria-describedby": "Fixed Filter", id: "relationFieldFixedFilter", name: "relationFieldFixedFilter", onChange: formik.handleChange, value: formik.values.relationFieldFixedFilter, rows: 5, className: classNames(styles.fieldTextarea, {
1592
1603
  "is-invalid": isFormFieldValid(formik, "relationFieldFixedFilter"),
1593
- }) }), isFormFieldValid(formik, "relationFieldFixedFilter") && (_jsx("p", { className: styles.fieldError, children: (_32 = (_31 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _31 === void 0 ? void 0 : _31.relationFieldFixedFilter) === null || _32 === void 0 ? void 0 : _32.toString() })), _jsx("p", { className: "fieldSubTitle", children: "Many to one fields are rendered as autocomplete dropdown on the SolidX ui. Use the fixed filter to load a pre-filtered set of records from the co-model. Please note user input entered in the autocomplete is used to apply a dynamic filter." })] })), currentFields.includes("relationCreateInverse") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "relationCreateInverse", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Create Inverse" }), _jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "relationCreateInverse", name: "relationCreateInverse", checked: formik.values.relationCreateInverse, disabled: formik.values.relationType === "one-to-many", onChange: function (event) { return formik.setFieldValue("relationCreateInverse", event.currentTarget.checked); } }), _jsx("label", { htmlFor: "relationCreateInverse", className: classNames("ml-2", "form-field-label", styles.fieldLabel), children: "Create Inverse" })] }), isFormFieldValid(formik, "relationCreateInverse") && (_jsx("p", { className: styles.fieldError, children: (_34 = (_33 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _33 === void 0 ? void 0 : _33.relationCreateInverse) === null || _34 === void 0 ? void 0 : _34.toString() }))] })), currentFields.includes("relationCoModelFieldName") && formik.values.relationCreateInverse && !formik.values.relationCoModelSingularName && (_jsx("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: _jsx(SolidMessage, { text: "Please select Co-model" }) })), currentFields.includes("relationCoModelFieldName") && formik.values.relationCreateInverse && formik.values.relationCoModelSingularName && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsxs("label", { htmlFor: "relationCoModelFieldName", className: classNames("form-field-label", styles.fieldLabel), children: ["Field Name In ", formik.values.relationCoModelSingularName, " Model"] }), _jsx(SolidInput, { type: "text", id: "relationCoModelFieldName", name: "relationCoModelFieldName", onChange: formik.handleChange, disabled: isExistingFieldReadOnly, value: formik.values.relationCoModelFieldName, className: classNames(styles.fieldInput, {
1604
+ }) }), isFormFieldValid(formik, "relationFieldFixedFilter") && (_jsx("p", { className: styles.fieldError, children: (_32 = (_31 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _31 === void 0 ? void 0 : _31.relationFieldFixedFilter) === null || _32 === void 0 ? void 0 : _32.toString() })), _jsx("p", { className: "fieldSubTitle", children: "Many to one fields are rendered as autocomplete dropdown on the SolidX ui. Use the fixed filter to load a pre-filtered set of records from the co-model. Please note user input entered in the autocomplete is used to apply a dynamic filter." })] })), currentFields.includes("relationCreateInverse") && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "relationCreateInverse", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Create Inverse" }), _jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "relationCreateInverse", name: "relationCreateInverse", checked: formik.values.relationCreateInverse, disabled: formik.values.relationType === "one-to-many", onChange: function (event) { return formik.setFieldValue("relationCreateInverse", event.currentTarget.checked); } }), _jsx("label", { htmlFor: "relationCreateInverse", className: classNames("ml-2", "form-field-label", styles.fieldLabel), children: "Create Inverse" })] }), isFormFieldValid(formik, "relationCreateInverse") && (_jsx("p", { className: styles.fieldError, children: (_34 = (_33 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _33 === void 0 ? void 0 : _33.relationCreateInverse) === null || _34 === void 0 ? void 0 : _34.toString() }))] })), currentFields.includes("relationCoModelFieldName") && formik.values.relationCreateInverse && !formik.values.relationCoModelSingularName && (_jsx("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: _jsx(SolidMessage, { text: "Please select Co-model" }) })), currentFields.includes("relationCoModelFieldName") && formik.values.relationCreateInverse && formik.values.relationCoModelSingularName && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsxs("label", { htmlFor: "relationCoModelFieldName", className: classNames("form-field-label", styles.fieldLabel), children: ["Field Name In ", formik.values.relationCoModelSingularName, " Model"] }), _jsx(SolidInput, { type: "text", id: "relationCoModelFieldName", name: "relationCoModelFieldName", onChange: formik.handleChange, disabled: isExistingFieldReadOnly, value: formik.values.relationCoModelFieldName, className: classNames(styles.fieldInput, {
1594
1605
  "is-invalid": isFormFieldValid(formik, "relationCoModelFieldName"),
1595
1606
  }) }), formik.values.relationType === "one-to-many" &&
1596
1607
  _jsxs("p", { className: "fieldSubTitle", children: ["This is a field that is created in the child model. In this case a ", _jsx("span", { style: { fontWeight: "700" }, children: (_35 = formik.values.relationCoModelFieldName) !== null && _35 !== void 0 ? _35 : formik.values.relationCoModelSingularName }), " field will be created in the ", formik.values.relationCoModelSingularName, " when setting create inverse true."] }), formik.values.relationType === "many-to-one" &&
1597
1608
  _jsxs("p", { className: "fieldSubTitle", children: ["This is a field that is created in the parent model. In this case a ", _jsx("span", { style: { fontWeight: "700" }, children: (_36 = formik.values.relationCoModelFieldName) !== null && _36 !== void 0 ? _36 : "".concat(formik.values.relationCoModelSingularName, "s") }), " field will be created in the ", formik.values.relationCoModelSingularName, " when setting create inverse true."] }), formik.values.relationType === "many-to-many" &&
1598
- _jsxs("p", { className: "fieldSubTitle", children: ["In this case a ", formik.values.relationCoModelFieldName, " field will be created in the ", _jsx("span", { style: { fontWeight: "700" }, children: (_37 = formik.values.relationCoModelSingularName) !== null && _37 !== void 0 ? _37 : '{{}}' }), " when setting create inverse true."] }), isFormFieldValid(formik, "relationCoModelFieldName") && (_jsx("p", { className: styles.fieldError, children: (_39 = (_38 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _38 === void 0 ? void 0 : _38.relationCoModelFieldName) === null || _39 === void 0 ? void 0 : _39.toString() }))] })), currentFields.includes("relationJoinTableName") && formik.values.relationType === "many-to-many" && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "relationJoinTableName", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Join Table Name" }), _jsx(SolidInput, { type: "text", id: "relationJoinTableName", name: "relationJoinTableName", onChange: formik.handleChange, disabled: isExistingFieldReadOnly, value: formik.values.relationJoinTableName, className: classNames(styles.fieldInput, {
1609
+ _jsxs("p", { className: "fieldSubTitle", children: ["In this case a ", formik.values.relationCoModelFieldName, " field will be created in the ", _jsx("span", { style: { fontWeight: "700" }, children: (_37 = formik.values.relationCoModelSingularName) !== null && _37 !== void 0 ? _37 : '{{}}' }), " when setting create inverse true."] }), isFormFieldValid(formik, "relationCoModelFieldName") && (_jsx("p", { className: styles.fieldError, children: (_39 = (_38 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _38 === void 0 ? void 0 : _38.relationCoModelFieldName) === null || _39 === void 0 ? void 0 : _39.toString() }))] })), currentFields.includes("relationJoinTableName") && formik.values.relationType === "many-to-many" && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "relationJoinTableName", className: classNames("form-field-label", styles.fieldLabel), children: "Relation Join Table Name" }), _jsx(SolidInput, { type: "text", id: "relationJoinTableName", name: "relationJoinTableName", onChange: formik.handleChange, disabled: isExistingFieldReadOnly, value: formik.values.relationJoinTableName, className: classNames(styles.fieldInput, {
1599
1610
  "is-invalid": isFormFieldValid(formik, "relationJoinTableName"),
1600
- }) }), isFormFieldValid(formik, "relationJoinTableName") && (_jsx("p", { className: styles.fieldError, children: (_41 = (_40 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _40 === void 0 ? void 0 : _40.relationJoinTableName) === null || _41 === void 0 ? void 0 : _41.toString() }))] })), currentFields.includes("selectionDynamicProvider") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "selectionDynamicProvider", className: classNames("form-field-label", styles.fieldLabel), children: "Selection Dynamic Provider" }), _jsx("div", { className: classNames("solid-standard-autocomplete", (_h = {},
1611
+ }) }), isFormFieldValid(formik, "relationJoinTableName") && (_jsx("p", { className: styles.fieldError, children: (_41 = (_40 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _40 === void 0 ? void 0 : _40.relationJoinTableName) === null || _41 === void 0 ? void 0 : _41.toString() }))] })), currentFields.includes("selectionDynamicProvider") && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "selectionDynamicProvider", className: classNames("form-field-label", styles.fieldLabel), children: "Selection Dynamic Provider" }), _jsx("div", { className: classNames("solid-standard-autocomplete", (_h = {},
1601
1612
  _h[styles.fieldInvalidControl] = isFormFieldValid(formik, "selectionDynamicProvider"),
1602
- _h)), children: _jsx(SolidAutocomplete, { value: selectionDynamicProviderField.selectedItem, suggestions: selectionDynamicProviderField.filteredItems, completeMethod: selectionDynamicProviderField.searchItems, onChange: selectionDynamicProviderField.handleChange, dropdown: true, field: "label", className: "w-full" }) }), isFormFieldValid(formik, "selectionDynamicProvider") && (_jsx("p", { className: styles.fieldError, children: (_43 = (_42 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _42 === void 0 ? void 0 : _42.selectionDynamicProvider) === null || _43 === void 0 ? void 0 : _43.toString() }))] })), currentFields.includes("selectionValueType") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "selectionValueType", className: classNames("form-field-label", styles.fieldLabel), children: "Select Value Type" }), _jsx(SolidSelect, { value: formik.values.selectionValueType, options: selctionValueTypes, optionLabel: "label", optionValue: "value", onChange: function (_a) {
1613
+ _h)), children: _jsx(SolidAutocomplete, { value: selectionDynamicProviderField.selectedItem, suggestions: selectionDynamicProviderField.filteredItems, completeMethod: selectionDynamicProviderField.searchItems, onChange: selectionDynamicProviderField.handleChange, dropdown: true, field: "label", className: "w-full" }) }), isFormFieldValid(formik, "selectionDynamicProvider") && (_jsx("p", { className: styles.fieldError, children: (_43 = (_42 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _42 === void 0 ? void 0 : _42.selectionDynamicProvider) === null || _43 === void 0 ? void 0 : _43.toString() }))] })), currentFields.includes("selectionValueType") && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "selectionValueType", className: classNames("form-field-label", styles.fieldLabel), children: "Select Value Type" }), _jsx(SolidSelect, { value: formik.values.selectionValueType, options: selctionValueTypes, optionLabel: "label", optionValue: "value", native: false, onChange: function (_a) {
1603
1614
  var value = _a.value;
1604
1615
  return formik.setFieldValue("selectionValueType", value);
1605
1616
  }, placeholder: "Select Value Type", className: classNames("w-full", {
1606
1617
  "is-invalid": isFormFieldValid(formik, "selectionValueType"),
1607
- }) }), isFormFieldValid(formik, "selectionValueType") && (_jsx("p", { className: styles.fieldError, children: (_45 = (_44 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _44 === void 0 ? void 0 : _44.selectionValueType) === null || _45 === void 0 ? void 0 : _45.toString() }))] })), currentFields.includes("selectionStaticValues") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "selectionStaticValues", className: classNames("form-field-label", styles.fieldLabel), 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("p", { className: styles.fieldError, children: (_47 = (_46 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _46 === void 0 ? void 0 : _46.selectionStaticValues) === null || _47 === void 0 ? void 0 : _47.toString() }))] })), currentFields.includes("computedFieldValueType") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "computedFieldValueType", className: classNames("form-field-label", styles.fieldLabel), children: "Computed Field Value Type" }), _jsx(SolidAutocomplete, { value: selectedComputedFieldValueType, suggestions: filteredComputedFieldValueTypes, completeMethod: searchComputedFieldValueType, field: "label", dropdown: true, className: classNames("solid-standard-autocomplete", (_j = {},
1618
+ }) }), isFormFieldValid(formik, "selectionValueType") && (_jsx("p", { className: styles.fieldError, children: (_45 = (_44 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _44 === void 0 ? void 0 : _44.selectionValueType) === null || _45 === void 0 ? void 0 : _45.toString() }))] })), currentFields.includes("selectionStaticValues") && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "selectionStaticValues", className: classNames("form-field-label", styles.fieldLabel), 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("p", { className: styles.fieldError, children: (_47 = (_46 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _46 === void 0 ? void 0 : _46.selectionStaticValues) === null || _47 === void 0 ? void 0 : _47.toString() }))] })), currentFields.includes("computedFieldValueType") && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "computedFieldValueType", className: classNames("form-field-label", styles.fieldLabel), children: "Computed Field Value Type" }), _jsx(SolidAutocomplete, { value: selectedComputedFieldValueType, suggestions: filteredComputedFieldValueTypes, completeMethod: searchComputedFieldValueType, field: "label", dropdown: true, className: classNames("solid-standard-autocomplete", (_j = {},
1608
1619
  _j[styles.fieldInvalidControl] = isFormFieldValid(formik, "computedFieldValueType"),
1609
1620
  _j)), onChange: function (e) {
1610
1621
  setSelectedComputedFieldValueType(e.value);
@@ -1621,33 +1632,33 @@ var FieldMetaDataForm = function (_a) {
1621
1632
  }, language: "json", height: "300px" }), _jsx("div", { className: " form-field-label mt-2", children: markdownText }), isFormFieldValid(formik, "selectionDynamicProviderCtxt") && (_jsx("p", { className: styles.fieldError, children: (_54 = (_53 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _53 === void 0 ? void 0 : _53.selectionDynamicProviderCtxt) === null || _54 === void 0 ? void 0 : _54.toString() }))] })), currentFields.includes("computedFieldValueProviderCtxt") && (_jsxs("div", { className: "field mt-4 flex flex-col gap-2 px-2 pt-2", children: [_jsx("label", { htmlFor: "computedFieldValueProviderCtxt", className: classNames("form-field-label", styles.fieldLabel), children: "Computed Field Value Provider Context" }), _jsx(SolidCodeEditor, { value: (_55 = formik.values.computedFieldValueProviderCtxt) !== null && _55 !== void 0 ? _55 : "", onChange: function (value) {
1622
1633
  formik.setFieldValue("computedFieldValueProviderCtxt", value !== null && value !== void 0 ? value : "");
1623
1634
  }, language: "json", height: "300px" }), _jsx("div", { className: "form-field-label mt-4", children: markdownText }), isFormFieldValid(formik, "computedFieldValueProviderCtxt") && (_jsx("p", { className: styles.fieldError, children: (_57 = (_56 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _56 === void 0 ? void 0 : _56.computedFieldValueProviderCtxt) === null || _57 === void 0 ? void 0 : _57.toString() }))] }))] })), showValidationSection && (_jsxs(_Fragment, { children: [_jsx("p", { className: "form-wrapper-heading", children: "Validations" }), _jsxs("div", { className: "flex flex-wrap -mx-2 -mt-2", children: [(showRegexFields && selectedTypeValue === "password") &&
1624
- _jsx(_Fragment, { children: _jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "regexPattern", className: classNames("form-field-label", styles.fieldLabel), children: "Password Policy" }), _jsx(SolidSelect, { value: selectedPasswordPolicy, options: passwordPolicyOptions, optionLabel: "label", optionValue: "value", onChange: function (_a) {
1635
+ _jsx(_Fragment, { children: _jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "regexPattern", className: classNames("form-field-label", styles.fieldLabel), children: "Password Policy" }), _jsx(SolidSelect, { value: selectedPasswordPolicy, options: passwordPolicyOptions, optionLabel: "label", optionValue: "value", onChange: function (_a) {
1625
1636
  var value = _a.value;
1626
1637
  setSelectedPasswordPolicy(value);
1627
1638
  if (value !== "custom") {
1628
1639
  formik.setFieldValue("regexPattern", value);
1629
1640
  }
1630
- }, placeholder: "Select a Password Policy", className: "w-full" })] }) }), showRegexFields && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "regexPattern", className: classNames("form-field-label", styles.fieldLabel), children: "Regex Pattern" }), _jsx(SolidInput, { type: "text", id: "regexPattern", name: "regexPattern", onChange: formik.handleChange, value: formik.values.regexPattern, className: classNames(styles.fieldInput, {
1641
+ }, placeholder: "Select a Password Policy", className: "w-full" })] }) }), showRegexFields && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "regexPattern", className: classNames("form-field-label", styles.fieldLabel), children: "Regex Pattern" }), _jsx(SolidInput, { type: "text", id: "regexPattern", name: "regexPattern", onChange: formik.handleChange, value: formik.values.regexPattern, className: classNames(styles.fieldInput, {
1631
1642
  "is-invalid": isFormFieldValid(formik, "regexPattern"),
1632
- }) }), isFormFieldValid(formik, "regexPattern") && (_jsx("p", { className: styles.fieldError, children: (_59 = (_58 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _58 === void 0 ? void 0 : _58.regexPattern) === null || _59 === void 0 ? void 0 : _59.toString() }))] }), showRegexFields && (_jsxs("div", { className: "field mt-2 mb-3 flex flex-col gap-2 px-2 pt-2 md:mb-3 md:w-1/2", children: [_jsx("label", { htmlFor: "regexPatternNotMatchingErrorMsg", className: classNames("form-field-label", styles.fieldLabel), children: "Regex Pattern Not Matching Error Msg" }), _jsx(SolidInput, { type: "text", id: "regexPatternNotMatchingErrorMsg", name: "regexPatternNotMatchingErrorMsg", onChange: formik.handleChange, value: formik.values.regexPatternNotMatchingErrorMsg, className: classNames(styles.fieldInput, {
1643
+ }) }), isFormFieldValid(formik, "regexPattern") && (_jsx("p", { className: styles.fieldError, children: (_59 = (_58 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _58 === void 0 ? void 0 : _58.regexPattern) === null || _59 === void 0 ? void 0 : _59.toString() }))] }), showRegexFields && (_jsxs("div", { className: "field mt-2 mb-3 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:mb-3 md:basis-1/2", children: [_jsx("label", { htmlFor: "regexPatternNotMatchingErrorMsg", className: classNames("form-field-label", styles.fieldLabel), children: "Regex Pattern Not Matching Error Msg" }), _jsx(SolidInput, { type: "text", id: "regexPatternNotMatchingErrorMsg", name: "regexPatternNotMatchingErrorMsg", onChange: formik.handleChange, value: formik.values.regexPatternNotMatchingErrorMsg, className: classNames(styles.fieldInput, {
1633
1644
  "is-invalid": isFormFieldValid(formik, "regexPatternNotMatchingErrorMsg"),
1634
1645
  }) }), isFormFieldValid(formik, "regexPatternNotMatchingErrorMsg") && (_jsx("p", { className: styles.fieldError, children: (_61 = (_60 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _60 === void 0 ? void 0 : _60.regexPatternNotMatchingErrorMsg) === null || _61 === void 0 ? void 0 : _61.toString() }))] }))] })), (showMinFields || showMaxFields) &&
1635
- _jsxs(_Fragment, { children: [showMinFields && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsxs("label", { htmlFor: "min", className: classNames("form-field-label", styles.fieldLabel), children: ["Min ", (selectedTypeValue !== "int" && selectedTypeValue !== "decimal") && "(Characters Allowed)"] }), _jsx("div", { className: styles.fieldNumberWrapper, children: _jsx(SolidNumberInput, { id: "min", name: "min", step: "0.00001", value: formik.values.min, onChange: function (event) { return formik.setFieldValue("min", event.value); }, className: classNames({
1646
+ _jsxs(_Fragment, { children: [showMinFields && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsxs("label", { htmlFor: "min", className: classNames("form-field-label", styles.fieldLabel), children: ["Min ", (selectedTypeValue !== "int" && selectedTypeValue !== "decimal") && "(Characters Allowed)"] }), _jsx("div", { className: styles.fieldNumberWrapper, children: _jsx(SolidNumberInput, { id: "min", name: "min", step: "0.00001", value: formik.values.min, onChange: function (event) { return formik.setFieldValue("min", event.value); }, className: classNames({
1636
1647
  "is-invalid": isFormFieldValid(formik, "min"),
1637
- }), disabled: isExistingFieldReadOnly }) }), isFormFieldValid(formik, "min") && (_jsx("p", { className: styles.fieldError, children: (_63 = (_62 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _62 === void 0 ? void 0 : _62.min) === null || _63 === void 0 ? void 0 : _63.toString() }))] })), showMaxFields && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsxs("label", { htmlFor: "max", className: classNames("form-field-label", styles.fieldLabel), children: ["Max ", (selectedTypeValue !== "int" &&
1648
+ }), disabled: isExistingFieldReadOnly }) }), isFormFieldValid(formik, "min") && (_jsx("p", { className: styles.fieldError, children: (_63 = (_62 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _62 === void 0 ? void 0 : _62.min) === null || _63 === void 0 ? void 0 : _63.toString() }))] })), showMaxFields && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsxs("label", { htmlFor: "max", className: classNames("form-field-label", styles.fieldLabel), children: ["Max ", (selectedTypeValue !== "int" &&
1638
1649
  selectedTypeValue !== "decimal") && "(Characters allowed)"] }), _jsx("div", { className: styles.fieldNumberWrapper, children: _jsx(SolidNumberInput, { id: "max", name: "max", step: "0.00001", value: formik.values.max, onChange: function (event) { return formik.setFieldValue("max", event.value); }, className: classNames({
1639
1650
  "is-invalid": isFormFieldValid(formik, "max"),
1640
- }), disabled: isExistingFieldReadOnly }) }), isFormFieldValid(formik, "max") && (_jsx("p", { className: styles.fieldError, children: (_65 = (_64 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _64 === void 0 ? void 0 : _64.max) === null || _65 === void 0 ? void 0 : _65.toString() }))] }))] }), showOrmOptions && (_jsxs("div", { className: "field mt-2 flex flex-col gap-2 px-2 pt-2 md:w-1/2", children: [_jsx("label", { htmlFor: "ormType", className: classNames("form-field-label", styles.fieldLabel), children: "Type" }), _jsx(SolidRadioGroup, { name: "ormType", value: selectedOrmType, onChange: function (value) {
1651
+ }), disabled: isExistingFieldReadOnly }) }), isFormFieldValid(formik, "max") && (_jsx("p", { className: styles.fieldError, children: (_65 = (_64 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _64 === void 0 ? void 0 : _64.max) === null || _65 === void 0 ? void 0 : _65.toString() }))] }))] }), showOrmOptions && (_jsxs("div", { className: "field mt-2 flex min-w-0 basis-full flex-col gap-2 px-2 pt-2 md:basis-1/2", children: [_jsx("label", { htmlFor: "ormType", className: classNames("form-field-label", styles.fieldLabel), children: "Type" }), _jsx(SolidRadioGroup, { name: "ormType", value: selectedOrmType, onChange: function (value) {
1641
1652
  formik.setFieldValue("ormType", value);
1642
1653
  setSelectedOrmType(value);
1643
1654
  }, options: (ormTypeOptions || []).map(function (ormType) { return ({
1644
1655
  value: ormType.label,
1645
1656
  label: (_jsxs("span", { className: classNames("ml-2", "form-field-label"), children: [ormType.label, _jsx("br", {}), _jsx("span", { className: "fieldSubTitle mt-0", children: "(".concat(ormType.description, ")") })] })),
1646
- }); }), className: "ormTypeflex", itemClassName: "mr-4 items-center" }), isFormFieldValid(formik, "ormType") && (_jsx("p", { className: styles.fieldError, children: (_67 = (_66 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _66 === void 0 ? void 0 : _66.ormType) === null || _67 === void 0 ? void 0 : _67.toString() }))] }))] })] })), (formik.values.relationType !== "many-to-many" && formik.values.relationType !== "one-to-many") && _jsx("p", { className: "form-wrapper-heading", children: "Settings" }), _jsxs("div", { className: "flex flex-wrap -mx-2 mt-2 md:mt-0", children: [currentFields.includes("required") && (formik.values.relationType !== "many-to-many" && formik.values.relationType !== "one-to-many") && (_jsxs("div", { className: "field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "required", name: "required", onChange: function (event) {
1657
+ }); }), className: "ormTypeflex", itemClassName: "mr-4 items-center" }), isFormFieldValid(formik, "ormType") && (_jsx("p", { className: styles.fieldError, children: (_67 = (_66 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _66 === void 0 ? void 0 : _66.ormType) === null || _67 === void 0 ? void 0 : _67.toString() }))] }))] })] })), (formik.values.relationType !== "many-to-many" && formik.values.relationType !== "one-to-many") && _jsx("p", { className: "form-wrapper-heading", children: "Settings" }), _jsxs("div", { className: "solid-field-settings-grid mt-2 md:mt-0", children: [currentFields.includes("required") && (formik.values.relationType !== "many-to-many" && formik.values.relationType !== "one-to-many") && (_jsxs("div", { className: "field solid-field-settings-item", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "required", name: "required", onChange: function (event) {
1647
1658
  if (!formik.values.isPrimaryKey && !formik.values.unique) {
1648
1659
  formik.setFieldValue("required", event.currentTarget.checked);
1649
1660
  }
1650
- }, checked: formik.values.required, disabled: formik.values.isPrimaryKey || formik.values.unique }), _jsxs("label", { htmlFor: "required", className: classNames("form-field-label", styles.fieldLabel), children: ["Required ", formik.values.isPrimaryKey && "(Auto-enabled for Primary Key)", !formik.values.isPrimaryKey && formik.values.unique && "(Auto-enabled for Unique)"] })] }), _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("p", { className: styles.fieldError, children: (_69 = (_68 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _68 === void 0 ? void 0 : _68.required) === null || _69 === void 0 ? void 0 : _69.toString() }))] })), currentFields.includes("unique") && selectedTypeValue !== 'relation' && (_jsxs("div", { className: "field flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "unique", name: "unique", onChange: function (event) {
1661
+ }, checked: formik.values.required, disabled: formik.values.isPrimaryKey || formik.values.unique }), _jsxs("label", { htmlFor: "required", className: classNames("form-field-label", styles.fieldLabel), children: ["Required ", formik.values.isPrimaryKey && "(Auto-enabled for Primary Key)", !formik.values.isPrimaryKey && formik.values.unique && "(Auto-enabled for Unique)"] })] }), _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("p", { className: styles.fieldError, children: (_69 = (_68 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _68 === void 0 ? void 0 : _68.required) === null || _69 === void 0 ? void 0 : _69.toString() }))] })), currentFields.includes("unique") && selectedTypeValue !== 'relation' && (_jsxs("div", { className: "field solid-field-settings-item", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "unique", name: "unique", onChange: function (event) {
1651
1662
  // Prevent unchecking if isPrimaryKey is true
1652
1663
  if (!formik.values.isPrimaryKey) {
1653
1664
  var nextValue = event.currentTarget.checked;
@@ -1661,20 +1672,20 @@ var FieldMetaDataForm = function (_a) {
1661
1672
  formik.setFieldValue("required", false);
1662
1673
  }
1663
1674
  }
1664
- }, checked: formik.values.unique, disabled: formik.values.isPrimaryKey }), _jsxs("label", { htmlFor: "unique", className: classNames("form-field-label", styles.fieldLabel), children: ["Unique ", formik.values.isPrimaryKey && "(Auto-enabled for Primary Key)"] })] }), _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("p", { className: styles.fieldError, children: (_71 = (_70 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _70 === void 0 ? void 0 : _70.unique) === null || _71 === void 0 ? void 0 : _71.toString() }))] })), currentFields.includes("index") && selectedTypeValue !== 'relation' && (_jsxs("div", { className: "field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "index", name: "index", onChange: function (event) {
1675
+ }, checked: formik.values.unique, disabled: formik.values.isPrimaryKey }), _jsxs("label", { htmlFor: "unique", className: classNames("form-field-label", styles.fieldLabel), children: ["Unique ", formik.values.isPrimaryKey && "(Auto-enabled for Primary Key)"] })] }), _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("p", { className: styles.fieldError, children: (_71 = (_70 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _70 === void 0 ? void 0 : _70.unique) === null || _71 === void 0 ? void 0 : _71.toString() }))] })), currentFields.includes("index") && selectedTypeValue !== 'relation' && (_jsxs("div", { className: "field solid-field-settings-item", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "index", name: "index", onChange: function (event) {
1665
1676
  formik.setFieldValue("index", event.currentTarget.checked);
1666
- }, checked: formik.values.index }), _jsx("label", { htmlFor: "index", className: classNames("form-field-label", styles.fieldLabel), children: "Index" })] }), isFormFieldValid(formik, "index") && (_jsx("p", { className: styles.fieldError, children: (_73 = (_72 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _72 === void 0 ? void 0 : _72.index) === null || _73 === void 0 ? void 0 : _73.toString() }))] })), currentFields.includes("private") && selectedTypeValue !== 'relation' && (_jsxs("div", { className: "field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "private", name: "private", onChange: function (event) {
1677
+ }, checked: formik.values.index }), _jsx("label", { htmlFor: "index", className: classNames("form-field-label", styles.fieldLabel), children: "Index" })] }), isFormFieldValid(formik, "index") && (_jsx("p", { className: styles.fieldError, children: (_73 = (_72 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _72 === void 0 ? void 0 : _72.index) === null || _73 === void 0 ? void 0 : _73.toString() }))] })), currentFields.includes("private") && selectedTypeValue !== 'relation' && (_jsxs("div", { className: "field solid-field-settings-item", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "private", name: "private", onChange: function (event) {
1667
1678
  formik.setFieldValue("private", event.currentTarget.checked);
1668
- }, checked: formik.values.private }), _jsx("label", { htmlFor: "private", className: classNames("form-field-label", styles.fieldLabel), children: "Private" })] }), _jsx("p", { className: "text-xs mt-2", children: "This field will not show up in the API response" }), isFormFieldValid(formik, "private") && (_jsx("p", { className: styles.fieldError, children: (_75 = (_74 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _74 === void 0 ? void 0 : _74.private) === null || _75 === void 0 ? void 0 : _75.toString() }))] })), currentFields.includes("encrypt") && selectedTypeValue !== 'relation' && (_jsxs("div", { className: "field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "encrypt", name: "encrypt", onChange: function (event) {
1679
+ }, checked: formik.values.private }), _jsx("label", { htmlFor: "private", className: classNames("form-field-label", styles.fieldLabel), children: "Private" })] }), _jsx("p", { className: "text-xs mt-2", children: "This field will not show up in the API response" }), isFormFieldValid(formik, "private") && (_jsx("p", { className: styles.fieldError, children: (_75 = (_74 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _74 === void 0 ? void 0 : _74.private) === null || _75 === void 0 ? void 0 : _75.toString() }))] })), currentFields.includes("encrypt") && selectedTypeValue !== 'relation' && (_jsxs("div", { className: "field solid-field-settings-item", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "encrypt", name: "encrypt", onChange: function (event) {
1669
1680
  formik.setFieldValue("encrypt", event.currentTarget.checked);
1670
1681
  setEncryptState(event.currentTarget.checked);
1671
- }, checked: formik.values.encrypt }), _jsx("label", { htmlFor: "encrypt", className: classNames("form-field-label", styles.fieldLabel), children: "Encrypt" })] }), isFormFieldValid(formik, "encrypt") && (_jsx("p", { className: styles.fieldError, children: (_77 = (_76 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _76 === void 0 ? void 0 : _76.encrypt) === null || _77 === void 0 ? void 0 : _77.toString() }))] })), currentFields.includes("isMultiSelect") && (_jsxs("div", { className: "field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "isMultiSelect", name: "isMultiSelect", onChange: function (event) {
1682
+ }, checked: formik.values.encrypt }), _jsx("label", { htmlFor: "encrypt", className: classNames("form-field-label", styles.fieldLabel), children: "Encrypt" })] }), isFormFieldValid(formik, "encrypt") && (_jsx("p", { className: styles.fieldError, children: (_77 = (_76 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _76 === void 0 ? void 0 : _76.encrypt) === null || _77 === void 0 ? void 0 : _77.toString() }))] })), currentFields.includes("isMultiSelect") && (_jsxs("div", { className: "field solid-field-settings-item", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "isMultiSelect", name: "isMultiSelect", onChange: function (event) {
1672
1683
  formik.setFieldValue("isMultiSelect", event.currentTarget.checked);
1673
- }, checked: formik.values.isMultiSelect }), _jsx("label", { htmlFor: "isMultiSelect", className: classNames("form-field-label", styles.fieldLabel), children: "Is MultiSelect" })] }), isFormFieldValid(formik, "isMultiSelect") && (_jsx("p", { className: styles.fieldError, children: (_79 = (_78 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _78 === void 0 ? void 0 : _78.isMultiSelect) === null || _79 === void 0 ? void 0 : _79.toString() }))] })), currentFields.includes("enableAuditTracking") && formik.values.relationType !== "one-to-many" && (_jsxs("div", { className: "field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "enableAuditTracking", name: "enableAuditTracking", onChange: function (event) {
1684
+ }, checked: formik.values.isMultiSelect }), _jsx("label", { htmlFor: "isMultiSelect", className: classNames("form-field-label", styles.fieldLabel), children: "Is MultiSelect" })] }), isFormFieldValid(formik, "isMultiSelect") && (_jsx("p", { className: styles.fieldError, children: (_79 = (_78 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _78 === void 0 ? void 0 : _78.isMultiSelect) === null || _79 === void 0 ? void 0 : _79.toString() }))] })), currentFields.includes("enableAuditTracking") && formik.values.relationType !== "one-to-many" && (_jsxs("div", { className: "field solid-field-settings-item", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "enableAuditTracking", name: "enableAuditTracking", onChange: function (event) {
1674
1685
  formik.setFieldValue("enableAuditTracking", event.currentTarget.checked);
1675
- }, checked: formik.values.enableAuditTracking }), _jsx("label", { htmlFor: "enableAuditTracking", className: classNames("form-field-label", styles.fieldLabel), children: "Enable Audit Tracking" })] }), _jsx("p", { className: "fieldSubTitle", children: "By selecting this option, you are setting audit trail for this field." }), isFormFieldValid(formik, "enableAuditTracking") && (_jsx("p", { className: styles.fieldError, children: (_81 = (_80 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _80 === void 0 ? void 0 : _80.enableAuditTracking) === null || _81 === void 0 ? void 0 : _81.toString() }))] })), currentFields.includes("isUserKey") && formik.values.unique && (_jsxs("div", { className: "field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "isUserKey", name: "isUserKey", onChange: function (event) {
1686
+ }, checked: formik.values.enableAuditTracking }), _jsx("label", { htmlFor: "enableAuditTracking", className: classNames("form-field-label", styles.fieldLabel), children: "Enable Audit Tracking" })] }), _jsx("p", { className: "fieldSubTitle", children: "By selecting this option, you are setting audit trail for this field." }), isFormFieldValid(formik, "enableAuditTracking") && (_jsx("p", { className: styles.fieldError, children: (_81 = (_80 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _80 === void 0 ? void 0 : _80.enableAuditTracking) === null || _81 === void 0 ? void 0 : _81.toString() }))] })), currentFields.includes("isUserKey") && formik.values.unique && (_jsxs("div", { className: "field solid-field-settings-item", children: [_jsxs("div", { className: "solid-field-checkbox-row", children: [_jsx(SolidCheckbox, { id: "isUserKey", name: "isUserKey", onChange: function (event) {
1676
1687
  formik.setFieldValue("isUserKey", event.currentTarget.checked);
1677
- }, checked: formik.values.isUserKey }), _jsx("label", { htmlFor: "isUserKey", className: classNames("form-field-label", styles.fieldLabel), 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("p", { className: styles.fieldError, children: (_83 = (_82 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _82 === void 0 ? void 0 : _82.isUserKey) === null || _83 === void 0 ? void 0 : _83.toString() }))] })), currentFields.includes("isPrimaryKey") && (modelMetaData === null || modelMetaData === void 0 ? void 0 : modelMetaData.isLegacyTable) && (_jsxs("div", { className: "field mt-2 flex w-1/2 flex-col gap-2 px-2 pt-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(SolidCheckbox, { id: "isPrimaryKey", name: "isPrimaryKey", onChange: function (event) {
1688
+ }, checked: formik.values.isUserKey }), _jsx("label", { htmlFor: "isUserKey", className: classNames("form-field-label", styles.fieldLabel), 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("p", { className: styles.fieldError, children: (_83 = (_82 = formik === null || formik === void 0 ? void 0 : formik.errors) === null || _82 === void 0 ? void 0 : _82.isUserKey) === null || _83 === void 0 ? void 0 : _83.toString() }))] })), currentFields.includes("isPrimaryKey") && (modelMetaData === null || modelMetaData === void 0 ? void 0 : modelMetaData.isLegacyTable) && (_jsxs("div", { className: "field solid-field-settings-item", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(SolidCheckbox, { id: "isPrimaryKey", name: "isPrimaryKey", onChange: function (event) {
1678
1689
  var checked = event.currentTarget.checked;
1679
1690
  formik.setFieldValue("isPrimaryKey", checked);
1680
1691
  // Auto-set required and unique when isPrimaryKey is checked