@apicurio/common-ui-components 2.0.13 → 2.0.15

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.
@@ -13,6 +13,7 @@ export interface AuthService {
13
13
  getToken: () => Promise<string | undefined>;
14
14
  getUsernameAndPassword: () => UsernameAndPassword | undefined;
15
15
  login: (username: string, password: string) => Promise<void>;
16
+ refresh: () => Promise<void>;
16
17
  logout: () => Promise<void>;
17
18
  }
18
19
  /**
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
- import j, { createContext as gt, useContext as ut, useState as T, useEffect as pe, memo as Pe, forwardRef as ne, useCallback as Ne, useMemo as qe } from "react";
1
+ import j, { createContext as gt, useContext as ut, useState as T, useEffect as pe, memo as Pe, forwardRef as ne, useCallback as Ne, useMemo as De } from "react";
2
2
  import { jsx as a, jsxs as v, Fragment as Re } from "react/jsx-runtime";
3
- import { useInterval as _t, Tooltip as pt, EmptyState as oe, EmptyStateVariant as ft, EmptyStateHeader as ae, EmptyStateBody as ve, Spinner as te, Alert as wt, Dropdown as mt, MenuToggle as Je, DropdownList as vt, Divider as Ke, DropdownItem as St, Select as yt, SelectOption as bt, TextInput as ce, Button as le, TextArea as kt, AboutModal as Tt, TextContent as It, Text as De, TextVariants as Le, TextList as $e, TextListItem as b, Modal as Ue, Form as Be, FormGroup as He, Progress as Et, EmptyStateIcon as ze, ChipGroup as Ct, Chip as Pt, InputGroup as Rt, ButtonVariant as Ut, Pagination as xt, PaginationVariant as At, Skeleton as Ot } from "@patternfly/react-core";
4
- import { EllipsisVIcon as Nt, ChevronDownIcon as qt, ChevronRightIcon as Dt, ErrorCircleOIcon as Lt, SearchIcon as $t } from "@patternfly/react-icons";
3
+ import { useInterval as _t, Tooltip as pt, EmptyState as oe, EmptyStateVariant as ft, EmptyStateHeader as ae, EmptyStateBody as ve, Spinner as te, Alert as wt, Dropdown as mt, MenuToggle as Je, DropdownList as vt, Divider as Ke, DropdownItem as St, Select as yt, SelectOption as bt, TextInput as ce, Button as le, TextArea as kt, AboutModal as Tt, TextContent as It, Text as qe, TextVariants as Le, TextList as $e, TextListItem as b, Modal as Ue, Form as Be, FormGroup as He, Progress as Et, EmptyStateIcon as ze, ChipGroup as Ct, Chip as Pt, InputGroup as Rt, ButtonVariant as Ut, Pagination as xt, PaginationVariant as At, Skeleton as Ot } from "@patternfly/react-core";
4
+ import { EllipsisVIcon as Nt, ChevronDownIcon as Dt, ChevronRightIcon as qt, ErrorCircleOIcon as Lt, SearchIcon as $t } from "@patternfly/react-icons";
5
5
  import { DateTime as ie } from "luxon";
6
6
  import { Tr as de, Td as xe, Th as Ht, Table as jt, Thead as Ft, Tbody as Mt, ActionsColumn as Wt } from "@patternfly/react-table";
7
7
  import Jt from "use-resize-observer";
@@ -82,22 +82,22 @@ var Gt = {
82
82
  }
83
83
  e.setLogger = i;
84
84
  })(he || (he = {}));
85
- var p = class D {
85
+ var p = class q {
86
86
  constructor(t) {
87
87
  this._name = t;
88
88
  }
89
89
  /* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
90
90
  debug(...t) {
91
- $ >= 4 && H.debug(D._format(this._name, this._method), ...t);
91
+ $ >= 4 && H.debug(q._format(this._name, this._method), ...t);
92
92
  }
93
93
  info(...t) {
94
- $ >= 3 && H.info(D._format(this._name, this._method), ...t);
94
+ $ >= 3 && H.info(q._format(this._name, this._method), ...t);
95
95
  }
96
96
  warn(...t) {
97
- $ >= 2 && H.warn(D._format(this._name, this._method), ...t);
97
+ $ >= 2 && H.warn(q._format(this._name, this._method), ...t);
98
98
  }
99
99
  error(...t) {
100
- $ >= 1 && H.error(D._format(this._name, this._method), ...t);
100
+ $ >= 1 && H.error(q._format(this._name, this._method), ...t);
101
101
  }
102
102
  /* eslint-enable @typescript-eslint/no-unsafe-enum-comparison */
