@wso2/am-core-ui 0.0.19 → 0.0.20

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 (51) hide show
  1. package/dist/CatalogKindListing-DvUuZEpc.js +137 -0
  2. package/dist/{CodeBlock-mB_Loq7I.js → CodeBlock-B2Ecl916.js} +1 -1
  3. package/dist/EnvironmentCard-CIXhDhlZ.js +319 -0
  4. package/dist/{EnvironmentSelector-B7Bl93s2.js → EnvironmentSelector-D8S6nO9u.js} +1 -1
  5. package/dist/IsolationTierIndicator-cf90kgjL.js +81 -0
  6. package/dist/LabelChips-7rA7_yre.js +139 -0
  7. package/dist/PolicyListSection-D6aVSKwP.js +1143 -0
  8. package/dist/{ResourceListShell-Cx6mdeqv.js → ResourceListShell-DFisKftq.js} +1 -1
  9. package/dist/{SwaggerSpecViewer-BvkhoKsi.js → SwaggerSpecViewer-DzjR6U6W.js} +1 -1
  10. package/dist/{debounce-BV83M53b.js → debounce-D17ObVdG.js} +1 -1
  11. package/dist/{format-BEZZRyE2.js → format-wlHhWjGo.js} +1 -1
  12. package/dist/{formatDistanceToNow-TErllcH8.js → formatDistanceToNow-DyjnT7l9.js} +11 -11
  13. package/dist/{gatewayScripts-D8O45W8u.js → gatewayScripts-D4ZDEDPS.js} +1 -1
  14. package/dist/{index-sr-mWz4T.js → index-3K-zqdp-.js} +32 -32
  15. package/dist/{index-KRsV2L4V.js → index-6liAPSDn.js} +160 -160
  16. package/dist/{index-B52h3RHg.js → index-B3ASENUJ.js} +109 -109
  17. package/dist/index-B7Pf4oPq.js +3069 -0
  18. package/dist/index-BNO3FhZK.js +2304 -0
  19. package/dist/index-BUZSfCl5.js +335 -0
  20. package/dist/index-BXiG1r_o.js +1409 -0
  21. package/dist/{index-_0Pj_ZtW.js → index-BYy7Iaam.js} +40 -40
  22. package/dist/{index-BfjzUWDa.js → index-BbB_yx4V.js} +103 -103
  23. package/dist/index-BjWJ95lH.js +2728 -0
  24. package/dist/{index-B_Z0MwXk.js → index-ByEInFlf.js} +10916 -9520
  25. package/dist/index-C8WIhzyz.js +123 -0
  26. package/dist/index-CnzvaT6b.js +2368 -0
  27. package/dist/index-CrnCf-hJ.js +763 -0
  28. package/dist/{index-CgCWbWzN.js → index-Cvsho9xg.js} +381 -377
  29. package/dist/{index-UqDmyMSA.js → index-CxnAo1_c.js} +21 -21
  30. package/dist/{index-BnV-PkwM.js → index-Cz7-AZwE.js} +2 -2
  31. package/dist/{index-BP5drcF2.js → index-DBdRFjxm.js} +232 -233
  32. package/dist/{index-BZ4vxviI.js → index-DFsSvmMZ.js} +5 -5
  33. package/dist/index-DslzOSGN.js +2549 -0
  34. package/dist/{index-DD4qF7gq.js → index-DvpYvchM.js} +101 -100
  35. package/dist/index.d.ts +784 -163
  36. package/dist/index.js +532 -454
  37. package/dist/js-yaml-CvhD-clg.js +1335 -0
  38. package/dist/{llmProviderPayload-CzihkdNa.js → llmProviderPayload-BPzWDy7n.js} +2 -2
  39. package/package.json +1 -1
  40. package/dist/CatalogKindListing-DtFI2YMG.js +0 -118
  41. package/dist/EnvironmentCard-09h1XRxx.js +0 -310
  42. package/dist/PolicyListSection-o4k9e8XO.js +0 -2475
  43. package/dist/index-CGDYgUCH.js +0 -711
  44. package/dist/index-COt7nJIf.js +0 -2286
  45. package/dist/index-CWZjOy1h.js +0 -2247
  46. package/dist/index-CezvogTQ.js +0 -116
  47. package/dist/index-CjCkcuuI.js +0 -322
  48. package/dist/index-CjXvuf9m.js +0 -1354
  49. package/dist/index-DeQ-9KTC.js +0 -737
  50. package/dist/index-Df6OBy4E.js +0 -3041
  51. package/dist/index-PUuASE1F.js +0 -2507
