@wso2/am-core-ui 0.0.17 → 0.0.19
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/APIKeysManager-C0phJriD.js +241 -0
- package/dist/CatalogKindListing-DtFI2YMG.js +118 -0
- package/dist/CodeBlock-mB_Loq7I.js +21736 -0
- package/dist/EnvironmentCard-09h1XRxx.js +310 -0
- package/dist/EnvironmentSelector-B7Bl93s2.js +48 -0
- package/dist/MCPLogo-D9IJzzl7.js +30 -0
- package/dist/PolicyListSection-o4k9e8XO.js +2475 -0
- package/dist/ResourceListShell-Cx6mdeqv.js +463 -0
- package/dist/SwaggerSpecViewer-BvkhoKsi.js +106 -0
- package/dist/clipboard-YAzStmkw.js +23 -0
- package/dist/debounce-BV83M53b.js +208 -0
- package/dist/format-BEZZRyE2.js +29 -0
- package/dist/formatDistanceToNow-TErllcH8.js +100 -0
- package/dist/gatewayScripts-D8O45W8u.js +72 -0
- package/dist/highlight-BsUzxSR3.js +454 -0
- package/dist/index-B52h3RHg.js +1290 -0
- package/dist/index-BP5drcF2.js +1265 -0
- package/dist/index-BZ4vxviI.js +7981 -0
- package/dist/index-B_Z0MwXk.js +25012 -0
- package/dist/index-BfjzUWDa.js +1397 -0
- package/dist/{index-CDm_burV.js → index-BnV-PkwM.js} +22 -20
- package/dist/index-CGDYgUCH.js +711 -0
- package/dist/index-COt7nJIf.js +2286 -0
- package/dist/index-CWZjOy1h.js +2247 -0
- package/dist/index-CezvogTQ.js +116 -0
- package/dist/index-CgCWbWzN.js +2342 -0
- package/dist/index-CjCkcuuI.js +322 -0
- package/dist/index-CjXvuf9m.js +1354 -0
- package/dist/index-DD4qF7gq.js +2340 -0
- package/dist/index-DeQ-9KTC.js +737 -0
- package/dist/index-Df6OBy4E.js +3041 -0
- package/dist/index-KRsV2L4V.js +1564 -0
- package/dist/index-PUuASE1F.js +2507 -0
- package/dist/index-PWsNvJB-.js +546 -0
- package/dist/index-UqDmyMSA.js +119 -0
- package/dist/index-_0Pj_ZtW.js +459 -0
- package/dist/{index-DJABKRWO.js → index-sr-mWz4T.js} +31 -30
- package/dist/index.d.ts +496 -200
- package/dist/index.js +462 -439
- package/dist/llmProviderPayload-CzihkdNa.js +332 -0
- package/dist/schemas-DFScWdSL.js +2969 -0
- package/package.json +1 -1
- package/dist/index-B0d-vovv.js +0 -236
- package/dist/index-CCmLfbLS.js +0 -80707
- package/dist/index-qanXZe0s.js +0 -3037
package/package.json
CHANGED
package/dist/index-B0d-vovv.js
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { c as we } from "react/compiler-runtime";
|
|
3
|
-
import { useState as _, useEffect as ne } from "react";
|
|
4
|
-
import { useParams as ge } from "react-router-dom";
|
|
5
|
-
import { useTheme as Pe, Alert as ie, Stack as S, Form as d, Box as he, Button as oe, Typography as pe, Tab as le, Tabs as ye } from "@wso2/oxygen-ui";
|
|
6
|
-
import { Q as be, R as ve, S as _e, T as C, P as Ce } from "./index-CCmLfbLS.js";
|
|
7
|
-
import "@tanstack/react-query";
|
|
8
|
-
const je = () => {
|
|
9
|
-
const e = we(72), me = Pe(), {
|
|
10
|
-
userInfo: r
|
|
11
|
-
} = be(), {
|
|
12
|
-
orgId: m
|
|
13
|
-
} = ge(), [c, ce] = _("profile"), J = r?.username || "", K = r?.givenName || "", V = r?.familyName || "", W = r?.email || "";
|
|
14
|
-
let x;
|
|
15
|
-
e[0] !== J || e[1] !== K || e[2] !== V || e[3] !== W ? (x = {
|
|
16
|
-
username: J,
|
|
17
|
-
given_name: K,
|
|
18
|
-
family_name: V,
|
|
19
|
-
email: W
|
|
20
|
-
}, e[0] = J, e[1] = K, e[2] = V, e[3] = W, e[4] = x) : x = e[4];
|
|
21
|
-
const [a, w] = _(x);
|
|
22
|
-
let T;
|
|
23
|
-
e[5] === Symbol.for("react.memo_cache_sentinel") ? (T = {}, e[5] = T) : T = e[5];
|
|
24
|
-
const [i, N] = _(T), {
|
|
25
|
-
mutateAsync: g,
|
|
26
|
-
isPending: u,
|
|
27
|
-
error: I
|
|
28
|
-
} = ve();
|
|
29
|
-
let E;
|
|
30
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (E = {
|
|
31
|
-
currentPassword: "",
|
|
32
|
-
newPassword: "",
|
|
33
|
-
confirmPassword: ""
|
|
34
|
-
}, e[6] = E) : E = e[6];
|
|
35
|
-
const [n, X] = _(E);
|
|
36
|
-
let k;
|
|
37
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (k = {}, e[7] = k) : k = e[7];
|
|
38
|
-
const [o, U] = _(k), [j, q] = _(""), de = Se, Y = m || "default", Z = r?.sub || "";
|
|
39
|
-
let B;
|
|
40
|
-
e[8] !== Y || e[9] !== Z ? (B = {
|
|
41
|
-
orgName: Y,
|
|
42
|
-
userId: Z
|
|
43
|
-
}, e[8] = Y, e[9] = Z, e[10] = B) : B = e[10];
|
|
44
|
-
const {
|
|
45
|
-
data: f
|
|
46
|
-
} = _e(B);
|
|
47
|
-
let A, D;
|
|
48
|
-
e[11] !== f ? (A = () => {
|
|
49
|
-
f?.attributes && w({
|
|
50
|
-
username: f.attributes.username || "",
|
|
51
|
-
given_name: f.attributes.given_name || "",
|
|
52
|
-
family_name: f.attributes.family_name || "",
|
|
53
|
-
email: f.attributes.email || ""
|
|
54
|
-
});
|
|
55
|
-
}, D = [f], e[11] = f, e[12] = A, e[13] = D) : (A = e[12], D = e[13]), ne(A, D);
|
|
56
|
-
let H;
|
|
57
|
-
e[14] !== r?.email || e[15] !== r?.familyName || e[16] !== r?.givenName || e[17] !== r?.username ? (H = () => {
|
|
58
|
-
w({
|
|
59
|
-
username: r?.username || "",
|
|
60
|
-
given_name: r?.givenName || "",
|
|
61
|
-
family_name: r?.familyName || "",
|
|
62
|
-
email: r?.email || ""
|
|
63
|
-
});
|
|
64
|
-
}, e[14] = r?.email, e[15] = r?.familyName, e[16] = r?.givenName, e[17] = r?.username, e[18] = H) : H = e[18];
|
|
65
|
-
let M;
|
|
66
|
-
e[19] !== r ? (M = [r], e[19] = r, e[20] = M) : M = e[20], ne(H, M);
|
|
67
|
-
let $;
|
|
68
|
-
e[21] === Symbol.for("react.memo_cache_sentinel") ? ($ = (s, fe) => {
|
|
69
|
-
ce(fe), q("");
|
|
70
|
-
}, e[21] = $) : $ = e[21];
|
|
71
|
-
const ue = $;
|
|
72
|
-
let F;
|
|
73
|
-
e[22] !== a.email || e[23] !== a.username ? (F = () => {
|
|
74
|
-
const s = {};
|
|
75
|
-
return a.username.trim() || (s.username = "Username is required"), a.email.trim() ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.email) || (s.email = "Invalid email format") : s.email = "Email is required", N(s), Object.keys(s).length === 0;
|
|
76
|
-
}, e[22] = a.email, e[23] = a.username, e[24] = F) : F = e[24];
|
|
77
|
-
const ee = F;
|
|
78
|
-
let L;
|
|
79
|
-
e[25] !== n.confirmPassword || e[26] !== n.newPassword ? (L = () => {
|
|
80
|
-
const s = {};
|
|
81
|
-
return n.newPassword.trim() ? n.newPassword.length < 8 && (s.newPassword = "Password must be at least 8 characters") : s.newPassword = "New password is required", n.newPassword !== n.confirmPassword && (s.confirmPassword = "Passwords do not match"), U(s), Object.keys(s).length === 0;
|
|
82
|
-
}, e[25] = n.confirmPassword, e[26] = n.newPassword, e[27] = L) : L = e[27];
|
|
83
|
-
const ae = L;
|
|
84
|
-
let O;
|
|
85
|
-
e[28] !== m || e[29] !== a.email || e[30] !== a.family_name || e[31] !== a.given_name || e[32] !== a.username || e[33] !== g || e[34] !== r || e[35] !== ee ? (O = async () => {
|
|
86
|
-
if (!(!ee() || !m || !r?.sub))
|
|
87
|
-
try {
|
|
88
|
-
await g({
|
|
89
|
-
params: {
|
|
90
|
-
orgName: m,
|
|
91
|
-
userId: r.sub
|
|
92
|
-
},
|
|
93
|
-
body: {
|
|
94
|
-
attributes: {
|
|
95
|
-
username: a.username.trim(),
|
|
96
|
-
given_name: a.given_name.trim(),
|
|
97
|
-
family_name: a.family_name.trim(),
|
|
98
|
-
email: a.email.trim()
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}), q("Profile updated successfully"), N({});
|
|
102
|
-
} catch {
|
|
103
|
-
}
|
|
104
|
-
}, e[28] = m, e[29] = a.email, e[30] = a.family_name, e[31] = a.given_name, e[32] = a.username, e[33] = g, e[34] = r, e[35] = ee, e[36] = O) : O = e[36];
|
|
105
|
-
const re = O;
|
|
106
|
-
let G;
|
|
107
|
-
e[37] !== n.newPassword || e[38] !== m || e[39] !== g || e[40] !== r || e[41] !== ae ? (G = async () => {
|
|
108
|
-
if (!(!ae() || !m || !r?.sub))
|
|
109
|
-
try {
|
|
110
|
-
await g({
|
|
111
|
-
params: {
|
|
112
|
-
orgName: m,
|
|
113
|
-
userId: r.sub
|
|
114
|
-
},
|
|
115
|
-
body: {
|
|
116
|
-
attributes: {
|
|
117
|
-
password: n.newPassword
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}), q("Password updated successfully"), X({
|
|
121
|
-
currentPassword: "",
|
|
122
|
-
newPassword: "",
|
|
123
|
-
confirmPassword: ""
|
|
124
|
-
}), U({});
|
|
125
|
-
} catch {
|
|
126
|
-
}
|
|
127
|
-
}, e[37] = n.newPassword, e[38] = m, e[39] = g, e[40] = r, e[41] = ae, e[42] = G) : G = e[42];
|
|
128
|
-
const se = G;
|
|
129
|
-
let P;
|
|
130
|
-
e[43] !== j ? (P = j && /* @__PURE__ */ t(ie, { severity: "success", onClose: () => q(""), children: j }), e[43] = j, e[44] = P) : P = e[44];
|
|
131
|
-
let h;
|
|
132
|
-
e[45] !== I ? (h = !!I && /* @__PURE__ */ t(ie, { severity: "error", children: de(I) }), e[45] = I, e[46] = h) : h = e[46];
|
|
133
|
-
const te = `1px solid ${me.palette.divider}`;
|
|
134
|
-
let p;
|
|
135
|
-
e[47] !== te ? (p = {
|
|
136
|
-
borderBottom: te
|
|
137
|
-
}, e[47] = te, e[48] = p) : p = e[48];
|
|
138
|
-
let Q, R;
|
|
139
|
-
e[49] === Symbol.for("react.memo_cache_sentinel") ? (Q = /* @__PURE__ */ t(le, { label: "Profile Information", value: "profile" }), R = /* @__PURE__ */ t(le, { label: "Change Password", value: "password" }), e[49] = Q, e[50] = R) : (Q = e[49], R = e[50]);
|
|
140
|
-
let y;
|
|
141
|
-
e[51] !== c || e[52] !== p ? (y = /* @__PURE__ */ l(ye, { value: c, onChange: ue, sx: p, children: [
|
|
142
|
-
Q,
|
|
143
|
-
R
|
|
144
|
-
] }), e[51] = c, e[52] = p, e[53] = y) : y = e[53];
|
|
145
|
-
let b;
|
|
146
|
-
e[54] !== c || e[55] !== re || e[56] !== u || e[57] !== a || e[58] !== i ? (b = c === "profile" && /* @__PURE__ */ l(S, { spacing: 3, children: [
|
|
147
|
-
/* @__PURE__ */ l(d.Section, { children: [
|
|
148
|
-
/* @__PURE__ */ t(d.Header, { children: "Account Information" }),
|
|
149
|
-
/* @__PURE__ */ l(d.Stack, { spacing: 2, children: [
|
|
150
|
-
/* @__PURE__ */ t(C, { label: "Username", required: !0, value: a.username, onChange: (s) => {
|
|
151
|
-
w({
|
|
152
|
-
...a,
|
|
153
|
-
username: s.target.value
|
|
154
|
-
}), i.username && N({
|
|
155
|
-
...i,
|
|
156
|
-
username: ""
|
|
157
|
-
});
|
|
158
|
-
}, error: !!i.username, helperText: i.username }),
|
|
159
|
-
/* @__PURE__ */ t(C, { label: "Email", type: "email", required: !0, value: a.email, onChange: (s) => {
|
|
160
|
-
w({
|
|
161
|
-
...a,
|
|
162
|
-
email: s.target.value
|
|
163
|
-
}), i.email && N({
|
|
164
|
-
...i,
|
|
165
|
-
email: ""
|
|
166
|
-
});
|
|
167
|
-
}, error: !!i.email, helperText: i.email })
|
|
168
|
-
] })
|
|
169
|
-
] }),
|
|
170
|
-
/* @__PURE__ */ l(d.Section, { children: [
|
|
171
|
-
/* @__PURE__ */ t(d.Header, { children: "Personal Information" }),
|
|
172
|
-
/* @__PURE__ */ t(d.Stack, { spacing: 2, children: /* @__PURE__ */ l(he, { sx: {
|
|
173
|
-
display: "grid",
|
|
174
|
-
gap: 2,
|
|
175
|
-
gridTemplateColumns: {
|
|
176
|
-
xs: "1fr",
|
|
177
|
-
sm: "1fr 1fr"
|
|
178
|
-
}
|
|
179
|
-
}, children: [
|
|
180
|
-
/* @__PURE__ */ t(C, { label: "First Name", value: a.given_name, onChange: (s) => w({
|
|
181
|
-
...a,
|
|
182
|
-
given_name: s.target.value
|
|
183
|
-
}) }),
|
|
184
|
-
/* @__PURE__ */ t(C, { label: "Last Name", value: a.family_name, onChange: (s) => w({
|
|
185
|
-
...a,
|
|
186
|
-
family_name: s.target.value
|
|
187
|
-
}) })
|
|
188
|
-
] }) })
|
|
189
|
-
] }),
|
|
190
|
-
/* @__PURE__ */ t(S, { direction: "row", spacing: 1, justifyContent: "flex-end", children: /* @__PURE__ */ t(oe, { variant: "contained", onClick: re, disabled: u, children: u ? "Saving..." : "Save Changes" }) })
|
|
191
|
-
] }), e[54] = c, e[55] = re, e[56] = u, e[57] = a, e[58] = i, e[59] = b) : b = e[59];
|
|
192
|
-
let v;
|
|
193
|
-
e[60] !== c || e[61] !== n || e[62] !== o || e[63] !== se || e[64] !== u ? (v = c === "password" && /* @__PURE__ */ l(S, { spacing: 3, children: [
|
|
194
|
-
/* @__PURE__ */ l(d.Section, { children: [
|
|
195
|
-
/* @__PURE__ */ t(d.Header, { children: "Update Password" }),
|
|
196
|
-
/* @__PURE__ */ t(pe, { variant: "body2", color: "text.secondary", sx: {
|
|
197
|
-
mb: 2
|
|
198
|
-
}, children: "Enter a new password to update your account security." }),
|
|
199
|
-
/* @__PURE__ */ l(d.Stack, { spacing: 2, children: [
|
|
200
|
-
/* @__PURE__ */ t(C, { label: "New Password", type: "password", showPasswordToggle: !0, required: !0, value: n.newPassword, onChange: (s) => {
|
|
201
|
-
X({
|
|
202
|
-
...n,
|
|
203
|
-
newPassword: s.target.value
|
|
204
|
-
}), o.newPassword && U({
|
|
205
|
-
...o,
|
|
206
|
-
newPassword: ""
|
|
207
|
-
});
|
|
208
|
-
}, error: !!o.newPassword, helperText: o.newPassword || "Minimum 8 characters" }),
|
|
209
|
-
/* @__PURE__ */ t(C, { label: "Confirm Password", type: "password", showPasswordToggle: !0, required: !0, value: n.confirmPassword, onChange: (s) => {
|
|
210
|
-
X({
|
|
211
|
-
...n,
|
|
212
|
-
confirmPassword: s.target.value
|
|
213
|
-
}), o.confirmPassword && U({
|
|
214
|
-
...o,
|
|
215
|
-
confirmPassword: ""
|
|
216
|
-
});
|
|
217
|
-
}, error: !!o.confirmPassword, helperText: o.confirmPassword })
|
|
218
|
-
] })
|
|
219
|
-
] }),
|
|
220
|
-
/* @__PURE__ */ t(S, { direction: "row", spacing: 1, justifyContent: "flex-end", children: /* @__PURE__ */ t(oe, { variant: "contained", onClick: se, disabled: u || !n.newPassword, children: u ? "Updating..." : "Update Password" }) })
|
|
221
|
-
] }), e[60] = c, e[61] = n, e[62] = o, e[63] = se, e[64] = u, e[65] = v) : v = e[65];
|
|
222
|
-
let z;
|
|
223
|
-
return e[66] !== P || e[67] !== h || e[68] !== y || e[69] !== b || e[70] !== v ? (z = /* @__PURE__ */ t(Ce, { title: "Profile Settings", disableIcon: !0, children: /* @__PURE__ */ l(S, { spacing: 3, children: [
|
|
224
|
-
P,
|
|
225
|
-
h,
|
|
226
|
-
y,
|
|
227
|
-
b,
|
|
228
|
-
v
|
|
229
|
-
] }) }), e[66] = P, e[67] = h, e[68] = y, e[69] = b, e[70] = v, e[71] = z) : z = e[71], z;
|
|
230
|
-
};
|
|
231
|
-
function Se(e) {
|
|
232
|
-
return e && typeof e == "object" && "message" in e ? e.message : "An error occurred";
|
|
233
|
-
}
|
|
234
|
-
export {
|
|
235
|
-
je as ProfilePage
|
|
236
|
-
};
|