@solidxai/core-ui 0.1.9-beta.1 → 0.1.9-beta.11

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 (201) hide show
  1. package/dist/components/auth/AuthLayout.d.ts.map +1 -1
  2. package/dist/components/auth/AuthLayout.js +16 -15
  3. package/dist/components/auth/AuthLayout.js.map +1 -1
  4. package/dist/components/auth/AuthLayout.tsx +3 -1
  5. package/dist/components/auth/ForgotPasswordThankYou.js +1 -1
  6. package/dist/components/auth/ForgotPasswordThankYou.js.map +1 -1
  7. package/dist/components/auth/ForgotPasswordThankYou.tsx +2 -2
  8. package/dist/components/auth/SolidForgotPassword.js +1 -1
  9. package/dist/components/auth/SolidForgotPassword.js.map +1 -1
  10. package/dist/components/auth/SolidForgotPassword.tsx +2 -2
  11. package/dist/components/auth/SolidInitialLoginOtp.js +8 -8
  12. package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
  13. package/dist/components/auth/SolidInitialLoginOtp.tsx +1 -1
  14. package/dist/components/auth/SolidInitiateRegisterOtp.js +8 -8
  15. package/dist/components/auth/SolidInitiateRegisterOtp.js.map +1 -1
  16. package/dist/components/auth/SolidInitiateRegisterOtp.tsx +1 -1
  17. package/dist/components/auth/SolidLogin.js +7 -8
  18. package/dist/components/auth/SolidLogin.js.map +1 -1
  19. package/dist/components/auth/SolidLogin.tsx +1 -1
  20. package/dist/components/auth/SolidRegister.js +9 -9
  21. package/dist/components/auth/SolidRegister.js.map +1 -1
  22. package/dist/components/auth/SolidRegister.tsx +2 -2
  23. package/dist/components/common/AuthBanner.js.map +1 -1
  24. package/dist/components/common/SocialMediaLogin.js +1 -1
  25. package/dist/components/common/SocialMediaLogin.js.map +1 -1
  26. package/dist/components/common/SocialMediaLogin.tsx +4 -4
  27. package/dist/components/core/form/SolidFormActionHeader.d.ts.map +1 -1
  28. package/dist/components/core/form/SolidFormActionHeader.js +1 -0
  29. package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
  30. package/dist/components/core/form/SolidFormActionHeader.tsx +2 -1
  31. package/dist/components/core/form/SolidFormFooter.d.ts.map +1 -1
  32. package/dist/components/core/form/SolidFormFooter.js +14 -7
  33. package/dist/components/core/form/SolidFormFooter.js.map +1 -1
  34. package/dist/components/core/form/SolidFormFooter.tsx +14 -6
  35. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  36. package/dist/components/core/form/SolidFormView.js +7 -3
  37. package/dist/components/core/form/SolidFormView.js.map +1 -1
  38. package/dist/components/core/form/SolidFormView.tsx +5 -2
  39. package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
  40. package/dist/components/core/form/fields/SolidBooleanField.js +10 -1
  41. package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
  42. package/dist/components/core/form/fields/SolidBooleanField.tsx +13 -1
  43. package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
  44. package/dist/components/core/form/fields/SolidDecimalField.js +7 -1
  45. package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
  46. package/dist/components/core/form/fields/SolidDecimalField.tsx +10 -1
  47. package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
  48. package/dist/components/core/form/fields/SolidIntegerField.js +14 -2
  49. package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
  50. package/dist/components/core/form/fields/SolidIntegerField.tsx +20 -2
  51. package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
  52. package/dist/components/core/form/fields/SolidJsonField.js +9 -1
  53. package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
  54. package/dist/components/core/form/fields/SolidJsonField.tsx +12 -1
  55. package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
  56. package/dist/components/core/form/fields/SolidLongTextField.js +23 -3
  57. package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
  58. package/dist/components/core/form/fields/SolidLongTextField.tsx +32 -3
  59. package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
  60. package/dist/components/core/form/fields/SolidMediaMultipleField.js +15 -2
  61. package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
  62. package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +20 -4
  63. package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
  64. package/dist/components/core/form/fields/SolidMediaSingleField.js +21 -3
  65. package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
  66. package/dist/components/core/form/fields/SolidMediaSingleField.tsx +30 -3
  67. package/dist/components/core/form/fields/SolidPasswordField.d.ts.map +1 -1
  68. package/dist/components/core/form/fields/SolidPasswordField.js +2 -1
  69. package/dist/components/core/form/fields/SolidPasswordField.js.map +1 -1
  70. package/dist/components/core/form/fields/SolidPasswordField.tsx +13 -1
  71. package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
  72. package/dist/components/core/form/fields/SolidRichTextField.js +9 -1
  73. package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
  74. package/dist/components/core/form/fields/SolidRichTextField.tsx +12 -1
  75. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
  76. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +2 -2
  77. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
  78. package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +8 -2
  79. package/dist/components/core/form/fields/widgets/SolidIconEditWidget.d.ts.map +1 -1
  80. package/dist/components/core/form/fields/widgets/SolidIconEditWidget.js +14 -3
  81. package/dist/components/core/form/fields/widgets/SolidIconEditWidget.js.map +1 -1
  82. package/dist/components/core/form/fields/widgets/SolidIconEditWidget.tsx +20 -3
  83. package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +1 -1
  84. package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +1 -1
  85. package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +1 -2
  86. package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts.map +1 -1
  87. package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js +2 -2
  88. package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +1 -1
  89. package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +21 -10
  90. package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +1 -1
  91. package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +2 -2
  92. package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -1
  93. package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +18 -10
  94. package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +1 -1
  95. package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +3 -6
  96. package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -1
  97. package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +30 -24
  98. package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +1 -1
  99. package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +2 -2
  100. package/dist/components/core/list/SolidDataTablePagination.d.ts +15 -0
  101. package/dist/components/core/list/SolidDataTablePagination.d.ts.map +1 -0
  102. package/dist/components/core/list/SolidDataTablePagination.js +22 -0
  103. package/dist/components/core/list/SolidDataTablePagination.js.map +1 -0
  104. package/dist/components/core/list/SolidDataTablePagination.tsx +71 -0
  105. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  106. package/dist/components/core/list/SolidListView.js +66 -2
  107. package/dist/components/core/list/SolidListView.js.map +1 -1
  108. package/dist/components/core/list/SolidListView.tsx +67 -2
  109. package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts +1 -1
  110. package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts.map +1 -1
  111. package/dist/components/core/list/SolidListViewRowButtonContextMenu.js +6 -7
  112. package/dist/components/core/list/SolidListViewRowButtonContextMenu.js.map +1 -1
  113. package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +9 -10
  114. package/dist/components/core/list/widgets/SolidUserBlockedStatusListWidget.d.ts +3 -0
  115. package/dist/components/core/list/widgets/SolidUserBlockedStatusListWidget.d.ts.map +1 -0
  116. package/dist/components/core/list/widgets/SolidUserBlockedStatusListWidget.js +39 -0
  117. package/dist/components/core/list/widgets/SolidUserBlockedStatusListWidget.js.map +1 -0
  118. package/dist/components/core/list/widgets/SolidUserBlockedStatusListWidget.tsx +50 -0
  119. package/dist/components/core/tree/SolidTreeTable.d.ts +1 -1
  120. package/dist/components/core/tree/SolidTreeTable.d.ts.map +1 -1
  121. package/dist/components/core/tree/SolidTreeTable.js +78 -78
  122. package/dist/components/core/tree/SolidTreeTable.js.map +1 -1
  123. package/dist/components/core/tree/SolidTreeTable.tsx +1 -10
  124. package/dist/components/core/users/CreateUser.css +27 -2
  125. package/dist/components/core/users/CreateUser.d.ts.map +1 -1
  126. package/dist/components/core/users/CreateUser.js +52 -24
  127. package/dist/components/core/users/CreateUser.js.map +1 -1
  128. package/dist/components/core/users/CreateUser.tsx +46 -33
  129. package/dist/components/solid-ui/SolidButton.d.ts +14 -0
  130. package/dist/components/solid-ui/SolidButton.d.ts.map +1 -0
  131. package/dist/components/solid-ui/SolidButton.js +36 -0
  132. package/dist/components/solid-ui/SolidButton.js.map +1 -0
  133. package/dist/components/solid-ui/SolidButton.tsx +54 -0
  134. package/dist/components/solid-ui/SolidTabs.d.ts +18 -0
  135. package/dist/components/solid-ui/SolidTabs.d.ts.map +1 -0
  136. package/dist/components/solid-ui/SolidTabs.js +22 -0
  137. package/dist/components/solid-ui/SolidTabs.js.map +1 -0
  138. package/dist/components/solid-ui/SolidTabs.tsx +73 -0
  139. package/dist/components/solid-ui/index.d.ts +3 -0
  140. package/dist/components/solid-ui/index.d.ts.map +1 -0
  141. package/dist/components/solid-ui/index.js +3 -0
  142. package/dist/components/solid-ui/index.js.map +1 -0
  143. package/dist/components/solid-ui/index.ts +2 -0
  144. package/dist/helpers/registry.d.ts.map +1 -1
  145. package/dist/helpers/registry.js +3 -0
  146. package/dist/helpers/registry.js.map +1 -1
  147. package/dist/helpers/registry.ts +4 -0
  148. package/dist/index.d.ts +2 -0
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.js +1 -0
  151. package/dist/index.js.map +1 -1
  152. package/dist/index.ts +2 -0
  153. package/dist/resources/shadcn-base.css +17 -9
  154. package/dist/routes/SolidRouteMetadataBoundary.d.ts +5 -0
  155. package/dist/routes/SolidRouteMetadataBoundary.d.ts.map +1 -0
  156. package/dist/routes/SolidRouteMetadataBoundary.js +72 -0
  157. package/dist/routes/SolidRouteMetadataBoundary.js.map +1 -0
  158. package/dist/routes/SolidRouteMetadataBoundary.tsx +77 -0
  159. package/dist/routes/pages/studio/StudioLandingPage.d.ts.map +1 -1
  160. package/dist/routes/pages/studio/StudioLandingPage.js +35 -7
  161. package/dist/routes/pages/studio/StudioLandingPage.js.map +1 -1
  162. package/dist/routes/pages/studio/StudioLandingPage.tsx +42 -6
  163. package/dist/routes/solidRoutes.d.ts.map +1 -1
  164. package/dist/routes/solidRoutes.js +47 -26
  165. package/dist/routes/solidRoutes.js.map +1 -1
  166. package/dist/routes/solidRoutes.tsx +47 -26
  167. package/dist/routes/types.d.ts +7 -0
  168. package/dist/routes/types.d.ts.map +1 -1
  169. package/dist/routes/types.js.map +1 -1
  170. package/dist/routes/types.ts +8 -0
  171. package/package.json +1 -1
  172. package/dist/components/auth/SolidOTPVerify.d.ts +0 -3
  173. package/dist/components/auth/SolidOTPVerify.d.ts.map +0 -1
  174. package/dist/components/auth/SolidOTPVerify.js +0 -67
  175. package/dist/components/auth/SolidOTPVerify.js.map +0 -1
  176. package/dist/components/auth/SolidOTPVerify.tsx +0 -133
  177. package/dist/components/core/common/LoadDynamicJsxComponent.d.ts +0 -2
  178. package/dist/components/core/common/LoadDynamicJsxComponent.d.ts.map +0 -1
  179. package/dist/components/core/common/LoadDynamicJsxComponent.js +0 -50
  180. package/dist/components/core/common/LoadDynamicJsxComponent.js.map +0 -1
  181. package/dist/components/core/common/LoadDynamicJsxComponent.tsx +0 -70
  182. package/dist/nextAuth/authProviders.d.ts +0 -4
  183. package/dist/nextAuth/authProviders.d.ts.map +0 -1
  184. package/dist/nextAuth/authProviders.js +0 -198
  185. package/dist/nextAuth/authProviders.js.map +0 -1
  186. package/dist/nextAuth/authProviders.tsx +0 -232
  187. package/dist/nextAuth/handleLogout.d.ts +0 -2
  188. package/dist/nextAuth/handleLogout.d.ts.map +0 -1
  189. package/dist/nextAuth/handleLogout.js +0 -36
  190. package/dist/nextAuth/handleLogout.js.map +0 -1
  191. package/dist/nextAuth/handleLogout.tsx +0 -39
  192. package/dist/nextAuth/refreshAccessToken.d.ts +0 -2
  193. package/dist/nextAuth/refreshAccessToken.d.ts.map +0 -1
  194. package/dist/nextAuth/refreshAccessToken.js +0 -24
  195. package/dist/nextAuth/refreshAccessToken.js.map +0 -1
  196. package/dist/nextAuth/refreshAccessToken.tsx +0 -28
  197. package/dist/redux/features/settingsSlice.d.ts +0 -20
  198. package/dist/redux/features/settingsSlice.d.ts.map +0 -1
  199. package/dist/redux/features/settingsSlice.js +0 -39
  200. package/dist/redux/features/settingsSlice.js.map +0 -1
  201. package/dist/redux/features/settingsSlice.ts +0 -60