@@ -0,0 +1,137 @@
1
+ import { jsx as t, jsxs as v, Fragment as j } from "react/jsx-runtime";
2
+ import { useState as L, useRef as B, useEffect as H, useCallback as I, useMemo as O } from "react";
3
+ import { Typography as k, Form as E, Tooltip as D, Box as T, Stack as R, SearchBar as W, Skeleton as $, ListingTable as N, TablePagination as z } from "@wso2/oxygen-ui";
4
+ import { CircleIcon as F, Search as G } from "@wso2/oxygen-ui-icons-react";
5
+ import { c as K } from "react/compiler-runtime";
6
+ import { Link as M } from "react-router-dom";
7
+ import { a as U } from "./LabelChips-7rA7_yre.js";
8
+ const V = (g) => {
9
+ const e = K(33), {
10
+ item: l,
11
+ viewPath: d
12
+ } = g, s = l.description ?? "", i = l.latestVersion ? `Latest: ${l.latestVersion}` : null;
13
+ let u;
14
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (u = {
15
+ textDecoration: "none"
16
+ }, e[0] = u) : u = e[0];
17
+ let x;
18
+ e[1] === Symbol.for("react.memo_cache_sentinel") ? (x = {
19
+ width: "100%",
20
+ textAlign: "left",
21
+ textDecoration: "none",
22
+ height: 160,
23
+ display: "flex",
24
+ flexDirection: "column",
25
+ justifyContent: "flex-start"
26
+ }, e[1] = x) : x = e[1];
27
+ let y;
28
+ e[2] === Symbol.for("react.memo_cache_sentinel") ? (y = {
29
+ pb: 0.5
30
+ }, e[2] = y) : y = e[2];
31
+ let c;
32
+ e[3] !== l.displayName ? (c = /* @__PURE__ */ t(k, { variant: "h6", textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "nowrap", children: l.displayName }), e[3] = l.displayName, e[4] = c) : c = e[4];
33
+ let m;
34
+ e[5] !== l.displayName || e[6] !== c ? (m = /* @__PURE__ */ t(E.CardHeader, { sx: y, title: /* @__PURE__ */ t(D, { title: l.displayName, placement: "top", children: c }) }), e[5] = l.displayName, e[6] = c, e[7] = m) : m = e[7];
35
+ let r;
36
+ e[8] === Symbol.for("react.memo_cache_sentinel") ? (r = {
37
+ width: "100%",
38
+ display: "flex",
39
+ flexDirection: "column",
40
+ flexGrow: 1,
41
+ minHeight: 0,
42
+ pt: 0
43
+ }, e[8] = r) : r = e[8];
44
+ const w = !s;
45
+ let o;
46
+ e[9] === Symbol.for("react.memo_cache_sentinel") ? (o = {
47
+ display: "-webkit-box",
48
+ WebkitBoxOrient: "vertical",
49
+ WebkitLineClamp: 2,
50
+ overflow: "hidden"
51
+ }, e[9] = o) : o = e[9];
52
+ const P = s || "No description provided.";
53
+ let h;
54
+ e[10] !== P ? (h = /* @__PURE__ */ t(k, { variant: "caption", color: "text.secondary", sx: o, children: P }), e[10] = P, e[11] = h) : h = e[11];
55
+ let p;
56
+ e[12] !== s || e[13] !== h || e[14] !== w ? (p = /* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(D, { title: s, placement: "top", disableHoverListener: w, children: h }) }), e[12] = s, e[13] = h, e[14] = w, e[15] = p) : p = e[15];
57
+ let a;
58
+ e[16] !== i ? (a = i && /* @__PURE__ */ t(k, { variant: "caption", color: "text.secondary", children: i }), e[16] = i, e[17] = a) : a = e[17];
59
+ let n;
60
+ e[18] !== p || e[19] !== a ? (n = /* @__PURE__ */ v(R, { spacing: 0.5, minHeight: 0, children: [
61
+ p,
62
+ a
63
+ ] }), e[18] = p, e[19] = a, e[20] = n) : n = e[20];
64
+ let C;
65
+ e[21] === Symbol.for("react.memo_cache_sentinel") ? (C = {
66
+ mt: "auto",
67
+ pt: 1
68
+ }, e[21] = C) : C = e[21];
69
+ let f;
70
+ e[22] !== l.labels ? (f = /* @__PURE__ */ t(T, { sx: C, children: /* @__PURE__ */ t(U, { labels: l.labels }) }), e[22] = l.labels, e[23] = f) : f = e[23];
71
+ let b;
72
+ e[24] !== n || e[25] !== f ? (b = /* @__PURE__ */ v(E.CardContent, { sx: r, children: [
73
+ n,
74
+ f
75
+ ] }), e[24] = n, e[25] = f, e[26] = b) : b = e[26];
76
+ let S;
77
+ e[27] !== b || e[28] !== m ? (S = /* @__PURE__ */ v(E.CardButton, { sx: x, children: [
78
+ m,
79
+ b
80
+ ] }), e[27] = b, e[28] = m, e[29] = S) : S = e[29];
81
+ let _;
82
+ return e[30] !== S || e[31] !== d ? (_ = /* @__PURE__ */ t(M, { to: d, style: u, children: S }), e[30] = S, e[31] = d, e[32] = _) : _ = e[32], _;
83
+ }, A = 6, q = [6, 12, 24], J = 300, ne = ({
84
+ items: g,
85
+ getViewPath: e,
86
+ isLoading: l
87
+ }) => {
88
+ const [d, s] = L(0), [i, u] = L(A), [x, y] = L(""), [c, m] = L(""), r = B(null);
89
+ H(() => () => {
90
+ r.current && clearTimeout(r.current);
91
+ }, []);
92
+ const w = I((a) => {
93
+ const n = a.target.value;
94
+ y(n), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
95
+ m(n), s(0);
96
+ }, J);
97
+ }, []), o = O(() => {
98
+ const a = c.trim().toLowerCase();
99
+ return a ? g.filter((n) => n.displayName.toLowerCase().includes(a) || n.name.toLowerCase().includes(a) || (n.description ?? "").toLowerCase().includes(a) || // Labels match as `key:value`, so typing "env:prod" (or a fragment
100
+ // of it) filters by label.
101
+ Object.entries(n.labels ?? {}).some(([C, f]) => `${C}:${f}`.toLowerCase().includes(a))) : g;
102
+ }, [g, c]), P = O(() => o.slice(d * i, d * i + i), [o, d, i]), h = (a, n) => {
103
+ s(n);
104
+ }, p = (a) => {
105
+ u(parseInt(a.target.value, 10)), s(0);
106
+ };
107
+ return /* @__PURE__ */ v(R, { spacing: 2, children: [
108
+ /* @__PURE__ */ t(R, { direction: "row", justifyContent: "flex-end", children: /* @__PURE__ */ t(W, { placeholder: "Search agent kinds", size: "small", value: x, onChange: w }) }),
109
+ l ? /* @__PURE__ */ t(T, { sx: {
110
+ display: "grid",
111
+ gridTemplateColumns: {
112
+ xs: "repeat(auto-fill, minmax(260px, 1fr))",
113
+ md: "repeat(auto-fill, minmax(300px, 1fr))"
114
+ },
115
+ gap: 2
116
+ }, children: Array.from({
117
+ length: 6
118
+ }).map((a, n) => /* @__PURE__ */ t($, { variant: "rounded", height: 160 }, n)) }) : g.length === 0 ? /* @__PURE__ */ t(N.Container, { sx: {
119
+ my: 3
120
+ }, children: /* @__PURE__ */ t(N.EmptyState, { illustration: /* @__PURE__ */ t(F, { size: 64 }), title: "No agent kinds available", description: "No agent kinds have been added to the catalog yet." }) }) : o.length === 0 ? /* @__PURE__ */ t(N.Container, { sx: {
121
+ my: 3
122
+ }, children: /* @__PURE__ */ t(N.EmptyState, { illustration: /* @__PURE__ */ t(G, { size: 64 }), title: "No agent kinds match your search", description: "Try a different keyword or clear the search filter." }) }) : /* @__PURE__ */ v(j, { children: [
123
+ /* @__PURE__ */ t(T, { sx: {
124
+ display: "grid",
125
+ gridTemplateColumns: {
126
+ xs: "repeat(auto-fill, minmax(260px, 1fr))",
127
+ md: "repeat(auto-fill, minmax(300px, 1fr))"
128
+ },
129
+ gap: 2
130
+ }, children: P.map((a) => /* @__PURE__ */ t(V, { item: a, viewPath: e(a) }, a.name)) }),
131
+ o.length > A && /* @__PURE__ */ t(z, { component: "div", count: o.length, page: d, rowsPerPage: i, onPageChange: h, onRowsPerPageChange: p, rowsPerPageOptions: q })
132
+ ] })
133
+ ] });
134
+ };
135
+ export {
136
+ ne as C
137
+ };
@@ -4,7 +4,7 @@ import { Tooltip as Mp, IconButton as Fp, Box as Up } from "@wso2/oxygen-ui";
4
4
  import { Copy as Bp } from "@wso2/oxygen-ui-icons-react";
