@solidxai/core-ui 0.1.5-beta.11 → 0.1.5-beta.13

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 (193) hide show
  1. package/dist/components/auth/GoogleAuthChecking.d.ts.map +1 -1
  2. package/dist/components/auth/GoogleAuthChecking.js +10 -10
  3. package/dist/components/auth/GoogleAuthChecking.js.map +1 -1
  4. package/dist/components/auth/GoogleAuthChecking.tsx +8 -9
  5. package/dist/components/auth/SolidChangeForcePassword.d.ts.map +1 -1
  6. package/dist/components/auth/SolidChangeForcePassword.js +9 -10
  7. package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
  8. package/dist/components/auth/SolidChangeForcePassword.tsx +6 -9
  9. package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
  10. package/dist/components/auth/SolidForgotPassword.js +8 -8
  11. package/dist/components/auth/SolidForgotPassword.js.map +1 -1
  12. package/dist/components/auth/SolidForgotPassword.tsx +6 -8
  13. package/dist/components/auth/SolidInitialLoginOtp.d.ts.map +1 -1
  14. package/dist/components/auth/SolidInitialLoginOtp.js +57 -57
  15. package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
  16. package/dist/components/auth/SolidInitialLoginOtp.tsx +10 -11
  17. package/dist/components/auth/SolidInitiateRegisterOtp.d.ts.map +1 -1
  18. package/dist/components/auth/SolidInitiateRegisterOtp.js +57 -57
  19. package/dist/components/auth/SolidInitiateRegisterOtp.js.map +1 -1
  20. package/dist/components/auth/SolidInitiateRegisterOtp.tsx +10 -11
  21. package/dist/components/auth/SolidLogin.d.ts.map +1 -1
  22. package/dist/components/auth/SolidLogin.js +12 -12
  23. package/dist/components/auth/SolidLogin.js.map +1 -1
  24. package/dist/components/auth/SolidLogin.tsx +11 -16
  25. package/dist/components/auth/SolidRegister.d.ts.map +1 -1
  26. package/dist/components/auth/SolidRegister.js +19 -19
  27. package/dist/components/auth/SolidRegister.js.map +1 -1
  28. package/dist/components/auth/SolidRegister.tsx +18 -23
  29. package/dist/components/auth/SolidResetPassword.d.ts.map +1 -1
  30. package/dist/components/auth/SolidResetPassword.js +15 -15
  31. package/dist/components/auth/SolidResetPassword.js.map +1 -1
  32. package/dist/components/auth/SolidResetPassword.tsx +7 -8
  33. package/dist/components/common/GeneralSettings.d.ts.map +1 -1
  34. package/dist/components/common/GeneralSettings.js +87 -120
  35. package/dist/components/common/GeneralSettings.js.map +1 -1
  36. package/dist/components/common/GeneralSettings.tsx +12 -42
  37. package/dist/components/common/GlobalToast.d.ts +2 -0
  38. package/dist/components/common/GlobalToast.d.ts.map +1 -0
  39. package/dist/components/common/GlobalToast.js +25 -0
  40. package/dist/components/common/GlobalToast.js.map +1 -0
  41. package/dist/components/common/GlobalToast.tsx +25 -0
  42. package/dist/components/common/SolidExport.d.ts.map +1 -1
  43. package/dist/components/common/SolidExport.js +19 -31
  44. package/dist/components/common/SolidExport.js.map +1 -1
  45. package/dist/components/common/SolidExport.tsx +7 -19
  46. package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
  47. package/dist/components/common/SolidFormStepper.js +41 -41
  48. package/dist/components/common/SolidFormStepper.js.map +1 -1
  49. package/dist/components/common/SolidFormStepper.tsx +5 -6
  50. package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.d.ts.map +1 -1
  51. package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.js +9 -9
  52. package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.js.map +1 -1
  53. package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.tsx +8 -9
  54. package/dist/components/core/common/SolidAccountSettings/SolidNotifications.d.ts.map +1 -1
  55. package/dist/components/core/common/SolidAccountSettings/SolidNotifications.js +8 -8
  56. package/dist/components/core/common/SolidAccountSettings/SolidNotifications.js.map +1 -1
  57. package/dist/components/core/common/SolidAccountSettings/SolidNotifications.tsx +7 -9
  58. package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.d.ts.map +1 -1
  59. package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.js +11 -11
  60. package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.js.map +1 -1
  61. package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.tsx +10 -11
  62. package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.d.ts.map +1 -1
  63. package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.js +9 -9
  64. package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.js.map +1 -1
  65. package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.tsx +8 -9
  66. package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.d.ts.map +1 -1
  67. package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.js +7 -7
  68. package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.js.map +1 -1
  69. package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.tsx +6 -7
  70. package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
  71. package/dist/components/core/common/SolidGlobalSearchElement.js +78 -21
  72. package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
  73. package/dist/components/core/common/SolidGlobalSearchElement.tsx +65 -10
  74. package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.d.ts.map +1 -1
  75. package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.js +6 -8
  76. package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.js.map +1 -1
  77. package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.tsx +5 -9
  78. package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.d.ts.map +1 -1
  79. package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.js +9 -11
  80. package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.js.map +1 -1
  81. package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.tsx +5 -10
  82. package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.d.ts.map +1 -1
  83. package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.js +5 -6
  84. package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.js.map +1 -1
  85. package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.tsx +5 -8
  86. package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.d.ts.map +1 -1
  87. package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.js +10 -12
  88. package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.js.map +1 -1
  89. package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.tsx +6 -11
  90. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.d.ts.map +1 -1
  91. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js +11 -6
  92. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js.map +1 -1
  93. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +13 -1
  94. package/dist/components/core/form/SolidFormUserViewLayout.d.ts.map +1 -1
  95. package/dist/components/core/form/SolidFormUserViewLayout.js +7 -8
  96. package/dist/components/core/form/SolidFormUserViewLayout.js.map +1 -1
  97. package/dist/components/core/form/SolidFormUserViewLayout.tsx +5 -7
  98. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  99. package/dist/components/core/form/SolidFormView.js +12 -21
  100. package/dist/components/core/form/SolidFormView.js.map +1 -1
  101. package/dist/components/core/form/SolidFormView.tsx +11 -33
  102. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
  103. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +37 -26
  104. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
  105. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +38 -5
  106. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
  107. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +11 -11
  108. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
  109. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +9 -11
  110. package/dist/components/core/kanban/KanbanUserViewLayout.d.ts.map +1 -1
  111. package/dist/components/core/kanban/KanbanUserViewLayout.js +7 -8
  112. package/dist/components/core/kanban/KanbanUserViewLayout.js.map +1 -1
  113. package/dist/components/core/kanban/KanbanUserViewLayout.tsx +4 -6
  114. package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
  115. package/dist/components/core/kanban/SolidKanbanView.js +5 -7
  116. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  117. package/dist/components/core/kanban/SolidKanbanView.tsx +4 -9
  118. package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.d.ts.map +1 -1
  119. package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.js +13 -13
  120. package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.js.map +1 -1
  121. package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.tsx +5 -6
  122. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  123. package/dist/components/core/list/SolidListView.js +20 -67
  124. package/dist/components/core/list/SolidListView.js.map +1 -1
  125. package/dist/components/core/list/SolidListView.tsx +9 -76
  126. package/dist/components/core/model/CreateModel.d.ts.map +1 -1
  127. package/dist/components/core/model/CreateModel.js +15 -25
  128. package/dist/components/core/model/CreateModel.js.map +1 -1
  129. package/dist/components/core/model/CreateModel.tsx +12 -32
  130. package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
  131. package/dist/components/core/model/FieldMetaData.js +6 -17
  132. package/dist/components/core/model/FieldMetaData.js.map +1 -1
  133. package/dist/components/core/model/FieldMetaData.tsx +5 -26
  134. package/dist/components/core/model/ModelMetaData.d.ts.map +1 -1
  135. package/dist/components/core/model/ModelMetaData.js +48 -55
  136. package/dist/components/core/model/ModelMetaData.js.map +1 -1
  137. package/dist/components/core/model/ModelMetaData.tsx +4 -22
  138. package/dist/components/core/module/CreateModule.d.ts.map +1 -1
  139. package/dist/components/core/module/CreateModule.js +42 -44
  140. package/dist/components/core/module/CreateModule.js.map +1 -1
  141. package/dist/components/core/module/CreateModule.tsx +13 -27
  142. package/dist/components/core/module/ModuleListViewData.d.ts.map +1 -1
  143. package/dist/components/core/module/ModuleListViewData.js +11 -7
  144. package/dist/components/core/module/ModuleListViewData.js.map +1 -1
  145. package/dist/components/core/module/ModuleListViewData.tsx +10 -8
  146. package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
  147. package/dist/components/core/tree/SolidTreeView.js +32 -69
  148. package/dist/components/core/tree/SolidTreeView.js.map +1 -1
  149. package/dist/components/core/tree/SolidTreeView.tsx +8 -47
  150. package/dist/components/core/users/CreateUser.d.ts.map +1 -1
  151. package/dist/components/core/users/CreateUser.js +24 -37
  152. package/dist/components/core/users/CreateUser.js.map +1 -1
  153. package/dist/components/core/users/CreateUser.tsx +8 -46
  154. package/dist/components/core/users/UserListView.d.ts.map +1 -1
  155. package/dist/components/core/users/UserListView.js +9 -16
  156. package/dist/components/core/users/UserListView.js.map +1 -1
  157. package/dist/components/core/users/UserListView.tsx +5 -21
  158. package/dist/components/layout/AdminLayout.d.ts.map +1 -1
  159. package/dist/components/layout/AdminLayout.js +4 -2
  160. package/dist/components/layout/AdminLayout.js.map +1 -1
  161. package/dist/components/layout/AdminLayout.tsx +4 -2
  162. package/dist/components/layout/AppSidebar.d.ts.map +1 -1
  163. package/dist/components/layout/AppSidebar.js +1 -2
  164. package/dist/components/layout/AppSidebar.js.map +1 -1
  165. package/dist/components/layout/AppSidebar.tsx +0 -2
  166. package/dist/components/layout/Layout.d.ts.map +1 -1
  167. package/dist/components/layout/Layout.js +2 -1
  168. package/dist/components/layout/Layout.js.map +1 -1
  169. package/dist/components/layout/Layout.tsx +2 -0
  170. package/dist/components/layout/navbar-one.d.ts.map +1 -1
  171. package/dist/components/layout/navbar-one.js +1 -2
  172. package/dist/components/layout/navbar-one.js.map +1 -1
  173. package/dist/components/layout/navbar-one.tsx +0 -2
  174. package/dist/components/layout/navbar-two-menu.d.ts.map +1 -1
  175. package/dist/components/layout/navbar-two-menu.js +50 -24
  176. package/dist/components/layout/navbar-two-menu.js.map +1 -1
  177. package/dist/components/layout/navbar-two-menu.tsx +48 -30
  178. package/dist/index.d.ts +4 -0
  179. package/dist/index.d.ts.map +1 -1
  180. package/dist/index.js +3 -0
  181. package/dist/index.js.map +1 -1
  182. package/dist/index.ts +4 -0
  183. package/dist/redux/features/toastSlice.d.ts +15 -0
  184. package/dist/redux/features/toastSlice.d.ts.map +1 -0
  185. package/dist/redux/features/toastSlice.js +20 -0
  186. package/dist/redux/features/toastSlice.js.map +1 -0
  187. package/dist/redux/features/toastSlice.ts +35 -0
  188. package/dist/redux/store/defaultStoreConfig.d.ts +1 -0
  189. package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
  190. package/dist/redux/store/defaultStoreConfig.js +2 -1
  191. package/dist/redux/store/defaultStoreConfig.js.map +1 -1
  192. package/dist/redux/store/defaultStoreConfig.ts +2 -0
  193. package/package.json +1 -1
