@burdenoff/microfe-devportal 2026.916.8 → 2026.917.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.
Files changed (35) hide show
  1. package/dist/devportal/components/ManifestViewer.d.ts +12 -0
  2. package/dist/devportal/components/ManifestViewer.d.ts.map +1 -0
  3. package/dist/devportal/components/ManifestViewer.js +58 -0
  4. package/dist/devportal/components/ManifestViewer.js.map +1 -0
  5. package/dist/devportal/components/index.d.ts +1 -0
  6. package/dist/devportal/components/index.d.ts.map +1 -1
  7. package/dist/devportal/components/index.js +1 -0
  8. package/dist/devportal/hooks/index.d.ts +1 -0
  9. package/dist/devportal/hooks/index.d.ts.map +1 -1
  10. package/dist/devportal/hooks/index.js +1 -0
  11. package/dist/devportal/hooks/useProducts.d.ts +18 -0
  12. package/dist/devportal/hooks/useProducts.d.ts.map +1 -0
  13. package/dist/devportal/hooks/useProducts.js +14 -0
  14. package/dist/devportal/hooks/useProducts.js.map +1 -0
  15. package/dist/devportal/pages/AdminReviewPage.d.ts.map +1 -1
  16. package/dist/devportal/pages/AdminReviewPage.js +54 -64
  17. package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
  18. package/dist/devportal/pages/ApplicationVersionsPage.d.ts.map +1 -1
  19. package/dist/devportal/pages/ApplicationVersionsPage.js +304 -272
  20. package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
  21. package/dist/devportal/pages/CreateApplicationPage.d.ts.map +1 -1
  22. package/dist/devportal/pages/CreateApplicationPage.js +137 -156
  23. package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
  24. package/dist/devportal/pages/EditApplicationPage.d.ts.map +1 -1
  25. package/dist/devportal/pages/EditApplicationPage.js +271 -290
  26. package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
  27. package/dist/generated/global-operations.d.ts +39 -0
  28. package/dist/generated/global-operations.d.ts.map +1 -1
  29. package/dist/generated/global-operations.js +72 -54
  30. package/dist/generated/global-operations.js.map +1 -1
  31. package/dist/translations/en.d.ts +4 -1
  32. package/dist/translations/en.d.ts.map +1 -1
  33. package/dist/translations/en.js +5 -2
  34. package/dist/translations/en.js.map +1 -1
  35. package/package.json +1 -1
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+
3
+ export interface ManifestViewerProps {
4
+ manifest: Record<string, unknown>;
5
+ tr: (key: string, fallback: string) => string;
6
+ }
7
+ /**
8
+ * Read-only modal for viewing a version's manifest.json, so developers and
9
+ * reviewers can validate what was uploaded without leaving the page.
10
+ */
11
+ export declare const ManifestViewer: FC<ManifestViewerProps>;
12
+ //# sourceMappingURL=ManifestViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManifestViewer.d.ts","sourceRoot":"","sources":["../../../src/devportal/components/ManifestViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAwElD,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { useEffect as e, useRef as t, useState as n } from "react";
2
+ import { FileJson as r, X as i } from "lucide-react";
3
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
4
+ //#region src/devportal/components/ManifestViewer.tsx
5
+ var c = ({ manifest: c, tr: l }) => {
6
+ let [u, d] = n(!1), f = t(null);
7
+ return e(() => {
8
+ if (!u) return;
9
+ let e = document.body.style.overflow;
10
+ document.body.style.overflow = "hidden", window.requestAnimationFrame(() => f.current?.focus());
11
+ let t = (e) => {
12
+ e.key === "Escape" && (e.preventDefault(), d(!1));
13
+ };
14
+ return document.addEventListener("keydown", t), () => {
15
+ document.body.style.overflow = e, document.removeEventListener("keydown", t);
16
+ };
17
+ }, [u]), /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ s("button", {
18
+ type: "button",
19
+ onClick: () => d(!0),
20
+ className: "inline-flex items-center gap-1.5 text-xs text-text-secondary hover:text-text-primary",
21
+ children: [/* @__PURE__ */ o(r, { size: 13 }), l("devportal.viewManifest", "View manifest.json")]
22
+ }), u && /* @__PURE__ */ s("div", {
23
+ className: "fixed inset-0 z-50 flex items-center justify-center p-4",
24
+ children: [/* @__PURE__ */ o("button", {
25
+ type: "button",
26
+ "aria-label": "Close dialog backdrop",
27
+ className: "absolute inset-0 bg-bg-overlay",
28
+ onClick: () => d(!1)
29
+ }), /* @__PURE__ */ s("div", {
30
+ ref: f,
31
+ role: "dialog",
32
+ "aria-modal": "true",
33
+ "aria-label": l("devportal.manifestJson", "manifest.json"),
34
+ tabIndex: -1,
35
+ className: "relative z-10 flex max-h-[80vh] w-full max-w-2xl flex-col rounded-lg bg-bg-surface p-6 shadow-xl focus:outline-none",
36
+ children: [/* @__PURE__ */ s("div", {
37
+ className: "flex items-center justify-between gap-4",
38
+ children: [/* @__PURE__ */ o("h3", {
39
+ className: "text-lg font-semibold",
40
+ children: l("devportal.manifestJson", "manifest.json")
41
+ }), /* @__PURE__ */ o("button", {
42
+ type: "button",
43
+ onClick: () => d(!1),
44
+ "aria-label": l("devportal.close", "Close"),
45
+ className: "rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
46
+ children: /* @__PURE__ */ o(i, { size: 18 })
47
+ })]
48
+ }), /* @__PURE__ */ o("pre", {
49
+ className: "mt-4 flex-1 overflow-auto rounded-md bg-bg-sunken p-3 text-xs font-mono whitespace-pre-wrap break-all",
50
+ children: JSON.stringify(c, null, 2)
51
+ })]
52
+ })]
53
+ })] });
54
+ };
55
+ //#endregion
56
+ export { c as ManifestViewer };
57
+
58
+ //# sourceMappingURL=ManifestViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManifestViewer.js","names":[],"sources":["../../../src/devportal/components/ManifestViewer.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { FileJson, X } from \"lucide-react\";\n\nexport interface ManifestViewerProps {\n manifest: Record<string, unknown>;\n tr: (key: string, fallback: string) => string;\n}\n\n/**\n * Read-only modal for viewing a version's manifest.json, so developers and\n * reviewers can validate what was uploaded without leaving the page.\n */\nexport const ManifestViewer: FC<ManifestViewerProps> = ({ manifest, tr }) => {\n const [open, setOpen] = useState(false);\n const dialogRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!open) return undefined;\n\n const originalOverflow = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n window.requestAnimationFrame(() => dialogRef.current?.focus());\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n setOpen(false);\n }\n };\n document.addEventListener(\"keydown\", onKeyDown);\n\n return () => {\n document.body.style.overflow = originalOverflow;\n document.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [open]);\n\n return (\n <>\n <button\n type=\"button\"\n onClick={() => setOpen(true)}\n className=\"inline-flex items-center gap-1.5 text-xs text-text-secondary hover:text-text-primary\"\n >\n <FileJson size={13} />\n {tr(\"devportal.viewManifest\", \"View manifest.json\")}\n </button>\n {open && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center p-4\">\n <button\n type=\"button\"\n aria-label=\"Close dialog backdrop\"\n className=\"absolute inset-0 bg-bg-overlay\"\n onClick={() => setOpen(false)}\n />\n <div\n ref={dialogRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={tr(\"devportal.manifestJson\", \"manifest.json\")}\n tabIndex={-1}\n className=\"relative z-10 flex max-h-[80vh] w-full max-w-2xl flex-col rounded-lg bg-bg-surface p-6 shadow-xl focus:outline-none\"\n >\n <div className=\"flex items-center justify-between gap-4\">\n <h3 className=\"text-lg font-semibold\">\n {tr(\"devportal.manifestJson\", \"manifest.json\")}\n </h3>\n <button\n type=\"button\"\n onClick={() => setOpen(false)}\n aria-label={tr(\"devportal.close\", \"Close\")}\n className=\"rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary\"\n >\n <X size={18} />\n </button>\n </div>\n <pre className=\"mt-4 flex-1 overflow-auto rounded-md bg-bg-sunken p-3 text-xs font-mono whitespace-pre-wrap break-all\">\n {JSON.stringify(manifest, null, 2)}\n </pre>\n </div>\n </div>\n )}\n </>\n );\n};\n"],"mappings":";;;;AAaA,IAAa,KAA2C,EAAE,aAAU,YAAS;CAC3E,IAAM,CAAC,GAAM,KAAW,EAAS,GAAM,EACjC,IAAY,EAA8B,KAAK;AAuBrD,QArBA,QAAgB;AACd,MAAI,CAAC,EAAM;EAEX,IAAM,IAAmB,SAAS,KAAK,MAAM;AAE7C,EADA,SAAS,KAAK,MAAM,WAAW,UAC/B,OAAO,4BAA4B,EAAU,SAAS,OAAO,CAAC;EAE9D,IAAM,KAAa,MAAyB;AAC1C,GAAI,EAAM,QAAQ,aAChB,EAAM,gBAAgB,EACtB,EAAQ,GAAM;;AAKlB,SAFA,SAAS,iBAAiB,WAAW,EAAU,QAElC;AAEX,GADA,SAAS,KAAK,MAAM,WAAW,GAC/B,SAAS,oBAAoB,WAAW,EAAU;;IAEnD,CAAC,EAAK,CAAC,EAGR,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,UAAD;EACE,MAAK;EACL,eAAe,EAAQ,GAAK;EAC5B,WAAU;YAHZ,CAKE,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA,EACrB,EAAG,0BAA0B,qBAAqB,CAC5C;KACR,KACC,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,UAAD;GACE,MAAK;GACL,cAAW;GACX,WAAU;GACV,eAAe,EAAQ,GAAM;GAC7B,CAAA,EACF,kBAAC,OAAD;GACE,KAAK;GACL,MAAK;GACL,cAAW;GACX,cAAY,EAAG,0BAA0B,gBAAgB;GACzD,UAAU;GACV,WAAU;aANZ,CAQE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,MAAD;KAAI,WAAU;eACX,EAAG,0BAA0B,gBAAgB;KAC3C,CAAA,EACL,kBAAC,UAAD;KACE,MAAK;KACL,eAAe,EAAQ,GAAM;KAC7B,cAAY,EAAG,mBAAmB,QAAQ;KAC1C,WAAU;eAEV,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA;KACR,CAAA,CACL;OACN,kBAAC,OAAD;IAAK,WAAU;cACZ,KAAK,UAAU,GAAU,MAAM,EAAE;IAC9B,CAAA,CACF;KACF;IAEP,EAAA,CAAA"}
@@ -21,4 +21,5 @@ export * from './FeatureFlaggedRoute';
21
21
  export * from './TelemetryErrorBoundary';
