@solidstarters/solid-core-ui 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/dist/components/auth/SolidForgotPassword.d.ts +3 -0
  2. package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -0
  3. package/dist/components/auth/SolidForgotPassword.js +108 -0
  4. package/dist/components/auth/SolidForgotPassword.js.map +1 -0
  5. package/dist/components/auth/SolidLogin.d.ts +3 -0
  6. package/dist/components/auth/SolidLogin.d.ts.map +1 -0
  7. package/dist/components/auth/SolidLogin.js +115 -0
  8. package/dist/components/auth/SolidLogin.js.map +1 -0
  9. package/dist/components/auth/SolidOTPVerify.d.ts +3 -0
  10. package/dist/components/auth/SolidOTPVerify.d.ts.map +1 -0
  11. package/dist/components/auth/SolidOTPVerify.js +108 -0
  12. package/dist/components/auth/SolidOTPVerify.js.map +1 -0
  13. package/dist/components/auth/SolidRegister.d.ts +3 -0
  14. package/dist/components/auth/SolidRegister.d.ts.map +1 -0
  15. package/dist/components/auth/SolidRegister.js +166 -0
  16. package/dist/components/auth/SolidRegister.js.map +1 -0
  17. package/dist/components/auth/SolidResetPassword.d.ts +3 -0
  18. package/dist/components/auth/SolidResetPassword.d.ts.map +1 -0
  19. package/dist/components/auth/SolidResetPassword.js +119 -0
  20. package/dist/components/auth/SolidResetPassword.js.map +1 -0
  21. package/dist/components/core/common/FilterComponent.d.ts +33 -1
  22. package/dist/components/core/common/FilterComponent.d.ts.map +1 -1
  23. package/dist/components/core/common/FilterComponent.js +26 -25
  24. package/dist/components/core/common/FilterComponent.js.map +1 -1
  25. package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -1
  26. package/dist/components/core/common/SolidConfigureLayoutElement.js +3 -3
  27. package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
  28. package/dist/components/core/common/SolidCreateButton.js +1 -1
  29. package/dist/components/core/common/SolidCreateButton.js.map +1 -1
  30. package/dist/components/core/common/SolidGlobalSearchElement.d.ts +1 -1
  31. package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
  32. package/dist/components/core/common/SolidGlobalSearchElement.js +14 -9
  33. package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
  34. package/dist/components/core/common/SolidLayoutViews.d.ts +19 -0
  35. package/dist/components/core/common/SolidLayoutViews.d.ts.map +1 -0
  36. package/dist/components/core/common/SolidLayoutViews.js +14 -0
  37. package/dist/components/core/common/SolidLayoutViews.js.map +1 -0
  38. package/dist/components/core/common/SolidListViewOptions.d.ts +2 -0
  39. package/dist/components/core/common/SolidListViewOptions.d.ts.map +1 -0
  40. package/dist/components/core/common/SolidListViewOptions.js +11 -0
  41. package/dist/components/core/common/SolidListViewOptions.js.map +1 -0
  42. package/dist/components/core/filter/SolidManyToOneFilterElement.js +1 -1
  43. package/dist/components/core/filter/SolidManyToOneFilterElement.js.map +1 -1
  44. package/dist/components/core/filter/columns/SolidBigintField.d.ts +4 -0
  45. package/dist/components/core/filter/columns/SolidBigintField.d.ts.map +1 -0
  46. package/dist/components/core/filter/columns/SolidBigintField.js +8 -0
  47. package/dist/components/core/filter/columns/SolidBigintField.js.map +1 -0
  48. package/dist/components/core/filter/columns/SolidBooleanField.d.ts +4 -0
  49. package/dist/components/core/filter/columns/SolidBooleanField.d.ts.map +1 -0
  50. package/dist/components/core/filter/columns/SolidBooleanField.js +27 -0
  51. package/dist/components/core/filter/columns/SolidBooleanField.js.map +1 -0
  52. package/dist/components/core/filter/columns/SolidComputedField.d.ts +4 -0
  53. package/dist/components/core/filter/columns/SolidComputedField.d.ts.map +1 -0
  54. package/dist/components/core/filter/columns/SolidComputedField.js +22 -0
  55. package/dist/components/core/filter/columns/SolidComputedField.js.map +1 -0
  56. package/dist/components/core/filter/columns/SolidDateField.d.ts +9 -0
  57. package/dist/components/core/filter/columns/SolidDateField.d.ts.map +1 -0
  58. package/dist/components/core/filter/columns/SolidDateField.js +35 -0
  59. package/dist/components/core/filter/columns/SolidDateField.js.map +1 -0
  60. package/dist/components/core/filter/columns/SolidDatetimeField.d.ts +4 -0
  61. package/dist/components/core/filter/columns/SolidDatetimeField.d.ts.map +1 -0
  62. package/dist/components/core/filter/columns/SolidDatetimeField.js +24 -0
  63. package/dist/components/core/filter/columns/SolidDatetimeField.js.map +1 -0
  64. package/dist/components/core/filter/columns/SolidDecimalField.d.ts +4 -0
  65. package/dist/components/core/filter/columns/SolidDecimalField.d.ts.map +1 -0
  66. package/dist/components/core/filter/columns/SolidDecimalField.js +8 -0
  67. package/dist/components/core/filter/columns/SolidDecimalField.js.map +1 -0
  68. package/dist/components/core/filter/columns/SolidExternalIdField.d.ts +4 -0
  69. package/dist/components/core/filter/columns/SolidExternalIdField.d.ts.map +1 -0
  70. package/dist/components/core/filter/columns/SolidExternalIdField.js +25 -0
  71. package/dist/components/core/filter/columns/SolidExternalIdField.js.map +1 -0
  72. package/dist/components/core/filter/columns/SolidFloatField.d.ts +4 -0
  73. package/dist/components/core/filter/columns/SolidFloatField.d.ts.map +1 -0
  74. package/dist/components/core/filter/columns/SolidFloatField.js +8 -0
  75. package/dist/components/core/filter/columns/SolidFloatField.js.map +1 -0
  76. package/dist/components/core/filter/columns/SolidIdField.d.ts +4 -0
  77. package/dist/components/core/filter/columns/SolidIdField.d.ts.map +1 -0
  78. package/dist/components/core/filter/columns/SolidIdField.js +25 -0
  79. package/dist/components/core/filter/columns/SolidIdField.js.map +1 -0
  80. package/dist/components/core/filter/columns/SolidIntField.d.ts +4 -0
  81. package/dist/components/core/filter/columns/SolidIntField.d.ts.map +1 -0
  82. package/dist/components/core/filter/columns/SolidIntField.js +34 -0
  83. package/dist/components/core/filter/columns/SolidIntField.js.map +1 -0
  84. package/dist/components/core/filter/columns/SolidLongTextField.d.ts +4 -0
  85. package/dist/components/core/filter/columns/SolidLongTextField.d.ts.map +1 -0
  86. package/dist/components/core/filter/columns/SolidLongTextField.js +8 -0
  87. package/dist/components/core/filter/columns/SolidLongTextField.js.map +1 -0
  88. package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts +4 -0
  89. package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts.map +1 -0
  90. package/dist/components/core/filter/columns/SolidMediaMultipleField.js +35 -0
  91. package/dist/components/core/filter/columns/SolidMediaMultipleField.js.map +1 -0
  92. package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts +4 -0
  93. package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts.map +1 -0
  94. package/dist/components/core/filter/columns/SolidMediaSingleField.js +35 -0
  95. package/dist/components/core/filter/columns/SolidMediaSingleField.js.map +1 -0
  96. package/dist/components/core/filter/columns/SolidRelationField.d.ts +4 -0
  97. package/dist/components/core/filter/columns/SolidRelationField.d.ts.map +1 -0
  98. package/dist/components/core/filter/columns/SolidRelationField.js +12 -0
  99. package/dist/components/core/filter/columns/SolidRelationField.js.map +1 -0
  100. package/dist/components/core/filter/columns/SolidRichTextField.d.ts +4 -0
  101. package/dist/components/core/filter/columns/SolidRichTextField.d.ts.map +1 -0
  102. package/dist/components/core/filter/columns/SolidRichTextField.js +8 -0
  103. package/dist/components/core/filter/columns/SolidRichTextField.js.map +1 -0
  104. package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts +4 -0
  105. package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts.map +1 -0
  106. package/dist/components/core/filter/columns/SolidSelectionDynamicField.js +25 -0
  107. package/dist/components/core/filter/columns/SolidSelectionDynamicField.js.map +1 -0
  108. package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts +4 -0
  109. package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts.map +1 -0
  110. package/dist/components/core/filter/columns/SolidSelectionStaticField.js +26 -0
  111. package/dist/components/core/filter/columns/SolidSelectionStaticField.js.map +1 -0
  112. package/dist/components/core/filter/columns/SolidShortTextField.d.ts +4 -0
  113. package/dist/components/core/filter/columns/SolidShortTextField.d.ts.map +1 -0
  114. package/dist/components/core/filter/columns/SolidShortTextField.js +33 -0
  115. package/dist/components/core/filter/columns/SolidShortTextField.js.map +1 -0
  116. package/dist/components/core/filter/columns/SolidTimeField.d.ts +4 -0
  117. package/dist/components/core/filter/columns/SolidTimeField.d.ts.map +1 -0
  118. package/dist/components/core/filter/columns/SolidTimeField.js +24 -0
  119. package/dist/components/core/filter/columns/SolidTimeField.js.map +1 -0
  120. package/dist/components/core/filter/columns/SolidUuidField.d.ts +4 -0
  121. package/dist/components/core/filter/columns/SolidUuidField.d.ts.map +1 -0
  122. package/dist/components/core/filter/columns/SolidUuidField.js +25 -0
  123. package/dist/components/core/filter/columns/SolidUuidField.js.map +1 -0
  124. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts +4 -0
  125. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts.map +1 -0
  126. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js +54 -0
  127. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js.map +1 -0
  128. package/dist/components/core/kanban/KanbanBoard.d.ts +1 -1
  129. package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
  130. package/dist/components/core/kanban/KanbanBoard.js +11 -11
  131. package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
  132. package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
  133. package/dist/components/core/kanban/SolidKanbanView.js +113 -202
  134. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  135. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  136. package/dist/components/core/list/SolidListView.js +312 -62
  137. package/dist/components/core/list/SolidListView.js.map +1 -1
  138. package/dist/components/core/list/SolidManyToOneFilterElement.js +2 -3
  139. package/dist/components/core/list/SolidManyToOneFilterElement.js.map +1 -1
  140. package/dist/components/core/list/columns/SolidBooleanColumn.js +3 -1
  141. package/dist/components/core/list/columns/SolidBooleanColumn.js.map +1 -1
  142. package/dist/components/core/list/columns/SolidSelectionStaticColumn.js +3 -1
  143. package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
  144. package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
  145. package/dist/components/core/list/columns/SolidShortTextColumn.js +5 -1
  146. package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
  147. package/dist/components/core/list/columns/SolidTimeColumn.js +3 -1
  148. package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
  149. package/dist/components/core/list/columns/SolidUuidColumn.js +3 -1
  150. package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
  151. package/dist/components/layout/AppConfig.d.ts +4 -0
  152. package/dist/components/layout/AppConfig.d.ts.map +1 -0
  153. package/dist/components/layout/AppConfig.js +57 -0
  154. package/dist/components/layout/AppConfig.js.map +1 -0
  155. package/dist/components/layout/AppSidebar.d.ts +3 -0
  156. package/dist/components/layout/AppSidebar.d.ts.map +1 -0
  157. package/dist/components/layout/AppSidebar.js +75 -0
  158. package/dist/components/layout/AppSidebar.js.map +1 -0
  159. package/dist/components/layout/CustomPagination.d.ts +0 -6
  160. package/dist/components/layout/CustomPagination.d.ts.map +1 -1
  161. package/dist/components/layout/CustomPagination.js +48 -27
  162. package/dist/components/layout/CustomPagination.js.map +1 -1
  163. package/dist/components/layout/FilterMenu.d.ts.map +1 -1
  164. package/dist/components/layout/FilterMenu.js +1 -2
  165. package/dist/components/layout/FilterMenu.js.map +1 -1
  166. package/dist/components/layout/context/layoutcontext.d.ts +5 -0
  167. package/dist/components/layout/context/layoutcontext.d.ts.map +1 -0
  168. package/dist/components/layout/context/layoutcontext.js +56 -0
  169. package/dist/components/layout/context/layoutcontext.js.map +1 -0
  170. package/dist/components/layout/navbar-two-menu.d.ts.map +1 -1
  171. package/dist/components/layout/navbar-two-menu.js +5 -5
  172. package/dist/components/layout/navbar-two-menu.js.map +1 -1
  173. package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
  174. package/dist/components/layout/user-profile-menu.js +37 -5
  175. package/dist/components/layout/user-profile-menu.js.map +1 -1
  176. package/dist/components/modelsComponents/filterIcon.d.ts.map +1 -1
  177. package/dist/components/modelsComponents/filterIcon.js.map +1 -1
  178. package/dist/components/tables/ListViewTable.d.ts.map +1 -1
  179. package/dist/components/tables/ListViewTable.js +2 -1
  180. package/dist/components/tables/ListViewTable.js.map +1 -1
  181. package/dist/helpers/helpers.d.ts +1 -1
  182. package/dist/helpers/helpers.d.ts.map +1 -1
  183. package/dist/index.d.ts +19 -14
  184. package/dist/index.d.ts.map +1 -1
  185. package/dist/index.js +40 -32
  186. package/dist/index.js.map +1 -1
  187. package/package.json +2 -1
  188. package/src/components/auth/SolidForgotPassword.tsx +124 -0
  189. package/src/components/auth/SolidLogin.tsx +156 -0
  190. package/src/components/auth/SolidOTPVerify.tsx +127 -0
  191. package/src/components/auth/SolidRegister.tsx +221 -0
  192. package/src/components/auth/SolidResetPassword.tsx +160 -0
  193. package/src/components/core/common/FilterComponent.tsx +45 -40
  194. package/src/components/core/common/SolidConfigureLayoutElement.tsx +11 -10
  195. package/src/components/core/common/SolidCreateButton.tsx +1 -1
  196. package/src/components/core/common/SolidGlobalSearchElement.tsx +33 -13
  197. package/src/components/core/common/SolidLayoutViews.tsx +87 -0
  198. package/src/components/core/common/SolidListViewOptions.tsx +31 -0
  199. package/src/components/core/filter/SolidManyToOneFilterElement.tsx +1 -1
  200. package/src/components/core/kanban/KanbanBoard.tsx +7 -4
  201. package/src/components/core/kanban/SolidKanbanView.tsx +110 -248
  202. package/src/components/core/list/SolidListView.tsx +421 -96
  203. package/src/components/core/list/SolidManyToOneFilterElement.tsx +3 -3
  204. package/src/components/core/list/columns/SolidBooleanColumn.tsx +1 -1
  205. package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +1 -1
  206. package/src/components/core/list/columns/SolidShortTextColumn.tsx +8 -3
  207. package/src/components/core/list/columns/SolidTimeColumn.tsx +1 -1
  208. package/src/components/core/list/columns/SolidUuidColumn.tsx +1 -1
  209. package/src/components/layout/AppConfig.tsx +103 -0
  210. package/src/components/layout/AppSidebar.tsx +170 -0
  211. package/src/components/layout/CustomPagination.tsx +55 -55
  212. package/src/components/layout/FilterMenu.tsx +1 -2
  213. package/src/components/layout/context/layoutcontext.tsx +52 -0
  214. package/src/components/layout/navbar-two-menu.tsx +12 -9
  215. package/src/components/layout/user-profile-menu.tsx +74 -189
  216. package/src/components/modelsComponents/filterIcon.tsx +0 -1
  217. package/src/components/tables/ListViewTable.tsx +4 -3
  218. package/src/index.ts +157 -144
  219. package/src/types/index.d.ts +26 -0
  220. package/src/types/layout.d.ts +94 -0
  221. package/src/types/next-auth.d.ts +0 -0
  222. package/dist/components/core/kanban/SolidKanbanFilter.d.ts +0 -2
  223. package/dist/components/core/kanban/SolidKanbanFilter.d.ts.map +0 -1
  224. package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts +0 -10
  225. package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts.map +0 -1
  226. package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts +0 -2
  227. package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +0 -1
  228. package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts +0 -2
  229. package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts.map +0 -1
  230. package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts +0 -2
  231. package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts.map +0 -1
  232. package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts +0 -12
  233. package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts.map +0 -1
  234. package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts +0 -4
  235. package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts.map +0 -1
  236. package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts +0 -4
  237. package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts.map +0 -1
  238. package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts +0 -4
  239. package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts.map +0 -1
  240. package/dist/components/core/kanban/columns/SolidDateColumn.d.ts +0 -9
  241. package/dist/components/core/kanban/columns/SolidDateColumn.d.ts.map +0 -1
  242. package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts +0 -4
  243. package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts.map +0 -1
  244. package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts +0 -4
  245. package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts.map +0 -1
  246. package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts +0 -4
  247. package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts.map +0 -1
  248. package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts +0 -4
  249. package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts.map +0 -1
  250. package/dist/components/core/kanban/columns/SolidIdColumn.d.ts +0 -4
  251. package/dist/components/core/kanban/columns/SolidIdColumn.d.ts.map +0 -1
  252. package/dist/components/core/kanban/columns/SolidIntColumn.d.ts +0 -4
  253. package/dist/components/core/kanban/columns/SolidIntColumn.d.ts.map +0 -1
  254. package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts +0 -4
  255. package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts.map +0 -1
  256. package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts +0 -4
  257. package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts.map +0 -1
  258. package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts +0 -4
  259. package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts.map +0 -1
  260. package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts +0 -4
  261. package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts.map +0 -1
  262. package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts +0 -4
  263. package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts.map +0 -1
  264. package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts +0 -4
  265. package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts.map +0 -1
  266. package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts +0 -4
  267. package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts.map +0 -1
  268. package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts +0 -4
  269. package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts.map +0 -1
  270. package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts +0 -4
  271. package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts.map +0 -1
  272. package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts +0 -4
  273. package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts.map +0 -1
  274. package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts +0 -4
  275. package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts.map +0 -1
  276. package/src/components/common/FilterComponent.tsx +0 -428
