ag-common 0.0.59 → 0.0.63

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.
@@ -41,7 +41,7 @@ const stripPKs = (r, excludePK = true) => {
41
41
  }
42
42
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
43
43
  // @ts-ignore
44
- const { PK, PK1, PK2, PK3, PK4, L1, L2, L3, L4, L5, L6, TYPE } = r, rest = __rest(r, ["PK", "PK1", "PK2", "PK3", "PK4", "L1", "L2", "L3", "L4", "L5", "L6", "TYPE"]);
44
+ const { PK, PK1, PK2, PK3, PK4, PK5, L1, L2, L3, L4, L5, L6, TYPE } = r, rest = __rest(r, ["PK", "PK1", "PK2", "PK3", "PK4", "PK5", "L1", "L2", "L3", "L4", "L5", "L6", "TYPE"]);
45
45
  if (!excludePK) {
46
46
  //@ts-ignore
47
47
  rest.PK = PK;
@@ -36,6 +36,7 @@ const jwtVerify = ({ COGNITO_USER_POOL_ID, token, }) => __awaiter(void 0, void 0
36
36
  }
37
37
  jwksClient.getSigningKey(header.kid, (errorV, key) => {
38
38
  if (errorV) {
39
+ (0, log_1.error)(`signing key error. jwks=${jwksUri} iss=${issuer}`);
39
40
  reject(errorV);
40
41
  return;
41
42
  }
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
- export declare const Chevron: ({ down, width, className, colour, }: {
2
+ export declare const Chevron: ({ down, width, className, colour, onToggle, }: {
3
3
  colour?: string | undefined;
4
4
  className?: string | undefined;
5
5
  width?: string | undefined;
6
6
  down: boolean;
7
+ onToggle?: (() => void) | undefined;
7
8
  }) => JSX.Element;
@@ -20,6 +20,6 @@ const IconStyled = (0, styled_components_1.default)(Icon_1.Icon) `
20
20
  `;
21
21
  const ChevronIcon = (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -256 1792 1792" },
22
22
  react_1.default.createElement("path", { d: "M1679.339 301.56q0 53-37 90l-651 651q-38 38-91 38-54 0-90-38l-651-651q-38-36-38-90 0-53 38-91l74-75q39-37 91-37 53 0 90 37l486 486 486-486q37-37 90-37 52 0 91 37l75 75q37 39 37 91z" })));
23
- const Chevron = ({ down, width = '1.2rem', className, colour = 'black', }) => (react_1.default.createElement(SChevron, { className: className },
23
+ const Chevron = ({ down, width = '1.2rem', className, colour = 'black', onToggle, }) => (react_1.default.createElement(SChevron, { className: className, onClick: () => onToggle === null || onToggle === void 0 ? void 0 : onToggle(), onTouchStart: () => onToggle === null || onToggle === void 0 ? void 0 : onToggle(), onKeyPress: (e) => e.key === 'Enter' && (onToggle === null || onToggle === void 0 ? void 0 : onToggle()) },
24
24
  react_1.default.createElement(IconStyled, { flip: down, fill: colour, width: width, height: width }, ChevronIcon)));
25
25
  exports.Chevron = Chevron;
@@ -52,6 +52,7 @@ const callOpenApi = ({ func, apiUrl, overrideAuth, refreshToken, logout, newDefa
52
52
  const errorMessage = (((_d = ae.response) === null || _d === void 0 ? void 0 : _d.data) ||
53
53
  ((_e = ae.response) === null || _e === void 0 ? void 0 : _e.statusText) ||
54
54
  ((_f = ae.response) === null || _f === void 0 ? void 0 : _f.status) ||
55
+ ae.message ||
55
56
  'ERROR');
56
57
  if (status === 403 || status === 401) {
57
58
  logout();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-common",
3
- "version": "0.0.59",
3
+ "version": "0.0.63",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Andrei Gec <@andreigec> (https://gec.dev/)",