@apicurio/common-ui-components 2.0.15 → 2.0.16

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 (2) hide show
  1. package/dist/main.js +23 -23
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -357,7 +357,7 @@ var C = Ve, W = class {
357
357
  const i = new URL(e, "http://127.0.0.1")[t === "fragment" ? "hash" : "search"];
358
358
  return new URLSearchParams(i.slice(1));
359
359
  }
360
- }, G = ";", B = class extends Error {
360
+ }, G = ";", z = class extends Error {
361
361
  constructor(e, t) {
362
362
  var s, i, r;
363
363
  if (super(e.error_description || e.error || ""), this.form = t, this.name = "ErrorResponse", !e.error)
@@ -512,7 +512,7 @@ var C = Ve, W = class {
512
512
  throw r.error("Error parsing JSON response", d), o.ok ? d : new Error(`${o.statusText} (${o.status})`);
513
513
  }
514
514
  if (!o.ok)
515
- throw r.error("Error from server:", l), l.error ? new B(l) : new Error(`${o.statusText} (${o.status}): ${JSON.stringify(l)}`);
515
+ throw r.error("Error from server:", l), l.error ? new z(l) : new Error(`${o.statusText} (${o.status}): ${JSON.stringify(l)}`);
516
516
  return l;
517
517
  }
518
518
  async postForm(e, {
@@ -551,7 +551,7 @@ var C = Ve, W = class {
551
551
  const _ = l.headers.get("dpop-nonce");
552
552
  throw new be(_, `${JSON.stringify(g)}`);
553
553
  }
554
- throw g.error ? new B(g, t) : new Error(`${l.statusText} (${l.status}): ${JSON.stringify(g)}`);
554
+ throw g.error ? new z(g, t) : new Error(`${l.statusText} (${l.status}): ${JSON.stringify(g)}`);
555
555
  }
556
556
  return g;
557
557
  }
@@ -702,7 +702,7 @@ var C = Ve, W = class {
702
702
  disablePKCE: U = !1,
703
703
  // other behavior
704
704
  stateStore: y,
705
- revokeTokenAdditionalContentTypes: z,
705
+ revokeTokenAdditionalContentTypes: V,
706
706
  fetchRequestCredentials: f,
707
707
  refreshTokenAllowedScope: m,
708
708
  // extra
@@ -713,7 +713,7 @@ var C = Ve, W = class {
713
713
  omitScopeWhenRequesting: fe = !1
714
714
  }) {
715
715
  var Y;
716
- if (this.authority = e, t ? this.metadataUrl = t : (this.metadataUrl = e, e && (this.metadataUrl.endsWith("/") || (this.metadataUrl += "/"), this.metadataUrl += ".well-known/openid-configuration")), this.metadata = s, this.metadataSeed = r, this.signingKeys = i, this.client_id = n, this.client_secret = o, this.response_type = c, this.scope = l, this.redirect_uri = d, this.post_logout_redirect_uri = h, this.client_authentication = g, this.prompt = _, this.display = S, this.max_age = x, this.ui_locales = k, this.acr_values = A, this.resource = I, this.response_mode = N, this.filterProtocolClaims = P ?? !0, this.loadUserInfo = !!F, this.staleStateAgeInSeconds = w, this.mergeClaimsStrategy = E, this.omitScopeWhenRequesting = fe, this.disablePKCE = !!U, this.revokeTokenAdditionalContentTypes = z, this.fetchRequestCredentials = f || "same-origin", this.requestTimeoutInSeconds = R, y)
716
+ if (this.authority = e, t ? this.metadataUrl = t : (this.metadataUrl = e, e && (this.metadataUrl.endsWith("/") || (this.metadataUrl += "/"), this.metadataUrl += ".well-known/openid-configuration")), this.metadata = s, this.metadataSeed = r, this.signingKeys = i, this.client_id = n, this.client_secret = o, this.response_type = c, this.scope = l, this.redirect_uri = d, this.post_logout_redirect_uri = h, this.client_authentication = g, this.prompt = _, this.display = S, this.max_age = x, this.ui_locales = k, this.acr_values = A, this.resource = I, this.response_mode = N, this.filterProtocolClaims = P ?? !0, this.loadUserInfo = !!F, this.staleStateAgeInSeconds = w, this.mergeClaimsStrategy = E, this.omitScopeWhenRequesting = fe, this.disablePKCE = !!U, this.revokeTokenAdditionalContentTypes = V, this.fetchRequestCredentials = f || "same-origin", this.requestTimeoutInSeconds = R, y)
717
717
  this.stateStore = y;
718
718
  else {
719
719
  const se = typeof window < "u" ? window.localStorage : new Ge();
@@ -904,13 +904,13 @@ var C = Ve, W = class {
904
904
  validateSignoutResponse(e, t) {
905
905
  const s = this._logger.create("validateSignoutResponse");
906
906
  if (t.id !== e.state && s.throw(new Error("State does not match")), s.debug("state validated"), e.userState = t.data, e.error)
907
- throw s.warn("Response was error", e.error), new B(e);
907
+ throw s.warn("Response was error", e.error), new z(e);
908
908
  }
909
909
  _processSigninState(e, t) {
910
910
  var s;
911
911
  const i = this._logger.create("_processSigninState");
912
912
  if (t.id !== e.state && i.throw(new Error("State does not match")), t.client_id || i.throw(new Error("No client_id on state")), t.authority || i.throw(new Error("No authority on state")), this._settings.authority !== t.authority && i.throw(new Error("authority mismatch on settings vs. signin state")), this._settings.client_id && this._settings.client_id !== t.client_id && i.throw(new Error("client_id mismatch on settings vs. signin state")), i.debug("state validated"), e.userState = t.data, e.url_state = t.url_state, (s = e.scope) != null || (e.scope = t.scope), e.error)
913
- throw i.warn("Response was error", e.error), new B(e);
913
+ throw i.warn("Response was error", e.error), new z(e);
914
914
  t.code_verifier && !e.code && i.throw(new Error("Expected code in response"));
915
915
  }
916
916
  async _processClaims(e, t = !1, s = !0) {
@@ -1245,8 +1245,8 @@ var os = Ze, as = "openid", we = class {
1245
1245
  omitScopeWhenRequesting: w
1246
1246
  });
1247
1247
  await this.clearStaleState();
1248
- const z = y.state;
1249
- return await this.settings.stateStore.set(z.id, z.toStorageString()), y;
1248
+ const V = y.state;
1249
+ return await this.settings.stateStore.set(V.id, V.toStorageString()), y;
1250
1250
  }
1251
1251
  async readSigninResponseState(e, t = !1) {
1252
1252
  const s = this._logger.create("readSigninResponseState"), i = new we(ye.readParams(e, this.settings.response_mode));
@@ -1379,7 +1379,7 @@ var os = Ze, as = "openid", we = class {
1379
1379
  const s = this._logger.create("readSignoutResponseState"), i = new ls(ye.readParams(e, this.settings.response_mode));
1380
1380
  if (!i.state) {
1381
1381
  if (s.debug("No state in response"), i.error)
1382
- throw s.warn("Response was error:", i.error), new B(i);
1382
+ throw s.warn("Response was error:", i.error), new z(i);
1383
1383
  return { state: void 0, response: i };
1384
1384
  }
1385
1385
  const r = await this.settings.stateStore[t ? "remove" : "get"](i.state);
@@ -2131,7 +2131,7 @@ var os = Ze, as = "openid", we = class {
2131
2131
  sub: d.profile.sub
2132
2132
  }) : (t.info("success, user not authenticated"), null);
2133
2133
  } catch (l) {
2134
- if (this.settings.monitorAnonymousSession && l instanceof B)
2134
+ if (this.settings.monitorAnonymousSession && l instanceof z)
2135
2135
  switch (l.error) {
2136
2136
  case "login_required":
2137
2137
  case "consent_required":
@@ -2170,7 +2170,7 @@ var os = Ze, as = "openid", we = class {
2170
2170
  const s = this._logger.create("_buildUser"), i = new me(e);
2171
2171
  if (t) {
2172
2172
  if (t !== i.profile.sub)
2173
- throw s.debug("current user does not match user returned from signin. sub from signin:", i.profile.sub), new B({ ...e, error: "login_required" });
2173
+ throw s.debug("current user does not match user returned from signin. sub from signin:", i.profile.sub), new z({ ...e, error: "login_required" });
2174
2174
  s.debug("current user matches user returned from signin");
2175
2175
  }
2176
2176
  return await this.storeUser(i), s.debug("user stored"), await this._events.load(i), i;
@@ -2380,24 +2380,24 @@ var os = Ze, as = "openid", we = class {
2380
2380
  return await C.generateDPoPJkt(t.keys);
2381
2381
  }
2382
2382
  };
2383
- const Cs = ["url", "clientId", "redirectUri", "scope", "logoutUrl"], Ps = "openid profile email";
2383
+ const Cs = ["url", "clientId", "redirectUri", "scope", "logoutUrl", "loadUserInfo"], Ps = "openid profile email";
2384
2384
  function Rs(e, t) {
2385
2385
  const s = {};
2386
2386
  return e.forEach((i) => {
2387
2387
  t[i] !== void 0 && (s[i] = t[i]);
2388
2388
  }), s;
2389
2389
  }
2390
- let u, V;
2391
- const Us = (e) => (V = Rs(Cs, e), new Es({
2392
- authority: V.url,
2393
- client_id: V.clientId,
2394
- redirect_uri: V.redirectUri,
2390
+ let u, B;
2391
+ const Us = (e) => (B = Rs(Cs, e), new Es({
2392
+ authority: B.url,
2393
+ client_id: B.clientId,
2394
+ redirect_uri: B.redirectUri,
2395
2395
  response_type: "code",
2396
- scope: V.scope || Ps,
2396
+ scope: B.scope || Ps,
2397
2397
  filterProtocolClaims: !0,
2398
2398
  includeIdTokenInSilentRenew: !0,
2399
2399
  includeIdTokenInSilentSignout: !0,
2400
- loadUserInfo: !0
2400
+ loadUserInfo: B.loadUserInfo ?? !0
2401
2401
  })), xs = async () => {
2402
2402
  try {
2403
2403
  console.debug("[Auth] Logging in using OIDC");
@@ -2420,7 +2420,7 @@ const Us = (e) => (V = Rs(Cs, e), new Es({
2420
2420
  const e = await (u == null ? void 0 : u.getUser()), t = e == null ? void 0 : e.id_token;
2421
2421
  return u == null ? void 0 : u.removeUser().then(() => u == null ? void 0 : u.signoutRedirect({
2422
2422
  id_token_hint: t,
2423
- post_logout_redirect_uri: V.logoutUrl || window.location.href
2423
+ post_logout_redirect_uri: B.logoutUrl || window.location.href
2424
2424
  }));
2425
2425
  }, Ns = async () => await (u == null ? void 0 : u.getUser()) != null, Ds = async () => {
2426
2426
  const e = await (u == null ? void 0 : u.getUser());
@@ -3030,7 +3030,7 @@ const pi = ({
3030
3030
  return m.displayName = "ResponsiveTdCurried", m;
3031
3031
  },
3032
3032
  [E, t, I]
3033
- ), z = De(
3033
+ ), V = De(
3034
3034
  () => s.map((f, m) => y(m)),
3035
3035
  [s, y]
3036
3036
  );
@@ -3056,7 +3056,7 @@ const pi = ({
3056
3056
  ),
3057
3057
  i == null ? void 0 : i.map((f, m) => {
3058
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({
3059
- Td: z[se],
3059
+ Td: V[se],
3060
3060
  key: `row_${m}_cell_${Y}`,
3061
3061
  column: Y,
3062
3062
  colIndex: se,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apicurio/common-ui-components",
3
3
  "private": false,
4
- "version": "2.0.15",
4
+ "version": "2.0.16",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",