@@ -58,8 +58,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
58
58
  import { useFormik } from 'formik';
59
59
  import { Button } from 'primereact/button';
60
60
  import { InputText } from 'primereact/inputtext';
61
- import { Toast } from 'primereact/toast';
62
- import { useCallback, useEffect, useRef, useState } from 'react';
61
+ import { useCallback, useEffect, useState } from 'react';
63
62
  import { CancelButton } from './CancelButton';
64
63
  import { InputSwitch } from 'primereact/inputswitch';
65
64
  import { RadioButton } from 'primereact/radiobutton';
@@ -78,11 +77,10 @@ import { Dropdown } from 'primereact/dropdown';
78
77
  import { OpenAiProviderComponent } from './SolidSettings/LlmSettings/OpenAiProviderComponent';
79
78
  import { AnthropicProviderComponent } from './SolidSettings/LlmSettings/AnthropicProviderComponent';
80
79
  import { useDispatch } from 'react-redux';
81
- import { handleError } from '../../helpers/ToastContainer';
82
80
  import { ERROR_MESSAGES } from '../../constants/error-messages';
83
81
  import { useBulkUpdateSolidSettingsMutation, useLazyGetSolidSettingsQuery } from '../../redux/api/solidSettingsApi';
84
82
  import { env } from "../../adapters/env";
85
- import showToast from "../../helpers/showToast";
83
+ import { showToast } from '../../redux/features/toastSlice';
86
84
  export var GeneralSettings = function () {
87
85
  var _a, _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;
88
86
  var _38 = useState(null), appLogoPreview = _38[0], setAppLogoPreview = _38[1];
@@ -97,7 +95,6 @@ export var GeneralSettings = function () {
97
95
  }, [trigger]);
98
96
  var pathname = usePathname();
99
97
  var bulkUpdateSolidSettings = useBulkUpdateSolidSettingsMutation()[0];
100
- var toast = useRef(null);
101
98
  var initialValues = {
102
99
  appLogo: (_b = (_a = solidSettingsData === null || solidSettingsData === void 0 ? void 0 : solidSettingsData.data) === null || _a === void 0 ? void 0 : _a.appLogo) !== null && _b !== void 0 ? _b : null,
103
100
  companylogo: (_d = (_c = solidSettingsData === null || solidSettingsData === void 0 ? void 0 : solidSettingsData.data) === null || _c === void 0 ? void 0 : _c.companylogo) !== null && _d !== void 0 ? _d : null,
@@ -185,7 +182,7 @@ export var GeneralSettings = function () {
185
182
  }
186
183
  });
187
184
  if (updatedSettingsArray_1.length === 0) {
188
- showToast(toast, "success", "No Changes", "No settings were updated");
185
+ dispatch(showToast({ severity: "success", summary: "No Changes", detail: "No settings were updated" }));
189
186
  return [2 /*return*/];
190
187
  }
191
188
  // Append settings array to formData
