@solidxai/core-ui 0.1.7-beta.7 → 0.1.7-beta.9
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.
- package/dist/adapters/auth/helper.d.ts +9 -0
- package/dist/adapters/auth/helper.d.ts.map +1 -0
- package/dist/adapters/auth/helper.js +37 -0
- package/dist/adapters/auth/helper.js.map +1 -0
- package/dist/adapters/auth/helper.ts +45 -0
- package/dist/adapters/auth/signInWithOtp.d.ts.map +1 -1
- package/dist/adapters/auth/signInWithOtp.js +3 -27
- package/dist/adapters/auth/signInWithOtp.js.map +1 -1
- package/dist/adapters/auth/signInWithOtp.ts +3 -23
- package/dist/components/common/GeneralSettings.d.ts.map +1 -1
- package/dist/components/common/GeneralSettings.js +68 -36
- package/dist/components/common/GeneralSettings.js.map +1 -1
- package/dist/components/common/GeneralSettings.tsx +81 -42
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.d.ts +27 -5
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.d.ts.map +1 -1
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js +25 -37
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.js.map +1 -1
- package/dist/components/common/SolidSettings/LlmSettings/AiModelConfigTab.tsx +131 -52
- package/dist/components/core/chatter/SolidChatter.d.ts +2 -1
- package/dist/components/core/chatter/SolidChatter.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatter.js +2 -2
- package/dist/components/core/chatter/SolidChatter.js.map +1 -1
- package/dist/components/core/chatter/SolidChatter.tsx +2 -1
- package/dist/components/core/chatter/SolidChatterHeader.d.ts +1 -0
- package/dist/components/core/chatter/SolidChatterHeader.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidChatterHeader.js +3 -3
- package/dist/components/core/chatter/SolidChatterHeader.js.map +1 -1
- package/dist/components/core/chatter/SolidChatterHeader.tsx +4 -3
- package/dist/components/core/chatter/SolidMessageComposer.d.ts +2 -1
- package/dist/components/core/chatter/SolidMessageComposer.d.ts.map +1 -1
- package/dist/components/core/chatter/SolidMessageComposer.js +3 -1
- package/dist/components/core/chatter/SolidMessageComposer.js.map +1 -1
- package/dist/components/core/chatter/SolidMessageComposer.tsx +3 -1
- package/dist/components/core/common/SolidViewLayoutManager.d.ts +17 -0
- package/dist/components/core/common/SolidViewLayoutManager.d.ts.map +1 -1
- package/dist/components/core/common/SolidViewLayoutManager.js +58 -1
- package/dist/components/core/common/SolidViewLayoutManager.js.map +1 -1
- package/dist/components/core/common/SolidViewLayoutManager.ts +43 -2
- package/dist/components/core/extension/solid-core/chatterMessage/form/SolidChatterMessageCoModelEntityIdFormViewWidget.d.ts +3 -0
- package/dist/components/core/extension/solid-core/chatterMessage/form/SolidChatterMessageCoModelEntityIdFormViewWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/chatterMessage/form/SolidChatterMessageCoModelEntityIdFormViewWidget.js +92 -0
- package/dist/components/core/extension/solid-core/chatterMessage/form/SolidChatterMessageCoModelEntityIdFormViewWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/chatterMessage/form/SolidChatterMessageCoModelEntityIdFormViewWidget.tsx +68 -0
- package/dist/components/core/extension/solid-core/chatterMessage/list/SolidChatterMessageCoModelEntityIdListViewWidget.d.ts +3 -0
- package/dist/components/core/extension/solid-core/chatterMessage/list/SolidChatterMessageCoModelEntityIdListViewWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/chatterMessage/list/SolidChatterMessageCoModelEntityIdListViewWidget.js +87 -0
- package/dist/components/core/extension/solid-core/chatterMessage/list/SolidChatterMessageCoModelEntityIdListViewWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/chatterMessage/list/SolidChatterMessageCoModelEntityIdListViewWidget.tsx +70 -0
- package/dist/components/core/extension/solid-core/listOfValues/form/SolidLovTypeChangeFormEditWidget.d.ts +3 -0
- package/dist/components/core/extension/solid-core/listOfValues/form/SolidLovTypeChangeFormEditWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/listOfValues/form/SolidLovTypeChangeFormEditWidget.js +111 -0
- package/dist/components/core/extension/solid-core/listOfValues/form/SolidLovTypeChangeFormEditWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/listOfValues/form/SolidLovTypeChangeFormEditWidget.tsx +122 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/SolidMqMessageStageFormViewWIdget.d.ts +3 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/SolidMqMessageStageFormViewWIdget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/SolidMqMessageStageFormViewWIdget.js +10 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/SolidMqMessageStageFormViewWIdget.js.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/SolidMqMessageStageFormViewWIdget.tsx +21 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/mqMessageOnFormLoadHandler.d.ts +8 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/mqMessageOnFormLoadHandler.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/mqMessageOnFormLoadHandler.js +62 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/mqMessageOnFormLoadHandler.js.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/form/mqMessageOnFormLoadHandler.tsx +27 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessageStageListViewWidget.d.ts +3 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessageStageListViewWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessageStageListViewWidget.js +8 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessageStageListViewWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessageStageListViewWidget.tsx +15 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessagesSummarizeListHeaderAction.d.ts +3 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessagesSummarizeListHeaderAction.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessagesSummarizeListHeaderAction.js +158 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessagesSummarizeListHeaderAction.js.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessagesSummarizeListHeaderAction.tsx +185 -0
- package/dist/components/core/extension/solid-core/mqMessage/ui/MqMessageStageBadge.d.ts +17 -0
- package/dist/components/core/extension/solid-core/mqMessage/ui/MqMessageStageBadge.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/ui/MqMessageStageBadge.js +52 -0
- package/dist/components/core/extension/solid-core/mqMessage/ui/MqMessageStageBadge.js.map +1 -0
- package/dist/components/core/extension/solid-core/mqMessage/ui/MqMessageStageBadge.tsx +83 -0
- package/dist/components/core/locales/SolidChatterLocaleTabView.d.ts.map +1 -1
- package/dist/components/core/locales/SolidChatterLocaleTabView.js +7 -5
- package/dist/components/core/locales/SolidChatterLocaleTabView.js.map +1 -1
- package/dist/components/core/locales/SolidChatterLocaleTabView.tsx +3 -0
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.css +38 -0
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.d.ts +1 -0
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.d.ts.map +1 -1
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.js +4 -3
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.js.map +1 -1
- package/dist/components/core/users/ApiKeysTab/ApiKeysTab.tsx +13 -3
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.d.ts +2 -1
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.d.ts.map +1 -1
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.js +6 -5
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.js.map +1 -1
- package/dist/components/core/users/ApiKeysTab/GenerateApiKeyModal.tsx +6 -7
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +89 -35
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/core/users/CreateUser.tsx +291 -165
- package/dist/components/layout/SolidAiStudioLayout.d.ts.map +1 -1
- package/dist/components/layout/SolidAiStudioLayout.js +123 -8
- package/dist/components/layout/SolidAiStudioLayout.js.map +1 -1
- package/dist/components/layout/SolidAiStudioLayout.tsx +70 -6
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +10 -6
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +11 -7
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.ts +12 -0
- package/dist/redux/api/apiKeyApi.d.ts +8 -1
- package/dist/redux/api/apiKeyApi.d.ts.map +1 -1
- package/dist/redux/api/apiKeyApi.js +12 -1
- package/dist/redux/api/apiKeyApi.js.map +1 -1
- package/dist/redux/api/apiKeyApi.ts +9 -0
- package/dist/redux/store/defaultStoreConfig.d.ts +16 -1
- package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
- package/dist/redux/store/defaultStoreConfig.js +3 -1
- package/dist/redux/store/defaultStoreConfig.js.map +1 -1
- package/dist/redux/store/defaultStoreConfig.ts +3 -1
- package/dist/routes/guards/AuthGuard.d.ts +5 -1
- package/dist/routes/guards/AuthGuard.d.ts.map +1 -1
- package/dist/routes/guards/AuthGuard.js +13 -2
- package/dist/routes/guards/AuthGuard.js.map +1 -1
- package/dist/routes/guards/AuthGuard.tsx +27 -3
- package/dist/routes/guards/GuestGuard.d.ts +2 -0
- package/dist/routes/guards/GuestGuard.d.ts.map +1 -0
- package/dist/routes/guards/GuestGuard.js +23 -0
- package/dist/routes/guards/GuestGuard.js.map +1 -0
- package/dist/routes/guards/GuestGuard.tsx +24 -0
- package/dist/routes/solidRoutes.d.ts.map +1 -1
- package/dist/routes/solidRoutes.js +2 -1
- package/dist/routes/solidRoutes.js.map +1 -1
- package/dist/routes/solidRoutes.tsx +2 -1
- package/dist/types/solid-core.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.ts
CHANGED
|
@@ -515,6 +515,16 @@ export type {
|
|
|
515
515
|
} from './types';
|
|
516
516
|
|
|
517
517
|
export { GeneralSettings } from './components/common/GeneralSettings';
|
|
518
|
+
export { ApiKeysTab } from './components/core/users/ApiKeysTab';
|
|
519
|
+
export {
|
|
520
|
+
apiKeyApi,
|
|
521
|
+
useGetUserApiKeysQuery,
|
|
522
|
+
useCreateApiKeyMutation,
|
|
523
|
+
useUpdateApiKeyMutation,
|
|
524
|
+
type ApiKeyRecord,
|
|
525
|
+
type CreateApiKeyBody,
|
|
526
|
+
type CreateApiKeyResponse,
|
|
527
|
+
} from './redux/api/apiKeyApi';
|
|
518
528
|
export { SolidErrorPage } from './components/common/SolidErrorPage';
|
|
519
529
|
export { SolidNotFoundPage } from './components/common/SolidNotFoundPage';
|
|
520
530
|
|
|
@@ -532,6 +542,7 @@ export type { SolidStore, SolidRootState, SolidDispatch, CreateSolidStoreOptions
|
|
|
532
542
|
export { StoreProvider } from './redux/store/StoreProvider';
|
|
533
543
|
export { solidAxios, solidGet, solidPost, solidPut, solidPatch, solidDelete } from './http/solidHttp';
|
|
534
544
|
export { AuthGuard } from './routes/guards/AuthGuard';
|
|
545
|
+
export { GuestGuard } from './routes/guards/GuestGuard';
|
|
535
546
|
export { AdminLayoutWrapper } from './layouts/AdminLayoutWrapper';
|
|
536
547
|
export { AuthLayoutWrapper } from './layouts/AuthLayoutWrapper';
|
|
537
548
|
export { AppEventListener } from './routes/AppEventListener';
|
|
@@ -559,5 +570,6 @@ export { InitiateGoogleOauthPage as AuthInitiateGoogleOauthPage } from './routes
|
|
|
559
570
|
export { SsoPage as AuthSsoPage } from './routes/pages/auth/SsoPage';
|
|
560
571
|
export { ErrorPage } from './routes/pages/ErrorPage';
|
|
561
572
|
export { NotFoundPage } from './routes/pages/NotFoundPage';
|
|
573
|
+
export { handleAuthSuccess } from './adapters/auth/helper';
|
|
562
574
|
|
|
563
575
|
export * from "./styles";
|
|
@@ -28,6 +28,10 @@ export declare const apiKeyApi: import("@reduxjs/toolkit/query/react").Api<impor
|
|
|
28
28
|
id: string;
|
|
29
29
|
isActive: boolean;
|
|
30
30
|
}, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "ApiKey", void, "apiKeyApi">;
|
|
31
|
+
generateApiKeyForUser: import("@reduxjs/toolkit/query/react").MutationDefinition<{
|
|
32
|
+
userId: number;
|
|
33
|
+
body: CreateApiKeyBody;
|
|
34
|
+
}, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "ApiKey", CreateApiKeyResponse, "apiKeyApi">;
|
|
31
35
|
}, "apiKeyApi", "ApiKey", typeof import("@reduxjs/toolkit/query/react").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
|
32
36
|
export declare const useGetUserApiKeysQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query/react").QueryDefinition<string, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "ApiKey", {
|
|
33
37
|
data: {
|
|
@@ -36,5 +40,8 @@ export declare const useGetUserApiKeysQuery: import("@reduxjs/toolkit/dist/query
|
|
|
36
40
|
}, "apiKeyApi">>, useCreateApiKeyMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<CreateApiKeyBody, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "ApiKey", CreateApiKeyResponse, "apiKeyApi">>, useUpdateApiKeyMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<{
|
|
37
41
|
id: string;
|
|
38
42
|
isActive: boolean;
|
|
39
|
-
}, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "ApiKey", void, "apiKeyApi"
|
|
43
|
+
}, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "ApiKey", void, "apiKeyApi">>, useGenerateApiKeyForUserMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query/react").MutationDefinition<{
|
|
44
|
+
userId: number;
|
|
45
|
+
body: CreateApiKeyBody;
|
|
46
|
+
}, import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("@reduxjs/toolkit/query/react").FetchArgs, unknown, import("@reduxjs/toolkit/query/react").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query/react").FetchBaseQueryMeta>, "ApiKey", CreateApiKeyResponse, "apiKeyApi">>;
|
|
40
47
|
//# sourceMappingURL=apiKeyApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiKeyApi.d.ts","sourceRoot":"","sources":["../../../src/redux/api/apiKeyApi.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,YAAY,CAAC;KACtB,CAAC;CACH;AAED,eAAO,MAAM,SAAS;;cAOoB;YAAE,OAAO,EAAE,YAAY,EAAE,CAAA;SAAE;;;;YAYtB,MAAM;kBAAY,OAAO;;
|
|
1
|
+
{"version":3,"file":"apiKeyApi.d.ts","sourceRoot":"","sources":["../../../src/redux/api/apiKeyApi.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,YAAY,CAAC;KACtB,CAAC;CACH;AAED,eAAO,MAAM,SAAS;;cAOoB;YAAE,OAAO,EAAE,YAAY,EAAE,CAAA;SAAE;;;;YAYtB,MAAM;kBAAY,OAAO;;;gBAQI,MAAM;cAAQ,gBAAgB;;4JASxG,CAAC;AAEH,eAAO,MACL,sBAAsB;UAhCkB;QAAE,OAAO,EAAE,YAAY,EAAE,CAAA;KAAE;kBAiCnE,uBAAuB,mbACvB,uBAAuB;QAtBsB,MAAM;cAAY,OAAO;qRAuBtE,gCAAgC;YAf0C,MAAM;UAAQ,gBAAgB;mSAgB7F,CAAC"}
|
|
@@ -30,7 +30,18 @@ export var apiKeyApi = createApi({
|
|
|
30
30
|
},
|
|
31
31
|
invalidatesTags: ["ApiKey"],
|
|
32
32
|
}),
|
|
33
|
+
generateApiKeyForUser: builder.mutation({
|
|
34
|
+
query: function (_a) {
|
|
35
|
+
var userId = _a.userId, body = _a.body;
|
|
36
|
+
return ({
|
|
37
|
+
url: "/iam/api-keys/users/".concat(userId),
|
|
38
|
+
method: "POST",
|
|
39
|
+
body: body,
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
invalidatesTags: ["ApiKey"],
|
|
43
|
+
}),
|
|
33
44
|
}); },
|
|
34
45
|
});
|
|
35
|
-
export var useGetUserApiKeysQuery = apiKeyApi.useGetUserApiKeysQuery, useCreateApiKeyMutation = apiKeyApi.useCreateApiKeyMutation, useUpdateApiKeyMutation = apiKeyApi.useUpdateApiKeyMutation;
|
|
46
|
+
export var useGetUserApiKeysQuery = apiKeyApi.useGetUserApiKeysQuery, useCreateApiKeyMutation = apiKeyApi.useCreateApiKeyMutation, useUpdateApiKeyMutation = apiKeyApi.useUpdateApiKeyMutation, useGenerateApiKeyForUserMutation = apiKeyApi.useGenerateApiKeyForUserMutation;
|
|
36
47
|
//# sourceMappingURL=apiKeyApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiKeyApi.js","sourceRoot":"","sources":["../../../src/redux/api/apiKeyApi.ts"],"names":[],"mappings":"AAAA,OAAO,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C;SAC5B,CAAC;KACH,CAAC,EA/BsB,CA+BtB;CACH,CAAC,CAAC;AAEH,MAAM,CACJ,IAAA,sBAAsB,GAIpB,SAAS,uBAJW,EACtB,uBAAuB,GAGrB,SAAS,wBAHY,EACvB,uBAAuB,GAErB,SAAS,wBAFY,EACvB,gCAAgC,GAC9B,SAAS,iCADqB,CACpB","sourcesContent":["import { createApi } from \"@reduxjs/toolkit/query/react\";\nimport { baseQueryWithAuth } from \"./fetchBaseQuery\";\n\nexport interface ApiKeyRecord {\n id: string;\n name: string;\n maskedKey: string;\n isActive: boolean;\n expiresAt: string | null;\n lastUsedAt: string | null;\n createdAt: string;\n}\n\nexport interface CreateApiKeyBody {\n name: string;\n expiresAt?: string;\n}\n\nexport interface CreateApiKeyResponse {\n data: {\n apiKey: string;\n record: ApiKeyRecord;\n };\n}\n\nexport const apiKeyApi = createApi({\n reducerPath: \"apiKeyApi\",\n baseQuery: baseQueryWithAuth,\n tagTypes: [\"ApiKey\"],\n endpoints: (builder) => ({\n // Fetch user record with apiKeys populated.\n // Always called with a userId — the backend enforces access rules.\n getUserApiKeys: builder.query<{ data: { apiKeys: ApiKeyRecord[] } }, string>({\n query: (userId) => `/user/${userId}?populate[0]=apiKeys`,\n providesTags: [\"ApiKey\"],\n }),\n createApiKey: builder.mutation<CreateApiKeyResponse, CreateApiKeyBody>({\n query: (body) => ({\n url: \"/iam/api-keys\",\n method: \"POST\",\n body,\n }),\n invalidatesTags: [\"ApiKey\"],\n }),\n updateApiKey: builder.mutation<void, { id: string; isActive: boolean }>({\n query: ({ id, isActive }) => ({\n url: `/iam/api-keys/${id}`,\n method: \"PATCH\",\n body: { isActive },\n }),\n invalidatesTags: [\"ApiKey\"],\n }),\n generateApiKeyForUser: builder.mutation<CreateApiKeyResponse, { userId: number; body: CreateApiKeyBody }>({\n query: ({ userId, body }) => ({\n url: `/iam/api-keys/users/${userId}`,\n method: \"POST\",\n body,\n }),\n invalidatesTags: [\"ApiKey\"],\n }),\n }),\n});\n\nexport const {\n useGetUserApiKeysQuery,\n useCreateApiKeyMutation,\n useUpdateApiKeyMutation,\n useGenerateApiKeyForUserMutation,\n} = apiKeyApi;\n"]}
|
|
@@ -50,6 +50,14 @@ export const apiKeyApi = createApi({
|
|
|
50
50
|
}),
|
|
51
51
|
invalidatesTags: ["ApiKey"],
|
|
52
52
|
}),
|
|
53
|
+
generateApiKeyForUser: builder.mutation<CreateApiKeyResponse, { userId: number; body: CreateApiKeyBody }>({
|
|
54
|
+
query: ({ userId, body }) => ({
|
|
55
|
+
url: `/iam/api-keys/users/${userId}`,
|
|
56
|
+
method: "POST",
|
|
57
|
+
body,
|
|
58
|
+
}),
|
|
59
|
+
invalidatesTags: ["ApiKey"],
|
|
60
|
+
}),
|
|
53
61
|
}),
|
|
54
62
|
});
|
|
55
63
|
|
|
@@ -57,4 +65,5 @@ export const {
|
|
|
57
65
|
useGetUserApiKeysQuery,
|
|
58
66
|
useCreateApiKeyMutation,
|
|
59
67
|
useUpdateApiKeyMutation,
|
|
68
|
+
useGenerateApiKeyForUserMutation,
|
|
60
69
|
} = apiKeyApi;
|
|
@@ -174,7 +174,22 @@ export declare const solidApiSlices: (import("@reduxjs/toolkit/query").Api<impor
|
|
|
174
174
|
}, "roleApi", never, typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName> | import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, {
|
|
175
175
|
triggerMcpClientJob: import("@reduxjs/toolkit/query").MutationDefinition<import("../api/aiInteractionApi").TriggerMcpClientJobRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../api/aiInteractionApi").TriggerMcpClientJobResponse, "aiInteractionApi">;
|
|
176
176
|
applySolidAiInteraction: import("@reduxjs/toolkit/query").MutationDefinition<import("../api/aiInteractionApi").ApplySolidAiInteractionRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../api/aiInteractionApi").ApplySolidAiInteractionResponse, "aiInteractionApi">;
|
|
177
|
-
}, "aiInteractionApi", never, typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>)
|
|
177
|
+
}, "aiInteractionApi", never, typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName> | import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, {
|
|
178
|
+
getUserApiKeys: import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "ApiKey", {
|
|
179
|
+
data: {
|
|
180
|
+
apiKeys: import("../api/apiKeyApi").ApiKeyRecord[];
|
|
181
|
+
};
|
|
182
|
+
}, "apiKeyApi">;
|
|
183
|
+
createApiKey: import("@reduxjs/toolkit/query").MutationDefinition<import("../api/apiKeyApi").CreateApiKeyBody, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "ApiKey", import("../api/apiKeyApi").CreateApiKeyResponse, "apiKeyApi">;
|
|
184
|
+
updateApiKey: import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
185
|
+
id: string;
|
|
186
|
+
isActive: boolean;
|
|
187
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "ApiKey", void, "apiKeyApi">;
|
|
188
|
+
generateApiKeyForUser: import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
189
|
+
userId: number;
|
|
190
|
+
body: import("../api/apiKeyApi").CreateApiKeyBody;
|
|
191
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "ApiKey", import("../api/apiKeyApi").CreateApiKeyResponse, "apiKeyApi">;
|
|
192
|
+
}, "apiKeyApi", "ApiKey", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>)[];
|
|
178
193
|
export declare const solidReducers: {
|
|
179
194
|
authentication: import("@reduxjs/toolkit").Reducer<{
|
|
180
195
|
token: null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultStoreConfig.d.ts","sourceRoot":"","sources":["../../../src/redux/store/defaultStoreConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultStoreConfig.d.ts","sourceRoot":"","sources":["../../../src/redux/store/defaultStoreConfig.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yJAsB1B,CAAC;AAGF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;CASzB,CAAC"}
|
|
@@ -26,6 +26,7 @@ import { solidSettingsApi } from "../api/solidSettingsApi";
|
|
|
26
26
|
import { solidViewsApi } from "../api/solidViewApi";
|
|
27
27
|
import { userApi } from "../api/userApi";
|
|
28
28
|
import { dashboardLayoutApi } from "../api/dashboardLayoutApi";
|
|
29
|
+
import { apiKeyApi } from "../api/apiKeyApi";
|
|
29
30
|
// 1. Export all APIs in one array
|
|
30
31
|
export var solidApiSlices = [
|
|
31
32
|
authApi,
|
|
@@ -47,7 +48,8 @@ export var solidApiSlices = [
|
|
|
47
48
|
dashboardApi,
|
|
48
49
|
dashboardQuestionApi,
|
|
49
50
|
aiInteractionApi,
|
|
50
|
-
dashboardLayoutApi
|
|
51
|
+
dashboardLayoutApi,
|
|
52
|
+
apiKeyApi,
|
|
51
53
|
];
|
|
52
54
|
// 2. Export default reducers
|
|
53
55
|
export var solidReducers = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultStoreConfig.js","sourceRoot":"","sources":["../../../src/redux/store/defaultStoreConfig.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OA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IAAM,cAAc,GAAG;IAC1B,OAAO;IACP,OAAO;IACP,UAAU;IACV,SAAS;IACT,SAAS;IACT,uBAAuB;IACvB,QAAQ;IACR,aAAa;IACb,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,OAAO;IACP,sBAAsB;IACtB,iBAAiB;IACjB,eAAe;IACf,oBAAoB;IACpB,YAAY;IACZ,oBAAoB;IACpB,gBAAgB;IAChB,kBAAkB;IAClB,SAAS;CACZ,CAAC;AAEF,6BAA6B;AAC7B,MAAM,CAAC,IAAM,aAAa,GAAG;IACzB,cAAc,EAAE,qBAAqB;IACrC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,kBAAkB;IAC/B,KAAK,EAAE,YAAY;CACtB,CAAC","sourcesContent":["import authenticationReducer from \"../features/authSlice\";\nimport dataViewReducer from \"../features/dataViewSlice\";\nimport navbarReducer from \"../features/navbarSlice\";\nimport popupReducer from \"../features/popupSlice\";\nimport themeReducer from \"../features/themeSlice\";\nimport toastReducer from \"../features/toastSlice\";\nimport userReducer from \"../features/userSlice\";\nimport solidStudioReducer from \"../features/solidStudioSlice\";\nimport { authApi } from \"../api/authApi\";\nimport { aiInteractionApi } from \"../api/aiInteractionApi\";\nimport { dashboardApi } from \"../api/dashboardApi\";\nimport { dashboardQuestionApi } from \"../api/dashboardQuestionApi\";\nimport { exportTemplateApi } from \"../api/exportTemplateApi\";\nimport { fieldsApi } from \"../api/fieldApi\";\nimport { importTransactionApi } from \"../api/importTransactionApi\";\nimport { mediaApi } from \"../api/mediaApi\";\nimport { mediaStorageProviderApi } from \"../api/mediaStorageProviderApi\";\nimport { modulesApi } from \"../api/moduleApi\";\nimport { modelsApi } from \"../api/modelApi\";\nimport { roleApi } from \"../api/roleApi\";\nimport { solidActionsApi } from \"../api/solidActionApi\";\nimport { solidChatterMessageApi } from \"../api/solidChatterMessageApi\";\nimport { solidMenusApi } from \"../api/solidMenuApi\";\nimport { solidServiceApi } from \"../api/solidServiceApi\";\nimport { solidSettingsApi } from \"../api/solidSettingsApi\";\nimport { solidViewsApi } from \"../api/solidViewApi\";\nimport { userApi } from \"../api/userApi\";\nimport { dashboardLayoutApi } from \"../api/dashboardLayoutApi\";\nimport { apiKeyApi } from \"../api/apiKeyApi\";\n\n// 1. Export all APIs in one array\nexport const solidApiSlices = [\n authApi,\n userApi,\n modulesApi,\n modelsApi,\n fieldsApi,\n mediaStorageProviderApi,\n mediaApi,\n solidViewsApi,\n solidActionsApi,\n solidMenusApi,\n solidSettingsApi,\n roleApi,\n solidChatterMessageApi,\n exportTemplateApi,\n solidServiceApi,\n importTransactionApi,\n dashboardApi,\n dashboardQuestionApi,\n aiInteractionApi,\n dashboardLayoutApi,\n apiKeyApi,\n];\n\n// 2. Export default reducers\nexport const solidReducers = {\n authentication: authenticationReducer,\n auth: userReducer,\n theme: themeReducer,\n popup: popupReducer,\n navbarState: navbarReducer,\n dataViewState: dataViewReducer,\n solidStudio: solidStudioReducer,\n toast: toastReducer,\n}; \n"]}
|
|
@@ -26,6 +26,7 @@ import { solidSettingsApi } from "../api/solidSettingsApi";
|
|
|
26
26
|
import { solidViewsApi } from "../api/solidViewApi";
|
|
27
27
|
import { userApi } from "../api/userApi";
|
|
28
28
|
import { dashboardLayoutApi } from "../api/dashboardLayoutApi";
|
|
29
|
+
import { apiKeyApi } from "../api/apiKeyApi";
|
|
29
30
|
|
|
30
31
|
// 1. Export all APIs in one array
|
|
31
32
|
export const solidApiSlices = [
|
|
@@ -48,7 +49,8 @@ export const solidApiSlices = [
|
|
|
48
49
|
dashboardApi,
|
|
49
50
|
dashboardQuestionApi,
|
|
50
51
|
aiInteractionApi,
|
|
51
|
-
dashboardLayoutApi
|
|
52
|
+
dashboardLayoutApi,
|
|
53
|
+
apiKeyApi,
|
|
52
54
|
];
|
|
53
55
|
|
|
54
56
|
// 2. Export default reducers
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type AuthGuardProps = {
|
|
2
|
+
getLoginRoute?: (pathname: string) => string;
|
|
3
|
+
};
|
|
4
|
+
export declare function AuthGuard({ getLoginRoute }: AuthGuardProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export {};
|
|
2
6
|
//# sourceMappingURL=AuthGuard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../../src/routes/guards/AuthGuard.tsx"],"names":[],"mappings":"AAGA,wBAAgB,SAAS,
|
|
1
|
+
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../../src/routes/guards/AuthGuard.tsx"],"names":[],"mappings":"AAGA,KAAK,cAAc,GAAG;IACpB,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;CAC9C,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,aAAa,EAAE,EAAE,cAAc,2CAiC1D"}
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Navigate, Outlet, useLocation } from "react-router-dom";
|
|
3
3
|
import { useSession } from "../../hooks/useSession";
|
|
4
|
-
export function AuthGuard() {
|
|
4
|
+
export function AuthGuard(_a) {
|
|
5
|
+
var getLoginRoute = _a.getLoginRoute;
|
|
5
6
|
var location = useLocation();
|
|
6
7
|
var status = useSession().status;
|
|
8
|
+
var defaultGetLoginRoute = function (pathname) {
|
|
9
|
+
var segments = pathname.split("/").filter(Boolean);
|
|
10
|
+
if (segments.length === 0)
|
|
11
|
+
return "/auth/login";
|
|
12
|
+
var base = segments[0];
|
|
13
|
+
if (base === "auth")
|
|
14
|
+
return "/auth/login";
|
|
15
|
+
return "/".concat(base, "/auth/login");
|
|
16
|
+
};
|
|
17
|
+
var resolveLoginRoute = getLoginRoute || defaultGetLoginRoute;
|
|
7
18
|
if (status === "loading") {
|
|
8
19
|
return _jsx("div", { children: "Loading..." });
|
|
9
20
|
}
|
|
10
21
|
if (status === "unauthenticated") {
|
|
11
|
-
return _jsx(Navigate, { to:
|
|
22
|
+
return (_jsx(Navigate, { to: resolveLoginRoute(location.pathname), state: { from: location }, replace: true }));
|
|
12
23
|
}
|
|
13
24
|
return _jsx(Outlet, {});
|
|
14
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthGuard.js","sourceRoot":"","sources":["../../../src/routes/guards/AuthGuard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AuthGuard.js","sourceRoot":"","sources":["../../../src/routes/guards/AuthGuard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMpD,MAAM,UAAU,SAAS,CAAC,EAAiC;QAA/B,aAAa,mBAAA;IACvC,IAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IACvB,IAAA,MAAM,GAAK,UAAU,EAAE,OAAjB,CAAkB;IAEhC,IAAM,oBAAoB,GAAG,UAAC,QAAgB;QAC5C,IAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAErD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,aAAa,CAAC;QAEhD,IAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAEzB,IAAI,IAAI,KAAK,MAAM;YAAE,OAAO,aAAa,CAAC;QAE1C,OAAO,WAAI,IAAI,gBAAa,CAAC;IAC/B,CAAC,CAAC;IAEF,IAAM,iBAAiB,GAAG,aAAa,IAAI,oBAAoB,CAAC;IAEhE,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,uCAAqB,CAAC;KAC9B;IAED,IAAI,MAAM,KAAK,iBAAiB,EAAE;QAChC,OAAO,CACL,KAAC,QAAQ,IACP,EAAE,EAAE,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACxC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EACzB,OAAO,SACP,CACH,CAAC;KACH;IAED,OAAO,KAAC,MAAM,KAAG,CAAC;AACpB,CAAC","sourcesContent":["import { Navigate, Outlet, useLocation } from \"react-router-dom\";\nimport { useSession } from \"../../hooks/useSession\";\n\ntype AuthGuardProps = {\n getLoginRoute?: (pathname: string) => string;\n};\n\nexport function AuthGuard({ getLoginRoute }: AuthGuardProps) {\n const location = useLocation();\n const { status } = useSession();\n\n const defaultGetLoginRoute = (pathname: string) => {\n const segments = pathname.split(\"/\").filter(Boolean);\n\n if (segments.length === 0) return \"/auth/login\";\n\n const base = segments[0];\n\n if (base === \"auth\") return \"/auth/login\";\n\n return `/${base}/auth/login`;\n };\n\n const resolveLoginRoute = getLoginRoute || defaultGetLoginRoute;\n\n if (status === \"loading\") {\n return <div>Loading...</div>;\n }\n\n if (status === \"unauthenticated\") {\n return (\n <Navigate\n to={resolveLoginRoute(location.pathname)}\n state={{ from: location }}\n replace\n />\n );\n }\n\n return <Outlet />;\n}"]}
|
|
@@ -1,17 +1,41 @@
|
|
|
1
1
|
import { Navigate, Outlet, useLocation } from "react-router-dom";
|
|
2
2
|
import { useSession } from "../../hooks/useSession";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
type AuthGuardProps = {
|
|
5
|
+
getLoginRoute?: (pathname: string) => string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export function AuthGuard({ getLoginRoute }: AuthGuardProps) {
|
|
5
9
|
const location = useLocation();
|
|
6
10
|
const { status } = useSession();
|
|
7
11
|
|
|
12
|
+
const defaultGetLoginRoute = (pathname: string) => {
|
|
13
|
+
const segments = pathname.split("/").filter(Boolean);
|
|
14
|
+
|
|
15
|
+
if (segments.length === 0) return "/auth/login";
|
|
16
|
+
|
|
17
|
+
const base = segments[0];
|
|
18
|
+
|
|
19
|
+
if (base === "auth") return "/auth/login";
|
|
20
|
+
|
|
21
|
+
return `/${base}/auth/login`;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const resolveLoginRoute = getLoginRoute || defaultGetLoginRoute;
|
|
25
|
+
|
|
8
26
|
if (status === "loading") {
|
|
9
27
|
return <div>Loading...</div>;
|
|
10
28
|
}
|
|
11
29
|
|
|
12
30
|
if (status === "unauthenticated") {
|
|
13
|
-
return
|
|
31
|
+
return (
|
|
32
|
+
<Navigate
|
|
33
|
+
to={resolveLoginRoute(location.pathname)}
|
|
34
|
+
state={{ from: location }}
|
|
35
|
+
replace
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
14
38
|
}
|
|
15
39
|
|
|
16
40
|
return <Outlet />;
|
|
17
|
-
}
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuestGuard.d.ts","sourceRoot":"","sources":["../../../src/routes/guards/GuestGuard.tsx"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,4CAmBzB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { Outlet, useNavigate } from "react-router-dom";
|
|
4
|
+
import { useSession } from "../../hooks/useSession";
|
|
5
|
+
export function GuestGuard() {
|
|
6
|
+
var status = useSession().status;
|
|
7
|
+
var navigate = useNavigate();
|
|
8
|
+
useEffect(function () {
|
|
9
|
+
if (status === "authenticated") {
|
|
10
|
+
if (window.history.length > 1) {
|
|
11
|
+
navigate(-1);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
navigate("/admin", { replace: true });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}, [status, navigate]);
|
|
18
|
+
if (status === "loading" || status === "authenticated") {
|
|
19
|
+
return _jsx("div", { children: "Loading..." });
|
|
20
|
+
}
|
|
21
|
+
return _jsx(Outlet, {});
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=GuestGuard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuestGuard.js","sourceRoot":"","sources":["../../../src/routes/guards/GuestGuard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,UAAU,UAAU;IAChB,IAAA,MAAM,GAAK,UAAU,EAAE,OAAjB,CAAkB;IAChC,IAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,SAAS,CAAC;QACR,IAAI,MAAM,KAAK,eAAe,EAAE;YAC9B,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC7B,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;aACd;iBAAM;gBACL,QAAQ,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;aACvC;SACF;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvB,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,eAAe,EAAE;QACtD,OAAO,uCAAqB,CAAC;KAC9B;IAED,OAAO,KAAC,MAAM,KAAG,CAAC;AACpB,CAAC","sourcesContent":["import { useEffect } from \"react\";\nimport { Outlet, useNavigate } from \"react-router-dom\";\nimport { useSession } from \"../../hooks/useSession\";\n\nexport function GuestGuard() {\n const { status } = useSession();\n const navigate = useNavigate();\n\n useEffect(() => {\n if (status === \"authenticated\") {\n if (window.history.length > 1) {\n navigate(-1);\n } else {\n navigate(\"/admin\", { replace: true });\n }\n }\n }, [status, navigate]);\n\n if (status === \"loading\" || status === \"authenticated\") {\n return <div>Loading...</div>;\n }\n\n return <Outlet />;\n}"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { Outlet, useNavigate } from "react-router-dom";
|
|
3
|
+
import { useSession } from "../../hooks/useSession";
|
|
4
|
+
|
|
5
|
+
export function GuestGuard() {
|
|
6
|
+
const { status } = useSession();
|
|
7
|
+
const navigate = useNavigate();
|
|
8
|
+
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (status === "authenticated") {
|
|
11
|
+
if (window.history.length > 1) {
|
|
12
|
+
navigate(-1);
|
|
13
|
+
} else {
|
|
14
|
+
navigate("/admin", { replace: true });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}, [status, navigate]);
|
|
18
|
+
|
|
19
|
+
if (status === "loading" || status === "authenticated") {
|
|
20
|
+
return <div>Loading...</div>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return <Outlet />;
|
|
24
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solidRoutes.d.ts","sourceRoot":"","sources":["../../src/routes/solidRoutes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"solidRoutes.d.ts","sourceRoot":"","sources":["../../src/routes/solidRoutes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA2BpD,OAAO,KAAK,EAAE,kBAAkB,EAAiB,MAAM,SAAS,CAAC;AAOjE,wBAAgB,cAAc,CAAC,OAAO,GAAE,kBAAuB,GAAG,WAAW,EAAE,CA4E9E"}
|
|
@@ -11,6 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
import { Navigate } from "react-router-dom";
|
|
12
12
|
import { AuthGuard } from "./guards/AuthGuard";
|
|
13
13
|
import { AdminGuard } from "./guards/AdminGuard";
|
|
14
|
+
import { GuestGuard } from "./guards/GuestGuard";
|
|
14
15
|
import { AdminLayoutWrapper } from "../layouts/AdminLayoutWrapper";
|
|
15
16
|
import { AuthLayoutWrapper } from "../layouts/AuthLayoutWrapper";
|
|
16
17
|
import { ErrorPage } from "./pages/ErrorPage";
|
|
@@ -80,7 +81,7 @@ export function getSolidRoutes(options) {
|
|
|
80
81
|
return __spreadArray(__spreadArray([
|
|
81
82
|
{ path: "/error", element: pick("error", _jsx(ErrorPage, {})) },
|
|
82
83
|
{ path: "/not-found", element: pick("notFound", _jsx(NotFoundPage, {})) },
|
|
83
|
-
{ element: pick("authLayout", _jsx(AuthLayoutWrapper, {})), children: authChildren },
|
|
84
|
+
{ element: _jsx(GuestGuard, {}), children: [{ element: pick("authLayout", _jsx(AuthLayoutWrapper, {})), children: authChildren }] },
|
|
84
85
|
{
|
|
85
86
|
element: pick("authGuard", _jsx(AuthGuard, {})),
|
|
86
87
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solidRoutes.js","sourceRoot":"","sources":["../../src/routes/solidRoutes.tsx"],"names":[],"mappings":";;;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,SAAS,EA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O,SAAG,EAAE;QAC7D,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAC,QAAQ,IAAC,EAAE,EAAC,YAAY,EAAC,OAAO,SAAG,EAAE;cAC5D;AACJ,CAAC","sourcesContent":["import type { RouteObject } from \"react-router-dom\";\nimport { Navigate } from \"react-router-dom\";\nimport { AuthGuard } from \"./guards/AuthGuard\";\nimport { AdminGuard } from \"./guards/AdminGuard\";\nimport { AdminLayoutWrapper } from \"../layouts/AdminLayoutWrapper\";\nimport { AuthLayoutWrapper } from \"../layouts/AuthLayoutWrapper\";\nimport { ErrorPage } from \"./pages/ErrorPage\";\nimport { NotFoundPage } from \"./pages/NotFoundPage\";\nimport { AdminPage } from \"./pages/admin/AdminPage\";\nimport { ModuleHomePage } from \"./pages/admin/core/ModuleHomePage\";\nimport { ListPage } from \"./pages/admin/core/ListPage\";\nimport { KanbanPage } from \"./pages/admin/core/KanbanPage\";\nimport { CardPage } from \"./pages/admin/core/CardPage\";\nimport { FormPage } from \"./pages/admin/core/FormPage\";\nimport { SettingsPage } from \"./pages/admin/core/SettingsPage\";\nimport { LoginPage } from \"./pages/auth/LoginPage\";\nimport { RegisterPage } from \"./pages/auth/RegisterPage\";\nimport { ForgotPasswordPage } from \"./pages/auth/ForgotPasswordPage\";\nimport { InitiateForgotPasswordPage } from \"./pages/auth/InitiateForgotPasswordPage\";\nimport { InitiateForgotPasswordThankYouPage } from \"./pages/auth/InitiateForgotPasswordThankYouPage\";\nimport { ConfirmForgotPasswordPage } from \"./pages/auth/ConfirmForgotPasswordPage\";\nimport { ResetPasswordPage } from \"./pages/auth/ResetPasswordPage\";\nimport { InitiateLoginPage } from \"./pages/auth/InitiateLoginPage\";\nimport { InitiateRegisterPage } from \"./pages/auth/InitiateRegisterPage\";\nimport { InitiateGoogleOauthPage } from \"./pages/auth/InitiateGoogleOauthPage\";\nimport { SsoPage } from \"./pages/auth/SsoPage\";\nimport type { SolidRoutesOptions, SolidRouteKey } from \"./types\";\nimport { TreePage } from \"./pages/admin/core/TreePage\";\nimport { DashboardPage } from \"./pages/admin/core/DashboardPage\";\nimport { StudioHomePage } from \"./pages/studio/StudioHomePage\";\nimport { StudioLandingPage } from \"./pages/studio/StudioLandingPage\";\nimport { _solidRegisterExtraRoutes } from \"./SolidLayoutRegistry\";\n\nexport function getSolidRoutes(options: SolidRoutesOptions = {}): RouteObject[] {\n const {\n extraAuthRoutes = [],\n extraAdminRoutes = [],\n extraRoutes = [],\n elementOverrides = {},\n } = options;\n\n // Auto-register layout routes so StudioLandingPage can discover them\n // without any changes in the consuming project.\n _solidRegisterExtraRoutes(extraRoutes);\n\n const pick = (key: SolidRouteKey, fallback: JSX.Element) =>\n (elementOverrides[key] as JSX.Element) || fallback;\n\n const authChildren: RouteObject[] = [\n // Password based login, Passwordless login initiate otp\n { path: \"/auth/login\", element: pick(\"login\", <LoginPage />) },\n // Password based registration, Passwordless registration initiate otp\n { path: \"/auth/register\", element: pick(\"register\", <RegisterPage />) },\n // Passwordless login confirm otp\n { path: \"/auth/initiate-login\", element: pick(\"initiateLogin\", <InitiateLoginPage />) },\n // Passwordless registration confirm otp\n { path: \"/auth/initiate-register\", element: pick(\"initiateRegister\", <InitiateRegisterPage />) },\n\n // Forgot password flow\n { path: \"/auth/forgot-password\", element: pick(\"forgotPassword\", <ForgotPasswordPage />) },\n { path: \"/auth/initiate-forgot-password\", element: pick(\"initiateForgotPassword\", <InitiateForgotPasswordPage />) },\n { path: \"/auth/initiate-forgot-password-thank-you\", element: pick(\"initiateForgotPasswordThankYou\", <InitiateForgotPasswordThankYouPage />) },\n { path: \"/auth/confirm-forgot-password\", element: pick(\"confirmForgotPassword\", <ConfirmForgotPasswordPage />) },\n\n // ??? not used ???\n { path: \"/auth/reset-password\", element: pick(\"resetPassword\", <ResetPasswordPage />) },\n\n { path: \"/auth/initiate-google-oauth\", element: pick(\"initiateGoogleOauth\", <InitiateGoogleOauthPage />) },\n { path: \"/auth/sso\", element: pick(\"sso\", <SsoPage />) },\n ...extraAuthRoutes,\n ];\n\n const adminChildren: RouteObject[] = [\n { path: \"/admin\", element: pick(\"admin\", <AdminPage />) },\n { path: \"/admin/core/:moduleName/home\", element: pick(\"moduleHome\", <ModuleHomePage />) },\n { path: \"/admin/core/:moduleName/dashboards/:dashboardName\", element: pick(\"dashboard\", <DashboardPage />) },\n { path: \"/admin/core/:moduleName/:modelName/list\", element: pick(\"list\", <ListPage />) },\n { path: \"/admin/core/:moduleName/:modelName/tree\", element: pick(\"tree\", <TreePage />) },\n { path: \"/admin/core/:moduleName/:modelName/kanban\", element: pick(\"kanban\", <KanbanPage />) },\n { path: \"/admin/core/:moduleName/:modelName/card\", element: pick(\"card\", <CardPage />) },\n { path: \"/admin/core/:moduleName/:modelName/form/:id\", element: pick(\"form\", <FormPage />) },\n { path: \"/admin/core/:moduleName/settings/:settings\", element: pick(\"settings\", <SettingsPage />) },\n ...extraAdminRoutes,\n ];\n\n return [\n { path: \"/error\", element: pick(\"error\", <ErrorPage />) },\n { path: \"/not-found\", element: pick(\"notFound\", <NotFoundPage />) },\n { element: pick(\"authLayout\", <AuthLayoutWrapper />), children: authChildren },\n {\n element: pick(\"authGuard\", <AuthGuard />),\n children: [\n {\n element: pick(\"adminLayout\", <AdminLayoutWrapper />),\n children: adminChildren,\n },\n {\n element: pick(\"adminGuard\", <AdminGuard />),\n children: [\n { path: \"/studio\", element: pick(\"studioHome\", <StudioHomePage />) },\n { path: \"/landing\", element: pick(\"landing\", <StudioLandingPage />) },\n ],\n },\n ],\n },\n ...extraRoutes,\n { path: \"/\", element: <Navigate to=\"/auth/login\" replace /> },\n { path: \"*\", element: <Navigate to=\"/not-found\" replace /> },\n ];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"solidRoutes.js","sourceRoot":"","sources":["../../src/routes/solidRoutes.tsx"],"names":[],"mappings":";;;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAA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D;oBACE,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,KAAC,UAAU,KAAG,CAAC;oBAC3C,QAAQ,EAAE;wBACR,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,KAAC,cAAc,KAAG,CAAC,EAAE;wBACpE,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,KAAC,iBAAiB,KAAG,CAAC,EAAE;qBACtE;iBACF;aACF;SACF;OACE,WAAW;QACd,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAC,QAAQ,IAAC,EAAE,EAAC,aAAa,EAAC,OAAO,SAAG,EAAE;QAC7D,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAC,QAAQ,IAAC,EAAE,EAAC,YAAY,EAAC,OAAO,SAAG,EAAE;cAC5D;AACJ,CAAC","sourcesContent":["import type { RouteObject } from \"react-router-dom\";\nimport { Navigate } from \"react-router-dom\";\nimport { AuthGuard } from \"./guards/AuthGuard\";\nimport { AdminGuard } from \"./guards/AdminGuard\";\nimport { GuestGuard } from \"./guards/GuestGuard\";\nimport { AdminLayoutWrapper } from \"../layouts/AdminLayoutWrapper\";\nimport { AuthLayoutWrapper } from \"../layouts/AuthLayoutWrapper\";\nimport { ErrorPage } from \"./pages/ErrorPage\";\nimport { NotFoundPage } from \"./pages/NotFoundPage\";\nimport { AdminPage } from \"./pages/admin/AdminPage\";\nimport { ModuleHomePage } from \"./pages/admin/core/ModuleHomePage\";\nimport { ListPage } from \"./pages/admin/core/ListPage\";\nimport { KanbanPage } from \"./pages/admin/core/KanbanPage\";\nimport { CardPage } from \"./pages/admin/core/CardPage\";\nimport { FormPage } from \"./pages/admin/core/FormPage\";\nimport { SettingsPage } from \"./pages/admin/core/SettingsPage\";\nimport { LoginPage } from \"./pages/auth/LoginPage\";\nimport { RegisterPage } from \"./pages/auth/RegisterPage\";\nimport { ForgotPasswordPage } from \"./pages/auth/ForgotPasswordPage\";\nimport { InitiateForgotPasswordPage } from \"./pages/auth/InitiateForgotPasswordPage\";\nimport { InitiateForgotPasswordThankYouPage } from \"./pages/auth/InitiateForgotPasswordThankYouPage\";\nimport { ConfirmForgotPasswordPage } from \"./pages/auth/ConfirmForgotPasswordPage\";\nimport { ResetPasswordPage } from \"./pages/auth/ResetPasswordPage\";\nimport { InitiateLoginPage } from \"./pages/auth/InitiateLoginPage\";\nimport { InitiateRegisterPage } from \"./pages/auth/InitiateRegisterPage\";\nimport { InitiateGoogleOauthPage } from \"./pages/auth/InitiateGoogleOauthPage\";\nimport { SsoPage } from \"./pages/auth/SsoPage\";\nimport type { SolidRoutesOptions, SolidRouteKey } from \"./types\";\nimport { TreePage } from \"./pages/admin/core/TreePage\";\nimport { DashboardPage } from \"./pages/admin/core/DashboardPage\";\nimport { StudioHomePage } from \"./pages/studio/StudioHomePage\";\nimport { StudioLandingPage } from \"./pages/studio/StudioLandingPage\";\nimport { _solidRegisterExtraRoutes } from \"./SolidLayoutRegistry\";\n\nexport function getSolidRoutes(options: SolidRoutesOptions = {}): RouteObject[] {\n const {\n extraAuthRoutes = [],\n extraAdminRoutes = [],\n extraRoutes = [],\n elementOverrides = {},\n } = options;\n\n // Auto-register layout routes so StudioLandingPage can discover them\n // without any changes in the consuming project.\n _solidRegisterExtraRoutes(extraRoutes);\n\n const pick = (key: SolidRouteKey, fallback: JSX.Element) =>\n (elementOverrides[key] as JSX.Element) || fallback;\n\n const authChildren: RouteObject[] = [\n // Password based login, Passwordless login initiate otp\n { path: \"/auth/login\", element: pick(\"login\", <LoginPage />) },\n // Password based registration, Passwordless registration initiate otp\n { path: \"/auth/register\", element: pick(\"register\", <RegisterPage />) },\n // Passwordless login confirm otp\n { path: \"/auth/initiate-login\", element: pick(\"initiateLogin\", <InitiateLoginPage />) },\n // Passwordless registration confirm otp\n { path: \"/auth/initiate-register\", element: pick(\"initiateRegister\", <InitiateRegisterPage />) },\n\n // Forgot password flow\n { path: \"/auth/forgot-password\", element: pick(\"forgotPassword\", <ForgotPasswordPage />) },\n { path: \"/auth/initiate-forgot-password\", element: pick(\"initiateForgotPassword\", <InitiateForgotPasswordPage />) },\n { path: \"/auth/initiate-forgot-password-thank-you\", element: pick(\"initiateForgotPasswordThankYou\", <InitiateForgotPasswordThankYouPage />) },\n { path: \"/auth/confirm-forgot-password\", element: pick(\"confirmForgotPassword\", <ConfirmForgotPasswordPage />) },\n\n // ??? not used ???\n { path: \"/auth/reset-password\", element: pick(\"resetPassword\", <ResetPasswordPage />) },\n\n { path: \"/auth/initiate-google-oauth\", element: pick(\"initiateGoogleOauth\", <InitiateGoogleOauthPage />) },\n { path: \"/auth/sso\", element: pick(\"sso\", <SsoPage />) },\n ...extraAuthRoutes,\n ];\n\n const adminChildren: RouteObject[] = [\n { path: \"/admin\", element: pick(\"admin\", <AdminPage />) },\n { path: \"/admin/core/:moduleName/home\", element: pick(\"moduleHome\", <ModuleHomePage />) },\n { path: \"/admin/core/:moduleName/dashboards/:dashboardName\", element: pick(\"dashboard\", <DashboardPage />) },\n { path: \"/admin/core/:moduleName/:modelName/list\", element: pick(\"list\", <ListPage />) },\n { path: \"/admin/core/:moduleName/:modelName/tree\", element: pick(\"tree\", <TreePage />) },\n { path: \"/admin/core/:moduleName/:modelName/kanban\", element: pick(\"kanban\", <KanbanPage />) },\n { path: \"/admin/core/:moduleName/:modelName/card\", element: pick(\"card\", <CardPage />) },\n { path: \"/admin/core/:moduleName/:modelName/form/:id\", element: pick(\"form\", <FormPage />) },\n { path: \"/admin/core/:moduleName/settings/:settings\", element: pick(\"settings\", <SettingsPage />) },\n ...extraAdminRoutes,\n ];\n\n return [\n { path: \"/error\", element: pick(\"error\", <ErrorPage />) },\n { path: \"/not-found\", element: pick(\"notFound\", <NotFoundPage />) },\n { element: <GuestGuard />, children: [{ element: pick(\"authLayout\", <AuthLayoutWrapper />), children: authChildren }] },\n {\n element: pick(\"authGuard\", <AuthGuard />),\n children: [\n {\n element: pick(\"adminLayout\", <AdminLayoutWrapper />),\n children: adminChildren,\n },\n {\n element: pick(\"adminGuard\", <AdminGuard />),\n children: [\n { path: \"/studio\", element: pick(\"studioHome\", <StudioHomePage />) },\n { path: \"/landing\", element: pick(\"landing\", <StudioLandingPage />) },\n ],\n },\n ],\n },\n ...extraRoutes,\n { path: \"/\", element: <Navigate to=\"/auth/login\" replace /> },\n { path: \"*\", element: <Navigate to=\"/not-found\" replace /> },\n ];\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import type { RouteObject } from "react-router-dom";
|
|
|
2
2
|
import { Navigate } from "react-router-dom";
|
|
3
3
|
import { AuthGuard } from "./guards/AuthGuard";
|
|
4
4
|
import { AdminGuard } from "./guards/AdminGuard";
|
|
5
|
+
import { GuestGuard } from "./guards/GuestGuard";
|
|
5
6
|
import { AdminLayoutWrapper } from "../layouts/AdminLayoutWrapper";
|
|
6
7
|
import { AuthLayoutWrapper } from "../layouts/AuthLayoutWrapper";
|
|
7
8
|
import { ErrorPage } from "./pages/ErrorPage";
|
|
@@ -86,7 +87,7 @@ export function getSolidRoutes(options: SolidRoutesOptions = {}): RouteObject[]
|
|
|
86
87
|
return [
|
|
87
88
|
{ path: "/error", element: pick("error", <ErrorPage />) },
|
|
88
89
|
{ path: "/not-found", element: pick("notFound", <NotFoundPage />) },
|
|
89
|
-
{ element: pick("authLayout", <AuthLayoutWrapper />), children: authChildren },
|
|
90
|
+
{ element: <GuestGuard />, children: [{ element: pick("authLayout", <AuthLayoutWrapper />), children: authChildren }] },
|
|
90
91
|
{
|
|
91
92
|
element: pick("authGuard", <AuthGuard />),
|
|
92
93
|
children: [
|