@solidxai/core-ui 0.1.11 → 0.1.12-beta.1
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/signInWithOAuthAccessCode.d.ts +1 -1
- package/dist/adapters/auth/signInWithOAuthAccessCode.d.ts.map +1 -1
- package/dist/adapters/auth/signInWithOAuthAccessCode.js.map +1 -1
- package/dist/adapters/auth/signInWithOAuthAccessCode.ts +1 -1
- package/dist/components/auth/SolidLogin.d.ts.map +1 -1
- package/dist/components/auth/SolidLogin.js +10 -6
- package/dist/components/auth/SolidLogin.js.map +1 -1
- package/dist/components/auth/SolidLogin.tsx +19 -3
- package/dist/components/auth/SolidRegister.d.ts.map +1 -1
- package/dist/components/auth/SolidRegister.js +12 -8
- package/dist/components/auth/SolidRegister.js.map +1 -1
- package/dist/components/auth/SolidRegister.tsx +19 -3
- package/dist/components/common/GeneralSettings.d.ts.map +1 -1
- package/dist/components/common/GeneralSettings.js +46 -43
- package/dist/components/common/GeneralSettings.js.map +1 -1
- package/dist/components/common/GeneralSettings.tsx +22 -0
- package/dist/components/common/SocialMediaLogin.d.ts +2 -1
- package/dist/components/common/SocialMediaLogin.d.ts.map +1 -1
- package/dist/components/common/SocialMediaLogin.js +6 -6
- package/dist/components/common/SocialMediaLogin.js.map +1 -1
- package/dist/components/common/SocialMediaLogin.tsx +36 -8
- package/dist/components/common/SolidLoadingState.d.ts +10 -0
- package/dist/components/common/SolidLoadingState.d.ts.map +1 -0
- package/dist/components/common/SolidLoadingState.js +8 -0
- package/dist/components/common/SolidLoadingState.js.map +1 -0
- package/dist/components/common/SolidLoadingState.module.css +56 -0
- package/dist/components/common/SolidLoadingState.tsx +28 -0
- package/dist/components/core/json/SolidJsonEditor.css +195 -0
- package/dist/components/core/json/SolidJsonEditor.d.ts +19 -0
- package/dist/components/core/json/SolidJsonEditor.d.ts.map +1 -0
- package/dist/components/core/json/SolidJsonEditor.js +109 -0
- package/dist/components/core/json/SolidJsonEditor.js.map +1 -0
- package/dist/components/core/json/SolidJsonEditor.tsx +150 -0
- package/dist/components/core/module/CreateModule.css +70 -2
- package/dist/components/core/module/CreateModule.d.ts.map +1 -1
- package/dist/components/core/module/CreateModule.js +2 -2
- package/dist/components/core/module/CreateModule.js.map +1 -1
- package/dist/components/core/module/CreateModule.tsx +13 -1
- package/dist/components/shad-cn-ui/SolidTabs.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidTabs.js +1 -1
- package/dist/components/shad-cn-ui/SolidTabs.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidTabs.tsx +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.ts +16 -0
- package/dist/redux/api/datasourceIntrospectionApi.d.ts +203 -0
- package/dist/redux/api/datasourceIntrospectionApi.d.ts.map +1 -0
- package/dist/redux/api/datasourceIntrospectionApi.js +71 -0
- package/dist/redux/api/datasourceIntrospectionApi.js.map +1 -0
- package/dist/redux/api/datasourceIntrospectionApi.ts +261 -0
- package/dist/redux/api/datasourceManagementApi.d.ts +46 -0
- package/dist/redux/api/datasourceManagementApi.d.ts.map +1 -0
- package/dist/redux/api/datasourceManagementApi.js +35 -0
- package/dist/redux/api/datasourceManagementApi.js.map +1 -0
- package/dist/redux/api/datasourceManagementApi.ts +86 -0
- package/dist/redux/store/StoreProvider.d.ts.map +1 -1
- package/dist/redux/store/StoreProvider.js +4 -2
- package/dist/redux/store/StoreProvider.js.map +1 -1
- package/dist/redux/store/StoreProvider.tsx +9 -1
- package/dist/redux/store/defaultStoreConfig.d.ts +23 -0
- package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
- package/dist/redux/store/defaultStoreConfig.js +4 -0
- package/dist/redux/store/defaultStoreConfig.js.map +1 -1
- package/dist/redux/store/defaultStoreConfig.ts +4 -0
- package/dist/resources/solid-custom.css +72 -18
- package/dist/routes/guards/AdminGuard.d.ts.map +1 -1
- package/dist/routes/guards/AdminGuard.js +2 -1
- package/dist/routes/guards/AdminGuard.js.map +1 -1
- package/dist/routes/guards/AdminGuard.tsx +7 -1
- package/dist/routes/guards/AuthGuard.d.ts.map +1 -1
- package/dist/routes/guards/AuthGuard.js +2 -1
- package/dist/routes/guards/AuthGuard.js.map +1 -1
- package/dist/routes/guards/AuthGuard.tsx +8 -2
- package/dist/routes/guards/GuestGuard.d.ts.map +1 -1
- package/dist/routes/guards/GuestGuard.js +2 -1
- package/dist/routes/guards/GuestGuard.js.map +1 -1
- package/dist/routes/guards/GuestGuard.tsx +8 -2
- package/dist/routes/pages/admin/core/DashboardPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/DashboardPage.js +7 -5
- package/dist/routes/pages/admin/core/DashboardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/DashboardPage.module.css +18 -0
- package/dist/routes/pages/admin/core/DashboardPage.tsx +50 -32
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.css +828 -0
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.d.ts +3 -0
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js +947 -0
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js.map +1 -0
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.tsx +1719 -0
- package/dist/routes/pages/admin/core/DatasourcesPage.css +337 -0
- package/dist/routes/pages/admin/core/DatasourcesPage.d.ts +3 -0
- package/dist/routes/pages/admin/core/DatasourcesPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/DatasourcesPage.js +221 -0
- package/dist/routes/pages/admin/core/DatasourcesPage.js.map +1 -0
- package/dist/routes/pages/admin/core/DatasourcesPage.tsx +540 -0
- package/dist/routes/solidRoutes.d.ts.map +1 -1
- package/dist/routes/solidRoutes.js +7 -1
- package/dist/routes/solidRoutes.js.map +1 -1
- package/dist/routes/solidRoutes.tsx +6 -0
- package/dist/routes/types.d.ts +1 -1
- package/dist/routes/types.d.ts.map +1 -1
- package/dist/routes/types.js.map +1 -1
- package/dist/routes/types.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createApi } from "@reduxjs/toolkit/query/react";
|
|
2
|
+
import { baseQueryWithAuth } from "./fetchBaseQuery";
|
|
3
|
+
function unwrapEnvelope(payload) {
|
|
4
|
+
var current = payload;
|
|
5
|
+
while (current
|
|
6
|
+
&& typeof current === "object"
|
|
7
|
+
&& "data" in current
|
|
8
|
+
&& current.data !== undefined) {
|
|
9
|
+
current = current.data;
|
|
10
|
+
}
|
|
11
|
+
return current;
|
|
12
|
+
}
|
|
13
|
+
export var datasourceManagementApi = createApi({
|
|
14
|
+
reducerPath: "datasourceManagementApi",
|
|
15
|
+
baseQuery: baseQueryWithAuth,
|
|
16
|
+
tagTypes: ["DatasourceManagement"],
|
|
17
|
+
endpoints: function (builder) { return ({
|
|
18
|
+
getDatasources: builder.query({
|
|
19
|
+
query: function () { return "/datasource-management"; },
|
|
20
|
+
providesTags: ["DatasourceManagement"],
|
|
21
|
+
transformResponse: function (response) { var _a, _b; return (_b = (_a = unwrapEnvelope(response)) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : []; },
|
|
22
|
+
}),
|
|
23
|
+
createDatasource: builder.mutation({
|
|
24
|
+
query: function (body) { return ({
|
|
25
|
+
url: "/datasource-management",
|
|
26
|
+
method: "POST",
|
|
27
|
+
body: body,
|
|
28
|
+
}); },
|
|
29
|
+
invalidatesTags: ["DatasourceManagement"],
|
|
30
|
+
transformResponse: function (response) { return unwrapEnvelope(response); },
|
|
31
|
+
}),
|
|
32
|
+
}); },
|
|
33
|
+
});
|
|
34
|
+
export var useGetDatasourcesQuery = datasourceManagementApi.useGetDatasourcesQuery, useCreateDatasourceMutation = datasourceManagementApi.useCreateDatasourceMutation;
|
|
35
|
+
//# sourceMappingURL=datasourceManagementApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasourceManagementApi.js","sourceRoot":"","sources":["../../../src/redux/api/datasourceManagementApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AA4CrD,SAAS,cAAc,CAAU,OAAY;IAC3C,IAAI,OAAO,GAAG,OAAO,CAAC;IAEtB,OACE,OAAO;WACJ,OAAO,OAAO,KAAK,QAAQ;WAC3B,MAAM,IAAI,OAAO;WACjB,OAAO,CAAC,IAAI,KAAK,SAAS,EAC7B;QACA,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;KACxB;IAED,OAAO,OAAY,CAAC;AACtB,CAAC;AAED,MAAM,CAAC,IAAM,uBAAuB,GAAG,SAAS,CAAC;IAC/C,WAAW,EAAE,yBAAyB;IACtC,SAAS,EAAE,iBAAiB;IAC5B,QAAQ,EAAE,CAAC,sBAAsB,CAAC;IAClC,SAAS,EAAE,UAAC,OAAO,IAAK,OAAA,CAAC;QACvB,cAAc,EAAE,OAAO,CAAC,KAAK,CAAqC;YAChE,KAAK,EAAE,cAAM,OAAA,wBAAwB,EAAxB,CAAwB;YACrC,YAAY,EAAE,CAAC,sBAAsB,CAAC;YACtC,iBAAiB,EAAE,UAAC,QAAa,gBAAK,OAAA,MAAA,MAAA,cAAc,CAA6C,QAAQ,CAAC,0CAAE,OAAO,mCAAI,EAAE,CAAA,EAAA;SAC1H,CAAC;QACF,gBAAgB,EAAE,OAAO,CAAC,QAAQ,CAAgE;YAChG,KAAK,EAAE,UAAC,IAAI,IAAK,OAAA,CAAC;gBAChB,GAAG,EAAE,wBAAwB;gBAC7B,MAAM,EAAE,MAAM;gBACd,IAAI,MAAA;aACL,CAAC,EAJe,CAIf;YACF,eAAe,EAAE,CAAC,sBAAsB,CAAC;YACzC,iBAAiB,EAAE,UAAC,QAAa,IAAK,OAAA,cAAc,CAA6B,QAAQ,CAAC,EAApD,CAAoD;SAC3F,CAAC;KACH,CAAC,EAfsB,CAetB;CACH,CAAC,CAAC;AAEH,MAAM,CACJ,IAAA,sBAAsB,GAEpB,uBAAuB,uBAFH,EACtB,2BAA2B,GACzB,uBAAuB,4BADE,CACD","sourcesContent":["import { createApi } from \"@reduxjs/toolkit/query/react\";\nimport { baseQueryWithAuth } from \"./fetchBaseQuery\";\n\nexport type DatasourceManagementRecord = {\n name: string;\n displayName: string;\n type: \"postgres\" | \"mysql\" | \"mssql\" | string;\n envPrefix: string;\n isDefault: boolean;\n host: string;\n port: number | null;\n database: string;\n username: string;\n passwordConfigured: boolean;\n synchronize: boolean | null;\n logging: boolean | null;\n moduleFile: string;\n envFile: string;\n advanced: Record<string, any>;\n};\n\nexport type CreateDatasourceManagementPayload = {\n name: string;\n displayName?: string;\n type: \"postgres\" | \"mysql\" | \"mssql\";\n host: string;\n port: number;\n database: string;\n username: string;\n password: string;\n synchronize?: boolean;\n logging?: boolean;\n ssl?: boolean;\n sslRejectUnauthorized?: boolean;\n poolMax?: number;\n connectionTimeoutMs?: number;\n idleTimeoutMs?: number;\n statementTimeoutMs?: number;\n idleInTxTimeoutMs?: number;\n retryAttempts?: number;\n retryDelayMs?: number;\n encrypt?: boolean;\n trustServerCertificate?: boolean;\n};\n\nfunction unwrapEnvelope<T = any>(payload: any): T {\n let current = payload;\n\n while (\n current\n && typeof current === \"object\"\n && \"data\" in current\n && current.data !== undefined\n ) {\n current = current.data;\n }\n\n return current as T;\n}\n\nexport const datasourceManagementApi = createApi({\n reducerPath: \"datasourceManagementApi\",\n baseQuery: baseQueryWithAuth,\n tagTypes: [\"DatasourceManagement\"],\n endpoints: (builder) => ({\n getDatasources: builder.query<DatasourceManagementRecord[], void>({\n query: () => \"/datasource-management\",\n providesTags: [\"DatasourceManagement\"],\n transformResponse: (response: any) => unwrapEnvelope<{ records?: DatasourceManagementRecord[] }>(response)?.records ?? [],\n }),\n createDatasource: builder.mutation<DatasourceManagementRecord, CreateDatasourceManagementPayload>({\n query: (body) => ({\n url: \"/datasource-management\",\n method: \"POST\",\n body,\n }),\n invalidatesTags: [\"DatasourceManagement\"],\n transformResponse: (response: any) => unwrapEnvelope<DatasourceManagementRecord>(response),\n }),\n }),\n});\n\nexport const {\n useGetDatasourcesQuery,\n useCreateDatasourceMutation,\n} = datasourceManagementApi;\n"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { createApi } from "@reduxjs/toolkit/query/react";
|
|
2
|
+
import { baseQueryWithAuth } from "./fetchBaseQuery";
|
|
3
|
+
|
|
4
|
+
export type DatasourceManagementRecord = {
|
|
5
|
+
name: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
type: "postgres" | "mysql" | "mssql" | string;
|
|
8
|
+
envPrefix: string;
|
|
9
|
+
isDefault: boolean;
|
|
10
|
+
host: string;
|
|
11
|
+
port: number | null;
|
|
12
|
+
database: string;
|
|
13
|
+
username: string;
|
|
14
|
+
passwordConfigured: boolean;
|
|
15
|
+
synchronize: boolean | null;
|
|
16
|
+
logging: boolean | null;
|
|
17
|
+
moduleFile: string;
|
|
18
|
+
envFile: string;
|
|
19
|
+
advanced: Record<string, any>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type CreateDatasourceManagementPayload = {
|
|
23
|
+
name: string;
|
|
24
|
+
displayName?: string;
|
|
25
|
+
type: "postgres" | "mysql" | "mssql";
|
|
26
|
+
host: string;
|
|
27
|
+
port: number;
|
|
28
|
+
database: string;
|
|
29
|
+
username: string;
|
|
30
|
+
password: string;
|
|
31
|
+
synchronize?: boolean;
|
|
32
|
+
logging?: boolean;
|
|
33
|
+
ssl?: boolean;
|
|
34
|
+
sslRejectUnauthorized?: boolean;
|
|
35
|
+
poolMax?: number;
|
|
36
|
+
connectionTimeoutMs?: number;
|
|
37
|
+
idleTimeoutMs?: number;
|
|
38
|
+
statementTimeoutMs?: number;
|
|
39
|
+
idleInTxTimeoutMs?: number;
|
|
40
|
+
retryAttempts?: number;
|
|
41
|
+
retryDelayMs?: number;
|
|
42
|
+
encrypt?: boolean;
|
|
43
|
+
trustServerCertificate?: boolean;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
function unwrapEnvelope<T = any>(payload: any): T {
|
|
47
|
+
let current = payload;
|
|
48
|
+
|
|
49
|
+
while (
|
|
50
|
+
current
|
|
51
|
+
&& typeof current === "object"
|
|
52
|
+
&& "data" in current
|
|
53
|
+
&& current.data !== undefined
|
|
54
|
+
) {
|
|
55
|
+
current = current.data;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return current as T;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const datasourceManagementApi = createApi({
|
|
62
|
+
reducerPath: "datasourceManagementApi",
|
|
63
|
+
baseQuery: baseQueryWithAuth,
|
|
64
|
+
tagTypes: ["DatasourceManagement"],
|
|
65
|
+
endpoints: (builder) => ({
|
|
66
|
+
getDatasources: builder.query<DatasourceManagementRecord[], void>({
|
|
67
|
+
query: () => "/datasource-management",
|
|
68
|
+
providesTags: ["DatasourceManagement"],
|
|
69
|
+
transformResponse: (response: any) => unwrapEnvelope<{ records?: DatasourceManagementRecord[] }>(response)?.records ?? [],
|
|
70
|
+
}),
|
|
71
|
+
createDatasource: builder.mutation<DatasourceManagementRecord, CreateDatasourceManagementPayload>({
|
|
72
|
+
query: (body) => ({
|
|
73
|
+
url: "/datasource-management",
|
|
74
|
+
method: "POST",
|
|
75
|
+
body,
|
|
76
|
+
}),
|
|
77
|
+
invalidatesTags: ["DatasourceManagement"],
|
|
78
|
+
transformResponse: (response: any) => unwrapEnvelope<DatasourceManagementRecord>(response),
|
|
79
|
+
}),
|
|
80
|
+
}),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const {
|
|
84
|
+
useGetDatasourcesQuery,
|
|
85
|
+
useCreateDatasourceMutation,
|
|
86
|
+
} = datasourceManagementApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreProvider.d.ts","sourceRoot":"","sources":["../../../src/redux/store/StoreProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"StoreProvider.d.ts","sourceRoot":"","sources":["../../../src/redux/store/StoreProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AAYvE,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,QAAQ,EACR,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC3E,WAAW,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;CAClF,2CAoCA"}
|
|
@@ -40,6 +40,7 @@ import { Provider } from "react-redux";
|
|
|
40
40
|
import { createSolidStore } from "./createSolidStore";
|
|
41
41
|
import { eventBus, AppEvents } from "../../helpers/eventBus";
|
|
42
42
|
import { solidGet } from "../../http/solidHttp";
|
|
43
|
+
import { SolidLoadingState } from "../../components/common/SolidLoadingState";
|
|
43
44
|
function fetchEntities() {
|
|
44
45
|
var _a;
|
|
45
46
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -80,8 +81,9 @@ export function StoreProvider(_a) {
|
|
|
80
81
|
};
|
|
81
82
|
}, [reducers, middlewares]);
|
|
82
83
|
var content = useMemo(function () {
|
|
83
|
-
if (!store)
|
|
84
|
-
return _jsx(
|
|
84
|
+
if (!store) {
|
|
85
|
+
return (_jsx(SolidLoadingState, { title: "Preparing workspace", description: "We are loading the application shell and getting your workspace ready." }));
|
|
86
|
+
}
|
|
85
87
|
return _jsx(Provider, { store: store, children: children });
|
|
86
88
|
}, [store, children]);
|
|
87
89
|
return content;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreProvider.js","sourceRoot":"","sources":["../../../src/redux/store/StoreProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"StoreProvider.js","sourceRoot":"","sources":["../../../src/redux/store/StoreProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,SAAe,aAAa;;;;;;wBACT,qBAAM,QAAQ,CAAC,wBAAwB,CAAC,EAAA;;oBAAnD,QAAQ,GAAG,SAAwC;oBACnD,IAAI,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ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qBAAqB,EAC3B,WAAW,EAAC,wEAAwE,GACpF,CACH,CAAC;SACH;QACD,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAY,CAAC;IACvD,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEtB,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { Provider } from \"react-redux\";\nimport { createSolidStore, type SolidStore } from \"./createSolidStore\";\nimport { eventBus, AppEvents } from \"../../helpers/eventBus\";\nimport { solidGet } from \"../../http/solidHttp\";\nimport { SolidLoadingState } from \"../../components/common/SolidLoadingState\";\n\nasync function fetchEntities(): Promise<string[]> {\n const response = await solidGet(\"/model-metadata/public\");\n const data = response?.data;\n const records = data?.data?.records || [];\n return records.map((r: { singularName: string }) => r.singularName);\n}\n\nexport function StoreProvider({\n children,\n reducers,\n middlewares,\n}: {\n children: ReactNode;\n reducers?: NonNullable<Parameters<typeof createSolidStore>[0]>[\"reducers\"];\n middlewares?: NonNullable<Parameters<typeof createSolidStore>[0]>[\"middlewares\"];\n}) {\n const [store, setStore] = useState<SolidStore | null>(null);\n\n useEffect(() => {\n let mounted = true;\n fetchEntities()\n .then((entities) => {\n if (!mounted) return;\n setStore(createSolidStore({ entities, reducers, middlewares }));\n })\n .catch(() => {\n if (!mounted) return;\n eventBus.emit(AppEvents.GlobalError, {\n message: \"Unable to reach the server. Please try again later.\",\n });\n setStore(createSolidStore({ entities: [], reducers, middlewares }));\n });\n\n return () => {\n mounted = false;\n };\n }, [reducers, middlewares]);\n\n const content = useMemo(() => {\n if (!store) {\n return (\n <SolidLoadingState\n title=\"Preparing workspace\"\n description=\"We are loading the application shell and getting your workspace ready.\"\n />\n );\n }\n return <Provider store={store}>{children}</Provider>;\n }, [store, children]);\n\n return content;\n}\n"]}
|
|
@@ -4,6 +4,7 @@ import { Provider } from "react-redux";
|
|
|
4
4
|
import { createSolidStore, type SolidStore } from "./createSolidStore";
|
|
5
5
|
import { eventBus, AppEvents } from "../../helpers/eventBus";
|
|
6
6
|
import { solidGet } from "../../http/solidHttp";
|
|
7
|
+
import { SolidLoadingState } from "../../components/common/SolidLoadingState";
|
|
7
8
|
|
|
8
9
|
async function fetchEntities(): Promise<string[]> {
|
|
9
10
|
const response = await solidGet("/model-metadata/public");
|
|
@@ -44,7 +45,14 @@ export function StoreProvider({
|
|
|
44
45
|
}, [reducers, middlewares]);
|
|
45
46
|
|
|
46
47
|
const content = useMemo(() => {
|
|
47
|
-
if (!store)
|
|
48
|
+
if (!store) {
|
|
49
|
+
return (
|
|
50
|
+
<SolidLoadingState
|
|
51
|
+
title="Preparing workspace"
|
|
52
|
+
description="We are loading the application shell and getting your workspace ready."
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
48
56
|
return <Provider store={store}>{children}</Provider>;
|
|
49
57
|
}, [store, children]);
|
|
50
58
|
|
|
@@ -180,6 +180,29 @@ export declare const solidApiSlices: (import("@reduxjs/toolkit/query").Api<impor
|
|
|
180
180
|
deleteMultipleMediaStorageProviders: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, any, "mediaStorageProviderApi">;
|
|
181
181
|
deleteMediaStorageProivder: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, any, "mediaStorageProviderApi">;
|
|
182
182
|
}, "mediaStorageProviderApi", 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>, {
|
|
183
|
+
getDatasources: import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "DatasourceManagement", import("../api/datasourceManagementApi").DatasourceManagementRecord[], "datasourceManagementApi">;
|
|
184
|
+
createDatasource: import("@reduxjs/toolkit/query").MutationDefinition<import("../api/datasourceManagementApi").CreateDatasourceManagementPayload, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "DatasourceManagement", import("../api/datasourceManagementApi").DatasourceManagementRecord, "datasourceManagementApi">;
|
|
185
|
+
}, "datasourceManagementApi", "DatasourceManagement", 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>, {
|
|
186
|
+
getDatasourceIntrospectionBootstrap: import("@reduxjs/toolkit/query").QueryDefinition<number, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "DatasourceIntrospection", import("../api/datasourceIntrospectionApi").DatasourceIntrospectionBootstrap, "datasourceIntrospectionApi">;
|
|
187
|
+
getDatasourceIntrospectionTables: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
188
|
+
moduleId: number;
|
|
189
|
+
datasource: string;
|
|
190
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "DatasourceIntrospection", import("../api/datasourceIntrospectionApi").DatasourceIntrospectionTablesResponse, "datasourceIntrospectionApi">;
|
|
191
|
+
getDatasourceIntrospectionTableDetail: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
192
|
+
moduleId: number;
|
|
193
|
+
datasource: string;
|
|
194
|
+
table: string;
|
|
195
|
+
schema?: string | null | undefined;
|
|
196
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "DatasourceIntrospection", import("../api/datasourceIntrospectionApi").DatasourceIntrospectionTableDetail, "datasourceIntrospectionApi">;
|
|
197
|
+
previewDatasourceIntrospectionMapping: import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
198
|
+
moduleId: number;
|
|
199
|
+
payload: import("../api/datasourceIntrospectionApi").DatasourceIntrospectionMappingRequest;
|
|
200
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "DatasourceIntrospection", import("../api/datasourceIntrospectionApi").DatasourceIntrospectionMappingPreview, "datasourceIntrospectionApi">;
|
|
201
|
+
applyDatasourceIntrospectionMapping: import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
202
|
+
moduleId: number;
|
|
203
|
+
payload: import("../api/datasourceIntrospectionApi").DatasourceIntrospectionMappingRequest;
|
|
204
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "DatasourceIntrospection", import("../api/datasourceIntrospectionApi").DatasourceIntrospectionApplyResponse, "datasourceIntrospectionApi">;
|
|
205
|
+
}, "datasourceIntrospectionApi", "DatasourceIntrospection", 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>, {
|
|
183
206
|
getroles: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, any, "roleApi">;
|
|
184
207
|
getroleById: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, any, "roleApi">;
|
|
185
208
|
createrole: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, any, "roleApi">;
|
|
@@ -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"}
|
|
@@ -25,6 +25,8 @@ import { solidViewsApi } from "../api/solidViewApi";
|
|
|
25
25
|
import { userApi } from "../api/userApi";
|
|
26
26
|
import { apiKeyApi } from "../api/apiKeyApi";
|
|
27
27
|
import { dashboardRuntimeApi } from "../api/dashboardRuntimeApi";
|
|
28
|
+
import { datasourceManagementApi } from "../api/datasourceManagementApi";
|
|
29
|
+
import { datasourceIntrospectionApi } from "../api/datasourceIntrospectionApi";
|
|
28
30
|
// 1. Export all APIs in one array
|
|
29
31
|
export var solidApiSlices = [
|
|
30
32
|
authApi,
|
|
@@ -46,6 +48,8 @@ export var solidApiSlices = [
|
|
|
46
48
|
aiInteractionApi,
|
|
47
49
|
apiKeyApi,
|
|
48
50
|
dashboardRuntimeApi,
|
|
51
|
+
datasourceManagementApi,
|
|
52
|
+
datasourceIntrospectionApi,
|
|
49
53
|
];
|
|
50
54
|
// 2. Export default reducers
|
|
51
55
|
export var solidReducers = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultStoreConfig.js","sourceRoot":"","sources":["../../../src/redux/store/defaultStoreConfig.ts"],"names":[],"mappings":"AAAA,OAAO,qBA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M,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAE/E,kCAAkC;AAClC,MAAM,CAAC,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,gBAAgB;IAChB,SAAS;IACT,mBAAmB;IACnB,uBAAuB;IACvB,0BAA0B;CAC7B,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 { 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 { apiKeyApi } from \"../api/apiKeyApi\";\nimport { dashboardRuntimeApi } from \"../api/dashboardRuntimeApi\";\nimport { datasourceManagementApi } from \"../api/datasourceManagementApi\";\nimport { datasourceIntrospectionApi } from \"../api/datasourceIntrospectionApi\";\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 aiInteractionApi,\n apiKeyApi,\n dashboardRuntimeApi,\n datasourceManagementApi,\n datasourceIntrospectionApi,\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"]}
|
|
@@ -25,6 +25,8 @@ import { solidViewsApi } from "../api/solidViewApi";
|
|
|
25
25
|
import { userApi } from "../api/userApi";
|
|
26
26
|
import { apiKeyApi } from "../api/apiKeyApi";
|
|
27
27
|
import { dashboardRuntimeApi } from "../api/dashboardRuntimeApi";
|
|
28
|
+
import { datasourceManagementApi } from "../api/datasourceManagementApi";
|
|
29
|
+
import { datasourceIntrospectionApi } from "../api/datasourceIntrospectionApi";
|
|
28
30
|
|
|
29
31
|
// 1. Export all APIs in one array
|
|
30
32
|
export const solidApiSlices = [
|
|
@@ -47,6 +49,8 @@ export const solidApiSlices = [
|
|
|
47
49
|
aiInteractionApi,
|
|
48
50
|
apiKeyApi,
|
|
49
51
|
dashboardRuntimeApi,
|
|
52
|
+
datasourceManagementApi,
|
|
53
|
+
datasourceIntrospectionApi,
|
|
50
54
|
];
|
|
51
55
|
|
|
52
56
|
// 2. Export default reducers
|
|
@@ -236,7 +236,7 @@ body {
|
|
|
236
236
|
position: fixed;
|
|
237
237
|
inset: 0;
|
|
238
238
|
background: rgba(2, 6, 23, 0.4);
|
|
239
|
-
z-index:
|
|
239
|
+
z-index: 100;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
.solid-sidebar-mobile-trigger {
|
|
@@ -261,7 +261,7 @@ body {
|
|
|
261
261
|
background: var(--sidebar-background);
|
|
262
262
|
color: var(--sidebar-foreground);
|
|
263
263
|
border-right: 1px solid var(--sidebar-border);
|
|
264
|
-
z-index:
|
|
264
|
+
z-index: 100;
|
|
265
265
|
display: flex;
|
|
266
266
|
flex-direction: column;
|
|
267
267
|
transition: width 200ms ease, transform 200ms ease, top 220ms ease, height 220ms ease;
|
|
@@ -2471,10 +2471,11 @@ body {
|
|
|
2471
2471
|
min-width: 0 !important;
|
|
2472
2472
|
width: min(100%, 388px) !important;
|
|
2473
2473
|
max-width: 388px !important;
|
|
2474
|
-
padding:
|
|
2475
|
-
border-radius:
|
|
2474
|
+
padding: 24px !important;
|
|
2475
|
+
border-radius: 16px !important;
|
|
2476
2476
|
backdrop-filter: none !important;
|
|
2477
|
-
box-shadow:
|
|
2477
|
+
box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
|
|
2478
|
+
font-family: var(--font-family, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif) !important;
|
|
2478
2479
|
}
|
|
2479
2480
|
|
|
2480
2481
|
.solid-auth-theme-wrapper.left .auth-container,
|
|
@@ -2504,22 +2505,35 @@ body {
|
|
|
2504
2505
|
|
|
2505
2506
|
.solid-auth-theme-wrapper .solid-auth-title {
|
|
2506
2507
|
margin-top: 0 !important;
|
|
2507
|
-
font-size:
|
|
2508
|
-
|
|
2509
|
-
|
|
2508
|
+
font-size: clamp(1.45rem, 1.2rem + 0.7vw, 1.75rem) !important;
|
|
2509
|
+
font-weight: 650 !important;
|
|
2510
|
+
line-height: 1.08 !important;
|
|
2511
|
+
letter-spacing: -0.03em !important;
|
|
2510
2512
|
}
|
|
2511
2513
|
|
|
2512
2514
|
.solid-auth-theme-wrapper .solid-auth-helper {
|
|
2513
|
-
margin-top: 0.
|
|
2514
|
-
margin-bottom:
|
|
2515
|
-
font-size:
|
|
2516
|
-
line-height: 1.
|
|
2515
|
+
margin-top: 0.65rem !important;
|
|
2516
|
+
margin-bottom: 1rem !important;
|
|
2517
|
+
font-size: 0.92rem !important;
|
|
2518
|
+
line-height: 1.55 !important;
|
|
2519
|
+
letter-spacing: -0.01em !important;
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
.solid-auth-theme-wrapper .solid-auth-input-label {
|
|
2523
|
+
font-size: 0.84rem !important;
|
|
2524
|
+
font-weight: 600 !important;
|
|
2525
|
+
letter-spacing: -0.01em !important;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
.solid-auth-theme-wrapper .solid-auth-inline-link {
|
|
2529
|
+
font-size: 0.84rem !important;
|
|
2530
|
+
font-weight: 500 !important;
|
|
2517
2531
|
}
|
|
2518
2532
|
|
|
2519
2533
|
.solid-auth-theme-wrapper .auth-container .solid-input {
|
|
2520
|
-
height:
|
|
2521
|
-
border-radius:
|
|
2522
|
-
padding: 0
|
|
2534
|
+
height: 42px !important;
|
|
2535
|
+
border-radius: 10px !important;
|
|
2536
|
+
padding: 0 12px !important;
|
|
2523
2537
|
border: 1px solid #2f2f37 !important;
|
|
2524
2538
|
border-color: #2f2f37 !important;
|
|
2525
2539
|
border-top-color: #2f2f37 !important;
|
|
@@ -2586,9 +2600,17 @@ body {
|
|
|
2586
2600
|
.solid-auth-theme-wrapper .auth-submit-button.solid-btn,
|
|
2587
2601
|
.solid-auth-theme-wrapper .auth-back-button.solid-btn,
|
|
2588
2602
|
.solid-auth-theme-wrapper .solid-auth-social-btn.solid-btn {
|
|
2589
|
-
min-height:
|
|
2590
|
-
height:
|
|
2591
|
-
border-radius:
|
|
2603
|
+
min-height: 42px !important;
|
|
2604
|
+
height: 42px !important;
|
|
2605
|
+
border-radius: 10px !important;
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
.solid-auth-theme-wrapper .auth-submit-button.solid-btn .solid-btn-label,
|
|
2609
|
+
.solid-auth-theme-wrapper .auth-back-button.solid-btn .solid-btn-label,
|
|
2610
|
+
.solid-auth-theme-wrapper .solid-auth-social-btn.solid-btn .solid-btn-label {
|
|
2611
|
+
font-size: 0.92rem !important;
|
|
2612
|
+
font-weight: 600 !important;
|
|
2613
|
+
letter-spacing: -0.01em !important;
|
|
2592
2614
|
}
|
|
2593
2615
|
|
|
2594
2616
|
.solid-auth-theme-wrapper .auth-container .solid-message {
|
|
@@ -2621,6 +2643,38 @@ body {
|
|
|
2621
2643
|
color: #ef4444 !important;
|
|
2622
2644
|
}
|
|
2623
2645
|
|
|
2646
|
+
.solid-auth-theme-wrapper .solid-auth-empty-state {
|
|
2647
|
+
margin-top: 1rem;
|
|
2648
|
+
border: 1px solid var(--solid-border-default) !important;
|
|
2649
|
+
border-radius: 14px;
|
|
2650
|
+
background: color-mix(in srgb, var(--solid-surface-input) 55%, transparent);
|
|
2651
|
+
padding: 14px 15px;
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
.solid-auth-theme-wrapper .solid-auth-empty-state.is-loading {
|
|
2655
|
+
background: color-mix(in srgb, var(--solid-surface-input) 42%, transparent);
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2658
|
+
.solid-auth-theme-wrapper .solid-auth-empty-title,
|
|
2659
|
+
.solid-auth-theme-wrapper .solid-auth-empty-copy {
|
|
2660
|
+
margin: 0;
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
.solid-auth-theme-wrapper .solid-auth-empty-title {
|
|
2664
|
+
color: var(--solid-text-primary) !important;
|
|
2665
|
+
font-size: 0.95rem !important;
|
|
2666
|
+
font-weight: 600 !important;
|
|
2667
|
+
line-height: 1.4 !important;
|
|
2668
|
+
letter-spacing: -0.01em !important;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
.solid-auth-theme-wrapper .solid-auth-empty-copy {
|
|
2672
|
+
margin-top: 0.35rem;
|
|
2673
|
+
color: var(--solid-text-secondary) !important;
|
|
2674
|
+
font-size: 0.84rem !important;
|
|
2675
|
+
line-height: 1.55 !important;
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2624
2678
|
/* Side auth layout shell (left/right) */
|
|
2625
2679
|
.solid-auth-theme-wrapper.left,
|
|
2626
2680
|
.solid-auth-theme-wrapper.right {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminGuard.d.ts","sourceRoot":"","sources":["../../../src/routes/guards/AdminGuard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdminGuard.d.ts","sourceRoot":"","sources":["../../../src/routes/guards/AdminGuard.tsx"],"names":[],"mappings":"AAKA,wBAAgB,UAAU,4CAiBzB"}
|
|
@@ -2,11 +2,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Navigate, Outlet } from "react-router-dom";
|
|
3
3
|
import { useSession } from "../../hooks/useSession";
|
|
4
4
|
import { hasAnyRole } from "../../helpers/rolesHelper";
|
|
5
|
+
import { SolidLoadingState } from "../../components/common/SolidLoadingState";
|
|
5
6
|
export function AdminGuard() {
|
|
6
7
|
var _a;
|
|
7
8
|
var _b = useSession(), session = _b.data, status = _b.status;
|
|
8
9
|
if (status === "loading") {
|
|
9
|
-
return _jsx(
|
|
10
|
+
return (_jsx(SolidLoadingState, { title: "Checking access", description: "We are verifying your session and access permissions." }));
|
|
10
11
|
}
|
|
11
12
|
if (!hasAnyRole((_a = session === null || session === void 0 ? void 0 : session.user) === null || _a === void 0 ? void 0 : _a.roles, ["Admin"])) {
|
|
12
13
|
return _jsx(Navigate, { to: "/not-found", replace: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminGuard.js","sourceRoot":"","sources":["../../../src/routes/guards/AdminGuard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"AdminGuard.js","sourceRoot":"","sources":["../../../src/routes/guards/AdminGuard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,UAAU,UAAU;;IAClB,IAAA,KAA4B,UAAU,EAAE,EAAhC,OAAO,UAAA,EAAE,MAAM,YAAiB,CAAC;IAE/C,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,CACL,KAAC,iBAAiB,IAChB,KAAK,EAAC,iBAAiB,EACvB,WAAW,EAAC,uDAAuD,GACnE,CACH,CAAC;KACH;IAED,IAAI,CAAC,UAAU,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,0CAAE,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE;QAChD,OAAO,KAAC,QAAQ,IAAC,EAAE,EAAC,YAAY,EAAC,OAAO,SAAG,CAAC;KAC7C;IAED,OAAO,KAAC,MAAM,KAAG,CAAC;AACpB,CAAC","sourcesContent":["import { Navigate, Outlet } from \"react-router-dom\";\nimport { useSession } from \"../../hooks/useSession\";\nimport { hasAnyRole } from \"../../helpers/rolesHelper\";\nimport { SolidLoadingState } from \"../../components/common/SolidLoadingState\";\n\nexport function AdminGuard() {\n const { data: session, status } = useSession();\n\n if (status === \"loading\") {\n return (\n <SolidLoadingState\n title=\"Checking access\"\n description=\"We are verifying your session and access permissions.\"\n />\n );\n }\n\n if (!hasAnyRole(session?.user?.roles, [\"Admin\"])) {\n return <Navigate to=\"/not-found\" replace />;\n }\n\n return <Outlet />;\n}\n"]}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { Navigate, Outlet } from "react-router-dom";
|
|
2
2
|
import { useSession } from "../../hooks/useSession";
|
|
3
3
|
import { hasAnyRole } from "../../helpers/rolesHelper";
|
|
4
|
+
import { SolidLoadingState } from "../../components/common/SolidLoadingState";
|
|
4
5
|
|
|
5
6
|
export function AdminGuard() {
|
|
6
7
|
const { data: session, status } = useSession();
|
|
7
8
|
|
|
8
9
|
if (status === "loading") {
|
|
9
|
-
return
|
|
10
|
+
return (
|
|
11
|
+
<SolidLoadingState
|
|
12
|
+
title="Checking access"
|
|
13
|
+
description="We are verifying your session and access permissions."
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
if (!hasAnyRole(session?.user?.roles, ["Admin"])) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../../src/routes/guards/AuthGuard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../../src/routes/guards/AuthGuard.tsx"],"names":[],"mappings":"AAIA,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,2CA2C1D"}
|
|
@@ -1,6 +1,7 @@
|
|
|
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
|
+
import { SolidLoadingState } from "../../components/common/SolidLoadingState";
|
|
4
5
|
export function AuthGuard(_a) {
|
|
5
6
|
var getLoginRoute = _a.getLoginRoute;
|
|
6
7
|
var location = useLocation();
|
|
@@ -19,7 +20,7 @@ export function AuthGuard(_a) {
|
|
|
19
20
|
};
|
|
20
21
|
var resolveLoginRoute = getLoginRoute || defaultGetLoginRoute;
|
|
21
22
|
if (status === "loading") {
|
|
22
|
-
return _jsx(
|
|
23
|
+
return (_jsx(SolidLoadingState, { title: "Checking your session", description: "We are confirming your sign-in status before opening this page." }));
|
|
23
24
|
}
|
|
24
25
|
if (status === "unauthenticated") {
|
|
25
26
|
return (_jsx(Navigate, { to: resolveLoginRoute(location.pathname), state: { from: location }, replace: true }));
|
|
@@ -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,kBAAk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from \"react-router-dom\";\nimport { useSession } from \"../../hooks/useSession\";\nimport { SolidLoadingState } from \"../../components/common/SolidLoadingState\";\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 // routes that should NOT be treated as tenant\n const systemRoutes = [\"admin\", \"auth\"];\n\n if (systemRoutes.includes(base)) {\n return \"/auth/login\";\n }\n\n return `/${base}/auth/login`;\n };\n\n const resolveLoginRoute = getLoginRoute || defaultGetLoginRoute;\n\n if (status === \"loading\") {\n return (\n <SolidLoadingState\n title=\"Checking your session\"\n description=\"We are confirming your sign-in status before opening this page.\"\n />\n );\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}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Navigate, Outlet, useLocation } from "react-router-dom";
|
|
2
2
|
import { useSession } from "../../hooks/useSession";
|
|
3
|
+
import { SolidLoadingState } from "../../components/common/SolidLoadingState";
|
|
3
4
|
|
|
4
5
|
type AuthGuardProps = {
|
|
5
6
|
getLoginRoute?: (pathname: string) => string;
|
|
@@ -29,7 +30,12 @@ export function AuthGuard({ getLoginRoute }: AuthGuardProps) {
|
|
|
29
30
|
const resolveLoginRoute = getLoginRoute || defaultGetLoginRoute;
|
|
30
31
|
|
|
31
32
|
if (status === "loading") {
|
|
32
|
-
return
|
|
33
|
+
return (
|
|
34
|
+
<SolidLoadingState
|
|
35
|
+
title="Checking your session"
|
|
36
|
+
description="We are confirming your sign-in status before opening this page."
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
33
39
|
}
|
|
34
40
|
|
|
35
41
|
if (status === "unauthenticated") {
|
|
@@ -43,4 +49,4 @@ export function AuthGuard({ getLoginRoute }: AuthGuardProps) {
|
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
return <Outlet />;
|
|
46
|
-
}
|
|
52
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuestGuard.d.ts","sourceRoot":"","sources":["../../../src/routes/guards/GuestGuard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GuestGuard.d.ts","sourceRoot":"","sources":["../../../src/routes/guards/GuestGuard.tsx"],"names":[],"mappings":"AAKA,wBAAgB,UAAU,4CAoBzB"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { Outlet, useNavigate } from "react-router-dom";
|
|
4
4
|
import { useSession } from "../../hooks/useSession";
|
|
5
|
+
import { SolidLoadingState } from "../../components/common/SolidLoadingState";
|
|
5
6
|
export function GuestGuard() {
|
|
6
7
|
var status = useSession().status;
|
|
7
8
|
var navigate = useNavigate();
|
|
@@ -11,7 +12,7 @@ export function GuestGuard() {
|
|
|
11
12
|
}
|
|
12
13
|
}, [status, navigate]);
|
|
13
14
|
if (status === "loading" || status === "authenticated") {
|
|
14
|
-
return _jsx(
|
|
15
|
+
return (_jsx(SolidLoadingState, { title: "Loading", description: "Please wait while we route you to the right place." }));
|
|
15
16
|
}
|
|
16
17
|
return _jsx(Outlet, {});
|
|
17
18
|
}
|
|
@@ -1 +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;
|
|
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;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,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,IAAI,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;YACvE,QAAQ,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;SACvC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvB,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,eAAe,EAAE;QACtD,OAAO,CACL,KAAC,iBAAiB,IAChB,KAAK,EAAC,SAAS,EACf,WAAW,EAAC,oDAAoD,GAChE,CACH,CAAC;KACH;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\";\nimport { SolidLoadingState } from \"../../components/common/SolidLoadingState\";\n\nexport function GuestGuard() {\n const { status } = useSession();\n const navigate = useNavigate();\n\n useEffect(() => {\n if (status === \"authenticated\" && location.pathname.startsWith(\"/auth\")) {\n navigate(\"/admin\", { replace: true });\n }\n }, [status, navigate]);\n\n if (status === \"loading\" || status === \"authenticated\") {\n return (\n <SolidLoadingState\n title=\"Loading\"\n description=\"Please wait while we route you to the right place.\"\n />\n );\n }\n\n return <Outlet />;\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
2
|
import { Outlet, useNavigate } from "react-router-dom";
|
|
3
3
|
import { useSession } from "../../hooks/useSession";
|
|
4
|
+
import { SolidLoadingState } from "../../components/common/SolidLoadingState";
|
|
4
5
|
|
|
5
6
|
export function GuestGuard() {
|
|
6
7
|
const { status } = useSession();
|
|
@@ -13,8 +14,13 @@ export function GuestGuard() {
|
|
|
13
14
|
}, [status, navigate]);
|
|
14
15
|
|
|
15
16
|
if (status === "loading" || status === "authenticated") {
|
|
16
|
-
return
|
|
17
|
+
return (
|
|
18
|
+
<SolidLoadingState
|
|
19
|
+
title="Loading"
|
|
20
|
+
description="Please wait while we route you to the right place."
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
return <Outlet />;
|
|
20
|
-
}
|
|
26
|
+
}
|