@@ -194,14 +191,14 @@ export var GeneralSettings = function () {
194
191
  case 1:
195
192
  response = _b.sent();
196
193
  if (response.statusCode === 200) {
197
- showToast(toast, "success", "Updated", "Settings updated");
194
+ dispatch(showToast({ severity: "success", summary: "Updated", detail: "Settings updated" }));
198
195
  trigger("");
199
196
  }
200
197
  return [3 /*break*/, 3];
201
198
  case 2:
202
199
  error_1 = _b.sent();
203
200
  console.log("Error updating settings:", error_1);
204
- showToast(toast, "error", ERROR_MESSAGES.FAILED, ((_a = error_1 === null || error_1 === void 0 ? void 0 : error_1.data) === null || _a === void 0 ? void 0 : _a.message) || ERROR_MESSAGES.SOMETHING_WRONG);
201
+ dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.FAILED, detail: ((_a = error_1 === null || error_1 === void 0 ? void 0 : error_1.data) === null || _a === void 0 ? void 0 : _a.message) || ERROR_MESSAGES.SOMETHING_WRONG }));
205
202
  return [3 /*break*/, 3];
206
203
  case 3: return [2 /*return*/];
207
204
  }
@@ -216,8 +213,8 @@ export var GeneralSettings = function () {
216
213
  case 1:
217
214
  errors = _a.sent();
218
215
  errorMessages = Object.values(errors);
219
- if (errorMessages.length > 0 && toast.current) {
220
- handleError(errorMessages);
216
+ if (errorMessages.length > 0) {
217
+ dispatch(showToast({ severity: 'error', summary: 'Error', detail: Array.isArray(errorMessages) ? errorMessages.join(', ') : errorMessages }));
221
218
  }
222
219
  return [2 /*return*/];
223
220
  }
@@ -231,16 +228,10 @@ export var GeneralSettings = function () {
231
228
  right: 'The form will appear on the right side of the screen, and the banner will be positioned on the left side'
232
229
  };
233
230
  var onAppLogoDrop = useCallback(function (acceptedFiles) {
234
- var _a;
235
231
  var file = acceptedFiles[0];
236
232
  if (file) {
237
233
  if (file.size > 2 * 1024 * 1024) {
238
- (_a = toast.current) === null || _a === void 0 ? void 0 : _a.show({
239
- severity: "error",
240
- summary: "File too large",
241
- detail: "Maximum file size is 2MB",
242
- sticky: true
243
- });
234
+ dispatch(showToast({ severity: "error", summary: "File too large", detail: "Maximum file size is 2MB" }));
244
235
  return;
245
236
  }
246
237
  formik.setFieldValue("appLogo", file);
@@ -248,16 +239,10 @@ export var GeneralSettings = function () {
248
239
  }
249
240
  }, [formik]);
250
241
  var onCompanyLogoDrop = useCallback(function (acceptedFiles) {
251
- var _a;
252
242
  var file = acceptedFiles[0];
253
243
  if (file) {
254
244
  if (file.size > 2 * 1024 * 1024) {
255
- (_a = toast.current) === null || _a === void 0 ? void 0 : _a.show({
256
- severity: "error",
257
- summary: "File too large",
258
- detail: "Maximum file size is 2MB",
259
- sticky: true
260
- });
245
+ dispatch(showToast({ severity: "error", summary: "File too large", detail: "Maximum file size is 2MB" }));
261
246
  return;
262
247
  }
263
248
  formik.setFieldValue("companylogo", file);
@@ -299,16 +284,10 @@ export var GeneralSettings = function () {
299
284
  }
300
285
  };
301
286
  var onAuthScreenRightBackgroundImageDrop = useCallback(function (acceptedFiles) {
302
- var _a;
303
287
  var file = acceptedFiles[0];
304
288
  if (file) {
305
289
  if (file.size > 2 * 1024 * 1024) {
306
- (_a = toast.current) === null || _a === void 0 ? void 0 : _a.show({
307
- severity: "error",
308
- summary: ERROR_MESSAGES.FILE_LARGE,
309
- detail: ERROR_MESSAGES.MAX_FILE_SIZE,
310
- sticky: true
311
- });
290
+ dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.FILE_LARGE, detail: ERROR_MESSAGES.MAX_FILE_SIZE }));
312
291
  return;
313
292
  }
314
293
  formik.setFieldValue("authScreenRightBackgroundImage", file);
@@ -316,16 +295,10 @@ export var GeneralSettings = function () {
316
295
  }
317
296
  }, [formik]);
318
297
  var onAuthScreenLeftBackgroundImageDrop = useCallback(function (acceptedFiles) {
319
- var _a;
320
298
  var file = acceptedFiles[0];
321
299
  if (file) {
322
300
  if (file.size > 2 * 1024 * 1024) {
323
- (_a = toast.current) === null || _a === void 0 ? void 0 : _a.show({
324
- severity: "error",
325
- summary: ERROR_MESSAGES.FILE_LARGE,
326
- detail: ERROR_MESSAGES.MAX_FILE_SIZE,
327
- sticky: true,
328
- });
301
+ dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.FILE_LARGE, detail: ERROR_MESSAGES.MAX_FILE_SIZE }));
329
302
  return;
330
303
  }
331
304
  formik.setFieldValue("authScreenLeftBackgroundImage", file);
@@ -333,16 +306,10 @@ export var GeneralSettings = function () {
333
306
  }
334
307
  }, [formik]);