@@ -36,7 +36,7 @@ const SolidTimeColumn = ({ solidListViewMetaData, fieldMetadata, column }: Solid
36
36
  header={header}
37
37
  className="text-sm"
38
38
  sortable={column.attrs.sortable}
39
- filter={filterable}
39
+ // filter={filterable}
40
40
  dataType={columnDataType}
41
41
  showFilterOperator={showFilterOperator}
42
42
  filterMatchModeOptions={dateFilterMatchModeOptions}
@@ -36,7 +36,7 @@ const SolidUuidColumn = ({ solidListViewMetaData, fieldMetadata, column }: Solid
36
36
  header={header}
37
37
  className="text-sm"
38
38
  sortable={column.attrs.sortable}
39
- filter={filterable}
39
+ // filter={filterable}
40
40
  dataType={columnDataType}
41
41
  showFilterOperator={showFilterOperator}
42
42
  filterMatchModeOptions={filterMatchModeOptions}
@@ -0,0 +1,103 @@
1
+ 'use client';
2
+
3
+ import { AppConfigProps, LayoutConfig, LayoutState } from '@/types';
4
+ import { PrimeReactContext } from 'primereact/api';
5
+ import { Button } from 'primereact/button';
6
+ import { RadioButton, RadioButtonChangeEvent } from 'primereact/radiobutton';
7
+ import { Sidebar } from 'primereact/sidebar';
8
+ import { classNames } from 'primereact/utils';
9
+ import { useContext, useEffect, useState } from 'react';
10
+ import { LayoutContext } from './context/layoutcontext';
11
+
12
+ const AppConfig = (props: AppConfigProps) => {
13
+ const [scales] = useState([12, 13, 14, 15, 16]);
14
+ const { layoutConfig, setLayoutConfig, layoutState, setLayoutState } = useContext(LayoutContext);
15
+ const { changeTheme } = useContext(PrimeReactContext);
16
+
17
+ const onConfigButtonClick = () => {
18
+ setLayoutState((prevState: LayoutState) => ({ ...prevState, configSidebarVisible: true }));
19
+ };
20
+
21
+ const onConfigSidebarHide = () => {
22
+ setLayoutState((prevState: LayoutState) => ({ ...prevState, configSidebarVisible: false }));
23
+ };
24
+
25
+ const changeInputStyle = (e: RadioButtonChangeEvent) => {
26
+ setLayoutConfig((prevState: LayoutConfig) => ({ ...prevState, inputStyle: e.value }));
27
+ };
28
+
29
+ const _changeTheme = (theme: string, colorScheme: string) => {
30
+ changeTheme?.(layoutConfig.theme, theme, 'theme-css', () => {
31
+ setLayoutConfig((prevState: LayoutConfig) => ({ ...prevState, theme, colorScheme }));
32
+ });
33
+ };
34
+
35
+ const decrementScale = () => {
36
+ setLayoutConfig((prevState: LayoutConfig) => ({ ...prevState, scale: prevState.scale - 1 }));
37
+ };
38
+
39
+ const incrementScale = () => {
40
+ setLayoutConfig((prevState: LayoutConfig) => ({ ...prevState, scale: prevState.scale + 1 }));
41
+ };
42
+
43
+ const applyScale = () => {
44
+ document.documentElement.style.fontSize = layoutConfig.scale + 'px';
45
+ };
46
+
47
+ useEffect(() => {
48
+ applyScale();
49
+ // eslint-disable-next-line react-hooks/exhaustive-deps
50
+ }, [layoutConfig.scale]);
51
+
52
+ return (
53
+ <>
54
+ <button className="layout-config-button config-link" type="button" onClick={onConfigButtonClick}>
55
+ <i className="pi pi-cog"></i>
56
+ </button>
57
+
58
+ <Sidebar visible={layoutState.configSidebarVisible} onHide={onConfigSidebarHide} position="right" className="layout-config-sidebar w-20rem">
59
+ {!props.simple && (
60
+ <>
61
+ <h5>Scale</h5>
62
+ <div className="flex align-items-center">
63
+ <Button icon="pi pi-minus" type="button" onClick={decrementScale} rounded text className="w-2rem h-2rem mr-2" disabled={layoutConfig.scale === scales[0]}></Button>
64
+ <div className="flex gap-2 align-items-center">
65
+ {scales.map((item) => {
66
+ return <i className={classNames('pi pi-circle-fill', { 'text-primary-500': item === layoutConfig.scale, 'text-300': item !== layoutConfig.scale })} key={item}></i>;
67
+ })}
68
+ </div>
69
+ <Button icon="pi pi-plus" type="button" onClick={incrementScale} rounded text className="w-2rem h-2rem ml-2" disabled={layoutConfig.scale === scales[scales.length - 1]}></Button>
70
+ </div>
71
+
72
+ <h5>Input Style</h5>
73
+ <div className="flex">
74
+ <div className="field-radiobutton flex-1">
75
+ <RadioButton name="inputStyle" value={'outlined'} checked={layoutConfig.inputStyle === 'outlined'} onChange={(e) => changeInputStyle(e)} inputId="outlined_input"></RadioButton>
76
+ <label htmlFor="outlined_input">Outlined</label>
77
+ </div>
78
+ <div className="field-radiobutton flex-1">
79
+ <RadioButton name="inputStyle" value={'filled'} checked={layoutConfig.inputStyle === 'filled'} onChange={(e) => changeInputStyle(e)} inputId="filled_input"></RadioButton>
80
+ <label htmlFor="filled_input">Filled</label>
81
+ </div>
82
+ </div>
83
+ </>
84
+ )}
85
+ <h5>Appearance</h5>
86
+ <div className="grid">
87
+ <div className="col-3">
88
+ <button className="p-link w-2rem h-2rem" onClick={() => _changeTheme('solid-light-purple', 'light')}>
89
+ <img src="/images/layout/images/themes/lara-light-blue.png" className="w-2rem h-2rem" alt="Lara Light Blue" />
90
+ </button>
91
+ </div>
92
+ <div className="col-3">
93
+ <button className="p-link w-2rem h-2rem" onClick={() => _changeTheme('solid-dark-purple', 'dark')}>
94
+ <img src="/images/layout/images/themes/lara-dark-blue.png" className="w-2rem h-2rem" alt="Lara Dark Cyan" />
95
+ </button>
96
+ </div>
97
+ </div>
98
+ </Sidebar>
99
+ </>
100
+ );
101
+ };
102
+
103
+ export default AppConfig;
@@ -0,0 +1,170 @@
1
+ import { setIsAuthenticated, setUser } from "@/redux/features/userSlice";
2
+ import { getSession, signOut, useSession } from "next-auth/react";
3
+ import React, { useEffect, useRef, useState } from "react";
4
+ import NavbarTwoMenu from "./navbar-two-menu";
5
+ import UserProfileMenu from "./user-profile-menu";
6
+ import { useDispatch, useSelector } from "react-redux";
7
+ import { showNavbar, toggleNavbar } from "@/redux/features/navbarSlice";
8
+ import { InputText } from "primereact/inputtext";
9
+ import { Button } from "primereact/button";
10
+ import { IconField } from "primereact/iconfield";
11
+ import { InputIcon } from "primereact/inputicon";
12
+ import { useGetSolidMenuBasedOnRoleQuery } from "@/redux/api/solidMenuApi";
13
+ import { ToastContainer } from "@/helpers/ToastContainer";
14
+ // import menu from "@/helpers/menu";
15
+
16
+ const AppSidebar = () => {
17
+ const dispatch = useDispatch();
18
+
19
+ // const [show, setShow] = useState(false);
20
+ const visibleNavbar = useSelector(
21
+ (state: any) => state.navbarState.visibleNavbar
22
+ );
23
+ const { data: menu } = useGetSolidMenuBasedOnRoleQuery("");
24
+
25
+
26
+ const [currentMenu, setCurrentMenu] = useState();
27
+ const [currentMainMenu, setCurrentMainMenu] = useState();
28
+ const [searchTerm, setSearchTerm] = useState("");
29
+
30
+ useEffect(() => {
31
+ if (menu) {
32
+ setCurrentMenu(menu && menu.data.length > 0 && menu.data.filter((m: any) => m.key === process.env.NEXT_PUBLIC_DEFAULT_MENU_KEY)[0]?.children);
33
+ setCurrentMainMenu(menu && menu.data.length > 0 && menu.data.filter((m: any) => m.key === process.env.NEXT_PUBLIC_DEFAULT_MENU_KEY)[0]?.title)
34
+ }
35
+ }, [menu])
36
+
37
+ const { data } = useSession();
38
+
39
+ // const handleToggle = () => setShow(!show);
40
+ const handleToggle = () => dispatch(toggleNavbar());
41
+ const handleMenu = (m: any) => {
42
+ // setShow(true);
43
+ dispatch(showNavbar());
44
+ setCurrentMainMenu(m.title);
45
+ setCurrentMenu(m.children);
46
+ };
47
+
48
+
49
+
50
+ useEffect(() => {
51
+ if (data) {
52
+ dispatch(setUser(data?.user));
53
+ dispatch(setIsAuthenticated(true));
54
+ }
55
+ }, [data]);
56
+
57
+ const logoutHandler = () => {
58
+ signOut();
59
+ };
60
+
61
+ const handleSearch = () => {
62
+ // TODO: Handle the search logic here
63
+
64
+ };
65
+
66
+ const [isSearchShow, setSearchShow] = useState(false);
67
+ const searchRef = useRef<HTMLDivElement>(null);
68
+
69
+ const handleClickOutside = (event: any) => {
70
+ if (searchRef.current && !searchRef.current.contains(event.target)) {
71
+ setSearchShow(false);
72
+ }
73
+ };
74
+
75
+ useEffect(() => {
76
+ if (isSearchShow) {
77
+ document.addEventListener("mousedown", handleClickOutside);
78
+ } else {
79
+ document.removeEventListener("mousedown", handleClickOutside);
80
+ }
81
+
82
+ return () => {
83
+ document.removeEventListener("mousedown", handleClickOutside);
84
+ };
85
+ }, [isSearchShow]);
86
+
87
+
88
+
89
+ return (
90
+ <>
91
+ <ToastContainer />
92
+
93
+ {/* commented this as this is not working properly @Jenendar to figure this out... */}
94
+ {(visibleNavbar || currentMainMenu) && (
95
+ <Button
96
+ className={`sidebar-toggle-button ${!visibleNavbar ? "s-collapsed" : ""}`}
97
+ onClick={handleToggle}
98
+ severity="secondary"
99
+ >
100
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
101
+ <rect x="0.3" y="0.3" width="23.4" height="23.4" rx="2.1" fill="white" />
102
+ <rect x="0.3" y="0.3" width="23.4" height="23.4" rx="2.1" stroke="#D8E2EA" stroke-width="0.6" />
103
+ <path d="M5.09735 16V14.6667H13.5929V16H5.09735ZM5.09735 12.6667V11.3333H11.6324V12.6667H5.09735ZM5.09735 9.33333V8H13.5929V9.33333H5.09735Z" fill="#8D9199" />
104
+ <path d="M16.2621 12L18.9026 14.3L18.099 15L14.6549 12L18.099 9L18.9026 9.7L16.2621 12Z" fill="#8D9199" />
105
+ </svg>
106
+ </Button>
107
+ )}
108
+
109
+ <div className="sidebar-left">
110
+ <div className="navbar-menu">
111
+ {menu && menu.data.length > 0 && menu.data.map((m: any) => (
112
+ <div
113
+ key={m.title}
114
+ className={`menu-item ${currentMainMenu === m.title ? "active-menu-image" : ""}`}
115
+ >
116
+ <a onClick={() => handleMenu(m)}>
117
+ <img
118
+ style={{ cursor: "pointer", width: '30px' }}
119
+ // src={currentMainMenu === m.title ? `/images/${m.title.toLocaleLowerCase()}-active.svg` : `/images/${m.title.toLocaleLowerCase()}.svg`}
120
+ // src={`/images/menu/${m.title}.svg`}
121
+ src={m.icon.startsWith("/") ? m.icon : `${process.env.API_URL}/${m.icon}`}
122
+ // src={`/images/menu/app-builder.svg`}
123
+ alt="Solid"
124
+ />
125
+ </a>
126
+ </div>
127
+ ))}
128
+ </div>
129
+
130
+ <UserProfileMenu></UserProfileMenu>
131
+ </div>
132
+ {currentMenu && (
133
+ <div className={`sidebar-right ${visibleNavbar ? "open" : ""}`}>
134
+
135
+ <div className="flex relative justify-content-between align-items-center py-4 px-3">
136
+ <div className="text-base font-semibold">{currentMainMenu && currentMainMenu}</div>
137
+ {/* <button
138
+ className="sidebar-toggle-button"
139
+ onClick={handleToggle}
140
+ >
141
+ <img
142
+ style={{ cursor: "pointer" }}
143
+ src={`/images/menu-toggle.png`}
144
+ alt="Solid"
145
+ />
146
+ </button> */}
147
+ </div>
148
+ {/* <div className="w-full px-3 mb-3" style={{ position: 'relative' }} ref={searchRef}>
149
+ <IconField iconPosition="left">
150
+ <InputIcon className="pi pi-search text-sm"> </InputIcon>
151
+ <InputText placeholder="Search" className="small-input text-sm w-full pr-6" />
152
+ </IconField>
153
+ <div className="absolute max-h-1rem" style={{ top: 5, right: 20 }}>
154
+ <img
155
+ style={{ cursor: "pointer", maxHeight: '1.3rem' }}
156
+ src="/images/icons/jump-to-icon.png"
157
+ alt="Solid"
158
+ />
159
+ </div>
160
+ </div> */}
161
+ <div className="px-3">
162
+ <NavbarTwoMenu menuItems={currentMenu}></NavbarTwoMenu>
163
+ </div>
164
+ </div>
165
+ )}
166
+ </>
167
+ );
168
+ };
169
+
170
+ export default AppSidebar;
@@ -1,55 +1,55 @@
1
- "use client";
2
-
3
- import { useRouter, useSearchParams } from "next/navigation";
4
- import Pagination from "react-js-pagination";
5
-
6
- interface Props {
7
- resPerPage: number;
8
- filteredRoomsCount: number;
9
- }
10
-
11
- const CustomPagination = ({ resPerPage, filteredRoomsCount }: Props) => {
12
- const router = useRouter();
13
- const searchParams = useSearchParams();
14
- let page = searchParams.get("page") || 1;
15
- page = Number(page);
16
-
17
- let queryParams;
18
-
19
- const handlePageChange = (currentPage: string) => {
20
- if (typeof window !== "undefined") {
21
- queryParams = new URLSearchParams(window.location.search);
22
-
23
- if (queryParams.has("page")) {
24
- queryParams.set("page", currentPage);
25
- } else {
26
- queryParams.append("page", currentPage);
27
- }
28
-
29
- const path = `${window.location.pathname}?${queryParams.toString()}`;
30
- router.push(path);
31
- }
32
- };
33
- return (
34
- <div>
35
- {resPerPage < filteredRoomsCount && (
36
- <div className="d-flex justify-content-center mt-5">
37
- <Pagination
38
- activePage={page}
39
- itemsCountPerPage={resPerPage}
40
- totalItemsCount={filteredRoomsCount}
41
- onChange={handlePageChange}
42
- nextPageText={"Next"}
43
- prevPageText={"Prev"}
44
- firstPageText={"First"}
45
- lastPageText={"Last"}
46
- itemClass="page-item"
47
- linkClass="page-link"
48
- />
49
- </div>
50
- )}
51
- </div>
52
- );
53
- };
54
-
55
- export default CustomPagination;
1
+ // "use client";
2
+
3
+ // import { useRouter, useSearchParams } from "next/navigation";
4
+ // import Pagination from "react-js-pagination";
5
+
6
+ // interface Props {
7
+ // resPerPage: number;
8
+ // filteredRoomsCount: number;
9
+ // }
10
+
11
+ // const CustomPagination = ({ resPerPage, filteredRoomsCount }: Props) => {
12
+ // const router = useRouter();
13
+ // const searchParams = useSearchParams();
14
+ // let page = searchParams.get("page") || 1;
15
+ // page = Number(page);
16
+
17
+ // let queryParams;
18
+
19
+ // const handlePageChange = (currentPage: string) => {
20
+ // if (typeof window !== "undefined") {
21
+ // queryParams = new URLSearchParams(window.location.search);
22
+
23
+ // if (queryParams.has("page")) {
24
+ // queryParams.set("page", currentPage);
25
+ // } else {
26
+ // queryParams.append("page", currentPage);
27
+ // }
28
+
29
+ // const path = `${window.location.pathname}?${queryParams.toString()}`;
30
+ // router.push(path);
31
+ // }
32
+ // };
33
+ // return (
34
+ // <div>
35
+ // {resPerPage < filteredRoomsCount && (
36
+ // <div className="d-flex justify-content-center mt-5">
37
+ // <Pagination
38
+ // activePage={page}
39
+ // itemsCountPerPage={resPerPage}
40
+ // totalItemsCount={filteredRoomsCount}
41
+ // onChange={handlePageChange}
42
+ // nextPageText={"Next"}
43
+ // prevPageText={"Prev"}
44
+ // firstPageText={"First"}
45
+ // lastPageText={"Last"}
46
+ // itemClass="page-item"
47
+ // linkClass="page-link"
48
+ // />
49
+ // </div>
50
+ // )}
51
+ // </div>
52
+ // );
53
+ // };
54
+
55
+ // export default CustomPagination;
@@ -3,7 +3,6 @@ import { Button } from "primereact/button";
3
3
  import { Dialog } from "primereact/dialog";
4
4
  import { OverlayPanel } from "primereact/overlaypanel";
5
5
  import { useRef, useState } from "react";
6
- import FilterComponent from "../common/FilterComponent";
7
6
 
8
7
  const FilterMenu = () => {
9
8
  const op = useRef<any>(null);
@@ -105,7 +104,7 @@ const FilterMenu = () => {
105
104
  </div>
106
105
  </OverlayPanel>
107
106
  <Dialog header="Add Custom Filter" visible={visible} style={{ width: '50vw' }} onHide={() => { if (!visible) return; setVisible(false); }}>
108
- <FilterComponent></FilterComponent>
107
+ {/* <FilterComponent></FilterComponent> */}
109
108
  </Dialog>
110
109
 
111
110
  {/* <Dialog
@@ -0,0 +1,52 @@
1
+ 'use client';
2
+ import React, { useState, createContext } from 'react';
3
+ import { LayoutState, ChildContainerProps, LayoutConfig, LayoutContextProps } from '@/types';
4
+ export const LayoutContext = createContext({} as LayoutContextProps);
5
+
6
+ export const LayoutProvider = ({ children }: ChildContainerProps) => {
7
+ const [layoutConfig, setLayoutConfig] = useState<LayoutConfig>({
8
+ inputStyle: 'outlined',
9
+ colorScheme: 'light',
10
+ theme: 'solid-light-purple',
11
+ scale: 14,
12
+ authLayout: 'Center'
13
+ });
14
+
15
+ const [layoutState, setLayoutState] = useState<LayoutState>({
16
+ overlayMenuActive: false,
17
+ profileSidebarVisible: false,
18
+ configSidebarVisible: false,
19
+ staticMenuMobileActive: false,
20
+ menuHoverActive: false
21
+ });
22
+
23
+ const onMenuToggle = () => {
24
+
25
+ if (isDesktop()) {
26
+ setLayoutState((prevLayoutState:any) => ({ ...prevLayoutState, staticMenuDesktopInactive: !prevLayoutState.staticMenuDesktopInactive }));
27
+ } else {
28
+ setLayoutState((prevLayoutState:any) => ({ ...prevLayoutState, staticMenuMobileActive: !prevLayoutState.staticMenuMobileActive }));
29
+ }
30
+ };
31
+
32
+ const showProfileSidebar = () => {
33
+ setLayoutState((prevLayoutState:any) => ({ ...prevLayoutState, profileSidebarVisible: !prevLayoutState.profileSidebarVisible }));
34
+ };
35
+
36
+
37
+
38
+ const isDesktop = () => {
39
+ return window.innerWidth > 991;
40
+ };
41
+
42
+ const value: LayoutContextProps = {
43
+ layoutConfig,
44
+ setLayoutConfig,
45
+ layoutState,
46
+ setLayoutState,
47
+ onMenuToggle,
48
+ showProfileSidebar
49
+ };
50
+
51
+ return <LayoutContext.Provider value={value}>{children}</LayoutContext.Provider>;
52
+ };
@@ -1,4 +1,4 @@
1
- "use client";
1
+ 'use client';
2
2
  import Link from "next/link";
3
3
  import { usePathname } from "next/navigation";
4
4
  import { PanelMenu } from "primereact/panelmenu";
@@ -12,13 +12,16 @@ const NavbarTwoMenu = ({ menuItems }: any) => {
12
12
  const itemRenderer = (item: any, options: any) => {
13
13
  const currentItem = item?.url?.split('/').slice(-2, -1)[0];
14
14
  return (
15
- <div key={item?.key} className={`flex align-items-center cursor-pointer menuHead px-2 ${currentItem === activeParentPath ? 'active-solid-men p-highlight' : ''}`} onClick={options.onClick}>
16
- <Link href={item?.url ? item?.url : '#'} className="w-full flex justify-content-between font-semibold">
17
- <span className="">
18
- {item.label}
19
- </span>
15
+ <div key={item?.key} className={`flex align-items-center cursor-pointer menuHead px-3 ${currentItem === activeParentPath ? ' p-highlight' : ''}`} onClick={options.onClick}>
16
+ <Link href={item?.url ? item?.url : '#'} className="w-full flex justify-content-between font-medium">
17
+ <div className="flex align-items-center gap-3">
18
+ <span className={item.icon} />
19
+ <span className="">
20
+ {item.label}
21
+ </span>
22
+ </div>
20
23
  {item?.items && item?.items?.length > 0 &&
21
- <span className={`${expandedKeys[item.key] === true ? "pi pi-angle-up" : "pi pi-angle-down"}`} style={{ color: "#8D9199" }} />
24
+ <span className={`sidebar-chevrons ${expandedKeys[item.key] === true ? "pi pi-angle-up" : "pi pi-angle-down"}`} />
22
25
  }
23
26
  </Link>
24
27
  </div>
@@ -29,7 +32,7 @@ const NavbarTwoMenu = ({ menuItems }: any) => {
29
32
  return menuItems.map((mi) => ({
30
33
  key: mi.key,
31
34
  label: mi.title,
32
- icon: mi.children ? "pi pi-angle-down" : "",
35
+ icon: mi.children ? "pi pi-folder" : "",
33
36
  template: itemRenderer,
34
37
  url: mi.path ? mi.path : null,
35
38
  items: mi.children ? createMenuItems(mi.children) : null, // Recursively add children
@@ -50,7 +53,7 @@ const NavbarTwoMenu = ({ menuItems }: any) => {
50
53
  };
51
54
 
52
55
  return (
53
- <div className="card flex flex-column align-items-center gap-3">
56
+ <div className="solid-panel-menu">
54
57
  <PanelMenu
55
58
  model={items}
56
59
  expandedKeys={expandedKeys}