@solidstarters/solid-core-ui 1.1.211 → 1.1.212

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 (373) hide show
  1. package/dist/components/Svg/DevDocs.tsx +9 -0
  2. package/dist/components/Svg/DocsSvg.tsx +9 -0
  3. package/dist/components/Svg/ExcelSvg.tsx +15 -0
  4. package/dist/components/Svg/FieldSvg.tsx +9 -0
  5. package/dist/components/Svg/FileSvg.tsx +18 -0
  6. package/dist/components/Svg/HomePageModuleSvg.tsx +179 -0
  7. package/dist/components/Svg/ModelSvg.tsx +9 -0
  8. package/dist/components/Svg/ModuleSvg.tsx +9 -0
  9. package/dist/components/Svg/PDFSvg.tsx +15 -0
  10. package/dist/components/Svg/RightArrowSvg.tsx +9 -0
  11. package/dist/components/Svg/SettingsSvg.tsx +9 -0
  12. package/dist/components/auth/AuthLayout.tsx +223 -0
  13. package/dist/components/auth/ForgotPasswordThankYou.tsx +33 -0
  14. package/dist/components/auth/GoogleAuthChecking.tsx +63 -0
  15. package/dist/components/auth/SolidChangeForcePassword.tsx +222 -0
  16. package/dist/components/auth/SolidForgotPassword.tsx +127 -0
  17. package/dist/components/auth/SolidInitialLoginOtp.tsx +271 -0
  18. package/dist/components/auth/SolidInitiateRegisterOtp.tsx +218 -0
  19. package/dist/components/auth/SolidLogin.d.ts.map +1 -1
  20. package/dist/components/auth/SolidLogin.js +14 -8
  21. package/dist/components/auth/SolidLogin.js.map +1 -1
  22. package/dist/components/auth/SolidLogin.tsx +428 -0
  23. package/dist/components/auth/SolidOTPVerify.tsx +133 -0
  24. package/dist/components/auth/SolidRegister.tsx +454 -0
  25. package/dist/components/auth/SolidResetPassword.tsx +194 -0
  26. package/dist/components/common/AuthBanner.tsx +41 -0
  27. package/dist/components/common/AutoCompleteField.tsx +79 -0
  28. package/dist/components/common/BackButton.tsx +72 -0
  29. package/dist/components/common/CancelButton.tsx +61 -0
  30. package/dist/components/common/CodeEditor.tsx +38 -0
  31. package/dist/components/common/CreateButton.tsx +17 -0
  32. package/dist/components/common/DownloadProgressToast.tsx +55 -0
  33. package/dist/components/common/DropzonePlaceholder.tsx +31 -0
  34. package/dist/components/common/DropzoneUpload.tsx +11 -0
  35. package/dist/components/common/FileReaderExt.tsx +20 -0
  36. package/dist/components/common/GeneralSettings.tsx +1225 -0
  37. package/dist/components/common/HeaderDynamicTitles.tsx +13 -0
  38. package/dist/components/common/MarkdownViewer.tsx +84 -0
  39. package/dist/components/common/MultipleSelectAutoCompleteField.tsx +64 -0
  40. package/dist/components/common/NotFound.tsx +22 -0
  41. package/dist/components/common/SingleSelectAutoCompleteField.tsx +73 -0
  42. package/dist/components/common/SocialMediaLogin.tsx +53 -0
  43. package/dist/components/common/SolidAdmin.tsx +6 -0
  44. package/dist/components/common/SolidBreadcrumb.tsx +129 -0
  45. package/dist/components/common/SolidExport.tsx +563 -0
  46. package/dist/components/common/SolidExportStepper.tsx +135 -0
  47. package/dist/components/common/SolidFieldTooltip.tsx +23 -0
  48. package/dist/components/common/SolidFormHeader.tsx +25 -0
  49. package/dist/components/common/SolidFormStepper.tsx +350 -0
  50. package/dist/components/common/SolidModuleHome.tsx +128 -0
  51. package/dist/components/common/SolidPopupContainer.tsx +37 -0
  52. package/dist/components/common/SolidSettings/LlmSettings/AnthropicProviderComponent.tsx +45 -0
  53. package/dist/components/common/SolidSettings/LlmSettings/OpenAiProviderComponent.tsx +45 -0
  54. package/dist/components/common/SolidSettings/SettingDropzoneActivePlaceholder.tsx +20 -0
  55. package/dist/components/common/SolidSettings/SettingsImageRemoveButton.tsx +15 -0
  56. package/dist/components/common/SolidSettings/SolidUploadedImage.tsx +16 -0
  57. package/dist/components/common/SolidThemeLink.tsx +6 -0
  58. package/dist/components/common/SolidThemeProvider.tsx +44 -0
  59. package/dist/components/common/StepperArrows/ActiveArrowStep.tsx +18 -0
  60. package/dist/components/common/StepperArrows/ActiveBeforeStepArrow.tsx +18 -0
  61. package/dist/components/common/StepperArrows/InactiveStepArrow.tsx +19 -0
  62. package/dist/components/common/error.tsx +30 -0
  63. package/dist/components/common/useHandleFormCustomButtonClick.ts +40 -0
  64. package/dist/components/common/useHandleListCustomButtonClick.ts +42 -0
  65. package/dist/components/core/chatter/SolidChatter.tsx +248 -0
  66. package/dist/components/core/chatter/SolidChatterAuditMessage.tsx +35 -0
  67. package/dist/components/core/chatter/SolidChatterCustomMessage.tsx +46 -0
  68. package/dist/components/core/chatter/SolidChatterDateDivider.tsx +16 -0
  69. package/dist/components/core/chatter/SolidChatterHeader.tsx +218 -0
  70. package/dist/components/core/chatter/SolidChatterMessageBox.tsx +163 -0
  71. package/dist/components/core/chatter/SolidMessageComposer.tsx +146 -0
  72. package/dist/components/core/common/AvatarWidget.tsx +55 -0
  73. package/dist/components/core/common/DateFieldViewComponent.tsx +36 -0
  74. package/dist/components/core/common/FilterComponent.tsx +458 -0
  75. package/dist/components/core/common/LoadDynamicJsxComponent.tsx +70 -0
  76. package/dist/components/core/common/PDFViewer.tsx +117 -0
  77. package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.tsx +89 -0
  78. package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.tsx +188 -0
  79. package/dist/components/core/common/SolidAccountSettings/SolidNotifications.tsx +139 -0
  80. package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.tsx +311 -0
  81. package/dist/components/core/common/SolidCreateButton.tsx +48 -0
  82. package/dist/components/core/common/SolidGenericImport/DocumentSvg.tsx +15 -0
  83. package/dist/components/core/common/SolidGenericImport/SolidGenericImport.tsx +64 -0
  84. package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.tsx +125 -0
  85. package/dist/components/core/common/SolidGenericImport/SolidImportInstructions.tsx +122 -0
  86. package/dist/components/core/common/SolidGenericImport/SolidImportStepper.tsx +217 -0
  87. package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.tsx +205 -0
  88. package/dist/components/core/common/SolidGenericImport/SolidImportTransactionStatus.tsx +158 -0
  89. package/dist/components/core/common/SolidGenericImport/SolidImportWrapper.tsx +29 -0
  90. package/dist/components/core/common/SolidGlobalSearchElement.tsx +1470 -0
  91. package/dist/components/core/common/SolidLayoutViews.tsx +87 -0
  92. package/dist/components/core/common/SolidListViewOptions.tsx +31 -0
  93. package/dist/components/core/common/SolidLoaders/SolidCircularLoader.tsx +7 -0
  94. package/dist/components/core/common/SolidPasswordHelperText.tsx +34 -0
  95. package/dist/components/core/common/SolidSaveCustomFilterForm.tsx +75 -0
  96. package/dist/components/core/common/SolidSearchBox.tsx +17 -0
  97. package/dist/components/core/common/SolidViewLayoutManager.ts +421 -0
  98. package/dist/components/core/common/SolidXAiIframe.tsx +77 -0
  99. package/dist/components/core/dashboard/SolidDashboard.tsx +332 -0
  100. package/dist/components/core/dashboard/SolidDashboardBody.tsx +117 -0
  101. package/dist/components/core/dashboard/SolidDashboardFilterRequired.tsx +28 -0
  102. package/dist/components/core/dashboard/SolidDashboardHeader.tsx +10 -0
  103. package/dist/components/core/dashboard/SolidDashboardLoading.tsx +55 -0
  104. package/dist/components/core/dashboard/SolidDashboardNotAvailable.tsx +32 -0
  105. package/dist/components/core/dashboard/SolidDashboardRenderError.tsx +29 -0
  106. package/dist/components/core/dashboard/SolidDashboardVariable.tsx +256 -0
  107. package/dist/components/core/dashboard/SolidQuestionRenderer.tsx +78 -0
  108. package/dist/components/core/dashboard/chart-renderers/ChartJsRenderer.tsx +18 -0
  109. package/dist/components/core/dashboard/chart-renderers/PrimeReactDatatableRenderer.tsx +54 -0
  110. package/dist/components/core/dashboard/chart-renderers/init-chartjs.ts +25 -0
  111. package/dist/components/core/dashboard/dashboard-utils.ts +39 -0
  112. package/dist/components/core/extension/solid-core/CustomIcon/StatusIcon.tsx +17 -0
  113. package/dist/components/core/extension/solid-core/dashboardQuestion/ChartFormPreviewWidget.tsx +36 -0
  114. package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeChangeHandler.ts +18 -0
  115. package/dist/components/core/extension/solid-core/emailTemplate/emailFormTypeLoad.ts +18 -0
  116. package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.tsx +114 -0
  117. package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.tsx +213 -0
  118. package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.tsx +138 -0
  119. package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.tsx +209 -0
  120. package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +131 -0
  121. package/dist/components/core/field/FieldListViewData.tsx +313 -0
  122. package/dist/components/core/filter/SolidBooleanFilterElement.tsx +30 -0
  123. package/dist/components/core/filter/SolidFilterFields.tsx +131 -0
  124. package/dist/components/core/filter/SolidManyToManyFilterElement.tsx +64 -0
  125. package/dist/components/core/filter/SolidManyToOneFilterElement.tsx +61 -0
  126. package/dist/components/core/filter/SolidSelectionDynamicFilterElement.tsx +50 -0
  127. package/dist/components/core/filter/SolidSelectionStaticFilterElement.tsx +32 -0
  128. package/dist/components/core/filter/SolidVarInputsFilterElement.tsx +209 -0
  129. package/dist/components/core/filter/fields/SolidBigintField.tsx +9 -0
  130. package/dist/components/core/filter/fields/SolidBooleanField.tsx +68 -0
  131. package/dist/components/core/filter/fields/SolidComputedField.tsx +23 -0
  132. package/dist/components/core/filter/fields/SolidDateField.tsx +63 -0
  133. package/dist/components/core/filter/fields/SolidDatetimeField.tsx +54 -0
  134. package/dist/components/core/filter/fields/SolidDecimalField.tsx +9 -0
  135. package/dist/components/core/filter/fields/SolidExternalIdField.tsx +52 -0
  136. package/dist/components/core/filter/fields/SolidFloatField.tsx +9 -0
  137. package/dist/components/core/filter/fields/SolidIdField.tsx +46 -0
  138. package/dist/components/core/filter/fields/SolidIntField.tsx +61 -0
  139. package/dist/components/core/filter/fields/SolidLongTextField.tsx +9 -0
  140. package/dist/components/core/filter/fields/SolidMediaMultipleField.tsx +60 -0
  141. package/dist/components/core/filter/fields/SolidMediaSingleField.tsx +62 -0
  142. package/dist/components/core/filter/fields/SolidRelationField.tsx +17 -0
  143. package/dist/components/core/filter/fields/SolidRichTextField.tsx +9 -0
  144. package/dist/components/core/filter/fields/SolidSelectionDynamicField.tsx +52 -0
  145. package/dist/components/core/filter/fields/SolidSelectionStaticField.tsx +54 -0
  146. package/dist/components/core/filter/fields/SolidShortTextField.tsx +60 -0
  147. package/dist/components/core/filter/fields/SolidTimeField.tsx +48 -0
  148. package/dist/components/core/filter/fields/SolidUuidField.tsx +51 -0
  149. package/dist/components/core/filter/fields/relations/SolidRelationManyToManyField.tsx +62 -0
  150. package/dist/components/core/filter/fields/relations/SolidRelationManyToOneField.tsx +84 -0
  151. package/dist/components/core/form/SolidFormActionHeader.tsx +497 -0
  152. package/dist/components/core/form/SolidFormFieldRender.tsx +53 -0
  153. package/dist/components/core/form/SolidFormFieldRenderExtension.tsx +26 -0
  154. package/dist/components/core/form/SolidFormFooter.tsx +162 -0
  155. package/dist/components/core/form/SolidFormLayouts.tsx +104 -0
  156. package/dist/components/core/form/SolidFormUserViewLayout.tsx +84 -0
  157. package/dist/components/core/form/SolidFormView.tsx +1856 -0
  158. package/dist/components/core/form/SolidFormViewContextMenuHeaderButton.tsx +52 -0
  159. package/dist/components/core/form/SolidFormViewNormalHeaderButton.tsx +52 -0
  160. package/dist/components/core/form/SolidFormViewShimmerLoading.tsx +109 -0
  161. package/dist/components/core/form/fields/ISolidField.tsx +71 -0
  162. package/dist/components/core/form/fields/SolidBooleanField.tsx +434 -0
  163. package/dist/components/core/form/fields/SolidDateField.tsx +247 -0
  164. package/dist/components/core/form/fields/SolidDateTimeField.tsx +229 -0
  165. package/dist/components/core/form/fields/SolidDecimalField.tsx +171 -0
  166. package/dist/components/core/form/fields/SolidEmailField.tsx +176 -0
  167. package/dist/components/core/form/fields/SolidIntegerField.tsx +282 -0
  168. package/dist/components/core/form/fields/SolidJsonField.tsx +185 -0
  169. package/dist/components/core/form/fields/SolidLongTextField.tsx +618 -0
  170. package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +663 -0
  171. package/dist/components/core/form/fields/SolidMediaSingleField.tsx +547 -0
  172. package/dist/components/core/form/fields/SolidPasswordField.tsx +390 -0
  173. package/dist/components/core/form/fields/SolidRelationField.tsx +56 -0
  174. package/dist/components/core/form/fields/SolidRichTextField.tsx +188 -0
  175. package/dist/components/core/form/fields/SolidSelectionDynamicField.tsx +340 -0
  176. package/dist/components/core/form/fields/SolidSelectionStaticField.tsx +462 -0
  177. package/dist/components/core/form/fields/SolidShortTextField.tsx +399 -0
  178. package/dist/components/core/form/fields/SolidTimeField.tsx +245 -0
  179. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +453 -0
  180. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +1036 -0
  181. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +627 -0
  182. package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.tsx +38 -0
  183. package/dist/components/core/form/fields/relations/widgets/helpers/useRelationEntityHandler.ts +64 -0
  184. package/dist/components/core/form/fields/widgets/SolidAiInteractionMessageFieldFormWidget.tsx +135 -0
  185. package/dist/components/core/form/fields/widgets/SolidAiInteractionMetadataFieldFormWidget.tsx +144 -0
  186. package/dist/components/core/form/fields/widgets/SolidIconEditWidget.tsx +265 -0
  187. package/dist/components/core/form/fields/widgets/SolidIconViewWidget.tsx +32 -0
  188. package/dist/components/core/form/fields/widgets/SolidRelationFieldAvatarFormWidget.tsx +50 -0
  189. package/dist/components/core/form/fields/widgets/SolidS3FileViewerWidget.tsx +222 -0
  190. package/dist/components/core/form/fields/widgets/SolidShortTextFieldAvatarWidget.tsx +70 -0
  191. package/dist/components/core/form/widgets/CustomHtml.tsx +20 -0
  192. package/dist/components/core/kanban/KanbanBoard.tsx +150 -0
  193. package/dist/components/core/kanban/KanbanCard.tsx +279 -0
  194. package/dist/components/core/kanban/KanbanColumn.tsx +139 -0
  195. package/dist/components/core/kanban/KanbanUserViewLayout.tsx +84 -0
  196. package/dist/components/core/kanban/SolidKanbanView.tsx +894 -0
  197. package/dist/components/core/kanban/SolidKanbanViewConfigure.tsx +154 -0
  198. package/dist/components/core/kanban/SolidKanbanViewFields.tsx +164 -0
  199. package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +59 -0
  200. package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +50 -0
  201. package/dist/components/core/kanban/SolidSelectionStaticFilterElement.tsx +32 -0
  202. package/dist/components/core/kanban/SolidVarInputsFilterElement.tsx +184 -0
  203. package/dist/components/core/kanban/kanban-fields/SolidBigintKanbanField.tsx +9 -0
  204. package/dist/components/core/kanban/kanban-fields/SolidBooleanKanbanField.tsx +16 -0
  205. package/dist/components/core/kanban/kanban-fields/SolidComputedKanbanField.tsx +23 -0
  206. package/dist/components/core/kanban/kanban-fields/SolidDateKanbanField.tsx +14 -0
  207. package/dist/components/core/kanban/kanban-fields/SolidDatetimeKanbanField.tsx +13 -0
  208. package/dist/components/core/kanban/kanban-fields/SolidDecimalKanbanField.tsx +9 -0
  209. package/dist/components/core/kanban/kanban-fields/SolidExternalIdKanbanField.tsx +12 -0
  210. package/dist/components/core/kanban/kanban-fields/SolidFloatKanbanField.tsx +9 -0
  211. package/dist/components/core/kanban/kanban-fields/SolidIdKanbanField.tsx +14 -0
  212. package/dist/components/core/kanban/kanban-fields/SolidIntKanbanField.tsx +20 -0
  213. package/dist/components/core/kanban/kanban-fields/SolidLongTextKanbanField.tsx +9 -0
  214. package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +140 -0
  215. package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +164 -0
  216. package/dist/components/core/kanban/kanban-fields/SolidRelationKanbanField.tsx +13 -0
  217. package/dist/components/core/kanban/kanban-fields/SolidRichTextKanbanField.tsx +9 -0
  218. package/dist/components/core/kanban/kanban-fields/SolidSelectionDynamicKanbanField.tsx +14 -0
  219. package/dist/components/core/kanban/kanban-fields/SolidSelectionStaticKanbanField.tsx +14 -0
  220. package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +121 -0
  221. package/dist/components/core/kanban/kanban-fields/SolidTimeKanbanField.tsx +12 -0
  222. package/dist/components/core/kanban/kanban-fields/SolidUuidKanbanField.tsx +13 -0
  223. package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +16 -0
  224. package/dist/components/core/list/ListViewRowActionPopup.tsx +41 -0
  225. package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.tsx +242 -0
  226. package/dist/components/core/list/SolidEmptyListViewPlaceholder.tsx +111 -0
  227. package/dist/components/core/list/SolidListView.tsx +2007 -0
  228. package/dist/components/core/list/SolidListViewColumn.tsx +165 -0
  229. package/dist/components/core/list/SolidListViewConfigure.tsx +339 -0
  230. package/dist/components/core/list/SolidListViewHeaderButton.tsx +31 -0
  231. package/dist/components/core/list/SolidListViewHeaderContextMenuButton.tsx +30 -0
  232. package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +41 -0
  233. package/dist/components/core/list/SolidListViewShimmerLoading.tsx +78 -0
  234. package/dist/components/core/list/SolidListingHeader.tsx +42 -0
  235. package/dist/components/core/list/SolidManyToOneFilterElement.tsx +60 -0
  236. package/dist/components/core/list/SolidSelectionDynamicFilterElement.tsx +50 -0
  237. package/dist/components/core/list/SolidSelectionStaticFilterElement.tsx +32 -0
  238. package/dist/components/core/list/SolidTableRowCell.tsx +35 -0
  239. package/dist/components/core/list/SolidVarInputsFilterElement.tsx +184 -0
  240. package/dist/components/core/list/columns/SolidBigintColumn.tsx +9 -0
  241. package/dist/components/core/list/columns/SolidBooleanColumn.tsx +90 -0
  242. package/dist/components/core/list/columns/SolidComputedColumn.tsx +27 -0
  243. package/dist/components/core/list/columns/SolidDateColumn.tsx +90 -0
  244. package/dist/components/core/list/columns/SolidDatetimeColumn.tsx +79 -0
  245. package/dist/components/core/list/columns/SolidDecimalColumn.tsx +9 -0
  246. package/dist/components/core/list/columns/SolidExternalIdColumn.tsx +80 -0
  247. package/dist/components/core/list/columns/SolidFloatColumn.tsx +9 -0
  248. package/dist/components/core/list/columns/SolidIdColumn.tsx +79 -0
  249. package/dist/components/core/list/columns/SolidIntColumn.tsx +87 -0
  250. package/dist/components/core/list/columns/SolidLongTextColumn.tsx +9 -0
  251. package/dist/components/core/list/columns/SolidMediaMultipleColumn.tsx +301 -0
  252. package/dist/components/core/list/columns/SolidMediaSingleColumn.tsx +170 -0
  253. package/dist/components/core/list/columns/SolidRelationColumn.tsx +21 -0
  254. package/dist/components/core/list/columns/SolidRichTextColumn.tsx +9 -0
  255. package/dist/components/core/list/columns/SolidSelectionDynamicColumn.tsx +80 -0
  256. package/dist/components/core/list/columns/SolidSelectionStaticColumn.tsx +81 -0
  257. package/dist/components/core/list/columns/SolidShortTextColumn.tsx +160 -0
  258. package/dist/components/core/list/columns/SolidTimeColumn.tsx +78 -0
  259. package/dist/components/core/list/columns/SolidUuidColumn.tsx +79 -0
  260. package/dist/components/core/list/columns/relations/SolidRelationManyToManyColumn.tsx +106 -0
  261. package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +117 -0
  262. package/dist/components/core/list/columns/relations/SolidRelationOneToManyColumn.tsx +110 -0
  263. package/dist/components/core/list/widgets/SolidManyToManyRelationAvatarListWidget.tsx +30 -0
  264. package/dist/components/core/list/widgets/SolidManyToOneRelationAvatarListWidget.tsx +30 -0
  265. package/dist/components/core/list/widgets/SolidShortTextAvatarWidget.tsx +70 -0
  266. package/dist/components/core/list/widgets/SolidShortTextFieldImageRenderModeWidget.tsx +21 -0
  267. package/dist/components/core/locales/SolidChatterLocaleTabView.tsx +91 -0
  268. package/dist/components/core/locales/SolidLocale.tsx +127 -0
  269. package/dist/components/core/model/CreateModel.tsx +495 -0
  270. package/dist/components/core/model/FieldMetaData.tsx +263 -0
  271. package/dist/components/core/model/FieldMetaDataForm.tsx +3509 -0
  272. package/dist/components/core/model/FieldSelector.tsx +62 -0
  273. package/dist/components/core/model/ModelListViewData.tsx +384 -0
  274. package/dist/components/core/model/ModelMetaData.tsx +921 -0
  275. package/dist/components/core/module/CreateModule.tsx +617 -0
  276. package/dist/components/core/module/ModuleListViewData.tsx +431 -0
  277. package/dist/components/core/solid-ai/SolidAiMainWrapper.tsx +8 -0
  278. package/dist/components/core/solid-ai/SolidXAIIcon.tsx +37 -0
  279. package/dist/components/core/users/CreateUser.tsx +467 -0
  280. package/dist/components/core/users/CreateUserRole.tsx +212 -0
  281. package/dist/components/core/users/UserListView.tsx +376 -0
  282. package/dist/components/layout/AdminLayout.tsx +57 -0
  283. package/dist/components/layout/AdminSidebar.tsx +65 -0
  284. package/dist/components/layout/AppConfig.tsx +104 -0
  285. package/dist/components/layout/AppSidebar.tsx +232 -0
  286. package/dist/components/layout/ButtonLoader.tsx +7 -0
  287. package/dist/components/layout/CustomPagination.tsx +55 -0
  288. package/dist/components/layout/DashboardHeader.tsx +89 -0
  289. package/dist/components/layout/FilterMenu.tsx +122 -0
  290. package/dist/components/layout/Footer.tsx +13 -0
  291. package/dist/components/layout/GlobalSearch.tsx +37 -0
  292. package/dist/components/layout/Header.tsx +8 -0
  293. package/dist/components/layout/Layout.tsx +205 -0
  294. package/dist/components/layout/ListingHeader.tsx +204 -0
  295. package/dist/components/layout/Loader.tsx +16 -0
  296. package/dist/components/layout/UserSidebar.tsx +53 -0
  297. package/dist/components/layout/context/layoutcontext.tsx +52 -0
  298. package/dist/components/layout/navbar-one.tsx +258 -0
  299. package/dist/components/layout/navbar-two-menu.tsx +72 -0
  300. package/dist/components/layout/navbar-two.tsx +37 -0
  301. package/dist/components/layout/user-profile-menu.tsx +213 -0
  302. package/dist/components/layout/user-profile.tsx +7 -0
  303. package/dist/components/modelsComponents/filterIcon.tsx +9 -0
  304. package/dist/constants/error-messages.ts +238 -0
  305. package/dist/declarations.d.ts +22 -0
  306. package/dist/helpers/AppTitle.tsx +12 -0
  307. package/dist/helpers/ToastContainer.tsx +94 -0
  308. package/dist/helpers/autoCompleteVirtualScroll.ts +41 -0
  309. package/dist/helpers/countries.tsx +260 -0
  310. package/dist/helpers/downloadFileWithProgress.ts +91 -0
  311. package/dist/helpers/downloadMediaFile.tsx +21 -0
  312. package/dist/helpers/getAcceptedFileTypes.tsx +22 -0
  313. package/dist/helpers/getRandomColors.tsx +68 -0
  314. package/dist/helpers/helpers.ts +61 -0
  315. package/dist/helpers/hydrateRelationRules.ts +120 -0
  316. package/dist/helpers/permissions.ts +7 -0
  317. package/dist/helpers/registry.ts +337 -0
  318. package/dist/helpers/resendOtpHelper.tsx +5 -0
  319. package/dist/helpers/revalidate.ts +7 -0
  320. package/dist/helpers/rolesHelper.ts +17 -0
  321. package/dist/helpers/solidIcons.tsx +1831 -0
  322. package/dist/helpers/updatePasswordField.ts +41 -0
  323. package/dist/index.ts +421 -0
  324. package/dist/nextAuth/authProviders.d.ts.map +1 -1
  325. package/dist/nextAuth/authProviders.js +6 -5
  326. package/dist/nextAuth/authProviders.js.map +1 -1
  327. package/dist/nextAuth/authProviders.tsx +232 -0
  328. package/dist/nextAuth/handleLogout.tsx +39 -0
  329. package/dist/nextAuth/refreshAccessToken.tsx +28 -0
  330. package/dist/redux/api/aiInteractionApi.ts +59 -0
  331. package/dist/redux/api/authApi.ts +131 -0
  332. package/dist/redux/api/dashboardApi.ts +56 -0
  333. package/dist/redux/api/dashboardQuestionApi.ts +17 -0
  334. package/dist/redux/api/exportTemplateApi.tsx +59 -0
  335. package/dist/redux/api/fetchBaseQuery.tsx +118 -0
  336. package/dist/redux/api/fieldApi.ts +86 -0
  337. package/dist/redux/api/importTransactionApi.tsx +69 -0
  338. package/dist/redux/api/mediaApi.ts +55 -0
  339. package/dist/redux/api/mediaStorageProviderApi.ts +55 -0
  340. package/dist/redux/api/modelApi.ts +80 -0
  341. package/dist/redux/api/moduleApi.ts +72 -0
  342. package/dist/redux/api/permissionApi.ts +32 -0
  343. package/dist/redux/api/pincodeApi.tsx +56 -0
  344. package/dist/redux/api/roleApi.ts +58 -0
  345. package/dist/redux/api/solidActionApi.ts +66 -0
  346. package/dist/redux/api/solidChatterMessageApi.ts +25 -0
  347. package/dist/redux/api/solidEntityApi.tsx +164 -0
  348. package/dist/redux/api/solidMenuApi.ts +71 -0
  349. package/dist/redux/api/solidServiceApi.ts +31 -0
  350. package/dist/redux/api/solidSettingsApi.tsx +83 -0
  351. package/dist/redux/api/solidViewApi.ts +73 -0
  352. package/dist/redux/api/stateApi.tsx +56 -0
  353. package/dist/redux/api/testApi.ts +21 -0
  354. package/dist/redux/api/userApi.ts +135 -0
  355. package/dist/redux/features/authSlice.ts +19 -0
  356. package/dist/redux/features/dataViewSlice.ts +26 -0
  357. package/dist/redux/features/navbarSlice.ts +21 -0
  358. package/dist/redux/features/popupSlice.ts +37 -0
  359. package/dist/redux/features/settingsSlice.ts +60 -0
  360. package/dist/redux/features/themeSlice.ts +17 -0
  361. package/dist/redux/features/userSlice.ts +28 -0
  362. package/dist/redux/hooks/useSolidPopup.ts +20 -0
  363. package/dist/redux/store/defaultStoreConfig.ts +62 -0
  364. package/dist/styles.ts +4 -0
  365. package/dist/types/handlebars.d.ts +4 -0
  366. package/dist/types/index.d.ts +76 -0
  367. package/dist/types/layout.d.ts +94 -0
  368. package/dist/types/next-auth.d.ts +0 -0
  369. package/dist/types/next.d.ts +46 -0
  370. package/dist/types/solid-core.d.ts +320 -0
  371. package/package.json +1 -1
  372. package/src/components/auth/SolidLogin.tsx +26 -13
  373. package/src/nextAuth/authProviders.tsx +9 -5
