@access-ci/ui 0.19.1 → 0.20.0

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.
@@ -86,7 +86,7 @@ function Ct(e = [], t = []) {
86
86
  return e.length !== t.length || e.some((r, o) => !Object.is(r, t[o]));
87
87
  }
88
88
  const At = he(
89
- () => import("./access-qa-bot-BHGE7Oub.js").then((e) => ({
89
+ () => import("./access-qa-bot-1Ht8U9av.js").then((e) => ({
90
90
  default: e.QABot
91
91
  }))
92
92
  );
@@ -103,28 +103,30 @@ let Ne = class extends Ve {
103
103
  userEmail: l,
104
104
  userName: p,
105
105
  accessId: u,
106
- onAnalyticsEvent: d,
107
- qaEndpoint: m,
106
+ resourceContext: d,
107
+ onAnalyticsEvent: m,
108
+ qaEndpoint: b,
108
109
  ratingEndpoint: x
109
- } = this.props, b = n || void 0 || null;
110
- if (!b)
110
+ } = this.props, h = n || void 0 || null;
111
+ if (!h)
111
112
  return console.error("QA Bot: No valid API key provided"), null;
112
- const h = r !== void 0 ? r : document.cookie.split("; ").includes("SESSaccesscisso=1");
113
+ const f = r !== void 0 ? r : document.cookie.split("; ").includes("SESSaccesscisso=1");
113
114
  return /* @__PURE__ */ g(Oe, { children: /* @__PURE__ */ g(Me, { fallback: null, children: /* @__PURE__ */ g(
114
115
  At,
115
116
  {
116
117
  welcome: t,
117
- isLoggedIn: h,
118
+ isLoggedIn: f,
118
119
  open: o,
119
120
  onOpenChange: a,
120
121
  embedded: i === !0,
121
- apiKey: b,
122
+ apiKey: h,
122
123
  loginUrl: s,
123
124
  userEmail: l,
124
125
  userName: p,
125
126
  accessId: u,
126
- onAnalyticsEvent: d,
127
- qaEndpoint: m,
127
+ resourceContext: d,
128
+ onAnalyticsEvent: m,
129
+ qaEndpoint: b,
128
130
  ratingEndpoint: x
129
131
  }
130
132
  ) }) });
@@ -436,7 +438,7 @@ const Ke = [
436
438
  resourceGroups: [],
437
439
  resourceGroupIds: []
438
440
  }
439
- ], x = r.filter((h) => h.rollup_info_resourceids).map((h) => ({
441
+ ], b = r.filter((h) => h.rollup_info_resourceids).map((h) => ({
440
442
  infoGroupId: h.info_groupid,
441
443
  name: h.group_descriptive_name,
442
444
  description: h.group_description,
@@ -454,25 +456,25 @@ const Ke = [
454
456
  resources: i.filter(
455
457
  (f) => h.rollup_info_resourceids.includes(f.info_resourceid)
456
458
  )
457
- })), b = x.find(
459
+ })), x = b.find(
458
460
  (h) => h.infoGroupId === "cloudbank.access-ci.org"
459
461
  );
460
- if (b)
462
+ if (x)
461
463
  for (const h of [
462
464
  "Amazon Web Services",
463
465
  "Google Cloud",
464
466
  "IBM Cloud",
465
467
  "Microsoft Azure"
466
468
  ])
467
- x.push({
468
- ...b,
469
- infoGroupId: `${h.toLowerCase().replaceAll(" ", "-")}${b.infoGroupId}`,
470
- parentInfoGroupId: b.infoGroupId,
469
+ b.push({
470
+ ...x,
471
+ infoGroupId: `${h.toLowerCase().replaceAll(" ", "-")}${x.infoGroupId}`,
472
+ parentInfoGroupId: x.infoGroupId,
471
473
  name: h
472
474
  });
473
- return x.sort((h, f) => h.name.localeCompare(f.name)), Ot({
475
+ return b.sort((h, f) => h.name.localeCompare(f.name)), Ot({
474
476
  resourceCategories: m,
475
- resourceGroups: x,
477
+ resourceGroups: b,
476
478
  tags: p,
477
479
  tagCategories: s
478
480
  });
@@ -520,13 +522,13 @@ const Ke = [
520
522
  for (let u of e) {
521
523
  let d = !0;
522
524
  for (let m of l) {
523
- let x = !1;
524
- for (let b of m.tags)
525
- if (s.has(b.tagId) && u.tags.includes(b)) {
526
- x = !0;
525
+ let b = !1;
526
+ for (let x of m.tags)
527
+ if (s.has(x.tagId) && u.tags.includes(x)) {
528
+ b = !0;
527
529
  break;
528
530
  }
529
- if (!x) {
531
+ if (!b) {
530
532
  d = !1;
531
533
  break;
532
534
  }
@@ -633,7 +635,7 @@ const Ke = [
633
635
  parentId: p = "root",
634
636
  setOpen: u
635
637
  }) => {
636
- const d = mt(), m = l[p] == d, x = m || e == n, b = () => u({ ...l, [p]: m ? null : d });
638
+ const d = mt(), m = l[p] == d, b = m || e == n, x = () => u({ ...l, [p]: m ? null : d });
637
639
  if (o) return /* @__PURE__ */ g("div", { dangerouslySetInnerHTML: { __html: o } });
638
640
  if (r || s)
639
641
  return /* @__PURE__ */ g(
@@ -650,10 +652,10 @@ const Ke = [
650
652
  i && /* @__PURE__ */ g(
651
653
  "button",
652
654
  {
653
- "aria-expanded": x,
655
+ "aria-expanded": b,
654
656
  "aria-controls": d,
655
- className: `item ${x ? "expanded" : "collapsed"}`,
656
- onClick: b,
657
+ className: `item ${b ? "expanded" : "collapsed"}`,
658
+ onClick: x,
657
659
  children: i
658
660
  }
659
661
  ),
@@ -662,8 +664,8 @@ const Ke = [
662
664
  {
663
665
  className: t,
664
666
  id: d,
665
- hidden: !x,
666
- "aria-hidden": !x,
667
+ hidden: !b,
668
+ "aria-hidden": !b,
667
669
  children: a.map(
668
670
  ({ autoOpenMode: h, classes: f, href: w, html: v, items: y, name: E, onClick: A }) => /* @__PURE__ */ g("li", { className: f || "", children: /* @__PURE__ */ g(
669
671
  Ye,
@@ -866,14 +868,14 @@ function Ht(e, t, r, o = {}) {
866
868
  }
867
869
  n && l && l({ action: s, location: h.location, delta: 1 });
868
870
  }
869
- function x(f, w) {
871
+ function b(f, w) {
870
872
  s = "REPLACE";
871
873
  let v = Se(f) ? f : de(h.location, f, w);
872
874
  p = u();
873
875
  let y = Re(v, p), E = h.createHref(v.unstable_mask || v);
874
876
  i.replaceState(y, "", E), n && l && l({ action: s, location: h.location, delta: 0 });
875
877
  }
876
- function b(f) {
878
+ function x(f) {
877
879
  return Gt(f);
878
880
  }
879
881
  let h = {
@@ -893,9 +895,9 @@ function Ht(e, t, r, o = {}) {
893
895
  createHref(f) {
894
896
  return t(a, f);
895
897
  },
896
- createURL: b,
898
+ createURL: x,
897
899
  encodeLocation(f) {
898
- let w = b(f);
900
+ let w = x(f);
899
901
  return {
900
902
  pathname: w.pathname,
901
903
  search: w.search,
@@ -903,7 +905,7 @@ function Ht(e, t, r, o = {}) {
903
905
  };
904
906
  },
905
907
  push: m,
906
- replace: x,
908
+ replace: b,
907
909
  go(f) {
908
910
  return i.go(f);
909
911
  }
@@ -1063,11 +1065,11 @@ function te(e, t) {
1063
1065
  params: o.reduce(
1064
1066
  (p, { paramName: u, isOptional: d }, m) => {
1065
1067
  if (u === "*") {
1066
- let b = s[m] || "";
1067
- i = n.slice(0, n.length - b.length).replace(/(.)\/+$/, "$1");
1068
+ let x = s[m] || "";
1069
+ i = n.slice(0, n.length - x.length).replace(/(.)\/+$/, "$1");
1068
1070
  }
1069
- const x = s[m];
1070
- return d && !x ? p[u] = void 0 : p[u] = (x || "").replace(/%2F/g, "/"), p;
1071
+ const b = s[m];
1072
+ return d && !b ? p[u] = void 0 : p[u] = (b || "").replace(/%2F/g, "/"), p;
1071
1073
  },
1072
1074
  {}
1073
1075
  ),
@@ -1394,21 +1396,21 @@ Please change the parent <Route path="${f}"> to <Route path="${f === "/" ? "*" :
1394
1396
  ), d = f;
1395
1397
  } else
1396
1398
  d = u;
1397
- let m = d.pathname || "/", x = m;
1399
+ let m = d.pathname || "/", b = m;
1398
1400
  if (l !== "/") {
1399
1401
  let f = l.replace(/^\//, "").split("/");
1400
- x = "/" + m.replace(/^\//, "").split("/").slice(f.length).join("/");
1402
+ b = "/" + m.replace(/^\//, "").split("/").slice(f.length).join("/");
1401
1403
  }
1402
- let b = We(e, { pathname: x });
1404
+ let x = We(e, { pathname: b });
1403
1405
  B(
1404
- p || b != null,
1406
+ p || x != null,
1405
1407
  `No routes matched location "${d.pathname}${d.search}${d.hash}" `
1406
1408
  ), B(
1407
- b == null || b[b.length - 1].route.element !== void 0 || b[b.length - 1].route.Component !== void 0 || b[b.length - 1].route.lazy !== void 0,
1409
+ x == null || x[x.length - 1].route.element !== void 0 || x[x.length - 1].route.Component !== void 0 || x[x.length - 1].route.lazy !== void 0,
1408
1410
  `Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
1409
1411
  );
1410
1412
  let h = Vr(
1411
- b && b.map(
1413
+ x && x.map(
1412
1414
  (f) => Object.assign({}, f, {
1413
1415
  params: Object.assign({}, i, f.params),
1414
1416
  pathname: R([
@@ -1579,8 +1581,8 @@ function Vr(e, t = [], r) {
1579
1581
  for (let u = 0; u < a.length; u++) {
1580
1582
  let d = a[u];
1581
1583
  if ((d.route.HydrateFallback || d.route.hydrateFallbackElement) && (s = u), d.route.id) {
1582
- let { loaderData: m, errors: x } = o, b = d.route.loader && !m.hasOwnProperty(d.route.id) && (!x || x[d.route.id] === void 0);
1583
- if (d.route.lazy || b) {
1584
+ let { loaderData: m, errors: b } = o, x = d.route.loader && !m.hasOwnProperty(d.route.id) && (!b || b[d.route.id] === void 0);
1585
+ if (d.route.lazy || x) {
1584
1586
  r.isStatic && (i = !0), s >= 0 ? a = a.slice(0, s + 1) : a = [a[0]];
1585
1587
  break;
1586
1588
  }
@@ -1597,15 +1599,15 @@ function Vr(e, t = [], r) {
1597
1599
  } : void 0;
1598
1600
  return a.reduceRight(
1599
1601
  (u, d, m) => {
1600
- let x, b = !1, h = null, f = null;
1601
- o && (x = n && d.route.id ? n[d.route.id] : void 0, h = d.route.errorElement || Ir, i && (s < 0 && m === 0 ? (at(
1602
+ let b, x = !1, h = null, f = null;
1603
+ o && (b = n && d.route.id ? n[d.route.id] : void 0, h = d.route.errorElement || Ir, i && (s < 0 && m === 0 ? (at(
1602
1604
  "route-fallback",
1603
1605
  !1,
1604
1606
  "No `HydrateFallback` element provided to render during initial hydration"
1605
- ), b = !0, f = null) : s === m && (b = !0, f = d.route.hydrateFallbackElement || null)));
1607
+ ), x = !0, f = null) : s === m && (x = !0, f = d.route.hydrateFallbackElement || null)));
1606
1608
  let w = t.concat(a.slice(0, m + 1)), v = () => {
1607
1609
  let y;
1608
- return x ? y = h : b ? y = f : d.route.Component ? y = /* @__PURE__ */ c.createElement(d.route.Component, null) : d.route.element ? y = d.route.element : y = u, /* @__PURE__ */ c.createElement(
1610
+ return b ? y = h : x ? y = f : d.route.Component ? y = /* @__PURE__ */ c.createElement(d.route.Component, null) : d.route.element ? y = d.route.element : y = u, /* @__PURE__ */ c.createElement(
1609
1611
  Ur,
1610
1612
  {
1611
1613
  match: d,
@@ -1624,7 +1626,7 @@ function Vr(e, t = [], r) {
1624
1626
  location: o.location,
1625
1627
  revalidation: o.revalidation,
1626
1628
  component: h,
1627
- error: x,
1629
+ error: b,
1628
1630
  children: v(),
1629
1631
  routeContext: { outlet: null, matches: w, isDataRoute: !0 },
1630
1632
  onError: p
@@ -1738,8 +1740,8 @@ function Lr({
1738
1740
  search: u = "",
1739
1741
  hash: d = "",
1740
1742
  state: m = null,
1741
- key: x = "default",
1742
- unstable_mask: b
1743
+ key: b = "default",
1744
+ unstable_mask: x
1743
1745
  } = r, h = c.useMemo(() => {
1744
1746
  let f = I(p, s);
1745
1747
  return f == null ? null : {
@@ -1748,8 +1750,8 @@ function Lr({
1748
1750
  search: u,
1749
1751
  hash: d,
1750
1752
  state: m,
1751
- key: x,
1752
- unstable_mask: b
1753
+ key: b,
1754
+ unstable_mask: x
1753
1755
  },
1754
1756
  navigationType: o
1755
1757
  };
@@ -1759,9 +1761,9 @@ function Lr({
1759
1761
  u,
1760
1762
  d,
1761
1763
  m,
1762
- x,
1764
+ b,
1763
1765
  o,
1764
- b
1766
+ x
1765
1767
  ]);
1766
1768
  return B(
1767
1769
  h != null,
@@ -2048,20 +2050,20 @@ function io(e, t) {
2048
2050
  };
2049
2051
  }
2050
2052
  }, [o]);
2051
- let x = () => {
2053
+ let b = () => {
2052
2054
  a(!0);
2053
- }, b = () => {
2055
+ }, x = () => {
2054
2056
  a(!1), i(!1);
2055
2057
  };
2056
2058
  return r ? e !== "intent" ? [n, m, {}] : [
2057
2059
  n,
2058
2060
  m,
2059
2061
  {
2060
- onFocus: W(s, x),
2061
- onBlur: W(l, b),
2062
- onMouseEnter: W(p, x),
2063
- onMouseLeave: W(u, b),
2064
- onTouchStart: W(d, x)
2062
+ onFocus: W(s, b),
2063
+ onBlur: W(l, x),
2064
+ onMouseEnter: W(p, b),
2065
+ onMouseLeave: W(u, x),
2066
+ onTouchStart: W(d, b)
2065
2067
  }
2066
2068
  ] : [!1, m, {}];
2067
2069
  }
@@ -2144,11 +2146,11 @@ function co({
2144
2146
  t,
2145
2147
  e,
2146
2148
  i
2147
- ]), x = c.useMemo(
2149
+ ]), b = c.useMemo(
2148
2150
  () => to(d, n),
2149
2151
  [d, n]
2150
- ), b = lo(d);
2151
- return /* @__PURE__ */ c.createElement(c.Fragment, null, m.map((h) => /* @__PURE__ */ c.createElement("link", { key: h, rel: "prefetch", as: "fetch", href: h, ...r })), x.map((h) => /* @__PURE__ */ c.createElement("link", { key: h, rel: "modulepreload", href: h, ...r })), b.map(({ key: h, link: f }) => (
2152
+ ), x = lo(d);
2153
+ return /* @__PURE__ */ c.createElement(c.Fragment, null, m.map((h) => /* @__PURE__ */ c.createElement("link", { key: h, rel: "prefetch", as: "fetch", href: h, ...r })), b.map((h) => /* @__PURE__ */ c.createElement("link", { key: h, rel: "modulepreload", href: h, ...r })), x.map(({ key: h, link: f }) => (
2152
2154
  // these don't spread `linkProps` because they are full link descriptors
2153
2155
  // already with their own props
2154
2156
  /* @__PURE__ */ c.createElement(
@@ -2218,8 +2220,8 @@ var st = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, lt = c.forwardRef(
2218
2220
  to: u,
2219
2221
  preventScrollReset: d,
2220
2222
  viewTransition: m,
2221
- unstable_defaultShouldRevalidate: x,
2222
- ...b
2223
+ unstable_defaultShouldRevalidate: b,
2224
+ ...x
2223
2225
  }, h) {
2224
2226
  let { basename: f, navigator: w, unstable_useTransitions: v } = c.useContext(S), y = typeof u == "string" && st.test(u), E = je(u, f);
2225
2227
  u = E.to;
@@ -2235,7 +2237,7 @@ var st = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, lt = c.forwardRef(
2235
2237
  }
2236
2238
  let [D, Y, ae] = io(
2237
2239
  o,
2238
- b
2240
+ x
2239
2241
  ), ut = bo(u, {
2240
2242
  replace: i,
2241
2243
  unstable_mask: s,
@@ -2244,7 +2246,7 @@ var st = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, lt = c.forwardRef(
2244
2246
  preventScrollReset: d,
2245
2247
  relative: a,
2246
2248
  viewTransition: m,
2247
- unstable_defaultShouldRevalidate: x,
2249
+ unstable_defaultShouldRevalidate: b,
2248
2250
  unstable_useTransitions: v
2249
2251
  });
2250
2252
  function ht(O) {
@@ -2255,7 +2257,7 @@ var st = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, lt = c.forwardRef(
2255
2257
  /* @__PURE__ */ c.createElement(
2256
2258
  "a",
2257
2259
  {
2258
- ...b,
2260
+ ...x,
2259
2261
  ...ae,
2260
2262
  href: (ye ? z : void 0) || E.absoluteURL || A,
2261
2263
  onClick: ye ? ht : t,
@@ -2281,9 +2283,9 @@ var fo = c.forwardRef(
2281
2283
  children: l,
2282
2284
  ...p
2283
2285
  }, u) {
2284
- let d = X(i, { relative: p.relative }), m = N(), x = c.useContext(re), { navigator: b, basename: h } = c.useContext(S), f = x != null && // Conditional usage is OK here because the usage of a data router is static
2286
+ let d = X(i, { relative: p.relative }), m = N(), b = c.useContext(re), { navigator: x, basename: h } = c.useContext(S), f = b != null && // Conditional usage is OK here because the usage of a data router is static
2285
2287
  // eslint-disable-next-line react-hooks/rules-of-hooks
2286
- ko(d) && s === !0, w = b.encodeLocation ? b.encodeLocation(d).pathname : d.pathname, v = m.pathname, y = x && x.navigation && x.navigation.location ? x.navigation.location.pathname : null;
2288
+ ko(d) && s === !0, w = x.encodeLocation ? x.encodeLocation(d).pathname : d.pathname, v = m.pathname, y = b && b.navigation && b.navigation.location ? b.navigation.location.pathname : null;
2287
2289
  r || (v = v.toLowerCase(), y = y ? y.toLowerCase() : null, w = w.toLowerCase()), y && h && (y = I(y, h) || y);
2288
2290
  const E = w !== "/" && w.endsWith("/") ? w.length - 1 : w.length;
2289
2291
  let A = v === w || !a && v.startsWith(w) && v.charAt(E) === "/", M = y != null && (y === w || !a && y.startsWith(w) && y.charAt(w.length) === "/"), z = {
@@ -2329,8 +2331,8 @@ var go = c.forwardRef(
2329
2331
  preventScrollReset: u,
2330
2332
  viewTransition: d,
2331
2333
  unstable_defaultShouldRevalidate: m,
2332
- ...x
2333
- }, b) => {
2334
+ ...b
2335
+ }, x) => {
2334
2336
  let { unstable_useTransitions: h } = c.useContext(S), f = vo(), w = yo(s, { relative: p }), v = i.toLowerCase() === "get" ? "get" : "post", y = typeof s == "string" && st.test(s), E = (A) => {
2335
2337
  if (l && l(A), A.defaultPrevented) return;
2336
2338
  A.preventDefault();
@@ -2350,11 +2352,11 @@ var go = c.forwardRef(
2350
2352
  return /* @__PURE__ */ c.createElement(
2351
2353
  "form",
2352
2354
  {
2353
- ref: b,
2355
+ ref: x,
2354
2356
  method: v,
2355
2357
  action: w,
2356
2358
  onSubmit: o ? l : E,
2357
- ...x,
2359
+ ...b,
2358
2360
  "data-discover": !y && e === "render" ? "true" : void 0
2359
2361
  }
2360
2362
  );
@@ -2381,11 +2383,11 @@ function bo(e, {
2381
2383
  } = {}) {
2382
2384
  let u = Sr(), d = N(), m = X(e, { relative: i });
2383
2385
  return c.useCallback(
2384
- (x) => {
2385
- if (Hr(x, t)) {
2386
- x.preventDefault();
2387
- let b = r !== void 0 ? r : q(d) === q(m), h = () => u(e, {
2388
- replace: b,
2386
+ (b) => {
2387
+ if (Hr(b, t)) {
2388
+ b.preventDefault();
2389
+ let x = r !== void 0 ? r : q(d) === q(m), h = () => u(e, {
2390
+ replace: x,
2389
2391
  unstable_mask: o,
2390
2392
  state: a,
2391
2393
  preventScrollReset: n,
@@ -2484,7 +2486,7 @@ function ko(e, { relative: t } = {}) {
2484
2486
  let n = I(r.currentLocation.pathname, o) || r.currentLocation.pathname, i = I(r.nextLocation.pathname, o) || r.nextLocation.pathname;
2485
2487
  return te(a.pathname, i) != null || te(a.pathname, n) != null;
2486
2488
  }
2487
- const Co = he(() => import("./resource-group-detail-BJk__qB6.js")), Ao = he(() => import("./resource-home-CU9-W9SO.js"));
2489
+ const Co = he(() => import("./resource-group-detail-BsiOEkZi.js")), Ao = he(() => import("./resource-home-BCJ_BjYn.js"));
2488
2490
  function Eo({
2489
2491
  accessId: e,
2490
2492
  baseUri: t = "/resources",
@@ -1,4 +1,4 @@
1
- import { i as a, F as o, j as t, H as r, Q as n, R as u, S as l, T as M, U as m, k as i, l as c, m as b, n as f, o as d, p as v, q as C, r as g, t as B, v as F, w as I, x as p } from "./access-ci-ui-react-DBM8Z2Gd.js";
1
+ import { i as a, F as o, j as t, H as r, Q as n, R as u, S as l, T as M, U as m, k as i, l as c, m as b, n as f, o as d, p as v, q as C, r as g, t as B, v as F, w as I, x as p } from "./access-ci-ui-react-CuWJlegQ.js";
2
2
  export {
3
3
  a as Breadcrumbs,
4
4
  o as Footer,