103
103
  throw(t) {
@@ -108,7 +108,7 @@ var p = class D {
108
108
  return s._method = t, s.debug("begin"), s;
109
109
  }
110
110
  static createStatic(t, s) {
111
- const i = new D(`${t}.${s}`);
111
+ const i = new q(`${t}.${s}`);
112
112
  return i.debug("begin"), i;
113
113
  }
114
114
  static _format(t, s) {
@@ -118,16 +118,16 @@ var p = class D {
118
118
  /* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
119
119
  // helpers for static class methods
120
120
  static debug(t, ...s) {
121
- $ >= 4 && H.debug(D._format(t), ...s);
121
+ $ >= 4 && H.debug(q._format(t), ...s);
122
122
  }
123
123
  static info(t, ...s) {
124
- $ >= 3 && H.info(D._format(t), ...s);
124
+ $ >= 3 && H.info(q._format(t), ...s);
125
125
  }
126
126
  static warn(t, ...s) {
127
- $ >= 2 && H.warn(D._format(t), ...s);
127
+ $ >= 2 && H.warn(q._format(t), ...s);
128
128
  }
129
129
  static error(t, ...s) {
130
- $ >= 1 && H.error(D._format(t), ...s);
130
+ $ >= 1 && H.error(q._format(t), ...s);
131
131
  }
132
132
  /* eslint-enable @typescript-eslint/no-unsafe-enum-comparison */
133
133
  };
@@ -706,7 +706,7 @@ var C = Ve, W = class {
706
706
  fetchRequestCredentials: f,
707
707
  refreshTokenAllowedScope: m,
708
708
  // extra
709
- extraQueryParams: q = {},
709
+ extraQueryParams: D = {},
710
710
  extraTokenParams: J = {},
711
711
  extraHeaders: K = {},
712
712
  dpop: X,
@@ -719,7 +719,7 @@ var C = Ve, W = class {
719
719
  const se = typeof window < "u" ? window.localStorage : new Ge();
720
720
  this.stateStore = new Qe({ store: se });
721
721
  }
722
- if (this.refreshTokenAllowedScope = m, this.extraQueryParams = q, this.extraTokenParams = J, this.extraHeaders = K, this.dpop = X, this.dpop && !((Y = this.dpop) != null && Y.store))
722
+ if (this.refreshTokenAllowedScope = m, this.extraQueryParams = D, this.extraTokenParams = J, this.extraHeaders = K, this.dpop = X, this.dpop && !((Y = this.dpop) != null && Y.store))
723
723
  throw new Error("A DPoPStore is required when dpop is enabled");
724
724
  }
725
725
  }, rs = class {
@@ -2411,31 +2411,37 @@ const Us = (e) => (V = Rs(Cs, e), new Es({
2411
2411
  console.error("[Auth] Error logging in using OIDC: ", e);
2412
2412
  }
2413
2413
  }, As = async () => {
2414
+ try {
2415
+ console.debug("[Auth] Refreshing token using OIDC"), await (u == null ? void 0 : u.signinSilent());
2416
+ } catch (e) {
2417
+ console.error("[Auth] Error refreshing token using OIDC: ", e);
2418
+ }
2419
+ }, Os = async () => {
2414
2420
  const e = await (u == null ? void 0 : u.getUser()), t = e == null ? void 0 : e.id_token;
2415
2421
  return u == null ? void 0 : u.removeUser().then(() => u == null ? void 0 : u.signoutRedirect({
2416
2422
  id_token_hint: t,
2417
2423
  post_logout_redirect_uri: V.logoutUrl || window.location.href
2418
2424
  }));
2419
- }, Os = async () => await (u == null ? void 0 : u.getUser()) != null, Ns = async () => {
2425
+ }, Ns = async () => await (u == null ? void 0 : u.getUser()) != null, Ds = async () => {
2420
2426
  const e = await (u == null ? void 0 : u.getUser());
2421
2427
  return Promise.resolve(e == null ? void 0 : e.access_token);
2422
2428
  }, qs = async () => {
2423
2429
  const e = await (u == null ? void 0 : u.getUser());
2424
2430
  return Promise.resolve(e == null ? void 0 : e.id_token);
2425
- }, Ds = async () => {
2431
+ }, Ls = async () => {
2426
2432
  const e = await (u == null ? void 0 : u.getUser());
2427
2433
  return Promise.resolve(e == null ? void 0 : e.profile.preferred_username);
2428
2434
  };
2429
2435
  let Q, ee;
2430
- const Ls = async (e, t) => {
2436
+ const $s = async (e, t) => {
2431
2437
  try {
2432
2438
  console.debug("[Auth] Setting Username and Password for BasicAuth"), Q = e, ee = t;
2433
2439
  } catch (s) {
2434
2440
  console.error("[Auth] Error logging in using BasicAuth: ", s);
2435
2441
  }
2436
- }, $s = async () => {
2442
+ }, Hs = async () => {
2437
2443
  console.debug("[Auth] Logout for BasicAuth"), Q = void 0, ee = void 0, window.location.reload();
2438
- }, Hs = async () => Q !== void 0 && ee !== void 0, js = async () => Promise.resolve(Q), Fs = () => {
2444
+ }, js = async () => Q !== void 0 && ee !== void 0, Fs = async () => Promise.resolve(Q), Ms = () => {
2439
2445
  if (Q !== void 0 && ee != null)
2440
2446
  return {
2441
2447
  username: Q,
@@ -2446,29 +2452,31 @@ const Ls = async (e, t) => {
2446
2452
  return e.type === "oidc" ? (u === void 0 && (console.debug("[Auth] Creating OIDC UserManager with options: ", e.options), u = Us(e.options)), {
2447
2453
  isOidcAuthEnabled: () => !0,
2448
2454
  isBasicAuthEnabled: () => !1,
2449
- isAuthenticated: Os,
2455
+ isAuthenticated: Ns,
2450
2456
  getToken: async () => {
2451
2457
  if (e.options.logTokens) {
2452
2458
  const t = await (u == null ? void 0 : u.getUser());
2453
2459
  console.debug("[Auth] ID Token:"), console.debug(t == null ? void 0 : t.id_token), console.debug("[Auth] Access Token:"), console.debug(t == null ? void 0 : t.access_token);
2454
2460
  }
2455
- return e.options.tokenType === "id" ? qs() : Ns();
2461
+ return e.options.tokenType === "id" ? qs() : Ds();
2456
2462
  },
2457
2463
  getUsernameAndPassword: () => {
2458
2464
  },
2459
- getUsername: Ds,
2465
+ getUsername: Ls,
2460
2466
  login: xs,
2461
- logout: As
2467
+ refresh: As,
2468
+ logout: Os
2462
2469
  }) : e.type === "basic" ? {
2463
2470
  isOidcAuthEnabled: () => !1,
2464
2471
  isBasicAuthEnabled: () => !0,
2465
- isAuthenticated: Hs,
2472
+ isAuthenticated: js,
2466
2473
  getToken: async () => {
2467
2474
  },
2468
- getUsernameAndPassword: Fs,
2469
- getUsername: js,
2470
- login: Ls,
2471
- logout: $s
2475
+ getUsernameAndPassword: Ms,
2476
+ getUsername: Fs,
2477
+ login: $s,
2478
+ refresh: () => Promise.resolve(),
2479
+ logout: Hs
2472
2480
  } : {
2473
2481
  isOidcAuthEnabled: () => !1,
2474
2482
  isBasicAuthEnabled: () => !1,
@@ -2478,6 +2486,7 @@ const Ls = async (e, t) => {
2478
2486
  getUsernameAndPassword: () => {
2479
2487
  },
2480
2488
  login: () => Promise.resolve(),
2489
+ refresh: () => Promise.resolve(),
2481
2490
  logout: () => Promise.resolve()
2482
2491
  };
2483
2492
  }, Ee = (e) => {
@@ -2497,7 +2506,7 @@ const Ls = async (e, t) => {
2497
2506
  return pe(() => {
2498
2507
  o();
2499
2508
  }, [e.date]), n === "fromNow" ? /* @__PURE__ */ a(pt, { content: /* @__PURE__ */ a("span", { children: i }), children: /* @__PURE__ */ a("span", { children: t }) }) : /* @__PURE__ */ a("span", { children: t });
2500
- }, Zs = (e) => /* @__PURE__ */ a(Ee, { date: e.date, format: "fromNow" }), O = ({ condition: e, children: t }) => (typeof e == "boolean" ? e : e()) ? /* @__PURE__ */ a(j.Fragment, { children: t }) : /* @__PURE__ */ a(j.Fragment, {}), ei = ({ collection: e, emptyState: t, emptyStateTitle: s, emptyStateMessage: i, children: r }) => {
2509
+ }, ei = (e) => /* @__PURE__ */ a(Ee, { date: e.date, format: "fromNow" }), O = ({ condition: e, children: t }) => (typeof e == "boolean" ? e : e()) ? /* @__PURE__ */ a(j.Fragment, { children: t }) : /* @__PURE__ */ a(j.Fragment, {}), ti = ({ collection: e, emptyState: t, emptyStateTitle: s, emptyStateMessage: i, children: r }) => {
2501
2510
  const n = () => !e || e.length === 0, o = t || /* @__PURE__ */ v(oe, { variant: ft.xs, children: [
2502
2511
  /* @__PURE__ */ a(ae, { titleText: s || "None found", headingLevel: "h4" }),
2503
2512
  /* @__PURE__ */ a(ve, { children: i || "No items found." })
@@ -2506,7 +2515,7 @@ const Ls = async (e, t) => {
2506
2515
  }, _e = ({ isLoading: e, loadingComponent: t, children: s }) => {
2507
2516
  const i = () => typeof e == "boolean" ? e : e(), r = t || /* @__PURE__ */ a(te, {});
2508
2517
  return i() ? /* @__PURE__ */ a(j.Fragment, { children: r }) : /* @__PURE__ */ a(j.Fragment, { children: s });
2509
- }, ti = ({ toolbar: e, alwaysShowToolbar: t, emptyState: s, filteredEmptyState: i, isLoading: r, isError: n, loadingComponent: o, errorComponent: c, isEmpty: l, isFiltered: d, children: h }) => {
2518
+ }, si = ({ toolbar: e, alwaysShowToolbar: t, emptyState: s, filteredEmptyState: i, isLoading: r, isError: n, loadingComponent: o, errorComponent: c, isEmpty: l, isFiltered: d, children: h }) => {
2510
2519
  const g = t || !l || d || n;
2511
2520
  return c || (c = /* @__PURE__ */ a("div", { style: { padding: "15px", backgroundColor: "white" }, children: /* @__PURE__ */ a(wt, { isInline: !0, variant: "danger", title: "Error: Something went wrong!", children: /* @__PURE__ */ a("p", { children: "Something went wrong with the action you attempted, but we're not sure what it was. Try reloading the page and hopef for a better result, or contact your admin to report the error." }) }) })), /* @__PURE__ */ v(j.Fragment, { children: [
2512
2521
  /* @__PURE__ */ a(O, { condition: g, children: e }),
@@ -2517,7 +2526,7 @@ const Ls = async (e, t) => {
2517
2526
  /* @__PURE__ */ a(O, { condition: n, children: c })
2518
2527
  ] })
2519
2528
  ] });
2520
- }, si = (e) => {
2529
+ }, ii = (e) => {
2521
2530
  const [t, s] = T(!1), i = (l, d) => {
2522
2531
  s(!1);
2523
2532
  const h = d;
@@ -2563,7 +2572,7 @@ const Ls = async (e, t) => {
2563
2572
  )) })
2564
2573
  }
2565
2574
  );
2566
- }, Ms = (e) => {
2575
+ }, Ws = (e) => {
2567
2576
  var l;
2568
2577
  const [t, s] = T(!1), i = (d, h) => {
2569
2578
  s(!1), e.onSelect(e.items[h]);
@@ -2606,18 +2615,18 @@ const Ls = async (e, t) => {
2606
2615
  ))
2607
2616
  }
2608
2617
  );
2609
- }, ii = ({ expanded: e, onClick: t }) => e ? /* @__PURE__ */ a(qt, { onClick: t, style: { cursor: "pointer" } }) : /* @__PURE__ */ a(Dt, { onClick: t, style: { cursor: "pointer" } }), lt = {
2618
+ }, ri = ({ expanded: e, onClick: t }) => e ? /* @__PURE__ */ a(Dt, { onClick: t, style: { cursor: "pointer" } }) : /* @__PURE__ */ a(qt, { onClick: t, style: { cursor: "pointer" } }), lt = {
2610
2619
  padding: "5px",
2611
2620
  minHeight: "128px",
2612
2621
  borderRight: 0,
2613
2622
  borderLeft: 0,
2614
2623
  borderBottom: "1px solid #666",
2615
2624
  backgroundColor: "rgb(240, 240, 240)"
2616
- }, Ws = {
2625
+ }, Js = {
2617
2626
  ...lt,
2618
2627
  color: "red",
2619
2628
  overflow: "auto"
2620
- }, ri = (e) => {
2629
+ }, ni = (e) => {
2621
2630
  const [t, s] = T(""), [i, r] = T(""), [n, o] = T(!1), [c, l] = T(), d = (k, A) => {
2622
2631
  s(A);
2623
2632
  }, h = () => t != null && t.trim().length > 0, g = () => c != null && c.trim().length > 0, _ = () => {
@@ -2650,7 +2659,7 @@ const Ls = async (e, t) => {
2650
2659
  /* @__PURE__ */ a("div", { className: "url-clear-button", children: /* @__PURE__ */ a(le, { "data-testid": `${e.testId}-clear`, variant: "control", isDisabled: !h(), onClick: S, children: "Clear" }) })
2651
2660
  ] }),
2652
2661
  /* @__PURE__ */ a("div", { className: "url-upload-preview", children: /* @__PURE__ */ v(_e, { isLoading: n, loadingComponent: x, children: [
2653
- /* @__PURE__ */ a(O, { condition: g, children: /* @__PURE__ */ v("div", { className: "url-upload-error", style: Ws, children: [
2662
+ /* @__PURE__ */ a(O, { condition: g, children: /* @__PURE__ */ v("div", { className: "url-upload-error", style: Js, children: [
2654
2663
  /* @__PURE__ */ a("div", { children: "Error getting content from URL." }),
2655
2664
  /* @__PURE__ */ a("div", { children: c })
2656
2665
  ] }) }),
@@ -2666,7 +2675,7 @@ const Ls = async (e, t) => {
2666
2675
  ) })
2667
2676
  ] }) })
2668
2677
  ] });
2669
- }, ni = (e) => {
2678
+ }, oi = (e) => {
2670
2679
  const [t, s] = T(), [i, r] = T();
2671
2680
  return pe(() => {
2672
2681
  e.isOpen && (typeof e.frontendInfo == "function" ? e.frontendInfo().then(s) : s(e.frontendInfo), typeof e.backendInfo == "function" ? e.backendInfo().then(r) : r(e.backendInfo));
@@ -2681,7 +2690,7 @@ const Ls = async (e, t) => {
2681
2690
  brandImageAlt: e.brandImageAlt,
2682
2691
  "aria-label": e.brandImageAlt,
2683
2692
  children: /* @__PURE__ */ v(It, { className: "app-about-modal-content", style: { marginTop: "-25px" }, children: [
2684
- /* @__PURE__ */ a(De, { component: Le.h2, children: "Web console info" }),
2693
+ /* @__PURE__ */ a(qe, { component: Le.h2, children: "Web console info" }),
2685
2694
  /* @__PURE__ */ a(_e, { isLoading: t === void 0, children: /* @__PURE__ */ v($e, { component: "dl", children: [
2686
2695
  /* @__PURE__ */ a(b, { component: "dt", children: "Project" }),
2687
2696
  /* @__PURE__ */ a(b, { component: "dd", children: /* @__PURE__ */ a("a", { href: t == null ? void 0 : t.url, target: "_blank", children: t == null ? void 0 : t.name }) }),
@@ -2692,7 +2701,7 @@ const Ls = async (e, t) => {
2692
2701
  /* @__PURE__ */ a(b, { component: "dt", children: "Digest" }),
2693
2702
  /* @__PURE__ */ a(b, { component: "dd", children: t == null ? void 0 : t.digest })
2694
2703
  ] }) }),
2695
- /* @__PURE__ */ a(De, { style: { marginTop: "40px" }, component: Le.h2, children: e.backendLabel }),
2704
+ /* @__PURE__ */ a(qe, { style: { marginTop: "40px" }, component: Le.h2, children: e.backendLabel }),
2696
2705
  /* @__PURE__ */ a(_e, { isLoading: i === void 0, children: /* @__PURE__ */ v($e, { component: "dl", children: [
2697
2706
  /* @__PURE__ */ a(b, { component: "dt", children: "Name" }),
2698
2707
  /* @__PURE__ */ a(b, { component: "dd", children: (i == null ? void 0 : i.name) || "" }),
@@ -2706,7 +2715,7 @@ const Ls = async (e, t) => {
2706
2715
  ] })
2707
2716
  }
2708
2717
  );
2709
- }, Js = (e) => {
2718
+ }, Ks = (e) => {
2710
2719
  const [t, s] = T({
2711
2720
  username: "",
2712
2721
  password: ""
@@ -2781,7 +2790,7 @@ const Ls = async (e, t) => {
2781
2790
  ] })
2782
2791
  }
2783
2792
  );
2784
- }, oi = (e) => /* @__PURE__ */ v(
2793
+ }, ai = (e) => /* @__PURE__ */ v(
2785
2794
  Ue,
2786
2795
  {
2787
2796
  title: "Please Wait",
@@ -2797,7 +2806,7 @@ const Ls = async (e, t) => {
2797
2806
  /* @__PURE__ */ a("span", { className: "message", style: { fontSize: "15px", color: "#333", marginLeft: "10px" }, children: e.message })
2798
2807
  ]
2799
2808
  }
2800
- ), ai = (e) => /* @__PURE__ */ a(
2809
+ ), ci = (e) => /* @__PURE__ */ a(
2801
2810
  Ue,
2802
2811
  {
2803
2812
  title: e.title,
@@ -2809,7 +2818,7 @@ const Ls = async (e, t) => {
2809
2818
  "aria-label": "progress-modal",
2810
2819
  children: /* @__PURE__ */ a(Et, { title: e.message, value: e.progress })
2811
2820
  }
2812
- ), ci = (e) => {
2821
+ ), li = (e) => {
2813
2822
  const [t, s] = T(
2814
2823
  0
2815
2824
  /* AUTHENTICATING */
@@ -2839,24 +2848,24 @@ const Ls = async (e, t) => {
2839
2848
  /* @__PURE__ */ a(ae, { titleText: "Loading", headingLevel: "h4" }),
2840
2849
  /* @__PURE__ */ a(ve, { children: /* @__PURE__ */ a(te, { size: "xl", "aria-label": "Loading spinner" }) })
2841
2850
  ] }) }),
2842
- /* @__PURE__ */ a(O, { condition: t === 0 && i.isBasicAuthEnabled(), children: /* @__PURE__ */ a(Js, { onLogin: r }) }),
2851
+ /* @__PURE__ */ a(O, { condition: t === 0 && i.isBasicAuthEnabled(), children: /* @__PURE__ */ a(Ks, { onLogin: r }) }),
2843
2852
  /* @__PURE__ */ a(O, { condition: t === 2, children: /* @__PURE__ */ v(oe, { children: [
2844
2853
  /* @__PURE__ */ a(ae, { titleText: "Empty state", headingLevel: "h4", icon: /* @__PURE__ */ a(ze, { icon: Lt }) }),
2845
2854
  /* @__PURE__ */ a(ve, { children: "Authentication failed." })
2846
2855
  ] }) }),
2847
2856
  /* @__PURE__ */ a(O, { condition: t === 1, children: e.children })
2848
2857
  ] });
2849
- }, li = (e) => {
2858
+ }, di = (e) => {
2850
2859
  const t = ct();
2851
2860
  return (() => {
2852
2861
  let i = !0;
2853
2862
  return e.enabled !== void 0 && (i = i && (t.isOidcAuthEnabled() === e.enabled || t.isBasicAuthEnabled() === e.enabled)), i;
2854
2863
  })() ? /* @__PURE__ */ a(j.Fragment, { children: e.children }) : /* @__PURE__ */ a(j.Fragment, {});
2855
- }, di = (e) => /* @__PURE__ */ a(Ct, { categoryName: e.categoryName || "Filters", isClosable: !0, onClick: e.onClearAllCriteria, children: e.criteria.map((t, s) => /* @__PURE__ */ v(Pt, { onClick: () => e.onRemoveCriteria(t), children: [
2864
+ }, hi = (e) => /* @__PURE__ */ a(Ct, { categoryName: e.categoryName || "Filters", isClosable: !0, onClick: e.onClearAllCriteria, children: e.criteria.map((t, s) => /* @__PURE__ */ v(Pt, { onClick: () => e.onRemoveCriteria(t), children: [
2856
2865
  /* @__PURE__ */ a("b", { children: t.filterBy.label }),
2857
2866
  /* @__PURE__ */ a("span", { children: ": " }),
2858
2867
  /* @__PURE__ */ a("span", { children: t.filterValue })
2859
- ] }, s)) }), hi = (e) => {
2868
+ ] }, s)) }), gi = (e) => {
2860
2869
  const [t, s] = T(e.filterTypes[0]), [i, r] = T(""), n = (o) => {
2861
2870
  o && o.preventDefault(), e.onAddCriteria({
2862
2871
  filterBy: t,
@@ -2867,7 +2876,7 @@ const Ls = async (e, t) => {
2867
2876
  s(e.filterTypes[0]);
2868
2877
  }, [e.filterTypes]), /* @__PURE__ */ a(Be, { onSubmit: n, children: /* @__PURE__ */ v(Rt, { children: [
2869
2878
  /* @__PURE__ */ a(
2870
- Ms,
2879
+ Ws,
2871
2880
  {
2872
2881
  value: t,
2873
2882
  items: e.filterTypes,
@@ -2902,7 +2911,7 @@ const Ls = async (e, t) => {
2902
2911
  )
2903
2912
  ] }) });
2904
2913
  };
2905
- function gi() {
2914
+ function ui() {
2906
2915
  return /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a(
2907
2916
  ae,
2908
2917
  {
@@ -2912,7 +2921,7 @@ function gi() {
2912
2921
  }
2913
2922
  ) });
2914
2923
  }
2915
- function ui({
2924
+ function _i({
2916
2925
  itemCount: e,
2917
2926
  page: t,
2918
2927
  perPage: s,
@@ -2933,7 +2942,7 @@ function ui({
2933
2942
  }
2934
2943
  );
2935
2944
  }
2936
- function Ks({ columns: e, rows: t, getTd: s = () => xe }) {
2945
+ function Bs({ columns: e, rows: t, getTd: s = () => xe }) {
2937
2946
  const i = new Array(e).fill(0).map((n, o) => {
2938
2947
  const c = s(o);
2939
2948
  return /* @__PURE__ */ a(c, { children: /* @__PURE__ */ a(
@@ -2945,7 +2954,7 @@ function Ks({ columns: e, rows: t, getTd: s = () => xe }) {
2945
2954
  }), r = new Array(t).fill(0).map((n, o) => /* @__PURE__ */ a(de, { children: i }, `row_${o}`));
2946
2955
  return /* @__PURE__ */ a(Re, { children: r });
2947
2956
  }
2948
- const _i = ({
2957
+ const pi = ({
2949
2958
  ariaLabel: e,
2950
2959
  minimumColumnWidth: t = 250,
2951
2960
  columns: s,
@@ -2973,8 +2982,8 @@ const _i = ({
2973
2982
  }, { ref: R } = Jt({ onResize: F }), w = I >= 576, E = Ne(
2974
2983
  (f) => w && f !== 0 && f !== s.length - 1,
2975
2984
  [s, w]
2976
- ), U = qe(() => s.map((f, m) => {
2977
- const q = ne(
2985
+ ), U = De(() => s.map((f, m) => {
2986
+ const D = ne(
2978
2987
  ({ children: J, ...K }, X) => /* @__PURE__ */ a(
2979
2988
  dt,
2980
2989
  {
@@ -2989,8 +2998,8 @@ const _i = ({
2989
2998
  }
2990
2999
  )
2991
3000
  );
2992
- return q.displayName = "ResponsiveThCurried", r({
2993
- Th: q,
3001
+ return D.displayName = "ResponsiveThCurried", r({
3002
+ Th: D,
2994
3003
  key: `header_${f}`,
2995
3004
  column: f,
2996
3005
  colIndex: m
@@ -3005,7 +3014,7 @@ const _i = ({
3005
3014
  ]), y = Ne(
3006
3015
  (f) => {
3007
3016
  const m = ne(
3008
- ({ children: q, ...J }, K) => /* @__PURE__ */ a(
3017
+ ({ children: D, ...J }, K) => /* @__PURE__ */ a(
3009
3018
  Ce,
3010
3019
  {
3011
3020
  position: f,
@@ -3014,14 +3023,14 @@ const _i = ({
3014
3023
  canHide: E(f),
3015
3024
  ...J,
3016
3025
  ref: K,
3017
- children: q
3026
+ children: D
3018
3027
  }
3019
3028
  )
3020
3029
  );
3021
3030
  return m.displayName = "ResponsiveTdCurried", m;
3022
3031
  },
3023
3032
  [E, t, I]
3024
- ), z = qe(
3033
+ ), z = De(
3025
3034
  () => s.map((f, m) => y(m)),
3026
3035
  [s, y]
3027
3036
  );
@@ -3038,7 +3047,7 @@ const _i = ({
3038
3047
  /* @__PURE__ */ a(Ft, { children: /* @__PURE__ */ a(de, { children: U }) }),
3039
3048
  /* @__PURE__ */ v(Mt, { children: [
3040
3049
  i === void 0 && /* @__PURE__ */ a(
3041
- Ks,
3050
+ Bs,
3042
3051
  {
3043
3052
  columns: s.length,
3044
3053
  rows: h,
@@ -3046,14 +3055,14 @@ const _i = ({
3046
3055
  }
3047
3056
  ),
3048
3057
  i == null ? void 0 : i.map((f, m) => {
3049
- const q = l !== void 0 && l({ row: f, rowIndex: m }), J = d !== void 0 && d({ row: f, rowIndex: m }), K = !q && g ? () => g({ row: f, rowIndex: m }) : void 0, X = s.map((Y, se) => n({
3058
+ const D = l !== void 0 && l({ row: f, rowIndex: m }), J = d !== void 0 && d({ row: f, rowIndex: m }), K = !D && g ? () => g({ row: f, rowIndex: m }) : void 0, X = s.map((Y, se) => n({
3050
3059
  Td: z[se],
3051
3060
  key: `row_${m}_cell_${Y}`,
3052
3061
  column: Y,
3053
3062
  colIndex: se,
3054
3063
  rowIndex: m,
3055
3064
  row: f
3056
- })), fe = !q && o && /* @__PURE__ */ a(
3065
+ })), fe = !D && o && /* @__PURE__ */ a(
3057
3066
  Ce,
3058
3067
  {
3059
3068
  position: s.length,
@@ -3068,7 +3077,7 @@ const _i = ({
3068
3077
  return /* @__PURE__ */ v(
3069
3078
  ht,
3070
3079
  {
3071
- isDeleted: q,
3080
+ isDeleted: D,
3072
3081
  isSelected: J,
3073
3082
  onClick: K,
3074
3083
  rowOuiaId: S == null ? void 0 : S({ row: f, rowIndex: m }),
@@ -3149,31 +3158,31 @@ const ht = Pe(
3149
3158
  );
3150
3159
  ht.displayName = "DeletableRow";
3151
3160
  export {
3152
- ni as AppAboutModal,
3153
- ci as ApplicationAuth,
3161
+ oi as AppAboutModal,
3162
+ li as ApplicationAuth,
3154
3163
  Kt as AuthConfigContext,
3155
- Js as BasicAuthModal,
3156
- hi as ChipFilterInput,
3164
+ Ks as BasicAuthModal,
3165
+ gi as ChipFilterInput,
3157
3166
  Ee as DateTime,
3158
3167
  ht as DeletableRow,
3159
- di as FilterChips,
3160
- Zs as FromNow,
3168
+ hi as FilterChips,
3169
+ ei as FromNow,
3161
3170
  O as If,
3162
- li as IfAuth,
3163
- ei as IfNotEmpty,
3171
+ di as IfAuth,
3172
+ ti as IfNotEmpty,
3164
3173
  _e as IfNotLoading,
3165
- ti as ListWithToolbar,
3166
- gi as Loading,
3167
- si as ObjectDropdown,
3168
- Ms as ObjectSelect,
3169
- ui as Pagination,
3170
- oi as PleaseWaitModal,
3171
- ai as ProgressModal,
3172
- _i as ResponsiveTable,
3174
+ si as ListWithToolbar,
3175
+ ui as Loading,
3176
+ ii as ObjectDropdown,
3177
+ Ws as ObjectSelect,
3178
+ _i as Pagination,
3179
+ ai as PleaseWaitModal,
3180
+ ci as ProgressModal,
3181
+ pi as ResponsiveTable,
3173
3182
  Ce as ResponsiveTd,
3174
3183
  dt as ResponsiveTh,
3175
- Ks as TableSkeleton,
3176
- ii as ToggleIcon,
3177
- ri as UrlUpload,
3184
+ Bs as TableSkeleton,
3185
+ ri as ToggleIcon,
3186
+ ni as UrlUpload,
3178
3187
  ct as useAuth
3179
3188
  };
package/package.json CHANGED
@@ -1,13 +1,17 @@
1
1
  {
2
2
  "name": "@apicurio/common-ui-components",
3
3
  "private": false,
4
- "version": "2.0.13",
4
+ "version": "2.0.15",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
8
8
  "files": [
9
9
  "dist"
10
10
  ],
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Apicurio/apicurio-common-ui-components"
14
+ },
11
15
  "scripts": {
12
16
  "clean": "rimraf dist",
13
17
  "dev": "vite",