@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,390 @@
1
+ 'use client';
2
+ import { InputText } from "primereact/inputtext";
3
+ import { Message } from "primereact/message";
4
+ import * as Yup from 'yup';
5
+ import { FormikObject, ISolidField, SolidFieldProps } from "./ISolidField";
6
+ import { Password } from "primereact/password";
7
+ import { getExtensionComponent } from "../../../../helpers/registry";
8
+ import { SolidFormFieldWidgetProps } from "../../../../types/solid-core";
9
+ import { useState } from "react";
10
+ import { SolidFieldTooltip } from "../../../../components/common/SolidFieldTooltip";
11
+ import { Formik, useFormik } from "formik";
12
+ import { Dialog } from "primereact/dialog";
13
+ import { Button } from "primereact/button";
14
+ import { usePathname, useSearchParams } from "next/navigation";
15
+ import { updatePasswordField } from "../../../../helpers/updatePasswordField";
16
+ import { ERROR_MESSAGES } from "../../../../constants/error-messages";
17
+
18
+ export class SolidPasswordField implements ISolidField {
19
+
20
+ private fieldContext: SolidFieldProps;
21
+
22
+ constructor(fieldContext: SolidFieldProps) {
23
+ this.fieldContext = fieldContext;
24
+ }
25
+
26
+ updateFormData(value: any, formData: FormData): void {
27
+ const fieldName = this.fieldContext?.field?.attrs?.name;
28
+ if (value !== undefined && value !== null && value !== '') {
29
+ formData.append(fieldName, value);
30
+ }
31
+ }
32
+
33
+
34
+ initialValue(): any {
35
+ const fieldName = this.fieldContext.field.attrs.name;
36
+ const fieldDefaultValue = this.fieldContext?.fieldMetadata?.defaultValue;
37
+
38
+ const existingValue = this.fieldContext.data[fieldName];
39
+ // return existingValue !== undefined && existingValue !== null ? existingValue : fieldDefaultValue || '';
40
+ return existingValue !== undefined && existingValue !== null ? undefined : fieldDefaultValue || '';
41
+ }
42
+
43
+ validationSchema(): Yup.Schema {
44
+ let schema: Yup.StringSchema<string | null | undefined> = Yup.string();
45
+
46
+ const fieldMetadata = this.fieldContext.fieldMetadata;
47
+ const fieldLayoutInfo = this.fieldContext.field;
48
+ const fieldName = fieldLayoutInfo.attrs.name;
49
+ const confirmFieldName = `${fieldName}Confirm`;
50
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
51
+
52
+ // 1. required
53
+ // 1. required
54
+ if (fieldMetadata.required) {
55
+ schema = schema.required(ERROR_MESSAGES.FIELD_REUQIRED(fieldLabel));
56
+ } else {
57
+ schema = schema.nullable(); // Allow null when not required
58
+ }
59
+
60
+ // 2. length (min/max)
61
+ if (fieldMetadata.min && fieldMetadata.min > 0) {
62
+ schema = schema.min(fieldMetadata.min, ERROR_MESSAGES.FIELD_MINIMUM_CHARACTER(fieldLabel, fieldMetadata.min));
63
+ }
64
+ if (fieldMetadata.max && fieldMetadata.max > 0) {
65
+ schema = schema.max(fieldMetadata.max, ERROR_MESSAGES.FIELD_MAXIMUM_CHARACTER(fieldLabel, fieldMetadata.max));
66
+ }
67
+ // 3. regular expression
68
+ if (fieldMetadata.regexPattern) {
69
+ const regexPatternNotMatchingErrorMsg = fieldMetadata.regexPatternNotMatchingErrorMsg ?? ERROR_MESSAGES.FIELD_INVALID_DATA(fieldLabel)
70
+ schema = schema.matches(fieldMetadata.regexPattern, regexPatternNotMatchingErrorMsg);
71
+ }
72
+ //check password and confirm password match if password have value
73
+ schema = schema.test('passwords-match', ERROR_MESSAGES.FIELD_MUST_MATCH(fieldLabel), function (value) {
74
+ const { path, parent } = this;
75
+ const confirmValue = parent[confirmFieldName];
76
+
77
+ // Edit mode / untouched → SKIP
78
+ if (!value && !confirmValue) {
79
+ return true;
80
+ }
81
+ // Only one filled → ERROR
82
+ if (value || confirmValue) {
83
+ return value === confirmValue;
84
+ }
85
+ return true; // If password is empty, don't validate match
86
+ });
87
+ return schema;
88
+ }
89
+
90
+ render(formik: FormikObject) {
91
+ const fieldMetadata = this.fieldContext.fieldMetadata;
92
+ const fieldLayoutInfo = this.fieldContext.field;
93
+ const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
94
+ const className = fieldLayoutInfo.attrs?.className || 'field col-12';
95
+ let viewWidget = fieldLayoutInfo.attrs.viewWidget;
96
+ let editWidget = fieldLayoutInfo.attrs.editWidget;
97
+ let createWidget = fieldLayoutInfo?.attrs?.createWidget;
98
+ const pathname = usePathname();
99
+ const isCreateForm = pathname.endsWith('/new');
100
+ const data = this.fieldContext.data || {};
101
+ const isFieldDataEmpty = Object.keys(data).length === 0;
102
+ if (!createWidget) {
103
+ createWidget = 'DefaultPasswordFormCreateWidget';
104
+ }
105
+ if (!editWidget) {
106
+ editWidget = 'DefaultPasswordFormEditWidget';
107
+ }
108
+ if (!viewWidget) {
109
+ viewWidget = 'DefaultPasswordFormViewWidget'; // add of this need to createWidget
110
+ }
111
+ const viewMode: string = this.fieldContext.viewMode;
112
+
113
+ return (
114
+ <>
115
+ <div className={className}>
116
+ {viewMode === "view" &&
117
+ <></>
118
+ // this.renderExtensionRenderMode(viewWidget, formik)
119
+ }
120
+ {viewMode === "edit" && (!isCreateForm && !isFieldDataEmpty) &&
121
+ <>
122
+ {editWidget &&
123
+ this.renderExtensionRenderMode(editWidget, formik)
124
+ }
125
+ </>
126
+ }
127
+ {viewMode === "edit" && (isCreateForm || isFieldDataEmpty) &&
128
+ <>
129
+ {createWidget &&
130
+ this.renderExtensionRenderMode(createWidget, formik)
131
+ }
132
+ </>
133
+ }
134
+
135
+ </div>
136
+ </>
137
+ );
138
+ }
139
+
140
+ renderExtensionRenderMode(widget: string, formik: FormikObject) {
141
+ let DynamicWidget = getExtensionComponent(widget);
142
+ const widgetProps: SolidFormFieldWidgetProps = {
143
+ formik: formik,
144
+ fieldContext: this.fieldContext,
145
+ }
146
+ return (
147
+ <>
148
+ {DynamicWidget && <DynamicWidget {...widgetProps} />}
149
+ </>
150
+ )
151
+ }
152
+ }
153
+
154
+ export const DefaultPasswordFormViewWidget = ({ formik, fieldContext }: SolidFormFieldWidgetProps) => {
155
+ const fieldMetadata = fieldContext.fieldMetadata;
156
+ const fieldLayoutInfo = fieldContext.field;
157
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
158
+ const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
159
+ const [isText, setIsText] = useState(false)
160
+ return (
161
+ <div className="mt-2 flex-column gap-2">
162
+ {showFieldLabel !== false && (
163
+ <p className="m-0 form-field-label font-medium">{fieldLabel}</p>
164
+ )}
165
+ <div className="flex align-items-center gap-4">
166
+ <p className="m-0">
167
+ {isText ? formik.values[fieldLayoutInfo.attrs.name] : "••••••••"}
168
+ </p>
169
+ <i
170
+ className={`pi ${isText ? 'pi-eye' : 'pi-eye-slash'}`}
171
+ onClick={() => setIsText(!isText)}
172
+ style={{ cursor: 'pointer' }}
173
+ />
174
+ </div>
175
+
176
+ </div>
177
+ );
178
+ }
179
+
180
+
181
+
182
+ // Adding formCreateWidget
183
+ export const DefaultPasswordFormCreateWidget = ({ formik, fieldContext }: SolidFormFieldWidgetProps) => {
184
+ const fieldMetadata = fieldContext.fieldMetadata;
185
+ const fieldLayoutInfo = fieldContext.field;
186
+ const className = fieldLayoutInfo.attrs?.className || 'field col-12';
187
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
188
+ const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
189
+ const solidFormViewMetaData = fieldContext.solidFormViewMetaData;
190
+ const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
191
+ const readOnlyPermission = fieldContext.readOnly;
192
+
193
+ const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
194
+
195
+ const fieldDisabled = fieldLayoutInfo.attrs?.disabled;
196
+ const fieldReadonly = fieldLayoutInfo.attrs?.readonly;
197
+
198
+ const formDisabled = solidFormViewMetaData.data.solidView?.layout?.attrs?.disabled;
199
+ const formReadonly = solidFormViewMetaData.data.solidView?.layout?.attrs?.readonly;
200
+ return (
201
+ <div className="relative ">
202
+ <div className="password-field-component">
203
+ <div className="flex flex-column gap-2 mt-1 sm:mt-2 md:mt-3 lg:mt-4">
204
+ {showFieldLabel != false &&
205
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">
206
+ {fieldLabel}
207
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
208
+ <SolidFieldTooltip fieldContext={fieldContext} />
209
+ </label>
210
+ }
211
+ <Password
212
+ id={fieldLayoutInfo.attrs.name}
213
+ name={fieldMetadata.name}
214
+ value={formik.values[fieldLayoutInfo.attrs.name] || ''}
215
+ onChange={(e) => fieldContext.onChange(e, 'onFieldChange')}
216
+ onBlur={(e) => fieldContext.onBlur(e, 'onFieldBlur')}
217
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
218
+ disabled={formDisabled || fieldDisabled}
219
+ toggleMask
220
+ autoComplete="new-password"
221
+ />
222
+ </div>
223
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
224
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
225
+ )}
226
+
227
+ <div className="flex flex-column gap-2 mt-1 sm:mt-2 md:mt-3 lg:mt-4">
228
+ <label htmlFor={`${fieldLayoutInfo.attrs.name}Confirm`} className="form-field-label">
229
+ Confirm {fieldLabel}
230
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
231
+ </label>
232
+ <Password
233
+ id={`${fieldLayoutInfo.attrs.name}Confirm`}
234
+ name={`${fieldLayoutInfo.attrs.name}Confirm`}
235
+ value={formik.values[`${fieldLayoutInfo.attrs.name}Confirm`] || ''}
236
+ onChange={(e) => {
237
+ formik.setFieldValue(`${fieldLayoutInfo.attrs.name}Confirm`, e.target.value);
238
+ }}
239
+ onBlur={(e) => {
240
+ formik.setFieldTouched(`${fieldLayoutInfo.attrs.name}Confirm`, true);
241
+ }}
242
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
243
+ disabled={formDisabled || fieldDisabled}
244
+ toggleMask
245
+ autoComplete="new-password"
246
+ />
247
+ {isFormFieldValid(formik, `${fieldLayoutInfo.attrs.name}Confirm`) && (
248
+ <Message severity="error" text={formik?.errors[`${fieldLayoutInfo.attrs.name}Confirm`]?.toString()} />
249
+ )}
250
+ </div>
251
+ </div>
252
+ </div>
253
+ );
254
+ }
255
+
256
+
257
+ // Adding formEditWidget custom
258
+
259
+ export const DefaultPasswordFormEditWidget = ({ formik, fieldContext }: SolidFormFieldWidgetProps) => {
260
+ const fieldMetadata = fieldContext.fieldMetadata;
261
+ const fieldLayoutInfo = fieldContext.field;
262
+
263
+ const className = fieldLayoutInfo.attrs?.className || 'field col-12';
264
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
265
+ const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
266
+ const solidFormViewMetaData = fieldContext.solidFormViewMetaData;
267
+ const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
268
+ const readOnlyPermission = fieldContext.readOnly;
269
+
270
+ const fieldDisabled = fieldLayoutInfo.attrs?.disabled;
271
+ const fieldReadonly = fieldLayoutInfo.attrs?.readonly;
272
+ const formDisabled = solidFormViewMetaData.data.solidView?.layout?.attrs?.disabled;
273
+ const formReadonly = solidFormViewMetaData.data.solidView?.layout?.attrs?.readonly;
274
+ const url = fieldContext?.modelName
275
+ .replace(/([a-z0-9])([A-Z])/g, '$1-$2')
276
+ .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')
277
+ .toLowerCase();
278
+ const id = fieldContext?.data?.id;
279
+
280
+ const isFormFieldValid = (formik: any, fieldName: string) =>
281
+ formik.touched[fieldName] && formik.errors[fieldName];
282
+
283
+ const [visible, setVisible] = useState(false);
284
+
285
+ const fieldName = fieldLayoutInfo.attrs.name;
286
+ const confirmFieldName = `${fieldName}Confirm`;
287
+
288
+ const modalFormik = useFormik({
289
+ initialValues: {
290
+ [fieldName]: '',
291
+ [confirmFieldName]: '',
292
+ },
293
+ validationSchema: Yup.object({
294
+ [fieldName]: Yup.string().required(ERROR_MESSAGES.FIELD_REUQIRED(fieldLabel)),
295
+ [confirmFieldName]: Yup.string()
296
+ .required(`Confirm ${ERROR_MESSAGES.FIELD_REUQIRED(fieldLabel)}`)
297
+ .oneOf([Yup.ref(fieldName)], ERROR_MESSAGES.FIELD_MUST_MATCH(fieldLabel)),
298
+ }),
299
+ onSubmit: async (values: { [x: string]: any; }, { resetForm }: any) => {
300
+ try {
301
+ await updatePasswordField({
302
+ url,
303
+ id,
304
+ fieldName,
305
+ fieldValue: values[fieldName],
306
+ confirmFieldName,
307
+ confirmFieldValue: values[confirmFieldName],
308
+ });
309
+
310
+ // formik.setFieldValue(fieldName, values[fieldName]);
311
+ resetForm();
312
+ setVisible(false);
313
+ } catch (err) {
314
+ console.error(err);
315
+ // TODO: show user-friendly error
316
+ }
317
+ },
318
+ });
319
+
320
+ return (
321
+ <div className={className}>
322
+ {showFieldLabel !== false && (
323
+ <label htmlFor={fieldName} className="form-field-label">
324
+ {fieldLabel}
325
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
326
+ <SolidFieldTooltip fieldContext={fieldContext} />
327
+ </label>
328
+ )}
329
+
330
+ <Button
331
+ type="button"
332
+ label="Change Password"
333
+ icon="pi pi-lock"
334
+ onClick={() => setVisible(true)}
335
+ className="mt-2"
336
+ disabled={formDisabled || fieldDisabled || readOnlyPermission || fieldReadonly}
337
+ />
338
+
339
+ <Dialog
340
+ header={`Change ${fieldLabel}`}
341
+ visible={visible}
342
+ onHide={() => setVisible(false)}
343
+ style={{ width: '30vw' }}
344
+ className="solid-confirm-dialog"
345
+ >
346
+ <form onSubmit={modalFormik.handleSubmit} className="p-fluid">
347
+ <div className="field">
348
+ <label htmlFor={fieldName}>New {fieldLabel}</label>
349
+ <Password
350
+ id={fieldName}
351
+ name={fieldName}
352
+ value={modalFormik.values[fieldName]}
353
+ onChange={modalFormik.handleChange}
354
+ onBlur={modalFormik.handleBlur}
355
+ toggleMask
356
+ feedback={false}
357
+ autoComplete="new-password"
358
+ />
359
+ {isFormFieldValid(modalFormik, fieldName) && (
360
+ <Message severity="error" text={modalFormik.errors[fieldName]?.toString()} />
361
+ )}
362
+ </div>
363
+
364
+ <div className="field mt-4">
365
+ <label htmlFor={confirmFieldName}>Confirm {fieldLabel}</label>
366
+ <Password
367
+ id={confirmFieldName}
368
+ name={confirmFieldName}
369
+ value={modalFormik.values[confirmFieldName]}
370
+ onChange={modalFormik.handleChange}
371
+ onBlur={modalFormik.handleBlur}
372
+ toggleMask
373
+ feedback={false}
374
+ autoComplete="new-password"
375
+ />
376
+ {isFormFieldValid(modalFormik, confirmFieldName) && (
377
+ <Message severity="error" text={modalFormik.errors[confirmFieldName]?.toString()} />
378
+ )}
379
+ </div>
380
+
381
+ <div className="mt-5">
382
+ <Button label="Update Password" icon="pi pi-check" type="submit" className="w-full" />
383
+ </div>
384
+ </form>
385
+ </Dialog>
386
+ </div>
387
+ );
388
+ };
389
+
390
+
@@ -0,0 +1,56 @@
1
+ 'use client';
2
+ import { Schema } from "yup";
3
+ import { FormikObject, ISolidField, SolidFieldProps } from "./ISolidField";
4
+ import { SolidRelationManyToManyField } from "./relations/SolidRelationManyToManyField";
5
+ import { SolidRelationManyToOneField } from "./relations/SolidRelationManyToOneField";
6
+ import { SolidRelationOneToManyField } from "./relations/SolidRelationOneToManyField";
7
+ import { ERROR_MESSAGES } from "../../../../constants/error-messages";
8
+
9
+
10
+ export class SolidRelationField implements ISolidField {
11
+
12
+ private fieldContext: SolidFieldProps;
13
+
14
+ constructor(fieldContext: SolidFieldProps) {
15
+ this.fieldContext = fieldContext;
16
+ }
17
+
18
+ relationField(): ISolidField {
19
+ const fieldMetadata = this.fieldContext.fieldMetadata;
20
+ let relationField = null;
21
+
22
+ if (fieldMetadata.relationType === 'many-to-one') {
23
+ relationField = new SolidRelationManyToOneField(this.fieldContext);
24
+ }
25
+ if (fieldMetadata.relationType === 'many-to-many') {
26
+ relationField = new SolidRelationManyToManyField(this.fieldContext);
27
+ }
28
+ if (fieldMetadata.relationType === 'one-to-many') {
29
+ relationField = new SolidRelationOneToManyField(this.fieldContext);
30
+ }
31
+
32
+ if (!relationField) {
33
+ throw new Error(ERROR_MESSAGES.INVALID_RELATION_TYPE(fieldMetadata.relationType , this.fieldContext.field.attrs.name))
34
+
35
+ }
36
+
37
+ return relationField;
38
+ }
39
+
40
+ initialValue(): any {
41
+ return this.relationField()?.initialValue();
42
+ }
43
+
44
+ updateFormData(value: any, formData: FormData): any {
45
+ return this.relationField().updateFormData(value, formData);
46
+
47
+ }
48
+
49
+ validationSchema(): Schema {
50
+ return this.relationField().validationSchema();
51
+ }
52
+
53
+ render(formik: FormikObject) {
54
+ return this.relationField().render(formik);
55
+ }
56
+ }
@@ -0,0 +1,188 @@
1
+ 'use client';
2
+ import { Editor } from "primereact/editor";
3
+ import { Message } from "primereact/message";
4
+ import { useState } from "react";
5
+ import * as Yup from 'yup';
6
+ import { FormikObject, ISolidField, SolidFieldProps } from "./ISolidField";
7
+ import { getExtensionComponent } from "../../../../helpers/registry";
8
+ import { SolidFormFieldWidgetProps } from "../../../../types/solid-core";
9
+ import { SolidFieldTooltip } from "../../../../components/common/SolidFieldTooltip";
10
+ import { ERROR_MESSAGES } from "../../../../constants/error-messages";
11
+
12
+ export class SolidRichTextField implements ISolidField {
13
+
14
+ private fieldContext: SolidFieldProps;
15
+
16
+ constructor(fieldContext: SolidFieldProps) {
17
+ this.fieldContext = fieldContext;
18
+ }
19
+
20
+ updateFormData(value: any, formData: FormData): any {
21
+ const fieldLayoutInfo = this.fieldContext.field;
22
+ if (value !== undefined && value !== null) {
23
+ formData.append(fieldLayoutInfo.attrs.name, value);
24
+ }
25
+ }
26
+
27
+ initialValue(): any {
28
+ return this.fieldContext.data[this.fieldContext.field.attrs.name];
29
+ }
30
+
31
+ validationSchema(): Yup.Schema {
32
+ let schema: Yup.StringSchema<string | null | undefined> = Yup.string();
33
+
34
+ const fieldMetadata = this.fieldContext.fieldMetadata;
35
+ const fieldLayoutInfo = this.fieldContext.field;
36
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
37
+
38
+ // 1. required
39
+ if (fieldMetadata.required) {
40
+ schema = schema.required(ERROR_MESSAGES.FIELD_REUQIRED(fieldLabel));
41
+ } else {
42
+ schema = schema.nullable(); // Allow null when not required
43
+ }
44
+ // 2. length (min/max)
45
+ if (fieldMetadata.min && fieldMetadata.min > 0) {
46
+ schema = schema.min(fieldMetadata.min, ERROR_MESSAGES.FIELD_MINIMUM_CHARACTER(fieldLabel,fieldMetadata.min));
47
+ }
48
+ if (fieldMetadata.max && fieldMetadata.max > 0) {
49
+ schema = schema.max(fieldMetadata.max, ERROR_MESSAGES.FIELD_MAXIMUM_CHARACTER(fieldLabel,fieldMetadata.max));
50
+ }
51
+ // 3. regular expression
52
+ if (fieldMetadata.regexPattern) {
53
+ const regexPatternNotMatchingErrorMsg = fieldMetadata.regexPatternNotMatchingErrorMsg ?? `${fieldLabel} has invalid data.`
54
+ schema = schema.matches(fieldMetadata.regexPattern, regexPatternNotMatchingErrorMsg);
55
+ }
56
+
57
+ return schema;
58
+ }
59
+
60
+ render(formik: FormikObject) {
61
+ const fieldMetadata = this.fieldContext.fieldMetadata;
62
+ const fieldLayoutInfo = this.fieldContext.field;
63
+ const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
64
+ const className = fieldLayoutInfo.attrs?.className || 'field col-12';
65
+
66
+
67
+ let viewWidget = fieldLayoutInfo.attrs.viewWidget;
68
+ let editWidget = fieldLayoutInfo.attrs.editWidget;
69
+ if (!editWidget) {
70
+ editWidget = 'DefaultRichTextFormEditWidget';
71
+ }
72
+ if (!viewWidget) {
73
+ viewWidget = 'DefaultRichTextFormViewWidget';
74
+ }
75
+ const viewMode: string = this.fieldContext.viewMode;
76
+
77
+
78
+ return (
79
+ <>
80
+ <div className={className}>
81
+ {viewMode === "view" &&
82
+ this.renderExtensionRenderMode(viewWidget, formik)
83
+ }
84
+ {viewMode === "edit" &&
85
+ <>
86
+ {editWidget &&
87
+ this.renderExtensionRenderMode(editWidget, formik)
88
+ }
89
+ </>
90
+ }
91
+ </div>
92
+ </>
93
+ );
94
+ }
95
+
96
+ renderExtensionRenderMode(widget: string, formik: FormikObject) {
97
+ let DynamicWidget = getExtensionComponent(widget);
98
+ const widgetProps: SolidFormFieldWidgetProps = {
99
+ formik: formik,
100
+ fieldContext: this.fieldContext,
101
+ }
102
+ return (
103
+ <>
104
+ {DynamicWidget && <DynamicWidget {...widgetProps} />}
105
+ </>
106
+ )
107
+ }
108
+ }
109
+
110
+
111
+
112
+ export const DefaultRichTextFormEditWidget = ({ formik, fieldContext }: SolidFormFieldWidgetProps) => {
113
+ const fieldMetadata = fieldContext.fieldMetadata;
114
+ const fieldLayoutInfo = fieldContext.field;
115
+ const className = fieldLayoutInfo.attrs?.className || 'field col-12';
116
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
117
+ const fieldDescription = fieldLayoutInfo.attrs.description ?? fieldMetadata.description;
118
+ const solidFormViewMetaData = fieldContext.solidFormViewMetaData;
119
+ const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
120
+ const readOnlyPermission = fieldContext.readOnly;
121
+
122
+ const isFormFieldValid = (formik: any, fieldName: string) => formik.touched[fieldName] && formik.errors[fieldName];
123
+
124
+ const fieldDisabled = fieldLayoutInfo.attrs?.disabled;
125
+ const fieldReadonly = fieldLayoutInfo.attrs?.readonly;
126
+
127
+ const formDisabled = solidFormViewMetaData.data.solidView?.layout?.attrs?.disabled;
128
+ const formReadonly = solidFormViewMetaData.data.solidView?.layout?.attrs?.readonly;
129
+
130
+
131
+ return (
132
+ <div className="relative">
133
+ <div className="flex flex-column gap-2 mt-1 sm:mt-2 md:mt-3 lg:mt-4">
134
+ {showFieldLabel != false &&
135
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
136
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
137
+ <SolidFieldTooltip fieldContext={fieldContext} />
138
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
139
+ </label>
140
+ }
141
+ <Editor
142
+ readOnly={formReadonly || fieldReadonly || readOnlyPermission}
143
+ disabled={formDisabled || fieldDisabled}
144
+ key={fieldLayoutInfo.attrs.name} // React will re-render the component whenever this value changes
145
+ id={fieldLayoutInfo.attrs.name}
146
+ value={formik.values[fieldLayoutInfo.attrs.name]}
147
+ onTextChange={e => formik.setFieldValue(fieldLayoutInfo.attrs.name, e.htmlValue)}
148
+ style={{ height: "320px" }}
149
+ className="solid-custom-editor"
150
+ />
151
+ </div>
152
+ {isFormFieldValid(formik, fieldLayoutInfo.attrs.name) && (
153
+ <div className="absolute mt-1">
154
+ <Message severity="error" text={formik?.errors[fieldLayoutInfo.attrs.name]?.toString()} />
155
+ </div>
156
+ )}
157
+ </div>
158
+ );
159
+ }
160
+
161
+ export const DefaultRichTextFormViewWidget = ({ formik, fieldContext }: SolidFormFieldWidgetProps) => {
162
+ const fieldMetadata = fieldContext.fieldMetadata;
163
+ const fieldLayoutInfo = fieldContext.field;
164
+ const fieldLabel = fieldLayoutInfo.attrs.label ?? fieldMetadata.displayName;
165
+ const showFieldLabel = fieldLayoutInfo?.attrs?.showLabel;
166
+ const [isText, setIsText] = useState(false)
167
+ return (
168
+ <div className="relative">
169
+ <div className="flex flex-column gap-2 mt-1 sm:mt-2 md:mt-3 lg:mt-4">
170
+ {showFieldLabel != false &&
171
+ <label htmlFor={fieldLayoutInfo.attrs.name} className="form-field-label">{fieldLabel}
172
+ {fieldMetadata.required && <span className="text-red-500"> *</span>}
173
+ <SolidFieldTooltip fieldContext={fieldContext} />
174
+ {/* &nbsp; {fieldDescription && <span className="form_field_help">({fieldDescription}) </span>} */}
175
+ </label>
176
+ }
177
+ <Editor
178
+ readOnly={true}
179
+ key={fieldLabel} // React will re-render the component whenever this value changes
180
+ id={fieldLabel}
181
+ value={formik.values[fieldLayoutInfo.attrs.name]}
182
+ style={{ height: "320px" }}
183
+ className="solid-custom-editor"
184
+ />
185
+ </div>
186
+ </div>
187
+ );
188
+ }