@burdenoff/microfe-vibecontrols 2026.522.2 → 2026.522.4
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/node_modules/@apollo/client/errors/ServerError.js +17 -0
- package/dist/node_modules/@apollo/client/errors/ServerError.js.map +1 -0
- package/dist/node_modules/@apollo/client/errors/ServerParseError.js +17 -0
- package/dist/node_modules/@apollo/client/errors/ServerParseError.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch/batchLink.js +28 -0
- package/dist/node_modules/@apollo/client/link/batch/batchLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch/batching.js +70 -0
- package/dist/node_modules/@apollo/client/link/batch/batching.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js +74 -0
- package/dist/node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch-http/batchHttpLink.js +17 -0
- package/dist/node_modules/@apollo/client/link/batch-http/batchHttpLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js +32 -0
- package/dist/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/checkFetcher.js +9 -0
- package/dist/node_modules/@apollo/client/link/http/checkFetcher.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +45 -0
- package/dist/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js +60 -0
- package/dist/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/selectURI.js +6 -0
- package/dist/node_modules/@apollo/client/link/http/selectURI.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/utils/filterOperationVariables.js +14 -0
- package/dist/node_modules/@apollo/client/link/utils/filterOperationVariables.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js +14 -0
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
- package/dist/node_modules/@apollo/client/version.js +6 -0
- package/dist/node_modules/@apollo/client/version.js.map +1 -0
- package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
- package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
- package/dist/node_modules/@wry/trie/lib/index.js +53 -0
- package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/throwError.js +17 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/pages/AgentsPage.js +242 -239
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/pages/CatalogPage.js +146 -98
- package/dist/pages/CatalogPage.js.map +1 -1
- package/dist/pages/ComponentsPage.js +163 -117
- package/dist/pages/ComponentsPage.js.map +1 -1
- package/dist/pages/TemplatesPage.js +74 -26
- package/dist/pages/TemplatesPage.js.map +1 -1
- package/dist/providers/VibeControlsProvider.js +35 -30
- package/dist/providers/VibeControlsProvider.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,90 +9,95 @@ import { SearchInput as c } from "../components/shared/SearchInput.js";
|
|
|
9
9
|
import { FilterDropdown as l } from "../components/shared/FilterDropdown.js";
|
|
10
10
|
import { GetHelpButton as u } from "../components/shared/GetHelpButton.js";
|
|
11
11
|
import "../components/shared/index.js";
|
|
12
|
-
import { VIBE_PERMISSIONS as
|
|
13
|
-
import { PageSkeleton as
|
|
14
|
-
import { ComponentCard as
|
|
15
|
-
import { ComponentForm as
|
|
12
|
+
import { VIBE_PERMISSIONS as ee } from "../constants/permissions.js";
|
|
13
|
+
import { PageSkeleton as te } from "../components/shared/PageSkeleton.js";
|
|
14
|
+
import { ComponentCard as ne } from "../components/idp-components/ComponentCard.js";
|
|
15
|
+
import { ComponentForm as re } from "../components/idp-components/ComponentForm.js";
|
|
16
16
|
import "../components/idp-components/index.js";
|
|
17
|
-
import { useCallback as
|
|
18
|
-
import { useI18n as
|
|
19
|
-
import { Box as
|
|
20
|
-
import { usePermissions as
|
|
21
|
-
import { AnimatePresence as
|
|
22
|
-
import { jsx as
|
|
23
|
-
import { MotionItem as
|
|
17
|
+
import { useCallback as d, useEffect as f, useState as p } from "react";
|
|
18
|
+
import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
19
|
+
import { Box as h, Plus as g, RefreshCw as _ } from "lucide-react";
|
|
20
|
+
import { usePermissions as v } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
21
|
+
import { AnimatePresence as y } from "framer-motion";
|
|
22
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
23
|
+
import { MotionItem as S, MotionList as C, MotionPage as w } from "@burdenoff/fe-libs/shared/motion";
|
|
24
24
|
//#region src/pages/ComponentsPage.tsx
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
let r =
|
|
25
|
+
function T() {
|
|
26
|
+
let T = n(), { t: E } = m(), { hasPermission: ie, isLoading: ae } = v(), D = d((e, t, n) => {
|
|
27
|
+
let r = E(e, n), i = r === e ? t : r;
|
|
28
28
|
return n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)), i) : i;
|
|
29
|
-
}, [
|
|
29
|
+
}, [E]), oe = [
|
|
30
30
|
{
|
|
31
31
|
value: "all",
|
|
32
|
-
label:
|
|
32
|
+
label: D("component.allTypes", "All Types")
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
value: "SERVICE",
|
|
36
|
-
label:
|
|
36
|
+
label: D("component.typeService", "Service")
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
value: "FRONTEND",
|
|
40
|
-
label:
|
|
40
|
+
label: D("component.typeFrontend", "Frontend")
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
value: "LIBRARY",
|
|
44
|
-
label:
|
|
44
|
+
label: D("component.typeLibrary", "Library")
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
value: "API",
|
|
48
|
-
label:
|
|
48
|
+
label: D("component.typeApi", "API")
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
value: "MOBILE",
|
|
52
|
-
label:
|
|
52
|
+
label: D("component.typeMobile", "Mobile")
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
value: "DATABASE",
|
|
56
|
-
label:
|
|
56
|
+
label: D("component.typeDatabase", "Database")
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
value: "INFRASTRUCTURE",
|
|
60
|
-
label:
|
|
60
|
+
label: D("component.typeInfrastructure", "Infrastructure")
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
value: "CUSTOM",
|
|
64
|
-
label:
|
|
64
|
+
label: D("component.typeCustom", "Custom")
|
|
65
65
|
}
|
|
66
|
-
],
|
|
66
|
+
], O = [
|
|
67
67
|
{
|
|
68
68
|
value: "all",
|
|
69
|
-
label:
|
|
69
|
+
label: D("component.allLifecycles", "All Lifecycles")
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
value: "EXPERIMENTAL",
|
|
73
|
-
label:
|
|
73
|
+
label: D("component.lifecycleExperimental", "Experimental")
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
value: "PRODUCTION",
|
|
77
|
-
label:
|
|
77
|
+
label: D("component.lifecycleProduction", "Production")
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
value: "DEPRECATED",
|
|
81
|
-
label:
|
|
81
|
+
label: D("component.lifecycleDeprecated", "Deprecated")
|
|
82
82
|
}
|
|
83
|
-
], [
|
|
83
|
+
], [k, A] = p(""), [j, M] = p("all"), [N, P] = p("all"), [F, I] = p(!1), [L, R] = p(null), [z, B] = p([]), [V, H] = p(!1), { data: U, loading: W, error: G, refetch: K, fetchMore: q } = t({
|
|
84
84
|
variables: {
|
|
85
85
|
filter: {
|
|
86
|
-
type:
|
|
87
|
-
lifecycle:
|
|
86
|
+
type: j === "all" ? void 0 : j,
|
|
87
|
+
lifecycle: N === "all" ? void 0 : N,
|
|
88
|
+
search: k || void 0
|
|
88
89
|
},
|
|
89
|
-
|
|
90
|
+
pagination: {
|
|
91
|
+
limit: 50,
|
|
92
|
+
offset: 0
|
|
93
|
+
}
|
|
90
94
|
},
|
|
91
|
-
fetchPolicy: "cache-and-network"
|
|
92
|
-
|
|
95
|
+
fetchPolicy: "cache-and-network",
|
|
96
|
+
notifyOnNetworkStatusChange: !0
|
|
97
|
+
}), [se] = e({
|
|
93
98
|
refetchQueries: ["ListComponents"],
|
|
94
99
|
awaitRefetchQueries: !0
|
|
95
|
-
}), { setDraftTagIds:
|
|
100
|
+
}), { setDraftTagIds: ce, flushTags: le } = o("VIBECONTROLS_COMPONENT"), J = d((e) => e.map((e) => ({
|
|
96
101
|
id: e.id,
|
|
97
102
|
name: e.name,
|
|
98
103
|
description: e.description || null,
|
|
@@ -104,132 +109,173 @@ function O() {
|
|
|
104
109
|
tags: e.tags || [],
|
|
105
110
|
createdAt: e.createdAt,
|
|
106
111
|
updatedAt: e.updatedAt
|
|
107
|
-
})), [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
})), []);
|
|
113
|
+
f(() => {
|
|
114
|
+
B(J(U?.vibecontrolsComponents?.items ?? []));
|
|
115
|
+
}, [U?.vibecontrolsComponents?.items, J]);
|
|
116
|
+
let Y = U?.vibecontrolsComponents?.total ?? 0, X = z.length < Y, Z = z, Q = z, $ = d(async () => {
|
|
117
|
+
if (!(V || !X)) {
|
|
118
|
+
H(!0);
|
|
119
|
+
try {
|
|
120
|
+
await q({
|
|
121
|
+
variables: { pagination: {
|
|
122
|
+
limit: 50,
|
|
123
|
+
offset: z.length
|
|
124
|
+
} },
|
|
125
|
+
updateQuery: (e, { fetchMoreResult: t }) => {
|
|
126
|
+
if (!t?.vibecontrolsComponents) return e;
|
|
127
|
+
let n = e.vibecontrolsComponents, r = t.vibecontrolsComponents;
|
|
128
|
+
return {
|
|
129
|
+
...e,
|
|
130
|
+
vibecontrolsComponents: {
|
|
131
|
+
...r,
|
|
132
|
+
items: [...n?.items ?? [], ...r.items],
|
|
133
|
+
total: r.total,
|
|
134
|
+
hasMore: r.hasMore
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
} finally {
|
|
140
|
+
H(!1);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}, [
|
|
144
|
+
q,
|
|
145
|
+
z.length,
|
|
146
|
+
V,
|
|
147
|
+
X
|
|
148
|
+
]);
|
|
149
|
+
if (ae) return /* @__PURE__ */ b("div", {
|
|
113
150
|
className: "flex items-center justify-center min-h-[400px]",
|
|
114
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ b("p", {
|
|
115
152
|
className: "text-text-secondary",
|
|
116
153
|
children: "Loading permissions..."
|
|
117
154
|
})
|
|
118
155
|
});
|
|
119
|
-
if (!
|
|
156
|
+
if (!ie(ee.VIBE_LIST)) return /* @__PURE__ */ b("div", {
|
|
120
157
|
className: "flex items-center justify-center min-h-[400px]",
|
|
121
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ x("div", {
|
|
122
159
|
className: "text-center space-y-2",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
124
161
|
className: "text-lg font-semibold text-foreground",
|
|
125
162
|
children: "Access Denied"
|
|
126
|
-
}), /* @__PURE__ */
|
|
163
|
+
}), /* @__PURE__ */ b("p", {
|
|
127
164
|
className: "text-sm text-text-secondary",
|
|
128
165
|
children: "You don't have permission to access this page."
|
|
129
166
|
})]
|
|
130
167
|
})
|
|
131
168
|
});
|
|
132
|
-
let
|
|
133
|
-
|
|
169
|
+
let ue = (e) => {
|
|
170
|
+
T(`/components/${e.id}`);
|
|
134
171
|
};
|
|
135
|
-
return
|
|
172
|
+
return G && Z.length === 0 ? /* @__PURE__ */ b(w, {
|
|
136
173
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
137
|
-
children: /* @__PURE__ */
|
|
138
|
-
title:
|
|
139
|
-
message:
|
|
140
|
-
onRetry: () =>
|
|
174
|
+
children: /* @__PURE__ */ b(i, {
|
|
175
|
+
title: D("component.failedLoad", "Failed to load components"),
|
|
176
|
+
message: G.message,
|
|
177
|
+
onRetry: () => K()
|
|
141
178
|
})
|
|
142
|
-
}) : /* @__PURE__ */ w
|
|
179
|
+
}) : /* @__PURE__ */ x(w, {
|
|
143
180
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
144
181
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
title:
|
|
147
|
-
description:
|
|
148
|
-
actions: /* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ b(r, {
|
|
183
|
+
title: D("component.title", "Components"),
|
|
184
|
+
description: D("component.description", "{{total}} components", { total: Z.length }),
|
|
185
|
+
actions: /* @__PURE__ */ x("div", {
|
|
149
186
|
className: "flex items-center gap-2",
|
|
150
|
-
children: [/* @__PURE__ */
|
|
151
|
-
onClick: () =>
|
|
152
|
-
disabled:
|
|
187
|
+
children: [/* @__PURE__ */ b("button", {
|
|
188
|
+
onClick: () => K(),
|
|
189
|
+
disabled: W,
|
|
153
190
|
className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
|
|
154
|
-
title:
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
-
}), /* @__PURE__ */
|
|
157
|
-
onClick: () =>
|
|
191
|
+
title: D("common.refresh", "Refresh"),
|
|
192
|
+
children: /* @__PURE__ */ b(_, { className: `w-4 h-4 ${W ? "animate-spin" : ""}` })
|
|
193
|
+
}), /* @__PURE__ */ x("button", {
|
|
194
|
+
onClick: () => I(!0),
|
|
158
195
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ b(g, { className: "w-4 h-4" }), D("component.createComponent", "Create Component")]
|
|
160
197
|
})]
|
|
161
198
|
})
|
|
162
199
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ x("div", {
|
|
164
201
|
className: "space-y-3",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ b("div", {
|
|
166
203
|
className: "flex items-center gap-2",
|
|
167
|
-
children: /* @__PURE__ */
|
|
168
|
-
value:
|
|
169
|
-
onChange:
|
|
170
|
-
placeholder:
|
|
204
|
+
children: /* @__PURE__ */ b(c, {
|
|
205
|
+
value: k,
|
|
206
|
+
onChange: A,
|
|
207
|
+
placeholder: D("component.searchPlaceholder", "Search components..."),
|
|
171
208
|
className: "flex-1 sm:w-64 sm:flex-none"
|
|
172
209
|
})
|
|
173
|
-
}), /* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ x("div", {
|
|
174
211
|
className: "flex items-center gap-2 sm:gap-3 flex-wrap",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
176
|
-
label:
|
|
177
|
-
value:
|
|
178
|
-
options:
|
|
179
|
-
onChange:
|
|
180
|
-
}), /* @__PURE__ */
|
|
181
|
-
label:
|
|
182
|
-
value:
|
|
183
|
-
options:
|
|
184
|
-
onChange:
|
|
212
|
+
children: [/* @__PURE__ */ b(l, {
|
|
213
|
+
label: D("component.filterType", "Type"),
|
|
214
|
+
value: j,
|
|
215
|
+
options: oe,
|
|
216
|
+
onChange: M
|
|
217
|
+
}), /* @__PURE__ */ b(l, {
|
|
218
|
+
label: D("component.filterLifecycle", "Lifecycle"),
|
|
219
|
+
value: N,
|
|
220
|
+
options: O,
|
|
221
|
+
onChange: P
|
|
185
222
|
})]
|
|
186
223
|
})]
|
|
187
224
|
}),
|
|
188
|
-
|
|
225
|
+
/* @__PURE__ */ x("p", {
|
|
189
226
|
className: "text-sm text-text-secondary",
|
|
190
|
-
children: [
|
|
191
|
-
filtered:
|
|
192
|
-
total:
|
|
193
|
-
}),
|
|
227
|
+
children: [D("component.showingResults", "Showing {{filtered}} of {{total}} components", {
|
|
228
|
+
filtered: Q.length,
|
|
229
|
+
total: Y
|
|
230
|
+
}), W && /* @__PURE__ */ b("span", {
|
|
194
231
|
className: "ml-2 text-text-muted",
|
|
195
|
-
children:
|
|
232
|
+
children: D("common.refreshing", "(refreshing...)")
|
|
196
233
|
})]
|
|
197
234
|
}),
|
|
198
|
-
|
|
235
|
+
W && Z.length === 0 ? /* @__PURE__ */ b(te, {
|
|
199
236
|
variant: "cards",
|
|
200
237
|
count: 6
|
|
201
|
-
}) :
|
|
238
|
+
}) : Q.length > 0 ? /* @__PURE__ */ b(y, {
|
|
202
239
|
mode: "wait",
|
|
203
|
-
children: /* @__PURE__ */ C
|
|
240
|
+
children: /* @__PURE__ */ b(C, {
|
|
204
241
|
stagger: .04,
|
|
205
242
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
206
|
-
children:
|
|
243
|
+
children: Q.map((e) => /* @__PURE__ */ b(S, { children: /* @__PURE__ */ b(ne, {
|
|
207
244
|
component: e,
|
|
208
|
-
onOpen:
|
|
245
|
+
onOpen: ue
|
|
209
246
|
}) }, e.id))
|
|
210
247
|
}, "component-grid")
|
|
211
|
-
}) : /* @__PURE__ */
|
|
212
|
-
icon: /* @__PURE__ */
|
|
213
|
-
title:
|
|
214
|
-
description:
|
|
215
|
-
action: !
|
|
248
|
+
}) : /* @__PURE__ */ b(s, {
|
|
249
|
+
icon: /* @__PURE__ */ b(h, { className: "w-8 h-8 text-text-secondary" }),
|
|
250
|
+
title: k || j !== "all" || N !== "all" ? D("component.emptyNoResults", "No components found") : D("component.emptyNoComponents", "No components yet"),
|
|
251
|
+
description: k || j !== "all" || N !== "all" ? D("component.emptyAdjustSearch", "Try adjusting your search or filters") : D("component.emptyCreate", "Register your first component to start tracking your software catalog"),
|
|
252
|
+
action: !k && j === "all" && N === "all" ? /* @__PURE__ */ x("div", {
|
|
216
253
|
className: "flex items-center gap-2",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
218
|
-
onClick: () =>
|
|
254
|
+
children: [/* @__PURE__ */ x("button", {
|
|
255
|
+
onClick: () => I(!0),
|
|
219
256
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
221
|
-
}), /* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ b(g, { className: "w-4 h-4" }), D("component.createComponent", "Create Component")]
|
|
258
|
+
}), /* @__PURE__ */ b(u, { prompt: "What is a Component in VibeControls and how do I add one?" })]
|
|
222
259
|
}) : void 0
|
|
223
260
|
}),
|
|
224
|
-
|
|
261
|
+
X && Q.length > 0 && /* @__PURE__ */ b("div", {
|
|
262
|
+
className: "flex justify-center pt-2",
|
|
263
|
+
children: /* @__PURE__ */ b("button", {
|
|
264
|
+
onClick: $,
|
|
265
|
+
disabled: V,
|
|
266
|
+
className: "flex items-center gap-2 px-4 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken-hover transition-colors disabled:opacity-50",
|
|
267
|
+
children: V ? D("common.loading", "Loading...") : D("common.loadMore", "Load more")
|
|
268
|
+
})
|
|
269
|
+
}),
|
|
270
|
+
L && /* @__PURE__ */ b("div", {
|
|
225
271
|
className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg text-status-success-text rounded-md shadow-lg text-sm",
|
|
226
|
-
children:
|
|
272
|
+
children: L
|
|
227
273
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
isOpen:
|
|
230
|
-
onClose: () =>
|
|
274
|
+
/* @__PURE__ */ b(re, {
|
|
275
|
+
isOpen: F,
|
|
276
|
+
onClose: () => I(!1),
|
|
231
277
|
onSubmit: async (e) => {
|
|
232
|
-
let t = await
|
|
278
|
+
let t = await se({ variables: { input: {
|
|
233
279
|
name: e.name,
|
|
234
280
|
description: e.description || void 0,
|
|
235
281
|
type: e.type,
|
|
@@ -240,22 +286,22 @@ function O() {
|
|
|
240
286
|
owner: e.owner || void 0,
|
|
241
287
|
tags: e.tags.length > 0 ? e.tags : void 0
|
|
242
288
|
} } });
|
|
243
|
-
if (!t.data?.createVibecontrolsComponent?.id) throw Error(
|
|
289
|
+
if (!t.data?.createVibecontrolsComponent?.id) throw Error(D("component.failedCreate", "Failed to create component"));
|
|
244
290
|
let n = t.data.createVibecontrolsComponent.id;
|
|
245
|
-
|
|
291
|
+
I(!1), R(D("component.createdSuccess", "Component created successfully")), await le(n), await K(), setTimeout(() => R(null), 3e3);
|
|
246
292
|
},
|
|
247
|
-
extraSection: /* @__PURE__ */
|
|
293
|
+
extraSection: /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h3", {
|
|
248
294
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
249
|
-
children:
|
|
250
|
-
}), /* @__PURE__ */
|
|
295
|
+
children: D("component.tags", "Tags")
|
|
296
|
+
}), /* @__PURE__ */ b(a, {
|
|
251
297
|
entityType: "VIBECONTROLS_COMPONENT",
|
|
252
|
-
onDraftChange:
|
|
298
|
+
onDraftChange: ce
|
|
253
299
|
})] })
|
|
254
300
|
})
|
|
255
301
|
]
|
|
256
302
|
});
|
|
257
303
|
}
|
|
258
304
|
//#endregion
|
|
259
|
-
export {
|
|
305
|
+
export { T as ComponentsPage };
|
|
260
306
|
|
|
261
307
|
//# sourceMappingURL=ComponentsPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentsPage.js","names":[],"sources":["../../src/pages/ComponentsPage.tsx"],"sourcesContent":["import { useState, useMemo, useCallback } from 'react';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { VIBE_PERMISSIONS } from '../constants/permissions';\nimport { Plus, Box, RefreshCw } from 'lucide-react';\nimport { ComponentCard } from '@/components/idp-components';\nimport type { ComponentCardData } from '@/components/idp-components';\nimport { ComponentForm } from '@/components/idp-components';\nimport type { ComponentFormData } from '@/components/idp-components';\nimport { EntityTagPicker } from '@/components/shared/EntityTagPicker';\nimport { PageSkeleton } from '@/components/shared/PageSkeleton';\nimport { useDraftEntityTags } from '@/hooks/useDraftEntityTags';\nimport {\n PageHeader,\n SearchInput,\n FilterDropdown,\n EmptyState,\n ErrorState,\n GetHelpButton,\n} from '@/components/shared';\nimport { MotionPage, MotionList, MotionItem } from '@burdenoff/fe-libs/shared/motion';\nimport { AnimatePresence } from 'framer-motion';\nimport { useVibeNavigate } from '@/providers/VibeControlsProvider';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useListComponentsQuery, useCreateComponentMutation } from '@/generated/wspace-operations';\n\nexport function ComponentsPage() {\n const navigate = useVibeNavigate();\n const { t } = useI18n();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n\n const tr = useCallback(\n (key: string, fallback: string, params?: Record<string, string | number>): string => {\n const translated = t(key, params);\n const template = translated === key ? fallback : translated;\n if (!params) return template;\n return Object.entries(params).reduce(\n (acc, [paramKey, paramValue]) => acc.replace(`{{${paramKey}}}`, String(paramValue)),\n template\n );\n },\n [t]\n );\n\n const typeOptions = [\n { value: 'all', label: tr('component.allTypes', 'All Types') },\n { value: 'SERVICE', label: tr('component.typeService', 'Service') },\n { value: 'FRONTEND', label: tr('component.typeFrontend', 'Frontend') },\n { value: 'LIBRARY', label: tr('component.typeLibrary', 'Library') },\n { value: 'API', label: tr('component.typeApi', 'API') },\n { value: 'MOBILE', label: tr('component.typeMobile', 'Mobile') },\n { value: 'DATABASE', label: tr('component.typeDatabase', 'Database') },\n { value: 'INFRASTRUCTURE', label: tr('component.typeInfrastructure', 'Infrastructure') },\n { value: 'CUSTOM', label: tr('component.typeCustom', 'Custom') },\n ];\n\n const lifecycleOptions = [\n { value: 'all', label: tr('component.allLifecycles', 'All Lifecycles') },\n { value: 'EXPERIMENTAL', label: tr('component.lifecycleExperimental', 'Experimental') },\n { value: 'PRODUCTION', label: tr('component.lifecycleProduction', 'Production') },\n { value: 'DEPRECATED', label: tr('component.lifecycleDeprecated', 'Deprecated') },\n ];\n\n const [searchQuery, setSearchQuery] = useState('');\n const [typeFilter, setTypeFilter] = useState('all');\n const [lifecycleFilter, setLifecycleFilter] = useState('all');\n const [showCreateForm, setShowCreateForm] = useState(false);\n const [successMessage, setSuccessMessage] = useState<string | null>(null);\n\n const { data, loading, error, refetch } = useListComponentsQuery({\n variables: {\n filter: {\n type: typeFilter !== 'all' ? typeFilter : undefined,\n lifecycle: lifecycleFilter !== 'all' ? lifecycleFilter : undefined,\n },\n ...(searchQuery ? { pagination: { limit: 1000 } } : {}),\n },\n fetchPolicy: 'cache-and-network',\n });\n\n const [createComponent] = useCreateComponentMutation({\n refetchQueries: ['ListComponents'],\n awaitRefetchQueries: true,\n });\n const { setDraftTagIds, flushTags } = useDraftEntityTags('VIBECONTROLS_COMPONENT');\n\n const components: ComponentCardData[] = useMemo(() => {\n const items = data?.vibecontrolsComponents?.items ?? [];\n return items.map((item: Record<string, unknown>) => ({\n id: item.id as string,\n name: item.name as string,\n description: (item.description as string) || null,\n type: item.type as ComponentCardData['type'],\n lifecycle: item.lifecycle as ComponentCardData['lifecycle'],\n version: (item.version as string) || null,\n language: (item.language as string) || null,\n framework: (item.framework as string) || null,\n tags: (item.tags as string[]) || [],\n createdAt: item.createdAt as string,\n updatedAt: item.updatedAt as string,\n }));\n }, [data?.vibecontrolsComponents?.items]);\n\n const filteredComponents = useMemo(() => {\n if (!searchQuery) return components;\n const query = searchQuery.toLowerCase();\n return components.filter(\n (c) =>\n c.name.toLowerCase().includes(query) ||\n c.description?.toLowerCase().includes(query) ||\n c.language?.toLowerCase().includes(query) ||\n c.framework?.toLowerCase().includes(query) ||\n c.tags?.some((tag) => tag.toLowerCase().includes(query))\n );\n }, [components, searchQuery]);\n\n if (permissionsLoading)\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <p className=\"text-text-secondary\">Loading permissions...</p>\n </div>\n );\n if (!hasPermission(VIBE_PERMISSIONS.VIBE_LIST))\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <div className=\"text-center space-y-2\">\n <h2 className=\"text-lg font-semibold text-foreground\">Access Denied</h2>\n <p className=\"text-sm text-text-secondary\">\n You don't have permission to access this page.\n </p>\n </div>\n </div>\n );\n\n const handleComponentSelect = (component: ComponentCardData) => {\n navigate(`/components/${component.id}`);\n };\n\n const handleCreateComponent = async (formData: ComponentFormData) => {\n const result = await createComponent({\n variables: {\n input: {\n name: formData.name,\n description: formData.description || undefined,\n type: formData.type,\n lifecycle: formData.lifecycle,\n language: formData.language || undefined,\n framework: formData.framework || undefined,\n version: formData.version || undefined,\n owner: formData.owner || undefined,\n tags: formData.tags.length > 0 ? formData.tags : undefined,\n },\n },\n });\n if (!result.data?.createVibecontrolsComponent?.id) {\n throw new Error(tr('component.failedCreate', 'Failed to create component'));\n }\n const newComponentId = result.data.createVibecontrolsComponent.id;\n setShowCreateForm(false);\n setSuccessMessage(tr('component.createdSuccess', 'Component created successfully'));\n await flushTags(newComponentId);\n await refetch();\n setTimeout(() => setSuccessMessage(null), 3000);\n };\n\n if (error && components.length === 0) {\n return (\n <MotionPage className=\"space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen\">\n <ErrorState\n title={tr('component.failedLoad', 'Failed to load components')}\n message={error.message}\n onRetry={() => refetch()}\n />\n </MotionPage>\n );\n }\n\n return (\n <MotionPage className=\"space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen\">\n <PageHeader\n title={tr('component.title', 'Components')}\n description={tr('component.description', '{{total}} components', {\n total: components.length,\n })}\n actions={\n <div className=\"flex items-center gap-2\">\n <button\n onClick={() => refetch()}\n disabled={loading}\n className=\"flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50\"\n title={tr('common.refresh', 'Refresh')}\n >\n <RefreshCw className={`w-4 h-4 ${loading ? 'animate-spin' : ''}`} />\n </button>\n <button\n onClick={() => setShowCreateForm(true)}\n className=\"flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Plus className=\"w-4 h-4\" />\n {tr('component.createComponent', 'Create Component')}\n </button>\n </div>\n }\n />\n\n {/* Filters */}\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-2\">\n <SearchInput\n value={searchQuery}\n onChange={setSearchQuery}\n placeholder={tr('component.searchPlaceholder', 'Search components...')}\n className=\"flex-1 sm:w-64 sm:flex-none\"\n />\n </div>\n <div className=\"flex items-center gap-2 sm:gap-3 flex-wrap\">\n <FilterDropdown\n label={tr('component.filterType', 'Type')}\n value={typeFilter}\n options={typeOptions}\n onChange={setTypeFilter}\n />\n <FilterDropdown\n label={tr('component.filterLifecycle', 'Lifecycle')}\n value={lifecycleFilter}\n options={lifecycleOptions}\n onChange={setLifecycleFilter}\n />\n </div>\n </div>\n\n {/* Results count */}\n {(searchQuery || typeFilter !== 'all' || lifecycleFilter !== 'all') && (\n <p className=\"text-sm text-text-secondary\">\n {tr('component.showingResults', 'Showing {{filtered}} of {{total}} components', {\n filtered: filteredComponents.length,\n total: components.length,\n })}\n {loading && (\n <span className=\"ml-2 text-text-muted\">\n {tr('common.refreshing', '(refreshing...)')}\n </span>\n )}\n </p>\n )}\n\n {/* Grid */}\n {loading && components.length === 0 ? (\n <PageSkeleton variant=\"cards\" count={6} />\n ) : filteredComponents.length > 0 ? (\n <AnimatePresence mode=\"wait\">\n <MotionList\n key=\"component-grid\"\n stagger={0.04}\n className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4\"\n >\n {filteredComponents.map((component) => (\n <MotionItem key={component.id}>\n <ComponentCard component={component} onOpen={handleComponentSelect} />\n </MotionItem>\n ))}\n </MotionList>\n </AnimatePresence>\n ) : (\n <EmptyState\n icon={<Box className=\"w-8 h-8 text-text-secondary\" />}\n title={\n searchQuery || typeFilter !== 'all' || lifecycleFilter !== 'all'\n ? tr('component.emptyNoResults', 'No components found')\n : tr('component.emptyNoComponents', 'No components yet')\n }\n description={\n searchQuery || typeFilter !== 'all' || lifecycleFilter !== 'all'\n ? tr('component.emptyAdjustSearch', 'Try adjusting your search or filters')\n : tr(\n 'component.emptyCreate',\n 'Register your first component to start tracking your software catalog'\n )\n }\n action={\n !searchQuery && typeFilter === 'all' && lifecycleFilter === 'all' ? (\n <div className=\"flex items-center gap-2\">\n <button\n onClick={() => setShowCreateForm(true)}\n className=\"flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Plus className=\"w-4 h-4\" />\n {tr('component.createComponent', 'Create Component')}\n </button>\n <GetHelpButton prompt=\"What is a Component in VibeControls and how do I add one?\" />\n </div>\n ) : undefined\n }\n />\n )}\n\n {/* Success Toast */}\n {successMessage && (\n <div className=\"fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg text-status-success-text rounded-md shadow-lg text-sm\">\n {successMessage}\n </div>\n )}\n\n {/* Create Form */}\n <ComponentForm\n isOpen={showCreateForm}\n onClose={() => setShowCreateForm(false)}\n onSubmit={handleCreateComponent}\n extraSection={\n <div>\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">\n {tr('component.tags', 'Tags')}\n </h3>\n <EntityTagPicker entityType=\"VIBECONTROLS_COMPONENT\" onDraftChange={setDraftTagIds} />\n </div>\n }\n />\n </MotionPage>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,IAAiB;CAC/B,IAAM,IAAW,GAAiB,EAC5B,EAAE,SAAM,IAAS,EACjB,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EAEnE,IAAK,GACR,GAAa,GAAkB,MAAqD;EACnF,IAAM,IAAa,EAAE,GAAK,EAAO,EAC3B,IAAW,MAAe,IAAM,IAAW;AAEjD,SADK,IACE,OAAO,QAAQ,EAAO,CAAC,QAC3B,GAAK,CAAC,GAAU,OAAgB,EAAI,QAAQ,KAAK,EAAS,KAAK,OAAO,EAAW,CAAC,EACnF,EACD,GAJmB;IAMtB,CAAC,EAAE,CACJ,EAEK,IAAc;EAClB;GAAE,OAAO;GAAO,OAAO,EAAG,sBAAsB,YAAY;GAAE;EAC9D;GAAE,OAAO;GAAW,OAAO,EAAG,yBAAyB,UAAU;GAAE;EACnE;GAAE,OAAO;GAAY,OAAO,EAAG,0BAA0B,WAAW;GAAE;EACtE;GAAE,OAAO;GAAW,OAAO,EAAG,yBAAyB,UAAU;GAAE;EACnE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,SAAI,CAAC,EAAO,MAAM,6BAA6B,GAC7C,OAAU,MAAM,EAAG,0BAA0B,6BAA6B,CAAC;KAE7E,IAAM,IAAiB,EAAO,KAAK,4BAA4B;AAK/D,KAJA,EAAkB,GAAM,EACxB,EAAkB,EAAG,4BAA4B,iCAAiC,CAAC,EACnF,MAAM,EAAU,EAAe,EAC/B,MAAM,GAAS,EACf,iBAAiB,EAAkB,KAAK,EAAE,IAAK;;IAkJ3C,cACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eACX,EAAG,kBAAkB,OAAO;KAC1B,CAAA,EACL,kBAAC,GAAD;KAAiB,YAAW;KAAyB,eAAe;KAAkB,CAAA,CAClF,EAAA,CAAA;IAER,CAAA;GACS"}
|
|
1
|
+
{"version":3,"file":"ComponentsPage.js","names":[],"sources":["../../src/pages/ComponentsPage.tsx"],"sourcesContent":["import { useState, useCallback, useEffect } from 'react';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { VIBE_PERMISSIONS } from '../constants/permissions';\nimport { Plus, Box, RefreshCw } from 'lucide-react';\nimport { ComponentCard } from '@/components/idp-components';\nimport type { ComponentCardData } from '@/components/idp-components';\nimport { ComponentForm } from '@/components/idp-components';\nimport type { ComponentFormData } from '@/components/idp-components';\nimport { EntityTagPicker } from '@/components/shared/EntityTagPicker';\nimport { PageSkeleton } from '@/components/shared/PageSkeleton';\nimport { useDraftEntityTags } from '@/hooks/useDraftEntityTags';\nimport {\n PageHeader,\n SearchInput,\n FilterDropdown,\n EmptyState,\n ErrorState,\n GetHelpButton,\n} from '@/components/shared';\nimport { MotionPage, MotionList, MotionItem } from '@burdenoff/fe-libs/shared/motion';\nimport { AnimatePresence } from 'framer-motion';\nimport { useVibeNavigate } from '@/providers/VibeControlsProvider';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useListComponentsQuery, useCreateComponentMutation } from '@/generated/wspace-operations';\n\nexport function ComponentsPage() {\n const navigate = useVibeNavigate();\n const { t } = useI18n();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n\n const tr = useCallback(\n (key: string, fallback: string, params?: Record<string, string | number>): string => {\n const translated = t(key, params);\n const template = translated === key ? fallback : translated;\n if (!params) return template;\n return Object.entries(params).reduce(\n (acc, [paramKey, paramValue]) => acc.replace(`{{${paramKey}}}`, String(paramValue)),\n template\n );\n },\n [t]\n );\n\n const typeOptions = [\n { value: 'all', label: tr('component.allTypes', 'All Types') },\n { value: 'SERVICE', label: tr('component.typeService', 'Service') },\n { value: 'FRONTEND', label: tr('component.typeFrontend', 'Frontend') },\n { value: 'LIBRARY', label: tr('component.typeLibrary', 'Library') },\n { value: 'API', label: tr('component.typeApi', 'API') },\n { value: 'MOBILE', label: tr('component.typeMobile', 'Mobile') },\n { value: 'DATABASE', label: tr('component.typeDatabase', 'Database') },\n { value: 'INFRASTRUCTURE', label: tr('component.typeInfrastructure', 'Infrastructure') },\n { value: 'CUSTOM', label: tr('component.typeCustom', 'Custom') },\n ];\n\n const lifecycleOptions = [\n { value: 'all', label: tr('component.allLifecycles', 'All Lifecycles') },\n { value: 'EXPERIMENTAL', label: tr('component.lifecycleExperimental', 'Experimental') },\n { value: 'PRODUCTION', label: tr('component.lifecycleProduction', 'Production') },\n { value: 'DEPRECATED', label: tr('component.lifecycleDeprecated', 'Deprecated') },\n ];\n\n const PAGE_SIZE = 50;\n const [searchQuery, setSearchQuery] = useState('');\n const [typeFilter, setTypeFilter] = useState('all');\n const [lifecycleFilter, setLifecycleFilter] = useState('all');\n const [showCreateForm, setShowCreateForm] = useState(false);\n const [successMessage, setSuccessMessage] = useState<string | null>(null);\n const [accumulated, setAccumulated] = useState<ComponentCardData[]>([]);\n const [loadingMore, setLoadingMore] = useState(false);\n\n const { data, loading, error, refetch, fetchMore } = useListComponentsQuery({\n variables: {\n filter: {\n type: typeFilter !== 'all' ? typeFilter : undefined,\n lifecycle: lifecycleFilter !== 'all' ? lifecycleFilter : undefined,\n search: searchQuery || undefined,\n },\n pagination: { limit: PAGE_SIZE, offset: 0 },\n },\n fetchPolicy: 'cache-and-network',\n notifyOnNetworkStatusChange: true,\n });\n\n const [createComponent] = useCreateComponentMutation({\n refetchQueries: ['ListComponents'],\n awaitRefetchQueries: true,\n });\n const { setDraftTagIds, flushTags } = useDraftEntityTags('VIBECONTROLS_COMPONENT');\n\n const mapItems = useCallback(\n (items: ReadonlyArray<Record<string, unknown>>): ComponentCardData[] =>\n items.map((item) => ({\n id: item.id as string,\n name: item.name as string,\n description: (item.description as string) || null,\n type: item.type as ComponentCardData['type'],\n lifecycle: item.lifecycle as ComponentCardData['lifecycle'],\n version: (item.version as string) || null,\n language: (item.language as string) || null,\n framework: (item.framework as string) || null,\n tags: (item.tags as string[]) || [],\n createdAt: item.createdAt as string,\n updatedAt: item.updatedAt as string,\n })),\n []\n );\n\n useEffect(() => {\n const items = data?.vibecontrolsComponents?.items ?? [];\n setAccumulated(mapItems(items as ReadonlyArray<Record<string, unknown>>));\n }, [data?.vibecontrolsComponents?.items, mapItems]);\n\n const total = data?.vibecontrolsComponents?.total ?? 0;\n const hasMore = accumulated.length < total;\n const components = accumulated;\n const filteredComponents = accumulated;\n\n const handleLoadMore = useCallback(async () => {\n if (loadingMore || !hasMore) return;\n setLoadingMore(true);\n try {\n await fetchMore({\n variables: { pagination: { limit: PAGE_SIZE, offset: accumulated.length } },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult?.vibecontrolsComponents) return prev;\n const prevList = prev.vibecontrolsComponents;\n const nextList = fetchMoreResult.vibecontrolsComponents;\n return {\n ...prev,\n vibecontrolsComponents: {\n ...nextList,\n items: [...(prevList?.items ?? []), ...nextList.items],\n total: nextList.total,\n hasMore: nextList.hasMore,\n },\n };\n },\n });\n } finally {\n setLoadingMore(false);\n }\n }, [fetchMore, accumulated.length, loadingMore, hasMore]);\n\n if (permissionsLoading)\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <p className=\"text-text-secondary\">Loading permissions...</p>\n </div>\n );\n if (!hasPermission(VIBE_PERMISSIONS.VIBE_LIST))\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <div className=\"text-center space-y-2\">\n <h2 className=\"text-lg font-semibold text-foreground\">Access Denied</h2>\n <p className=\"text-sm text-text-secondary\">\n You don't have permission to access this page.\n </p>\n </div>\n </div>\n );\n\n const handleComponentSelect = (component: ComponentCardData) => {\n navigate(`/components/${component.id}`);\n };\n\n const handleCreateComponent = async (formData: ComponentFormData) => {\n const result = await createComponent({\n variables: {\n input: {\n name: formData.name,\n description: formData.description || undefined,\n type: formData.type,\n lifecycle: formData.lifecycle,\n language: formData.language || undefined,\n framework: formData.framework || undefined,\n version: formData.version || undefined,\n owner: formData.owner || undefined,\n tags: formData.tags.length > 0 ? formData.tags : undefined,\n },\n },\n });\n if (!result.data?.createVibecontrolsComponent?.id) {\n throw new Error(tr('component.failedCreate', 'Failed to create component'));\n }\n const newComponentId = result.data.createVibecontrolsComponent.id;\n setShowCreateForm(false);\n setSuccessMessage(tr('component.createdSuccess', 'Component created successfully'));\n await flushTags(newComponentId);\n await refetch();\n setTimeout(() => setSuccessMessage(null), 3000);\n };\n\n if (error && components.length === 0) {\n return (\n <MotionPage className=\"space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen\">\n <ErrorState\n title={tr('component.failedLoad', 'Failed to load components')}\n message={error.message}\n onRetry={() => refetch()}\n />\n </MotionPage>\n );\n }\n\n return (\n <MotionPage className=\"space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen\">\n <PageHeader\n title={tr('component.title', 'Components')}\n description={tr('component.description', '{{total}} components', {\n total: components.length,\n })}\n actions={\n <div className=\"flex items-center gap-2\">\n <button\n onClick={() => refetch()}\n disabled={loading}\n className=\"flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50\"\n title={tr('common.refresh', 'Refresh')}\n >\n <RefreshCw className={`w-4 h-4 ${loading ? 'animate-spin' : ''}`} />\n </button>\n <button\n onClick={() => setShowCreateForm(true)}\n className=\"flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Plus className=\"w-4 h-4\" />\n {tr('component.createComponent', 'Create Component')}\n </button>\n </div>\n }\n />\n\n {/* Filters */}\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-2\">\n <SearchInput\n value={searchQuery}\n onChange={setSearchQuery}\n placeholder={tr('component.searchPlaceholder', 'Search components...')}\n className=\"flex-1 sm:w-64 sm:flex-none\"\n />\n </div>\n <div className=\"flex items-center gap-2 sm:gap-3 flex-wrap\">\n <FilterDropdown\n label={tr('component.filterType', 'Type')}\n value={typeFilter}\n options={typeOptions}\n onChange={setTypeFilter}\n />\n <FilterDropdown\n label={tr('component.filterLifecycle', 'Lifecycle')}\n value={lifecycleFilter}\n options={lifecycleOptions}\n onChange={setLifecycleFilter}\n />\n </div>\n </div>\n\n {/* Results count */}\n <p className=\"text-sm text-text-secondary\">\n {tr('component.showingResults', 'Showing {{filtered}} of {{total}} components', {\n filtered: filteredComponents.length,\n total,\n })}\n {loading && (\n <span className=\"ml-2 text-text-muted\">{tr('common.refreshing', '(refreshing...)')}</span>\n )}\n </p>\n\n {/* Grid */}\n {loading && components.length === 0 ? (\n <PageSkeleton variant=\"cards\" count={6} />\n ) : filteredComponents.length > 0 ? (\n <AnimatePresence mode=\"wait\">\n <MotionList\n key=\"component-grid\"\n stagger={0.04}\n className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4\"\n >\n {filteredComponents.map((component) => (\n <MotionItem key={component.id}>\n <ComponentCard component={component} onOpen={handleComponentSelect} />\n </MotionItem>\n ))}\n </MotionList>\n </AnimatePresence>\n ) : (\n <EmptyState\n icon={<Box className=\"w-8 h-8 text-text-secondary\" />}\n title={\n searchQuery || typeFilter !== 'all' || lifecycleFilter !== 'all'\n ? tr('component.emptyNoResults', 'No components found')\n : tr('component.emptyNoComponents', 'No components yet')\n }\n description={\n searchQuery || typeFilter !== 'all' || lifecycleFilter !== 'all'\n ? tr('component.emptyAdjustSearch', 'Try adjusting your search or filters')\n : tr(\n 'component.emptyCreate',\n 'Register your first component to start tracking your software catalog'\n )\n }\n action={\n !searchQuery && typeFilter === 'all' && lifecycleFilter === 'all' ? (\n <div className=\"flex items-center gap-2\">\n <button\n onClick={() => setShowCreateForm(true)}\n className=\"flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Plus className=\"w-4 h-4\" />\n {tr('component.createComponent', 'Create Component')}\n </button>\n <GetHelpButton prompt=\"What is a Component in VibeControls and how do I add one?\" />\n </div>\n ) : undefined\n }\n />\n )}\n\n {/* Load more */}\n {hasMore && filteredComponents.length > 0 && (\n <div className=\"flex justify-center pt-2\">\n <button\n onClick={handleLoadMore}\n disabled={loadingMore}\n className=\"flex items-center gap-2 px-4 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken-hover transition-colors disabled:opacity-50\"\n >\n {loadingMore\n ? tr('common.loading', 'Loading...')\n : tr('common.loadMore', 'Load more')}\n </button>\n </div>\n )}\n\n {/* Success Toast */}\n {successMessage && (\n <div className=\"fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg text-status-success-text rounded-md shadow-lg text-sm\">\n {successMessage}\n </div>\n )}\n\n {/* Create Form */}\n <ComponentForm\n isOpen={showCreateForm}\n onClose={() => setShowCreateForm(false)}\n onSubmit={handleCreateComponent}\n extraSection={\n <div>\n <h3 className=\"text-sm font-medium text-text-secondary mb-2\">\n {tr('component.tags', 'Tags')}\n </h3>\n <EntityTagPicker entityType=\"VIBECONTROLS_COMPONENT\" onDraftChange={setDraftTagIds} />\n </div>\n }\n />\n </MotionPage>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,IAAiB;CAC/B,IAAM,IAA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