@@ -0,0 +1,258 @@
1
+ "use client";
2
+ import { ToastContainer } from "../../helpers/ToastContainer";
3
+ import { useGetSolidMenuBasedOnRoleQuery } from "../../redux/api/solidMenuApi";
4
+ import { setIsAuthenticated, setUser } from "../../redux/features/userSlice";
5
+ // import { useAppDispatch } from "../../redux/hooks";
6
+ // import { RootState } from "../../redux/store.js";
7
+ import { signOut, useSession } from "next-auth/react";
8
+ import { Button } from "primereact/button";
9
+ import { IconField } from "primereact/iconfield";
10
+ import { InputIcon } from "primereact/inputicon";
11
+ import { InputText } from "primereact/inputtext";
12
+ import { useEffect, useRef, useState } from "react";
13
+ import { useDispatch } from "react-redux";
14
+ import NavbarTwoMenu from "./navbar-two-menu";
15
+ import UserProfileMenu from "./user-profile-menu";
16
+ // import menu from "../../helpers/menu";
17
+
18
+ const NavbarOne = () => {
19
+ const dispatch = useDispatch();
20
+
21
+ // const { user, isAuthenticated } = useAppSelector((state) => state.auth);
22
+ // const [show, setShow] = useState(false);
23
+ // const visibleNavbar = useSelector(
24
+ // (state: any) => state.navbarState.visibleNavbar
25
+ // );
26
+ const [visibleNavbar, setVisibleNavbar] = useState(false);
27
+
28
+ const { data: menu } = useGetSolidMenuBasedOnRoleQuery("");
29
+
30
+
31
+ const [currentMenu, setCurrentMenu] = useState();
32
+ const [currentMainMenu, setCurrentMainMenu] = useState();
33
+ const [searchTerm, setSearchTerm] = useState("");
34
+
35
+ useEffect(() => {
36
+ if (menu) {
37
+ setCurrentMenu(menu && menu.data.length > 0 && menu.data.filter((m: any) => m.key === process.env.NEXT_PUBLIC_DEFAULT_MENU_KEY)[0]?.children);
38
+ setCurrentMainMenu(menu && menu.data.length > 0 && menu.data.filter((m: any) => m.key === process.env.NEXT_PUBLIC_DEFAULT_MENU_KEY)[0]?.title)
39
+ }
40
+ }, [menu])
41
+
42
+ const { data } = useSession();
43
+
44
+ // const handleToggle = () => setShow(!show);
45
+ const handleToggle = () => setVisibleNavbar(!visibleNavbar);
46
+ const handleMenu = (m: any) => {
47
+ // setShow(true);
48
+ setVisibleNavbar(!visibleNavbar);
49
+ setCurrentMainMenu(m.title);
50
+ setCurrentMenu(m.children);
51
+ };
52
+
53
+ useEffect(() => {
54
+ if (data) {
55
+ dispatch(setUser(data?.user));
56
+ dispatch(setIsAuthenticated(true));
57
+ }
58
+ }, [data]);
59
+
60
+ const logoutHandler = () => {
61
+ signOut();
62
+ };
63
+
64
+ const handleSearch = () => {
65
+ // TODO: Handle the search logic here
66
+
67
+ };
68
+
69
+ const [isSearchShow, setSearchShow] = useState(false);
70
+ const searchRef = useRef<HTMLDivElement>(null);
71
+
72
+ const handleClickOutside = (event: any) => {
73
+ if (searchRef.current && !searchRef.current.contains(event.target)) {
74
+ setSearchShow(false);
75
+ }
76
+ };
77
+
78
+ useEffect(() => {
79
+ if (isSearchShow) {
80
+ document.addEventListener("mousedown", handleClickOutside);
81
+ } else {
82
+ document.removeEventListener("mousedown", handleClickOutside);
83
+ }
84
+
85
+ return () => {
86
+ document.removeEventListener("mousedown", handleClickOutside);
87
+ };
88
+ }, [isSearchShow]);
89
+
90
+
91
+
92
+ return (
93
+ <div className="flex flex-column md:flex-row justify-content-between navBar">
94
+ <ToastContainer />
95
+
96
+ {/* commented this as this is not working properly @Jenendar to figure this out... */}
97
+ {currentMainMenu && (
98
+ <div>
99
+ <a
100
+ className={
101
+ visibleNavbar
102
+ ? "navtwo-toggle active-menu-image"
103
+ : "navtwo-toggle"
104
+ }
105
+ onClick={handleToggle}
106
+ >
107
+ <img
108
+ style={{ cursor: "pointer" }}
109
+ src={`/images/menu-toggle.png`}
110
+ alt="Solid"
111
+ />
112
+ </a>
113
+ </div>
114
+ )}
115
+ <div className="navBarOne">
116
+ <div>
117
+ {/* <div className="p-0">
118
+ <div className="navbar-brand">
119
+ <a href="/">
120
+ <img
121
+ style={{ cursor: "pointer" }}
122
+ src="/images/logo.png"
123
+ alt="Solid"
124
+ />
125
+ </a>
126
+ </div>
127
+ </div> */}
128
+ <div className="navbar-menu">
129
+ <>
130
+ {menu && menu.data.length > 0 && menu.data.map((m: any) => (
131
+ <div
132
+ key={m.title}
133
+ className={`menu-item ${currentMainMenu === m.title ? "active-menu-image" : ""}`}
134
+ >
135
+ <a onClick={() => handleMenu(m)}>
136
+ <img
137
+ style={{ cursor: "pointer", width: '30px' }}
138
+ // src={currentMainMenu === m.title ? `/images/${m.title.toLocaleLowerCase()}-active.svg` : `/images/${m.title.toLocaleLowerCase()}.svg`}
139
+ // src={`/images/menu/${m.title}.svg`}
140
+ src={m.icon.startsWith("/") ? m.icon : `${process.env.API_URL}/${m.icon}`}
141
+ // src={`/images/menu/app-builder.svg`}
142
+ alt="Solid"
143
+ />
144
+ </a>
145
+ </div>
146
+ ))}
147
+ </>
148
+ </div>
149
+ </div>
150
+ <UserProfileMenu></UserProfileMenu>
151
+ </div>
152
+ {currentMenu && (
153
+ <div className={visibleNavbar ? "show navBarTwo" : "hide navBarTwo"}>
154
+ <div className="flex relative justify-content-between align-items-center pt-4 px-3 pb-3 mb-3">
155
+ <div className="absolute bottom-0" style={{ width: 50, height: 0.8, background: '#d8e2ea' }}></div>
156
+ {!isSearchShow && <div className="text-base font-semibold">{currentMainMenu && currentMainMenu}</div>}
157
+ {isSearchShow === false && <Button outlined icon="pi pi-search" severity="secondary" aria-label="Search" size="small" style={{ maxWidth: 32, maxHeight: 32, border: '1px solid #d1d5db' }}
158
+ onClick={() => setSearchShow(true)}
159
+ />
160
+ }
161
+ {isSearchShow &&
162
+ <div className="w-full" style={{ position: 'relative' }} ref={searchRef}>
163
+ <IconField iconPosition="left">
164
+ <InputIcon className="pi pi-search text-sm"> </InputIcon>
165
+ <InputText placeholder="Search" className="small-input text-sm w-full pr-6" />
166
+ </IconField>
167
+ <div className="absolute max-h-1rem" style={{ top: 5, right: 5 }}>
168
+ <img
169
+ // className="absolute right-0 top-0 max-h-1rem"
170
+ style={{ cursor: "pointer", maxHeight: '1.3rem' }}
171
+ src="/images/icons/jump-to-icon.png"
172
+ alt="Solid"
173
+ />
174
+ </div>
175
+ </div>
176
+ }
177
+ {/* <div className="input-icon inputDiv navtwo-searchbox">
178
+ <i className="pi pi-search " style={{ color: '#8D9199' }}></i>
179
+ <input
180
+ type="text"
181
+ placeholder="Jump to..."
182
+ name="lastName"
183
+ id="lastName"
184
+ onChange={(e) => setSearchTerm(e.target.value)}
185
+ value={searchTerm}
186
+ className=""
187
+ />
188
+ <img
189
+ style={{ cursor: "pointer" }}
190
+ src="/images/icons/jump-to-icon.png"
191
+ alt="Solid"
192
+ />
193
+ </div> */}
194
+ </div>
195
+ {/* <div className="flex flex-column md:flex-row navtwo-header justify-content-between">
196
+ <div className="text-sm font-semibold">{currentMainMenu && currentMainMenu}</div> */}
197
+ {/* <a
198
+ className={
199
+ visibleNavbar
200
+ ? "navtwo-toggle active-menu-image"
201
+ : "navtwo-toggle"
202
+ }
203
+ onClick={handleToggle}
204
+ >
205
+ <img
206
+ style={{ cursor: "pointer" }}
207
+ src={`/images/menu-toggle.png`}
208
+ alt="Solid"
209
+ />
210
+ </a> */}
211
+ {/* </div>
212
+ <div className="p-inputgroup"> */}
213
+ {/* <div className="p-inputgroup navtwo-searchbox">
214
+
215
+ <span className="p-inputgroup-addon">
216
+ <i className="pi pi-search "></i>
217
+ </span>
218
+ <InputText
219
+ placeholder="Search"
220
+ onChange={e => setSearchTerm(e.target.value)}
221
+ />
222
+ <span className="p-inputgroup-addon">⌘+k</span>
223
+ </div> */}
224
+ {/* <div className="input-icon inputDiv navtwo-searchbox">
225
+ <i className="pi pi-search " style={{ color: '#8D9199' }}></i>
226
+ <input
227
+ type="text"
228
+ placeholder="Jump to..."
229
+ name="lastName"
230
+ id="lastName"
231
+ onChange={(e) => setSearchTerm(e.target.value)}
232
+ value={searchTerm}
233
+ className=""
234
+ />
235
+ <img
236
+ style={{ cursor: "pointer" }}
237
+ src="/images/icons/jump-to-icon.png"
238
+ alt="Solid"
239
+ />
240
+ </div> */}
241
+
242
+ {/* <Button icon="pi pi-search" className="p-button-outlined" onClick={handleSearch} /> */}
243
+ {/* </div> */}
244
+
245
+ <div
246
+ className={
247
+ visibleNavbar ? "navTwoMenuLayout px-2 show" : "navTwoMenuLayout hide"
248
+ }
249
+ >
250
+ <NavbarTwoMenu menuItems={currentMenu}></NavbarTwoMenu>
251
+ </div>
252
+ </div>
253
+ )}
254
+ </div>
255
+ );
256
+ };
257
+
258
+ export default NavbarOne;
@@ -0,0 +1,72 @@
1
+ 'use client';
2
+ import Link from "next/link";
3
+ import { usePathname } from "next/navigation";
4
+ import { PanelMenu } from "primereact/panelmenu";
5
+ import { useState } from "react";
6
+
7
+ const NavbarTwoMenu = ({ menuItems }: any) => {
8
+ const pathname = usePathname();
9
+ const [expandedKeys, setExpandedKeys] = useState<any>({});
10
+ const itemRenderer = (item: any, options: any) => {
11
+ const isSelected = pathname === item.url
12
+ return (
13
+ <div key={item?.key} className={`flex align-items-center cursor-pointer menuHead px-3 ${isSelected ? ' p-highlight' : ''}`} onClick={options.onClick}>
14
+ <Link href={item?.url ? item?.url : '#'} className="w-full flex justify-content-between font-normal">
15
+ <div className="flex align-items-center" style={{gap: 10}}>
16
+ {item.icon && (
17
+ // material-symbols-${item.iconVariant ?? 'outlined'}
18
+ <span className={`material-symbols-outlined`} style={{ fontSize: 18 }}>
19
+ {item.icon}
20
+ </span>
21
+ )}
22
+ <span>
23
+ {item.label}
24
+ </span>
25
+ </div>
26
+ {item?.items && item?.items?.length > 0 &&
27
+ <span className={`sidebar-chevrons ${expandedKeys[item.key] === true ? "pi pi-angle-up" : "pi pi-angle-down"}`} />
28
+ }
29
+ </Link>
30
+ </div>
31
+ )
32
+ };
33
+
34
+ const createMenuItems = (menuItems: any[]): any[] => {
35
+ return menuItems.map((mi) => ({
36
+ key: mi.key,
37
+ label: mi.title,
38
+ icon: mi.icon ?? "",
39
+ // iconVariant: mi.iconVariant,
40
+ template: itemRenderer,
41
+ url: mi.path ? mi.path : null,
42
+ items: mi.children ? createMenuItems(mi.children) : null, // Recursively add children
43
+ }));
44
+ };
45
+
46
+ const items = createMenuItems(menuItems);
47
+
48
+ const onExpandedKeysChange = (keys: any) => {
49
+ setExpandedKeys(keys);
50
+ };
51
+
52
+ const expandNode = (node: any) => {
53
+ if (node.items && node.items.length) {
54
+ expandedKeys[node.key] = true;
55
+ node.items.forEach(expandNode);
56
+ }
57
+ };
58
+
59
+ return (
60
+ <div className="solid-panel-menu">
61
+ <PanelMenu
62
+ model={items}
63
+ expandedKeys={expandedKeys}
64
+ onExpandedKeysChange={onExpandedKeysChange}
65
+ className="w-full"
66
+ multiple
67
+ />
68
+ </div>
69
+ );
70
+ };
71
+
72
+ export default NavbarTwoMenu;
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { usePathname, useRouter } from "next/navigation";
3
+ import { useState } from "react";
4
+
5
+ const NavbarTwo = () => {
6
+ const router = useRouter();
7
+ const pathname = usePathname();
8
+ const [renderMenu, setRenderMenu] = useState();
9
+
10
+ const iamMenu = [
11
+ {
12
+ title: "Users",
13
+ url: "users",
14
+ subMenu: [],
15
+ },
16
+ {
17
+ title: "Model",
18
+ url: "model",
19
+ subMenu: [
20
+ { title: "Add Model", url: "", subMenu: ["Add One", "Add Multiple"] },
21
+ { title: "Delete Model", url: "delete", subMenu: [] },
22
+ ],
23
+ },
24
+ {
25
+ title: "Field",
26
+ url: "field",
27
+ subMenu: [
28
+ { title: "Add Field", subMenu: ["Add One", "Add Multiple"] },
29
+ { title: "Delete Field", url: "delete", subMenu: [] },
30
+ ],
31
+ },
32
+ ];
33
+
34
+ return <></>
35
+ };
36
+
37
+ export default NavbarTwo;
@@ -0,0 +1,213 @@
1
+ "use client";
2
+ // import { useAppSelector } from "../../redux/hooks";
3
+ import { signOut } from "next-auth/react";
4
+ import { PrimeReactContext } from "primereact/api";
5
+ import { OverlayPanel } from "primereact/overlaypanel";
6
+ import { useContext, useEffect, useRef, useState } from "react";
7
+ import { useDispatch, useSelector } from "react-redux";
8
+ import { LayoutContext } from "./context/layoutcontext";
9
+ import { LayoutConfig } from "../../types";
10
+ import { toggleTheme } from "../../redux/features/themeSlice";
11
+ import { InputSwitch } from "primereact/inputswitch";
12
+ import { Button } from "primereact/button";
13
+ import { useRouter } from "next/navigation";
14
+ import { Dialog } from "primereact/dialog";
15
+ import { Divider } from "primereact/divider";
16
+ import { Avatar } from "primereact/avatar";
17
+ import { SolidAccountSettings } from "../core/common/SolidAccountSettings/SolidAccountSettings";
18
+ import { useGetUserQuery } from "../../redux/api/userApi";
19
+ import { handleLogout } from "../../nextAuth/handleLogout";
20
+ import { Toast } from "primereact/toast";
21
+ import { useLazyGetSolidSettingsQuery } from "../../redux/api/solidSettingsApi";
22
+
23
+ const UserProfileMenu = () => {
24
+ const toast = useRef(null);
25
+ const [showProfileSettingsDialog, setShowProfileSettingsDialog] = useState(false);
26
+ const router = useRouter();
27
+ const [trigger, { data: solidSettingsData }] = useLazyGetSolidSettingsQuery();
28
+
29
+ useEffect(() => {
30
+ trigger("") // Fetch settings on mount
31
+ }, [trigger])
32
+
33
+ // const { user } = useAppSelector((state) => state.auth);
34
+ const { changeTheme } = useContext(PrimeReactContext);
35
+ const { layoutConfig, setLayoutConfig } = useContext(LayoutContext);
36
+ const { theme } = useSelector((state: any) => state.theme); // Get current theme from Redux
37
+ const userId = useSelector((state: any) => state.auth?.user?.user?.id);
38
+ const { data: userData } = useGetUserQuery(userId, {
39
+ skip: !userId,
40
+ });
41
+ const [checked, setChecked] = useState(theme === "dark");
42
+ const [confirmLogout, setConfirmLogout] = useState(false);
43
+ const dispatch = useDispatch();
44
+ const op = useRef(null);
45
+ const logoutHandler = () => {
46
+ signOut();
47
+ };
48
+ const _changeTheme = (theme: string, colorScheme: string) => {
49
+ changeTheme?.(layoutConfig.theme, theme, 'theme-css', () => {
50
+ setLayoutConfig((prevState: LayoutConfig) => ({ ...prevState, theme, colorScheme }));
51
+ });
52
+ };
53
+
54
+ const handleThemeToggle = (e: any) => {
55
+ const isDarkMode = e.value;
56
+ setChecked(isDarkMode);
57
+ dispatch(toggleTheme()); // Dispatch Redux action
58
+ _changeTheme(isDarkMode ? "solid-dark-purple" : "solid-light-purple", isDarkMode ? "dark" : "light");
59
+ };
60
+
61
+ const getInitials = (value: string) => {
62
+ if (!value) return "";
63
+
64
+ const email = value.includes('@') ? value.split('@')[0] : value;
65
+ return email[0]?.toUpperCase() || "";
66
+ };
67
+
68
+ const getColorFromInitials = (initials: string) => {
69
+ let hash = 0;
70
+ for (let i = 0; i < initials.length; i++) {
71
+ hash = initials.charCodeAt(i) + ((hash << 5) - hash);
72
+ }
73
+ const hue = Math.abs(hash) % 360;
74
+ return `hsl(${hue}, 60%, 60%)`;
75
+ };
76
+
77
+
78
+ const value = userData?.data?.email;
79
+ const initials = getInitials(value);
80
+ const bgColor = getColorFromInitials(initials);
81
+
82
+ const UserProfileAvatar = () => {
83
+ return (
84
+ userData?.data?._media?.profilePicture?.[0]?._full_url ?
85
+ <Avatar
86
+ image={userData?.data?._media?.profilePicture?.[0]?._full_url}
87
+ shape="circle"
88
+ size="large"
89
+ />
90
+ :
91
+ <Avatar
92
+ label={initials}
93
+ size="large"
94
+ shape="circle"
95
+ style={{ backgroundColor: bgColor, color: '#ffffff' }}
96
+ />
97
+ )
98
+ }
99
+ return (
100
+ <div className="userProfile">
101
+ <Toast ref={toast} />
102
+ <div
103
+ className="">
104
+ <div
105
+ className="flex align-items-end"
106
+ //@ts-ignore
107
+ onClick={(e: any) => op?.current?.toggle(e)}
108
+ >
109
+ {/* <Image
110
+ src={AvatarImage}
111
+ alt="Solid"
112
+ className="profile-icon relative"
113
+ fill
114
+ /> */}
115
+ <UserProfileAvatar />
116
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
117
+ <path d="M7 5.83301L3.5 9.33301H10.5L7 5.83301Z" fill="var(--solid-primary-black)" />
118
+ </svg>
119
+ </div>
120
+ <OverlayPanel ref={op} className="user-profile-panel">
121
+ <div className="flex align-items-center p-3 gap-2 secondary-border-bottom">
122
+ {/* <Image
123
+ alt="avatar"
124
+ src={AvatarImage}
125
+ className="w-2rem relative"
126
+ fill
127
+ /> */}
128
+ <UserProfileAvatar />
129
+ <div className="flex flex-column align">
130
+ {solidSettingsData?.data?.enableUsername ?
131
+ <span className="font-bold">{userData?.data?.username}</span>
132
+ :
133
+ <span className="mt-1">{userData?.data?.email}</span>
134
+ }
135
+ <span className="mt-1 font-medium">
136
+ {userData?.data?.roles
137
+ ?.filter((role: any) => role.name !== "Internal User")
138
+ .map((role: any) => role.name)
139
+ .join(" | ")}
140
+ </span>
141
+ </div>
142
+ </div>
143
+
144
+ {/* */}
145
+ {solidSettingsData?.data?.enableDarkMode === true &&
146
+ <div className="p-3 flex align-items-center justify-content-between secondary-border-bottom">
147
+ <div className="flex align-items-center gap-3">
148
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
149
+ <path d="M9 18C6.5 18 4.375 17.125 2.625 15.375C0.875 13.625 0 11.5 0 9C0 6.5 0.875 4.375 2.625 2.625C4.375 0.875 6.5 0 9 0C9.23333 0 9.4625 0.00833333 9.6875 0.025C9.9125 0.0416667 10.1333 0.0666667 10.35 0.1C9.66667 0.583333 9.12083 1.2125 8.7125 1.9875C8.30417 2.7625 8.1 3.6 8.1 4.5C8.1 6 8.625 7.275 9.675 8.325C10.725 9.375 12 9.9 13.5 9.9C14.4167 9.9 15.2583 9.69583 16.025 9.2875C16.7917 8.87917 17.4167 8.33333 17.9 7.65C17.9333 7.86667 17.9583 8.0875 17.975 8.3125C17.9917 8.5375 18 8.76667 18 9C18 11.5 17.125 13.625 15.375 15.375C13.625 17.125 11.5 18 9 18ZM9 16C10.4667 16 11.7833 15.5958 12.95 14.7875C14.1167 13.9792 14.9667 12.925 15.5 11.625C15.1667 11.7083 14.8333 11.775 14.5 11.825C14.1667 11.875 13.8333 11.9 13.5 11.9C11.45 11.9 9.70417 11.1792 8.2625 9.7375C6.82083 8.29583 6.1 6.55 6.1 4.5C6.1 4.16667 6.125 3.83333 6.175 3.5C6.225 3.16667 6.29167 2.83333 6.375 2.5C5.075 3.03333 4.02083 3.88333 3.2125 5.05C2.40417 6.21667 2 7.53333 2 9C2 10.9333 2.68333 12.5833 4.05 13.95C5.41667 15.3167 7.06667 16 9 16Z" fill="#1D6CBC" />
150
+ </svg>
151
+ <p className="m-0 font-bold">Dark Mode</p>
152
+ </div>
153
+ <InputSwitch checked={checked} onChange={handleThemeToggle} />
154
+ </div>
155
+ }
156
+ <div className="flex align-items-center py-1 gap-2 secondary-border-bottom">
157
+ <Button severity="secondary" text className="w-full flex align-items-center gap-2 px-3" onClick={() => setShowProfileSettingsDialog(true)}>
158
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
159
+ <path d="M8.1191 16.5C7.7816 16.5 7.49098 16.3875 7.24723 16.1625C7.00348 15.9375 6.8566 15.6625 6.8066 15.3375L6.63785 14.1C6.47535 14.0375 6.32223 13.9625 6.17848 13.875C6.03473 13.7875 5.8941 13.6938 5.7566 13.5938L4.5941 14.0813C4.2816 14.2188 3.9691 14.2313 3.6566 14.1188C3.3441 14.0063 3.10035 13.8063 2.92535 13.5188L2.0441 11.9813C1.8691 11.6938 1.8191 11.3875 1.8941 11.0625C1.9691 10.7375 2.13785 10.4688 2.40035 10.2563L3.3941 9.50625C3.3816 9.41875 3.37535 9.33438 3.37535 9.25313V8.74688C3.37535 8.66563 3.3816 8.58125 3.3941 8.49375L2.40035 7.74375C2.13785 7.53125 1.9691 7.2625 1.8941 6.9375C1.8191 6.6125 1.8691 6.30625 2.0441 6.01875L2.92535 4.48125C3.10035 4.19375 3.3441 3.99375 3.6566 3.88125C3.9691 3.76875 4.2816 3.78125 4.5941 3.91875L5.7566 4.40625C5.8941 4.30625 6.03785 4.2125 6.18785 4.125C6.33785 4.0375 6.48785 3.9625 6.63785 3.9L6.8066 2.6625C6.8566 2.3375 7.00348 2.0625 7.24723 1.8375C7.49098 1.6125 7.7816 1.5 8.1191 1.5H9.8816C10.2191 1.5 10.5097 1.6125 10.7535 1.8375C10.9972 2.0625 11.1441 2.3375 11.1941 2.6625L11.3629 3.9C11.5254 3.9625 11.6785 4.0375 11.8222 4.125C11.966 4.2125 12.1066 4.30625 12.2441 4.40625L13.4066 3.91875C13.7191 3.78125 14.0316 3.76875 14.3441 3.88125C14.6566 3.99375 14.9004 4.19375 15.0754 4.48125L15.9566 6.01875C16.1316 6.30625 16.1816 6.6125 16.1066 6.9375C16.0316 7.2625 15.8629 7.53125 15.6004 7.74375L14.6066 8.49375C14.6191 8.58125 14.6254 8.66563 14.6254 8.74688V9.25313C14.6254 9.33438 14.6129 9.41875 14.5879 9.50625L15.5816 10.2563C15.8441 10.4688 16.0129 10.7375 16.0879 11.0625C16.1629 11.3875 16.1129 11.6938 15.9379 11.9813L15.0379 13.5188C14.8629 13.8063 14.6191 14.0063 14.3066 14.1188C13.9941 14.2313 13.6816 14.2188 13.3691 14.0813L12.2441 13.5938C12.1066 13.6938 11.9629 13.7875 11.8129 13.875C11.6629 13.9625 11.5129 14.0375 11.3629 14.1L11.1941 15.3375C11.1441 15.6625 10.9972 15.9375 10.7535 16.1625C10.5097 16.3875 10.2191 16.5 9.8816 16.5H8.1191ZM8.25035 15H9.7316L9.9941 13.0125C10.3816 12.9125 10.741 12.7656 11.0722 12.5719C11.4035 12.3781 11.7066 12.1438 11.9816 11.8688L13.8379 12.6375L14.5691 11.3625L12.9566 10.1438C13.0191 9.96875 13.0629 9.78438 13.0879 9.59063C13.1129 9.39688 13.1254 9.2 13.1254 9C13.1254 8.8 13.1129 8.60313 13.0879 8.40938C13.0629 8.21563 13.0191 8.03125 12.9566 7.85625L14.5691 6.6375L13.8379 5.3625L11.9816 6.15C11.7066 5.8625 11.4035 5.62188 11.0722 5.42813C10.741 5.23438 10.3816 5.0875 9.9941 4.9875L9.75035 3H8.2691L8.0066 4.9875C7.6191 5.0875 7.25973 5.23438 6.92848 5.42813C6.59723 5.62188 6.2941 5.85625 6.0191 6.13125L4.16285 5.3625L3.4316 6.6375L5.0441 7.8375C4.9816 8.025 4.93785 8.2125 4.91285 8.4C4.88785 8.5875 4.87535 8.7875 4.87535 9C4.87535 9.2 4.88785 9.39375 4.91285 9.58125C4.93785 9.76875 4.9816 9.95625 5.0441 10.1438L3.4316 11.3625L4.16285 12.6375L6.0191 11.85C6.2941 12.1375 6.59723 12.3781 6.92848 12.5719C7.25973 12.7656 7.6191 12.9125 8.0066 13.0125L8.25035 15ZM9.03785 11.625C9.76285 11.625 10.3816 11.3688 10.8941 10.8563C11.4066 10.3438 11.6629 9.725 11.6629 9C11.6629 8.275 11.4066 7.65625 10.8941 7.14375C10.3816 6.63125 9.76285 6.375 9.03785 6.375C8.30035 6.375 7.67848 6.63125 7.17223 7.14375C6.66598 7.65625 6.41285 8.275 6.41285 9C6.41285 9.725 6.66598 10.3438 7.17223 10.8563C7.67848 11.3688 8.30035 11.625 9.03785 11.625Z" fill="#4B4D52" />
160
+ </svg>
161
+ <span className="p-button-label flex-none">
162
+ Account Settings
163
+ </span>
164
+ </Button>
165
+ </div>
166
+ {solidSettingsData?.data?.contactSupportEmail &&
167
+ <div className="flex align-items-center py-1 gap-2 secondary-border-bottom">
168
+ <Button severity="secondary" text className="w-full flex align-items-center gap-2 px-3 ml-1" onClick={() => window.location.href = `mailto:${solidSettingsData?.data?.contactSupportEmail}`} icon={solidSettingsData?.data?.contactSupportIcon || 'pi pi-envelope'}>
169
+ <span className="p-button-label flex-none">
170
+ {solidSettingsData?.data?.contactSupportDisplayName || "Contact Support"}
171
+ </span>
172
+ </Button>
173
+ </div>
174
+ }
175
+ <div className="py-1">
176
+ <Button
177
+ text
178
+ severity="secondary"
179
+ className="flex align-items-center gap-2 w-full px-3"
180
+ onClick={() => setConfirmLogout(true)}
181
+ >
182
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
183
+ <path d="M3.75 15.75C3.3375 15.75 2.98438 15.6031 2.69063 15.3094C2.39687 15.0156 2.25 14.6625 2.25 14.25V3.75C2.25 3.3375 2.39687 2.98438 2.69063 2.69063C2.98438 2.39687 3.3375 2.25 3.75 2.25H9V3.75H3.75V14.25H9V15.75H3.75ZM12 12.75L10.9688 11.6625L12.8813 9.75H6.75V8.25H12.8813L10.9688 6.3375L12 5.25L15.75 9L12 12.75Z" fill="#F04A4A" />
184
+ </svg>
185
+ <span className="p-button-label flex-none ">Logout</span>
186
+ </Button>
187
+ </div>
188
+ </OverlayPanel>
189
+ </div>
190
+ <Dialog header="Logout" headerClassName="py-2" contentClassName="px-0 pb-0" className="solid-confirm-dialog" visible={confirmLogout} style={{ width: '20vw' }} onHide={() => { if (!confirmLogout) return; setConfirmLogout(false); }}
191
+ footer={<div className="flex align-items-center gap-2">
192
+ <Button label="Logout" size="small" onClick={() => handleLogout(toast)} />
193
+ <Button label="Cancel" size="small" onClick={() => setConfirmLogout(false)} outlined />
194
+ </div>}
195
+ >
196
+ <Divider className="m-0" />
197
+ <div className="p-4">
198
+ <p className="m-0 solid-primary-title" style={{ fontSize: 16 }}>
199
+ Are you sure you want to log out?
200
+ </p>
201
+ </div>
202
+ </Dialog>
203
+ {showProfileSettingsDialog &&
204
+ <SolidAccountSettings
205
+ showProfileSettingsDialog={showProfileSettingsDialog}
206
+ setShowProfileSettingsDialog={setShowProfileSettingsDialog}
207
+ />
208
+ }
209
+ </div>
210
+ );
211
+ };
212
+
213
+ export default UserProfileMenu;
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ const UserProfile = () => {
3
+ // const subMenu = ["Add Module sub menu", "Edit sub menu"];
4
+ return <div className="UserProfile">vsfvs</div>;
5
+ };
6
+
7
+ export default UserProfile;
@@ -0,0 +1,9 @@
1
+ "use client";
2
+
3
+ export const FilterIcon = () => {
4
+ return (
5
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="12" viewBox="0 0 18 12" fill="none">
6
+ <path d="M7 12V10H11V12H7ZM3 7V5H15V7H3ZM0 2V0H18V2H0Z" fill="#8D9199" />
7
+ </svg>
8
+ )
9
+ }