335
308
  var onAuthScreenCenterBackgroundImageDrop = useCallback(function (acceptedFiles) {
336
- var _a;
337
309
  var file = acceptedFiles[0];
338
310
  if (file) {
339
311
  if (file.size > 2 * 1024 * 1024) {
340
- (_a = toast.current) === null || _a === void 0 ? void 0 : _a.show({
341
- severity: "error",
342
- summary: ERROR_MESSAGES.FILE_LARGE,
343
- detail: ERROR_MESSAGES.MAX_FILE_SIZE,
344
- sticky: true,
345
- });
312
+ dispatch(showToast({ severity: "error", summary: ERROR_MESSAGES.FILE_LARGE, detail: ERROR_MESSAGES.MAX_FILE_SIZE }));
346
313
  return;
347
314
  }
348
315
  formik.setFieldValue("authScreenCenterBackgroundImage", file);
@@ -448,80 +415,80 @@ export var GeneralSettings = function () {
448
415
  formik.setFieldValue("solidXGenAiCodeBuilderConfig.availableProviders", updatedProfiles);
449
416
  };
450
417
  var currentProfile = ((_36 = formik.values.solidXGenAiCodeBuilderConfig.availableProviders) !== null && _36 !== void 0 ? _36 : []).find(function (p) { return p.provider === formik.values.solidXGenAiCodeBuilderConfig.defaultProvider; }) || null;
451
- return (_jsxs("div", { className: "page-parent-wrapper", children: [_jsx(Toast, { ref: toast }), _jsx("div", { className: "solid-form-wrapper", children: _jsx("div", { className: "solid-form-section", children: _jsxs("form", { onSubmit: formik.handleSubmit, children: [_jsxs("div", { className: "page-header secondary-border-bottom", children: [_jsx("div", { className: "form-wrapper-title ", children: "Settings" }), _jsxs("div", { className: "gap-3 flex", children: [formik.dirty &&
452
- _jsx(Button, { label: "Save", size: "small", onClick: function () { return showError(); }, type: "submit" }), _jsx(CancelButton, {})] })] }), _jsxs("div", { className: "px-4 py-3 md:p-4 solid-form-content", children: [pathname.includes("app-settings") &&
453
- _jsxs(_Fragment, { children: [_jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "formgrid grid", children: [_jsxs("div", { className: "col-12 md:col-6", children: [_jsx("p", { className: 'font-bold ', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "App Logo " }), _jsxs("div", { children: [_jsxs("div", __assign({}, getAppLogoRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getAppLogoInputProps())), _jsx(SettingDropzoneActivePlaceholder, {})] })), _jsx("div", { className: "mt-2", children: (function () {
454
- var logoSrc = SolidLogo.src || SolidLogo;
455
- var src = appLogoPreview
456
- ? appLogoPreview
457
- : formik.values.appLogo
458
- ? formik.values.appLogo
459
- : logoSrc;
460
- var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
461
- if (!isBlobOrAbsolute && !src.startsWith("/")) {
462
- src = "".concat(env("API_URL"), "/").concat(src);
463
- }
464
- return (_jsx(SolidUploadedImage, { src: src, className: 'solid-app-logo' }));
465
- })() }), formik.values.appLogo && (_jsx(SettingsImageRemoveButton, { onClick: removeAppLogo }))] })] }), _jsxs("div", { className: "col-12 md:col-6", children: [_jsx("p", { className: 'font-bold ', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Company Logo " }), _jsxs("div", { children: [_jsxs("div", __assign({}, getCompanyLogoRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getCompanyLogoInputProps())), _jsx(SettingDropzoneActivePlaceholder, {})] })), _jsx("div", { className: "mt-2", children: (function () {
466
- var logoSrc = SolidLogo.src || SolidLogo;
467
- var src = companyLogoPreview
468
- ? companyLogoPreview
469
- : formik.values.companylogo
470
- ? formik.values.companylogo
471
- : logoSrc;
472
- var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
473
- if (!isBlobOrAbsolute && !src.startsWith("/")) {
474
- src = "".concat(env("API_URL"), "/").concat(src);
475
- }
476
- return (_jsx(SolidUploadedImage, { src: src, className: 'solid-compony-logo' }));
477
- })() }), formik.values.companylogo && (_jsx(SettingsImageRemoveButton, { onClick: removeCompanyLogo }))] })] })] }) }) }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "App Logo Position" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "flex align-items-center gap-3", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "appLogoPosition-in_form_view", name: "appLogoPosition", value: "in_form_view", checked: formik.values.appLogoPosition === "in_form_view", onChange: function (e) { return formik.setFieldValue("appLogoPosition", e.value); } }), _jsx("label", { htmlFor: "appLogoPosition-in_form_view", className: "ml-2", children: "In Form View" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "appLogoPosition-in_image_view", name: "appLogoPosition", value: "in_image_view", checked: formik.values.appLogoPosition === "in_image_view", onChange: function (e) { return formik.setFieldValue("appLogoPosition", e.value); } }), _jsx("label", { htmlFor: "appLogoPosition-in_image_view", className: "ml-2", children: "In Image View" })] })] }) }) }), _jsx("div", { className: 'mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Title & Description Details " }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "formgrid grid", children: [_jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Show Details on Authentication Screen" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "showAuthContent", checked: formik.values.showAuthContent, onChange: function (e) { return formik.setFieldValue("showAuthContent", e.value); } }) })] }) }), _jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "App Title" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "appTitle", name: "appTitle", onChange: formik.handleChange, value: formik.values.appTitle, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6 mt-4", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "App Subtitle" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "appSubtitle", name: "appSubtitle", onChange: formik.handleChange, value: formik.values.appSubtitle, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6 mt-4", children: _jsxs("div", { className: "formgrid grid align-items-start", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Description" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputTextarea, { rows: 3, id: "appDescription", name: "appDescription", onChange: formik.handleChange, value: formik.values.appDescription, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6 mt-4", children: _jsxs("div", { className: "formgrid grid align-items-start", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Copyright" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputTextarea, { rows: 3, id: "copyright", name: "copyright", onChange: formik.handleChange, value: formik.values.copyright, className: 'w-full' }) })] }) })] }) }) }), _jsx("div", { className: 'mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Legal Links" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "formgrid grid", children: [_jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Show Legal Links" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "showLegalLinks", checked: formik.values.showLegalLinks, onChange: function (e) { return formik.setFieldValue("showLegalLinks", e.value); } }) })] }) }), _jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 py-2 md:py-0", children: _jsx("label", { className: "form-field-label", children: "Terms and Conditions Link" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "appTnc", name: "appTnc", onChange: formik.handleChange, value: formik.values.appTnc, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Privacy Policy Link" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "appPrivacyPolicy", name: "appPrivacyPolicy", onChange: formik.handleChange, value: formik.values.appPrivacyPolicy, className: 'w-full' }) })] }) })] }) }) }), _jsx("div", { className: 'mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Theme" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsx("div", { className: "formgrid grid", children: _jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-10 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Enable Dark Mode" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "enableDarkMode", checked: formik.values.enableDarkMode, onChange: function (e) { return formik.setFieldValue("enableDarkMode", e.value); } }) })] }) }) }) }) })] }), pathname.includes("authentication-settings") &&
478
- _jsxs(_Fragment, { children: [_jsx("p", { className: 'font-bold', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "User Authentication " }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "formgrid grid", children: [_jsx("div", { className: "col-12", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Public Registration" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "allowPublicRegistration", checked: formik.values.allowPublicRegistration, onChange: function (e) { return formik.setFieldValue("allowPublicRegistration", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Password Based Authentication" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "passwordBasedAuth", checked: formik.values.passwordBasedAuth, onChange: function (e) { return formik.setFieldValue("passwordBasedAuth", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Password Less Authentication" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "passwordLessAuth", checked: formik.values.passwordLessAuth, onChange: function (e) { return formik.setFieldValue("passwordLessAuth", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Auto Activate User on Registration " }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "activateUserOnRegistration", checked: formik.values.activateUserOnRegistration, onChange: function (e) { return formik.setFieldValue("activateUserOnRegistration", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Allow Login/ Signup with Google " }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "iamGoogleOAuthEnabled", checked: formik.values.iamGoogleOAuthEnabled, onChange: function (e) { return formik.setFieldValue("iamGoogleOAuthEnabled", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Force Password change on first Login " }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "forceChangePasswordOnFirstLogin", checked: formik.values.forceChangePasswordOnFirstLogin, onChange: function (e) { return formik.setFieldValue("forceChangePasswordOnFirstLogin", e.value); } }) })] }) }), formik.values.passwordLessAuth === true &&
479
- _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 sm:col-12 lg:col-5 xl:col-5", children: _jsx("label", { className: "form-field-label", children: "Password Less Registration Method" }) }), _jsx("div", { className: 'col-12 sm:col-12 lg:col-6 xl:col-6', children: _jsxs("div", { className: "flex align-items-center gap-3 mt-3 lg:mt-0", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessRegistrationValidateWhat-email", name: "passwordlessRegistrationValidateWhat", value: "email", checked: formik.values.passwordlessRegistrationValidateWhat === "email", onChange: function (e) { return formik.setFieldValue("passwordlessRegistrationValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessRegistrationValidateWhat-email", className: "ml-2", children: "Email" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessRegistrationValidateWhat-mobile", name: "passwordlessRegistrationValidateWhat", value: "mobile", checked: formik.values.passwordlessRegistrationValidateWhat === "mobile", onChange: function (e) { return formik.setFieldValue("passwordlessRegistrationValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessRegistrationValidateWhat-mobile", className: "ml-2", children: "Mobile" })] })] }) })] }) }), formik.values.passwordLessAuth === true &&
480
- _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 sm:col-12 lg:col-5 xl:col-5", children: _jsx("label", { className: "form-field-label", children: "Password Less Login Method" }) }), _jsx("div", { className: 'col-12 sm:col-12 lg:col-6 xl:col-6', children: _jsxs("div", { className: "flex align-items-center gap-3 mt-3 lg:mt-0", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessLoginValidateWhat-email", name: "passwordlessLoginValidateWhat", value: "email", checked: formik.values.passwordlessLoginValidateWhat === "email", onChange: function (e) { return formik.setFieldValue("passwordlessLoginValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessLoginValidateWhat-email", className: "ml-2", children: "Email" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessLoginValidateWhat-mobile", name: "passwordlessLoginValidateWhat", value: "mobile", checked: formik.values.passwordlessLoginValidateWhat === "mobile", onChange: function (e) { return formik.setFieldValue("passwordlessLoginValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessLoginValidateWhat-mobile", className: "ml-2", children: "Mobile" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessLoginValidateWhat-selectable", name: "passwordlessLoginValidateWhat", value: "selectable", checked: formik.values.passwordlessLoginValidateWhat === "selectable", onChange: function (e) { return formik.setFieldValue("passwordlessLoginValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessLoginValidateWhat-selectable", className: "ml-2", children: "Selectable" })] })] }) })] }) })] }) }) }), _jsx("div", { className: 'mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Authentication Screen Layout" }), _jsx("div", { className: 'formgrid grid', children: _jsxs("div", { className: 'col-12 lg:col-10 xl:col-8', children: [_jsxs("div", { className: "flex align-items-center gap-3", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "authPagesLayout-left", name: "authPagesLayout", value: "left", checked: formik.values.authPagesLayout === "left", onChange: function (e) { return formik.setFieldValue("authPagesLayout", e.value); } }), _jsx("label", { htmlFor: "authPagesLayout-left", className: "ml-2", children: "Left" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "authPagesLayout-center", name: "authPagesLayout", value: "center", checked: formik.values.authPagesLayout === "center", onChange: function (e) { return formik.setFieldValue("authPagesLayout", e.value); } }), _jsx("label", { htmlFor: "authPagesLayout-center", className: "ml-2", children: "Center" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "authPagesLayout-right", name: "authPagesLayout", value: "right", checked: formik.values.authPagesLayout === "right", onChange: function (e) { return formik.setFieldValue("authPagesLayout", e.value); } }), _jsx("label", { htmlFor: "authPagesLayout-right", className: "ml-2", children: "Right" })] })] }), _jsxs("p", { className: "mt-3 text-sm font-bold", children: ["Note : ", positionMap[formik.values.authPagesLayout]] })] }) }), formik.values.authPagesLayout === "center" && _jsx(_Fragment, {}), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsx("div", { className: "formgrid grid", children: _jsxs("div", { className: "col-12 md:col-8 lg:col-6", children: [_jsxs("p", { className: 'font-bold ', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: [formik.values.authPagesLayout === "center" ? "Background" : "Banner", " Image"] }), formik.values.authPagesLayout === "left" &&
481
- _jsxs("div", { children: [_jsxs("div", __assign({}, getAuthScreenLeftBackgroundImageRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getAuthScreenLeftBackgroundImageInputProps())), _jsx(SettingDropzoneActivePlaceholder, { note: "Recommended: 724×724px | Aspect ratio: 1:1" })] })), _jsx("div", { className: "mt-2", children: (function () {
482
- var logoSrc = AuthScreenLeftBackgroundImage.src || AuthScreenLeftBackgroundImage;
483
- var src = authScreenLeftBackgroundImagePreview
484
- ? authScreenLeftBackgroundImagePreview
485
- : formik.values.authScreenLeftBackgroundImage
486
- ? formik.values.authScreenLeftBackgroundImage
487
- : logoSrc;
488
- var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
489
- if (!isBlobOrAbsolute && !src.startsWith("/")) {
490
- src = "".concat(env("API_URL"), "/").concat(src);
491
- }
492
- return (_jsx(SolidUploadedImage, { src: src, height: 400, width: 400, maxHeight: 400 }));
493
- })() }), formik.values.authScreenLeftBackgroundImage && (_jsx(SettingsImageRemoveButton, { onClick: removeAuthScreenLeftBackgroundImage }))] }), formik.values.authPagesLayout === "right" &&
494
- _jsxs("div", { children: [_jsxs("div", __assign({}, getAuthScreenRightBackgroundImageRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getAuthScreenRightBackgroundImageInputProps())), _jsx(SettingDropzoneActivePlaceholder, { note: "Recommended: 724×724px | Aspect ratio: 1:1" })] })), _jsx("div", { className: "mt-2", children: (function () {
495
- var logoSrc = AuthScreenRightBackgroundImage.src || AuthScreenRightBackgroundImage;
496
- var src = authScreenRightBackgroundImagePreview
497
- ? authScreenRightBackgroundImagePreview
498
- : formik.values.authScreenRightBackgroundImage
499
- ? formik.values.authScreenRightBackgroundImage
500
- : logoSrc;
501
- var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
502
- if (!isBlobOrAbsolute && !src.startsWith("/")) {
503
- src = "".concat(env("API_URL"), "/").concat(src);
504
- }
505
- return (_jsx(SolidUploadedImage, { src: src, height: 400, width: 400, maxHeight: 400 }));
506
- })() }), formik.values.authScreenRightBackgroundImage && (_jsx(SettingsImageRemoveButton, { onClick: removeAuthScreenRightBackgroundImage }))] }), formik.values.authPagesLayout === "center" &&
507
- _jsxs("div", { children: [_jsxs("div", __assign({}, getAuthScreenCenterBackgroundImageRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getAuthScreenCenterBackgroundImageInputProps())), _jsx(SettingDropzoneActivePlaceholder, { note: "Recommended: 1440px × 724px | Aspect ratio: 2:1" })] })), _jsx("div", { className: "mt-2", children: (function () {
508
- var logoSrc = AuthScreenCenterBackgroundImage.src || AuthScreenCenterBackgroundImage;
509
- var src = authScreenCenterBackgroundImagePreview
510
- ? authScreenCenterBackgroundImagePreview
511
- : formik.values.authScreenCenterBackgroundImage
512
- ? formik.values.authScreenCenterBackgroundImage
513
- : logoSrc;
514
- var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
515
- if (!isBlobOrAbsolute && !src.startsWith("/")) {
516
- src = "".concat(env("API_URL"), "/").concat(src);
517
- }
518
- return (_jsx(SolidUploadedImage, { src: src, height: 300, width: 600, maxHeight: 300 }));
519
- })() }), formik.values.authScreenCenterBackgroundImage && (_jsx(SettingsImageRemoveButton, { onClick: removeAuthScreenCenterBackgroundImage }))] })] }) }) }) }), _jsx("div", { className: 'mt-2 lg:mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), ((_37 = solidSettingsData === null || solidSettingsData === void 0 ? void 0 : solidSettingsData.data) === null || _37 === void 0 ? void 0 : _37.enableDarkMode) === true &&
520
- _jsxs(_Fragment, { children: [_jsx("p", { className: 'font-bold mt-3 lg:mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Authentication Screen Theme" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "flex align-items-center gap-3", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "theme-light", name: "authPagesTheme", value: "light", checked: formik.values.authPagesTheme === "light", onChange: function (e) { return formik.setFieldValue("authPagesTheme", e.value); } }), _jsx("label", { htmlFor: "theme-light", className: "ml-2", children: "Solid Light" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "theme-dark", name: "authPagesTheme", value: "dark", checked: formik.values.authPagesTheme === "dark", onChange: function (e) { return formik.setFieldValue("authPagesTheme", e.value); } }), _jsx("label", { htmlFor: "theme-dark", className: "ml-2", children: "Solid Dark" })] })] }) }) })] })] }), pathname.includes("misc-settings") &&
521
- _jsxs(_Fragment, { children: [_jsx("p", { className: 'font-bold', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Contact Support" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: "col-12 lg:col-10 xl:col-8", children: _jsxs("div", { className: 'formgrid grid', children: [_jsx("div", { className: "col-12 md:col-6 pb-3 md:pb-0", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Contact Support Email" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "contactSupportEmail", name: "contactSupportEmail", onChange: formik.handleChange, value: formik.values.contactSupportEmail, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Display Name" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "contactSupportDisplayName", name: "contactSupportDisplayName", onChange: formik.handleChange, value: formik.values.contactSupportDisplayName, className: 'w-full' }) })] }) })] }) }) })] }), pathname.includes("ai-settings") &&
522
- _jsxs(_Fragment, { children: [_jsx("p", { className: 'font-bold', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Ai Details" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsx("div", { className: "formgrid grid", children: _jsx("div", { className: "col-12 md:col-10 lg:col-6 mt-3 md:mt-4", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-3 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Default Provider" }) }), _jsx("div", { className: "col-12 md:col-9", children: _jsx(Dropdown, { className: 'w-full', value: formik.values.solidXGenAiCodeBuilderConfig.defaultProvider, options: [
523
- { label: "OpenAI", value: "openai" },
524
- { label: "Anthropic", value: "anthropic" },
525
- ], onChange: function (e) { return handleProviderSelect(e.value); }, placeholder: "Select Provider" }) })] }) }) }) }) }), _jsx(Divider, {}), _jsx("div", { className: 'grid', children: _jsx("div", { className: 'col-12 md:col-6', children: formik.values.solidXGenAiCodeBuilderConfig.defaultProvider && (_jsxs(_Fragment, { children: [formik.values.solidXGenAiCodeBuilderConfig.defaultProvider === "openai" && (_jsx(OpenAiProviderComponent, { profile: currentProfile, onUpdate: handleProfileUpdate })), formik.values.solidXGenAiCodeBuilderConfig.defaultProvider === "anthropic" && (_jsx(AnthropicProviderComponent, { profile: currentProfile, onUpdate: handleProfileUpdate }))] })) }) })] })] })] }) }) })] }));
418
+ return (_jsx("div", { className: "page-parent-wrapper", children: _jsx("div", { className: "solid-form-wrapper", children: _jsx("div", { className: "solid-form-section", children: _jsxs("form", { onSubmit: formik.handleSubmit, children: [_jsxs("div", { className: "page-header secondary-border-bottom", children: [_jsx("div", { className: "form-wrapper-title ", children: "Settings" }), _jsxs("div", { className: "gap-3 flex", children: [formik.dirty &&
419
+ _jsx(Button, { label: "Save", size: "small", onClick: function () { return showError(); }, type: "submit" }), _jsx(CancelButton, {})] })] }), _jsxs("div", { className: "px-4 py-3 md:p-4 solid-form-content", children: [pathname.includes("app-settings") &&
420
+ _jsxs(_Fragment, { children: [_jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "formgrid grid", children: [_jsxs("div", { className: "col-12 md:col-6", children: [_jsx("p", { className: 'font-bold ', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "App Logo " }), _jsxs("div", { children: [_jsxs("div", __assign({}, getAppLogoRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getAppLogoInputProps())), _jsx(SettingDropzoneActivePlaceholder, {})] })), _jsx("div", { className: "mt-2", children: (function () {
421
+ var logoSrc = SolidLogo.src || SolidLogo;
422
+ var src = appLogoPreview
423
+ ? appLogoPreview
424
+ : formik.values.appLogo
425
+ ? formik.values.appLogo
426
+ : logoSrc;
427
+ var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
428
+ if (!isBlobOrAbsolute && !src.startsWith("/")) {
429
+ src = "".concat(env("API_URL"), "/").concat(src);
430
+ }
431
+ return (_jsx(SolidUploadedImage, { src: src, className: 'solid-app-logo' }));
432
+ })() }), formik.values.appLogo && (_jsx(SettingsImageRemoveButton, { onClick: removeAppLogo }))] })] }), _jsxs("div", { className: "col-12 md:col-6", children: [_jsx("p", { className: 'font-bold ', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Company Logo " }), _jsxs("div", { children: [_jsxs("div", __assign({}, getCompanyLogoRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getCompanyLogoInputProps())), _jsx(SettingDropzoneActivePlaceholder, {})] })), _jsx("div", { className: "mt-2", children: (function () {
433
+ var logoSrc = SolidLogo.src || SolidLogo;
434
+ var src = companyLogoPreview
435
+ ? companyLogoPreview
436
+ : formik.values.companylogo
437
+ ? formik.values.companylogo
438
+ : logoSrc;
439
+ var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
440
+ if (!isBlobOrAbsolute && !src.startsWith("/")) {
441
+ src = "".concat(env("API_URL"), "/").concat(src);
442
+ }
443
+ return (_jsx(SolidUploadedImage, { src: src, className: 'solid-compony-logo' }));
444
+ })() }), formik.values.companylogo && (_jsx(SettingsImageRemoveButton, { onClick: removeCompanyLogo }))] })] })] }) }) }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "App Logo Position" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "flex align-items-center gap-3", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "appLogoPosition-in_form_view", name: "appLogoPosition", value: "in_form_view", checked: formik.values.appLogoPosition === "in_form_view", onChange: function (e) { return formik.setFieldValue("appLogoPosition", e.value); } }), _jsx("label", { htmlFor: "appLogoPosition-in_form_view", className: "ml-2", children: "In Form View" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "appLogoPosition-in_image_view", name: "appLogoPosition", value: "in_image_view", checked: formik.values.appLogoPosition === "in_image_view", onChange: function (e) { return formik.setFieldValue("appLogoPosition", e.value); } }), _jsx("label", { htmlFor: "appLogoPosition-in_image_view", className: "ml-2", children: "In Image View" })] })] }) }) }), _jsx("div", { className: 'mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Title & Description Details " }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "formgrid grid", children: [_jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Show Details on Authentication Screen" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "showAuthContent", checked: formik.values.showAuthContent, onChange: function (e) { return formik.setFieldValue("showAuthContent", e.value); } }) })] }) }), _jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "App Title" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "appTitle", name: "appTitle", onChange: formik.handleChange, value: formik.values.appTitle, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6 mt-4", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "App Subtitle" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "appSubtitle", name: "appSubtitle", onChange: formik.handleChange, value: formik.values.appSubtitle, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6 mt-4", children: _jsxs("div", { className: "formgrid grid align-items-start", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Description" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputTextarea, { rows: 3, id: "appDescription", name: "appDescription", onChange: formik.handleChange, value: formik.values.appDescription, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6 mt-4", children: _jsxs("div", { className: "formgrid grid align-items-start", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Copyright" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputTextarea, { rows: 3, id: "copyright", name: "copyright", onChange: formik.handleChange, value: formik.values.copyright, className: 'w-full' }) })] }) })] }) }) }), _jsx("div", { className: 'mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Legal Links" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "formgrid grid", children: [_jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Show Legal Links" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "showLegalLinks", checked: formik.values.showLegalLinks, onChange: function (e) { return formik.setFieldValue("showLegalLinks", e.value); } }) })] }) }), _jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 py-2 md:py-0", children: _jsx("label", { className: "form-field-label", children: "Terms and Conditions Link" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "appTnc", name: "appTnc", onChange: formik.handleChange, value: formik.values.appTnc, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Privacy Policy Link" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "appPrivacyPolicy", name: "appPrivacyPolicy", onChange: formik.handleChange, value: formik.values.appPrivacyPolicy, className: 'w-full' }) })] }) })] }) }) }), _jsx("div", { className: 'mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Theme" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsx("div", { className: "formgrid grid", children: _jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-10 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Enable Dark Mode" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "enableDarkMode", checked: formik.values.enableDarkMode, onChange: function (e) { return formik.setFieldValue("enableDarkMode", e.value); } }) })] }) }) }) }) })] }), pathname.includes("authentication-settings") &&
445
+ _jsxs(_Fragment, { children: [_jsx("p", { className: 'font-bold', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "User Authentication " }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "formgrid grid", children: [_jsx("div", { className: "col-12", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Public Registration" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "allowPublicRegistration", checked: formik.values.allowPublicRegistration, onChange: function (e) { return formik.setFieldValue("allowPublicRegistration", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Password Based Authentication" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "passwordBasedAuth", checked: formik.values.passwordBasedAuth, onChange: function (e) { return formik.setFieldValue("passwordBasedAuth", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Password Less Authentication" }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "passwordLessAuth", checked: formik.values.passwordLessAuth, onChange: function (e) { return formik.setFieldValue("passwordLessAuth", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Auto Activate User on Registration " }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "activateUserOnRegistration", checked: formik.values.activateUserOnRegistration, onChange: function (e) { return formik.setFieldValue("activateUserOnRegistration", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Allow Login/ Signup with Google " }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "iamGoogleOAuthEnabled", checked: formik.values.iamGoogleOAuthEnabled, onChange: function (e) { return formik.setFieldValue("iamGoogleOAuthEnabled", e.value); } }) })] }) }), _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-10 sm:col-9 lg:col-5", children: _jsx("label", { className: "form-field-label", children: "Force Password change on first Login " }) }), _jsx("div", { className: "col-2 sm:col-3 lg:col-7", children: _jsx(InputSwitch, { name: "forceChangePasswordOnFirstLogin", checked: formik.values.forceChangePasswordOnFirstLogin, onChange: function (e) { return formik.setFieldValue("forceChangePasswordOnFirstLogin", e.value); } }) })] }) }), formik.values.passwordLessAuth === true &&
446
+ _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 sm:col-12 lg:col-5 xl:col-5", children: _jsx("label", { className: "form-field-label", children: "Password Less Registration Method" }) }), _jsx("div", { className: 'col-12 sm:col-12 lg:col-6 xl:col-6', children: _jsxs("div", { className: "flex align-items-center gap-3 mt-3 lg:mt-0", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessRegistrationValidateWhat-email", name: "passwordlessRegistrationValidateWhat", value: "email", checked: formik.values.passwordlessRegistrationValidateWhat === "email", onChange: function (e) { return formik.setFieldValue("passwordlessRegistrationValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessRegistrationValidateWhat-email", className: "ml-2", children: "Email" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessRegistrationValidateWhat-mobile", name: "passwordlessRegistrationValidateWhat", value: "mobile", checked: formik.values.passwordlessRegistrationValidateWhat === "mobile", onChange: function (e) { return formik.setFieldValue("passwordlessRegistrationValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessRegistrationValidateWhat-mobile", className: "ml-2", children: "Mobile" })] })] }) })] }) }), formik.values.passwordLessAuth === true &&
447
+ _jsx("div", { className: "col-12 mt-3", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 sm:col-12 lg:col-5 xl:col-5", children: _jsx("label", { className: "form-field-label", children: "Password Less Login Method" }) }), _jsx("div", { className: 'col-12 sm:col-12 lg:col-6 xl:col-6', children: _jsxs("div", { className: "flex align-items-center gap-3 mt-3 lg:mt-0", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessLoginValidateWhat-email", name: "passwordlessLoginValidateWhat", value: "email", checked: formik.values.passwordlessLoginValidateWhat === "email", onChange: function (e) { return formik.setFieldValue("passwordlessLoginValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessLoginValidateWhat-email", className: "ml-2", children: "Email" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessLoginValidateWhat-mobile", name: "passwordlessLoginValidateWhat", value: "mobile", checked: formik.values.passwordlessLoginValidateWhat === "mobile", onChange: function (e) { return formik.setFieldValue("passwordlessLoginValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessLoginValidateWhat-mobile", className: "ml-2", children: "Mobile" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "passwordlessLoginValidateWhat-selectable", name: "passwordlessLoginValidateWhat", value: "selectable", checked: formik.values.passwordlessLoginValidateWhat === "selectable", onChange: function (e) { return formik.setFieldValue("passwordlessLoginValidateWhat", e.value); } }), _jsx("label", { htmlFor: "passwordlessLoginValidateWhat-selectable", className: "ml-2", children: "Selectable" })] })] }) })] }) })] }) }) }), _jsx("div", { className: 'mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), _jsx("p", { className: 'font-bold mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Authentication Screen Layout" }), _jsx("div", { className: 'formgrid grid', children: _jsxs("div", { className: 'col-12 lg:col-10 xl:col-8', children: [_jsxs("div", { className: "flex align-items-center gap-3", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "authPagesLayout-left", name: "authPagesLayout", value: "left", checked: formik.values.authPagesLayout === "left", onChange: function (e) { return formik.setFieldValue("authPagesLayout", e.value); } }), _jsx("label", { htmlFor: "authPagesLayout-left", className: "ml-2", children: "Left" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "authPagesLayout-center", name: "authPagesLayout", value: "center", checked: formik.values.authPagesLayout === "center", onChange: function (e) { return formik.setFieldValue("authPagesLayout", e.value); } }), _jsx("label", { htmlFor: "authPagesLayout-center", className: "ml-2", children: "Center" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "authPagesLayout-right", name: "authPagesLayout", value: "right", checked: formik.values.authPagesLayout === "right", onChange: function (e) { return formik.setFieldValue("authPagesLayout", e.value); } }), _jsx("label", { htmlFor: "authPagesLayout-right", className: "ml-2", children: "Right" })] })] }), _jsxs("p", { className: "mt-3 text-sm font-bold", children: ["Note : ", positionMap[formik.values.authPagesLayout]] })] }) }), formik.values.authPagesLayout === "center" && _jsx(_Fragment, {}), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsx("div", { className: "formgrid grid", children: _jsxs("div", { className: "col-12 md:col-8 lg:col-6", children: [_jsxs("p", { className: 'font-bold ', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: [formik.values.authPagesLayout === "center" ? "Background" : "Banner", " Image"] }), formik.values.authPagesLayout === "left" &&
448
+ _jsxs("div", { children: [_jsxs("div", __assign({}, getAuthScreenLeftBackgroundImageRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getAuthScreenLeftBackgroundImageInputProps())), _jsx(SettingDropzoneActivePlaceholder, { note: "Recommended: 724×724px | Aspect ratio: 1:1" })] })), _jsx("div", { className: "mt-2", children: (function () {
449
+ var logoSrc = AuthScreenLeftBackgroundImage.src || AuthScreenLeftBackgroundImage;
450
+ var src = authScreenLeftBackgroundImagePreview
451
+ ? authScreenLeftBackgroundImagePreview
452
+ : formik.values.authScreenLeftBackgroundImage
453
+ ? formik.values.authScreenLeftBackgroundImage
454
+ : logoSrc;
455
+ var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
456
+ if (!isBlobOrAbsolute && !src.startsWith("/")) {
457
+ src = "".concat(env("API_URL"), "/").concat(src);
458
+ }
459
+ return (_jsx(SolidUploadedImage, { src: src, height: 400, width: 400, maxHeight: 400 }));
460
+ })() }), formik.values.authScreenLeftBackgroundImage && (_jsx(SettingsImageRemoveButton, { onClick: removeAuthScreenLeftBackgroundImage }))] }), formik.values.authPagesLayout === "right" &&
461
+ _jsxs("div", { children: [_jsxs("div", __assign({}, getAuthScreenRightBackgroundImageRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getAuthScreenRightBackgroundImageInputProps())), _jsx(SettingDropzoneActivePlaceholder, { note: "Recommended: 724×724px | Aspect ratio: 1:1" })] })), _jsx("div", { className: "mt-2", children: (function () {
462
+ var logoSrc = AuthScreenRightBackgroundImage.src || AuthScreenRightBackgroundImage;
463
+ var src = authScreenRightBackgroundImagePreview
464
+ ? authScreenRightBackgroundImagePreview
465
+ : formik.values.authScreenRightBackgroundImage
466
+ ? formik.values.authScreenRightBackgroundImage
467
+ : logoSrc;
468
+ var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
469
+ if (!isBlobOrAbsolute && !src.startsWith("/")) {
470
+ src = "".concat(env("API_URL"), "/").concat(src);
471
+ }
472
+ return (_jsx(SolidUploadedImage, { src: src, height: 400, width: 400, maxHeight: 400 }));
473
+ })() }), formik.values.authScreenRightBackgroundImage && (_jsx(SettingsImageRemoveButton, { onClick: removeAuthScreenRightBackgroundImage }))] }), formik.values.authPagesLayout === "center" &&
474
+ _jsxs("div", { children: [_jsxs("div", __assign({}, getAuthScreenCenterBackgroundImageRootProps(), { className: "solid-dropzone-wrapper", style: { borderRadius: 8 }, children: [_jsx("input", __assign({}, getAuthScreenCenterBackgroundImageInputProps())), _jsx(SettingDropzoneActivePlaceholder, { note: "Recommended: 1440px × 724px | Aspect ratio: 2:1" })] })), _jsx("div", { className: "mt-2", children: (function () {
475
+ var logoSrc = AuthScreenCenterBackgroundImage.src || AuthScreenCenterBackgroundImage;
476
+ var src = authScreenCenterBackgroundImagePreview
477
+ ? authScreenCenterBackgroundImagePreview
478
+ : formik.values.authScreenCenterBackgroundImage
479
+ ? formik.values.authScreenCenterBackgroundImage
480
+ : logoSrc;
481
+ var isBlobOrAbsolute = (src === null || src === void 0 ? void 0 : src.startsWith("blob:")) || (src === null || src === void 0 ? void 0 : src.startsWith("http"));
482
+ if (!isBlobOrAbsolute && !src.startsWith("/")) {
483
+ src = "".concat(env("API_URL"), "/").concat(src);
484
+ }
485
+ return (_jsx(SolidUploadedImage, { src: src, height: 300, width: 600, maxHeight: 300 }));
486
+ })() }), formik.values.authScreenCenterBackgroundImage && (_jsx(SettingsImageRemoveButton, { onClick: removeAuthScreenCenterBackgroundImage }))] })] }) }) }) }), _jsx("div", { className: 'mt-2 lg:mt-4', style: { borderBottom: '1px dashed #D8E2EA' } }), ((_37 = solidSettingsData === null || solidSettingsData === void 0 ? void 0 : solidSettingsData.data) === null || _37 === void 0 ? void 0 : _37.enableDarkMode) === true &&
487
+ _jsxs(_Fragment, { children: [_jsx("p", { className: 'font-bold mt-3 lg:mt-4', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Authentication Screen Theme" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsxs("div", { className: "flex align-items-center gap-3", children: [_jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "theme-light", name: "authPagesTheme", value: "light", checked: formik.values.authPagesTheme === "light", onChange: function (e) { return formik.setFieldValue("authPagesTheme", e.value); } }), _jsx("label", { htmlFor: "theme-light", className: "ml-2", children: "Solid Light" })] }), _jsxs("div", { className: "flex align-items-center", children: [_jsx(RadioButton, { inputId: "theme-dark", name: "authPagesTheme", value: "dark", checked: formik.values.authPagesTheme === "dark", onChange: function (e) { return formik.setFieldValue("authPagesTheme", e.value); } }), _jsx("label", { htmlFor: "theme-dark", className: "ml-2", children: "Solid Dark" })] })] }) }) })] })] }), pathname.includes("misc-settings") &&
488
+ _jsxs(_Fragment, { children: [_jsx("p", { className: 'font-bold', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Contact Support" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: "col-12 lg:col-10 xl:col-8", children: _jsxs("div", { className: 'formgrid grid', children: [_jsx("div", { className: "col-12 md:col-6 pb-3 md:pb-0", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Contact Support Email" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "contactSupportEmail", name: "contactSupportEmail", onChange: formik.handleChange, value: formik.values.contactSupportEmail, className: 'w-full' }) })] }) }), _jsx("div", { className: "col-12 md:col-6", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-5 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Display Name" }) }), _jsx("div", { className: "col-12 md:col-7", children: _jsx(InputText, { type: "text", id: "contactSupportDisplayName", name: "contactSupportDisplayName", onChange: formik.handleChange, value: formik.values.contactSupportDisplayName, className: 'w-full' }) })] }) })] }) }) })] }), pathname.includes("ai-settings") &&
489
+ _jsxs(_Fragment, { children: [_jsx("p", { className: 'font-bold', style: { fontSize: 16, color: 'var(--solid-setting-title)' }, children: "Ai Details" }), _jsx("div", { className: 'formgrid grid', children: _jsx("div", { className: 'col-12 lg:col-10 xl:col-8', children: _jsx("div", { className: "formgrid grid", children: _jsx("div", { className: "col-12 md:col-10 lg:col-6 mt-3 md:mt-4", children: _jsxs("div", { className: "formgrid grid align-items-center", children: [_jsx("div", { className: "col-12 md:col-3 pb-2 md:pb-0", children: _jsx("label", { className: "form-field-label", children: "Default Provider" }) }), _jsx("div", { className: "col-12 md:col-9", children: _jsx(Dropdown, { className: 'w-full', value: formik.values.solidXGenAiCodeBuilderConfig.defaultProvider, options: [
490
+ { label: "OpenAI", value: "openai" },
491
+ { label: "Anthropic", value: "anthropic" },
492
+ ], onChange: function (e) { return handleProviderSelect(e.value); }, placeholder: "Select Provider" }) })] }) }) }) }) }), _jsx(Divider, {}), _jsx("div", { className: 'grid', children: _jsx("div", { className: 'col-12 md:col-6', children: formik.values.solidXGenAiCodeBuilderConfig.defaultProvider && (_jsxs(_Fragment, { children: [formik.values.solidXGenAiCodeBuilderConfig.defaultProvider === "openai" && (_jsx(OpenAiProviderComponent, { profile: currentProfile, onUpdate: handleProfileUpdate })), formik.values.solidXGenAiCodeBuilderConfig.defaultProvider === "anthropic" && (_jsx(AnthropicProviderComponent, { profile: currentProfile, onUpdate: handleProfileUpdate }))] })) }) })] })] })] }) }) }) }));
526
493
  };
527
494
  //# sourceMappingURL=GeneralSettings.js.map