@wso2/am-core-ui 0.0.18 → 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 (48) hide show
  1. package/dist/APIKeysManager-C0phJriD.js +241 -0
  2. package/dist/CatalogKindListing-DvUuZEpc.js +137 -0
  3. package/dist/CodeBlock-B2Ecl916.js +21736 -0
  4. package/dist/EnvironmentCard-CIXhDhlZ.js +319 -0
  5. package/dist/EnvironmentSelector-D8S6nO9u.js +48 -0
  6. package/dist/IsolationTierIndicator-cf90kgjL.js +81 -0
  7. package/dist/LabelChips-7rA7_yre.js +139 -0
  8. package/dist/MCPLogo-D9IJzzl7.js +30 -0
  9. package/dist/PolicyListSection-D6aVSKwP.js +1143 -0
  10. package/dist/ResourceListShell-DFisKftq.js +463 -0
  11. package/dist/SwaggerSpecViewer-DzjR6U6W.js +106 -0
  12. package/dist/clipboard-YAzStmkw.js +23 -0
  13. package/dist/debounce-D17ObVdG.js +208 -0
  14. package/dist/format-wlHhWjGo.js +29 -0
  15. package/dist/formatDistanceToNow-DyjnT7l9.js +100 -0
  16. package/dist/gatewayScripts-D4ZDEDPS.js +72 -0
  17. package/dist/highlight-BsUzxSR3.js +454 -0
  18. package/dist/{index-CnXsN5I3.js → index-3K-zqdp-.js} +34 -33
  19. package/dist/index-6liAPSDn.js +1564 -0
  20. package/dist/index-B3ASENUJ.js +1290 -0
  21. package/dist/index-B7Pf4oPq.js +3069 -0
  22. package/dist/index-BNO3FhZK.js +2304 -0
  23. package/dist/index-BUZSfCl5.js +335 -0
  24. package/dist/index-BXiG1r_o.js +1409 -0
  25. package/dist/index-BYy7Iaam.js +459 -0
  26. package/dist/index-BbB_yx4V.js +1397 -0
  27. package/dist/index-BjWJ95lH.js +2728 -0
  28. package/dist/index-ByEInFlf.js +26408 -0
  29. package/dist/index-C8WIhzyz.js +123 -0
  30. package/dist/index-CnzvaT6b.js +2368 -0
  31. package/dist/index-CrnCf-hJ.js +763 -0
  32. package/dist/index-Cvsho9xg.js +2346 -0
  33. package/dist/index-CxnAo1_c.js +119 -0
  34. package/dist/{index-DYV1jEai.js → index-Cz7-AZwE.js} +22 -20
  35. package/dist/index-DBdRFjxm.js +1264 -0
  36. package/dist/index-DFsSvmMZ.js +7981 -0
  37. package/dist/index-DslzOSGN.js +2549 -0
  38. package/dist/index-DvpYvchM.js +2341 -0
  39. package/dist/index-PWsNvJB-.js +546 -0
  40. package/dist/index.d.ts +1398 -481
  41. package/dist/index.js +539 -438
  42. package/dist/js-yaml-CvhD-clg.js +1335 -0
  43. package/dist/llmProviderPayload-BPzWDy7n.js +332 -0
  44. package/dist/schemas-DFScWdSL.js +2969 -0
  45. package/package.json +1 -1
  46. package/dist/index-B47EJCom.js +0 -236
  47. package/dist/index-Bl1Y7Sro.js +0 -3037
  48. package/dist/index-DlS9Lybj.js +0 -80691
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wso2/am-core-ui",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -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-DlS9Lybj.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
- };