5
5
  import { useState as Pp } from "react";
6
6
  import { h as qp } from "./highlight-BsUzxSR3.js";
7
- import { al as Te, am as Gp } from "./index-B_Z0MwXk.js";
7
+ import { aq as Te, ar as Gp } from "./index-ByEInFlf.js";
8
8
  const $p = ["abap", "abnf", "actionscript", "ada", "agda", "al", "antlr4", "apacheconf", "apex", "apl", "applescript", "aql", "arduino", "arff", "asciidoc", "asm6502", "asmatmel", "aspnet", "autohotkey", "autoit", "avisynth", "avro-idl", "bash", "basic", "batch", "bbcode", "bicep", "birb", "bison", "bnf", "brainfuck", "brightscript", "bro", "bsl", "c", "cfscript", "chaiscript", "cil", "clike", "clojure", "cmake", "cobol", "coffeescript", "concurnas", "coq", "cpp", "crystal", "csharp", "cshtml", "csp", "css-extras", "css", "csv", "cypher", "d", "dart", "dataweave", "dax", "dhall", "diff", "django", "dns-zone-file", "docker", "dot", "ebnf", "editorconfig", "eiffel", "ejs", "elixir", "elm", "erb", "erlang", "etlua", "excel-formula", "factor", "false", "firestore-security-rules", "flow", "fortran", "fsharp", "ftl", "gap", "gcode", "gdscript", "gedcom", "gherkin", "git", "glsl", "gml", "gn", "go-module", "go", "graphql", "groovy", "haml", "handlebars", "haskell", "haxe", "hcl", "hlsl", "hoon", "hpkp", "hsts", "http", "ichigojam", "icon", "icu-message-format", "idris", "iecst", "ignore", "inform7", "ini", "io", "j", "java", "javadoc", "javadoclike", "javascript", "javastacktrace", "jexl", "jolie", "jq", "js-extras", "js-templates", "jsdoc", "json", "json5", "jsonp", "jsstacktrace", "jsx", "julia", "keepalived", "keyman", "kotlin", "kumir", "kusto", "latex", "latte", "less", "lilypond", "liquid", "lisp", "livescript", "llvm", "log", "lolcode", "lua", "magma", "makefile", "markdown", "markup-templating", "markup", "matlab", "maxscript", "mel", "mermaid", "mizar", "mongodb", "monkey", "moonscript", "n1ql", "n4js", "nand2tetris-hdl", "naniscript", "nasm", "neon", "nevod", "nginx", "nim", "nix", "nsis", "objectivec", "ocaml", "opencl", "openqasm", "oz", "parigp", "parser", "pascal", "pascaligo", "pcaxis", "peoplecode", "perl", "php-extras", "php", "phpdoc", "plsql", "powerquery", "powershell", "processing", "prolog", "promql", "properties", "protobuf", "psl", "pug", "puppet", "pure", "purebasic", "purescript", "python", "q", "qml", "qore", "qsharp", "r", "racket", "reason", "regex", "rego", "renpy", "rest", "rip", "roboconf", "robotframework", "ruby", "rust", "sas", "sass", "scala", "scheme", "scss", "shell-session", "smali", "smalltalk", "smarty", "sml", "solidity", "solution-file", "soy", "sparql", "splunk-spl", "sqf", "sql", "squirrel", "stan", "stylus", "swift", "systemd", "t4-cs", "t4-templating", "t4-vb", "tap", "tcl", "textile", "toml", "tremor", "tsx", "tt2", "turtle", "twig", "typescript", "typoscript", "unrealscript", "uorazor", "uri", "v", "vala", "vbnet", "velocity", "verilog", "vhdl", "vim", "visual-basic", "warpscript", "wasm", "web-idl", "wiki", "wolfram", "wren", "xeora", "xml-doc", "xojo", "xquery", "yaml", "yang", "zig"];