@@ -1,36 +0,0 @@
1
- import { ERROR_MESSAGES } from '../constants/error-messages';
2
- import axios from 'axios';
3
- import { getSession, signOut } from 'next-auth/react';
4
- export async function handleLogout({ toast }) {
5
- const session = await getSession();
6
- // const token = session?.user?.accessToken;
7
- const refreshToken = session?.user?.refreshToken;
8
- try {
9
- const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/logout`, {
10
- refreshToken: refreshToken, // Pass refresh token in body
11
- });
12
- console.log("logout response", response);
13
- if (response?.data?.statusCode === 200) {
14
- await signOut({ callbackUrl: '/auth/login' });
15
- }
16
- else {
17
- toast?.current?.show({
18
- severity: 'error',
19
- summary: ERROR_MESSAGES.LOGOUT_FAILED,
20
- detail: `${response?.data?.data?.status}`,
21
- life: 3000,
22
- });
23
- }
24
- }
25
- catch (error) {
26
- const err = error;
27
- const message = err.response?.data?.data?.message || err.message || ERROR_MESSAGES.LOGOUT_FAILED;
28
- toast?.current?.show({
29
- severity: 'error',
30
- summary: ERROR_MESSAGES.LOGOUT_FAILED,
31
- detail: message,
32
- life: 3000,
33
- });
34
- }
35
- }
36
- //# sourceMappingURL=handleLogout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handleLogout.js","sourceRoot":"./","sources":["nextAuth/handleLogout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,EAAE,KAAK,EAAO;IAC7C,MAAM,OAAO,GAAG,MAAM,UAAU,EAAE,CAAC;IACnC,4CAA4C;IAC5C,MAAM,YAAY,GAAG,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC;IACjD,IAAI;QACA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,2BAA2B,iBAAiB,EAC7F;YACI,YAAY,EAAE,YAAY,EAAE,6BAA6B;SAC5D,CACA,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAEzC,IAAI,QAAQ,EAAE,IAAI,EAAE,UAAU,KAAK,GAAG,EAAE;YACpC,MAAM,OAAO,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC;SACjD;aAAM;YACH,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC;gBACjB,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,cAAc,CAAC,aAAa;gBACrC,MAAM,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;gBACzC,IAAI,EAAE,IAAI;aACb,CAAC,CAAC;SACN;KACJ;IAAC,OAAO,KAAK,EAAE;QACZ,MAAM,GAAG,GAAG,KAAY,CAAC;QACzB,MAAM,OAAO,GACT,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,IAAI,GAAG,CAAC,OAAO,IAAI,cAAc,CAAC,aAAa,CAAC;QAErF,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC;YACjB,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,cAAc,CAAC,aAAa;YACrC,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,IAAI;SACb,CAAC,CAAC;KACN;AACL,CAAC","sourcesContent":["import { ERROR_MESSAGES } from '../constants/error-messages';\nimport axios, { AxiosError } from 'axios';\nimport { getSession, signOut } from 'next-auth/react';\n\nexport async function handleLogout({ toast }: any) {\n const session = await getSession();\n // const token = session?.user?.accessToken;\n const refreshToken = session?.user?.refreshToken; \n try {\n const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/logout`, \n {\n refreshToken: refreshToken, // Pass refresh token in body\n }\n );\n console.log(\"logout response\", response);\n\n if (response?.data?.statusCode === 200) {\n await signOut({ callbackUrl: '/auth/login' });\n } else {\n toast?.current?.show({\n severity: 'error',\n summary: ERROR_MESSAGES.LOGOUT_FAILED,\n detail: `${response?.data?.data?.status}`,\n life: 3000,\n });\n }\n } catch (error) {\n const err = error as any;\n const message =\n err.response?.data?.data?.message || err.message || ERROR_MESSAGES.LOGOUT_FAILED;\n\n toast?.current?.show({\n severity: 'error',\n summary: ERROR_MESSAGES.LOGOUT_FAILED,\n detail: message,\n life: 3000,\n });\n }\n}"]}
@@ -1,39 +0,0 @@
1
- import { ERROR_MESSAGES } from '../constants/error-messages';
2
- import axios, { AxiosError } from 'axios';
3
- import { getSession, signOut } from 'next-auth/react';
4
-
5
- export async function handleLogout({ toast }: any) {
6
- const session = await getSession();
7
- // const token = session?.user?.accessToken;
8
- const refreshToken = session?.user?.refreshToken;
9
- try {
10
- const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/logout`,
11
- {
12
- refreshToken: refreshToken, // Pass refresh token in body
13
- }
14
- );
15
- console.log("logout response", response);
16
-
17
- if (response?.data?.statusCode === 200) {
18
- await signOut({ callbackUrl: '/auth/login' });
19
- } else {
20
- toast?.current?.show({
21
- severity: 'error',
22
- summary: ERROR_MESSAGES.LOGOUT_FAILED,
23
- detail: `${response?.data?.data?.status}`,
24
- life: 3000,
25
- });
26
- }
27
- } catch (error) {
28
- const err = error as any;
29
- const message =
30
- err.response?.data?.data?.message || err.message || ERROR_MESSAGES.LOGOUT_FAILED;
31
-
32
- toast?.current?.show({
33
- severity: 'error',
34
- summary: ERROR_MESSAGES.LOGOUT_FAILED,
35
- detail: message,
36
- life: 3000,
37
- });
38
- }
39
- }
@@ -1,2 +0,0 @@
1
- export declare function refreshAccessToken(token: any): Promise<any>;
2
- //# sourceMappingURL=refreshAccessToken.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"refreshAccessToken.d.ts","sourceRoot":"./","sources":["nextAuth/refreshAccessToken.tsx"],"names":[],"mappings":"AAIA,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,GAAG,gBAuBhD"}
@@ -1,24 +0,0 @@
1
- import { ERROR_MESSAGES } from "../constants/error-messages";
2
- import axios from "axios";
3
- import { jwtDecode } from "jwt-decode";
4
- export async function refreshAccessToken(token) {
5
- try {
6
- const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/refresh-tokens`, { refreshToken: token.refreshToken });
7
- const { accessToken, refreshToken } = response.data.data;
8
- const { exp: accessTokenExpires } = jwtDecode(accessToken);
9
- return {
10
- ...token,
11
- accessToken,
12
- refreshToken,
13
- accessTokenExpires: accessTokenExpires * 1000, // Convert seconds to milliseconds
14
- };
15
- }
16
- catch (error) {
17
- console.error(ERROR_MESSAGES.FAILED_REFRESH_TOKEN, error.message || error.response?.data);
18
- return {
19
- // ...token,
20
- error: "RefreshAccessTokenError",
21
- };
22
- }
23
- }
24
- //# sourceMappingURL=refreshAccessToken.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"refreshAccessToken.js","sourceRoot":"./","sources":["nextAuth/refreshAccessToken.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,KAAU;IAC/C,IAAI;QACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAC/B,GAAG,OAAO,CAAC,GAAG,CAAC,2BAA2B,yBAAyB,EACnE,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,CACrC,CAAC;QAEF,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACzD,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAkB,WAAW,CAAC,CAAC;QAE5E,OAAO;YACL,GAAG,KAAK;YACR,WAAW;YACX,YAAY;YACZ,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,EAAE,kCAAkC;SAClF,CAAC;KACH;IAAC,OAAO,KAAU,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,oBAAoB,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC1F,OAAO;YACL,YAAY;YACZ,KAAK,EAAE,yBAAyB;SACjC,CAAC;KACH;AACH,CAAC","sourcesContent":["import { ERROR_MESSAGES } from \"../constants/error-messages\";\nimport axios from \"axios\";\nimport { jwtDecode } from \"jwt-decode\";\n\nexport async function refreshAccessToken(token: any) {\n try {\n const response = await axios.post(\n `${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/refresh-tokens`,\n { refreshToken: token.refreshToken }\n );\n \n const { accessToken, refreshToken } = response.data.data;\n const { exp: accessTokenExpires } = jwtDecode<{ exp: number }>(accessToken);\n \n return {\n ...token,\n accessToken,\n refreshToken,\n accessTokenExpires: accessTokenExpires * 1000, // Convert seconds to milliseconds\n };\n } catch (error: any) {\n console.error(ERROR_MESSAGES.FAILED_REFRESH_TOKEN, error.message || error.response?.data);\n return {\n // ...token,\n error: \"RefreshAccessTokenError\",\n };\n }\n }"]}
@@ -1,28 +0,0 @@
1
- import { ERROR_MESSAGES } from "../constants/error-messages";
2
- import axios from "axios";
3
- import { jwtDecode } from "jwt-decode";
4
-
5
- export async function refreshAccessToken(token: any) {
6
- try {
7
- const response = await axios.post(
8
- `${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/refresh-tokens`,
9
- { refreshToken: token.refreshToken }
10
- );
11
-
12
- const { accessToken, refreshToken } = response.data.data;
13
- const { exp: accessTokenExpires } = jwtDecode<{ exp: number }>(accessToken);
14
-
15
- return {
16
- ...token,
17
- accessToken,
18
- refreshToken,
19
- accessTokenExpires: accessTokenExpires * 1000, // Convert seconds to milliseconds
20
- };
21
- } catch (error: any) {
22
- console.error(ERROR_MESSAGES.FAILED_REFRESH_TOKEN, error.message || error.response?.data);
23
- return {
24
- // ...token,
25
- error: "RefreshAccessTokenError",
26
- };
27
- }
28
- }
@@ -1,20 +0,0 @@
1
- import { PayloadAction } from "@reduxjs/toolkit";
2
- export interface ISettingsState {
3
- authSettings: Record<string, any>;
4
- solidSettings: Record<string, any>;
5
- }
6
- export declare const settingsSlice: import("@reduxjs/toolkit").Slice<ISettingsState, {
7
- setSolidSettings: (state: import("immer/dist/internal.js").WritableDraft<ISettingsState>, action: PayloadAction<Record<string, any>>) => void;
8
- updateSolidSetting: (state: import("immer/dist/internal.js").WritableDraft<ISettingsState>, action: PayloadAction<{
9
- key: string;
10
- value: any;
11
- }>) => void;
12
- resetSettings: () => ISettingsState;
13
- }, "settingsSlice">;
14
- declare const _default: import("@reduxjs/toolkit").Reducer<ISettingsState>;
15
- export default _default;
16
- export declare const setSolidSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string, any>, "settingsSlice/setSolidSettings">, updateSolidSetting: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
17
- key: string;
18
- value: any;
19
- }, "settingsSlice/updateSolidSetting">, resetSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"settingsSlice/resetSettings">;
20
- //# sourceMappingURL=settingsSlice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settingsSlice.d.ts","sourceRoot":"./","sources":["redux/features/settingsSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAOD,eAAO,MAAM,aAAa;sGAsBZ,cAAc,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;wGAOlC,cAAc;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC;;mBAQtD,CAAC;;AAEH,wBAAqC;AAErC,eAAO,MAGL,gBAAgB,8GAChB,kBAAkB;SAhBe,MAAM;WAAS,GAAG;wCAiBnD,aAAa,uFACU,CAAC"}
@@ -1,39 +0,0 @@
1
- import { createSlice } from "@reduxjs/toolkit";
2
- const initialState = {
3
- authSettings: {},
4
- solidSettings: {},
5
- };
6
- export const settingsSlice = createSlice({
7
- name: "settingsSlice",
8
- initialState,
9
- reducers: {
10
- // // -------- AUTH SETTINGS --------
11
- // setAuthSettings: (
12
- // state,
13
- // action: PayloadAction<Record<string, any>>
14
- // ) => {
15
- // state.authSettings = action.payload;
16
- // },
17
- // updateAuthSetting: (
18
- // state,
19
- // action: PayloadAction<{ key: string; value: any }>
20
- // ) => {
21
- // state.authSettings[action.payload.key] = action.payload.value;
22
- // },
23
- // -------- SOLID SETTINGS --------
24
- setSolidSettings: (state, action) => {
25
- state.solidSettings = action.payload;
26
- },
27
- updateSolidSetting: (state, action) => {
28
- state.solidSettings[action.payload.key] = action.payload.value;
29
- },
30
- // -------- RESET --------
31
- resetSettings: () => initialState,
32
- },
33
- });
34
- export default settingsSlice.reducer;
35
- export const {
36
- // setAuthSettings,
37
- // updateAuthSetting,
38
- setSolidSettings, updateSolidSetting, resetSettings, } = settingsSlice.actions;
39
- //# sourceMappingURL=settingsSlice.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settingsSlice.js","sourceRoot":"./","sources":["redux/features/settingsSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO9D,MAAM,YAAY,GAAmB;IACnC,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,EAAE;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACvC,IAAI,EAAE,eAAe;IACrB,YAAY;IACZ,QAAQ,EAAE;QACR,qCAAqC;QACrC,qBAAqB;QACrB,WAAW;QACX,+CAA+C;QAC/C,SAAS;QACT,yCAAyC;QACzC,KAAK;QAEL,uBAAuB;QACvB,WAAW;QACX,uDAAuD;QACvD,SAAS;QACT,mEAAmE;QACnE,KAAK;QAEL,mCAAmC;QACnC,gBAAgB,EAAE,CAChB,KAAK,EACL,MAA0C,EAC1C,EAAE;YACF,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC;QACvC,CAAC;QAED,kBAAkB,EAAE,CAClB,KAAK,EACL,MAAkD,EAClD,EAAE;YACF,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QACjE,CAAC;QAED,0BAA0B;QAC1B,aAAa,EAAE,GAAG,EAAE,CAAC,YAAY;KAClC;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC,OAAO,CAAC;AAErC,MAAM,CAAC,MAAM;AACX,mBAAmB;AACnB,qBAAqB;AACrB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,GACd,GAAG,aAAa,CAAC,OAAO,CAAC","sourcesContent":["import { PayloadAction, createSlice } from \"@reduxjs/toolkit\";\n\nexport interface ISettingsState {\n authSettings: Record<string, any>;\n solidSettings: Record<string, any>;\n}\n\nconst initialState: ISettingsState = {\n authSettings: {},\n solidSettings: {},\n};\n\nexport const settingsSlice = createSlice({\n name: \"settingsSlice\",\n initialState,\n reducers: {\n // // -------- AUTH SETTINGS --------\n // setAuthSettings: (\n // state,\n // action: PayloadAction<Record<string, any>>\n // ) => {\n // state.authSettings = action.payload;\n // },\n\n // updateAuthSetting: (\n // state,\n // action: PayloadAction<{ key: string; value: any }>\n // ) => {\n // state.authSettings[action.payload.key] = action.payload.value;\n // },\n\n // -------- SOLID SETTINGS --------\n setSolidSettings: (\n state,\n action: PayloadAction<Record<string, any>>\n ) => {\n state.solidSettings = action.payload;\n },\n\n updateSolidSetting: (\n state,\n action: PayloadAction<{ key: string; value: any }>\n ) => {\n state.solidSettings[action.payload.key] = action.payload.value;\n },\n\n // -------- RESET --------\n resetSettings: () => initialState,\n },\n});\n\nexport default settingsSlice.reducer;\n\nexport const {\n // setAuthSettings,\n // updateAuthSetting,\n setSolidSettings,\n updateSolidSetting,\n resetSettings,\n} = settingsSlice.actions;\n"]}
@@ -1,60 +0,0 @@
1
- import { PayloadAction, createSlice } from "@reduxjs/toolkit";
2
-
3
- export interface ISettingsState {
4
- authSettings: Record<string, any>;
5
- solidSettings: Record<string, any>;
6
- }
7
-
8
- const initialState: ISettingsState = {
9
- authSettings: {},
10
- solidSettings: {},
11
- };
12
-
13
- export const settingsSlice = createSlice({
14
- name: "settingsSlice",
15
- initialState,
16
- reducers: {
17
- // // -------- AUTH SETTINGS --------
18
- // setAuthSettings: (
19
- // state,
20
- // action: PayloadAction<Record<string, any>>
21
- // ) => {
22
- // state.authSettings = action.payload;
23
- // },
24
-
25
- // updateAuthSetting: (
26
- // state,
27
- // action: PayloadAction<{ key: string; value: any }>
28
- // ) => {
29
- // state.authSettings[action.payload.key] = action.payload.value;
30
- // },
31
-
32
- // -------- SOLID SETTINGS --------
33
- setSolidSettings: (
34
- state,
35
- action: PayloadAction<Record<string, any>>
36
- ) => {
37
- state.solidSettings = action.payload;
38
- },
39
-
40
- updateSolidSetting: (
41
- state,
42
- action: PayloadAction<{ key: string; value: any }>
43
- ) => {
44
- state.solidSettings[action.payload.key] = action.payload.value;
45
- },
46
-
47
- // -------- RESET --------
48
- resetSettings: () => initialState,
49
- },
50
- });
51
-
52
- export default settingsSlice.reducer;
53
-
54
- export const {
55
- // setAuthSettings,
56
- // updateAuthSetting,
57
- setSolidSettings,
58
- updateSolidSetting,
59
- resetSettings,
60
- } = settingsSlice.actions;