22
22
  export * from './SectionNav';
23
23
  export * from './MarkdownEditor';
24
+ export * from './ManifestViewer';
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/devportal/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/devportal/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
@@ -16,3 +16,4 @@ import "./ReportOrderIssueModal.js";
16
16
  import "./RegisterPickupLocationModal.js";
17
17
  import "./PermissionGuard.js";
18
18
  import "./MarkdownEditor.js";
19
+ import "./ManifestViewer.js";
@@ -7,5 +7,6 @@ export { apolloClient, parseGraphQLError, getErrorMessage, isAuthError, isValida
7
7
  export { DevPortalProvider } from './DevPortalProvider';
8
8
  export { useDevportalPermission } from './usePermission';
9
9
  export { useCarrierPickupLocations, capitalizeCarrierName, type CarrierPickupLocation, type UseCarrierPickupLocationsResult, } from './useCarrierPickupLocations';
10
+ export { useProducts, type ProductOption } from './useProducts';
10
11
  export * from '../../generated/global-operations';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/devportal/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,GACrC,MAAM,6BAA6B,CAAC;AAGrC,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/devportal/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAIzD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,GACrC,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAGhE,cAAc,mCAAmC,CAAC"}
@@ -3,3 +3,4 @@ import "./useGraphQL.js";
3
3
  import "./DevPortalProvider.js";
4
4
  import "./usePermission.js";
5
5
  import "./useCarrierPickupLocations.js";
6
+ import "./useProducts.js";
@@ -0,0 +1,18 @@
1
+ export interface ProductOption {
2
+ id: string;
3
+ /**
4
+ * The slug is what actually gets stored in StoreProduct.compatibleProducts
5
+ * and what browseStore/homeGroupedProducts match against — never the
6
+ * catalog row's `id`, which is a different UUID.
7
+ */
8
+ slug: string;
9
+ name: string;
10
+ }
11
+ interface UseProductsResult {
12
+ products: ProductOption[];
13
+ isLoading: boolean;
14
+ error: Error | undefined;
15
+ }
16
+ export declare function useProducts(): UseProductsResult;
17
+ export {};
18
+ //# sourceMappingURL=useProducts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useProducts.d.ts","sourceRoot":"","sources":["../../../src/devportal/hooks/useProducts.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,iBAAiB;IACzB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B;AAED,wBAAgB,WAAW,IAAI,iBAAiB,CAU/C"}
@@ -0,0 +1,14 @@
1
+ import { useListProductsForSelectorQuery as e } from "../../generated/global-operations.js";
2
+ //#region src/devportal/hooks/useProducts.ts
3
+ function t() {
4
+ let { data: t, loading: n, error: r } = e({ fetchPolicy: "cache-and-network" });
5
+ return {
6
+ products: t?.platformProducts.items ?? [],
7
+ isLoading: n,
8
+ error: r
9
+ };
10
+ }
11
+ //#endregion
12
+ export { t as useProducts };
13
+
14
+ //# sourceMappingURL=useProducts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useProducts.js","names":[],"sources":["../../../src/devportal/hooks/useProducts.ts"],"sourcesContent":["/**\n * Shared hook for fetching the active platform products list — backs the\n * Compatible Products selector on the node/workflow create and edit forms,\n * so publishers pick from every real platform product instead of a\n * hardcoded handful that goes stale as new products launch.\n */\nimport { useListProductsForSelectorQuery } from \"../../generated/global-operations\";\n\nexport interface ProductOption {\n id: string;\n /**\n * The slug is what actually gets stored in StoreProduct.compatibleProducts\n * and what browseStore/homeGroupedProducts match against — never the\n * catalog row's `id`, which is a different UUID.\n */\n slug: string;\n name: string;\n}\n\ninterface UseProductsResult {\n products: ProductOption[];\n isLoading: boolean;\n error: Error | undefined;\n}\n\nexport function useProducts(): UseProductsResult {\n const { data, loading, error } = useListProductsForSelectorQuery({\n fetchPolicy: \"cache-and-network\",\n });\n\n return {\n products: data?.platformProducts.items ?? [],\n isLoading: loading,\n error: error as Error | undefined,\n };\n}\n"],"mappings":";;AAyBA,SAAgB,IAAiC;CAC/C,IAAM,EAAE,SAAM,YAAS,aAAU,EAAgC,EAC/D,aAAa,qBACd,CAAC;AAEF,QAAO;EACL,UAAU,GAAM,iBAAiB,SAAS,EAAE;EAC5C,WAAW;EACJ;EACR"}
@@ -1 +1 @@
1
- {"version":3,"file":"AdminReviewPage.d.ts","sourceRoot":"","sources":["../../../src/devportal/pages/AdminReviewPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAkrBhC,eAAO,MAAM,eAAe,EAAE,EA2Y7B,CAAC"}
1
+ {"version":3,"file":"AdminReviewPage.d.ts","sourceRoot":"","sources":["../../../src/devportal/pages/AdminReviewPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAipBhC,eAAO,MAAM,eAAe,EAAE,EA2Y7B,CAAC"}
@@ -4,31 +4,21 @@ import { useApproveApplicationMutation as n, useApproveApplicationVersionMutatio
4
4
  import { getErrorMessage as l } from "../hooks/useGraphQL.js";
5
5
  import { PageLayout as u, PageSection as d } from "../components/PageLayout.js";
6
6
  import { PermissionGuard as f } from "../components/PermissionGuard.js";
7
+ import { ManifestViewer as p } from "../components/ManifestViewer.js";
7
8
  import "../components/index.js";
8
- import { useDevportalPermission as p } from "../hooks/usePermission.js";
9
+ import { useDevportalPermission as m } from "../hooks/usePermission.js";
9
10
  import "../hooks/index.js";
10
- import { DEVPORTAL_PERMISSIONS as m } from "../constants/permissions.js";
11
- import { useState as h } from "react";
12
- import { AlertCircle as g, CheckCircle as _, ChevronDown as v, ChevronUp as y, Clock as b, Download as x, Eye as S, FileJson as C, GitBranch as w, Loader2 as T, Package as E, Search as D, XCircle as O } from "lucide-react";
11
+ import { DEVPORTAL_PERMISSIONS as h } from "../constants/permissions.js";
12
+ import { useState as g } from "react";
13
+ import { AlertCircle as _, CheckCircle as v, ChevronDown as y, ChevronUp as b, Clock as x, Download as S, Eye as C, GitBranch as w, Loader2 as T, Package as E, Search as D, XCircle as O } from "lucide-react";
13
14
  import { jsx as k, jsxs as A } from "react/jsx-runtime";
14
15
  import { useI18n as j } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
16
  //#region src/devportal/pages/AdminReviewPage.tsx
16
- var M = ({ manifest: e, tr: t }) => {
17
- let [n, r] = h(!1);
18
- return /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("button", {
19
- type: "button",
20
- onClick: () => r((e) => !e),
21
- className: "inline-flex items-center gap-1.5 text-xs text-text-secondary hover:text-text-primary",
22
- children: [/* @__PURE__ */ k(C, { size: 13 }), n ? t("devportal.hideManifest", "Hide manifest") : t("devportal.viewManifest", "View manifest.json")]
23
- }), n && /* @__PURE__ */ k("pre", {
24
- className: "mt-2 max-h-48 overflow-auto rounded-md bg-bg-sunken p-3 text-xs font-mono whitespace-pre-wrap break-all",
25
- children: JSON.stringify(e, null, 2)
26
- })] });
27
- }, N = {
17
+ var M = {
28
18
  NODE: "Node package",
29
19
  WORKFLOW: "Workflow bundle"
30
- }, P = ({ appType: e, packageUrl: t, packageSize: n, tr: r }) => {
31
- let i = N[e];
20
+ }, N = ({ appType: e, packageUrl: t, packageSize: n, tr: r }) => {
21
+ let i = M[e];
32
22
  return i ? /* @__PURE__ */ A("div", {
33
23
  className: "rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-3 space-y-2",
34
24
  children: [/* @__PURE__ */ A("div", {
@@ -44,7 +34,7 @@ var M = ({ manifest: e, tr: t }) => {
44
34
  rel: "noopener noreferrer",
45
35
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
46
36
  children: [
47
- /* @__PURE__ */ k(x, { size: 14 }),
37
+ /* @__PURE__ */ k(S, { size: 14 }),
48
38
  r("devportal.download", "Download"),
49
39
  " ",
50
40
  i,
@@ -59,18 +49,18 @@ var M = ({ manifest: e, tr: t }) => {
59
49
  ]
60
50
  }) : /* @__PURE__ */ A("p", {
61
51
  className: "text-xs text-status-error-text flex items-center gap-1.5",
62
- children: [/* @__PURE__ */ k(g, { size: 12 }), r("devportal.noZipUploaded", "No ZIP uploaded — developer must upload before this can be approved")]
52
+ children: [/* @__PURE__ */ k(_, { size: 12 }), r("devportal.noZipUploaded", "No ZIP uploaded — developer must upload before this can be approved")]
63
53
  })]
64
54
  }) : null;
65
- }, F = ({ app: t, onApprove: n, onReject: r, processing: a, hasPendingVersions: o }) => {
55
+ }, P = ({ app: t, onApprove: n, onReject: r, processing: a, hasPendingVersions: o }) => {
66
56
  let { navigate: s, basePath: c } = e(), { t: l } = j(), u = (e, t) => {
67
57
  let n = l(e);
68
58
  return n === e ? t : n;
69
- }, [d, f] = h(!1), [g, b] = h(""), C = p(m.APP_APPROVE), E = p(m.APP_REJECT), { data: D } = i({
59
+ }, [d, f] = g(!1), [_, x] = g(""), E = m(h.APP_APPROVE), D = m(h.APP_REJECT), { data: P } = i({
70
60
  variables: { id: t.id },
71
61
  skip: !d,
72
62
  fetchPolicy: "cache-first"
73
- }), F = D?.application?.versions?.edges?.[0]?.node;
63
+ }), F = P?.application?.versions?.edges?.[0]?.node;
74
64
  return /* @__PURE__ */ A("div", {
75
65
  className: "rounded-card border border-border-seam bg-bg-surface overflow-hidden",
76
66
  children: [/* @__PURE__ */ A("div", {
@@ -132,11 +122,11 @@ var M = ({ manifest: e, tr: t }) => {
132
122
  onClick: () => s?.(`${c}/apps/${t.id}`),
133
123
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
134
124
  title: u("devportal.viewAppDetails", "View app details"),
135
- children: [/* @__PURE__ */ k(S, { size: 14 }), u("devportal.view", "View")]
125
+ children: [/* @__PURE__ */ k(C, { size: 14 }), u("devportal.view", "View")]
136
126
  }), /* @__PURE__ */ A("button", {
137
127
  onClick: () => f((e) => !e),
138
128
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
139
- children: [k(d ? y : v, { size: 14 }), u("devportal.review", "Review")]
129
+ children: [k(d ? b : y, { size: 14 }), u("devportal.review", "Review")]
140
130
  })]
141
131
  })
142
132
  ]
@@ -233,7 +223,7 @@ var M = ({ manifest: e, tr: t }) => {
233
223
  })
234
224
  ]
235
225
  }),