9
9
  var De, Do;
10
10
  function Hp() {
@@ -0,0 +1,319 @@
1
+ import { jsxs as a, Fragment as Ee, jsx as s } from "react/jsx-runtime";
2
+ import { c as Be } from "react/compiler-runtime";
3
+ import { o as Ke, c as Me, aL as Ue, p as We, g as oe, N as Ne, n as Ye } from "./index-ByEInFlf.js";
4
+ import "@tanstack/react-query";
5
+ import "react";
6
+ import { useTheme as Pe, Box as u, Button as ae, CircularProgress as Re, Alert as Te, Chip as h, Skeleton as qe, Typography as we, Card as Ce, CardContent as ke, Divider as He } from "@wso2/oxygen-ui";
7
+ import { Clock as Ae, FlaskConical as Je, Rocket as Le, Play as Qe, PauseCircle as Ve, CheckCircle as Xe, Circle as Ze, Link as et, Tag as tt } from "@wso2/oxygen-ui-icons-react";
8
+ import { Link as ce, generatePath as de } from "react-router-dom";
9
+ import { f as st } from "./formatDistanceToNow-DyjnT7l9.js";
10
+ import { I as je } from "./IsolationTierIndicator-cf90kgjL.js";
11
+ var it = /* @__PURE__ */ ((r) => (r.ACTIVE = "active", r.INACTIVE = "not-deployed", r.DEPLOYING = "in-progress", r.ERROR = "error", r.SUSPENDED = "suspended", r.FAILED = "failed", r))(it || {});
12
+ const me = (r) => {
13
+ const e = Be(8), {
14
+ status: c
15
+ } = r, l = Pe();
16
+ if (!c)
17
+ return null;
18
+ if (c === "active") {
19
+ const t = l.vars?.palette?.success?.main;
20
+ let n;
21
+ return e[0] !== t ? (n = /* @__PURE__ */ s(h, { icon: /* @__PURE__ */ s(Xe, { size: 16, color: t }), variant: "outlined", size: "small", label: "Deployed", color: "success" }), e[0] = t, e[1] = n) : n = e[1], n;
22
+ }
23
+ if (c === "not-deployed") {
24
+ const t = l.vars?.palette?.text?.disabled;
25
+ let n;
26
+ return e[2] !== t ? (n = /* @__PURE__ */ s(h, { icon: /* @__PURE__ */ s(Ze, { size: 16, color: t }), variant: "outlined", size: "small", label: "Not Deployed", color: "default" }), e[2] = t, e[3] = n) : n = e[3], n;
27
+ }
28
+ if (c === "in-progress") {
29
+ let t;
30
+ return e[4] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(h, { icon: /* @__PURE__ */ s(Re, { size: 16, color: "warning" }), variant: "outlined", size: "small", label: "Deploying", color: "warning" }), e[4] = t) : t = e[4], t;
31
+ }
32
+ if (c === "error") {
33
+ let t;
34
+ return e[5] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(h, { variant: "outlined", size: "small", label: "Error", color: "error" }), e[5] = t) : t = e[5], t;
35
+ }
36
+ if (c === "failed") {
37
+ let t;
38
+ return e[6] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(h, { variant: "outlined", size: "small", label: "Error", color: "error" }), e[6] = t) : t = e[6], t;
39
+ }
40
+ if (c === "suspended") {
41
+ let t;
42
+ return e[7] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s(h, { icon: /* @__PURE__ */ s(Ve, { size: 16 }), variant: "outlined", size: "small", label: "Suspended", color: "default" }), e[7] = t) : t = e[7], t;
43
+ }
44
+ }, Se = (r) => {
45
+ if (!r)
46
+ return "—";
47
+ const e = r instanceof Date ? r : new Date(r);
48
+ return Number.isNaN(e.getTime()) ? "—" : st(e, {
49
+ addSuffix: !0
50
+ });
51
+ }, yt = (r) => {
52
+ const e = Be(126), {
53
+ environment: c,
54
+ orgId: l,
55
+ projectId: t,
56
+ agentId: n,
57
+ actions: b,
58
+ bottomContent: U,
59
+ isFirstEnvironment: _e
60
+ } = r, W = _e === void 0 ? !0 : _e, $ = Pe();
61
+ let Y;
62
+ e[0] !== n || e[1] !== l || e[2] !== t ? (Y = {
63
+ orgName: l,
64
+ projName: t,
65
+ agentName: n
66
+ }, e[0] = n, e[1] = l, e[2] = t, e[3] = Y) : Y = e[3];
67
+ const {
68
+ data: q,
69
+ isLoading: Fe
70
+ } = Ke(Y), K = q?.provisioning?.type === "external";
71
+ let H;
72
+ e[4] !== n || e[5] !== l || e[6] !== t ? (H = {
73
+ orgName: l,
74
+ projName: t,
75
+ agentName: n
76
+ }, e[4] = n, e[5] = l, e[6] = t, e[7] = H) : H = e[7];
77
+ const ue = !!l && !!t && !!n && !!q && !K;
78
+ let J;
79
+ e[8] !== ue ? (J = {
80
+ enabled: ue
81
+ }, e[8] = ue, e[9] = J) : J = e[9];
82
+ const {
83
+ data: Ge,
84
+ isLoading: Oe
85
+ } = Me(H, J), fe = q?.kindName, pe = fe ?? "";
86
+ let Q;
87
+ e[10] !== l || e[11] !== pe ? (Q = {
88
+ orgName: l,
89
+ kindName: pe
90
+ }, e[10] = l, e[11] = pe, e[12] = Q) : Q = e[12];
91
+ const {
92
+ data: y
93
+ } = Ue(Q), i = Ge?.[c?.name ?? ""], x = `${c?.displayName ?? c?.name ?? "Environment"} Environment`, ge = K ? "" : l, he = K ? "" : t, ye = K ? "" : n;
94
+ let X;
95
+ e[13] !== ge || e[14] !== he || e[15] !== ye ? (X = {
96
+ orgName: ge,
97
+ projName: he,
98
+ agentName: ye
99
+ }, e[13] = ge, e[14] = he, e[15] = ye, e[16] = X) : X = e[16];
100
+ const {
101
+ data: ve
102
+ } = We(X);
103
+ let Z;
104
+ e[17] !== ve?.builds ? (Z = ve?.builds?.some(nt) ?? !1, e[17] = ve?.builds, e[18] = Z) : Z = e[18];
105
+ const ee = Z;
106
+ let be;
107
+ e: {
108
+ if (!i?.imageId || !fe) {
109
+ be = null;
110
+ break e;
111
+ }
112
+ let o;
113
+ e[19] !== i || e[20] !== y ? (o = y?.find((d) => d.imageId === i.imageId), e[19] = i, e[20] = y, e[21] = o) : o = e[21], be = o?.version ?? null;
114
+ }
115
+ const v = be, te = v ? `v${v}` : null;
116
+ let se;
117
+ e[22] !== y ? (se = y?.length ? [...y].sort(lt)[0] : void 0, e[22] = y, e[23] = se) : se = e[23];
118
+ const M = se, ie = !!fe && !!M && !!v && v !== M.version;
119
+ if (Fe || Oe) {
120
+ let o;
121
+ return e[24] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ s(qe, { variant: "rounded", height: 100 }), e[24] = o) : o = e[24], o;
122
+ }
123
+ if (K) {
124
+ let o;
125
+ e[25] !== x ? (o = /* @__PURE__ */ s(we, { variant: "h6", children: x }), e[25] = x, e[26] = o) : o = e[26];
126
+ const p = $.vars?.palette?.success?.main;
127
+ let d;
128
+ e[27] !== p ? (d = /* @__PURE__ */ s(h, { icon: /* @__PURE__ */ s(et, { size: 16, color: p }), variant: "outlined", size: "small", label: "Registered", color: "success" }), e[27] = p, e[28] = d) : d = e[28];
129
+ const f = $.vars?.palette?.text?.secondary;
130
+ let m;
131
+ e[29] !== f ? (m = /* @__PURE__ */ s(Ae, { size: 16, color: f }), e[29] = f, e[30] = m) : m = e[30];
132
+ const g = q?.createdAt;
133
+ let R;
134
+ e[31] !== g ? (R = Se(g), e[31] = g, e[32] = R) : R = e[32];
135
+ let V;
136
+ e[33] !== m || e[34] !== R ? (V = /* @__PURE__ */ a(u, { display: "flex", flexDirection: "row", gap: 1, alignItems: "center", children: [
137
+ m,
138
+ R
139
+ ] }), e[33] = m, e[34] = R, e[35] = V) : V = e[35];
140
+ let F;
141
+ e[36] !== o || e[37] !== d || e[38] !== V ? (F = /* @__PURE__ */ a(u, { display: "flex", flexDirection: "row", gap: 1, alignItems: "center", children: [
142
+ o,
143
+ d,
144
+ V
145
+ ] }), e[36] = o, e[37] = d, e[38] = V, e[39] = F) : F = e[39];
146
+ let G;
147
+ e[40] !== b ? (G = /* @__PURE__ */ s(u, { display: "flex", flexDirection: "row", gap: 1, alignItems: "center", children: b }), e[40] = b, e[41] = G) : G = e[41];
148
+ let O;
149
+ e[42] !== F || e[43] !== G ? (O = /* @__PURE__ */ a(u, { display: "flex", flexDirection: "row", gap: 1, justifyContent: "space-between", alignItems: "center", children: [
150
+ F,
151
+ G
152
+ ] }), e[42] = F, e[43] = G, e[44] = O) : O = e[44];
153
+ let re;
154
+ return e[45] !== U || e[46] !== O ? (re = /* @__PURE__ */ s(Ce, { variant: "outlined", children: /* @__PURE__ */ a(ke, { children: [
155
+ O,
156
+ U
157
+ ] }) }), e[45] = U, e[46] = O, e[47] = re) : re = e[47], re;
158
+ }
159
+ if (!i) {
160
+ let o;
161
+ e[48] === Symbol.for("react.memo_cache_sentinel") ? (o = {
162
+ "&.MuiCard-root": {
163
+ backgroundColor: "background.paper"
164
+ }
165
+ }, e[48] = o) : o = e[48];
166
+ const p = c?.isolationTier;
167
+ let d;
168
+ e[49] !== p ? (d = /* @__PURE__ */ s(je, { tier: p, size: 16 }), e[49] = p, e[50] = d) : d = e[50];
169
+ let f;
170
+ e[51] !== x ? (f = /* @__PURE__ */ s(we, { variant: "h6", children: x }), e[51] = x, e[52] = f) : f = e[52];
171
+ let m;
172
+ e[53] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ s(me, {
173
+ status: "not-deployed"
174
+ /* INACTIVE */
175
+ }), e[53] = m) : m = e[53];
176
+ let g;
177
+ return e[54] !== d || e[55] !== f ? (g = /* @__PURE__ */ s(Ce, { variant: "outlined", sx: o, children: /* @__PURE__ */ s(ke, { children: /* @__PURE__ */ a(u, { display: "flex", flexDirection: "row", gap: 1, alignItems: "center", children: [
178
+ d,
179
+ f,
180
+ m
181
+ ] }) }) }), e[54] = d, e[55] = f, e[56] = g) : g = e[56], g;
182
+ }
183
+ const xe = i.status, $e = xe === "active" || xe === "error" || xe === "failed", De = c?.isolationTier;
184
+ let D;
185
+ e[57] !== De ? (D = /* @__PURE__ */ s(je, { tier: De, size: 16 }), e[57] = De, e[58] = D) : D = e[58];
186
+ const Ie = c?.displayName;
187
+ let I;
188
+ e[59] !== Ie ? (I = /* @__PURE__ */ a(we, { variant: "h6", children: [
189
+ Ie,
190
+ " Environment"
191
+ ] }), e[59] = Ie, e[60] = I) : I = e[60];
192
+ let z;
193
+ e[61] !== i.lastDeployed || e[62] !== i.status || e[63] !== $ ? (z = i?.status === "active" && /* @__PURE__ */ a(Ee, { children: [
194
+ /* @__PURE__ */ s(me, {
195
+ status: "active"
196
+ /* ACTIVE */
197
+ }),
198
+ /* @__PURE__ */ a(u, { display: "flex", flexDirection: "row", gap: 1, alignItems: "center", children: [
199
+ /* @__PURE__ */ s(Ae, { size: 16, color: $.vars?.palette?.text?.secondary }),
200
+ Se(i?.lastDeployed)
201
+ ] })
202
+ ] }), e[61] = i.lastDeployed, e[62] = i.status, e[63] = $, e[64] = z) : z = e[64];
203
+ let N;
204
+ e[65] !== i.status ? (N = (i?.status === "error" || i?.status === "failed") && /* @__PURE__ */ s(me, { status: i.status }), e[65] = i.status, e[66] = N) : N = e[66];
205
+ let w;
206
+ e[67] !== i.status ? (w = i?.status === "suspended" && /* @__PURE__ */ s(me, {
207
+ status: "suspended"
208
+ /* SUSPENDED */
209
+ }), e[67] = i.status, e[68] = w) : w = e[68];
210
+ let C;
211
+ e[69] !== D || e[70] !== I || e[71] !== z || e[72] !== N || e[73] !== w ? (C = /* @__PURE__ */ a(u, { display: "flex", flexDirection: "row", gap: 1, alignItems: "center", children: [
212
+ D,
213
+ I,
214
+ z,
215
+ N,
216
+ w
217
+ ] }), e[69] = D, e[70] = I, e[71] = z, e[72] = N, e[73] = w, e[74] = C) : C = e[74];
218
+ let k;
219
+ e[75] !== te ? (k = te && /* @__PURE__ */ s(h, { icon: /* @__PURE__ */ s(tt, { size: 14 }), label: te, size: "small", variant: "outlined" }), e[75] = te, e[76] = k) : k = e[76];
220
+ let _;
221
+ e[77] !== b || e[78] !== n || e[79] !== i.status || e[80] !== c?.name || e[81] !== l || e[82] !== t ? (_ = i?.status === "active" && /* @__PURE__ */ a(Ee, { children: [
222
+ b,
223
+ /* @__PURE__ */ s(ae, { startIcon: /* @__PURE__ */ s(Je, { size: 16 }), variant: "text", component: ce, to: de(oe.children.org.children.projects.children.agents.children.environment.children.tryOut.path, {
224
+ orgId: l,
225
+ projectId: t,
226
+ agentId: n,
227
+ envId: c?.name ?? ""
228
+ }), color: "primary", size: "small", children: "Try It" })
229
+ ] }), e[77] = b, e[78] = n, e[79] = i.status, e[80] = c?.name, e[81] = l, e[82] = t, e[83] = _) : _ = e[83];
230
+ let E;
231
+ e[84] !== k || e[85] !== _ ? (E = /* @__PURE__ */ a(u, { display: "flex", flexDirection: "row", gap: 1, alignItems: "center", children: [
232
+ k,
233
+ _
234
+ ] }), e[84] = k, e[85] = _, e[86] = E) : E = e[86];
235
+ let T;
236
+ e[87] !== C || e[88] !== E ? (T = /* @__PURE__ */ a(u, { display: "flex", flexDirection: "row", gap: 1, pb: 1, justifyContent: "space-between", alignItems: "center", children: [
237
+ C,
238
+ E
239
+ ] }), e[87] = C, e[88] = E, e[89] = T) : T = e[89];
240
+ let ne;
241
+ e[90] === Symbol.for("react.memo_cache_sentinel") ? (ne = /* @__PURE__ */ s(He, {}), e[90] = ne) : ne = e[90];
242
+ let A;
243
+ e[91] !== n || e[92] !== i.status || e[93] !== ee || e[94] !== W || e[95] !== l || e[96] !== t ? (A = i.status === "not-deployed" && /* @__PURE__ */ s(Ne, { disableBackground: !0, message: "Not Deployed", icon: /* @__PURE__ */ s(Le, { size: 32 }), subtitle: ee ? W ? "A successful build is available. Deploy it to get started." : "Promote a deployment from the previous environment to get started." : "No successful build found. Build the agent before deploying.", action: ee && /* @__PURE__ */ s(ae, { startIcon: /* @__PURE__ */ s(Le, { size: 16 }), variant: "outlined", component: ce, to: de(oe.children.org.children.projects.children.agents.children.deployment.path, {
244
+ orgId: l,
245
+ projectId: t,
246
+ agentId: n
247
+ }), size: "small", children: W ? "Go to Deployment" : "Promote" }) }), e[91] = n, e[92] = i.status, e[93] = ee, e[94] = W, e[95] = l, e[96] = t, e[97] = A) : A = e[97];
248
+ let L;
249
+ e[98] !== i.status ? (L = i.status === "in-progress" && /* @__PURE__ */ s(Ne, { disableBackground: !0, message: "Deploying...", icon: /* @__PURE__ */ s(Re, { size: 32 }) }), e[98] = i.status, e[99] = L) : L = e[99];
250
+ let j;
251
+ e[100] !== n || e[101] !== i.status || e[102] !== l || e[103] !== t ? (j = (i.status === "error" || i.status === "failed") && /* @__PURE__ */ s(Te, { severity: "error", sx: {
252
+ width: "100%"
253
+ }, action: /* @__PURE__ */ s(ae, { component: ce, to: de(oe.children.org.children.projects.children.agents.children.deployment.path, {
254
+ orgId: l,
255
+ projectId: t,
256
+ agentId: n
257
+ }), color: "inherit", size: "small", children: "View Deployment" }), children: "Deployment failed. Check the deployment page for more details." }), e[100] = n, e[101] = i.status, e[102] = l, e[103] = t, e[104] = j) : j = e[104];
258
+ let S;
259
+ e[105] !== n || e[106] !== i.status || e[107] !== l || e[108] !== t ? (S = i.status === "suspended" && /* @__PURE__ */ s(Ne, { disableBackground: !0, message: "Suspended", icon: /* @__PURE__ */ s(Ve, { size: 32 }), subtitle: "This deployment is currently suspended. Resume it from the deployment page to make the agent available again.", action: /* @__PURE__ */ s(ae, { startIcon: /* @__PURE__ */ s(Qe, { size: 16 }), variant: "outlined", component: ce, to: de(oe.children.org.children.projects.children.agents.children.deployment.path, {
260
+ orgId: l,
261
+ projectId: t,
262
+ agentId: n
263
+ }), size: "small", children: "Go to Deployment" }) }), e[105] = n, e[106] = i.status, e[107] = l, e[108] = t, e[109] = S) : S = e[109];
264
+ let B;
265
+ e[110] !== i.endpoints || e[111] !== i.status || e[112] !== v || e[113] !== ie || e[114] !== M ? (B = i.status === "active" && /* @__PURE__ */ a(u, { display: "flex", flexGrow: 1, flexDirection: "column", width: "100%", gap: ie ? 2 : 4, alignItems: "flex-start", children: [
266
+ ie && /* @__PURE__ */ a(Te, { severity: "warning", sx: {
267
+ width: "100%"
268
+ }, children: [
269
+ "A newer version of this Agent Kind is available: ",
270
+ /* @__PURE__ */ a("strong", { children: [
271
+ "v",
272
+ M.version
273
+ ] }),
274
+ ".",
275
+ " ",
276
+ "Currently deployed: ",
277
+ /* @__PURE__ */ a("strong", { children: [
278
+ "v",
279
+ v
280
+ ] }),
281
+ "."
282
+ ] }),
283
+ i.endpoints?.map(rt)
284
+ ] }), e[110] = i.endpoints, e[111] = i.status, e[112] = v, e[113] = ie, e[114] = M, e[115] = B) : B = e[115];
285
+ let P;
286
+ e[116] !== A || e[117] !== L || e[118] !== j || e[119] !== S || e[120] !== B ? (P = /* @__PURE__ */ a(u, { display: "flex", width: "100%", justifyContent: "center", flexDirection: "column", gap: 1, pt: 2, alignItems: "center", children: [
287
+ A,
288
+ L,
289
+ j,
290
+ S,
291
+ B
292
+ ] }), e[116] = A, e[117] = L, e[118] = j, e[119] = S, e[120] = B, e[121] = P) : P = e[121];
293
+ const ze = $e && U;
294
+ let le;
295
+ return e[122] !== T || e[123] !== P || e[124] !== ze ? (le = /* @__PURE__ */ s(Ce, { variant: "outlined", children: /* @__PURE__ */ a(ke, { children: [
296
+ T,
297
+ ne,
298
+ P,
299
+ ze
300
+ ] }) }), e[122] = T, e[123] = P, e[124] = ze, e[125] = le) : le = e[125], le;
301
+ };
302
+ function nt(r) {
303
+ return r.status === "Succeeded" || r.status === "Completed";
304
+ }
305
+ function lt(r, e) {
306
+ return new Date(e.createdAt).getTime() - new Date(r.createdAt).getTime();
307
+ }
308
+ function rt(r) {
309
+ return /* @__PURE__ */ s(Ye, { slotProps: {
310
+ input: {
311
+ readOnly: !0
312
+ }
313
+ }, label: "URL", value: r.url, fullWidth: !0 }, r.url);
314
+ }
315
+ export {
316
+ it as D,
317
+ yt as E,
318
+ me as a
319
+ };
@@ -2,7 +2,7 @@ import { jsx as u, jsxs as g } from "react/jsx-runtime";
2
2
  import { c as y } from "react/compiler-runtime";
