@keycloak/keycloak-ui-shared 26.7.5 → 26.8.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.
@@ -1,2 +1,2 @@
1
1
  import { KeycloakSelectProps } from './KeycloakSelect';
2
- export declare const TypeaheadSelect: ({ toggleId, onSelect, onToggle, onFilter, variant, validated, placeholderText, maxHeight, width, toggleIcon, direction, selections, typeAheadAriaLabel, chipGroupComponent, chipGroupProps, footer, isDisabled, children, ...rest }: KeycloakSelectProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const TypeaheadSelect: ({ toggleId, onSelect, onToggle, onFilter, onClear, variant, validated, placeholderText, maxHeight, width, toggleIcon, direction, selections, typeAheadAriaLabel, chipGroupComponent, chipGroupProps, footer, isDisabled, children, ...rest }: KeycloakSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Removes the parameters of an authorization response that cannot belong to this application.
3
+ *
4
+ * keycloak-js treats a URL as its own callback only when it carries `state` alongside `code` or
5
+ * `error`, and strips the response parameters from the address bar when it does. A response
6
+ * without `state` was never requested by this application — keycloak-js always sends one — so it
7
+ * goes unrecognized and the parameters are left behind. They would then be sent as the
8
+ * `redirect_uri` of the next authorization request made from the page, which the server rejects
9
+ * for carrying OIDC response parameters, leaving the page unable to log in at all.
10
+ *
11
+ * @param url the current URL
12
+ * @returns the URL with the response parameters removed, or `undefined` if it should be left as
13
+ * it is, either because it carries no response or because the response belongs to this
14
+ * application and keycloak-js will deal with it.
15
+ */
16
+ export declare function stripForeignAuthResponse(url: string): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keycloak/keycloak-ui-shared",
3
- "version": "26.7.5",
3
+ "version": "26.8.0",
4
4
  "type": "module",
5
5
  "main": "./dist/keycloak-ui-shared.js",
6
6
  "types": "./dist/keycloak-ui-shared.d.ts",
@@ -36,6 +36,12 @@
36
36
  "dependencies": [
37
37
  "../keycloak-admin-client:build"
38
38
  ]
39
+ },
40
+ "test": {
41
+ "command": "vitest run",
42
+ "dependencies": [
43
+ "../keycloak-admin-client:build"
44
+ ]
39
45
  }
40
46
  },
41
47
  "dependencies": {
@@ -50,19 +56,21 @@
50
56
  "react-dom": "^18.3.1",
51
57
  "react-hook-form": "7.70.0",
52
58
  "react-i18next": "^16.5.1",
53
- "@keycloak/keycloak-admin-client": "26.7.5"
59
+ "@keycloak/keycloak-admin-client": "26.8.0"
54
60
  },
55
61
  "devDependencies": {
62
+ "@testing-library/react": "^16.3.1",
56
63
  "@types/lodash-es": "^4.17.12",
57
64
  "@types/react": "^18.3.18",
58
65
  "@types/react-dom": "^18.3.5",
59
66
  "@vitejs/plugin-react-swc": "^4.2.2",
67
+ "jsdom": "^27.4.0",
60
68
  "rollup-plugin-peer-deps-external": "^2.2.4",
61
69
  "vite": "^7.3.5",
62
70
  "vite-plugin-checker": "^0.12.0",
63
71
  "vite-plugin-dts": "^4.5.4",
64
72
  "vite-plugin-lib-inject-css": "^2.2.2",
65
- "vitest": "^4.0.16"
73
+ "vitest": "^4.1.11"
66
74
  },
67
75
  "author": {
68
76
  "name": "Red Hat, Inc.",
@@ -77,6 +85,7 @@
77
85
  "homepage": "https://www.keycloak.org/",
78
86
  "scripts": {
79
87
  "build": "wireit",
80
- "lint": "wireit"
88
+ "lint": "wireit",
89
+ "test": "wireit"
81
90
  }
82
91
  }