236
- N[t.appType] ? /* @__PURE__ */ k(P, {
226
+ M[t.appType] ? /* @__PURE__ */ k(N, {
237
227
  appType: t.appType,
238
228
  packageUrl: F.packageUrl,
239
229
  packageSize: F.packageSize,
@@ -247,7 +237,7 @@ var M = ({ manifest: e, tr: t }) => {
247
237
  rel: "noopener noreferrer",
248
238
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
249
239
  children: [
250
- /* @__PURE__ */ k(x, { size: 14 }),
240
+ /* @__PURE__ */ k(S, { size: 14 }),
251
241
  u("devportal.downloadPackage", "Download Package"),
252
242
  F.packageSize && /* @__PURE__ */ A("span", {
253
243
  className: "text-text-secondary text-xs ml-1",
@@ -260,7 +250,7 @@ var M = ({ manifest: e, tr: t }) => {
260
250
  ]
261
251
  })
262
252
  }),
263
- F.manifest && /* @__PURE__ */ k(M, {
253
+ F.manifest && /* @__PURE__ */ k(p, {
264
254
  manifest: F.manifest,
265
255
  tr: u
266
256
  })
@@ -270,8 +260,8 @@ var M = ({ manifest: e, tr: t }) => {
270
260
  className: "text-sm font-medium",
271
261
  children: u("devportal.reviewNotes", "Review Notes")
272
262
  }), /* @__PURE__ */ k("textarea", {
273
- value: g,
274
- onChange: (e) => b(e.target.value),
263
+ value: _,
264
+ onChange: (e) => x(e.target.value),
275
265
  placeholder: u("devportal.reviewNotesPlaceholder", "Add feedback for the developer (required for rejection)..."),
276
266
  rows: 3,
277
267
  className: "mt-1 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm ring-offset-background placeholder:text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none"
@@ -279,25 +269,25 @@ var M = ({ manifest: e, tr: t }) => {
279
269
  /* @__PURE__ */ A("div", {
280
270
  className: "flex gap-3",
281
271
  children: [/* @__PURE__ */ A("button", {
282
- onClick: () => n(t.id, g),
283
- disabled: a || !C.allowed,
284
- "aria-disabled": a || !C.allowed,
285
- title: C.allowed ? void 0 : u("devportal.common.noPermission", "You do not have permission to perform this action"),
272
+ onClick: () => n(t.id, _),
273
+ disabled: a || !E.allowed,
274
+ "aria-disabled": a || !E.allowed,
275
+ title: E.allowed ? void 0 : u("devportal.common.noPermission", "You do not have permission to perform this action"),
286
276
  className: "inline-flex items-center gap-2 rounded-md bg-status-success-bg px-4 py-2 text-sm font-medium text-white hover:bg-status-success-bg/90 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
287
277
  children: [a ? /* @__PURE__ */ k(T, {
288
278
  size: 14,
289
279
  className: "animate-spin",
290
280
  "aria-hidden": "true"
291
- }) : /* @__PURE__ */ k(_, {
281
+ }) : /* @__PURE__ */ k(v, {
292
282
  size: 14,
293
283
  "aria-hidden": "true"
294
284
  }), u("devportal.approve", "Approve")]
295
285
  }), /* @__PURE__ */ A("button", {
296
- onClick: () => r(t.id, g),
297
- disabled: a || !g.trim() || !E.allowed,
298
- "aria-disabled": a || !g.trim() || !E.allowed,
286
+ onClick: () => r(t.id, _),
287
+ disabled: a || !_.trim() || !D.allowed,
288
+ "aria-disabled": a || !_.trim() || !D.allowed,
299
289
  className: "inline-flex items-center gap-2 rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
300
- title: E.allowed ? g.trim() ? void 0 : u("devportal.notesRequiredForRejection", "Notes required for rejection") : u("devportal.common.noPermission", "You do not have permission to perform this action"),
290
+ title: D.allowed ? _.trim() ? void 0 : u("devportal.notesRequiredForRejection", "Notes required for rejection") : u("devportal.common.noPermission", "You do not have permission to perform this action"),
301
291
  children: [a ? /* @__PURE__ */ k(T, {
302
292
  size: 14,
303
293
  className: "animate-spin",
@@ -311,11 +301,11 @@ var M = ({ manifest: e, tr: t }) => {
311
301
  ]
312
302
  })]
313
303
  });
314
- }, I = ({ app: t, onApproveVersion: n, onRejectVersion: r, processingVersionIds: i }) => {
304
+ }, F = ({ app: t, onApproveVersion: n, onRejectVersion: r, processingVersionIds: i }) => {
315
305
  let { navigate: a, basePath: o } = e(), { t: s } = j(), c = (e, t) => {
316
306
  let n = s(e);
317
307
  return n === e ? t : n;
318
- }, [l, u] = h(!1), d = t.versions.edges.map((e) => e.node).filter((e) => e.status === "pending_review");
308
+ }, [l, u] = g(!1), d = t.versions.edges.map((e) => e.node).filter((e) => e.status === "pending_review");
319
309
  return d.length === 0 ? null : /* @__PURE__ */ A("div", {
320
310
  className: "rounded-card border border-border-seam bg-bg-surface overflow-hidden",
321
311
  children: [/* @__PURE__ */ A("div", {
@@ -358,17 +348,17 @@ var M = ({ manifest: e, tr: t }) => {
358
348
  children: [/* @__PURE__ */ A("button", {
359
349
  onClick: () => a?.(`${o}/apps/${t.id}`),
360
350
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
361
- children: [/* @__PURE__ */ k(S, { size: 14 }), c("devportal.view", "View")]
351
+ children: [/* @__PURE__ */ k(C, { size: 14 }), c("devportal.view", "View")]
362
352
  }), /* @__PURE__ */ A("button", {
363
353
  onClick: () => u((e) => !e),
364
354
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
365
- children: [k(l ? y : v, { size: 14 }), c("devportal.review", "Review")]
355
+ children: [k(l ? b : y, { size: 14 }), c("devportal.review", "Review")]
366
356
  })]
367
357
  })
368
358
  ]
369
359
  }), l && /* @__PURE__ */ k("div", {
370
360
  className: "border-t bg-bg-sunken/30 p-4 space-y-4",
371
- children: d.map((e) => /* @__PURE__ */ k(L, {
361
+ children: d.map((e) => /* @__PURE__ */ k(I, {
372
362
  version: e,
373
363
  appId: t.id,
374
364
  appType: t.appType,
@@ -379,8 +369,8 @@ var M = ({ manifest: e, tr: t }) => {
379
369
  }, e.id))
380
370
  })]
381
371
  });
382
- }, L = ({ version: e, appId: t, appType: n, onApprove: r, onReject: i, processing: a, tr: o }) => {
383
- let [s, c] = h(""), l = p(m.APP_APPROVE), u = p(m.APP_REJECT);
372
+ }, I = ({ version: e, appId: t, appType: n, onApprove: r, onReject: i, processing: a, tr: o }) => {
373
+ let [s, c] = g(""), l = m(h.APP_APPROVE), u = m(h.APP_REJECT);
384
374
  return /* @__PURE__ */ A("div", {
385
375
  className: "rounded-md border bg-bg-surface p-4 space-y-3",
386
376
  children: [
@@ -418,7 +408,7 @@ var M = ({ manifest: e, tr: t }) => {
418
408
  className: "text-sm text-text-secondary",
419
409
  children: e.releaseNotes
420
410
  }),
421
- N[n] ? /* @__PURE__ */ k(P, {
411
+ M[n] ? /* @__PURE__ */ k(N, {
422
412
  appType: n,
423
413
  packageUrl: e.packageUrl,
424
414
  packageSize: e.packageSize,
@@ -432,7 +422,7 @@ var M = ({ manifest: e, tr: t }) => {
432
422
  rel: "noopener noreferrer",
433
423
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
434
424
  children: [
435
- /* @__PURE__ */ k(x, { size: 14 }),
425
+ /* @__PURE__ */ k(S, { size: 14 }),
436
426
  o("devportal.downloadPackage", "Download Package"),
437
427
  e.packageSize && /* @__PURE__ */ A("span", {
438
428
  className: "text-text-secondary text-xs ml-1",
@@ -445,7 +435,7 @@ var M = ({ manifest: e, tr: t }) => {
445
435
  ]
446
436
  })
447
437
  }),
448
- e.manifest && /* @__PURE__ */ k(M, {
438
+ e.manifest && /* @__PURE__ */ k(p, {
449
439
  manifest: e.manifest,
450
440
  tr: o
451
441
  }),
@@ -469,7 +459,7 @@ var M = ({ manifest: e, tr: t }) => {
469
459
  children: [a ? /* @__PURE__ */ k(T, {
470
460
  size: 14,
471
461
  className: "animate-spin"
472
- }) : /* @__PURE__ */ k(_, { size: 14 }), o("devportal.approveVersion", "Approve Version")]
462
+ }) : /* @__PURE__ */ k(v, { size: 14 }), o("devportal.approveVersion", "Approve Version")]
473
463
  }), /* @__PURE__ */ A("button", {
474
464
  onClick: () => i(e.id, t, s),
475
465
  disabled: a || !s.trim() || !u.allowed,
@@ -483,11 +473,11 @@ var M = ({ manifest: e, tr: t }) => {
483
473
  })
484
474
  ]
485
475
  });
486
- }, R = () => {
476
+ }, L = () => {
487
477
  let { t: e } = j(), i = (t, n) => {
488
478
  let r = e(t);
489
479
  return r === t ? n : r;
490
- }, [p, v] = h(""), [y, x] = h(/* @__PURE__ */ new Set()), [S, C] = h(/* @__PURE__ */ new Set()), [E, O] = h(null), [M, N] = h(null), P = (e) => x((t) => new Set(t).add(e)), L = (e) => x((t) => {
480
+ }, [p, m] = g(""), [y, b] = g(/* @__PURE__ */ new Set()), [S, C] = g(/* @__PURE__ */ new Set()), [E, O] = g(null), [M, N] = g(null), I = (e) => b((t) => new Set(t).add(e)), L = (e) => b((t) => {
491
481
  let n = new Set(t);
492
482
  return n.delete(e), n;
493
483
  }), R = (e) => C((t) => new Set(t).add(e)), z = (e) => C((t) => {
@@ -503,7 +493,7 @@ var M = ({ manifest: e, tr: t }) => {
503
493
  variables: { limit: 100 },
504
494
  fetchPolicy: "cache-and-network"
505
495
  }), [K] = n(), [q] = s(), [J] = r(), [Y] = c(), X = B?.applications?.edges?.map((e) => e.node) ?? [], Z = W?.applicationsWithPendingVersions?.edges?.map((e) => e.node) ?? [], Q = new Set(Z.map((e) => e.id)), $ = p ? X.filter((e) => e.name.toLowerCase().includes(p.toLowerCase()) || (e.shortDescription ?? "").toLowerCase().includes(p.toLowerCase())) : X, ee = async (e, t) => {
506
- P(e), O(null), N(null);
496
+ I(e), O(null), N(null);
507
497
  try {
508
498
  let n = await K({ variables: {
509
499
  id: e,
@@ -518,7 +508,7 @@ var M = ({ manifest: e, tr: t }) => {
518
508
  }
519
509
  }, te = async (e, t) => {
520
510
  if (t.trim()) {
521
- P(e), O(null), N(null);
511
+ I(e), O(null), N(null);
522
512
  try {
523
513
  let n = await q({ variables: {
524
514
  id: e,
@@ -576,7 +566,7 @@ var M = ({ manifest: e, tr: t }) => {
576
566
  children: /* @__PURE__ */ A("div", {
577
567
  className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center",
578
568
  children: [
579
- /* @__PURE__ */ k(g, { className: "mx-auto h-8 w-8 text-status-error-text" }),
569
+ /* @__PURE__ */ k(_, { className: "mx-auto h-8 w-8 text-status-error-text" }),
580
570
  /* @__PURE__ */ k("p", {
581
571
  className: "mt-2 text-sm text-text-secondary",
582
572
  children: l(H)
@@ -589,7 +579,7 @@ var M = ({ manifest: e, tr: t }) => {
589
579
  ]
590
580
  })
591
581
  }) : /* @__PURE__ */ k(f, {
592
- permission: m.REVIEW_MANAGE,
582
+ permission: h.REVIEW_MANAGE,
593
583
  children: /* @__PURE__ */ A(u, {
594
584
  title: i("devportal.appReviewQueue", "App Review Queue"),
595
585
  description: i("devportal.appReviewQueueFullDescription", "Review submitted applications for approval or rejection"),
@@ -607,7 +597,7 @@ var M = ({ manifest: e, tr: t }) => {
607
597
  children: [
608
598
  /* @__PURE__ */ A("div", {
609
599
  className: "flex items-center gap-2",
610
- children: [/* @__PURE__ */ k(b, {
600
+ children: [/* @__PURE__ */ k(x, {
611
601
  size: 18,
612
602
  className: "text-status-warning-text"
613
603
  }), /* @__PURE__ */ A("span", {
@@ -644,11 +634,11 @@ var M = ({ manifest: e, tr: t }) => {
644
634
  }),
645
635
  M && /* @__PURE__ */ A("div", {
646
636
  className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
647
- children: [/* @__PURE__ */ k(_, { size: 16 }), M]
637
+ children: [/* @__PURE__ */ k(v, { size: 16 }), M]
648
638
  }),
649
639
  E && /* @__PURE__ */ A("div", {
650
640
  className: "flex items-center gap-2 rounded-lg border border-status-error-border/50 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
651
- children: [/* @__PURE__ */ k(g, { size: 16 }), E]
641
+ children: [/* @__PURE__ */ k(_, { size: 16 }), E]
652
642
  }),
653
643
  X.length > 0 && /* @__PURE__ */ A("div", {
654
644
  className: "relative max-w-sm",
@@ -659,7 +649,7 @@ var M = ({ manifest: e, tr: t }) => {
659
649
  type: "text",
660
650
  placeholder: i("devportal.searchSubmittedApps", "Search submitted apps..."),
661
651
  value: p,
662
- onChange: (e) => v(e.target.value),
652
+ onChange: (e) => m(e.target.value),
663
653
  className: "w-full rounded-md border bg-bg-surface pl-9 pr-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
664
654
  })]
665
655
  }),
@@ -667,12 +657,12 @@ var M = ({ manifest: e, tr: t }) => {
667
657
  title: i("devportal.newAppSubmissions", "New App Submissions"),
668
658
  children: $.length === 0 ? /* @__PURE__ */ k(t, {
669
659
  illustration: "empty-data",
670
- icon: /* @__PURE__ */ k(_, { size: 32 }),
660
+ icon: /* @__PURE__ */ k(v, { size: 32 }),
671
661
  title: i("devportal.noAppsPendingReview", "No apps pending review"),
672
662
  description: p ? i("devportal.noAppsMatchSearch", "No apps match your search") : i("devportal.allApplicationsReviewed", "All submitted applications have been reviewed")
673
663
  }) : /* @__PURE__ */ k("div", {
674
664
  className: "space-y-3",
675
- children: $.map((e) => /* @__PURE__ */ k(F, {
665
+ children: $.map((e) => /* @__PURE__ */ k(P, {
676
666
  app: e,
677
667
  onApprove: ee,
678
668
  onReject: te,
@@ -690,7 +680,7 @@ var M = ({ manifest: e, tr: t }) => {
690
680
  description: i("devportal.allVersionsReviewed", "All version updates from published apps have been reviewed")
691
681
  }) : /* @__PURE__ */ k("div", {
692
682
  className: "space-y-3",
693
- children: Z.map((e) => /* @__PURE__ */ k(I, {
683
+ children: Z.map((e) => /* @__PURE__ */ k(F, {
694
684
  app: e,
695
685
  onApproveVersion: ne,
696
686
  onRejectVersion: re,
@@ -703,6 +693,6 @@ var M = ({ manifest: e, tr: t }) => {
703
693
  });
704
694
  };
705
695
  //#endregion
706
- export { R as AdminReviewPage };
696
+ export { L as AdminReviewPage };
707
697
 
708
698
  //# sourceMappingURL=AdminReviewPage.js.map