3
3
  import { MenuItem as E, Typography as I, FormControl as N, Select as x } from "@wso2/oxygen-ui";
4
4
  import { useParams as j, useLocation as S, useNavigate as $ } from "react-router-dom";
5
- import { k as C } from "./index-B_Z0MwXk.js";
5
+ import { q as C } from "./index-ByEInFlf.js";
6
6
  function L() {
7
7
  const e = y(19), {
8
8
  orgId: v,
@@ -0,0 +1,81 @@
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { c as m } from "react/compiler-runtime";
3
+ import { Tooltip as d, Chip as x, Box as C } from "@wso2/oxygen-ui";
4
+ import { ShieldCheck as p, ShieldPlus as v, Shield as S } from "@wso2/oxygen-ui-icons-react";
5
+ const L = {
6
+ runc: {
7
+ value: "runc",
8
+ tier: 1,
9
+ runtimeLabel: "runc (default)",
10
+ shortLabel: "Sandbox L1",
11
+ fullLabel: "Sandbox Level 1",
12
+ color: "default",
13
+ iconColor: "text.secondary",
14
+ icon: S
15
+ },
16
+ gvisor: {
17
+ value: "gvisor",
18
+ tier: 2,
19
+ runtimeLabel: "gVisor",
20
+ shortLabel: "Sandbox L2",
21
+ fullLabel: "Sandbox Level 2",
22
+ color: "info",
23
+ iconColor: "info.main",
24
+ icon: v
25
+ },
26
+ kata: {
27
+ value: "kata",
28
+ tier: 3,
29
+ runtimeLabel: "Kata Containers",
30
+ shortLabel: "Sandbox L3",
31
+ fullLabel: "Sandbox Level 3",
32
+ color: "success",
33
+ iconColor: "success.main",
34
+ icon: p
35
+ }
36
+ };
37
+ function h(u) {
38
+ return L[u] ?? L.runc;
39
+ }
40
+ function k(u) {
41
+ const e = m(13), {
42
+ tier: a,
43
+ size: s
44
+ } = u, l = s === void 0 ? 18 : s;
45
+ let n;
46
+ e[0] !== a ? (n = h(a), e[0] = a, e[1] = n) : n = e[1];
47
+ const o = n, r = o.icon;
48
+ let t;
49
+ e[2] !== o.iconColor ? (t = {
50
+ color: o.iconColor
51
+ }, e[2] = o.iconColor, e[3] = t) : t = e[3];
52
+ let i;
53
+ e[4] !== r || e[5] !== l ? (i = /* @__PURE__ */ f(r, { size: l }), e[4] = r, e[5] = l, e[6] = i) : i = e[6];
54
+ let c;
55
+ e[7] !== t || e[8] !== i ? (c = /* @__PURE__ */ f(C, { display: "inline-flex", alignItems: "center", sx: t, children: i }), e[7] = t, e[8] = i, e[9] = c) : c = e[9];
56
+ let b;
57
+ return e[10] !== o.fullLabel || e[11] !== c ? (b = /* @__PURE__ */ f(d, { title: o.fullLabel, children: c }), e[10] = o.fullLabel, e[11] = c, e[12] = b) : b = e[12], b;
58
+ }
59
+ function y(u) {
60
+ const e = m(12), {
61
+ tier: a
62
+ } = u;
63
+ let s;
64
+ e[0] !== a ? (s = h(a), e[0] = a, e[1] = s) : s = e[1];
65
+ const l = s, n = l.icon;
66
+ let o;
67
+ e[2] !== n ? (o = /* @__PURE__ */ f(n, { size: 14 }), e[2] = n, e[3] = o) : o = e[3];
68
+ let r;
69
+ e[4] === Symbol.for("react.memo_cache_sentinel") ? (r = {
70
+ cursor: "default"
71
+ }, e[4] = r) : r = e[4];
72
+ let t;
73
+ e[5] !== l.color || e[6] !== l.shortLabel || e[7] !== o ? (t = /* @__PURE__ */ f(x, { icon: o, label: l.shortLabel, size: "small", variant: "outlined", color: l.color, sx: r }), e[5] = l.color, e[6] = l.shortLabel, e[7] = o, e[8] = t) : t = e[8];
74
+ let i;
75
+ return e[9] !== l.fullLabel || e[10] !== t ? (i = /* @__PURE__ */ f(d, { title: l.fullLabel, children: t }), e[9] = l.fullLabel, e[10] = t, e[11] = i) : i = e[11], i;
76
+ }
77
+ export {
78
+ k as I,
79
+ y as a,
80
+ h as g
81
+ };