@loopstack/loopstack-studio 0.25.2 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/environments.js +4 -0
- package/dist/api/index.js +13 -9
- package/dist/app/EnvironmentEmbedRoot.js +29 -19
- package/dist/components/data-table/DataList.js +93 -91
- package/dist/components/data-table/DataTable.js +128 -126
- package/dist/components/feedback/Snackbar.js +1 -1
- package/dist/components/layout/StudioSidebar.js +124 -131
- package/dist/components/ui/sidebar.js +2 -2
- package/dist/components/ui/slider.js +37 -26
- package/dist/components/ui-widgets/widgets/SandboxRun.js +16 -14
- package/dist/features/code-explorer/components/CodeExplorerTree.js +1 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +1 -1
- package/dist/features/dashboard/RunItem.js +39 -37
- package/dist/features/debug/lib/flow-utils.js +1 -1
- package/dist/features/documents/DocumentRenderer.js +59 -58
- package/dist/features/documents/renderers/useDocumentTransition.js +29 -24
- package/dist/features/feature-registry/FeatureRegistryProvider.js +17 -0
- package/dist/features/feature-registry/index.js +1 -0
- package/dist/features/file-explorer/api/files.js +7 -0
- package/dist/features/file-explorer/components/FileExplorerPanel.js +95 -0
- package/dist/features/{workbench/components/RemoteFileTabsBar.js → file-explorer/components/FileTabsBar.js} +4 -4
- package/dist/features/{workbench/components/RemoteFileTree.js → file-explorer/components/FileTree.js} +6 -6
- package/dist/features/file-explorer/file-explorer-feature.js +12 -0
- package/dist/features/file-explorer/hooks/useFileExplorer.js +44 -0
- package/dist/features/file-explorer/index.js +2 -0
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +112 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +162 -132
- package/dist/features/runs/Runs.js +1 -1
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +178 -0
- package/dist/features/secrets/index.js +1 -0
- package/dist/features/{documents → secrets}/renderers/SecretInputRenderer.js +17 -17
- package/dist/features/secrets/secrets-feature.js +14 -0
- package/dist/features/workbench/Workbench.js +32 -82
- package/dist/features/workbench/WorkflowList.js +109 -46
- package/dist/features/workbench/components/SidebarPanel.js +155 -0
- package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +82 -0
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +128 -60
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +127 -114
- package/dist/features/workbench/components/WorkbenchRunsPanel.js +32 -0
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +80 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +3 -3
- package/dist/features/workbench/index.js +3 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +60 -62
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/features/workspaces/components/EnvironmentSlotSelector.js +68 -51
- package/dist/features/workspaces/components/WorkflowRunForm.js +1 -1
- package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
- package/dist/hooks/useEnvironmentPreviewUrl.js +13 -0
- package/dist/hooks/useEnvironments.js +8 -0
- package/dist/hooks/useWorkflows.js +28 -26
- package/dist/hooks/useWorkspaces.js +28 -26
- package/dist/index.d.ts +98 -7
- package/dist/index.js +8 -1
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/@shikijs/core/dist/index.js +105 -643
- package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +135 -122
- package/dist/node_modules/@shikijs/langs/dist/bird2.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/cobol.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/css.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/dart.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/go.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/kusto.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/php.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/ruby.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/typespec.js +1 -1
- package/dist/node_modules/@shikijs/primitive/dist/index.js +538 -0
- package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +1 -1
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
- package/dist/node_modules/shiki/dist/bundle-full.js +6 -5
- package/dist/node_modules/shiki/dist/chunk-CtajNgzt.js +15 -0
- package/dist/node_modules/shiki/dist/engine-oniguruma.js +5 -0
- package/dist/node_modules/shiki/dist/{langs.js → langs-bundle-full-DfKZStlK.js} +1 -1
- package/dist/node_modules/shiki/dist/themes.js +1 -1
- package/dist/pages/DashboardPage.js +54 -79
- package/dist/pages/DebugWorkflowDetailsPage.js +41 -55
- package/dist/pages/DebugWorkflowsPage.js +151 -112
- package/dist/pages/EmbedWorkbenchPage.js +2 -1
- package/dist/pages/PreviewWorkbenchPage.js +77 -59
- package/dist/pages/RunsListPage.js +27 -41
- package/dist/pages/RunsPage.js +21 -36
- package/dist/pages/WorkbenchPage.js +48 -70
- package/dist/pages/WorkflowDebugPage.js +65 -79
- package/dist/pages/WorkspacePage.js +59 -86
- package/dist/pages/WorkspaceRunsPage.js +59 -54
- package/dist/pages/WorkspacesPage.js +11 -27
- package/dist/providers/StudioPreferencesProvider.js +54 -0
- package/package.json +29 -29
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +0 -67
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +0 -57
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +0 -47
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +0 -182
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +0 -160
- /package/dist/{node_modules → frontend/studio/node_modules}/@dagrejs/dagre/dist/dagre.esm.js +0 -0
package/dist/api/index.js
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
|
+
import { createFilesApi } from "../features/file-explorer/api/files.js";
|
|
1
2
|
import { createAuthApi } from "./auth.js";
|
|
2
3
|
import { createConfigApi } from "./config.js";
|
|
3
4
|
import { createDashboardApi } from "./dashboard.js";
|
|
4
5
|
import { createDocumentsApi } from "./documents.js";
|
|
6
|
+
import { createEnvironmentsApi } from "./environments.js";
|
|
5
7
|
import { createProcessorApi } from "./processor.js";
|
|
6
8
|
import { createSecretsApi } from "./secrets.js";
|
|
7
9
|
import { createWorkflowsApi } from "./workflows.js";
|
|
8
10
|
import { createWorkspacesApi } from "./workspaces.js";
|
|
9
11
|
import { createAxiosClient } from "./client.js";
|
|
10
|
-
function createApi(
|
|
12
|
+
function createApi(d) {
|
|
11
13
|
return {
|
|
12
|
-
auth: createAuthApi(
|
|
13
|
-
config: createConfigApi(
|
|
14
|
-
dashboard: createDashboardApi(
|
|
15
|
-
documents: createDocumentsApi(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
auth: createAuthApi(d),
|
|
15
|
+
config: createConfigApi(d),
|
|
16
|
+
dashboard: createDashboardApi(d),
|
|
17
|
+
documents: createDocumentsApi(d),
|
|
18
|
+
environments: createEnvironmentsApi(d),
|
|
19
|
+
files: createFilesApi(d),
|
|
20
|
+
processor: createProcessorApi(d),
|
|
21
|
+
secrets: createSecretsApi(d),
|
|
22
|
+
workflows: createWorkflowsApi(d),
|
|
23
|
+
workspaces: createWorkspacesApi(d)
|
|
20
24
|
};
|
|
21
25
|
}
|
|
22
26
|
export { createApi };
|
|
@@ -2,34 +2,44 @@ import { StudioProvider } from "../providers/StudioProvider.js";
|
|
|
2
2
|
import { SseProvider } from "../providers/SseProvider.js";
|
|
3
3
|
import { InvalidationEventsProvider } from "../providers/InvalidationEventsProvider.js";
|
|
4
4
|
import { useRouter } from "../routing/LocalRouter.js";
|
|
5
|
+
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
6
|
+
import "../features/feature-registry/index.js";
|
|
7
|
+
import { fileExplorerFeature } from "../features/file-explorer/file-explorer-feature.js";
|
|
8
|
+
import "../features/file-explorer/index.js";
|
|
5
9
|
import LocalHealthCheck_default from "../features/health/LocalHealthCheck.js";
|
|
10
|
+
import { secretsFeature } from "../features/secrets/secrets-feature.js";
|
|
11
|
+
import "../features/secrets/index.js";
|
|
6
12
|
import { QueryProvider } from "../providers/QueryProvider.js";
|
|
7
13
|
import { c } from "react/compiler-runtime";
|
|
8
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
15
|
import { Outlet, useSearchParams } from "react-router-dom";
|
|
16
|
+
var defaultFeatures = [secretsFeature, fileExplorerFeature];
|
|
10
17
|
function EnvironmentEmbedRoot() {
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let h = m, g;
|
|
14
|
-
f[2] === p ? g = f[3] : (g = p.get("name") ?? "Preview Environment", f[2] = p, f[3] = g);
|
|
18
|
+
let m = c(11), [h] = useSearchParams(), g;
|
|
19
|
+
m[0] === h ? g = m[1] : (g = h.get("url") ?? "http://localhost:3080", m[0] = h, m[1] = g);
|
|
15
20
|
let _ = g, v;
|
|
16
|
-
|
|
21
|
+
m[2] === h ? v = m[3] : (v = h.get("name") ?? "Preview Environment", m[2] = h, m[3] = v);
|
|
22
|
+
let y = v, b;
|
|
23
|
+
m[4] !== y || m[5] !== _ ? (b = {
|
|
17
24
|
id: "preview-env",
|
|
18
|
-
name:
|
|
19
|
-
url:
|
|
20
|
-
},
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return f[11] !== y || f[12] !== b ? (T = /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsxs(StudioProvider, {
|
|
25
|
-
router: b,
|
|
26
|
-
environment: y,
|
|
25
|
+
name: y,
|
|
26
|
+
url: _
|
|
27
|
+
}, m[4] = y, m[5] = _, m[6] = b) : b = m[6];
|
|
28
|
+
let x = b, S = useRouter(x.id, "/embed/env"), C;
|
|
29
|
+
m[7] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsxs(FeatureRegistryProvider, {
|
|
30
|
+
features: defaultFeatures,
|
|
27
31
|
children: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
/* @__PURE__ */ jsx(LocalHealthCheck_default, {}),
|
|
33
|
+
/* @__PURE__ */ jsx(SseProvider, {}),
|
|
34
|
+
/* @__PURE__ */ jsx(InvalidationEventsProvider, {}),
|
|
35
|
+
/* @__PURE__ */ jsx(Outlet, {})
|
|
32
36
|
]
|
|
33
|
-
})
|
|
37
|
+
}), m[7] = C) : C = m[7];
|
|
38
|
+
let w;
|
|
39
|
+
return m[8] !== x || m[9] !== S ? (w = /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(StudioProvider, {
|
|
40
|
+
router: S,
|
|
41
|
+
environment: x,
|
|
42
|
+
children: C
|
|
43
|
+
}) }), m[8] = x, m[9] = S, m[10] = w) : w = m[10], w;
|
|
34
44
|
}
|
|
35
45
|
export { EnvironmentEmbedRoot as default };
|
|
@@ -11,101 +11,103 @@ import { useState } from "react";
|
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { Loader2, Trash2 } from "lucide-react";
|
|
13
13
|
function DataList(he) {
|
|
14
|
-
let r = c(
|
|
15
|
-
r[0] === l ?
|
|
16
|
-
let
|
|
17
|
-
r[2] === u ?
|
|
18
|
-
let
|
|
19
|
-
r[4] ===
|
|
20
|
-
let
|
|
21
|
-
r[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
22
|
-
let [
|
|
23
|
-
r[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
14
|
+
let r = c(92), { data: i, totalItems: a, loading: ge, error: o, page: _e, pageSize: ve, onPageChange: ye, onPageSizeChange: be, searchTerm: xe, onSearchChange: s, filters: l, filterConfig: u, onFiltersChange: d, onRowClick: Se, onNew: f, enableBatchActions: Ce, batchActions: p, onBatchDelete: m, rowActions: we, itemRenderer: Te, newButtonLabel: Ee } = he, De = ge === void 0 ? !1 : ge, h;
|
|
15
|
+
r[0] === l ? h = r[1] : (h = l === void 0 ? {} : l, r[0] = l, r[1] = h);
|
|
16
|
+
let g = h, _;
|
|
17
|
+
r[2] === u ? _ = r[3] : (_ = u === void 0 ? {} : u, r[2] = u, r[3] = _);
|
|
18
|
+
let v = _, y = Ce === void 0 ? !0 : Ce, b;
|
|
19
|
+
r[4] === p ? b = r[5] : (b = p === void 0 ? [] : p, r[4] = p, r[5] = b);
|
|
20
|
+
let Oe = b, ke = we === void 0 ? [] : we, x;
|
|
21
|
+
r[6] === Symbol.for("react.memo_cache_sentinel") ? (x = [], r[6] = x) : x = r[6];
|
|
22
|
+
let [S, C] = useState(x), [w, Ae] = useState(!1), T;
|
|
23
|
+
r[7] === Symbol.for("react.memo_cache_sentinel") ? (T = {
|
|
24
24
|
isOpen: !1,
|
|
25
25
|
type: "single"
|
|
26
|
-
}, r[7] =
|
|
27
|
-
let [
|
|
28
|
-
r[8] !== i || r[9] !==
|
|
29
|
-
|
|
30
|
-
}, r[8] = i, r[9] =
|
|
31
|
-
let
|
|
32
|
-
r[11] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
33
|
-
|
|
34
|
-
}, r[11] =
|
|
35
|
-
let
|
|
36
|
-
r[12] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
37
|
-
let
|
|
38
|
-
r[13] ===
|
|
39
|
-
|
|
26
|
+
}, r[7] = T) : T = r[7];
|
|
27
|
+
let [E, D] = useState(T), O;
|
|
28
|
+
r[8] !== i || r[9] !== S.length ? (O = () => {
|
|
29
|
+
S.length === i.length ? C([]) : C(i.map(_temp));
|
|
30
|
+
}, r[8] = i, r[9] = S.length, r[10] = O) : O = r[10];
|
|
31
|
+
let je = O, k;
|
|
32
|
+
r[11] === Symbol.for("react.memo_cache_sentinel") ? (k = (e) => {
|
|
33
|
+
C((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
34
|
+
}, r[11] = k) : k = r[11];
|
|
35
|
+
let Me = k, A;
|
|
36
|
+
r[12] === Symbol.for("react.memo_cache_sentinel") ? (A = () => C([]), r[12] = A) : A = r[12];
|
|
37
|
+
let Ne = A, j;
|
|
38
|
+
r[13] === D ? j = r[14] : (j = () => {
|
|
39
|
+
D({
|
|
40
40
|
isOpen: !0,
|
|
41
41
|
type: "batch"
|
|
42
42
|
});
|
|
43
|
-
}, r[13] =
|
|
44
|
-
let
|
|
45
|
-
r[15] !==
|
|
46
|
-
|
|
43
|
+
}, r[13] = D, r[14] = j);
|
|
44
|
+
let M = j, N;
|
|
45
|
+
r[15] !== E.itemId || r[16] !== E.type || r[17] !== m || r[18] !== S || r[19] !== D ? (N = async () => {
|
|
46
|
+
E.type === "single" && E.itemId || E.type === "batch" && (await m?.(S), Ne()), D({
|
|
47
47
|
isOpen: !1,
|
|
48
48
|
type: "single"
|
|
49
49
|
});
|
|
50
|
-
}, r[15] =
|
|
51
|
-
let
|
|
52
|
-
r[21] !==
|
|
50
|
+
}, r[15] = E.itemId, r[16] = E.type, r[17] = m, r[18] = S, r[19] = D, r[20] = N) : N = r[20];
|
|
51
|
+
let P = N, F;
|
|
52
|
+
r[21] !== M || r[22] !== m ? (F = m ? [{
|
|
53
53
|
id: "delete",
|
|
54
54
|
label: "Delete Selected",
|
|
55
55
|
icon: /* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" }),
|
|
56
56
|
variant: "destructive",
|
|
57
|
-
action:
|
|
58
|
-
}] : [], r[21] =
|
|
59
|
-
let
|
|
60
|
-
r[24] !==
|
|
61
|
-
let
|
|
62
|
-
r[27] !==
|
|
63
|
-
e.id === "delete" ?
|
|
64
|
-
}, r[27] =
|
|
65
|
-
let
|
|
66
|
-
r[30] ===
|
|
67
|
-
let
|
|
68
|
-
r[32] ===
|
|
69
|
-
let
|
|
70
|
-
r[34] !==
|
|
57
|
+
action: M
|
|
58
|
+
}] : [], r[21] = M, r[22] = m, r[23] = F) : F = r[23];
|
|
59
|
+
let I;
|
|
60
|
+
r[24] !== Oe || r[25] !== F ? (I = [...F, ...Oe], r[24] = Oe, r[25] = F, r[26] = I) : I = r[26];
|
|
61
|
+
let L = I, R;
|
|
62
|
+
r[27] !== M || r[28] !== S ? (R = (e) => {
|
|
63
|
+
e.id === "delete" ? M() : (e.action(S), Ne());
|
|
64
|
+
}, r[27] = M, r[28] = S, r[29] = R) : R = r[29];
|
|
65
|
+
let Pe = R, z;
|
|
66
|
+
r[30] === g ? z = r[31] : (z = Object.values(g).filter(Boolean), r[30] = g, r[31] = z);
|
|
67
|
+
let Fe = z.length, Ie = [...[], ...ke], Le = Ie.length > 0, B;
|
|
68
|
+
r[32] === w ? B = r[33] : (B = () => Ae(!w), r[32] = w, r[33] = B);
|
|
69
|
+
let V;
|
|
70
|
+
r[34] !== v || r[35] !== d ? (V = !!d && Object.keys(v).length > 0, r[34] = v, r[35] = d, r[36] = V) : V = r[36];
|
|
71
|
+
let Re = !!s, ze = S.length === i.length && i.length > 0, H;
|
|
72
|
+
r[37] !== ze || r[38] !== je ? (H = /* @__PURE__ */ jsxs("div", {
|
|
71
73
|
className: "text-sm text-gray-400",
|
|
72
74
|
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
73
75
|
checked: ze,
|
|
74
|
-
onCheckedChange:
|
|
76
|
+
onCheckedChange: je,
|
|
75
77
|
"aria-label": "Select all rows",
|
|
76
78
|
className: "mr-4"
|
|
77
79
|
}), "Select All"]
|
|
78
|
-
}), r[
|
|
80
|
+
}), r[37] = ze, r[38] = je, r[39] = H) : H = r[39];
|
|
79
81
|
let U;
|
|
80
|
-
r[
|
|
81
|
-
selectedCount:
|
|
82
|
-
batchActions:
|
|
83
|
-
onBatchAction:
|
|
84
|
-
}), r[
|
|
82
|
+
r[40] !== L || r[41] !== y || r[42] !== Pe || r[43] !== S.length ? (U = y && /* @__PURE__ */ jsx(DataTableBatchAction_default, {
|
|
83
|
+
selectedCount: S.length,
|
|
84
|
+
batchActions: L,
|
|
85
|
+
onBatchAction: Pe
|
|
86
|
+
}), r[40] = L, r[41] = y, r[42] = Pe, r[43] = S.length, r[44] = U) : U = r[44];
|
|
85
87
|
let W;
|
|
86
|
-
r[
|
|
87
|
-
filters:
|
|
88
|
-
filterConfig:
|
|
88
|
+
r[45] !== v || r[46] !== g || r[47] !== w || r[48] !== d ? (W = /* @__PURE__ */ jsx(DataTableFilters_default, {
|
|
89
|
+
filters: g,
|
|
90
|
+
filterConfig: v,
|
|
89
91
|
onFiltersChange: d,
|
|
90
|
-
isOpen:
|
|
91
|
-
}), r[
|
|
92
|
+
isOpen: w
|
|
93
|
+
}), r[45] = v, r[46] = g, r[47] = w, r[48] = d, r[49] = W) : W = r[49];
|
|
92
94
|
let G;
|
|
93
|
-
r[
|
|
95
|
+
r[50] !== U || r[51] !== W ? (G = /* @__PURE__ */ jsxs("div", { children: [U, W] }), r[50] = U, r[51] = W, r[52] = G) : G = r[52];
|
|
94
96
|
let K;
|
|
95
|
-
r[
|
|
97
|
+
r[53] !== Fe || r[54] !== w || r[55] !== Ee || r[56] !== f || r[57] !== s || r[58] !== xe || r[59] !== B || r[60] !== V || r[61] !== Re || r[62] !== H || r[63] !== G ? (K = /* @__PURE__ */ jsxs(DataTableToolbar_default, {
|
|
96
98
|
searchTerm: xe,
|
|
97
99
|
onSearchChange: s,
|
|
98
|
-
onFilterToggle:
|
|
99
|
-
onNew:
|
|
100
|
-
filterCount:
|
|
101
|
-
isFilterOpen:
|
|
102
|
-
newButtonLabel:
|
|
103
|
-
showFilter:
|
|
100
|
+
onFilterToggle: B,
|
|
101
|
+
onNew: f,
|
|
102
|
+
filterCount: Fe,
|
|
103
|
+
isFilterOpen: w,
|
|
104
|
+
newButtonLabel: Ee,
|
|
105
|
+
showFilter: V,
|
|
104
106
|
showSearch: Re,
|
|
105
107
|
children: [H, G]
|
|
106
|
-
}), r[
|
|
108
|
+
}), r[53] = Fe, r[54] = w, r[55] = Ee, r[56] = f, r[57] = s, r[58] = xe, r[59] = B, r[60] = V, r[61] = Re, r[62] = H, r[63] = G, r[64] = K) : K = r[64];
|
|
107
109
|
let q;
|
|
108
|
-
r[
|
|
110
|
+
r[65] === o ? q = r[66] : (q = o && /* @__PURE__ */ jsx(Card, {
|
|
109
111
|
className: "border-destructive/50 bg-destructive/5",
|
|
110
112
|
children: /* @__PURE__ */ jsx(CardContent, {
|
|
111
113
|
className: "p-4",
|
|
@@ -114,19 +116,19 @@ function DataList(he) {
|
|
|
114
116
|
children: ["Error: ", o.message]
|
|
115
117
|
})
|
|
116
118
|
})
|
|
117
|
-
}), r[
|
|
118
|
-
let Be =
|
|
119
|
+
}), r[65] = o, r[66] = q);
|
|
120
|
+
let Be = De ? /* @__PURE__ */ jsx("div", {
|
|
119
121
|
className: "flex items-center justify-center py-8",
|
|
120
122
|
children: /* @__PURE__ */ jsx(Loader2, { className: "h-8 w-8 animate-spin" })
|
|
121
123
|
}) : /* @__PURE__ */ jsx("div", { children: i.length === 0 ? /* @__PURE__ */ jsx("span", { children: "No items found" }) : i.map((n, me) => /* @__PURE__ */ jsxs("div", {
|
|
122
124
|
className: "flex items-center",
|
|
123
125
|
children: [
|
|
124
|
-
|
|
126
|
+
y && /* @__PURE__ */ jsx("div", {
|
|
125
127
|
className: "flex items-center justify-center pr-4",
|
|
126
128
|
onClick: _temp2,
|
|
127
129
|
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
128
|
-
checked:
|
|
129
|
-
onCheckedChange: () =>
|
|
130
|
+
checked: S.includes(n.id),
|
|
131
|
+
onCheckedChange: () => Me(n.id),
|
|
130
132
|
"aria-label": `Select row ${n.id}`
|
|
131
133
|
})
|
|
132
134
|
}),
|
|
@@ -137,19 +139,19 @@ function DataList(he) {
|
|
|
137
139
|
children: /* @__PURE__ */ jsx("div", {
|
|
138
140
|
className: "flex items-center justify-between",
|
|
139
141
|
children: /* @__PURE__ */ jsx("div", {
|
|
140
|
-
className: `flex-1 ${
|
|
141
|
-
onClick:
|
|
142
|
-
children: /* @__PURE__ */ jsx("div", { children:
|
|
142
|
+
className: `flex-1 ${Se ? "cursor-pointer" : ""} ${S.includes(n.id) ? "bg-muted/50" : ""}`,
|
|
143
|
+
onClick: Se ? () => Se(n) : void 0,
|
|
144
|
+
children: /* @__PURE__ */ jsx("div", { children: Te && Te(n) })
|
|
143
145
|
})
|
|
144
146
|
})
|
|
145
147
|
})
|
|
146
148
|
}, n.id),
|
|
147
|
-
|
|
149
|
+
Le && /* @__PURE__ */ jsx("div", {
|
|
148
150
|
className: "flex items-center justify-center",
|
|
149
151
|
onClick: _temp3,
|
|
150
152
|
children: /* @__PURE__ */ jsx("div", {
|
|
151
153
|
className: "flex items-center justify-center gap-1",
|
|
152
|
-
children:
|
|
154
|
+
children: Ie.map((t) => !t.condition || t.condition(n) ? /* @__PURE__ */ jsx(Button, {
|
|
153
155
|
variant: t.variant || "ghost",
|
|
154
156
|
size: "sm",
|
|
155
157
|
onClick: () => void t.action(n),
|
|
@@ -162,28 +164,28 @@ function DataList(he) {
|
|
|
162
164
|
})
|
|
163
165
|
]
|
|
164
166
|
}, `data-list-item-${me}`)) }), J;
|
|
165
|
-
r[
|
|
167
|
+
r[67] === Be ? J = r[68] : (J = /* @__PURE__ */ jsx("div", {
|
|
166
168
|
className: "space-y-2",
|
|
167
169
|
children: Be
|
|
168
|
-
}), r[
|
|
170
|
+
}), r[67] = Be, r[68] = J);
|
|
169
171
|
let Y;
|
|
170
|
-
r[
|
|
172
|
+
r[69] !== ye || r[70] !== be || r[71] !== _e || r[72] !== ve || r[73] !== a ? (Y = /* @__PURE__ */ jsx(DataTablePagination_default, {
|
|
171
173
|
page: _e,
|
|
172
174
|
pageSize: ve,
|
|
173
175
|
totalItems: a,
|
|
174
176
|
onPageChange: ye,
|
|
175
177
|
onPageSizeChange: be
|
|
176
|
-
}), r[
|
|
178
|
+
}), r[69] = ye, r[70] = be, r[71] = _e, r[72] = ve, r[73] = a, r[74] = Y) : Y = r[74];
|
|
177
179
|
let X;
|
|
178
|
-
r[
|
|
179
|
-
...
|
|
180
|
+
r[75] !== E || r[76] !== D ? (X = (e) => D({
|
|
181
|
+
...E,
|
|
180
182
|
isOpen: e
|
|
181
|
-
}), r[
|
|
182
|
-
let Ve =
|
|
183
|
-
r[
|
|
183
|
+
}), r[75] = E, r[76] = D, r[77] = X) : X = r[77];
|
|
184
|
+
let Ve = E.type === "single" ? "Delete Item" : "Delete Items", He = E.type === "single" ? "Are you sure you want to delete this item? This action cannot be undone." : `Are you sure you want to delete ${S.length} items? This action cannot be undone.`, Z;
|
|
185
|
+
r[78] === P ? Z = r[79] : (Z = () => void P(), r[78] = P, r[79] = Z);
|
|
184
186
|
let Q;
|
|
185
|
-
r[
|
|
186
|
-
isOpen:
|
|
187
|
+
r[80] !== E.isOpen || r[81] !== X || r[82] !== Ve || r[83] !== He || r[84] !== Z ? (Q = /* @__PURE__ */ jsx(ConfirmDialog_default, {
|
|
188
|
+
isOpen: E.isOpen,
|
|
187
189
|
onOpenChange: X,
|
|
188
190
|
title: Ve,
|
|
189
191
|
description: He,
|
|
@@ -191,9 +193,9 @@ function DataList(he) {
|
|
|
191
193
|
confirmText: "Delete",
|
|
192
194
|
cancelText: "Cancel",
|
|
193
195
|
variant: "destructive"
|
|
194
|
-
}), r[
|
|
196
|
+
}), r[80] = E.isOpen, r[81] = X, r[82] = Ve, r[83] = He, r[84] = Z, r[85] = Q) : Q = r[85];
|
|
195
197
|
let $;
|
|
196
|
-
return r[
|
|
198
|
+
return r[86] !== K || r[87] !== q || r[88] !== J || r[89] !== Y || r[90] !== Q ? ($ = /* @__PURE__ */ jsxs("div", {
|
|
197
199
|
className: "space-y-4",
|
|
198
200
|
children: [
|
|
199
201
|
K,
|
|
@@ -202,7 +204,7 @@ function DataList(he) {
|
|
|
202
204
|
Y,
|
|
203
205
|
Q
|
|
204
206
|
]
|
|
205
|
-
}), r[
|
|
207
|
+
}), r[86] = K, r[87] = q, r[88] = J, r[89] = Y, r[90] = Q, r[91] = $) : $ = r[91], $;
|
|
206
208
|
}
|
|
207
209
|
function _temp3(e) {
|
|
208
210
|
return e.stopPropagation();
|