@solidxai/core-ui 0.1.9-beta.0 → 0.1.9-beta.2
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/components/auth/AuthLayout.js +15 -15
- package/dist/components/auth/AuthLayout.js.map +1 -1
- package/dist/components/auth/AuthLayout.tsx +1 -1
- package/dist/components/auth/SolidOTPVerify.d.ts +3 -0
- package/dist/components/auth/SolidOTPVerify.d.ts.map +1 -0
- package/dist/components/auth/SolidOTPVerify.js +67 -0
- package/dist/components/auth/SolidOTPVerify.js.map +1 -0
- package/dist/components/auth/SolidOTPVerify.tsx +133 -0
- package/dist/components/common/AuthBanner.js.map +1 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts +2 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts.map +1 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.js +50 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.js.map +1 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.tsx +70 -0
- package/dist/components/core/form/SolidFormActionHeader.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.js +4 -2
- package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.tsx +4 -2
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +4 -1
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +3 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +2 -2
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +2 -2
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +2 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js +2 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +10 -21
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +2 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +10 -18
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +6 -3
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +24 -30
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +2 -2
- package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js +31 -2
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.tsx +34 -2
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js +7 -6
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js.map +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +10 -9
- package/dist/components/core/tree/SolidTreeTable.d.ts +1 -1
- package/dist/components/core/tree/SolidTreeTable.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeTable.js +78 -78
- package/dist/components/core/tree/SolidTreeTable.js.map +1 -1
- package/dist/components/core/tree/SolidTreeTable.tsx +1 -10
- package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
- package/dist/components/layout/user-profile-menu.js +2 -1
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/components/layout/user-profile-menu.tsx +22 -27
- package/dist/nextAuth/authProviders.d.ts +4 -0
- package/dist/nextAuth/authProviders.d.ts.map +1 -0
- package/dist/nextAuth/authProviders.js +198 -0
- package/dist/nextAuth/authProviders.js.map +1 -0
- package/dist/nextAuth/authProviders.tsx +232 -0
- package/dist/nextAuth/handleLogout.d.ts +2 -0
- package/dist/nextAuth/handleLogout.d.ts.map +1 -0
- package/dist/nextAuth/handleLogout.js +36 -0
- package/dist/nextAuth/handleLogout.js.map +1 -0
- package/dist/nextAuth/handleLogout.tsx +39 -0
- package/dist/nextAuth/refreshAccessToken.d.ts +2 -0
- package/dist/nextAuth/refreshAccessToken.d.ts.map +1 -0
- package/dist/nextAuth/refreshAccessToken.js +24 -0
- package/dist/nextAuth/refreshAccessToken.js.map +1 -0
- package/dist/nextAuth/refreshAccessToken.tsx +28 -0
- package/dist/redux/features/settingsSlice.d.ts +20 -0
- package/dist/redux/features/settingsSlice.d.ts.map +1 -0
- package/dist/redux/features/settingsSlice.js +39 -0
- package/dist/redux/features/settingsSlice.js.map +1 -0
- package/dist/redux/features/settingsSlice.ts +60 -0
- package/dist/resources/globals.css +7 -1
- package/dist/resources/shadcn-base.css +8 -0
- package/dist/routes/pages/studio/StudioLandingPage.d.ts.map +1 -1
- package/dist/routes/pages/studio/StudioLandingPage.js +35 -7
- package/dist/routes/pages/studio/StudioLandingPage.js.map +1 -1
- package/dist/routes/pages/studio/StudioLandingPage.tsx +42 -6
- package/package.json +1 -1
- package/dist/components/core/list/SolidDataTablePagination.d.ts +0 -15
- package/dist/components/core/list/SolidDataTablePagination.d.ts.map +0 -1
- package/dist/components/core/list/SolidDataTablePagination.js +0 -22
- package/dist/components/core/list/SolidDataTablePagination.js.map +0 -1
- package/dist/components/core/list/SolidDataTablePagination.tsx +0 -71
- package/dist/components/solid-ui/SolidButton.d.ts +0 -14
- package/dist/components/solid-ui/SolidButton.d.ts.map +0 -1
- package/dist/components/solid-ui/SolidButton.js +0 -36
- package/dist/components/solid-ui/SolidButton.js.map +0 -1
- package/dist/components/solid-ui/SolidButton.tsx +0 -54
- package/dist/components/solid-ui/SolidTabs.d.ts +0 -18
- package/dist/components/solid-ui/SolidTabs.d.ts.map +0 -1
- package/dist/components/solid-ui/SolidTabs.js +0 -22
- package/dist/components/solid-ui/SolidTabs.js.map +0 -1
- package/dist/components/solid-ui/SolidTabs.tsx +0 -73
- package/dist/components/solid-ui/index.d.ts +0 -3
- package/dist/components/solid-ui/index.d.ts.map +0 -1
- package/dist/components/solid-ui/index.js +0 -3
- package/dist/components/solid-ui/index.js.map +0 -1
- package/dist/components/solid-ui/index.ts +0 -2
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createSlice } from "@reduxjs/toolkit";
|
|
2
|
+
const initialState = {
|
|
3
|
+
authSettings: {},
|
|
4
|
+
solidSettings: {},
|
|
5
|
+
};
|
|
6
|
+
export const settingsSlice = createSlice({
|
|
7
|
+
name: "settingsSlice",
|
|
8
|
+
initialState,
|
|
9
|
+
reducers: {
|
|
10
|
+
// // -------- AUTH SETTINGS --------
|
|
11
|
+
// setAuthSettings: (
|
|
12
|
+
// state,
|
|
13
|
+
// action: PayloadAction<Record<string, any>>
|
|
14
|
+
// ) => {
|
|
15
|
+
// state.authSettings = action.payload;
|
|
16
|
+
// },
|
|
17
|
+
// updateAuthSetting: (
|
|
18
|
+
// state,
|
|
19
|
+
// action: PayloadAction<{ key: string; value: any }>
|
|
20
|
+
// ) => {
|
|
21
|
+
// state.authSettings[action.payload.key] = action.payload.value;
|
|
22
|
+
// },
|
|
23
|
+
// -------- SOLID SETTINGS --------
|
|
24
|
+
setSolidSettings: (state, action) => {
|
|
25
|
+
state.solidSettings = action.payload;
|
|
26
|
+
},
|
|
27
|
+
updateSolidSetting: (state, action) => {
|
|
28
|
+
state.solidSettings[action.payload.key] = action.payload.value;
|
|
29
|
+
},
|
|
30
|
+
// -------- RESET --------
|
|
31
|
+
resetSettings: () => initialState,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
export default settingsSlice.reducer;
|
|
35
|
+
export const {
|
|
36
|
+
// setAuthSettings,
|
|
37
|
+
// updateAuthSetting,
|
|
38
|
+
setSolidSettings, updateSolidSetting, resetSettings, } = settingsSlice.actions;
|
|
39
|
+
//# sourceMappingURL=settingsSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsSlice.js","sourceRoot":"./","sources":["redux/features/settingsSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO9D,MAAM,YAAY,GAAmB;IACnC,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,EAAE;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACvC,IAAI,EAAE,eAAe;IACrB,YAAY;IACZ,QAAQ,EAAE;QACR,qCAAqC;QACrC,qBAAqB;QACrB,WAAW;QACX,+CAA+C;QAC/C,SAAS;QACT,yCAAyC;QACzC,KAAK;QAEL,uBAAuB;QACvB,WAAW;QACX,uDAAuD;QACvD,SAAS;QACT,mEAAmE;QACnE,KAAK;QAEL,mCAAmC;QACnC,gBAAgB,EAAE,CAChB,KAAK,EACL,MAA0C,EAC1C,EAAE;YACF,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC;QACvC,CAAC;QAED,kBAAkB,EAAE,CAClB,KAAK,EACL,MAAkD,EAClD,EAAE;YACF,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QACjE,CAAC;QAED,0BAA0B;QAC1B,aAAa,EAAE,GAAG,EAAE,CAAC,YAAY;KAClC;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC,OAAO,CAAC;AAErC,MAAM,CAAC,MAAM;AACX,mBAAmB;AACnB,qBAAqB;AACrB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,GACd,GAAG,aAAa,CAAC,OAAO,CAAC","sourcesContent":["import { PayloadAction, createSlice } from \"@reduxjs/toolkit\";\n\nexport interface ISettingsState {\n authSettings: Record<string, any>;\n solidSettings: Record<string, any>;\n}\n\nconst initialState: ISettingsState = {\n authSettings: {},\n solidSettings: {},\n};\n\nexport const settingsSlice = createSlice({\n name: \"settingsSlice\",\n initialState,\n reducers: {\n // // -------- AUTH SETTINGS --------\n // setAuthSettings: (\n // state,\n // action: PayloadAction<Record<string, any>>\n // ) => {\n // state.authSettings = action.payload;\n // },\n\n // updateAuthSetting: (\n // state,\n // action: PayloadAction<{ key: string; value: any }>\n // ) => {\n // state.authSettings[action.payload.key] = action.payload.value;\n // },\n\n // -------- SOLID SETTINGS --------\n setSolidSettings: (\n state,\n action: PayloadAction<Record<string, any>>\n ) => {\n state.solidSettings = action.payload;\n },\n\n updateSolidSetting: (\n state,\n action: PayloadAction<{ key: string; value: any }>\n ) => {\n state.solidSettings[action.payload.key] = action.payload.value;\n },\n\n // -------- RESET --------\n resetSettings: () => initialState,\n },\n});\n\nexport default settingsSlice.reducer;\n\nexport const {\n // setAuthSettings,\n // updateAuthSetting,\n setSolidSettings,\n updateSolidSetting,\n resetSettings,\n} = settingsSlice.actions;\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
|
|
2
|
+
|
|
3
|
+
export interface ISettingsState {
|
|
4
|
+
authSettings: Record<string, any>;
|
|
5
|
+
solidSettings: Record<string, any>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const initialState: ISettingsState = {
|
|
9
|
+
authSettings: {},
|
|
10
|
+
solidSettings: {},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const settingsSlice = createSlice({
|
|
14
|
+
name: "settingsSlice",
|
|
15
|
+
initialState,
|
|
16
|
+
reducers: {
|
|
17
|
+
// // -------- AUTH SETTINGS --------
|
|
18
|
+
// setAuthSettings: (
|
|
19
|
+
// state,
|
|
20
|
+
// action: PayloadAction<Record<string, any>>
|
|
21
|
+
// ) => {
|
|
22
|
+
// state.authSettings = action.payload;
|
|
23
|
+
// },
|
|
24
|
+
|
|
25
|
+
// updateAuthSetting: (
|
|
26
|
+
// state,
|
|
27
|
+
// action: PayloadAction<{ key: string; value: any }>
|
|
28
|
+
// ) => {
|
|
29
|
+
// state.authSettings[action.payload.key] = action.payload.value;
|
|
30
|
+
// },
|
|
31
|
+
|
|
32
|
+
// -------- SOLID SETTINGS --------
|
|
33
|
+
setSolidSettings: (
|
|
34
|
+
state,
|
|
35
|
+
action: PayloadAction<Record<string, any>>
|
|
36
|
+
) => {
|
|
37
|
+
state.solidSettings = action.payload;
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
updateSolidSetting: (
|
|
41
|
+
state,
|
|
42
|
+
action: PayloadAction<{ key: string; value: any }>
|
|
43
|
+
) => {
|
|
44
|
+
state.solidSettings[action.payload.key] = action.payload.value;
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
// -------- RESET --------
|
|
48
|
+
resetSettings: () => initialState,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export default settingsSlice.reducer;
|
|
53
|
+
|
|
54
|
+
export const {
|
|
55
|
+
// setAuthSettings,
|
|
56
|
+
// updateAuthSetting,
|
|
57
|
+
setSolidSettings,
|
|
58
|
+
updateSolidSetting,
|
|
59
|
+
resetSettings,
|
|
60
|
+
} = settingsSlice.actions;
|
|
@@ -2753,6 +2753,10 @@ li.header-li-px {
|
|
|
2753
2753
|
height: auto;
|
|
2754
2754
|
}
|
|
2755
2755
|
|
|
2756
|
+
.solid-custom-filter-wrapper {
|
|
2757
|
+
z-index: 85;
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2756
2760
|
.custom-filter-button {
|
|
2757
2761
|
border-right: 0;
|
|
2758
2762
|
border-top: 0;
|
|
@@ -2897,6 +2901,7 @@ li.header-li-px {
|
|
|
2897
2901
|
.solid-chip-manager-panel {
|
|
2898
2902
|
top: calc(100% + 6px);
|
|
2899
2903
|
left: 0;
|
|
2904
|
+
z-index: 90 !important;
|
|
2900
2905
|
width: min(360px, 100%);
|
|
2901
2906
|
background: var(--card);
|
|
2902
2907
|
border: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
|
|
@@ -3880,7 +3885,8 @@ li.header-li-px {
|
|
|
3880
3885
|
|
|
3881
3886
|
.solid-search-overlay-pannel {
|
|
3882
3887
|
top: calc(100% + 4px) !important;
|
|
3883
|
-
|
|
3888
|
+
/* Keep above datatable sticky headers/columns and other elevated surfaces. */
|
|
3889
|
+
z-index: 1004 !important;
|
|
3884
3890
|
background: var(--card);
|
|
3885
3891
|
border: 1px solid color-mix(in srgb, var(--border) 86%, transparent) !important;
|
|
3886
3892
|
border-radius: 10px;
|
|
@@ -1351,6 +1351,7 @@ body {
|
|
|
1351
1351
|
.solid-autocomplete {
|
|
1352
1352
|
position: relative;
|
|
1353
1353
|
width: 100%;
|
|
1354
|
+
min-width: 0;
|
|
1354
1355
|
}
|
|
1355
1356
|
|
|
1356
1357
|
.solid-autocomplete-control {
|
|
@@ -1358,6 +1359,7 @@ body {
|
|
|
1358
1359
|
display: flex;
|
|
1359
1360
|
align-items: center;
|
|
1360
1361
|
width: 100%;
|
|
1362
|
+
min-width: 0;
|
|
1361
1363
|
}
|
|
1362
1364
|
|
|
1363
1365
|
.solid-autocomplete-chip-control {
|
|
@@ -1385,6 +1387,8 @@ body {
|
|
|
1385
1387
|
min-height: 24px;
|
|
1386
1388
|
height: 24px;
|
|
1387
1389
|
flex: 1 1 110px;
|
|
1390
|
+
min-width: 0;
|
|
1391
|
+
max-width: 100%;
|
|
1388
1392
|
padding: 0 4px;
|
|
1389
1393
|
}
|
|
1390
1394
|
|
|
@@ -1458,6 +1462,8 @@ body {
|
|
|
1458
1462
|
align-items: center;
|
|
1459
1463
|
gap: 4px;
|
|
1460
1464
|
min-height: 22px;
|
|
1465
|
+
min-width: 0;
|
|
1466
|
+
max-width: 100%;
|
|
1461
1467
|
border-radius: 999px;
|
|
1462
1468
|
border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
|
|
1463
1469
|
background: color-mix(in srgb, var(--primary) 10%, transparent);
|
|
@@ -1467,6 +1473,8 @@ body {
|
|
|
1467
1473
|
}
|
|
1468
1474
|
|
|
1469
1475
|
.solid-autocomplete-chip-label {
|
|
1476
|
+
min-width: 0;
|
|
1477
|
+
max-width: 100%;
|
|
1470
1478
|
overflow: hidden;
|
|
1471
1479
|
text-overflow: ellipsis;
|
|
1472
1480
|
white-space: nowrap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StudioLandingPage.d.ts","sourceRoot":"","sources":["../../../../src/routes/pages/studio/StudioLandingPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StudioLandingPage.d.ts","sourceRoot":"","sources":["../../../../src/routes/pages/studio/StudioLandingPage.tsx"],"names":[],"mappings":"AA+PA,wBAAgB,iBAAiB,4CAoGhC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
+
import { useDispatch } from "react-redux";
|
|
3
4
|
import { useNavigate } from "react-router-dom";
|
|
4
5
|
import { useSolidLayoutRegistry } from "../../SolidLayoutRegistry";
|
|
5
6
|
import { ChatIcon } from "../../../components/layout/SolidAiStudioLayout";
|
|
6
7
|
import { env } from "../../../adapters/env";
|
|
8
|
+
import { showToast } from "../../../redux/features/toastSlice";
|
|
7
9
|
// ── Icons ──────────────────────────────────────────────────────────────────────
|
|
8
10
|
var ArrowIcon = function () { return (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M2.5 7h9M8 3.5l3.5 3.5L8 10.5", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })); };
|
|
9
11
|
var LayoutPlaceholderIcon = function () { return (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: [_jsx("rect", { x: "1", y: "1", width: "16", height: "16", rx: "2.5", stroke: "currentColor", strokeWidth: "1.3" }), _jsx("path", { d: "M1 6h16", stroke: "currentColor", strokeWidth: "1.1" }), _jsx("path", { d: "M6 6v11", stroke: "currentColor", strokeWidth: "1.1" })] })); };
|
|
@@ -55,12 +57,9 @@ function CardFooter(_a) {
|
|
|
55
57
|
return _jsx("div", { className: "solid-studio-card-footer ".concat(className), children: children });
|
|
56
58
|
}
|
|
57
59
|
// ── Empty state ───────────────────────────────────────────────────────────────
|
|
58
|
-
function EmptyState() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (aiUrl)
|
|
62
|
-
window.open(aiUrl, "_blank");
|
|
63
|
-
}, children: [_jsx(ChatIcon, {}), _jsx("span", { children: "Open AI Chat" })] })] }), _jsx("div", { className: "solid-studio-landing-empty-divider" }), _jsxs("div", { className: "solid-studio-landing-empty-details", children: [_jsxs("p", { className: "solid-studio-landing-empty-instruction", children: ["Any route with a ", _jsx("code", { children: "path" }), " and ", _jsx("code", { children: "children" }), " passed to", " ", _jsx("code", { children: "getSolidRoutes()" }), " will automatically appear as a card."] }), _jsx("div", { className: "solid-studio-landing-snippet", children: _jsx("pre", { children: _jsx("code", { children: "// AppRoutes.tsx\nconst extraRoutes = [\n {\n path: \"/my-layout\",\n element: <MyLayout />,\n children: [{ index: true, element: <MyPage /> }],\n },\n];\n\ngetSolidRoutes({ extraRoutes });" }) }) }), _jsxs("p", { className: "solid-studio-landing-hint", children: [_jsx("strong", { children: "Pro Tip:" }), " Add ", _jsxs("code", { children: ["handle: ", "{ title, description }"] }), " to a route to customize its appearance."] })] })] })] }) }));
|
|
60
|
+
function EmptyState(_a) {
|
|
61
|
+
var onOpenChat = _a.onOpenChat;
|
|
62
|
+
return (_jsx("div", { className: "solid-studio-landing-empty-container", children: _jsxs(Card, { className: "solid-studio-landing-empty-card", children: [_jsxs(CardHeader, { className: "solid-studio-landing-empty-header", children: [_jsx("div", { className: "solid-studio-home-badge", style: { marginBottom: '12px' }, children: "Frontend Studio" }), _jsx(CardTitle, { children: "Frontend layout will appear here" }), _jsx(CardDescription, { children: "Register your app layouts to explore and customize them in the Studio." })] }), _jsxs(CardContent, { className: "solid-studio-landing-empty-body", children: [_jsxs("div", { className: "solid-studio-landing-empty-primary-action", children: [_jsxs("p", { children: ["To get started, use the ", _jsx("strong", { children: "SolidX AI Agent" }), " to add a new custom layout."] }), _jsxs("button", { type: "button", className: "solid-studio-empty-cta-button", onClick: onOpenChat, children: [_jsx(ChatIcon, {}), _jsx("span", { children: "Open AI Chat" })] })] }), _jsx("div", { className: "solid-studio-landing-empty-divider" }), _jsxs("div", { className: "solid-studio-landing-empty-details", children: [_jsxs("p", { className: "solid-studio-landing-empty-instruction", children: ["Any route with a ", _jsx("code", { children: "path" }), " and ", _jsx("code", { children: "children" }), " passed to", " ", _jsx("code", { children: "getSolidRoutes()" }), " will automatically appear as a card."] }), _jsx("div", { className: "solid-studio-landing-snippet", children: _jsx("pre", { children: _jsx("code", { children: "// AppRoutes.tsx\nconst extraRoutes = [\n {\n path: \"/my-layout\",\n element: <MyLayout />,\n children: [{ index: true, element: <MyPage /> }],\n },\n];\n\ngetSolidRoutes({ extraRoutes });" }) }) }), _jsxs("p", { className: "solid-studio-landing-hint", children: [_jsx("strong", { children: "Pro Tip:" }), " Add ", _jsxs("code", { children: ["handle: ", "{ title, description }"] }), " to a route to customize its appearance."] })] })] })] }) }));
|
|
64
63
|
}
|
|
65
64
|
// ── Card ──────────────────────────────────────────────────────────────────────
|
|
66
65
|
function LayoutCard(_a) {
|
|
@@ -71,8 +70,37 @@ function LayoutCard(_a) {
|
|
|
71
70
|
}
|
|
72
71
|
// ── Page ──────────────────────────────────────────────────────────────────────
|
|
73
72
|
export function StudioLandingPage() {
|
|
73
|
+
var dispatch = useDispatch();
|
|
74
74
|
var layouts = useSolidLayoutRegistry();
|
|
75
75
|
var _a = useState(false), listView = _a[0], setListView = _a[1];
|
|
76
|
-
|
|
76
|
+
var handleOpenAiChat = function () {
|
|
77
|
+
var aiUrl = env("VITE_SOLIDX_AI_URL");
|
|
78
|
+
if (!aiUrl) {
|
|
79
|
+
dispatch(showToast({
|
|
80
|
+
severity: "error",
|
|
81
|
+
summary: "AI Chat unavailable",
|
|
82
|
+
detail: "VITE_SOLIDX_AI_URL is not configured.",
|
|
83
|
+
}));
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
var chatWindow = window.open(aiUrl, "_blank", "noopener,noreferrer");
|
|
88
|
+
if (!chatWindow) {
|
|
89
|
+
dispatch(showToast({
|
|
90
|
+
severity: "error",
|
|
91
|
+
summary: "AI Chat unavailable",
|
|
92
|
+
detail: "Unable to open chat window. Please allow pop-ups and try again.",
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch (_a) {
|
|
97
|
+
dispatch(showToast({
|
|
98
|
+
severity: "error",
|
|
99
|
+
summary: "AI Chat unavailable",
|
|
100
|
+
detail: "Failed to open chat. Please check the configured URL.",
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
return (_jsx("div", { className: "solid-studio-home ".concat(layouts.length > 0 ? "solid-studio-home--top" : ""), children: _jsxs("div", { className: "solid-studio-home-inner ".concat(layouts.length > 0 ? "solid-studio-home-inner--fluid" : ""), children: [_jsx("div", { className: "solid-studio-home-toolbar", children: layouts.length > 0 && (_jsxs("div", { className: "solid-studio-home-toolbar-right", children: [_jsx("button", { type: "button", className: "solid-studio-home-view-btn".concat(!listView ? " solid-studio-home-view-btn--active" : ""), onClick: function () { return setListView(false); }, "aria-label": "Grid view", title: "Grid view", children: _jsx(GridViewIcon, {}) }), _jsx("button", { type: "button", className: "solid-studio-home-view-btn".concat(listView ? " solid-studio-home-view-btn--active" : ""), onClick: function () { return setListView(true); }, "aria-label": "List view", title: "List view", children: _jsx(ListViewIcon, {}) })] })) }), layouts.length === 0 ? (_jsx(EmptyState, { onOpenChat: handleOpenAiChat })) : listView ? (_jsx("div", { className: "solid-studio-home-cards--list", children: layouts.map(function (entry, i) { return (_jsx(LayoutCard, { entry: entry, index: i, listView: true }, entry.path)); }) })) : (_jsx("div", { className: "solid-studio-home-cards solid-studio-home-cards--fluid", children: layouts.map(function (entry, i) { return (_jsx(LayoutCard, { entry: entry, index: i, listView: false }, entry.path)); }) }))] }) }));
|
|
77
105
|
}
|
|
78
106
|
//# sourceMappingURL=StudioLandingPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StudioLandingPage.js","sourceRoot":"","sources":["../../../../src/routes/pages/studio/StudioLandingPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,kFAAkF;AAElF,IAAM,SAAS,GAAG,cAAM,OAAA,CACtB,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YAC5E,eAAM,CAAC,EAAC,+BAA+B,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,KAAK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CAAC,EAAE,QAAQ,EAAE,KAAK,IAAnD,KAAK,CAAC,IAAI,CAA6C,CACzE,EAF0B,CAE1B,CAAC,GACE,CACP,IACG,GACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useSolidLayoutRegistry } from \"../../SolidLayoutRegistry\";\nimport type { SolidLayoutEntry } from \"../../SolidLayoutRegistry\";\nimport { ChatIcon } from \"../../../components/layout/SolidAiStudioLayout\";\nimport { env } from \"../../../adapters/env\";\n\n// ── Icons ──────────────────────────────────────────────────────────────────────\n\nconst ArrowIcon = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M2.5 7h9M8 3.5l3.5 3.5L8 10.5\" stroke=\"currentColor\" strokeWidth=\"1.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\nconst LayoutPlaceholderIcon = () => (\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"16\" height=\"16\" rx=\"2.5\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <path d=\"M1 6h16\" stroke=\"currentColor\" strokeWidth=\"1.1\" />\n <path d=\"M6 6v11\" stroke=\"currentColor\" strokeWidth=\"1.1\" />\n </svg>\n);\n\nconst NoLayoutIcon = () => (\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"2\" y=\"2\" width=\"28\" height=\"28\" rx=\"4\" stroke=\"currentColor\" strokeWidth=\"1.5\" opacity=\"0.4\" strokeDasharray=\"4 3\" />\n <path d=\"M11 16h10M16 11v10\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" opacity=\"0.5\" />\n </svg>\n);\n\nconst GridViewIcon = () => (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"8.5\" y=\"1\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"1\" y=\"8.5\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"8.5\" y=\"8.5\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n </svg>\n);\n\nconst ListViewIcon = () => (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"2.5\" width=\"13\" height=\"2.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"1\" y=\"6.25\" width=\"13\" height=\"2.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"1\" y=\"10\" width=\"13\" height=\"2.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n </svg>\n);\n\n// ── Per-card accent colours (cycles by index) ──────────────────────────────────\n\nconst CARD_ACCENTS = [\n { bg: \"hsl(224 70% 54%)\", cls: \"solid-studio-home-card-icon--backend\" },\n { bg: \"hsl(158 64% 42%)\", cls: \"solid-studio-home-card-icon--list\" },\n { bg: \"hsl(32 95% 48%)\", cls: \"solid-studio-home-card-icon--kanban\" },\n { bg: \"hsl(270 65% 58%)\", cls: \"solid-studio-home-card-icon--form\" },\n { bg: \"hsl(199 89% 48%)\", cls: \"solid-studio-home-card-icon--tree\" },\n { bg: \"hsl(215 25% 52%)\", cls: \"solid-studio-home-card-icon--settings\" },\n];\n\n// ── Generic layout wireframe thumbnail ────────────────────────────────────────\n\nfunction LayoutThumb({ accentColor, title }: { accentColor: string; title: string }) {\n const initials = title\n .split(/\\s+/)\n .slice(0, 2)\n .map((w) => w[0]?.toUpperCase() ?? \"\")\n .join(\"\");\n\n return (\n <svg\n className=\"solid-studio-home-card-thumb\"\n viewBox=\"0 0 280 122\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n {/* background */}\n <rect width=\"280\" height=\"122\" fill=\"var(--sidebar-background)\" />\n\n {/* sidebar */}\n <rect width=\"40\" height=\"122\" fill=\"var(--border)\" opacity=\"0.7\" />\n <rect x=\"7\" y=\"14\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.45\" />\n <rect x=\"7\" y=\"26\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"7\" y=\"38\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"7\" y=\"50\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n\n {/* top bar */}\n <rect x=\"40\" y=\"0\" width=\"240\" height=\"18\" fill=\"var(--border)\" opacity=\"0.5\" />\n\n {/* accent header band */}\n <rect x=\"48\" y=\"22\" width=\"224\" height=\"28\" rx=\"3\" fill={accentColor} opacity=\"0.12\" />\n <rect x=\"56\" y=\"30\" width=\"80\" height=\"7\" rx=\"2\" fill={accentColor} opacity=\"0.45\" />\n <rect x=\"56\" y=\"40\" width=\"50\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.3\" />\n\n {/* content blocks */}\n <rect x=\"48\" y=\"58\" width=\"70\" height=\"58\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n <rect x=\"126\" y=\"58\" width=\"70\" height=\"58\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n <rect x=\"204\" y=\"58\" width=\"68\" height=\"26\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n <rect x=\"204\" y=\"90\" width=\"68\" height=\"26\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n\n {/* inner muted lines */}\n <rect x=\"54\" y=\"65\" width=\"48\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"54\" y=\"73\" width=\"36\" height=\"3\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.2\" />\n <rect x=\"132\" y=\"65\" width=\"48\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"132\" y=\"73\" width=\"36\" height=\"3\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.2\" />\n\n {/* initials badge */}\n <circle cx=\"60\" cy=\"98\" r=\"9\" fill={accentColor} opacity=\"0.18\" />\n <text\n x=\"60\"\n y=\"102\"\n textAnchor=\"middle\"\n fontSize=\"7\"\n fontWeight=\"700\"\n fill={accentColor}\n opacity=\"0.8\"\n fontFamily=\"system-ui, sans-serif\"\n >\n {initials}\n </text>\n </svg>\n );\n}\n\n// ── Card Components (shadcn-inspired) ────────────────────────────────────────\n\nfunction Card({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return (\n <div className={`solid-studio-card ${className}`}>\n {children}\n </div>\n );\n}\n\nfunction CardHeader({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <div className={`solid-studio-card-header ${className}`}>{children}</div>;\n}\n\nfunction CardTitle({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <h3 className={`solid-studio-card-title ${className}`}>{children}</h3>;\n}\n\nfunction CardDescription({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <p className={`solid-studio-card-description ${className}`}>{children}</p>;\n}\n\nfunction CardContent({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <div className={`solid-studio-card-content ${className}`}>{children}</div>;\n}\n\nfunction CardFooter({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <div className={`solid-studio-card-footer ${className}`}>{children}</div>;\n}\n\n// ── Empty state ───────────────────────────────────────────────────────────────\n\nfunction EmptyState() {\n return (\n <div className=\"solid-studio-landing-empty-container\">\n <Card className=\"solid-studio-landing-empty-card\">\n <CardHeader className=\"solid-studio-landing-empty-header\">\n <div className=\"solid-studio-home-badge\" style={{ marginBottom: '12px' }}>Frontend Studio</div>\n <CardTitle>Frontend layout will appear here</CardTitle>\n <CardDescription>\n Register your app layouts to explore and customize them in the Studio.\n </CardDescription>\n </CardHeader>\n\n <CardContent className=\"solid-studio-landing-empty-body\">\n <div className=\"solid-studio-landing-empty-primary-action\">\n <p>To get started, use the <strong>SolidX AI Agent</strong> to add a new custom layout.</p>\n <button\n type=\"button\"\n className=\"solid-studio-empty-cta-button\"\n onClick={() => {\n const aiUrl = env(\"VITE_SOLIDX_AI_URL\");\n if (aiUrl) window.open(aiUrl, \"_blank\");\n }}\n >\n <ChatIcon />\n <span>Open AI Chat</span>\n {/* <ArrowIcon /> */}\n </button>\n </div>\n\n <div className=\"solid-studio-landing-empty-divider\" />\n\n <div className=\"solid-studio-landing-empty-details\">\n <p className=\"solid-studio-landing-empty-instruction\">\n Any route with a <code>path</code> and <code>children</code> passed to{\" \"}\n <code>getSolidRoutes()</code> will automatically appear as a card.\n </p>\n <div className=\"solid-studio-landing-snippet\">\n <pre>\n <code>{`// AppRoutes.tsx\\nconst extraRoutes = [\\n {\\n path: \"/my-layout\",\\n element: <MyLayout />,\\n children: [{ index: true, element: <MyPage /> }],\\n },\\n];\\n\\ngetSolidRoutes({ extraRoutes });`}</code>\n </pre>\n </div>\n <p className=\"solid-studio-landing-hint\">\n <strong>Pro Tip:</strong> Add <code>handle: {`{ title, description }`}</code> to a route to customize its appearance.\n </p>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n\n// ── Card ──────────────────────────────────────────────────────────────────────\n\nfunction LayoutCard({\n entry,\n index,\n listView,\n}: {\n entry: SolidLayoutEntry;\n index: number;\n listView: boolean;\n}) {\n const navigate = useNavigate();\n const accent = CARD_ACCENTS[index % CARD_ACCENTS.length];\n\n return (\n <button\n type=\"button\"\n className={`solid-studio-home-card${listView ? \" solid-studio-home-card--list\" : \"\"}`}\n onClick={() => navigate(entry.to)}\n aria-label={`Open ${entry.title}`}\n >\n {!listView && (\n <div className=\"solid-studio-home-card-image-wrap\">\n <LayoutThumb accentColor={accent.bg} title={entry.title} />\n <div className=\"solid-studio-home-card-image-overlay\" />\n </div>\n )}\n <div className=\"solid-studio-home-card-body\">\n <div className={`solid-studio-home-card-icon ${accent.cls}`}>\n <LayoutPlaceholderIcon />\n </div>\n <div className=\"solid-studio-home-card-content\">\n <span className=\"solid-studio-home-card-title\">{entry.title}</span>\n {entry.description && (\n <span className=\"solid-studio-home-card-desc\">{entry.description}</span>\n )}\n <span className=\"solid-studio-home-card-desc\" style={{ opacity: 0.6, fontSize: 12 }}>\n {entry.to}\n </span>\n </div>\n <div className=\"solid-studio-home-card-cta\">\n <span>Open</span>\n <ArrowIcon />\n </div>\n </div>\n </button>\n );\n}\n\n// ── Page ──────────────────────────────────────────────────────────────────────\n\nexport function StudioLandingPage() {\n const layouts = useSolidLayoutRegistry();\n const [listView, setListView] = useState(false);\n\n return (\n <div className={`solid-studio-home ${layouts.length > 0 ? \"solid-studio-home--top\" : \"\"}`}>\n <div className={`solid-studio-home-inner ${layouts.length > 0 ? \"solid-studio-home-inner--fluid\" : \"\"}`}>\n\n {/* Toolbar: title left, view toggle right */}\n <div className=\"solid-studio-home-toolbar\">\n {/* <div className=\"solid-studio-home-toolbar-left\">\n <div className=\"solid-studio-home-heading\">\n <div className=\"solid-studio-home-badge\">Frontend Studio</div>\n <h1>Frontend Layouts</h1>\n <p>\n {layouts.length > 0\n ? `${layouts.length} layout${layouts.length === 1 ? \"\" : \"s\"} registered in your app.`\n : \"Register your app layouts to explore them here.\"}\n </p>\n </div>\n </div> */}\n {layouts.length > 0 && (\n <div className=\"solid-studio-home-toolbar-right\">\n <button\n type=\"button\"\n className={`solid-studio-home-view-btn${!listView ? \" solid-studio-home-view-btn--active\" : \"\"}`}\n onClick={() => setListView(false)}\n aria-label=\"Grid view\"\n title=\"Grid view\"\n >\n <GridViewIcon />\n </button>\n <button\n type=\"button\"\n className={`solid-studio-home-view-btn${listView ? \" solid-studio-home-view-btn--active\" : \"\"}`}\n onClick={() => setListView(true)}\n aria-label=\"List view\"\n title=\"List view\"\n >\n <ListViewIcon />\n </button>\n </div>\n )}\n </div>\n\n {layouts.length === 0 ? (\n <EmptyState />\n ) : listView ? (\n <div className=\"solid-studio-home-cards--list\">\n {layouts.map((entry, i) => (\n <LayoutCard key={entry.path} entry={entry} index={i} listView />\n ))}\n </div>\n ) : (\n <div className=\"solid-studio-home-cards solid-studio-home-cards--fluid\">\n {layouts.map((entry, i) => (\n <LayoutCard key={entry.path} entry={entry} index={i} listView={false} />\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StudioLandingPage.js","sourceRoot":"","sources":["../../../../src/routes/pages/studio/StudioLandingPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAE/D,kFAAkF;AAElF,IAAM,SAAS,GAAG,cAAM,OAAA,CACtB,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YAC5E,eAAM,C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E,CAAE,EAC/F,OAAO,EAAE,cAAM,OAAA,WAAW,CAAC,IAAI,CAAC,EAAjB,CAAiB,gBACrB,WAAW,EACtB,KAAK,EAAC,WAAW,YAEjB,KAAC,YAAY,KAAG,GACT,IACL,CACP,GACG,EAEL,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACtB,KAAC,UAAU,IAAC,UAAU,EAAE,gBAAgB,GAAI,CAC7C,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CACb,cAAK,SAAS,EAAC,+BAA+B,YAC3C,OAAO,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,CAAC,IAAK,OAAA,CACzB,KAAC,UAAU,IAAkB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,UAA5C,KAAK,CAAC,IAAI,CAAqC,CACjE,EAF0B,CAE1B,CAAC,GACE,CACP,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,wDAAwD,YACpE,OAAO,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,CAAC,IAAK,OAAA,CACzB,KAAC,UAAU,IAAkB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,IAAnD,KAAK,CAAC,IAAI,CAA6C,CACzE,EAF0B,CAE1B,CAAC,GACE,CACP,IACG,GACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useSolidLayoutRegistry } from \"../../SolidLayoutRegistry\";\nimport type { SolidLayoutEntry } from \"../../SolidLayoutRegistry\";\nimport { ChatIcon } from \"../../../components/layout/SolidAiStudioLayout\";\nimport { env } from \"../../../adapters/env\";\nimport { showToast } from \"../../../redux/features/toastSlice\";\n\n// ── Icons ──────────────────────────────────────────────────────────────────────\n\nconst ArrowIcon = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M2.5 7h9M8 3.5l3.5 3.5L8 10.5\" stroke=\"currentColor\" strokeWidth=\"1.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\nconst LayoutPlaceholderIcon = () => (\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"16\" height=\"16\" rx=\"2.5\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <path d=\"M1 6h16\" stroke=\"currentColor\" strokeWidth=\"1.1\" />\n <path d=\"M6 6v11\" stroke=\"currentColor\" strokeWidth=\"1.1\" />\n </svg>\n);\n\nconst NoLayoutIcon = () => (\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"2\" y=\"2\" width=\"28\" height=\"28\" rx=\"4\" stroke=\"currentColor\" strokeWidth=\"1.5\" opacity=\"0.4\" strokeDasharray=\"4 3\" />\n <path d=\"M11 16h10M16 11v10\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" opacity=\"0.5\" />\n </svg>\n);\n\nconst GridViewIcon = () => (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"8.5\" y=\"1\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"1\" y=\"8.5\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"8.5\" y=\"8.5\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n </svg>\n);\n\nconst ListViewIcon = () => (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"2.5\" width=\"13\" height=\"2.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"1\" y=\"6.25\" width=\"13\" height=\"2.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"1\" y=\"10\" width=\"13\" height=\"2.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n </svg>\n);\n\n// ── Per-card accent colours (cycles by index) ──────────────────────────────────\n\nconst CARD_ACCENTS = [\n { bg: \"hsl(224 70% 54%)\", cls: \"solid-studio-home-card-icon--backend\" },\n { bg: \"hsl(158 64% 42%)\", cls: \"solid-studio-home-card-icon--list\" },\n { bg: \"hsl(32 95% 48%)\", cls: \"solid-studio-home-card-icon--kanban\" },\n { bg: \"hsl(270 65% 58%)\", cls: \"solid-studio-home-card-icon--form\" },\n { bg: \"hsl(199 89% 48%)\", cls: \"solid-studio-home-card-icon--tree\" },\n { bg: \"hsl(215 25% 52%)\", cls: \"solid-studio-home-card-icon--settings\" },\n];\n\n// ── Generic layout wireframe thumbnail ────────────────────────────────────────\n\nfunction LayoutThumb({ accentColor, title }: { accentColor: string; title: string }) {\n const initials = title\n .split(/\\s+/)\n .slice(0, 2)\n .map((w) => w[0]?.toUpperCase() ?? \"\")\n .join(\"\");\n\n return (\n <svg\n className=\"solid-studio-home-card-thumb\"\n viewBox=\"0 0 280 122\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n {/* background */}\n <rect width=\"280\" height=\"122\" fill=\"var(--sidebar-background)\" />\n\n {/* sidebar */}\n <rect width=\"40\" height=\"122\" fill=\"var(--border)\" opacity=\"0.7\" />\n <rect x=\"7\" y=\"14\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.45\" />\n <rect x=\"7\" y=\"26\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"7\" y=\"38\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"7\" y=\"50\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n\n {/* top bar */}\n <rect x=\"40\" y=\"0\" width=\"240\" height=\"18\" fill=\"var(--border)\" opacity=\"0.5\" />\n\n {/* accent header band */}\n <rect x=\"48\" y=\"22\" width=\"224\" height=\"28\" rx=\"3\" fill={accentColor} opacity=\"0.12\" />\n <rect x=\"56\" y=\"30\" width=\"80\" height=\"7\" rx=\"2\" fill={accentColor} opacity=\"0.45\" />\n <rect x=\"56\" y=\"40\" width=\"50\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.3\" />\n\n {/* content blocks */}\n <rect x=\"48\" y=\"58\" width=\"70\" height=\"58\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n <rect x=\"126\" y=\"58\" width=\"70\" height=\"58\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n <rect x=\"204\" y=\"58\" width=\"68\" height=\"26\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n <rect x=\"204\" y=\"90\" width=\"68\" height=\"26\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n\n {/* inner muted lines */}\n <rect x=\"54\" y=\"65\" width=\"48\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"54\" y=\"73\" width=\"36\" height=\"3\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.2\" />\n <rect x=\"132\" y=\"65\" width=\"48\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"132\" y=\"73\" width=\"36\" height=\"3\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.2\" />\n\n {/* initials badge */}\n <circle cx=\"60\" cy=\"98\" r=\"9\" fill={accentColor} opacity=\"0.18\" />\n <text\n x=\"60\"\n y=\"102\"\n textAnchor=\"middle\"\n fontSize=\"7\"\n fontWeight=\"700\"\n fill={accentColor}\n opacity=\"0.8\"\n fontFamily=\"system-ui, sans-serif\"\n >\n {initials}\n </text>\n </svg>\n );\n}\n\n// ── Card Components (shadcn-inspired) ────────────────────────────────────────\n\nfunction Card({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return (\n <div className={`solid-studio-card ${className}`}>\n {children}\n </div>\n );\n}\n\nfunction CardHeader({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <div className={`solid-studio-card-header ${className}`}>{children}</div>;\n}\n\nfunction CardTitle({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <h3 className={`solid-studio-card-title ${className}`}>{children}</h3>;\n}\n\nfunction CardDescription({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <p className={`solid-studio-card-description ${className}`}>{children}</p>;\n}\n\nfunction CardContent({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <div className={`solid-studio-card-content ${className}`}>{children}</div>;\n}\n\nfunction CardFooter({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <div className={`solid-studio-card-footer ${className}`}>{children}</div>;\n}\n\n// ── Empty state ───────────────────────────────────────────────────────────────\n\nfunction EmptyState({ onOpenChat }: { onOpenChat: () => void }) {\n return (\n <div className=\"solid-studio-landing-empty-container\">\n <Card className=\"solid-studio-landing-empty-card\">\n <CardHeader className=\"solid-studio-landing-empty-header\">\n <div className=\"solid-studio-home-badge\" style={{ marginBottom: '12px' }}>Frontend Studio</div>\n <CardTitle>Frontend layout will appear here</CardTitle>\n <CardDescription>\n Register your app layouts to explore and customize them in the Studio.\n </CardDescription>\n </CardHeader>\n\n <CardContent className=\"solid-studio-landing-empty-body\">\n <div className=\"solid-studio-landing-empty-primary-action\">\n <p>To get started, use the <strong>SolidX AI Agent</strong> to add a new custom layout.</p>\n <button\n type=\"button\"\n className=\"solid-studio-empty-cta-button\"\n onClick={onOpenChat}\n >\n <ChatIcon />\n <span>Open AI Chat</span>\n {/* <ArrowIcon /> */}\n </button>\n </div>\n\n <div className=\"solid-studio-landing-empty-divider\" />\n\n <div className=\"solid-studio-landing-empty-details\">\n <p className=\"solid-studio-landing-empty-instruction\">\n Any route with a <code>path</code> and <code>children</code> passed to{\" \"}\n <code>getSolidRoutes()</code> will automatically appear as a card.\n </p>\n <div className=\"solid-studio-landing-snippet\">\n <pre>\n <code>{`// AppRoutes.tsx\\nconst extraRoutes = [\\n {\\n path: \"/my-layout\",\\n element: <MyLayout />,\\n children: [{ index: true, element: <MyPage /> }],\\n },\\n];\\n\\ngetSolidRoutes({ extraRoutes });`}</code>\n </pre>\n </div>\n <p className=\"solid-studio-landing-hint\">\n <strong>Pro Tip:</strong> Add <code>handle: {`{ title, description }`}</code> to a route to customize its appearance.\n </p>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n\n// ── Card ──────────────────────────────────────────────────────────────────────\n\nfunction LayoutCard({\n entry,\n index,\n listView,\n}: {\n entry: SolidLayoutEntry;\n index: number;\n listView: boolean;\n}) {\n const navigate = useNavigate();\n const accent = CARD_ACCENTS[index % CARD_ACCENTS.length];\n\n return (\n <button\n type=\"button\"\n className={`solid-studio-home-card${listView ? \" solid-studio-home-card--list\" : \"\"}`}\n onClick={() => navigate(entry.to)}\n aria-label={`Open ${entry.title}`}\n >\n {!listView && (\n <div className=\"solid-studio-home-card-image-wrap\">\n <LayoutThumb accentColor={accent.bg} title={entry.title} />\n <div className=\"solid-studio-home-card-image-overlay\" />\n </div>\n )}\n <div className=\"solid-studio-home-card-body\">\n <div className={`solid-studio-home-card-icon ${accent.cls}`}>\n <LayoutPlaceholderIcon />\n </div>\n <div className=\"solid-studio-home-card-content\">\n <span className=\"solid-studio-home-card-title\">{entry.title}</span>\n {entry.description && (\n <span className=\"solid-studio-home-card-desc\">{entry.description}</span>\n )}\n <span className=\"solid-studio-home-card-desc\" style={{ opacity: 0.6, fontSize: 12 }}>\n {entry.to}\n </span>\n </div>\n <div className=\"solid-studio-home-card-cta\">\n <span>Open</span>\n <ArrowIcon />\n </div>\n </div>\n </button>\n );\n}\n\n// ── Page ──────────────────────────────────────────────────────────────────────\n\nexport function StudioLandingPage() {\n const dispatch = useDispatch();\n const layouts = useSolidLayoutRegistry();\n const [listView, setListView] = useState(false);\n \n const handleOpenAiChat = () => {\n const aiUrl = env(\"VITE_SOLIDX_AI_URL\");\n\n if (!aiUrl) {\n dispatch(\n showToast({\n severity: \"error\",\n summary: \"AI Chat unavailable\",\n detail: \"VITE_SOLIDX_AI_URL is not configured.\",\n }),\n );\n return;\n }\n\n try {\n const chatWindow = window.open(aiUrl, \"_blank\", \"noopener,noreferrer\");\n if (!chatWindow) {\n dispatch(\n showToast({\n severity: \"error\",\n summary: \"AI Chat unavailable\",\n detail: \"Unable to open chat window. Please allow pop-ups and try again.\",\n }),\n );\n }\n } catch {\n dispatch(\n showToast({\n severity: \"error\",\n summary: \"AI Chat unavailable\",\n detail: \"Failed to open chat. Please check the configured URL.\",\n }),\n );\n }\n };\n\n return (\n <div className={`solid-studio-home ${layouts.length > 0 ? \"solid-studio-home--top\" : \"\"}`}>\n <div className={`solid-studio-home-inner ${layouts.length > 0 ? \"solid-studio-home-inner--fluid\" : \"\"}`}>\n\n {/* Toolbar: title left, view toggle right */}\n <div className=\"solid-studio-home-toolbar\">\n {/* <div className=\"solid-studio-home-toolbar-left\">\n <div className=\"solid-studio-home-heading\">\n <div className=\"solid-studio-home-badge\">Frontend Studio</div>\n <h1>Frontend Layouts</h1>\n <p>\n {layouts.length > 0\n ? `${layouts.length} layout${layouts.length === 1 ? \"\" : \"s\"} registered in your app.`\n : \"Register your app layouts to explore them here.\"}\n </p>\n </div>\n </div> */}\n {layouts.length > 0 && (\n <div className=\"solid-studio-home-toolbar-right\">\n <button\n type=\"button\"\n className={`solid-studio-home-view-btn${!listView ? \" solid-studio-home-view-btn--active\" : \"\"}`}\n onClick={() => setListView(false)}\n aria-label=\"Grid view\"\n title=\"Grid view\"\n >\n <GridViewIcon />\n </button>\n <button\n type=\"button\"\n className={`solid-studio-home-view-btn${listView ? \" solid-studio-home-view-btn--active\" : \"\"}`}\n onClick={() => setListView(true)}\n aria-label=\"List view\"\n title=\"List view\"\n >\n <ListViewIcon />\n </button>\n </div>\n )}\n </div>\n\n {layouts.length === 0 ? (\n <EmptyState onOpenChat={handleOpenAiChat} />\n ) : listView ? (\n <div className=\"solid-studio-home-cards--list\">\n {layouts.map((entry, i) => (\n <LayoutCard key={entry.path} entry={entry} index={i} listView />\n ))}\n </div>\n ) : (\n <div className=\"solid-studio-home-cards solid-studio-home-cards--fluid\">\n {layouts.map((entry, i) => (\n <LayoutCard key={entry.path} entry={entry} index={i} listView={false} />\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
+
import { useDispatch } from "react-redux";
|
|
2
3
|
import { useNavigate } from "react-router-dom";
|
|
3
4
|
import { useSolidLayoutRegistry } from "../../SolidLayoutRegistry";
|
|
4
5
|
import type { SolidLayoutEntry } from "../../SolidLayoutRegistry";
|
|
5
6
|
import { ChatIcon } from "../../../components/layout/SolidAiStudioLayout";
|
|
6
7
|
import { env } from "../../../adapters/env";
|
|
8
|
+
import { showToast } from "../../../redux/features/toastSlice";
|
|
7
9
|
|
|
8
10
|
// ── Icons ──────────────────────────────────────────────────────────────────────
|
|
9
11
|
|
|
@@ -152,7 +154,7 @@ function CardFooter({ children, className = "" }: { children: React.ReactNode; c
|
|
|
152
154
|
|
|
153
155
|
// ── Empty state ───────────────────────────────────────────────────────────────
|
|
154
156
|
|
|
155
|
-
function EmptyState() {
|
|
157
|
+
function EmptyState({ onOpenChat }: { onOpenChat: () => void }) {
|
|
156
158
|
return (
|
|
157
159
|
<div className="solid-studio-landing-empty-container">
|
|
158
160
|
<Card className="solid-studio-landing-empty-card">
|
|
@@ -170,10 +172,7 @@ function EmptyState() {
|
|
|
170
172
|
<button
|
|
171
173
|
type="button"
|
|
172
174
|
className="solid-studio-empty-cta-button"
|
|
173
|
-
onClick={
|
|
174
|
-
const aiUrl = env("VITE_SOLIDX_AI_URL");
|
|
175
|
-
if (aiUrl) window.open(aiUrl, "_blank");
|
|
176
|
-
}}
|
|
175
|
+
onClick={onOpenChat}
|
|
177
176
|
>
|
|
178
177
|
<ChatIcon />
|
|
179
178
|
<span>Open AI Chat</span>
|
|
@@ -255,8 +254,45 @@ function LayoutCard({
|
|
|
255
254
|
// ── Page ──────────────────────────────────────────────────────────────────────
|
|
256
255
|
|
|
257
256
|
export function StudioLandingPage() {
|
|
257
|
+
const dispatch = useDispatch();
|
|
258
258
|
const layouts = useSolidLayoutRegistry();
|
|
259
259
|
const [listView, setListView] = useState(false);
|
|
260
|
+
|
|
261
|
+
const handleOpenAiChat = () => {
|
|
262
|
+
const aiUrl = env("VITE_SOLIDX_AI_URL");
|
|
263
|
+
|
|
264
|
+
if (!aiUrl) {
|
|
265
|
+
dispatch(
|
|
266
|
+
showToast({
|
|
267
|
+
severity: "error",
|
|
268
|
+
summary: "AI Chat unavailable",
|
|
269
|
+
detail: "VITE_SOLIDX_AI_URL is not configured.",
|
|
270
|
+
}),
|
|
271
|
+
);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
try {
|
|
276
|
+
const chatWindow = window.open(aiUrl, "_blank", "noopener,noreferrer");
|
|
277
|
+
if (!chatWindow) {
|
|
278
|
+
dispatch(
|
|
279
|
+
showToast({
|
|
280
|
+
severity: "error",
|
|
281
|
+
summary: "AI Chat unavailable",
|
|
282
|
+
detail: "Unable to open chat window. Please allow pop-ups and try again.",
|
|
283
|
+
}),
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
} catch {
|
|
287
|
+
dispatch(
|
|
288
|
+
showToast({
|
|
289
|
+
severity: "error",
|
|
290
|
+
summary: "AI Chat unavailable",
|
|
291
|
+
detail: "Failed to open chat. Please check the configured URL.",
|
|
292
|
+
}),
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
260
296
|
|
|
261
297
|
return (
|
|
262
298
|
<div className={`solid-studio-home ${layouts.length > 0 ? "solid-studio-home--top" : ""}`}>
|
|
@@ -300,7 +336,7 @@ export function StudioLandingPage() {
|
|
|
300
336
|
</div>
|
|
301
337
|
|
|
302
338
|
{layouts.length === 0 ? (
|
|
303
|
-
<EmptyState />
|
|
339
|
+
<EmptyState onOpenChat={handleOpenAiChat} />
|
|
304
340
|
) : listView ? (
|
|
305
341
|
<div className="solid-studio-home-cards--list">
|
|
306
342
|
{layouts.map((entry, i) => (
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type SolidDataTablePaginationProps = {
|
|
2
|
-
rows: number;
|
|
3
|
-
first: number;
|
|
4
|
-
totalRecords: number;
|
|
5
|
-
rowsPerPageOptions?: number[];
|
|
6
|
-
onPage: (event: {
|
|
7
|
-
first: number;
|
|
8
|
-
rows: number;
|
|
9
|
-
}) => void;
|
|
10
|
-
currentPageReportTemplate?: string;
|
|
11
|
-
className?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare function SolidDataTablePagination({ rows, first, totalRecords, rowsPerPageOptions, onPage, currentPageReportTemplate, className, }: SolidDataTablePaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=SolidDataTablePagination.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolidDataTablePagination.d.ts","sourceRoot":"","sources":["../../../../src/components/core/list/SolidDataTablePagination.tsx"],"names":[],"mappings":"AAEA,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACzD,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,kBAAsC,EACtC,MAAM,EACN,yBAAgE,EAChE,SAAS,GACV,EAAE,6BAA6B,2CA+C/B"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
var cx = function () {
|
|
3
|
-
var parts = [];
|
|
4
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5
|
-
parts[_i] = arguments[_i];
|
|
6
|
-
}
|
|
7
|
-
return parts.filter(Boolean).join(" ");
|
|
8
|
-
};
|
|
9
|
-
export function SolidDataTablePagination(_a) {
|
|
10
|
-
var rows = _a.rows, first = _a.first, totalRecords = _a.totalRecords, _b = _a.rowsPerPageOptions, rowsPerPageOptions = _b === void 0 ? [10, 25, 50, 100] : _b, onPage = _a.onPage, _c = _a.currentPageReportTemplate, currentPageReportTemplate = _c === void 0 ? "{first} - {last} of {totalRecords}" : _c, className = _a.className;
|
|
11
|
-
var safeRows = rows > 0 ? rows : 25;
|
|
12
|
-
var start = totalRecords === 0 ? 0 : first + 1;
|
|
13
|
-
var end = Math.min(first + safeRows, totalRecords);
|
|
14
|
-
var currentPage = Math.floor(first / safeRows) + 1;
|
|
15
|
-
var totalPages = Math.max(1, Math.ceil(totalRecords / safeRows));
|
|
16
|
-
var report = currentPageReportTemplate
|
|
17
|
-
.replace("{first}", String(start))
|
|
18
|
-
.replace("{last}", String(end))
|
|
19
|
-
.replace("{totalRecords}", String(totalRecords));
|
|
20
|
-
return (_jsxs("div", { className: cx("w-full solid-table-paginator flex items-center justify-end gap-3 text-sm rounded-md border border-border/60 px-3 py-1.5 bg-background", className), children: [_jsxs("div", { className: "solid-paginator-meta flex items-center gap-2 ml-auto", children: [_jsx("span", { className: "solid-paginator-label", children: "Rows" }), _jsx("select", { value: safeRows, onChange: function (e) { return onPage({ first: 0, rows: Number(e.target.value) }); }, className: "solid-paginator-select", children: rowsPerPageOptions.map(function (option) { return (_jsx("option", { value: option, children: option }, option)); }) }), _jsx("span", { className: "solid-paginator-report", children: report })] }), _jsxs("div", { className: "solid-paginator-actions flex items-center gap-2", children: [_jsx("button", { type: "button", className: "solid-paginator-btn", onClick: function () { return onPage({ first: Math.max(0, first - safeRows), rows: safeRows }); }, disabled: currentPage <= 1, children: "Previous" }), _jsx("button", { type: "button", className: "solid-paginator-btn", onClick: function () { return onPage({ first: Math.min((totalPages - 1) * safeRows, first + safeRows), rows: safeRows }); }, disabled: currentPage >= totalPages, children: "Next" })] })] }));
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=SolidDataTablePagination.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolidDataTablePagination.js","sourceRoot":"","sources":["../../../../src/components/core/list/SolidDataTablePagination.tsx"],"names":[],"mappings":";AAYA,IAAM,EAAE,GAAG;IAAC,eAA2C;SAA3C,UAA2C,EAA3C,qBAA2C,EAA3C,IAA2C;QAA3C,0BAA2C;;IAAK,OAAA,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAA/B,CAA+B,CAAC;AAE5F,MAAM,UAAU,wBAAwB,CAAC,EAQT;QAP9B,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,YAAY,kBAAA,EACZ,0BAAsC,EAAtC,kBAAkB,mBAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,KAAA,EACtC,MAAM,YAAA,EACN,iCAAgE,EAA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,KAAK,EAAE,MAAM,YAAG,MAAM,IAA9B,MAAM,CAAkC,CACtD,EAFmC,CAEnC,CAAC,GACK,EACT,eAAM,SAAS,EAAC,wBAAwB,YAAE,MAAM,GAAQ,IACpD,EACN,eAAK,SAAS,EAAC,iDAAiD,aAC9D,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,cAAM,OAAA,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAhE,CAAgE,EAC/E,QAAQ,EAAE,WAAW,IAAI,CAAC,yBAGnB,EACT,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,cAAM,OAAA,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAA1F,CAA0F,EACzG,QAAQ,EAAE,WAAW,IAAI,UAAU,qBAG5B,IACL,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React from \"react\";\n\ntype SolidDataTablePaginationProps = {\n rows: number;\n first: number;\n totalRecords: number;\n rowsPerPageOptions?: number[];\n onPage: (event: { first: number; rows: number }) => void;\n currentPageReportTemplate?: string;\n className?: string;\n};\n\nconst cx = (...parts: Array<string | undefined | false>) => parts.filter(Boolean).join(\" \");\n\nexport function SolidDataTablePagination({\n rows,\n first,\n totalRecords,\n rowsPerPageOptions = [10, 25, 50, 100],\n onPage,\n currentPageReportTemplate = \"{first} - {last} of {totalRecords}\",\n className,\n}: SolidDataTablePaginationProps) {\n const safeRows = rows > 0 ? rows : 25;\n const start = totalRecords === 0 ? 0 : first + 1;\n const end = Math.min(first + safeRows, totalRecords);\n const currentPage = Math.floor(first / safeRows) + 1;\n const totalPages = Math.max(1, Math.ceil(totalRecords / safeRows));\n\n const report = currentPageReportTemplate\n .replace(\"{first}\", String(start))\n .replace(\"{last}\", String(end))\n .replace(\"{totalRecords}\", String(totalRecords));\n\n return (\n <div className={cx(\"w-full solid-table-paginator flex items-center justify-end gap-3 text-sm rounded-md border border-border/60 px-3 py-1.5 bg-background\", className)}>\n <div className=\"solid-paginator-meta flex items-center gap-2 ml-auto\">\n <span className=\"solid-paginator-label\">Rows</span>\n <select\n value={safeRows}\n onChange={(e) => onPage({ first: 0, rows: Number(e.target.value) })}\n className=\"solid-paginator-select\"\n >\n {rowsPerPageOptions.map((option) => (\n <option key={option} value={option}>{option}</option>\n ))}\n </select>\n <span className=\"solid-paginator-report\">{report}</span>\n </div>\n <div className=\"solid-paginator-actions flex items-center gap-2\">\n <button\n type=\"button\"\n className=\"solid-paginator-btn\"\n onClick={() => onPage({ first: Math.max(0, first - safeRows), rows: safeRows })}\n disabled={currentPage <= 1}\n >\n Previous\n </button>\n <button\n type=\"button\"\n className=\"solid-paginator-btn\"\n onClick={() => onPage({ first: Math.min((totalPages - 1) * safeRows, first + safeRows), rows: safeRows })}\n disabled={currentPage >= totalPages}\n >\n Next\n </button>\n </div>\n </div>\n );\n}\n\n"]}
|